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

package dashboard_public

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

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

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

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

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

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

	for the get public dashboard operation.

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

	// DashboardUID.
	DashboardUID string

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

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

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

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

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

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

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

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

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

// WithDashboardUID adds the dashboardUID to the get public dashboard params
func (o *GetPublicDashboardParams) WithDashboardUID(dashboardUID string) *GetPublicDashboardParams {
	o.SetDashboardUID(dashboardUID)
	return o
}

// SetDashboardUID adds the dashboardUid to the get public dashboard params
func (o *GetPublicDashboardParams) SetDashboardUID(dashboardUID string) {
	o.DashboardUID = dashboardUID
}

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

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

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

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