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

// GetInfraEnvPresignedFileURLReader is a Reader for the GetInfraEnvPresignedFileURL structure.
type GetInfraEnvPresignedFileURLReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetInfraEnvPresignedFileURLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetInfraEnvPresignedFileURLOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetInfraEnvPresignedFileURLUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetInfraEnvPresignedFileURLForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetInfraEnvPresignedFileURLNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 405:
		result := NewGetInfraEnvPresignedFileURLMethodNotAllowed()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetInfraEnvPresignedFileURLInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 501:
		result := NewGetInfraEnvPresignedFileURLNotImplemented()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 503:
		result := NewGetInfraEnvPresignedFileURLServiceUnavailable()
		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())
	}
}

// NewGetInfraEnvPresignedFileURLOK creates a GetInfraEnvPresignedFileURLOK with default headers values
func NewGetInfraEnvPresignedFileURLOK() *GetInfraEnvPresignedFileURLOK {
	return &GetInfraEnvPresignedFileURLOK{}
}

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

Success.
*/
type GetInfraEnvPresignedFileURLOK struct {
	Payload *models.PresignedURL
}

// IsSuccess returns true when this get infra env presigned file Url o k response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this get infra env presigned file Url o k response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url o k response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this get infra env presigned file Url o k response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLOK) IsServerError() bool {
	return false
}

// IsCode returns true when this get infra env presigned file Url o k response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLOK) IsCode(code int) bool {
	return code == 200
}

func (o *GetInfraEnvPresignedFileURLOK) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlOK  %+v", 200, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLOK) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlOK  %+v", 200, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLOK) GetPayload() *models.PresignedURL {
	return o.Payload
}

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

	o.Payload = new(models.PresignedURL)

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

	return nil
}

// NewGetInfraEnvPresignedFileURLUnauthorized creates a GetInfraEnvPresignedFileURLUnauthorized with default headers values
func NewGetInfraEnvPresignedFileURLUnauthorized() *GetInfraEnvPresignedFileURLUnauthorized {
	return &GetInfraEnvPresignedFileURLUnauthorized{}
}

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

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

// IsSuccess returns true when this get infra env presigned file Url unauthorized response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url unauthorized response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url unauthorized response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this get infra env presigned file Url unauthorized response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this get infra env presigned file Url unauthorized response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLUnauthorized) IsCode(code int) bool {
	return code == 401
}

func (o *GetInfraEnvPresignedFileURLUnauthorized) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlUnauthorized  %+v", 401, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLUnauthorized) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewGetInfraEnvPresignedFileURLForbidden creates a GetInfraEnvPresignedFileURLForbidden with default headers values
func NewGetInfraEnvPresignedFileURLForbidden() *GetInfraEnvPresignedFileURLForbidden {
	return &GetInfraEnvPresignedFileURLForbidden{}
}

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

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

// IsSuccess returns true when this get infra env presigned file Url forbidden response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url forbidden response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url forbidden response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this get infra env presigned file Url forbidden response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this get infra env presigned file Url forbidden response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLForbidden) IsCode(code int) bool {
	return code == 403
}

func (o *GetInfraEnvPresignedFileURLForbidden) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlForbidden  %+v", 403, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLForbidden) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlForbidden  %+v", 403, o.Payload)
}

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

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

// NewGetInfraEnvPresignedFileURLNotFound creates a GetInfraEnvPresignedFileURLNotFound with default headers values
func NewGetInfraEnvPresignedFileURLNotFound() *GetInfraEnvPresignedFileURLNotFound {
	return &GetInfraEnvPresignedFileURLNotFound{}
}

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

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

// IsSuccess returns true when this get infra env presigned file Url not found response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url not found response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url not found response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this get infra env presigned file Url not found response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this get infra env presigned file Url not found response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLNotFound) IsCode(code int) bool {
	return code == 404
}

func (o *GetInfraEnvPresignedFileURLNotFound) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlNotFound  %+v", 404, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLNotFound) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlNotFound  %+v", 404, o.Payload)
}

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

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

// NewGetInfraEnvPresignedFileURLMethodNotAllowed creates a GetInfraEnvPresignedFileURLMethodNotAllowed with default headers values
func NewGetInfraEnvPresignedFileURLMethodNotAllowed() *GetInfraEnvPresignedFileURLMethodNotAllowed {
	return &GetInfraEnvPresignedFileURLMethodNotAllowed{}
}

/*
GetInfraEnvPresignedFileURLMethodNotAllowed describes a response with status code 405, with default header values.

Method Not Allowed.
*/
type GetInfraEnvPresignedFileURLMethodNotAllowed struct {
	Payload *models.Error
}

// IsSuccess returns true when this get infra env presigned file Url method not allowed response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url method not allowed response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url method not allowed response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) IsClientError() bool {
	return true
}

// IsServerError returns true when this get infra env presigned file Url method not allowed response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) IsServerError() bool {
	return false
}

// IsCode returns true when this get infra env presigned file Url method not allowed response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) IsCode(code int) bool {
	return code == 405
}

func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlMethodNotAllowed  %+v", 405, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLMethodNotAllowed) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlMethodNotAllowed  %+v", 405, o.Payload)
}

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

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

// NewGetInfraEnvPresignedFileURLInternalServerError creates a GetInfraEnvPresignedFileURLInternalServerError with default headers values
func NewGetInfraEnvPresignedFileURLInternalServerError() *GetInfraEnvPresignedFileURLInternalServerError {
	return &GetInfraEnvPresignedFileURLInternalServerError{}
}

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

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

// IsSuccess returns true when this get infra env presigned file Url internal server error response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url internal server error response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url internal server error response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this get infra env presigned file Url internal server error response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this get infra env presigned file Url internal server error response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLInternalServerError) IsCode(code int) bool {
	return code == 500
}

func (o *GetInfraEnvPresignedFileURLInternalServerError) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlInternalServerError  %+v", 500, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLInternalServerError) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlInternalServerError  %+v", 500, o.Payload)
}

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

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

// NewGetInfraEnvPresignedFileURLNotImplemented creates a GetInfraEnvPresignedFileURLNotImplemented with default headers values
func NewGetInfraEnvPresignedFileURLNotImplemented() *GetInfraEnvPresignedFileURLNotImplemented {
	return &GetInfraEnvPresignedFileURLNotImplemented{}
}

/*
GetInfraEnvPresignedFileURLNotImplemented describes a response with status code 501, with default header values.

Not implemented.
*/
type GetInfraEnvPresignedFileURLNotImplemented struct {
	Payload *models.Error
}

// IsSuccess returns true when this get infra env presigned file Url not implemented response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLNotImplemented) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url not implemented response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLNotImplemented) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url not implemented response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLNotImplemented) IsClientError() bool {
	return false
}

// IsServerError returns true when this get infra env presigned file Url not implemented response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLNotImplemented) IsServerError() bool {
	return true
}

// IsCode returns true when this get infra env presigned file Url not implemented response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLNotImplemented) IsCode(code int) bool {
	return code == 501
}

func (o *GetInfraEnvPresignedFileURLNotImplemented) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlNotImplemented  %+v", 501, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLNotImplemented) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlNotImplemented  %+v", 501, o.Payload)
}

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

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

// NewGetInfraEnvPresignedFileURLServiceUnavailable creates a GetInfraEnvPresignedFileURLServiceUnavailable with default headers values
func NewGetInfraEnvPresignedFileURLServiceUnavailable() *GetInfraEnvPresignedFileURLServiceUnavailable {
	return &GetInfraEnvPresignedFileURLServiceUnavailable{}
}

/*
GetInfraEnvPresignedFileURLServiceUnavailable describes a response with status code 503, with default header values.

Unavailable.
*/
type GetInfraEnvPresignedFileURLServiceUnavailable struct {
	Payload *models.Error
}

// IsSuccess returns true when this get infra env presigned file Url service unavailable response has a 2xx status code
func (o *GetInfraEnvPresignedFileURLServiceUnavailable) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get infra env presigned file Url service unavailable response has a 3xx status code
func (o *GetInfraEnvPresignedFileURLServiceUnavailable) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get infra env presigned file Url service unavailable response has a 4xx status code
func (o *GetInfraEnvPresignedFileURLServiceUnavailable) IsClientError() bool {
	return false
}

// IsServerError returns true when this get infra env presigned file Url service unavailable response has a 5xx status code
func (o *GetInfraEnvPresignedFileURLServiceUnavailable) IsServerError() bool {
	return true
}

// IsCode returns true when this get infra env presigned file Url service unavailable response a status code equal to that given
func (o *GetInfraEnvPresignedFileURLServiceUnavailable) IsCode(code int) bool {
	return code == 503
}

func (o *GetInfraEnvPresignedFileURLServiceUnavailable) Error() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlServiceUnavailable  %+v", 503, o.Payload)
}

func (o *GetInfraEnvPresignedFileURLServiceUnavailable) String() string {
	return fmt.Sprintf("[GET /v2/infra-envs/{infra_env_id}/downloads/files-presigned][%d] getInfraEnvPresignedFileUrlServiceUnavailable  %+v", 503, o.Payload)
}

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

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