// 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 assets // 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" ) // NewGetAssetsObservableParams creates a new GetAssetsObservableParams 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 NewGetAssetsObservableParams() *GetAssetsObservableParams { return &GetAssetsObservableParams{ timeout: cr.DefaultTimeout, } } // NewGetAssetsObservableParamsWithTimeout creates a new GetAssetsObservableParams object // with the ability to set a timeout on a request. func NewGetAssetsObservableParamsWithTimeout(timeout time.Duration) *GetAssetsObservableParams { return &GetAssetsObservableParams{ timeout: timeout, } } // NewGetAssetsObservableParamsWithContext creates a new GetAssetsObservableParams object // with the ability to set a context for a request. func NewGetAssetsObservableParamsWithContext(ctx context.Context) *GetAssetsObservableParams { return &GetAssetsObservableParams{ Context: ctx, } } // NewGetAssetsObservableParamsWithHTTPClient creates a new GetAssetsObservableParams object // with the ability to set a custom HTTPClient for a request. func NewGetAssetsObservableParamsWithHTTPClient(client *http.Client) *GetAssetsObservableParams { return &GetAssetsObservableParams{ HTTPClient: client, } } /* GetAssetsObservableParams contains all the parameters to send to the API endpoint for the get assets observable operation. Typically these are written to a http.Request. */ type GetAssetsObservableParams struct { /* AccountID. Record Id of an Account */ AccountID *string /* AssetID. Record Id of an Asset */ AssetID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the get assets observable params (not the query body). // // All values with no default are reset to their zero value. func (o *GetAssetsObservableParams) WithDefaults() *GetAssetsObservableParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the get assets observable params (not the query body). // // All values with no default are reset to their zero value. func (o *GetAssetsObservableParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the get assets observable params func (o *GetAssetsObservableParams) WithTimeout(timeout time.Duration) *GetAssetsObservableParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the get assets observable params func (o *GetAssetsObservableParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the get assets observable params func (o *GetAssetsObservableParams) WithContext(ctx context.Context) *GetAssetsObservableParams { o.SetContext(ctx) return o } // SetContext adds the context to the get assets observable params func (o *GetAssetsObservableParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the get assets observable params func (o *GetAssetsObservableParams) WithHTTPClient(client *http.Client) *GetAssetsObservableParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the get assets observable params func (o *GetAssetsObservableParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithAccountID adds the accountID to the get assets observable params func (o *GetAssetsObservableParams) WithAccountID(accountID *string) *GetAssetsObservableParams { o.SetAccountID(accountID) return o } // SetAccountID adds the accountId to the get assets observable params func (o *GetAssetsObservableParams) SetAccountID(accountID *string) { o.AccountID = accountID } // WithAssetID adds the assetID to the get assets observable params func (o *GetAssetsObservableParams) WithAssetID(assetID *string) *GetAssetsObservableParams { o.SetAssetID(assetID) return o } // SetAssetID adds the assetId to the get assets observable params func (o *GetAssetsObservableParams) SetAssetID(assetID *string) { o.AssetID = assetID } // WriteToRequest writes these params to a swagger request func (o *GetAssetsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.AccountID != nil { // query param accountId var qrAccountID string if o.AccountID != nil { qrAccountID = *o.AccountID } qAccountID := qrAccountID if qAccountID != "" { if err := r.SetQueryParam("accountId", qAccountID); err != nil { return err } } } if o.AssetID != nil { // query param assetId var qrAssetID string if o.AssetID != nil { qrAssetID = *o.AssetID } qAssetID := qrAssetID if qAssetID != "" { if err := r.SetQueryParam("assetId", qAssetID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }