zrok/rest_server_zrok/operations/account/change_password_responses.go

158 lines
4.5 KiB
Go
Raw Normal View History

// 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"
"github.com/openziti/zrok/rest_model_zrok"
)
// ChangePasswordOKCode is the HTTP code returned for type ChangePasswordOK
const ChangePasswordOKCode int = 200
/*
ChangePasswordOK changed password
swagger:response changePasswordOK
*/
type ChangePasswordOK struct {
}
// NewChangePasswordOK creates ChangePasswordOK with default headers values
func NewChangePasswordOK() *ChangePasswordOK {
return &ChangePasswordOK{}
}
// WriteResponse to the client
func (o *ChangePasswordOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
// ChangePasswordBadRequestCode is the HTTP code returned for type ChangePasswordBadRequest
const ChangePasswordBadRequestCode int = 400
/*
ChangePasswordBadRequest password not changed
swagger:response changePasswordBadRequest
*/
type ChangePasswordBadRequest struct {
}
// NewChangePasswordBadRequest creates ChangePasswordBadRequest with default headers values
func NewChangePasswordBadRequest() *ChangePasswordBadRequest {
return &ChangePasswordBadRequest{}
}
// WriteResponse to the client
func (o *ChangePasswordBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(400)
}
// ChangePasswordUnauthorizedCode is the HTTP code returned for type ChangePasswordUnauthorized
const ChangePasswordUnauthorizedCode int = 401
/*
ChangePasswordUnauthorized unauthorized
swagger:response changePasswordUnauthorized
*/
type ChangePasswordUnauthorized struct {
}
// NewChangePasswordUnauthorized creates ChangePasswordUnauthorized with default headers values
func NewChangePasswordUnauthorized() *ChangePasswordUnauthorized {
return &ChangePasswordUnauthorized{}
}
// WriteResponse to the client
func (o *ChangePasswordUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
// ChangePasswordUnprocessableEntityCode is the HTTP code returned for type ChangePasswordUnprocessableEntity
const ChangePasswordUnprocessableEntityCode int = 422
/*
ChangePasswordUnprocessableEntity password validation failure
swagger:response changePasswordUnprocessableEntity
*/
type ChangePasswordUnprocessableEntity struct {
/*
In: Body
*/
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
}
// NewChangePasswordUnprocessableEntity creates ChangePasswordUnprocessableEntity with default headers values
func NewChangePasswordUnprocessableEntity() *ChangePasswordUnprocessableEntity {
return &ChangePasswordUnprocessableEntity{}
}
// WithPayload adds the payload to the change password unprocessable entity response
func (o *ChangePasswordUnprocessableEntity) WithPayload(payload rest_model_zrok.ErrorMessage) *ChangePasswordUnprocessableEntity {
o.Payload = payload
return o
}
// SetPayload sets the payload to the change password unprocessable entity response
func (o *ChangePasswordUnprocessableEntity) SetPayload(payload rest_model_zrok.ErrorMessage) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ChangePasswordUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(422)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
// ChangePasswordInternalServerErrorCode is the HTTP code returned for type ChangePasswordInternalServerError
const ChangePasswordInternalServerErrorCode int = 500
/*
ChangePasswordInternalServerError internal server error
swagger:response changePasswordInternalServerError
*/
type ChangePasswordInternalServerError struct {
}
// NewChangePasswordInternalServerError creates ChangePasswordInternalServerError with default headers values
func NewChangePasswordInternalServerError() *ChangePasswordInternalServerError {
return &ChangePasswordInternalServerError{}
}
// WriteResponse to the client
func (o *ChangePasswordInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(500)
}