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

317 lines
11 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 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"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/accounting_rules"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/accounting_rulesets"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/accounts"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/authorities"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/backends"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/cash_receipts"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/clusters"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/companies"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/contacts"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/counties"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/countries"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/databases"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/domains"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/filing_types"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/filings"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/gl_accounts"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/gl_balances"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/ingests"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/invoices"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/jobs"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/license_types"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/licenses"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/notebooks"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/orders"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/periods"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/places"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/products"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/purchase_orders"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/quotes"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/roles"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/services"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/statements"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/states"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/submissions"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/subscriptions"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/tax_type_accounts"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/tax_types"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/taxnexus_codes"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/templates"
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_client/tenants"
"code.tnxs.net/taxnexus/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)
}