lib/api/sf-gate/sf_gate_client/sf_gate_client.go

317 lines
11 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sf_gate_client
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/accounting_rules"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/accounting_rulesets"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/accounts"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/authorities"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/backends"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/cash_receipts"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/clusters"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/companies"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/contacts"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/counties"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/countries"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/databases"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/domains"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/filing_types"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/filings"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/gl_accounts"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/gl_balances"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/ingests"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/invoices"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/jobs"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/license_types"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/licenses"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/notebooks"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/orders"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/periods"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/places"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/products"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/purchase_orders"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/quotes"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/roles"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/services"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/statements"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/states"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/submissions"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/subscriptions"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/tax_type_accounts"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/tax_types"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/taxnexus_codes"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/templates"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/tenants"
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_client/users"
)
// Default sf gate HTTP client.
var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
DefaultHost string = "sf-gate.fabric.tnxs.net:8080"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
DefaultBasePath string = "/v1"
)
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
var DefaultSchemes = []string{"http"}
// NewHTTPClient creates a new sf gate HTTP client.
func NewHTTPClient(formats strfmt.Registry) *SfGate {
return NewHTTPClientWithConfig(formats, nil)
}
// NewHTTPClientWithConfig creates a new sf gate HTTP client,
// using a customizable transport config.
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *SfGate {
// ensure nullable parameters have default
if cfg == nil {
cfg = DefaultTransportConfig()
}
// create transport and client
transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
return New(transport, formats)
}
// New creates a new sf gate client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *SfGate {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(SfGate)
cli.Transport = transport
cli.AccountingRules = accounting_rules.New(transport, formats)
cli.AccountingRulesets = accounting_rulesets.New(transport, formats)
cli.Accounts = accounts.New(transport, formats)
cli.Authorities = authorities.New(transport, formats)
cli.Backends = backends.New(transport, formats)
cli.CashReceipts = cash_receipts.New(transport, formats)
cli.Clusters = clusters.New(transport, formats)
cli.Companies = companies.New(transport, formats)
cli.Contacts = contacts.New(transport, formats)
cli.Counties = counties.New(transport, formats)
cli.Countries = countries.New(transport, formats)
cli.Databases = databases.New(transport, formats)
cli.Domains = domains.New(transport, formats)
cli.FilingTypes = filing_types.New(transport, formats)
cli.Filings = filings.New(transport, formats)
cli.GlAccounts = gl_accounts.New(transport, formats)
cli.GlBalances = gl_balances.New(transport, formats)
cli.Ingests = ingests.New(transport, formats)
cli.Invoices = invoices.New(transport, formats)
cli.Jobs = jobs.New(transport, formats)
cli.LicenseTypes = license_types.New(transport, formats)
cli.Licenses = licenses.New(transport, formats)
cli.Notebooks = notebooks.New(transport, formats)
cli.Orders = orders.New(transport, formats)
cli.Periods = periods.New(transport, formats)
cli.Places = places.New(transport, formats)
cli.Products = products.New(transport, formats)
cli.PurchaseOrders = purchase_orders.New(transport, formats)
cli.Quotes = quotes.New(transport, formats)
cli.Roles = roles.New(transport, formats)
cli.Services = services.New(transport, formats)
cli.Statements = statements.New(transport, formats)
cli.States = states.New(transport, formats)
cli.Submissions = submissions.New(transport, formats)
cli.Subscriptions = subscriptions.New(transport, formats)
cli.TaxTypeAccounts = tax_type_accounts.New(transport, formats)
cli.TaxTypes = tax_types.New(transport, formats)
cli.TaxnexusCodes = taxnexus_codes.New(transport, formats)
cli.Templates = templates.New(transport, formats)
cli.Tenants = tenants.New(transport, formats)
cli.Users = users.New(transport, formats)
return cli
}
// DefaultTransportConfig creates a TransportConfig with the
// default settings taken from the meta section of the spec file.
func DefaultTransportConfig() *TransportConfig {
return &TransportConfig{
Host: DefaultHost,
BasePath: DefaultBasePath,
Schemes: DefaultSchemes,
}
}
// TransportConfig contains the transport related info,
// found in the meta section of the spec file.
type TransportConfig struct {
Host string
BasePath string
Schemes []string
}
// WithHost overrides the default host,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
cfg.Host = host
return cfg
}
// WithBasePath overrides the default basePath,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
cfg.BasePath = basePath
return cfg
}
// WithSchemes overrides the default schemes,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
cfg.Schemes = schemes
return cfg
}
// SfGate is a client for sf gate
type SfGate struct {
AccountingRules accounting_rules.ClientService
AccountingRulesets accounting_rulesets.ClientService
Accounts accounts.ClientService
Authorities authorities.ClientService
Backends backends.ClientService
CashReceipts cash_receipts.ClientService
Clusters clusters.ClientService
Companies companies.ClientService
Contacts contacts.ClientService
Counties counties.ClientService
Countries countries.ClientService
Databases databases.ClientService
Domains domains.ClientService
FilingTypes filing_types.ClientService
Filings filings.ClientService
GlAccounts gl_accounts.ClientService
GlBalances gl_balances.ClientService
Ingests ingests.ClientService
Invoices invoices.ClientService
Jobs jobs.ClientService
LicenseTypes license_types.ClientService
Licenses licenses.ClientService
Notebooks notebooks.ClientService
Orders orders.ClientService
Periods periods.ClientService
Places places.ClientService
Products products.ClientService
PurchaseOrders purchase_orders.ClientService
Quotes quotes.ClientService
Roles roles.ClientService
Services services.ClientService
Statements statements.ClientService
States states.ClientService
Submissions submissions.ClientService
Subscriptions subscriptions.ClientService
TaxTypeAccounts tax_type_accounts.ClientService
TaxTypes tax_types.ClientService
TaxnexusCodes taxnexus_codes.ClientService
Templates templates.ClientService
Tenants tenants.ClientService
Users users.ClientService
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
func (c *SfGate) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.AccountingRules.SetTransport(transport)
c.AccountingRulesets.SetTransport(transport)
c.Accounts.SetTransport(transport)
c.Authorities.SetTransport(transport)
c.Backends.SetTransport(transport)
c.CashReceipts.SetTransport(transport)
c.Clusters.SetTransport(transport)
c.Companies.SetTransport(transport)
c.Contacts.SetTransport(transport)
c.Counties.SetTransport(transport)
c.Countries.SetTransport(transport)
c.Databases.SetTransport(transport)
c.Domains.SetTransport(transport)
c.FilingTypes.SetTransport(transport)
c.Filings.SetTransport(transport)
c.GlAccounts.SetTransport(transport)
c.GlBalances.SetTransport(transport)
c.Ingests.SetTransport(transport)
c.Invoices.SetTransport(transport)
c.Jobs.SetTransport(transport)
c.LicenseTypes.SetTransport(transport)
c.Licenses.SetTransport(transport)
c.Notebooks.SetTransport(transport)
c.Orders.SetTransport(transport)
c.Periods.SetTransport(transport)
c.Places.SetTransport(transport)
c.Products.SetTransport(transport)
c.PurchaseOrders.SetTransport(transport)
c.Quotes.SetTransport(transport)
c.Roles.SetTransport(transport)
c.Services.SetTransport(transport)
c.Statements.SetTransport(transport)
c.States.SetTransport(transport)
c.Submissions.SetTransport(transport)
c.Subscriptions.SetTransport(transport)
c.TaxTypeAccounts.SetTransport(transport)
c.TaxTypes.SetTransport(transport)
c.TaxnexusCodes.SetTransport(transport)
c.Templates.SetTransport(transport)
c.Tenants.SetTransport(transport)
c.Users.SetTransport(transport)
}