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/universe/get_universe_constellations_constellation_id_responses.go

436 lines
13 KiB
Go

package universe
// 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/validate"
strfmt "github.com/go-openapi/strfmt"
)
// GetUniverseConstellationsConstellationIDReader is a Reader for the GetUniverseConstellationsConstellationID structure.
type GetUniverseConstellationsConstellationIDReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetUniverseConstellationsConstellationIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetUniverseConstellationsConstellationIDOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 404:
result := NewGetUniverseConstellationsConstellationIDNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetUniverseConstellationsConstellationIDInternalServerError()
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())
}
}
// NewGetUniverseConstellationsConstellationIDOK creates a GetUniverseConstellationsConstellationIDOK with default headers values
func NewGetUniverseConstellationsConstellationIDOK() *GetUniverseConstellationsConstellationIDOK {
return &GetUniverseConstellationsConstellationIDOK{}
}
/*GetUniverseConstellationsConstellationIDOK handles this case with default header values.
Information about a constellation
*/
type GetUniverseConstellationsConstellationIDOK struct {
/*The caching mechanism used
*/
CacheControl string
/*The language used in the response
*/
ContentLanguage string
/*RFC7231 formatted datetime string
*/
Expires string
/*RFC7231 formatted datetime string
*/
LastModified string
Payload GetUniverseConstellationsConstellationIDOKBody
}
func (o *GetUniverseConstellationsConstellationIDOK) Error() string {
return fmt.Sprintf("[GET /universe/constellations/{constellation_id}/][%d] getUniverseConstellationsConstellationIdOK %+v", 200, o.Payload)
}
func (o *GetUniverseConstellationsConstellationIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
// response header Content-Language
o.ContentLanguage = response.GetHeader("Content-Language")
// 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
}
// NewGetUniverseConstellationsConstellationIDNotFound creates a GetUniverseConstellationsConstellationIDNotFound with default headers values
func NewGetUniverseConstellationsConstellationIDNotFound() *GetUniverseConstellationsConstellationIDNotFound {
return &GetUniverseConstellationsConstellationIDNotFound{}
}
/*GetUniverseConstellationsConstellationIDNotFound handles this case with default header values.
Constellation not found
*/
type GetUniverseConstellationsConstellationIDNotFound struct {
Payload GetUniverseConstellationsConstellationIDNotFoundBody
}
func (o *GetUniverseConstellationsConstellationIDNotFound) Error() string {
return fmt.Sprintf("[GET /universe/constellations/{constellation_id}/][%d] getUniverseConstellationsConstellationIdNotFound %+v", 404, o.Payload)
}
func (o *GetUniverseConstellationsConstellationIDNotFound) 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
}
// NewGetUniverseConstellationsConstellationIDInternalServerError creates a GetUniverseConstellationsConstellationIDInternalServerError with default headers values
func NewGetUniverseConstellationsConstellationIDInternalServerError() *GetUniverseConstellationsConstellationIDInternalServerError {
return &GetUniverseConstellationsConstellationIDInternalServerError{}
}
/*GetUniverseConstellationsConstellationIDInternalServerError handles this case with default header values.
Internal server error
*/
type GetUniverseConstellationsConstellationIDInternalServerError struct {
Payload GetUniverseConstellationsConstellationIDInternalServerErrorBody
}
func (o *GetUniverseConstellationsConstellationIDInternalServerError) Error() string {
return fmt.Sprintf("[GET /universe/constellations/{constellation_id}/][%d] getUniverseConstellationsConstellationIdInternalServerError %+v", 500, o.Payload)
}
func (o *GetUniverseConstellationsConstellationIDInternalServerError) 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
}
/*GetUniverseConstellationsConstellationIDInternalServerErrorBody get_universe_constellations_constellation_id_internal_server_error
//
// Internal server error
swagger:model GetUniverseConstellationsConstellationIDInternalServerErrorBody
*/
type GetUniverseConstellationsConstellationIDInternalServerErrorBody struct {
// get_universe_constellations_constellation_id_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}
// Validate validates this get universe constellations constellation ID internal server error body
func (o *GetUniverseConstellationsConstellationIDInternalServerErrorBody) 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 *GetUniverseConstellationsConstellationIDInternalServerErrorBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdInternalServerError"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
/*GetUniverseConstellationsConstellationIDNotFoundBody get_universe_constellations_constellation_id_not_found
//
// Not found
swagger:model GetUniverseConstellationsConstellationIDNotFoundBody
*/
type GetUniverseConstellationsConstellationIDNotFoundBody struct {
// get_universe_constellations_constellation_id_404_not_found
//
// Not found message
// Required: true
Error *string `json:"error"`
}
// Validate validates this get universe constellations constellation ID not found body
func (o *GetUniverseConstellationsConstellationIDNotFoundBody) 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 *GetUniverseConstellationsConstellationIDNotFoundBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdNotFound"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
/*GetUniverseConstellationsConstellationIDOKBody get_universe_constellations_constellation_id_ok
//
// 200 ok object
swagger:model GetUniverseConstellationsConstellationIDOKBody
*/
type GetUniverseConstellationsConstellationIDOKBody struct {
// get_universe_constellations_constellation_id_constellation_id
//
// constellation_id integer
// Required: true
ConstellationID *int32 `json:"constellation_id"`
// get_universe_constellations_constellation_id_name
//
// name string
// Required: true
Name *string `json:"name"`
// position
// Required: true
Position *GetUniverseConstellationsConstellationIDOKBodyPosition `json:"position"`
// get_universe_constellations_constellation_id_region_id
//
// The region this constellation is in
// Required: true
RegionID *int32 `json:"region_id"`
// get_universe_constellations_constellation_id_systems
//
// systems array
// Required: true
Systems []int32 `json:"systems"`
}
// Validate validates this get universe constellations constellation ID o k body
func (o *GetUniverseConstellationsConstellationIDOKBody) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validateConstellationID(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateName(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validatePosition(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateRegionID(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateSystems(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBody) validateConstellationID(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"constellation_id", "body", o.ConstellationID); err != nil {
return err
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBody) validateName(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"name", "body", o.Name); err != nil {
return err
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBody) validatePosition(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"position", "body", o.Position); err != nil {
return err
}
if o.Position != nil {
if err := o.Position.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("getUniverseConstellationsConstellationIdOK" + "." + "position")
}
return err
}
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBody) validateRegionID(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"region_id", "body", o.RegionID); err != nil {
return err
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBody) validateSystems(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"systems", "body", o.Systems); err != nil {
return err
}
return nil
}
/*GetUniverseConstellationsConstellationIDOKBodyPosition get_universe_constellations_constellation_id_position
//
// position object
swagger:model GetUniverseConstellationsConstellationIDOKBodyPosition
*/
type GetUniverseConstellationsConstellationIDOKBodyPosition struct {
// get_universe_constellations_constellation_id_x
//
// x number
// Required: true
X *float32 `json:"x"`
// get_universe_constellations_constellation_id_y
//
// y number
// Required: true
Y *float32 `json:"y"`
// get_universe_constellations_constellation_id_z
//
// z number
// Required: true
Z *float32 `json:"z"`
}
// Validate validates this get universe constellations constellation ID o k body position
func (o *GetUniverseConstellationsConstellationIDOKBodyPosition) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validateX(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateY(formats); err != nil {
// prop
res = append(res, err)
}
if err := o.validateZ(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBodyPosition) validateX(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"position"+"."+"x", "body", o.X); err != nil {
return err
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBodyPosition) validateY(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"position"+"."+"y", "body", o.Y); err != nil {
return err
}
return nil
}
func (o *GetUniverseConstellationsConstellationIDOKBodyPosition) validateZ(formats strfmt.Registry) error {
if err := validate.Required("getUniverseConstellationsConstellationIdOK"+"."+"position"+"."+"z", "body", o.Z); err != nil {
return err
}
return nil
}