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

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

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

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

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

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

	for the post research project services operation.

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

	/* ResearchProjectServiceRequest.

	   An array of new ResearchProjectService records
	*/
	ResearchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest

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

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

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

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

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

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

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

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

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

// WithResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
func (o *PostResearchProjectServicesParams) WithResearchProjectServiceRequest(researchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest) *PostResearchProjectServicesParams {
	o.SetResearchProjectServiceRequest(researchProjectServiceRequest)
	return o
}

// SetResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
func (o *PostResearchProjectServicesParams) SetResearchProjectServiceRequest(researchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest) {
	o.ResearchProjectServiceRequest = researchProjectServiceRequest
}

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

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

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