mirror of https://github.com/vernonkeenan/lib
158 lines
4.6 KiB
Go
158 lines
4.6 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 enrollments
|
||
|
|
||
|
// 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"
|
||
|
)
|
||
|
|
||
|
// NewPutEnrollmentsParams creates a new PutEnrollmentsParams 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 NewPutEnrollmentsParams() *PutEnrollmentsParams {
|
||
|
return &PutEnrollmentsParams{
|
||
|
timeout: cr.DefaultTimeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutEnrollmentsParamsWithTimeout creates a new PutEnrollmentsParams object
|
||
|
// with the ability to set a timeout on a request.
|
||
|
func NewPutEnrollmentsParamsWithTimeout(timeout time.Duration) *PutEnrollmentsParams {
|
||
|
return &PutEnrollmentsParams{
|
||
|
timeout: timeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutEnrollmentsParamsWithContext creates a new PutEnrollmentsParams object
|
||
|
// with the ability to set a context for a request.
|
||
|
func NewPutEnrollmentsParamsWithContext(ctx context.Context) *PutEnrollmentsParams {
|
||
|
return &PutEnrollmentsParams{
|
||
|
Context: ctx,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutEnrollmentsParamsWithHTTPClient creates a new PutEnrollmentsParams object
|
||
|
// with the ability to set a custom HTTPClient for a request.
|
||
|
func NewPutEnrollmentsParamsWithHTTPClient(client *http.Client) *PutEnrollmentsParams {
|
||
|
return &PutEnrollmentsParams{
|
||
|
HTTPClient: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutEnrollmentsParams contains all the parameters to send to the API endpoint
|
||
|
|
||
|
for the put enrollments operation.
|
||
|
|
||
|
Typically these are written to a http.Request.
|
||
|
*/
|
||
|
type PutEnrollmentsParams struct {
|
||
|
|
||
|
/* EnrollmentRequest.
|
||
|
|
||
|
An array of new Enrollment records
|
||
|
*/
|
||
|
EnrollmentRequest *members_models.EnrollmentRequest
|
||
|
|
||
|
timeout time.Duration
|
||
|
Context context.Context
|
||
|
HTTPClient *http.Client
|
||
|
}
|
||
|
|
||
|
// WithDefaults hydrates default values in the put enrollments params (not the query body).
|
||
|
//
|
||
|
// All values with no default are reset to their zero value.
|
||
|
func (o *PutEnrollmentsParams) WithDefaults() *PutEnrollmentsParams {
|
||
|
o.SetDefaults()
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetDefaults hydrates default values in the put enrollments params (not the query body).
|
||
|
//
|
||
|
// All values with no default are reset to their zero value.
|
||
|
func (o *PutEnrollmentsParams) SetDefaults() {
|
||
|
// no default values defined for this parameter
|
||
|
}
|
||
|
|
||
|
// WithTimeout adds the timeout to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) WithTimeout(timeout time.Duration) *PutEnrollmentsParams {
|
||
|
o.SetTimeout(timeout)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetTimeout adds the timeout to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) SetTimeout(timeout time.Duration) {
|
||
|
o.timeout = timeout
|
||
|
}
|
||
|
|
||
|
// WithContext adds the context to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) WithContext(ctx context.Context) *PutEnrollmentsParams {
|
||
|
o.SetContext(ctx)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetContext adds the context to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) SetContext(ctx context.Context) {
|
||
|
o.Context = ctx
|
||
|
}
|
||
|
|
||
|
// WithHTTPClient adds the HTTPClient to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) WithHTTPClient(client *http.Client) *PutEnrollmentsParams {
|
||
|
o.SetHTTPClient(client)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetHTTPClient adds the HTTPClient to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) SetHTTPClient(client *http.Client) {
|
||
|
o.HTTPClient = client
|
||
|
}
|
||
|
|
||
|
// WithEnrollmentRequest adds the enrollmentRequest to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) WithEnrollmentRequest(enrollmentRequest *members_models.EnrollmentRequest) *PutEnrollmentsParams {
|
||
|
o.SetEnrollmentRequest(enrollmentRequest)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetEnrollmentRequest adds the enrollmentRequest to the put enrollments params
|
||
|
func (o *PutEnrollmentsParams) SetEnrollmentRequest(enrollmentRequest *members_models.EnrollmentRequest) {
|
||
|
o.EnrollmentRequest = enrollmentRequest
|
||
|
}
|
||
|
|
||
|
// WriteToRequest writes these params to a swagger request
|
||
|
func (o *PutEnrollmentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||
|
|
||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
var res []error
|
||
|
if o.EnrollmentRequest != nil {
|
||
|
if err := r.SetBodyParam(o.EnrollmentRequest); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if len(res) > 0 {
|
||
|
return errors.CompositeValidationError(res...)
|
||
|
}
|
||
|
return nil
|
||
|
}
|