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

package bulk_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"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*ReRunBillRunParams contains all the parameters to send to the API endpoint
for the re run bill run operation typically these are written to a http.Request
*/
type ReRunBillRunParams struct {

	/*ID
	  Id of the billrun to be re-run.

	*/
	ID strfmt.UUID

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

// WithTimeout adds the timeout to the re run bill run params
func (o *ReRunBillRunParams) WithTimeout(timeout time.Duration) *ReRunBillRunParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the re run bill run params
func (o *ReRunBillRunParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the re run bill run params
func (o *ReRunBillRunParams) WithContext(ctx context.Context) *ReRunBillRunParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the re run bill run params
func (o *ReRunBillRunParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the re run bill run params
func (o *ReRunBillRunParams) WithHTTPClient(client *http.Client) *ReRunBillRunParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the re run bill run params
func (o *ReRunBillRunParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the re run bill run params
func (o *ReRunBillRunParams) WithID(id strfmt.UUID) *ReRunBillRunParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the re run bill run params
func (o *ReRunBillRunParams) SetID(id strfmt.UUID) {
	o.ID = id
}

// WriteToRequest writes these params to a swagger request
func (o *ReRunBillRunParams) 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.String()); err != nil {
		return err
	}

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