// 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 lesson_progress // 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" ) // NewPutLessonProgressesParams creates a new PutLessonProgressesParams 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 NewPutLessonProgressesParams() *PutLessonProgressesParams { return &PutLessonProgressesParams{ timeout: cr.DefaultTimeout, } } // NewPutLessonProgressesParamsWithTimeout creates a new PutLessonProgressesParams object // with the ability to set a timeout on a request. func NewPutLessonProgressesParamsWithTimeout(timeout time.Duration) *PutLessonProgressesParams { return &PutLessonProgressesParams{ timeout: timeout, } } // NewPutLessonProgressesParamsWithContext creates a new PutLessonProgressesParams object // with the ability to set a context for a request. func NewPutLessonProgressesParamsWithContext(ctx context.Context) *PutLessonProgressesParams { return &PutLessonProgressesParams{ Context: ctx, } } // NewPutLessonProgressesParamsWithHTTPClient creates a new PutLessonProgressesParams object // with the ability to set a custom HTTPClient for a request. func NewPutLessonProgressesParamsWithHTTPClient(client *http.Client) *PutLessonProgressesParams { return &PutLessonProgressesParams{ HTTPClient: client, } } /* PutLessonProgressesParams contains all the parameters to send to the API endpoint for the put lesson progresses operation. Typically these are written to a http.Request. */ type PutLessonProgressesParams 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 put lesson progresses params (not the query body). // // All values with no default are reset to their zero value. func (o *PutLessonProgressesParams) WithDefaults() *PutLessonProgressesParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the put lesson progresses params (not the query body). // // All values with no default are reset to their zero value. func (o *PutLessonProgressesParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the put lesson progresses params func (o *PutLessonProgressesParams) WithTimeout(timeout time.Duration) *PutLessonProgressesParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the put lesson progresses params func (o *PutLessonProgressesParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the put lesson progresses params func (o *PutLessonProgressesParams) WithContext(ctx context.Context) *PutLessonProgressesParams { o.SetContext(ctx) return o } // SetContext adds the context to the put lesson progresses params func (o *PutLessonProgressesParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the put lesson progresses params func (o *PutLessonProgressesParams) WithHTTPClient(client *http.Client) *PutLessonProgressesParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the put lesson progresses params func (o *PutLessonProgressesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithLessonprogressRequest adds the lessonprogressRequest to the put lesson progresses params func (o *PutLessonProgressesParams) WithLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) *PutLessonProgressesParams { o.SetLessonprogressRequest(lessonprogressRequest) return o } // SetLessonprogressRequest adds the lessonprogressRequest to the put lesson progresses params func (o *PutLessonProgressesParams) SetLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) { o.LessonprogressRequest = lessonprogressRequest } // WriteToRequest writes these params to a swagger request func (o *PutLessonProgressesParams) 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 }