azure-mgmt-storage 22.2.0__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 +80 -95
  32. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignment_instances_report_operations.py +13 -15
  33. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_instances_report_operations.py +13 -15
  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 +855 -910
  39. azure/mgmt/storage/{v2016_01_01/operations → models}/_patch.py +5 -4
  40. azure/mgmt/storage/{v2024_01_01/operations → operations}/__init__.py +1 -0
  41. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_containers_operations.py +81 -84
  42. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_inventory_policies_operations.py +31 -39
  43. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_services_operations.py +24 -27
  44. azure/mgmt/storage/{v2024_01_01/operations → operations}/_deleted_accounts_operations.py +16 -18
  45. azure/mgmt/storage/{v2024_01_01/operations → operations}/_encryption_scopes_operations.py +32 -34
  46. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_services_operations.py +30 -32
  47. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_shares_operations.py +44 -47
  48. azure/mgmt/storage/{v2024_01_01/operations → operations}/_local_users_operations.py +33 -35
  49. azure/mgmt/storage/{v2024_01_01/operations → operations}/_management_policies_operations.py +27 -34
  50. azure/mgmt/storage/{v2024_01_01/operations → operations}/_network_security_perimeter_configurations_operations.py +20 -22
  51. azure/mgmt/storage/{v2024_01_01/operations → operations}/_object_replication_policies_operations.py +26 -29
  52. azure/mgmt/storage/{v2024_01_01/operations → operations}/_operations.py +12 -15
  53. azure/mgmt/storage/operations/_patch.py +21 -0
  54. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_endpoint_connections_operations.py +26 -29
  55. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_link_resources_operations.py +13 -15
  56. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_operations.py +33 -35
  57. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_services_operations.py +23 -25
  58. azure/mgmt/storage/{v2024_01_01/operations → operations}/_skus_operations.py +12 -15
  59. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_accounts_operations.py +97 -105
  60. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignment_instances_report_operations.py +14 -18
  61. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_instances_report_operations.py +14 -18
  62. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_operations.py +36 -47
  63. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_operations.py +33 -35
  64. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_services_operations.py +23 -25
  65. azure/mgmt/storage/{v2024_01_01/operations → operations}/_usages_operations.py +13 -16
  66. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/METADATA +11 -6
  67. azure_mgmt_storage-23.0.0.dist-info/RECORD +73 -0
  68. azure/mgmt/storage/models.py +0 -8
  69. azure/mgmt/storage/v2016_01_01/__init__.py +0 -32
  70. azure/mgmt/storage/v2016_01_01/_configuration.py +0 -65
  71. azure/mgmt/storage/v2016_01_01/_patch.py +0 -32
  72. azure/mgmt/storage/v2016_01_01/_storage_management_client.py +0 -117
  73. azure/mgmt/storage/v2016_01_01/aio/__init__.py +0 -29
  74. azure/mgmt/storage/v2016_01_01/aio/_configuration.py +0 -65
  75. azure/mgmt/storage/v2016_01_01/aio/_patch.py +0 -32
  76. azure/mgmt/storage/v2016_01_01/aio/_storage_management_client.py +0 -120
  77. azure/mgmt/storage/v2016_01_01/aio/operations/__init__.py +0 -27
  78. azure/mgmt/storage/v2016_01_01/aio/operations/_storage_accounts_operations.py +0 -1023
  79. azure/mgmt/storage/v2016_01_01/aio/operations/_usage_operations.py +0 -130
  80. azure/mgmt/storage/v2016_01_01/models/__init__.py +0 -88
  81. azure/mgmt/storage/v2016_01_01/models/_models_py3.py +0 -829
  82. azure/mgmt/storage/v2016_01_01/models/_storage_management_client_enums.py +0 -99
  83. azure/mgmt/storage/v2016_01_01/operations/__init__.py +0 -27
  84. azure/mgmt/storage/v2016_01_01/operations/_storage_accounts_operations.py +0 -1278
  85. azure/mgmt/storage/v2016_01_01/operations/_usage_operations.py +0 -157
  86. azure/mgmt/storage/v2016_01_01/py.typed +0 -1
  87. azure/mgmt/storage/v2017_10_01/__init__.py +0 -32
  88. azure/mgmt/storage/v2017_10_01/_configuration.py +0 -65
  89. azure/mgmt/storage/v2017_10_01/_patch.py +0 -32
  90. azure/mgmt/storage/v2017_10_01/_storage_management.py +0 -121
  91. azure/mgmt/storage/v2017_10_01/_version.py +0 -9
  92. azure/mgmt/storage/v2017_10_01/aio/__init__.py +0 -29
  93. azure/mgmt/storage/v2017_10_01/aio/_configuration.py +0 -65
  94. azure/mgmt/storage/v2017_10_01/aio/_patch.py +0 -32
  95. azure/mgmt/storage/v2017_10_01/aio/_storage_management.py +0 -124
  96. azure/mgmt/storage/v2017_10_01/aio/operations/__init__.py +0 -31
  97. azure/mgmt/storage/v2017_10_01/aio/operations/_skus_operations.py +0 -130
  98. azure/mgmt/storage/v2017_10_01/aio/operations/_storage_accounts_operations.py +0 -1299
  99. azure/mgmt/storage/v2017_10_01/aio/operations/_usage_operations.py +0 -130
  100. azure/mgmt/storage/v2017_10_01/models/__init__.py +0 -140
  101. azure/mgmt/storage/v2017_10_01/models/_models_py3.py +0 -1851
  102. azure/mgmt/storage/v2017_10_01/models/_patch.py +0 -20
  103. azure/mgmt/storage/v2017_10_01/models/_storage_management_enums.py +0 -192
  104. azure/mgmt/storage/v2017_10_01/operations/__init__.py +0 -31
  105. azure/mgmt/storage/v2017_10_01/operations/_operations.py +0 -151
  106. azure/mgmt/storage/v2017_10_01/operations/_patch.py +0 -20
  107. azure/mgmt/storage/v2017_10_01/operations/_skus_operations.py +0 -157
  108. azure/mgmt/storage/v2017_10_01/operations/_storage_accounts_operations.py +0 -1638
  109. azure/mgmt/storage/v2017_10_01/operations/_usage_operations.py +0 -157
  110. azure/mgmt/storage/v2017_10_01/py.typed +0 -1
  111. azure/mgmt/storage/v2019_06_01/__init__.py +0 -32
  112. azure/mgmt/storage/v2019_06_01/_configuration.py +0 -64
  113. azure/mgmt/storage/v2019_06_01/_patch.py +0 -32
  114. azure/mgmt/storage/v2019_06_01/_storage_management_client.py +0 -213
  115. azure/mgmt/storage/v2019_06_01/_version.py +0 -9
  116. azure/mgmt/storage/v2019_06_01/aio/__init__.py +0 -29
  117. azure/mgmt/storage/v2019_06_01/aio/_configuration.py +0 -64
  118. azure/mgmt/storage/v2019_06_01/aio/_patch.py +0 -32
  119. azure/mgmt/storage/v2019_06_01/aio/_storage_management_client.py +0 -217
  120. azure/mgmt/storage/v2019_06_01/aio/operations/__init__.py +0 -59
  121. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_containers_operations.py +0 -1725
  122. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_inventory_policies_operations.py +0 -437
  123. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_services_operations.py +0 -368
  124. azure/mgmt/storage/v2019_06_01/aio/operations/_encryption_scopes_operations.py +0 -538
  125. azure/mgmt/storage/v2019_06_01/aio/operations/_file_services_operations.py +0 -335
  126. azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py +0 -771
  127. azure/mgmt/storage/v2019_06_01/aio/operations/_object_replication_policies_operations.py +0 -428
  128. azure/mgmt/storage/v2019_06_01/aio/operations/_operations.py +0 -130
  129. azure/mgmt/storage/v2019_06_01/aio/operations/_patch.py +0 -20
  130. azure/mgmt/storage/v2019_06_01/aio/operations/_private_endpoint_connections_operations.py +0 -424
  131. azure/mgmt/storage/v2019_06_01/aio/operations/_private_link_resources_operations.py +0 -113
  132. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_operations.py +0 -597
  133. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_services_operations.py +0 -335
  134. azure/mgmt/storage/v2019_06_01/aio/operations/_skus_operations.py +0 -131
  135. azure/mgmt/storage/v2019_06_01/aio/operations/_storage_accounts_operations.py +0 -1696
  136. azure/mgmt/storage/v2019_06_01/aio/operations/_table_operations.py +0 -394
  137. azure/mgmt/storage/v2019_06_01/aio/operations/_table_services_operations.py +0 -335
  138. azure/mgmt/storage/v2019_06_01/aio/operations/_usages_operations.py +0 -134
  139. azure/mgmt/storage/v2019_06_01/models/__init__.py +0 -364
  140. azure/mgmt/storage/v2019_06_01/models/_models_py3.py +0 -6038
  141. azure/mgmt/storage/v2019_06_01/models/_patch.py +0 -20
  142. azure/mgmt/storage/v2019_06_01/models/_storage_management_client_enums.py +0 -456
  143. azure/mgmt/storage/v2019_06_01/operations/__init__.py +0 -59
  144. azure/mgmt/storage/v2019_06_01/operations/_blob_containers_operations.py +0 -2226
  145. azure/mgmt/storage/v2019_06_01/operations/_blob_inventory_policies_operations.py +0 -582
  146. azure/mgmt/storage/v2019_06_01/operations/_blob_services_operations.py +0 -476
  147. azure/mgmt/storage/v2019_06_01/operations/_encryption_scopes_operations.py +0 -677
  148. azure/mgmt/storage/v2019_06_01/operations/_file_services_operations.py +0 -444
  149. azure/mgmt/storage/v2019_06_01/operations/_file_shares_operations.py +0 -1000
  150. azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py +0 -453
  151. azure/mgmt/storage/v2019_06_01/operations/_object_replication_policies_operations.py +0 -567
  152. azure/mgmt/storage/v2019_06_01/operations/_operations.py +0 -151
  153. azure/mgmt/storage/v2019_06_01/operations/_patch.py +0 -20
  154. azure/mgmt/storage/v2019_06_01/operations/_private_endpoint_connections_operations.py +0 -575
  155. azure/mgmt/storage/v2019_06_01/operations/_private_link_resources_operations.py +0 -149
  156. azure/mgmt/storage/v2019_06_01/operations/_queue_operations.py +0 -805
  157. azure/mgmt/storage/v2019_06_01/operations/_queue_services_operations.py +0 -444
  158. azure/mgmt/storage/v2019_06_01/operations/_skus_operations.py +0 -157
  159. azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py +0 -2122
  160. azure/mgmt/storage/v2019_06_01/operations/_table_operations.py +0 -563
  161. azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py +0 -444
  162. azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py +0 -164
  163. azure/mgmt/storage/v2019_06_01/py.typed +0 -1
  164. azure/mgmt/storage/v2024_01_01/__init__.py +0 -32
  165. azure/mgmt/storage/v2024_01_01/_configuration.py +0 -64
  166. azure/mgmt/storage/v2024_01_01/_patch.py +0 -20
  167. azure/mgmt/storage/v2024_01_01/_storage_management_client.py +0 -256
  168. azure/mgmt/storage/v2024_01_01/_version.py +0 -9
  169. azure/mgmt/storage/v2024_01_01/aio/__init__.py +0 -29
  170. azure/mgmt/storage/v2024_01_01/aio/_configuration.py +0 -64
  171. azure/mgmt/storage/v2024_01_01/aio/_patch.py +0 -20
  172. azure/mgmt/storage/v2024_01_01/aio/_storage_management_client.py +0 -261
  173. azure/mgmt/storage/v2024_01_01/aio/operations/_management_policies_operations.py +0 -343
  174. azure/mgmt/storage/v2024_01_01/aio/operations/_operations.py +0 -130
  175. azure/mgmt/storage/v2024_01_01/aio/operations/_patch.py +0 -20
  176. azure/mgmt/storage/v2024_01_01/models/_patch.py +0 -20
  177. azure/mgmt/storage/v2024_01_01/operations/_patch.py +0 -20
  178. azure/mgmt/storage/v2024_01_01/py.typed +0 -1
  179. azure_mgmt_storage-22.2.0.dist-info/RECORD +0 -183
  180. /azure/mgmt/storage/{v2024_01_01/models → models}/__init__.py +0 -0
  181. /azure/mgmt/storage/{v2024_01_01/models → models}/_storage_management_client_enums.py +0 -0
  182. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/LICENSE +0 -0
  183. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/WHEEL +0 -0
  184. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/top_level.txt +0 -0
@@ -5,11 +5,12 @@
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
+ from collections.abc import MutableMapping
8
9
  from io import IOBase
9
- import sys
10
10
  from typing import Any, AsyncIterable, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
+ from azure.core import AsyncPipelineClient
13
14
  from azure.core.async_paging import AsyncItemPaged, AsyncList
14
15
  from azure.core.exceptions import (
15
16
  ClientAuthenticationError,
@@ -27,6 +28,7 @@ from azure.core.utils import case_insensitive_dict
27
28
  from azure.mgmt.core.exceptions import ARMErrorFormat
28
29
 
29
30
  from ... import models as _models
31
+ from ..._utils.serialization import Deserializer, Serializer
30
32
  from ...operations._file_services_operations import (
31
33
  build_get_service_properties_request,
32
34
  build_get_service_usage_request,
@@ -34,11 +36,8 @@ from ...operations._file_services_operations import (
34
36
  build_list_service_usages_request,
35
37
  build_set_service_properties_request,
36
38
  )
39
+ from .._configuration import StorageManagementClientConfiguration
37
40
 
38
- if sys.version_info >= (3, 9):
39
- from collections.abc import MutableMapping
40
- else:
41
- from typing import MutableMapping # type: ignore
42
41
  T = TypeVar("T")
43
42
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
44
43
 
@@ -49,7 +48,7 @@ class FileServicesOperations:
49
48
  **DO NOT** instantiate this class directly.
50
49
 
51
50
  Instead, you should access the following operations through
52
- :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
51
+ :class:`~azure.mgmt.storage.aio.StorageManagementClient`'s
53
52
  :attr:`file_services` attribute.
54
53
  """
55
54
 
@@ -57,11 +56,10 @@ class FileServicesOperations:
57
56
 
58
57
  def __init__(self, *args, **kwargs) -> None:
59
58
  input_args = list(args)
60
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
61
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
62
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
63
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
64
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
59
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
60
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
61
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
62
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
65
63
 
66
64
  @distributed_trace_async
67
65
  async def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.FileServiceItems:
@@ -75,7 +73,7 @@ class FileServicesOperations:
75
73
  lower-case letters only. Required.
76
74
  :type account_name: str
77
75
  :return: FileServiceItems or the result of cls(response)
78
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceItems
76
+ :rtype: ~azure.mgmt.storage.models.FileServiceItems
79
77
  :raises ~azure.core.exceptions.HttpResponseError:
80
78
  """
81
79
  error_map: MutableMapping = {
@@ -89,7 +87,7 @@ class FileServicesOperations:
89
87
  _headers = kwargs.pop("headers", {}) or {}
90
88
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
91
89
 
92
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
90
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
93
91
  cls: ClsType[_models.FileServiceItems] = kwargs.pop("cls", None)
94
92
 
95
93
  _request = build_list_request(
@@ -142,12 +140,12 @@ class FileServicesOperations:
142
140
  :type account_name: str
143
141
  :param parameters: The properties of file services in storage accounts, including CORS
144
142
  (Cross-Origin Resource Sharing) rules. Required.
145
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
143
+ :type parameters: ~azure.mgmt.storage.models.FileServiceProperties
146
144
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
147
145
  Default value is "application/json".
148
146
  :paramtype content_type: str
149
147
  :return: FileServiceProperties or the result of cls(response)
150
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
148
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
151
149
  :raises ~azure.core.exceptions.HttpResponseError:
152
150
  """
153
151
 
@@ -178,7 +176,7 @@ class FileServicesOperations:
178
176
  Default value is "application/json".
179
177
  :paramtype content_type: str
180
178
  :return: FileServiceProperties or the result of cls(response)
181
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
179
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
182
180
  :raises ~azure.core.exceptions.HttpResponseError:
183
181
  """
184
182
 
@@ -203,9 +201,9 @@ class FileServicesOperations:
203
201
  :param parameters: The properties of file services in storage accounts, including CORS
204
202
  (Cross-Origin Resource Sharing) rules. Is either a FileServiceProperties type or a IO[bytes]
205
203
  type. Required.
206
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties or IO[bytes]
204
+ :type parameters: ~azure.mgmt.storage.models.FileServiceProperties or IO[bytes]
207
205
  :return: FileServiceProperties or the result of cls(response)
208
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
206
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
209
207
  :raises ~azure.core.exceptions.HttpResponseError:
210
208
  """
211
209
  error_map: MutableMapping = {
@@ -219,7 +217,7 @@ class FileServicesOperations:
219
217
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
220
218
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
221
219
 
222
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
220
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
223
221
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
224
222
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
225
223
  cls: ClsType[_models.FileServiceProperties] = kwargs.pop("cls", None)
@@ -279,7 +277,7 @@ class FileServicesOperations:
279
277
  lower-case letters only. Required.
280
278
  :type account_name: str
281
279
  :return: FileServiceProperties or the result of cls(response)
282
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
280
+ :rtype: ~azure.mgmt.storage.models.FileServiceProperties
283
281
  :raises ~azure.core.exceptions.HttpResponseError:
284
282
  """
285
283
  error_map: MutableMapping = {
@@ -293,7 +291,7 @@ class FileServicesOperations:
293
291
  _headers = kwargs.pop("headers", {}) or {}
294
292
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
295
293
 
296
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
294
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
297
295
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
298
296
  cls: ClsType[_models.FileServiceProperties] = kwargs.pop("cls", None)
299
297
 
@@ -343,14 +341,13 @@ class FileServicesOperations:
343
341
  included in the list response. Default value is None.
344
342
  :type maxpagesize: int
345
343
  :return: An iterator like instance of either FileServiceUsage or the result of cls(response)
346
- :rtype:
347
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.FileServiceUsage]
344
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.models.FileServiceUsage]
348
345
  :raises ~azure.core.exceptions.HttpResponseError:
349
346
  """
350
347
  _headers = kwargs.pop("headers", {}) or {}
351
348
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
352
349
 
353
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
350
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
354
351
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
355
352
  cls: ClsType[_models.FileServiceUsages] = kwargs.pop("cls", None)
356
353
 
@@ -386,7 +383,7 @@ class FileServicesOperations:
386
383
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
387
384
  }
388
385
  )
389
- _next_request_params["api-version"] = self._api_version
386
+ _next_request_params["api-version"] = self._config.api_version
390
387
  _request = HttpRequest(
391
388
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
392
389
  )
@@ -433,7 +430,7 @@ class FileServicesOperations:
433
430
  lower-case letters only. Required.
434
431
  :type account_name: str
435
432
  :return: FileServiceUsage or the result of cls(response)
436
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceUsage
433
+ :rtype: ~azure.mgmt.storage.models.FileServiceUsage
437
434
  :raises ~azure.core.exceptions.HttpResponseError:
438
435
  """
439
436
  error_map: MutableMapping = {
@@ -447,7 +444,7 @@ class FileServicesOperations:
447
444
  _headers = kwargs.pop("headers", {}) or {}
448
445
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
449
446
 
450
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
447
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
451
448
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
452
449
  file_service_usages_name: Literal["default"] = kwargs.pop("file_service_usages_name", "default")
453
450
  cls: ClsType[_models.FileServiceUsage] = kwargs.pop("cls", None)
@@ -5,11 +5,12 @@
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
+ from collections.abc import MutableMapping
8
9
  from io import IOBase
9
- import sys
10
10
  from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
+ from azure.core import AsyncPipelineClient
13
14
  from azure.core.async_paging import AsyncItemPaged, AsyncList
14
15
  from azure.core.exceptions import (
15
16
  ClientAuthenticationError,
@@ -27,6 +28,7 @@ from azure.core.utils import case_insensitive_dict
27
28
  from azure.mgmt.core.exceptions import ARMErrorFormat
28
29
 
29
30
  from ... import models as _models
31
+ from ..._utils.serialization import Deserializer, Serializer
30
32
  from ...operations._file_shares_operations import (
31
33
  build_create_request,
32
34
  build_delete_request,
@@ -36,11 +38,8 @@ from ...operations._file_shares_operations import (
36
38
  build_restore_request,
37
39
  build_update_request,
38
40
  )
41
+ from .._configuration import StorageManagementClientConfiguration
39
42
 
40
- if sys.version_info >= (3, 9):
41
- from collections.abc import MutableMapping
42
- else:
43
- from typing import MutableMapping # type: ignore
44
43
  T = TypeVar("T")
45
44
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
46
45
 
@@ -51,7 +50,7 @@ class FileSharesOperations:
51
50
  **DO NOT** instantiate this class directly.
52
51
 
53
52
  Instead, you should access the following operations through
54
- :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
53
+ :class:`~azure.mgmt.storage.aio.StorageManagementClient`'s
55
54
  :attr:`file_shares` attribute.
56
55
  """
57
56
 
@@ -59,11 +58,10 @@ class FileSharesOperations:
59
58
 
60
59
  def __init__(self, *args, **kwargs) -> None:
61
60
  input_args = list(args)
62
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
63
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
64
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
65
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
66
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
61
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
62
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
63
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
64
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
67
65
 
68
66
  @distributed_trace
69
67
  def list(
@@ -95,14 +93,13 @@ class FileSharesOperations:
95
93
  None.
96
94
  :type expand: str
97
95
  :return: An iterator like instance of either FileShareItem or the result of cls(response)
98
- :rtype:
99
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.FileShareItem]
96
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.models.FileShareItem]
100
97
  :raises ~azure.core.exceptions.HttpResponseError:
101
98
  """
102
99
  _headers = kwargs.pop("headers", {}) or {}
103
100
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
104
101
 
105
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
102
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
106
103
  cls: ClsType[_models.FileShareItems] = kwargs.pop("cls", None)
107
104
 
108
105
  error_map: MutableMapping = {
@@ -138,7 +135,7 @@ class FileSharesOperations:
138
135
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
139
136
  }
140
137
  )
141
- _next_request_params["api-version"] = self._api_version
138
+ _next_request_params["api-version"] = self._config.api_version
142
139
  _request = HttpRequest(
143
140
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
144
141
  )
@@ -199,7 +196,7 @@ class FileSharesOperations:
199
196
  or number. Required.
200
197
  :type share_name: str
201
198
  :param file_share: Properties of the file share to create. Required.
202
- :type file_share: ~azure.mgmt.storage.v2024_01_01.models.FileShare
199
+ :type file_share: ~azure.mgmt.storage.models.FileShare
203
200
  :param expand: Optional, used to expand the properties within share's properties. Valid values
204
201
  are: snapshots. Should be passed as a string with delimiter ','. Default value is None.
205
202
  :type expand: str
@@ -207,7 +204,7 @@ class FileSharesOperations:
207
204
  Default value is "application/json".
208
205
  :paramtype content_type: str
209
206
  :return: FileShare or the result of cls(response)
210
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
207
+ :rtype: ~azure.mgmt.storage.models.FileShare
211
208
  :raises ~azure.core.exceptions.HttpResponseError:
212
209
  """
213
210
 
@@ -248,7 +245,7 @@ class FileSharesOperations:
248
245
  Default value is "application/json".
249
246
  :paramtype content_type: str
250
247
  :return: FileShare or the result of cls(response)
251
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
248
+ :rtype: ~azure.mgmt.storage.models.FileShare
252
249
  :raises ~azure.core.exceptions.HttpResponseError:
253
250
  """
254
251
 
@@ -280,12 +277,12 @@ class FileSharesOperations:
280
277
  :type share_name: str
281
278
  :param file_share: Properties of the file share to create. Is either a FileShare type or a
282
279
  IO[bytes] type. Required.
283
- :type file_share: ~azure.mgmt.storage.v2024_01_01.models.FileShare or IO[bytes]
280
+ :type file_share: ~azure.mgmt.storage.models.FileShare or IO[bytes]
284
281
  :param expand: Optional, used to expand the properties within share's properties. Valid values
285
282
  are: snapshots. Should be passed as a string with delimiter ','. Default value is None.
286
283
  :type expand: str
287
284
  :return: FileShare or the result of cls(response)
288
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
285
+ :rtype: ~azure.mgmt.storage.models.FileShare
289
286
  :raises ~azure.core.exceptions.HttpResponseError:
290
287
  """
291
288
  error_map: MutableMapping = {
@@ -299,7 +296,7 @@ class FileSharesOperations:
299
296
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
300
297
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
301
298
 
302
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
299
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
303
300
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
304
301
  cls: ClsType[_models.FileShare] = kwargs.pop("cls", None)
305
302
 
@@ -371,12 +368,12 @@ class FileSharesOperations:
371
368
  or number. Required.
372
369
  :type share_name: str
373
370
  :param file_share: Properties to update for the file share. Required.
374
- :type file_share: ~azure.mgmt.storage.v2024_01_01.models.FileShare
371
+ :type file_share: ~azure.mgmt.storage.models.FileShare
375
372
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
376
373
  Default value is "application/json".
377
374
  :paramtype content_type: str
378
375
  :return: FileShare or the result of cls(response)
379
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
376
+ :rtype: ~azure.mgmt.storage.models.FileShare
380
377
  :raises ~azure.core.exceptions.HttpResponseError:
381
378
  """
382
379
 
@@ -412,7 +409,7 @@ class FileSharesOperations:
412
409
  Default value is "application/json".
413
410
  :paramtype content_type: str
414
411
  :return: FileShare or the result of cls(response)
415
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
412
+ :rtype: ~azure.mgmt.storage.models.FileShare
416
413
  :raises ~azure.core.exceptions.HttpResponseError:
417
414
  """
418
415
 
@@ -442,9 +439,9 @@ class FileSharesOperations:
442
439
  :type share_name: str
443
440
  :param file_share: Properties to update for the file share. Is either a FileShare type or a
444
441
  IO[bytes] type. Required.
445
- :type file_share: ~azure.mgmt.storage.v2024_01_01.models.FileShare or IO[bytes]
442
+ :type file_share: ~azure.mgmt.storage.models.FileShare or IO[bytes]
446
443
  :return: FileShare or the result of cls(response)
447
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
444
+ :rtype: ~azure.mgmt.storage.models.FileShare
448
445
  :raises ~azure.core.exceptions.HttpResponseError:
449
446
  """
450
447
  error_map: MutableMapping = {
@@ -458,7 +455,7 @@ class FileSharesOperations:
458
455
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
459
456
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
460
457
 
461
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
458
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
462
459
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
463
460
  cls: ClsType[_models.FileShare] = kwargs.pop("cls", None)
464
461
 
@@ -533,7 +530,7 @@ class FileSharesOperations:
533
530
  None.
534
531
  :type x_ms_snapshot: str
535
532
  :return: FileShare or the result of cls(response)
536
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileShare
533
+ :rtype: ~azure.mgmt.storage.models.FileShare
537
534
  :raises ~azure.core.exceptions.HttpResponseError:
538
535
  """
539
536
  error_map: MutableMapping = {
@@ -547,7 +544,7 @@ class FileSharesOperations:
547
544
  _headers = kwargs.pop("headers", {}) or {}
548
545
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
549
546
 
550
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
547
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
551
548
  cls: ClsType[_models.FileShare] = kwargs.pop("cls", None)
552
549
 
553
550
  _request = build_get_request(
@@ -630,7 +627,7 @@ class FileSharesOperations:
630
627
  _headers = kwargs.pop("headers", {}) or {}
631
628
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
632
629
 
633
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
630
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
634
631
  cls: ClsType[None] = kwargs.pop("cls", None)
635
632
 
636
633
  _request = build_delete_request(
@@ -686,7 +683,7 @@ class FileSharesOperations:
686
683
  or number. Required.
687
684
  :type share_name: str
688
685
  :param deleted_share: Required.
689
- :type deleted_share: ~azure.mgmt.storage.v2024_01_01.models.DeletedShare
686
+ :type deleted_share: ~azure.mgmt.storage.models.DeletedShare
690
687
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
691
688
  Default value is "application/json".
692
689
  :paramtype content_type: str
@@ -754,7 +751,7 @@ class FileSharesOperations:
754
751
  or number. Required.
755
752
  :type share_name: str
756
753
  :param deleted_share: Is either a DeletedShare type or a IO[bytes] type. Required.
757
- :type deleted_share: ~azure.mgmt.storage.v2024_01_01.models.DeletedShare or IO[bytes]
754
+ :type deleted_share: ~azure.mgmt.storage.models.DeletedShare or IO[bytes]
758
755
  :return: None or the result of cls(response)
759
756
  :rtype: None
760
757
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -770,7 +767,7 @@ class FileSharesOperations:
770
767
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
771
768
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
772
769
 
773
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
770
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
774
771
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
775
772
  cls: ClsType[None] = kwargs.pop("cls", None)
776
773
 
@@ -841,12 +838,12 @@ class FileSharesOperations:
841
838
  None.
842
839
  :type x_ms_snapshot: str
843
840
  :param parameters: Lease Share request body. Default value is None.
844
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.LeaseShareRequest
841
+ :type parameters: ~azure.mgmt.storage.models.LeaseShareRequest
845
842
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
846
843
  Default value is "application/json".
847
844
  :paramtype content_type: str
848
845
  :return: LeaseShareResponse or the result of cls(response)
849
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LeaseShareResponse
846
+ :rtype: ~azure.mgmt.storage.models.LeaseShareResponse
850
847
  :raises ~azure.core.exceptions.HttpResponseError:
851
848
  """
852
849
 
@@ -886,7 +883,7 @@ class FileSharesOperations:
886
883
  Default value is "application/json".
887
884
  :paramtype content_type: str
888
885
  :return: LeaseShareResponse or the result of cls(response)
889
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LeaseShareResponse
886
+ :rtype: ~azure.mgmt.storage.models.LeaseShareResponse
890
887
  :raises ~azure.core.exceptions.HttpResponseError:
891
888
  """
892
889
 
@@ -920,9 +917,9 @@ class FileSharesOperations:
920
917
  :type x_ms_snapshot: str
921
918
  :param parameters: Lease Share request body. Is either a LeaseShareRequest type or a IO[bytes]
922
919
  type. Default value is None.
923
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.LeaseShareRequest or IO[bytes]
920
+ :type parameters: ~azure.mgmt.storage.models.LeaseShareRequest or IO[bytes]
924
921
  :return: LeaseShareResponse or the result of cls(response)
925
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LeaseShareResponse
922
+ :rtype: ~azure.mgmt.storage.models.LeaseShareResponse
926
923
  :raises ~azure.core.exceptions.HttpResponseError:
927
924
  """
928
925
  error_map: MutableMapping = {
@@ -936,7 +933,7 @@ class FileSharesOperations:
936
933
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
937
934
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
938
935
 
939
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
936
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
940
937
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
941
938
  cls: ClsType[_models.LeaseShareResponse] = kwargs.pop("cls", None)
942
939
 
@@ -5,11 +5,12 @@
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
+ from collections.abc import MutableMapping
8
9
  from io import IOBase
9
- import sys
10
10
  from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
+ from azure.core import AsyncPipelineClient
13
14
  from azure.core.async_paging import AsyncItemPaged, AsyncList
14
15
  from azure.core.exceptions import (
15
16
  ClientAuthenticationError,
@@ -27,6 +28,7 @@ from azure.core.utils import case_insensitive_dict
27
28
  from azure.mgmt.core.exceptions import ARMErrorFormat
28
29
 
29
30
  from ... import models as _models
31
+ from ..._utils.serialization import Deserializer, Serializer
30
32
  from ...operations._local_users_operations import (
31
33
  build_create_or_update_request,
32
34
  build_delete_request,
@@ -35,11 +37,8 @@ from ...operations._local_users_operations import (
35
37
  build_list_request,
36
38
  build_regenerate_password_request,
37
39
  )
40
+ from .._configuration import StorageManagementClientConfiguration
38
41
 
39
- if sys.version_info >= (3, 9):
40
- from collections.abc import MutableMapping
41
- else:
42
- from typing import MutableMapping # type: ignore
43
42
  T = TypeVar("T")
44
43
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
45
44
 
@@ -50,7 +49,7 @@ class LocalUsersOperations:
50
49
  **DO NOT** instantiate this class directly.
51
50
 
52
51
  Instead, you should access the following operations through
53
- :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
52
+ :class:`~azure.mgmt.storage.aio.StorageManagementClient`'s
54
53
  :attr:`local_users` attribute.
55
54
  """
56
55
 
@@ -58,11 +57,10 @@ class LocalUsersOperations:
58
57
 
59
58
  def __init__(self, *args, **kwargs) -> None:
60
59
  input_args = list(args)
61
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
62
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
63
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
64
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
65
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
60
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
61
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
62
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
63
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
66
64
 
67
65
  @distributed_trace
68
66
  def list(
@@ -91,16 +89,15 @@ class LocalUsersOperations:
91
89
  :type filter: str
92
90
  :param include: Optional, when specified, will list local users enabled for the specific
93
91
  protocol. Lists all users by default. "nfsv3" Default value is None.
94
- :type include: str or ~azure.mgmt.storage.v2024_01_01.models.ListLocalUserIncludeParam
92
+ :type include: str or ~azure.mgmt.storage.models.ListLocalUserIncludeParam
95
93
  :return: An iterator like instance of either LocalUser or the result of cls(response)
96
- :rtype:
97
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.LocalUser]
94
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.models.LocalUser]
98
95
  :raises ~azure.core.exceptions.HttpResponseError:
99
96
  """
100
97
  _headers = kwargs.pop("headers", {}) or {}
101
98
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
102
99
 
103
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
100
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
104
101
  cls: ClsType[_models.LocalUsers] = kwargs.pop("cls", None)
105
102
 
106
103
  error_map: MutableMapping = {
@@ -136,7 +133,7 @@ class LocalUsersOperations:
136
133
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
137
134
  }
138
135
  )
139
- _next_request_params["api-version"] = self._api_version
136
+ _next_request_params["api-version"] = self._config.api_version
140
137
  _request = HttpRequest(
141
138
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
142
139
  )
@@ -184,7 +181,7 @@ class LocalUsersOperations:
184
181
  numbers only. It must be unique only within the storage account. Required.
185
182
  :type username: str
186
183
  :return: LocalUser or the result of cls(response)
187
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LocalUser
184
+ :rtype: ~azure.mgmt.storage.models.LocalUser
188
185
  :raises ~azure.core.exceptions.HttpResponseError:
189
186
  """
190
187
  error_map: MutableMapping = {
@@ -198,7 +195,7 @@ class LocalUsersOperations:
198
195
  _headers = kwargs.pop("headers", {}) or {}
199
196
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
200
197
 
201
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
198
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
202
199
  cls: ClsType[_models.LocalUser] = kwargs.pop("cls", None)
203
200
 
204
201
  _request = build_get_request(
@@ -256,12 +253,12 @@ class LocalUsersOperations:
256
253
  numbers only. It must be unique only within the storage account. Required.
257
254
  :type username: str
258
255
  :param properties: The local user associated with a storage account. Required.
259
- :type properties: ~azure.mgmt.storage.v2024_01_01.models.LocalUser
256
+ :type properties: ~azure.mgmt.storage.models.LocalUser
260
257
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
261
258
  Default value is "application/json".
262
259
  :paramtype content_type: str
263
260
  :return: LocalUser or the result of cls(response)
264
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LocalUser
261
+ :rtype: ~azure.mgmt.storage.models.LocalUser
265
262
  :raises ~azure.core.exceptions.HttpResponseError:
266
263
  """
267
264
 
@@ -295,7 +292,7 @@ class LocalUsersOperations:
295
292
  Default value is "application/json".
296
293
  :paramtype content_type: str
297
294
  :return: LocalUser or the result of cls(response)
298
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LocalUser
295
+ :rtype: ~azure.mgmt.storage.models.LocalUser
299
296
  :raises ~azure.core.exceptions.HttpResponseError:
300
297
  """
301
298
 
@@ -323,9 +320,9 @@ class LocalUsersOperations:
323
320
  :type username: str
324
321
  :param properties: The local user associated with a storage account. Is either a LocalUser type
325
322
  or a IO[bytes] type. Required.
326
- :type properties: ~azure.mgmt.storage.v2024_01_01.models.LocalUser or IO[bytes]
323
+ :type properties: ~azure.mgmt.storage.models.LocalUser or IO[bytes]
327
324
  :return: LocalUser or the result of cls(response)
328
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LocalUser
325
+ :rtype: ~azure.mgmt.storage.models.LocalUser
329
326
  :raises ~azure.core.exceptions.HttpResponseError:
330
327
  """
331
328
  error_map: MutableMapping = {
@@ -339,7 +336,7 @@ class LocalUsersOperations:
339
336
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
340
337
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
341
338
 
342
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
339
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
343
340
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
344
341
  cls: ClsType[_models.LocalUser] = kwargs.pop("cls", None)
345
342
 
@@ -413,7 +410,7 @@ class LocalUsersOperations:
413
410
  _headers = kwargs.pop("headers", {}) or {}
414
411
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
415
412
 
416
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
413
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
417
414
  cls: ClsType[None] = kwargs.pop("cls", None)
418
415
 
419
416
  _request = build_delete_request(
@@ -459,7 +456,7 @@ class LocalUsersOperations:
459
456
  numbers only. It must be unique only within the storage account. Required.
460
457
  :type username: str
461
458
  :return: LocalUserKeys or the result of cls(response)
462
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LocalUserKeys
459
+ :rtype: ~azure.mgmt.storage.models.LocalUserKeys
463
460
  :raises ~azure.core.exceptions.HttpResponseError:
464
461
  """
465
462
  error_map: MutableMapping = {
@@ -473,7 +470,7 @@ class LocalUsersOperations:
473
470
  _headers = kwargs.pop("headers", {}) or {}
474
471
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
475
472
 
476
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
473
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
477
474
  cls: ClsType[_models.LocalUserKeys] = kwargs.pop("cls", None)
478
475
 
479
476
  _request = build_list_keys_request(
@@ -523,7 +520,7 @@ class LocalUsersOperations:
523
520
  numbers only. It must be unique only within the storage account. Required.
524
521
  :type username: str
525
522
  :return: LocalUserRegeneratePasswordResult or the result of cls(response)
526
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.LocalUserRegeneratePasswordResult
523
+ :rtype: ~azure.mgmt.storage.models.LocalUserRegeneratePasswordResult
527
524
  :raises ~azure.core.exceptions.HttpResponseError:
528
525
  """
529
526
  error_map: MutableMapping = {
@@ -537,7 +534,7 @@ class LocalUsersOperations:
537
534
  _headers = kwargs.pop("headers", {}) or {}
538
535
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
539
536
 
540
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
537
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
541
538
  cls: ClsType[_models.LocalUserRegeneratePasswordResult] = kwargs.pop("cls", None)
542
539
 
543
540
  _request = build_regenerate_password_request(