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

package snapshots

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

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

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

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

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

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

	for the get dashboard snapshot operation.

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

	// Key.
	Key string

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

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

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

// WithTimeout adds the timeout to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) WithTimeout(timeout time.Duration) *GetDashboardSnapshotParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) WithContext(ctx context.Context) *GetDashboardSnapshotParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) WithHTTPClient(client *http.Client) *GetDashboardSnapshotParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithKey adds the key to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) WithKey(key string) *GetDashboardSnapshotParams {
	o.SetKey(key)
	return o
}

// SetKey adds the key to the get dashboard snapshot params
func (o *GetDashboardSnapshotParams) SetKey(key string) {
	o.Key = key
}

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

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

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

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