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

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

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

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

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

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

	for the delete dashboard snapshot operation.

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

	// Key.
	Key string

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

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

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

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

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

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

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

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

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

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

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

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