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

package access_control

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

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

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

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

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

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

	for the get resource description operation.

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

	// Resource.
	Resource string

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

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

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

// WithTimeout adds the timeout to the get resource description params
func (o *GetResourceDescriptionParams) WithTimeout(timeout time.Duration) *GetResourceDescriptionParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get resource description params
func (o *GetResourceDescriptionParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get resource description params
func (o *GetResourceDescriptionParams) WithContext(ctx context.Context) *GetResourceDescriptionParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get resource description params
func (o *GetResourceDescriptionParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get resource description params
func (o *GetResourceDescriptionParams) WithHTTPClient(client *http.Client) *GetResourceDescriptionParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get resource description params
func (o *GetResourceDescriptionParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithResource adds the resource to the get resource description params
func (o *GetResourceDescriptionParams) WithResource(resource string) *GetResourceDescriptionParams {
	o.SetResource(resource)
	return o
}

// SetResource adds the resource to the get resource description params
func (o *GetResourceDescriptionParams) SetResource(resource string) {
	o.Resource = resource
}

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

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

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

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