// 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/sfgate/sfgate_models" ) // NewPostUserParams creates a new PostUserParams 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 NewPostUserParams() *PostUserParams { return &PostUserParams{ timeout: cr.DefaultTimeout, } } // NewPostUserParamsWithTimeout creates a new PostUserParams object // with the ability to set a timeout on a request. func NewPostUserParamsWithTimeout(timeout time.Duration) *PostUserParams { return &PostUserParams{ timeout: timeout, } } // NewPostUserParamsWithContext creates a new PostUserParams object // with the ability to set a context for a request. func NewPostUserParamsWithContext(ctx context.Context) *PostUserParams { return &PostUserParams{ Context: ctx, } } // NewPostUserParamsWithHTTPClient creates a new PostUserParams object // with the ability to set a custom HTTPClient for a request. func NewPostUserParamsWithHTTPClient(client *http.Client) *PostUserParams { return &PostUserParams{ HTTPClient: client, } } /* PostUserParams contains all the parameters to send to the API endpoint for the post user operation. Typically these are written to a http.Request. */ type PostUserParams struct { /* UserRequest. A single new user record */ UserRequest *sfgate_models.UserRequest timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the post user params (not the query body). // // All values with no default are reset to their zero value. func (o *PostUserParams) WithDefaults() *PostUserParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the post user params (not the query body). // // All values with no default are reset to their zero value. func (o *PostUserParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the post user params func (o *PostUserParams) WithTimeout(timeout time.Duration) *PostUserParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the post user params func (o *PostUserParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the post user params func (o *PostUserParams) WithContext(ctx context.Context) *PostUserParams { o.SetContext(ctx) return o } // SetContext adds the context to the post user params func (o *PostUserParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the post user params func (o *PostUserParams) WithHTTPClient(client *http.Client) *PostUserParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the post user params func (o *PostUserParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithUserRequest adds the userRequest to the post user params func (o *PostUserParams) WithUserRequest(userRequest *sfgate_models.UserRequest) *PostUserParams { o.SetUserRequest(userRequest) return o } // SetUserRequest adds the userRequest to the post user params func (o *PostUserParams) SetUserRequest(userRequest *sfgate_models.UserRequest) { o.UserRequest = userRequest } // WriteToRequest writes these params to a swagger request func (o *PostUserParams) 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 }