335 lines
10 KiB
Go
335 lines
10 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
"github.com/fiskerinc/cloud-services/pkg/ota_api/models"
|
|
)
|
|
|
|
// GetVehicleecusReader is a Reader for the GetVehicleecus structure.
|
|
type GetVehicleecusReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetVehicleecusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetVehicleecusOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewGetVehicleecusBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewGetVehicleecusUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 503:
|
|
result := NewGetVehicleecusServiceUnavailable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /vehicleecus] GetVehicleecus", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetVehicleecusOK creates a GetVehicleecusOK with default headers values
|
|
func NewGetVehicleecusOK() *GetVehicleecusOK {
|
|
return &GetVehicleecusOK{}
|
|
}
|
|
|
|
/*
|
|
GetVehicleecusOK describes a response with status code 200, with default header values.
|
|
|
|
OK
|
|
*/
|
|
type GetVehicleecusOK struct {
|
|
Payload *models.CommonJSONDBQueryResult
|
|
}
|
|
|
|
// IsSuccess returns true when this get vehicleecus o k response has a 2xx status code
|
|
func (o *GetVehicleecusOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get vehicleecus o k response has a 3xx status code
|
|
func (o *GetVehicleecusOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get vehicleecus o k response has a 4xx status code
|
|
func (o *GetVehicleecusOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get vehicleecus o k response has a 5xx status code
|
|
func (o *GetVehicleecusOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get vehicleecus o k response a status code equal to that given
|
|
func (o *GetVehicleecusOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get vehicleecus o k response
|
|
func (o *GetVehicleecusOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetVehicleecusOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusOK) GetPayload() *models.CommonJSONDBQueryResult {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetVehicleecusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONDBQueryResult)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetVehicleecusBadRequest creates a GetVehicleecusBadRequest with default headers values
|
|
func NewGetVehicleecusBadRequest() *GetVehicleecusBadRequest {
|
|
return &GetVehicleecusBadRequest{}
|
|
}
|
|
|
|
/*
|
|
GetVehicleecusBadRequest describes a response with status code 400, with default header values.
|
|
|
|
Bad request
|
|
*/
|
|
type GetVehicleecusBadRequest struct {
|
|
Payload *models.CommonJSONError
|
|
}
|
|
|
|
// IsSuccess returns true when this get vehicleecus bad request response has a 2xx status code
|
|
func (o *GetVehicleecusBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get vehicleecus bad request response has a 3xx status code
|
|
func (o *GetVehicleecusBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get vehicleecus bad request response has a 4xx status code
|
|
func (o *GetVehicleecusBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get vehicleecus bad request response has a 5xx status code
|
|
func (o *GetVehicleecusBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get vehicleecus bad request response a status code equal to that given
|
|
func (o *GetVehicleecusBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the get vehicleecus bad request response
|
|
func (o *GetVehicleecusBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *GetVehicleecusBadRequest) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusBadRequest %s", 400, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusBadRequest) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusBadRequest %s", 400, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusBadRequest) GetPayload() *models.CommonJSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetVehicleecusBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetVehicleecusUnauthorized creates a GetVehicleecusUnauthorized with default headers values
|
|
func NewGetVehicleecusUnauthorized() *GetVehicleecusUnauthorized {
|
|
return &GetVehicleecusUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetVehicleecusUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Unauthorized
|
|
*/
|
|
type GetVehicleecusUnauthorized struct {
|
|
Payload *models.CommonJSONError
|
|
}
|
|
|
|
// IsSuccess returns true when this get vehicleecus unauthorized response has a 2xx status code
|
|
func (o *GetVehicleecusUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get vehicleecus unauthorized response has a 3xx status code
|
|
func (o *GetVehicleecusUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get vehicleecus unauthorized response has a 4xx status code
|
|
func (o *GetVehicleecusUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get vehicleecus unauthorized response has a 5xx status code
|
|
func (o *GetVehicleecusUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get vehicleecus unauthorized response a status code equal to that given
|
|
func (o *GetVehicleecusUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get vehicleecus unauthorized response
|
|
func (o *GetVehicleecusUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetVehicleecusUnauthorized) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusUnauthorized) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusUnauthorized) GetPayload() *models.CommonJSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetVehicleecusUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetVehicleecusServiceUnavailable creates a GetVehicleecusServiceUnavailable with default headers values
|
|
func NewGetVehicleecusServiceUnavailable() *GetVehicleecusServiceUnavailable {
|
|
return &GetVehicleecusServiceUnavailable{}
|
|
}
|
|
|
|
/*
|
|
GetVehicleecusServiceUnavailable describes a response with status code 503, with default header values.
|
|
|
|
Service unavailable
|
|
*/
|
|
type GetVehicleecusServiceUnavailable struct {
|
|
Payload *models.CommonJSONError
|
|
}
|
|
|
|
// IsSuccess returns true when this get vehicleecus service unavailable response has a 2xx status code
|
|
func (o *GetVehicleecusServiceUnavailable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get vehicleecus service unavailable response has a 3xx status code
|
|
func (o *GetVehicleecusServiceUnavailable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get vehicleecus service unavailable response has a 4xx status code
|
|
func (o *GetVehicleecusServiceUnavailable) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get vehicleecus service unavailable response has a 5xx status code
|
|
func (o *GetVehicleecusServiceUnavailable) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get vehicleecus service unavailable response a status code equal to that given
|
|
func (o *GetVehicleecusServiceUnavailable) IsCode(code int) bool {
|
|
return code == 503
|
|
}
|
|
|
|
// Code gets the status code for the get vehicleecus service unavailable response
|
|
func (o *GetVehicleecusServiceUnavailable) Code() int {
|
|
return 503
|
|
}
|
|
|
|
func (o *GetVehicleecusServiceUnavailable) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusServiceUnavailable %s", 503, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusServiceUnavailable) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /vehicleecus][%d] getVehicleecusServiceUnavailable %s", 503, payload)
|
|
}
|
|
|
|
func (o *GetVehicleecusServiceUnavailable) GetPayload() *models.CommonJSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetVehicleecusServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.CommonJSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|