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

160 lines
4.7 KiB
Go
Raw Normal View History

2023-05-13 16:46:48 +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
package attendees
import (
"context"
"net/http"
"time"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
2023-05-13 16:46:48 +00:00
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewPostAttendeesParams creates a new PostAttendeesParams 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 NewPostAttendeesParams() *PostAttendeesParams {
return NewPostAttendeesParamsWithTimeout(cr.DefaultTimeout)
2023-05-13 16:46:48 +00:00
}
// NewPostAttendeesParamsWithTimeout creates a new PostAttendeesParams object
// with the ability to set a timeout on a request.
func NewPostAttendeesParamsWithTimeout(timeout time.Duration) *PostAttendeesParams {
return &PostAttendeesParams{
inner: innerParams{
timeout: timeout,
},
2023-05-13 16:46:48 +00:00
}
}
// NewPostAttendeesParamsWithContext creates a new PostAttendeesParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PostAttendeesParams].
2023-05-13 16:46:48 +00:00
func NewPostAttendeesParamsWithContext(ctx context.Context) *PostAttendeesParams {
return &PostAttendeesParams{
inner: innerParams{
ctx: ctx,
},
2023-05-13 16:46:48 +00:00
}
}
// NewPostAttendeesParamsWithHTTPClient creates a new PostAttendeesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostAttendeesParamsWithHTTPClient(client *http.Client) *PostAttendeesParams {
return &PostAttendeesParams{
HTTPClient: client,
}
}
/*
PostAttendeesParams contains all the parameters to send to the API endpoint
for the post attendees operation.
Typically these are written to a http.Request.
*/
type PostAttendeesParams struct {
// AttendeeRequest.
//
// An array of new Attendee records
2023-05-13 16:46:48 +00:00
AttendeeRequest *members_models.AttendeeRequest
HTTPClient *http.Client
inner innerParams
2023-05-13 16:46:48 +00:00
}
// WithDefaults hydrates default values in the post attendees params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostAttendeesParams) WithDefaults() *PostAttendeesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post attendees params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostAttendeesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post attendees params.
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) WithTimeout(timeout time.Duration) *PostAttendeesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post attendees params.
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) SetTimeout(timeout time.Duration) {
o.inner.timeout = timeout
2023-05-13 16:46:48 +00:00
}
// WithContext adds the context to the post attendees params.
//
// Deprecated: use the operation call with context to pass the context instead of [PostAttendeesParams].
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) WithContext(ctx context.Context) *PostAttendeesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post attendees params.
//
// Deprecated: use the operation call with context to pass the context instead of [PostAttendeesParams].
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) SetContext(ctx context.Context) {
o.inner.ctx = ctx
2023-05-13 16:46:48 +00:00
}
// WithHTTPClient adds the HTTPClient to the post attendees params.
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) WithHTTPClient(client *http.Client) *PostAttendeesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post attendees params.
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAttendeeRequest adds the attendeeRequest to the post attendees params.
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) WithAttendeeRequest(attendeeRequest *members_models.AttendeeRequest) *PostAttendeesParams {
o.SetAttendeeRequest(attendeeRequest)
return o
}
// SetAttendeeRequest adds the attendeeRequest to the post attendees params.
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) SetAttendeeRequest(attendeeRequest *members_models.AttendeeRequest) {
o.AttendeeRequest = attendeeRequest
}
// WriteToRequest writes these params to a [runtime.ClientRequest].
2023-05-13 16:46:48 +00:00
func (o *PostAttendeesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.inner.timeout); err != nil {
2023-05-13 16:46:48 +00:00
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
}