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

// GetCorporationsNamesOKBodyItems get_corporations_names_200_ok
//
// 200 ok object
// swagger:model getCorporationsNamesOKBodyItems

type GetCorporationsNamesOKBodyItems struct {

	// get_corporations_names_corporation_id
	//
	// corporation_id integer
	// Required: true
	CorporationID *int32 `json:"corporation_id"`

	// get_corporations_names_corporation_name
	//
	// corporation_name string
	// Required: true
	CorporationName *string `json:"corporation_name"`
}

/* polymorph getCorporationsNamesOKBodyItems corporation_id false */

/* polymorph getCorporationsNamesOKBodyItems corporation_name false */

// Validate validates this get corporations names o k body items
func (m *GetCorporationsNamesOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *GetCorporationsNamesOKBodyItems) validateCorporationID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCorporationsNamesOKBodyItems) validateCorporationName(formats strfmt.Registry) error {

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

	return nil
}

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

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