package clones // 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" ) // GetCharactersCharacterIDClonesReader is a Reader for the GetCharactersCharacterIDClones structure. type GetCharactersCharacterIDClonesReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetCharactersCharacterIDClonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetCharactersCharacterIDClonesOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 403: result := NewGetCharactersCharacterIDClonesForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetCharactersCharacterIDClonesInternalServerError() 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()) } } // NewGetCharactersCharacterIDClonesOK creates a GetCharactersCharacterIDClonesOK with default headers values func NewGetCharactersCharacterIDClonesOK() *GetCharactersCharacterIDClonesOK { return &GetCharactersCharacterIDClonesOK{} } /*GetCharactersCharacterIDClonesOK handles this case with default header values. Clone information for the given character */ type GetCharactersCharacterIDClonesOK struct { /*The caching mechanism used */ CacheControl string /*RFC7231 formatted datetime string */ Expires string /*RFC7231 formatted datetime string */ LastModified string Payload GetCharactersCharacterIDClonesOKBody } func (o *GetCharactersCharacterIDClonesOK) Error() string { return fmt.Sprintf("[GET /characters/{character_id}/clones/][%d] getCharactersCharacterIdClonesOK %+v", 200, o.Payload) } func (o *GetCharactersCharacterIDClonesOK) 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 } // NewGetCharactersCharacterIDClonesForbidden creates a GetCharactersCharacterIDClonesForbidden with default headers values func NewGetCharactersCharacterIDClonesForbidden() *GetCharactersCharacterIDClonesForbidden { return &GetCharactersCharacterIDClonesForbidden{} } /*GetCharactersCharacterIDClonesForbidden handles this case with default header values. Forbidden */ type GetCharactersCharacterIDClonesForbidden struct { Payload GetCharactersCharacterIDClonesForbiddenBody } func (o *GetCharactersCharacterIDClonesForbidden) Error() string { return fmt.Sprintf("[GET /characters/{character_id}/clones/][%d] getCharactersCharacterIdClonesForbidden %+v", 403, o.Payload) } func (o *GetCharactersCharacterIDClonesForbidden) 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 } // NewGetCharactersCharacterIDClonesInternalServerError creates a GetCharactersCharacterIDClonesInternalServerError with default headers values func NewGetCharactersCharacterIDClonesInternalServerError() *GetCharactersCharacterIDClonesInternalServerError { return &GetCharactersCharacterIDClonesInternalServerError{} } /*GetCharactersCharacterIDClonesInternalServerError handles this case with default header values. Internal server error */ type GetCharactersCharacterIDClonesInternalServerError struct { Payload GetCharactersCharacterIDClonesInternalServerErrorBody } func (o *GetCharactersCharacterIDClonesInternalServerError) Error() string { return fmt.Sprintf("[GET /characters/{character_id}/clones/][%d] getCharactersCharacterIdClonesInternalServerError %+v", 500, o.Payload) } func (o *GetCharactersCharacterIDClonesInternalServerError) 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 } /*GetCharactersCharacterIDClonesOKBodyHomeLocation get_characters_character_id_clones_home_location // // home_location object swagger:model GetCharactersCharacterIDClonesOKBodyHomeLocation */ type GetCharactersCharacterIDClonesOKBodyHomeLocation struct { // get_characters_character_id_clones_location_id // // location_id integer LocationID int64 `json:"location_id,omitempty"` // get_characters_character_id_clones_location_type // // location_type string LocationType string `json:"location_type,omitempty"` } /*GetCharactersCharacterIDClonesOKBody get_characters_character_id_clones_ok // // 200 ok object swagger:model GetCharactersCharacterIDClonesOKBody */ type GetCharactersCharacterIDClonesOKBody struct { // home location // Required: true HomeLocation *GetCharactersCharacterIDClonesOKBodyHomeLocation `json:"home_location"` // get_characters_character_id_clones_jump_clones // // jump_clones array // Required: true JumpClones []*JumpClonesItems0 `json:"jump_clones"` // get_characters_character_id_clones_last_jump_date // // last_jump_date string // Required: true LastJumpDate *strfmt.DateTime `json:"last_jump_date"` } /*GetCharactersCharacterIDClonesForbiddenBody get_characters_character_id_clones_forbidden // // Forbidden swagger:model GetCharactersCharacterIDClonesForbiddenBody */ type GetCharactersCharacterIDClonesForbiddenBody struct { // get_characters_character_id_clones_403_forbidden // // Forbidden message // Required: true Error *string `json:"error"` } /*GetCharactersCharacterIDClonesInternalServerErrorBody get_characters_character_id_clones_internal_server_error // // Internal server error swagger:model GetCharactersCharacterIDClonesInternalServerErrorBody */ type GetCharactersCharacterIDClonesInternalServerErrorBody struct { // get_characters_character_id_clones_500_internal_server_error // // Internal server error message // Required: true Error *string `json:"error"` } /*JumpClonesItems0 get_characters_character_id_clones_jump_clone // // jump_clone object swagger:model JumpClonesItems0 */ type JumpClonesItems0 struct { // get_characters_character_id_clones_implants // // implants array Implants []int32 `json:"implants"` // get_characters_character_id_clones_location_id // // location_id integer LocationID int64 `json:"location_id,omitempty"` // get_characters_character_id_clones_location_type // // location_type string LocationType string `json:"location_type,omitempty"` }