mirror of https://github.com/vernonkeenan/lib
parent
d90985627d
commit
c8efe1a2b0
35
Makefile
35
Makefile
|
@ -14,24 +14,14 @@ swagger:
|
||||||
cp ../sf-gate/swagger/sf-gate-vernonkeenan.yaml ./swagger/external
|
cp ../sf-gate/swagger/sf-gate-vernonkeenan.yaml ./swagger/external
|
||||||
cp ../research/swagger/research-vernonkeenan.yaml ./swagger
|
cp ../research/swagger/research-vernonkeenan.yaml ./swagger
|
||||||
cp ../research/swagger/research-vernonkeenan.yaml ./swagger/external
|
cp ../research/swagger/research-vernonkeenan.yaml ./swagger/external
|
||||||
|
cp ../members/swagger/members-vernonkeenan.yaml ./swagger
|
||||||
|
cp ../members/swagger/members-vernonkeenan.yaml ./swagger/external
|
||||||
#
|
#
|
||||||
rm -rf api
|
rm -rf api
|
||||||
#
|
#
|
||||||
# generate auth0 client
|
|
||||||
#
|
|
||||||
mkdir -p api/auth0
|
|
||||||
swagger generate client \
|
|
||||||
--log-output=./swagger/logs/generate-auth0-client.log \
|
|
||||||
--copyright-file=./build/COPYRIGHT \
|
|
||||||
--name=auth0 \
|
|
||||||
--spec=./swagger/auth0.yaml \
|
|
||||||
--target=./api/auth0 \
|
|
||||||
--client-package=auth0-client \
|
|
||||||
--model-package=auth0-models
|
|
||||||
#
|
|
||||||
# generate auth client
|
# generate auth client
|
||||||
#
|
#
|
||||||
mkdir api/auth
|
mkdir -p api/auth
|
||||||
swagger generate client \
|
swagger generate client \
|
||||||
--log-output=./swagger/logs/generate-auth-client.log \
|
--log-output=./swagger/logs/generate-auth-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
|
@ -143,6 +133,25 @@ swagger:
|
||||||
sed -i 's|research.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/research-vernonkeenan.yaml
|
sed -i 's|research.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/research-vernonkeenan.yaml
|
||||||
sed -i 's|"/v1"|"/vk/research/v1"|g' ./swagger/external/research-vernonkeenan.yaml
|
sed -i 's|"/v1"|"/vk/research/v1"|g' ./swagger/external/research-vernonkeenan.yaml
|
||||||
#
|
#
|
||||||
|
# generate members client
|
||||||
|
#
|
||||||
|
mkdir api/members
|
||||||
|
swagger generate client \
|
||||||
|
--log-output=./swagger/logs/generate-members-client.log \
|
||||||
|
--copyright-file=./build/COPYRIGHT \
|
||||||
|
--name=members \
|
||||||
|
--spec=./swagger/members-vernonkeenan.yaml \
|
||||||
|
--target=./api/members \
|
||||||
|
--client-package=members-client \
|
||||||
|
--model-package=members-models \
|
||||||
|
--principal=app.User
|
||||||
|
#
|
||||||
|
# update external members client
|
||||||
|
#
|
||||||
|
sed -i 's|"http"|"https"|g' ./swagger/external/members-vernonkeenan.yaml
|
||||||
|
sed -i 's|members.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/members-vernonkeenan.yaml
|
||||||
|
sed -i 's|"/v1"|"/vk/members/v1"|g' ./swagger/external/members-vernonkeenan.yaml
|
||||||
|
#
|
||||||
# copy external swagger files
|
# copy external swagger files
|
||||||
#
|
#
|
||||||
scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxnexus/www/assets/swagger/
|
scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxnexus/www/assets/swagger/
|
|
@ -76,7 +76,7 @@ func NewGetUsersOK() *GetUsersOK {
|
||||||
/*
|
/*
|
||||||
GetUsersOK describes a response with status code 200, with default header values.
|
GetUsersOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with User objects
|
Response with User objects
|
||||||
*/
|
*/
|
||||||
type GetUsersOK struct {
|
type GetUsersOK struct {
|
||||||
Payload *auth_models.UserResponse
|
Payload *auth_models.UserResponse
|
||||||
|
|
|
@ -51,7 +51,7 @@ type ResponseMeta struct {
|
||||||
// Backend Server Timestamp
|
// Backend Server Timestamp
|
||||||
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Account Number used for recording transactions
|
// Account Number used for recording transactions
|
||||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ type TenantUser struct {
|
||||||
// Contact ID
|
// Contact ID
|
||||||
ContactID string `json:"ContactID,omitempty"`
|
ContactID string `json:"ContactID,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Account
|
// Account
|
||||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
|
|
||||||
// Tenant active?
|
// Tenant active?
|
||||||
|
|
|
@ -95,7 +95,7 @@ type User struct {
|
||||||
// Full Photo URL
|
// Full Photo URL
|
||||||
FullPhotoURL string `json:"FullPhotoURL,omitempty"`
|
FullPhotoURL string `json:"FullPhotoURL,omitempty"`
|
||||||
|
|
||||||
// Taxnexus ID
|
// ID
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// Active
|
// Active
|
||||||
|
@ -170,7 +170,7 @@ type User struct {
|
||||||
// The time day starts
|
// The time day starts
|
||||||
StartOfDay string `json:"StartOfDay,omitempty"`
|
StartOfDay string `json:"StartOfDay,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Account
|
// Account
|
||||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
|
|
||||||
// Tenant ID associated with this user
|
// Tenant ID associated with this user
|
||||||
|
|
|
@ -45,7 +45,7 @@ type UserRole struct {
|
||||||
// Role Name
|
// Role Name
|
||||||
RoleName string `json:"RoleName,omitempty"`
|
RoleName string `json:"RoleName,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Account Number
|
// Account Number
|
||||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
|
|
||||||
// User Email Address
|
// User Email Address
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
// 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 auth
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// New creates a new auth API client.
|
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
|
||||||
return &Client{transport: transport, formats: formats}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Client for auth API
|
|
||||||
*/
|
|
||||||
type Client struct {
|
|
||||||
transport runtime.ClientTransport
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientOption is the option for Client methods
|
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
|
||||||
type ClientService interface {
|
|
||||||
PostCredentials(params *PostCredentialsParams, opts ...ClientOption) (*PostCredentialsOK, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentials posts to oauth token
|
|
||||||
|
|
||||||
Get credential token
|
|
||||||
*/
|
|
||||||
func (a *Client) PostCredentials(params *PostCredentialsParams, opts ...ClientOption) (*PostCredentialsOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewPostCredentialsParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "postCredentials",
|
|
||||||
Method: "POST",
|
|
||||||
PathPattern: "/oauth/token",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &PostCredentialsReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*PostCredentialsOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for postCredentials: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTransport changes the transport on the client
|
|
||||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
||||||
a.transport = transport
|
|
||||||
}
|
|
|
@ -1,157 +0,0 @@
|
||||||
// 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 auth
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewPostCredentialsParams creates a new PostCredentialsParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewPostCredentialsParams() *PostCredentialsParams {
|
|
||||||
return &PostCredentialsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsParamsWithTimeout creates a new PostCredentialsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewPostCredentialsParamsWithTimeout(timeout time.Duration) *PostCredentialsParams {
|
|
||||||
return &PostCredentialsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsParamsWithContext creates a new PostCredentialsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewPostCredentialsParamsWithContext(ctx context.Context) *PostCredentialsParams {
|
|
||||||
return &PostCredentialsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsParamsWithHTTPClient creates a new PostCredentialsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewPostCredentialsParamsWithHTTPClient(client *http.Client) *PostCredentialsParams {
|
|
||||||
return &PostCredentialsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the post credentials operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type PostCredentialsParams struct {
|
|
||||||
|
|
||||||
/* CredentialsRequest.
|
|
||||||
|
|
||||||
Get Authentation Token
|
|
||||||
*/
|
|
||||||
CredentialsRequest *auth0_models.CredentialsRequest
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the post credentials params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostCredentialsParams) WithDefaults() *PostCredentialsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the post credentials params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostCredentialsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) WithTimeout(timeout time.Duration) *PostCredentialsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) WithContext(ctx context.Context) *PostCredentialsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) WithHTTPClient(client *http.Client) *PostCredentialsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCredentialsRequest adds the credentialsRequest to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) WithCredentialsRequest(credentialsRequest *auth0_models.CredentialsRequest) *PostCredentialsParams {
|
|
||||||
o.SetCredentialsRequest(credentialsRequest)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetCredentialsRequest adds the credentialsRequest to the post credentials params
|
|
||||||
func (o *PostCredentialsParams) SetCredentialsRequest(credentialsRequest *auth0_models.CredentialsRequest) {
|
|
||||||
o.CredentialsRequest = credentialsRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *PostCredentialsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
if o.CredentialsRequest != nil {
|
|
||||||
if err := r.SetBodyParam(o.CredentialsRequest); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,477 +0,0 @@
|
||||||
// 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 auth
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PostCredentialsReader is a Reader for the PostCredentials structure.
|
|
||||||
type PostCredentialsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *PostCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewPostCredentialsOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewPostCredentialsUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewPostCredentialsForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewPostCredentialsNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewPostCredentialsUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewPostCredentialsInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsOK creates a PostCredentialsOK with default headers values
|
|
||||||
func NewPostCredentialsOK() *PostCredentialsOK {
|
|
||||||
return &PostCredentialsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Credentials response from Auth0
|
|
||||||
*/
|
|
||||||
type PostCredentialsOK struct {
|
|
||||||
Payload *auth0_models.CredentialsResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post credentials o k response has a 2xx status code
|
|
||||||
func (o *PostCredentialsOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post credentials o k response has a 3xx status code
|
|
||||||
func (o *PostCredentialsOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post credentials o k response has a 4xx status code
|
|
||||||
func (o *PostCredentialsOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post credentials o k response has a 5xx status code
|
|
||||||
func (o *PostCredentialsOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post credentials o k response a status code equal to that given
|
|
||||||
func (o *PostCredentialsOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post credentials o k response
|
|
||||||
func (o *PostCredentialsOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsOK) String() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsOK) GetPayload() *auth0_models.CredentialsResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(auth0_models.CredentialsResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsUnauthorized creates a PostCredentialsUnauthorized with default headers values
|
|
||||||
func NewPostCredentialsUnauthorized() *PostCredentialsUnauthorized {
|
|
||||||
return &PostCredentialsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type PostCredentialsUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post credentials unauthorized response has a 2xx status code
|
|
||||||
func (o *PostCredentialsUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post credentials unauthorized response has a 3xx status code
|
|
||||||
func (o *PostCredentialsUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post credentials unauthorized response has a 4xx status code
|
|
||||||
func (o *PostCredentialsUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post credentials unauthorized response has a 5xx status code
|
|
||||||
func (o *PostCredentialsUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post credentials unauthorized response a status code equal to that given
|
|
||||||
func (o *PostCredentialsUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post credentials unauthorized response
|
|
||||||
func (o *PostCredentialsUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsForbidden creates a PostCredentialsForbidden with default headers values
|
|
||||||
func NewPostCredentialsForbidden() *PostCredentialsForbidden {
|
|
||||||
return &PostCredentialsForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type PostCredentialsForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post credentials forbidden response has a 2xx status code
|
|
||||||
func (o *PostCredentialsForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post credentials forbidden response has a 3xx status code
|
|
||||||
func (o *PostCredentialsForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post credentials forbidden response has a 4xx status code
|
|
||||||
func (o *PostCredentialsForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post credentials forbidden response has a 5xx status code
|
|
||||||
func (o *PostCredentialsForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post credentials forbidden response a status code equal to that given
|
|
||||||
func (o *PostCredentialsForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post credentials forbidden response
|
|
||||||
func (o *PostCredentialsForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsNotFound creates a PostCredentialsNotFound with default headers values
|
|
||||||
func NewPostCredentialsNotFound() *PostCredentialsNotFound {
|
|
||||||
return &PostCredentialsNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type PostCredentialsNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post credentials not found response has a 2xx status code
|
|
||||||
func (o *PostCredentialsNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post credentials not found response has a 3xx status code
|
|
||||||
func (o *PostCredentialsNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post credentials not found response has a 4xx status code
|
|
||||||
func (o *PostCredentialsNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post credentials not found response has a 5xx status code
|
|
||||||
func (o *PostCredentialsNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post credentials not found response a status code equal to that given
|
|
||||||
func (o *PostCredentialsNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post credentials not found response
|
|
||||||
func (o *PostCredentialsNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsUnprocessableEntity creates a PostCredentialsUnprocessableEntity with default headers values
|
|
||||||
func NewPostCredentialsUnprocessableEntity() *PostCredentialsUnprocessableEntity {
|
|
||||||
return &PostCredentialsUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsUnprocessableEntity describes a response with status code 422, with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type PostCredentialsUnprocessableEntity struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post credentials unprocessable entity response has a 2xx status code
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post credentials unprocessable entity response has a 3xx status code
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post credentials unprocessable entity response has a 4xx status code
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post credentials unprocessable entity response has a 5xx status code
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post credentials unprocessable entity response a status code equal to that given
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) IsCode(code int) bool {
|
|
||||||
return code == 422
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post credentials unprocessable entity response
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) Code() int {
|
|
||||||
return 422
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) String() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsUnprocessableEntity) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostCredentialsInternalServerError creates a PostCredentialsInternalServerError with default headers values
|
|
||||||
func NewPostCredentialsInternalServerError() *PostCredentialsInternalServerError {
|
|
||||||
return &PostCredentialsInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostCredentialsInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type PostCredentialsInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post credentials internal server error response has a 2xx status code
|
|
||||||
func (o *PostCredentialsInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post credentials internal server error response has a 3xx status code
|
|
||||||
func (o *PostCredentialsInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post credentials internal server error response has a 4xx status code
|
|
||||||
func (o *PostCredentialsInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post credentials internal server error response has a 5xx status code
|
|
||||||
func (o *PostCredentialsInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post credentials internal server error response a status code equal to that given
|
|
||||||
func (o *PostCredentialsInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post credentials internal server error response
|
|
||||||
func (o *PostCredentialsInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostCredentialsInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,152 +0,0 @@
|
||||||
// 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 role
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetRolesParams creates a new GetRolesParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetRolesParams() *GetRolesParams {
|
|
||||||
return &GetRolesParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesParamsWithTimeout creates a new GetRolesParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetRolesParamsWithTimeout(timeout time.Duration) *GetRolesParams {
|
|
||||||
return &GetRolesParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesParamsWithContext creates a new GetRolesParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetRolesParamsWithContext(ctx context.Context) *GetRolesParams {
|
|
||||||
return &GetRolesParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesParamsWithHTTPClient creates a new GetRolesParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetRolesParamsWithHTTPClient(client *http.Client) *GetRolesParams {
|
|
||||||
return &GetRolesParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get roles operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetRolesParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get roles params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetRolesParams) WithDefaults() *GetRolesParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get roles params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetRolesParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get roles params
|
|
||||||
func (o *GetRolesParams) WithTimeout(timeout time.Duration) *GetRolesParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get roles params
|
|
||||||
func (o *GetRolesParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get roles params
|
|
||||||
func (o *GetRolesParams) WithContext(ctx context.Context) *GetRolesParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get roles params
|
|
||||||
func (o *GetRolesParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get roles params
|
|
||||||
func (o *GetRolesParams) WithHTTPClient(client *http.Client) *GetRolesParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get roles params
|
|
||||||
func (o *GetRolesParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the get roles params
|
|
||||||
func (o *GetRolesParams) WithAuthorization(authorization string) *GetRolesParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the get roles params
|
|
||||||
func (o *GetRolesParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,475 +0,0 @@
|
||||||
// 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 role
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetRolesReader is a Reader for the GetRoles structure.
|
|
||||||
type GetRolesReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetRolesOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetRolesUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetRolesForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetRolesNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewGetRolesUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetRolesInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesOK creates a GetRolesOK with default headers values
|
|
||||||
func NewGetRolesOK() *GetRolesOK {
|
|
||||||
return &GetRolesOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with User objects
|
|
||||||
*/
|
|
||||||
type GetRolesOK struct {
|
|
||||||
Payload []*auth0_models.User
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get roles o k response has a 2xx status code
|
|
||||||
func (o *GetRolesOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get roles o k response has a 3xx status code
|
|
||||||
func (o *GetRolesOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get roles o k response has a 4xx status code
|
|
||||||
func (o *GetRolesOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get roles o k response has a 5xx status code
|
|
||||||
func (o *GetRolesOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get roles o k response a status code equal to that given
|
|
||||||
func (o *GetRolesOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get roles o k response
|
|
||||||
func (o *GetRolesOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesOK) GetPayload() []*auth0_models.User {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesOK) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesUnauthorized creates a GetRolesUnauthorized with default headers values
|
|
||||||
func NewGetRolesUnauthorized() *GetRolesUnauthorized {
|
|
||||||
return &GetRolesUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetRolesUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get roles unauthorized response has a 2xx status code
|
|
||||||
func (o *GetRolesUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get roles unauthorized response has a 3xx status code
|
|
||||||
func (o *GetRolesUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get roles unauthorized response has a 4xx status code
|
|
||||||
func (o *GetRolesUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get roles unauthorized response has a 5xx status code
|
|
||||||
func (o *GetRolesUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get roles unauthorized response a status code equal to that given
|
|
||||||
func (o *GetRolesUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get roles unauthorized response
|
|
||||||
func (o *GetRolesUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesForbidden creates a GetRolesForbidden with default headers values
|
|
||||||
func NewGetRolesForbidden() *GetRolesForbidden {
|
|
||||||
return &GetRolesForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetRolesForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get roles forbidden response has a 2xx status code
|
|
||||||
func (o *GetRolesForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get roles forbidden response has a 3xx status code
|
|
||||||
func (o *GetRolesForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get roles forbidden response has a 4xx status code
|
|
||||||
func (o *GetRolesForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get roles forbidden response has a 5xx status code
|
|
||||||
func (o *GetRolesForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get roles forbidden response a status code equal to that given
|
|
||||||
func (o *GetRolesForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get roles forbidden response
|
|
||||||
func (o *GetRolesForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesNotFound creates a GetRolesNotFound with default headers values
|
|
||||||
func NewGetRolesNotFound() *GetRolesNotFound {
|
|
||||||
return &GetRolesNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetRolesNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get roles not found response has a 2xx status code
|
|
||||||
func (o *GetRolesNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get roles not found response has a 3xx status code
|
|
||||||
func (o *GetRolesNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get roles not found response has a 4xx status code
|
|
||||||
func (o *GetRolesNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get roles not found response has a 5xx status code
|
|
||||||
func (o *GetRolesNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get roles not found response a status code equal to that given
|
|
||||||
func (o *GetRolesNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get roles not found response
|
|
||||||
func (o *GetRolesNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesUnprocessableEntity creates a GetRolesUnprocessableEntity with default headers values
|
|
||||||
func NewGetRolesUnprocessableEntity() *GetRolesUnprocessableEntity {
|
|
||||||
return &GetRolesUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesUnprocessableEntity describes a response with status code 422, with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type GetRolesUnprocessableEntity struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get roles unprocessable entity response has a 2xx status code
|
|
||||||
func (o *GetRolesUnprocessableEntity) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get roles unprocessable entity response has a 3xx status code
|
|
||||||
func (o *GetRolesUnprocessableEntity) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get roles unprocessable entity response has a 4xx status code
|
|
||||||
func (o *GetRolesUnprocessableEntity) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get roles unprocessable entity response has a 5xx status code
|
|
||||||
func (o *GetRolesUnprocessableEntity) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get roles unprocessable entity response a status code equal to that given
|
|
||||||
func (o *GetRolesUnprocessableEntity) IsCode(code int) bool {
|
|
||||||
return code == 422
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get roles unprocessable entity response
|
|
||||||
func (o *GetRolesUnprocessableEntity) Code() int {
|
|
||||||
return 422
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnprocessableEntity) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnprocessableEntity) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesUnprocessableEntity) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetRolesInternalServerError creates a GetRolesInternalServerError with default headers values
|
|
||||||
func NewGetRolesInternalServerError() *GetRolesInternalServerError {
|
|
||||||
return &GetRolesInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRolesInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetRolesInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get roles internal server error response has a 2xx status code
|
|
||||||
func (o *GetRolesInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get roles internal server error response has a 3xx status code
|
|
||||||
func (o *GetRolesInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get roles internal server error response has a 4xx status code
|
|
||||||
func (o *GetRolesInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get roles internal server error response has a 5xx status code
|
|
||||||
func (o *GetRolesInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get roles internal server error response a status code equal to that given
|
|
||||||
func (o *GetRolesInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get roles internal server error response
|
|
||||||
func (o *GetRolesInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetRolesInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,198 +0,0 @@
|
||||||
// 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 role
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewPostRoleUsersParams creates a new PostRoleUsersParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewPostRoleUsersParams() *PostRoleUsersParams {
|
|
||||||
return &PostRoleUsersParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersParamsWithTimeout creates a new PostRoleUsersParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewPostRoleUsersParamsWithTimeout(timeout time.Duration) *PostRoleUsersParams {
|
|
||||||
return &PostRoleUsersParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersParamsWithContext creates a new PostRoleUsersParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewPostRoleUsersParamsWithContext(ctx context.Context) *PostRoleUsersParams {
|
|
||||||
return &PostRoleUsersParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersParamsWithHTTPClient creates a new PostRoleUsersParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewPostRoleUsersParamsWithHTTPClient(client *http.Client) *PostRoleUsersParams {
|
|
||||||
return &PostRoleUsersParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsersParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the post role users operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type PostRoleUsersParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
/* RoleUsersRequest.
|
|
||||||
|
|
||||||
An array of User IDs to add to a Role
|
|
||||||
*/
|
|
||||||
RoleUsersRequest *auth0_models.RoleUsersRequest
|
|
||||||
|
|
||||||
/* RoleID.
|
|
||||||
|
|
||||||
An Auth0 Role ID
|
|
||||||
*/
|
|
||||||
RoleID string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the post role users params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostRoleUsersParams) WithDefaults() *PostRoleUsersParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the post role users params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostRoleUsersParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) WithTimeout(timeout time.Duration) *PostRoleUsersParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) WithContext(ctx context.Context) *PostRoleUsersParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) WithHTTPClient(client *http.Client) *PostRoleUsersParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) WithAuthorization(authorization string) *PostRoleUsersParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRoleUsersRequest adds the roleUsersRequest to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) WithRoleUsersRequest(roleUsersRequest *auth0_models.RoleUsersRequest) *PostRoleUsersParams {
|
|
||||||
o.SetRoleUsersRequest(roleUsersRequest)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetRoleUsersRequest adds the roleUsersRequest to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) SetRoleUsersRequest(roleUsersRequest *auth0_models.RoleUsersRequest) {
|
|
||||||
o.RoleUsersRequest = roleUsersRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRoleID adds the roleID to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) WithRoleID(roleID string) *PostRoleUsersParams {
|
|
||||||
o.SetRoleID(roleID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetRoleID adds the roleId to the post role users params
|
|
||||||
func (o *PostRoleUsersParams) SetRoleID(roleID string) {
|
|
||||||
o.RoleID = roleID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *PostRoleUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if o.RoleUsersRequest != nil {
|
|
||||||
if err := r.SetBodyParam(o.RoleUsersRequest); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// path param roleId
|
|
||||||
if err := r.SetPathParam("roleId", o.RoleID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,391 +0,0 @@
|
||||||
// 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 role
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PostRoleUsersReader is a Reader for the PostRoleUsers structure.
|
|
||||||
type PostRoleUsersReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *PostRoleUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewPostRoleUsersOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewPostRoleUsersUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewPostRoleUsersForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewPostRoleUsersNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewPostRoleUsersInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersOK creates a PostRoleUsersOK with default headers values
|
|
||||||
func NewPostRoleUsersOK() *PostRoleUsersOK {
|
|
||||||
return &PostRoleUsersOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsersOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Role users successfully updated
|
|
||||||
*/
|
|
||||||
type PostRoleUsersOK struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post role users o k response has a 2xx status code
|
|
||||||
func (o *PostRoleUsersOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post role users o k response has a 3xx status code
|
|
||||||
func (o *PostRoleUsersOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post role users o k response has a 4xx status code
|
|
||||||
func (o *PostRoleUsersOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post role users o k response has a 5xx status code
|
|
||||||
func (o *PostRoleUsersOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post role users o k response a status code equal to that given
|
|
||||||
func (o *PostRoleUsersOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post role users o k response
|
|
||||||
func (o *PostRoleUsersOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersOK) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersOK ", 200)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersOK) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersOK ", 200)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersUnauthorized creates a PostRoleUsersUnauthorized with default headers values
|
|
||||||
func NewPostRoleUsersUnauthorized() *PostRoleUsersUnauthorized {
|
|
||||||
return &PostRoleUsersUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsersUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type PostRoleUsersUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post role users unauthorized response has a 2xx status code
|
|
||||||
func (o *PostRoleUsersUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post role users unauthorized response has a 3xx status code
|
|
||||||
func (o *PostRoleUsersUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post role users unauthorized response has a 4xx status code
|
|
||||||
func (o *PostRoleUsersUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post role users unauthorized response has a 5xx status code
|
|
||||||
func (o *PostRoleUsersUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post role users unauthorized response a status code equal to that given
|
|
||||||
func (o *PostRoleUsersUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post role users unauthorized response
|
|
||||||
func (o *PostRoleUsersUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersForbidden creates a PostRoleUsersForbidden with default headers values
|
|
||||||
func NewPostRoleUsersForbidden() *PostRoleUsersForbidden {
|
|
||||||
return &PostRoleUsersForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsersForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type PostRoleUsersForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post role users forbidden response has a 2xx status code
|
|
||||||
func (o *PostRoleUsersForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post role users forbidden response has a 3xx status code
|
|
||||||
func (o *PostRoleUsersForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post role users forbidden response has a 4xx status code
|
|
||||||
func (o *PostRoleUsersForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post role users forbidden response has a 5xx status code
|
|
||||||
func (o *PostRoleUsersForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post role users forbidden response a status code equal to that given
|
|
||||||
func (o *PostRoleUsersForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post role users forbidden response
|
|
||||||
func (o *PostRoleUsersForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersNotFound creates a PostRoleUsersNotFound with default headers values
|
|
||||||
func NewPostRoleUsersNotFound() *PostRoleUsersNotFound {
|
|
||||||
return &PostRoleUsersNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsersNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type PostRoleUsersNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post role users not found response has a 2xx status code
|
|
||||||
func (o *PostRoleUsersNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post role users not found response has a 3xx status code
|
|
||||||
func (o *PostRoleUsersNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post role users not found response has a 4xx status code
|
|
||||||
func (o *PostRoleUsersNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post role users not found response has a 5xx status code
|
|
||||||
func (o *PostRoleUsersNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post role users not found response a status code equal to that given
|
|
||||||
func (o *PostRoleUsersNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post role users not found response
|
|
||||||
func (o *PostRoleUsersNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostRoleUsersInternalServerError creates a PostRoleUsersInternalServerError with default headers values
|
|
||||||
func NewPostRoleUsersInternalServerError() *PostRoleUsersInternalServerError {
|
|
||||||
return &PostRoleUsersInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsersInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type PostRoleUsersInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post role users internal server error response has a 2xx status code
|
|
||||||
func (o *PostRoleUsersInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post role users internal server error response has a 3xx status code
|
|
||||||
func (o *PostRoleUsersInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post role users internal server error response has a 4xx status code
|
|
||||||
func (o *PostRoleUsersInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post role users internal server error response has a 5xx status code
|
|
||||||
func (o *PostRoleUsersInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post role users internal server error response a status code equal to that given
|
|
||||||
func (o *PostRoleUsersInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post role users internal server error response
|
|
||||||
func (o *PostRoleUsersInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostRoleUsersInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,127 +0,0 @@
|
||||||
// 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 role
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// New creates a new role API client.
|
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
|
||||||
return &Client{transport: transport, formats: formats}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Client for role API
|
|
||||||
*/
|
|
||||||
type Client struct {
|
|
||||||
transport runtime.ClientTransport
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientOption is the option for Client methods
|
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
|
||||||
type ClientService interface {
|
|
||||||
GetRoles(params *GetRolesParams, opts ...ClientOption) (*GetRolesOK, error)
|
|
||||||
|
|
||||||
PostRoleUsers(params *PostRoleUsersParams, opts ...ClientOption) (*PostRoleUsersOK, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetRoles gets roles from auth0
|
|
||||||
|
|
||||||
Get Roles from Auth0
|
|
||||||
*/
|
|
||||||
func (a *Client) GetRoles(params *GetRolesParams, opts ...ClientOption) (*GetRolesOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetRolesParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getRoles",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/api/v2/roles",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetRolesReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetRolesOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostRoleUsers adds users to role
|
|
||||||
|
|
||||||
Add users to role
|
|
||||||
*/
|
|
||||||
func (a *Client) PostRoleUsers(params *PostRoleUsersParams, opts ...ClientOption) (*PostRoleUsersOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewPostRoleUsersParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "postRoleUsers",
|
|
||||||
Method: "POST",
|
|
||||||
PathPattern: "/api/v2/roles/{roleId}/users",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &PostRoleUsersReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*PostRoleUsersOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for postRoleUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTransport changes the transport on the client
|
|
||||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
||||||
a.transport = transport
|
|
||||||
}
|
|
|
@ -1,198 +0,0 @@
|
||||||
// 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 (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesParams creates a new DeleteAPIV2UsersUserIDRolesParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesParams() *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout creates a new DeleteAPIV2UsersUserIDRolesParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesParamsWithContext creates a new DeleteAPIV2UsersUserIDRolesParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesParamsWithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient creates a new DeleteAPIV2UsersUserIDRolesParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRolesParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the delete API v2 users user ID roles operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type DeleteAPIV2UsersUserIDRolesParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
/* UserRolesRequest.
|
|
||||||
|
|
||||||
An array of User IDs to add to a Role
|
|
||||||
*/
|
|
||||||
UserRolesRequest *auth0_models.UserRolesRequest
|
|
||||||
|
|
||||||
/* UserID.
|
|
||||||
|
|
||||||
An Auth0 User ID
|
|
||||||
*/
|
|
||||||
UserID string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the delete API v2 users user ID roles params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithDefaults() *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the delete API v2 users user ID roles params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithAuthorization(authorization string) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUserRolesRequest adds the userRolesRequest to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithUserRolesRequest(userRolesRequest *auth0_models.UserRolesRequest) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetUserRolesRequest(userRolesRequest)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetUserRolesRequest adds the userRolesRequest to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetUserRolesRequest(userRolesRequest *auth0_models.UserRolesRequest) {
|
|
||||||
o.UserRolesRequest = userRolesRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUserID adds the userID to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WithUserID(userID string) *DeleteAPIV2UsersUserIDRolesParams {
|
|
||||||
o.SetUserID(userID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetUserID adds the userId to the delete API v2 users user ID roles params
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) SetUserID(userID string) {
|
|
||||||
o.UserID = userID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if o.UserRolesRequest != nil {
|
|
||||||
if err := r.SetBodyParam(o.UserRolesRequest); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// path param userId
|
|
||||||
if err := r.SetPathParam("userId", o.UserID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,391 +0,0 @@
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeleteAPIV2UsersUserIDRolesReader is a Reader for the DeleteAPIV2UsersUserIDRoles structure.
|
|
||||||
type DeleteAPIV2UsersUserIDRolesReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 204:
|
|
||||||
result := NewDeleteAPIV2UsersUserIDRolesNoContent()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewDeleteAPIV2UsersUserIDRolesUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewDeleteAPIV2UsersUserIDRolesForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewDeleteAPIV2UsersUserIDRolesNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewDeleteAPIV2UsersUserIDRolesInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesNoContent creates a DeleteAPIV2UsersUserIDRolesNoContent with default headers values
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesNoContent() *DeleteAPIV2UsersUserIDRolesNoContent {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesNoContent{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRolesNoContent describes a response with status code 204, with default header values.
|
|
||||||
|
|
||||||
User roles successfully removed
|
|
||||||
*/
|
|
||||||
type DeleteAPIV2UsersUserIDRolesNoContent struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this delete Api v2 users user Id roles no content response has a 2xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this delete Api v2 users user Id roles no content response has a 3xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this delete Api v2 users user Id roles no content response has a 4xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this delete Api v2 users user Id roles no content response has a 5xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this delete Api v2 users user Id roles no content response a status code equal to that given
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) IsCode(code int) bool {
|
|
||||||
return code == 204
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the delete Api v2 users user Id roles no content response
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) Code() int {
|
|
||||||
return 204
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNoContent ", 204)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) String() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNoContent ", 204)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesUnauthorized creates a DeleteAPIV2UsersUserIDRolesUnauthorized with default headers values
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesUnauthorized() *DeleteAPIV2UsersUserIDRolesUnauthorized {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRolesUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type DeleteAPIV2UsersUserIDRolesUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this delete Api v2 users user Id roles unauthorized response has a 2xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this delete Api v2 users user Id roles unauthorized response has a 3xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this delete Api v2 users user Id roles unauthorized response has a 4xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this delete Api v2 users user Id roles unauthorized response has a 5xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this delete Api v2 users user Id roles unauthorized response a status code equal to that given
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the delete Api v2 users user Id roles unauthorized response
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesForbidden creates a DeleteAPIV2UsersUserIDRolesForbidden with default headers values
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesForbidden() *DeleteAPIV2UsersUserIDRolesForbidden {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRolesForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type DeleteAPIV2UsersUserIDRolesForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this delete Api v2 users user Id roles forbidden response has a 2xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this delete Api v2 users user Id roles forbidden response has a 3xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this delete Api v2 users user Id roles forbidden response has a 4xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this delete Api v2 users user Id roles forbidden response has a 5xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this delete Api v2 users user Id roles forbidden response a status code equal to that given
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the delete Api v2 users user Id roles forbidden response
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesNotFound creates a DeleteAPIV2UsersUserIDRolesNotFound with default headers values
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesNotFound() *DeleteAPIV2UsersUserIDRolesNotFound {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRolesNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type DeleteAPIV2UsersUserIDRolesNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this delete Api v2 users user Id roles not found response has a 2xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this delete Api v2 users user Id roles not found response has a 3xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this delete Api v2 users user Id roles not found response has a 4xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this delete Api v2 users user Id roles not found response has a 5xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this delete Api v2 users user Id roles not found response a status code equal to that given
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the delete Api v2 users user Id roles not found response
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteAPIV2UsersUserIDRolesInternalServerError creates a DeleteAPIV2UsersUserIDRolesInternalServerError with default headers values
|
|
||||||
func NewDeleteAPIV2UsersUserIDRolesInternalServerError() *DeleteAPIV2UsersUserIDRolesInternalServerError {
|
|
||||||
return &DeleteAPIV2UsersUserIDRolesInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRolesInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type DeleteAPIV2UsersUserIDRolesInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this delete Api v2 users user Id roles internal server error response has a 2xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this delete Api v2 users user Id roles internal server error response has a 3xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this delete Api v2 users user Id roles internal server error response has a 4xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this delete Api v2 users user Id roles internal server error response has a 5xx status code
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this delete Api v2 users user Id roles internal server error response a status code equal to that given
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the delete Api v2 users user Id roles internal server error response
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,176 +0,0 @@
|
||||||
// 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 (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetUserByEmailParams creates a new GetUserByEmailParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetUserByEmailParams() *GetUserByEmailParams {
|
|
||||||
return &GetUserByEmailParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserByEmailParamsWithTimeout creates a new GetUserByEmailParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetUserByEmailParamsWithTimeout(timeout time.Duration) *GetUserByEmailParams {
|
|
||||||
return &GetUserByEmailParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserByEmailParamsWithContext creates a new GetUserByEmailParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetUserByEmailParamsWithContext(ctx context.Context) *GetUserByEmailParams {
|
|
||||||
return &GetUserByEmailParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserByEmailParamsWithHTTPClient creates a new GetUserByEmailParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetUserByEmailParamsWithHTTPClient(client *http.Client) *GetUserByEmailParams {
|
|
||||||
return &GetUserByEmailParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserByEmailParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get user by email operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetUserByEmailParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
// Email.
|
|
||||||
Email string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get user by email params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetUserByEmailParams) WithDefaults() *GetUserByEmailParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get user by email params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetUserByEmailParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) WithTimeout(timeout time.Duration) *GetUserByEmailParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) WithContext(ctx context.Context) *GetUserByEmailParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) WithHTTPClient(client *http.Client) *GetUserByEmailParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) WithAuthorization(authorization string) *GetUserByEmailParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithEmail adds the email to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) WithEmail(email string) *GetUserByEmailParams {
|
|
||||||
o.SetEmail(email)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetEmail adds the email to the get user by email params
|
|
||||||
func (o *GetUserByEmailParams) SetEmail(email string) {
|
|
||||||
o.Email = email
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetUserByEmailParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// query param email
|
|
||||||
qrEmail := o.Email
|
|
||||||
qEmail := qrEmail
|
|
||||||
if qEmail != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("email", qEmail); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,401 +0,0 @@
|
||||||
// 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
|
|
||||||
}
|
|
|
@ -1,174 +0,0 @@
|
||||||
// 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 (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetUserRolesParams creates a new GetUserRolesParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetUserRolesParams() *GetUserRolesParams {
|
|
||||||
return &GetUserRolesParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesParamsWithTimeout creates a new GetUserRolesParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetUserRolesParamsWithTimeout(timeout time.Duration) *GetUserRolesParams {
|
|
||||||
return &GetUserRolesParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesParamsWithContext creates a new GetUserRolesParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetUserRolesParamsWithContext(ctx context.Context) *GetUserRolesParams {
|
|
||||||
return &GetUserRolesParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesParamsWithHTTPClient creates a new GetUserRolesParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetUserRolesParamsWithHTTPClient(client *http.Client) *GetUserRolesParams {
|
|
||||||
return &GetUserRolesParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRolesParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get user roles operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetUserRolesParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
/* UserID.
|
|
||||||
|
|
||||||
An Auth0 User ID
|
|
||||||
*/
|
|
||||||
UserID string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get user roles params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetUserRolesParams) WithDefaults() *GetUserRolesParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get user roles params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetUserRolesParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) WithTimeout(timeout time.Duration) *GetUserRolesParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) WithContext(ctx context.Context) *GetUserRolesParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) WithHTTPClient(client *http.Client) *GetUserRolesParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) WithAuthorization(authorization string) *GetUserRolesParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUserID adds the userID to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) WithUserID(userID string) *GetUserRolesParams {
|
|
||||||
o.SetUserID(userID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetUserID adds the userId to the get user roles params
|
|
||||||
func (o *GetUserRolesParams) SetUserID(userID string) {
|
|
||||||
o.UserID = userID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetUserRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// path param userId
|
|
||||||
if err := r.SetPathParam("userId", o.UserID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,403 +0,0 @@
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetUserRolesReader is a Reader for the GetUserRoles structure.
|
|
||||||
type GetUserRolesReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetUserRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetUserRolesOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetUserRolesUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetUserRolesForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetUserRolesNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetUserRolesInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesOK creates a GetUserRolesOK with default headers values
|
|
||||||
func NewGetUserRolesOK() *GetUserRolesOK {
|
|
||||||
return &GetUserRolesOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRolesOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with User objects
|
|
||||||
*/
|
|
||||||
type GetUserRolesOK struct {
|
|
||||||
Payload *auth0_models.RoleResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get user roles o k response has a 2xx status code
|
|
||||||
func (o *GetUserRolesOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get user roles o k response has a 3xx status code
|
|
||||||
func (o *GetUserRolesOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get user roles o k response has a 4xx status code
|
|
||||||
func (o *GetUserRolesOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get user roles o k response has a 5xx status code
|
|
||||||
func (o *GetUserRolesOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get user roles o k response a status code equal to that given
|
|
||||||
func (o *GetUserRolesOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get user roles o k response
|
|
||||||
func (o *GetUserRolesOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesOK) GetPayload() *auth0_models.RoleResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(auth0_models.RoleResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesUnauthorized creates a GetUserRolesUnauthorized with default headers values
|
|
||||||
func NewGetUserRolesUnauthorized() *GetUserRolesUnauthorized {
|
|
||||||
return &GetUserRolesUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRolesUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetUserRolesUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get user roles unauthorized response has a 2xx status code
|
|
||||||
func (o *GetUserRolesUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get user roles unauthorized response has a 3xx status code
|
|
||||||
func (o *GetUserRolesUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get user roles unauthorized response has a 4xx status code
|
|
||||||
func (o *GetUserRolesUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get user roles unauthorized response has a 5xx status code
|
|
||||||
func (o *GetUserRolesUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get user roles unauthorized response a status code equal to that given
|
|
||||||
func (o *GetUserRolesUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get user roles unauthorized response
|
|
||||||
func (o *GetUserRolesUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesForbidden creates a GetUserRolesForbidden with default headers values
|
|
||||||
func NewGetUserRolesForbidden() *GetUserRolesForbidden {
|
|
||||||
return &GetUserRolesForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRolesForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetUserRolesForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get user roles forbidden response has a 2xx status code
|
|
||||||
func (o *GetUserRolesForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get user roles forbidden response has a 3xx status code
|
|
||||||
func (o *GetUserRolesForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get user roles forbidden response has a 4xx status code
|
|
||||||
func (o *GetUserRolesForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get user roles forbidden response has a 5xx status code
|
|
||||||
func (o *GetUserRolesForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get user roles forbidden response a status code equal to that given
|
|
||||||
func (o *GetUserRolesForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get user roles forbidden response
|
|
||||||
func (o *GetUserRolesForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesNotFound creates a GetUserRolesNotFound with default headers values
|
|
||||||
func NewGetUserRolesNotFound() *GetUserRolesNotFound {
|
|
||||||
return &GetUserRolesNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRolesNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetUserRolesNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get user roles not found response has a 2xx status code
|
|
||||||
func (o *GetUserRolesNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get user roles not found response has a 3xx status code
|
|
||||||
func (o *GetUserRolesNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get user roles not found response has a 4xx status code
|
|
||||||
func (o *GetUserRolesNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get user roles not found response has a 5xx status code
|
|
||||||
func (o *GetUserRolesNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get user roles not found response a status code equal to that given
|
|
||||||
func (o *GetUserRolesNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get user roles not found response
|
|
||||||
func (o *GetUserRolesNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUserRolesInternalServerError creates a GetUserRolesInternalServerError with default headers values
|
|
||||||
func NewGetUserRolesInternalServerError() *GetUserRolesInternalServerError {
|
|
||||||
return &GetUserRolesInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRolesInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetUserRolesInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get user roles internal server error response has a 2xx status code
|
|
||||||
func (o *GetUserRolesInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get user roles internal server error response has a 3xx status code
|
|
||||||
func (o *GetUserRolesInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get user roles internal server error response has a 4xx status code
|
|
||||||
func (o *GetUserRolesInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get user roles internal server error response has a 5xx status code
|
|
||||||
func (o *GetUserRolesInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get user roles internal server error response a status code equal to that given
|
|
||||||
func (o *GetUserRolesInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get user roles internal server error response
|
|
||||||
func (o *GetUserRolesInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUserRolesInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,152 +0,0 @@
|
||||||
// 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 (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetUsersParams creates a new GetUsersParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetUsersParams() *GetUsersParams {
|
|
||||||
return &GetUsersParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersParamsWithTimeout creates a new GetUsersParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams {
|
|
||||||
return &GetUsersParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersParamsWithContext creates a new GetUsersParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams {
|
|
||||||
return &GetUsersParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams {
|
|
||||||
return &GetUsersParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsersParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get users operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetUsersParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get users params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetUsersParams) WithDefaults() *GetUsersParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get users params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetUsersParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get users params
|
|
||||||
func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get users params
|
|
||||||
func (o *GetUsersParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get users params
|
|
||||||
func (o *GetUsersParams) WithContext(ctx context.Context) *GetUsersParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get users params
|
|
||||||
func (o *GetUsersParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get users params
|
|
||||||
func (o *GetUsersParams) WithHTTPClient(client *http.Client) *GetUsersParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get users params
|
|
||||||
func (o *GetUsersParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the get users params
|
|
||||||
func (o *GetUsersParams) WithAuthorization(authorization string) *GetUsersParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the get users params
|
|
||||||
func (o *GetUsersParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,401 +0,0 @@
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetUsersReader is a Reader for the GetUsers structure.
|
|
||||||
type GetUsersReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetUsersOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetUsersUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetUsersForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetUsersNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetUsersInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersOK creates a GetUsersOK with default headers values
|
|
||||||
func NewGetUsersOK() *GetUsersOK {
|
|
||||||
return &GetUsersOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsersOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with User objects
|
|
||||||
*/
|
|
||||||
type GetUsersOK struct {
|
|
||||||
Payload []*auth0_models.User
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get users o k response has a 2xx status code
|
|
||||||
func (o *GetUsersOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get users o k response has a 3xx status code
|
|
||||||
func (o *GetUsersOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get users o k response has a 4xx status code
|
|
||||||
func (o *GetUsersOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get users o k response has a 5xx status code
|
|
||||||
func (o *GetUsersOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get users o k response a status code equal to that given
|
|
||||||
func (o *GetUsersOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get users o k response
|
|
||||||
func (o *GetUsersOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersOK) GetPayload() []*auth0_models.User {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersOK) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersUnauthorized creates a GetUsersUnauthorized with default headers values
|
|
||||||
func NewGetUsersUnauthorized() *GetUsersUnauthorized {
|
|
||||||
return &GetUsersUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsersUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetUsersUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get users unauthorized response has a 2xx status code
|
|
||||||
func (o *GetUsersUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get users unauthorized response has a 3xx status code
|
|
||||||
func (o *GetUsersUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get users unauthorized response has a 4xx status code
|
|
||||||
func (o *GetUsersUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get users unauthorized response has a 5xx status code
|
|
||||||
func (o *GetUsersUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get users unauthorized response a status code equal to that given
|
|
||||||
func (o *GetUsersUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get users unauthorized response
|
|
||||||
func (o *GetUsersUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersForbidden creates a GetUsersForbidden with default headers values
|
|
||||||
func NewGetUsersForbidden() *GetUsersForbidden {
|
|
||||||
return &GetUsersForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsersForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetUsersForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get users forbidden response has a 2xx status code
|
|
||||||
func (o *GetUsersForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get users forbidden response has a 3xx status code
|
|
||||||
func (o *GetUsersForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get users forbidden response has a 4xx status code
|
|
||||||
func (o *GetUsersForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get users forbidden response has a 5xx status code
|
|
||||||
func (o *GetUsersForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get users forbidden response a status code equal to that given
|
|
||||||
func (o *GetUsersForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get users forbidden response
|
|
||||||
func (o *GetUsersForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersNotFound creates a GetUsersNotFound with default headers values
|
|
||||||
func NewGetUsersNotFound() *GetUsersNotFound {
|
|
||||||
return &GetUsersNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsersNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetUsersNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get users not found response has a 2xx status code
|
|
||||||
func (o *GetUsersNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get users not found response has a 3xx status code
|
|
||||||
func (o *GetUsersNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get users not found response has a 4xx status code
|
|
||||||
func (o *GetUsersNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get users not found response has a 5xx status code
|
|
||||||
func (o *GetUsersNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get users not found response a status code equal to that given
|
|
||||||
func (o *GetUsersNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get users not found response
|
|
||||||
func (o *GetUsersNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUsersInternalServerError creates a GetUsersInternalServerError with default headers values
|
|
||||||
func NewGetUsersInternalServerError() *GetUsersInternalServerError {
|
|
||||||
return &GetUsersInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsersInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetUsersInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get users internal server error response has a 2xx status code
|
|
||||||
func (o *GetUsersInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get users internal server error response has a 3xx status code
|
|
||||||
func (o *GetUsersInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get users internal server error response has a 4xx status code
|
|
||||||
func (o *GetUsersInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get users internal server error response has a 5xx status code
|
|
||||||
func (o *GetUsersInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get users internal server error response a status code equal to that given
|
|
||||||
func (o *GetUsersInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the get users internal server error response
|
|
||||||
func (o *GetUsersInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUsersInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,176 +0,0 @@
|
||||||
// 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 (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewPostUsersParams creates a new PostUsersParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewPostUsersParams() *PostUsersParams {
|
|
||||||
return &PostUsersParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersParamsWithTimeout creates a new PostUsersParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewPostUsersParamsWithTimeout(timeout time.Duration) *PostUsersParams {
|
|
||||||
return &PostUsersParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersParamsWithContext creates a new PostUsersParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewPostUsersParamsWithContext(ctx context.Context) *PostUsersParams {
|
|
||||||
return &PostUsersParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersParamsWithHTTPClient creates a new PostUsersParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewPostUsersParamsWithHTTPClient(client *http.Client) *PostUsersParams {
|
|
||||||
return &PostUsersParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the post users operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type PostUsersParams struct {
|
|
||||||
|
|
||||||
// Authorization.
|
|
||||||
Authorization string
|
|
||||||
|
|
||||||
/* UserRequest.
|
|
||||||
|
|
||||||
An array of User records
|
|
||||||
*/
|
|
||||||
UserRequest *auth0_models.UserRequest
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the post users params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostUsersParams) WithDefaults() *PostUsersParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the post users params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostUsersParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the post users params
|
|
||||||
func (o *PostUsersParams) WithTimeout(timeout time.Duration) *PostUsersParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the post users params
|
|
||||||
func (o *PostUsersParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the post users params
|
|
||||||
func (o *PostUsersParams) WithContext(ctx context.Context) *PostUsersParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the post users params
|
|
||||||
func (o *PostUsersParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the post users params
|
|
||||||
func (o *PostUsersParams) WithHTTPClient(client *http.Client) *PostUsersParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the post users params
|
|
||||||
func (o *PostUsersParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAuthorization adds the authorization to the post users params
|
|
||||||
func (o *PostUsersParams) WithAuthorization(authorization string) *PostUsersParams {
|
|
||||||
o.SetAuthorization(authorization)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAuthorization adds the authorization to the post users params
|
|
||||||
func (o *PostUsersParams) SetAuthorization(authorization string) {
|
|
||||||
o.Authorization = authorization
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUserRequest adds the userRequest to the post users params
|
|
||||||
func (o *PostUsersParams) WithUserRequest(userRequest *auth0_models.UserRequest) *PostUsersParams {
|
|
||||||
o.SetUserRequest(userRequest)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetUserRequest adds the userRequest to the post users params
|
|
||||||
func (o *PostUsersParams) SetUserRequest(userRequest *auth0_models.UserRequest) {
|
|
||||||
o.UserRequest = userRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *PostUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// header param Authorization
|
|
||||||
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if o.UserRequest != nil {
|
|
||||||
if err := r.SetBodyParam(o.UserRequest); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,453 +0,0 @@
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PostUsersReader is a Reader for the PostUsers structure.
|
|
||||||
type PostUsersReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *PostUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 201:
|
|
||||||
result := NewPostUsersCreated()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewPostUsersUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewPostUsersForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewPostUsersNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 409:
|
|
||||||
result := NewPostUsersConflict()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewPostUsersInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersCreated creates a PostUsersCreated with default headers values
|
|
||||||
func NewPostUsersCreated() *PostUsersCreated {
|
|
||||||
return &PostUsersCreated{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersCreated describes a response with status code 201, with default header values.
|
|
||||||
|
|
||||||
New user created
|
|
||||||
*/
|
|
||||||
type PostUsersCreated struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post users created response has a 2xx status code
|
|
||||||
func (o *PostUsersCreated) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post users created response has a 3xx status code
|
|
||||||
func (o *PostUsersCreated) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post users created response has a 4xx status code
|
|
||||||
func (o *PostUsersCreated) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post users created response has a 5xx status code
|
|
||||||
func (o *PostUsersCreated) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post users created response a status code equal to that given
|
|
||||||
func (o *PostUsersCreated) IsCode(code int) bool {
|
|
||||||
return code == 201
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post users created response
|
|
||||||
func (o *PostUsersCreated) Code() int {
|
|
||||||
return 201
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersCreated) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersCreated ", 201)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersCreated) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersCreated ", 201)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersUnauthorized creates a PostUsersUnauthorized with default headers values
|
|
||||||
func NewPostUsersUnauthorized() *PostUsersUnauthorized {
|
|
||||||
return &PostUsersUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type PostUsersUnauthorized struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post users unauthorized response has a 2xx status code
|
|
||||||
func (o *PostUsersUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post users unauthorized response has a 3xx status code
|
|
||||||
func (o *PostUsersUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post users unauthorized response has a 4xx status code
|
|
||||||
func (o *PostUsersUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post users unauthorized response has a 5xx status code
|
|
||||||
func (o *PostUsersUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post users unauthorized response a status code equal to that given
|
|
||||||
func (o *PostUsersUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post users unauthorized response
|
|
||||||
func (o *PostUsersUnauthorized) Code() int {
|
|
||||||
return 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersUnauthorized) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersForbidden creates a PostUsersForbidden with default headers values
|
|
||||||
func NewPostUsersForbidden() *PostUsersForbidden {
|
|
||||||
return &PostUsersForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type PostUsersForbidden struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post users forbidden response has a 2xx status code
|
|
||||||
func (o *PostUsersForbidden) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post users forbidden response has a 3xx status code
|
|
||||||
func (o *PostUsersForbidden) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post users forbidden response has a 4xx status code
|
|
||||||
func (o *PostUsersForbidden) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post users forbidden response has a 5xx status code
|
|
||||||
func (o *PostUsersForbidden) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post users forbidden response a status code equal to that given
|
|
||||||
func (o *PostUsersForbidden) IsCode(code int) bool {
|
|
||||||
return code == 403
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post users forbidden response
|
|
||||||
func (o *PostUsersForbidden) Code() int {
|
|
||||||
return 403
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersForbidden) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersForbidden) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersNotFound creates a PostUsersNotFound with default headers values
|
|
||||||
func NewPostUsersNotFound() *PostUsersNotFound {
|
|
||||||
return &PostUsersNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type PostUsersNotFound struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post users not found response has a 2xx status code
|
|
||||||
func (o *PostUsersNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post users not found response has a 3xx status code
|
|
||||||
func (o *PostUsersNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post users not found response has a 4xx status code
|
|
||||||
func (o *PostUsersNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post users not found response has a 5xx status code
|
|
||||||
func (o *PostUsersNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post users not found response a status code equal to that given
|
|
||||||
func (o *PostUsersNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post users not found response
|
|
||||||
func (o *PostUsersNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersNotFound) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersConflict creates a PostUsersConflict with default headers values
|
|
||||||
func NewPostUsersConflict() *PostUsersConflict {
|
|
||||||
return &PostUsersConflict{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersConflict describes a response with status code 409, with default header values.
|
|
||||||
|
|
||||||
User already exists
|
|
||||||
*/
|
|
||||||
type PostUsersConflict struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post users conflict response has a 2xx status code
|
|
||||||
func (o *PostUsersConflict) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post users conflict response has a 3xx status code
|
|
||||||
func (o *PostUsersConflict) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post users conflict response has a 4xx status code
|
|
||||||
func (o *PostUsersConflict) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post users conflict response has a 5xx status code
|
|
||||||
func (o *PostUsersConflict) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post users conflict response a status code equal to that given
|
|
||||||
func (o *PostUsersConflict) IsCode(code int) bool {
|
|
||||||
return code == 409
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post users conflict response
|
|
||||||
func (o *PostUsersConflict) Code() int {
|
|
||||||
return 409
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersConflict) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersConflict ", 409)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersConflict) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersConflict ", 409)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostUsersInternalServerError creates a PostUsersInternalServerError with default headers values
|
|
||||||
func NewPostUsersInternalServerError() *PostUsersInternalServerError {
|
|
||||||
return &PostUsersInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsersInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type PostUsersInternalServerError struct {
|
|
||||||
Payload *auth0_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this post users internal server error response has a 2xx status code
|
|
||||||
func (o *PostUsersInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this post users internal server error response has a 3xx status code
|
|
||||||
func (o *PostUsersInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this post users internal server error response has a 4xx status code
|
|
||||||
func (o *PostUsersInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this post users internal server error response has a 5xx status code
|
|
||||||
func (o *PostUsersInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this post users internal server error response a status code equal to that given
|
|
||||||
func (o *PostUsersInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the post users internal server error response
|
|
||||||
func (o *PostUsersInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersInternalServerError) GetPayload() *auth0_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostUsersInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,251 +0,0 @@
|
||||||
// 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"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// New creates a new user API client.
|
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
|
||||||
return &Client{transport: transport, formats: formats}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Client for user API
|
|
||||||
*/
|
|
||||||
type Client struct {
|
|
||||||
transport runtime.ClientTransport
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientOption is the option for Client methods
|
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
|
||||||
type ClientService interface {
|
|
||||||
DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams, opts ...ClientOption) (*DeleteAPIV2UsersUserIDRolesNoContent, error)
|
|
||||||
|
|
||||||
GetUserByEmail(params *GetUserByEmailParams, opts ...ClientOption) (*GetUserByEmailOK, error)
|
|
||||||
|
|
||||||
GetUserRoles(params *GetUserRolesParams, opts ...ClientOption) (*GetUserRolesOK, error)
|
|
||||||
|
|
||||||
GetUsers(params *GetUsersParams, opts ...ClientOption) (*GetUsersOK, error)
|
|
||||||
|
|
||||||
PostUsers(params *PostUsersParams, opts ...ClientOption) (*PostUsersCreated, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
DeleteAPIV2UsersUserIDRoles delete API v2 users user ID roles API
|
|
||||||
*/
|
|
||||||
func (a *Client) DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams, opts ...ClientOption) (*DeleteAPIV2UsersUserIDRolesNoContent, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewDeleteAPIV2UsersUserIDRolesParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "DeleteAPIV2UsersUserIDRoles",
|
|
||||||
Method: "DELETE",
|
|
||||||
PathPattern: "/api/v2/users/{userId}/roles",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &DeleteAPIV2UsersUserIDRolesReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*DeleteAPIV2UsersUserIDRolesNoContent)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for DeleteAPIV2UsersUserIDRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserByEmail gets a single user from auth0 by email address
|
|
||||||
|
|
||||||
Get a single user from Auth0 by Email Address
|
|
||||||
*/
|
|
||||||
func (a *Client) GetUserByEmail(params *GetUserByEmailParams, opts ...ClientOption) (*GetUserByEmailOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetUserByEmailParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getUserByEmail",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/api/v2/users-by-email",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetUserByEmailReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetUserByEmailOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getUserByEmail: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUserRoles gets a user s roles
|
|
||||||
|
|
||||||
Get a User's Roles
|
|
||||||
*/
|
|
||||||
func (a *Client) GetUserRoles(params *GetUserRolesParams, opts ...ClientOption) (*GetUserRolesOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetUserRolesParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getUserRoles",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/api/v2/users/{userId}/roles",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetUserRolesReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetUserRolesOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getUserRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetUsers gets all users from auth0
|
|
||||||
|
|
||||||
Get all users from Auth0
|
|
||||||
*/
|
|
||||||
func (a *Client) GetUsers(params *GetUsersParams, opts ...ClientOption) (*GetUsersOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetUsersParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getUsers",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/api/v2/users",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetUsersReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetUsersOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
PostUsers creates new auth0 user
|
|
||||||
|
|
||||||
create new Auth0 user
|
|
||||||
*/
|
|
||||||
func (a *Client) PostUsers(params *PostUsersParams, opts ...ClientOption) (*PostUsersCreated, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewPostUsersParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "postUsers",
|
|
||||||
Method: "POST",
|
|
||||||
PathPattern: "/api/v2/users-by-email",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"https"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &PostUsersReader{formats: a.formats},
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*PostUsersCreated)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for postUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTransport changes the transport on the client
|
|
||||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
||||||
a.transport = transport
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CredentialsRequest credentials request
|
|
||||||
//
|
|
||||||
// swagger:model CredentialsRequest
|
|
||||||
type CredentialsRequest struct {
|
|
||||||
|
|
||||||
// audience
|
|
||||||
Audience string `json:"audience,omitempty"`
|
|
||||||
|
|
||||||
// client id
|
|
||||||
ClientID string `json:"client_id,omitempty"`
|
|
||||||
|
|
||||||
// client secret
|
|
||||||
ClientSecret string `json:"client_secret,omitempty"`
|
|
||||||
|
|
||||||
// grant type
|
|
||||||
GrantType string `json:"grant_type,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this credentials request
|
|
||||||
func (m *CredentialsRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this credentials request based on context it is used
|
|
||||||
func (m *CredentialsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *CredentialsRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *CredentialsRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res CredentialsRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CredentialsResponse credentials response
|
|
||||||
//
|
|
||||||
// swagger:model CredentialsResponse
|
|
||||||
type CredentialsResponse struct {
|
|
||||||
|
|
||||||
// access token
|
|
||||||
AccessToken string `json:"access_token,omitempty"`
|
|
||||||
|
|
||||||
// expires in
|
|
||||||
ExpiresIn int64 `json:"expires_in,omitempty"`
|
|
||||||
|
|
||||||
// scope
|
|
||||||
Scope string `json:"scope,omitempty"`
|
|
||||||
|
|
||||||
// token type
|
|
||||||
TokenType string `json:"token_type,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this credentials response
|
|
||||||
func (m *CredentialsResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this credentials response based on context it is used
|
|
||||||
func (m *CredentialsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *CredentialsResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *CredentialsResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res CredentialsResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Error error
|
|
||||||
//
|
|
||||||
// swagger:model Error
|
|
||||||
type Error struct {
|
|
||||||
|
|
||||||
// code
|
|
||||||
Code int32 `json:"code,omitempty"`
|
|
||||||
|
|
||||||
// fields
|
|
||||||
Fields string `json:"fields,omitempty"`
|
|
||||||
|
|
||||||
// message
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this error
|
|
||||||
func (m *Error) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this error based on context it is used
|
|
||||||
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *Error) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *Error) UnmarshalBinary(b []byte) error {
|
|
||||||
var res Error
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,111 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewUser new user
|
|
||||||
//
|
|
||||||
// swagger:model NewUser
|
|
||||||
type NewUser struct {
|
|
||||||
|
|
||||||
// blocked
|
|
||||||
// Example: false
|
|
||||||
Blocked bool `json:"blocked,omitempty"`
|
|
||||||
|
|
||||||
// connection
|
|
||||||
// Example: Initial-Connection
|
|
||||||
Connection string `json:"connection,omitempty"`
|
|
||||||
|
|
||||||
// email
|
|
||||||
// Example: john.doe@gmail.com
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
|
|
||||||
// email verified
|
|
||||||
// Example: false
|
|
||||||
EmailVerified bool `json:"email_verified,omitempty"`
|
|
||||||
|
|
||||||
// family name
|
|
||||||
// Example: Doe
|
|
||||||
FamilyName string `json:"family_name,omitempty"`
|
|
||||||
|
|
||||||
// given name
|
|
||||||
// Example: John
|
|
||||||
GivenName string `json:"given_name,omitempty"`
|
|
||||||
|
|
||||||
// name
|
|
||||||
// Example: John Doe
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
|
|
||||||
// nickname
|
|
||||||
// Example: Johnny
|
|
||||||
Nickname string `json:"nickname,omitempty"`
|
|
||||||
|
|
||||||
// password
|
|
||||||
// Example: secret
|
|
||||||
Password string `json:"password,omitempty"`
|
|
||||||
|
|
||||||
// phone number
|
|
||||||
// Example: +199999999999999
|
|
||||||
PhoneNumber string `json:"phone_number,omitempty"`
|
|
||||||
|
|
||||||
// phone verified
|
|
||||||
// Example: false
|
|
||||||
PhoneVerified bool `json:"phone_verified,omitempty"`
|
|
||||||
|
|
||||||
// picture
|
|
||||||
// Example: https://secure.gravatar.com/avatar/15626c5e0c749cb912f9d1ad48dba440?s=480\u0026r=pg\u0026d=https%3A%2F%2Fssl.gstatic.com%2Fs2%2Fprofiles%2Fimages%2Fsilhouette80.png
|
|
||||||
Picture string `json:"picture,omitempty"`
|
|
||||||
|
|
||||||
// user id
|
|
||||||
// Example: abc
|
|
||||||
UserID string `json:"user_id,omitempty"`
|
|
||||||
|
|
||||||
// username
|
|
||||||
// Example: johndoe
|
|
||||||
Username string `json:"username,omitempty"`
|
|
||||||
|
|
||||||
// verify email
|
|
||||||
// Example: false
|
|
||||||
VerifyEmail bool `json:"verify_email,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this new user
|
|
||||||
func (m *NewUser) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this new user based on context it is used
|
|
||||||
func (m *NewUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *NewUser) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *NewUser) UnmarshalBinary(b []byte) error {
|
|
||||||
var res NewUser
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Role role
|
|
||||||
//
|
|
||||||
// swagger:model Role
|
|
||||||
type Role struct {
|
|
||||||
|
|
||||||
// description
|
|
||||||
// Example: Taxnexus API Developer
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
|
|
||||||
// id
|
|
||||||
// Example: rol_oWVoMn2Zx2qDSGUL
|
|
||||||
ID string `json:"id,omitempty"`
|
|
||||||
|
|
||||||
// name
|
|
||||||
// Example: Developer
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this role
|
|
||||||
func (m *Role) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this role based on context it is used
|
|
||||||
func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *Role) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *Role) UnmarshalBinary(b []byte) error {
|
|
||||||
var res Role
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,120 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RoleResponse role response
|
|
||||||
//
|
|
||||||
// swagger:model RoleResponse
|
|
||||||
type RoleResponse struct {
|
|
||||||
|
|
||||||
// roles
|
|
||||||
Roles []*Role `json:"roles"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this role response
|
|
||||||
func (m *RoleResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateRoles(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *RoleResponse) validateRoles(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.Roles) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Roles); i++ {
|
|
||||||
if swag.IsZero(m.Roles[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Roles[i] != nil {
|
|
||||||
if err := m.Roles[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("roles" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("roles" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this role response based on the context it is used
|
|
||||||
func (m *RoleResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.contextValidateRoles(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *RoleResponse) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Roles); i++ {
|
|
||||||
|
|
||||||
if m.Roles[i] != nil {
|
|
||||||
if err := m.Roles[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("roles" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("roles" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *RoleResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *RoleResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RoleResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RoleUsersRequest role users request
|
|
||||||
//
|
|
||||||
// swagger:model RoleUsersRequest
|
|
||||||
type RoleUsersRequest struct {
|
|
||||||
|
|
||||||
// users
|
|
||||||
Users []string `json:"users"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this role users request
|
|
||||||
func (m *RoleUsersRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this role users request based on context it is used
|
|
||||||
func (m *RoleUsersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *RoleUsersRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *RoleUsersRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RoleUsersRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,426 +0,0 @@
|
||||||
// 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 auth0_models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// User user
|
|
||||||
//
|
|
||||||
// swagger:model User
|
|
||||||
type User struct {
|
|
||||||
|
|
||||||
// app metadata
|
|
||||||
AppMetadata *UserAppMetadata `json:"app_metadata,omitempty"`
|
|
||||||
|
|
||||||
// created at
|
|
||||||
// Example: 2018-06-06T16:00:55.930Z
|
|
||||||
CreatedAt string `json:"created_at,omitempty"`
|
|
||||||
|
|
||||||
// email
|
|
||||||
// Example: vern@taxnexus.net
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
|
|
||||||
// email verified
|
|
||||||
// Example: true
|
|
||||||
EmailVerified bool `json:"email_verified,omitempty"`
|
|
||||||
|
|
||||||
// family name
|
|
||||||
// Example: Keenan
|
|
||||||
FamilyName string `json:"family_name,omitempty"`
|
|
||||||
|
|
||||||
// given name
|
|
||||||
// Example: Vernon
|
|
||||||
GivenName string `json:"given_name,omitempty"`
|
|
||||||
|
|
||||||
// identities
|
|
||||||
Identities []*UserIdentitiesItems0 `json:"identities"`
|
|
||||||
|
|
||||||
// last ip
|
|
||||||
// Example: 67.188.106.161
|
|
||||||
LastIP string `json:"last_ip,omitempty"`
|
|
||||||
|
|
||||||
// last login
|
|
||||||
// Example: 2020-09-22T19:19:02.706Z
|
|
||||||
LastLogin string `json:"last_login,omitempty"`
|
|
||||||
|
|
||||||
// last password reset
|
|
||||||
// Example: 2020-09-21T00:11:47.397Z
|
|
||||||
LastPasswordReset string `json:"last_password_reset,omitempty"`
|
|
||||||
|
|
||||||
// logins count
|
|
||||||
// Example: 178
|
|
||||||
LoginsCount int64 `json:"logins_count,omitempty"`
|
|
||||||
|
|
||||||
// multifactor last modified
|
|
||||||
// Example: 2020-09-21T00:30:34.081Z
|
|
||||||
MultifactorLastModified string `json:"multifactor_last_modified,omitempty"`
|
|
||||||
|
|
||||||
// name
|
|
||||||
// Example: Vernon Keenan
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
|
|
||||||
// nickname
|
|
||||||
// Example: vern
|
|
||||||
Nickname string `json:"nickname,omitempty"`
|
|
||||||
|
|
||||||
// picture
|
|
||||||
// Example: https://s.gravatar.com/avatar/a08710b8d49416c729a0da8a9c34cdb0?s=480\u0026r=pg\u0026d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fve.png
|
|
||||||
Picture string `json:"picture,omitempty"`
|
|
||||||
|
|
||||||
// updated at
|
|
||||||
// Example: 2020-09-22T19:19:02.706Z
|
|
||||||
UpdatedAt string `json:"updated_at,omitempty"`
|
|
||||||
|
|
||||||
// user id
|
|
||||||
// Example: auth0|5b180537157859716f2c9df5
|
|
||||||
UserID string `json:"user_id,omitempty"`
|
|
||||||
|
|
||||||
// user metadata
|
|
||||||
UserMetadata *UserUserMetadata `json:"user_metadata,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this user
|
|
||||||
func (m *User) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateAppMetadata(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateIdentities(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateUserMetadata(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) validateAppMetadata(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.AppMetadata) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.AppMetadata != nil {
|
|
||||||
if err := m.AppMetadata.Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("app_metadata")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("app_metadata")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) validateIdentities(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.Identities) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Identities); i++ {
|
|
||||||
if swag.IsZero(m.Identities[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Identities[i] != nil {
|
|
||||||
if err := m.Identities[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("identities" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("identities" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) validateUserMetadata(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.UserMetadata) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.UserMetadata != nil {
|
|
||||||
if err := m.UserMetadata.Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("user_metadata")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("user_metadata")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this user based on the context it is used
|
|
||||||
func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.contextValidateAppMetadata(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.contextValidateIdentities(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.contextValidateUserMetadata(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) contextValidateAppMetadata(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if m.AppMetadata != nil {
|
|
||||||
if err := m.AppMetadata.ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("app_metadata")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("app_metadata")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) contextValidateIdentities(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Identities); i++ {
|
|
||||||
|
|
||||||
if m.Identities[i] != nil {
|
|
||||||
if err := m.Identities[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("identities" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("identities" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) contextValidateUserMetadata(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if m.UserMetadata != nil {
|
|
||||||
if err := m.UserMetadata.ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("user_metadata")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("user_metadata")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *User) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *User) UnmarshalBinary(b []byte) error {
|
|
||||||
var res User
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserAppMetadata user app metadata
|
|
||||||
//
|
|
||||||
// swagger:model UserAppMetadata
|
|
||||||
type UserAppMetadata struct {
|
|
||||||
|
|
||||||
// roles
|
|
||||||
// Example: ["login"]
|
|
||||||
Roles []string `json:"roles"`
|
|
||||||
|
|
||||||
// taxnexus account id
|
|
||||||
// Example: 7f661ca6-ae4a-486f-9c3c-cd292685a46d
|
|
||||||
TaxnexusAccountID string `json:"taxnexus_account_id,omitempty"`
|
|
||||||
|
|
||||||
// taxnexus contact id
|
|
||||||
// Example: 9f79dca8-e875-4e2b-a5ad-001a3d32e83d
|
|
||||||
TaxnexusContactID string `json:"taxnexus_contact_id,omitempty"`
|
|
||||||
|
|
||||||
// taxnexus user id
|
|
||||||
// Example: f04da03d-70ad-46df-a46c-a676388aadd7
|
|
||||||
TaxnexusUserID string `json:"taxnexus_user_id,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this user app metadata
|
|
||||||
func (m *UserAppMetadata) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this user app metadata based on context it is used
|
|
||||||
func (m *UserAppMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UserAppMetadata) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UserAppMetadata) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UserAppMetadata
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserIdentitiesItems0 user identities items0
|
|
||||||
//
|
|
||||||
// swagger:model UserIdentitiesItems0
|
|
||||||
type UserIdentitiesItems0 struct {
|
|
||||||
|
|
||||||
// connection
|
|
||||||
// Example: Username-Password-Authentication
|
|
||||||
Connection string `json:"connection,omitempty"`
|
|
||||||
|
|
||||||
// is social
|
|
||||||
// Example: false
|
|
||||||
IsSocial bool `json:"isSocial,omitempty"`
|
|
||||||
|
|
||||||
// provider
|
|
||||||
// Example: auth0
|
|
||||||
Provider string `json:"provider,omitempty"`
|
|
||||||
|
|
||||||
// user id
|
|
||||||
// Example: 5b180537157859716f2c9df5
|
|
||||||
UserID string `json:"user_id,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this user identities items0
|
|
||||||
func (m *UserIdentitiesItems0) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this user identities items0 based on context it is used
|
|
||||||
func (m *UserIdentitiesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UserIdentitiesItems0) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UserIdentitiesItems0) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UserIdentitiesItems0
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserUserMetadata user user metadata
|
|
||||||
//
|
|
||||||
// swagger:model UserUserMetadata
|
|
||||||
type UserUserMetadata struct {
|
|
||||||
|
|
||||||
// taxnexus email
|
|
||||||
// Example: vern@taxnexus.net
|
|
||||||
TaxnexusEmail string `json:"taxnexus_email,omitempty"`
|
|
||||||
|
|
||||||
// taxnexus firstname
|
|
||||||
// Example: Vernon
|
|
||||||
TaxnexusFirstname string `json:"taxnexus_firstname,omitempty"`
|
|
||||||
|
|
||||||
// taxnexus fullname
|
|
||||||
// Example: Vernon Keenan
|
|
||||||
TaxnexusFullname string `json:"taxnexus_fullname,omitempty"`
|
|
||||||
|
|
||||||
// taxnexus lastname
|
|
||||||
// Example: Keenan
|
|
||||||
TaxnexusLastname string `json:"taxnexus_lastname,omitempty"`
|
|
||||||
|
|
||||||
// taxnexus phone
|
|
||||||
// Example: +15106791900
|
|
||||||
TaxnexusPhone string `json:"taxnexus_phone,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this user user metadata
|
|
||||||
func (m *UserUserMetadata) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this user user metadata based on context it is used
|
|
||||||
func (m *UserUserMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UserUserMetadata) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UserUserMetadata) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UserUserMetadata
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -67,7 +67,7 @@ type DeleteAccountParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewDeleteAccountOK() *DeleteAccountOK {
|
||||||
/*
|
/*
|
||||||
DeleteAccountOK describes a response with status code 200, with default header values.
|
DeleteAccountOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Message Objects with Delete Status
|
Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteAccountOK struct {
|
type DeleteAccountOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -68,7 +68,7 @@ type GetAccountsObservableParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetAccountsObservableOK() *GetAccountsObservableOK {
|
||||||
/*
|
/*
|
||||||
GetAccountsObservableOK describes a response with status code 200, with default header values.
|
GetAccountsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Account objects
|
Response with an array of Account objects
|
||||||
*/
|
*/
|
||||||
type GetAccountsObservableOK struct {
|
type GetAccountsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -68,7 +68,7 @@ type GetAccountsParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetAccountsOK() *GetAccountsOK {
|
||||||
/*
|
/*
|
||||||
GetAccountsOK describes a response with status code 200, with default header values.
|
GetAccountsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Account objects with Contacts
|
Response with Account objects with Contacts
|
||||||
*/
|
*/
|
||||||
type GetAccountsOK struct {
|
type GetAccountsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostAccountsOK() *PostAccountsOK {
|
||||||
/*
|
/*
|
||||||
PostAccountsOK describes a response with status code 200, with default header values.
|
PostAccountsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Account objects with Contacts
|
Response with Account objects with Contacts
|
||||||
*/
|
*/
|
||||||
type PostAccountsOK struct {
|
type PostAccountsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutAccountOK() *PutAccountOK {
|
||||||
/*
|
/*
|
||||||
PutAccountOK describes a response with status code 200, with default header values.
|
PutAccountOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Account objects with Contacts
|
Response with Account objects with Contacts
|
||||||
*/
|
*/
|
||||||
type PutAccountOK struct {
|
type PutAccountOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type DeleteAssetParams struct {
|
||||||
|
|
||||||
/* AssetID.
|
/* AssetID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Asset
|
Record Id of an Asset
|
||||||
*/
|
*/
|
||||||
AssetID *string
|
AssetID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewDeleteAssetOK() *DeleteAssetOK {
|
||||||
/*
|
/*
|
||||||
DeleteAssetOK describes a response with status code 200, with default header values.
|
DeleteAssetOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Message Objects with Delete Status
|
Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteAssetOK struct {
|
type DeleteAssetOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,13 +67,13 @@ type GetAssetsObservableParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
/* AssetID.
|
/* AssetID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Asset
|
Record Id of an Asset
|
||||||
*/
|
*/
|
||||||
AssetID *string
|
AssetID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetAssetsObservableOK() *GetAssetsObservableOK {
|
||||||
/*
|
/*
|
||||||
GetAssetsObservableOK describes a response with status code 200, with default header values.
|
GetAssetsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Asset objects
|
Response with an array of Asset objects
|
||||||
*/
|
*/
|
||||||
type GetAssetsObservableOK struct {
|
type GetAssetsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -68,13 +68,13 @@ type GetAssetsParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
/* AssetID.
|
/* AssetID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Asset
|
Record Id of an Asset
|
||||||
*/
|
*/
|
||||||
AssetID *string
|
AssetID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetAssetsOK() *GetAssetsOK {
|
||||||
/*
|
/*
|
||||||
GetAssetsOK describes a response with status code 200, with default header values.
|
GetAssetsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Asset objects with Contacts
|
Response with Asset objects with Contacts
|
||||||
*/
|
*/
|
||||||
type GetAssetsOK struct {
|
type GetAssetsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostAssetsOK() *PostAssetsOK {
|
||||||
/*
|
/*
|
||||||
PostAssetsOK describes a response with status code 200, with default header values.
|
PostAssetsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Asset objects with Contacts
|
Response with Asset objects with Contacts
|
||||||
*/
|
*/
|
||||||
type PostAssetsOK struct {
|
type PostAssetsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutAssetOK() *PutAssetOK {
|
||||||
/*
|
/*
|
||||||
PutAssetOK describes a response with status code 200, with default header values.
|
PutAssetOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Asset objects with Contacts
|
Response with Asset objects with Contacts
|
||||||
*/
|
*/
|
||||||
type PutAssetOK struct {
|
type PutAssetOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type DeleteContactParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Taxnexus Contact record ID
|
Contact record ID
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewDeleteContactOK() *DeleteContactOK {
|
||||||
/*
|
/*
|
||||||
DeleteContactOK describes a response with status code 200, with default header values.
|
DeleteContactOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Message Objects with Delete Status
|
Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteContactOK struct {
|
type DeleteContactOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -74,7 +74,7 @@ type GetContactsObservableParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Taxnexus Contact record ID
|
Contact record ID
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetContactsObservableOK() *GetContactsObservableOK {
|
||||||
/*
|
/*
|
||||||
GetContactsObservableOK describes a response with status code 200, with default header values.
|
GetContactsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contact objects
|
Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type GetContactsObservableOK struct {
|
type GetContactsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -74,7 +74,7 @@ type GetContactsParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Taxnexus Contact record ID
|
Contact record ID
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetContactsOK() *GetContactsOK {
|
||||||
/*
|
/*
|
||||||
GetContactsOK describes a response with status code 200, with default header values.
|
GetContactsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contact objects
|
Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type GetContactsOK struct {
|
type GetContactsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostContactsOK() *PostContactsOK {
|
||||||
/*
|
/*
|
||||||
PostContactsOK describes a response with status code 200, with default header values.
|
PostContactsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contact objects
|
Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type PostContactsOK struct {
|
type PostContactsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutContactsOK() *PutContactsOK {
|
||||||
/*
|
/*
|
||||||
PutContactsOK describes a response with status code 200, with default header values.
|
PutContactsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contact objects
|
Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type PutContactsOK struct {
|
type PutContactsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type DeleteContractParams struct {
|
||||||
|
|
||||||
/* ContractID.
|
/* ContractID.
|
||||||
|
|
||||||
Taxnexus Contact record ID
|
Contact record ID
|
||||||
*/
|
*/
|
||||||
ContractID *string
|
ContractID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewDeleteContractOK() *DeleteContractOK {
|
||||||
/*
|
/*
|
||||||
DeleteContractOK describes a response with status code 200, with default header values.
|
DeleteContractOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Message Objects with Delete Status
|
Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteContractOK struct {
|
type DeleteContractOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -74,7 +74,7 @@ type GetContractsObservableParams struct {
|
||||||
|
|
||||||
/* ContractID.
|
/* ContractID.
|
||||||
|
|
||||||
Taxnexus Contact record ID
|
Contact record ID
|
||||||
*/
|
*/
|
||||||
ContractID *string
|
ContractID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetContractsObservableOK() *GetContractsObservableOK {
|
||||||
/*
|
/*
|
||||||
GetContractsObservableOK describes a response with status code 200, with default header values.
|
GetContractsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contract objects
|
Response with an array of Contract objects
|
||||||
*/
|
*/
|
||||||
type GetContractsObservableOK struct {
|
type GetContractsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -74,7 +74,7 @@ type GetContractsParams struct {
|
||||||
|
|
||||||
/* ContractID.
|
/* ContractID.
|
||||||
|
|
||||||
Taxnexus Contact record ID
|
Contact record ID
|
||||||
*/
|
*/
|
||||||
ContractID *string
|
ContractID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetContractsOK() *GetContractsOK {
|
||||||
/*
|
/*
|
||||||
GetContractsOK describes a response with status code 200, with default header values.
|
GetContractsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contract objects
|
Response with an array of Contract objects
|
||||||
*/
|
*/
|
||||||
type GetContractsOK struct {
|
type GetContractsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostContractsOK() *PostContractsOK {
|
||||||
/*
|
/*
|
||||||
PostContractsOK describes a response with status code 200, with default header values.
|
PostContractsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contract objects
|
Response with an array of Contract objects
|
||||||
*/
|
*/
|
||||||
type PostContractsOK struct {
|
type PostContractsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutContractOK() *PutContractOK {
|
||||||
/*
|
/*
|
||||||
PutContractOK describes a response with status code 200, with default header values.
|
PutContractOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Contract objects
|
Response with an array of Contract objects
|
||||||
*/
|
*/
|
||||||
type PutContractOK struct {
|
type PutContractOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type DeleteLeadParams struct {
|
||||||
|
|
||||||
/* LeadID.
|
/* LeadID.
|
||||||
|
|
||||||
Taxnexus Lead record ID
|
Lead record ID
|
||||||
*/
|
*/
|
||||||
LeadID *string
|
LeadID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewDeleteLeadOK() *DeleteLeadOK {
|
||||||
/*
|
/*
|
||||||
DeleteLeadOK describes a response with status code 200, with default header values.
|
DeleteLeadOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Message Objects with Delete Status
|
Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteLeadOK struct {
|
type DeleteLeadOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -73,7 +73,7 @@ type GetLeadsObservableParams struct {
|
||||||
|
|
||||||
/* LeadID.
|
/* LeadID.
|
||||||
|
|
||||||
Taxnexus Lead record ID
|
Lead record ID
|
||||||
*/
|
*/
|
||||||
LeadID *string
|
LeadID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetLeadsObservableOK() *GetLeadsObservableOK {
|
||||||
/*
|
/*
|
||||||
GetLeadsObservableOK describes a response with status code 200, with default header values.
|
GetLeadsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Lead objects
|
Response with an array of Lead objects
|
||||||
*/
|
*/
|
||||||
type GetLeadsObservableOK struct {
|
type GetLeadsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -74,7 +74,7 @@ type GetLeadsParams struct {
|
||||||
|
|
||||||
/* LeadID.
|
/* LeadID.
|
||||||
|
|
||||||
Taxnexus Lead record ID
|
Lead record ID
|
||||||
*/
|
*/
|
||||||
LeadID *string
|
LeadID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetLeadsOK() *GetLeadsOK {
|
||||||
/*
|
/*
|
||||||
GetLeadsOK describes a response with status code 200, with default header values.
|
GetLeadsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Lead objects
|
Response with an array of Lead objects
|
||||||
*/
|
*/
|
||||||
type GetLeadsOK struct {
|
type GetLeadsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostLeadsOK() *PostLeadsOK {
|
||||||
/*
|
/*
|
||||||
PostLeadsOK describes a response with status code 200, with default header values.
|
PostLeadsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Lead objects
|
Response with an array of Lead objects
|
||||||
*/
|
*/
|
||||||
type PostLeadsOK struct {
|
type PostLeadsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutLeadsOK() *PutLeadsOK {
|
||||||
/*
|
/*
|
||||||
PutLeadsOK describes a response with status code 200, with default header values.
|
PutLeadsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with an array of Lead objects
|
Response with an array of Lead objects
|
||||||
*/
|
*/
|
||||||
type PutLeadsOK struct {
|
type PutLeadsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -28,6 +28,9 @@ type Account struct {
|
||||||
// The marketing origin of this account
|
// The marketing origin of this account
|
||||||
AccountSource string `json:"AccountSource,omitempty"`
|
AccountSource string `json:"AccountSource,omitempty"`
|
||||||
|
|
||||||
|
// active
|
||||||
|
Active int64 `json:"Active,omitempty"`
|
||||||
|
|
||||||
// Annual Revenue Estimate
|
// Annual Revenue Estimate
|
||||||
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
|
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
|
||||||
|
|
||||||
|
@ -40,6 +43,9 @@ type Account struct {
|
||||||
// Close Date
|
// Close Date
|
||||||
CloseDate string `json:"CloseDate,omitempty"`
|
CloseDate string `json:"CloseDate,omitempty"`
|
||||||
|
|
||||||
|
// cloud revenue total
|
||||||
|
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
|
||||||
|
|
||||||
// The type of cloud company
|
// The type of cloud company
|
||||||
CloudType string `json:"CloudType,omitempty"`
|
CloudType string `json:"CloudType,omitempty"`
|
||||||
|
|
||||||
|
@ -58,6 +64,9 @@ type Account struct {
|
||||||
// Description of the account
|
// Description of the account
|
||||||
Description string `json:"Description,omitempty"`
|
Description string `json:"Description,omitempty"`
|
||||||
|
|
||||||
|
// e i n
|
||||||
|
EIN string `json:"EIN,omitempty"`
|
||||||
|
|
||||||
// Earnings Call Date
|
// Earnings Call Date
|
||||||
EarningsCall string `json:"EarningsCall,omitempty"`
|
EarningsCall string `json:"EarningsCall,omitempty"`
|
||||||
|
|
||||||
|
@ -76,12 +85,18 @@ type Account struct {
|
||||||
// Date company founded
|
// Date company founded
|
||||||
FoundedDate string `json:"FoundedDate,omitempty"`
|
FoundedDate string `json:"FoundedDate,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Account Id
|
// Account Id
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// IPO Date
|
// IPO Date
|
||||||
IPODate string `json:"IPODate,omitempty"`
|
IPODate string `json:"IPODate,omitempty"`
|
||||||
|
|
||||||
|
// image URL
|
||||||
|
ImageURL string `json:"ImageURL,omitempty"`
|
||||||
|
|
||||||
|
// imagealttext
|
||||||
|
Imagealttext string `json:"Imagealttext,omitempty"`
|
||||||
|
|
||||||
// Industries
|
// Industries
|
||||||
Industries string `json:"Industries,omitempty"`
|
Industries string `json:"Industries,omitempty"`
|
||||||
|
|
||||||
|
@ -148,6 +163,9 @@ type Account struct {
|
||||||
// Account Site
|
// Account Site
|
||||||
Site string `json:"Site,omitempty"`
|
Site string `json:"Site,omitempty"`
|
||||||
|
|
||||||
|
// Slug
|
||||||
|
Slug string `json:"Slug,omitempty"`
|
||||||
|
|
||||||
// Company tagline
|
// Company tagline
|
||||||
TagLine string `json:"TagLine,omitempty"`
|
TagLine string `json:"TagLine,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ type Asset struct {
|
||||||
// Has Lifecycle Management
|
// Has Lifecycle Management
|
||||||
HasLifecycleManagement bool `json:"HasLifecycleManagement,omitempty"`
|
HasLifecycleManagement bool `json:"HasLifecycleManagement,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Record Id
|
// Record Id
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// Install Date
|
// Install Date
|
||||||
|
|
|
@ -40,6 +40,9 @@ type Contact struct {
|
||||||
// Created Date
|
// Created Date
|
||||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// crunchbase URL
|
||||||
|
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
|
||||||
|
|
||||||
// Department
|
// Department
|
||||||
Department string `json:"Department,omitempty"`
|
Department string `json:"Department,omitempty"`
|
||||||
|
|
||||||
|
@ -73,7 +76,7 @@ type Contact struct {
|
||||||
// Home Phone
|
// Home Phone
|
||||||
HomePhone string `json:"HomePhone,omitempty"`
|
HomePhone string `json:"HomePhone,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Record Id
|
// Record Id
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// Does this contact have bounced emails?
|
// Does this contact have bounced emails?
|
||||||
|
@ -124,6 +127,15 @@ type Contact struct {
|
||||||
// URL of a photograph of this User
|
// URL of a photograph of this User
|
||||||
PhotoURL string `json:"PhotoURL,omitempty"`
|
PhotoURL string `json:"PhotoURL,omitempty"`
|
||||||
|
|
||||||
|
// Reports To
|
||||||
|
ReportsToID string `json:"ReportsToID,omitempty"`
|
||||||
|
|
||||||
|
// Salutation
|
||||||
|
Salutation string `json:"Salutation,omitempty"`
|
||||||
|
|
||||||
|
// Slug
|
||||||
|
Slug string `json:"Slug,omitempty"`
|
||||||
|
|
||||||
// Tenant Identifier
|
// Tenant Identifier
|
||||||
TenantID string `json:"TenantID,omitempty"`
|
TenantID string `json:"TenantID,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ type Contract struct {
|
||||||
// Hourly Rate
|
// Hourly Rate
|
||||||
HourlyRate float64 `json:"HourlyRate,omitempty"`
|
HourlyRate float64 `json:"HourlyRate,omitempty"`
|
||||||
|
|
||||||
// Telnexus Record Id
|
// Record Id
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// Last Modified By User ID
|
// Last Modified By User ID
|
||||||
|
|
|
@ -43,7 +43,7 @@ type Lead struct {
|
||||||
// First Name
|
// First Name
|
||||||
FirstName string `json:"FirstName,omitempty"`
|
FirstName string `json:"FirstName,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Record Id
|
// Record Id
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// Last Modified By User ID
|
// Last Modified By User ID
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
// swagger:model RequestMeta
|
// swagger:model RequestMeta
|
||||||
type RequestMeta struct {
|
type RequestMeta struct {
|
||||||
|
|
||||||
// Taxnexus Account Number of the Reseller or OEM
|
// Account Number of the Reseller or OEM
|
||||||
// Required: true
|
// Required: true
|
||||||
TaxnexusAccount *string `json:"TaxnexusAccount"`
|
TaxnexusAccount *string `json:"TaxnexusAccount"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ type ResponseMeta struct {
|
||||||
// Backend Server Timestamp
|
// Backend Server Timestamp
|
||||||
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
||||||
|
|
||||||
// Taxnexus Account Number used for recording transactions
|
// Account Number used for recording transactions
|
||||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ type GetClusterParams struct {
|
||||||
|
|
||||||
/* ClusterIDPath.
|
/* ClusterIDPath.
|
||||||
|
|
||||||
Taxnexus Record Id of a Cluster
|
Record Id of a Cluster
|
||||||
*/
|
*/
|
||||||
ClusterIDPath string
|
ClusterIDPath string
|
||||||
|
|
||||||
|
|
|
@ -68,13 +68,13 @@ type GetClustersParams struct {
|
||||||
|
|
||||||
/* ClusterID.
|
/* ClusterID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Cluster
|
Record Id of a Cluster
|
||||||
*/
|
*/
|
||||||
ClusterID *string
|
ClusterID *string
|
||||||
|
|
||||||
/* CompanyID.
|
/* CompanyID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Company
|
Record Id of a Company
|
||||||
*/
|
*/
|
||||||
CompanyID *string
|
CompanyID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetClustersOK() *GetClustersOK {
|
||||||
/*
|
/*
|
||||||
GetClustersOK describes a response with status code 200, with default header values.
|
GetClustersOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Cluster objects
|
Response with Cluster objects
|
||||||
*/
|
*/
|
||||||
type GetClustersOK struct {
|
type GetClustersOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostClustersOK() *PostClustersOK {
|
||||||
/*
|
/*
|
||||||
PostClustersOK describes a response with status code 200, with default header values.
|
PostClustersOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Cluster objects
|
Response with Cluster objects
|
||||||
*/
|
*/
|
||||||
type PostClustersOK struct {
|
type PostClustersOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutClustersOK() *PutClustersOK {
|
||||||
/*
|
/*
|
||||||
PutClustersOK describes a response with status code 200, with default header values.
|
PutClustersOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Cluster objects
|
Response with Cluster objects
|
||||||
*/
|
*/
|
||||||
type PutClustersOK struct {
|
type PutClustersOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type GetDatabaseParams struct {
|
||||||
|
|
||||||
/* DatabaseIDPath.
|
/* DatabaseIDPath.
|
||||||
|
|
||||||
Taxnexus Record Id of a Database
|
Record Id of a Database
|
||||||
*/
|
*/
|
||||||
DatabaseIDPath string
|
DatabaseIDPath string
|
||||||
|
|
||||||
|
|
|
@ -68,13 +68,13 @@ type GetDatabasesParams struct {
|
||||||
|
|
||||||
/* CompanyID.
|
/* CompanyID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Company
|
Record Id of a Company
|
||||||
*/
|
*/
|
||||||
CompanyID *string
|
CompanyID *string
|
||||||
|
|
||||||
/* DatabaseID.
|
/* DatabaseID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Database
|
Record Id of a Database
|
||||||
*/
|
*/
|
||||||
DatabaseID *string
|
DatabaseID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetDatabasesOK() *GetDatabasesOK {
|
||||||
/*
|
/*
|
||||||
GetDatabasesOK describes a response with status code 200, with default header values.
|
GetDatabasesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Database objects
|
Response with Database objects
|
||||||
*/
|
*/
|
||||||
type GetDatabasesOK struct {
|
type GetDatabasesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostDatabasesOK() *PostDatabasesOK {
|
||||||
/*
|
/*
|
||||||
PostDatabasesOK describes a response with status code 200, with default header values.
|
PostDatabasesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Database objects
|
Response with Database objects
|
||||||
*/
|
*/
|
||||||
type PostDatabasesOK struct {
|
type PostDatabasesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutDatabasesOK() *PutDatabasesOK {
|
||||||
/*
|
/*
|
||||||
PutDatabasesOK describes a response with status code 200, with default header values.
|
PutDatabasesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Database objects
|
Response with Database objects
|
||||||
*/
|
*/
|
||||||
type PutDatabasesOK struct {
|
type PutDatabasesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type GetTemplateParams struct {
|
||||||
|
|
||||||
/* TemplateIDPath.
|
/* TemplateIDPath.
|
||||||
|
|
||||||
Taxnexus Record Id of a Template
|
Record Id of a Template
|
||||||
*/
|
*/
|
||||||
TemplateIDPath string
|
TemplateIDPath string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetTemplatesOK() *GetTemplatesOK {
|
||||||
/*
|
/*
|
||||||
GetTemplatesOK describes a response with status code 200, with default header values.
|
GetTemplatesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Template objects
|
Response with Template objects
|
||||||
*/
|
*/
|
||||||
type GetTemplatesOK struct {
|
type GetTemplatesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostTemplatesOK() *PostTemplatesOK {
|
||||||
/*
|
/*
|
||||||
PostTemplatesOK describes a response with status code 200, with default header values.
|
PostTemplatesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Template objects
|
Response with Template objects
|
||||||
*/
|
*/
|
||||||
type PostTemplatesOK struct {
|
type PostTemplatesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type GetTenantParams struct {
|
||||||
|
|
||||||
/* TenantIDPath.
|
/* TenantIDPath.
|
||||||
|
|
||||||
Taxnexus Record Id of a Tenant
|
Record Id of a Tenant
|
||||||
*/
|
*/
|
||||||
TenantIDPath string
|
TenantIDPath string
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ type GetTenantsParams struct {
|
||||||
|
|
||||||
/* CompanyID.
|
/* CompanyID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Company
|
Record Id of a Company
|
||||||
*/
|
*/
|
||||||
CompanyID *string
|
CompanyID *string
|
||||||
|
|
||||||
|
@ -90,13 +90,13 @@ type GetTenantsParams struct {
|
||||||
|
|
||||||
/* TaxnexusAccount.
|
/* TaxnexusAccount.
|
||||||
|
|
||||||
Taxnexus Account of a Tenant
|
Account of a Tenant
|
||||||
*/
|
*/
|
||||||
TaxnexusAccount *string
|
TaxnexusAccount *string
|
||||||
|
|
||||||
/* TenantID.
|
/* TenantID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Tenant
|
Record Id of a Tenant
|
||||||
*/
|
*/
|
||||||
TenantID *string
|
TenantID *string
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewGetTenantsOK() *GetTenantsOK {
|
||||||
/*
|
/*
|
||||||
GetTenantsOK describes a response with status code 200, with default header values.
|
GetTenantsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Tenant objects
|
Response with Tenant objects
|
||||||
*/
|
*/
|
||||||
type GetTenantsOK struct {
|
type GetTenantsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostTenantsOK() *PostTenantsOK {
|
||||||
/*
|
/*
|
||||||
PostTenantsOK describes a response with status code 200, with default header values.
|
PostTenantsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Tenant objects
|
Response with Tenant objects
|
||||||
*/
|
*/
|
||||||
type PostTenantsOK struct {
|
type PostTenantsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutTenantsOK() *PutTenantsOK {
|
||||||
/*
|
/*
|
||||||
PutTenantsOK describes a response with status code 200, with default header values.
|
PutTenantsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Taxnexus Response with Tenant objects
|
Response with Tenant objects
|
||||||
*/
|
*/
|
||||||
type PutTenantsOK struct {
|
type PutTenantsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -67,7 +67,7 @@ type GetUserParams struct {
|
||||||
|
|
||||||
/* UserIDPath.
|
/* UserIDPath.
|
||||||
|
|
||||||
Taxnexus Record Id of a User
|
Record Id of a User
|
||||||
*/
|
*/
|
||||||
UserIDPath string
|
UserIDPath string
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ type GetUsersParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ type GetUsersParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Taxnexus Record Id of a Contact
|
Record Id of a Contact
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ type GetUsersParams struct {
|
||||||
|
|
||||||
/* UserID.
|
/* UserID.
|
||||||
|
|
||||||
Taxnexus User ID (unique)
|
User ID (unique)
|
||||||
*/
|
*/
|
||||||
UserID *string
|
UserID *string
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue