zrok/rest_server_zrok/operations/identity/disable_responses.go
2022-09-01 17:39:02 -04:00

108 lines
2.7 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package identity
// 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"
)
// DisableOKCode is the HTTP code returned for type DisableOK
const DisableOKCode int = 200
/*
DisableOK environment disabled
swagger:response disableOK
*/
type DisableOK struct {
}
// NewDisableOK creates DisableOK with default headers values
func NewDisableOK() *DisableOK {
return &DisableOK{}
}
// WriteResponse to the client
func (o *DisableOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
// DisableUnauthorizedCode is the HTTP code returned for type DisableUnauthorized
const DisableUnauthorizedCode int = 401
/*
DisableUnauthorized invalid environment
swagger:response disableUnauthorized
*/
type DisableUnauthorized struct {
}
// NewDisableUnauthorized creates DisableUnauthorized with default headers values
func NewDisableUnauthorized() *DisableUnauthorized {
return &DisableUnauthorized{}
}
// WriteResponse to the client
func (o *DisableUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
// DisableInternalServerErrorCode is the HTTP code returned for type DisableInternalServerError
const DisableInternalServerErrorCode int = 500
/*
DisableInternalServerError internal server error
swagger:response disableInternalServerError
*/
type DisableInternalServerError struct {
/*
In: Body
*/
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
}
// NewDisableInternalServerError creates DisableInternalServerError with default headers values
func NewDisableInternalServerError() *DisableInternalServerError {
return &DisableInternalServerError{}
}
// WithPayload adds the payload to the disable internal server error response
func (o *DisableInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *DisableInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the disable internal server error response
func (o *DisableInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
o.Payload = payload
}
// WriteResponse to the client
func (o *DisableInternalServerError) 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
}
}