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/calendar/get_characters_character_id_calendar_responses.go

156 lines
4.9 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package calendar
// 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"
)
// GetCharactersCharacterIDCalendarReader is a Reader for the GetCharactersCharacterIDCalendar structure.
type GetCharactersCharacterIDCalendarReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetCharactersCharacterIDCalendarReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetCharactersCharacterIDCalendarOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewGetCharactersCharacterIDCalendarForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetCharactersCharacterIDCalendarInternalServerError()
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())
}
}
// NewGetCharactersCharacterIDCalendarOK creates a GetCharactersCharacterIDCalendarOK with default headers values
func NewGetCharactersCharacterIDCalendarOK() *GetCharactersCharacterIDCalendarOK {
return &GetCharactersCharacterIDCalendarOK{}
}
/*GetCharactersCharacterIDCalendarOK handles this case with default header values.
A collection of event summaries
*/
type GetCharactersCharacterIDCalendarOK struct {
/*The caching mechanism used
*/
CacheControl string
/*RFC7231 formatted datetime string
*/
Expires string
/*RFC7231 formatted datetime string
*/
LastModified string
Payload models.GetCharactersCharacterIDCalendarOKBody
}
func (o *GetCharactersCharacterIDCalendarOK) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/calendar/][%d] getCharactersCharacterIdCalendarOK %+v", 200, o.Payload)
}
func (o *GetCharactersCharacterIDCalendarOK) 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
}
// NewGetCharactersCharacterIDCalendarForbidden creates a GetCharactersCharacterIDCalendarForbidden with default headers values
func NewGetCharactersCharacterIDCalendarForbidden() *GetCharactersCharacterIDCalendarForbidden {
return &GetCharactersCharacterIDCalendarForbidden{}
}
/*GetCharactersCharacterIDCalendarForbidden handles this case with default header values.
Forbidden
*/
type GetCharactersCharacterIDCalendarForbidden struct {
Payload *models.Forbidden
}
func (o *GetCharactersCharacterIDCalendarForbidden) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/calendar/][%d] getCharactersCharacterIdCalendarForbidden %+v", 403, o.Payload)
}
func (o *GetCharactersCharacterIDCalendarForbidden) 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
}
// NewGetCharactersCharacterIDCalendarInternalServerError creates a GetCharactersCharacterIDCalendarInternalServerError with default headers values
func NewGetCharactersCharacterIDCalendarInternalServerError() *GetCharactersCharacterIDCalendarInternalServerError {
return &GetCharactersCharacterIDCalendarInternalServerError{}
}
/*GetCharactersCharacterIDCalendarInternalServerError handles this case with default header values.
Internal server error
*/
type GetCharactersCharacterIDCalendarInternalServerError struct {
Payload *models.InternalServerError
}
func (o *GetCharactersCharacterIDCalendarInternalServerError) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/calendar/][%d] getCharactersCharacterIdCalendarInternalServerError %+v", 500, o.Payload)
}
func (o *GetCharactersCharacterIDCalendarInternalServerError) 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
}