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

// V2SetIgnoredValidationsReader is a Reader for the V2SetIgnoredValidations structure.
type V2SetIgnoredValidationsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *V2SetIgnoredValidationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewV2SetIgnoredValidationsCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewV2SetIgnoredValidationsBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewV2SetIgnoredValidationsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewV2SetIgnoredValidationsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewV2SetIgnoredValidationsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewV2SetIgnoredValidationsInternalServerError()
		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())
	}
}

// NewV2SetIgnoredValidationsCreated creates a V2SetIgnoredValidationsCreated with default headers values
func NewV2SetIgnoredValidationsCreated() *V2SetIgnoredValidationsCreated {
	return &V2SetIgnoredValidationsCreated{}
}

/*
V2SetIgnoredValidationsCreated describes a response with status code 201, with default header values.

Success.
*/
type V2SetIgnoredValidationsCreated struct {
	Payload *models.IgnoredValidations
}

// IsSuccess returns true when this v2 set ignored validations created response has a 2xx status code
func (o *V2SetIgnoredValidationsCreated) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this v2 set ignored validations created response has a 3xx status code
func (o *V2SetIgnoredValidationsCreated) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 set ignored validations created response has a 4xx status code
func (o *V2SetIgnoredValidationsCreated) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 set ignored validations created response has a 5xx status code
func (o *V2SetIgnoredValidationsCreated) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 set ignored validations created response a status code equal to that given
func (o *V2SetIgnoredValidationsCreated) IsCode(code int) bool {
	return code == 201
}

func (o *V2SetIgnoredValidationsCreated) Error() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsCreated  %+v", 201, o.Payload)
}

func (o *V2SetIgnoredValidationsCreated) String() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsCreated  %+v", 201, o.Payload)
}

func (o *V2SetIgnoredValidationsCreated) GetPayload() *models.IgnoredValidations {
	return o.Payload
}

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

	o.Payload = new(models.IgnoredValidations)

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

	return nil
}

// NewV2SetIgnoredValidationsBadRequest creates a V2SetIgnoredValidationsBadRequest with default headers values
func NewV2SetIgnoredValidationsBadRequest() *V2SetIgnoredValidationsBadRequest {
	return &V2SetIgnoredValidationsBadRequest{}
}

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

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

// IsSuccess returns true when this v2 set ignored validations bad request response has a 2xx status code
func (o *V2SetIgnoredValidationsBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 set ignored validations bad request response has a 3xx status code
func (o *V2SetIgnoredValidationsBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 set ignored validations bad request response has a 4xx status code
func (o *V2SetIgnoredValidationsBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 set ignored validations bad request response has a 5xx status code
func (o *V2SetIgnoredValidationsBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 set ignored validations bad request response a status code equal to that given
func (o *V2SetIgnoredValidationsBadRequest) IsCode(code int) bool {
	return code == 400
}

func (o *V2SetIgnoredValidationsBadRequest) Error() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsBadRequest  %+v", 400, o.Payload)
}

func (o *V2SetIgnoredValidationsBadRequest) String() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsBadRequest  %+v", 400, o.Payload)
}

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

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

// NewV2SetIgnoredValidationsUnauthorized creates a V2SetIgnoredValidationsUnauthorized with default headers values
func NewV2SetIgnoredValidationsUnauthorized() *V2SetIgnoredValidationsUnauthorized {
	return &V2SetIgnoredValidationsUnauthorized{}
}

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

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

// IsSuccess returns true when this v2 set ignored validations unauthorized response has a 2xx status code
func (o *V2SetIgnoredValidationsUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 set ignored validations unauthorized response has a 3xx status code
func (o *V2SetIgnoredValidationsUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 set ignored validations unauthorized response has a 4xx status code
func (o *V2SetIgnoredValidationsUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 set ignored validations unauthorized response has a 5xx status code
func (o *V2SetIgnoredValidationsUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 set ignored validations unauthorized response a status code equal to that given
func (o *V2SetIgnoredValidationsUnauthorized) IsCode(code int) bool {
	return code == 401
}

func (o *V2SetIgnoredValidationsUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsUnauthorized  %+v", 401, o.Payload)
}

func (o *V2SetIgnoredValidationsUnauthorized) String() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewV2SetIgnoredValidationsForbidden creates a V2SetIgnoredValidationsForbidden with default headers values
func NewV2SetIgnoredValidationsForbidden() *V2SetIgnoredValidationsForbidden {
	return &V2SetIgnoredValidationsForbidden{}
}

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

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

// IsSuccess returns true when this v2 set ignored validations forbidden response has a 2xx status code
func (o *V2SetIgnoredValidationsForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 set ignored validations forbidden response has a 3xx status code
func (o *V2SetIgnoredValidationsForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 set ignored validations forbidden response has a 4xx status code
func (o *V2SetIgnoredValidationsForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 set ignored validations forbidden response has a 5xx status code
func (o *V2SetIgnoredValidationsForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 set ignored validations forbidden response a status code equal to that given
func (o *V2SetIgnoredValidationsForbidden) IsCode(code int) bool {
	return code == 403
}

func (o *V2SetIgnoredValidationsForbidden) Error() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsForbidden  %+v", 403, o.Payload)
}

func (o *V2SetIgnoredValidationsForbidden) String() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsForbidden  %+v", 403, o.Payload)
}

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

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

// NewV2SetIgnoredValidationsNotFound creates a V2SetIgnoredValidationsNotFound with default headers values
func NewV2SetIgnoredValidationsNotFound() *V2SetIgnoredValidationsNotFound {
	return &V2SetIgnoredValidationsNotFound{}
}

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

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

// IsSuccess returns true when this v2 set ignored validations not found response has a 2xx status code
func (o *V2SetIgnoredValidationsNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 set ignored validations not found response has a 3xx status code
func (o *V2SetIgnoredValidationsNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 set ignored validations not found response has a 4xx status code
func (o *V2SetIgnoredValidationsNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 set ignored validations not found response has a 5xx status code
func (o *V2SetIgnoredValidationsNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 set ignored validations not found response a status code equal to that given
func (o *V2SetIgnoredValidationsNotFound) IsCode(code int) bool {
	return code == 404
}

func (o *V2SetIgnoredValidationsNotFound) Error() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsNotFound  %+v", 404, o.Payload)
}

func (o *V2SetIgnoredValidationsNotFound) String() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsNotFound  %+v", 404, o.Payload)
}

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

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

// NewV2SetIgnoredValidationsInternalServerError creates a V2SetIgnoredValidationsInternalServerError with default headers values
func NewV2SetIgnoredValidationsInternalServerError() *V2SetIgnoredValidationsInternalServerError {
	return &V2SetIgnoredValidationsInternalServerError{}
}

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

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

// IsSuccess returns true when this v2 set ignored validations internal server error response has a 2xx status code
func (o *V2SetIgnoredValidationsInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 set ignored validations internal server error response has a 3xx status code
func (o *V2SetIgnoredValidationsInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 set ignored validations internal server error response has a 4xx status code
func (o *V2SetIgnoredValidationsInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 set ignored validations internal server error response has a 5xx status code
func (o *V2SetIgnoredValidationsInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this v2 set ignored validations internal server error response a status code equal to that given
func (o *V2SetIgnoredValidationsInternalServerError) IsCode(code int) bool {
	return code == 500
}

func (o *V2SetIgnoredValidationsInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsInternalServerError  %+v", 500, o.Payload)
}

func (o *V2SetIgnoredValidationsInternalServerError) String() string {
	return fmt.Sprintf("[PUT /v2/clusters/{cluster_id}/ignored-validations][%d] v2SetIgnoredValidationsInternalServerError  %+v", 500, o.Payload)
}

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

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