gtslib/client/admin/domain_allow_get_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
15 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"
)
// DomainAllowGetReader is a Reader for the DomainAllowGet structure.
type DomainAllowGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DomainAllowGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDomainAllowGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewDomainAllowGetBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewDomainAllowGetUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewDomainAllowGetForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDomainAllowGetNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewDomainAllowGetNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewDomainAllowGetInternalServerError()
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/domain_allows/{id}] domainAllowGet", response, response.Code())
}
}
// NewDomainAllowGetOK creates a DomainAllowGetOK with default headers values
func NewDomainAllowGetOK() *DomainAllowGetOK {
return &DomainAllowGetOK{}
}
/*
DomainAllowGetOK describes a response with status code 200, with default header values.
The requested domain allow.
*/
type DomainAllowGetOK struct {
Payload *models.DomainPermission
}
// IsSuccess returns true when this domain allow get o k response has a 2xx status code
func (o *DomainAllowGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this domain allow get o k response has a 3xx status code
func (o *DomainAllowGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get o k response has a 4xx status code
func (o *DomainAllowGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this domain allow get o k response has a 5xx status code
func (o *DomainAllowGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this domain allow get o k response a status code equal to that given
func (o *DomainAllowGetOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the domain allow get o k response
func (o *DomainAllowGetOK) Code() int {
return 200
}
func (o *DomainAllowGetOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetOK %s", 200, payload)
}
func (o *DomainAllowGetOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetOK %s", 200, payload)
}
func (o *DomainAllowGetOK) GetPayload() *models.DomainPermission {
return o.Payload
}
func (o *DomainAllowGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.DomainPermission)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDomainAllowGetBadRequest creates a DomainAllowGetBadRequest with default headers values
func NewDomainAllowGetBadRequest() *DomainAllowGetBadRequest {
return &DomainAllowGetBadRequest{}
}
/*
DomainAllowGetBadRequest describes a response with status code 400, with default header values.
bad request
*/
type DomainAllowGetBadRequest struct {
}
// IsSuccess returns true when this domain allow get bad request response has a 2xx status code
func (o *DomainAllowGetBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this domain allow get bad request response has a 3xx status code
func (o *DomainAllowGetBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get bad request response has a 4xx status code
func (o *DomainAllowGetBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this domain allow get bad request response has a 5xx status code
func (o *DomainAllowGetBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this domain allow get bad request response a status code equal to that given
func (o *DomainAllowGetBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the domain allow get bad request response
func (o *DomainAllowGetBadRequest) Code() int {
return 400
}
func (o *DomainAllowGetBadRequest) Error() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetBadRequest", 400)
}
func (o *DomainAllowGetBadRequest) String() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetBadRequest", 400)
}
func (o *DomainAllowGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDomainAllowGetUnauthorized creates a DomainAllowGetUnauthorized with default headers values
func NewDomainAllowGetUnauthorized() *DomainAllowGetUnauthorized {
return &DomainAllowGetUnauthorized{}
}
/*
DomainAllowGetUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type DomainAllowGetUnauthorized struct {
}
// IsSuccess returns true when this domain allow get unauthorized response has a 2xx status code
func (o *DomainAllowGetUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this domain allow get unauthorized response has a 3xx status code
func (o *DomainAllowGetUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get unauthorized response has a 4xx status code
func (o *DomainAllowGetUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this domain allow get unauthorized response has a 5xx status code
func (o *DomainAllowGetUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this domain allow get unauthorized response a status code equal to that given
func (o *DomainAllowGetUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the domain allow get unauthorized response
func (o *DomainAllowGetUnauthorized) Code() int {
return 401
}
func (o *DomainAllowGetUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetUnauthorized", 401)
}
func (o *DomainAllowGetUnauthorized) String() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetUnauthorized", 401)
}
func (o *DomainAllowGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDomainAllowGetForbidden creates a DomainAllowGetForbidden with default headers values
func NewDomainAllowGetForbidden() *DomainAllowGetForbidden {
return &DomainAllowGetForbidden{}
}
/*
DomainAllowGetForbidden describes a response with status code 403, with default header values.
forbidden
*/
type DomainAllowGetForbidden struct {
}
// IsSuccess returns true when this domain allow get forbidden response has a 2xx status code
func (o *DomainAllowGetForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this domain allow get forbidden response has a 3xx status code
func (o *DomainAllowGetForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get forbidden response has a 4xx status code
func (o *DomainAllowGetForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this domain allow get forbidden response has a 5xx status code
func (o *DomainAllowGetForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this domain allow get forbidden response a status code equal to that given
func (o *DomainAllowGetForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the domain allow get forbidden response
func (o *DomainAllowGetForbidden) Code() int {
return 403
}
func (o *DomainAllowGetForbidden) Error() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetForbidden", 403)
}
func (o *DomainAllowGetForbidden) String() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetForbidden", 403)
}
func (o *DomainAllowGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDomainAllowGetNotFound creates a DomainAllowGetNotFound with default headers values
func NewDomainAllowGetNotFound() *DomainAllowGetNotFound {
return &DomainAllowGetNotFound{}
}
/*
DomainAllowGetNotFound describes a response with status code 404, with default header values.
not found
*/
type DomainAllowGetNotFound struct {
}
// IsSuccess returns true when this domain allow get not found response has a 2xx status code
func (o *DomainAllowGetNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this domain allow get not found response has a 3xx status code
func (o *DomainAllowGetNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get not found response has a 4xx status code
func (o *DomainAllowGetNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this domain allow get not found response has a 5xx status code
func (o *DomainAllowGetNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this domain allow get not found response a status code equal to that given
func (o *DomainAllowGetNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the domain allow get not found response
func (o *DomainAllowGetNotFound) Code() int {
return 404
}
func (o *DomainAllowGetNotFound) Error() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetNotFound", 404)
}
func (o *DomainAllowGetNotFound) String() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetNotFound", 404)
}
func (o *DomainAllowGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDomainAllowGetNotAcceptable creates a DomainAllowGetNotAcceptable with default headers values
func NewDomainAllowGetNotAcceptable() *DomainAllowGetNotAcceptable {
return &DomainAllowGetNotAcceptable{}
}
/*
DomainAllowGetNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type DomainAllowGetNotAcceptable struct {
}
// IsSuccess returns true when this domain allow get not acceptable response has a 2xx status code
func (o *DomainAllowGetNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this domain allow get not acceptable response has a 3xx status code
func (o *DomainAllowGetNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get not acceptable response has a 4xx status code
func (o *DomainAllowGetNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this domain allow get not acceptable response has a 5xx status code
func (o *DomainAllowGetNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this domain allow get not acceptable response a status code equal to that given
func (o *DomainAllowGetNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the domain allow get not acceptable response
func (o *DomainAllowGetNotAcceptable) Code() int {
return 406
}
func (o *DomainAllowGetNotAcceptable) Error() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetNotAcceptable", 406)
}
func (o *DomainAllowGetNotAcceptable) String() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetNotAcceptable", 406)
}
func (o *DomainAllowGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDomainAllowGetInternalServerError creates a DomainAllowGetInternalServerError with default headers values
func NewDomainAllowGetInternalServerError() *DomainAllowGetInternalServerError {
return &DomainAllowGetInternalServerError{}
}
/*
DomainAllowGetInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type DomainAllowGetInternalServerError struct {
}
// IsSuccess returns true when this domain allow get internal server error response has a 2xx status code
func (o *DomainAllowGetInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this domain allow get internal server error response has a 3xx status code
func (o *DomainAllowGetInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this domain allow get internal server error response has a 4xx status code
func (o *DomainAllowGetInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this domain allow get internal server error response has a 5xx status code
func (o *DomainAllowGetInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this domain allow get internal server error response a status code equal to that given
func (o *DomainAllowGetInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the domain allow get internal server error response
func (o *DomainAllowGetInternalServerError) Code() int {
return 500
}
func (o *DomainAllowGetInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetInternalServerError", 500)
}
func (o *DomainAllowGetInternalServerError) String() string {
return fmt.Sprintf("[GET /api/v1/admin/domain_allows/{id}][%d] domainAllowGetInternalServerError", 500)
}
func (o *DomainAllowGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}