lib/api/members/members_client/operations/create_lesson_progress_para...

158 lines
5.0 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
package operations
// 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"
)
// NewCreateLessonProgressParams creates a new CreateLessonProgressParams 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 NewCreateLessonProgressParams() *CreateLessonProgressParams {
return &CreateLessonProgressParams{
timeout: cr.DefaultTimeout,
}
}
// NewCreateLessonProgressParamsWithTimeout creates a new CreateLessonProgressParams object
// with the ability to set a timeout on a request.
func NewCreateLessonProgressParamsWithTimeout(timeout time.Duration) *CreateLessonProgressParams {
return &CreateLessonProgressParams{
timeout: timeout,
}
}
// NewCreateLessonProgressParamsWithContext creates a new CreateLessonProgressParams object
// with the ability to set a context for a request.
func NewCreateLessonProgressParamsWithContext(ctx context.Context) *CreateLessonProgressParams {
return &CreateLessonProgressParams{
Context: ctx,
}
}
// NewCreateLessonProgressParamsWithHTTPClient creates a new CreateLessonProgressParams object
// with the ability to set a custom HTTPClient for a request.
func NewCreateLessonProgressParamsWithHTTPClient(client *http.Client) *CreateLessonProgressParams {
return &CreateLessonProgressParams{
HTTPClient: client,
}
}
/*
CreateLessonProgressParams contains all the parameters to send to the API endpoint
for the create lesson progress operation.
Typically these are written to a http.Request.
*/
type CreateLessonProgressParams struct {
/* LessonprogressRequest.
An array of new LessonProgress records
*/
LessonprogressRequest *members_models.LessonProgressRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the create lesson progress params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateLessonProgressParams) WithDefaults() *CreateLessonProgressParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the create lesson progress params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateLessonProgressParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the create lesson progress params
func (o *CreateLessonProgressParams) WithTimeout(timeout time.Duration) *CreateLessonProgressParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the create lesson progress params
func (o *CreateLessonProgressParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the create lesson progress params
func (o *CreateLessonProgressParams) WithContext(ctx context.Context) *CreateLessonProgressParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the create lesson progress params
func (o *CreateLessonProgressParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the create lesson progress params
func (o *CreateLessonProgressParams) WithHTTPClient(client *http.Client) *CreateLessonProgressParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the create lesson progress params
func (o *CreateLessonProgressParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithLessonprogressRequest adds the lessonprogressRequest to the create lesson progress params
func (o *CreateLessonProgressParams) WithLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) *CreateLessonProgressParams {
o.SetLessonprogressRequest(lessonprogressRequest)
return o
}
// SetLessonprogressRequest adds the lessonprogressRequest to the create lesson progress params
func (o *CreateLessonProgressParams) SetLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) {
o.LessonprogressRequest = lessonprogressRequest
}
// WriteToRequest writes these params to a swagger request
func (o *CreateLessonProgressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.LessonprogressRequest != nil {
if err := r.SetBodyParam(o.LessonprogressRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}