lib/api/members/members_client/members_client.go

247 lines
8.1 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2023 by Vernon Keenan
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package members_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/work/lib/api/members/members_client/attendees"
"code.tnxs.net/work/lib/api/members/members_client/certificates"
"code.tnxs.net/work/lib/api/members/members_client/clusters"
"code.tnxs.net/work/lib/api/members/members_client/courses"
"code.tnxs.net/work/lib/api/members/members_client/databases"
"code.tnxs.net/work/lib/api/members/members_client/documents"
"code.tnxs.net/work/lib/api/members/members_client/emails"
"code.tnxs.net/work/lib/api/members/members_client/enrollments"
"code.tnxs.net/work/lib/api/members/members_client/events"
"code.tnxs.net/work/lib/api/members/members_client/favorites"
"code.tnxs.net/work/lib/api/members/members_client/invoices"
"code.tnxs.net/work/lib/api/members/members_client/issued_certificates"
"code.tnxs.net/work/lib/api/members/members_client/lesson_progress"
"code.tnxs.net/work/lib/api/members/members_client/orders"
"code.tnxs.net/work/lib/api/members/members_client/payment_methods"
"code.tnxs.net/work/lib/api/members/members_client/prompts"
"code.tnxs.net/work/lib/api/members/members_client/research_projects"
"code.tnxs.net/work/lib/api/members/members_client/templates"
"code.tnxs.net/work/lib/api/members/members_client/tenants"
"code.tnxs.net/work/lib/api/members/members_client/tickets"
"code.tnxs.net/work/lib/api/members/members_client/track_events"
"code.tnxs.net/work/lib/api/members/members_client/track_topics"
"code.tnxs.net/work/lib/api/members/members_client/track_users"
"code.tnxs.net/work/lib/api/members/members_client/tracks"
"code.tnxs.net/work/lib/api/members/members_client/transactions"
"code.tnxs.net/work/lib/api/members/members_client/users"
"code.tnxs.net/work/lib/api/members/members_client/webhooks"
)
// Default members HTTP client.
var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
DefaultHost string = "members.work.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 members HTTP client.
func NewHTTPClient(formats strfmt.Registry) *Members {
return NewHTTPClientWithConfig(formats, nil)
}
// NewHTTPClientWithConfig creates a new members HTTP client,
// using a customizable transport config.
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Members {
// 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 members client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Members {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(Members)
cli.Transport = transport
cli.Attendees = attendees.New(transport, formats)
cli.Certificates = certificates.New(transport, formats)
cli.Clusters = clusters.New(transport, formats)
cli.Courses = courses.New(transport, formats)
cli.Databases = databases.New(transport, formats)
cli.Documents = documents.New(transport, formats)
cli.Emails = emails.New(transport, formats)
cli.Enrollments = enrollments.New(transport, formats)
cli.Events = events.New(transport, formats)
cli.Favorites = favorites.New(transport, formats)
cli.Invoices = invoices.New(transport, formats)
cli.IssuedCertificates = issued_certificates.New(transport, formats)
cli.LessonProgress = lesson_progress.New(transport, formats)
cli.Orders = orders.New(transport, formats)
cli.PaymentMethods = payment_methods.New(transport, formats)
cli.Prompts = prompts.New(transport, formats)
cli.ResearchProjects = research_projects.New(transport, formats)
cli.Templates = templates.New(transport, formats)
cli.Tenants = tenants.New(transport, formats)
cli.Tickets = tickets.New(transport, formats)
cli.TrackEvents = track_events.New(transport, formats)
cli.TrackTopics = track_topics.New(transport, formats)
cli.TrackUsers = track_users.New(transport, formats)
cli.Tracks = tracks.New(transport, formats)
cli.Transactions = transactions.New(transport, formats)
cli.Users = users.New(transport, formats)
cli.Webhooks = webhooks.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
}
// Members is a client for members
type Members struct {
Attendees attendees.ClientService
Certificates certificates.ClientService
Clusters clusters.ClientService
Courses courses.ClientService
Databases databases.ClientService
Documents documents.ClientService
Emails emails.ClientService
Enrollments enrollments.ClientService
Events events.ClientService
Favorites favorites.ClientService
Invoices invoices.ClientService
IssuedCertificates issued_certificates.ClientService
LessonProgress lesson_progress.ClientService
Orders orders.ClientService
PaymentMethods payment_methods.ClientService
Prompts prompts.ClientService
ResearchProjects research_projects.ClientService
Templates templates.ClientService
Tenants tenants.ClientService
Tickets tickets.ClientService
TrackEvents track_events.ClientService
TrackTopics track_topics.ClientService
TrackUsers track_users.ClientService
Tracks tracks.ClientService
Transactions transactions.ClientService
Users users.ClientService
Webhooks webhooks.ClientService
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
func (c *Members) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.Attendees.SetTransport(transport)
c.Certificates.SetTransport(transport)
c.Clusters.SetTransport(transport)
c.Courses.SetTransport(transport)
c.Databases.SetTransport(transport)
c.Documents.SetTransport(transport)
c.Emails.SetTransport(transport)
c.Enrollments.SetTransport(transport)
c.Events.SetTransport(transport)
c.Favorites.SetTransport(transport)
c.Invoices.SetTransport(transport)
c.IssuedCertificates.SetTransport(transport)
c.LessonProgress.SetTransport(transport)
c.Orders.SetTransport(transport)
c.PaymentMethods.SetTransport(transport)
c.Prompts.SetTransport(transport)
c.ResearchProjects.SetTransport(transport)
c.Templates.SetTransport(transport)
c.Tenants.SetTransport(transport)
c.Tickets.SetTransport(transport)
c.TrackEvents.SetTransport(transport)
c.TrackTopics.SetTransport(transport)
c.TrackUsers.SetTransport(transport)
c.Tracks.SetTransport(transport)
c.Transactions.SetTransport(transport)
c.Users.SetTransport(transport)
c.Webhooks.SetTransport(transport)
}