lib/api/members/members_client/attendees/create_attendee_parameters.go

158 lines
4.6 KiB
Go
Raw Normal View History

2023-03-28 17:47:34 +00:00
// 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
2023-04-07 18:00:15 +00:00
package attendees
2023-03-28 17:47:34 +00:00
// 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"
)
// NewCreateAttendeeParams creates a new CreateAttendeeParams 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 NewCreateAttendeeParams() *CreateAttendeeParams {
return &CreateAttendeeParams{
timeout: cr.DefaultTimeout,
}
}
// NewCreateAttendeeParamsWithTimeout creates a new CreateAttendeeParams object
// with the ability to set a timeout on a request.
func NewCreateAttendeeParamsWithTimeout(timeout time.Duration) *CreateAttendeeParams {
return &CreateAttendeeParams{
timeout: timeout,
}
}
// NewCreateAttendeeParamsWithContext creates a new CreateAttendeeParams object
// with the ability to set a context for a request.
func NewCreateAttendeeParamsWithContext(ctx context.Context) *CreateAttendeeParams {
return &CreateAttendeeParams{
Context: ctx,
}
}
// NewCreateAttendeeParamsWithHTTPClient creates a new CreateAttendeeParams object
// with the ability to set a custom HTTPClient for a request.
func NewCreateAttendeeParamsWithHTTPClient(client *http.Client) *CreateAttendeeParams {
return &CreateAttendeeParams{
HTTPClient: client,
}
}
/*
CreateAttendeeParams contains all the parameters to send to the API endpoint
for the create attendee operation.
Typically these are written to a http.Request.
*/
type CreateAttendeeParams struct {
/* AttendeeRequest.
An array of new Attendee records
*/
AttendeeRequest *members_models.AttendeeRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the create attendee params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateAttendeeParams) WithDefaults() *CreateAttendeeParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the create attendee params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateAttendeeParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the create attendee params
func (o *CreateAttendeeParams) WithTimeout(timeout time.Duration) *CreateAttendeeParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the create attendee params
func (o *CreateAttendeeParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the create attendee params
func (o *CreateAttendeeParams) WithContext(ctx context.Context) *CreateAttendeeParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the create attendee params
func (o *CreateAttendeeParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the create attendee params
func (o *CreateAttendeeParams) WithHTTPClient(client *http.Client) *CreateAttendeeParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the create attendee params
func (o *CreateAttendeeParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAttendeeRequest adds the attendeeRequest to the create attendee params
func (o *CreateAttendeeParams) WithAttendeeRequest(attendeeRequest *members_models.AttendeeRequest) *CreateAttendeeParams {
o.SetAttendeeRequest(attendeeRequest)
return o
}
// SetAttendeeRequest adds the attendeeRequest to the create attendee params
func (o *CreateAttendeeParams) SetAttendeeRequest(attendeeRequest *members_models.AttendeeRequest) {
o.AttendeeRequest = attendeeRequest
}
// WriteToRequest writes these params to a swagger request
func (o *CreateAttendeeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AttendeeRequest != nil {
if err := r.SetBodyParam(o.AttendeeRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}