244 lines
7.6 KiB
Go
244 lines
7.6 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/runtime"
|
|
|
|
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
|
|
}
|
|
|
|
/*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"`
|
|
}
|
|
|
|
/*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"`
|
|
}
|
|
|
|
/*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"`
|
|
}
|
|
|
|
/*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"`
|
|
}
|