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

// PcloudIpsecpoliciesDeleteReader is a Reader for the PcloudIpsecpoliciesDelete structure.
type PcloudIpsecpoliciesDeleteReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudIpsecpoliciesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudIpsecpoliciesDeleteOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudIpsecpoliciesDeleteBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudIpsecpoliciesDeleteUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudIpsecpoliciesDeleteForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudIpsecpoliciesDeleteNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudIpsecpoliciesDeleteInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}] pcloud.ipsecpolicies.delete", response, response.Code())
	}
}

// NewPcloudIpsecpoliciesDeleteOK creates a PcloudIpsecpoliciesDeleteOK with default headers values
func NewPcloudIpsecpoliciesDeleteOK() *PcloudIpsecpoliciesDeleteOK {
	return &PcloudIpsecpoliciesDeleteOK{}
}

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

OK
*/
type PcloudIpsecpoliciesDeleteOK struct {
	Payload models.Object
}

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

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

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

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

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

// Code gets the status code for the pcloud ipsecpolicies delete o k response
func (o *PcloudIpsecpoliciesDeleteOK) Code() int {
	return 200
}

func (o *PcloudIpsecpoliciesDeleteOK) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK  %+v", 200, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteOK) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK  %+v", 200, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteOK) GetPayload() models.Object {
	return o.Payload
}

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

// NewPcloudIpsecpoliciesDeleteBadRequest creates a PcloudIpsecpoliciesDeleteBadRequest with default headers values
func NewPcloudIpsecpoliciesDeleteBadRequest() *PcloudIpsecpoliciesDeleteBadRequest {
	return &PcloudIpsecpoliciesDeleteBadRequest{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ipsecpolicies delete bad request response
func (o *PcloudIpsecpoliciesDeleteBadRequest) Code() int {
	return 400
}

func (o *PcloudIpsecpoliciesDeleteBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteBadRequest) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudIpsecpoliciesDeleteUnauthorized creates a PcloudIpsecpoliciesDeleteUnauthorized with default headers values
func NewPcloudIpsecpoliciesDeleteUnauthorized() *PcloudIpsecpoliciesDeleteUnauthorized {
	return &PcloudIpsecpoliciesDeleteUnauthorized{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ipsecpolicies delete unauthorized response
func (o *PcloudIpsecpoliciesDeleteUnauthorized) Code() int {
	return 401
}

func (o *PcloudIpsecpoliciesDeleteUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudIpsecpoliciesDeleteForbidden creates a PcloudIpsecpoliciesDeleteForbidden with default headers values
func NewPcloudIpsecpoliciesDeleteForbidden() *PcloudIpsecpoliciesDeleteForbidden {
	return &PcloudIpsecpoliciesDeleteForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ipsecpolicies delete forbidden response
func (o *PcloudIpsecpoliciesDeleteForbidden) Code() int {
	return 403
}

func (o *PcloudIpsecpoliciesDeleteForbidden) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden  %+v", 403, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteForbidden) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudIpsecpoliciesDeleteNotFound creates a PcloudIpsecpoliciesDeleteNotFound with default headers values
func NewPcloudIpsecpoliciesDeleteNotFound() *PcloudIpsecpoliciesDeleteNotFound {
	return &PcloudIpsecpoliciesDeleteNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ipsecpolicies delete not found response
func (o *PcloudIpsecpoliciesDeleteNotFound) Code() int {
	return 404
}

func (o *PcloudIpsecpoliciesDeleteNotFound) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound  %+v", 404, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteNotFound) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudIpsecpoliciesDeleteInternalServerError creates a PcloudIpsecpoliciesDeleteInternalServerError with default headers values
func NewPcloudIpsecpoliciesDeleteInternalServerError() *PcloudIpsecpoliciesDeleteInternalServerError {
	return &PcloudIpsecpoliciesDeleteInternalServerError{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud ipsecpolicies delete internal server error response
func (o *PcloudIpsecpoliciesDeleteInternalServerError) Code() int {
	return 500
}

func (o *PcloudIpsecpoliciesDeleteInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudIpsecpoliciesDeleteInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError  %+v", 500, o.Payload)
}

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

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