// 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 (
	"encoding/json"

	strfmt "github.com/go-openapi/strfmt"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// GetCharactersCharacterIDClonesOKBodyJumpClonesItems get_characters_character_id_clones_jump_clone
//
// jump_clone object
// swagger:model getCharactersCharacterIdClonesOKBodyJumpClonesItems

type GetCharactersCharacterIDClonesOKBodyJumpClonesItems struct {

	// get_characters_character_id_clones_implants
	//
	// implants array
	// Max Items: 11
	Implants []int32 `json:"implants"`

	// get_characters_character_id_clones_location_id
	//
	// location_id integer
	LocationID int64 `json:"location_id,omitempty"`

	// get_characters_character_id_clones_location_type
	//
	// location_type string
	LocationType string `json:"location_type,omitempty"`
}

/* polymorph getCharactersCharacterIdClonesOKBodyJumpClonesItems implants false */

/* polymorph getCharactersCharacterIdClonesOKBodyJumpClonesItems location_id false */

/* polymorph getCharactersCharacterIdClonesOKBodyJumpClonesItems location_type false */

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

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

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

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

func (m *GetCharactersCharacterIDClonesOKBodyJumpClonesItems) validateImplants(formats strfmt.Registry) error {

	if swag.IsZero(m.Implants) { // not required
		return nil
	}

	iImplantsSize := int64(len(m.Implants))

	if err := validate.MaxItems("implants", "body", iImplantsSize, 11); err != nil {
		return err
	}

	return nil
}

var getCharactersCharacterIdClonesOKBodyJumpClonesItemsTypeLocationTypePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["station","structure"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCharactersCharacterIdClonesOKBodyJumpClonesItemsTypeLocationTypePropEnum = append(getCharactersCharacterIdClonesOKBodyJumpClonesItemsTypeLocationTypePropEnum, v)
	}
}

const (
	// GetCharactersCharacterIDClonesOKBodyJumpClonesItemsLocationTypeStation captures enum value "station"
	GetCharactersCharacterIDClonesOKBodyJumpClonesItemsLocationTypeStation string = "station"
	// GetCharactersCharacterIDClonesOKBodyJumpClonesItemsLocationTypeStructure captures enum value "structure"
	GetCharactersCharacterIDClonesOKBodyJumpClonesItemsLocationTypeStructure string = "structure"
)

// prop value enum
func (m *GetCharactersCharacterIDClonesOKBodyJumpClonesItems) validateLocationTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCharactersCharacterIdClonesOKBodyJumpClonesItemsTypeLocationTypePropEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCharactersCharacterIDClonesOKBodyJumpClonesItems) validateLocationType(formats strfmt.Registry) error {

	if swag.IsZero(m.LocationType) { // not required
		return nil
	}

	// value enum
	if err := m.validateLocationTypeEnum("location_type", "body", m.LocationType); err != nil {
		return err
	}

	return nil
}

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

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