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

package query_history

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

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

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

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

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

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

	for the delete query operation.

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

	// QueryHistoryUID.
	QueryHistoryUID string

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

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

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

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

// SetTimeout adds the timeout to the delete query params
func (o *DeleteQueryParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

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

// SetContext adds the context to the delete query params
func (o *DeleteQueryParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

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

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

// WithQueryHistoryUID adds the queryHistoryUID to the delete query params
func (o *DeleteQueryParams) WithQueryHistoryUID(queryHistoryUID string) *DeleteQueryParams {
	o.SetQueryHistoryUID(queryHistoryUID)
	return o
}

// SetQueryHistoryUID adds the queryHistoryUid to the delete query params
func (o *DeleteQueryParams) SetQueryHistoryUID(queryHistoryUID string) {
	o.QueryHistoryUID = queryHistoryUID
}

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

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

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

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