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

// GetCharactersCharacterIDContractsContractIDItemsOKBodyItems get_characters_character_id_contracts_contract_id_items_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdContractsContractIdItemsOKBodyItems

type GetCharactersCharacterIDContractsContractIDItemsOKBodyItems struct {

	// get_characters_character_id_contracts_contract_id_items_is_included
	//
	// true if the contract issuer has submitted this item with the contract, false if the isser is asking for this item in the contract.
	// Required: true
	IsIncluded *bool `json:"is_included"`

	// get_characters_character_id_contracts_contract_id_items_is_singleton
	//
	// is_singleton boolean
	// Required: true
	IsSingleton *bool `json:"is_singleton"`

	// get_characters_character_id_contracts_contract_id_items_quantity
	//
	// Number of items in the stack
	// Required: true
	Quantity *int32 `json:"quantity"`

	// get_characters_character_id_contracts_contract_id_items_raw_quantity
	//
	// -1 indicates that the item is a singleton (non-stackable). If the item happens to be a Blueprint, -1 is an Original and -2 is a Blueprint Copy
	RawQuantity int32 `json:"raw_quantity,omitempty"`

	// get_characters_character_id_contracts_contract_id_items_record_id
	//
	// Unique ID for the item
	// Required: true
	RecordID *int64 `json:"record_id"`

	// get_characters_character_id_contracts_contract_id_items_type_id
	//
	// Type ID for item
	// Required: true
	TypeID *int32 `json:"type_id"`
}

/* polymorph getCharactersCharacterIdContractsContractIdItemsOKBodyItems is_included false */

/* polymorph getCharactersCharacterIdContractsContractIdItemsOKBodyItems is_singleton false */

/* polymorph getCharactersCharacterIdContractsContractIdItemsOKBodyItems quantity false */

/* polymorph getCharactersCharacterIdContractsContractIdItemsOKBodyItems raw_quantity false */

/* polymorph getCharactersCharacterIdContractsContractIdItemsOKBodyItems record_id false */

/* polymorph getCharactersCharacterIdContractsContractIdItemsOKBodyItems type_id false */

// Validate validates this get characters character Id contracts contract Id items o k body items
func (m *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

	if err := m.validateRecordID(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 *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) validateIsIncluded(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) validateIsSingleton(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) validateQuantity(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) validateRecordID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) 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 *GetCharactersCharacterIDContractsContractIDItemsOKBodyItems) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

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