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

package dashboard_versions

// 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"
	"github.com/go-openapi/swag"
)

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

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

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

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

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

	for the get dashboard versions by ID operation.

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

	// DashboardID.
	//
	// Format: int64
	DashboardID int64

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

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

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

// WithTimeout adds the timeout to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) WithTimeout(timeout time.Duration) *GetDashboardVersionsByIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) WithContext(ctx context.Context) *GetDashboardVersionsByIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) WithHTTPClient(client *http.Client) *GetDashboardVersionsByIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithDashboardID adds the dashboardID to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) WithDashboardID(dashboardID int64) *GetDashboardVersionsByIDParams {
	o.SetDashboardID(dashboardID)
	return o
}

// SetDashboardID adds the dashboardId to the get dashboard versions by ID params
func (o *GetDashboardVersionsByIDParams) SetDashboardID(dashboardID int64) {
	o.DashboardID = dashboardID
}

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

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

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

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