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

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

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

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

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

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

	for the post users auth operation.

	Typically these are written to a http.Request.
*/
type PostUsersAuthParams 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 params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostUsersAuthParams) WithDefaults() *PostUsersAuthParams {
	o.SetDefaults()
	return o
}

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

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

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

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

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

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

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

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

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

// WriteToRequest writes these params to a swagger request
func (o *PostUsersAuthParams) 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
}
