zrok/rest_client_zrok/admin/list_frontends_responses.go

226 lines
6.8 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 (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/zrok/rest_model_zrok"
)
// 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 rest_model_zrok.PublicFrontendList
}
// 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() rest_model_zrok.PublicFrontendList {
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
}