lib/api/research/research_client/industry/get_industries_observable_p...

168 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
// 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"
)
// NewGetIndustriesObservableParams creates a new GetIndustriesObservableParams 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 NewGetIndustriesObservableParams() *GetIndustriesObservableParams {
return &GetIndustriesObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetIndustriesObservableParamsWithTimeout creates a new GetIndustriesObservableParams object
// with the ability to set a timeout on a request.
func NewGetIndustriesObservableParamsWithTimeout(timeout time.Duration) *GetIndustriesObservableParams {
return &GetIndustriesObservableParams{
timeout: timeout,
}
}
// NewGetIndustriesObservableParamsWithContext creates a new GetIndustriesObservableParams object
// with the ability to set a context for a request.
func NewGetIndustriesObservableParamsWithContext(ctx context.Context) *GetIndustriesObservableParams {
return &GetIndustriesObservableParams{
Context: ctx,
}
}
// NewGetIndustriesObservableParamsWithHTTPClient creates a new GetIndustriesObservableParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetIndustriesObservableParamsWithHTTPClient(client *http.Client) *GetIndustriesObservableParams {
return &GetIndustriesObservableParams{
HTTPClient: client,
}
}
/*
GetIndustriesObservableParams contains all the parameters to send to the API endpoint
for the get industries observable operation.
Typically these are written to a http.Request.
*/
type GetIndustriesObservableParams struct {
/* IndustryID.
Taxnexus Industry record ID
*/
IndustryID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get industries observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetIndustriesObservableParams) WithDefaults() *GetIndustriesObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get industries observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetIndustriesObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get industries observable params
func (o *GetIndustriesObservableParams) WithTimeout(timeout time.Duration) *GetIndustriesObservableParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get industries observable params
func (o *GetIndustriesObservableParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get industries observable params
func (o *GetIndustriesObservableParams) WithContext(ctx context.Context) *GetIndustriesObservableParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get industries observable params
func (o *GetIndustriesObservableParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get industries observable params
func (o *GetIndustriesObservableParams) WithHTTPClient(client *http.Client) *GetIndustriesObservableParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get industries observable params
func (o *GetIndustriesObservableParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithIndustryID adds the industryID to the get industries observable params
func (o *GetIndustriesObservableParams) WithIndustryID(industryID *string) *GetIndustriesObservableParams {
o.SetIndustryID(industryID)
return o
}
// SetIndustryID adds the industryId to the get industries observable params
func (o *GetIndustriesObservableParams) SetIndustryID(industryID *string) {
o.IndustryID = industryID
}
// WriteToRequest writes these params to a swagger request
func (o *GetIndustriesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.IndustryID != nil {
// query param industryId
var qrIndustryID string
if o.IndustryID != nil {
qrIndustryID = *o.IndustryID
}
qIndustryID := qrIndustryID
if qIndustryID != "" {
if err := r.SetQueryParam("industryId", qIndustryID); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}