mirror of
https://github.com/openziti/zrok.git
synced 2024-12-12 18:01:00 +01:00
270 lines
8.6 KiB
Go
270 lines
8.6 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package metadata
|
|
|
|
// 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-test-kitchen/zrok/rest_model_zrok"
|
|
)
|
|
|
|
// GetServiceDetailReader is a Reader for the GetServiceDetail structure.
|
|
type GetServiceDetailReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetServiceDetailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetServiceDetailOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetServiceDetailUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetServiceDetailNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetServiceDetailInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetServiceDetailOK creates a GetServiceDetailOK with default headers values
|
|
func NewGetServiceDetailOK() *GetServiceDetailOK {
|
|
return &GetServiceDetailOK{}
|
|
}
|
|
|
|
/*
|
|
GetServiceDetailOK describes a response with status code 200, with default header values.
|
|
|
|
ok
|
|
*/
|
|
type GetServiceDetailOK struct {
|
|
Payload *rest_model_zrok.Service
|
|
}
|
|
|
|
// IsSuccess returns true when this get service detail o k response has a 2xx status code
|
|
func (o *GetServiceDetailOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get service detail o k response has a 3xx status code
|
|
func (o *GetServiceDetailOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get service detail o k response has a 4xx status code
|
|
func (o *GetServiceDetailOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get service detail o k response has a 5xx status code
|
|
func (o *GetServiceDetailOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get service detail o k response a status code equal to that given
|
|
func (o *GetServiceDetailOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
func (o *GetServiceDetailOK) Error() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetServiceDetailOK) String() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetServiceDetailOK) GetPayload() *rest_model_zrok.Service {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetServiceDetailOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(rest_model_zrok.Service)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetServiceDetailUnauthorized creates a GetServiceDetailUnauthorized with default headers values
|
|
func NewGetServiceDetailUnauthorized() *GetServiceDetailUnauthorized {
|
|
return &GetServiceDetailUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetServiceDetailUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type GetServiceDetailUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get service detail unauthorized response has a 2xx status code
|
|
func (o *GetServiceDetailUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get service detail unauthorized response has a 3xx status code
|
|
func (o *GetServiceDetailUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get service detail unauthorized response has a 4xx status code
|
|
func (o *GetServiceDetailUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get service detail unauthorized response has a 5xx status code
|
|
func (o *GetServiceDetailUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get service detail unauthorized response a status code equal to that given
|
|
func (o *GetServiceDetailUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
func (o *GetServiceDetailUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetServiceDetailUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetServiceDetailUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetServiceDetailNotFound creates a GetServiceDetailNotFound with default headers values
|
|
func NewGetServiceDetailNotFound() *GetServiceDetailNotFound {
|
|
return &GetServiceDetailNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetServiceDetailNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type GetServiceDetailNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get service detail not found response has a 2xx status code
|
|
func (o *GetServiceDetailNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get service detail not found response has a 3xx status code
|
|
func (o *GetServiceDetailNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get service detail not found response has a 4xx status code
|
|
func (o *GetServiceDetailNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get service detail not found response has a 5xx status code
|
|
func (o *GetServiceDetailNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get service detail not found response a status code equal to that given
|
|
func (o *GetServiceDetailNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
func (o *GetServiceDetailNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailNotFound ", 404)
|
|
}
|
|
|
|
func (o *GetServiceDetailNotFound) String() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailNotFound ", 404)
|
|
}
|
|
|
|
func (o *GetServiceDetailNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetServiceDetailInternalServerError creates a GetServiceDetailInternalServerError with default headers values
|
|
func NewGetServiceDetailInternalServerError() *GetServiceDetailInternalServerError {
|
|
return &GetServiceDetailInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetServiceDetailInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type GetServiceDetailInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get service detail internal server error response has a 2xx status code
|
|
func (o *GetServiceDetailInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get service detail internal server error response has a 3xx status code
|
|
func (o *GetServiceDetailInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get service detail internal server error response has a 4xx status code
|
|
func (o *GetServiceDetailInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get service detail internal server error response has a 5xx status code
|
|
func (o *GetServiceDetailInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get service detail internal server error response a status code equal to that given
|
|
func (o *GetServiceDetailInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
func (o *GetServiceDetailInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetServiceDetailInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /detail/service/{svcToken}][%d] getServiceDetailInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetServiceDetailInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|