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

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

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

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

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

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

	for the put research project documents operation.

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

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

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

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

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

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

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

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

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

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

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

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

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