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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*DeleteSalesReceiptsParams contains all the parameters to send to the API endpoint
for the delete sales receipts operation typically these are written to a http.Request
*/
type DeleteSalesReceiptsParams struct {

	/*License
	  The Licnese Number for the query

	*/
	License string
	/*Reseller
	  The METRC Reseller Key

	*/
	Reseller string
	/*SalesReceiptID
	  The Sales Receipt Number

	*/
	SalesReceiptID string
	/*State
	  The 2-character State Code

	*/
	State string
	/*User
	  The METRC User Key

	*/
	User string

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

// WithTimeout adds the timeout to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithTimeout(timeout time.Duration) *DeleteSalesReceiptsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithContext(ctx context.Context) *DeleteSalesReceiptsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithHTTPClient(client *http.Client) *DeleteSalesReceiptsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithLicense adds the license to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithLicense(license string) *DeleteSalesReceiptsParams {
	o.SetLicense(license)
	return o
}

// SetLicense adds the license to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetLicense(license string) {
	o.License = license
}

// WithReseller adds the reseller to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithReseller(reseller string) *DeleteSalesReceiptsParams {
	o.SetReseller(reseller)
	return o
}

// SetReseller adds the reseller to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetReseller(reseller string) {
	o.Reseller = reseller
}

// WithSalesReceiptID adds the salesReceiptID to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithSalesReceiptID(salesReceiptID string) *DeleteSalesReceiptsParams {
	o.SetSalesReceiptID(salesReceiptID)
	return o
}

// SetSalesReceiptID adds the salesReceiptId to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetSalesReceiptID(salesReceiptID string) {
	o.SalesReceiptID = salesReceiptID
}

// WithState adds the state to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithState(state string) *DeleteSalesReceiptsParams {
	o.SetState(state)
	return o
}

// SetState adds the state to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetState(state string) {
	o.State = state
}

// WithUser adds the user to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) WithUser(user string) *DeleteSalesReceiptsParams {
	o.SetUser(user)
	return o
}

// SetUser adds the user to the delete sales receipts params
func (o *DeleteSalesReceiptsParams) SetUser(user string) {
	o.User = user
}

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

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

	// query param license
	qrLicense := o.License
	qLicense := qrLicense
	if qLicense != "" {
		if err := r.SetQueryParam("license", qLicense); err != nil {
			return err
		}
	}

	// query param reseller
	qrReseller := o.Reseller
	qReseller := qrReseller
	if qReseller != "" {
		if err := r.SetQueryParam("reseller", qReseller); err != nil {
			return err
		}
	}

	// query param salesReceiptId
	qrSalesReceiptID := o.SalesReceiptID
	qSalesReceiptID := qrSalesReceiptID
	if qSalesReceiptID != "" {
		if err := r.SetQueryParam("salesReceiptId", qSalesReceiptID); err != nil {
			return err
		}
	}

	// query param state
	qrState := o.State
	qState := qrState
	if qState != "" {
		if err := r.SetQueryParam("state", qState); err != nil {
			return err
		}
	}

	// query param user
	qrUser := o.User
	qUser := qrUser
	if qUser != "" {
		if err := r.SetQueryParam("user", qUser); err != nil {
			return err
		}
	}

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