404 lines
14 KiB
Go
404 lines
14 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2023 by Vernon Keenan
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package users
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
"code.tnxs.net/work/lib/api/members/members_models"
|
|
)
|
|
|
|
// PostUsersAuthPasswordReader is a Reader for the PostUsersAuthPassword structure.
|
|
type PostUsersAuthPasswordReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PostUsersAuthPasswordReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPostUsersAuthPasswordOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPostUsersAuthPasswordUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewPostUsersAuthPasswordNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewPostUsersAuthPasswordUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPostUsersAuthPasswordInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostUsersAuthPasswordOK creates a PostUsersAuthPasswordOK with default headers values
|
|
func NewPostUsersAuthPasswordOK() *PostUsersAuthPasswordOK {
|
|
return &PostUsersAuthPasswordOK{}
|
|
}
|
|
|
|
/*
|
|
PostUsersAuthPasswordOK describes a response with status code 200, with default header values.
|
|
|
|
Response with single UserAuth object
|
|
*/
|
|
type PostUsersAuthPasswordOK struct {
|
|
Payload *members_models.UserAuth
|
|
}
|
|
|
|
// IsSuccess returns true when this post users auth password o k response has a 2xx status code
|
|
func (o *PostUsersAuthPasswordOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post users auth password o k response has a 3xx status code
|
|
func (o *PostUsersAuthPasswordOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post users auth password o k response has a 4xx status code
|
|
func (o *PostUsersAuthPasswordOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post users auth password o k response has a 5xx status code
|
|
func (o *PostUsersAuthPasswordOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post users auth password o k response a status code equal to that given
|
|
func (o *PostUsersAuthPasswordOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the post users auth password o k response
|
|
func (o *PostUsersAuthPasswordOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordOK) Error() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordOK) String() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordOK) GetPayload() *members_models.UserAuth {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.UserAuth)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostUsersAuthPasswordUnauthorized creates a PostUsersAuthPasswordUnauthorized with default headers values
|
|
func NewPostUsersAuthPasswordUnauthorized() *PostUsersAuthPasswordUnauthorized {
|
|
return &PostUsersAuthPasswordUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PostUsersAuthPasswordUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PostUsersAuthPasswordUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post users auth password unauthorized response has a 2xx status code
|
|
func (o *PostUsersAuthPasswordUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post users auth password unauthorized response has a 3xx status code
|
|
func (o *PostUsersAuthPasswordUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post users auth password unauthorized response has a 4xx status code
|
|
func (o *PostUsersAuthPasswordUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post users auth password unauthorized response has a 5xx status code
|
|
func (o *PostUsersAuthPasswordUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post users auth password unauthorized response a status code equal to that given
|
|
func (o *PostUsersAuthPasswordUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the post users auth password unauthorized response
|
|
func (o *PostUsersAuthPasswordUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostUsersAuthPasswordNotFound creates a PostUsersAuthPasswordNotFound with default headers values
|
|
func NewPostUsersAuthPasswordNotFound() *PostUsersAuthPasswordNotFound {
|
|
return &PostUsersAuthPasswordNotFound{}
|
|
}
|
|
|
|
/*
|
|
PostUsersAuthPasswordNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type PostUsersAuthPasswordNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post users auth password not found response has a 2xx status code
|
|
func (o *PostUsersAuthPasswordNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post users auth password not found response has a 3xx status code
|
|
func (o *PostUsersAuthPasswordNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post users auth password not found response has a 4xx status code
|
|
func (o *PostUsersAuthPasswordNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post users auth password not found response has a 5xx status code
|
|
func (o *PostUsersAuthPasswordNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post users auth password not found response a status code equal to that given
|
|
func (o *PostUsersAuthPasswordNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the post users auth password not found response
|
|
func (o *PostUsersAuthPasswordNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordNotFound) String() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostUsersAuthPasswordUnprocessableEntity creates a PostUsersAuthPasswordUnprocessableEntity with default headers values
|
|
func NewPostUsersAuthPasswordUnprocessableEntity() *PostUsersAuthPasswordUnprocessableEntity {
|
|
return &PostUsersAuthPasswordUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
PostUsersAuthPasswordUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PostUsersAuthPasswordUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post users auth password unprocessable entity response has a 2xx status code
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post users auth password unprocessable entity response has a 3xx status code
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post users auth password unprocessable entity response has a 4xx status code
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post users auth password unprocessable entity response has a 5xx status code
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post users auth password unprocessable entity response a status code equal to that given
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the post users auth password unprocessable entity response
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostUsersAuthPasswordInternalServerError creates a PostUsersAuthPasswordInternalServerError with default headers values
|
|
func NewPostUsersAuthPasswordInternalServerError() *PostUsersAuthPasswordInternalServerError {
|
|
return &PostUsersAuthPasswordInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PostUsersAuthPasswordInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PostUsersAuthPasswordInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post users auth password internal server error response has a 2xx status code
|
|
func (o *PostUsersAuthPasswordInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post users auth password internal server error response has a 3xx status code
|
|
func (o *PostUsersAuthPasswordInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post users auth password internal server error response has a 4xx status code
|
|
func (o *PostUsersAuthPasswordInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post users auth password internal server error response has a 5xx status code
|
|
func (o *PostUsersAuthPasswordInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this post users auth password internal server error response a status code equal to that given
|
|
func (o *PostUsersAuthPasswordInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the post users auth password internal server error response
|
|
func (o *PostUsersAuthPasswordInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /users/auth/password][%d] postUsersAuthPasswordInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostUsersAuthPasswordInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|