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

package reseller_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/customerdb/models"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*UpdateResellerParams contains all the parameters to send to the API endpoint
for the update reseller operation typically these are written to a http.Request
*/
type UpdateResellerParams struct {

	/*ID
	  Id of the reseller to be updated

	*/
	ID string
	/*Reseller
	  Reseller to be updated

	*/
	Reseller *models.Reseller

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

// WithTimeout adds the timeout to the update reseller params
func (o *UpdateResellerParams) WithTimeout(timeout time.Duration) *UpdateResellerParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the update reseller params
func (o *UpdateResellerParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the update reseller params
func (o *UpdateResellerParams) WithContext(ctx context.Context) *UpdateResellerParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the update reseller params
func (o *UpdateResellerParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the update reseller params
func (o *UpdateResellerParams) WithHTTPClient(client *http.Client) *UpdateResellerParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the update reseller params
func (o *UpdateResellerParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the update reseller params
func (o *UpdateResellerParams) WithID(id string) *UpdateResellerParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the update reseller params
func (o *UpdateResellerParams) SetID(id string) {
	o.ID = id
}

// WithReseller adds the reseller to the update reseller params
func (o *UpdateResellerParams) WithReseller(reseller *models.Reseller) *UpdateResellerParams {
	o.SetReseller(reseller)
	return o
}

// SetReseller adds the reseller to the update reseller params
func (o *UpdateResellerParams) SetReseller(reseller *models.Reseller) {
	o.Reseller = reseller
}

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

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

	// path param id
	if err := r.SetPathParam("id", o.ID); err != nil {
		return err
	}

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

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