// 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"
	"github.com/go-openapi/strfmt"
)

// NewPipelineServiceGetPipelineByNameV1Params creates a new PipelineServiceGetPipelineByNameV1Params object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewPipelineServiceGetPipelineByNameV1Params() *PipelineServiceGetPipelineByNameV1Params {
	return &PipelineServiceGetPipelineByNameV1Params{
		timeout: cr.DefaultTimeout,
	}
}

// NewPipelineServiceGetPipelineByNameV1ParamsWithTimeout creates a new PipelineServiceGetPipelineByNameV1Params object
// with the ability to set a timeout on a request.
func NewPipelineServiceGetPipelineByNameV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineByNameV1Params {
	return &PipelineServiceGetPipelineByNameV1Params{
		timeout: timeout,
	}
}

// NewPipelineServiceGetPipelineByNameV1ParamsWithContext creates a new PipelineServiceGetPipelineByNameV1Params object
// with the ability to set a context for a request.
func NewPipelineServiceGetPipelineByNameV1ParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineByNameV1Params {
	return &PipelineServiceGetPipelineByNameV1Params{
		Context: ctx,
	}
}

// NewPipelineServiceGetPipelineByNameV1ParamsWithHTTPClient creates a new PipelineServiceGetPipelineByNameV1Params object
// with the ability to set a custom HTTPClient for a request.
func NewPipelineServiceGetPipelineByNameV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineByNameV1Params {
	return &PipelineServiceGetPipelineByNameV1Params{
		HTTPClient: client,
	}
}

/*
PipelineServiceGetPipelineByNameV1Params contains all the parameters to send to the API endpoint

	for the pipeline service get pipeline by name v1 operation.

	Typically these are written to a http.Request.
*/
type PipelineServiceGetPipelineByNameV1Params 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
}

// WithDefaults hydrates default values in the pipeline service get pipeline by name v1 params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PipelineServiceGetPipelineByNameV1Params) WithDefaults() *PipelineServiceGetPipelineByNameV1Params {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the pipeline service get pipeline by name v1 params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PipelineServiceGetPipelineByNameV1Params) SetDefaults() {
	// no default values defined for this parameter
}

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

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

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

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

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

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

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

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

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

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

// WriteToRequest writes these params to a swagger request
func (o *PipelineServiceGetPipelineByNameV1Params) 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
}
