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

// GetCharactersCharacterIDAgentsResearchOKBodyItems get_characters_character_id_agents_research_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdAgentsResearchOKBodyItems

type GetCharactersCharacterIDAgentsResearchOKBodyItems struct {

	// get_characters_character_id_agents_research_agent_id
	//
	// agent_id integer
	// Required: true
	AgentID *int32 `json:"agent_id"`

	// get_characters_character_id_agents_research_points_per_day
	//
	// points_per_day number
	// Required: true
	PointsPerDay *float32 `json:"points_per_day"`

	// get_characters_character_id_agents_research_remainder_points
	//
	// remainder_points number
	// Required: true
	RemainderPoints *float32 `json:"remainder_points"`

	// get_characters_character_id_agents_research_skill_type_id
	//
	// skill_type_id integer
	// Required: true
	SkillTypeID *int32 `json:"skill_type_id"`

	// get_characters_character_id_agents_research_started_at
	//
	// started_at string
	// Required: true
	StartedAt *strfmt.DateTime `json:"started_at"`
}

/* polymorph getCharactersCharacterIdAgentsResearchOKBodyItems agent_id false */

/* polymorph getCharactersCharacterIdAgentsResearchOKBodyItems points_per_day false */

/* polymorph getCharactersCharacterIdAgentsResearchOKBodyItems remainder_points false */

/* polymorph getCharactersCharacterIdAgentsResearchOKBodyItems skill_type_id false */

/* polymorph getCharactersCharacterIdAgentsResearchOKBodyItems started_at false */

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

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

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

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

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

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

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

func (m *GetCharactersCharacterIDAgentsResearchOKBodyItems) validateAgentID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDAgentsResearchOKBodyItems) validatePointsPerDay(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDAgentsResearchOKBodyItems) validateRemainderPoints(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDAgentsResearchOKBodyItems) validateSkillTypeID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDAgentsResearchOKBodyItems) validateStartedAt(formats strfmt.Registry) error {

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

	if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil {
		return err
	}

	return nil
}

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

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