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

// PcloudV2PvminstancesCaptureGetReader is a Reader for the PcloudV2PvminstancesCaptureGet structure.
type PcloudV2PvminstancesCaptureGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudV2PvminstancesCaptureGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudV2PvminstancesCaptureGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudV2PvminstancesCaptureGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudV2PvminstancesCaptureGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudV2PvminstancesCaptureGetForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudV2PvminstancesCaptureGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudV2PvminstancesCaptureGetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture] pcloud.v2.pvminstances.capture.get", response, response.Code())
	}
}

// NewPcloudV2PvminstancesCaptureGetOK creates a PcloudV2PvminstancesCaptureGetOK with default headers values
func NewPcloudV2PvminstancesCaptureGetOK() *PcloudV2PvminstancesCaptureGetOK {
	return &PcloudV2PvminstancesCaptureGetOK{}
}

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

OK
*/
type PcloudV2PvminstancesCaptureGetOK struct {
	Payload *models.Job
}

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

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

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

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

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

// Code gets the status code for the pcloud v2 pvminstances capture get o k response
func (o *PcloudV2PvminstancesCaptureGetOK) Code() int {
	return 200
}

func (o *PcloudV2PvminstancesCaptureGetOK) Error() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK  %+v", 200, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetOK) String() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK  %+v", 200, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetOK) GetPayload() *models.Job {
	return o.Payload
}

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

	o.Payload = new(models.Job)

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

	return nil
}

// NewPcloudV2PvminstancesCaptureGetBadRequest creates a PcloudV2PvminstancesCaptureGetBadRequest with default headers values
func NewPcloudV2PvminstancesCaptureGetBadRequest() *PcloudV2PvminstancesCaptureGetBadRequest {
	return &PcloudV2PvminstancesCaptureGetBadRequest{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 pvminstances capture get bad request response
func (o *PcloudV2PvminstancesCaptureGetBadRequest) Code() int {
	return 400
}

func (o *PcloudV2PvminstancesCaptureGetBadRequest) Error() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetBadRequest) String() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest  %+v", 400, o.Payload)
}

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

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

// NewPcloudV2PvminstancesCaptureGetUnauthorized creates a PcloudV2PvminstancesCaptureGetUnauthorized with default headers values
func NewPcloudV2PvminstancesCaptureGetUnauthorized() *PcloudV2PvminstancesCaptureGetUnauthorized {
	return &PcloudV2PvminstancesCaptureGetUnauthorized{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 pvminstances capture get unauthorized response
func (o *PcloudV2PvminstancesCaptureGetUnauthorized) Code() int {
	return 401
}

func (o *PcloudV2PvminstancesCaptureGetUnauthorized) Error() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetUnauthorized) String() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPcloudV2PvminstancesCaptureGetForbidden creates a PcloudV2PvminstancesCaptureGetForbidden with default headers values
func NewPcloudV2PvminstancesCaptureGetForbidden() *PcloudV2PvminstancesCaptureGetForbidden {
	return &PcloudV2PvminstancesCaptureGetForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 pvminstances capture get forbidden response
func (o *PcloudV2PvminstancesCaptureGetForbidden) Code() int {
	return 403
}

func (o *PcloudV2PvminstancesCaptureGetForbidden) Error() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden  %+v", 403, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetForbidden) String() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden  %+v", 403, o.Payload)
}

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

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

// NewPcloudV2PvminstancesCaptureGetNotFound creates a PcloudV2PvminstancesCaptureGetNotFound with default headers values
func NewPcloudV2PvminstancesCaptureGetNotFound() *PcloudV2PvminstancesCaptureGetNotFound {
	return &PcloudV2PvminstancesCaptureGetNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 pvminstances capture get not found response
func (o *PcloudV2PvminstancesCaptureGetNotFound) Code() int {
	return 404
}

func (o *PcloudV2PvminstancesCaptureGetNotFound) Error() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound  %+v", 404, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetNotFound) String() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound  %+v", 404, o.Payload)
}

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

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

// NewPcloudV2PvminstancesCaptureGetInternalServerError creates a PcloudV2PvminstancesCaptureGetInternalServerError with default headers values
func NewPcloudV2PvminstancesCaptureGetInternalServerError() *PcloudV2PvminstancesCaptureGetInternalServerError {
	return &PcloudV2PvminstancesCaptureGetInternalServerError{}
}

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

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

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

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

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

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

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

// Code gets the status code for the pcloud v2 pvminstances capture get internal server error response
func (o *PcloudV2PvminstancesCaptureGetInternalServerError) Code() int {
	return 500
}

func (o *PcloudV2PvminstancesCaptureGetInternalServerError) Error() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudV2PvminstancesCaptureGetInternalServerError) String() string {
	return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError  %+v", 500, o.Payload)
}

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

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