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

// FilterKeywordsGetReader is a Reader for the FilterKeywordsGet structure.
type FilterKeywordsGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FilterKeywordsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFilterKeywordsGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFilterKeywordsGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFilterKeywordsGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFilterKeywordsGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFilterKeywordsGetNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFilterKeywordsGetInternalServerError()
		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}/keywords] filterKeywordsGet", response, response.Code())
	}
}

// NewFilterKeywordsGetOK creates a FilterKeywordsGetOK with default headers values
func NewFilterKeywordsGetOK() *FilterKeywordsGetOK {
	return &FilterKeywordsGetOK{}
}

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

Requested filter keywords.
*/
type FilterKeywordsGetOK struct {
	Payload []*models.FilterKeyword
}

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

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

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

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

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

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

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

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

func (o *FilterKeywordsGetOK) GetPayload() []*models.FilterKeyword {
	return o.Payload
}

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

// NewFilterKeywordsGetBadRequest creates a FilterKeywordsGetBadRequest with default headers values
func NewFilterKeywordsGetBadRequest() *FilterKeywordsGetBadRequest {
	return &FilterKeywordsGetBadRequest{}
}

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

bad request
*/
type FilterKeywordsGetBadRequest struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordsGetUnauthorized creates a FilterKeywordsGetUnauthorized with default headers values
func NewFilterKeywordsGetUnauthorized() *FilterKeywordsGetUnauthorized {
	return &FilterKeywordsGetUnauthorized{}
}

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

unauthorized
*/
type FilterKeywordsGetUnauthorized struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordsGetNotFound creates a FilterKeywordsGetNotFound with default headers values
func NewFilterKeywordsGetNotFound() *FilterKeywordsGetNotFound {
	return &FilterKeywordsGetNotFound{}
}

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

not found
*/
type FilterKeywordsGetNotFound struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordsGetNotAcceptable creates a FilterKeywordsGetNotAcceptable with default headers values
func NewFilterKeywordsGetNotAcceptable() *FilterKeywordsGetNotAcceptable {
	return &FilterKeywordsGetNotAcceptable{}
}

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

not acceptable
*/
type FilterKeywordsGetNotAcceptable struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordsGetInternalServerError creates a FilterKeywordsGetInternalServerError with default headers values
func NewFilterKeywordsGetInternalServerError() *FilterKeywordsGetInternalServerError {
	return &FilterKeywordsGetInternalServerError{}
}

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

internal server error
*/
type FilterKeywordsGetInternalServerError struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}
