// Code generated by go-swagger; DO NOT EDIT.

package datasources

// 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/grafana/grafana-openapi-client-go/models"
)

// DatasourceProxyDELETEByUIDcallsReader is a Reader for the DatasourceProxyDELETEByUIDcalls structure.
type DatasourceProxyDELETEByUIDcallsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DatasourceProxyDELETEByUIDcallsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 202:
		result := NewDatasourceProxyDELETEByUIDcallsAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewDatasourceProxyDELETEByUIDcallsBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewDatasourceProxyDELETEByUIDcallsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDatasourceProxyDELETEByUIDcallsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDatasourceProxyDELETEByUIDcallsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewDatasourceProxyDELETEByUIDcallsInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}] datasourceProxyDELETEByUIDcalls", response, response.Code())
	}
}

// NewDatasourceProxyDELETEByUIDcallsAccepted creates a DatasourceProxyDELETEByUIDcallsAccepted with default headers values
func NewDatasourceProxyDELETEByUIDcallsAccepted() *DatasourceProxyDELETEByUIDcallsAccepted {
	return &DatasourceProxyDELETEByUIDcallsAccepted{}
}

/*
DatasourceProxyDELETEByUIDcallsAccepted describes a response with status code 202, with default header values.

(empty)
*/
type DatasourceProxyDELETEByUIDcallsAccepted struct {
}

// IsSuccess returns true when this datasource proxy d e l e t e by Ui dcalls accepted response has a 2xx status code
func (o *DatasourceProxyDELETEByUIDcallsAccepted) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this datasource proxy d e l e t e by Ui dcalls accepted response has a 3xx status code
func (o *DatasourceProxyDELETEByUIDcallsAccepted) IsRedirect() bool {
	return false
}

// IsClientError returns true when this datasource proxy d e l e t e by Ui dcalls accepted response has a 4xx status code
func (o *DatasourceProxyDELETEByUIDcallsAccepted) IsClientError() bool {
	return false
}

// IsServerError returns true when this datasource proxy d e l e t e by Ui dcalls accepted response has a 5xx status code
func (o *DatasourceProxyDELETEByUIDcallsAccepted) IsServerError() bool {
	return false
}

// IsCode returns true when this datasource proxy d e l e t e by Ui dcalls accepted response a status code equal to that given
func (o *DatasourceProxyDELETEByUIDcallsAccepted) IsCode(code int) bool {
	return code == 202
}

// Code gets the status code for the datasource proxy d e l e t e by Ui dcalls accepted response
func (o *DatasourceProxyDELETEByUIDcallsAccepted) Code() int {
	return 202
}

func (o *DatasourceProxyDELETEByUIDcallsAccepted) Error() string {
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsAccepted", 202)
}

func (o *DatasourceProxyDELETEByUIDcallsAccepted) String() string {
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsAccepted", 202)
}

func (o *DatasourceProxyDELETEByUIDcallsAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewDatasourceProxyDELETEByUIDcallsBadRequest creates a DatasourceProxyDELETEByUIDcallsBadRequest with default headers values
func NewDatasourceProxyDELETEByUIDcallsBadRequest() *DatasourceProxyDELETEByUIDcallsBadRequest {
	return &DatasourceProxyDELETEByUIDcallsBadRequest{}
}

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

BadRequestError is returned when the request is invalid and it cannot be processed.
*/
type DatasourceProxyDELETEByUIDcallsBadRequest struct {
	Payload *models.ErrorResponseBody
}

// IsSuccess returns true when this datasource proxy d e l e t e by Ui dcalls bad request response has a 2xx status code
func (o *DatasourceProxyDELETEByUIDcallsBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this datasource proxy d e l e t e by Ui dcalls bad request response has a 3xx status code
func (o *DatasourceProxyDELETEByUIDcallsBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this datasource proxy d e l e t e by Ui dcalls bad request response has a 4xx status code
func (o *DatasourceProxyDELETEByUIDcallsBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this datasource proxy d e l e t e by Ui dcalls bad request response has a 5xx status code
func (o *DatasourceProxyDELETEByUIDcallsBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this datasource proxy d e l e t e by Ui dcalls bad request response a status code equal to that given
func (o *DatasourceProxyDELETEByUIDcallsBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the datasource proxy d e l e t e by Ui dcalls bad request response
func (o *DatasourceProxyDELETEByUIDcallsBadRequest) Code() int {
	return 400
}

func (o *DatasourceProxyDELETEByUIDcallsBadRequest) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsBadRequest %s", 400, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsBadRequest) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsBadRequest %s", 400, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsBadRequest) GetPayload() *models.ErrorResponseBody {
	return o.Payload
}

func (o *DatasourceProxyDELETEByUIDcallsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorResponseBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewDatasourceProxyDELETEByUIDcallsUnauthorized creates a DatasourceProxyDELETEByUIDcallsUnauthorized with default headers values
func NewDatasourceProxyDELETEByUIDcallsUnauthorized() *DatasourceProxyDELETEByUIDcallsUnauthorized {
	return &DatasourceProxyDELETEByUIDcallsUnauthorized{}
}

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

UnauthorizedError is returned when the request is not authenticated.
*/
type DatasourceProxyDELETEByUIDcallsUnauthorized struct {
	Payload *models.ErrorResponseBody
}

// IsSuccess returns true when this datasource proxy d e l e t e by Ui dcalls unauthorized response has a 2xx status code
func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this datasource proxy d e l e t e by Ui dcalls unauthorized response has a 3xx status code
func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this datasource proxy d e l e t e by Ui dcalls unauthorized response has a 4xx status code
func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this datasource proxy d e l e t e by Ui dcalls unauthorized response has a 5xx status code
func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this datasource proxy d e l e t e by Ui dcalls unauthorized response a status code equal to that given
func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the datasource proxy d e l e t e by Ui dcalls unauthorized response
func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) Code() int {
	return 401
}

func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsUnauthorized %s", 401, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsUnauthorized %s", 401, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) GetPayload() *models.ErrorResponseBody {
	return o.Payload
}

func (o *DatasourceProxyDELETEByUIDcallsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorResponseBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewDatasourceProxyDELETEByUIDcallsForbidden creates a DatasourceProxyDELETEByUIDcallsForbidden with default headers values
func NewDatasourceProxyDELETEByUIDcallsForbidden() *DatasourceProxyDELETEByUIDcallsForbidden {
	return &DatasourceProxyDELETEByUIDcallsForbidden{}
}

/*
DatasourceProxyDELETEByUIDcallsForbidden describes a response with status code 403, with default header values.

ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
*/
type DatasourceProxyDELETEByUIDcallsForbidden struct {
	Payload *models.ErrorResponseBody
}

// IsSuccess returns true when this datasource proxy d e l e t e by Ui dcalls forbidden response has a 2xx status code
func (o *DatasourceProxyDELETEByUIDcallsForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this datasource proxy d e l e t e by Ui dcalls forbidden response has a 3xx status code
func (o *DatasourceProxyDELETEByUIDcallsForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this datasource proxy d e l e t e by Ui dcalls forbidden response has a 4xx status code
func (o *DatasourceProxyDELETEByUIDcallsForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this datasource proxy d e l e t e by Ui dcalls forbidden response has a 5xx status code
func (o *DatasourceProxyDELETEByUIDcallsForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this datasource proxy d e l e t e by Ui dcalls forbidden response a status code equal to that given
func (o *DatasourceProxyDELETEByUIDcallsForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the datasource proxy d e l e t e by Ui dcalls forbidden response
func (o *DatasourceProxyDELETEByUIDcallsForbidden) Code() int {
	return 403
}

func (o *DatasourceProxyDELETEByUIDcallsForbidden) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsForbidden %s", 403, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsForbidden) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsForbidden %s", 403, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsForbidden) GetPayload() *models.ErrorResponseBody {
	return o.Payload
}

func (o *DatasourceProxyDELETEByUIDcallsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorResponseBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewDatasourceProxyDELETEByUIDcallsNotFound creates a DatasourceProxyDELETEByUIDcallsNotFound with default headers values
func NewDatasourceProxyDELETEByUIDcallsNotFound() *DatasourceProxyDELETEByUIDcallsNotFound {
	return &DatasourceProxyDELETEByUIDcallsNotFound{}
}

/*
DatasourceProxyDELETEByUIDcallsNotFound describes a response with status code 404, with default header values.

NotFoundError is returned when the requested resource was not found.
*/
type DatasourceProxyDELETEByUIDcallsNotFound struct {
	Payload *models.ErrorResponseBody
}

// IsSuccess returns true when this datasource proxy d e l e t e by Ui dcalls not found response has a 2xx status code
func (o *DatasourceProxyDELETEByUIDcallsNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this datasource proxy d e l e t e by Ui dcalls not found response has a 3xx status code
func (o *DatasourceProxyDELETEByUIDcallsNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this datasource proxy d e l e t e by Ui dcalls not found response has a 4xx status code
func (o *DatasourceProxyDELETEByUIDcallsNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this datasource proxy d e l e t e by Ui dcalls not found response has a 5xx status code
func (o *DatasourceProxyDELETEByUIDcallsNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this datasource proxy d e l e t e by Ui dcalls not found response a status code equal to that given
func (o *DatasourceProxyDELETEByUIDcallsNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the datasource proxy d e l e t e by Ui dcalls not found response
func (o *DatasourceProxyDELETEByUIDcallsNotFound) Code() int {
	return 404
}

func (o *DatasourceProxyDELETEByUIDcallsNotFound) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsNotFound %s", 404, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsNotFound) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsNotFound %s", 404, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsNotFound) GetPayload() *models.ErrorResponseBody {
	return o.Payload
}

func (o *DatasourceProxyDELETEByUIDcallsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorResponseBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewDatasourceProxyDELETEByUIDcallsInternalServerError creates a DatasourceProxyDELETEByUIDcallsInternalServerError with default headers values
func NewDatasourceProxyDELETEByUIDcallsInternalServerError() *DatasourceProxyDELETEByUIDcallsInternalServerError {
	return &DatasourceProxyDELETEByUIDcallsInternalServerError{}
}

/*
DatasourceProxyDELETEByUIDcallsInternalServerError describes a response with status code 500, with default header values.

InternalServerError is a general error indicating something went wrong internally.
*/
type DatasourceProxyDELETEByUIDcallsInternalServerError struct {
	Payload *models.ErrorResponseBody
}

// IsSuccess returns true when this datasource proxy d e l e t e by Ui dcalls internal server error response has a 2xx status code
func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this datasource proxy d e l e t e by Ui dcalls internal server error response has a 3xx status code
func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this datasource proxy d e l e t e by Ui dcalls internal server error response has a 4xx status code
func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this datasource proxy d e l e t e by Ui dcalls internal server error response has a 5xx status code
func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this datasource proxy d e l e t e by Ui dcalls internal server error response a status code equal to that given
func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the datasource proxy d e l e t e by Ui dcalls internal server error response
func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) Code() int {
	return 500
}

func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsInternalServerError %s", 500, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route}][%d] datasourceProxyDELETEByUiDcallsInternalServerError %s", 500, payload)
}

func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) GetPayload() *models.ErrorResponseBody {
	return o.Payload
}

func (o *DatasourceProxyDELETEByUIDcallsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorResponseBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}
