zrok/rest_client_zrok/account/reset_password_responses.go

198 lines
6.1 KiB
Go
Raw Normal View History

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"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// 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
case 500:
result := NewResetPasswordInternalServerError()
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())
}
}
// 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
}
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
}
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
}
// 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
}
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
}