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

// 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/sf-gate/sf_gate_models"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*CashReceiptRequest*/
	CashReceiptRequest *sf_gate_models.CashReceiptRequest

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

// WithTimeout adds the timeout to the put cash recipts params
func (o *PutCashReciptsParams) WithTimeout(timeout time.Duration) *PutCashReciptsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put cash recipts params
func (o *PutCashReciptsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the put cash recipts params
func (o *PutCashReciptsParams) WithContext(ctx context.Context) *PutCashReciptsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put cash recipts params
func (o *PutCashReciptsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the put cash recipts params
func (o *PutCashReciptsParams) WithHTTPClient(client *http.Client) *PutCashReciptsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put cash recipts params
func (o *PutCashReciptsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithCashReceiptRequest adds the cashReceiptRequest to the put cash recipts params
func (o *PutCashReciptsParams) WithCashReceiptRequest(cashReceiptRequest *sf_gate_models.CashReceiptRequest) *PutCashReciptsParams {
	o.SetCashReceiptRequest(cashReceiptRequest)
	return o
}

// SetCashReceiptRequest adds the cashReceiptRequest to the put cash recipts params
func (o *PutCashReciptsParams) SetCashReceiptRequest(cashReceiptRequest *sf_gate_models.CashReceiptRequest) {
	o.CashReceiptRequest = cashReceiptRequest
}

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

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

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

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