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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*FilingTypeRequest
	  A request with an array of FilingType Objects

	*/
	FilingTypeRequest *regs_models.FilingTypeRequest

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

// WithTimeout adds the timeout to the put filing types params
func (o *PutFilingTypesParams) WithTimeout(timeout time.Duration) *PutFilingTypesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put filing types params
func (o *PutFilingTypesParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the put filing types params
func (o *PutFilingTypesParams) WithContext(ctx context.Context) *PutFilingTypesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put filing types params
func (o *PutFilingTypesParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the put filing types params
func (o *PutFilingTypesParams) WithHTTPClient(client *http.Client) *PutFilingTypesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put filing types params
func (o *PutFilingTypesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithFilingTypeRequest adds the filingTypeRequest to the put filing types params
func (o *PutFilingTypesParams) WithFilingTypeRequest(filingTypeRequest *regs_models.FilingTypeRequest) *PutFilingTypesParams {
	o.SetFilingTypeRequest(filingTypeRequest)
	return o
}

// SetFilingTypeRequest adds the filingTypeRequest to the put filing types params
func (o *PutFilingTypesParams) SetFilingTypeRequest(filingTypeRequest *regs_models.FilingTypeRequest) {
	o.FilingTypeRequest = filingTypeRequest
}

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

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

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

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