156 lines
5.1 KiB
Go
156 lines
5.1 KiB
Go
// 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"
|
|
)
|
|
|
|
// GetCharactersCharacterIDNotificationsReader is a Reader for the GetCharactersCharacterIDNotifications structure.
|
|
type GetCharactersCharacterIDNotificationsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetCharactersCharacterIDNotificationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
result := NewGetCharactersCharacterIDNotificationsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 403:
|
|
result := NewGetCharactersCharacterIDNotificationsForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewGetCharactersCharacterIDNotificationsInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDNotificationsOK creates a GetCharactersCharacterIDNotificationsOK with default headers values
|
|
func NewGetCharactersCharacterIDNotificationsOK() *GetCharactersCharacterIDNotificationsOK {
|
|
return &GetCharactersCharacterIDNotificationsOK{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDNotificationsOK handles this case with default header values.
|
|
|
|
Returns your recent notifications
|
|
*/
|
|
type GetCharactersCharacterIDNotificationsOK struct {
|
|
/*The caching mechanism used
|
|
*/
|
|
CacheControl string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
Expires string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
LastModified string
|
|
|
|
Payload models.GetCharactersCharacterIDNotificationsOKBody
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDNotificationsOK) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/notifications/][%d] getCharactersCharacterIdNotificationsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDNotificationsOK) 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
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDNotificationsForbidden creates a GetCharactersCharacterIDNotificationsForbidden with default headers values
|
|
func NewGetCharactersCharacterIDNotificationsForbidden() *GetCharactersCharacterIDNotificationsForbidden {
|
|
return &GetCharactersCharacterIDNotificationsForbidden{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDNotificationsForbidden handles this case with default header values.
|
|
|
|
Forbidden
|
|
*/
|
|
type GetCharactersCharacterIDNotificationsForbidden struct {
|
|
Payload *models.Forbidden
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDNotificationsForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/notifications/][%d] getCharactersCharacterIdNotificationsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDNotificationsForbidden) 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
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDNotificationsInternalServerError creates a GetCharactersCharacterIDNotificationsInternalServerError with default headers values
|
|
func NewGetCharactersCharacterIDNotificationsInternalServerError() *GetCharactersCharacterIDNotificationsInternalServerError {
|
|
return &GetCharactersCharacterIDNotificationsInternalServerError{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDNotificationsInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type GetCharactersCharacterIDNotificationsInternalServerError struct {
|
|
Payload *models.InternalServerError
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDNotificationsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/notifications/][%d] getCharactersCharacterIdNotificationsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDNotificationsInternalServerError) 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
|
|
}
|