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

// 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/go-openapi/swag"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*FilingTypeID
	  Taxnexus Record Id of a Filing

	*/
	FilingTypeID *string
	/*Limit
	  How many objects to return at one time

	*/
	Limit *int64
	/*Offset
	  How many objects to skip? (default 0)

	*/
	Offset *int64

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

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

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

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

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

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

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

// WithFilingTypeID adds the filingTypeID to the get filing types params
func (o *GetFilingTypesParams) WithFilingTypeID(filingTypeID *string) *GetFilingTypesParams {
	o.SetFilingTypeID(filingTypeID)
	return o
}

// SetFilingTypeID adds the filingTypeId to the get filing types params
func (o *GetFilingTypesParams) SetFilingTypeID(filingTypeID *string) {
	o.FilingTypeID = filingTypeID
}

// WithLimit adds the limit to the get filing types params
func (o *GetFilingTypesParams) WithLimit(limit *int64) *GetFilingTypesParams {
	o.SetLimit(limit)
	return o
}

// SetLimit adds the limit to the get filing types params
func (o *GetFilingTypesParams) SetLimit(limit *int64) {
	o.Limit = limit
}

// WithOffset adds the offset to the get filing types params
func (o *GetFilingTypesParams) WithOffset(offset *int64) *GetFilingTypesParams {
	o.SetOffset(offset)
	return o
}

// SetOffset adds the offset to the get filing types params
func (o *GetFilingTypesParams) SetOffset(offset *int64) {
	o.Offset = offset
}

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

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

	if o.FilingTypeID != nil {

		// query param filingTypeId
		var qrFilingTypeID string
		if o.FilingTypeID != nil {
			qrFilingTypeID = *o.FilingTypeID
		}
		qFilingTypeID := qrFilingTypeID
		if qFilingTypeID != "" {
			if err := r.SetQueryParam("filingTypeId", qFilingTypeID); err != nil {
				return err
			}
		}

	}

	if o.Limit != nil {

		// query param limit
		var qrLimit int64
		if o.Limit != nil {
			qrLimit = *o.Limit
		}
		qLimit := swag.FormatInt64(qrLimit)
		if qLimit != "" {
			if err := r.SetQueryParam("limit", qLimit); err != nil {
				return err
			}
		}

	}

	if o.Offset != nil {

		// query param offset
		var qrOffset int64
		if o.Offset != nil {
			qrOffset = *o.Offset
		}
		qOffset := swag.FormatInt64(qrOffset)
		if qOffset != "" {
			if err := r.SetQueryParam("offset", qOffset); err != nil {
				return err
			}
		}

	}

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