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

package manifests

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

// V2DeleteClusterManifestReader is a Reader for the V2DeleteClusterManifest structure.
type V2DeleteClusterManifestReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *V2DeleteClusterManifestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewV2DeleteClusterManifestOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewV2DeleteClusterManifestUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewV2DeleteClusterManifestForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewV2DeleteClusterManifestNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 405:
		result := NewV2DeleteClusterManifestMethodNotAllowed()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewV2DeleteClusterManifestConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewV2DeleteClusterManifestInternalServerError()
		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())
	}
}

// NewV2DeleteClusterManifestOK creates a V2DeleteClusterManifestOK with default headers values
func NewV2DeleteClusterManifestOK() *V2DeleteClusterManifestOK {
	return &V2DeleteClusterManifestOK{}
}

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

Success.
*/
type V2DeleteClusterManifestOK struct {
}

// IsSuccess returns true when this v2 delete cluster manifest o k response has a 2xx status code
func (o *V2DeleteClusterManifestOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this v2 delete cluster manifest o k response has a 3xx status code
func (o *V2DeleteClusterManifestOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 delete cluster manifest o k response has a 4xx status code
func (o *V2DeleteClusterManifestOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this v2 delete cluster manifest o k response has a 5xx status code
func (o *V2DeleteClusterManifestOK) IsServerError() bool {
	return false
}

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

func (o *V2DeleteClusterManifestOK) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestOK ", 200)
}

func (o *V2DeleteClusterManifestOK) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestOK ", 200)
}

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

	return nil
}

// NewV2DeleteClusterManifestUnauthorized creates a V2DeleteClusterManifestUnauthorized with default headers values
func NewV2DeleteClusterManifestUnauthorized() *V2DeleteClusterManifestUnauthorized {
	return &V2DeleteClusterManifestUnauthorized{}
}

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

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

// IsSuccess returns true when this v2 delete cluster manifest unauthorized response has a 2xx status code
func (o *V2DeleteClusterManifestUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 delete cluster manifest unauthorized response has a 3xx status code
func (o *V2DeleteClusterManifestUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 delete cluster manifest unauthorized response has a 4xx status code
func (o *V2DeleteClusterManifestUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 delete cluster manifest unauthorized response has a 5xx status code
func (o *V2DeleteClusterManifestUnauthorized) IsServerError() bool {
	return false
}

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

func (o *V2DeleteClusterManifestUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestUnauthorized  %+v", 401, o.Payload)
}

func (o *V2DeleteClusterManifestUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewV2DeleteClusterManifestForbidden creates a V2DeleteClusterManifestForbidden with default headers values
func NewV2DeleteClusterManifestForbidden() *V2DeleteClusterManifestForbidden {
	return &V2DeleteClusterManifestForbidden{}
}

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

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

// IsSuccess returns true when this v2 delete cluster manifest forbidden response has a 2xx status code
func (o *V2DeleteClusterManifestForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 delete cluster manifest forbidden response has a 3xx status code
func (o *V2DeleteClusterManifestForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 delete cluster manifest forbidden response has a 4xx status code
func (o *V2DeleteClusterManifestForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 delete cluster manifest forbidden response has a 5xx status code
func (o *V2DeleteClusterManifestForbidden) IsServerError() bool {
	return false
}

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

func (o *V2DeleteClusterManifestForbidden) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestForbidden  %+v", 403, o.Payload)
}

func (o *V2DeleteClusterManifestForbidden) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestForbidden  %+v", 403, o.Payload)
}

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

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

// NewV2DeleteClusterManifestNotFound creates a V2DeleteClusterManifestNotFound with default headers values
func NewV2DeleteClusterManifestNotFound() *V2DeleteClusterManifestNotFound {
	return &V2DeleteClusterManifestNotFound{}
}

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

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

// IsSuccess returns true when this v2 delete cluster manifest not found response has a 2xx status code
func (o *V2DeleteClusterManifestNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 delete cluster manifest not found response has a 3xx status code
func (o *V2DeleteClusterManifestNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 delete cluster manifest not found response has a 4xx status code
func (o *V2DeleteClusterManifestNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 delete cluster manifest not found response has a 5xx status code
func (o *V2DeleteClusterManifestNotFound) IsServerError() bool {
	return false
}

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

func (o *V2DeleteClusterManifestNotFound) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestNotFound  %+v", 404, o.Payload)
}

func (o *V2DeleteClusterManifestNotFound) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestNotFound  %+v", 404, o.Payload)
}

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

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

// NewV2DeleteClusterManifestMethodNotAllowed creates a V2DeleteClusterManifestMethodNotAllowed with default headers values
func NewV2DeleteClusterManifestMethodNotAllowed() *V2DeleteClusterManifestMethodNotAllowed {
	return &V2DeleteClusterManifestMethodNotAllowed{}
}

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

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

// IsSuccess returns true when this v2 delete cluster manifest method not allowed response has a 2xx status code
func (o *V2DeleteClusterManifestMethodNotAllowed) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 delete cluster manifest method not allowed response has a 3xx status code
func (o *V2DeleteClusterManifestMethodNotAllowed) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 delete cluster manifest method not allowed response has a 4xx status code
func (o *V2DeleteClusterManifestMethodNotAllowed) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 delete cluster manifest method not allowed response has a 5xx status code
func (o *V2DeleteClusterManifestMethodNotAllowed) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 delete cluster manifest method not allowed response a status code equal to that given
func (o *V2DeleteClusterManifestMethodNotAllowed) IsCode(code int) bool {
	return code == 405
}

func (o *V2DeleteClusterManifestMethodNotAllowed) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestMethodNotAllowed  %+v", 405, o.Payload)
}

func (o *V2DeleteClusterManifestMethodNotAllowed) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestMethodNotAllowed  %+v", 405, o.Payload)
}

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

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

// NewV2DeleteClusterManifestConflict creates a V2DeleteClusterManifestConflict with default headers values
func NewV2DeleteClusterManifestConflict() *V2DeleteClusterManifestConflict {
	return &V2DeleteClusterManifestConflict{}
}

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

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

// IsSuccess returns true when this v2 delete cluster manifest conflict response has a 2xx status code
func (o *V2DeleteClusterManifestConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this v2 delete cluster manifest conflict response has a 3xx status code
func (o *V2DeleteClusterManifestConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this v2 delete cluster manifest conflict response has a 4xx status code
func (o *V2DeleteClusterManifestConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this v2 delete cluster manifest conflict response has a 5xx status code
func (o *V2DeleteClusterManifestConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this v2 delete cluster manifest conflict response a status code equal to that given
func (o *V2DeleteClusterManifestConflict) IsCode(code int) bool {
	return code == 409
}

func (o *V2DeleteClusterManifestConflict) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestConflict  %+v", 409, o.Payload)
}

func (o *V2DeleteClusterManifestConflict) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestConflict  %+v", 409, o.Payload)
}

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

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

// NewV2DeleteClusterManifestInternalServerError creates a V2DeleteClusterManifestInternalServerError with default headers values
func NewV2DeleteClusterManifestInternalServerError() *V2DeleteClusterManifestInternalServerError {
	return &V2DeleteClusterManifestInternalServerError{}
}

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

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

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

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

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

// IsServerError returns true when this v2 delete cluster manifest internal server error response has a 5xx status code
func (o *V2DeleteClusterManifestInternalServerError) IsServerError() bool {
	return true
}

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

func (o *V2DeleteClusterManifestInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestInternalServerError  %+v", 500, o.Payload)
}

func (o *V2DeleteClusterManifestInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /v2/clusters/{cluster_id}/manifests][%d] v2DeleteClusterManifestInternalServerError  %+v", 500, o.Payload)
}

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

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