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

package dashboards

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

// HardDeleteDashboardByUIDReader is a Reader for the HardDeleteDashboardByUID structure.
type HardDeleteDashboardByUIDReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *HardDeleteDashboardByUIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewHardDeleteDashboardByUIDOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewHardDeleteDashboardByUIDUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewHardDeleteDashboardByUIDForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewHardDeleteDashboardByUIDNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewHardDeleteDashboardByUIDInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /dashboards/uid/{uid}/trash] hardDeleteDashboardByUID", response, response.Code())
	}
}

// NewHardDeleteDashboardByUIDOK creates a HardDeleteDashboardByUIDOK with default headers values
func NewHardDeleteDashboardByUIDOK() *HardDeleteDashboardByUIDOK {
	return &HardDeleteDashboardByUIDOK{}
}

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

(empty)
*/
type HardDeleteDashboardByUIDOK struct {
	Payload *models.HardDeleteDashboardByUIDOKBody
}

// IsSuccess returns true when this hard delete dashboard by Uid Ok response has a 2xx status code
func (o *HardDeleteDashboardByUIDOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this hard delete dashboard by Uid Ok response has a 3xx status code
func (o *HardDeleteDashboardByUIDOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this hard delete dashboard by Uid Ok response has a 4xx status code
func (o *HardDeleteDashboardByUIDOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this hard delete dashboard by Uid Ok response has a 5xx status code
func (o *HardDeleteDashboardByUIDOK) IsServerError() bool {
	return false
}

// IsCode returns true when this hard delete dashboard by Uid Ok response a status code equal to that given
func (o *HardDeleteDashboardByUIDOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the hard delete dashboard by Uid Ok response
func (o *HardDeleteDashboardByUIDOK) Code() int {
	return 200
}

func (o *HardDeleteDashboardByUIDOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidOk %s", 200, payload)
}

func (o *HardDeleteDashboardByUIDOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidOk %s", 200, payload)
}

func (o *HardDeleteDashboardByUIDOK) GetPayload() *models.HardDeleteDashboardByUIDOKBody {
	return o.Payload
}

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

	o.Payload = new(models.HardDeleteDashboardByUIDOKBody)

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

	return nil
}

// NewHardDeleteDashboardByUIDUnauthorized creates a HardDeleteDashboardByUIDUnauthorized with default headers values
func NewHardDeleteDashboardByUIDUnauthorized() *HardDeleteDashboardByUIDUnauthorized {
	return &HardDeleteDashboardByUIDUnauthorized{}
}

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

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

// IsSuccess returns true when this hard delete dashboard by Uid unauthorized response has a 2xx status code
func (o *HardDeleteDashboardByUIDUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this hard delete dashboard by Uid unauthorized response has a 3xx status code
func (o *HardDeleteDashboardByUIDUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this hard delete dashboard by Uid unauthorized response has a 4xx status code
func (o *HardDeleteDashboardByUIDUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this hard delete dashboard by Uid unauthorized response has a 5xx status code
func (o *HardDeleteDashboardByUIDUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this hard delete dashboard by Uid unauthorized response a status code equal to that given
func (o *HardDeleteDashboardByUIDUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the hard delete dashboard by Uid unauthorized response
func (o *HardDeleteDashboardByUIDUnauthorized) Code() int {
	return 401
}

func (o *HardDeleteDashboardByUIDUnauthorized) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidUnauthorized %s", 401, payload)
}

func (o *HardDeleteDashboardByUIDUnauthorized) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidUnauthorized %s", 401, payload)
}

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

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

// NewHardDeleteDashboardByUIDForbidden creates a HardDeleteDashboardByUIDForbidden with default headers values
func NewHardDeleteDashboardByUIDForbidden() *HardDeleteDashboardByUIDForbidden {
	return &HardDeleteDashboardByUIDForbidden{}
}

/*
HardDeleteDashboardByUIDForbidden 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 HardDeleteDashboardByUIDForbidden struct {
	Payload *models.ErrorResponseBody
}

// IsSuccess returns true when this hard delete dashboard by Uid forbidden response has a 2xx status code
func (o *HardDeleteDashboardByUIDForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this hard delete dashboard by Uid forbidden response has a 3xx status code
func (o *HardDeleteDashboardByUIDForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this hard delete dashboard by Uid forbidden response has a 4xx status code
func (o *HardDeleteDashboardByUIDForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this hard delete dashboard by Uid forbidden response has a 5xx status code
func (o *HardDeleteDashboardByUIDForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this hard delete dashboard by Uid forbidden response a status code equal to that given
func (o *HardDeleteDashboardByUIDForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the hard delete dashboard by Uid forbidden response
func (o *HardDeleteDashboardByUIDForbidden) Code() int {
	return 403
}

func (o *HardDeleteDashboardByUIDForbidden) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidForbidden %s", 403, payload)
}

func (o *HardDeleteDashboardByUIDForbidden) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidForbidden %s", 403, payload)
}

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

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

// NewHardDeleteDashboardByUIDNotFound creates a HardDeleteDashboardByUIDNotFound with default headers values
func NewHardDeleteDashboardByUIDNotFound() *HardDeleteDashboardByUIDNotFound {
	return &HardDeleteDashboardByUIDNotFound{}
}

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

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

// IsSuccess returns true when this hard delete dashboard by Uid not found response has a 2xx status code
func (o *HardDeleteDashboardByUIDNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this hard delete dashboard by Uid not found response has a 3xx status code
func (o *HardDeleteDashboardByUIDNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this hard delete dashboard by Uid not found response has a 4xx status code
func (o *HardDeleteDashboardByUIDNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this hard delete dashboard by Uid not found response has a 5xx status code
func (o *HardDeleteDashboardByUIDNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this hard delete dashboard by Uid not found response a status code equal to that given
func (o *HardDeleteDashboardByUIDNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the hard delete dashboard by Uid not found response
func (o *HardDeleteDashboardByUIDNotFound) Code() int {
	return 404
}

func (o *HardDeleteDashboardByUIDNotFound) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidNotFound %s", 404, payload)
}

func (o *HardDeleteDashboardByUIDNotFound) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidNotFound %s", 404, payload)
}

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

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

// NewHardDeleteDashboardByUIDInternalServerError creates a HardDeleteDashboardByUIDInternalServerError with default headers values
func NewHardDeleteDashboardByUIDInternalServerError() *HardDeleteDashboardByUIDInternalServerError {
	return &HardDeleteDashboardByUIDInternalServerError{}
}

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

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

// IsSuccess returns true when this hard delete dashboard by Uid internal server error response has a 2xx status code
func (o *HardDeleteDashboardByUIDInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this hard delete dashboard by Uid internal server error response has a 3xx status code
func (o *HardDeleteDashboardByUIDInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this hard delete dashboard by Uid internal server error response has a 4xx status code
func (o *HardDeleteDashboardByUIDInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this hard delete dashboard by Uid internal server error response has a 5xx status code
func (o *HardDeleteDashboardByUIDInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this hard delete dashboard by Uid internal server error response a status code equal to that given
func (o *HardDeleteDashboardByUIDInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the hard delete dashboard by Uid internal server error response
func (o *HardDeleteDashboardByUIDInternalServerError) Code() int {
	return 500
}

func (o *HardDeleteDashboardByUIDInternalServerError) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidInternalServerError %s", 500, payload)
}

func (o *HardDeleteDashboardByUIDInternalServerError) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /dashboards/uid/{uid}/trash][%d] hardDeleteDashboardByUidInternalServerError %s", 500, payload)
}

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

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