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

// GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsFactoryDetails get_characters_character_id_planets_planet_id_factory_details
//
// factory_details object
// swagger:model getCharactersCharacterIdPlanetsPlanetIdOKBodyPinsItemsFactoryDetails

type GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsFactoryDetails struct {

	// get_characters_character_id_planets_planet_id_schematic_id
	//
	// schematic_id integer
	// Required: true
	SchematicID *int32 `json:"schematic_id"`
}

/* polymorph getCharactersCharacterIdPlanetsPlanetIdOKBodyPinsItemsFactoryDetails schematic_id false */

// Validate validates this get characters character Id planets planet Id o k body pins items factory details
func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsFactoryDetails) Validate(formats strfmt.Registry) error {
	var res []error

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

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

func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsFactoryDetails) validateSchematicID(formats strfmt.Registry) error {

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

	return nil
}

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

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