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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*VersionID
	  The ID of the pipeline version to be retrieved.

	*/
	VersionID string

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

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

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

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

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

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

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

// WithVersionID adds the versionID to the get pipeline version v1 params
func (o *GetPipelineVersionV1Params) WithVersionID(versionID string) *GetPipelineVersionV1Params {
	o.SetVersionID(versionID)
	return o
}

// SetVersionID adds the versionId to the get pipeline version v1 params
func (o *GetPipelineVersionV1Params) SetVersionID(versionID string) {
	o.VersionID = versionID
}

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

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

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

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