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

package admin

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

// EmojiCreateReader is a Reader for the EmojiCreate structure.
type EmojiCreateReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *EmojiCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewEmojiCreateOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewEmojiCreateBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewEmojiCreateUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewEmojiCreateForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewEmojiCreateNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewEmojiCreateNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewEmojiCreateConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewEmojiCreateInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[POST /api/v1/admin/custom_emojis] emojiCreate", response, response.Code())
	}
}

// NewEmojiCreateOK creates a EmojiCreateOK with default headers values
func NewEmojiCreateOK() *EmojiCreateOK {
	return &EmojiCreateOK{}
}

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

The newly-created emoji.
*/
type EmojiCreateOK struct {
	Payload *models.Emoji
}

// IsSuccess returns true when this emoji create o k response has a 2xx status code
func (o *EmojiCreateOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this emoji create o k response has a 3xx status code
func (o *EmojiCreateOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create o k response has a 4xx status code
func (o *EmojiCreateOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this emoji create o k response has a 5xx status code
func (o *EmojiCreateOK) IsServerError() bool {
	return false
}

// IsCode returns true when this emoji create o k response a status code equal to that given
func (o *EmojiCreateOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the emoji create o k response
func (o *EmojiCreateOK) Code() int {
	return 200
}

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

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

func (o *EmojiCreateOK) GetPayload() *models.Emoji {
	return o.Payload
}

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

	o.Payload = new(models.Emoji)

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

	return nil
}

// NewEmojiCreateBadRequest creates a EmojiCreateBadRequest with default headers values
func NewEmojiCreateBadRequest() *EmojiCreateBadRequest {
	return &EmojiCreateBadRequest{}
}

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

bad request
*/
type EmojiCreateBadRequest struct {
}

// IsSuccess returns true when this emoji create bad request response has a 2xx status code
func (o *EmojiCreateBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create bad request response has a 3xx status code
func (o *EmojiCreateBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create bad request response has a 4xx status code
func (o *EmojiCreateBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this emoji create bad request response has a 5xx status code
func (o *EmojiCreateBadRequest) IsServerError() bool {
	return false
}

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

// Code gets the status code for the emoji create bad request response
func (o *EmojiCreateBadRequest) Code() int {
	return 400
}

func (o *EmojiCreateBadRequest) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateBadRequest", 400)
}

func (o *EmojiCreateBadRequest) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateBadRequest", 400)
}

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

	return nil
}

// NewEmojiCreateUnauthorized creates a EmojiCreateUnauthorized with default headers values
func NewEmojiCreateUnauthorized() *EmojiCreateUnauthorized {
	return &EmojiCreateUnauthorized{}
}

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

unauthorized
*/
type EmojiCreateUnauthorized struct {
}

// IsSuccess returns true when this emoji create unauthorized response has a 2xx status code
func (o *EmojiCreateUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create unauthorized response has a 3xx status code
func (o *EmojiCreateUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create unauthorized response has a 4xx status code
func (o *EmojiCreateUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this emoji create unauthorized response has a 5xx status code
func (o *EmojiCreateUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this emoji create unauthorized response a status code equal to that given
func (o *EmojiCreateUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the emoji create unauthorized response
func (o *EmojiCreateUnauthorized) Code() int {
	return 401
}

func (o *EmojiCreateUnauthorized) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateUnauthorized", 401)
}

func (o *EmojiCreateUnauthorized) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateUnauthorized", 401)
}

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

	return nil
}

// NewEmojiCreateForbidden creates a EmojiCreateForbidden with default headers values
func NewEmojiCreateForbidden() *EmojiCreateForbidden {
	return &EmojiCreateForbidden{}
}

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

forbidden
*/
type EmojiCreateForbidden struct {
}

// IsSuccess returns true when this emoji create forbidden response has a 2xx status code
func (o *EmojiCreateForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create forbidden response has a 3xx status code
func (o *EmojiCreateForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create forbidden response has a 4xx status code
func (o *EmojiCreateForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this emoji create forbidden response has a 5xx status code
func (o *EmojiCreateForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this emoji create forbidden response a status code equal to that given
func (o *EmojiCreateForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the emoji create forbidden response
func (o *EmojiCreateForbidden) Code() int {
	return 403
}

func (o *EmojiCreateForbidden) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateForbidden", 403)
}

func (o *EmojiCreateForbidden) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateForbidden", 403)
}

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

	return nil
}

// NewEmojiCreateNotFound creates a EmojiCreateNotFound with default headers values
func NewEmojiCreateNotFound() *EmojiCreateNotFound {
	return &EmojiCreateNotFound{}
}

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

not found
*/
type EmojiCreateNotFound struct {
}

// IsSuccess returns true when this emoji create not found response has a 2xx status code
func (o *EmojiCreateNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create not found response has a 3xx status code
func (o *EmojiCreateNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create not found response has a 4xx status code
func (o *EmojiCreateNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this emoji create not found response has a 5xx status code
func (o *EmojiCreateNotFound) IsServerError() bool {
	return false
}

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

// Code gets the status code for the emoji create not found response
func (o *EmojiCreateNotFound) Code() int {
	return 404
}

func (o *EmojiCreateNotFound) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateNotFound", 404)
}

func (o *EmojiCreateNotFound) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateNotFound", 404)
}

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

	return nil
}

// NewEmojiCreateNotAcceptable creates a EmojiCreateNotAcceptable with default headers values
func NewEmojiCreateNotAcceptable() *EmojiCreateNotAcceptable {
	return &EmojiCreateNotAcceptable{}
}

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

not acceptable
*/
type EmojiCreateNotAcceptable struct {
}

// IsSuccess returns true when this emoji create not acceptable response has a 2xx status code
func (o *EmojiCreateNotAcceptable) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create not acceptable response has a 3xx status code
func (o *EmojiCreateNotAcceptable) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create not acceptable response has a 4xx status code
func (o *EmojiCreateNotAcceptable) IsClientError() bool {
	return true
}

// IsServerError returns true when this emoji create not acceptable response has a 5xx status code
func (o *EmojiCreateNotAcceptable) IsServerError() bool {
	return false
}

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

// Code gets the status code for the emoji create not acceptable response
func (o *EmojiCreateNotAcceptable) Code() int {
	return 406
}

func (o *EmojiCreateNotAcceptable) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateNotAcceptable", 406)
}

func (o *EmojiCreateNotAcceptable) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateNotAcceptable", 406)
}

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

	return nil
}

// NewEmojiCreateConflict creates a EmojiCreateConflict with default headers values
func NewEmojiCreateConflict() *EmojiCreateConflict {
	return &EmojiCreateConflict{}
}

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

conflict -- shortcode for this emoji is already in use
*/
type EmojiCreateConflict struct {
}

// IsSuccess returns true when this emoji create conflict response has a 2xx status code
func (o *EmojiCreateConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create conflict response has a 3xx status code
func (o *EmojiCreateConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create conflict response has a 4xx status code
func (o *EmojiCreateConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this emoji create conflict response has a 5xx status code
func (o *EmojiCreateConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this emoji create conflict response a status code equal to that given
func (o *EmojiCreateConflict) IsCode(code int) bool {
	return code == 409
}

// Code gets the status code for the emoji create conflict response
func (o *EmojiCreateConflict) Code() int {
	return 409
}

func (o *EmojiCreateConflict) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateConflict", 409)
}

func (o *EmojiCreateConflict) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateConflict", 409)
}

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

	return nil
}

// NewEmojiCreateInternalServerError creates a EmojiCreateInternalServerError with default headers values
func NewEmojiCreateInternalServerError() *EmojiCreateInternalServerError {
	return &EmojiCreateInternalServerError{}
}

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

internal server error
*/
type EmojiCreateInternalServerError struct {
}

// IsSuccess returns true when this emoji create internal server error response has a 2xx status code
func (o *EmojiCreateInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this emoji create internal server error response has a 3xx status code
func (o *EmojiCreateInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this emoji create internal server error response has a 4xx status code
func (o *EmojiCreateInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this emoji create internal server error response has a 5xx status code
func (o *EmojiCreateInternalServerError) IsServerError() bool {
	return true
}

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

// Code gets the status code for the emoji create internal server error response
func (o *EmojiCreateInternalServerError) Code() int {
	return 500
}

func (o *EmojiCreateInternalServerError) Error() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateInternalServerError", 500)
}

func (o *EmojiCreateInternalServerError) String() string {
	return fmt.Sprintf("[POST /api/v1/admin/custom_emojis][%d] emojiCreateInternalServerError", 500)
}

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

	return nil
}
