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