func (o *GetTreasuryTaxRateParams) 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
}
WriteToRequest writes these params to a swagger request
package treasury
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"
)
func NewGetTreasuryTaxRateParams() *GetTreasuryTaxRateParams {
	return &GetTreasuryTaxRateParams{
		timeout: cr.DefaultTimeout,
	}
}
func NewGetTreasuryTaxRateParamsWithTimeout(timeout time.Duration) *GetTreasuryTaxRateParams {
	return &GetTreasuryTaxRateParams{
		timeout: timeout,
	}
}
func NewGetTreasuryTaxRateParamsWithContext(ctx context.Context) *GetTreasuryTaxRateParams {
	return &GetTreasuryTaxRateParams{
		Context: ctx,
	}
}
func NewGetTreasuryTaxRateParamsWithHTTPClient(client *http.Client) *GetTreasuryTaxRateParams {
	return &GetTreasuryTaxRateParams{
		HTTPClient: client,
	}
}
type GetTreasuryTaxRateParams struct {
	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}
func (o *GetTreasuryTaxRateParams) WithTimeout(timeout time.Duration) *GetTreasuryTaxRateParams {
	o.SetTimeout(timeout)
	return o
}
func (o *GetTreasuryTaxRateParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}
func (o *GetTreasuryTaxRateParams) WithContext(ctx context.Context) *GetTreasuryTaxRateParams {
	o.SetContext(ctx)
	return o
}
func (o *GetTreasuryTaxRateParams) SetContext(ctx context.Context) {
	o.Context = ctx
}
func (o *GetTreasuryTaxRateParams) WithHTTPClient(client *http.Client) *GetTreasuryTaxRateParams {
	o.SetHTTPClient(client)
	return o
}
func (o *GetTreasuryTaxRateParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}