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