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" "github.com/go-openapi/runtime" strfmt "github.com/go-openapi/strfmt" "local/models" ) // 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 *models.InternalServerError } 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 { o.Payload = new(models.InternalServerError) // 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"` } /*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 // Max Items: 10000 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"` } /*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 // Max Items: 10000 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"` } /*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"` } /*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"` } /*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 // Max Items: 10000 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"` } /*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"` }