mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 23:29:22 +01:00
290 lines
9.7 KiB
Go
290 lines
9.7 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"
|
|
)
|
|
|
|
// GetEnvironmentMetricsReader is a Reader for the GetEnvironmentMetrics structure.
|
|
type GetEnvironmentMetricsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetEnvironmentMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetEnvironmentMetricsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewGetEnvironmentMetricsBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewGetEnvironmentMetricsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetEnvironmentMetricsInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /metrics/environment/{envId}] getEnvironmentMetrics", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetEnvironmentMetricsOK creates a GetEnvironmentMetricsOK with default headers values
|
|
func NewGetEnvironmentMetricsOK() *GetEnvironmentMetricsOK {
|
|
return &GetEnvironmentMetricsOK{}
|
|
}
|
|
|
|
/*
|
|
GetEnvironmentMetricsOK describes a response with status code 200, with default header values.
|
|
|
|
environment metrics
|
|
*/
|
|
type GetEnvironmentMetricsOK struct {
|
|
Payload *rest_model_zrok.Metrics
|
|
}
|
|
|
|
// IsSuccess returns true when this get environment metrics o k response has a 2xx status code
|
|
func (o *GetEnvironmentMetricsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get environment metrics o k response has a 3xx status code
|
|
func (o *GetEnvironmentMetricsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get environment metrics o k response has a 4xx status code
|
|
func (o *GetEnvironmentMetricsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get environment metrics o k response has a 5xx status code
|
|
func (o *GetEnvironmentMetricsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get environment metrics o k response a status code equal to that given
|
|
func (o *GetEnvironmentMetricsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get environment metrics o k response
|
|
func (o *GetEnvironmentMetricsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsOK) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsOK) String() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsOK) 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
|
|
}
|
|
|
|
// NewGetEnvironmentMetricsBadRequest creates a GetEnvironmentMetricsBadRequest with default headers values
|
|
func NewGetEnvironmentMetricsBadRequest() *GetEnvironmentMetricsBadRequest {
|
|
return &GetEnvironmentMetricsBadRequest{}
|
|
}
|
|
|
|
/*
|
|
GetEnvironmentMetricsBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type GetEnvironmentMetricsBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get environment metrics bad request response has a 2xx status code
|
|
func (o *GetEnvironmentMetricsBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get environment metrics bad request response has a 3xx status code
|
|
func (o *GetEnvironmentMetricsBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get environment metrics bad request response has a 4xx status code
|
|
func (o *GetEnvironmentMetricsBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get environment metrics bad request response has a 5xx status code
|
|
func (o *GetEnvironmentMetricsBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get environment metrics bad request response a status code equal to that given
|
|
func (o *GetEnvironmentMetricsBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the get environment metrics bad request response
|
|
func (o *GetEnvironmentMetricsBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsBadRequest ", 400)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsBadRequest ", 400)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetEnvironmentMetricsUnauthorized creates a GetEnvironmentMetricsUnauthorized with default headers values
|
|
func NewGetEnvironmentMetricsUnauthorized() *GetEnvironmentMetricsUnauthorized {
|
|
return &GetEnvironmentMetricsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetEnvironmentMetricsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type GetEnvironmentMetricsUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get environment metrics unauthorized response has a 2xx status code
|
|
func (o *GetEnvironmentMetricsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get environment metrics unauthorized response has a 3xx status code
|
|
func (o *GetEnvironmentMetricsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get environment metrics unauthorized response has a 4xx status code
|
|
func (o *GetEnvironmentMetricsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get environment metrics unauthorized response has a 5xx status code
|
|
func (o *GetEnvironmentMetricsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get environment metrics unauthorized response a status code equal to that given
|
|
func (o *GetEnvironmentMetricsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get environment metrics unauthorized response
|
|
func (o *GetEnvironmentMetricsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetEnvironmentMetricsInternalServerError creates a GetEnvironmentMetricsInternalServerError with default headers values
|
|
func NewGetEnvironmentMetricsInternalServerError() *GetEnvironmentMetricsInternalServerError {
|
|
return &GetEnvironmentMetricsInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetEnvironmentMetricsInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type GetEnvironmentMetricsInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get environment metrics internal server error response has a 2xx status code
|
|
func (o *GetEnvironmentMetricsInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get environment metrics internal server error response has a 3xx status code
|
|
func (o *GetEnvironmentMetricsInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get environment metrics internal server error response has a 4xx status code
|
|
func (o *GetEnvironmentMetricsInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get environment metrics internal server error response has a 5xx status code
|
|
func (o *GetEnvironmentMetricsInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get environment metrics internal server error response a status code equal to that given
|
|
func (o *GetEnvironmentMetricsInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get environment metrics internal server error response
|
|
func (o *GetEnvironmentMetricsInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetEnvironmentMetricsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|