lib/api/sfgate/sfgate_client/research_projects/put_research_projects_param...

158 lines
5.0 KiB
Go

// 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"
)
// 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 {
/* ResearchProjectRequest.
An array of new ResearchProject records
*/
ResearchProjectRequest *sfgate_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
}
// WithResearchProjectRequest adds the researchProjectRequest to the put research projects params
func (o *PutResearchProjectsParams) WithResearchProjectRequest(researchProjectRequest *sfgate_models.ResearchProjectRequest) *PutResearchProjectsParams {
o.SetResearchProjectRequest(researchProjectRequest)
return o
}
// SetResearchProjectRequest adds the researchProjectRequest to the put research projects params
func (o *PutResearchProjectsParams) SetResearchProjectRequest(researchProjectRequest *sfgate_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
if o.ResearchProjectRequest != nil {
if err := r.SetBodyParam(o.ResearchProjectRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}