decentral1se
e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
415 lines
13 KiB
Go
415 lines
13 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package accounts
|
|
|
|
// 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"
|
|
)
|
|
|
|
// AccountThemesReader is a Reader for the AccountThemes structure.
|
|
type AccountThemesReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *AccountThemesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewAccountThemesOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewAccountThemesBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewAccountThemesUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewAccountThemesNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewAccountThemesNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewAccountThemesInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /api/v1/accounts/themes] accountThemes", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewAccountThemesOK creates a AccountThemesOK with default headers values
|
|
func NewAccountThemesOK() *AccountThemesOK {
|
|
return &AccountThemesOK{}
|
|
}
|
|
|
|
/*
|
|
AccountThemesOK describes a response with status code 200, with default header values.
|
|
|
|
Array of themes.
|
|
*/
|
|
type AccountThemesOK struct {
|
|
Payload []*models.Theme
|
|
}
|
|
|
|
// IsSuccess returns true when this account themes o k response has a 2xx status code
|
|
func (o *AccountThemesOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this account themes o k response has a 3xx status code
|
|
func (o *AccountThemesOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account themes o k response has a 4xx status code
|
|
func (o *AccountThemesOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this account themes o k response has a 5xx status code
|
|
func (o *AccountThemesOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account themes o k response a status code equal to that given
|
|
func (o *AccountThemesOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the account themes o k response
|
|
func (o *AccountThemesOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *AccountThemesOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *AccountThemesOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *AccountThemesOK) GetPayload() []*models.Theme {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AccountThemesOK) 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
|
|
}
|
|
|
|
// NewAccountThemesBadRequest creates a AccountThemesBadRequest with default headers values
|
|
func NewAccountThemesBadRequest() *AccountThemesBadRequest {
|
|
return &AccountThemesBadRequest{}
|
|
}
|
|
|
|
/*
|
|
AccountThemesBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type AccountThemesBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account themes bad request response has a 2xx status code
|
|
func (o *AccountThemesBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account themes bad request response has a 3xx status code
|
|
func (o *AccountThemesBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account themes bad request response has a 4xx status code
|
|
func (o *AccountThemesBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account themes bad request response has a 5xx status code
|
|
func (o *AccountThemesBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account themes bad request response a status code equal to that given
|
|
func (o *AccountThemesBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the account themes bad request response
|
|
func (o *AccountThemesBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *AccountThemesBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesBadRequest", 400)
|
|
}
|
|
|
|
func (o *AccountThemesBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesBadRequest", 400)
|
|
}
|
|
|
|
func (o *AccountThemesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountThemesUnauthorized creates a AccountThemesUnauthorized with default headers values
|
|
func NewAccountThemesUnauthorized() *AccountThemesUnauthorized {
|
|
return &AccountThemesUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
AccountThemesUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type AccountThemesUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account themes unauthorized response has a 2xx status code
|
|
func (o *AccountThemesUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account themes unauthorized response has a 3xx status code
|
|
func (o *AccountThemesUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account themes unauthorized response has a 4xx status code
|
|
func (o *AccountThemesUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account themes unauthorized response has a 5xx status code
|
|
func (o *AccountThemesUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account themes unauthorized response a status code equal to that given
|
|
func (o *AccountThemesUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the account themes unauthorized response
|
|
func (o *AccountThemesUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *AccountThemesUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesUnauthorized", 401)
|
|
}
|
|
|
|
func (o *AccountThemesUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesUnauthorized", 401)
|
|
}
|
|
|
|
func (o *AccountThemesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountThemesNotFound creates a AccountThemesNotFound with default headers values
|
|
func NewAccountThemesNotFound() *AccountThemesNotFound {
|
|
return &AccountThemesNotFound{}
|
|
}
|
|
|
|
/*
|
|
AccountThemesNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type AccountThemesNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account themes not found response has a 2xx status code
|
|
func (o *AccountThemesNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account themes not found response has a 3xx status code
|
|
func (o *AccountThemesNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account themes not found response has a 4xx status code
|
|
func (o *AccountThemesNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account themes not found response has a 5xx status code
|
|
func (o *AccountThemesNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account themes not found response a status code equal to that given
|
|
func (o *AccountThemesNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the account themes not found response
|
|
func (o *AccountThemesNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *AccountThemesNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesNotFound", 404)
|
|
}
|
|
|
|
func (o *AccountThemesNotFound) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesNotFound", 404)
|
|
}
|
|
|
|
func (o *AccountThemesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountThemesNotAcceptable creates a AccountThemesNotAcceptable with default headers values
|
|
func NewAccountThemesNotAcceptable() *AccountThemesNotAcceptable {
|
|
return &AccountThemesNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
AccountThemesNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type AccountThemesNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account themes not acceptable response has a 2xx status code
|
|
func (o *AccountThemesNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account themes not acceptable response has a 3xx status code
|
|
func (o *AccountThemesNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account themes not acceptable response has a 4xx status code
|
|
func (o *AccountThemesNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account themes not acceptable response has a 5xx status code
|
|
func (o *AccountThemesNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account themes not acceptable response a status code equal to that given
|
|
func (o *AccountThemesNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the account themes not acceptable response
|
|
func (o *AccountThemesNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *AccountThemesNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *AccountThemesNotAcceptable) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *AccountThemesNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountThemesInternalServerError creates a AccountThemesInternalServerError with default headers values
|
|
func NewAccountThemesInternalServerError() *AccountThemesInternalServerError {
|
|
return &AccountThemesInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
AccountThemesInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type AccountThemesInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account themes internal server error response has a 2xx status code
|
|
func (o *AccountThemesInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account themes internal server error response has a 3xx status code
|
|
func (o *AccountThemesInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account themes internal server error response has a 4xx status code
|
|
func (o *AccountThemesInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this account themes internal server error response has a 5xx status code
|
|
func (o *AccountThemesInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this account themes internal server error response a status code equal to that given
|
|
func (o *AccountThemesInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the account themes internal server error response
|
|
func (o *AccountThemesInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *AccountThemesInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesInternalServerError", 500)
|
|
}
|
|
|
|
func (o *AccountThemesInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/themes][%d] accountThemesInternalServerError", 500)
|
|
}
|
|
|
|
func (o *AccountThemesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|