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

// 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/vernonkeenan/lib/api/members/members_models"
)

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

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

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

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

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

	for the create research project company operation.

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

	/* ResearchprojectcompanyRequest.

	   An array of new ResearchProjectCompany records
	*/
	ResearchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest

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

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

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

// WithTimeout adds the timeout to the create research project company params
func (o *CreateResearchProjectCompanyParams) WithTimeout(timeout time.Duration) *CreateResearchProjectCompanyParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the create research project company params
func (o *CreateResearchProjectCompanyParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the create research project company params
func (o *CreateResearchProjectCompanyParams) WithContext(ctx context.Context) *CreateResearchProjectCompanyParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the create research project company params
func (o *CreateResearchProjectCompanyParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the create research project company params
func (o *CreateResearchProjectCompanyParams) WithHTTPClient(client *http.Client) *CreateResearchProjectCompanyParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the create research project company params
func (o *CreateResearchProjectCompanyParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithResearchprojectcompanyRequest adds the researchprojectcompanyRequest to the create research project company params
func (o *CreateResearchProjectCompanyParams) WithResearchprojectcompanyRequest(researchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest) *CreateResearchProjectCompanyParams {
	o.SetResearchprojectcompanyRequest(researchprojectcompanyRequest)
	return o
}

// SetResearchprojectcompanyRequest adds the researchprojectcompanyRequest to the create research project company params
func (o *CreateResearchProjectCompanyParams) SetResearchprojectcompanyRequest(researchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest) {
	o.ResearchprojectcompanyRequest = researchprojectcompanyRequest
}

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

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

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