// 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 // 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/members/members_models" ) // 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 &PostUsersOnboardParams{ timeout: 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{ timeout: timeout, } } // NewPostUsersOnboardParamsWithContext creates a new PostUsersOnboardParams object // with the ability to set a context for a request. func NewPostUsersOnboardParamsWithContext(ctx context.Context) *PostUsersOnboardParams { return &PostUsersOnboardParams{ Context: 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 { /* UserRequest. An array of User records */ UserRequest *members_models.UserRequest timeout time.Duration Context context.Context HTTPClient *http.Client } // 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.timeout = timeout } // WithContext adds the context to the post users onboard params func (o *PostUsersOnboardParams) WithContext(ctx context.Context) *PostUsersOnboardParams { o.SetContext(ctx) return o } // SetContext adds the context to the post users onboard params func (o *PostUsersOnboardParams) SetContext(ctx context.Context) { o.Context = 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 } // WithUserRequest adds the userRequest to the post users onboard params func (o *PostUsersOnboardParams) WithUserRequest(userRequest *members_models.UserRequest) *PostUsersOnboardParams { o.SetUserRequest(userRequest) return o } // SetUserRequest adds the userRequest to the post users onboard params func (o *PostUsersOnboardParams) SetUserRequest(userRequest *members_models.UserRequest) { o.UserRequest = userRequest } // WriteToRequest writes these params to a swagger request func (o *PostUsersOnboardParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.UserRequest != nil { if err := r.SetBodyParam(o.UserRequest); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }