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

package p_cloud_v_p_n_connections

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

// PcloudVpnconnectionsPostReader is a Reader for the PcloudVpnconnectionsPost structure.
type PcloudVpnconnectionsPostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudVpnconnectionsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 202:
		result := NewPcloudVpnconnectionsPostAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudVpnconnectionsPostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudVpnconnectionsPostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudVpnconnectionsPostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudVpnconnectionsPostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 405:
		result := NewPcloudVpnconnectionsPostMethodNotAllowed()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudVpnconnectionsPostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPcloudVpnconnectionsPostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudVpnconnectionsPostInternalServerError()
		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}/vpn/vpn-connections] pcloud.vpnconnections.post", response, response.Code())
	}
}

// NewPcloudVpnconnectionsPostAccepted creates a PcloudVpnconnectionsPostAccepted with default headers values
func NewPcloudVpnconnectionsPostAccepted() *PcloudVpnconnectionsPostAccepted {
	return &PcloudVpnconnectionsPostAccepted{}
}

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

Accepted
*/
type PcloudVpnconnectionsPostAccepted struct {
	Payload *models.VPNConnectionCreateResponse
}

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

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

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

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

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

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

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

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

func (o *PcloudVpnconnectionsPostAccepted) GetPayload() *models.VPNConnectionCreateResponse {
	return o.Payload
}

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

	o.Payload = new(models.VPNConnectionCreateResponse)

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

	return nil
}

// NewPcloudVpnconnectionsPostBadRequest creates a PcloudVpnconnectionsPostBadRequest with default headers values
func NewPcloudVpnconnectionsPostBadRequest() *PcloudVpnconnectionsPostBadRequest {
	return &PcloudVpnconnectionsPostBadRequest{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsPostUnauthorized creates a PcloudVpnconnectionsPostUnauthorized with default headers values
func NewPcloudVpnconnectionsPostUnauthorized() *PcloudVpnconnectionsPostUnauthorized {
	return &PcloudVpnconnectionsPostUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsPostForbidden creates a PcloudVpnconnectionsPostForbidden with default headers values
func NewPcloudVpnconnectionsPostForbidden() *PcloudVpnconnectionsPostForbidden {
	return &PcloudVpnconnectionsPostForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsPostNotFound creates a PcloudVpnconnectionsPostNotFound with default headers values
func NewPcloudVpnconnectionsPostNotFound() *PcloudVpnconnectionsPostNotFound {
	return &PcloudVpnconnectionsPostNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsPostMethodNotAllowed creates a PcloudVpnconnectionsPostMethodNotAllowed with default headers values
func NewPcloudVpnconnectionsPostMethodNotAllowed() *PcloudVpnconnectionsPostMethodNotAllowed {
	return &PcloudVpnconnectionsPostMethodNotAllowed{}
}

/*
PcloudVpnconnectionsPostMethodNotAllowed describes a response with status code 405, with default header values.

Method Not Allowed
*/
type PcloudVpnconnectionsPostMethodNotAllowed struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud vpnconnections post method not allowed response has a 2xx status code
func (o *PcloudVpnconnectionsPostMethodNotAllowed) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud vpnconnections post method not allowed response has a 3xx status code
func (o *PcloudVpnconnectionsPostMethodNotAllowed) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud vpnconnections post method not allowed response has a 4xx status code
func (o *PcloudVpnconnectionsPostMethodNotAllowed) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud vpnconnections post method not allowed response has a 5xx status code
func (o *PcloudVpnconnectionsPostMethodNotAllowed) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud vpnconnections post method not allowed response a status code equal to that given
func (o *PcloudVpnconnectionsPostMethodNotAllowed) IsCode(code int) bool {
	return code == 405
}

// Code gets the status code for the pcloud vpnconnections post method not allowed response
func (o *PcloudVpnconnectionsPostMethodNotAllowed) Code() int {
	return 405
}

func (o *PcloudVpnconnectionsPostMethodNotAllowed) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostMethodNotAllowed  %+v", 405, o.Payload)
}

func (o *PcloudVpnconnectionsPostMethodNotAllowed) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostMethodNotAllowed  %+v", 405, o.Payload)
}

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

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

// NewPcloudVpnconnectionsPostConflict creates a PcloudVpnconnectionsPostConflict with default headers values
func NewPcloudVpnconnectionsPostConflict() *PcloudVpnconnectionsPostConflict {
	return &PcloudVpnconnectionsPostConflict{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsPostUnprocessableEntity creates a PcloudVpnconnectionsPostUnprocessableEntity with default headers values
func NewPcloudVpnconnectionsPostUnprocessableEntity() *PcloudVpnconnectionsPostUnprocessableEntity {
	return &PcloudVpnconnectionsPostUnprocessableEntity{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsPostInternalServerError creates a PcloudVpnconnectionsPostInternalServerError with default headers values
func NewPcloudVpnconnectionsPostInternalServerError() *PcloudVpnconnectionsPostInternalServerError {
	return &PcloudVpnconnectionsPostInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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