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

// FilterV2GetReader is a Reader for the FilterV2Get structure.
type FilterV2GetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FilterV2GetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFilterV2GetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFilterV2GetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFilterV2GetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFilterV2GetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFilterV2GetNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFilterV2GetInternalServerError()
		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/{id}] filterV2Get", response, response.Code())
	}
}

// NewFilterV2GetOK creates a FilterV2GetOK with default headers values
func NewFilterV2GetOK() *FilterV2GetOK {
	return &FilterV2GetOK{}
}

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

Requested filter.
*/
type FilterV2GetOK struct {
	Payload *models.FilterV2
}

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

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

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

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

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

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

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

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

func (o *FilterV2GetOK) GetPayload() *models.FilterV2 {
	return o.Payload
}

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

	o.Payload = new(models.FilterV2)

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

	return nil
}

// NewFilterV2GetBadRequest creates a FilterV2GetBadRequest with default headers values
func NewFilterV2GetBadRequest() *FilterV2GetBadRequest {
	return &FilterV2GetBadRequest{}
}

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

bad request
*/
type FilterV2GetBadRequest struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2GetUnauthorized creates a FilterV2GetUnauthorized with default headers values
func NewFilterV2GetUnauthorized() *FilterV2GetUnauthorized {
	return &FilterV2GetUnauthorized{}
}

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

unauthorized
*/
type FilterV2GetUnauthorized struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2GetNotFound creates a FilterV2GetNotFound with default headers values
func NewFilterV2GetNotFound() *FilterV2GetNotFound {
	return &FilterV2GetNotFound{}
}

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

not found
*/
type FilterV2GetNotFound struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2GetNotAcceptable creates a FilterV2GetNotAcceptable with default headers values
func NewFilterV2GetNotAcceptable() *FilterV2GetNotAcceptable {
	return &FilterV2GetNotAcceptable{}
}

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

not acceptable
*/
type FilterV2GetNotAcceptable struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2GetInternalServerError creates a FilterV2GetInternalServerError with default headers values
func NewFilterV2GetInternalServerError() *FilterV2GetInternalServerError {
	return &FilterV2GetInternalServerError{}
}

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

internal server error
*/
type FilterV2GetInternalServerError struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}
