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