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

import (
	"context"
	"net/http"
	"time"

	"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/strfmt"
)

// NewPutEventCategoriesParams creates a new PutEventCategoriesParams 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 NewPutEventCategoriesParams() *PutEventCategoriesParams {
	return NewPutEventCategoriesParamsWithTimeout(cr.DefaultTimeout)
}

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

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

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

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

	for the put event categories operation.

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

	// EventCategoryRequest.
	//
	// An array of new Event records
	EventCategoryRequest *members_models.EventCategoryRequest

	HTTPClient *http.Client

	inner innerParams
}

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

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

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

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

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

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

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

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

// WithEventCategoryRequest adds the eventCategoryRequest to the put event categories params.
func (o *PutEventCategoriesParams) WithEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) *PutEventCategoriesParams {
	o.SetEventCategoryRequest(eventCategoryRequest)
	return o
}

// SetEventCategoryRequest adds the eventCategoryRequest to the put event categories params.
func (o *PutEventCategoriesParams) SetEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) {
	o.EventCategoryRequest = eventCategoryRequest
}

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

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