mirror of https://github.com/vernonkeenan/lib
402 lines
12 KiB
Go
402 lines
12 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2020 by Taxnexus, Inc.
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package user
|
|
|
|
// 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/vernonkeenan/lib/api/auth0/auth0_models"
|
|
)
|
|
|
|
// GetUserByEmailReader is a Reader for the GetUserByEmail structure.
|
|
type GetUserByEmailReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetUserByEmailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetUserByEmailOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetUserByEmailUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetUserByEmailForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetUserByEmailNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetUserByEmailInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetUserByEmailOK creates a GetUserByEmailOK with default headers values
|
|
func NewGetUserByEmailOK() *GetUserByEmailOK {
|
|
return &GetUserByEmailOK{}
|
|
}
|
|
|
|
/*
|
|
GetUserByEmailOK describes a response with status code 200, with default header values.
|
|
|
|
Taxnexus Response with User objects
|
|
*/
|
|
type GetUserByEmailOK struct {
|
|
Payload []*auth0_models.User
|
|
}
|
|
|
|
// IsSuccess returns true when this get user by email o k response has a 2xx status code
|
|
func (o *GetUserByEmailOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get user by email o k response has a 3xx status code
|
|
func (o *GetUserByEmailOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get user by email o k response has a 4xx status code
|
|
func (o *GetUserByEmailOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get user by email o k response has a 5xx status code
|
|
func (o *GetUserByEmailOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get user by email o k response a status code equal to that given
|
|
func (o *GetUserByEmailOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get user by email o k response
|
|
func (o *GetUserByEmailOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetUserByEmailOK) Error() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailOK) String() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailOK) GetPayload() []*auth0_models.User {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetUserByEmailOK) 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
|
|
}
|
|
|
|
// NewGetUserByEmailUnauthorized creates a GetUserByEmailUnauthorized with default headers values
|
|
func NewGetUserByEmailUnauthorized() *GetUserByEmailUnauthorized {
|
|
return &GetUserByEmailUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetUserByEmailUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetUserByEmailUnauthorized struct {
|
|
Payload *auth0_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get user by email unauthorized response has a 2xx status code
|
|
func (o *GetUserByEmailUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get user by email unauthorized response has a 3xx status code
|
|
func (o *GetUserByEmailUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get user by email unauthorized response has a 4xx status code
|
|
func (o *GetUserByEmailUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get user by email unauthorized response has a 5xx status code
|
|
func (o *GetUserByEmailUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get user by email unauthorized response a status code equal to that given
|
|
func (o *GetUserByEmailUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get user by email unauthorized response
|
|
func (o *GetUserByEmailUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetUserByEmailUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailUnauthorized) GetPayload() *auth0_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetUserByEmailUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(auth0_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetUserByEmailForbidden creates a GetUserByEmailForbidden with default headers values
|
|
func NewGetUserByEmailForbidden() *GetUserByEmailForbidden {
|
|
return &GetUserByEmailForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetUserByEmailForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetUserByEmailForbidden struct {
|
|
Payload *auth0_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get user by email forbidden response has a 2xx status code
|
|
func (o *GetUserByEmailForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get user by email forbidden response has a 3xx status code
|
|
func (o *GetUserByEmailForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get user by email forbidden response has a 4xx status code
|
|
func (o *GetUserByEmailForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get user by email forbidden response has a 5xx status code
|
|
func (o *GetUserByEmailForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get user by email forbidden response a status code equal to that given
|
|
func (o *GetUserByEmailForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get user by email forbidden response
|
|
func (o *GetUserByEmailForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetUserByEmailForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailForbidden) String() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailForbidden) GetPayload() *auth0_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetUserByEmailForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(auth0_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetUserByEmailNotFound creates a GetUserByEmailNotFound with default headers values
|
|
func NewGetUserByEmailNotFound() *GetUserByEmailNotFound {
|
|
return &GetUserByEmailNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetUserByEmailNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetUserByEmailNotFound struct {
|
|
Payload *auth0_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get user by email not found response has a 2xx status code
|
|
func (o *GetUserByEmailNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get user by email not found response has a 3xx status code
|
|
func (o *GetUserByEmailNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get user by email not found response has a 4xx status code
|
|
func (o *GetUserByEmailNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get user by email not found response has a 5xx status code
|
|
func (o *GetUserByEmailNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get user by email not found response a status code equal to that given
|
|
func (o *GetUserByEmailNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get user by email not found response
|
|
func (o *GetUserByEmailNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetUserByEmailNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailNotFound) String() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailNotFound) GetPayload() *auth0_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetUserByEmailNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(auth0_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetUserByEmailInternalServerError creates a GetUserByEmailInternalServerError with default headers values
|
|
func NewGetUserByEmailInternalServerError() *GetUserByEmailInternalServerError {
|
|
return &GetUserByEmailInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetUserByEmailInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetUserByEmailInternalServerError struct {
|
|
Payload *auth0_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get user by email internal server error response has a 2xx status code
|
|
func (o *GetUserByEmailInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get user by email internal server error response has a 3xx status code
|
|
func (o *GetUserByEmailInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get user by email internal server error response has a 4xx status code
|
|
func (o *GetUserByEmailInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get user by email internal server error response has a 5xx status code
|
|
func (o *GetUserByEmailInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get user by email internal server error response a status code equal to that given
|
|
func (o *GetUserByEmailInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get user by email internal server error response
|
|
func (o *GetUserByEmailInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetUserByEmailInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetUserByEmailInternalServerError) GetPayload() *auth0_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetUserByEmailInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(auth0_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|