azure-mgmt-storage 22.1.1__py3-none-any.whl → 23.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure/mgmt/storage/__init__.py +19 -7
- azure/mgmt/storage/_configuration.py +27 -29
- azure/mgmt/storage/{v2016_01_01/models/_patch.py → _patch.py} +5 -4
- azure/mgmt/storage/_storage_management_client.py +184 -499
- azure/mgmt/storage/{v2016_01_01/_version.py → _utils/__init__.py} +0 -3
- azure/mgmt/storage/{_serialization.py → _utils/serialization.py} +46 -131
- azure/mgmt/storage/_version.py +1 -1
- azure/mgmt/storage/aio/__init__.py +21 -2
- azure/mgmt/storage/aio/_configuration.py +27 -29
- azure/mgmt/storage/{v2017_10_01/aio/operations → aio}/_patch.py +5 -4
- azure/mgmt/storage/aio/_storage_management_client.py +188 -497
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/__init__.py +1 -0
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_containers_operations.py +66 -69
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_inventory_policies_operations.py +26 -34
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_services_operations.py +20 -22
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_deleted_accounts_operations.py +14 -17
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_encryption_scopes_operations.py +27 -30
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_services_operations.py +24 -27
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_shares_operations.py +36 -39
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_local_users_operations.py +26 -29
- azure/mgmt/storage/{v2019_06_01/aio → aio}/operations/_management_policies_operations.py +23 -30
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_network_security_perimeter_configurations_operations.py +16 -19
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_object_replication_policies_operations.py +21 -23
- azure/mgmt/storage/{v2017_10_01/aio → aio}/operations/_operations.py +12 -15
- azure/mgmt/storage/{v2016_01_01/aio → aio}/operations/_patch.py +5 -4
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_private_endpoint_connections_operations.py +21 -23
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_private_link_resources_operations.py +11 -13
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_queue_operations.py +27 -30
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_queue_services_operations.py +19 -21
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_skus_operations.py +12 -15
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_accounts_operations.py +81 -96
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignment_instances_report_operations.py +14 -16
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_instances_report_operations.py +14 -16
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_operations.py +30 -39
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_operations.py +27 -29
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_services_operations.py +19 -21
- azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_usages_operations.py +12 -14
- azure/mgmt/storage/{v2024_01_01/models → models}/_models_py3.py +870 -927
- azure/mgmt/storage/{v2016_01_01/operations → models}/_patch.py +5 -4
- azure/mgmt/storage/{v2024_01_01/models → models}/_storage_management_client_enums.py +1 -0
- azure/mgmt/storage/{v2024_01_01/operations → operations}/__init__.py +1 -0
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_containers_operations.py +81 -84
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_inventory_policies_operations.py +31 -39
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_services_operations.py +24 -27
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_deleted_accounts_operations.py +16 -18
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_encryption_scopes_operations.py +32 -34
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_services_operations.py +30 -32
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_shares_operations.py +44 -47
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_local_users_operations.py +33 -35
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_management_policies_operations.py +27 -34
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_network_security_perimeter_configurations_operations.py +20 -22
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_object_replication_policies_operations.py +26 -29
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_operations.py +12 -15
- azure/mgmt/storage/operations/_patch.py +21 -0
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_endpoint_connections_operations.py +26 -29
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_link_resources_operations.py +13 -15
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_operations.py +33 -35
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_services_operations.py +23 -25
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_skus_operations.py +12 -15
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_accounts_operations.py +98 -106
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignment_instances_report_operations.py +15 -19
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_instances_report_operations.py +15 -19
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_operations.py +36 -47
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_operations.py +33 -35
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_services_operations.py +23 -25
- azure/mgmt/storage/{v2024_01_01/operations → operations}/_usages_operations.py +13 -16
- {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/METADATA +20 -10
- azure_mgmt_storage-23.0.0.dist-info/RECORD +73 -0
- {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/WHEEL +1 -1
- azure/mgmt/storage/models.py +0 -8
- azure/mgmt/storage/v2016_01_01/__init__.py +0 -32
- azure/mgmt/storage/v2016_01_01/_configuration.py +0 -65
- azure/mgmt/storage/v2016_01_01/_patch.py +0 -32
- azure/mgmt/storage/v2016_01_01/_storage_management_client.py +0 -117
- azure/mgmt/storage/v2016_01_01/aio/__init__.py +0 -29
- azure/mgmt/storage/v2016_01_01/aio/_configuration.py +0 -65
- azure/mgmt/storage/v2016_01_01/aio/_patch.py +0 -32
- azure/mgmt/storage/v2016_01_01/aio/_storage_management_client.py +0 -120
- azure/mgmt/storage/v2016_01_01/aio/operations/__init__.py +0 -27
- azure/mgmt/storage/v2016_01_01/aio/operations/_storage_accounts_operations.py +0 -1023
- azure/mgmt/storage/v2016_01_01/aio/operations/_usage_operations.py +0 -130
- azure/mgmt/storage/v2016_01_01/models/__init__.py +0 -88
- azure/mgmt/storage/v2016_01_01/models/_models_py3.py +0 -829
- azure/mgmt/storage/v2016_01_01/models/_storage_management_client_enums.py +0 -99
- azure/mgmt/storage/v2016_01_01/operations/__init__.py +0 -27
- azure/mgmt/storage/v2016_01_01/operations/_storage_accounts_operations.py +0 -1278
- azure/mgmt/storage/v2016_01_01/operations/_usage_operations.py +0 -157
- azure/mgmt/storage/v2016_01_01/py.typed +0 -1
- azure/mgmt/storage/v2017_10_01/__init__.py +0 -32
- azure/mgmt/storage/v2017_10_01/_configuration.py +0 -65
- azure/mgmt/storage/v2017_10_01/_patch.py +0 -32
- azure/mgmt/storage/v2017_10_01/_storage_management.py +0 -121
- azure/mgmt/storage/v2017_10_01/_version.py +0 -9
- azure/mgmt/storage/v2017_10_01/aio/__init__.py +0 -29
- azure/mgmt/storage/v2017_10_01/aio/_configuration.py +0 -65
- azure/mgmt/storage/v2017_10_01/aio/_patch.py +0 -32
- azure/mgmt/storage/v2017_10_01/aio/_storage_management.py +0 -124
- azure/mgmt/storage/v2017_10_01/aio/operations/__init__.py +0 -31
- azure/mgmt/storage/v2017_10_01/aio/operations/_skus_operations.py +0 -130
- azure/mgmt/storage/v2017_10_01/aio/operations/_storage_accounts_operations.py +0 -1299
- azure/mgmt/storage/v2017_10_01/aio/operations/_usage_operations.py +0 -130
- azure/mgmt/storage/v2017_10_01/models/__init__.py +0 -140
- azure/mgmt/storage/v2017_10_01/models/_models_py3.py +0 -1851
- azure/mgmt/storage/v2017_10_01/models/_patch.py +0 -20
- azure/mgmt/storage/v2017_10_01/models/_storage_management_enums.py +0 -192
- azure/mgmt/storage/v2017_10_01/operations/__init__.py +0 -31
- azure/mgmt/storage/v2017_10_01/operations/_operations.py +0 -151
- azure/mgmt/storage/v2017_10_01/operations/_patch.py +0 -20
- azure/mgmt/storage/v2017_10_01/operations/_skus_operations.py +0 -157
- azure/mgmt/storage/v2017_10_01/operations/_storage_accounts_operations.py +0 -1638
- azure/mgmt/storage/v2017_10_01/operations/_usage_operations.py +0 -157
- azure/mgmt/storage/v2017_10_01/py.typed +0 -1
- azure/mgmt/storage/v2019_06_01/__init__.py +0 -32
- azure/mgmt/storage/v2019_06_01/_configuration.py +0 -64
- azure/mgmt/storage/v2019_06_01/_patch.py +0 -32
- azure/mgmt/storage/v2019_06_01/_storage_management_client.py +0 -213
- azure/mgmt/storage/v2019_06_01/_version.py +0 -9
- azure/mgmt/storage/v2019_06_01/aio/__init__.py +0 -29
- azure/mgmt/storage/v2019_06_01/aio/_configuration.py +0 -64
- azure/mgmt/storage/v2019_06_01/aio/_patch.py +0 -32
- azure/mgmt/storage/v2019_06_01/aio/_storage_management_client.py +0 -217
- azure/mgmt/storage/v2019_06_01/aio/operations/__init__.py +0 -59
- azure/mgmt/storage/v2019_06_01/aio/operations/_blob_containers_operations.py +0 -1725
- azure/mgmt/storage/v2019_06_01/aio/operations/_blob_inventory_policies_operations.py +0 -437
- azure/mgmt/storage/v2019_06_01/aio/operations/_blob_services_operations.py +0 -368
- azure/mgmt/storage/v2019_06_01/aio/operations/_encryption_scopes_operations.py +0 -538
- azure/mgmt/storage/v2019_06_01/aio/operations/_file_services_operations.py +0 -335
- azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py +0 -771
- azure/mgmt/storage/v2019_06_01/aio/operations/_object_replication_policies_operations.py +0 -428
- azure/mgmt/storage/v2019_06_01/aio/operations/_operations.py +0 -130
- azure/mgmt/storage/v2019_06_01/aio/operations/_patch.py +0 -20
- azure/mgmt/storage/v2019_06_01/aio/operations/_private_endpoint_connections_operations.py +0 -424
- azure/mgmt/storage/v2019_06_01/aio/operations/_private_link_resources_operations.py +0 -113
- azure/mgmt/storage/v2019_06_01/aio/operations/_queue_operations.py +0 -597
- azure/mgmt/storage/v2019_06_01/aio/operations/_queue_services_operations.py +0 -335
- azure/mgmt/storage/v2019_06_01/aio/operations/_skus_operations.py +0 -131
- azure/mgmt/storage/v2019_06_01/aio/operations/_storage_accounts_operations.py +0 -1696
- azure/mgmt/storage/v2019_06_01/aio/operations/_table_operations.py +0 -394
- azure/mgmt/storage/v2019_06_01/aio/operations/_table_services_operations.py +0 -335
- azure/mgmt/storage/v2019_06_01/aio/operations/_usages_operations.py +0 -134
- azure/mgmt/storage/v2019_06_01/models/__init__.py +0 -364
- azure/mgmt/storage/v2019_06_01/models/_models_py3.py +0 -6038
- azure/mgmt/storage/v2019_06_01/models/_patch.py +0 -20
- azure/mgmt/storage/v2019_06_01/models/_storage_management_client_enums.py +0 -456
- azure/mgmt/storage/v2019_06_01/operations/__init__.py +0 -59
- azure/mgmt/storage/v2019_06_01/operations/_blob_containers_operations.py +0 -2226
- azure/mgmt/storage/v2019_06_01/operations/_blob_inventory_policies_operations.py +0 -582
- azure/mgmt/storage/v2019_06_01/operations/_blob_services_operations.py +0 -476
- azure/mgmt/storage/v2019_06_01/operations/_encryption_scopes_operations.py +0 -677
- azure/mgmt/storage/v2019_06_01/operations/_file_services_operations.py +0 -444
- azure/mgmt/storage/v2019_06_01/operations/_file_shares_operations.py +0 -1000
- azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py +0 -453
- azure/mgmt/storage/v2019_06_01/operations/_object_replication_policies_operations.py +0 -567
- azure/mgmt/storage/v2019_06_01/operations/_operations.py +0 -151
- azure/mgmt/storage/v2019_06_01/operations/_patch.py +0 -20
- azure/mgmt/storage/v2019_06_01/operations/_private_endpoint_connections_operations.py +0 -575
- azure/mgmt/storage/v2019_06_01/operations/_private_link_resources_operations.py +0 -149
- azure/mgmt/storage/v2019_06_01/operations/_queue_operations.py +0 -805
- azure/mgmt/storage/v2019_06_01/operations/_queue_services_operations.py +0 -444
- azure/mgmt/storage/v2019_06_01/operations/_skus_operations.py +0 -157
- azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py +0 -2122
- azure/mgmt/storage/v2019_06_01/operations/_table_operations.py +0 -563
- azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py +0 -444
- azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py +0 -164
- azure/mgmt/storage/v2019_06_01/py.typed +0 -1
- azure/mgmt/storage/v2024_01_01/__init__.py +0 -32
- azure/mgmt/storage/v2024_01_01/_configuration.py +0 -64
- azure/mgmt/storage/v2024_01_01/_patch.py +0 -20
- azure/mgmt/storage/v2024_01_01/_storage_management_client.py +0 -256
- azure/mgmt/storage/v2024_01_01/_version.py +0 -9
- azure/mgmt/storage/v2024_01_01/aio/__init__.py +0 -29
- azure/mgmt/storage/v2024_01_01/aio/_configuration.py +0 -64
- azure/mgmt/storage/v2024_01_01/aio/_patch.py +0 -20
- azure/mgmt/storage/v2024_01_01/aio/_storage_management_client.py +0 -261
- azure/mgmt/storage/v2024_01_01/aio/operations/_management_policies_operations.py +0 -343
- azure/mgmt/storage/v2024_01_01/aio/operations/_operations.py +0 -130
- azure/mgmt/storage/v2024_01_01/aio/operations/_patch.py +0 -20
- azure/mgmt/storage/v2024_01_01/models/_patch.py +0 -20
- azure/mgmt/storage/v2024_01_01/operations/_patch.py +0 -20
- azure/mgmt/storage/v2024_01_01/py.typed +0 -1
- azure_mgmt_storage-22.1.1.dist-info/RECORD +0 -183
- /azure/mgmt/storage/{v2024_01_01/models → models}/__init__.py +0 -0
- {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/LICENSE +0 -0
- {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,6 @@
|
|
1
|
-
# coding=utf-8
|
2
1
|
# --------------------------------------------------------------------------
|
3
2
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
4
3
|
# Licensed under the MIT License. See License.txt in the project root for license information.
|
5
4
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
6
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
6
|
# --------------------------------------------------------------------------
|
8
|
-
|
9
|
-
VERSION = "22.1.1"
|
@@ -1,27 +1,10 @@
|
|
1
|
+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
|
2
|
+
# coding=utf-8
|
1
3
|
# --------------------------------------------------------------------------
|
2
|
-
#
|
3
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
# of this software and associated documentation files (the ""Software""), to
|
9
|
-
# deal in the Software without restriction, including without limitation the
|
10
|
-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
11
|
-
# sell copies of the Software, and to permit persons to whom the Software is
|
12
|
-
# furnished to do so, subject to the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be included in
|
15
|
-
# all copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
23
|
-
# IN THE SOFTWARE.
|
24
|
-
#
|
5
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
6
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
25
8
|
# --------------------------------------------------------------------------
|
26
9
|
|
27
10
|
# pyright: reportUnnecessaryTypeIgnoreComment=false
|
@@ -47,9 +30,7 @@ from typing import (
|
|
47
30
|
IO,
|
48
31
|
Mapping,
|
49
32
|
Callable,
|
50
|
-
TypeVar,
|
51
33
|
MutableMapping,
|
52
|
-
Type,
|
53
34
|
List,
|
54
35
|
)
|
55
36
|
|
@@ -60,13 +41,13 @@ except ImportError:
|
|
60
41
|
import xml.etree.ElementTree as ET
|
61
42
|
|
62
43
|
import isodate # type: ignore
|
44
|
+
from typing_extensions import Self
|
63
45
|
|
64
46
|
from azure.core.exceptions import DeserializationError, SerializationError
|
65
47
|
from azure.core.serialization import NULL as CoreNull
|
66
48
|
|
67
49
|
_BOM = codecs.BOM_UTF8.decode(encoding="utf-8")
|
68
50
|
|
69
|
-
ModelType = TypeVar("ModelType", bound="Model")
|
70
51
|
JSON = MutableMapping[str, Any]
|
71
52
|
|
72
53
|
|
@@ -184,73 +165,7 @@ try:
|
|
184
165
|
except NameError:
|
185
166
|
_long_type = int
|
186
167
|
|
187
|
-
|
188
|
-
class UTC(datetime.tzinfo):
|
189
|
-
"""Time Zone info for handling UTC"""
|
190
|
-
|
191
|
-
def utcoffset(self, dt):
|
192
|
-
"""UTF offset for UTC is 0.
|
193
|
-
|
194
|
-
:param datetime.datetime dt: The datetime
|
195
|
-
:returns: The offset
|
196
|
-
:rtype: datetime.timedelta
|
197
|
-
"""
|
198
|
-
return datetime.timedelta(0)
|
199
|
-
|
200
|
-
def tzname(self, dt):
|
201
|
-
"""Timestamp representation.
|
202
|
-
|
203
|
-
:param datetime.datetime dt: The datetime
|
204
|
-
:returns: The timestamp representation
|
205
|
-
:rtype: str
|
206
|
-
"""
|
207
|
-
return "Z"
|
208
|
-
|
209
|
-
def dst(self, dt):
|
210
|
-
"""No daylight saving for UTC.
|
211
|
-
|
212
|
-
:param datetime.datetime dt: The datetime
|
213
|
-
:returns: The daylight saving time
|
214
|
-
:rtype: datetime.timedelta
|
215
|
-
"""
|
216
|
-
return datetime.timedelta(hours=1)
|
217
|
-
|
218
|
-
|
219
|
-
try:
|
220
|
-
from datetime import timezone as _FixedOffset # type: ignore
|
221
|
-
except ImportError: # Python 2.7
|
222
|
-
|
223
|
-
class _FixedOffset(datetime.tzinfo): # type: ignore
|
224
|
-
"""Fixed offset in minutes east from UTC.
|
225
|
-
Copy/pasted from Python doc
|
226
|
-
:param datetime.timedelta offset: offset in timedelta format
|
227
|
-
"""
|
228
|
-
|
229
|
-
def __init__(self, offset) -> None:
|
230
|
-
self.__offset = offset
|
231
|
-
|
232
|
-
def utcoffset(self, dt):
|
233
|
-
return self.__offset
|
234
|
-
|
235
|
-
def tzname(self, dt):
|
236
|
-
return str(self.__offset.total_seconds() / 3600)
|
237
|
-
|
238
|
-
def __repr__(self):
|
239
|
-
return "<FixedOffset {}>".format(self.tzname(None))
|
240
|
-
|
241
|
-
def dst(self, dt):
|
242
|
-
return datetime.timedelta(0)
|
243
|
-
|
244
|
-
def __getinitargs__(self):
|
245
|
-
return (self.__offset,)
|
246
|
-
|
247
|
-
|
248
|
-
try:
|
249
|
-
from datetime import timezone
|
250
|
-
|
251
|
-
TZ_UTC = timezone.utc
|
252
|
-
except ImportError:
|
253
|
-
TZ_UTC = UTC() # type: ignore
|
168
|
+
TZ_UTC = datetime.timezone.utc
|
254
169
|
|
255
170
|
_FLATTEN = re.compile(r"(?<!\\)\.")
|
256
171
|
|
@@ -449,25 +364,25 @@ class Model:
|
|
449
364
|
return client_models
|
450
365
|
|
451
366
|
@classmethod
|
452
|
-
def deserialize(cls
|
367
|
+
def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self:
|
453
368
|
"""Parse a str using the RestAPI syntax and return a model.
|
454
369
|
|
455
370
|
:param str data: A str using RestAPI structure. JSON by default.
|
456
371
|
:param str content_type: JSON by default, set application/xml if XML.
|
457
372
|
:returns: An instance of this model
|
458
|
-
:raises
|
459
|
-
:rtype:
|
373
|
+
:raises DeserializationError: if something went wrong
|
374
|
+
:rtype: Self
|
460
375
|
"""
|
461
376
|
deserializer = Deserializer(cls._infer_class_models())
|
462
377
|
return deserializer(cls.__name__, data, content_type=content_type) # type: ignore
|
463
378
|
|
464
379
|
@classmethod
|
465
380
|
def from_dict(
|
466
|
-
cls
|
381
|
+
cls,
|
467
382
|
data: Any,
|
468
383
|
key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
|
469
384
|
content_type: Optional[str] = None,
|
470
|
-
) ->
|
385
|
+
) -> Self:
|
471
386
|
"""Parse a dict using given key extractor return a model.
|
472
387
|
|
473
388
|
By default consider key
|
@@ -478,8 +393,8 @@ class Model:
|
|
478
393
|
:param function key_extractors: A key extractor function.
|
479
394
|
:param str content_type: JSON by default, set application/xml if XML.
|
480
395
|
:returns: An instance of this model
|
481
|
-
:raises
|
482
|
-
:rtype:
|
396
|
+
:raises DeserializationError: if something went wrong
|
397
|
+
:rtype: Self
|
483
398
|
"""
|
484
399
|
deserializer = Deserializer(cls._infer_class_models())
|
485
400
|
deserializer.key_extractors = ( # type: ignore
|
@@ -625,7 +540,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
625
540
|
:param object target_obj: The data to be serialized.
|
626
541
|
:param str data_type: The type to be serialized from.
|
627
542
|
:rtype: str, dict
|
628
|
-
:raises
|
543
|
+
:raises SerializationError: if serialization fails.
|
629
544
|
:returns: The serialized data.
|
630
545
|
"""
|
631
546
|
key_transformer = kwargs.get("key_transformer", self.key_transformer)
|
@@ -735,8 +650,8 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
735
650
|
:param object data: The data to be serialized.
|
736
651
|
:param str data_type: The type to be serialized from.
|
737
652
|
:rtype: dict
|
738
|
-
:raises
|
739
|
-
:raises
|
653
|
+
:raises SerializationError: if serialization fails.
|
654
|
+
:raises ValueError: if data is None
|
740
655
|
:returns: The serialized request body
|
741
656
|
"""
|
742
657
|
|
@@ -780,8 +695,8 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
780
695
|
:param str data_type: The type to be serialized from.
|
781
696
|
:rtype: str
|
782
697
|
:returns: The serialized URL path
|
783
|
-
:raises
|
784
|
-
:raises
|
698
|
+
:raises TypeError: if serialization fails.
|
699
|
+
:raises ValueError: if data is None
|
785
700
|
"""
|
786
701
|
try:
|
787
702
|
output = self.serialize_data(data, data_type, **kwargs)
|
@@ -804,8 +719,8 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
804
719
|
:param object data: The data to be serialized.
|
805
720
|
:param str data_type: The type to be serialized from.
|
806
721
|
:rtype: str, list
|
807
|
-
:raises
|
808
|
-
:raises
|
722
|
+
:raises TypeError: if serialization fails.
|
723
|
+
:raises ValueError: if data is None
|
809
724
|
:returns: The serialized query parameter
|
810
725
|
"""
|
811
726
|
try:
|
@@ -834,8 +749,8 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
834
749
|
:param object data: The data to be serialized.
|
835
750
|
:param str data_type: The type to be serialized from.
|
836
751
|
:rtype: str
|
837
|
-
:raises
|
838
|
-
:raises
|
752
|
+
:raises TypeError: if serialization fails.
|
753
|
+
:raises ValueError: if data is None
|
839
754
|
:returns: The serialized header
|
840
755
|
"""
|
841
756
|
try:
|
@@ -854,9 +769,9 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
854
769
|
|
855
770
|
:param object data: The data to be serialized.
|
856
771
|
:param str data_type: The type to be serialized from.
|
857
|
-
:raises
|
858
|
-
:raises
|
859
|
-
:raises
|
772
|
+
:raises AttributeError: if required data is None.
|
773
|
+
:raises ValueError: if data is None
|
774
|
+
:raises SerializationError: if serialization fails.
|
860
775
|
:returns: The serialized data.
|
861
776
|
:rtype: str, int, float, bool, dict, list
|
862
777
|
"""
|
@@ -1191,7 +1106,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
1191
1106
|
|
1192
1107
|
:param Datetime attr: Object to be serialized.
|
1193
1108
|
:rtype: str
|
1194
|
-
:raises
|
1109
|
+
:raises TypeError: if format invalid.
|
1195
1110
|
:return: serialized rfc
|
1196
1111
|
"""
|
1197
1112
|
try:
|
@@ -1217,7 +1132,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
1217
1132
|
|
1218
1133
|
:param Datetime attr: Object to be serialized.
|
1219
1134
|
:rtype: str
|
1220
|
-
:raises
|
1135
|
+
:raises SerializationError: if format invalid.
|
1221
1136
|
:return: serialized iso
|
1222
1137
|
"""
|
1223
1138
|
if isinstance(attr, str):
|
@@ -1250,7 +1165,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
1250
1165
|
|
1251
1166
|
:param Datetime attr: Object to be serialized.
|
1252
1167
|
:rtype: int
|
1253
|
-
:raises
|
1168
|
+
:raises SerializationError: if format invalid
|
1254
1169
|
:return: serialied unix
|
1255
1170
|
"""
|
1256
1171
|
if isinstance(attr, int):
|
@@ -1428,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
|
|
1428
1343
|
# Iter and wrapped, should have found one node only (the wrap one)
|
1429
1344
|
if len(children) != 1:
|
1430
1345
|
raise DeserializationError(
|
1431
|
-
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
|
1346
|
+
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
|
1432
1347
|
xml_name
|
1433
1348
|
)
|
1434
1349
|
)
|
@@ -1487,7 +1402,7 @@ class Deserializer:
|
|
1487
1402
|
:param str target_obj: Target data type to deserialize to.
|
1488
1403
|
:param requests.Response response_data: REST response object.
|
1489
1404
|
:param str content_type: Swagger "produces" if available.
|
1490
|
-
:raises
|
1405
|
+
:raises DeserializationError: if deserialization fails.
|
1491
1406
|
:return: Deserialized object.
|
1492
1407
|
:rtype: object
|
1493
1408
|
"""
|
@@ -1501,7 +1416,7 @@ class Deserializer:
|
|
1501
1416
|
|
1502
1417
|
:param str target_obj: Target data type to deserialize to.
|
1503
1418
|
:param object data: Object to deserialize.
|
1504
|
-
:raises
|
1419
|
+
:raises DeserializationError: if deserialization fails.
|
1505
1420
|
:return: Deserialized object.
|
1506
1421
|
:rtype: object
|
1507
1422
|
"""
|
@@ -1716,7 +1631,7 @@ class Deserializer:
|
|
1716
1631
|
|
1717
1632
|
:param str data: The response string to be deserialized.
|
1718
1633
|
:param str data_type: The type to deserialize to.
|
1719
|
-
:raises
|
1634
|
+
:raises DeserializationError: if deserialization fails.
|
1720
1635
|
:return: Deserialized object.
|
1721
1636
|
:rtype: object
|
1722
1637
|
"""
|
@@ -1798,7 +1713,7 @@ class Deserializer:
|
|
1798
1713
|
:param dict attr: Dictionary to be deserialized.
|
1799
1714
|
:return: Deserialized object.
|
1800
1715
|
:rtype: dict
|
1801
|
-
:raises
|
1716
|
+
:raises TypeError: if non-builtin datatype encountered.
|
1802
1717
|
"""
|
1803
1718
|
if attr is None:
|
1804
1719
|
return None
|
@@ -1844,7 +1759,7 @@ class Deserializer:
|
|
1844
1759
|
:param str data_type: deserialization data type.
|
1845
1760
|
:return: Deserialized basic type.
|
1846
1761
|
:rtype: str, int, float or bool
|
1847
|
-
:raises
|
1762
|
+
:raises TypeError: if string format is not valid.
|
1848
1763
|
"""
|
1849
1764
|
# If we're here, data is supposed to be a basic type.
|
1850
1765
|
# If it's still an XML node, take the text
|
@@ -1935,7 +1850,7 @@ class Deserializer:
|
|
1935
1850
|
:param str attr: response string to be deserialized.
|
1936
1851
|
:return: Deserialized bytearray
|
1937
1852
|
:rtype: bytearray
|
1938
|
-
:raises
|
1853
|
+
:raises TypeError: if string format invalid.
|
1939
1854
|
"""
|
1940
1855
|
if isinstance(attr, ET.Element):
|
1941
1856
|
attr = attr.text
|
@@ -1948,7 +1863,7 @@ class Deserializer:
|
|
1948
1863
|
:param str attr: response string to be deserialized.
|
1949
1864
|
:return: Deserialized base64 string
|
1950
1865
|
:rtype: bytearray
|
1951
|
-
:raises
|
1866
|
+
:raises TypeError: if string format invalid.
|
1952
1867
|
"""
|
1953
1868
|
if isinstance(attr, ET.Element):
|
1954
1869
|
attr = attr.text
|
@@ -1963,7 +1878,7 @@ class Deserializer:
|
|
1963
1878
|
|
1964
1879
|
:param str attr: response string to be deserialized.
|
1965
1880
|
:return: Deserialized decimal
|
1966
|
-
:raises
|
1881
|
+
:raises DeserializationError: if string format invalid.
|
1967
1882
|
:rtype: decimal
|
1968
1883
|
"""
|
1969
1884
|
if isinstance(attr, ET.Element):
|
@@ -1981,7 +1896,7 @@ class Deserializer:
|
|
1981
1896
|
:param str attr: response string to be deserialized.
|
1982
1897
|
:return: Deserialized int
|
1983
1898
|
:rtype: long or int
|
1984
|
-
:raises
|
1899
|
+
:raises ValueError: if string format invalid.
|
1985
1900
|
"""
|
1986
1901
|
if isinstance(attr, ET.Element):
|
1987
1902
|
attr = attr.text
|
@@ -1994,7 +1909,7 @@ class Deserializer:
|
|
1994
1909
|
:param str attr: response string to be deserialized.
|
1995
1910
|
:return: Deserialized duration
|
1996
1911
|
:rtype: TimeDelta
|
1997
|
-
:raises
|
1912
|
+
:raises DeserializationError: if string format invalid.
|
1998
1913
|
"""
|
1999
1914
|
if isinstance(attr, ET.Element):
|
2000
1915
|
attr = attr.text
|
@@ -2012,7 +1927,7 @@ class Deserializer:
|
|
2012
1927
|
:param str attr: response string to be deserialized.
|
2013
1928
|
:return: Deserialized date
|
2014
1929
|
:rtype: Date
|
2015
|
-
:raises
|
1930
|
+
:raises DeserializationError: if string format invalid.
|
2016
1931
|
"""
|
2017
1932
|
if isinstance(attr, ET.Element):
|
2018
1933
|
attr = attr.text
|
@@ -2028,7 +1943,7 @@ class Deserializer:
|
|
2028
1943
|
:param str attr: response string to be deserialized.
|
2029
1944
|
:return: Deserialized time
|
2030
1945
|
:rtype: datetime.time
|
2031
|
-
:raises
|
1946
|
+
:raises DeserializationError: if string format invalid.
|
2032
1947
|
"""
|
2033
1948
|
if isinstance(attr, ET.Element):
|
2034
1949
|
attr = attr.text
|
@@ -2043,14 +1958,14 @@ class Deserializer:
|
|
2043
1958
|
:param str attr: response string to be deserialized.
|
2044
1959
|
:return: Deserialized RFC datetime
|
2045
1960
|
:rtype: Datetime
|
2046
|
-
:raises
|
1961
|
+
:raises DeserializationError: if string format invalid.
|
2047
1962
|
"""
|
2048
1963
|
if isinstance(attr, ET.Element):
|
2049
1964
|
attr = attr.text
|
2050
1965
|
try:
|
2051
1966
|
parsed_date = email.utils.parsedate_tz(attr) # type: ignore
|
2052
1967
|
date_obj = datetime.datetime(
|
2053
|
-
*parsed_date[:6], tzinfo=
|
1968
|
+
*parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60))
|
2054
1969
|
)
|
2055
1970
|
if not date_obj.tzinfo:
|
2056
1971
|
date_obj = date_obj.astimezone(tz=TZ_UTC)
|
@@ -2066,7 +1981,7 @@ class Deserializer:
|
|
2066
1981
|
:param str attr: response string to be deserialized.
|
2067
1982
|
:return: Deserialized ISO datetime
|
2068
1983
|
:rtype: Datetime
|
2069
|
-
:raises
|
1984
|
+
:raises DeserializationError: if string format invalid.
|
2070
1985
|
"""
|
2071
1986
|
if isinstance(attr, ET.Element):
|
2072
1987
|
attr = attr.text
|
@@ -2104,7 +2019,7 @@ class Deserializer:
|
|
2104
2019
|
:param int attr: Object to be serialized.
|
2105
2020
|
:return: Deserialized datetime
|
2106
2021
|
:rtype: Datetime
|
2107
|
-
:raises
|
2022
|
+
:raises DeserializationError: if format invalid
|
2108
2023
|
"""
|
2109
2024
|
if isinstance(attr, ET.Element):
|
2110
2025
|
attr = int(attr.text) # type: ignore
|
azure/mgmt/storage/_version.py
CHANGED
@@ -5,6 +5,25 @@
|
|
5
5
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
# --------------------------------------------------------------------------
|
8
|
+
# pylint: disable=wrong-import-position
|
8
9
|
|
9
|
-
from
|
10
|
-
|
10
|
+
from typing import TYPE_CHECKING
|
11
|
+
|
12
|
+
if TYPE_CHECKING:
|
13
|
+
from ._patch import * # pylint: disable=unused-wildcard-import
|
14
|
+
|
15
|
+
from ._storage_management_client import StorageManagementClient # type: ignore
|
16
|
+
|
17
|
+
try:
|
18
|
+
from ._patch import __all__ as _patch_all
|
19
|
+
from ._patch import *
|
20
|
+
except ImportError:
|
21
|
+
_patch_all = []
|
22
|
+
from ._patch import patch_sdk as _patch_sdk
|
23
|
+
|
24
|
+
__all__ = [
|
25
|
+
"StorageManagementClient",
|
26
|
+
]
|
27
|
+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
28
|
+
|
29
|
+
_patch_sdk()
|
@@ -1,13 +1,11 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
3
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
4
|
-
# Licensed under the MIT License. See License.txt in the project root for
|
5
|
-
# license information.
|
6
|
-
#
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
7
5
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
8
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
9
|
-
# regenerated.
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
10
7
|
# --------------------------------------------------------------------------
|
8
|
+
|
11
9
|
from typing import Any, TYPE_CHECKING
|
12
10
|
|
13
11
|
from azure.core.pipeline import policies
|
@@ -16,10 +14,10 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuth
|
|
16
14
|
from .._version import VERSION
|
17
15
|
|
18
16
|
if TYPE_CHECKING:
|
19
|
-
# pylint: disable=unused-import,ungrouped-imports
|
20
17
|
from azure.core.credentials_async import AsyncTokenCredential
|
21
18
|
|
22
|
-
|
19
|
+
|
20
|
+
class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
|
23
21
|
"""Configuration for StorageManagementClient.
|
24
22
|
|
25
23
|
Note that all parameters used to create this instance are saved as instance
|
@@ -29,14 +27,14 @@ class StorageManagementClientConfiguration:
|
|
29
27
|
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
30
28
|
:param subscription_id: The ID of the target subscription. Required.
|
31
29
|
:type subscription_id: str
|
30
|
+
:keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
|
31
|
+
default value may result in unsupported behavior.
|
32
|
+
:paramtype api_version: str
|
32
33
|
"""
|
33
34
|
|
34
|
-
def __init__(
|
35
|
-
|
36
|
-
|
37
|
-
subscription_id: str,
|
38
|
-
**kwargs: Any
|
39
|
-
) -> None:
|
35
|
+
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
|
36
|
+
api_version: str = kwargs.pop("api_version", "2024-01-01")
|
37
|
+
|
40
38
|
if credential is None:
|
41
39
|
raise ValueError("Parameter 'credential' must not be None.")
|
42
40
|
if subscription_id is None:
|
@@ -44,23 +42,23 @@ class StorageManagementClientConfiguration:
|
|
44
42
|
|
45
43
|
self.credential = credential
|
46
44
|
self.subscription_id = subscription_id
|
47
|
-
self.
|
48
|
-
kwargs.
|
45
|
+
self.api_version = api_version
|
46
|
+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
|
47
|
+
kwargs.setdefault("sdk_moniker", "mgmt-storage/{}".format(VERSION))
|
49
48
|
self.polling_interval = kwargs.get("polling_interval", 30)
|
50
49
|
self._configure(**kwargs)
|
51
50
|
|
52
|
-
def _configure(
|
53
|
-
self
|
54
|
-
**kwargs
|
55
|
-
|
56
|
-
self.
|
57
|
-
self.
|
58
|
-
self.
|
59
|
-
self.
|
60
|
-
self.
|
61
|
-
self.
|
62
|
-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
|
63
|
-
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
|
64
|
-
self.authentication_policy = kwargs.get('authentication_policy')
|
51
|
+
def _configure(self, **kwargs: Any) -> None:
|
52
|
+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
|
53
|
+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
|
54
|
+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
|
55
|
+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
|
56
|
+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
|
57
|
+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
|
58
|
+
self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
|
59
|
+
self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
|
60
|
+
self.authentication_policy = kwargs.get("authentication_policy")
|
65
61
|
if self.credential and not self.authentication_policy:
|
66
|
-
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(
|
62
|
+
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(
|
63
|
+
self.credential, *self.credential_scopes, **kwargs
|
64
|
+
)
|
@@ -1,7 +1,8 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
1
|
+
# coding=utf-8
|
2
|
+
# --------------------------------------------------------------------------
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
5
|
+
# --------------------------------------------------------------------------
|
5
6
|
"""Customize generated code here.
|
6
7
|
|
7
8
|
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|