mirror of https://github.com/vernonkeenan/lib
158 lines
5.0 KiB
Go
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 industry_services
|
|
|
|
// 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/research/research_models"
|
|
)
|
|
|
|
// NewPostIndustryServicesParams creates a new PostIndustryServicesParams 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 NewPostIndustryServicesParams() *PostIndustryServicesParams {
|
|
return &PostIndustryServicesParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewPostIndustryServicesParamsWithTimeout creates a new PostIndustryServicesParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewPostIndustryServicesParamsWithTimeout(timeout time.Duration) *PostIndustryServicesParams {
|
|
return &PostIndustryServicesParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewPostIndustryServicesParamsWithContext creates a new PostIndustryServicesParams object
|
|
// with the ability to set a context for a request.
|
|
func NewPostIndustryServicesParamsWithContext(ctx context.Context) *PostIndustryServicesParams {
|
|
return &PostIndustryServicesParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewPostIndustryServicesParamsWithHTTPClient creates a new PostIndustryServicesParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewPostIndustryServicesParamsWithHTTPClient(client *http.Client) *PostIndustryServicesParams {
|
|
return &PostIndustryServicesParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*
|
|
PostIndustryServicesParams contains all the parameters to send to the API endpoint
|
|
|
|
for the post industry services operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type PostIndustryServicesParams struct {
|
|
|
|
/* IndustryServiceRequest.
|
|
|
|
An array of new IndustryService records
|
|
*/
|
|
IndustryServiceRequest *research_models.IndustryServiceRequest
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the post industry services params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *PostIndustryServicesParams) WithDefaults() *PostIndustryServicesParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the post industry services params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *PostIndustryServicesParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the post industry services params
|
|
func (o *PostIndustryServicesParams) WithTimeout(timeout time.Duration) *PostIndustryServicesParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the post industry services params
|
|
func (o *PostIndustryServicesParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the post industry services params
|
|
func (o *PostIndustryServicesParams) WithContext(ctx context.Context) *PostIndustryServicesParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the post industry services params
|
|
func (o *PostIndustryServicesParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the post industry services params
|
|
func (o *PostIndustryServicesParams) WithHTTPClient(client *http.Client) *PostIndustryServicesParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the post industry services params
|
|
func (o *PostIndustryServicesParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithIndustryServiceRequest adds the industryServiceRequest to the post industry services params
|
|
func (o *PostIndustryServicesParams) WithIndustryServiceRequest(industryServiceRequest *research_models.IndustryServiceRequest) *PostIndustryServicesParams {
|
|
o.SetIndustryServiceRequest(industryServiceRequest)
|
|
return o
|
|
}
|
|
|
|
// SetIndustryServiceRequest adds the industryServiceRequest to the post industry services params
|
|
func (o *PostIndustryServicesParams) SetIndustryServiceRequest(industryServiceRequest *research_models.IndustryServiceRequest) {
|
|
o.IndustryServiceRequest = industryServiceRequest
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *PostIndustryServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
if o.IndustryServiceRequest != nil {
|
|
if err := r.SetBodyParam(o.IndustryServiceRequest); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|