lib/api/sfgate/sfgate_client/sfgate_client.go

222 lines
7.3 KiB
Go
Raw Normal View History

2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
2021-08-05 19:37:53 +00:00
package sfgate_client
2021-07-31 03:05:02 +00:00
// 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"
2021-08-05 19:37:53 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/accounts"
2022-09-05 00:01:32 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/assets"
2021-08-14 22:34:08 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/clusters"
2022-09-05 00:01:32 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/company_products"
2021-08-05 19:37:53 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contacts"
2022-05-28 19:45:41 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contracts"
2023-04-30 02:07:31 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/courses"
2021-08-14 22:34:08 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/databases"
2023-04-30 02:07:31 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/events"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/factors"
2023-05-13 16:46:48 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/favorites"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/financial_statements"
2022-09-05 00:01:32 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industries"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_companies"
2022-09-05 00:01:32 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_products"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/observations"
2023-05-13 16:46:48 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/research_projects"
2021-08-05 19:37:53 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/roles"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/templates"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/tenants"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/topics"
2021-08-05 19:37:53 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/users"
2021-07-31 03:05:02 +00:00
)
2021-08-05 19:37:53 +00:00
// Default sfgate HTTP client.
2021-07-31 03:05:02 +00:00
var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
2021-08-14 22:34:08 +00:00
DefaultHost string = "sf-gate.vernonkeenan.com:8080"
2021-07-31 03:05:02 +00:00
// 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"}
2021-08-05 19:37:53 +00:00
// NewHTTPClient creates a new sfgate HTTP client.
func NewHTTPClient(formats strfmt.Registry) *Sfgate {
2021-07-31 03:05:02 +00:00
return NewHTTPClientWithConfig(formats, nil)
}
2021-08-05 19:37:53 +00:00
// NewHTTPClientWithConfig creates a new sfgate HTTP client,
2021-07-31 03:05:02 +00:00
// using a customizable transport config.
2021-08-05 19:37:53 +00:00
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Sfgate {
2021-07-31 03:05:02 +00:00
// 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)
}
2021-08-05 19:37:53 +00:00
// New creates a new sfgate client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Sfgate {
2021-07-31 03:05:02 +00:00
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
2021-08-05 19:37:53 +00:00
cli := new(Sfgate)
2021-07-31 03:05:02 +00:00
cli.Transport = transport
2021-08-05 19:37:53 +00:00
cli.Accounts = accounts.New(transport, formats)
2022-09-05 00:01:32 +00:00
cli.Assets = assets.New(transport, formats)
2021-08-14 22:34:08 +00:00
cli.Clusters = clusters.New(transport, formats)
2022-09-05 00:01:32 +00:00
cli.CompanyProducts = company_products.New(transport, formats)
2021-08-05 19:37:53 +00:00
cli.Contacts = contacts.New(transport, formats)
2022-05-28 19:45:41 +00:00
cli.Contracts = contracts.New(transport, formats)
2023-04-30 02:07:31 +00:00
cli.Courses = courses.New(transport, formats)
2021-08-14 22:34:08 +00:00
cli.Databases = databases.New(transport, formats)
2023-04-30 02:07:31 +00:00
cli.Events = events.New(transport, formats)
cli.Factors = factors.New(transport, formats)
2023-05-13 16:46:48 +00:00
cli.Favorites = favorites.New(transport, formats)
cli.FinancialStatements = financial_statements.New(transport, formats)
2022-09-05 00:01:32 +00:00
cli.Industries = industries.New(transport, formats)
cli.IndustryCompanies = industry_companies.New(transport, formats)
2022-09-05 00:01:32 +00:00
cli.IndustryProducts = industry_products.New(transport, formats)
cli.Observations = observations.New(transport, formats)
2023-05-13 16:46:48 +00:00
cli.ResearchProjects = research_projects.New(transport, formats)
2021-08-05 19:37:53 +00:00
cli.Roles = roles.New(transport, formats)
cli.Templates = templates.New(transport, formats)
cli.Tenants = tenants.New(transport, formats)
cli.Topics = topics.New(transport, formats)
2021-08-05 19:37:53 +00:00
cli.Users = users.New(transport, formats)
2021-07-31 03:05:02 +00:00
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
}
2021-08-05 19:37:53 +00:00
// Sfgate is a client for sfgate
type Sfgate struct {
Accounts accounts.ClientService
2021-07-31 03:05:02 +00:00
2022-09-05 00:01:32 +00:00
Assets assets.ClientService
2021-08-14 22:34:08 +00:00
Clusters clusters.ClientService
2021-07-31 03:05:02 +00:00
2022-09-05 00:01:32 +00:00
CompanyProducts company_products.ClientService
2021-08-05 19:37:53 +00:00
Contacts contacts.ClientService
2021-07-31 03:05:02 +00:00
2022-05-28 19:45:41 +00:00
Contracts contracts.ClientService
2023-04-30 02:07:31 +00:00
Courses courses.ClientService
2021-08-14 22:34:08 +00:00
Databases databases.ClientService
2021-07-31 03:05:02 +00:00
2023-04-30 02:07:31 +00:00
Events events.ClientService
Factors factors.ClientService
2023-05-13 16:46:48 +00:00
Favorites favorites.ClientService
FinancialStatements financial_statements.ClientService
2022-09-05 00:01:32 +00:00
Industries industries.ClientService
IndustryCompanies industry_companies.ClientService
2022-09-05 00:01:32 +00:00
IndustryProducts industry_products.ClientService
Observations observations.ClientService
2022-09-05 00:01:32 +00:00
2023-05-13 16:46:48 +00:00
ResearchProjects research_projects.ClientService
2021-08-05 19:37:53 +00:00
Roles roles.ClientService
2021-07-31 03:05:02 +00:00
2021-08-05 19:37:53 +00:00
Templates templates.ClientService
Tenants tenants.ClientService
Topics topics.ClientService
2021-08-05 19:37:53 +00:00
Users users.ClientService
2021-07-31 03:05:02 +00:00
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
2021-08-05 19:37:53 +00:00
func (c *Sfgate) SetTransport(transport runtime.ClientTransport) {
2021-07-31 03:05:02 +00:00
c.Transport = transport
2021-08-05 19:37:53 +00:00
c.Accounts.SetTransport(transport)
2022-09-05 00:01:32 +00:00
c.Assets.SetTransport(transport)
2021-08-14 22:34:08 +00:00
c.Clusters.SetTransport(transport)
2022-09-05 00:01:32 +00:00
c.CompanyProducts.SetTransport(transport)
2021-08-05 19:37:53 +00:00
c.Contacts.SetTransport(transport)
2022-05-28 19:45:41 +00:00
c.Contracts.SetTransport(transport)
2023-04-30 02:07:31 +00:00
c.Courses.SetTransport(transport)
2021-08-14 22:34:08 +00:00
c.Databases.SetTransport(transport)
2023-04-30 02:07:31 +00:00
c.Events.SetTransport(transport)
c.Factors.SetTransport(transport)
2023-05-13 16:46:48 +00:00
c.Favorites.SetTransport(transport)
c.FinancialStatements.SetTransport(transport)
2022-09-05 00:01:32 +00:00
c.Industries.SetTransport(transport)
c.IndustryCompanies.SetTransport(transport)
2022-09-05 00:01:32 +00:00
c.IndustryProducts.SetTransport(transport)
c.Observations.SetTransport(transport)
2023-05-13 16:46:48 +00:00
c.ResearchProjects.SetTransport(transport)
2021-08-05 19:37:53 +00:00
c.Roles.SetTransport(transport)
c.Templates.SetTransport(transport)
c.Tenants.SetTransport(transport)
c.Topics.SetTransport(transport)
2021-08-05 19:37:53 +00:00
c.Users.SetTransport(transport)
2021-07-31 03:05:02 +00:00
}