zrok/rest_client_zrok/metadata/get_environment_detail_responses.go

270 lines
9.0 KiB
Go
Raw Normal View History

// 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"
)
// GetEnvironmentDetailReader is a Reader for the GetEnvironmentDetail structure.
type GetEnvironmentDetailReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetEnvironmentDetailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetEnvironmentDetailOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetEnvironmentDetailUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetEnvironmentDetailNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetEnvironmentDetailInternalServerError()
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())
}
}
// NewGetEnvironmentDetailOK creates a GetEnvironmentDetailOK with default headers values
func NewGetEnvironmentDetailOK() *GetEnvironmentDetailOK {
return &GetEnvironmentDetailOK{}
}
/*
GetEnvironmentDetailOK describes a response with status code 200, with default header values.
ok
*/
type GetEnvironmentDetailOK struct {
Payload *rest_model_zrok.EnvironmentAndResources
}
// IsSuccess returns true when this get environment detail o k response has a 2xx status code
func (o *GetEnvironmentDetailOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get environment detail o k response has a 3xx status code
func (o *GetEnvironmentDetailOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get environment detail o k response has a 4xx status code
func (o *GetEnvironmentDetailOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get environment detail o k response has a 5xx status code
func (o *GetEnvironmentDetailOK) IsServerError() bool {
return false
}
// IsCode returns true when this get environment detail o k response a status code equal to that given
func (o *GetEnvironmentDetailOK) IsCode(code int) bool {
return code == 200
}
func (o *GetEnvironmentDetailOK) Error() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailOK %+v", 200, o.Payload)
}
func (o *GetEnvironmentDetailOK) String() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailOK %+v", 200, o.Payload)
}
func (o *GetEnvironmentDetailOK) GetPayload() *rest_model_zrok.EnvironmentAndResources {
return o.Payload
}
func (o *GetEnvironmentDetailOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model_zrok.EnvironmentAndResources)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEnvironmentDetailUnauthorized creates a GetEnvironmentDetailUnauthorized with default headers values
func NewGetEnvironmentDetailUnauthorized() *GetEnvironmentDetailUnauthorized {
return &GetEnvironmentDetailUnauthorized{}
}
/*
GetEnvironmentDetailUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type GetEnvironmentDetailUnauthorized struct {
}
// IsSuccess returns true when this get environment detail unauthorized response has a 2xx status code
func (o *GetEnvironmentDetailUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get environment detail unauthorized response has a 3xx status code
func (o *GetEnvironmentDetailUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get environment detail unauthorized response has a 4xx status code
func (o *GetEnvironmentDetailUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get environment detail unauthorized response has a 5xx status code
func (o *GetEnvironmentDetailUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get environment detail unauthorized response a status code equal to that given
func (o *GetEnvironmentDetailUnauthorized) IsCode(code int) bool {
return code == 401
}
func (o *GetEnvironmentDetailUnauthorized) Error() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailUnauthorized ", 401)
}
func (o *GetEnvironmentDetailUnauthorized) String() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailUnauthorized ", 401)
}
func (o *GetEnvironmentDetailUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewGetEnvironmentDetailNotFound creates a GetEnvironmentDetailNotFound with default headers values
func NewGetEnvironmentDetailNotFound() *GetEnvironmentDetailNotFound {
return &GetEnvironmentDetailNotFound{}
}
/*
GetEnvironmentDetailNotFound describes a response with status code 404, with default header values.
not found
*/
type GetEnvironmentDetailNotFound struct {
}
// IsSuccess returns true when this get environment detail not found response has a 2xx status code
func (o *GetEnvironmentDetailNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get environment detail not found response has a 3xx status code
func (o *GetEnvironmentDetailNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get environment detail not found response has a 4xx status code
func (o *GetEnvironmentDetailNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get environment detail not found response has a 5xx status code
func (o *GetEnvironmentDetailNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get environment detail not found response a status code equal to that given
func (o *GetEnvironmentDetailNotFound) IsCode(code int) bool {
return code == 404
}
func (o *GetEnvironmentDetailNotFound) Error() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailNotFound ", 404)
}
func (o *GetEnvironmentDetailNotFound) String() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailNotFound ", 404)
}
func (o *GetEnvironmentDetailNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewGetEnvironmentDetailInternalServerError creates a GetEnvironmentDetailInternalServerError with default headers values
func NewGetEnvironmentDetailInternalServerError() *GetEnvironmentDetailInternalServerError {
return &GetEnvironmentDetailInternalServerError{}
}
/*
GetEnvironmentDetailInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type GetEnvironmentDetailInternalServerError struct {
}
// IsSuccess returns true when this get environment detail internal server error response has a 2xx status code
func (o *GetEnvironmentDetailInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get environment detail internal server error response has a 3xx status code
func (o *GetEnvironmentDetailInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get environment detail internal server error response has a 4xx status code
func (o *GetEnvironmentDetailInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get environment detail internal server error response has a 5xx status code
func (o *GetEnvironmentDetailInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get environment detail internal server error response a status code equal to that given
func (o *GetEnvironmentDetailInternalServerError) IsCode(code int) bool {
return code == 500
}
func (o *GetEnvironmentDetailInternalServerError) Error() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailInternalServerError ", 500)
}
func (o *GetEnvironmentDetailInternalServerError) String() string {
2022-12-22 20:56:19 +01:00
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailInternalServerError ", 500)
}
func (o *GetEnvironmentDetailInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}