// 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 industry_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/work/lib/api/research/research_models"
)

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

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

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

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

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

	for the post industry companies operation.

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

	/* IndustryCompanyRequest.

	   An array of new IndustryCompany records
	*/
	IndustryCompanyRequest *research_models.IndustryCompanyRequest

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

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

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

// WithTimeout adds the timeout to the post industry companies params
func (o *PostIndustryCompaniesParams) WithTimeout(timeout time.Duration) *PostIndustryCompaniesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the post industry companies params
func (o *PostIndustryCompaniesParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the post industry companies params
func (o *PostIndustryCompaniesParams) WithContext(ctx context.Context) *PostIndustryCompaniesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the post industry companies params
func (o *PostIndustryCompaniesParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the post industry companies params
func (o *PostIndustryCompaniesParams) WithHTTPClient(client *http.Client) *PostIndustryCompaniesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the post industry companies params
func (o *PostIndustryCompaniesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithIndustryCompanyRequest adds the industryCompanyRequest to the post industry companies params
func (o *PostIndustryCompaniesParams) WithIndustryCompanyRequest(industryCompanyRequest *research_models.IndustryCompanyRequest) *PostIndustryCompaniesParams {
	o.SetIndustryCompanyRequest(industryCompanyRequest)
	return o
}

// SetIndustryCompanyRequest adds the industryCompanyRequest to the post industry companies params
func (o *PostIndustryCompaniesParams) SetIndustryCompanyRequest(industryCompanyRequest *research_models.IndustryCompanyRequest) {
	o.IndustryCompanyRequest = industryCompanyRequest
}

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

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

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