mirror of
https://github.com/openziti/zrok.git
synced 2024-12-01 12:34:08 +01:00
238 lines
7.8 KiB
Go
238 lines
7.8 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 (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
"github.com/go-openapi/swag"
|
||
|
)
|
||
|
|
||
|
// ResetPasswordRequestReader is a Reader for the ResetPasswordRequest structure.
|
||
|
type ResetPasswordRequestReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *ResetPasswordRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 201:
|
||
|
result := NewResetPasswordRequestCreated()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 400:
|
||
|
result := NewResetPasswordRequestBadRequest()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewResetPasswordRequestInternalServerError()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
default:
|
||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewResetPasswordRequestCreated creates a ResetPasswordRequestCreated with default headers values
|
||
|
func NewResetPasswordRequestCreated() *ResetPasswordRequestCreated {
|
||
|
return &ResetPasswordRequestCreated{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
ResetPasswordRequestCreated describes a response with status code 201, with default header values.
|
||
|
|
||
|
forgot password request created
|
||
|
*/
|
||
|
type ResetPasswordRequestCreated struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this reset password request created response has a 2xx status code
|
||
|
func (o *ResetPasswordRequestCreated) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this reset password request created response has a 3xx status code
|
||
|
func (o *ResetPasswordRequestCreated) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this reset password request created response has a 4xx status code
|
||
|
func (o *ResetPasswordRequestCreated) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this reset password request created response has a 5xx status code
|
||
|
func (o *ResetPasswordRequestCreated) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this reset password request created response a status code equal to that given
|
||
|
func (o *ResetPasswordRequestCreated) IsCode(code int) bool {
|
||
|
return code == 201
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestCreated) Error() string {
|
||
|
return fmt.Sprintf("[POST /resetPasswordRequest][%d] resetPasswordRequestCreated ", 201)
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestCreated) String() string {
|
||
|
return fmt.Sprintf("[POST /resetPasswordRequest][%d] resetPasswordRequestCreated ", 201)
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewResetPasswordRequestBadRequest creates a ResetPasswordRequestBadRequest with default headers values
|
||
|
func NewResetPasswordRequestBadRequest() *ResetPasswordRequestBadRequest {
|
||
|
return &ResetPasswordRequestBadRequest{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
ResetPasswordRequestBadRequest describes a response with status code 400, with default header values.
|
||
|
|
||
|
forgot password request not created
|
||
|
*/
|
||
|
type ResetPasswordRequestBadRequest struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this reset password request bad request response has a 2xx status code
|
||
|
func (o *ResetPasswordRequestBadRequest) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this reset password request bad request response has a 3xx status code
|
||
|
func (o *ResetPasswordRequestBadRequest) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this reset password request bad request response has a 4xx status code
|
||
|
func (o *ResetPasswordRequestBadRequest) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this reset password request bad request response has a 5xx status code
|
||
|
func (o *ResetPasswordRequestBadRequest) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this reset password request bad request response a status code equal to that given
|
||
|
func (o *ResetPasswordRequestBadRequest) IsCode(code int) bool {
|
||
|
return code == 400
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestBadRequest) Error() string {
|
||
|
return fmt.Sprintf("[POST /resetPasswordRequest][%d] resetPasswordRequestBadRequest ", 400)
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestBadRequest) String() string {
|
||
|
return fmt.Sprintf("[POST /resetPasswordRequest][%d] resetPasswordRequestBadRequest ", 400)
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewResetPasswordRequestInternalServerError creates a ResetPasswordRequestInternalServerError with default headers values
|
||
|
func NewResetPasswordRequestInternalServerError() *ResetPasswordRequestInternalServerError {
|
||
|
return &ResetPasswordRequestInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
ResetPasswordRequestInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
internal server error
|
||
|
*/
|
||
|
type ResetPasswordRequestInternalServerError struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this reset password request internal server error response has a 2xx status code
|
||
|
func (o *ResetPasswordRequestInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this reset password request internal server error response has a 3xx status code
|
||
|
func (o *ResetPasswordRequestInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this reset password request internal server error response has a 4xx status code
|
||
|
func (o *ResetPasswordRequestInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this reset password request internal server error response has a 5xx status code
|
||
|
func (o *ResetPasswordRequestInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this reset password request internal server error response a status code equal to that given
|
||
|
func (o *ResetPasswordRequestInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[POST /resetPasswordRequest][%d] resetPasswordRequestInternalServerError ", 500)
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[POST /resetPasswordRequest][%d] resetPasswordRequestInternalServerError ", 500)
|
||
|
}
|
||
|
|
||
|
func (o *ResetPasswordRequestInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
ResetPasswordRequestBody reset password request body
|
||
|
swagger:model ResetPasswordRequestBody
|
||
|
*/
|
||
|
type ResetPasswordRequestBody struct {
|
||
|
|
||
|
// email address
|
||
|
EmailAddress string `json:"emailAddress,omitempty"`
|
||
|
}
|
||
|
|
||
|
// Validate validates this reset password request body
|
||
|
func (o *ResetPasswordRequestBody) Validate(formats strfmt.Registry) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// ContextValidate validates this reset password request body based on context it is used
|
||
|
func (o *ResetPasswordRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// MarshalBinary interface implementation
|
||
|
func (o *ResetPasswordRequestBody) MarshalBinary() ([]byte, error) {
|
||
|
if o == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
return swag.WriteJSON(o)
|
||
|
}
|
||
|
|
||
|
// UnmarshalBinary interface implementation
|
||
|
func (o *ResetPasswordRequestBody) UnmarshalBinary(b []byte) error {
|
||
|
var res ResetPasswordRequestBody
|
||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
*o = res
|
||
|
return nil
|
||
|
}
|