// 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"
)

// GetFleetsFleetIDWingsOKBodyItemsSquadsItems get_fleets_fleet_id_wings_squad
//
// squad object
// swagger:model getFleetsFleetIdWingsOKBodyItemsSquadsItems

type GetFleetsFleetIDWingsOKBodyItemsSquadsItems 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"`
}

/* polymorph getFleetsFleetIdWingsOKBodyItemsSquadsItems id false */

/* polymorph getFleetsFleetIdWingsOKBodyItemsSquadsItems name false */

// Validate validates this get fleets fleet Id wings o k body items squads items
func (m *GetFleetsFleetIDWingsOKBodyItemsSquadsItems) 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 len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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