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

package p_cloud_shared_processor_pools

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

// PcloudSharedprocessorpoolsDeleteReader is a Reader for the PcloudSharedprocessorpoolsDelete structure.
type PcloudSharedprocessorpoolsDeleteReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudSharedprocessorpoolsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudSharedprocessorpoolsDeleteOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudSharedprocessorpoolsDeleteBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudSharedprocessorpoolsDeleteUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudSharedprocessorpoolsDeleteForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudSharedprocessorpoolsDeleteNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudSharedprocessorpoolsDeleteConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudSharedprocessorpoolsDeleteInternalServerError()
		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}/shared-processor-pools/{shared_processor_pool_id}] pcloud.sharedprocessorpools.delete", response, response.Code())
	}
}

// NewPcloudSharedprocessorpoolsDeleteOK creates a PcloudSharedprocessorpoolsDeleteOK with default headers values
func NewPcloudSharedprocessorpoolsDeleteOK() *PcloudSharedprocessorpoolsDeleteOK {
	return &PcloudSharedprocessorpoolsDeleteOK{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteOK) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK  %+v", 200, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteOK) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK  %+v", 200, o.Payload)
}

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

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

// NewPcloudSharedprocessorpoolsDeleteBadRequest creates a PcloudSharedprocessorpoolsDeleteBadRequest with default headers values
func NewPcloudSharedprocessorpoolsDeleteBadRequest() *PcloudSharedprocessorpoolsDeleteBadRequest {
	return &PcloudSharedprocessorpoolsDeleteBadRequest{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteBadRequest) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudSharedprocessorpoolsDeleteUnauthorized creates a PcloudSharedprocessorpoolsDeleteUnauthorized with default headers values
func NewPcloudSharedprocessorpoolsDeleteUnauthorized() *PcloudSharedprocessorpoolsDeleteUnauthorized {
	return &PcloudSharedprocessorpoolsDeleteUnauthorized{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudSharedprocessorpoolsDeleteForbidden creates a PcloudSharedprocessorpoolsDeleteForbidden with default headers values
func NewPcloudSharedprocessorpoolsDeleteForbidden() *PcloudSharedprocessorpoolsDeleteForbidden {
	return &PcloudSharedprocessorpoolsDeleteForbidden{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteForbidden) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden  %+v", 403, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteForbidden) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudSharedprocessorpoolsDeleteNotFound creates a PcloudSharedprocessorpoolsDeleteNotFound with default headers values
func NewPcloudSharedprocessorpoolsDeleteNotFound() *PcloudSharedprocessorpoolsDeleteNotFound {
	return &PcloudSharedprocessorpoolsDeleteNotFound{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteNotFound) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound  %+v", 404, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteNotFound) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudSharedprocessorpoolsDeleteConflict creates a PcloudSharedprocessorpoolsDeleteConflict with default headers values
func NewPcloudSharedprocessorpoolsDeleteConflict() *PcloudSharedprocessorpoolsDeleteConflict {
	return &PcloudSharedprocessorpoolsDeleteConflict{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteConflict) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict  %+v", 409, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteConflict) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict  %+v", 409, o.Payload)
}

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

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

// NewPcloudSharedprocessorpoolsDeleteInternalServerError creates a PcloudSharedprocessorpoolsDeleteInternalServerError with default headers values
func NewPcloudSharedprocessorpoolsDeleteInternalServerError() *PcloudSharedprocessorpoolsDeleteInternalServerError {
	return &PcloudSharedprocessorpoolsDeleteInternalServerError{}
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError  %+v", 500, o.Payload)
}

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

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