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

package p_cloud_disaster_recovery

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

// PcloudLocationsDisasterrecoveryGetallReader is a Reader for the PcloudLocationsDisasterrecoveryGetall structure.
type PcloudLocationsDisasterrecoveryGetallReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudLocationsDisasterrecoveryGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudLocationsDisasterrecoveryGetallOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudLocationsDisasterrecoveryGetallBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudLocationsDisasterrecoveryGetallUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudLocationsDisasterrecoveryGetallForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudLocationsDisasterrecoveryGetallNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudLocationsDisasterrecoveryGetallInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /pcloud/v1/locations/disaster-recovery] pcloud.locations.disasterrecovery.getall", response, response.Code())
	}
}

// NewPcloudLocationsDisasterrecoveryGetallOK creates a PcloudLocationsDisasterrecoveryGetallOK with default headers values
func NewPcloudLocationsDisasterrecoveryGetallOK() *PcloudLocationsDisasterrecoveryGetallOK {
	return &PcloudLocationsDisasterrecoveryGetallOK{}
}

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

OK
*/
type PcloudLocationsDisasterrecoveryGetallOK struct {
	Payload *models.DisasterRecoveryLocations
}

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

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

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

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

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

// Code gets the status code for the pcloud locations disasterrecovery getall o k response
func (o *PcloudLocationsDisasterrecoveryGetallOK) Code() int {
	return 200
}

func (o *PcloudLocationsDisasterrecoveryGetallOK) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK  %+v", 200, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallOK) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK  %+v", 200, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallOK) GetPayload() *models.DisasterRecoveryLocations {
	return o.Payload
}

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

	o.Payload = new(models.DisasterRecoveryLocations)

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

	return nil
}

// NewPcloudLocationsDisasterrecoveryGetallBadRequest creates a PcloudLocationsDisasterrecoveryGetallBadRequest with default headers values
func NewPcloudLocationsDisasterrecoveryGetallBadRequest() *PcloudLocationsDisasterrecoveryGetallBadRequest {
	return &PcloudLocationsDisasterrecoveryGetallBadRequest{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud locations disasterrecovery getall bad request response
func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) Code() int {
	return 400
}

func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudLocationsDisasterrecoveryGetallUnauthorized creates a PcloudLocationsDisasterrecoveryGetallUnauthorized with default headers values
func NewPcloudLocationsDisasterrecoveryGetallUnauthorized() *PcloudLocationsDisasterrecoveryGetallUnauthorized {
	return &PcloudLocationsDisasterrecoveryGetallUnauthorized{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud locations disasterrecovery getall unauthorized response
func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) Code() int {
	return 401
}

func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudLocationsDisasterrecoveryGetallForbidden creates a PcloudLocationsDisasterrecoveryGetallForbidden with default headers values
func NewPcloudLocationsDisasterrecoveryGetallForbidden() *PcloudLocationsDisasterrecoveryGetallForbidden {
	return &PcloudLocationsDisasterrecoveryGetallForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud locations disasterrecovery getall forbidden response
func (o *PcloudLocationsDisasterrecoveryGetallForbidden) Code() int {
	return 403
}

func (o *PcloudLocationsDisasterrecoveryGetallForbidden) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden  %+v", 403, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallForbidden) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudLocationsDisasterrecoveryGetallNotFound creates a PcloudLocationsDisasterrecoveryGetallNotFound with default headers values
func NewPcloudLocationsDisasterrecoveryGetallNotFound() *PcloudLocationsDisasterrecoveryGetallNotFound {
	return &PcloudLocationsDisasterrecoveryGetallNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud locations disasterrecovery getall not found response
func (o *PcloudLocationsDisasterrecoveryGetallNotFound) Code() int {
	return 404
}

func (o *PcloudLocationsDisasterrecoveryGetallNotFound) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound  %+v", 404, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallNotFound) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudLocationsDisasterrecoveryGetallInternalServerError creates a PcloudLocationsDisasterrecoveryGetallInternalServerError with default headers values
func NewPcloudLocationsDisasterrecoveryGetallInternalServerError() *PcloudLocationsDisasterrecoveryGetallInternalServerError {
	return &PcloudLocationsDisasterrecoveryGetallInternalServerError{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud locations disasterrecovery getall internal server error response
func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) Code() int {
	return 500
}

func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError  %+v", 500, o.Payload)
}

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

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