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

package p_cloud_volumes

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"

	"github.com/IBM-Cloud/power-go-client/power/models"
)

// PcloudPvminstancesVolumesDeleteReader is a Reader for the PcloudPvminstancesVolumesDelete structure.
type PcloudPvminstancesVolumesDeleteReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudPvminstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 202:
		result := NewPcloudPvminstancesVolumesDeleteAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudPvminstancesVolumesDeleteBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudPvminstancesVolumesDeleteUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudPvminstancesVolumesDeleteForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudPvminstancesVolumesDeleteNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudPvminstancesVolumesDeleteConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudPvminstancesVolumesDeleteInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}] pcloud.pvminstances.volumes.delete", response, response.Code())
	}
}

// NewPcloudPvminstancesVolumesDeleteAccepted creates a PcloudPvminstancesVolumesDeleteAccepted with default headers values
func NewPcloudPvminstancesVolumesDeleteAccepted() *PcloudPvminstancesVolumesDeleteAccepted {
	return &PcloudPvminstancesVolumesDeleteAccepted{}
}

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

OK
*/
type PcloudPvminstancesVolumesDeleteAccepted struct {
	Payload models.Object
}

// IsSuccess returns true when this pcloud pvminstances volumes delete accepted response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteAccepted) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud pvminstances volumes delete accepted response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteAccepted) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete accepted response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteAccepted) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud pvminstances volumes delete accepted response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteAccepted) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances volumes delete accepted response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteAccepted) IsCode(code int) bool {
	return code == 202
}

// Code gets the status code for the pcloud pvminstances volumes delete accepted response
func (o *PcloudPvminstancesVolumesDeleteAccepted) Code() int {
	return 202
}

func (o *PcloudPvminstancesVolumesDeleteAccepted) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted  %+v", 202, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteAccepted) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted  %+v", 202, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteAccepted) GetPayload() models.Object {
	return o.Payload
}

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

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

	return nil
}

// NewPcloudPvminstancesVolumesDeleteBadRequest creates a PcloudPvminstancesVolumesDeleteBadRequest with default headers values
func NewPcloudPvminstancesVolumesDeleteBadRequest() *PcloudPvminstancesVolumesDeleteBadRequest {
	return &PcloudPvminstancesVolumesDeleteBadRequest{}
}

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

Bad Request
*/
type PcloudPvminstancesVolumesDeleteBadRequest struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances volumes delete bad request response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances volumes delete bad request response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete bad request response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud pvminstances volumes delete bad request response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances volumes delete bad request response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the pcloud pvminstances volumes delete bad request response
func (o *PcloudPvminstancesVolumesDeleteBadRequest) Code() int {
	return 400
}

func (o *PcloudPvminstancesVolumesDeleteBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteBadRequest) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteBadRequest) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudPvminstancesVolumesDeleteUnauthorized creates a PcloudPvminstancesVolumesDeleteUnauthorized with default headers values
func NewPcloudPvminstancesVolumesDeleteUnauthorized() *PcloudPvminstancesVolumesDeleteUnauthorized {
	return &PcloudPvminstancesVolumesDeleteUnauthorized{}
}

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

Unauthorized
*/
type PcloudPvminstancesVolumesDeleteUnauthorized struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances volumes delete unauthorized response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances volumes delete unauthorized response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete unauthorized response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud pvminstances volumes delete unauthorized response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances volumes delete unauthorized response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the pcloud pvminstances volumes delete unauthorized response
func (o *PcloudPvminstancesVolumesDeleteUnauthorized) Code() int {
	return 401
}

func (o *PcloudPvminstancesVolumesDeleteUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteUnauthorized) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudPvminstancesVolumesDeleteForbidden creates a PcloudPvminstancesVolumesDeleteForbidden with default headers values
func NewPcloudPvminstancesVolumesDeleteForbidden() *PcloudPvminstancesVolumesDeleteForbidden {
	return &PcloudPvminstancesVolumesDeleteForbidden{}
}

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

Forbidden
*/
type PcloudPvminstancesVolumesDeleteForbidden struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances volumes delete forbidden response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances volumes delete forbidden response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete forbidden response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud pvminstances volumes delete forbidden response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances volumes delete forbidden response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the pcloud pvminstances volumes delete forbidden response
func (o *PcloudPvminstancesVolumesDeleteForbidden) Code() int {
	return 403
}

func (o *PcloudPvminstancesVolumesDeleteForbidden) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden  %+v", 403, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteForbidden) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden  %+v", 403, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteForbidden) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudPvminstancesVolumesDeleteNotFound creates a PcloudPvminstancesVolumesDeleteNotFound with default headers values
func NewPcloudPvminstancesVolumesDeleteNotFound() *PcloudPvminstancesVolumesDeleteNotFound {
	return &PcloudPvminstancesVolumesDeleteNotFound{}
}

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

Not Found
*/
type PcloudPvminstancesVolumesDeleteNotFound struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances volumes delete not found response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances volumes delete not found response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete not found response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud pvminstances volumes delete not found response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances volumes delete not found response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the pcloud pvminstances volumes delete not found response
func (o *PcloudPvminstancesVolumesDeleteNotFound) Code() int {
	return 404
}

func (o *PcloudPvminstancesVolumesDeleteNotFound) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound  %+v", 404, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteNotFound) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound  %+v", 404, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteNotFound) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudPvminstancesVolumesDeleteConflict creates a PcloudPvminstancesVolumesDeleteConflict with default headers values
func NewPcloudPvminstancesVolumesDeleteConflict() *PcloudPvminstancesVolumesDeleteConflict {
	return &PcloudPvminstancesVolumesDeleteConflict{}
}

/*
PcloudPvminstancesVolumesDeleteConflict describes a response with status code 409, with default header values.

Conflict
*/
type PcloudPvminstancesVolumesDeleteConflict struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances volumes delete conflict response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances volumes delete conflict response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete conflict response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud pvminstances volumes delete conflict response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances volumes delete conflict response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteConflict) IsCode(code int) bool {
	return code == 409
}

// Code gets the status code for the pcloud pvminstances volumes delete conflict response
func (o *PcloudPvminstancesVolumesDeleteConflict) Code() int {
	return 409
}

func (o *PcloudPvminstancesVolumesDeleteConflict) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict  %+v", 409, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteConflict) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict  %+v", 409, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteConflict) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudPvminstancesVolumesDeleteInternalServerError creates a PcloudPvminstancesVolumesDeleteInternalServerError with default headers values
func NewPcloudPvminstancesVolumesDeleteInternalServerError() *PcloudPvminstancesVolumesDeleteInternalServerError {
	return &PcloudPvminstancesVolumesDeleteInternalServerError{}
}

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

Internal Server Error
*/
type PcloudPvminstancesVolumesDeleteInternalServerError struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances volumes delete internal server error response has a 2xx status code
func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances volumes delete internal server error response has a 3xx status code
func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances volumes delete internal server error response has a 4xx status code
func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud pvminstances volumes delete internal server error response has a 5xx status code
func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this pcloud pvminstances volumes delete internal server error response a status code equal to that given
func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the pcloud pvminstances volumes delete internal server error response
func (o *PcloudPvminstancesVolumesDeleteInternalServerError) Code() int {
	return 500
}

func (o *PcloudPvminstancesVolumesDeleteInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudPvminstancesVolumesDeleteInternalServerError) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}
