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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*Reseller
	  The METRC Reseller Key

	*/
	Reseller 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 get harvest waste types params
func (o *GetHarvestWasteTypesParams) WithTimeout(timeout time.Duration) *GetHarvestWasteTypesParams {
	o.SetTimeout(timeout)
	return o
}

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

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

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

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

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

// WithReseller adds the reseller to the get harvest waste types params
func (o *GetHarvestWasteTypesParams) WithReseller(reseller string) *GetHarvestWasteTypesParams {
	o.SetReseller(reseller)
	return o
}

// SetReseller adds the reseller to the get harvest waste types params
func (o *GetHarvestWasteTypesParams) SetReseller(reseller string) {
	o.Reseller = reseller
}

// WithState adds the state to the get harvest waste types params
func (o *GetHarvestWasteTypesParams) WithState(state string) *GetHarvestWasteTypesParams {
	o.SetState(state)
	return o
}

// SetState adds the state to the get harvest waste types params
func (o *GetHarvestWasteTypesParams) SetState(state string) {
	o.State = state
}

// WithUser adds the user to the get harvest waste types params
func (o *GetHarvestWasteTypesParams) WithUser(user string) *GetHarvestWasteTypesParams {
	o.SetUser(user)
	return o
}

// SetUser adds the user to the get harvest waste types params
func (o *GetHarvestWasteTypesParams) SetUser(user string) {
	o.User = user
}

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

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

	// query param reseller
	qrReseller := o.Reseller
	qReseller := qrReseller
	if qReseller != "" {
		if err := r.SetQueryParam("reseller", qReseller); 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
}
