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

// PcloudVpnconnectionsNetworksGetReader is a Reader for the PcloudVpnconnectionsNetworksGet structure.
type PcloudVpnconnectionsNetworksGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudVpnconnectionsNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudVpnconnectionsNetworksGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudVpnconnectionsNetworksGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudVpnconnectionsNetworksGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudVpnconnectionsNetworksGetForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudVpnconnectionsNetworksGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudVpnconnectionsNetworksGetInternalServerError()
		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/vpn-connections/{vpn_connection_id}/networks] pcloud.vpnconnections.networks.get", response, response.Code())
	}
}

// NewPcloudVpnconnectionsNetworksGetOK creates a PcloudVpnconnectionsNetworksGetOK with default headers values
func NewPcloudVpnconnectionsNetworksGetOK() *PcloudVpnconnectionsNetworksGetOK {
	return &PcloudVpnconnectionsNetworksGetOK{}
}

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

OK
*/
type PcloudVpnconnectionsNetworksGetOK struct {
	Payload *models.NetworkIDs
}

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

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

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

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

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

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

func (o *PcloudVpnconnectionsNetworksGetOK) Error() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK  %+v", 200, o.Payload)
}

func (o *PcloudVpnconnectionsNetworksGetOK) String() string {
	return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK  %+v", 200, o.Payload)
}

func (o *PcloudVpnconnectionsNetworksGetOK) GetPayload() *models.NetworkIDs {
	return o.Payload
}

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

	o.Payload = new(models.NetworkIDs)

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

	return nil
}

// NewPcloudVpnconnectionsNetworksGetBadRequest creates a PcloudVpnconnectionsNetworksGetBadRequest with default headers values
func NewPcloudVpnconnectionsNetworksGetBadRequest() *PcloudVpnconnectionsNetworksGetBadRequest {
	return &PcloudVpnconnectionsNetworksGetBadRequest{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsNetworksGetUnauthorized creates a PcloudVpnconnectionsNetworksGetUnauthorized with default headers values
func NewPcloudVpnconnectionsNetworksGetUnauthorized() *PcloudVpnconnectionsNetworksGetUnauthorized {
	return &PcloudVpnconnectionsNetworksGetUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsNetworksGetForbidden creates a PcloudVpnconnectionsNetworksGetForbidden with default headers values
func NewPcloudVpnconnectionsNetworksGetForbidden() *PcloudVpnconnectionsNetworksGetForbidden {
	return &PcloudVpnconnectionsNetworksGetForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsNetworksGetNotFound creates a PcloudVpnconnectionsNetworksGetNotFound with default headers values
func NewPcloudVpnconnectionsNetworksGetNotFound() *PcloudVpnconnectionsNetworksGetNotFound {
	return &PcloudVpnconnectionsNetworksGetNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPcloudVpnconnectionsNetworksGetInternalServerError creates a PcloudVpnconnectionsNetworksGetInternalServerError with default headers values
func NewPcloudVpnconnectionsNetworksGetInternalServerError() *PcloudVpnconnectionsNetworksGetInternalServerError {
	return &PcloudVpnconnectionsNetworksGetInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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