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

209 lines
6.4 KiB
Go

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"
)
// 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 []*GetCharactersCharacterIDCalendarOKBodyItems0
}
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 GetCharactersCharacterIDCalendarForbiddenBody
}
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 {
// 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 GetCharactersCharacterIDCalendarInternalServerErrorBody
}
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 {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
/*GetCharactersCharacterIDCalendarOKBodyItems0 get_characters_character_id_calendar_200_ok
//
// event
swagger:model GetCharactersCharacterIDCalendarOKBodyItems0
*/
type GetCharactersCharacterIDCalendarOKBodyItems0 struct {
// get_characters_character_id_calendar_event_date
//
// event_date string
EventDate strfmt.DateTime `json:"event_date,omitempty"`
// get_characters_character_id_calendar_event_id
//
// event_id integer
EventID int32 `json:"event_id,omitempty"`
// get_characters_character_id_calendar_event_response
//
// event_response string
EventResponse string `json:"event_response,omitempty"`
// get_characters_character_id_calendar_importance
//
// importance integer
Importance int32 `json:"importance,omitempty"`
// get_characters_character_id_calendar_title
//
// title string
Title string `json:"title,omitempty"`
}
/*GetCharactersCharacterIDCalendarForbiddenBody get_characters_character_id_calendar_forbidden
//
// Forbidden
swagger:model GetCharactersCharacterIDCalendarForbiddenBody
*/
type GetCharactersCharacterIDCalendarForbiddenBody struct {
// get_characters_character_id_calendar_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
/*GetCharactersCharacterIDCalendarInternalServerErrorBody get_characters_character_id_calendar_internal_server_error
//
// Internal server error
swagger:model GetCharactersCharacterIDCalendarInternalServerErrorBody
*/
type GetCharactersCharacterIDCalendarInternalServerErrorBody struct {
// get_characters_character_id_calendar_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}