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

package workspaces

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

// NewV1WorkspacesGetParams creates a new V1WorkspacesGetParams 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 NewV1WorkspacesGetParams() *V1WorkspacesGetParams {
	return &V1WorkspacesGetParams{
		timeout: cr.DefaultTimeout,
	}
}

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

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

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

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

	for the v1 workspaces get operation.

	Typically these are written to a http.Request.
*/
type V1WorkspacesGetParams struct {

	/* WorkspaceID.

	   Workspace ID
	*/
	WorkspaceID string

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

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

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

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

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

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

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

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

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

// WithWorkspaceID adds the workspaceID to the v1 workspaces get params
func (o *V1WorkspacesGetParams) WithWorkspaceID(workspaceID string) *V1WorkspacesGetParams {
	o.SetWorkspaceID(workspaceID)
	return o
}

// SetWorkspaceID adds the workspaceId to the v1 workspaces get params
func (o *V1WorkspacesGetParams) SetWorkspaceID(workspaceID string) {
	o.WorkspaceID = workspaceID
}

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

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

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

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