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

package read_only

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// FreezeReader is a Reader for the Freeze structure.
type FreezeReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FreezeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewFreezeNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewFreezeForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFreezeNotFound()
		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())
	}
}

// NewFreezeNoContent creates a FreezeNoContent with default headers values
func NewFreezeNoContent() *FreezeNoContent {
	return &FreezeNoContent{}
}

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

System is now read-only
*/
type FreezeNoContent struct {
}

// IsSuccess returns true when this freeze no content response has a 2xx status code
func (o *FreezeNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this freeze no content response has a 3xx status code
func (o *FreezeNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this freeze no content response has a 4xx status code
func (o *FreezeNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this freeze no content response has a 5xx status code
func (o *FreezeNoContent) IsServerError() bool {
	return false
}

// IsCode returns true when this freeze no content response a status code equal to that given
func (o *FreezeNoContent) IsCode(code int) bool {
	return code == 204
}

// Code gets the status code for the freeze no content response
func (o *FreezeNoContent) Code() int {
	return 204
}

func (o *FreezeNoContent) Error() string {
	return fmt.Sprintf("[POST /v1/read-only/freeze][%d] freezeNoContent ", 204)
}

func (o *FreezeNoContent) String() string {
	return fmt.Sprintf("[POST /v1/read-only/freeze][%d] freezeNoContent ", 204)
}

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

	return nil
}

// NewFreezeForbidden creates a FreezeForbidden with default headers values
func NewFreezeForbidden() *FreezeForbidden {
	return &FreezeForbidden{}
}

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

Authentication required
*/
type FreezeForbidden struct {
}

// IsSuccess returns true when this freeze forbidden response has a 2xx status code
func (o *FreezeForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this freeze forbidden response has a 3xx status code
func (o *FreezeForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this freeze forbidden response has a 4xx status code
func (o *FreezeForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this freeze forbidden response has a 5xx status code
func (o *FreezeForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this freeze forbidden response a status code equal to that given
func (o *FreezeForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the freeze forbidden response
func (o *FreezeForbidden) Code() int {
	return 403
}

func (o *FreezeForbidden) Error() string {
	return fmt.Sprintf("[POST /v1/read-only/freeze][%d] freezeForbidden ", 403)
}

func (o *FreezeForbidden) String() string {
	return fmt.Sprintf("[POST /v1/read-only/freeze][%d] freezeForbidden ", 403)
}

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

	return nil
}

// NewFreezeNotFound creates a FreezeNotFound with default headers values
func NewFreezeNotFound() *FreezeNotFound {
	return &FreezeNotFound{}
}

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

No change to read-only state
*/
type FreezeNotFound struct {
}

// IsSuccess returns true when this freeze not found response has a 2xx status code
func (o *FreezeNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this freeze not found response has a 3xx status code
func (o *FreezeNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this freeze not found response has a 4xx status code
func (o *FreezeNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this freeze not found response has a 5xx status code
func (o *FreezeNotFound) IsServerError() bool {
	return false
}

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

// Code gets the status code for the freeze not found response
func (o *FreezeNotFound) Code() int {
	return 404
}

func (o *FreezeNotFound) Error() string {
	return fmt.Sprintf("[POST /v1/read-only/freeze][%d] freezeNotFound ", 404)
}

func (o *FreezeNotFound) String() string {
	return fmt.Sprintf("[POST /v1/read-only/freeze][%d] freezeNotFound ", 404)
}

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

	return nil
}
