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

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

// NewPutPromptCategoriesParams creates a new PutPromptCategoriesParams 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 NewPutPromptCategoriesParams() *PutPromptCategoriesParams {
	return NewPutPromptCategoriesParamsWithTimeout(cr.DefaultTimeout)
}

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

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

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

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

	for the put prompt categories operation.

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

	// PromptCategoryRequest.
	//
	// An array of PromptCategory objects
	PromptCategoryRequest *sfgate_models.PromptCategoryRequest

	HTTPClient *http.Client

	inner innerParams
}

// WithDefaults hydrates default values in the put prompt categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutPromptCategoriesParams) WithDefaults() *PutPromptCategoriesParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the put prompt categories params.
func (o *PutPromptCategoriesParams) WithTimeout(timeout time.Duration) *PutPromptCategoriesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the put prompt categories params.
func (o *PutPromptCategoriesParams) SetTimeout(timeout time.Duration) {
	o.inner.timeout = timeout
}

// WithContext adds the context to the put prompt categories params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutPromptCategoriesParams].
func (o *PutPromptCategoriesParams) WithContext(ctx context.Context) *PutPromptCategoriesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the put prompt categories params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutPromptCategoriesParams].
func (o *PutPromptCategoriesParams) SetContext(ctx context.Context) {
	o.inner.ctx = ctx
}

// WithHTTPClient adds the HTTPClient to the put prompt categories params.
func (o *PutPromptCategoriesParams) WithHTTPClient(client *http.Client) *PutPromptCategoriesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the put prompt categories params.
func (o *PutPromptCategoriesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithPromptCategoryRequest adds the promptCategoryRequest to the put prompt categories params.
func (o *PutPromptCategoriesParams) WithPromptCategoryRequest(promptCategoryRequest *sfgate_models.PromptCategoryRequest) *PutPromptCategoriesParams {
	o.SetPromptCategoryRequest(promptCategoryRequest)
	return o
}

// SetPromptCategoryRequest adds the promptCategoryRequest to the put prompt categories params.
func (o *PutPromptCategoriesParams) SetPromptCategoryRequest(promptCategoryRequest *sfgate_models.PromptCategoryRequest) {
	o.PromptCategoryRequest = promptCategoryRequest
}

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

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