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

package filters

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

// FilterV1GetReader is a Reader for the FilterV1Get structure.
type FilterV1GetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FilterV1GetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFilterV1GetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFilterV1GetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFilterV1GetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFilterV1GetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFilterV1GetNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFilterV1GetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /api/v1/filters/{id}] filterV1Get", response, response.Code())
	}
}

// NewFilterV1GetOK creates a FilterV1GetOK with default headers values
func NewFilterV1GetOK() *FilterV1GetOK {
	return &FilterV1GetOK{}
}

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

Requested filter.
*/
type FilterV1GetOK struct {
	Payload *models.FilterV1
}

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

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

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

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

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

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

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

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

func (o *FilterV1GetOK) GetPayload() *models.FilterV1 {
	return o.Payload
}

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

	o.Payload = new(models.FilterV1)

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

	return nil
}

// NewFilterV1GetBadRequest creates a FilterV1GetBadRequest with default headers values
func NewFilterV1GetBadRequest() *FilterV1GetBadRequest {
	return &FilterV1GetBadRequest{}
}

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

bad request
*/
type FilterV1GetBadRequest struct {
}

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

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

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

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

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

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

func (o *FilterV1GetBadRequest) Error() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetBadRequest", 400)
}

func (o *FilterV1GetBadRequest) String() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetBadRequest", 400)
}

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

	return nil
}

// NewFilterV1GetUnauthorized creates a FilterV1GetUnauthorized with default headers values
func NewFilterV1GetUnauthorized() *FilterV1GetUnauthorized {
	return &FilterV1GetUnauthorized{}
}

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

unauthorized
*/
type FilterV1GetUnauthorized struct {
}

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

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

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

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

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

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

func (o *FilterV1GetUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetUnauthorized", 401)
}

func (o *FilterV1GetUnauthorized) String() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetUnauthorized", 401)
}

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

	return nil
}

// NewFilterV1GetNotFound creates a FilterV1GetNotFound with default headers values
func NewFilterV1GetNotFound() *FilterV1GetNotFound {
	return &FilterV1GetNotFound{}
}

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

not found
*/
type FilterV1GetNotFound struct {
}

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

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

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

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

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

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

func (o *FilterV1GetNotFound) Error() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetNotFound", 404)
}

func (o *FilterV1GetNotFound) String() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetNotFound", 404)
}

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

	return nil
}

// NewFilterV1GetNotAcceptable creates a FilterV1GetNotAcceptable with default headers values
func NewFilterV1GetNotAcceptable() *FilterV1GetNotAcceptable {
	return &FilterV1GetNotAcceptable{}
}

/*
FilterV1GetNotAcceptable describes a response with status code 406, with default header values.

not acceptable
*/
type FilterV1GetNotAcceptable struct {
}

// IsSuccess returns true when this filter v1 get not acceptable response has a 2xx status code
func (o *FilterV1GetNotAcceptable) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this filter v1 get not acceptable response has a 3xx status code
func (o *FilterV1GetNotAcceptable) IsRedirect() bool {
	return false
}

// IsClientError returns true when this filter v1 get not acceptable response has a 4xx status code
func (o *FilterV1GetNotAcceptable) IsClientError() bool {
	return true
}

// IsServerError returns true when this filter v1 get not acceptable response has a 5xx status code
func (o *FilterV1GetNotAcceptable) IsServerError() bool {
	return false
}

// IsCode returns true when this filter v1 get not acceptable response a status code equal to that given
func (o *FilterV1GetNotAcceptable) IsCode(code int) bool {
	return code == 406
}

// Code gets the status code for the filter v1 get not acceptable response
func (o *FilterV1GetNotAcceptable) Code() int {
	return 406
}

func (o *FilterV1GetNotAcceptable) Error() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetNotAcceptable", 406)
}

func (o *FilterV1GetNotAcceptable) String() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetNotAcceptable", 406)
}

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

	return nil
}

// NewFilterV1GetInternalServerError creates a FilterV1GetInternalServerError with default headers values
func NewFilterV1GetInternalServerError() *FilterV1GetInternalServerError {
	return &FilterV1GetInternalServerError{}
}

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

internal server error
*/
type FilterV1GetInternalServerError struct {
}

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

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

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

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

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

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

func (o *FilterV1GetInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetInternalServerError", 500)
}

func (o *FilterV1GetInternalServerError) String() string {
	return fmt.Sprintf("[GET /api/v1/filters/{id}][%d] filterV1GetInternalServerError", 500)
}

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

	return nil
}
