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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*GetPipelineByNameV1Params contains all the parameters to send to the API endpoint
for the get pipeline by name v1 operation typically these are written to a http.Request
*/
type GetPipelineByNameV1Params struct {

	/*Name
	  The Name of the pipeline to be retrieved.

	*/
	Name string
	/*Namespace
	  The Namespace the pipeline belongs to.
	In the case of shared pipelines and KFPipeline standalone installation,
	the pipeline name is the only needed field for unique resource lookup (namespace is not required).
	In those case, please provide hyphen (dash character, "-").

	*/
	Namespace string

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

// WithTimeout adds the timeout to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) WithTimeout(timeout time.Duration) *GetPipelineByNameV1Params {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) WithContext(ctx context.Context) *GetPipelineByNameV1Params {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) WithHTTPClient(client *http.Client) *GetPipelineByNameV1Params {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithName adds the name to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) WithName(name string) *GetPipelineByNameV1Params {
	o.SetName(name)
	return o
}

// SetName adds the name to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) SetName(name string) {
	o.Name = name
}

// WithNamespace adds the namespace to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) WithNamespace(namespace string) *GetPipelineByNameV1Params {
	o.SetNamespace(namespace)
	return o
}

// SetNamespace adds the namespace to the get pipeline by name v1 params
func (o *GetPipelineByNameV1Params) SetNamespace(namespace string) {
	o.Namespace = namespace
}

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

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

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

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

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