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

package tenant_service

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

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

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

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

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

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

	for the tenant service update user operation.

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

	// Body.
	Body TenantServiceUpdateUserBody

	/* TenantUserTenantID.

	   Tenant ID (UUID).
	*/
	TenantUserTenantID string

	/* TenantUserUserID.

	   User ID (UUID).
	*/
	TenantUserUserID string

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

// WithDefaults hydrates default values in the tenant service update user params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TenantServiceUpdateUserParams) WithDefaults() *TenantServiceUpdateUserParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the tenant service update user params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TenantServiceUpdateUserParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the tenant service update user params
func (o *TenantServiceUpdateUserParams) WithTimeout(timeout time.Duration) *TenantServiceUpdateUserParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the tenant service update user params
func (o *TenantServiceUpdateUserParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the tenant service update user params
func (o *TenantServiceUpdateUserParams) WithContext(ctx context.Context) *TenantServiceUpdateUserParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the tenant service update user params
func (o *TenantServiceUpdateUserParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the tenant service update user params
func (o *TenantServiceUpdateUserParams) WithHTTPClient(client *http.Client) *TenantServiceUpdateUserParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the tenant service update user params
func (o *TenantServiceUpdateUserParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the tenant service update user params
func (o *TenantServiceUpdateUserParams) WithBody(body TenantServiceUpdateUserBody) *TenantServiceUpdateUserParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the tenant service update user params
func (o *TenantServiceUpdateUserParams) SetBody(body TenantServiceUpdateUserBody) {
	o.Body = body
}

// WithTenantUserTenantID adds the tenantUserTenantID to the tenant service update user params
func (o *TenantServiceUpdateUserParams) WithTenantUserTenantID(tenantUserTenantID string) *TenantServiceUpdateUserParams {
	o.SetTenantUserTenantID(tenantUserTenantID)
	return o
}

// SetTenantUserTenantID adds the tenantUserTenantId to the tenant service update user params
func (o *TenantServiceUpdateUserParams) SetTenantUserTenantID(tenantUserTenantID string) {
	o.TenantUserTenantID = tenantUserTenantID
}

// WithTenantUserUserID adds the tenantUserUserID to the tenant service update user params
func (o *TenantServiceUpdateUserParams) WithTenantUserUserID(tenantUserUserID string) *TenantServiceUpdateUserParams {
	o.SetTenantUserUserID(tenantUserUserID)
	return o
}

// SetTenantUserUserID adds the tenantUserUserId to the tenant service update user params
func (o *TenantServiceUpdateUserParams) SetTenantUserUserID(tenantUserUserID string) {
	o.TenantUserUserID = tenantUserUserID
}

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

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

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

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

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