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

package p_cloud_v_p_n_policies

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

// PcloudIkepoliciesGetReader is a Reader for the PcloudIkepoliciesGet structure.
type PcloudIkepoliciesGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudIkepoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudIkepoliciesGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudIkepoliciesGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudIkepoliciesGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudIkepoliciesGetForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudIkepoliciesGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPcloudIkepoliciesGetUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudIkepoliciesGetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}] pcloud.ikepolicies.get", response, response.Code())
	}
}

// NewPcloudIkepoliciesGetOK creates a PcloudIkepoliciesGetOK with default headers values
func NewPcloudIkepoliciesGetOK() *PcloudIkepoliciesGetOK {
	return &PcloudIkepoliciesGetOK{}
}

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

OK
*/
type PcloudIkepoliciesGetOK struct {
	Payload *models.IKEPolicy
}

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get o k response
func (o *PcloudIkepoliciesGetOK) Code() int {
	return 200
}

func (o *PcloudIkepoliciesGetOK) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK  %+v", 200, o.Payload)
}

func (o *PcloudIkepoliciesGetOK) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK  %+v", 200, o.Payload)
}

func (o *PcloudIkepoliciesGetOK) GetPayload() *models.IKEPolicy {
	return o.Payload
}

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

	o.Payload = new(models.IKEPolicy)

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

	return nil
}

// NewPcloudIkepoliciesGetBadRequest creates a PcloudIkepoliciesGetBadRequest with default headers values
func NewPcloudIkepoliciesGetBadRequest() *PcloudIkepoliciesGetBadRequest {
	return &PcloudIkepoliciesGetBadRequest{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get bad request response
func (o *PcloudIkepoliciesGetBadRequest) Code() int {
	return 400
}

func (o *PcloudIkepoliciesGetBadRequest) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudIkepoliciesGetBadRequest) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudIkepoliciesGetUnauthorized creates a PcloudIkepoliciesGetUnauthorized with default headers values
func NewPcloudIkepoliciesGetUnauthorized() *PcloudIkepoliciesGetUnauthorized {
	return &PcloudIkepoliciesGetUnauthorized{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get unauthorized response
func (o *PcloudIkepoliciesGetUnauthorized) Code() int {
	return 401
}

func (o *PcloudIkepoliciesGetUnauthorized) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudIkepoliciesGetUnauthorized) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudIkepoliciesGetForbidden creates a PcloudIkepoliciesGetForbidden with default headers values
func NewPcloudIkepoliciesGetForbidden() *PcloudIkepoliciesGetForbidden {
	return &PcloudIkepoliciesGetForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get forbidden response
func (o *PcloudIkepoliciesGetForbidden) Code() int {
	return 403
}

func (o *PcloudIkepoliciesGetForbidden) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden  %+v", 403, o.Payload)
}

func (o *PcloudIkepoliciesGetForbidden) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudIkepoliciesGetNotFound creates a PcloudIkepoliciesGetNotFound with default headers values
func NewPcloudIkepoliciesGetNotFound() *PcloudIkepoliciesGetNotFound {
	return &PcloudIkepoliciesGetNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get not found response
func (o *PcloudIkepoliciesGetNotFound) Code() int {
	return 404
}

func (o *PcloudIkepoliciesGetNotFound) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound  %+v", 404, o.Payload)
}

func (o *PcloudIkepoliciesGetNotFound) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudIkepoliciesGetUnprocessableEntity creates a PcloudIkepoliciesGetUnprocessableEntity with default headers values
func NewPcloudIkepoliciesGetUnprocessableEntity() *PcloudIkepoliciesGetUnprocessableEntity {
	return &PcloudIkepoliciesGetUnprocessableEntity{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get unprocessable entity response
func (o *PcloudIkepoliciesGetUnprocessableEntity) Code() int {
	return 422
}

func (o *PcloudIkepoliciesGetUnprocessableEntity) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PcloudIkepoliciesGetUnprocessableEntity) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity  %+v", 422, o.Payload)
}

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

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

// NewPcloudIkepoliciesGetInternalServerError creates a PcloudIkepoliciesGetInternalServerError with default headers values
func NewPcloudIkepoliciesGetInternalServerError() *PcloudIkepoliciesGetInternalServerError {
	return &PcloudIkepoliciesGetInternalServerError{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ikepolicies get internal server error response
func (o *PcloudIkepoliciesGetInternalServerError) Code() int {
	return 500
}

func (o *PcloudIkepoliciesGetInternalServerError) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudIkepoliciesGetInternalServerError) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError  %+v", 500, o.Payload)
}

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

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