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

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

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

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

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

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

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

	for the post research project documents operation.

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

	/* XAuth0UserID.

	   Auth0 User Id
	*/
	XAuth0UserID *string

	/* ResearchProjectDocumentRequest.

	   An array of new ResearchProjectDocument records
	*/
	ResearchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest

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

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

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

// WithTimeout adds the timeout to the post research project documents params
func (o *PostResearchProjectDocumentsParams) WithTimeout(timeout time.Duration) *PostResearchProjectDocumentsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the post research project documents params
func (o *PostResearchProjectDocumentsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the post research project documents params
func (o *PostResearchProjectDocumentsParams) WithContext(ctx context.Context) *PostResearchProjectDocumentsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the post research project documents params
func (o *PostResearchProjectDocumentsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the post research project documents params
func (o *PostResearchProjectDocumentsParams) WithHTTPClient(client *http.Client) *PostResearchProjectDocumentsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the post research project documents params
func (o *PostResearchProjectDocumentsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithXAuth0UserID adds the xAuth0UserID to the post research project documents params
func (o *PostResearchProjectDocumentsParams) WithXAuth0UserID(xAuth0UserID *string) *PostResearchProjectDocumentsParams {
	o.SetXAuth0UserID(xAuth0UserID)
	return o
}

// SetXAuth0UserID adds the xAuth0UserId to the post research project documents params
func (o *PostResearchProjectDocumentsParams) SetXAuth0UserID(xAuth0UserID *string) {
	o.XAuth0UserID = xAuth0UserID
}

// WithResearchProjectDocumentRequest adds the researchProjectDocumentRequest to the post research project documents params
func (o *PostResearchProjectDocumentsParams) WithResearchProjectDocumentRequest(researchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest) *PostResearchProjectDocumentsParams {
	o.SetResearchProjectDocumentRequest(researchProjectDocumentRequest)
	return o
}

// SetResearchProjectDocumentRequest adds the researchProjectDocumentRequest to the post research project documents params
func (o *PostResearchProjectDocumentsParams) SetResearchProjectDocumentRequest(researchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest) {
	o.ResearchProjectDocumentRequest = researchProjectDocumentRequest
}

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

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

	if o.XAuth0UserID != nil {

		// header param X-Auth0-UserId
		if err := r.SetHeaderParam("X-Auth0-UserId", *o.XAuth0UserID); err != nil {
			return err
		}
	}
	if o.ResearchProjectDocumentRequest != nil {
		if err := r.SetBodyParam(o.ResearchProjectDocumentRequest); err != nil {
			return err
		}
	}

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