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

package bootstrap

// 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/RafayLabs/rcloud-base/api/def/clients/sentry/models"
)

// BootstrapGetBootstrapAgentReader is a Reader for the BootstrapGetBootstrapAgent structure.
type BootstrapGetBootstrapAgentReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *BootstrapGetBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewBootstrapGetBootstrapAgentOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewBootstrapGetBootstrapAgentForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewBootstrapGetBootstrapAgentNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewBootstrapGetBootstrapAgentInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewBootstrapGetBootstrapAgentDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		if response.Code()/100 == 2 {
			return result, nil
		}
		return nil, result
	}
}

// NewBootstrapGetBootstrapAgentOK creates a BootstrapGetBootstrapAgentOK with default headers values
func NewBootstrapGetBootstrapAgentOK() *BootstrapGetBootstrapAgentOK {
	return &BootstrapGetBootstrapAgentOK{}
}

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

A successful response.
*/
type BootstrapGetBootstrapAgentOK struct {
	Payload *models.SentryBootstrapAgent
}

func (o *BootstrapGetBootstrapAgentOK) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentOK  %+v", 200, o.Payload)
}
func (o *BootstrapGetBootstrapAgentOK) GetPayload() *models.SentryBootstrapAgent {
	return o.Payload
}

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

	o.Payload = new(models.SentryBootstrapAgent)

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

	return nil
}

// NewBootstrapGetBootstrapAgentForbidden creates a BootstrapGetBootstrapAgentForbidden with default headers values
func NewBootstrapGetBootstrapAgentForbidden() *BootstrapGetBootstrapAgentForbidden {
	return &BootstrapGetBootstrapAgentForbidden{}
}

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

Returned when the user does not have permission to access the resource.
*/
type BootstrapGetBootstrapAgentForbidden struct {
	Payload interface{}
}

func (o *BootstrapGetBootstrapAgentForbidden) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentForbidden  %+v", 403, o.Payload)
}
func (o *BootstrapGetBootstrapAgentForbidden) GetPayload() interface{} {
	return o.Payload
}

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

// NewBootstrapGetBootstrapAgentNotFound creates a BootstrapGetBootstrapAgentNotFound with default headers values
func NewBootstrapGetBootstrapAgentNotFound() *BootstrapGetBootstrapAgentNotFound {
	return &BootstrapGetBootstrapAgentNotFound{}
}

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

Returned when the resource does not exist.
*/
type BootstrapGetBootstrapAgentNotFound struct {
	Payload interface{}
}

func (o *BootstrapGetBootstrapAgentNotFound) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentNotFound  %+v", 404, o.Payload)
}
func (o *BootstrapGetBootstrapAgentNotFound) GetPayload() interface{} {
	return o.Payload
}

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

// NewBootstrapGetBootstrapAgentInternalServerError creates a BootstrapGetBootstrapAgentInternalServerError with default headers values
func NewBootstrapGetBootstrapAgentInternalServerError() *BootstrapGetBootstrapAgentInternalServerError {
	return &BootstrapGetBootstrapAgentInternalServerError{}
}

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

Returned for internal server error
*/
type BootstrapGetBootstrapAgentInternalServerError struct {
	Payload interface{}
}

func (o *BootstrapGetBootstrapAgentInternalServerError) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentInternalServerError  %+v", 500, o.Payload)
}
func (o *BootstrapGetBootstrapAgentInternalServerError) GetPayload() interface{} {
	return o.Payload
}

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

// NewBootstrapGetBootstrapAgentDefault creates a BootstrapGetBootstrapAgentDefault with default headers values
func NewBootstrapGetBootstrapAgentDefault(code int) *BootstrapGetBootstrapAgentDefault {
	return &BootstrapGetBootstrapAgentDefault{
		_statusCode: code,
	}
}

/* BootstrapGetBootstrapAgentDefault describes a response with status code -1, with default header values.

An unexpected error response.
*/
type BootstrapGetBootstrapAgentDefault struct {
	_statusCode int

	Payload *models.GooglerpcStatus
}

// Code gets the status code for the bootstrap get bootstrap agent default response
func (o *BootstrapGetBootstrapAgentDefault) Code() int {
	return o._statusCode
}

func (o *BootstrapGetBootstrapAgentDefault) Error() string {
	return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] Bootstrap_GetBootstrapAgent default  %+v", o._statusCode, o.Payload)
}
func (o *BootstrapGetBootstrapAgentDefault) GetPayload() *models.GooglerpcStatus {
	return o.Payload
}

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

	o.Payload = new(models.GooglerpcStatus)

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

	return nil
}
