This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
eve-goclient/client/fittings/post_characters_character_id_fittings_responses.go

217 lines
6.7 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"
)
// PostCharactersCharacterIDFittingsReader is a Reader for the PostCharactersCharacterIDFittings structure.
type PostCharactersCharacterIDFittingsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostCharactersCharacterIDFittingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPostCharactersCharacterIDFittingsCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewPostCharactersCharacterIDFittingsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostCharactersCharacterIDFittingsInternalServerError()
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())
}
}
// NewPostCharactersCharacterIDFittingsCreated creates a PostCharactersCharacterIDFittingsCreated with default headers values
func NewPostCharactersCharacterIDFittingsCreated() *PostCharactersCharacterIDFittingsCreated {
return &PostCharactersCharacterIDFittingsCreated{}
}
/*PostCharactersCharacterIDFittingsCreated handles this case with default header values.
A list of fittings
*/
type PostCharactersCharacterIDFittingsCreated struct {
Payload PostCharactersCharacterIDFittingsCreatedBody
}
func (o *PostCharactersCharacterIDFittingsCreated) Error() string {
return fmt.Sprintf("[POST /characters/{character_id}/fittings/][%d] postCharactersCharacterIdFittingsCreated %+v", 201, o.Payload)
}
func (o *PostCharactersCharacterIDFittingsCreated) 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
}
// NewPostCharactersCharacterIDFittingsForbidden creates a PostCharactersCharacterIDFittingsForbidden with default headers values
func NewPostCharactersCharacterIDFittingsForbidden() *PostCharactersCharacterIDFittingsForbidden {
return &PostCharactersCharacterIDFittingsForbidden{}
}
/*PostCharactersCharacterIDFittingsForbidden handles this case with default header values.
Forbidden
*/
type PostCharactersCharacterIDFittingsForbidden struct {
Payload PostCharactersCharacterIDFittingsForbiddenBody
}
func (o *PostCharactersCharacterIDFittingsForbidden) Error() string {
return fmt.Sprintf("[POST /characters/{character_id}/fittings/][%d] postCharactersCharacterIdFittingsForbidden %+v", 403, o.Payload)
}
func (o *PostCharactersCharacterIDFittingsForbidden) 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
}
// NewPostCharactersCharacterIDFittingsInternalServerError creates a PostCharactersCharacterIDFittingsInternalServerError with default headers values
func NewPostCharactersCharacterIDFittingsInternalServerError() *PostCharactersCharacterIDFittingsInternalServerError {
return &PostCharactersCharacterIDFittingsInternalServerError{}
}
/*PostCharactersCharacterIDFittingsInternalServerError handles this case with default header values.
Internal server error
*/
type PostCharactersCharacterIDFittingsInternalServerError struct {
Payload PostCharactersCharacterIDFittingsInternalServerErrorBody
}
func (o *PostCharactersCharacterIDFittingsInternalServerError) Error() string {
return fmt.Sprintf("[POST /characters/{character_id}/fittings/][%d] postCharactersCharacterIdFittingsInternalServerError %+v", 500, o.Payload)
}
func (o *PostCharactersCharacterIDFittingsInternalServerError) 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
}
// PostCharactersCharacterIDFittingsOKBodyItems0 custom fix because of invalid
// goswagger generation
type PostCharactersCharacterIDFittingsOKBodyItems0 struct {
Flag *int32 `json:"flag"`
Quantity *int32 `json:"quantity"`
Type *int32 `json:"type"`
}
/*PostCharactersCharacterIDFittingsBody post_characters_character_id_fittings_fitting
//
// fitting object
swagger:model PostCharactersCharacterIDFittingsBody
*/
type PostCharactersCharacterIDFittingsBody struct {
// post_characters_character_id_fittings_description
//
// description string
// Required: true
// Max Length: 500
// Min Length: 1
Description *string `json:"description"`
// post_characters_character_id_fittings_items
//
// items array
// Required: true
// Max Items: 255
// Min Items: 1
Items []*PostCharactersCharacterIDFittingsOKBodyItems0 `json:"items"`
// post_characters_character_id_fittings_name
//
// name string
// Required: true
// Max Length: 50
// Min Length: 1
Name *string `json:"name"`
// post_characters_character_id_fittings_ship_type_id
//
// ship_type_id integer
// Required: true
ShipTypeID *int32 `json:"ship_type_id"`
}
/*PostCharactersCharacterIDFittingsCreatedBody post_characters_character_id_fittings_created
//
// 201 created object
swagger:model PostCharactersCharacterIDFittingsCreatedBody
*/
type PostCharactersCharacterIDFittingsCreatedBody struct {
// post_characters_character_id_fittings_fitting_id
//
// fitting_id integer
// Required: true
FittingID *int32 `json:"fitting_id"`
}
/*PostCharactersCharacterIDFittingsForbiddenBody post_characters_character_id_fittings_forbidden
//
// Forbidden
swagger:model PostCharactersCharacterIDFittingsForbiddenBody
*/
type PostCharactersCharacterIDFittingsForbiddenBody struct {
// post_characters_character_id_fittings_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
/*PostCharactersCharacterIDFittingsInternalServerErrorBody post_characters_character_id_fittings_internal_server_error
//
// Internal server error
swagger:model PostCharactersCharacterIDFittingsInternalServerErrorBody
*/
type PostCharactersCharacterIDFittingsInternalServerErrorBody struct {
// post_characters_character_id_fittings_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}