// 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 regs_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/regs/regs_client/authority" "github.com/taxnexus/go/lib/api/regs/regs_client/backend" "github.com/taxnexus/go/lib/api/regs/regs_client/cors" "github.com/taxnexus/go/lib/api/regs/regs_client/filing" "github.com/taxnexus/go/lib/api/regs/regs_client/filing_type" "github.com/taxnexus/go/lib/api/regs/regs_client/license" "github.com/taxnexus/go/lib/api/regs/regs_client/license_type" "github.com/taxnexus/go/lib/api/regs/regs_client/notebook" "github.com/taxnexus/go/lib/api/regs/regs_client/rating_engine" "github.com/taxnexus/go/lib/api/regs/regs_client/submission" "github.com/taxnexus/go/lib/api/regs/regs_client/tax_type_account" "github.com/taxnexus/go/lib/api/regs/regs_client/transaction" ) // Default regs HTTP client. var Default = NewHTTPClient(nil) const ( // DefaultHost is the default Host // found in Meta (info) section of spec file DefaultHost string = "regs.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 regs HTTP client. func NewHTTPClient(formats strfmt.Registry) *Regs { return NewHTTPClientWithConfig(formats, nil) } // NewHTTPClientWithConfig creates a new regs HTTP client, // using a customizable transport config. func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Regs { // 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 regs client func New(transport runtime.ClientTransport, formats strfmt.Registry) *Regs { // ensure nullable parameters have default if formats == nil { formats = strfmt.Default } cli := new(Regs) cli.Transport = transport cli.Authority = authority.New(transport, formats) cli.Backend = backend.New(transport, formats) cli.Cors = cors.New(transport, formats) cli.Filing = filing.New(transport, formats) cli.FilingType = filing_type.New(transport, formats) cli.License = license.New(transport, formats) cli.LicenseType = license_type.New(transport, formats) cli.Notebook = notebook.New(transport, formats) cli.RatingEngine = rating_engine.New(transport, formats) cli.Submission = submission.New(transport, formats) cli.TaxTypeAccount = tax_type_account.New(transport, formats) cli.Transaction = transaction.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 } // Regs is a client for regs type Regs struct { Authority authority.ClientService Backend backend.ClientService Cors cors.ClientService Filing filing.ClientService FilingType filing_type.ClientService License license.ClientService LicenseType license_type.ClientService Notebook notebook.ClientService RatingEngine rating_engine.ClientService Submission submission.ClientService TaxTypeAccount tax_type_account.ClientService Transaction transaction.ClientService Transport runtime.ClientTransport } // SetTransport changes the transport on the client and all its subresources func (c *Regs) SetTransport(transport runtime.ClientTransport) { c.Transport = transport c.Authority.SetTransport(transport) c.Backend.SetTransport(transport) c.Cors.SetTransport(transport) c.Filing.SetTransport(transport) c.FilingType.SetTransport(transport) c.License.SetTransport(transport) c.LicenseType.SetTransport(transport) c.Notebook.SetTransport(transport) c.RatingEngine.SetTransport(transport) c.Submission.SetTransport(transport) c.TaxTypeAccount.SetTransport(transport) c.Transaction.SetTransport(transport) }