zrok/rest_server_zrok/operations/identity/verify_responses.go
2022-09-19 15:58:52 -04:00

128 lines
3.1 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"
)
// VerifyOKCode is the HTTP code returned for type VerifyOK
const VerifyOKCode int = 200
/*
VerifyOK token ready
swagger:response verifyOK
*/
type VerifyOK struct {
/*
In: Body
*/
Payload *rest_model_zrok.VerifyResponse `json:"body,omitempty"`
}
// NewVerifyOK creates VerifyOK with default headers values
func NewVerifyOK() *VerifyOK {
return &VerifyOK{}
}
// WithPayload adds the payload to the verify o k response
func (o *VerifyOK) WithPayload(payload *rest_model_zrok.VerifyResponse) *VerifyOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the verify o k response
func (o *VerifyOK) SetPayload(payload *rest_model_zrok.VerifyResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *VerifyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// VerifyNotFoundCode is the HTTP code returned for type VerifyNotFound
const VerifyNotFoundCode int = 404
/*
VerifyNotFound token not found
swagger:response verifyNotFound
*/
type VerifyNotFound struct {
}
// NewVerifyNotFound creates VerifyNotFound with default headers values
func NewVerifyNotFound() *VerifyNotFound {
return &VerifyNotFound{}
}
// WriteResponse to the client
func (o *VerifyNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(404)
}
// VerifyInternalServerErrorCode is the HTTP code returned for type VerifyInternalServerError
const VerifyInternalServerErrorCode int = 500
/*
VerifyInternalServerError internal server error
swagger:response verifyInternalServerError
*/
type VerifyInternalServerError struct {
/*
In: Body
*/
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
}
// NewVerifyInternalServerError creates VerifyInternalServerError with default headers values
func NewVerifyInternalServerError() *VerifyInternalServerError {
return &VerifyInternalServerError{}
}
// WithPayload adds the payload to the verify internal server error response
func (o *VerifyInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *VerifyInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the verify internal server error response
func (o *VerifyInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
o.Payload = payload
}
// WriteResponse to the client
func (o *VerifyInternalServerError) 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
}
}