zrok/rest_server_zrok/operations/environment/enable_responses.go

135 lines
3.3 KiB
Go
Raw Normal View History

2022-07-25 23:05:44 +02:00
// Code generated by go-swagger; DO NOT EDIT.
2022-11-30 17:43:00 +01:00
package environment
2022-07-25 23:05:44 +02:00
// 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-test-kitchen/zrok/rest_model_zrok"
2022-07-25 23:05:44 +02:00
)
// EnableCreatedCode is the HTTP code returned for type EnableCreated
const EnableCreatedCode int = 201
/*
EnableCreated environment enabled
2022-07-25 23:05:44 +02:00
swagger:response enableCreated
*/
type EnableCreated struct {
/*
In: Body
*/
Payload *rest_model_zrok.EnableResponse `json:"body,omitempty"`
2022-07-25 23:05:44 +02:00
}
// NewEnableCreated creates EnableCreated with default headers values
func NewEnableCreated() *EnableCreated {
return &EnableCreated{}
}
// WithPayload adds the payload to the enable created response
func (o *EnableCreated) WithPayload(payload *rest_model_zrok.EnableResponse) *EnableCreated {
2022-07-25 23:05:44 +02:00
o.Payload = payload
return o
}
// SetPayload sets the payload to the enable created response
func (o *EnableCreated) SetPayload(payload *rest_model_zrok.EnableResponse) {
2022-07-25 23:05:44 +02:00
o.Payload = payload
}
// WriteResponse to the client
func (o *EnableCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(201)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
2022-07-27 20:50:46 +02:00
// EnableUnauthorizedCode is the HTTP code returned for type EnableUnauthorized
const EnableUnauthorizedCode int = 401
/*
2022-11-30 17:43:00 +01:00
EnableUnauthorized unauthorized
2022-07-27 20:50:46 +02:00
swagger:response enableUnauthorized
*/
type EnableUnauthorized struct {
}
// NewEnableUnauthorized creates EnableUnauthorized with default headers values
func NewEnableUnauthorized() *EnableUnauthorized {
return &EnableUnauthorized{}
}
// WriteResponse to the client
func (o *EnableUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
// EnableNotFoundCode is the HTTP code returned for type EnableNotFound
const EnableNotFoundCode int = 404
/*
EnableNotFound account not found
swagger:response enableNotFound
*/
type EnableNotFound struct {
}
// NewEnableNotFound creates EnableNotFound with default headers values
func NewEnableNotFound() *EnableNotFound {
return &EnableNotFound{}
}
// WriteResponse to the client
func (o *EnableNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(404)
}
2022-07-25 23:05:44 +02:00
// EnableInternalServerErrorCode is the HTTP code returned for type EnableInternalServerError
const EnableInternalServerErrorCode int = 500
/*
EnableInternalServerError internal server error
2022-07-25 23:05:44 +02:00
swagger:response enableInternalServerError
*/
type EnableInternalServerError struct {
}
// NewEnableInternalServerError creates EnableInternalServerError with default headers values
func NewEnableInternalServerError() *EnableInternalServerError {
return &EnableInternalServerError{}
}
// WriteResponse to the client
func (o *EnableInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
2022-11-30 17:43:00 +01:00
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
2022-07-25 23:05:44 +02:00
rw.WriteHeader(500)
}