lib/api/research/research_client/company_services/delete_company_service_para...

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 company_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"
)
// NewDeleteCompanyServiceParams creates a new DeleteCompanyServiceParams 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 NewDeleteCompanyServiceParams() *DeleteCompanyServiceParams {
return &DeleteCompanyServiceParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteCompanyServiceParamsWithTimeout creates a new DeleteCompanyServiceParams object
// with the ability to set a timeout on a request.
func NewDeleteCompanyServiceParamsWithTimeout(timeout time.Duration) *DeleteCompanyServiceParams {
return &DeleteCompanyServiceParams{
timeout: timeout,
}
}
// NewDeleteCompanyServiceParamsWithContext creates a new DeleteCompanyServiceParams object
// with the ability to set a context for a request.
func NewDeleteCompanyServiceParamsWithContext(ctx context.Context) *DeleteCompanyServiceParams {
return &DeleteCompanyServiceParams{
Context: ctx,
}
}
// NewDeleteCompanyServiceParamsWithHTTPClient creates a new DeleteCompanyServiceParams object
// with the ability to set a custom HTTPClient for a request.
func NewDeleteCompanyServiceParamsWithHTTPClient(client *http.Client) *DeleteCompanyServiceParams {
return &DeleteCompanyServiceParams{
HTTPClient: client,
}
}
/*
DeleteCompanyServiceParams contains all the parameters to send to the API endpoint
for the delete company service operation.
Typically these are written to a http.Request.
*/
type DeleteCompanyServiceParams struct {
/* CompanyServiceID.
CompanyService record ID
*/
CompanyServiceID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the delete company service params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteCompanyServiceParams) WithDefaults() *DeleteCompanyServiceParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete company service params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteCompanyServiceParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the delete company service params
func (o *DeleteCompanyServiceParams) WithTimeout(timeout time.Duration) *DeleteCompanyServiceParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the delete company service params
func (o *DeleteCompanyServiceParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the delete company service params
func (o *DeleteCompanyServiceParams) WithContext(ctx context.Context) *DeleteCompanyServiceParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the delete company service params
func (o *DeleteCompanyServiceParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the delete company service params
func (o *DeleteCompanyServiceParams) WithHTTPClient(client *http.Client) *DeleteCompanyServiceParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the delete company service params
func (o *DeleteCompanyServiceParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCompanyServiceID adds the companyServiceID to the delete company service params
func (o *DeleteCompanyServiceParams) WithCompanyServiceID(companyServiceID *string) *DeleteCompanyServiceParams {
o.SetCompanyServiceID(companyServiceID)
return o
}
// SetCompanyServiceID adds the companyServiceId to the delete company service params
func (o *DeleteCompanyServiceParams) SetCompanyServiceID(companyServiceID *string) {
o.CompanyServiceID = companyServiceID
}
// WriteToRequest writes these params to a swagger request
func (o *DeleteCompanyServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CompanyServiceID != nil {
// query param companyServiceId
var qrCompanyServiceID string
if o.CompanyServiceID != nil {
qrCompanyServiceID = *o.CompanyServiceID
}
qCompanyServiceID := qrCompanyServiceID
if qCompanyServiceID != "" {
if err := r.SetQueryParam("companyServiceId", qCompanyServiceID); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}