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

package run_service

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

	strfmt "github.com/go-openapi/strfmt"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*ExperimentID
	  The ID of the parent experiment.

	*/
	ExperimentID string
	/*RunID
	  The ID of the run to be retrieved.

	*/
	RunID string

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

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

// SetTimeout adds the timeout to the get run params
func (o *GetRunParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

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

// SetContext adds the context to the get run params
func (o *GetRunParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

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

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

// WithExperimentID adds the experimentID to the get run params
func (o *GetRunParams) WithExperimentID(experimentID string) *GetRunParams {
	o.SetExperimentID(experimentID)
	return o
}

// SetExperimentID adds the experimentId to the get run params
func (o *GetRunParams) SetExperimentID(experimentID string) {
	o.ExperimentID = experimentID
}

// WithRunID adds the runID to the get run params
func (o *GetRunParams) WithRunID(runID string) *GetRunParams {
	o.SetRunID(runID)
	return o
}

// SetRunID adds the runId to the get run params
func (o *GetRunParams) SetRunID(runID string) {
	o.RunID = runID
}

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

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

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

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

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