9
9
# regenerated.
10
10
# --------------------------------------------------------------------------
11
11
12
- from azure .mgmt .core import ARMPipelineClient
13
- from msrest import Serializer , Deserializer
12
+ from typing import TYPE_CHECKING
13
+
14
+ from msrest import Deserializer , Serializer
14
15
16
+ from azure .mgmt .core import ARMPipelineClient
15
17
from azure .profiles import KnownProfiles , ProfileDefinition
16
18
from azure .profiles .multiapiclient import MultiApiClientMixin
19
+
17
20
from ._configuration import DataBoxManagementClientConfiguration
21
+ from ._operations_mixin import DataBoxManagementClientOperationsMixin
22
+
23
+ if TYPE_CHECKING :
24
+ # pylint: disable=unused-import,ungrouped-imports
25
+ from typing import Any , Optional
26
+
27
+ from azure .core .credentials import TokenCredential
18
28
19
29
class _SDKClient (object ):
20
30
def __init__ (self , * args , ** kwargs ):
@@ -23,7 +33,7 @@ def __init__(self, *args, **kwargs):
23
33
"""
24
34
pass
25
35
26
- class DataBoxManagementClient (MultiApiClientMixin , _SDKClient ):
36
+ class DataBoxManagementClient (DataBoxManagementClientOperationsMixin , MultiApiClientMixin , _SDKClient ):
27
37
"""The DataBox Client.
28
38
29
39
This ready contains multiple API versions, to help you deal with all of the Azure clouds
@@ -38,15 +48,16 @@ class DataBoxManagementClient(MultiApiClientMixin, _SDKClient):
38
48
:type credential: ~azure.core.credentials.TokenCredential
39
49
:param subscription_id: The Subscription Id.
40
50
:type subscription_id: str
41
- :param str api_version: API version to use if no profile is provided, or if
42
- missing in profile.
43
- :param str base_url: Service URL
51
+ :param api_version: API version to use if no profile is provided, or if missing in profile.
52
+ :type api_version: str
53
+ :param base_url: Service URL
54
+ :type base_url: str
44
55
:param profile: A profile definition, from KnownProfiles to dict.
45
56
:type profile: azure.profiles.KnownProfiles
46
57
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
47
58
"""
48
59
49
- DEFAULT_API_VERSION = '2020-11 -01'
60
+ DEFAULT_API_VERSION = '2022-02 -01'
50
61
_PROFILE_TAG = "azure.mgmt.databox.DataBoxManagementClient"
51
62
LATEST_PROFILE = ProfileDefinition ({
52
63
_PROFILE_TAG : {
@@ -59,13 +70,11 @@ def __init__(
59
70
self ,
60
71
credential , # type: "TokenCredential"
61
72
subscription_id , # type: str
62
- api_version = None ,
63
- base_url = None ,
64
- profile = KnownProfiles .default ,
73
+ api_version = None , # type: Optional[str]
74
+ base_url = "https://management.azure.com" , # type: str
75
+ profile = KnownProfiles .default , # type: KnownProfiles
65
76
** kwargs # type: Any
66
77
):
67
- if not base_url :
68
- base_url = 'https://management.azure.com'
69
78
self ._config = DataBoxManagementClientConfiguration (credential , subscription_id , ** kwargs )
70
79
self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
71
80
super (DataBoxManagementClient , self ).__init__ (
@@ -85,6 +94,11 @@ def models(cls, api_version=DEFAULT_API_VERSION):
85
94
* 2019-09-01: :mod:`v2019_09_01.models<azure.mgmt.databox.v2019_09_01.models>`
86
95
* 2020-04-01: :mod:`v2020_04_01.models<azure.mgmt.databox.v2020_04_01.models>`
87
96
* 2020-11-01: :mod:`v2020_11_01.models<azure.mgmt.databox.v2020_11_01.models>`
97
+ * 2021-03-01: :mod:`v2021_03_01.models<azure.mgmt.databox.v2021_03_01.models>`
98
+ * 2021-05-01: :mod:`v2021_05_01.models<azure.mgmt.databox.v2021_05_01.models>`
99
+ * 2021-08-01-preview: :mod:`v2021_08_01_preview.models<azure.mgmt.databox.v2021_08_01_preview.models>`
100
+ * 2021-12-01: :mod:`v2021_12_01.models<azure.mgmt.databox.v2021_12_01.models>`
101
+ * 2022-02-01: :mod:`v2022_02_01.models<azure.mgmt.databox.v2022_02_01.models>`
88
102
"""
89
103
if api_version == '2018-01-01' :
90
104
from .v2018_01_01 import models
@@ -98,6 +112,21 @@ def models(cls, api_version=DEFAULT_API_VERSION):
98
112
elif api_version == '2020-11-01' :
99
113
from .v2020_11_01 import models
100
114
return models
115
+ elif api_version == '2021-03-01' :
116
+ from .v2021_03_01 import models
117
+ return models
118
+ elif api_version == '2021-05-01' :
119
+ from .v2021_05_01 import models
120
+ return models
121
+ elif api_version == '2021-08-01-preview' :
122
+ from .v2021_08_01_preview import models
123
+ return models
124
+ elif api_version == '2021-12-01' :
125
+ from .v2021_12_01 import models
126
+ return models
127
+ elif api_version == '2022-02-01' :
128
+ from .v2022_02_01 import models
129
+ return models
101
130
raise ValueError ("API version {} is not available" .format (api_version ))
102
131
103
132
@property
@@ -108,6 +137,11 @@ def jobs(self):
108
137
* 2019-09-01: :class:`JobsOperations<azure.mgmt.databox.v2019_09_01.operations.JobsOperations>`
109
138
* 2020-04-01: :class:`JobsOperations<azure.mgmt.databox.v2020_04_01.operations.JobsOperations>`
110
139
* 2020-11-01: :class:`JobsOperations<azure.mgmt.databox.v2020_11_01.operations.JobsOperations>`
140
+ * 2021-03-01: :class:`JobsOperations<azure.mgmt.databox.v2021_03_01.operations.JobsOperations>`
141
+ * 2021-05-01: :class:`JobsOperations<azure.mgmt.databox.v2021_05_01.operations.JobsOperations>`
142
+ * 2021-08-01-preview: :class:`JobsOperations<azure.mgmt.databox.v2021_08_01_preview.operations.JobsOperations>`
143
+ * 2021-12-01: :class:`JobsOperations<azure.mgmt.databox.v2021_12_01.operations.JobsOperations>`
144
+ * 2022-02-01: :class:`JobsOperations<azure.mgmt.databox.v2022_02_01.operations.JobsOperations>`
111
145
"""
112
146
api_version = self ._get_api_version ('jobs' )
113
147
if api_version == '2018-01-01' :
@@ -118,6 +152,16 @@ def jobs(self):
118
152
from .v2020_04_01 .operations import JobsOperations as OperationClass
119
153
elif api_version == '2020-11-01' :
120
154
from .v2020_11_01 .operations import JobsOperations as OperationClass
155
+ elif api_version == '2021-03-01' :
156
+ from .v2021_03_01 .operations import JobsOperations as OperationClass
157
+ elif api_version == '2021-05-01' :
158
+ from .v2021_05_01 .operations import JobsOperations as OperationClass
159
+ elif api_version == '2021-08-01-preview' :
160
+ from .v2021_08_01_preview .operations import JobsOperations as OperationClass
161
+ elif api_version == '2021-12-01' :
162
+ from .v2021_12_01 .operations import JobsOperations as OperationClass
163
+ elif api_version == '2022-02-01' :
164
+ from .v2022_02_01 .operations import JobsOperations as OperationClass
121
165
else :
122
166
raise ValueError ("API version {} does not have operation group 'jobs'" .format (api_version ))
123
167
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
@@ -130,6 +174,11 @@ def operations(self):
130
174
* 2019-09-01: :class:`Operations<azure.mgmt.databox.v2019_09_01.operations.Operations>`
131
175
* 2020-04-01: :class:`Operations<azure.mgmt.databox.v2020_04_01.operations.Operations>`
132
176
* 2020-11-01: :class:`Operations<azure.mgmt.databox.v2020_11_01.operations.Operations>`
177
+ * 2021-03-01: :class:`Operations<azure.mgmt.databox.v2021_03_01.operations.Operations>`
178
+ * 2021-05-01: :class:`Operations<azure.mgmt.databox.v2021_05_01.operations.Operations>`
179
+ * 2021-08-01-preview: :class:`Operations<azure.mgmt.databox.v2021_08_01_preview.operations.Operations>`
180
+ * 2021-12-01: :class:`Operations<azure.mgmt.databox.v2021_12_01.operations.Operations>`
181
+ * 2022-02-01: :class:`Operations<azure.mgmt.databox.v2022_02_01.operations.Operations>`
133
182
"""
134
183
api_version = self ._get_api_version ('operations' )
135
184
if api_version == '2018-01-01' :
@@ -140,6 +189,16 @@ def operations(self):
140
189
from .v2020_04_01 .operations import Operations as OperationClass
141
190
elif api_version == '2020-11-01' :
142
191
from .v2020_11_01 .operations import Operations as OperationClass
192
+ elif api_version == '2021-03-01' :
193
+ from .v2021_03_01 .operations import Operations as OperationClass
194
+ elif api_version == '2021-05-01' :
195
+ from .v2021_05_01 .operations import Operations as OperationClass
196
+ elif api_version == '2021-08-01-preview' :
197
+ from .v2021_08_01_preview .operations import Operations as OperationClass
198
+ elif api_version == '2021-12-01' :
199
+ from .v2021_12_01 .operations import Operations as OperationClass
200
+ elif api_version == '2022-02-01' :
201
+ from .v2022_02_01 .operations import Operations as OperationClass
143
202
else :
144
203
raise ValueError ("API version {} does not have operation group 'operations'" .format (api_version ))
145
204
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
@@ -152,6 +211,11 @@ def service(self):
152
211
* 2019-09-01: :class:`ServiceOperations<azure.mgmt.databox.v2019_09_01.operations.ServiceOperations>`
153
212
* 2020-04-01: :class:`ServiceOperations<azure.mgmt.databox.v2020_04_01.operations.ServiceOperations>`
154
213
* 2020-11-01: :class:`ServiceOperations<azure.mgmt.databox.v2020_11_01.operations.ServiceOperations>`
214
+ * 2021-03-01: :class:`ServiceOperations<azure.mgmt.databox.v2021_03_01.operations.ServiceOperations>`
215
+ * 2021-05-01: :class:`ServiceOperations<azure.mgmt.databox.v2021_05_01.operations.ServiceOperations>`
216
+ * 2021-08-01-preview: :class:`ServiceOperations<azure.mgmt.databox.v2021_08_01_preview.operations.ServiceOperations>`
217
+ * 2021-12-01: :class:`ServiceOperations<azure.mgmt.databox.v2021_12_01.operations.ServiceOperations>`
218
+ * 2022-02-01: :class:`ServiceOperations<azure.mgmt.databox.v2022_02_01.operations.ServiceOperations>`
155
219
"""
156
220
api_version = self ._get_api_version ('service' )
157
221
if api_version == '2018-01-01' :
@@ -162,6 +226,16 @@ def service(self):
162
226
from .v2020_04_01 .operations import ServiceOperations as OperationClass
163
227
elif api_version == '2020-11-01' :
164
228
from .v2020_11_01 .operations import ServiceOperations as OperationClass
229
+ elif api_version == '2021-03-01' :
230
+ from .v2021_03_01 .operations import ServiceOperations as OperationClass
231
+ elif api_version == '2021-05-01' :
232
+ from .v2021_05_01 .operations import ServiceOperations as OperationClass
233
+ elif api_version == '2021-08-01-preview' :
234
+ from .v2021_08_01_preview .operations import ServiceOperations as OperationClass
235
+ elif api_version == '2021-12-01' :
236
+ from .v2021_12_01 .operations import ServiceOperations as OperationClass
237
+ elif api_version == '2022-02-01' :
238
+ from .v2022_02_01 .operations import ServiceOperations as OperationClass
165
239
else :
166
240
raise ValueError ("API version {} does not have operation group 'service'" .format (api_version ))
167
241
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
0 commit comments