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

package p_cloud_volume_groups

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

// PcloudVolumegroupsPostReader is a Reader for the PcloudVolumegroupsPost structure.
type PcloudVolumegroupsPostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudVolumegroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 202:
		result := NewPcloudVolumegroupsPostAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 206:
		result := NewPcloudVolumegroupsPostPartialContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudVolumegroupsPostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudVolumegroupsPostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudVolumegroupsPostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudVolumegroupsPostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudVolumegroupsPostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPcloudVolumegroupsPostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudVolumegroupsPostInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 504:
		result := NewPcloudVolumegroupsPostGatewayTimeout()
		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}/volume-groups] pcloud.volumegroups.post", response, response.Code())
	}
}

// NewPcloudVolumegroupsPostAccepted creates a PcloudVolumegroupsPostAccepted with default headers values
func NewPcloudVolumegroupsPostAccepted() *PcloudVolumegroupsPostAccepted {
	return &PcloudVolumegroupsPostAccepted{}
}

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

Accepted
*/
type PcloudVolumegroupsPostAccepted struct {
	Payload *models.VolumeGroupCreateResponse
}

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

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

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

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

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

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

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

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

func (o *PcloudVolumegroupsPostAccepted) GetPayload() *models.VolumeGroupCreateResponse {
	return o.Payload
}

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

	o.Payload = new(models.VolumeGroupCreateResponse)

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

	return nil
}

// NewPcloudVolumegroupsPostPartialContent creates a PcloudVolumegroupsPostPartialContent with default headers values
func NewPcloudVolumegroupsPostPartialContent() *PcloudVolumegroupsPostPartialContent {
	return &PcloudVolumegroupsPostPartialContent{}
}

/*
PcloudVolumegroupsPostPartialContent describes a response with status code 206, with default header values.

Partial Content
*/
type PcloudVolumegroupsPostPartialContent struct {
	Payload *models.VolumeGroupCreateResponse
}

// IsSuccess returns true when this pcloud volumegroups post partial content response has a 2xx status code
func (o *PcloudVolumegroupsPostPartialContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud volumegroups post partial content response has a 3xx status code
func (o *PcloudVolumegroupsPostPartialContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud volumegroups post partial content response has a 4xx status code
func (o *PcloudVolumegroupsPostPartialContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud volumegroups post partial content response has a 5xx status code
func (o *PcloudVolumegroupsPostPartialContent) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud volumegroups post partial content response a status code equal to that given
func (o *PcloudVolumegroupsPostPartialContent) IsCode(code int) bool {
	return code == 206
}

// Code gets the status code for the pcloud volumegroups post partial content response
func (o *PcloudVolumegroupsPostPartialContent) Code() int {
	return 206
}

func (o *PcloudVolumegroupsPostPartialContent) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent  %+v", 206, o.Payload)
}

func (o *PcloudVolumegroupsPostPartialContent) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent  %+v", 206, o.Payload)
}

func (o *PcloudVolumegroupsPostPartialContent) GetPayload() *models.VolumeGroupCreateResponse {
	return o.Payload
}

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

	o.Payload = new(models.VolumeGroupCreateResponse)

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

	return nil
}

// NewPcloudVolumegroupsPostBadRequest creates a PcloudVolumegroupsPostBadRequest with default headers values
func NewPcloudVolumegroupsPostBadRequest() *PcloudVolumegroupsPostBadRequest {
	return &PcloudVolumegroupsPostBadRequest{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostUnauthorized creates a PcloudVolumegroupsPostUnauthorized with default headers values
func NewPcloudVolumegroupsPostUnauthorized() *PcloudVolumegroupsPostUnauthorized {
	return &PcloudVolumegroupsPostUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostForbidden creates a PcloudVolumegroupsPostForbidden with default headers values
func NewPcloudVolumegroupsPostForbidden() *PcloudVolumegroupsPostForbidden {
	return &PcloudVolumegroupsPostForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostNotFound creates a PcloudVolumegroupsPostNotFound with default headers values
func NewPcloudVolumegroupsPostNotFound() *PcloudVolumegroupsPostNotFound {
	return &PcloudVolumegroupsPostNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostConflict creates a PcloudVolumegroupsPostConflict with default headers values
func NewPcloudVolumegroupsPostConflict() *PcloudVolumegroupsPostConflict {
	return &PcloudVolumegroupsPostConflict{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostUnprocessableEntity creates a PcloudVolumegroupsPostUnprocessableEntity with default headers values
func NewPcloudVolumegroupsPostUnprocessableEntity() *PcloudVolumegroupsPostUnprocessableEntity {
	return &PcloudVolumegroupsPostUnprocessableEntity{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostInternalServerError creates a PcloudVolumegroupsPostInternalServerError with default headers values
func NewPcloudVolumegroupsPostInternalServerError() *PcloudVolumegroupsPostInternalServerError {
	return &PcloudVolumegroupsPostInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVolumegroupsPostGatewayTimeout creates a PcloudVolumegroupsPostGatewayTimeout with default headers values
func NewPcloudVolumegroupsPostGatewayTimeout() *PcloudVolumegroupsPostGatewayTimeout {
	return &PcloudVolumegroupsPostGatewayTimeout{}
}

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

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

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

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

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

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

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

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

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

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

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

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