// 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 users import ( "context" "net/http" "time" "code.tnxs.net/vernonkeenan/lib/api/members/members_models" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) // NewPostUsersOnboardParams creates a new PostUsersOnboardParams 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 NewPostUsersOnboardParams() *PostUsersOnboardParams { return NewPostUsersOnboardParamsWithTimeout(cr.DefaultTimeout) } // NewPostUsersOnboardParamsWithTimeout creates a new PostUsersOnboardParams object // with the ability to set a timeout on a request. func NewPostUsersOnboardParamsWithTimeout(timeout time.Duration) *PostUsersOnboardParams { return &PostUsersOnboardParams{ inner: innerParams{ timeout: timeout, }, } } // NewPostUsersOnboardParamsWithContext creates a new PostUsersOnboardParams object // with the ability to set a context for a request. // // Deprecated: use the operation call with context to pass the context instead of [PostUsersOnboardParams]. func NewPostUsersOnboardParamsWithContext(ctx context.Context) *PostUsersOnboardParams { return &PostUsersOnboardParams{ inner: innerParams{ ctx: ctx, }, } } // NewPostUsersOnboardParamsWithHTTPClient creates a new PostUsersOnboardParams object // with the ability to set a custom HTTPClient for a request. func NewPostUsersOnboardParamsWithHTTPClient(client *http.Client) *PostUsersOnboardParams { return &PostUsersOnboardParams{ HTTPClient: client, } } /* PostUsersOnboardParams contains all the parameters to send to the API endpoint for the post users onboard operation. Typically these are written to a http.Request. */ type PostUsersOnboardParams struct { // OnboardRequest. // // Self-service onboarding request (single user) OnboardRequest *members_models.OnboardRequest HTTPClient *http.Client inner innerParams } // WithDefaults hydrates default values in the post users onboard params (not the query body). // // All values with no default are reset to their zero value. func (o *PostUsersOnboardParams) WithDefaults() *PostUsersOnboardParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the post users onboard params (not the query body). // // All values with no default are reset to their zero value. func (o *PostUsersOnboardParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the post users onboard params. func (o *PostUsersOnboardParams) WithTimeout(timeout time.Duration) *PostUsersOnboardParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the post users onboard params. func (o *PostUsersOnboardParams) SetTimeout(timeout time.Duration) { o.inner.timeout = timeout } // WithContext adds the context to the post users onboard params. // // Deprecated: use the operation call with context to pass the context instead of [PostUsersOnboardParams]. func (o *PostUsersOnboardParams) WithContext(ctx context.Context) *PostUsersOnboardParams { o.SetContext(ctx) return o } // SetContext adds the context to the post users onboard params. // // Deprecated: use the operation call with context to pass the context instead of [PostUsersOnboardParams]. func (o *PostUsersOnboardParams) SetContext(ctx context.Context) { o.inner.ctx = ctx } // WithHTTPClient adds the HTTPClient to the post users onboard params. func (o *PostUsersOnboardParams) WithHTTPClient(client *http.Client) *PostUsersOnboardParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the post users onboard params. func (o *PostUsersOnboardParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithOnboardRequest adds the onboardRequest to the post users onboard params. func (o *PostUsersOnboardParams) WithOnboardRequest(onboardRequest *members_models.OnboardRequest) *PostUsersOnboardParams { o.SetOnboardRequest(onboardRequest) return o } // SetOnboardRequest adds the onboardRequest to the post users onboard params. func (o *PostUsersOnboardParams) SetOnboardRequest(onboardRequest *members_models.OnboardRequest) { o.OnboardRequest = onboardRequest } // WriteToRequest writes these params to a [runtime.ClientRequest]. func (o *PostUsersOnboardParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.inner.timeout); err != nil { return err } var res []error if o.OnboardRequest != nil { if err := r.SetBodyParam(o.OnboardRequest); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }