158 lines
4.2 KiB
Go
158 lines
4.2 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// All Code Copyright(c) 2018-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 values initialized.
|
|
func NewGetUserRolesParams() *GetUserRolesParams {
|
|
var ()
|
|
return &GetUserRolesParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetUserRolesParamsWithTimeout creates a new GetUserRolesParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewGetUserRolesParamsWithTimeout(timeout time.Duration) *GetUserRolesParams {
|
|
var ()
|
|
return &GetUserRolesParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetUserRolesParamsWithContext creates a new GetUserRolesParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewGetUserRolesParamsWithContext(ctx context.Context) *GetUserRolesParams {
|
|
var ()
|
|
return &GetUserRolesParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewGetUserRolesParamsWithHTTPClient creates a new GetUserRolesParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewGetUserRolesParamsWithHTTPClient(client *http.Client) *GetUserRolesParams {
|
|
var ()
|
|
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
|
|
}
|
|
|
|
// 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
|
|
}
|