lib/api/ops/ops_client/tax/post_taxes_quotes_parameter...

143 lines
4.0 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package tax
// 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/ops/ops_models"
2021-01-08 17:40:28 +00:00
)
// NewPostTaxesQuotesParams creates a new PostTaxesQuotesParams object
// with the default values initialized.
func NewPostTaxesQuotesParams() *PostTaxesQuotesParams {
var ()
return &PostTaxesQuotesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostTaxesQuotesParamsWithTimeout creates a new PostTaxesQuotesParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewPostTaxesQuotesParamsWithTimeout(timeout time.Duration) *PostTaxesQuotesParams {
var ()
return &PostTaxesQuotesParams{
timeout: timeout,
}
}
// NewPostTaxesQuotesParamsWithContext creates a new PostTaxesQuotesParams object
// with the default values initialized, and the ability to set a context for a request
func NewPostTaxesQuotesParamsWithContext(ctx context.Context) *PostTaxesQuotesParams {
var ()
return &PostTaxesQuotesParams{
Context: ctx,
}
}
// NewPostTaxesQuotesParamsWithHTTPClient creates a new PostTaxesQuotesParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostTaxesQuotesParamsWithHTTPClient(client *http.Client) *PostTaxesQuotesParams {
var ()
return &PostTaxesQuotesParams{
HTTPClient: client,
}
}
/*PostTaxesQuotesParams contains all the parameters to send to the API endpoint
for the post taxes quotes operation typically these are written to a http.Request
*/
type PostTaxesQuotesParams struct {
/*QuoteRequest
A request with an array of Quote Objects
*/
QuoteRequest *ops_models.QuoteRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the post taxes quotes params
func (o *PostTaxesQuotesParams) WithTimeout(timeout time.Duration) *PostTaxesQuotesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post taxes quotes params
func (o *PostTaxesQuotesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post taxes quotes params
func (o *PostTaxesQuotesParams) WithContext(ctx context.Context) *PostTaxesQuotesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post taxes quotes params
func (o *PostTaxesQuotesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post taxes quotes params
func (o *PostTaxesQuotesParams) WithHTTPClient(client *http.Client) *PostTaxesQuotesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post taxes quotes params
func (o *PostTaxesQuotesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithQuoteRequest adds the quoteRequest to the post taxes quotes params
func (o *PostTaxesQuotesParams) WithQuoteRequest(quoteRequest *ops_models.QuoteRequest) *PostTaxesQuotesParams {
o.SetQuoteRequest(quoteRequest)
return o
}
// SetQuoteRequest adds the quoteRequest to the post taxes quotes params
func (o *PostTaxesQuotesParams) SetQuoteRequest(quoteRequest *ops_models.QuoteRequest) {
o.QuoteRequest = quoteRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostTaxesQuotesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.QuoteRequest != nil {
if err := r.SetBodyParam(o.QuoteRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}