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.
Files changed (184) hide show
  1. azure/mgmt/storage/__init__.py +19 -7
  2. azure/mgmt/storage/_configuration.py +27 -29
  3. azure/mgmt/storage/{v2016_01_01/models/_patch.py → _patch.py} +5 -4
  4. azure/mgmt/storage/_storage_management_client.py +184 -499
  5. azure/mgmt/storage/{v2016_01_01/_version.py → _utils/__init__.py} +0 -3
  6. azure/mgmt/storage/{_serialization.py → _utils/serialization.py} +46 -131
  7. azure/mgmt/storage/_version.py +1 -1
  8. azure/mgmt/storage/aio/__init__.py +21 -2
  9. azure/mgmt/storage/aio/_configuration.py +27 -29
  10. azure/mgmt/storage/{v2017_10_01/aio/operations → aio}/_patch.py +5 -4
  11. azure/mgmt/storage/aio/_storage_management_client.py +188 -497
  12. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/__init__.py +1 -0
  13. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_containers_operations.py +66 -69
  14. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_inventory_policies_operations.py +26 -34
  15. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_services_operations.py +20 -22
  16. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_deleted_accounts_operations.py +14 -17
  17. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_encryption_scopes_operations.py +27 -30
  18. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_services_operations.py +24 -27
  19. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_shares_operations.py +36 -39
  20. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_local_users_operations.py +26 -29
  21. azure/mgmt/storage/{v2019_06_01/aio → aio}/operations/_management_policies_operations.py +23 -30
  22. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_network_security_perimeter_configurations_operations.py +16 -19
  23. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_object_replication_policies_operations.py +21 -23
  24. azure/mgmt/storage/{v2017_10_01/aio → aio}/operations/_operations.py +12 -15
  25. azure/mgmt/storage/{v2016_01_01/aio → aio}/operations/_patch.py +5 -4
  26. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_private_endpoint_connections_operations.py +21 -23
  27. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_private_link_resources_operations.py +11 -13
  28. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_queue_operations.py +27 -30
  29. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_queue_services_operations.py +19 -21
  30. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_skus_operations.py +12 -15
  31. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_accounts_operations.py +81 -96
  32. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignment_instances_report_operations.py +14 -16
  33. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_instances_report_operations.py +14 -16
  34. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_operations.py +30 -39
  35. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_operations.py +27 -29
  36. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_services_operations.py +19 -21
  37. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_usages_operations.py +12 -14
  38. azure/mgmt/storage/{v2024_01_01/models → models}/_models_py3.py +870 -927
  39. azure/mgmt/storage/{v2016_01_01/operations → models}/_patch.py +5 -4
  40. azure/mgmt/storage/{v2024_01_01/models → models}/_storage_management_client_enums.py +1 -0
  41. azure/mgmt/storage/{v2024_01_01/operations → operations}/__init__.py +1 -0
  42. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_containers_operations.py +81 -84
  43. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_inventory_policies_operations.py +31 -39
  44. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_services_operations.py +24 -27
  45. azure/mgmt/storage/{v2024_01_01/operations → operations}/_deleted_accounts_operations.py +16 -18
  46. azure/mgmt/storage/{v2024_01_01/operations → operations}/_encryption_scopes_operations.py +32 -34
  47. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_services_operations.py +30 -32
  48. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_shares_operations.py +44 -47
  49. azure/mgmt/storage/{v2024_01_01/operations → operations}/_local_users_operations.py +33 -35
  50. azure/mgmt/storage/{v2024_01_01/operations → operations}/_management_policies_operations.py +27 -34
  51. azure/mgmt/storage/{v2024_01_01/operations → operations}/_network_security_perimeter_configurations_operations.py +20 -22
  52. azure/mgmt/storage/{v2024_01_01/operations → operations}/_object_replication_policies_operations.py +26 -29
  53. azure/mgmt/storage/{v2024_01_01/operations → operations}/_operations.py +12 -15
  54. azure/mgmt/storage/operations/_patch.py +21 -0
  55. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_endpoint_connections_operations.py +26 -29
  56. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_link_resources_operations.py +13 -15
  57. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_operations.py +33 -35
  58. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_services_operations.py +23 -25
  59. azure/mgmt/storage/{v2024_01_01/operations → operations}/_skus_operations.py +12 -15
  60. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_accounts_operations.py +98 -106
  61. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignment_instances_report_operations.py +15 -19
  62. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_instances_report_operations.py +15 -19
  63. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_operations.py +36 -47
  64. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_operations.py +33 -35
  65. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_services_operations.py +23 -25
  66. azure/mgmt/storage/{v2024_01_01/operations → operations}/_usages_operations.py +13 -16
  67. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/METADATA +20 -10
  68. azure_mgmt_storage-23.0.0.dist-info/RECORD +73 -0
  69. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/WHEEL +1 -1
  70. azure/mgmt/storage/models.py +0 -8
  71. azure/mgmt/storage/v2016_01_01/__init__.py +0 -32
  72. azure/mgmt/storage/v2016_01_01/_configuration.py +0 -65
  73. azure/mgmt/storage/v2016_01_01/_patch.py +0 -32
  74. azure/mgmt/storage/v2016_01_01/_storage_management_client.py +0 -117
  75. azure/mgmt/storage/v2016_01_01/aio/__init__.py +0 -29
  76. azure/mgmt/storage/v2016_01_01/aio/_configuration.py +0 -65
  77. azure/mgmt/storage/v2016_01_01/aio/_patch.py +0 -32
  78. azure/mgmt/storage/v2016_01_01/aio/_storage_management_client.py +0 -120
  79. azure/mgmt/storage/v2016_01_01/aio/operations/__init__.py +0 -27
  80. azure/mgmt/storage/v2016_01_01/aio/operations/_storage_accounts_operations.py +0 -1023
  81. azure/mgmt/storage/v2016_01_01/aio/operations/_usage_operations.py +0 -130
  82. azure/mgmt/storage/v2016_01_01/models/__init__.py +0 -88
  83. azure/mgmt/storage/v2016_01_01/models/_models_py3.py +0 -829
  84. azure/mgmt/storage/v2016_01_01/models/_storage_management_client_enums.py +0 -99
  85. azure/mgmt/storage/v2016_01_01/operations/__init__.py +0 -27
  86. azure/mgmt/storage/v2016_01_01/operations/_storage_accounts_operations.py +0 -1278
  87. azure/mgmt/storage/v2016_01_01/operations/_usage_operations.py +0 -157
  88. azure/mgmt/storage/v2016_01_01/py.typed +0 -1
  89. azure/mgmt/storage/v2017_10_01/__init__.py +0 -32
  90. azure/mgmt/storage/v2017_10_01/_configuration.py +0 -65
  91. azure/mgmt/storage/v2017_10_01/_patch.py +0 -32
  92. azure/mgmt/storage/v2017_10_01/_storage_management.py +0 -121
  93. azure/mgmt/storage/v2017_10_01/_version.py +0 -9
  94. azure/mgmt/storage/v2017_10_01/aio/__init__.py +0 -29
  95. azure/mgmt/storage/v2017_10_01/aio/_configuration.py +0 -65
  96. azure/mgmt/storage/v2017_10_01/aio/_patch.py +0 -32
  97. azure/mgmt/storage/v2017_10_01/aio/_storage_management.py +0 -124
  98. azure/mgmt/storage/v2017_10_01/aio/operations/__init__.py +0 -31
  99. azure/mgmt/storage/v2017_10_01/aio/operations/_skus_operations.py +0 -130
  100. azure/mgmt/storage/v2017_10_01/aio/operations/_storage_accounts_operations.py +0 -1299
  101. azure/mgmt/storage/v2017_10_01/aio/operations/_usage_operations.py +0 -130
  102. azure/mgmt/storage/v2017_10_01/models/__init__.py +0 -140
  103. azure/mgmt/storage/v2017_10_01/models/_models_py3.py +0 -1851
  104. azure/mgmt/storage/v2017_10_01/models/_patch.py +0 -20
  105. azure/mgmt/storage/v2017_10_01/models/_storage_management_enums.py +0 -192
  106. azure/mgmt/storage/v2017_10_01/operations/__init__.py +0 -31
  107. azure/mgmt/storage/v2017_10_01/operations/_operations.py +0 -151
  108. azure/mgmt/storage/v2017_10_01/operations/_patch.py +0 -20
  109. azure/mgmt/storage/v2017_10_01/operations/_skus_operations.py +0 -157
  110. azure/mgmt/storage/v2017_10_01/operations/_storage_accounts_operations.py +0 -1638
  111. azure/mgmt/storage/v2017_10_01/operations/_usage_operations.py +0 -157
  112. azure/mgmt/storage/v2017_10_01/py.typed +0 -1
  113. azure/mgmt/storage/v2019_06_01/__init__.py +0 -32
  114. azure/mgmt/storage/v2019_06_01/_configuration.py +0 -64
  115. azure/mgmt/storage/v2019_06_01/_patch.py +0 -32
  116. azure/mgmt/storage/v2019_06_01/_storage_management_client.py +0 -213
  117. azure/mgmt/storage/v2019_06_01/_version.py +0 -9
  118. azure/mgmt/storage/v2019_06_01/aio/__init__.py +0 -29
  119. azure/mgmt/storage/v2019_06_01/aio/_configuration.py +0 -64
  120. azure/mgmt/storage/v2019_06_01/aio/_patch.py +0 -32
  121. azure/mgmt/storage/v2019_06_01/aio/_storage_management_client.py +0 -217
  122. azure/mgmt/storage/v2019_06_01/aio/operations/__init__.py +0 -59
  123. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_containers_operations.py +0 -1725
  124. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_inventory_policies_operations.py +0 -437
  125. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_services_operations.py +0 -368
  126. azure/mgmt/storage/v2019_06_01/aio/operations/_encryption_scopes_operations.py +0 -538
  127. azure/mgmt/storage/v2019_06_01/aio/operations/_file_services_operations.py +0 -335
  128. azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py +0 -771
  129. azure/mgmt/storage/v2019_06_01/aio/operations/_object_replication_policies_operations.py +0 -428
  130. azure/mgmt/storage/v2019_06_01/aio/operations/_operations.py +0 -130
  131. azure/mgmt/storage/v2019_06_01/aio/operations/_patch.py +0 -20
  132. azure/mgmt/storage/v2019_06_01/aio/operations/_private_endpoint_connections_operations.py +0 -424
  133. azure/mgmt/storage/v2019_06_01/aio/operations/_private_link_resources_operations.py +0 -113
  134. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_operations.py +0 -597
  135. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_services_operations.py +0 -335
  136. azure/mgmt/storage/v2019_06_01/aio/operations/_skus_operations.py +0 -131
  137. azure/mgmt/storage/v2019_06_01/aio/operations/_storage_accounts_operations.py +0 -1696
  138. azure/mgmt/storage/v2019_06_01/aio/operations/_table_operations.py +0 -394
  139. azure/mgmt/storage/v2019_06_01/aio/operations/_table_services_operations.py +0 -335
  140. azure/mgmt/storage/v2019_06_01/aio/operations/_usages_operations.py +0 -134
  141. azure/mgmt/storage/v2019_06_01/models/__init__.py +0 -364
  142. azure/mgmt/storage/v2019_06_01/models/_models_py3.py +0 -6038
  143. azure/mgmt/storage/v2019_06_01/models/_patch.py +0 -20
  144. azure/mgmt/storage/v2019_06_01/models/_storage_management_client_enums.py +0 -456
  145. azure/mgmt/storage/v2019_06_01/operations/__init__.py +0 -59
  146. azure/mgmt/storage/v2019_06_01/operations/_blob_containers_operations.py +0 -2226
  147. azure/mgmt/storage/v2019_06_01/operations/_blob_inventory_policies_operations.py +0 -582
  148. azure/mgmt/storage/v2019_06_01/operations/_blob_services_operations.py +0 -476
  149. azure/mgmt/storage/v2019_06_01/operations/_encryption_scopes_operations.py +0 -677
  150. azure/mgmt/storage/v2019_06_01/operations/_file_services_operations.py +0 -444
  151. azure/mgmt/storage/v2019_06_01/operations/_file_shares_operations.py +0 -1000
  152. azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py +0 -453
  153. azure/mgmt/storage/v2019_06_01/operations/_object_replication_policies_operations.py +0 -567
  154. azure/mgmt/storage/v2019_06_01/operations/_operations.py +0 -151
  155. azure/mgmt/storage/v2019_06_01/operations/_patch.py +0 -20
  156. azure/mgmt/storage/v2019_06_01/operations/_private_endpoint_connections_operations.py +0 -575
  157. azure/mgmt/storage/v2019_06_01/operations/_private_link_resources_operations.py +0 -149
  158. azure/mgmt/storage/v2019_06_01/operations/_queue_operations.py +0 -805
  159. azure/mgmt/storage/v2019_06_01/operations/_queue_services_operations.py +0 -444
  160. azure/mgmt/storage/v2019_06_01/operations/_skus_operations.py +0 -157
  161. azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py +0 -2122
  162. azure/mgmt/storage/v2019_06_01/operations/_table_operations.py +0 -563
  163. azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py +0 -444
  164. azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py +0 -164
  165. azure/mgmt/storage/v2019_06_01/py.typed +0 -1
  166. azure/mgmt/storage/v2024_01_01/__init__.py +0 -32
  167. azure/mgmt/storage/v2024_01_01/_configuration.py +0 -64
  168. azure/mgmt/storage/v2024_01_01/_patch.py +0 -20
  169. azure/mgmt/storage/v2024_01_01/_storage_management_client.py +0 -256
  170. azure/mgmt/storage/v2024_01_01/_version.py +0 -9
  171. azure/mgmt/storage/v2024_01_01/aio/__init__.py +0 -29
  172. azure/mgmt/storage/v2024_01_01/aio/_configuration.py +0 -64
  173. azure/mgmt/storage/v2024_01_01/aio/_patch.py +0 -20
  174. azure/mgmt/storage/v2024_01_01/aio/_storage_management_client.py +0 -261
  175. azure/mgmt/storage/v2024_01_01/aio/operations/_management_policies_operations.py +0 -343
  176. azure/mgmt/storage/v2024_01_01/aio/operations/_operations.py +0 -130
  177. azure/mgmt/storage/v2024_01_01/aio/operations/_patch.py +0 -20
  178. azure/mgmt/storage/v2024_01_01/models/_patch.py +0 -20
  179. azure/mgmt/storage/v2024_01_01/operations/_patch.py +0 -20
  180. azure/mgmt/storage/v2024_01_01/py.typed +0 -1
  181. azure_mgmt_storage-22.1.1.dist-info/RECORD +0 -183
  182. /azure/mgmt/storage/{v2024_01_01/models → models}/__init__.py +0 -0
  183. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/LICENSE +0 -0
  184. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,4 @@
1
+ # pylint: disable=line-too-long,useless-suppression
1
2
  # coding=utf-8
2
3
  # --------------------------------------------------------------------------
3
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5,11 +6,12 @@
5
6
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8
  # --------------------------------------------------------------------------
9
+ from collections.abc import MutableMapping
8
10
  from io import IOBase
9
- import sys
10
11
  from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
11
12
  import urllib.parse
12
13
 
14
+ from azure.core import PipelineClient
13
15
  from azure.core.exceptions import (
14
16
  ClientAuthenticationError,
15
17
  HttpResponseError,
@@ -26,12 +28,9 @@ from azure.core.utils import case_insensitive_dict
26
28
  from azure.mgmt.core.exceptions import ARMErrorFormat
27
29
 
28
30
  from .. import models as _models
29
- from ..._serialization import Serializer
31
+ from .._configuration import StorageManagementClientConfiguration
32
+ from .._utils.serialization import Deserializer, Serializer
30
33
 
31
- if sys.version_info >= (3, 9):
32
- from collections.abc import MutableMapping
33
- else:
34
- from typing import MutableMapping # type: ignore
35
34
  T = TypeVar("T")
36
35
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
37
36
 
@@ -53,7 +52,7 @@ def build_put_request(
53
52
  _url = kwargs.pop(
54
53
  "template_url",
55
54
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}",
56
- ) # pylint: disable=line-too-long
55
+ )
57
56
  path_format_arguments = {
58
57
  "resourceGroupName": _SERIALIZER.url(
59
58
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -94,7 +93,7 @@ def build_patch_request(
94
93
  _url = kwargs.pop(
95
94
  "template_url",
96
95
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}",
97
- ) # pylint: disable=line-too-long
96
+ )
98
97
  path_format_arguments = {
99
98
  "resourceGroupName": _SERIALIZER.url(
100
99
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -134,7 +133,7 @@ def build_get_request(
134
133
  _url = kwargs.pop(
135
134
  "template_url",
136
135
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}",
137
- ) # pylint: disable=line-too-long
136
+ )
138
137
  path_format_arguments = {
139
138
  "resourceGroupName": _SERIALIZER.url(
140
139
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -179,7 +178,7 @@ def build_list_request(
179
178
  _url = kwargs.pop(
180
179
  "template_url",
181
180
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes",
182
- ) # pylint: disable=line-too-long
181
+ )
183
182
  path_format_arguments = {
184
183
  "resourceGroupName": _SERIALIZER.url(
185
184
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -213,7 +212,7 @@ class EncryptionScopesOperations:
213
212
  **DO NOT** instantiate this class directly.
214
213
 
215
214
  Instead, you should access the following operations through
216
- :class:`~azure.mgmt.storage.v2024_01_01.StorageManagementClient`'s
215
+ :class:`~azure.mgmt.storage.StorageManagementClient`'s
217
216
  :attr:`encryption_scopes` attribute.
218
217
  """
219
218
 
@@ -221,11 +220,10 @@ class EncryptionScopesOperations:
221
220
 
222
221
  def __init__(self, *args, **kwargs):
223
222
  input_args = list(args)
224
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
225
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
226
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
227
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
228
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
223
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
224
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
225
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
226
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
229
227
 
230
228
  @overload
231
229
  def put(
@@ -256,12 +254,12 @@ class EncryptionScopesOperations:
256
254
  :type encryption_scope_name: str
257
255
  :param encryption_scope: Encryption scope properties to be used for the create or update.
258
256
  Required.
259
- :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
257
+ :type encryption_scope: ~azure.mgmt.storage.models.EncryptionScope
260
258
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
261
259
  Default value is "application/json".
262
260
  :paramtype content_type: str
263
261
  :return: EncryptionScope or the result of cls(response)
264
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
262
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
265
263
  :raises ~azure.core.exceptions.HttpResponseError:
266
264
  """
267
265
 
@@ -299,7 +297,7 @@ class EncryptionScopesOperations:
299
297
  Default value is "application/json".
300
298
  :paramtype content_type: str
301
299
  :return: EncryptionScope or the result of cls(response)
302
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
300
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
303
301
  :raises ~azure.core.exceptions.HttpResponseError:
304
302
  """
305
303
 
@@ -330,9 +328,9 @@ class EncryptionScopesOperations:
330
328
  :type encryption_scope_name: str
331
329
  :param encryption_scope: Encryption scope properties to be used for the create or update. Is
332
330
  either a EncryptionScope type or a IO[bytes] type. Required.
333
- :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope or IO[bytes]
331
+ :type encryption_scope: ~azure.mgmt.storage.models.EncryptionScope or IO[bytes]
334
332
  :return: EncryptionScope or the result of cls(response)
335
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
333
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
336
334
  :raises ~azure.core.exceptions.HttpResponseError:
337
335
  """
338
336
  error_map: MutableMapping = {
@@ -346,7 +344,7 @@ class EncryptionScopesOperations:
346
344
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
347
345
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
348
346
 
349
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
347
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
350
348
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
351
349
  cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
352
350
 
@@ -418,12 +416,12 @@ class EncryptionScopesOperations:
418
416
  followed by a letter or number. Required.
419
417
  :type encryption_scope_name: str
420
418
  :param encryption_scope: Encryption scope properties to be used for the update. Required.
421
- :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
419
+ :type encryption_scope: ~azure.mgmt.storage.models.EncryptionScope
422
420
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
423
421
  Default value is "application/json".
424
422
  :paramtype content_type: str
425
423
  :return: EncryptionScope or the result of cls(response)
426
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
424
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
427
425
  :raises ~azure.core.exceptions.HttpResponseError:
428
426
  """
429
427
 
@@ -459,7 +457,7 @@ class EncryptionScopesOperations:
459
457
  Default value is "application/json".
460
458
  :paramtype content_type: str
461
459
  :return: EncryptionScope or the result of cls(response)
462
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
460
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
463
461
  :raises ~azure.core.exceptions.HttpResponseError:
464
462
  """
465
463
 
@@ -489,9 +487,9 @@ class EncryptionScopesOperations:
489
487
  :type encryption_scope_name: str
490
488
  :param encryption_scope: Encryption scope properties to be used for the update. Is either a
491
489
  EncryptionScope type or a IO[bytes] type. Required.
492
- :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope or IO[bytes]
490
+ :type encryption_scope: ~azure.mgmt.storage.models.EncryptionScope or IO[bytes]
493
491
  :return: EncryptionScope or the result of cls(response)
494
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
492
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
495
493
  :raises ~azure.core.exceptions.HttpResponseError:
496
494
  """
497
495
  error_map: MutableMapping = {
@@ -505,7 +503,7 @@ class EncryptionScopesOperations:
505
503
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
506
504
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
507
505
 
508
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
506
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
509
507
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
510
508
  cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
511
509
 
@@ -569,7 +567,7 @@ class EncryptionScopesOperations:
569
567
  followed by a letter or number. Required.
570
568
  :type encryption_scope_name: str
571
569
  :return: EncryptionScope or the result of cls(response)
572
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
570
+ :rtype: ~azure.mgmt.storage.models.EncryptionScope
573
571
  :raises ~azure.core.exceptions.HttpResponseError:
574
572
  """
575
573
  error_map: MutableMapping = {
@@ -583,7 +581,7 @@ class EncryptionScopesOperations:
583
581
  _headers = kwargs.pop("headers", {}) or {}
584
582
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
585
583
 
586
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
584
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
587
585
  cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
588
586
 
589
587
  _request = build_get_request(
@@ -643,15 +641,15 @@ class EncryptionScopesOperations:
643
641
  :type filter: str
644
642
  :param include: Optional, when specified, will list encryption scopes with the specific state.
645
643
  Defaults to All. Known values are: "All", "Enabled", and "Disabled". Default value is None.
646
- :type include: str or ~azure.mgmt.storage.v2024_01_01.models.ListEncryptionScopesInclude
644
+ :type include: str or ~azure.mgmt.storage.models.ListEncryptionScopesInclude
647
645
  :return: An iterator like instance of either EncryptionScope or the result of cls(response)
648
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2024_01_01.models.EncryptionScope]
646
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.models.EncryptionScope]
649
647
  :raises ~azure.core.exceptions.HttpResponseError:
650
648
  """
651
649
  _headers = kwargs.pop("headers", {}) or {}
652
650
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
653
651
 
654
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
652
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
655
653
  cls: ClsType[_models.EncryptionScopeListResult] = kwargs.pop("cls", None)
656
654
 
657
655
  error_map: MutableMapping = {
@@ -687,7 +685,7 @@ class EncryptionScopesOperations:
687
685
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
688
686
  }
689
687
  )
690
- _next_request_params["api-version"] = self._api_version
688
+ _next_request_params["api-version"] = self._config.api_version
691
689
  _request = HttpRequest(
692
690
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
693
691
  )
@@ -1,3 +1,4 @@
1
+ # pylint: disable=line-too-long,useless-suppression
1
2
  # coding=utf-8
2
3
  # --------------------------------------------------------------------------
3
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5,11 +6,12 @@
5
6
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8
  # --------------------------------------------------------------------------
9
+ from collections.abc import MutableMapping
8
10
  from io import IOBase
9
- import sys
10
11
  from typing import Any, Callable, Dict, IO, Iterable, Literal, Optional, TypeVar, Union, overload
11
12
  import urllib.parse
12
13
 
14
+ from azure.core import PipelineClient
13
15
  from azure.core.exceptions import (
14
16
  ClientAuthenticationError,
15
17
  HttpResponseError,
@@ -26,12 +28,9 @@ from azure.core.utils import case_insensitive_dict
26
28
  from azure.mgmt.core.exceptions import ARMErrorFormat
27
29
 
28
30
  from .. import models as _models
29
- from ..._serialization import Serializer
31
+ from .._configuration import StorageManagementClientConfiguration
32
+ from .._utils.serialization import Deserializer, Serializer
30
33
 
31
- if sys.version_info >= (3, 9):
32
- from collections.abc import MutableMapping
33
- else:
34
- from typing import MutableMapping # type: ignore
35
34
  T = TypeVar("T")
36
35
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
37
36
 
@@ -50,7 +49,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription
50
49
  _url = kwargs.pop(
51
50
  "template_url",
52
51
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices",
53
- ) # pylint: disable=line-too-long
52
+ )
54
53
  path_format_arguments = {
55
54
  "resourceGroupName": _SERIALIZER.url(
56
55
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -87,7 +86,7 @@ def build_set_service_properties_request(
87
86
  _url = kwargs.pop(
88
87
  "template_url",
89
88
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}",
90
- ) # pylint: disable=line-too-long
89
+ )
91
90
  path_format_arguments = {
92
91
  "resourceGroupName": _SERIALIZER.url(
93
92
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -126,7 +125,7 @@ def build_get_service_properties_request(
126
125
  _url = kwargs.pop(
127
126
  "template_url",
128
127
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}",
129
- ) # pylint: disable=line-too-long
128
+ )
130
129
  path_format_arguments = {
131
130
  "resourceGroupName": _SERIALIZER.url(
132
131
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -168,7 +167,7 @@ def build_list_service_usages_request(
168
167
  _url = kwargs.pop(
169
168
  "template_url",
170
169
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages",
171
- ) # pylint: disable=line-too-long
170
+ )
172
171
  path_format_arguments = {
173
172
  "resourceGroupName": _SERIALIZER.url(
174
173
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -208,7 +207,7 @@ def build_get_service_usage_request(
208
207
  _url = kwargs.pop(
209
208
  "template_url",
210
209
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}",
211
- ) # pylint: disable=line-too-long
210
+ )
212
211
  path_format_arguments = {
213
212
  "resourceGroupName": _SERIALIZER.url(
214
213
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -238,7 +237,7 @@ class FileServicesOperations:
238
237
  **DO NOT** instantiate this class directly.
239
238
 
240
239
  Instead, you should access the following operations through
241
- :class:`~azure.mgmt.storage.v2024_01_01.StorageManagementClient`'s
240
+ :class:`~azure.mgmt.storage.StorageManagementClient`'s
242
241
  :attr:`file_services` attribute.
243
242
  """
244
243
 
@@ -246,11 +245,10 @@ class FileServicesOperations:
246
245
 
247
246
  def __init__(self, *args, **kwargs):
248
247
  input_args = list(args)
249
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
250
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
251
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
252
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
253
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
248
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
249
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
250
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
251
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
254
252
 
255
253
  @distributed_trace
256
254
  def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.FileServiceItems:
@@ -264,7 +262,7 @@ class FileServicesOperations:
264
262
  lower-case letters only. Required.
265
263
  :type account_name: str
266
264
  :return: FileServiceItems or the result of cls(response)
267
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceItems
265
+ :rtype: ~azure.mgmt.storage.models.FileServiceItems
268
266
  :raises ~azure.core.exceptions.HttpResponseError:
269
267
  """
270
268
  error_map: MutableMapping = {
@@ -278,7 +276,7 @@ class FileServicesOperations:
278
276
  _headers = kwargs.pop("headers", {}) or {}
279
277
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
280
278
 
281
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
279
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
282
280
  cls: ClsType[_models.FileServiceItems] = kwargs.pop("cls", None)
283
281
 
284
282
  _request = build_list_request(
@@ -331,12 +329,12 @@ class FileServicesOperations:
331
329
  :type account_name: str
332
330
  :param parameters: The properties of file services in storage accounts, including CORS
333
331
  (Cross-Origin Resource Sharing) rules. Required.
334
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
332
+ :type parameters: ~azure.mgmt.storage.models.FileServiceProperties
335
333
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
336
334
  Default value is "application/json".
337
335
  :paramtype content_type: str
338
336
  :return: FileServiceProperties or the result of cls(response)
339
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
337
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
340
338
  :raises ~azure.core.exceptions.HttpResponseError:
341
339
  """
342
340
 
@@ -367,7 +365,7 @@ class FileServicesOperations:
367
365
  Default value is "application/json".
368
366
  :paramtype content_type: str
369
367
  :return: FileServiceProperties or the result of cls(response)
370
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
368
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
371
369
  :raises ~azure.core.exceptions.HttpResponseError:
372
370
  """
373
371
 
@@ -392,9 +390,9 @@ class FileServicesOperations:
392
390
  :param parameters: The properties of file services in storage accounts, including CORS
393
391
  (Cross-Origin Resource Sharing) rules. Is either a FileServiceProperties type or a IO[bytes]
394
392
  type. Required.
395
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties or IO[bytes]
393
+ :type parameters: ~azure.mgmt.storage.models.FileServiceProperties or IO[bytes]
396
394
  :return: FileServiceProperties or the result of cls(response)
397
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
395
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
398
396
  :raises ~azure.core.exceptions.HttpResponseError:
399
397
  """
400
398
  error_map: MutableMapping = {
@@ -408,7 +406,7 @@ class FileServicesOperations:
408
406
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
409
407
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
410
408
 
411
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
409
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
412
410
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
413
411
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
414
412
  cls: ClsType[_models.FileServiceProperties] = kwargs.pop("cls", None)
@@ -468,7 +466,7 @@ class FileServicesOperations:
468
466
  lower-case letters only. Required.
469
467
  :type account_name: str
470
468
  :return: FileServiceProperties or the result of cls(response)
471
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
469
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
472
470
  :raises ~azure.core.exceptions.HttpResponseError:
473
471
  """
474
472
  error_map: MutableMapping = {
@@ -482,7 +480,7 @@ class FileServicesOperations:
482
480
  _headers = kwargs.pop("headers", {}) or {}
483
481
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
484
482
 
485
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
483
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
486
484
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
487
485
  cls: ClsType[_models.FileServiceProperties] = kwargs.pop("cls", None)
488
486
 
@@ -532,13 +530,13 @@ class FileServicesOperations:
532
530
  included in the list response. Default value is None.
533
531
  :type maxpagesize: int
534
532
  :return: An iterator like instance of either FileServiceUsage or the result of cls(response)
535
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2024_01_01.models.FileServiceUsage]
533
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.models.FileServiceUsage]
536
534
  :raises ~azure.core.exceptions.HttpResponseError:
537
535
  """
538
536
  _headers = kwargs.pop("headers", {}) or {}
539
537
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
540
538
 
541
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
539
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
542
540
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
543
541
  cls: ClsType[_models.FileServiceUsages] = kwargs.pop("cls", None)
544
542
 
@@ -574,7 +572,7 @@ class FileServicesOperations:
574
572
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
575
573
  }
576
574
  )
577
- _next_request_params["api-version"] = self._api_version
575
+ _next_request_params["api-version"] = self._config.api_version
578
576
  _request = HttpRequest(
579
577
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
580
578
  )
@@ -619,7 +617,7 @@ class FileServicesOperations:
619
617
  lower-case letters only. Required.
620
618
  :type account_name: str
621
619
  :return: FileServiceUsage or the result of cls(response)
622
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceUsage
620
+ :rtype: ~azure.mgmt.storage.models.FileServiceUsage
623
621
  :raises ~azure.core.exceptions.HttpResponseError:
624
622
  """
625
623
  error_map: MutableMapping = {
@@ -633,7 +631,7 @@ class FileServicesOperations:
633
631
  _headers = kwargs.pop("headers", {}) or {}
634
632
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
635
633
 
636
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
634
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
637
635
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
638
636
  file_service_usages_name: Literal["default"] = kwargs.pop("file_service_usages_name", "default")
639
637
  cls: ClsType[_models.FileServiceUsage] = kwargs.pop("cls", None)