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

// (c) 2012-2023 by Vernon Keenan
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package users

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

	"code.tnxs.net/work/lib/api/members/members_models"
)

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

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

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

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

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

	for the post users auth password operation.

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

	/* UserAuthRequest.

	   A simple user authentication request
	*/
	UserAuthRequest *members_models.UserAuth

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

// WithDefaults hydrates default values in the post users auth password params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostUsersAuthPasswordParams) WithDefaults() *PostUsersAuthPasswordParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the post users auth password params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostUsersAuthPasswordParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the post users auth password params
func (o *PostUsersAuthPasswordParams) WithTimeout(timeout time.Duration) *PostUsersAuthPasswordParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the post users auth password params
func (o *PostUsersAuthPasswordParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the post users auth password params
func (o *PostUsersAuthPasswordParams) WithContext(ctx context.Context) *PostUsersAuthPasswordParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the post users auth password params
func (o *PostUsersAuthPasswordParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the post users auth password params
func (o *PostUsersAuthPasswordParams) WithHTTPClient(client *http.Client) *PostUsersAuthPasswordParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the post users auth password params
func (o *PostUsersAuthPasswordParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithUserAuthRequest adds the userAuthRequest to the post users auth password params
func (o *PostUsersAuthPasswordParams) WithUserAuthRequest(userAuthRequest *members_models.UserAuth) *PostUsersAuthPasswordParams {
	o.SetUserAuthRequest(userAuthRequest)
	return o
}

// SetUserAuthRequest adds the userAuthRequest to the post users auth password params
func (o *PostUsersAuthPasswordParams) SetUserAuthRequest(userAuthRequest *members_models.UserAuth) {
	o.UserAuthRequest = userAuthRequest
}

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

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

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