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

// FilterKeywordGetReader is a Reader for the FilterKeywordGet structure.
type FilterKeywordGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *FilterKeywordGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewFilterKeywordGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewFilterKeywordGetBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewFilterKeywordGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewFilterKeywordGetNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewFilterKeywordGetNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewFilterKeywordGetInternalServerError()
		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/keywords/{id}] filterKeywordGet", response, response.Code())
	}
}

// NewFilterKeywordGetOK creates a FilterKeywordGetOK with default headers values
func NewFilterKeywordGetOK() *FilterKeywordGetOK {
	return &FilterKeywordGetOK{}
}

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

Requested filter keyword.
*/
type FilterKeywordGetOK struct {
	Payload *models.FilterKeyword
}

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

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

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

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

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

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

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

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

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

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

// NewFilterKeywordGetBadRequest creates a FilterKeywordGetBadRequest with default headers values
func NewFilterKeywordGetBadRequest() *FilterKeywordGetBadRequest {
	return &FilterKeywordGetBadRequest{}
}

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

bad request
*/
type FilterKeywordGetBadRequest struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordGetUnauthorized creates a FilterKeywordGetUnauthorized with default headers values
func NewFilterKeywordGetUnauthorized() *FilterKeywordGetUnauthorized {
	return &FilterKeywordGetUnauthorized{}
}

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

unauthorized
*/
type FilterKeywordGetUnauthorized struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordGetNotFound creates a FilterKeywordGetNotFound with default headers values
func NewFilterKeywordGetNotFound() *FilterKeywordGetNotFound {
	return &FilterKeywordGetNotFound{}
}

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

not found
*/
type FilterKeywordGetNotFound struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordGetNotAcceptable creates a FilterKeywordGetNotAcceptable with default headers values
func NewFilterKeywordGetNotAcceptable() *FilterKeywordGetNotAcceptable {
	return &FilterKeywordGetNotAcceptable{}
}

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

not acceptable
*/
type FilterKeywordGetNotAcceptable struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}

// NewFilterKeywordGetInternalServerError creates a FilterKeywordGetInternalServerError with default headers values
func NewFilterKeywordGetInternalServerError() *FilterKeywordGetInternalServerError {
	return &FilterKeywordGetInternalServerError{}
}

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

internal server error
*/
type FilterKeywordGetInternalServerError struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}
