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

// PcloudPvminstancesNetworksDeleteReader is a Reader for the PcloudPvminstancesNetworksDelete structure.
type PcloudPvminstancesNetworksDeleteReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudPvminstancesNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudPvminstancesNetworksDeleteOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudPvminstancesNetworksDeleteBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudPvminstancesNetworksDeleteUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudPvminstancesNetworksDeleteForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudPvminstancesNetworksDeleteNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 410:
		result := NewPcloudPvminstancesNetworksDeleteGone()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudPvminstancesNetworksDeleteInternalServerError()
		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}/pvm-instances/{pvm_instance_id}/networks/{network_id}] pcloud.pvminstances.networks.delete", response, response.Code())
	}
}

// NewPcloudPvminstancesNetworksDeleteOK creates a PcloudPvminstancesNetworksDeleteOK with default headers values
func NewPcloudPvminstancesNetworksDeleteOK() *PcloudPvminstancesNetworksDeleteOK {
	return &PcloudPvminstancesNetworksDeleteOK{}
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesNetworksDeleteOK) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK  %+v", 200, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteOK) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK  %+v", 200, o.Payload)
}

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

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

// NewPcloudPvminstancesNetworksDeleteBadRequest creates a PcloudPvminstancesNetworksDeleteBadRequest with default headers values
func NewPcloudPvminstancesNetworksDeleteBadRequest() *PcloudPvminstancesNetworksDeleteBadRequest {
	return &PcloudPvminstancesNetworksDeleteBadRequest{}
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesNetworksDeleteBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteBadRequest) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudPvminstancesNetworksDeleteUnauthorized creates a PcloudPvminstancesNetworksDeleteUnauthorized with default headers values
func NewPcloudPvminstancesNetworksDeleteUnauthorized() *PcloudPvminstancesNetworksDeleteUnauthorized {
	return &PcloudPvminstancesNetworksDeleteUnauthorized{}
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesNetworksDeleteUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudPvminstancesNetworksDeleteForbidden creates a PcloudPvminstancesNetworksDeleteForbidden with default headers values
func NewPcloudPvminstancesNetworksDeleteForbidden() *PcloudPvminstancesNetworksDeleteForbidden {
	return &PcloudPvminstancesNetworksDeleteForbidden{}
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesNetworksDeleteForbidden) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden  %+v", 403, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteForbidden) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudPvminstancesNetworksDeleteNotFound creates a PcloudPvminstancesNetworksDeleteNotFound with default headers values
func NewPcloudPvminstancesNetworksDeleteNotFound() *PcloudPvminstancesNetworksDeleteNotFound {
	return &PcloudPvminstancesNetworksDeleteNotFound{}
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesNetworksDeleteNotFound) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound  %+v", 404, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteNotFound) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudPvminstancesNetworksDeleteGone creates a PcloudPvminstancesNetworksDeleteGone with default headers values
func NewPcloudPvminstancesNetworksDeleteGone() *PcloudPvminstancesNetworksDeleteGone {
	return &PcloudPvminstancesNetworksDeleteGone{}
}

/*
PcloudPvminstancesNetworksDeleteGone describes a response with status code 410, with default header values.

Gone
*/
type PcloudPvminstancesNetworksDeleteGone struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud pvminstances networks delete gone response has a 2xx status code
func (o *PcloudPvminstancesNetworksDeleteGone) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud pvminstances networks delete gone response has a 3xx status code
func (o *PcloudPvminstancesNetworksDeleteGone) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud pvminstances networks delete gone response has a 4xx status code
func (o *PcloudPvminstancesNetworksDeleteGone) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud pvminstances networks delete gone response has a 5xx status code
func (o *PcloudPvminstancesNetworksDeleteGone) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud pvminstances networks delete gone response a status code equal to that given
func (o *PcloudPvminstancesNetworksDeleteGone) IsCode(code int) bool {
	return code == 410
}

// Code gets the status code for the pcloud pvminstances networks delete gone response
func (o *PcloudPvminstancesNetworksDeleteGone) Code() int {
	return 410
}

func (o *PcloudPvminstancesNetworksDeleteGone) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone  %+v", 410, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteGone) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone  %+v", 410, o.Payload)
}

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

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

// NewPcloudPvminstancesNetworksDeleteInternalServerError creates a PcloudPvminstancesNetworksDeleteInternalServerError with default headers values
func NewPcloudPvminstancesNetworksDeleteInternalServerError() *PcloudPvminstancesNetworksDeleteInternalServerError {
	return &PcloudPvminstancesNetworksDeleteInternalServerError{}
}

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

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

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

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

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

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

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

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

func (o *PcloudPvminstancesNetworksDeleteInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudPvminstancesNetworksDeleteInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError  %+v", 500, o.Payload)
}

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

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