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

// FiltersV2GetReader is a Reader for the FiltersV2Get structure.
type FiltersV2GetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FiltersV2GetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFiltersV2GetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFiltersV2GetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFiltersV2GetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFiltersV2GetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFiltersV2GetNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFiltersV2GetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /api/v2/filters] filtersV2Get", response, response.Code())
	}
}

// NewFiltersV2GetOK creates a FiltersV2GetOK with default headers values
func NewFiltersV2GetOK() *FiltersV2GetOK {
	return &FiltersV2GetOK{}
}

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

Requested filters.
*/
type FiltersV2GetOK struct {
	Payload []*models.FilterV2
}

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

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

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

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

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

// Code gets the status code for the filters v2 get o k response
func (o *FiltersV2GetOK) Code() int {
	return 200
}

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

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

func (o *FiltersV2GetOK) GetPayload() []*models.FilterV2 {
	return o.Payload
}

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

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

	return nil
}

// NewFiltersV2GetBadRequest creates a FiltersV2GetBadRequest with default headers values
func NewFiltersV2GetBadRequest() *FiltersV2GetBadRequest {
	return &FiltersV2GetBadRequest{}
}

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

bad request
*/
type FiltersV2GetBadRequest struct {
}

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

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

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

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

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

// Code gets the status code for the filters v2 get bad request response
func (o *FiltersV2GetBadRequest) Code() int {
	return 400
}

func (o *FiltersV2GetBadRequest) Error() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetBadRequest", 400)
}

func (o *FiltersV2GetBadRequest) String() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetBadRequest", 400)
}

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

	return nil
}

// NewFiltersV2GetUnauthorized creates a FiltersV2GetUnauthorized with default headers values
func NewFiltersV2GetUnauthorized() *FiltersV2GetUnauthorized {
	return &FiltersV2GetUnauthorized{}
}

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

unauthorized
*/
type FiltersV2GetUnauthorized struct {
}

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

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

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

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

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

// Code gets the status code for the filters v2 get unauthorized response
func (o *FiltersV2GetUnauthorized) Code() int {
	return 401
}

func (o *FiltersV2GetUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetUnauthorized", 401)
}

func (o *FiltersV2GetUnauthorized) String() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetUnauthorized", 401)
}

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

	return nil
}

// NewFiltersV2GetNotFound creates a FiltersV2GetNotFound with default headers values
func NewFiltersV2GetNotFound() *FiltersV2GetNotFound {
	return &FiltersV2GetNotFound{}
}

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

not found
*/
type FiltersV2GetNotFound struct {
}

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

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

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

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

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

// Code gets the status code for the filters v2 get not found response
func (o *FiltersV2GetNotFound) Code() int {
	return 404
}

func (o *FiltersV2GetNotFound) Error() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetNotFound", 404)
}

func (o *FiltersV2GetNotFound) String() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetNotFound", 404)
}

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

	return nil
}

// NewFiltersV2GetNotAcceptable creates a FiltersV2GetNotAcceptable with default headers values
func NewFiltersV2GetNotAcceptable() *FiltersV2GetNotAcceptable {
	return &FiltersV2GetNotAcceptable{}
}

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

not acceptable
*/
type FiltersV2GetNotAcceptable struct {
}

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

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

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

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

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

// Code gets the status code for the filters v2 get not acceptable response
func (o *FiltersV2GetNotAcceptable) Code() int {
	return 406
}

func (o *FiltersV2GetNotAcceptable) Error() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetNotAcceptable", 406)
}

func (o *FiltersV2GetNotAcceptable) String() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetNotAcceptable", 406)
}

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

	return nil
}

// NewFiltersV2GetInternalServerError creates a FiltersV2GetInternalServerError with default headers values
func NewFiltersV2GetInternalServerError() *FiltersV2GetInternalServerError {
	return &FiltersV2GetInternalServerError{}
}

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

internal server error
*/
type FiltersV2GetInternalServerError struct {
}

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

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

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

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

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

// Code gets the status code for the filters v2 get internal server error response
func (o *FiltersV2GetInternalServerError) Code() int {
	return 500
}

func (o *FiltersV2GetInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetInternalServerError", 500)
}

func (o *FiltersV2GetInternalServerError) String() string {
	return fmt.Sprintf("[GET /api/v2/filters][%d] filtersV2GetInternalServerError", 500)
}

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

	return nil
}
