2022-07-27 17:35:28 +02:00
|
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
|
|
|
|
package tunnel
|
|
|
|
|
|
|
|
// 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-27 19:38:35 +02:00
|
|
|
|
|
|
|
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
|
2022-07-27 17:35:28 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// UntunnelOKCode is the HTTP code returned for type UntunnelOK
|
|
|
|
const UntunnelOKCode int = 200
|
|
|
|
|
|
|
|
/*UntunnelOK tunnel removed
|
|
|
|
|
|
|
|
swagger:response untunnelOK
|
|
|
|
*/
|
|
|
|
type UntunnelOK struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewUntunnelOK creates UntunnelOK with default headers values
|
|
|
|
func NewUntunnelOK() *UntunnelOK {
|
|
|
|
|
|
|
|
return &UntunnelOK{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *UntunnelOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
|
|
|
|
|
|
rw.WriteHeader(200)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UntunnelInternalServerErrorCode is the HTTP code returned for type UntunnelInternalServerError
|
|
|
|
const UntunnelInternalServerErrorCode int = 500
|
|
|
|
|
|
|
|
/*UntunnelInternalServerError internal server error
|
|
|
|
|
|
|
|
swagger:response untunnelInternalServerError
|
|
|
|
*/
|
|
|
|
type UntunnelInternalServerError struct {
|
2022-07-27 19:38:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
|
2022-07-27 17:35:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewUntunnelInternalServerError creates UntunnelInternalServerError with default headers values
|
|
|
|
func NewUntunnelInternalServerError() *UntunnelInternalServerError {
|
|
|
|
|
|
|
|
return &UntunnelInternalServerError{}
|
|
|
|
}
|
|
|
|
|
2022-07-27 19:38:35 +02:00
|
|
|
// WithPayload adds the payload to the untunnel internal server error response
|
|
|
|
func (o *UntunnelInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *UntunnelInternalServerError {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the untunnel internal server error response
|
|
|
|
func (o *UntunnelInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
2022-07-27 17:35:28 +02:00
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *UntunnelInternalServerError) 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-27 17:35:28 +02:00
|
|
|
}
|