// 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" ) // EmojisGetReader is a Reader for the EmojisGet structure. type EmojisGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *EmojisGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewEmojisGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewEmojisGetBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewEmojisGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewEmojisGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewEmojisGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewEmojisGetNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewEmojisGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[GET /api/v1/admin/custom_emojis] emojisGet", response, response.Code()) } } // NewEmojisGetOK creates a EmojisGetOK with default headers values func NewEmojisGetOK() *EmojisGetOK { return &EmojisGetOK{} } /* EmojisGetOK describes a response with status code 200, with default header values. An array of emojis, arranged alphabetically by shortcode and domain. */ type EmojisGetOK struct { /* Links to the next and previous queries. */ Link string Payload []*models.AdminEmoji } // IsSuccess returns true when this emojis get o k response has a 2xx status code func (o *EmojisGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this emojis get o k response has a 3xx status code func (o *EmojisGetOK) IsRedirect() bool { return false } // IsClientError returns true when this emojis get o k response has a 4xx status code func (o *EmojisGetOK) IsClientError() bool { return false } // IsServerError returns true when this emojis get o k response has a 5xx status code func (o *EmojisGetOK) IsServerError() bool { return false } // IsCode returns true when this emojis get o k response a status code equal to that given func (o *EmojisGetOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the emojis get o k response func (o *EmojisGetOK) Code() int { return 200 } func (o *EmojisGetOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetOK %s", 200, payload) } func (o *EmojisGetOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetOK %s", 200, payload) } func (o *EmojisGetOK) GetPayload() []*models.AdminEmoji { return o.Payload } func (o *EmojisGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Link hdrLink := response.GetHeader("Link") if hdrLink != "" { o.Link = hdrLink } // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } return nil } // NewEmojisGetBadRequest creates a EmojisGetBadRequest with default headers values func NewEmojisGetBadRequest() *EmojisGetBadRequest { return &EmojisGetBadRequest{} } /* EmojisGetBadRequest describes a response with status code 400, with default header values. bad request */ type EmojisGetBadRequest struct { } // IsSuccess returns true when this emojis get bad request response has a 2xx status code func (o *EmojisGetBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this emojis get bad request response has a 3xx status code func (o *EmojisGetBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this emojis get bad request response has a 4xx status code func (o *EmojisGetBadRequest) IsClientError() bool { return true } // IsServerError returns true when this emojis get bad request response has a 5xx status code func (o *EmojisGetBadRequest) IsServerError() bool { return false } // IsCode returns true when this emojis get bad request response a status code equal to that given func (o *EmojisGetBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the emojis get bad request response func (o *EmojisGetBadRequest) Code() int { return 400 } func (o *EmojisGetBadRequest) Error() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetBadRequest", 400) } func (o *EmojisGetBadRequest) String() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetBadRequest", 400) } func (o *EmojisGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewEmojisGetUnauthorized creates a EmojisGetUnauthorized with default headers values func NewEmojisGetUnauthorized() *EmojisGetUnauthorized { return &EmojisGetUnauthorized{} } /* EmojisGetUnauthorized describes a response with status code 401, with default header values. unauthorized */ type EmojisGetUnauthorized struct { } // IsSuccess returns true when this emojis get unauthorized response has a 2xx status code func (o *EmojisGetUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this emojis get unauthorized response has a 3xx status code func (o *EmojisGetUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this emojis get unauthorized response has a 4xx status code func (o *EmojisGetUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this emojis get unauthorized response has a 5xx status code func (o *EmojisGetUnauthorized) IsServerError() bool { return false } // IsCode returns true when this emojis get unauthorized response a status code equal to that given func (o *EmojisGetUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the emojis get unauthorized response func (o *EmojisGetUnauthorized) Code() int { return 401 } func (o *EmojisGetUnauthorized) Error() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetUnauthorized", 401) } func (o *EmojisGetUnauthorized) String() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetUnauthorized", 401) } func (o *EmojisGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewEmojisGetForbidden creates a EmojisGetForbidden with default headers values func NewEmojisGetForbidden() *EmojisGetForbidden { return &EmojisGetForbidden{} } /* EmojisGetForbidden describes a response with status code 403, with default header values. forbidden */ type EmojisGetForbidden struct { } // IsSuccess returns true when this emojis get forbidden response has a 2xx status code func (o *EmojisGetForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this emojis get forbidden response has a 3xx status code func (o *EmojisGetForbidden) IsRedirect() bool { return false } // IsClientError returns true when this emojis get forbidden response has a 4xx status code func (o *EmojisGetForbidden) IsClientError() bool { return true } // IsServerError returns true when this emojis get forbidden response has a 5xx status code func (o *EmojisGetForbidden) IsServerError() bool { return false } // IsCode returns true when this emojis get forbidden response a status code equal to that given func (o *EmojisGetForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the emojis get forbidden response func (o *EmojisGetForbidden) Code() int { return 403 } func (o *EmojisGetForbidden) Error() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetForbidden", 403) } func (o *EmojisGetForbidden) String() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetForbidden", 403) } func (o *EmojisGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewEmojisGetNotFound creates a EmojisGetNotFound with default headers values func NewEmojisGetNotFound() *EmojisGetNotFound { return &EmojisGetNotFound{} } /* EmojisGetNotFound describes a response with status code 404, with default header values. not found */ type EmojisGetNotFound struct { } // IsSuccess returns true when this emojis get not found response has a 2xx status code func (o *EmojisGetNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this emojis get not found response has a 3xx status code func (o *EmojisGetNotFound) IsRedirect() bool { return false } // IsClientError returns true when this emojis get not found response has a 4xx status code func (o *EmojisGetNotFound) IsClientError() bool { return true } // IsServerError returns true when this emojis get not found response has a 5xx status code func (o *EmojisGetNotFound) IsServerError() bool { return false } // IsCode returns true when this emojis get not found response a status code equal to that given func (o *EmojisGetNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the emojis get not found response func (o *EmojisGetNotFound) Code() int { return 404 } func (o *EmojisGetNotFound) Error() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetNotFound", 404) } func (o *EmojisGetNotFound) String() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetNotFound", 404) } func (o *EmojisGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewEmojisGetNotAcceptable creates a EmojisGetNotAcceptable with default headers values func NewEmojisGetNotAcceptable() *EmojisGetNotAcceptable { return &EmojisGetNotAcceptable{} } /* EmojisGetNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type EmojisGetNotAcceptable struct { } // IsSuccess returns true when this emojis get not acceptable response has a 2xx status code func (o *EmojisGetNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this emojis get not acceptable response has a 3xx status code func (o *EmojisGetNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this emojis get not acceptable response has a 4xx status code func (o *EmojisGetNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this emojis get not acceptable response has a 5xx status code func (o *EmojisGetNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this emojis get not acceptable response a status code equal to that given func (o *EmojisGetNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the emojis get not acceptable response func (o *EmojisGetNotAcceptable) Code() int { return 406 } func (o *EmojisGetNotAcceptable) Error() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetNotAcceptable", 406) } func (o *EmojisGetNotAcceptable) String() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetNotAcceptable", 406) } func (o *EmojisGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewEmojisGetInternalServerError creates a EmojisGetInternalServerError with default headers values func NewEmojisGetInternalServerError() *EmojisGetInternalServerError { return &EmojisGetInternalServerError{} } /* EmojisGetInternalServerError describes a response with status code 500, with default header values. internal server error */ type EmojisGetInternalServerError struct { } // IsSuccess returns true when this emojis get internal server error response has a 2xx status code func (o *EmojisGetInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this emojis get internal server error response has a 3xx status code func (o *EmojisGetInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this emojis get internal server error response has a 4xx status code func (o *EmojisGetInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this emojis get internal server error response has a 5xx status code func (o *EmojisGetInternalServerError) IsServerError() bool { return true } // IsCode returns true when this emojis get internal server error response a status code equal to that given func (o *EmojisGetInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the emojis get internal server error response func (o *EmojisGetInternalServerError) Code() int { return 500 } func (o *EmojisGetInternalServerError) Error() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetInternalServerError", 500) } func (o *EmojisGetInternalServerError) String() string { return fmt.Sprintf("[GET /api/v1/admin/custom_emojis][%d] emojisGetInternalServerError", 500) } func (o *EmojisGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }