2023-01-18 20:05:10 +01:00
|
|
|
// 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 (
|
|
|
|
"fmt"
|
2023-05-11 20:35:49 +02:00
|
|
|
"io"
|
2023-01-18 20:05:10 +01:00
|
|
|
|
|
|
|
"github.com/go-openapi/runtime"
|
|
|
|
"github.com/go-openapi/strfmt"
|
2023-05-11 20:35:49 +02:00
|
|
|
|
|
|
|
"github.com/openziti/zrok/rest_model_zrok"
|
2023-01-18 20:05:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// ResetPasswordReader is a Reader for the ResetPassword structure.
|
|
|
|
type ResetPasswordReader struct {
|
|
|
|
formats strfmt.Registry
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
|
|
func (o *ResetPasswordReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
|
|
result := NewResetPasswordOK()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return result, nil
|
|
|
|
case 404:
|
|
|
|
result := NewResetPasswordNotFound()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
2023-05-11 20:35:49 +02:00
|
|
|
case 422:
|
|
|
|
result := NewResetPasswordUnprocessableEntity()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
2023-01-18 20:05:10 +01:00
|
|
|
case 500:
|
|
|
|
result := NewResetPasswordInternalServerError()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
default:
|
2023-12-07 20:26:03 +01:00
|
|
|
return nil, runtime.NewAPIError("[POST /resetPassword] resetPassword", response, response.Code())
|
2023-01-18 20:05:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewResetPasswordOK creates a ResetPasswordOK with default headers values
|
|
|
|
func NewResetPasswordOK() *ResetPasswordOK {
|
|
|
|
return &ResetPasswordOK{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
ResetPasswordOK describes a response with status code 200, with default header values.
|
|
|
|
|
|
|
|
password reset
|
|
|
|
*/
|
|
|
|
type ResetPasswordOK struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this reset password o k response has a 2xx status code
|
|
|
|
func (o *ResetPasswordOK) IsSuccess() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this reset password o k response has a 3xx status code
|
|
|
|
func (o *ResetPasswordOK) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this reset password o k response has a 4xx status code
|
|
|
|
func (o *ResetPasswordOK) IsClientError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this reset password o k response has a 5xx status code
|
|
|
|
func (o *ResetPasswordOK) IsServerError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this reset password o k response a status code equal to that given
|
|
|
|
func (o *ResetPasswordOK) IsCode(code int) bool {
|
|
|
|
return code == 200
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the reset password o k response
|
|
|
|
func (o *ResetPasswordOK) Code() int {
|
|
|
|
return 200
|
|
|
|
}
|
|
|
|
|
2023-01-18 20:05:10 +01:00
|
|
|
func (o *ResetPasswordOK) Error() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordOK ", 200)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordOK) String() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordOK ", 200)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewResetPasswordNotFound creates a ResetPasswordNotFound with default headers values
|
|
|
|
func NewResetPasswordNotFound() *ResetPasswordNotFound {
|
|
|
|
return &ResetPasswordNotFound{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
ResetPasswordNotFound describes a response with status code 404, with default header values.
|
|
|
|
|
|
|
|
request not found
|
|
|
|
*/
|
|
|
|
type ResetPasswordNotFound struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this reset password not found response has a 2xx status code
|
|
|
|
func (o *ResetPasswordNotFound) IsSuccess() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this reset password not found response has a 3xx status code
|
|
|
|
func (o *ResetPasswordNotFound) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this reset password not found response has a 4xx status code
|
|
|
|
func (o *ResetPasswordNotFound) IsClientError() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this reset password not found response has a 5xx status code
|
|
|
|
func (o *ResetPasswordNotFound) IsServerError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this reset password not found response a status code equal to that given
|
|
|
|
func (o *ResetPasswordNotFound) IsCode(code int) bool {
|
|
|
|
return code == 404
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the reset password not found response
|
|
|
|
func (o *ResetPasswordNotFound) Code() int {
|
|
|
|
return 404
|
|
|
|
}
|
|
|
|
|
2023-01-18 20:05:10 +01:00
|
|
|
func (o *ResetPasswordNotFound) Error() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordNotFound ", 404)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordNotFound) String() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordNotFound ", 404)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2023-05-11 20:35:49 +02:00
|
|
|
// NewResetPasswordUnprocessableEntity creates a ResetPasswordUnprocessableEntity with default headers values
|
|
|
|
func NewResetPasswordUnprocessableEntity() *ResetPasswordUnprocessableEntity {
|
|
|
|
return &ResetPasswordUnprocessableEntity{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
ResetPasswordUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
|
|
|
|
password validation failure
|
|
|
|
*/
|
|
|
|
type ResetPasswordUnprocessableEntity struct {
|
|
|
|
Payload rest_model_zrok.ErrorMessage
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this reset password unprocessable entity response has a 2xx status code
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) IsSuccess() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this reset password unprocessable entity response has a 3xx status code
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this reset password unprocessable entity response has a 4xx status code
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) IsClientError() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this reset password unprocessable entity response has a 5xx status code
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) IsServerError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this reset password unprocessable entity response a status code equal to that given
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) IsCode(code int) bool {
|
|
|
|
return code == 422
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the reset password unprocessable entity response
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) Code() int {
|
|
|
|
return 422
|
|
|
|
}
|
|
|
|
|
2023-05-11 20:35:49 +02:00
|
|
|
func (o *ResetPasswordUnprocessableEntity) Error() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordUnprocessableEntity %+v", 422, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) String() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordUnprocessableEntity %+v", 422, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
// response payload
|
|
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2023-01-18 20:05:10 +01:00
|
|
|
// NewResetPasswordInternalServerError creates a ResetPasswordInternalServerError with default headers values
|
|
|
|
func NewResetPasswordInternalServerError() *ResetPasswordInternalServerError {
|
|
|
|
return &ResetPasswordInternalServerError{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
ResetPasswordInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
|
|
|
|
internal server error
|
|
|
|
*/
|
|
|
|
type ResetPasswordInternalServerError struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this reset password internal server error response has a 2xx status code
|
|
|
|
func (o *ResetPasswordInternalServerError) IsSuccess() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this reset password internal server error response has a 3xx status code
|
|
|
|
func (o *ResetPasswordInternalServerError) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this reset password internal server error response has a 4xx status code
|
|
|
|
func (o *ResetPasswordInternalServerError) IsClientError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this reset password internal server error response has a 5xx status code
|
|
|
|
func (o *ResetPasswordInternalServerError) IsServerError() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this reset password internal server error response a status code equal to that given
|
|
|
|
func (o *ResetPasswordInternalServerError) IsCode(code int) bool {
|
|
|
|
return code == 500
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the reset password internal server error response
|
|
|
|
func (o *ResetPasswordInternalServerError) Code() int {
|
|
|
|
return 500
|
|
|
|
}
|
|
|
|
|
2023-01-18 20:05:10 +01:00
|
|
|
func (o *ResetPasswordInternalServerError) Error() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordInternalServerError ", 500)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordInternalServerError) String() string {
|
|
|
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordInternalServerError ", 500)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *ResetPasswordInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|