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

// GetCharactersCharacterIDSkillqueueOKBodyItems get_characters_character_id_skillqueue_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdSkillqueueOKBodyItems

type GetCharactersCharacterIDSkillqueueOKBodyItems struct {

	// get_characters_character_id_skillqueue_finish_date
	//
	// finish_date string
	FinishDate strfmt.DateTime `json:"finish_date,omitempty"`

	// get_characters_character_id_skillqueue_finished_level
	//
	// finished_level integer
	// Required: true
	// Maximum: 5
	// Minimum: 0
	FinishedLevel *int32 `json:"finished_level"`

	// get_characters_character_id_skillqueue_level_end_sp
	//
	// level_end_sp integer
	LevelEndSp int32 `json:"level_end_sp,omitempty"`

	// get_characters_character_id_skillqueue_level_start_sp
	//
	// Amount of SP that was in the skill when it started training it's current level. Used to calculate % of current level complete.
	LevelStartSp int32 `json:"level_start_sp,omitempty"`

	// get_characters_character_id_skillqueue_queue_position
	//
	// queue_position integer
	// Required: true
	QueuePosition *int32 `json:"queue_position"`

	// get_characters_character_id_skillqueue_skill_id
	//
	// skill_id integer
	// Required: true
	SkillID *int32 `json:"skill_id"`

	// get_characters_character_id_skillqueue_start_date
	//
	// start_date string
	StartDate strfmt.DateTime `json:"start_date,omitempty"`

	// get_characters_character_id_skillqueue_training_start_sp
	//
	// training_start_sp integer
	TrainingStartSp int32 `json:"training_start_sp,omitempty"`
}

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems finish_date false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems finished_level false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems level_end_sp false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems level_start_sp false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems queue_position false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems skill_id false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems start_date false */

/* polymorph getCharactersCharacterIdSkillqueueOKBodyItems training_start_sp false */

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

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

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

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

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

func (m *GetCharactersCharacterIDSkillqueueOKBodyItems) validateFinishedLevel(formats strfmt.Registry) error {

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

	if err := validate.MinimumInt("finished_level", "body", int64(*m.FinishedLevel), 0, false); err != nil {
		return err
	}

	if err := validate.MaximumInt("finished_level", "body", int64(*m.FinishedLevel), 5, false); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDSkillqueueOKBodyItems) validateQueuePosition(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDSkillqueueOKBodyItems) validateSkillID(formats strfmt.Registry) error {

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

	return nil
}

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

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