// Code generated by go-swagger; DO NOT EDIT.

package custom_emojis

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

// CustomEmojisGetReader is a Reader for the CustomEmojisGet structure.
type CustomEmojisGetReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *CustomEmojisGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewCustomEmojisGetOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewCustomEmojisGetUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewCustomEmojisGetNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewCustomEmojisGetInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /api/v1/custom_emojis] customEmojisGet", response, response.Code())
	}
}

// NewCustomEmojisGetOK creates a CustomEmojisGetOK with default headers values
func NewCustomEmojisGetOK() *CustomEmojisGetOK {
	return &CustomEmojisGetOK{}
}

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

Array of custom emojis.
*/
type CustomEmojisGetOK struct {
	Payload []*models.Emoji
}

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

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

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

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

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

// Code gets the status code for the custom emojis get o k response
func (o *CustomEmojisGetOK) Code() int {
	return 200
}

func (o *CustomEmojisGetOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetOK %s", 200, payload)
}

func (o *CustomEmojisGetOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetOK %s", 200, payload)
}

func (o *CustomEmojisGetOK) GetPayload() []*models.Emoji {
	return o.Payload
}

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

// NewCustomEmojisGetUnauthorized creates a CustomEmojisGetUnauthorized with default headers values
func NewCustomEmojisGetUnauthorized() *CustomEmojisGetUnauthorized {
	return &CustomEmojisGetUnauthorized{}
}

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

unauthorized
*/
type CustomEmojisGetUnauthorized struct {
}

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

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

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

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

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

// Code gets the status code for the custom emojis get unauthorized response
func (o *CustomEmojisGetUnauthorized) Code() int {
	return 401
}

func (o *CustomEmojisGetUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetUnauthorized", 401)
}

func (o *CustomEmojisGetUnauthorized) String() string {
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetUnauthorized", 401)
}

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

	return nil
}

// NewCustomEmojisGetNotAcceptable creates a CustomEmojisGetNotAcceptable with default headers values
func NewCustomEmojisGetNotAcceptable() *CustomEmojisGetNotAcceptable {
	return &CustomEmojisGetNotAcceptable{}
}

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

not acceptable
*/
type CustomEmojisGetNotAcceptable struct {
}

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

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

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

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

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

// Code gets the status code for the custom emojis get not acceptable response
func (o *CustomEmojisGetNotAcceptable) Code() int {
	return 406
}

func (o *CustomEmojisGetNotAcceptable) Error() string {
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetNotAcceptable", 406)
}

func (o *CustomEmojisGetNotAcceptable) String() string {
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetNotAcceptable", 406)
}

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

	return nil
}

// NewCustomEmojisGetInternalServerError creates a CustomEmojisGetInternalServerError with default headers values
func NewCustomEmojisGetInternalServerError() *CustomEmojisGetInternalServerError {
	return &CustomEmojisGetInternalServerError{}
}

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

internal server error
*/
type CustomEmojisGetInternalServerError struct {
}

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

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

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

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

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

// Code gets the status code for the custom emojis get internal server error response
func (o *CustomEmojisGetInternalServerError) Code() int {
	return 500
}

func (o *CustomEmojisGetInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetInternalServerError", 500)
}

func (o *CustomEmojisGetInternalServerError) String() string {
	return fmt.Sprintf("[GET /api/v1/custom_emojis][%d] customEmojisGetInternalServerError", 500)
}

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

	return nil
}
