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

// GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsContentsItems get_characters_character_id_planets_planet_id_content
//
// content object
// swagger:model getCharactersCharacterIdPlanetsPlanetIdOKBodyPinsItemsContentsItems

type GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsContentsItems struct {

	// get_characters_character_id_planets_planet_id_amount
	//
	// amount integer
	// Required: true
	Amount *int64 `json:"amount"`

	// get_characters_character_id_planets_planet_id_type_id
	//
	// type_id integer
	// Required: true
	TypeID *int32 `json:"type_id"`
}

/* polymorph getCharactersCharacterIdPlanetsPlanetIdOKBodyPinsItemsContentsItems amount false */

/* polymorph getCharactersCharacterIdPlanetsPlanetIdOKBodyPinsItemsContentsItems type_id false */

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

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

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

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

func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsContentsItems) validateAmount(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBodyPinsItemsContentsItems) validateTypeID(formats strfmt.Registry) error {

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

	return nil
}

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

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