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

// V2UpdateHostLogsProgressReader is a Reader for the V2UpdateHostLogsProgress structure.
type V2UpdateHostLogsProgressReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *V2UpdateHostLogsProgressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewV2UpdateHostLogsProgressNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewV2UpdateHostLogsProgressUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewV2UpdateHostLogsProgressForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewV2UpdateHostLogsProgressNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 405:
		result := NewV2UpdateHostLogsProgressMethodNotAllowed()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewV2UpdateHostLogsProgressConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewV2UpdateHostLogsProgressInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 501:
		result := NewV2UpdateHostLogsProgressNotImplemented()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 503:
		result := NewV2UpdateHostLogsProgressServiceUnavailable()
		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())
	}
}

// NewV2UpdateHostLogsProgressNoContent creates a V2UpdateHostLogsProgressNoContent with default headers values
func NewV2UpdateHostLogsProgressNoContent() *V2UpdateHostLogsProgressNoContent {
	return &V2UpdateHostLogsProgressNoContent{}
}

/*
V2UpdateHostLogsProgressNoContent describes a response with status code 204, with default header values.

Update cluster install progress.
*/
type V2UpdateHostLogsProgressNoContent struct {
}

// IsSuccess returns true when this v2 update host logs progress no content response has a 2xx status code
func (o *V2UpdateHostLogsProgressNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this v2 update host logs progress no content response has a 3xx status code
func (o *V2UpdateHostLogsProgressNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress no content response has a 4xx status code
func (o *V2UpdateHostLogsProgressNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 update host logs progress no content response has a 5xx status code
func (o *V2UpdateHostLogsProgressNoContent) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 update host logs progress no content response a status code equal to that given
func (o *V2UpdateHostLogsProgressNoContent) IsCode(code int) bool {
	return code == 204
}

func (o *V2UpdateHostLogsProgressNoContent) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressNoContent ", 204)
}

func (o *V2UpdateHostLogsProgressNoContent) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressNoContent ", 204)
}

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

	return nil
}

// NewV2UpdateHostLogsProgressUnauthorized creates a V2UpdateHostLogsProgressUnauthorized with default headers values
func NewV2UpdateHostLogsProgressUnauthorized() *V2UpdateHostLogsProgressUnauthorized {
	return &V2UpdateHostLogsProgressUnauthorized{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress unauthorized response has a 2xx status code
func (o *V2UpdateHostLogsProgressUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress unauthorized response has a 3xx status code
func (o *V2UpdateHostLogsProgressUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress unauthorized response has a 4xx status code
func (o *V2UpdateHostLogsProgressUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 update host logs progress unauthorized response has a 5xx status code
func (o *V2UpdateHostLogsProgressUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 update host logs progress unauthorized response a status code equal to that given
func (o *V2UpdateHostLogsProgressUnauthorized) IsCode(code int) bool {
	return code == 401
}

func (o *V2UpdateHostLogsProgressUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressUnauthorized  %+v", 401, o.Payload)
}

func (o *V2UpdateHostLogsProgressUnauthorized) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressForbidden creates a V2UpdateHostLogsProgressForbidden with default headers values
func NewV2UpdateHostLogsProgressForbidden() *V2UpdateHostLogsProgressForbidden {
	return &V2UpdateHostLogsProgressForbidden{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress forbidden response has a 2xx status code
func (o *V2UpdateHostLogsProgressForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress forbidden response has a 3xx status code
func (o *V2UpdateHostLogsProgressForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress forbidden response has a 4xx status code
func (o *V2UpdateHostLogsProgressForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 update host logs progress forbidden response has a 5xx status code
func (o *V2UpdateHostLogsProgressForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 update host logs progress forbidden response a status code equal to that given
func (o *V2UpdateHostLogsProgressForbidden) IsCode(code int) bool {
	return code == 403
}

func (o *V2UpdateHostLogsProgressForbidden) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressForbidden  %+v", 403, o.Payload)
}

func (o *V2UpdateHostLogsProgressForbidden) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressForbidden  %+v", 403, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressNotFound creates a V2UpdateHostLogsProgressNotFound with default headers values
func NewV2UpdateHostLogsProgressNotFound() *V2UpdateHostLogsProgressNotFound {
	return &V2UpdateHostLogsProgressNotFound{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress not found response has a 2xx status code
func (o *V2UpdateHostLogsProgressNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress not found response has a 3xx status code
func (o *V2UpdateHostLogsProgressNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress not found response has a 4xx status code
func (o *V2UpdateHostLogsProgressNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 update host logs progress not found response has a 5xx status code
func (o *V2UpdateHostLogsProgressNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 update host logs progress not found response a status code equal to that given
func (o *V2UpdateHostLogsProgressNotFound) IsCode(code int) bool {
	return code == 404
}

func (o *V2UpdateHostLogsProgressNotFound) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressNotFound  %+v", 404, o.Payload)
}

func (o *V2UpdateHostLogsProgressNotFound) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressNotFound  %+v", 404, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressMethodNotAllowed creates a V2UpdateHostLogsProgressMethodNotAllowed with default headers values
func NewV2UpdateHostLogsProgressMethodNotAllowed() *V2UpdateHostLogsProgressMethodNotAllowed {
	return &V2UpdateHostLogsProgressMethodNotAllowed{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress method not allowed response has a 2xx status code
func (o *V2UpdateHostLogsProgressMethodNotAllowed) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress method not allowed response has a 3xx status code
func (o *V2UpdateHostLogsProgressMethodNotAllowed) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress method not allowed response has a 4xx status code
func (o *V2UpdateHostLogsProgressMethodNotAllowed) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 update host logs progress method not allowed response has a 5xx status code
func (o *V2UpdateHostLogsProgressMethodNotAllowed) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 update host logs progress method not allowed response a status code equal to that given
func (o *V2UpdateHostLogsProgressMethodNotAllowed) IsCode(code int) bool {
	return code == 405
}

func (o *V2UpdateHostLogsProgressMethodNotAllowed) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressMethodNotAllowed  %+v", 405, o.Payload)
}

func (o *V2UpdateHostLogsProgressMethodNotAllowed) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressMethodNotAllowed  %+v", 405, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressConflict creates a V2UpdateHostLogsProgressConflict with default headers values
func NewV2UpdateHostLogsProgressConflict() *V2UpdateHostLogsProgressConflict {
	return &V2UpdateHostLogsProgressConflict{}
}

/*
V2UpdateHostLogsProgressConflict describes a response with status code 409, with default header values.

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

// IsSuccess returns true when this v2 update host logs progress conflict response has a 2xx status code
func (o *V2UpdateHostLogsProgressConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress conflict response has a 3xx status code
func (o *V2UpdateHostLogsProgressConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress conflict response has a 4xx status code
func (o *V2UpdateHostLogsProgressConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 update host logs progress conflict response has a 5xx status code
func (o *V2UpdateHostLogsProgressConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 update host logs progress conflict response a status code equal to that given
func (o *V2UpdateHostLogsProgressConflict) IsCode(code int) bool {
	return code == 409
}

func (o *V2UpdateHostLogsProgressConflict) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressConflict  %+v", 409, o.Payload)
}

func (o *V2UpdateHostLogsProgressConflict) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressConflict  %+v", 409, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressInternalServerError creates a V2UpdateHostLogsProgressInternalServerError with default headers values
func NewV2UpdateHostLogsProgressInternalServerError() *V2UpdateHostLogsProgressInternalServerError {
	return &V2UpdateHostLogsProgressInternalServerError{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress internal server error response has a 2xx status code
func (o *V2UpdateHostLogsProgressInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress internal server error response has a 3xx status code
func (o *V2UpdateHostLogsProgressInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress internal server error response has a 4xx status code
func (o *V2UpdateHostLogsProgressInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 update host logs progress internal server error response has a 5xx status code
func (o *V2UpdateHostLogsProgressInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this v2 update host logs progress internal server error response a status code equal to that given
func (o *V2UpdateHostLogsProgressInternalServerError) IsCode(code int) bool {
	return code == 500
}

func (o *V2UpdateHostLogsProgressInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressInternalServerError  %+v", 500, o.Payload)
}

func (o *V2UpdateHostLogsProgressInternalServerError) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressInternalServerError  %+v", 500, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressNotImplemented creates a V2UpdateHostLogsProgressNotImplemented with default headers values
func NewV2UpdateHostLogsProgressNotImplemented() *V2UpdateHostLogsProgressNotImplemented {
	return &V2UpdateHostLogsProgressNotImplemented{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress not implemented response has a 2xx status code
func (o *V2UpdateHostLogsProgressNotImplemented) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress not implemented response has a 3xx status code
func (o *V2UpdateHostLogsProgressNotImplemented) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress not implemented response has a 4xx status code
func (o *V2UpdateHostLogsProgressNotImplemented) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 update host logs progress not implemented response has a 5xx status code
func (o *V2UpdateHostLogsProgressNotImplemented) IsServerError() bool {
	return true
}

// IsCode returns true when this v2 update host logs progress not implemented response a status code equal to that given
func (o *V2UpdateHostLogsProgressNotImplemented) IsCode(code int) bool {
	return code == 501
}

func (o *V2UpdateHostLogsProgressNotImplemented) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressNotImplemented  %+v", 501, o.Payload)
}

func (o *V2UpdateHostLogsProgressNotImplemented) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressNotImplemented  %+v", 501, o.Payload)
}

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

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

// NewV2UpdateHostLogsProgressServiceUnavailable creates a V2UpdateHostLogsProgressServiceUnavailable with default headers values
func NewV2UpdateHostLogsProgressServiceUnavailable() *V2UpdateHostLogsProgressServiceUnavailable {
	return &V2UpdateHostLogsProgressServiceUnavailable{}
}

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

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

// IsSuccess returns true when this v2 update host logs progress service unavailable response has a 2xx status code
func (o *V2UpdateHostLogsProgressServiceUnavailable) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 update host logs progress service unavailable response has a 3xx status code
func (o *V2UpdateHostLogsProgressServiceUnavailable) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 update host logs progress service unavailable response has a 4xx status code
func (o *V2UpdateHostLogsProgressServiceUnavailable) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 update host logs progress service unavailable response has a 5xx status code
func (o *V2UpdateHostLogsProgressServiceUnavailable) IsServerError() bool {
	return true
}

// IsCode returns true when this v2 update host logs progress service unavailable response a status code equal to that given
func (o *V2UpdateHostLogsProgressServiceUnavailable) IsCode(code int) bool {
	return code == 503
}

func (o *V2UpdateHostLogsProgressServiceUnavailable) Error() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressServiceUnavailable  %+v", 503, o.Payload)
}

func (o *V2UpdateHostLogsProgressServiceUnavailable) String() string {
	return fmt.Sprintf("[PUT /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress][%d] v2UpdateHostLogsProgressServiceUnavailable  %+v", 503, o.Payload)
}

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

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