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

// GetCharactersCharacterIDLocationOKBody get_characters_character_id_location_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdLocationOKBody

type GetCharactersCharacterIDLocationOKBody struct {

	// get_characters_character_id_location_solar_system_id
	//
	// solar_system_id integer
	// Required: true
	SolarSystemID *int32 `json:"solar_system_id"`

	// get_characters_character_id_location_station_id
	//
	// station_id integer
	StationID int32 `json:"station_id,omitempty"`

	// get_characters_character_id_location_structure_id
	//
	// structure_id integer
	StructureID int64 `json:"structure_id,omitempty"`
}

/* polymorph getCharactersCharacterIdLocationOKBody solar_system_id false */

/* polymorph getCharactersCharacterIdLocationOKBody station_id false */

/* polymorph getCharactersCharacterIdLocationOKBody structure_id false */

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

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

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

func (m *GetCharactersCharacterIDLocationOKBody) validateSolarSystemID(formats strfmt.Registry) error {

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

	return nil
}

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

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