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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

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

	/*PipelineID
	  The ID of the pipeline to be updated.

	*/
	PipelineID string
	/*VersionID
	  The ID of the default version.

	*/
	VersionID string

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

// WithTimeout adds the timeout to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) WithTimeout(timeout time.Duration) *UpdatePipelineDefaultVersionParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) WithContext(ctx context.Context) *UpdatePipelineDefaultVersionParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) WithHTTPClient(client *http.Client) *UpdatePipelineDefaultVersionParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithPipelineID adds the pipelineID to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) WithPipelineID(pipelineID string) *UpdatePipelineDefaultVersionParams {
	o.SetPipelineID(pipelineID)
	return o
}

// SetPipelineID adds the pipelineId to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) SetPipelineID(pipelineID string) {
	o.PipelineID = pipelineID
}

// WithVersionID adds the versionID to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) WithVersionID(versionID string) *UpdatePipelineDefaultVersionParams {
	o.SetVersionID(versionID)
	return o
}

// SetVersionID adds the versionId to the update pipeline default version params
func (o *UpdatePipelineDefaultVersionParams) SetVersionID(versionID string) {
	o.VersionID = versionID
}

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

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

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

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