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

// BootstrapDeleteBootstrapAgentReader is a Reader for the BootstrapDeleteBootstrapAgent structure.
type BootstrapDeleteBootstrapAgentReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *BootstrapDeleteBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewBootstrapDeleteBootstrapAgentOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewBootstrapDeleteBootstrapAgentForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewBootstrapDeleteBootstrapAgentNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewBootstrapDeleteBootstrapAgentInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewBootstrapDeleteBootstrapAgentDefault(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
	}
}

// NewBootstrapDeleteBootstrapAgentOK creates a BootstrapDeleteBootstrapAgentOK with default headers values
func NewBootstrapDeleteBootstrapAgentOK() *BootstrapDeleteBootstrapAgentOK {
	return &BootstrapDeleteBootstrapAgentOK{}
}

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

A successful response.
*/
type BootstrapDeleteBootstrapAgentOK struct {
	Payload models.RPCDeleteBootstrapAgentResponse
}

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

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

// NewBootstrapDeleteBootstrapAgentForbidden creates a BootstrapDeleteBootstrapAgentForbidden with default headers values
func NewBootstrapDeleteBootstrapAgentForbidden() *BootstrapDeleteBootstrapAgentForbidden {
	return &BootstrapDeleteBootstrapAgentForbidden{}
}

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

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

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

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

// NewBootstrapDeleteBootstrapAgentNotFound creates a BootstrapDeleteBootstrapAgentNotFound with default headers values
func NewBootstrapDeleteBootstrapAgentNotFound() *BootstrapDeleteBootstrapAgentNotFound {
	return &BootstrapDeleteBootstrapAgentNotFound{}
}

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

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

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

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

// NewBootstrapDeleteBootstrapAgentInternalServerError creates a BootstrapDeleteBootstrapAgentInternalServerError with default headers values
func NewBootstrapDeleteBootstrapAgentInternalServerError() *BootstrapDeleteBootstrapAgentInternalServerError {
	return &BootstrapDeleteBootstrapAgentInternalServerError{}
}

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

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

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

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

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

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

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

	Payload *models.GooglerpcStatus
}

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

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

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