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

// FilterV2PostReader is a Reader for the FilterV2Post structure.
type FilterV2PostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FilterV2PostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFilterV2PostOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFilterV2PostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFilterV2PostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewFilterV2PostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFilterV2PostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFilterV2PostNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewFilterV2PostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewFilterV2PostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFilterV2PostInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[POST /api/v2/filters] filterV2Post", response, response.Code())
	}
}

// NewFilterV2PostOK creates a FilterV2PostOK with default headers values
func NewFilterV2PostOK() *FilterV2PostOK {
	return &FilterV2PostOK{}
}

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

New filter.
*/
type FilterV2PostOK struct {
	Payload *models.FilterV2
}

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

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

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

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

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

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

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

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

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

func (o *FilterV2PostOK) 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
}

// NewFilterV2PostBadRequest creates a FilterV2PostBadRequest with default headers values
func NewFilterV2PostBadRequest() *FilterV2PostBadRequest {
	return &FilterV2PostBadRequest{}
}

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

bad request
*/
type FilterV2PostBadRequest struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2PostUnauthorized creates a FilterV2PostUnauthorized with default headers values
func NewFilterV2PostUnauthorized() *FilterV2PostUnauthorized {
	return &FilterV2PostUnauthorized{}
}

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

unauthorized
*/
type FilterV2PostUnauthorized struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2PostForbidden creates a FilterV2PostForbidden with default headers values
func NewFilterV2PostForbidden() *FilterV2PostForbidden {
	return &FilterV2PostForbidden{}
}

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

forbidden to moved accounts
*/
type FilterV2PostForbidden struct {
}

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

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

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

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

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

// Code gets the status code for the filter v2 post forbidden response
func (o *FilterV2PostForbidden) Code() int {
	return 403
}

func (o *FilterV2PostForbidden) Error() string {
	return fmt.Sprintf("[POST /api/v2/filters][%d] filterV2PostForbidden", 403)
}

func (o *FilterV2PostForbidden) String() string {
	return fmt.Sprintf("[POST /api/v2/filters][%d] filterV2PostForbidden", 403)
}

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

	return nil
}

// NewFilterV2PostNotFound creates a FilterV2PostNotFound with default headers values
func NewFilterV2PostNotFound() *FilterV2PostNotFound {
	return &FilterV2PostNotFound{}
}

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

not found
*/
type FilterV2PostNotFound struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2PostNotAcceptable creates a FilterV2PostNotAcceptable with default headers values
func NewFilterV2PostNotAcceptable() *FilterV2PostNotAcceptable {
	return &FilterV2PostNotAcceptable{}
}

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

not acceptable
*/
type FilterV2PostNotAcceptable struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterV2PostConflict creates a FilterV2PostConflict with default headers values
func NewFilterV2PostConflict() *FilterV2PostConflict {
	return &FilterV2PostConflict{}
}

/*
FilterV2PostConflict describes a response with status code 409, with default header values.

conflict (duplicate title, keyword, or status)
*/
type FilterV2PostConflict struct {
}

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

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

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

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

// IsCode returns true when this filter v2 post conflict response a status code equal to that given
func (o *FilterV2PostConflict) IsCode(code int) bool {
	return code == 409
}

// Code gets the status code for the filter v2 post conflict response
func (o *FilterV2PostConflict) Code() int {
	return 409
}

func (o *FilterV2PostConflict) Error() string {
	return fmt.Sprintf("[POST /api/v2/filters][%d] filterV2PostConflict", 409)
}

func (o *FilterV2PostConflict) String() string {
	return fmt.Sprintf("[POST /api/v2/filters][%d] filterV2PostConflict", 409)
}

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

	return nil
}

// NewFilterV2PostUnprocessableEntity creates a FilterV2PostUnprocessableEntity with default headers values
func NewFilterV2PostUnprocessableEntity() *FilterV2PostUnprocessableEntity {
	return &FilterV2PostUnprocessableEntity{}
}

/*
FilterV2PostUnprocessableEntity describes a response with status code 422, with default header values.

unprocessable content
*/
type FilterV2PostUnprocessableEntity struct {
}

// IsSuccess returns true when this filter v2 post unprocessable entity response has a 2xx status code
func (o *FilterV2PostUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this filter v2 post unprocessable entity response has a 3xx status code
func (o *FilterV2PostUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this filter v2 post unprocessable entity response has a 4xx status code
func (o *FilterV2PostUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this filter v2 post unprocessable entity response has a 5xx status code
func (o *FilterV2PostUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this filter v2 post unprocessable entity response a status code equal to that given
func (o *FilterV2PostUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the filter v2 post unprocessable entity response
func (o *FilterV2PostUnprocessableEntity) Code() int {
	return 422
}

func (o *FilterV2PostUnprocessableEntity) Error() string {
	return fmt.Sprintf("[POST /api/v2/filters][%d] filterV2PostUnprocessableEntity", 422)
}

func (o *FilterV2PostUnprocessableEntity) String() string {
	return fmt.Sprintf("[POST /api/v2/filters][%d] filterV2PostUnprocessableEntity", 422)
}

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

	return nil
}

// NewFilterV2PostInternalServerError creates a FilterV2PostInternalServerError with default headers values
func NewFilterV2PostInternalServerError() *FilterV2PostInternalServerError {
	return &FilterV2PostInternalServerError{}
}

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

internal server error
*/
type FilterV2PostInternalServerError struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}
