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

package p_cloud_storage_tiers

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

// PcloudCloudinstancesStoragetiersGetallReader is a Reader for the PcloudCloudinstancesStoragetiersGetall structure.
type PcloudCloudinstancesStoragetiersGetallReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudCloudinstancesStoragetiersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudCloudinstancesStoragetiersGetallOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudCloudinstancesStoragetiersGetallBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudCloudinstancesStoragetiersGetallUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudCloudinstancesStoragetiersGetallForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudCloudinstancesStoragetiersGetallNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudCloudinstancesStoragetiersGetallInternalServerError()
		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}/storage-tiers] pcloud.cloudinstances.storagetiers.getall", response, response.Code())
	}
}

// NewPcloudCloudinstancesStoragetiersGetallOK creates a PcloudCloudinstancesStoragetiersGetallOK with default headers values
func NewPcloudCloudinstancesStoragetiersGetallOK() *PcloudCloudinstancesStoragetiersGetallOK {
	return &PcloudCloudinstancesStoragetiersGetallOK{}
}

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

OK
*/
type PcloudCloudinstancesStoragetiersGetallOK struct {
	Payload models.RegionStorageTiers
}

// IsSuccess returns true when this pcloud cloudinstances storagetiers getall o k response has a 2xx status code
func (o *PcloudCloudinstancesStoragetiersGetallOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud cloudinstances storagetiers getall o k response has a 3xx status code
func (o *PcloudCloudinstancesStoragetiersGetallOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances storagetiers getall o k response has a 4xx status code
func (o *PcloudCloudinstancesStoragetiersGetallOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud cloudinstances storagetiers getall o k response has a 5xx status code
func (o *PcloudCloudinstancesStoragetiersGetallOK) IsServerError() bool {
	return false
}

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

// Code gets the status code for the pcloud cloudinstances storagetiers getall o k response
func (o *PcloudCloudinstancesStoragetiersGetallOK) Code() int {
	return 200
}

func (o *PcloudCloudinstancesStoragetiersGetallOK) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK  %+v", 200, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallOK) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK  %+v", 200, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallOK) GetPayload() models.RegionStorageTiers {
	return o.Payload
}

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

// NewPcloudCloudinstancesStoragetiersGetallBadRequest creates a PcloudCloudinstancesStoragetiersGetallBadRequest with default headers values
func NewPcloudCloudinstancesStoragetiersGetallBadRequest() *PcloudCloudinstancesStoragetiersGetallBadRequest {
	return &PcloudCloudinstancesStoragetiersGetallBadRequest{}
}

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

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

// IsSuccess returns true when this pcloud cloudinstances storagetiers getall bad request response has a 2xx status code
func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances storagetiers getall bad request response has a 3xx status code
func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances storagetiers getall bad request response has a 4xx status code
func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud cloudinstances storagetiers getall bad request response has a 5xx status code
func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsServerError() bool {
	return false
}

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

// Code gets the status code for the pcloud cloudinstances storagetiers getall bad request response
func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) Code() int {
	return 400
}

func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudCloudinstancesStoragetiersGetallUnauthorized creates a PcloudCloudinstancesStoragetiersGetallUnauthorized with default headers values
func NewPcloudCloudinstancesStoragetiersGetallUnauthorized() *PcloudCloudinstancesStoragetiersGetallUnauthorized {
	return &PcloudCloudinstancesStoragetiersGetallUnauthorized{}
}

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

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

// IsSuccess returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 2xx status code
func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 3xx status code
func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 4xx status code
func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 5xx status code
func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsServerError() bool {
	return false
}

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

// Code gets the status code for the pcloud cloudinstances storagetiers getall unauthorized response
func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) Code() int {
	return 401
}

func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudCloudinstancesStoragetiersGetallForbidden creates a PcloudCloudinstancesStoragetiersGetallForbidden with default headers values
func NewPcloudCloudinstancesStoragetiersGetallForbidden() *PcloudCloudinstancesStoragetiersGetallForbidden {
	return &PcloudCloudinstancesStoragetiersGetallForbidden{}
}

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

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

// IsSuccess returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 2xx status code
func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 3xx status code
func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 4xx status code
func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 5xx status code
func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsServerError() bool {
	return false
}

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

// Code gets the status code for the pcloud cloudinstances storagetiers getall forbidden response
func (o *PcloudCloudinstancesStoragetiersGetallForbidden) Code() int {
	return 403
}

func (o *PcloudCloudinstancesStoragetiersGetallForbidden) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden  %+v", 403, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallForbidden) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudCloudinstancesStoragetiersGetallNotFound creates a PcloudCloudinstancesStoragetiersGetallNotFound with default headers values
func NewPcloudCloudinstancesStoragetiersGetallNotFound() *PcloudCloudinstancesStoragetiersGetallNotFound {
	return &PcloudCloudinstancesStoragetiersGetallNotFound{}
}

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

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

// IsSuccess returns true when this pcloud cloudinstances storagetiers getall not found response has a 2xx status code
func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances storagetiers getall not found response has a 3xx status code
func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances storagetiers getall not found response has a 4xx status code
func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud cloudinstances storagetiers getall not found response has a 5xx status code
func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsServerError() bool {
	return false
}

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

// Code gets the status code for the pcloud cloudinstances storagetiers getall not found response
func (o *PcloudCloudinstancesStoragetiersGetallNotFound) Code() int {
	return 404
}

func (o *PcloudCloudinstancesStoragetiersGetallNotFound) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound  %+v", 404, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallNotFound) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudCloudinstancesStoragetiersGetallInternalServerError creates a PcloudCloudinstancesStoragetiersGetallInternalServerError with default headers values
func NewPcloudCloudinstancesStoragetiersGetallInternalServerError() *PcloudCloudinstancesStoragetiersGetallInternalServerError {
	return &PcloudCloudinstancesStoragetiersGetallInternalServerError{}
}

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

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

// IsSuccess returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 2xx status code
func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 3xx status code
func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 4xx status code
func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 5xx status code
func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsServerError() bool {
	return true
}

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

// Code gets the status code for the pcloud cloudinstances storagetiers getall internal server error response
func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) Code() int {
	return 500
}

func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError  %+v", 500, o.Payload)
}

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

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