2023-05-13 16:46:48 +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 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"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewPutResearchProjectsParams creates a new PutResearchProjectsParams 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 NewPutResearchProjectsParams() *PutResearchProjectsParams {
|
|
|
|
return &PutResearchProjectsParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewPutResearchProjectsParamsWithTimeout creates a new PutResearchProjectsParams object
|
|
|
|
// with the ability to set a timeout on a request.
|
|
|
|
func NewPutResearchProjectsParamsWithTimeout(timeout time.Duration) *PutResearchProjectsParams {
|
|
|
|
return &PutResearchProjectsParams{
|
|
|
|
timeout: timeout,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewPutResearchProjectsParamsWithContext creates a new PutResearchProjectsParams object
|
|
|
|
// with the ability to set a context for a request.
|
|
|
|
func NewPutResearchProjectsParamsWithContext(ctx context.Context) *PutResearchProjectsParams {
|
|
|
|
return &PutResearchProjectsParams{
|
|
|
|
Context: ctx,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewPutResearchProjectsParamsWithHTTPClient creates a new PutResearchProjectsParams object
|
|
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
|
|
func NewPutResearchProjectsParamsWithHTTPClient(client *http.Client) *PutResearchProjectsParams {
|
|
|
|
return &PutResearchProjectsParams{
|
|
|
|
HTTPClient: client,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
PutResearchProjectsParams contains all the parameters to send to the API endpoint
|
|
|
|
|
|
|
|
for the put research projects operation.
|
|
|
|
|
|
|
|
Typically these are written to a http.Request.
|
|
|
|
*/
|
|
|
|
type PutResearchProjectsParams struct {
|
|
|
|
|
2023-05-19 23:55:12 +00:00
|
|
|
/* XAuth0UserID.
|
|
|
|
|
|
|
|
Auth0 User Id
|
|
|
|
*/
|
|
|
|
XAuth0UserID string
|
|
|
|
|
2023-05-13 16:46:48 +00:00
|
|
|
/* ResearchProjectRequest.
|
|
|
|
|
|
|
|
An array of new ResearchProject records
|
|
|
|
*/
|
|
|
|
ResearchProjectRequest *members_models.ResearchProjectRequest
|
|
|
|
|
|
|
|
timeout time.Duration
|
|
|
|
Context context.Context
|
|
|
|
HTTPClient *http.Client
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithDefaults hydrates default values in the put research projects params (not the query body).
|
|
|
|
//
|
|
|
|
// All values with no default are reset to their zero value.
|
|
|
|
func (o *PutResearchProjectsParams) WithDefaults() *PutResearchProjectsParams {
|
|
|
|
o.SetDefaults()
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetDefaults hydrates default values in the put research projects params (not the query body).
|
|
|
|
//
|
|
|
|
// All values with no default are reset to their zero value.
|
|
|
|
func (o *PutResearchProjectsParams) SetDefaults() {
|
|
|
|
// no default values defined for this parameter
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithTimeout adds the timeout to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) WithTimeout(timeout time.Duration) *PutResearchProjectsParams {
|
|
|
|
o.SetTimeout(timeout)
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetTimeout adds the timeout to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) SetTimeout(timeout time.Duration) {
|
|
|
|
o.timeout = timeout
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithContext adds the context to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) WithContext(ctx context.Context) *PutResearchProjectsParams {
|
|
|
|
o.SetContext(ctx)
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetContext adds the context to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) SetContext(ctx context.Context) {
|
|
|
|
o.Context = ctx
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithHTTPClient adds the HTTPClient to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) WithHTTPClient(client *http.Client) *PutResearchProjectsParams {
|
|
|
|
o.SetHTTPClient(client)
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetHTTPClient adds the HTTPClient to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) SetHTTPClient(client *http.Client) {
|
|
|
|
o.HTTPClient = client
|
|
|
|
}
|
|
|
|
|
2023-05-19 23:55:12 +00:00
|
|
|
// WithXAuth0UserID adds the xAuth0UserID to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectsParams {
|
|
|
|
o.SetXAuth0UserID(xAuth0UserID)
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetXAuth0UserID adds the xAuth0UserId to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) SetXAuth0UserID(xAuth0UserID string) {
|
|
|
|
o.XAuth0UserID = xAuth0UserID
|
|
|
|
}
|
|
|
|
|
2023-05-13 16:46:48 +00:00
|
|
|
// WithResearchProjectRequest adds the researchProjectRequest to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) WithResearchProjectRequest(researchProjectRequest *members_models.ResearchProjectRequest) *PutResearchProjectsParams {
|
|
|
|
o.SetResearchProjectRequest(researchProjectRequest)
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetResearchProjectRequest adds the researchProjectRequest to the put research projects params
|
|
|
|
func (o *PutResearchProjectsParams) SetResearchProjectRequest(researchProjectRequest *members_models.ResearchProjectRequest) {
|
|
|
|
o.ResearchProjectRequest = researchProjectRequest
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
|
|
func (o *PutResearchProjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
var res []error
|
2023-05-19 23:55:12 +00:00
|
|
|
|
|
|
|
// header param X-Auth0-UserId
|
|
|
|
if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-05-13 16:46:48 +00:00
|
|
|
if o.ResearchProjectRequest != nil {
|
|
|
|
if err := r.SetBodyParam(o.ResearchProjectRequest); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|