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

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

// NewDeleteIndustryCompanyParams creates a new DeleteIndustryCompanyParams 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 NewDeleteIndustryCompanyParams() *DeleteIndustryCompanyParams {
	return NewDeleteIndustryCompanyParamsWithTimeout(cr.DefaultTimeout)
}

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

// NewDeleteIndustryCompanyParamsWithContext creates a new DeleteIndustryCompanyParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [DeleteIndustryCompanyParams].
func NewDeleteIndustryCompanyParamsWithContext(ctx context.Context) *DeleteIndustryCompanyParams {
	return &DeleteIndustryCompanyParams{
		inner: innerParams{
			ctx: ctx,
		},
	}
}

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

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

	for the delete industry company operation.

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

	// IndustryCompanyID.
	//
	// IndustryCompany record ID
	IndustryCompanyID *string

	HTTPClient *http.Client

	inner innerParams
}

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

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

// WithTimeout adds the timeout to the delete industry company params.
func (o *DeleteIndustryCompanyParams) WithTimeout(timeout time.Duration) *DeleteIndustryCompanyParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the delete industry company params.
func (o *DeleteIndustryCompanyParams) SetTimeout(timeout time.Duration) {
	o.inner.timeout = timeout
}

// WithContext adds the context to the delete industry company params.
//
// Deprecated: use the operation call with context to pass the context instead of [DeleteIndustryCompanyParams].
func (o *DeleteIndustryCompanyParams) WithContext(ctx context.Context) *DeleteIndustryCompanyParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the delete industry company params.
//
// Deprecated: use the operation call with context to pass the context instead of [DeleteIndustryCompanyParams].
func (o *DeleteIndustryCompanyParams) SetContext(ctx context.Context) {
	o.inner.ctx = ctx
}

// WithHTTPClient adds the HTTPClient to the delete industry company params.
func (o *DeleteIndustryCompanyParams) WithHTTPClient(client *http.Client) *DeleteIndustryCompanyParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the delete industry company params.
func (o *DeleteIndustryCompanyParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithIndustryCompanyID adds the industryCompanyID to the delete industry company params.
func (o *DeleteIndustryCompanyParams) WithIndustryCompanyID(industryCompanyID *string) *DeleteIndustryCompanyParams {
	o.SetIndustryCompanyID(industryCompanyID)
	return o
}

// SetIndustryCompanyID adds the industryCompanyId to the delete industry company params.
func (o *DeleteIndustryCompanyParams) SetIndustryCompanyID(industryCompanyID *string) {
	o.IndustryCompanyID = industryCompanyID
}

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

	if o.IndustryCompanyID != nil {

		// query param industryCompanyId
		var qrIndustryCompanyID string

		if o.IndustryCompanyID != nil {
			qrIndustryCompanyID = *o.IndustryCompanyID
		}
		qIndustryCompanyID := qrIndustryCompanyID
		if qIndustryCompanyID != "" {

			if err := r.SetQueryParam("industryCompanyId", qIndustryCompanyID); err != nil {
				return err
			}
		}
	}

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