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

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

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

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

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

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

	for the get role assignments operation.

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

	// RoleUID.
	RoleUID string

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

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

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

// WithTimeout adds the timeout to the get role assignments params
func (o *GetRoleAssignmentsParams) WithTimeout(timeout time.Duration) *GetRoleAssignmentsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get role assignments params
func (o *GetRoleAssignmentsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get role assignments params
func (o *GetRoleAssignmentsParams) WithContext(ctx context.Context) *GetRoleAssignmentsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get role assignments params
func (o *GetRoleAssignmentsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get role assignments params
func (o *GetRoleAssignmentsParams) WithHTTPClient(client *http.Client) *GetRoleAssignmentsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get role assignments params
func (o *GetRoleAssignmentsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithRoleUID adds the roleUID to the get role assignments params
func (o *GetRoleAssignmentsParams) WithRoleUID(roleUID string) *GetRoleAssignmentsParams {
	o.SetRoleUID(roleUID)
	return o
}

// SetRoleUID adds the roleUid to the get role assignments params
func (o *GetRoleAssignmentsParams) SetRoleUID(roleUID string) {
	o.RoleUID = roleUID
}

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

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

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

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