2022-07-25 23:05:44 +02:00
|
|
|
// 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"
|
|
|
|
|
2022-07-26 21:16:02 +02:00
|
|
|
"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
|
|
|
|
|
|
|
|
swagger:response enableCreated
|
|
|
|
*/
|
|
|
|
type EnableCreated struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
2022-07-26 21:16:02 +02:00
|
|
|
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
|
2022-07-26 21:16:02 +02:00
|
|
|
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
|
2022-07-26 21:16:02 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
/*EnableUnauthorized invalid api key
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2022-07-26 18:26:58 +02:00
|
|
|
// 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
|
|
|
|
|
|
|
|
swagger:response enableInternalServerError
|
|
|
|
*/
|
|
|
|
type EnableInternalServerError struct {
|
2022-07-27 19:38:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
|
2022-07-25 23:05:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewEnableInternalServerError creates EnableInternalServerError with default headers values
|
|
|
|
func NewEnableInternalServerError() *EnableInternalServerError {
|
|
|
|
|
|
|
|
return &EnableInternalServerError{}
|
|
|
|
}
|
|
|
|
|
2022-07-27 19:38:35 +02:00
|
|
|
// WithPayload adds the payload to the enable internal server error response
|
|
|
|
func (o *EnableInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *EnableInternalServerError {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the enable internal server error response
|
|
|
|
func (o *EnableInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
2022-07-25 23:05:44 +02:00
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *EnableInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(500)
|
2022-07-27 19:38:35 +02:00
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
2022-07-25 23:05:44 +02:00
|
|
|
}
|