-
Notifications
You must be signed in to change notification settings - Fork 43
/
client.go
74 lines (60 loc) · 2.99 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package v2022_10_01
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/arcsettings"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/cluster"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/clusters"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/extensions"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/offers"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/publishers"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/skuses"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/updateruns"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/updates"
"github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/updatesummaries"
)
type Client struct {
ArcSettings *arcsettings.ArcSettingsClient
Cluster *cluster.ClusterClient
Clusters *clusters.ClustersClient
Extensions *extensions.ExtensionsClient
Offers *offers.OffersClient
Publishers *publishers.PublishersClient
Skuses *skuses.SkusesClient
UpdateRuns *updateruns.UpdateRunsClient
UpdateSummaries *updatesummaries.UpdateSummariesClient
Updates *updates.UpdatesClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
arcSettingsClient := arcsettings.NewArcSettingsClientWithBaseURI(endpoint)
configureAuthFunc(&arcSettingsClient.Client)
clusterClient := cluster.NewClusterClientWithBaseURI(endpoint)
configureAuthFunc(&clusterClient.Client)
clustersClient := clusters.NewClustersClientWithBaseURI(endpoint)
configureAuthFunc(&clustersClient.Client)
extensionsClient := extensions.NewExtensionsClientWithBaseURI(endpoint)
configureAuthFunc(&extensionsClient.Client)
offersClient := offers.NewOffersClientWithBaseURI(endpoint)
configureAuthFunc(&offersClient.Client)
publishersClient := publishers.NewPublishersClientWithBaseURI(endpoint)
configureAuthFunc(&publishersClient.Client)
skusesClient := skuses.NewSkusesClientWithBaseURI(endpoint)
configureAuthFunc(&skusesClient.Client)
updateRunsClient := updateruns.NewUpdateRunsClientWithBaseURI(endpoint)
configureAuthFunc(&updateRunsClient.Client)
updateSummariesClient := updatesummaries.NewUpdateSummariesClientWithBaseURI(endpoint)
configureAuthFunc(&updateSummariesClient.Client)
updatesClient := updates.NewUpdatesClientWithBaseURI(endpoint)
configureAuthFunc(&updatesClient.Client)
return Client{
ArcSettings: &arcSettingsClient,
Cluster: &clusterClient,
Clusters: &clustersClient,
Extensions: &extensionsClient,
Offers: &offersClient,
Publishers: &publishersClient,
Skuses: &skusesClient,
UpdateRuns: &updateRunsClient,
UpdateSummaries: &updateSummariesClient,
Updates: &updatesClient,
}
}