-
Notifications
You must be signed in to change notification settings - Fork 46
/
client.go
53 lines (42 loc) · 2.7 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
package v2022_07_01_preview
// 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/maintenance/2022-07-01-preview/applyupdate"
"github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/applyupdates"
"github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments"
"github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations"
"github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations"
"github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/updates"
)
type Client struct {
ApplyUpdate *applyupdate.ApplyUpdateClient
ApplyUpdates *applyupdates.ApplyUpdatesClient
ConfigurationAssignments *configurationassignments.ConfigurationAssignmentsClient
MaintenanceConfigurations *maintenanceconfigurations.MaintenanceConfigurationsClient
PublicMaintenanceConfigurations *publicmaintenanceconfigurations.PublicMaintenanceConfigurationsClient
Updates *updates.UpdatesClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
applyUpdateClient := applyupdate.NewApplyUpdateClientWithBaseURI(endpoint)
configureAuthFunc(&applyUpdateClient.Client)
applyUpdatesClient := applyupdates.NewApplyUpdatesClientWithBaseURI(endpoint)
configureAuthFunc(&applyUpdatesClient.Client)
configurationAssignmentsClient := configurationassignments.NewConfigurationAssignmentsClientWithBaseURI(endpoint)
configureAuthFunc(&configurationAssignmentsClient.Client)
maintenanceConfigurationsClient := maintenanceconfigurations.NewMaintenanceConfigurationsClientWithBaseURI(endpoint)
configureAuthFunc(&maintenanceConfigurationsClient.Client)
publicMaintenanceConfigurationsClient := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationsClientWithBaseURI(endpoint)
configureAuthFunc(&publicMaintenanceConfigurationsClient.Client)
updatesClient := updates.NewUpdatesClientWithBaseURI(endpoint)
configureAuthFunc(&updatesClient.Client)
return Client{
ApplyUpdate: &applyUpdateClient,
ApplyUpdates: &applyUpdatesClient,
ConfigurationAssignments: &configurationAssignmentsClient,
MaintenanceConfigurations: &maintenanceConfigurationsClient,
PublicMaintenanceConfigurations: &publicMaintenanceConfigurationsClient,
Updates: &updatesClient,
}
}