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

package p_cloud_p_vm_instances

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

// PcloudPvminstancesPostReader is a Reader for the PcloudPvminstancesPost structure.
type PcloudPvminstancesPostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudPvminstancesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudPvminstancesPostOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 201:
		result := NewPcloudPvminstancesPostCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 202:
		result := NewPcloudPvminstancesPostAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudPvminstancesPostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudPvminstancesPostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudPvminstancesPostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudPvminstancesPostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudPvminstancesPostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPcloudPvminstancesPostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudPvminstancesPostInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 504:
		result := NewPcloudPvminstancesPostGatewayTimeout()
		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}/pvm-instances] pcloud.pvminstances.post", response, response.Code())
	}
}

// NewPcloudPvminstancesPostOK creates a PcloudPvminstancesPostOK with default headers values
func NewPcloudPvminstancesPostOK() *PcloudPvminstancesPostOK {
	return &PcloudPvminstancesPostOK{}
}

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

OK
*/
type PcloudPvminstancesPostOK struct {
	Payload models.PVMInstanceList
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesPostOK) GetPayload() models.PVMInstanceList {
	return o.Payload
}

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

// NewPcloudPvminstancesPostCreated creates a PcloudPvminstancesPostCreated with default headers values
func NewPcloudPvminstancesPostCreated() *PcloudPvminstancesPostCreated {
	return &PcloudPvminstancesPostCreated{}
}

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

Created
*/
type PcloudPvminstancesPostCreated struct {
	Payload models.PVMInstanceList
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesPostCreated) GetPayload() models.PVMInstanceList {
	return o.Payload
}

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

// NewPcloudPvminstancesPostAccepted creates a PcloudPvminstancesPostAccepted with default headers values
func NewPcloudPvminstancesPostAccepted() *PcloudPvminstancesPostAccepted {
	return &PcloudPvminstancesPostAccepted{}
}

/*
PcloudPvminstancesPostAccepted describes a response with status code 202, with default header values.

Accepted
*/
type PcloudPvminstancesPostAccepted struct {
	Payload models.PVMInstanceList
}

// IsSuccess returns true when this pcloud pvminstances post accepted response has a 2xx status code
func (o *PcloudPvminstancesPostAccepted) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud pvminstances post accepted response has a 3xx status code
func (o *PcloudPvminstancesPostAccepted) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances post accepted response has a 4xx status code
func (o *PcloudPvminstancesPostAccepted) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud pvminstances post accepted response has a 5xx status code
func (o *PcloudPvminstancesPostAccepted) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances post accepted response a status code equal to that given
func (o *PcloudPvminstancesPostAccepted) IsCode(code int) bool {
	return code == 202
}

// Code gets the status code for the pcloud pvminstances post accepted response
func (o *PcloudPvminstancesPostAccepted) Code() int {
	return 202
}

func (o *PcloudPvminstancesPostAccepted) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted  %+v", 202, o.Payload)
}

func (o *PcloudPvminstancesPostAccepted) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted  %+v", 202, o.Payload)
}

func (o *PcloudPvminstancesPostAccepted) GetPayload() models.PVMInstanceList {
	return o.Payload
}

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

// NewPcloudPvminstancesPostBadRequest creates a PcloudPvminstancesPostBadRequest with default headers values
func NewPcloudPvminstancesPostBadRequest() *PcloudPvminstancesPostBadRequest {
	return &PcloudPvminstancesPostBadRequest{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostUnauthorized creates a PcloudPvminstancesPostUnauthorized with default headers values
func NewPcloudPvminstancesPostUnauthorized() *PcloudPvminstancesPostUnauthorized {
	return &PcloudPvminstancesPostUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostForbidden creates a PcloudPvminstancesPostForbidden with default headers values
func NewPcloudPvminstancesPostForbidden() *PcloudPvminstancesPostForbidden {
	return &PcloudPvminstancesPostForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostNotFound creates a PcloudPvminstancesPostNotFound with default headers values
func NewPcloudPvminstancesPostNotFound() *PcloudPvminstancesPostNotFound {
	return &PcloudPvminstancesPostNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostConflict creates a PcloudPvminstancesPostConflict with default headers values
func NewPcloudPvminstancesPostConflict() *PcloudPvminstancesPostConflict {
	return &PcloudPvminstancesPostConflict{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostUnprocessableEntity creates a PcloudPvminstancesPostUnprocessableEntity with default headers values
func NewPcloudPvminstancesPostUnprocessableEntity() *PcloudPvminstancesPostUnprocessableEntity {
	return &PcloudPvminstancesPostUnprocessableEntity{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostInternalServerError creates a PcloudPvminstancesPostInternalServerError with default headers values
func NewPcloudPvminstancesPostInternalServerError() *PcloudPvminstancesPostInternalServerError {
	return &PcloudPvminstancesPostInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudPvminstancesPostGatewayTimeout creates a PcloudPvminstancesPostGatewayTimeout with default headers values
func NewPcloudPvminstancesPostGatewayTimeout() *PcloudPvminstancesPostGatewayTimeout {
	return &PcloudPvminstancesPostGatewayTimeout{}
}

/*
PcloudPvminstancesPostGatewayTimeout describes a response with status code 504, with default header values.

Gateway Timeout. Request is still processing and taking longer than expected.
*/
type PcloudPvminstancesPostGatewayTimeout struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances post gateway timeout response has a 2xx status code
func (o *PcloudPvminstancesPostGatewayTimeout) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances post gateway timeout response has a 3xx status code
func (o *PcloudPvminstancesPostGatewayTimeout) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances post gateway timeout response has a 4xx status code
func (o *PcloudPvminstancesPostGatewayTimeout) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud pvminstances post gateway timeout response has a 5xx status code
func (o *PcloudPvminstancesPostGatewayTimeout) IsServerError() bool {
	return true
}

// IsCode returns true when this pcloud pvminstances post gateway timeout response a status code equal to that given
func (o *PcloudPvminstancesPostGatewayTimeout) IsCode(code int) bool {
	return code == 504
}

// Code gets the status code for the pcloud pvminstances post gateway timeout response
func (o *PcloudPvminstancesPostGatewayTimeout) Code() int {
	return 504
}

func (o *PcloudPvminstancesPostGatewayTimeout) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout  %+v", 504, o.Payload)
}

func (o *PcloudPvminstancesPostGatewayTimeout) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout  %+v", 504, o.Payload)
}

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

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