// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	strfmt "github.com/go-openapi/strfmt"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// GetFleetsFleetIDWingsOKBodyItems get_fleets_fleet_id_wings_200_ok
//
// 200 ok object
// swagger:model getFleetsFleetIdWingsOKBodyItems

type GetFleetsFleetIDWingsOKBodyItems struct {

	// get_fleets_fleet_id_wings_id
	//
	// id integer
	// Required: true
	ID *int64 `json:"id"`

	// get_fleets_fleet_id_wings_name
	//
	// name string
	// Required: true
	Name *string `json:"name"`

	// squads
	// Required: true
	Squads GetFleetsFleetIDWingsOKBodyItemsSquads `json:"squads"`
}

/* polymorph getFleetsFleetIdWingsOKBodyItems id false */

/* polymorph getFleetsFleetIdWingsOKBodyItems name false */

/* polymorph getFleetsFleetIdWingsOKBodyItems squads false */

// Validate validates this get fleets fleet Id wings o k body items
func (m *GetFleetsFleetIDWingsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateName(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateSquads(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *GetFleetsFleetIDWingsOKBodyItems) validateID(formats strfmt.Registry) error {

	if err := validate.Required("id", "body", m.ID); err != nil {
		return err
	}

	return nil
}

func (m *GetFleetsFleetIDWingsOKBodyItems) validateName(formats strfmt.Registry) error {

	if err := validate.Required("name", "body", m.Name); err != nil {
		return err
	}

	return nil
}

func (m *GetFleetsFleetIDWingsOKBodyItems) validateSquads(formats strfmt.Registry) error {

	if err := validate.Required("squads", "body", m.Squads); err != nil {
		return err
	}

	return nil
}

// MarshalBinary interface implementation
func (m *GetFleetsFleetIDWingsOKBodyItems) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *GetFleetsFleetIDWingsOKBodyItems) UnmarshalBinary(b []byte) error {
	var res GetFleetsFleetIDWingsOKBodyItems
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
