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/character/get_characters_character_id_agents_research_responses.go

399 lines
12 KiB
Go

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/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
strfmt "github.com/go-openapi/strfmt"
)
// GetCharactersCharacterIDAgentsResearchReader is a Reader for the GetCharactersCharacterIDAgentsResearch structure.
type GetCharactersCharacterIDAgentsResearchReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetCharactersCharacterIDAgentsResearchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetCharactersCharacterIDAgentsResearchOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewGetCharactersCharacterIDAgentsResearchForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetCharactersCharacterIDAgentsResearchInternalServerError()
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())
}
}
// NewGetCharactersCharacterIDAgentsResearchOK creates a GetCharactersCharacterIDAgentsResearchOK with default headers values
func NewGetCharactersCharacterIDAgentsResearchOK() *GetCharactersCharacterIDAgentsResearchOK {
return &GetCharactersCharacterIDAgentsResearchOK{}
}
/*GetCharactersCharacterIDAgentsResearchOK handles this case with default header values.
A list of agents research information
*/
type GetCharactersCharacterIDAgentsResearchOK struct {
/*The caching mechanism used
*/
CacheControl string
/*RFC7231 formatted datetime string
*/
Expires string
/*RFC7231 formatted datetime string
*/
LastModified string
Payload []*GetCharactersCharacterIDAgentsResearchOKBodyItems0
}
func (o *GetCharactersCharacterIDAgentsResearchOK) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/agents_research/][%d] getCharactersCharacterIdAgentsResearchOK %+v", 200, o.Payload)
}
func (o *GetCharactersCharacterIDAgentsResearchOK) 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
}
// NewGetCharactersCharacterIDAgentsResearchForbidden creates a GetCharactersCharacterIDAgentsResearchForbidden with default headers values
func NewGetCharactersCharacterIDAgentsResearchForbidden() *GetCharactersCharacterIDAgentsResearchForbidden {
return &GetCharactersCharacterIDAgentsResearchForbidden{}
}
/*GetCharactersCharacterIDAgentsResearchForbidden handles this case with default header values.
Forbidden
*/
type GetCharactersCharacterIDAgentsResearchForbidden struct {
Payload GetCharactersCharacterIDAgentsResearchForbiddenBody
}
func (o *GetCharactersCharacterIDAgentsResearchForbidden) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/agents_research/][%d] getCharactersCharacterIdAgentsResearchForbidden %+v", 403, o.Payload)
}
func (o *GetCharactersCharacterIDAgentsResearchForbidden) 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
}
// NewGetCharactersCharacterIDAgentsResearchInternalServerError creates a GetCharactersCharacterIDAgentsResearchInternalServerError with default headers values
func NewGetCharactersCharacterIDAgentsResearchInternalServerError() *GetCharactersCharacterIDAgentsResearchInternalServerError {
return &GetCharactersCharacterIDAgentsResearchInternalServerError{}
}
/*GetCharactersCharacterIDAgentsResearchInternalServerError handles this case with default header values.
Internal server error
*/
type GetCharactersCharacterIDAgentsResearchInternalServerError struct {
Payload GetCharactersCharacterIDAgentsResearchInternalServerErrorBody
}
func (o *GetCharactersCharacterIDAgentsResearchInternalServerError) Error() string {
return fmt.Sprintf("[GET /characters/{character_id}/agents_research/][%d] getCharactersCharacterIdAgentsResearchInternalServerError %+v", 500, o.Payload)
}
func (o *GetCharactersCharacterIDAgentsResearchInternalServerError) 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
}
/*GetCharactersCharacterIDAgentsResearchForbiddenBody get_characters_character_id_agents_research_forbidden
//
// Forbidden
swagger:model GetCharactersCharacterIDAgentsResearchForbiddenBody
*/
type GetCharactersCharacterIDAgentsResearchForbiddenBody struct {
// get_characters_character_id_agents_research_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
// Validate validates this get characters character ID agents research forbidden body
func (o *GetCharactersCharacterIDAgentsResearchForbiddenBody) 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 *GetCharactersCharacterIDAgentsResearchForbiddenBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("getCharactersCharacterIdAgentsResearchForbidden"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *GetCharactersCharacterIDAgentsResearchForbiddenBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *GetCharactersCharacterIDAgentsResearchForbiddenBody) UnmarshalBinary(b []byte) error {
var res GetCharactersCharacterIDAgentsResearchForbiddenBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
/*GetCharactersCharacterIDAgentsResearchInternalServerErrorBody get_characters_character_id_agents_research_internal_server_error
//
// Internal server error
swagger:model GetCharactersCharacterIDAgentsResearchInternalServerErrorBody
*/
type GetCharactersCharacterIDAgentsResearchInternalServerErrorBody struct {
// get_characters_character_id_agents_research_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}
// Validate validates this get characters character ID agents research internal server error body
func (o *GetCharactersCharacterIDAgentsResearchInternalServerErrorBody) 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 *GetCharactersCharacterIDAgentsResearchInternalServerErrorBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("getCharactersCharacterIdAgentsResearchInternalServerError"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *GetCharactersCharacterIDAgentsResearchInternalServerErrorBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *GetCharactersCharacterIDAgentsResearchInternalServerErrorBody) UnmarshalBinary(b []byte) error {
var res GetCharactersCharacterIDAgentsResearchInternalServerErrorBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
/*GetCharactersCharacterIDAgentsResearchOKBodyItems0 get_characters_character_id_agents_research_200_ok
//
// 200 ok object
swagger:model GetCharactersCharacterIDAgentsResearchOKBodyItems0
*/
type GetCharactersCharacterIDAgentsResearchOKBodyItems0 struct {
// get_characters_character_id_agents_research_agent_id
//
// agent_id integer
// Required: true
AgentID *int32 `json:"agent_id"`
// get_characters_character_id_agents_research_points_per_day
//
// points_per_day number
// Required: true
PointsPerDay *float32 `json:"points_per_day"`
// get_characters_character_id_agents_research_remainder_points
//
// remainder_points number
// Required: true
RemainderPoints *float32 `json:"remainder_points"`
// get_characters_character_id_agents_research_skill_type_id
//
// skill_type_id integer
// Required: true
SkillTypeID *int32 `json:"skill_type_id"`
// get_characters_character_id_agents_research_started_at
//
// started_at string
// Required: true
StartedAt *strfmt.DateTime `json:"started_at"`
}
// Validate validates this get characters character ID agents research o k body items0
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validateAgentID(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validatePointsPerDay(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateRemainderPoints(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateSkillTypeID(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateStartedAt(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) validateAgentID(formats strfmt.Registry) error {
if err := validate.Required("agent_id", "body", o.AgentID); err != nil {
return err
}
return nil
}
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) validatePointsPerDay(formats strfmt.Registry) error {
if err := validate.Required("points_per_day", "body", o.PointsPerDay); err != nil {
return err
}
return nil
}
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) validateRemainderPoints(formats strfmt.Registry) error {
if err := validate.Required("remainder_points", "body", o.RemainderPoints); err != nil {
return err
}
return nil
}
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) validateSkillTypeID(formats strfmt.Registry) error {
if err := validate.Required("skill_type_id", "body", o.SkillTypeID); err != nil {
return err
}
return nil
}
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) validateStartedAt(formats strfmt.Registry) error {
if err := validate.Required("started_at", "body", o.StartedAt); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *GetCharactersCharacterIDAgentsResearchOKBodyItems0) UnmarshalBinary(b []byte) error {
var res GetCharactersCharacterIDAgentsResearchOKBodyItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}