// 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 track_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/sfgate/sfgate_models"
)

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

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

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

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

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

	for the post track users operation.

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

	/* TrackuserRequest.

	   An array of new TrackUser records
	*/
	TrackuserRequest *sfgate_models.TrackUserRequest

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

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

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

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

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

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

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

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

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

// WithTrackuserRequest adds the trackuserRequest to the post track users params
func (o *PostTrackUsersParams) WithTrackuserRequest(trackuserRequest *sfgate_models.TrackUserRequest) *PostTrackUsersParams {
	o.SetTrackuserRequest(trackuserRequest)
	return o
}

// SetTrackuserRequest adds the trackuserRequest to the post track users params
func (o *PostTrackUsersParams) SetTrackuserRequest(trackuserRequest *sfgate_models.TrackUserRequest) {
	o.TrackuserRequest = trackuserRequest
}

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

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

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