// 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 research_projects // 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" ) // NewPostResearchProjectProductsParams creates a new PostResearchProjectProductsParams 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 NewPostResearchProjectProductsParams() *PostResearchProjectProductsParams { return &PostResearchProjectProductsParams{ timeout: cr.DefaultTimeout, } } // NewPostResearchProjectProductsParamsWithTimeout creates a new PostResearchProjectProductsParams object // with the ability to set a timeout on a request. func NewPostResearchProjectProductsParamsWithTimeout(timeout time.Duration) *PostResearchProjectProductsParams { return &PostResearchProjectProductsParams{ timeout: timeout, } } // NewPostResearchProjectProductsParamsWithContext creates a new PostResearchProjectProductsParams object // with the ability to set a context for a request. func NewPostResearchProjectProductsParamsWithContext(ctx context.Context) *PostResearchProjectProductsParams { return &PostResearchProjectProductsParams{ Context: ctx, } } // NewPostResearchProjectProductsParamsWithHTTPClient creates a new PostResearchProjectProductsParams object // with the ability to set a custom HTTPClient for a request. func NewPostResearchProjectProductsParamsWithHTTPClient(client *http.Client) *PostResearchProjectProductsParams { return &PostResearchProjectProductsParams{ HTTPClient: client, } } /* PostResearchProjectProductsParams contains all the parameters to send to the API endpoint for the post research project products operation. Typically these are written to a http.Request. */ type PostResearchProjectProductsParams struct { /* ResearchProjectProductRequest. An array of new ResearchProjectProduct records */ ResearchProjectProductRequest *members_models.ResearchProjectProductRequest timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the post research project products params (not the query body). // // All values with no default are reset to their zero value. func (o *PostResearchProjectProductsParams) WithDefaults() *PostResearchProjectProductsParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the post research project products params (not the query body). // // All values with no default are reset to their zero value. func (o *PostResearchProjectProductsParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the post research project products params func (o *PostResearchProjectProductsParams) WithTimeout(timeout time.Duration) *PostResearchProjectProductsParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the post research project products params func (o *PostResearchProjectProductsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the post research project products params func (o *PostResearchProjectProductsParams) WithContext(ctx context.Context) *PostResearchProjectProductsParams { o.SetContext(ctx) return o } // SetContext adds the context to the post research project products params func (o *PostResearchProjectProductsParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the post research project products params func (o *PostResearchProjectProductsParams) WithHTTPClient(client *http.Client) *PostResearchProjectProductsParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the post research project products params func (o *PostResearchProjectProductsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithResearchProjectProductRequest adds the researchProjectProductRequest to the post research project products params func (o *PostResearchProjectProductsParams) WithResearchProjectProductRequest(researchProjectProductRequest *members_models.ResearchProjectProductRequest) *PostResearchProjectProductsParams { o.SetResearchProjectProductRequest(researchProjectProductRequest) return o } // SetResearchProjectProductRequest adds the researchProjectProductRequest to the post research project products params func (o *PostResearchProjectProductsParams) SetResearchProjectProductRequest(researchProjectProductRequest *members_models.ResearchProjectProductRequest) { o.ResearchProjectProductRequest = researchProjectProductRequest } // WriteToRequest writes these params to a swagger request func (o *PostResearchProjectProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ResearchProjectProductRequest != nil { if err := r.SetBodyParam(o.ResearchProjectProductRequest); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }