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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*License
	  The Licnese Number for the query

	*/
	License string
	/*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 plant waste methods params
func (o *GetPlantWasteMethodsParams) WithTimeout(timeout time.Duration) *GetPlantWasteMethodsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) WithContext(ctx context.Context) *GetPlantWasteMethodsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) WithHTTPClient(client *http.Client) *GetPlantWasteMethodsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithLicense adds the license to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) WithLicense(license string) *GetPlantWasteMethodsParams {
	o.SetLicense(license)
	return o
}

// SetLicense adds the license to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetLicense(license string) {
	o.License = license
}

// WithReseller adds the reseller to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) WithReseller(reseller string) *GetPlantWasteMethodsParams {
	o.SetReseller(reseller)
	return o
}

// SetReseller adds the reseller to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetReseller(reseller string) {
	o.Reseller = reseller
}

// WithState adds the state to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) WithState(state string) *GetPlantWasteMethodsParams {
	o.SetState(state)
	return o
}

// SetState adds the state to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetState(state string) {
	o.State = state
}

// WithUser adds the user to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) WithUser(user string) *GetPlantWasteMethodsParams {
	o.SetUser(user)
	return o
}

// SetUser adds the user to the get plant waste methods params
func (o *GetPlantWasteMethodsParams) SetUser(user string) {
	o.User = user
}

// WriteToRequest writes these params to a swagger request
func (o *GetPlantWasteMethodsParams) 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 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
}
