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/user_interface/post_ui_autopilot_waypoint_responses.go

238 lines
6.7 KiB
Go

package user_interface
// 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"
)
// PostUIAutopilotWaypointReader is a Reader for the PostUIAutopilotWaypoint structure.
type PostUIAutopilotWaypointReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostUIAutopilotWaypointReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewPostUIAutopilotWaypointNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewPostUIAutopilotWaypointForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostUIAutopilotWaypointInternalServerError()
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())
}
}
// NewPostUIAutopilotWaypointNoContent creates a PostUIAutopilotWaypointNoContent with default headers values
func NewPostUIAutopilotWaypointNoContent() *PostUIAutopilotWaypointNoContent {
return &PostUIAutopilotWaypointNoContent{}
}
/*PostUIAutopilotWaypointNoContent handles this case with default header values.
Open window request received
*/
type PostUIAutopilotWaypointNoContent struct {
}
func (o *PostUIAutopilotWaypointNoContent) Error() string {
return fmt.Sprintf("[POST /ui/autopilot/waypoint/][%d] postUiAutopilotWaypointNoContent ", 204)
}
func (o *PostUIAutopilotWaypointNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewPostUIAutopilotWaypointForbidden creates a PostUIAutopilotWaypointForbidden with default headers values
func NewPostUIAutopilotWaypointForbidden() *PostUIAutopilotWaypointForbidden {
return &PostUIAutopilotWaypointForbidden{}
}
/*PostUIAutopilotWaypointForbidden handles this case with default header values.
Forbidden
*/
type PostUIAutopilotWaypointForbidden struct {
Payload PostUIAutopilotWaypointForbiddenBody
}
func (o *PostUIAutopilotWaypointForbidden) Error() string {
return fmt.Sprintf("[POST /ui/autopilot/waypoint/][%d] postUiAutopilotWaypointForbidden %+v", 403, o.Payload)
}
func (o *PostUIAutopilotWaypointForbidden) 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
}
// NewPostUIAutopilotWaypointInternalServerError creates a PostUIAutopilotWaypointInternalServerError with default headers values
func NewPostUIAutopilotWaypointInternalServerError() *PostUIAutopilotWaypointInternalServerError {
return &PostUIAutopilotWaypointInternalServerError{}
}
/*PostUIAutopilotWaypointInternalServerError handles this case with default header values.
Internal server error
*/
type PostUIAutopilotWaypointInternalServerError struct {
Payload PostUIAutopilotWaypointInternalServerErrorBody
}
func (o *PostUIAutopilotWaypointInternalServerError) Error() string {
return fmt.Sprintf("[POST /ui/autopilot/waypoint/][%d] postUiAutopilotWaypointInternalServerError %+v", 500, o.Payload)
}
func (o *PostUIAutopilotWaypointInternalServerError) 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
}
/*PostUIAutopilotWaypointForbiddenBody post_ui_autopilot_waypoint_forbidden
//
// Forbidden
swagger:model PostUIAutopilotWaypointForbiddenBody
*/
type PostUIAutopilotWaypointForbiddenBody struct {
// post_ui_autopilot_waypoint_403_forbidden
//
// Forbidden message
// Required: true
Error *string `json:"error"`
}
// Validate validates this post UI autopilot waypoint forbidden body
func (o *PostUIAutopilotWaypointForbiddenBody) 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 *PostUIAutopilotWaypointForbiddenBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("postUiAutopilotWaypointForbidden"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *PostUIAutopilotWaypointForbiddenBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *PostUIAutopilotWaypointForbiddenBody) UnmarshalBinary(b []byte) error {
var res PostUIAutopilotWaypointForbiddenBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
/*PostUIAutopilotWaypointInternalServerErrorBody post_ui_autopilot_waypoint_internal_server_error
//
// Internal server error
swagger:model PostUIAutopilotWaypointInternalServerErrorBody
*/
type PostUIAutopilotWaypointInternalServerErrorBody struct {
// post_ui_autopilot_waypoint_500_internal_server_error
//
// Internal server error message
// Required: true
Error *string `json:"error"`
}
// Validate validates this post UI autopilot waypoint internal server error body
func (o *PostUIAutopilotWaypointInternalServerErrorBody) 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 *PostUIAutopilotWaypointInternalServerErrorBody) validateError(formats strfmt.Registry) error {
if err := validate.Required("postUiAutopilotWaypointInternalServerError"+"."+"error", "body", o.Error); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (o *PostUIAutopilotWaypointInternalServerErrorBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *PostUIAutopilotWaypointInternalServerErrorBody) UnmarshalBinary(b []byte) error {
var res PostUIAutopilotWaypointInternalServerErrorBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}