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/character/post_characters_character_id_cspa_responses.go

187 lines
5.8 KiB
Go

package character
// 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"
)
// PostCharactersCharacterIDCspaReader is a Reader for the PostCharactersCharacterIDCspa structure.
type PostCharactersCharacterIDCspaReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostCharactersCharacterIDCspaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPostCharactersCharacterIDCspaCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewPostCharactersCharacterIDCspaForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostCharactersCharacterIDCspaInternalServerError()
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())
}
}
// NewPostCharactersCharacterIDCspaCreated creates a PostCharactersCharacterIDCspaCreated with default headers values
func NewPostCharactersCharacterIDCspaCreated() *PostCharactersCharacterIDCspaCreated {
return &PostCharactersCharacterIDCspaCreated{}
}
/*PostCharactersCharacterIDCspaCreated handles this case with default header values.
Aggregate cost of sending a mail from the source character to the target characters, in ISK hundredths
*/
type PostCharactersCharacterIDCspaCreated struct {
Payload PostCharactersCharacterIDCspaCreatedBody
}
func (o *PostCharactersCharacterIDCspaCreated) Error() string {
return fmt.Sprintf("[POST /characters/{character_id}/cspa/][%d] postCharactersCharacterIdCspaCreated %+v", 201, o.Payload)
}
func (o *PostCharactersCharacterIDCspaCreated) 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
}
// NewPostCharactersCharacterIDCspaForbidden creates a PostCharactersCharacterIDCspaForbidden with default headers values
func NewPostCharactersCharacterIDCspaForbidden() *PostCharactersCharacterIDCspaForbidden {
return &PostCharactersCharacterIDCspaForbidden{}
}
/*PostCharactersCharacterIDCspaForbidden handles this case with default header values.
Forbidden
*/
type PostCharactersCharacterIDCspaForbidden struct {
Payload PostCharactersCharacterIDCspaForbiddenBody
}
func (o *PostCharactersCharacterIDCspaForbidden) Error() string {
return fmt.Sprintf("[POST /characters/{character_id}/cspa/][%d] postCharactersCharacterIdCspaForbidden %+v", 403, o.Payload)
}
func (o *PostCharactersCharacterIDCspaForbidden) 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
}
// NewPostCharactersCharacterIDCspaInternalServerError creates a PostCharactersCharacterIDCspaInternalServerError with default headers values
func NewPostCharactersCharacterIDCspaInternalServerError() *PostCharactersCharacterIDCspaInternalServerError {
return &PostCharactersCharacterIDCspaInternalServerError{}
}
/*PostCharactersCharacterIDCspaInternalServerError handles this case with default header values.
Internal server error
*/
type PostCharactersCharacterIDCspaInternalServerError struct {
Payload PostCharactersCharacterIDCspaInternalServerErrorBody
}
func (o *PostCharactersCharacterIDCspaInternalServerError) Error() string {
return fmt.Sprintf("[POST /characters/{character_id}/cspa/][%d] postCharactersCharacterIdCspaInternalServerError %+v", 500, o.Payload)
}
func (o *PostCharactersCharacterIDCspaInternalServerError) 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
}
/*PostCharactersCharacterIDCspaBody post_characters_character_id_cspa_characters
//
// characters schema
swagger:model PostCharactersCharacterIDCspaBody
*/
type PostCharactersCharacterIDCspaBody struct {
// post_characters_character_id_cspa_characters
//
// characters array
// Required: true
// Min Items: 1
// Unique: true
Characters []int32 `json:"characters"`
}
/*PostCharactersCharacterIDCspaCreatedBody post_characters_character_id_cspa_created
//
// 201 created object
swagger:model PostCharactersCharacterIDCspaCreatedBody
*/
type PostCharactersCharacterIDCspaCreatedBody struct {
// post_characters_character_id_cspa_cost
//
// cost integer
// Required: true
Cost *int64 `json:"cost"`
}
/*PostCharactersCharacterIDCspaForbiddenBody post_characters_character_id_cspa_forbidden
//
// Forbidden
swagger:model PostCharactersCharacterIDCspaForbiddenBody
*/
type PostCharactersCharacterIDCspaForbiddenBody struct {
// post_characters_character_id_cspa_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
/*PostCharactersCharacterIDCspaInternalServerErrorBody post_characters_character_id_cspa_internal_server_error
//
// Internal server error
swagger:model PostCharactersCharacterIDCspaInternalServerErrorBody
*/
type PostCharactersCharacterIDCspaInternalServerErrorBody struct {
// post_characters_character_id_cspa_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}