// 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_type_account

// 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"

	"github.com/taxnexus/go/lib/api/regs/regs_models"
)

// NewPutTaxTypeAccountsParams creates a new PutTaxTypeAccountsParams object
// with the default values initialized.
func NewPutTaxTypeAccountsParams() *PutTaxTypeAccountsParams {
	var ()
	return &PutTaxTypeAccountsParams{

		timeout: cr.DefaultTimeout,
	}
}

// NewPutTaxTypeAccountsParamsWithTimeout creates a new PutTaxTypeAccountsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewPutTaxTypeAccountsParamsWithTimeout(timeout time.Duration) *PutTaxTypeAccountsParams {
	var ()
	return &PutTaxTypeAccountsParams{

		timeout: timeout,
	}
}

// NewPutTaxTypeAccountsParamsWithContext creates a new PutTaxTypeAccountsParams object
// with the default values initialized, and the ability to set a context for a request
func NewPutTaxTypeAccountsParamsWithContext(ctx context.Context) *PutTaxTypeAccountsParams {
	var ()
	return &PutTaxTypeAccountsParams{

		Context: ctx,
	}
}

// NewPutTaxTypeAccountsParamsWithHTTPClient creates a new PutTaxTypeAccountsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPutTaxTypeAccountsParamsWithHTTPClient(client *http.Client) *PutTaxTypeAccountsParams {
	var ()
	return &PutTaxTypeAccountsParams{
		HTTPClient: client,
	}
}

/*PutTaxTypeAccountsParams contains all the parameters to send to the API endpoint
for the put tax type accounts operation typically these are written to a http.Request
*/
type PutTaxTypeAccountsParams struct {

	/*TaxTypeAccountRequest
	  A request with an array of Tax Type Account Objects

	*/
	TaxTypeAccountRequest *regs_models.TaxTypeAccountRequest

	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}

// WithTimeout adds the timeout to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) WithTimeout(timeout time.Duration) *PutTaxTypeAccountsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) WithContext(ctx context.Context) *PutTaxTypeAccountsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) WithHTTPClient(client *http.Client) *PutTaxTypeAccountsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithTaxTypeAccountRequest adds the taxTypeAccountRequest to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) WithTaxTypeAccountRequest(taxTypeAccountRequest *regs_models.TaxTypeAccountRequest) *PutTaxTypeAccountsParams {
	o.SetTaxTypeAccountRequest(taxTypeAccountRequest)
	return o
}

// SetTaxTypeAccountRequest adds the taxTypeAccountRequest to the put tax type accounts params
func (o *PutTaxTypeAccountsParams) SetTaxTypeAccountRequest(taxTypeAccountRequest *regs_models.TaxTypeAccountRequest) {
	o.TaxTypeAccountRequest = taxTypeAccountRequest
}

// WriteToRequest writes these params to a swagger request
func (o *PutTaxTypeAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error

	if o.TaxTypeAccountRequest != nil {
		if err := r.SetBodyParam(o.TaxTypeAccountRequest); err != nil {
			return err
		}
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
