gtslib/client/admin/admin_account_reject_responses.go
decentral1se e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
feat: init
2024-07-31 22:47:18 +02:00

479 lines
16 KiB
Go

// 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"
)
// AdminAccountRejectReader is a Reader for the AdminAccountReject structure.
type AdminAccountRejectReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AdminAccountRejectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAdminAccountRejectOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAdminAccountRejectBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewAdminAccountRejectUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewAdminAccountRejectForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewAdminAccountRejectNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewAdminAccountRejectNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewAdminAccountRejectInternalServerError()
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/accounts/{id}/reject] adminAccountReject", response, response.Code())
}
}
// NewAdminAccountRejectOK creates a AdminAccountRejectOK with default headers values
func NewAdminAccountRejectOK() *AdminAccountRejectOK {
return &AdminAccountRejectOK{}
}
/*
AdminAccountRejectOK describes a response with status code 200, with default header values.
The now-rejected account.
*/
type AdminAccountRejectOK struct {
Payload *models.AdminAccountInfo
}
// IsSuccess returns true when this admin account reject o k response has a 2xx status code
func (o *AdminAccountRejectOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this admin account reject o k response has a 3xx status code
func (o *AdminAccountRejectOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject o k response has a 4xx status code
func (o *AdminAccountRejectOK) IsClientError() bool {
return false
}
// IsServerError returns true when this admin account reject o k response has a 5xx status code
func (o *AdminAccountRejectOK) IsServerError() bool {
return false
}
// IsCode returns true when this admin account reject o k response a status code equal to that given
func (o *AdminAccountRejectOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the admin account reject o k response
func (o *AdminAccountRejectOK) Code() int {
return 200
}
func (o *AdminAccountRejectOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectOK %s", 200, payload)
}
func (o *AdminAccountRejectOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectOK %s", 200, payload)
}
func (o *AdminAccountRejectOK) GetPayload() *models.AdminAccountInfo {
return o.Payload
}
func (o *AdminAccountRejectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.AdminAccountInfo)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAdminAccountRejectBadRequest creates a AdminAccountRejectBadRequest with default headers values
func NewAdminAccountRejectBadRequest() *AdminAccountRejectBadRequest {
return &AdminAccountRejectBadRequest{}
}
/*
AdminAccountRejectBadRequest describes a response with status code 400, with default header values.
bad request
*/
type AdminAccountRejectBadRequest struct {
}
// IsSuccess returns true when this admin account reject bad request response has a 2xx status code
func (o *AdminAccountRejectBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this admin account reject bad request response has a 3xx status code
func (o *AdminAccountRejectBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject bad request response has a 4xx status code
func (o *AdminAccountRejectBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this admin account reject bad request response has a 5xx status code
func (o *AdminAccountRejectBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this admin account reject bad request response a status code equal to that given
func (o *AdminAccountRejectBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the admin account reject bad request response
func (o *AdminAccountRejectBadRequest) Code() int {
return 400
}
func (o *AdminAccountRejectBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectBadRequest", 400)
}
func (o *AdminAccountRejectBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectBadRequest", 400)
}
func (o *AdminAccountRejectBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAdminAccountRejectUnauthorized creates a AdminAccountRejectUnauthorized with default headers values
func NewAdminAccountRejectUnauthorized() *AdminAccountRejectUnauthorized {
return &AdminAccountRejectUnauthorized{}
}
/*
AdminAccountRejectUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type AdminAccountRejectUnauthorized struct {
}
// IsSuccess returns true when this admin account reject unauthorized response has a 2xx status code
func (o *AdminAccountRejectUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this admin account reject unauthorized response has a 3xx status code
func (o *AdminAccountRejectUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject unauthorized response has a 4xx status code
func (o *AdminAccountRejectUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this admin account reject unauthorized response has a 5xx status code
func (o *AdminAccountRejectUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this admin account reject unauthorized response a status code equal to that given
func (o *AdminAccountRejectUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the admin account reject unauthorized response
func (o *AdminAccountRejectUnauthorized) Code() int {
return 401
}
func (o *AdminAccountRejectUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectUnauthorized", 401)
}
func (o *AdminAccountRejectUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectUnauthorized", 401)
}
func (o *AdminAccountRejectUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAdminAccountRejectForbidden creates a AdminAccountRejectForbidden with default headers values
func NewAdminAccountRejectForbidden() *AdminAccountRejectForbidden {
return &AdminAccountRejectForbidden{}
}
/*
AdminAccountRejectForbidden describes a response with status code 403, with default header values.
forbidden
*/
type AdminAccountRejectForbidden struct {
}
// IsSuccess returns true when this admin account reject forbidden response has a 2xx status code
func (o *AdminAccountRejectForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this admin account reject forbidden response has a 3xx status code
func (o *AdminAccountRejectForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject forbidden response has a 4xx status code
func (o *AdminAccountRejectForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this admin account reject forbidden response has a 5xx status code
func (o *AdminAccountRejectForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this admin account reject forbidden response a status code equal to that given
func (o *AdminAccountRejectForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the admin account reject forbidden response
func (o *AdminAccountRejectForbidden) Code() int {
return 403
}
func (o *AdminAccountRejectForbidden) Error() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectForbidden", 403)
}
func (o *AdminAccountRejectForbidden) String() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectForbidden", 403)
}
func (o *AdminAccountRejectForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAdminAccountRejectNotFound creates a AdminAccountRejectNotFound with default headers values
func NewAdminAccountRejectNotFound() *AdminAccountRejectNotFound {
return &AdminAccountRejectNotFound{}
}
/*
AdminAccountRejectNotFound describes a response with status code 404, with default header values.
not found
*/
type AdminAccountRejectNotFound struct {
}
// IsSuccess returns true when this admin account reject not found response has a 2xx status code
func (o *AdminAccountRejectNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this admin account reject not found response has a 3xx status code
func (o *AdminAccountRejectNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject not found response has a 4xx status code
func (o *AdminAccountRejectNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this admin account reject not found response has a 5xx status code
func (o *AdminAccountRejectNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this admin account reject not found response a status code equal to that given
func (o *AdminAccountRejectNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the admin account reject not found response
func (o *AdminAccountRejectNotFound) Code() int {
return 404
}
func (o *AdminAccountRejectNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectNotFound", 404)
}
func (o *AdminAccountRejectNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectNotFound", 404)
}
func (o *AdminAccountRejectNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAdminAccountRejectNotAcceptable creates a AdminAccountRejectNotAcceptable with default headers values
func NewAdminAccountRejectNotAcceptable() *AdminAccountRejectNotAcceptable {
return &AdminAccountRejectNotAcceptable{}
}
/*
AdminAccountRejectNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type AdminAccountRejectNotAcceptable struct {
}
// IsSuccess returns true when this admin account reject not acceptable response has a 2xx status code
func (o *AdminAccountRejectNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this admin account reject not acceptable response has a 3xx status code
func (o *AdminAccountRejectNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject not acceptable response has a 4xx status code
func (o *AdminAccountRejectNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this admin account reject not acceptable response has a 5xx status code
func (o *AdminAccountRejectNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this admin account reject not acceptable response a status code equal to that given
func (o *AdminAccountRejectNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the admin account reject not acceptable response
func (o *AdminAccountRejectNotAcceptable) Code() int {
return 406
}
func (o *AdminAccountRejectNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectNotAcceptable", 406)
}
func (o *AdminAccountRejectNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectNotAcceptable", 406)
}
func (o *AdminAccountRejectNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAdminAccountRejectInternalServerError creates a AdminAccountRejectInternalServerError with default headers values
func NewAdminAccountRejectInternalServerError() *AdminAccountRejectInternalServerError {
return &AdminAccountRejectInternalServerError{}
}
/*
AdminAccountRejectInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type AdminAccountRejectInternalServerError struct {
}
// IsSuccess returns true when this admin account reject internal server error response has a 2xx status code
func (o *AdminAccountRejectInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this admin account reject internal server error response has a 3xx status code
func (o *AdminAccountRejectInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this admin account reject internal server error response has a 4xx status code
func (o *AdminAccountRejectInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this admin account reject internal server error response has a 5xx status code
func (o *AdminAccountRejectInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this admin account reject internal server error response a status code equal to that given
func (o *AdminAccountRejectInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the admin account reject internal server error response
func (o *AdminAccountRejectInternalServerError) Code() int {
return 500
}
func (o *AdminAccountRejectInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectInternalServerError", 500)
}
func (o *AdminAccountRejectInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/admin/accounts/{id}/reject][%d] adminAccountRejectInternalServerError", 500)
}
func (o *AdminAccountRejectInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}