280 lines
7.7 KiB
Go
280 lines
7.7 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"
|
|
)
|
|
|
|
// GetUniverseStationsStationIDReader is a Reader for the GetUniverseStationsStationID structure.
|
|
type GetUniverseStationsStationIDReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetUniverseStationsStationIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
result := NewGetUniverseStationsStationIDOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 404:
|
|
result := NewGetUniverseStationsStationIDNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewGetUniverseStationsStationIDInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetUniverseStationsStationIDOK creates a GetUniverseStationsStationIDOK with default headers values
|
|
func NewGetUniverseStationsStationIDOK() *GetUniverseStationsStationIDOK {
|
|
return &GetUniverseStationsStationIDOK{}
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDOK handles this case with default header values.
|
|
|
|
Information about a station
|
|
*/
|
|
type GetUniverseStationsStationIDOK struct {
|
|
/*The caching mechanism used
|
|
*/
|
|
CacheControl string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
Expires string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
LastModified string
|
|
|
|
Payload GetUniverseStationsStationIDOKBody
|
|
}
|
|
|
|
func (o *GetUniverseStationsStationIDOK) Error() string {
|
|
return fmt.Sprintf("[GET /universe/stations/{station_id}/][%d] getUniverseStationsStationIdOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetUniverseStationsStationIDOK) 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
|
|
}
|
|
|
|
// NewGetUniverseStationsStationIDNotFound creates a GetUniverseStationsStationIDNotFound with default headers values
|
|
func NewGetUniverseStationsStationIDNotFound() *GetUniverseStationsStationIDNotFound {
|
|
return &GetUniverseStationsStationIDNotFound{}
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDNotFound handles this case with default header values.
|
|
|
|
Station not found
|
|
*/
|
|
type GetUniverseStationsStationIDNotFound struct {
|
|
Payload GetUniverseStationsStationIDNotFoundBody
|
|
}
|
|
|
|
func (o *GetUniverseStationsStationIDNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /universe/stations/{station_id}/][%d] getUniverseStationsStationIdNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetUniverseStationsStationIDNotFound) 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
|
|
}
|
|
|
|
// NewGetUniverseStationsStationIDInternalServerError creates a GetUniverseStationsStationIDInternalServerError with default headers values
|
|
func NewGetUniverseStationsStationIDInternalServerError() *GetUniverseStationsStationIDInternalServerError {
|
|
return &GetUniverseStationsStationIDInternalServerError{}
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type GetUniverseStationsStationIDInternalServerError struct {
|
|
Payload GetUniverseStationsStationIDInternalServerErrorBody
|
|
}
|
|
|
|
func (o *GetUniverseStationsStationIDInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /universe/stations/{station_id}/][%d] getUniverseStationsStationIdInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetUniverseStationsStationIDInternalServerError) 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
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDOKBodyPosition get_universe_stations_station_id_position
|
|
//
|
|
// position object
|
|
swagger:model GetUniverseStationsStationIDOKBodyPosition
|
|
*/
|
|
type GetUniverseStationsStationIDOKBodyPosition struct {
|
|
|
|
// get_universe_stations_station_id_x
|
|
//
|
|
// x number
|
|
// Required: true
|
|
X *float32 `json:"x"`
|
|
|
|
// get_universe_stations_station_id_y
|
|
//
|
|
// y number
|
|
// Required: true
|
|
Y *float32 `json:"y"`
|
|
|
|
// get_universe_stations_station_id_z
|
|
//
|
|
// z number
|
|
// Required: true
|
|
Z *float32 `json:"z"`
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDOKBody get_universe_stations_station_id_ok
|
|
//
|
|
// 200 ok object
|
|
swagger:model GetUniverseStationsStationIDOKBody
|
|
*/
|
|
type GetUniverseStationsStationIDOKBody struct {
|
|
|
|
// get_universe_stations_station_id_max_dockable_ship_volume
|
|
//
|
|
// max_dockable_ship_volume number
|
|
// Required: true
|
|
MaxDockableShipVolume *float32 `json:"max_dockable_ship_volume"`
|
|
|
|
// get_universe_stations_station_id_name
|
|
//
|
|
// name string
|
|
// Required: true
|
|
Name *string `json:"name"`
|
|
|
|
// get_universe_stations_station_id_office_rental_cost
|
|
//
|
|
// office_rental_cost number
|
|
// Required: true
|
|
OfficeRentalCost *float32 `json:"office_rental_cost"`
|
|
|
|
// get_universe_stations_station_id_owner
|
|
//
|
|
// ID of the corporation that controls this station
|
|
// Required: true
|
|
Owner *int32 `json:"owner"`
|
|
|
|
// position
|
|
// Required: true
|
|
Position *GetUniverseStationsStationIDOKBodyPosition `json:"position"`
|
|
|
|
// get_universe_stations_station_id_race_id
|
|
//
|
|
// race_id integer
|
|
// Required: true
|
|
RaceID *int32 `json:"race_id"`
|
|
|
|
// get_universe_stations_station_id_reprocessing_efficiency
|
|
//
|
|
// reprocessing_efficiency number
|
|
// Required: true
|
|
ReprocessingEfficiency *float32 `json:"reprocessing_efficiency"`
|
|
|
|
// get_universe_stations_station_id_reprocessing_stations_take
|
|
//
|
|
// reprocessing_stations_take number
|
|
// Required: true
|
|
ReprocessingStationsTake *float32 `json:"reprocessing_stations_take"`
|
|
|
|
// get_universe_stations_station_id_services
|
|
//
|
|
// services array
|
|
// Required: true
|
|
Services []string `json:"services"`
|
|
|
|
// get_universe_stations_station_id_station_id
|
|
//
|
|
// station_id integer
|
|
// Required: true
|
|
StationID *int32 `json:"station_id"`
|
|
|
|
// get_universe_stations_station_id_system_id
|
|
//
|
|
// The solar system this station is in
|
|
// Required: true
|
|
SystemID *int32 `json:"system_id"`
|
|
|
|
// get_universe_stations_station_id_type_id
|
|
//
|
|
// type_id integer
|
|
// Required: true
|
|
TypeID *int32 `json:"type_id"`
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDNotFoundBody get_universe_stations_station_id_not_found
|
|
//
|
|
// Not found
|
|
swagger:model GetUniverseStationsStationIDNotFoundBody
|
|
*/
|
|
type GetUniverseStationsStationIDNotFoundBody struct {
|
|
|
|
// get_universe_stations_station_id_404_not_found
|
|
//
|
|
// Not found message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
/*GetUniverseStationsStationIDInternalServerErrorBody get_universe_stations_station_id_internal_server_error
|
|
//
|
|
// Internal server error
|
|
swagger:model GetUniverseStationsStationIDInternalServerErrorBody
|
|
*/
|
|
type GetUniverseStationsStationIDInternalServerErrorBody struct {
|
|
|
|
// get_universe_stations_station_id_500_internal_server_error
|
|
//
|
|
// Internal server error message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|