mirror of https://github.com/vernonkeenan/lib
159 lines
4.3 KiB
Go
159 lines
4.3 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2020 by Taxnexus, Inc.
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package user
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"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 values initialized.
|
|
func NewGetUserByEmailParams() *GetUserByEmailParams {
|
|
var ()
|
|
return &GetUserByEmailParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetUserByEmailParamsWithTimeout creates a new GetUserByEmailParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewGetUserByEmailParamsWithTimeout(timeout time.Duration) *GetUserByEmailParams {
|
|
var ()
|
|
return &GetUserByEmailParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetUserByEmailParamsWithContext creates a new GetUserByEmailParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewGetUserByEmailParamsWithContext(ctx context.Context) *GetUserByEmailParams {
|
|
var ()
|
|
return &GetUserByEmailParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewGetUserByEmailParamsWithHTTPClient creates a new GetUserByEmailParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewGetUserByEmailParamsWithHTTPClient(client *http.Client) *GetUserByEmailParams {
|
|
var ()
|
|
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
|
|
}
|
|
|
|
// 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
|
|
}
|