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

package kubectl_cluster_settings

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

// KubectlClusterSettingsUpdateKubectlClusterSettingsReader is a Reader for the KubectlClusterSettingsUpdateKubectlClusterSettings structure.
type KubectlClusterSettingsUpdateKubectlClusterSettingsReader struct {
	formats strfmt.Registry
}

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

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsOK creates a KubectlClusterSettingsUpdateKubectlClusterSettingsOK with default headers values
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsOK() *KubectlClusterSettingsUpdateKubectlClusterSettingsOK {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsOK{}
}

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

A successful response.
*/
type KubectlClusterSettingsUpdateKubectlClusterSettingsOK struct {
	Payload models.RPCUpdateKubectlClusterSettingsResponse
}

func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsOK) Error() string {
	return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsUpdateKubectlClusterSettingsOK  %+v", 200, o.Payload)
}
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsOK) GetPayload() models.RPCUpdateKubectlClusterSettingsResponse {
	return o.Payload
}

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

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsForbidden creates a KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden with default headers values
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsForbidden() *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden{}
}

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

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

func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden) Error() string {
	return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsUpdateKubectlClusterSettingsForbidden  %+v", 403, o.Payload)
}
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden) GetPayload() interface{} {
	return o.Payload
}

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

// NewKubectlClusterSettingsUpdateKubectlClusterSettingsNotFound creates a KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound with default headers values
func NewKubectlClusterSettingsUpdateKubectlClusterSettingsNotFound() *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound {
	return &KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound{}
}

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

Returned when the resource does not exist.
*/
type KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound struct {
	Payload string
}

func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound) Error() string {
	return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsUpdateKubectlClusterSettingsNotFound  %+v", 404, o.Payload)
}
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound) GetPayload() string {
	return o.Payload
}

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

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

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

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

	Payload *models.GooglerpcStatus
}

// Code gets the status code for the kubectl cluster settings update kubectl cluster settings default response
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) Code() int {
	return o._statusCode
}

func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) Error() string {
	return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] KubectlClusterSettings_UpdateKubectlClusterSettings default  %+v", o._statusCode, o.Payload)
}
func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) GetPayload() *models.GooglerpcStatus {
	return o.Payload
}

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