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