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

// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package user

// 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/taxnexus/go/lib/api/auth0/auth0_models"
)

// NewDeleteAPIV2UsersUserIDRolesParams creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the default values initialized.
func NewDeleteAPIV2UsersUserIDRolesParams() *DeleteAPIV2UsersUserIDRolesParams {
	var ()
	return &DeleteAPIV2UsersUserIDRolesParams{

		timeout: cr.DefaultTimeout,
	}
}

// NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
	var ()
	return &DeleteAPIV2UsersUserIDRolesParams{

		timeout: timeout,
	}
}

// NewDeleteAPIV2UsersUserIDRolesParamsWithContext creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the default values initialized, and the ability to set a context for a request
func NewDeleteAPIV2UsersUserIDRolesParamsWithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
	var ()
	return &DeleteAPIV2UsersUserIDRolesParams{

		Context: ctx,
	}
}

// NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
	var ()
	return &DeleteAPIV2UsersUserIDRolesParams{
		HTTPClient: client,
	}
}

/*DeleteAPIV2UsersUserIDRolesParams contains all the parameters to send to the API endpoint
for the delete API v2 users user ID roles operation typically these are written to a http.Request
*/
type DeleteAPIV2UsersUserIDRolesParams struct {

	/*Authorization*/
	Authorization string
	/*UserRolesRequest
	  An array of User IDs to add to a Role

	*/
	UserRolesRequest *auth0_models.UserRolesRequest
	/*UserID
	  An Auth0 User ID

	*/
	UserID string

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

// WithTimeout adds the timeout to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithAuthorization adds the authorization to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithAuthorization(authorization string) *DeleteAPIV2UsersUserIDRolesParams {
	o.SetAuthorization(authorization)
	return o
}

// SetAuthorization adds the authorization to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) SetAuthorization(authorization string) {
	o.Authorization = authorization
}

// WithUserRolesRequest adds the userRolesRequest to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithUserRolesRequest(userRolesRequest *auth0_models.UserRolesRequest) *DeleteAPIV2UsersUserIDRolesParams {
	o.SetUserRolesRequest(userRolesRequest)
	return o
}

// SetUserRolesRequest adds the userRolesRequest to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) SetUserRolesRequest(userRolesRequest *auth0_models.UserRolesRequest) {
	o.UserRolesRequest = userRolesRequest
}

// WithUserID adds the userID to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithUserID(userID string) *DeleteAPIV2UsersUserIDRolesParams {
	o.SetUserID(userID)
	return o
}

// SetUserID adds the userId to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) SetUserID(userID string) {
	o.UserID = userID
}

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

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

	// header param Authorization
	if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
		return err
	}

	if o.UserRolesRequest != nil {
		if err := r.SetBodyParam(o.UserRolesRequest); err != nil {
			return err
		}
	}

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

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