// Code generated by go-swagger; DO NOT EDIT.

package invoice_management

// 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/Cyclops-Labs/cyclops-4-hpc.git/services/billing/models"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*ListInvoicesParams contains all the parameters to send to the API endpoint
for the list invoices operation typically these are written to a http.Request
*/
type ListInvoicesParams struct {

	/*Model
	  Invoice model partially filled to use for the filtering of the invoices

	*/
	Model *models.Invoice

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

// WithTimeout adds the timeout to the list invoices params
func (o *ListInvoicesParams) WithTimeout(timeout time.Duration) *ListInvoicesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the list invoices params
func (o *ListInvoicesParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the list invoices params
func (o *ListInvoicesParams) WithContext(ctx context.Context) *ListInvoicesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the list invoices params
func (o *ListInvoicesParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the list invoices params
func (o *ListInvoicesParams) WithHTTPClient(client *http.Client) *ListInvoicesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the list invoices params
func (o *ListInvoicesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithModel adds the model to the list invoices params
func (o *ListInvoicesParams) WithModel(model *models.Invoice) *ListInvoicesParams {
	o.SetModel(model)
	return o
}

// SetModel adds the model to the list invoices params
func (o *ListInvoicesParams) SetModel(model *models.Invoice) {
	o.Model = model
}

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

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

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

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