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

// PostFleetsFleetIDWingsWingIDSquadsCreatedBody post_fleets_fleet_id_wings_wing_id_squads_created
//
// 201 created object
// swagger:model postFleetsFleetIdWingsWingIdSquadsCreatedBody

type PostFleetsFleetIDWingsWingIDSquadsCreatedBody struct {

	// post_fleets_fleet_id_wings_wing_id_squads_squad_id
	//
	// The squad_id of the newly created squad
	// Required: true
	SquadID *int64 `json:"squad_id"`
}

/* polymorph postFleetsFleetIdWingsWingIdSquadsCreatedBody squad_id false */

// Validate validates this post fleets fleet Id wings wing Id squads created body
func (m *PostFleetsFleetIDWingsWingIDSquadsCreatedBody) Validate(formats strfmt.Registry) error {
	var res []error

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

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

func (m *PostFleetsFleetIDWingsWingIDSquadsCreatedBody) validateSquadID(formats strfmt.Registry) error {

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

	return nil
}

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

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