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

// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package research_projects

import (
	"context"
	"net/http"
	"time"

	"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/strfmt"
)

// 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 NewPutResearchProjectDocumentsParamsWithTimeout(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{
		inner: innerParams{
			timeout: timeout,
		},
	}
}

// NewPutResearchProjectDocumentsParamsWithContext creates a new PutResearchProjectDocumentsParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PutResearchProjectDocumentsParams].
func NewPutResearchProjectDocumentsParamsWithContext(ctx context.Context) *PutResearchProjectDocumentsParams {
	return &PutResearchProjectDocumentsParams{
		inner: innerParams{
			ctx: 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 {

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

	HTTPClient *http.Client

	inner innerParams
}

// 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.inner.timeout = timeout
}

// WithContext adds the context to the put research project documents params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutResearchProjectDocumentsParams].
func (o *PutResearchProjectDocumentsParams) WithContext(ctx context.Context) *PutResearchProjectDocumentsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put research project documents params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutResearchProjectDocumentsParams].
func (o *PutResearchProjectDocumentsParams) SetContext(ctx context.Context) {
	o.inner.ctx = 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
}

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

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

// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *PutResearchProjectDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.inner.timeout); err != nil {
		return err
	}
	var res []error
	if o.ResearchProjectDocumentRequest != nil {
		if err := r.SetBodyParam(o.ResearchProjectDocumentRequest); err != nil {
			return err
		}
	}

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