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

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

// NewPostIndustryServicesParams creates a new PostIndustryServicesParams 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 NewPostIndustryServicesParams() *PostIndustryServicesParams {
	return NewPostIndustryServicesParamsWithTimeout(cr.DefaultTimeout)
}

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

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

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

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

	for the post industry services operation.

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

	// IndustryServiceRequest.
	//
	// An array of new IndustryService records
	IndustryServiceRequest *sfgate_models.IndustryServiceRequest

	HTTPClient *http.Client

	inner innerParams
}

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

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

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

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

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

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

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

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

// WithIndustryServiceRequest adds the industryServiceRequest to the post industry services params.
func (o *PostIndustryServicesParams) WithIndustryServiceRequest(industryServiceRequest *sfgate_models.IndustryServiceRequest) *PostIndustryServicesParams {
	o.SetIndustryServiceRequest(industryServiceRequest)
	return o
}

// SetIndustryServiceRequest adds the industryServiceRequest to the post industry services params.
func (o *PostIndustryServicesParams) SetIndustryServiceRequest(industryServiceRequest *sfgate_models.IndustryServiceRequest) {
	o.IndustryServiceRequest = industryServiceRequest
}

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

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