// 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"
)

// DeleteVehicleVinFilterIDReader is a Reader for the DeleteVehicleVinFilterID structure.
type DeleteVehicleVinFilterIDReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteVehicleVinFilterIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewDeleteVehicleVinFilterIDOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewDeleteVehicleVinFilterIDBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewDeleteVehicleVinFilterIDUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 503:
		result := NewDeleteVehicleVinFilterIDServiceUnavailable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /vehicle/{vin}/filter/{id}] DeleteVehicleVinFilterID", response, response.Code())
	}
}

// NewDeleteVehicleVinFilterIDOK creates a DeleteVehicleVinFilterIDOK with default headers values
func NewDeleteVehicleVinFilterIDOK() *DeleteVehicleVinFilterIDOK {
	return &DeleteVehicleVinFilterIDOK{}
}

/*
DeleteVehicleVinFilterIDOK describes a response with status code 200, with default header values.

OK
*/
type DeleteVehicleVinFilterIDOK struct {
	Payload *models.CommonJSONMessage
}

// IsSuccess returns true when this delete vehicle vin filter Id o k response has a 2xx status code
func (o *DeleteVehicleVinFilterIDOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this delete vehicle vin filter Id o k response has a 3xx status code
func (o *DeleteVehicleVinFilterIDOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete vehicle vin filter Id o k response has a 4xx status code
func (o *DeleteVehicleVinFilterIDOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this delete vehicle vin filter Id o k response has a 5xx status code
func (o *DeleteVehicleVinFilterIDOK) IsServerError() bool {
	return false
}

// IsCode returns true when this delete vehicle vin filter Id o k response a status code equal to that given
func (o *DeleteVehicleVinFilterIDOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the delete vehicle vin filter Id o k response
func (o *DeleteVehicleVinFilterIDOK) Code() int {
	return 200
}

func (o *DeleteVehicleVinFilterIDOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdOK %s", 200, payload)
}

func (o *DeleteVehicleVinFilterIDOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdOK %s", 200, payload)
}

func (o *DeleteVehicleVinFilterIDOK) GetPayload() *models.CommonJSONMessage {
	return o.Payload
}

func (o *DeleteVehicleVinFilterIDOK) 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
}

// NewDeleteVehicleVinFilterIDBadRequest creates a DeleteVehicleVinFilterIDBadRequest with default headers values
func NewDeleteVehicleVinFilterIDBadRequest() *DeleteVehicleVinFilterIDBadRequest {
	return &DeleteVehicleVinFilterIDBadRequest{}
}

/*
DeleteVehicleVinFilterIDBadRequest describes a response with status code 400, with default header values.

Bad request
*/
type DeleteVehicleVinFilterIDBadRequest struct {
	Payload *models.CommonJSONError
}

// IsSuccess returns true when this delete vehicle vin filter Id bad request response has a 2xx status code
func (o *DeleteVehicleVinFilterIDBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this delete vehicle vin filter Id bad request response has a 3xx status code
func (o *DeleteVehicleVinFilterIDBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete vehicle vin filter Id bad request response has a 4xx status code
func (o *DeleteVehicleVinFilterIDBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this delete vehicle vin filter Id bad request response has a 5xx status code
func (o *DeleteVehicleVinFilterIDBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this delete vehicle vin filter Id bad request response a status code equal to that given
func (o *DeleteVehicleVinFilterIDBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the delete vehicle vin filter Id bad request response
func (o *DeleteVehicleVinFilterIDBadRequest) Code() int {
	return 400
}

func (o *DeleteVehicleVinFilterIDBadRequest) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdBadRequest %s", 400, payload)
}

func (o *DeleteVehicleVinFilterIDBadRequest) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdBadRequest %s", 400, payload)
}

func (o *DeleteVehicleVinFilterIDBadRequest) GetPayload() *models.CommonJSONError {
	return o.Payload
}

func (o *DeleteVehicleVinFilterIDBadRequest) 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
}

// NewDeleteVehicleVinFilterIDUnauthorized creates a DeleteVehicleVinFilterIDUnauthorized with default headers values
func NewDeleteVehicleVinFilterIDUnauthorized() *DeleteVehicleVinFilterIDUnauthorized {
	return &DeleteVehicleVinFilterIDUnauthorized{}
}

/*
DeleteVehicleVinFilterIDUnauthorized describes a response with status code 401, with default header values.

Unauthorized
*/
type DeleteVehicleVinFilterIDUnauthorized struct {
	Payload *models.CommonJSONError
}

// IsSuccess returns true when this delete vehicle vin filter Id unauthorized response has a 2xx status code
func (o *DeleteVehicleVinFilterIDUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this delete vehicle vin filter Id unauthorized response has a 3xx status code
func (o *DeleteVehicleVinFilterIDUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete vehicle vin filter Id unauthorized response has a 4xx status code
func (o *DeleteVehicleVinFilterIDUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this delete vehicle vin filter Id unauthorized response has a 5xx status code
func (o *DeleteVehicleVinFilterIDUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this delete vehicle vin filter Id unauthorized response a status code equal to that given
func (o *DeleteVehicleVinFilterIDUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the delete vehicle vin filter Id unauthorized response
func (o *DeleteVehicleVinFilterIDUnauthorized) Code() int {
	return 401
}

func (o *DeleteVehicleVinFilterIDUnauthorized) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdUnauthorized %s", 401, payload)
}

func (o *DeleteVehicleVinFilterIDUnauthorized) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdUnauthorized %s", 401, payload)
}

func (o *DeleteVehicleVinFilterIDUnauthorized) GetPayload() *models.CommonJSONError {
	return o.Payload
}

func (o *DeleteVehicleVinFilterIDUnauthorized) 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
}

// NewDeleteVehicleVinFilterIDServiceUnavailable creates a DeleteVehicleVinFilterIDServiceUnavailable with default headers values
func NewDeleteVehicleVinFilterIDServiceUnavailable() *DeleteVehicleVinFilterIDServiceUnavailable {
	return &DeleteVehicleVinFilterIDServiceUnavailable{}
}

/*
DeleteVehicleVinFilterIDServiceUnavailable describes a response with status code 503, with default header values.

Service unavailable
*/
type DeleteVehicleVinFilterIDServiceUnavailable struct {
	Payload *models.CommonJSONError
}

// IsSuccess returns true when this delete vehicle vin filter Id service unavailable response has a 2xx status code
func (o *DeleteVehicleVinFilterIDServiceUnavailable) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this delete vehicle vin filter Id service unavailable response has a 3xx status code
func (o *DeleteVehicleVinFilterIDServiceUnavailable) IsRedirect() bool {
	return false
}

// IsClientError returns true when this delete vehicle vin filter Id service unavailable response has a 4xx status code
func (o *DeleteVehicleVinFilterIDServiceUnavailable) IsClientError() bool {
	return false
}

// IsServerError returns true when this delete vehicle vin filter Id service unavailable response has a 5xx status code
func (o *DeleteVehicleVinFilterIDServiceUnavailable) IsServerError() bool {
	return true
}

// IsCode returns true when this delete vehicle vin filter Id service unavailable response a status code equal to that given
func (o *DeleteVehicleVinFilterIDServiceUnavailable) IsCode(code int) bool {
	return code == 503
}

// Code gets the status code for the delete vehicle vin filter Id service unavailable response
func (o *DeleteVehicleVinFilterIDServiceUnavailable) Code() int {
	return 503
}

func (o *DeleteVehicleVinFilterIDServiceUnavailable) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdServiceUnavailable %s", 503, payload)
}

func (o *DeleteVehicleVinFilterIDServiceUnavailable) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /vehicle/{vin}/filter/{id}][%d] deleteVehicleVinFilterIdServiceUnavailable %s", 503, payload)
}

func (o *DeleteVehicleVinFilterIDServiceUnavailable) GetPayload() *models.CommonJSONError {
	return o.Payload
}

func (o *DeleteVehicleVinFilterIDServiceUnavailable) 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
}
