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

	run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model"
)

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*Body*/
	Body *run_model.APIReportRunMetricsRequest
	/*RunID
	  Required. The parent run ID of the metric.

	*/
	RunID string

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

// WithTimeout adds the timeout to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) WithTimeout(timeout time.Duration) *ReportRunMetricsV1Params {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) WithContext(ctx context.Context) *ReportRunMetricsV1Params {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) WithHTTPClient(client *http.Client) *ReportRunMetricsV1Params {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) WithBody(body *run_model.APIReportRunMetricsRequest) *ReportRunMetricsV1Params {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) SetBody(body *run_model.APIReportRunMetricsRequest) {
	o.Body = body
}

// WithRunID adds the runID to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) WithRunID(runID string) *ReportRunMetricsV1Params {
	o.SetRunID(runID)
	return o
}

// SetRunID adds the runId to the report run metrics v1 params
func (o *ReportRunMetricsV1Params) SetRunID(runID string) {
	o.RunID = runID
}

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

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

	if o.Body != nil {
		if err := r.SetBodyParam(o.Body); 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
}
