lib/api/members/members_client/events/post_event_categories_param...

158 lines
4.9 KiB
Go

// 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
// 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/vernonkeenan/lib/api/members/members_models"
)
// NewPostEventCategoriesParams creates a new PostEventCategoriesParams 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 NewPostEventCategoriesParams() *PostEventCategoriesParams {
return &PostEventCategoriesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostEventCategoriesParamsWithTimeout creates a new PostEventCategoriesParams object
// with the ability to set a timeout on a request.
func NewPostEventCategoriesParamsWithTimeout(timeout time.Duration) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
timeout: timeout,
}
}
// NewPostEventCategoriesParamsWithContext creates a new PostEventCategoriesParams object
// with the ability to set a context for a request.
func NewPostEventCategoriesParamsWithContext(ctx context.Context) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
Context: ctx,
}
}
// NewPostEventCategoriesParamsWithHTTPClient creates a new PostEventCategoriesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostEventCategoriesParamsWithHTTPClient(client *http.Client) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
HTTPClient: client,
}
}
/*
PostEventCategoriesParams contains all the parameters to send to the API endpoint
for the post event categories operation.
Typically these are written to a http.Request.
*/
type PostEventCategoriesParams struct {
/* EventCategoryRequest.
An array of new Event records
*/
EventCategoryRequest *members_models.EventCategoryRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostEventCategoriesParams) WithDefaults() *PostEventCategoriesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostEventCategoriesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post event categories params
func (o *PostEventCategoriesParams) WithTimeout(timeout time.Duration) *PostEventCategoriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post event categories params
func (o *PostEventCategoriesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post event categories params
func (o *PostEventCategoriesParams) WithContext(ctx context.Context) *PostEventCategoriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post event categories params
func (o *PostEventCategoriesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post event categories params
func (o *PostEventCategoriesParams) WithHTTPClient(client *http.Client) *PostEventCategoriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post event categories params
func (o *PostEventCategoriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEventCategoryRequest adds the eventCategoryRequest to the post event categories params
func (o *PostEventCategoriesParams) WithEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) *PostEventCategoriesParams {
o.SetEventCategoryRequest(eventCategoryRequest)
return o
}
// SetEventCategoryRequest adds the eventCategoryRequest to the post event categories params
func (o *PostEventCategoriesParams) SetEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) {
o.EventCategoryRequest = eventCategoryRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostEventCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.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
}