116 lines
2.9 KiB
Go
116 lines
2.9 KiB
Go
// 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"
|
|
)
|
|
|
|
// GetCharactersCharacterIDShipOKBody get_characters_character_id_ship_ok
|
|
//
|
|
// 200 ok object
|
|
// swagger:model getCharactersCharacterIdShipOKBody
|
|
|
|
type GetCharactersCharacterIDShipOKBody struct {
|
|
|
|
// get_characters_character_id_ship_ship_item_id
|
|
//
|
|
// Item id's are unique to a ship and persist until it is repackaged. This value can be used to track repeated uses of a ship, or detect when a pilot changes into a different instance of the same ship type.
|
|
// Required: true
|
|
ShipItemID *int64 `json:"ship_item_id"`
|
|
|
|
// get_characters_character_id_ship_ship_name
|
|
//
|
|
// ship_name string
|
|
// Required: true
|
|
ShipName *string `json:"ship_name"`
|
|
|
|
// get_characters_character_id_ship_ship_type_id
|
|
//
|
|
// ship_type_id integer
|
|
// Required: true
|
|
ShipTypeID *int32 `json:"ship_type_id"`
|
|
}
|
|
|
|
/* polymorph getCharactersCharacterIdShipOKBody ship_item_id false */
|
|
|
|
/* polymorph getCharactersCharacterIdShipOKBody ship_name false */
|
|
|
|
/* polymorph getCharactersCharacterIdShipOKBody ship_type_id false */
|
|
|
|
// Validate validates this get characters character Id ship o k body
|
|
func (m *GetCharactersCharacterIDShipOKBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateShipItemID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateShipName(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateShipTypeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GetCharactersCharacterIDShipOKBody) validateShipItemID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("ship_item_id", "body", m.ShipItemID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetCharactersCharacterIDShipOKBody) validateShipName(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("ship_name", "body", m.ShipName); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetCharactersCharacterIDShipOKBody) validateShipTypeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("ship_type_id", "body", m.ShipTypeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetCharactersCharacterIDShipOKBody) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetCharactersCharacterIDShipOKBody) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDShipOKBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|