Files
zrok/rest_client_zrok/admin/list_frontends_responses.go
2025-02-04 14:20:55 -05:00

279 lines
8.0 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 (
"context"
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// ListFrontendsReader is a Reader for the ListFrontends structure.
type ListFrontendsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ListFrontendsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListFrontendsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewListFrontendsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewListFrontendsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /frontends] listFrontends", response, response.Code())
}
}
// NewListFrontendsOK creates a ListFrontendsOK with default headers values
func NewListFrontendsOK() *ListFrontendsOK {
return &ListFrontendsOK{}
}
/*
ListFrontendsOK describes a response with status code 200, with default header values.
ok
*/
type ListFrontendsOK struct {
Payload []*ListFrontendsOKBodyItems0
}
// IsSuccess returns true when this list frontends o k response has a 2xx status code
func (o *ListFrontendsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this list frontends o k response has a 3xx status code
func (o *ListFrontendsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this list frontends o k response has a 4xx status code
func (o *ListFrontendsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this list frontends o k response has a 5xx status code
func (o *ListFrontendsOK) IsServerError() bool {
return false
}
// IsCode returns true when this list frontends o k response a status code equal to that given
func (o *ListFrontendsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the list frontends o k response
func (o *ListFrontendsOK) Code() int {
return 200
}
func (o *ListFrontendsOK) Error() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %+v", 200, o.Payload)
}
func (o *ListFrontendsOK) String() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %+v", 200, o.Payload)
}
func (o *ListFrontendsOK) GetPayload() []*ListFrontendsOKBodyItems0 {
return o.Payload
}
func (o *ListFrontendsOK) 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
}
// NewListFrontendsUnauthorized creates a ListFrontendsUnauthorized with default headers values
func NewListFrontendsUnauthorized() *ListFrontendsUnauthorized {
return &ListFrontendsUnauthorized{}
}
/*
ListFrontendsUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type ListFrontendsUnauthorized struct {
}
// IsSuccess returns true when this list frontends unauthorized response has a 2xx status code
func (o *ListFrontendsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this list frontends unauthorized response has a 3xx status code
func (o *ListFrontendsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this list frontends unauthorized response has a 4xx status code
func (o *ListFrontendsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this list frontends unauthorized response has a 5xx status code
func (o *ListFrontendsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this list frontends unauthorized response a status code equal to that given
func (o *ListFrontendsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the list frontends unauthorized response
func (o *ListFrontendsUnauthorized) Code() int {
return 401
}
func (o *ListFrontendsUnauthorized) Error() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsUnauthorized ", 401)
}
func (o *ListFrontendsUnauthorized) String() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsUnauthorized ", 401)
}
func (o *ListFrontendsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewListFrontendsInternalServerError creates a ListFrontendsInternalServerError with default headers values
func NewListFrontendsInternalServerError() *ListFrontendsInternalServerError {
return &ListFrontendsInternalServerError{}
}
/*
ListFrontendsInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type ListFrontendsInternalServerError struct {
}
// IsSuccess returns true when this list frontends internal server error response has a 2xx status code
func (o *ListFrontendsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this list frontends internal server error response has a 3xx status code
func (o *ListFrontendsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this list frontends internal server error response has a 4xx status code
func (o *ListFrontendsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this list frontends internal server error response has a 5xx status code
func (o *ListFrontendsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this list frontends internal server error response a status code equal to that given
func (o *ListFrontendsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the list frontends internal server error response
func (o *ListFrontendsInternalServerError) Code() int {
return 500
}
func (o *ListFrontendsInternalServerError) Error() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsInternalServerError ", 500)
}
func (o *ListFrontendsInternalServerError) String() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsInternalServerError ", 500)
}
func (o *ListFrontendsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
/*
ListFrontendsOKBodyItems0 list frontends o k body items0
swagger:model ListFrontendsOKBodyItems0
*/
type ListFrontendsOKBodyItems0 struct {
// created at
CreatedAt int64 `json:"createdAt,omitempty"`
// frontend token
FrontendToken string `json:"frontendToken,omitempty"`
// public name
PublicName string `json:"publicName,omitempty"`
// updated at
UpdatedAt int64 `json:"updatedAt,omitempty"`
// url template
URLTemplate string `json:"urlTemplate,omitempty"`
// z Id
ZID string `json:"zId,omitempty"`
}
// Validate validates this list frontends o k body items0
func (o *ListFrontendsOKBodyItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this list frontends o k body items0 based on context it is used
func (o *ListFrontendsOKBodyItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *ListFrontendsOKBodyItems0) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *ListFrontendsOKBodyItems0) UnmarshalBinary(b []byte) error {
var res ListFrontendsOKBodyItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}