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/skills/get_characters_character_id_skillqueue_responses.go

394 lines
11 KiB
Go

package skills
// 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/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
strfmt "github.com/go-openapi/strfmt"
)
// GetCharactersCharacterIDSkillqueueReader is a Reader for the GetCharactersCharacterIDSkillqueue structure.
type GetCharactersCharacterIDSkillqueueReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetCharactersCharacterIDSkillqueueReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetCharactersCharacterIDSkillqueueOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewGetCharactersCharacterIDSkillqueueForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetCharactersCharacterIDSkillqueueInternalServerError()
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())
}
}
// NewGetCharactersCharacterIDSkillqueueOK creates a GetCharactersCharacterIDSkillqueueOK with default headers values
func NewGetCharactersCharacterIDSkillqueueOK() *GetCharactersCharacterIDSkillqueueOK {
return &GetCharactersCharacterIDSkillqueueOK{}
}
/*GetCharactersCharacterIDSkillqueueOK handles this case with default header values.
The current skill queue, sorted ascending by finishing time
*/
type GetCharactersCharacterIDSkillqueueOK struct {
/*The caching mechanism used
*/
CacheControl string
/*RFC7231 formatted datetime string
*/
Expires string
/*RFC7231 formatted datetime string
*/
LastModified string
Payload []*GetCharactersCharacterIDSkillqueueOKBodyItems0
}
func (o *GetCharactersCharacterIDSkillqueueOK) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/skillqueue/][%d] getCharactersCharacterIdSkillqueueOK %+v", 200, o.Payload)
}
func (o *GetCharactersCharacterIDSkillqueueOK) 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
}
// NewGetCharactersCharacterIDSkillqueueForbidden creates a GetCharactersCharacterIDSkillqueueForbidden with default headers values
func NewGetCharactersCharacterIDSkillqueueForbidden() *GetCharactersCharacterIDSkillqueueForbidden {
return &GetCharactersCharacterIDSkillqueueForbidden{}
}
/*GetCharactersCharacterIDSkillqueueForbidden handles this case with default header values.
Forbidden
*/
type GetCharactersCharacterIDSkillqueueForbidden struct {
Payload GetCharactersCharacterIDSkillqueueForbiddenBody
}
func (o *GetCharactersCharacterIDSkillqueueForbidden) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/skillqueue/][%d] getCharactersCharacterIdSkillqueueForbidden %+v", 403, o.Payload)
}
func (o *GetCharactersCharacterIDSkillqueueForbidden) 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
}
// NewGetCharactersCharacterIDSkillqueueInternalServerError creates a GetCharactersCharacterIDSkillqueueInternalServerError with default headers values
func NewGetCharactersCharacterIDSkillqueueInternalServerError() *GetCharactersCharacterIDSkillqueueInternalServerError {
return &GetCharactersCharacterIDSkillqueueInternalServerError{}
}
/*GetCharactersCharacterIDSkillqueueInternalServerError handles this case with default header values.
Internal server error
*/
type GetCharactersCharacterIDSkillqueueInternalServerError struct {
Payload GetCharactersCharacterIDSkillqueueInternalServerErrorBody
}
func (o *GetCharactersCharacterIDSkillqueueInternalServerError) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/skillqueue/][%d] getCharactersCharacterIdSkillqueueInternalServerError %+v", 500, o.Payload)
}
func (o *GetCharactersCharacterIDSkillqueueInternalServerError) 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
}
/*GetCharactersCharacterIDSkillqueueForbiddenBody get_characters_character_id_skillqueue_forbidden
//
// Forbidden
swagger:model GetCharactersCharacterIDSkillqueueForbiddenBody
*/
type GetCharactersCharacterIDSkillqueueForbiddenBody struct {
// get_characters_character_id_skillqueue_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
// Validate validates this get characters character ID skillqueue forbidden body
func (o *GetCharactersCharacterIDSkillqueueForbiddenBody) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validateError(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (o *GetCharactersCharacterIDSkillqueueForbiddenBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("getCharactersCharacterIdSkillqueueForbidden"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *GetCharactersCharacterIDSkillqueueForbiddenBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *GetCharactersCharacterIDSkillqueueForbiddenBody) UnmarshalBinary(b []byte) error {
var res GetCharactersCharacterIDSkillqueueForbiddenBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
/*GetCharactersCharacterIDSkillqueueInternalServerErrorBody get_characters_character_id_skillqueue_internal_server_error
//
// Internal server error
swagger:model GetCharactersCharacterIDSkillqueueInternalServerErrorBody
*/
type GetCharactersCharacterIDSkillqueueInternalServerErrorBody struct {
// get_characters_character_id_skillqueue_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}
// Validate validates this get characters character ID skillqueue internal server error body
func (o *GetCharactersCharacterIDSkillqueueInternalServerErrorBody) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validateError(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (o *GetCharactersCharacterIDSkillqueueInternalServerErrorBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("getCharactersCharacterIdSkillqueueInternalServerError"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *GetCharactersCharacterIDSkillqueueInternalServerErrorBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *GetCharactersCharacterIDSkillqueueInternalServerErrorBody) UnmarshalBinary(b []byte) error {
var res GetCharactersCharacterIDSkillqueueInternalServerErrorBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
/*GetCharactersCharacterIDSkillqueueOKBodyItems0 get_characters_character_id_skillqueue_200_ok
//
// 200 ok object
swagger:model GetCharactersCharacterIDSkillqueueOKBodyItems0
*/
type GetCharactersCharacterIDSkillqueueOKBodyItems0 struct {
// get_characters_character_id_skillqueue_finish_date
//
// finish_date string
FinishDate strfmt.DateTime `json:"finish_date,omitempty"`
// get_characters_character_id_skillqueue_finished_level
//
// finished_level integer
// Required: true
// Maximum: 5
// Minimum: 0
FinishedLevel *int32 `json:"finished_level"`
// get_characters_character_id_skillqueue_level_end_sp
//
// level_end_sp integer
LevelEndSp int32 `json:"level_end_sp,omitempty"`
// get_characters_character_id_skillqueue_level_start_sp
//
// Amount of SP that was in the skill when it started training it's current level. Used to calculate % of current level complete.
LevelStartSp int32 `json:"level_start_sp,omitempty"`
// get_characters_character_id_skillqueue_queue_position
//
// queue_position integer
// Required: true
QueuePosition *int32 `json:"queue_position"`
// get_characters_character_id_skillqueue_skill_id
//
// skill_id integer
// Required: true
SkillID *int32 `json:"skill_id"`
// get_characters_character_id_skillqueue_start_date
//
// start_date string
StartDate strfmt.DateTime `json:"start_date,omitempty"`
// get_characters_character_id_skillqueue_training_start_sp
//
// training_start_sp integer
TrainingStartSp int32 `json:"training_start_sp,omitempty"`
}
// Validate validates this get characters character ID skillqueue o k body items0
func (o *GetCharactersCharacterIDSkillqueueOKBodyItems0) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validateFinishedLevel(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateQueuePosition(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateSkillID(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (o *GetCharactersCharacterIDSkillqueueOKBodyItems0) validateFinishedLevel(formats strfmt.Registry) error {
if err := validate.Required("finished_level", "body", o.FinishedLevel); err != nil {
return err
}
if err := validate.MinimumInt("finished_level", "body", int64(*o.FinishedLevel), 0, false); err != nil {
return err
}
if err := validate.MaximumInt("finished_level", "body", int64(*o.FinishedLevel), 5, false); err != nil {
return err
}
return nil
}
func (o *GetCharactersCharacterIDSkillqueueOKBodyItems0) validateQueuePosition(formats strfmt.Registry) error {
if err := validate.Required("queue_position", "body", o.QueuePosition); err != nil {
return err
}
return nil
}
func (o *GetCharactersCharacterIDSkillqueueOKBodyItems0) validateSkillID(formats strfmt.Registry) error {
if err := validate.Required("skill_id", "body", o.SkillID); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *GetCharactersCharacterIDSkillqueueOKBodyItems0) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *GetCharactersCharacterIDSkillqueueOKBodyItems0) UnmarshalBinary(b []byte) error {
var res GetCharactersCharacterIDSkillqueueOKBodyItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}