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

// FilterKeywordPostReader is a Reader for the FilterKeywordPost structure.
type FilterKeywordPostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FilterKeywordPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFilterKeywordPostOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFilterKeywordPostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFilterKeywordPostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewFilterKeywordPostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFilterKeywordPostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFilterKeywordPostNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewFilterKeywordPostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewFilterKeywordPostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFilterKeywordPostInternalServerError()
		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/{id}/keywords] filterKeywordPost", response, response.Code())
	}
}

// NewFilterKeywordPostOK creates a FilterKeywordPostOK with default headers values
func NewFilterKeywordPostOK() *FilterKeywordPostOK {
	return &FilterKeywordPostOK{}
}

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

New filter keyword.
*/
type FilterKeywordPostOK struct {
	Payload *models.FilterKeyword
}

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

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

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

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

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

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

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

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

func (o *FilterKeywordPostOK) GetPayload() *models.FilterKeyword {
	return o.Payload
}

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

	o.Payload = new(models.FilterKeyword)

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

	return nil
}

// NewFilterKeywordPostBadRequest creates a FilterKeywordPostBadRequest with default headers values
func NewFilterKeywordPostBadRequest() *FilterKeywordPostBadRequest {
	return &FilterKeywordPostBadRequest{}
}

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

bad request
*/
type FilterKeywordPostBadRequest struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostUnauthorized creates a FilterKeywordPostUnauthorized with default headers values
func NewFilterKeywordPostUnauthorized() *FilterKeywordPostUnauthorized {
	return &FilterKeywordPostUnauthorized{}
}

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

unauthorized
*/
type FilterKeywordPostUnauthorized struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostForbidden creates a FilterKeywordPostForbidden with default headers values
func NewFilterKeywordPostForbidden() *FilterKeywordPostForbidden {
	return &FilterKeywordPostForbidden{}
}

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

forbidden to moved accounts
*/
type FilterKeywordPostForbidden struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostNotFound creates a FilterKeywordPostNotFound with default headers values
func NewFilterKeywordPostNotFound() *FilterKeywordPostNotFound {
	return &FilterKeywordPostNotFound{}
}

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

not found
*/
type FilterKeywordPostNotFound struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostNotAcceptable creates a FilterKeywordPostNotAcceptable with default headers values
func NewFilterKeywordPostNotAcceptable() *FilterKeywordPostNotAcceptable {
	return &FilterKeywordPostNotAcceptable{}
}

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

not acceptable
*/
type FilterKeywordPostNotAcceptable struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostConflict creates a FilterKeywordPostConflict with default headers values
func NewFilterKeywordPostConflict() *FilterKeywordPostConflict {
	return &FilterKeywordPostConflict{}
}

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

conflict (duplicate keyword)
*/
type FilterKeywordPostConflict struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostUnprocessableEntity creates a FilterKeywordPostUnprocessableEntity with default headers values
func NewFilterKeywordPostUnprocessableEntity() *FilterKeywordPostUnprocessableEntity {
	return &FilterKeywordPostUnprocessableEntity{}
}

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

unprocessable content
*/
type FilterKeywordPostUnprocessableEntity struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordPostInternalServerError creates a FilterKeywordPostInternalServerError with default headers values
func NewFilterKeywordPostInternalServerError() *FilterKeywordPostInternalServerError {
	return &FilterKeywordPostInternalServerError{}
}

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

internal server error
*/
type FilterKeywordPostInternalServerError struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}
