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,10 +6,11 @@
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, Optional, TypeVar, Union, overload
11
12
 
13
+ from azure.core import PipelineClient
12
14
  from azure.core.exceptions import (
13
15
  ClientAuthenticationError,
14
16
  HttpResponseError,
@@ -24,12 +26,9 @@ from azure.core.utils import case_insensitive_dict
24
26
  from azure.mgmt.core.exceptions import ARMErrorFormat
25
27
 
26
28
  from .. import models as _models
27
- from ..._serialization import Serializer
29
+ from .._configuration import StorageManagementClientConfiguration
30
+ from .._utils.serialization import Deserializer, Serializer
28
31
 
29
- if sys.version_info >= (3, 9):
30
- from collections.abc import MutableMapping
31
- else:
32
- from typing import MutableMapping # type: ignore
33
32
  T = TypeVar("T")
34
33
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
35
34
 
@@ -54,7 +53,7 @@ def build_get_request(
54
53
  _url = kwargs.pop(
55
54
  "template_url",
56
55
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}",
57
- ) # pylint: disable=line-too-long
56
+ )
58
57
  path_format_arguments = {
59
58
  "resourceGroupName": _SERIALIZER.url(
60
59
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -95,7 +94,7 @@ def build_create_or_update_request(
95
94
  _url = kwargs.pop(
96
95
  "template_url",
97
96
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}",
98
- ) # pylint: disable=line-too-long
97
+ )
99
98
  path_format_arguments = {
100
99
  "resourceGroupName": _SERIALIZER.url(
101
100
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -134,7 +133,7 @@ def build_delete_request(
134
133
  _url = kwargs.pop(
135
134
  "template_url",
136
135
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}",
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\._\(\)]+$"
@@ -160,7 +159,7 @@ class ManagementPoliciesOperations:
160
159
  **DO NOT** instantiate this class directly.
161
160
 
162
161
  Instead, you should access the following operations through
163
- :class:`~azure.mgmt.storage.v2024_01_01.StorageManagementClient`'s
162
+ :class:`~azure.mgmt.storage.StorageManagementClient`'s
164
163
  :attr:`management_policies` attribute.
165
164
  """
166
165
 
@@ -168,11 +167,10 @@ class ManagementPoliciesOperations:
168
167
 
169
168
  def __init__(self, *args, **kwargs):
170
169
  input_args = list(args)
171
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
172
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
173
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
174
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
175
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
170
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
171
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
172
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
173
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
176
174
 
177
175
  @distributed_trace
178
176
  def get(
@@ -193,10 +191,9 @@ class ManagementPoliciesOperations:
193
191
  :type account_name: str
194
192
  :param management_policy_name: The name of the Storage Account Management Policy. It should
195
193
  always be 'default'. "default" Required.
196
- :type management_policy_name: str or
197
- ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicyName
194
+ :type management_policy_name: str or ~azure.mgmt.storage.models.ManagementPolicyName
198
195
  :return: ManagementPolicy or the result of cls(response)
199
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicy
196
+ :rtype: ~azure.mgmt.storage.models.ManagementPolicy
200
197
  :raises ~azure.core.exceptions.HttpResponseError:
201
198
  """
202
199
  error_map: MutableMapping = {
@@ -210,7 +207,7 @@ class ManagementPoliciesOperations:
210
207
  _headers = kwargs.pop("headers", {}) or {}
211
208
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
212
209
 
213
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
210
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
214
211
  cls: ClsType[_models.ManagementPolicy] = kwargs.pop("cls", None)
215
212
 
216
213
  _request = build_get_request(
@@ -264,15 +261,14 @@ class ManagementPoliciesOperations:
264
261
  :type account_name: str
265
262
  :param management_policy_name: The name of the Storage Account Management Policy. It should
266
263
  always be 'default'. "default" Required.
267
- :type management_policy_name: str or
268
- ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicyName
264
+ :type management_policy_name: str or ~azure.mgmt.storage.models.ManagementPolicyName
269
265
  :param properties: The ManagementPolicy set to a storage account. Required.
270
- :type properties: ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicy
266
+ :type properties: ~azure.mgmt.storage.models.ManagementPolicy
271
267
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
272
268
  Default value is "application/json".
273
269
  :paramtype content_type: str
274
270
  :return: ManagementPolicy or the result of cls(response)
275
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicy
271
+ :rtype: ~azure.mgmt.storage.models.ManagementPolicy
276
272
  :raises ~azure.core.exceptions.HttpResponseError:
277
273
  """
278
274
 
@@ -298,15 +294,14 @@ class ManagementPoliciesOperations:
298
294
  :type account_name: str
299
295
  :param management_policy_name: The name of the Storage Account Management Policy. It should
300
296
  always be 'default'. "default" Required.
301
- :type management_policy_name: str or
302
- ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicyName
297
+ :type management_policy_name: str or ~azure.mgmt.storage.models.ManagementPolicyName
303
298
  :param properties: The ManagementPolicy set to a storage account. Required.
304
299
  :type properties: IO[bytes]
305
300
  :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
306
301
  Default value is "application/json".
307
302
  :paramtype content_type: str
308
303
  :return: ManagementPolicy or the result of cls(response)
309
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicy
304
+ :rtype: ~azure.mgmt.storage.models.ManagementPolicy
310
305
  :raises ~azure.core.exceptions.HttpResponseError:
311
306
  """
312
307
 
@@ -330,13 +325,12 @@ class ManagementPoliciesOperations:
330
325
  :type account_name: str
331
326
  :param management_policy_name: The name of the Storage Account Management Policy. It should
332
327
  always be 'default'. "default" Required.
333
- :type management_policy_name: str or
334
- ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicyName
328
+ :type management_policy_name: str or ~azure.mgmt.storage.models.ManagementPolicyName
335
329
  :param properties: The ManagementPolicy set to a storage account. Is either a ManagementPolicy
336
330
  type or a IO[bytes] type. Required.
337
- :type properties: ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicy or IO[bytes]
331
+ :type properties: ~azure.mgmt.storage.models.ManagementPolicy or IO[bytes]
338
332
  :return: ManagementPolicy or the result of cls(response)
339
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicy
333
+ :rtype: ~azure.mgmt.storage.models.ManagementPolicy
340
334
  :raises ~azure.core.exceptions.HttpResponseError:
341
335
  """
342
336
  error_map: MutableMapping = {
@@ -350,7 +344,7 @@ class ManagementPoliciesOperations:
350
344
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
351
345
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
352
346
 
353
- 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))
354
348
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
355
349
  cls: ClsType[_models.ManagementPolicy] = kwargs.pop("cls", None)
356
350
 
@@ -413,8 +407,7 @@ class ManagementPoliciesOperations:
413
407
  :type account_name: str
414
408
  :param management_policy_name: The name of the Storage Account Management Policy. It should
415
409
  always be 'default'. "default" Required.
416
- :type management_policy_name: str or
417
- ~azure.mgmt.storage.v2024_01_01.models.ManagementPolicyName
410
+ :type management_policy_name: str or ~azure.mgmt.storage.models.ManagementPolicyName
418
411
  :return: None or the result of cls(response)
419
412
  :rtype: None
420
413
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -430,7 +423,7 @@ class ManagementPoliciesOperations:
430
423
  _headers = kwargs.pop("headers", {}) or {}
431
424
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
432
425
 
433
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
426
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
434
427
  cls: ClsType[None] = kwargs.pop("cls", None)
435
428
 
436
429
  _request = build_delete_request(
@@ -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,10 +6,11 @@
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
  # --------------------------------------------------------------------------
8
- import sys
9
+ from collections.abc import MutableMapping
9
10
  from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, cast
10
11
  import urllib.parse
11
12
 
13
+ from azure.core import PipelineClient
12
14
  from azure.core.exceptions import (
13
15
  ClientAuthenticationError,
14
16
  HttpResponseError,
@@ -29,12 +31,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
29
31
  from azure.mgmt.core.polling.arm_polling import ARMPolling
30
32
 
31
33
  from .. import models as _models
32
- from ..._serialization import Serializer
34
+ from .._configuration import StorageManagementClientConfiguration
35
+ from .._utils.serialization import Deserializer, Serializer
33
36
 
34
- if sys.version_info >= (3, 9):
35
- from collections.abc import MutableMapping
36
- else:
37
- from typing import MutableMapping # type: ignore
38
37
  T = TypeVar("T")
39
38
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
40
39
 
@@ -53,7 +52,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription
53
52
  _url = kwargs.pop(
54
53
  "template_url",
55
54
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/networkSecurityPerimeterConfigurations",
56
- ) # pylint: disable=line-too-long
55
+ )
57
56
  path_format_arguments = {
58
57
  "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
59
58
  "resourceGroupName": _SERIALIZER.url(
@@ -92,7 +91,7 @@ def build_get_request(
92
91
  _url = kwargs.pop(
93
92
  "template_url",
94
93
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}",
95
- ) # pylint: disable=line-too-long
94
+ )
96
95
  path_format_arguments = {
97
96
  "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
98
97
  "resourceGroupName": _SERIALIZER.url(
@@ -137,7 +136,7 @@ def build_reconcile_request(
137
136
  _url = kwargs.pop(
138
137
  "template_url",
139
138
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile",
140
- ) # pylint: disable=line-too-long
139
+ )
141
140
  path_format_arguments = {
142
141
  "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
143
142
  "resourceGroupName": _SERIALIZER.url(
@@ -171,7 +170,7 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
171
170
  **DO NOT** instantiate this class directly.
172
171
 
173
172
  Instead, you should access the following operations through
174
- :class:`~azure.mgmt.storage.v2024_01_01.StorageManagementClient`'s
173
+ :class:`~azure.mgmt.storage.StorageManagementClient`'s
175
174
  :attr:`network_security_perimeter_configurations` attribute.
176
175
  """
177
176
 
@@ -179,11 +178,10 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
179
178
 
180
179
  def __init__(self, *args, **kwargs):
181
180
  input_args = list(args)
182
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
183
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
184
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
185
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
186
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
181
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
182
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
183
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
184
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
187
185
 
188
186
  @distributed_trace
189
187
  def list(
@@ -201,13 +199,13 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
201
199
  :return: An iterator like instance of either NetworkSecurityPerimeterConfiguration or the
202
200
  result of cls(response)
203
201
  :rtype:
204
- ~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2024_01_01.models.NetworkSecurityPerimeterConfiguration]
202
+ ~azure.core.paging.ItemPaged[~azure.mgmt.storage.models.NetworkSecurityPerimeterConfiguration]
205
203
  :raises ~azure.core.exceptions.HttpResponseError:
206
204
  """
207
205
  _headers = kwargs.pop("headers", {}) or {}
208
206
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
209
207
 
210
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
208
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
211
209
  cls: ClsType[_models.NetworkSecurityPerimeterConfigurationList] = kwargs.pop("cls", None)
212
210
 
213
211
  error_map: MutableMapping = {
@@ -240,7 +238,7 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
240
238
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
241
239
  }
242
240
  )
243
- _next_request_params["api-version"] = self._api_version
241
+ _next_request_params["api-version"] = self._config.api_version
244
242
  _request = HttpRequest(
245
243
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
246
244
  )
@@ -294,7 +292,7 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
294
292
  configuration. Required.
295
293
  :type network_security_perimeter_configuration_name: str
296
294
  :return: NetworkSecurityPerimeterConfiguration or the result of cls(response)
297
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.NetworkSecurityPerimeterConfiguration
295
+ :rtype: ~azure.mgmt.storage.models.NetworkSecurityPerimeterConfiguration
298
296
  :raises ~azure.core.exceptions.HttpResponseError:
299
297
  """
300
298
  error_map: MutableMapping = {
@@ -308,7 +306,7 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
308
306
  _headers = kwargs.pop("headers", {}) or {}
309
307
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
310
308
 
311
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
309
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
312
310
  cls: ClsType[_models.NetworkSecurityPerimeterConfiguration] = kwargs.pop("cls", None)
313
311
 
314
312
  _request = build_get_request(
@@ -359,7 +357,7 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
359
357
  _headers = kwargs.pop("headers", {}) or {}
360
358
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
361
359
 
362
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
360
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
363
361
  cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
364
362
 
365
363
  _request = build_reconcile_request(
@@ -427,7 +425,7 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-
427
425
  _headers = kwargs.pop("headers", {}) or {}
428
426
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
429
427
 
430
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
428
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
431
429
  cls: ClsType[None] = kwargs.pop("cls", None)
432
430
  polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
433
431
  lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@@ -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
 
@@ -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}/objectReplicationPolicies",
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\._\(\)]+$"
@@ -85,7 +84,7 @@ def build_get_request(
85
84
  _url = kwargs.pop(
86
85
  "template_url",
87
86
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}",
88
- ) # pylint: disable=line-too-long
87
+ )
89
88
  path_format_arguments = {
90
89
  "resourceGroupName": _SERIALIZER.url(
91
90
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -124,7 +123,7 @@ def build_create_or_update_request(
124
123
  _url = kwargs.pop(
125
124
  "template_url",
126
125
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}",
127
- ) # pylint: disable=line-too-long
126
+ )
128
127
  path_format_arguments = {
129
128
  "resourceGroupName": _SERIALIZER.url(
130
129
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -164,7 +163,7 @@ def build_delete_request(
164
163
  _url = kwargs.pop(
165
164
  "template_url",
166
165
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}",
167
- ) # pylint: disable=line-too-long
166
+ )
168
167
  path_format_arguments = {
169
168
  "resourceGroupName": _SERIALIZER.url(
170
169
  "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
@@ -195,7 +194,7 @@ class ObjectReplicationPoliciesOperations:
195
194
  **DO NOT** instantiate this class directly.
196
195
 
197
196
  Instead, you should access the following operations through
198
- :class:`~azure.mgmt.storage.v2024_01_01.StorageManagementClient`'s
197
+ :class:`~azure.mgmt.storage.StorageManagementClient`'s
199
198
  :attr:`object_replication_policies` attribute.
200
199
  """
201
200
 
@@ -203,11 +202,10 @@ class ObjectReplicationPoliciesOperations:
203
202
 
204
203
  def __init__(self, *args, **kwargs):
205
204
  input_args = list(args)
206
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
207
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
208
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
209
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
210
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
205
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
206
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
207
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
208
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
211
209
 
212
210
  @distributed_trace
213
211
  def list(
@@ -224,14 +222,13 @@ class ObjectReplicationPoliciesOperations:
224
222
  :type account_name: str
225
223
  :return: An iterator like instance of either ObjectReplicationPolicy or the result of
226
224
  cls(response)
227
- :rtype:
228
- ~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy]
225
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.models.ObjectReplicationPolicy]
229
226
  :raises ~azure.core.exceptions.HttpResponseError:
230
227
  """
231
228
  _headers = kwargs.pop("headers", {}) or {}
232
229
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
233
230
 
234
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
231
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
235
232
  cls: ClsType[_models.ObjectReplicationPolicies] = kwargs.pop("cls", None)
236
233
 
237
234
  error_map: MutableMapping = {
@@ -264,7 +261,7 @@ class ObjectReplicationPoliciesOperations:
264
261
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
265
262
  }
266
263
  )
267
- _next_request_params["api-version"] = self._api_version
264
+ _next_request_params["api-version"] = self._config.api_version
268
265
  _request = HttpRequest(
269
266
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
270
267
  )
@@ -316,7 +313,7 @@ class ObjectReplicationPoliciesOperations:
316
313
  destination account. The policy is downloaded as a JSON file. Required.
317
314
  :type object_replication_policy_id: str
318
315
  :return: ObjectReplicationPolicy or the result of cls(response)
319
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy
316
+ :rtype: ~azure.mgmt.storage.models.ObjectReplicationPolicy
320
317
  :raises ~azure.core.exceptions.HttpResponseError:
321
318
  """
322
319
  error_map: MutableMapping = {
@@ -330,7 +327,7 @@ class ObjectReplicationPoliciesOperations:
330
327
  _headers = kwargs.pop("headers", {}) or {}
331
328
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
332
329
 
333
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
330
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
334
331
  cls: ClsType[_models.ObjectReplicationPolicy] = kwargs.pop("cls", None)
335
332
 
336
333
  _request = build_get_request(
@@ -390,12 +387,12 @@ class ObjectReplicationPoliciesOperations:
390
387
  :type object_replication_policy_id: str
391
388
  :param properties: The object replication policy set to a storage account. A unique policy ID
392
389
  will be created if absent. Required.
393
- :type properties: ~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy
390
+ :type properties: ~azure.mgmt.storage.models.ObjectReplicationPolicy
394
391
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
395
392
  Default value is "application/json".
396
393
  :paramtype content_type: str
397
394
  :return: ObjectReplicationPolicy or the result of cls(response)
398
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy
395
+ :rtype: ~azure.mgmt.storage.models.ObjectReplicationPolicy
399
396
  :raises ~azure.core.exceptions.HttpResponseError:
400
397
  """
401
398
 
@@ -431,7 +428,7 @@ class ObjectReplicationPoliciesOperations:
431
428
  Default value is "application/json".
432
429
  :paramtype content_type: str
433
430
  :return: ObjectReplicationPolicy or the result of cls(response)
434
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy
431
+ :rtype: ~azure.mgmt.storage.models.ObjectReplicationPolicy
435
432
  :raises ~azure.core.exceptions.HttpResponseError:
436
433
  """
437
434
 
@@ -461,9 +458,9 @@ class ObjectReplicationPoliciesOperations:
461
458
  :param properties: The object replication policy set to a storage account. A unique policy ID
462
459
  will be created if absent. Is either a ObjectReplicationPolicy type or a IO[bytes] type.
463
460
  Required.
464
- :type properties: ~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy or IO[bytes]
461
+ :type properties: ~azure.mgmt.storage.models.ObjectReplicationPolicy or IO[bytes]
465
462
  :return: ObjectReplicationPolicy or the result of cls(response)
466
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ObjectReplicationPolicy
463
+ :rtype: ~azure.mgmt.storage.models.ObjectReplicationPolicy
467
464
  :raises ~azure.core.exceptions.HttpResponseError:
468
465
  """
469
466
  error_map: MutableMapping = {
@@ -477,7 +474,7 @@ class ObjectReplicationPoliciesOperations:
477
474
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
478
475
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
479
476
 
480
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
477
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
481
478
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
482
479
  cls: ClsType[_models.ObjectReplicationPolicy] = kwargs.pop("cls", None)
483
480
 
@@ -555,7 +552,7 @@ class ObjectReplicationPoliciesOperations:
555
552
  _headers = kwargs.pop("headers", {}) or {}
556
553
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
557
554
 
558
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
555
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
559
556
  cls: ClsType[None] = kwargs.pop("cls", None)
560
557
 
561
558
  _request = build_delete_request(
@@ -5,10 +5,11 @@
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
- import sys
8
+ from collections.abc import MutableMapping
9
9
  from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
10
10
  import urllib.parse
11
11
 
12
+ from azure.core import PipelineClient
12
13
  from azure.core.exceptions import (
13
14
  ClientAuthenticationError,
14
15
  HttpResponseError,
@@ -25,12 +26,9 @@ from azure.core.utils import case_insensitive_dict
25
26
  from azure.mgmt.core.exceptions import ARMErrorFormat
26
27
 
27
28
  from .. import models as _models
28
- from ..._serialization import Serializer
29
+ from .._configuration import StorageManagementClientConfiguration
30
+ from .._utils.serialization import Deserializer, Serializer
29
31
 
30
- if sys.version_info >= (3, 9):
31
- from collections.abc import MutableMapping
32
- else:
33
- from typing import MutableMapping # type: ignore
34
32
  T = TypeVar("T")
35
33
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
36
34
 
@@ -63,7 +61,7 @@ class Operations:
63
61
  **DO NOT** instantiate this class directly.
64
62
 
65
63
  Instead, you should access the following operations through
66
- :class:`~azure.mgmt.storage.v2024_01_01.StorageManagementClient`'s
64
+ :class:`~azure.mgmt.storage.StorageManagementClient`'s
67
65
  :attr:`operations` attribute.
68
66
  """
69
67
 
@@ -71,24 +69,23 @@ class Operations:
71
69
 
72
70
  def __init__(self, *args, **kwargs):
73
71
  input_args = list(args)
74
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
75
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
76
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
77
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
78
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
72
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
73
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
74
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
75
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
79
76
 
80
77
  @distributed_trace
81
78
  def list(self, **kwargs: Any) -> Iterable["_models.Operation"]:
82
79
  """Lists all of the available Storage Rest API operations.
83
80
 
84
81
  :return: An iterator like instance of either Operation or the result of cls(response)
85
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2024_01_01.models.Operation]
82
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.storage.models.Operation]
86
83
  :raises ~azure.core.exceptions.HttpResponseError:
87
84
  """
88
85
  _headers = kwargs.pop("headers", {}) or {}
89
86
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
90
87
 
91
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
88
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
92
89
  cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None)
93
90
 
94
91
  error_map: MutableMapping = {
@@ -118,7 +115,7 @@ class Operations:
118
115
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
119
116
  }
120
117
  )
121
- _next_request_params["api-version"] = self._api_version
118
+ _next_request_params["api-version"] = self._config.api_version
122
119
  _request = HttpRequest(
123
120
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
124
121
  )
@@ -0,0 +1,21 @@
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
+ # --------------------------------------------------------------------------
6
+ """Customize generated code here.
7
+
8
+ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
9
+ """
10
+ from typing import List
11
+
12
+ __all__: List[str] = [] # Add all objects you want publicly available to users at this package level
13
+
14
+
15
+ def patch_sdk():
16
+ """Do not remove from this file.
17
+
18
+ `patch_sdk` is a last resort escape hatch that allows you to do customizations
19
+ you can't accomplish using the techniques described in
20
+ https://aka.ms/azsdk/python/dpcodegen/python/customize
21
+ """