-
Notifications
You must be signed in to change notification settings - Fork 40
/
client.go
56 lines (45 loc) · 2.45 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
package v2020_07_01
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/deploymentinfo"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitoredresources"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/monitorsresource"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/vmcollectionupdate"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/vmhhostlist"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/vmingestiondetails"
)
type Client struct {
DeploymentInfo *deploymentinfo.DeploymentInfoClient
MonitoredResources *monitoredresources.MonitoredResourcesClient
MonitorsResource *monitorsresource.MonitorsResourceClient
Rules *rules.RulesClient
VMCollectionUpdate *vmcollectionupdate.VMCollectionUpdateClient
VMHHostList *vmhhostlist.VMHHostListClient
VMIngestionDetails *vmingestiondetails.VMIngestionDetailsClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
deploymentInfoClient := deploymentinfo.NewDeploymentInfoClientWithBaseURI(endpoint)
configureAuthFunc(&deploymentInfoClient.Client)
monitoredResourcesClient := monitoredresources.NewMonitoredResourcesClientWithBaseURI(endpoint)
configureAuthFunc(&monitoredResourcesClient.Client)
monitorsResourceClient := monitorsresource.NewMonitorsResourceClientWithBaseURI(endpoint)
configureAuthFunc(&monitorsResourceClient.Client)
rulesClient := rules.NewRulesClientWithBaseURI(endpoint)
configureAuthFunc(&rulesClient.Client)
vMCollectionUpdateClient := vmcollectionupdate.NewVMCollectionUpdateClientWithBaseURI(endpoint)
configureAuthFunc(&vMCollectionUpdateClient.Client)
vMHHostListClient := vmhhostlist.NewVMHHostListClientWithBaseURI(endpoint)
configureAuthFunc(&vMHHostListClient.Client)
vMIngestionDetailsClient := vmingestiondetails.NewVMIngestionDetailsClientWithBaseURI(endpoint)
configureAuthFunc(&vMIngestionDetailsClient.Client)
return Client{
DeploymentInfo: &deploymentInfoClient,
MonitoredResources: &monitoredResourcesClient,
MonitorsResource: &monitorsResourceClient,
Rules: &rulesClient,
VMCollectionUpdate: &vMCollectionUpdateClient,
VMHHostList: &vMHHostListClient,
VMIngestionDetails: &vMIngestionDetailsClient,
}
}