Files
cloud-services/pkg/ota_api/client/operations/delete_vehiclecommand_immobilize_responses.go

335 lines
12 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"
)
// DeleteVehiclecommandImmobilizeReader is a Reader for the DeleteVehiclecommandImmobilize structure.
type DeleteVehiclecommandImmobilizeReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteVehiclecommandImmobilizeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteVehiclecommandImmobilizeOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewDeleteVehiclecommandImmobilizeBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewDeleteVehiclecommandImmobilizeUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 503:
result := NewDeleteVehiclecommandImmobilizeServiceUnavailable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[DELETE /vehiclecommand/immobilize] DeleteVehiclecommandImmobilize", response, response.Code())
}
}
// NewDeleteVehiclecommandImmobilizeOK creates a DeleteVehiclecommandImmobilizeOK with default headers values
func NewDeleteVehiclecommandImmobilizeOK() *DeleteVehiclecommandImmobilizeOK {
return &DeleteVehiclecommandImmobilizeOK{}
}
/*
DeleteVehiclecommandImmobilizeOK describes a response with status code 200, with default header values.
OK
*/
type DeleteVehiclecommandImmobilizeOK struct {
Payload *models.CommonJSONMessage
}
// IsSuccess returns true when this delete vehiclecommand immobilize o k response has a 2xx status code
func (o *DeleteVehiclecommandImmobilizeOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this delete vehiclecommand immobilize o k response has a 3xx status code
func (o *DeleteVehiclecommandImmobilizeOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete vehiclecommand immobilize o k response has a 4xx status code
func (o *DeleteVehiclecommandImmobilizeOK) IsClientError() bool {
return false
}
// IsServerError returns true when this delete vehiclecommand immobilize o k response has a 5xx status code
func (o *DeleteVehiclecommandImmobilizeOK) IsServerError() bool {
return false
}
// IsCode returns true when this delete vehiclecommand immobilize o k response a status code equal to that given
func (o *DeleteVehiclecommandImmobilizeOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the delete vehiclecommand immobilize o k response
func (o *DeleteVehiclecommandImmobilizeOK) Code() int {
return 200
}
func (o *DeleteVehiclecommandImmobilizeOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeOK %s", 200, payload)
}
func (o *DeleteVehiclecommandImmobilizeOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeOK %s", 200, payload)
}
func (o *DeleteVehiclecommandImmobilizeOK) GetPayload() *models.CommonJSONMessage {
return o.Payload
}
func (o *DeleteVehiclecommandImmobilizeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.CommonJSONMessage)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteVehiclecommandImmobilizeBadRequest creates a DeleteVehiclecommandImmobilizeBadRequest with default headers values
func NewDeleteVehiclecommandImmobilizeBadRequest() *DeleteVehiclecommandImmobilizeBadRequest {
return &DeleteVehiclecommandImmobilizeBadRequest{}
}
/*
DeleteVehiclecommandImmobilizeBadRequest describes a response with status code 400, with default header values.
Bad request
*/
type DeleteVehiclecommandImmobilizeBadRequest struct {
Payload *models.CommonJSONError
}
// IsSuccess returns true when this delete vehiclecommand immobilize bad request response has a 2xx status code
func (o *DeleteVehiclecommandImmobilizeBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete vehiclecommand immobilize bad request response has a 3xx status code
func (o *DeleteVehiclecommandImmobilizeBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete vehiclecommand immobilize bad request response has a 4xx status code
func (o *DeleteVehiclecommandImmobilizeBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this delete vehiclecommand immobilize bad request response has a 5xx status code
func (o *DeleteVehiclecommandImmobilizeBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this delete vehiclecommand immobilize bad request response a status code equal to that given
func (o *DeleteVehiclecommandImmobilizeBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the delete vehiclecommand immobilize bad request response
func (o *DeleteVehiclecommandImmobilizeBadRequest) Code() int {
return 400
}
func (o *DeleteVehiclecommandImmobilizeBadRequest) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeBadRequest %s", 400, payload)
}
func (o *DeleteVehiclecommandImmobilizeBadRequest) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeBadRequest %s", 400, payload)
}
func (o *DeleteVehiclecommandImmobilizeBadRequest) GetPayload() *models.CommonJSONError {
return o.Payload
}
func (o *DeleteVehiclecommandImmobilizeBadRequest) 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
}
// NewDeleteVehiclecommandImmobilizeUnauthorized creates a DeleteVehiclecommandImmobilizeUnauthorized with default headers values
func NewDeleteVehiclecommandImmobilizeUnauthorized() *DeleteVehiclecommandImmobilizeUnauthorized {
return &DeleteVehiclecommandImmobilizeUnauthorized{}
}
/*
DeleteVehiclecommandImmobilizeUnauthorized describes a response with status code 401, with default header values.
Unauthorized
*/
type DeleteVehiclecommandImmobilizeUnauthorized struct {
Payload *models.CommonJSONError
}
// IsSuccess returns true when this delete vehiclecommand immobilize unauthorized response has a 2xx status code
func (o *DeleteVehiclecommandImmobilizeUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete vehiclecommand immobilize unauthorized response has a 3xx status code
func (o *DeleteVehiclecommandImmobilizeUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete vehiclecommand immobilize unauthorized response has a 4xx status code
func (o *DeleteVehiclecommandImmobilizeUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this delete vehiclecommand immobilize unauthorized response has a 5xx status code
func (o *DeleteVehiclecommandImmobilizeUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this delete vehiclecommand immobilize unauthorized response a status code equal to that given
func (o *DeleteVehiclecommandImmobilizeUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the delete vehiclecommand immobilize unauthorized response
func (o *DeleteVehiclecommandImmobilizeUnauthorized) Code() int {
return 401
}
func (o *DeleteVehiclecommandImmobilizeUnauthorized) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeUnauthorized %s", 401, payload)
}
func (o *DeleteVehiclecommandImmobilizeUnauthorized) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeUnauthorized %s", 401, payload)
}
func (o *DeleteVehiclecommandImmobilizeUnauthorized) GetPayload() *models.CommonJSONError {
return o.Payload
}
func (o *DeleteVehiclecommandImmobilizeUnauthorized) 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
}
// NewDeleteVehiclecommandImmobilizeServiceUnavailable creates a DeleteVehiclecommandImmobilizeServiceUnavailable with default headers values
func NewDeleteVehiclecommandImmobilizeServiceUnavailable() *DeleteVehiclecommandImmobilizeServiceUnavailable {
return &DeleteVehiclecommandImmobilizeServiceUnavailable{}
}
/*
DeleteVehiclecommandImmobilizeServiceUnavailable describes a response with status code 503, with default header values.
Service unavailable
*/
type DeleteVehiclecommandImmobilizeServiceUnavailable struct {
Payload *models.CommonJSONError
}
// IsSuccess returns true when this delete vehiclecommand immobilize service unavailable response has a 2xx status code
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete vehiclecommand immobilize service unavailable response has a 3xx status code
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete vehiclecommand immobilize service unavailable response has a 4xx status code
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) IsClientError() bool {
return false
}
// IsServerError returns true when this delete vehiclecommand immobilize service unavailable response has a 5xx status code
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) IsServerError() bool {
return true
}
// IsCode returns true when this delete vehiclecommand immobilize service unavailable response a status code equal to that given
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) IsCode(code int) bool {
return code == 503
}
// Code gets the status code for the delete vehiclecommand immobilize service unavailable response
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) Code() int {
return 503
}
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeServiceUnavailable %s", 503, payload)
}
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[DELETE /vehiclecommand/immobilize][%d] deleteVehiclecommandImmobilizeServiceUnavailable %s", 503, payload)
}
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) GetPayload() *models.CommonJSONError {
return o.Payload
}
func (o *DeleteVehiclecommandImmobilizeServiceUnavailable) 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
}