240 lines
7.1 KiB
Go
240 lines
7.1 KiB
Go
package fittings
|
|
|
|
// 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"
|
|
)
|
|
|
|
// GetCharactersCharacterIDFittingsReader is a Reader for the GetCharactersCharacterIDFittings structure.
|
|
type GetCharactersCharacterIDFittingsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetCharactersCharacterIDFittingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
result := NewGetCharactersCharacterIDFittingsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 403:
|
|
result := NewGetCharactersCharacterIDFittingsForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewGetCharactersCharacterIDFittingsInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDFittingsOK creates a GetCharactersCharacterIDFittingsOK with default headers values
|
|
func NewGetCharactersCharacterIDFittingsOK() *GetCharactersCharacterIDFittingsOK {
|
|
return &GetCharactersCharacterIDFittingsOK{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsOK handles this case with default header values.
|
|
|
|
A list of fittings
|
|
*/
|
|
type GetCharactersCharacterIDFittingsOK struct {
|
|
/*The caching mechanism used
|
|
*/
|
|
CacheControl string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
Expires string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
LastModified string
|
|
|
|
Payload []*GetCharactersCharacterIDFittingsOKBodyItems0
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDFittingsOK) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/fittings/][%d] getCharactersCharacterIdFittingsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDFittingsOK) 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
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDFittingsForbidden creates a GetCharactersCharacterIDFittingsForbidden with default headers values
|
|
func NewGetCharactersCharacterIDFittingsForbidden() *GetCharactersCharacterIDFittingsForbidden {
|
|
return &GetCharactersCharacterIDFittingsForbidden{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsForbidden handles this case with default header values.
|
|
|
|
Forbidden
|
|
*/
|
|
type GetCharactersCharacterIDFittingsForbidden struct {
|
|
Payload GetCharactersCharacterIDFittingsForbiddenBody
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDFittingsForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/fittings/][%d] getCharactersCharacterIdFittingsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDFittingsForbidden) 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
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDFittingsInternalServerError creates a GetCharactersCharacterIDFittingsInternalServerError with default headers values
|
|
func NewGetCharactersCharacterIDFittingsInternalServerError() *GetCharactersCharacterIDFittingsInternalServerError {
|
|
return &GetCharactersCharacterIDFittingsInternalServerError{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type GetCharactersCharacterIDFittingsInternalServerError struct {
|
|
Payload GetCharactersCharacterIDFittingsInternalServerErrorBody
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDFittingsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/fittings/][%d] getCharactersCharacterIdFittingsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDFittingsInternalServerError) 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
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsOKBodyItems0 get_characters_character_id_fittings_200_ok
|
|
//
|
|
// 200 ok object
|
|
swagger:model GetCharactersCharacterIDFittingsOKBodyItems0
|
|
*/
|
|
type GetCharactersCharacterIDFittingsOKBodyItems0 struct {
|
|
|
|
// get_characters_character_id_fittings_description
|
|
//
|
|
// description string
|
|
// Required: true
|
|
Description *string `json:"description"`
|
|
|
|
// get_characters_character_id_fittings_fitting_id
|
|
//
|
|
// fitting_id integer
|
|
// Required: true
|
|
FittingID *int32 `json:"fitting_id"`
|
|
|
|
// get_characters_character_id_fittings_items
|
|
//
|
|
// items array
|
|
// Required: true
|
|
Items []*GetCharactersCharacterIDFittingsOKBodyItems0ItemsItems0 `json:"items"`
|
|
|
|
// get_characters_character_id_fittings_name
|
|
//
|
|
// name string
|
|
// Required: true
|
|
Name *string `json:"name"`
|
|
|
|
// get_characters_character_id_fittings_ship_type_id
|
|
//
|
|
// ship_type_id integer
|
|
// Required: true
|
|
ShipTypeID *int32 `json:"ship_type_id"`
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsOKBodyItems0ItemsItems0 get_characters_character_id_fittings_item
|
|
//
|
|
// item object
|
|
swagger:model GetCharactersCharacterIDFittingsOKBodyItems0ItemsItems0
|
|
*/
|
|
type GetCharactersCharacterIDFittingsOKBodyItems0ItemsItems0 struct {
|
|
|
|
// get_characters_character_id_fittings_flag
|
|
//
|
|
// flag integer
|
|
// Required: true
|
|
Flag *int32 `json:"flag"`
|
|
|
|
// get_characters_character_id_fittings_quantity
|
|
//
|
|
// quantity integer
|
|
// Required: true
|
|
Quantity *int32 `json:"quantity"`
|
|
|
|
// get_characters_character_id_fittings_type_id
|
|
//
|
|
// type_id integer
|
|
// Required: true
|
|
TypeID *int32 `json:"type_id"`
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsForbiddenBody get_characters_character_id_fittings_forbidden
|
|
//
|
|
// Forbidden
|
|
swagger:model GetCharactersCharacterIDFittingsForbiddenBody
|
|
*/
|
|
type GetCharactersCharacterIDFittingsForbiddenBody struct {
|
|
|
|
// get_characters_character_id_fittings_403_forbidden
|
|
//
|
|
// Forbidden message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
/*GetCharactersCharacterIDFittingsInternalServerErrorBody get_characters_character_id_fittings_internal_server_error
|
|
//
|
|
// Internal server error
|
|
swagger:model GetCharactersCharacterIDFittingsInternalServerErrorBody
|
|
*/
|
|
type GetCharactersCharacterIDFittingsInternalServerErrorBody struct {
|
|
|
|
// get_characters_character_id_fittings_500_internal_server_error
|
|
//
|
|
// Internal server error message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|