lib/api/members/members_client/research_projects/post_research_project_servi...

183 lines
6.2 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/members/members_models"
)
// NewPostResearchProjectServicesParams creates a new PostResearchProjectServicesParams 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 NewPostResearchProjectServicesParams() *PostResearchProjectServicesParams {
return &PostResearchProjectServicesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostResearchProjectServicesParamsWithTimeout creates a new PostResearchProjectServicesParams object
// with the ability to set a timeout on a request.
func NewPostResearchProjectServicesParamsWithTimeout(timeout time.Duration) *PostResearchProjectServicesParams {
return &PostResearchProjectServicesParams{
timeout: timeout,
}
}
// NewPostResearchProjectServicesParamsWithContext creates a new PostResearchProjectServicesParams object
// with the ability to set a context for a request.
func NewPostResearchProjectServicesParamsWithContext(ctx context.Context) *PostResearchProjectServicesParams {
return &PostResearchProjectServicesParams{
Context: ctx,
}
}
// NewPostResearchProjectServicesParamsWithHTTPClient creates a new PostResearchProjectServicesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostResearchProjectServicesParamsWithHTTPClient(client *http.Client) *PostResearchProjectServicesParams {
return &PostResearchProjectServicesParams{
HTTPClient: client,
}
}
/*
PostResearchProjectServicesParams contains all the parameters to send to the API endpoint
for the post research project services operation.
Typically these are written to a http.Request.
*/
type PostResearchProjectServicesParams struct {
/* XAuth0UserID.
Auth0 User Id
*/
XAuth0UserID *string
/* ResearchProjectServiceRequest.
An array of new ResearchProjectService records
*/
ResearchProjectServiceRequest *members_models.ResearchProjectServiceRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post research project services params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostResearchProjectServicesParams) WithDefaults() *PostResearchProjectServicesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post research project services params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostResearchProjectServicesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post research project services params
func (o *PostResearchProjectServicesParams) WithTimeout(timeout time.Duration) *PostResearchProjectServicesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post research project services params
func (o *PostResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post research project services params
func (o *PostResearchProjectServicesParams) WithContext(ctx context.Context) *PostResearchProjectServicesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post research project services params
func (o *PostResearchProjectServicesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post research project services params
func (o *PostResearchProjectServicesParams) WithHTTPClient(client *http.Client) *PostResearchProjectServicesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post research project services params
func (o *PostResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithXAuth0UserID adds the xAuth0UserID to the post research project services params
func (o *PostResearchProjectServicesParams) WithXAuth0UserID(xAuth0UserID *string) *PostResearchProjectServicesParams {
o.SetXAuth0UserID(xAuth0UserID)
return o
}
// SetXAuth0UserID adds the xAuth0UserId to the post research project services params
func (o *PostResearchProjectServicesParams) SetXAuth0UserID(xAuth0UserID *string) {
o.XAuth0UserID = xAuth0UserID
}
// WithResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
func (o *PostResearchProjectServicesParams) WithResearchProjectServiceRequest(researchProjectServiceRequest *members_models.ResearchProjectServiceRequest) *PostResearchProjectServicesParams {
o.SetResearchProjectServiceRequest(researchProjectServiceRequest)
return o
}
// SetResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
func (o *PostResearchProjectServicesParams) SetResearchProjectServiceRequest(researchProjectServiceRequest *members_models.ResearchProjectServiceRequest) {
o.ResearchProjectServiceRequest = researchProjectServiceRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.XAuth0UserID != nil {
// header param X-Auth0-UserId
if err := r.SetHeaderParam("X-Auth0-UserId", *o.XAuth0UserID); err != nil {
return err
}
}
if o.ResearchProjectServiceRequest != nil {
if err := r.SetBodyParam(o.ResearchProjectServiceRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}