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

// PcloudSharedprocessorpoolsGetReader is a Reader for the PcloudSharedprocessorpoolsGet structure.
type PcloudSharedprocessorpoolsGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudSharedprocessorpoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudSharedprocessorpoolsGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudSharedprocessorpoolsGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudSharedprocessorpoolsGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudSharedprocessorpoolsGetForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudSharedprocessorpoolsGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudSharedprocessorpoolsGetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}] pcloud.sharedprocessorpools.get", response, response.Code())
	}
}

// NewPcloudSharedprocessorpoolsGetOK creates a PcloudSharedprocessorpoolsGetOK with default headers values
func NewPcloudSharedprocessorpoolsGetOK() *PcloudSharedprocessorpoolsGetOK {
	return &PcloudSharedprocessorpoolsGetOK{}
}

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

OK
*/
type PcloudSharedprocessorpoolsGetOK struct {
	Payload *models.SharedProcessorPoolDetail
}

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

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

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

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

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

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

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

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

func (o *PcloudSharedprocessorpoolsGetOK) GetPayload() *models.SharedProcessorPoolDetail {
	return o.Payload
}

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

	o.Payload = new(models.SharedProcessorPoolDetail)

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

	return nil
}

// NewPcloudSharedprocessorpoolsGetBadRequest creates a PcloudSharedprocessorpoolsGetBadRequest with default headers values
func NewPcloudSharedprocessorpoolsGetBadRequest() *PcloudSharedprocessorpoolsGetBadRequest {
	return &PcloudSharedprocessorpoolsGetBadRequest{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudSharedprocessorpoolsGetUnauthorized creates a PcloudSharedprocessorpoolsGetUnauthorized with default headers values
func NewPcloudSharedprocessorpoolsGetUnauthorized() *PcloudSharedprocessorpoolsGetUnauthorized {
	return &PcloudSharedprocessorpoolsGetUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudSharedprocessorpoolsGetForbidden creates a PcloudSharedprocessorpoolsGetForbidden with default headers values
func NewPcloudSharedprocessorpoolsGetForbidden() *PcloudSharedprocessorpoolsGetForbidden {
	return &PcloudSharedprocessorpoolsGetForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudSharedprocessorpoolsGetNotFound creates a PcloudSharedprocessorpoolsGetNotFound with default headers values
func NewPcloudSharedprocessorpoolsGetNotFound() *PcloudSharedprocessorpoolsGetNotFound {
	return &PcloudSharedprocessorpoolsGetNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudSharedprocessorpoolsGetInternalServerError creates a PcloudSharedprocessorpoolsGetInternalServerError with default headers values
func NewPcloudSharedprocessorpoolsGetInternalServerError() *PcloudSharedprocessorpoolsGetInternalServerError {
	return &PcloudSharedprocessorpoolsGetInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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