966 lines
25 KiB
Go
966 lines
25 KiB
Go
package killmails
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"strconv"
|
|
|
|
"github.com/go-openapi/errors"
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/swag"
|
|
"github.com/go-openapi/validate"
|
|
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// GetKillmailsKillmailIDKillmailHashReader is a Reader for the GetKillmailsKillmailIDKillmailHash structure.
|
|
type GetKillmailsKillmailIDKillmailHashReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetKillmailsKillmailIDKillmailHashReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
result := NewGetKillmailsKillmailIDKillmailHashOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 422:
|
|
result := NewGetKillmailsKillmailIDKillmailHashUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewGetKillmailsKillmailIDKillmailHashInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
default:
|
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetKillmailsKillmailIDKillmailHashOK creates a GetKillmailsKillmailIDKillmailHashOK with default headers values
|
|
func NewGetKillmailsKillmailIDKillmailHashOK() *GetKillmailsKillmailIDKillmailHashOK {
|
|
return &GetKillmailsKillmailIDKillmailHashOK{}
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashOK handles this case with default header values.
|
|
|
|
A killmail
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashOK struct {
|
|
/*The caching mechanism used
|
|
*/
|
|
CacheControl string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
Expires string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
LastModified string
|
|
|
|
Payload GetKillmailsKillmailIDKillmailHashOKBody
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOK) Error() string {
|
|
return fmt.Sprintf("[GET /killmails/{killmail_id}/{killmail_hash}/][%d] getKillmailsKillmailIdKillmailHashOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response header Cache-Control
|
|
o.CacheControl = response.GetHeader("Cache-Control")
|
|
|
|
// response header Expires
|
|
o.Expires = response.GetHeader("Expires")
|
|
|
|
// response header Last-Modified
|
|
o.LastModified = response.GetHeader("Last-Modified")
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetKillmailsKillmailIDKillmailHashUnprocessableEntity creates a GetKillmailsKillmailIDKillmailHashUnprocessableEntity with default headers values
|
|
func NewGetKillmailsKillmailIDKillmailHashUnprocessableEntity() *GetKillmailsKillmailIDKillmailHashUnprocessableEntity {
|
|
return &GetKillmailsKillmailIDKillmailHashUnprocessableEntity{}
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashUnprocessableEntity handles this case with default header values.
|
|
|
|
Invalid killmail_id and/or killmail_hash
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashUnprocessableEntity struct {
|
|
Payload GetKillmailsKillmailIDKillmailHashUnprocessableEntityBody
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /killmails/{killmail_id}/{killmail_hash}/][%d] getKillmailsKillmailIdKillmailHashUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetKillmailsKillmailIDKillmailHashInternalServerError creates a GetKillmailsKillmailIDKillmailHashInternalServerError with default headers values
|
|
func NewGetKillmailsKillmailIDKillmailHashInternalServerError() *GetKillmailsKillmailIDKillmailHashInternalServerError {
|
|
return &GetKillmailsKillmailIDKillmailHashInternalServerError{}
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashInternalServerError struct {
|
|
Payload GetKillmailsKillmailIDKillmailHashInternalServerErrorBody
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /killmails/{killmail_id}/{killmail_hash}/][%d] getKillmailsKillmailIdKillmailHashInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*AttackersItems0 get_killmails_killmail_id_killmail_hash_attacker
|
|
//
|
|
// attacker object
|
|
swagger:model AttackersItems0
|
|
*/
|
|
type AttackersItems0 struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_alliance_id
|
|
//
|
|
// alliance_id integer
|
|
AllianceID int32 `json:"alliance_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_character_id
|
|
//
|
|
// character_id integer
|
|
CharacterID int32 `json:"character_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_corporation_id
|
|
//
|
|
// corporation_id integer
|
|
CorporationID int32 `json:"corporation_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_damage_done
|
|
//
|
|
// damage_done integer
|
|
// Required: true
|
|
DamageDone *int32 `json:"damage_done"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_faction_id
|
|
//
|
|
// faction_id integer
|
|
FactionID int32 `json:"faction_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_final_blow
|
|
//
|
|
// Was the attacker the one to achieve the final blow
|
|
//
|
|
// Required: true
|
|
FinalBlow *bool `json:"final_blow"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_security_status
|
|
//
|
|
// Security status for the attacker
|
|
//
|
|
// Required: true
|
|
SecurityStatus *float32 `json:"security_status"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_ship_type_id
|
|
//
|
|
// What ship was the attacker flying
|
|
//
|
|
ShipTypeID int32 `json:"ship_type_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_weapon_type_id
|
|
//
|
|
// What weapon was used by the attacker for the kill
|
|
//
|
|
WeaponTypeID int32 `json:"weapon_type_id,omitempty"`
|
|
}
|
|
|
|
// Validate validates this attackers items0
|
|
func (o *AttackersItems0) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateDamageDone(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateFinalBlow(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateSecurityStatus(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *AttackersItems0) validateDamageDone(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("damage_done", "body", o.DamageDone); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *AttackersItems0) validateFinalBlow(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("final_blow", "body", o.FinalBlow); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *AttackersItems0) validateSecurityStatus(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("security_status", "body", o.SecurityStatus); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashInternalServerErrorBody get_killmails_killmail_id_killmail_hash_internal_server_error
|
|
//
|
|
// Internal server error
|
|
swagger:model GetKillmailsKillmailIDKillmailHashInternalServerErrorBody
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashInternalServerErrorBody struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_500_internal_server_error
|
|
//
|
|
// Internal server error message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash internal server error body
|
|
func (o *GetKillmailsKillmailIDKillmailHashInternalServerErrorBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashInternalServerErrorBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashInternalServerError"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashOKBody get_killmails_killmail_id_killmail_hash_ok
|
|
//
|
|
// 200 ok object
|
|
swagger:model GetKillmailsKillmailIDKillmailHashOKBody
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashOKBody struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_attackers
|
|
//
|
|
// attackers array
|
|
// Required: true
|
|
Attackers []*AttackersItems0 `json:"attackers"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_killmail_id
|
|
//
|
|
// ID of the killmail
|
|
// Required: true
|
|
KillmailID *int32 `json:"killmail_id"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_killmail_time
|
|
//
|
|
// Time that the victim was killed and the killmail generated
|
|
//
|
|
// Required: true
|
|
KillmailTime *strfmt.DateTime `json:"killmail_time"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_moon_id
|
|
//
|
|
// Moon if the kill took place at one
|
|
// Required: true
|
|
MoonID *int32 `json:"moon_id"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_solar_system_id
|
|
//
|
|
// Solar system that the kill took place in
|
|
//
|
|
// Required: true
|
|
SolarSystemID *int32 `json:"solar_system_id"`
|
|
|
|
// victim
|
|
// Required: true
|
|
Victim *GetKillmailsKillmailIDKillmailHashOKBodyVictim `json:"victim"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_war_id
|
|
//
|
|
// War if the killmail is generated in relation to an official war
|
|
//
|
|
// Required: true
|
|
WarID *int32 `json:"war_id"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash o k body
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateAttackers(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateKillmailID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateKillmailTime(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateMoonID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateSolarSystemID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateVictim(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateWarID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateAttackers(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"attackers", "body", o.Attackers); err != nil {
|
|
return err
|
|
}
|
|
|
|
for i := 0; i < len(o.Attackers); i++ {
|
|
|
|
if swag.IsZero(o.Attackers[i]) { // not required
|
|
continue
|
|
}
|
|
|
|
if o.Attackers[i] != nil {
|
|
|
|
if err := o.Attackers[i].Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("getKillmailsKillmailIdKillmailHashOK" + "." + "attackers" + "." + strconv.Itoa(i))
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateKillmailID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"killmail_id", "body", o.KillmailID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateKillmailTime(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"killmail_time", "body", o.KillmailTime); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateMoonID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"moon_id", "body", o.MoonID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateSolarSystemID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"solar_system_id", "body", o.SolarSystemID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateVictim(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"victim", "body", o.Victim); err != nil {
|
|
return err
|
|
}
|
|
|
|
if o.Victim != nil {
|
|
|
|
if err := o.Victim.Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("getKillmailsKillmailIdKillmailHashOK" + "." + "victim")
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBody) validateWarID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"war_id", "body", o.WarID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashOKBodyVictim get_killmails_killmail_id_killmail_hash_victim
|
|
//
|
|
// victim object
|
|
swagger:model GetKillmailsKillmailIDKillmailHashOKBodyVictim
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashOKBodyVictim struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_alliance_id
|
|
//
|
|
// alliance_id integer
|
|
AllianceID int32 `json:"alliance_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_character_id
|
|
//
|
|
// character_id integer
|
|
CharacterID int32 `json:"character_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_corporation_id
|
|
//
|
|
// corporation_id integer
|
|
CorporationID int32 `json:"corporation_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_damage_taken
|
|
//
|
|
// How much total damage was taken by the victim
|
|
//
|
|
// Required: true
|
|
DamageTaken *int32 `json:"damage_taken"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_faction_id
|
|
//
|
|
// faction_id integer
|
|
FactionID int32 `json:"faction_id,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_items
|
|
//
|
|
// items array
|
|
Items []*GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0 `json:"items"`
|
|
|
|
// position
|
|
Position *GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition `json:"position,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_ship_type_id
|
|
//
|
|
// The ship that the victim was piloting and was destroyed
|
|
//
|
|
// Required: true
|
|
ShipTypeID *int32 `json:"ship_type_id"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash o k body victim
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictim) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateDamageTaken(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateItems(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validatePosition(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateShipTypeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictim) validateDamageTaken(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"victim"+"."+"damage_taken", "body", o.DamageTaken); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictim) validateItems(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(o.Items) { // not required
|
|
return nil
|
|
}
|
|
|
|
for i := 0; i < len(o.Items); i++ {
|
|
|
|
if swag.IsZero(o.Items[i]) { // not required
|
|
continue
|
|
}
|
|
|
|
if o.Items[i] != nil {
|
|
|
|
if err := o.Items[i].Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("getKillmailsKillmailIdKillmailHashOK" + "." + "victim" + "." + "items" + "." + strconv.Itoa(i))
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictim) validatePosition(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(o.Position) { // not required
|
|
return nil
|
|
}
|
|
|
|
if o.Position != nil {
|
|
|
|
if err := o.Position.Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("getKillmailsKillmailIdKillmailHashOK" + "." + "victim" + "." + "position")
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictim) validateShipTypeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"victim"+"."+"ship_type_id", "body", o.ShipTypeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0 get_killmails_killmail_id_killmail_hash_item
|
|
//
|
|
// item object
|
|
swagger:model GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0 struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_flag
|
|
//
|
|
// Flag for the location of the item
|
|
//
|
|
// Required: true
|
|
Flag *int32 `json:"flag"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_item_type_id
|
|
//
|
|
// item_type_id integer
|
|
// Required: true
|
|
ItemTypeID *int32 `json:"item_type_id"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_items
|
|
//
|
|
// items array
|
|
Items []*GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0 `json:"items"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_quantity_destroyed
|
|
//
|
|
// How many of the item were destroyed if any
|
|
//
|
|
QuantityDestroyed int64 `json:"quantity_destroyed,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_quantity_dropped
|
|
//
|
|
// How many of the item were dropped if any
|
|
//
|
|
QuantityDropped int64 `json:"quantity_dropped,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_singleton
|
|
//
|
|
// singleton integer
|
|
// Required: true
|
|
Singleton *int32 `json:"singleton"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash o k body victim items items0
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateFlag(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateItemTypeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateItems(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateSingleton(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0) validateFlag(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("flag", "body", o.Flag); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0) validateItemTypeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("item_type_id", "body", o.ItemTypeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0) validateItems(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(o.Items) { // not required
|
|
return nil
|
|
}
|
|
|
|
for i := 0; i < len(o.Items); i++ {
|
|
|
|
if swag.IsZero(o.Items[i]) { // not required
|
|
continue
|
|
}
|
|
|
|
if o.Items[i] != nil {
|
|
|
|
if err := o.Items[i].Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("items" + "." + strconv.Itoa(i))
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0) validateSingleton(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("singleton", "body", o.Singleton); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0 get_killmails_killmail_id_killmail_hash_item
|
|
//
|
|
// item object
|
|
swagger:model GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0 struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_flag
|
|
//
|
|
// flag integer
|
|
// Required: true
|
|
Flag *int32 `json:"flag"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_item_type_id
|
|
//
|
|
// item_type_id integer
|
|
// Required: true
|
|
ItemTypeID *int32 `json:"item_type_id"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_quantity_destroyed
|
|
//
|
|
// quantity_destroyed integer
|
|
QuantityDestroyed int64 `json:"quantity_destroyed,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_quantity_dropped
|
|
//
|
|
// quantity_dropped integer
|
|
QuantityDropped int64 `json:"quantity_dropped,omitempty"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_singleton
|
|
//
|
|
// singleton integer
|
|
// Required: true
|
|
Singleton *int32 `json:"singleton"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash o k body victim items items0 items items0
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateFlag(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateItemTypeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateSingleton(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0) validateFlag(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("flag", "body", o.Flag); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0) validateItemTypeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("item_type_id", "body", o.ItemTypeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimItemsItems0ItemsItems0) validateSingleton(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("singleton", "body", o.Singleton); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition get_killmails_killmail_id_killmail_hash_position
|
|
//
|
|
// Coordinates of the victim in Cartesian space relative to the Sun
|
|
//
|
|
swagger:model GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_x
|
|
//
|
|
// x number
|
|
// Required: true
|
|
X *float32 `json:"x"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_y
|
|
//
|
|
// y number
|
|
// Required: true
|
|
Y *float32 `json:"y"`
|
|
|
|
// get_killmails_killmail_id_killmail_hash_z
|
|
//
|
|
// z number
|
|
// Required: true
|
|
Z *float32 `json:"z"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash o k body victim position
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateX(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateY(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateZ(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition) validateX(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"victim"+"."+"position"+"."+"x", "body", o.X); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition) validateY(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"victim"+"."+"position"+"."+"y", "body", o.Y); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashOKBodyVictimPosition) validateZ(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashOK"+"."+"victim"+"."+"position"+"."+"z", "body", o.Z); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetKillmailsKillmailIDKillmailHashUnprocessableEntityBody get_killmails_killmail_id_killmail_hash_unprocessable_entity
|
|
//
|
|
// Unprocessable entity
|
|
swagger:model GetKillmailsKillmailIDKillmailHashUnprocessableEntityBody
|
|
*/
|
|
type GetKillmailsKillmailIDKillmailHashUnprocessableEntityBody struct {
|
|
|
|
// get_killmails_killmail_id_killmail_hash_422_unprocessable_entity
|
|
//
|
|
// Unprocessable entity message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this get killmails killmail ID killmail hash unprocessable entity body
|
|
func (o *GetKillmailsKillmailIDKillmailHashUnprocessableEntityBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetKillmailsKillmailIDKillmailHashUnprocessableEntityBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getKillmailsKillmailIdKillmailHashUnprocessableEntity"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|