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

package installer

// 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/openshift/assisted-service/models"
)

// V2GetClusterUISettingsReader is a Reader for the V2GetClusterUISettings structure.
type V2GetClusterUISettingsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *V2GetClusterUISettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewV2GetClusterUISettingsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewV2GetClusterUISettingsBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewV2GetClusterUISettingsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewV2GetClusterUISettingsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewV2GetClusterUISettingsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewV2GetClusterUISettingsInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
	}
}

// NewV2GetClusterUISettingsOK creates a V2GetClusterUISettingsOK with default headers values
func NewV2GetClusterUISettingsOK() *V2GetClusterUISettingsOK {
	return &V2GetClusterUISettingsOK{}
}

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

Success.
*/
type V2GetClusterUISettingsOK struct {
	Payload string
}

// IsSuccess returns true when this v2 get cluster Ui settings o k response has a 2xx status code
func (o *V2GetClusterUISettingsOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this v2 get cluster Ui settings o k response has a 3xx status code
func (o *V2GetClusterUISettingsOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 get cluster Ui settings o k response has a 4xx status code
func (o *V2GetClusterUISettingsOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 get cluster Ui settings o k response has a 5xx status code
func (o *V2GetClusterUISettingsOK) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 get cluster Ui settings o k response a status code equal to that given
func (o *V2GetClusterUISettingsOK) IsCode(code int) bool {
	return code == 200
}

func (o *V2GetClusterUISettingsOK) Error() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsOK  %+v", 200, o.Payload)
}

func (o *V2GetClusterUISettingsOK) String() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsOK  %+v", 200, o.Payload)
}

func (o *V2GetClusterUISettingsOK) GetPayload() string {
	return o.Payload
}

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

// NewV2GetClusterUISettingsBadRequest creates a V2GetClusterUISettingsBadRequest with default headers values
func NewV2GetClusterUISettingsBadRequest() *V2GetClusterUISettingsBadRequest {
	return &V2GetClusterUISettingsBadRequest{}
}

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

Error.
*/
type V2GetClusterUISettingsBadRequest struct {
	Payload *models.Error
}

// IsSuccess returns true when this v2 get cluster Ui settings bad request response has a 2xx status code
func (o *V2GetClusterUISettingsBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 get cluster Ui settings bad request response has a 3xx status code
func (o *V2GetClusterUISettingsBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 get cluster Ui settings bad request response has a 4xx status code
func (o *V2GetClusterUISettingsBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 get cluster Ui settings bad request response has a 5xx status code
func (o *V2GetClusterUISettingsBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 get cluster Ui settings bad request response a status code equal to that given
func (o *V2GetClusterUISettingsBadRequest) IsCode(code int) bool {
	return code == 400
}

func (o *V2GetClusterUISettingsBadRequest) Error() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsBadRequest  %+v", 400, o.Payload)
}

func (o *V2GetClusterUISettingsBadRequest) String() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsBadRequest  %+v", 400, o.Payload)
}

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

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

// NewV2GetClusterUISettingsUnauthorized creates a V2GetClusterUISettingsUnauthorized with default headers values
func NewV2GetClusterUISettingsUnauthorized() *V2GetClusterUISettingsUnauthorized {
	return &V2GetClusterUISettingsUnauthorized{}
}

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

Unauthorized.
*/
type V2GetClusterUISettingsUnauthorized struct {
	Payload *models.InfraError
}

// IsSuccess returns true when this v2 get cluster Ui settings unauthorized response has a 2xx status code
func (o *V2GetClusterUISettingsUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 get cluster Ui settings unauthorized response has a 3xx status code
func (o *V2GetClusterUISettingsUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 get cluster Ui settings unauthorized response has a 4xx status code
func (o *V2GetClusterUISettingsUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 get cluster Ui settings unauthorized response has a 5xx status code
func (o *V2GetClusterUISettingsUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 get cluster Ui settings unauthorized response a status code equal to that given
func (o *V2GetClusterUISettingsUnauthorized) IsCode(code int) bool {
	return code == 401
}

func (o *V2GetClusterUISettingsUnauthorized) Error() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsUnauthorized  %+v", 401, o.Payload)
}

func (o *V2GetClusterUISettingsUnauthorized) String() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsUnauthorized  %+v", 401, o.Payload)
}

func (o *V2GetClusterUISettingsUnauthorized) GetPayload() *models.InfraError {
	return o.Payload
}

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

	o.Payload = new(models.InfraError)

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

	return nil
}

// NewV2GetClusterUISettingsForbidden creates a V2GetClusterUISettingsForbidden with default headers values
func NewV2GetClusterUISettingsForbidden() *V2GetClusterUISettingsForbidden {
	return &V2GetClusterUISettingsForbidden{}
}

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

Forbidden.
*/
type V2GetClusterUISettingsForbidden struct {
	Payload *models.InfraError
}

// IsSuccess returns true when this v2 get cluster Ui settings forbidden response has a 2xx status code
func (o *V2GetClusterUISettingsForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 get cluster Ui settings forbidden response has a 3xx status code
func (o *V2GetClusterUISettingsForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 get cluster Ui settings forbidden response has a 4xx status code
func (o *V2GetClusterUISettingsForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 get cluster Ui settings forbidden response has a 5xx status code
func (o *V2GetClusterUISettingsForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 get cluster Ui settings forbidden response a status code equal to that given
func (o *V2GetClusterUISettingsForbidden) IsCode(code int) bool {
	return code == 403
}

func (o *V2GetClusterUISettingsForbidden) Error() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsForbidden  %+v", 403, o.Payload)
}

func (o *V2GetClusterUISettingsForbidden) String() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsForbidden  %+v", 403, o.Payload)
}

func (o *V2GetClusterUISettingsForbidden) GetPayload() *models.InfraError {
	return o.Payload
}

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

	o.Payload = new(models.InfraError)

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

	return nil
}

// NewV2GetClusterUISettingsNotFound creates a V2GetClusterUISettingsNotFound with default headers values
func NewV2GetClusterUISettingsNotFound() *V2GetClusterUISettingsNotFound {
	return &V2GetClusterUISettingsNotFound{}
}

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

Error.
*/
type V2GetClusterUISettingsNotFound struct {
	Payload *models.Error
}

// IsSuccess returns true when this v2 get cluster Ui settings not found response has a 2xx status code
func (o *V2GetClusterUISettingsNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 get cluster Ui settings not found response has a 3xx status code
func (o *V2GetClusterUISettingsNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 get cluster Ui settings not found response has a 4xx status code
func (o *V2GetClusterUISettingsNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 get cluster Ui settings not found response has a 5xx status code
func (o *V2GetClusterUISettingsNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 get cluster Ui settings not found response a status code equal to that given
func (o *V2GetClusterUISettingsNotFound) IsCode(code int) bool {
	return code == 404
}

func (o *V2GetClusterUISettingsNotFound) Error() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsNotFound  %+v", 404, o.Payload)
}

func (o *V2GetClusterUISettingsNotFound) String() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsNotFound  %+v", 404, o.Payload)
}

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

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

// NewV2GetClusterUISettingsInternalServerError creates a V2GetClusterUISettingsInternalServerError with default headers values
func NewV2GetClusterUISettingsInternalServerError() *V2GetClusterUISettingsInternalServerError {
	return &V2GetClusterUISettingsInternalServerError{}
}

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

Error.
*/
type V2GetClusterUISettingsInternalServerError struct {
	Payload *models.Error
}

// IsSuccess returns true when this v2 get cluster Ui settings internal server error response has a 2xx status code
func (o *V2GetClusterUISettingsInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 get cluster Ui settings internal server error response has a 3xx status code
func (o *V2GetClusterUISettingsInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 get cluster Ui settings internal server error response has a 4xx status code
func (o *V2GetClusterUISettingsInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 get cluster Ui settings internal server error response has a 5xx status code
func (o *V2GetClusterUISettingsInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this v2 get cluster Ui settings internal server error response a status code equal to that given
func (o *V2GetClusterUISettingsInternalServerError) IsCode(code int) bool {
	return code == 500
}

func (o *V2GetClusterUISettingsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsInternalServerError  %+v", 500, o.Payload)
}

func (o *V2GetClusterUISettingsInternalServerError) String() string {
	return fmt.Sprintf("[GET /v2/clusters/{cluster_id}/ui-settings][%d] v2GetClusterUiSettingsInternalServerError  %+v", 500, o.Payload)
}

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

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