Files
zrok/rest_server_zrok/operations/admin/add_frontend_grant_responses.go

133 lines
3.7 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package admin
// 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"
)
// AddFrontendGrantOKCode is the HTTP code returned for type AddFrontendGrantOK
const AddFrontendGrantOKCode int = 200
/*
AddFrontendGrantOK ok
swagger:response addFrontendGrantOK
*/
type AddFrontendGrantOK struct {
}
// NewAddFrontendGrantOK creates AddFrontendGrantOK with default headers values
func NewAddFrontendGrantOK() *AddFrontendGrantOK {
return &AddFrontendGrantOK{}
}
// WriteResponse to the client
func (o *AddFrontendGrantOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
// AddFrontendGrantUnauthorizedCode is the HTTP code returned for type AddFrontendGrantUnauthorized
const AddFrontendGrantUnauthorizedCode int = 401
/*
AddFrontendGrantUnauthorized unauthorized
swagger:response addFrontendGrantUnauthorized
*/
type AddFrontendGrantUnauthorized struct {
}
// NewAddFrontendGrantUnauthorized creates AddFrontendGrantUnauthorized with default headers values
func NewAddFrontendGrantUnauthorized() *AddFrontendGrantUnauthorized {
return &AddFrontendGrantUnauthorized{}
}
// WriteResponse to the client
func (o *AddFrontendGrantUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
// AddFrontendGrantNotFoundCode is the HTTP code returned for type AddFrontendGrantNotFound
const AddFrontendGrantNotFoundCode int = 404
/*
AddFrontendGrantNotFound not found
swagger:response addFrontendGrantNotFound
*/
type AddFrontendGrantNotFound struct {
/*
In: Body
*/
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
}
// NewAddFrontendGrantNotFound creates AddFrontendGrantNotFound with default headers values
func NewAddFrontendGrantNotFound() *AddFrontendGrantNotFound {
return &AddFrontendGrantNotFound{}
}
// WithPayload adds the payload to the add frontend grant not found response
func (o *AddFrontendGrantNotFound) WithPayload(payload rest_model_zrok.ErrorMessage) *AddFrontendGrantNotFound {
o.Payload = payload
return o
}
// SetPayload sets the payload to the add frontend grant not found response
func (o *AddFrontendGrantNotFound) SetPayload(payload rest_model_zrok.ErrorMessage) {
o.Payload = payload
}
// WriteResponse to the client
func (o *AddFrontendGrantNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(404)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
// AddFrontendGrantInternalServerErrorCode is the HTTP code returned for type AddFrontendGrantInternalServerError
const AddFrontendGrantInternalServerErrorCode int = 500
/*
AddFrontendGrantInternalServerError internal server error
swagger:response addFrontendGrantInternalServerError
*/
type AddFrontendGrantInternalServerError struct {
}
// NewAddFrontendGrantInternalServerError creates AddFrontendGrantInternalServerError with default headers values
func NewAddFrontendGrantInternalServerError() *AddFrontendGrantInternalServerError {
return &AddFrontendGrantInternalServerError{}
}
// WriteResponse to the client
func (o *AddFrontendGrantInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(500)
}