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

139 lines
4.6 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
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"
"git.inf3.xyz/tschwery/eve-goclient.git/models"
)
// 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 *models.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 {
o.Payload = new(models.PostCharactersCharacterIDFittingsCreatedBody)
// 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 *models.Forbidden
}
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 {
o.Payload = new(models.Forbidden)
// 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 *models.InternalServerError
}
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 {
o.Payload = new(models.InternalServerError)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}