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

// PostFleetsFleetIDWingsCreatedBody post_fleets_fleet_id_wings_created
//
// 201 created object
// swagger:model postFleetsFleetIdWingsCreatedBody

type PostFleetsFleetIDWingsCreatedBody struct {

	// post_fleets_fleet_id_wings_wing_id
	//
	// The wing_id of the newly created wing
	// Required: true
	WingID *int64 `json:"wing_id"`
}

/* polymorph postFleetsFleetIdWingsCreatedBody wing_id false */

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

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

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

func (m *PostFleetsFleetIDWingsCreatedBody) validateWingID(formats strfmt.Registry) error {

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

	return nil
}

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

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