// 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 sessions // 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" ) // NewRefreshSessionParams creates a new RefreshSessionParams 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 NewRefreshSessionParams() *RefreshSessionParams { return &RefreshSessionParams{ timeout: cr.DefaultTimeout, } } // NewRefreshSessionParamsWithTimeout creates a new RefreshSessionParams object // with the ability to set a timeout on a request. func NewRefreshSessionParamsWithTimeout(timeout time.Duration) *RefreshSessionParams { return &RefreshSessionParams{ timeout: timeout, } } // NewRefreshSessionParamsWithContext creates a new RefreshSessionParams object // with the ability to set a context for a request. func NewRefreshSessionParamsWithContext(ctx context.Context) *RefreshSessionParams { return &RefreshSessionParams{ Context: ctx, } } // NewRefreshSessionParamsWithHTTPClient creates a new RefreshSessionParams object // with the ability to set a custom HTTPClient for a request. func NewRefreshSessionParamsWithHTTPClient(client *http.Client) *RefreshSessionParams { return &RefreshSessionParams{ HTTPClient: client, } } /* RefreshSessionParams contains all the parameters to send to the API endpoint for the refresh session operation. Typically these are written to a http.Request. */ type RefreshSessionParams struct { timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the refresh session params (not the query body). // // All values with no default are reset to their zero value. func (o *RefreshSessionParams) WithDefaults() *RefreshSessionParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the refresh session params (not the query body). // // All values with no default are reset to their zero value. func (o *RefreshSessionParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the refresh session params func (o *RefreshSessionParams) WithTimeout(timeout time.Duration) *RefreshSessionParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the refresh session params func (o *RefreshSessionParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the refresh session params func (o *RefreshSessionParams) WithContext(ctx context.Context) *RefreshSessionParams { o.SetContext(ctx) return o } // SetContext adds the context to the refresh session params func (o *RefreshSessionParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the refresh session params func (o *RefreshSessionParams) WithHTTPClient(client *http.Client) *RefreshSessionParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the refresh session params func (o *RefreshSessionParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WriteToRequest writes these params to a swagger request func (o *RefreshSessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }