zrok/rest_server_zrok/operations/metadata/overview_responses.go

106 lines
2.7 KiB
Go
Raw Normal View History

2022-08-03 20:36:40 +02:00
// 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 (
"net/http"
"github.com/go-openapi/runtime"
"github.com/openziti/zrok/rest_model_zrok"
2022-08-03 20:36:40 +02:00
)
// OverviewOKCode is the HTTP code returned for type OverviewOK
const OverviewOKCode int = 200
/*
OverviewOK overview returned
2022-08-03 20:36:40 +02:00
swagger:response overviewOK
*/
type OverviewOK struct {
/*
In: Body
*/
Payload rest_model_zrok.EnvironmentSharesList `json:"body,omitempty"`
2022-08-03 20:36:40 +02:00
}
// NewOverviewOK creates OverviewOK with default headers values
func NewOverviewOK() *OverviewOK {
return &OverviewOK{}
}
// WithPayload adds the payload to the overview o k response
func (o *OverviewOK) WithPayload(payload rest_model_zrok.EnvironmentSharesList) *OverviewOK {
2022-08-03 20:36:40 +02:00
o.Payload = payload
return o
}
// SetPayload sets the payload to the overview o k response
func (o *OverviewOK) SetPayload(payload rest_model_zrok.EnvironmentSharesList) {
2022-08-03 20:36:40 +02:00
o.Payload = payload
}
// WriteResponse to the client
func (o *OverviewOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
2022-08-03 21:05:28 +02:00
payload := o.Payload
if payload == nil {
// return empty array
payload = rest_model_zrok.EnvironmentSharesList{}
2022-08-03 21:05:28 +02:00
}
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
2022-08-03 20:36:40 +02:00
}
}
// OverviewInternalServerErrorCode is the HTTP code returned for type OverviewInternalServerError
const OverviewInternalServerErrorCode int = 500
/*
OverviewInternalServerError internal server error
2022-08-03 20:36:40 +02:00
swagger:response overviewInternalServerError
*/
type OverviewInternalServerError struct {
/*
In: Body
*/
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
}
// NewOverviewInternalServerError creates OverviewInternalServerError with default headers values
func NewOverviewInternalServerError() *OverviewInternalServerError {
return &OverviewInternalServerError{}
}
// WithPayload adds the payload to the overview internal server error response
func (o *OverviewInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *OverviewInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the overview internal server error response
func (o *OverviewInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
o.Payload = payload
}
// WriteResponse to the client
func (o *OverviewInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}