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

package admin

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

import (
	"encoding/json"
	"fmt"
	"io"

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

	"git.coopcloud.tech/decentral1se/gtslib/models"
)

// HeaderFilterAllowGetReader is a Reader for the HeaderFilterAllowGet structure.
type HeaderFilterAllowGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *HeaderFilterAllowGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewHeaderFilterAllowGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewHeaderFilterAllowGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewHeaderFilterAllowGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewHeaderFilterAllowGetForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewHeaderFilterAllowGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewHeaderFilterAllowGetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /api/v1/admin/header_allows/{id}] headerFilterAllowGet", response, response.Code())
	}
}

// NewHeaderFilterAllowGetOK creates a HeaderFilterAllowGetOK with default headers values
func NewHeaderFilterAllowGetOK() *HeaderFilterAllowGetOK {
	return &HeaderFilterAllowGetOK{}
}

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

The requested "allow" header filter.
*/
type HeaderFilterAllowGetOK struct {
	Payload *models.HeaderFilter
}

// IsSuccess returns true when this header filter allow get o k response has a 2xx status code
func (o *HeaderFilterAllowGetOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this header filter allow get o k response has a 3xx status code
func (o *HeaderFilterAllowGetOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this header filter allow get o k response has a 4xx status code
func (o *HeaderFilterAllowGetOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this header filter allow get o k response has a 5xx status code
func (o *HeaderFilterAllowGetOK) IsServerError() bool {
	return false
}

// IsCode returns true when this header filter allow get o k response a status code equal to that given
func (o *HeaderFilterAllowGetOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the header filter allow get o k response
func (o *HeaderFilterAllowGetOK) Code() int {
	return 200
}

func (o *HeaderFilterAllowGetOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetOK %s", 200, payload)
}

func (o *HeaderFilterAllowGetOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetOK %s", 200, payload)
}

func (o *HeaderFilterAllowGetOK) GetPayload() *models.HeaderFilter {
	return o.Payload
}

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

	o.Payload = new(models.HeaderFilter)

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

	return nil
}

// NewHeaderFilterAllowGetBadRequest creates a HeaderFilterAllowGetBadRequest with default headers values
func NewHeaderFilterAllowGetBadRequest() *HeaderFilterAllowGetBadRequest {
	return &HeaderFilterAllowGetBadRequest{}
}

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

bad request
*/
type HeaderFilterAllowGetBadRequest struct {
}

// IsSuccess returns true when this header filter allow get bad request response has a 2xx status code
func (o *HeaderFilterAllowGetBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this header filter allow get bad request response has a 3xx status code
func (o *HeaderFilterAllowGetBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this header filter allow get bad request response has a 4xx status code
func (o *HeaderFilterAllowGetBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this header filter allow get bad request response has a 5xx status code
func (o *HeaderFilterAllowGetBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this header filter allow get bad request response a status code equal to that given
func (o *HeaderFilterAllowGetBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the header filter allow get bad request response
func (o *HeaderFilterAllowGetBadRequest) Code() int {
	return 400
}

func (o *HeaderFilterAllowGetBadRequest) Error() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetBadRequest", 400)
}

func (o *HeaderFilterAllowGetBadRequest) String() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetBadRequest", 400)
}

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

	return nil
}

// NewHeaderFilterAllowGetUnauthorized creates a HeaderFilterAllowGetUnauthorized with default headers values
func NewHeaderFilterAllowGetUnauthorized() *HeaderFilterAllowGetUnauthorized {
	return &HeaderFilterAllowGetUnauthorized{}
}

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

unauthorized
*/
type HeaderFilterAllowGetUnauthorized struct {
}

// IsSuccess returns true when this header filter allow get unauthorized response has a 2xx status code
func (o *HeaderFilterAllowGetUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this header filter allow get unauthorized response has a 3xx status code
func (o *HeaderFilterAllowGetUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this header filter allow get unauthorized response has a 4xx status code
func (o *HeaderFilterAllowGetUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this header filter allow get unauthorized response has a 5xx status code
func (o *HeaderFilterAllowGetUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this header filter allow get unauthorized response a status code equal to that given
func (o *HeaderFilterAllowGetUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the header filter allow get unauthorized response
func (o *HeaderFilterAllowGetUnauthorized) Code() int {
	return 401
}

func (o *HeaderFilterAllowGetUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetUnauthorized", 401)
}

func (o *HeaderFilterAllowGetUnauthorized) String() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetUnauthorized", 401)
}

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

	return nil
}

// NewHeaderFilterAllowGetForbidden creates a HeaderFilterAllowGetForbidden with default headers values
func NewHeaderFilterAllowGetForbidden() *HeaderFilterAllowGetForbidden {
	return &HeaderFilterAllowGetForbidden{}
}

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

forbidden
*/
type HeaderFilterAllowGetForbidden struct {
}

// IsSuccess returns true when this header filter allow get forbidden response has a 2xx status code
func (o *HeaderFilterAllowGetForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this header filter allow get forbidden response has a 3xx status code
func (o *HeaderFilterAllowGetForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this header filter allow get forbidden response has a 4xx status code
func (o *HeaderFilterAllowGetForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this header filter allow get forbidden response has a 5xx status code
func (o *HeaderFilterAllowGetForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this header filter allow get forbidden response a status code equal to that given
func (o *HeaderFilterAllowGetForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the header filter allow get forbidden response
func (o *HeaderFilterAllowGetForbidden) Code() int {
	return 403
}

func (o *HeaderFilterAllowGetForbidden) Error() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetForbidden", 403)
}

func (o *HeaderFilterAllowGetForbidden) String() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetForbidden", 403)
}

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

	return nil
}

// NewHeaderFilterAllowGetNotFound creates a HeaderFilterAllowGetNotFound with default headers values
func NewHeaderFilterAllowGetNotFound() *HeaderFilterAllowGetNotFound {
	return &HeaderFilterAllowGetNotFound{}
}

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

not found
*/
type HeaderFilterAllowGetNotFound struct {
}

// IsSuccess returns true when this header filter allow get not found response has a 2xx status code
func (o *HeaderFilterAllowGetNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this header filter allow get not found response has a 3xx status code
func (o *HeaderFilterAllowGetNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this header filter allow get not found response has a 4xx status code
func (o *HeaderFilterAllowGetNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this header filter allow get not found response has a 5xx status code
func (o *HeaderFilterAllowGetNotFound) IsServerError() bool {
	return false
}

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

// Code gets the status code for the header filter allow get not found response
func (o *HeaderFilterAllowGetNotFound) Code() int {
	return 404
}

func (o *HeaderFilterAllowGetNotFound) Error() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetNotFound", 404)
}

func (o *HeaderFilterAllowGetNotFound) String() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetNotFound", 404)
}

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

	return nil
}

// NewHeaderFilterAllowGetInternalServerError creates a HeaderFilterAllowGetInternalServerError with default headers values
func NewHeaderFilterAllowGetInternalServerError() *HeaderFilterAllowGetInternalServerError {
	return &HeaderFilterAllowGetInternalServerError{}
}

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

internal server error
*/
type HeaderFilterAllowGetInternalServerError struct {
}

// IsSuccess returns true when this header filter allow get internal server error response has a 2xx status code
func (o *HeaderFilterAllowGetInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this header filter allow get internal server error response has a 3xx status code
func (o *HeaderFilterAllowGetInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this header filter allow get internal server error response has a 4xx status code
func (o *HeaderFilterAllowGetInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this header filter allow get internal server error response has a 5xx status code
func (o *HeaderFilterAllowGetInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this header filter allow get internal server error response a status code equal to that given
func (o *HeaderFilterAllowGetInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the header filter allow get internal server error response
func (o *HeaderFilterAllowGetInternalServerError) Code() int {
	return 500
}

func (o *HeaderFilterAllowGetInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetInternalServerError", 500)
}

func (o *HeaderFilterAllowGetInternalServerError) String() string {
	return fmt.Sprintf("[GET /api/v1/admin/header_allows/{id}][%d] headerFilterAllowGetInternalServerError", 500)
}

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

	return nil
}
