158 lines
4.5 KiB
Go
158 lines
4.5 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
// (c) 2012-2023 by Vernon Keenan
|
||
|
// All rights reserved worldwide.
|
||
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
||
|
package attendees
|
||
|
|
||
|
// 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/work/lib/api/members/members_models"
|
||
|
)
|
||
|
|
||
|
// NewPutAttendeesParams creates a new PutAttendeesParams 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 NewPutAttendeesParams() *PutAttendeesParams {
|
||
|
return &PutAttendeesParams{
|
||
|
timeout: cr.DefaultTimeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutAttendeesParamsWithTimeout creates a new PutAttendeesParams object
|
||
|
// with the ability to set a timeout on a request.
|
||
|
func NewPutAttendeesParamsWithTimeout(timeout time.Duration) *PutAttendeesParams {
|
||
|
return &PutAttendeesParams{
|
||
|
timeout: timeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutAttendeesParamsWithContext creates a new PutAttendeesParams object
|
||
|
// with the ability to set a context for a request.
|
||
|
func NewPutAttendeesParamsWithContext(ctx context.Context) *PutAttendeesParams {
|
||
|
return &PutAttendeesParams{
|
||
|
Context: ctx,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutAttendeesParamsWithHTTPClient creates a new PutAttendeesParams object
|
||
|
// with the ability to set a custom HTTPClient for a request.
|
||
|
func NewPutAttendeesParamsWithHTTPClient(client *http.Client) *PutAttendeesParams {
|
||
|
return &PutAttendeesParams{
|
||
|
HTTPClient: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutAttendeesParams contains all the parameters to send to the API endpoint
|
||
|
|
||
|
for the put attendees operation.
|
||
|
|
||
|
Typically these are written to a http.Request.
|
||
|
*/
|
||
|
type PutAttendeesParams 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 put attendees params (not the query body).
|
||
|
//
|
||
|
// All values with no default are reset to their zero value.
|
||
|
func (o *PutAttendeesParams) WithDefaults() *PutAttendeesParams {
|
||
|
o.SetDefaults()
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetDefaults hydrates default values in the put attendees params (not the query body).
|
||
|
//
|
||
|
// All values with no default are reset to their zero value.
|
||
|
func (o *PutAttendeesParams) SetDefaults() {
|
||
|
// no default values defined for this parameter
|
||
|
}
|
||
|
|
||
|
// WithTimeout adds the timeout to the put attendees params
|
||
|
func (o *PutAttendeesParams) WithTimeout(timeout time.Duration) *PutAttendeesParams {
|
||
|
o.SetTimeout(timeout)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetTimeout adds the timeout to the put attendees params
|
||
|
func (o *PutAttendeesParams) SetTimeout(timeout time.Duration) {
|
||
|
o.timeout = timeout
|
||
|
}
|
||
|
|
||
|
// WithContext adds the context to the put attendees params
|
||
|
func (o *PutAttendeesParams) WithContext(ctx context.Context) *PutAttendeesParams {
|
||
|
o.SetContext(ctx)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetContext adds the context to the put attendees params
|
||
|
func (o *PutAttendeesParams) SetContext(ctx context.Context) {
|
||
|
o.Context = ctx
|
||
|
}
|
||
|
|
||
|
// WithHTTPClient adds the HTTPClient to the put attendees params
|
||
|
func (o *PutAttendeesParams) WithHTTPClient(client *http.Client) *PutAttendeesParams {
|
||
|
o.SetHTTPClient(client)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetHTTPClient adds the HTTPClient to the put attendees params
|
||
|
func (o *PutAttendeesParams) SetHTTPClient(client *http.Client) {
|
||
|
o.HTTPClient = client
|
||
|
}
|
||
|
|
||
|
// WithAttendeeRequest adds the attendeeRequest to the put attendees params
|
||
|
func (o *PutAttendeesParams) WithAttendeeRequest(attendeeRequest *members_models.AttendeeRequest) *PutAttendeesParams {
|
||
|
o.SetAttendeeRequest(attendeeRequest)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetAttendeeRequest adds the attendeeRequest to the put attendees params
|
||
|
func (o *PutAttendeesParams) SetAttendeeRequest(attendeeRequest *members_models.AttendeeRequest) {
|
||
|
o.AttendeeRequest = attendeeRequest
|
||
|
}
|
||
|
|
||
|
// WriteToRequest writes these params to a swagger request
|
||
|
func (o *PutAttendeesParams) 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
|
||
|
}
|