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

package p_cloud_images

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

// PcloudCloudinstancesImagesPostReader is a Reader for the PcloudCloudinstancesImagesPost structure.
type PcloudCloudinstancesImagesPostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudCloudinstancesImagesPostOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 201:
		result := NewPcloudCloudinstancesImagesPostCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudCloudinstancesImagesPostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudCloudinstancesImagesPostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudCloudinstancesImagesPostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudCloudinstancesImagesPostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudCloudinstancesImagesPostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPcloudCloudinstancesImagesPostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudCloudinstancesImagesPostInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images] pcloud.cloudinstances.images.post", response, response.Code())
	}
}

// NewPcloudCloudinstancesImagesPostOK creates a PcloudCloudinstancesImagesPostOK with default headers values
func NewPcloudCloudinstancesImagesPostOK() *PcloudCloudinstancesImagesPostOK {
	return &PcloudCloudinstancesImagesPostOK{}
}

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

OK
*/
type PcloudCloudinstancesImagesPostOK struct {
	Payload *models.Image
}

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

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

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

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

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

// Code gets the status code for the pcloud cloudinstances images post o k response
func (o *PcloudCloudinstancesImagesPostOK) Code() int {
	return 200
}

func (o *PcloudCloudinstancesImagesPostOK) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK  %+v", 200, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostOK) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK  %+v", 200, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostOK) GetPayload() *models.Image {
	return o.Payload
}

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

	o.Payload = new(models.Image)

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

	return nil
}

// NewPcloudCloudinstancesImagesPostCreated creates a PcloudCloudinstancesImagesPostCreated with default headers values
func NewPcloudCloudinstancesImagesPostCreated() *PcloudCloudinstancesImagesPostCreated {
	return &PcloudCloudinstancesImagesPostCreated{}
}

/*
PcloudCloudinstancesImagesPostCreated describes a response with status code 201, with default header values.

Created
*/
type PcloudCloudinstancesImagesPostCreated struct {
	Payload *models.Image
}

// IsSuccess returns true when this pcloud cloudinstances images post created response has a 2xx status code
func (o *PcloudCloudinstancesImagesPostCreated) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud cloudinstances images post created response has a 3xx status code
func (o *PcloudCloudinstancesImagesPostCreated) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances images post created response has a 4xx status code
func (o *PcloudCloudinstancesImagesPostCreated) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud cloudinstances images post created response has a 5xx status code
func (o *PcloudCloudinstancesImagesPostCreated) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud cloudinstances images post created response a status code equal to that given
func (o *PcloudCloudinstancesImagesPostCreated) IsCode(code int) bool {
	return code == 201
}

// Code gets the status code for the pcloud cloudinstances images post created response
func (o *PcloudCloudinstancesImagesPostCreated) Code() int {
	return 201
}

func (o *PcloudCloudinstancesImagesPostCreated) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated  %+v", 201, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostCreated) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated  %+v", 201, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostCreated) GetPayload() *models.Image {
	return o.Payload
}

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

	o.Payload = new(models.Image)

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

	return nil
}

// NewPcloudCloudinstancesImagesPostBadRequest creates a PcloudCloudinstancesImagesPostBadRequest with default headers values
func NewPcloudCloudinstancesImagesPostBadRequest() *PcloudCloudinstancesImagesPostBadRequest {
	return &PcloudCloudinstancesImagesPostBadRequest{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud cloudinstances images post bad request response
func (o *PcloudCloudinstancesImagesPostBadRequest) Code() int {
	return 400
}

func (o *PcloudCloudinstancesImagesPostBadRequest) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostBadRequest) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudCloudinstancesImagesPostUnauthorized creates a PcloudCloudinstancesImagesPostUnauthorized with default headers values
func NewPcloudCloudinstancesImagesPostUnauthorized() *PcloudCloudinstancesImagesPostUnauthorized {
	return &PcloudCloudinstancesImagesPostUnauthorized{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud cloudinstances images post unauthorized response
func (o *PcloudCloudinstancesImagesPostUnauthorized) Code() int {
	return 401
}

func (o *PcloudCloudinstancesImagesPostUnauthorized) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostUnauthorized) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudCloudinstancesImagesPostForbidden creates a PcloudCloudinstancesImagesPostForbidden with default headers values
func NewPcloudCloudinstancesImagesPostForbidden() *PcloudCloudinstancesImagesPostForbidden {
	return &PcloudCloudinstancesImagesPostForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud cloudinstances images post forbidden response
func (o *PcloudCloudinstancesImagesPostForbidden) Code() int {
	return 403
}

func (o *PcloudCloudinstancesImagesPostForbidden) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden  %+v", 403, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostForbidden) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudCloudinstancesImagesPostNotFound creates a PcloudCloudinstancesImagesPostNotFound with default headers values
func NewPcloudCloudinstancesImagesPostNotFound() *PcloudCloudinstancesImagesPostNotFound {
	return &PcloudCloudinstancesImagesPostNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud cloudinstances images post not found response
func (o *PcloudCloudinstancesImagesPostNotFound) Code() int {
	return 404
}

func (o *PcloudCloudinstancesImagesPostNotFound) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound  %+v", 404, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostNotFound) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudCloudinstancesImagesPostConflict creates a PcloudCloudinstancesImagesPostConflict with default headers values
func NewPcloudCloudinstancesImagesPostConflict() *PcloudCloudinstancesImagesPostConflict {
	return &PcloudCloudinstancesImagesPostConflict{}
}

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

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

// IsSuccess returns true when this pcloud cloudinstances images post conflict response has a 2xx status code
func (o *PcloudCloudinstancesImagesPostConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances images post conflict response has a 3xx status code
func (o *PcloudCloudinstancesImagesPostConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances images post conflict response has a 4xx status code
func (o *PcloudCloudinstancesImagesPostConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud cloudinstances images post conflict response has a 5xx status code
func (o *PcloudCloudinstancesImagesPostConflict) IsServerError() bool {
	return false
}

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

// Code gets the status code for the pcloud cloudinstances images post conflict response
func (o *PcloudCloudinstancesImagesPostConflict) Code() int {
	return 409
}

func (o *PcloudCloudinstancesImagesPostConflict) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict  %+v", 409, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostConflict) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict  %+v", 409, o.Payload)
}

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

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

// NewPcloudCloudinstancesImagesPostUnprocessableEntity creates a PcloudCloudinstancesImagesPostUnprocessableEntity with default headers values
func NewPcloudCloudinstancesImagesPostUnprocessableEntity() *PcloudCloudinstancesImagesPostUnprocessableEntity {
	return &PcloudCloudinstancesImagesPostUnprocessableEntity{}
}

/*
PcloudCloudinstancesImagesPostUnprocessableEntity describes a response with status code 422, with default header values.

Unprocessable Entity
*/
type PcloudCloudinstancesImagesPostUnprocessableEntity struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud cloudinstances images post unprocessable entity response has a 2xx status code
func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud cloudinstances images post unprocessable entity response has a 3xx status code
func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud cloudinstances images post unprocessable entity response has a 4xx status code
func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud cloudinstances images post unprocessable entity response has a 5xx status code
func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud cloudinstances images post unprocessable entity response a status code equal to that given
func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the pcloud cloudinstances images post unprocessable entity response
func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) Code() int {
	return 422
}

func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity  %+v", 422, o.Payload)
}

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

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

// NewPcloudCloudinstancesImagesPostInternalServerError creates a PcloudCloudinstancesImagesPostInternalServerError with default headers values
func NewPcloudCloudinstancesImagesPostInternalServerError() *PcloudCloudinstancesImagesPostInternalServerError {
	return &PcloudCloudinstancesImagesPostInternalServerError{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud cloudinstances images post internal server error response
func (o *PcloudCloudinstancesImagesPostInternalServerError) Code() int {
	return 500
}

func (o *PcloudCloudinstancesImagesPostInternalServerError) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudCloudinstancesImagesPostInternalServerError) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError  %+v", 500, o.Payload)
}

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

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