mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 16:13:47 +01:00
290 lines
9.0 KiB
Go
290 lines
9.0 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/zrok/rest_model_zrok"
|
|
)
|
|
|
|
// GetShareMetricsReader is a Reader for the GetShareMetrics structure.
|
|
type GetShareMetricsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetShareMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetShareMetricsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewGetShareMetricsBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewGetShareMetricsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetShareMetricsInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /metrics/share/{shrToken}] getShareMetrics", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetShareMetricsOK creates a GetShareMetricsOK with default headers values
|
|
func NewGetShareMetricsOK() *GetShareMetricsOK {
|
|
return &GetShareMetricsOK{}
|
|
}
|
|
|
|
/*
|
|
GetShareMetricsOK describes a response with status code 200, with default header values.
|
|
|
|
share metrics
|
|
*/
|
|
type GetShareMetricsOK struct {
|
|
Payload *rest_model_zrok.Metrics
|
|
}
|
|
|
|
// IsSuccess returns true when this get share metrics o k response has a 2xx status code
|
|
func (o *GetShareMetricsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get share metrics o k response has a 3xx status code
|
|
func (o *GetShareMetricsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share metrics o k response has a 4xx status code
|
|
func (o *GetShareMetricsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get share metrics o k response has a 5xx status code
|
|
func (o *GetShareMetricsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get share metrics o k response a status code equal to that given
|
|
func (o *GetShareMetricsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get share metrics o k response
|
|
func (o *GetShareMetricsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetShareMetricsOK) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetShareMetricsOK) String() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetShareMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetShareMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(rest_model_zrok.Metrics)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetShareMetricsBadRequest creates a GetShareMetricsBadRequest with default headers values
|
|
func NewGetShareMetricsBadRequest() *GetShareMetricsBadRequest {
|
|
return &GetShareMetricsBadRequest{}
|
|
}
|
|
|
|
/*
|
|
GetShareMetricsBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type GetShareMetricsBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get share metrics bad request response has a 2xx status code
|
|
func (o *GetShareMetricsBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get share metrics bad request response has a 3xx status code
|
|
func (o *GetShareMetricsBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share metrics bad request response has a 4xx status code
|
|
func (o *GetShareMetricsBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get share metrics bad request response has a 5xx status code
|
|
func (o *GetShareMetricsBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get share metrics bad request response a status code equal to that given
|
|
func (o *GetShareMetricsBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the get share metrics bad request response
|
|
func (o *GetShareMetricsBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *GetShareMetricsBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsBadRequest ", 400)
|
|
}
|
|
|
|
func (o *GetShareMetricsBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsBadRequest ", 400)
|
|
}
|
|
|
|
func (o *GetShareMetricsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetShareMetricsUnauthorized creates a GetShareMetricsUnauthorized with default headers values
|
|
func NewGetShareMetricsUnauthorized() *GetShareMetricsUnauthorized {
|
|
return &GetShareMetricsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetShareMetricsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type GetShareMetricsUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get share metrics unauthorized response has a 2xx status code
|
|
func (o *GetShareMetricsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get share metrics unauthorized response has a 3xx status code
|
|
func (o *GetShareMetricsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share metrics unauthorized response has a 4xx status code
|
|
func (o *GetShareMetricsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get share metrics unauthorized response has a 5xx status code
|
|
func (o *GetShareMetricsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get share metrics unauthorized response a status code equal to that given
|
|
func (o *GetShareMetricsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get share metrics unauthorized response
|
|
func (o *GetShareMetricsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetShareMetricsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetShareMetricsUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetShareMetricsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetShareMetricsInternalServerError creates a GetShareMetricsInternalServerError with default headers values
|
|
func NewGetShareMetricsInternalServerError() *GetShareMetricsInternalServerError {
|
|
return &GetShareMetricsInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetShareMetricsInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type GetShareMetricsInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get share metrics internal server error response has a 2xx status code
|
|
func (o *GetShareMetricsInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get share metrics internal server error response has a 3xx status code
|
|
func (o *GetShareMetricsInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share metrics internal server error response has a 4xx status code
|
|
func (o *GetShareMetricsInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get share metrics internal server error response has a 5xx status code
|
|
func (o *GetShareMetricsInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get share metrics internal server error response a status code equal to that given
|
|
func (o *GetShareMetricsInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get share metrics internal server error response
|
|
func (o *GetShareMetricsInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetShareMetricsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetShareMetricsInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetShareMetricsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|