-
Notifications
You must be signed in to change notification settings - Fork 46
/
client.go
131 lines (107 loc) · 6.44 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package v2022_01_01
// 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/netapp/2022-01-01/backuppolicy"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/backups"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/capacitypools"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/netappaccounts"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/netappresource"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/poolchange"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/resetcifspassword"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/restore"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/snapshotpolicy"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/snapshotpolicylistvolumes"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/snapshots"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/subvolumes"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/vaults"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/volumegroups"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/volumequotarules"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/volumes"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/volumesrelocation"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/volumesreplication"
"github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-01-01/volumesrevert"
)
type Client struct {
BackupPolicy *backuppolicy.BackupPolicyClient
Backups *backups.BackupsClient
CapacityPools *capacitypools.CapacityPoolsClient
NetAppAccounts *netappaccounts.NetAppAccountsClient
NetAppResource *netappresource.NetAppResourceClient
PoolChange *poolchange.PoolChangeClient
ResetCifsPassword *resetcifspassword.ResetCifsPasswordClient
Restore *restore.RestoreClient
SnapshotPolicy *snapshotpolicy.SnapshotPolicyClient
SnapshotPolicyListVolumes *snapshotpolicylistvolumes.SnapshotPolicyListVolumesClient
Snapshots *snapshots.SnapshotsClient
SubVolumes *subvolumes.SubVolumesClient
Vaults *vaults.VaultsClient
VolumeGroups *volumegroups.VolumeGroupsClient
VolumeQuotaRules *volumequotarules.VolumeQuotaRulesClient
Volumes *volumes.VolumesClient
VolumesRelocation *volumesrelocation.VolumesRelocationClient
VolumesReplication *volumesreplication.VolumesReplicationClient
VolumesRevert *volumesrevert.VolumesRevertClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
backupPolicyClient := backuppolicy.NewBackupPolicyClientWithBaseURI(endpoint)
configureAuthFunc(&backupPolicyClient.Client)
backupsClient := backups.NewBackupsClientWithBaseURI(endpoint)
configureAuthFunc(&backupsClient.Client)
capacityPoolsClient := capacitypools.NewCapacityPoolsClientWithBaseURI(endpoint)
configureAuthFunc(&capacityPoolsClient.Client)
netAppAccountsClient := netappaccounts.NewNetAppAccountsClientWithBaseURI(endpoint)
configureAuthFunc(&netAppAccountsClient.Client)
netAppResourceClient := netappresource.NewNetAppResourceClientWithBaseURI(endpoint)
configureAuthFunc(&netAppResourceClient.Client)
poolChangeClient := poolchange.NewPoolChangeClientWithBaseURI(endpoint)
configureAuthFunc(&poolChangeClient.Client)
resetCifsPasswordClient := resetcifspassword.NewResetCifsPasswordClientWithBaseURI(endpoint)
configureAuthFunc(&resetCifsPasswordClient.Client)
restoreClient := restore.NewRestoreClientWithBaseURI(endpoint)
configureAuthFunc(&restoreClient.Client)
snapshotPolicyClient := snapshotpolicy.NewSnapshotPolicyClientWithBaseURI(endpoint)
configureAuthFunc(&snapshotPolicyClient.Client)
snapshotPolicyListVolumesClient := snapshotpolicylistvolumes.NewSnapshotPolicyListVolumesClientWithBaseURI(endpoint)
configureAuthFunc(&snapshotPolicyListVolumesClient.Client)
snapshotsClient := snapshots.NewSnapshotsClientWithBaseURI(endpoint)
configureAuthFunc(&snapshotsClient.Client)
subVolumesClient := subvolumes.NewSubVolumesClientWithBaseURI(endpoint)
configureAuthFunc(&subVolumesClient.Client)
vaultsClient := vaults.NewVaultsClientWithBaseURI(endpoint)
configureAuthFunc(&vaultsClient.Client)
volumeGroupsClient := volumegroups.NewVolumeGroupsClientWithBaseURI(endpoint)
configureAuthFunc(&volumeGroupsClient.Client)
volumeQuotaRulesClient := volumequotarules.NewVolumeQuotaRulesClientWithBaseURI(endpoint)
configureAuthFunc(&volumeQuotaRulesClient.Client)
volumesClient := volumes.NewVolumesClientWithBaseURI(endpoint)
configureAuthFunc(&volumesClient.Client)
volumesRelocationClient := volumesrelocation.NewVolumesRelocationClientWithBaseURI(endpoint)
configureAuthFunc(&volumesRelocationClient.Client)
volumesReplicationClient := volumesreplication.NewVolumesReplicationClientWithBaseURI(endpoint)
configureAuthFunc(&volumesReplicationClient.Client)
volumesRevertClient := volumesrevert.NewVolumesRevertClientWithBaseURI(endpoint)
configureAuthFunc(&volumesRevertClient.Client)
return Client{
BackupPolicy: &backupPolicyClient,
Backups: &backupsClient,
CapacityPools: &capacityPoolsClient,
NetAppAccounts: &netAppAccountsClient,
NetAppResource: &netAppResourceClient,
PoolChange: &poolChangeClient,
ResetCifsPassword: &resetCifsPasswordClient,
Restore: &restoreClient,
SnapshotPolicy: &snapshotPolicyClient,
SnapshotPolicyListVolumes: &snapshotPolicyListVolumesClient,
Snapshots: &snapshotsClient,
SubVolumes: &subVolumesClient,
Vaults: &vaultsClient,
VolumeGroups: &volumeGroupsClient,
VolumeQuotaRules: &volumeQuotaRulesClient,
Volumes: &volumesClient,
VolumesRelocation: &volumesRelocationClient,
VolumesReplication: &volumesReplicationClient,
VolumesRevert: &volumesRevertClient,
}
}