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

// PcloudV2VolumescloneDeleteReader is a Reader for the PcloudV2VolumescloneDelete structure.
type PcloudV2VolumescloneDeleteReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudV2VolumescloneDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudV2VolumescloneDeleteOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudV2VolumescloneDeleteBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudV2VolumescloneDeleteUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudV2VolumescloneDeleteForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudV2VolumescloneDeleteNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudV2VolumescloneDeleteInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}] pcloud.v2.volumesclone.delete", response, response.Code())
	}
}

// NewPcloudV2VolumescloneDeleteOK creates a PcloudV2VolumescloneDeleteOK with default headers values
func NewPcloudV2VolumescloneDeleteOK() *PcloudV2VolumescloneDeleteOK {
	return &PcloudV2VolumescloneDeleteOK{}
}

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

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

// IsSuccess returns true when this pcloud v2 volumesclone delete o k response has a 2xx status code
func (o *PcloudV2VolumescloneDeleteOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud v2 volumesclone delete o k response has a 3xx status code
func (o *PcloudV2VolumescloneDeleteOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud v2 volumesclone delete o k response has a 4xx status code
func (o *PcloudV2VolumescloneDeleteOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud v2 volumesclone delete o k response has a 5xx status code
func (o *PcloudV2VolumescloneDeleteOK) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud v2 volumesclone delete o k response a status code equal to that given
func (o *PcloudV2VolumescloneDeleteOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the pcloud v2 volumesclone delete o k response
func (o *PcloudV2VolumescloneDeleteOK) Code() int {
	return 200
}

func (o *PcloudV2VolumescloneDeleteOK) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK  %+v", 200, o.Payload)
}

func (o *PcloudV2VolumescloneDeleteOK) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK  %+v", 200, o.Payload)
}

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

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

// NewPcloudV2VolumescloneDeleteBadRequest creates a PcloudV2VolumescloneDeleteBadRequest with default headers values
func NewPcloudV2VolumescloneDeleteBadRequest() *PcloudV2VolumescloneDeleteBadRequest {
	return &PcloudV2VolumescloneDeleteBadRequest{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 volumesclone delete bad request response
func (o *PcloudV2VolumescloneDeleteBadRequest) Code() int {
	return 400
}

func (o *PcloudV2VolumescloneDeleteBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudV2VolumescloneDeleteBadRequest) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudV2VolumescloneDeleteUnauthorized creates a PcloudV2VolumescloneDeleteUnauthorized with default headers values
func NewPcloudV2VolumescloneDeleteUnauthorized() *PcloudV2VolumescloneDeleteUnauthorized {
	return &PcloudV2VolumescloneDeleteUnauthorized{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 volumesclone delete unauthorized response
func (o *PcloudV2VolumescloneDeleteUnauthorized) Code() int {
	return 401
}

func (o *PcloudV2VolumescloneDeleteUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudV2VolumescloneDeleteUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudV2VolumescloneDeleteForbidden creates a PcloudV2VolumescloneDeleteForbidden with default headers values
func NewPcloudV2VolumescloneDeleteForbidden() *PcloudV2VolumescloneDeleteForbidden {
	return &PcloudV2VolumescloneDeleteForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 volumesclone delete forbidden response
func (o *PcloudV2VolumescloneDeleteForbidden) Code() int {
	return 403
}

func (o *PcloudV2VolumescloneDeleteForbidden) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden  %+v", 403, o.Payload)
}

func (o *PcloudV2VolumescloneDeleteForbidden) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudV2VolumescloneDeleteNotFound creates a PcloudV2VolumescloneDeleteNotFound with default headers values
func NewPcloudV2VolumescloneDeleteNotFound() *PcloudV2VolumescloneDeleteNotFound {
	return &PcloudV2VolumescloneDeleteNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 volumesclone delete not found response
func (o *PcloudV2VolumescloneDeleteNotFound) Code() int {
	return 404
}

func (o *PcloudV2VolumescloneDeleteNotFound) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound  %+v", 404, o.Payload)
}

func (o *PcloudV2VolumescloneDeleteNotFound) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudV2VolumescloneDeleteInternalServerError creates a PcloudV2VolumescloneDeleteInternalServerError with default headers values
func NewPcloudV2VolumescloneDeleteInternalServerError() *PcloudV2VolumescloneDeleteInternalServerError {
	return &PcloudV2VolumescloneDeleteInternalServerError{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 volumesclone delete internal server error response
func (o *PcloudV2VolumescloneDeleteInternalServerError) Code() int {
	return 500
}

func (o *PcloudV2VolumescloneDeleteInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudV2VolumescloneDeleteInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError  %+v", 500, o.Payload)
}

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

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