-
Notifications
You must be signed in to change notification settings - Fork 45
/
client.go
59 lines (47 loc) · 2.66 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
package v2021_06_22
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/hybridrunbookworker"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/hybridrunbookworkergroup"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/listkeys"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/operations"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/statistics"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/usages"
)
type Client struct {
AutomationAccount *automationaccount.AutomationAccountClient
HybridRunbookWorker *hybridrunbookworker.HybridRunbookWorkerClient
HybridRunbookWorkerGroup *hybridrunbookworkergroup.HybridRunbookWorkerGroupClient
ListKeys *listkeys.ListKeysClient
Operations *operations.OperationsClient
Statistics *statistics.StatisticsClient
Usages *usages.UsagesClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
automationAccountClient := automationaccount.NewAutomationAccountClientWithBaseURI(endpoint)
configureAuthFunc(&automationAccountClient.Client)
hybridRunbookWorkerClient := hybridrunbookworker.NewHybridRunbookWorkerClientWithBaseURI(endpoint)
configureAuthFunc(&hybridRunbookWorkerClient.Client)
hybridRunbookWorkerGroupClient := hybridrunbookworkergroup.NewHybridRunbookWorkerGroupClientWithBaseURI(endpoint)
configureAuthFunc(&hybridRunbookWorkerGroupClient.Client)
listKeysClient := listkeys.NewListKeysClientWithBaseURI(endpoint)
configureAuthFunc(&listKeysClient.Client)
operationsClient := operations.NewOperationsClientWithBaseURI(endpoint)
configureAuthFunc(&operationsClient.Client)
statisticsClient := statistics.NewStatisticsClientWithBaseURI(endpoint)
configureAuthFunc(&statisticsClient.Client)
usagesClient := usages.NewUsagesClientWithBaseURI(endpoint)
configureAuthFunc(&usagesClient.Client)
return Client{
AutomationAccount: &automationAccountClient,
HybridRunbookWorker: &hybridRunbookWorkerClient,
HybridRunbookWorkerGroup: &hybridRunbookWorkerGroupClient,
ListKeys: &listKeysClient,
Operations: &operationsClient,
Statistics: &statisticsClient,
Usages: &usagesClient,
}
}