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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*PostFilingTypesParams contains all the parameters to send to the API endpoint
for the post filing types operation typically these are written to a http.Request
*/
type PostFilingTypesParams 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 post filing types params
func (o *PostFilingTypesParams) WithTimeout(timeout time.Duration) *PostFilingTypesParams {
	o.SetTimeout(timeout)
	return o
}

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

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

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

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

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

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

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

// WriteToRequest writes these params to a swagger request
func (o *PostFilingTypesParams) 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
}
