zrok/rest_server_zrok/operations/account/regenerate_token_responses.go
2024-02-20 11:40:11 -05:00

108 lines
2.9 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package account
// 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"
)
// RegenerateTokenOKCode is the HTTP code returned for type RegenerateTokenOK
const RegenerateTokenOKCode int = 200
/*
RegenerateTokenOK regenerate account token
swagger:response regenerateTokenOK
*/
type RegenerateTokenOK struct {
/*
In: Body
*/
Payload *RegenerateTokenOKBody `json:"body,omitempty"`
}
// NewRegenerateTokenOK creates RegenerateTokenOK with default headers values
func NewRegenerateTokenOK() *RegenerateTokenOK {
return &RegenerateTokenOK{}
}
// WithPayload adds the payload to the regenerate token o k response
func (o *RegenerateTokenOK) WithPayload(payload *RegenerateTokenOKBody) *RegenerateTokenOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the regenerate token o k response
func (o *RegenerateTokenOK) SetPayload(payload *RegenerateTokenOKBody) {
o.Payload = payload
}
// WriteResponse to the client
func (o *RegenerateTokenOK) 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
}
}
}
// RegenerateTokenNotFoundCode is the HTTP code returned for type RegenerateTokenNotFound
const RegenerateTokenNotFoundCode int = 404
/*
RegenerateTokenNotFound account not found
swagger:response regenerateTokenNotFound
*/
type RegenerateTokenNotFound struct {
}
// NewRegenerateTokenNotFound creates RegenerateTokenNotFound with default headers values
func NewRegenerateTokenNotFound() *RegenerateTokenNotFound {
return &RegenerateTokenNotFound{}
}
// WriteResponse to the client
func (o *RegenerateTokenNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(404)
}
// RegenerateTokenInternalServerErrorCode is the HTTP code returned for type RegenerateTokenInternalServerError
const RegenerateTokenInternalServerErrorCode int = 500
/*
RegenerateTokenInternalServerError internal server error
swagger:response regenerateTokenInternalServerError
*/
type RegenerateTokenInternalServerError struct {
}
// NewRegenerateTokenInternalServerError creates RegenerateTokenInternalServerError with default headers values
func NewRegenerateTokenInternalServerError() *RegenerateTokenInternalServerError {
return &RegenerateTokenInternalServerError{}
}
// WriteResponse to the client
func (o *RegenerateTokenInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(500)
}