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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*ReadArtifactV1Params contains all the parameters to send to the API endpoint
for the read artifact v1 operation typically these are written to a http.Request
*/
type ReadArtifactV1Params struct {

	/*ArtifactName
	  The name of the artifact.

	*/
	ArtifactName string
	/*NodeID
	  The ID of the running node.

	*/
	NodeID string
	/*RunID
	  The ID of the run.

	*/
	RunID string

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

// WithTimeout adds the timeout to the read artifact v1 params
func (o *ReadArtifactV1Params) WithTimeout(timeout time.Duration) *ReadArtifactV1Params {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the read artifact v1 params
func (o *ReadArtifactV1Params) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the read artifact v1 params
func (o *ReadArtifactV1Params) WithContext(ctx context.Context) *ReadArtifactV1Params {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the read artifact v1 params
func (o *ReadArtifactV1Params) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the read artifact v1 params
func (o *ReadArtifactV1Params) WithHTTPClient(client *http.Client) *ReadArtifactV1Params {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the read artifact v1 params
func (o *ReadArtifactV1Params) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithArtifactName adds the artifactName to the read artifact v1 params
func (o *ReadArtifactV1Params) WithArtifactName(artifactName string) *ReadArtifactV1Params {
	o.SetArtifactName(artifactName)
	return o
}

// SetArtifactName adds the artifactName to the read artifact v1 params
func (o *ReadArtifactV1Params) SetArtifactName(artifactName string) {
	o.ArtifactName = artifactName
}

// WithNodeID adds the nodeID to the read artifact v1 params
func (o *ReadArtifactV1Params) WithNodeID(nodeID string) *ReadArtifactV1Params {
	o.SetNodeID(nodeID)
	return o
}

// SetNodeID adds the nodeId to the read artifact v1 params
func (o *ReadArtifactV1Params) SetNodeID(nodeID string) {
	o.NodeID = nodeID
}

// WithRunID adds the runID to the read artifact v1 params
func (o *ReadArtifactV1Params) WithRunID(runID string) *ReadArtifactV1Params {
	o.SetRunID(runID)
	return o
}

// SetRunID adds the runId to the read artifact v1 params
func (o *ReadArtifactV1Params) SetRunID(runID string) {
	o.RunID = runID
}

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

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

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

	// path param node_id
	if err := r.SetPathParam("node_id", o.NodeID); 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
}
