1515from .._version import SDK_MONIKER
1616from .._api_versions import DEFAULT_VERSION
1717
18+ _DEFAULT_POLLING_INTERVAL_IN_SECONDS = 2
19+
1820if TYPE_CHECKING :
1921 from typing import Any
2022 from azure .core .credentials_async import AsyncTokenCredential
@@ -92,12 +94,14 @@ async def begin_purchase_phone_numbers(
9294 :keyword polling: Pass in True if you'd like the LROBasePolling polling method,
9395 False for no polling, or your own initialized polling object for a personal polling strategy.
9496 :paramtype polling: bool or ~azure.core.polling.PollingMethod
95- :keyword int polling_interval: Default waiting time between two polls
97+ :keyword int polling_interval: Default waiting time (seconds) between two polls
9698 for LRO operations if no Retry-After header is present.
9799 :rtype: ~azure.core.polling.AsyncLROPoller[None]
98100 """
101+ polling_interval = kwargs .pop ('polling_interval' , _DEFAULT_POLLING_INTERVAL_IN_SECONDS )
99102 return await self ._phone_number_client .phone_numbers .begin_purchase_phone_numbers (
100103 search_id ,
104+ polling_interval = polling_interval ,
101105 ** kwargs
102106 )
103107
@@ -116,12 +120,14 @@ async def begin_release_phone_number(
116120 :keyword polling: Pass in True if you'd like the LROBasePolling polling method,
117121 False for no polling, or your own initialized polling object for a personal polling strategy.
118122 :paramtype polling: bool or ~azure.core.polling.PollingMethod
119- :keyword int polling_interval: Default waiting time between two polls
123+ :keyword int polling_interval: Default waiting time (seconds) between two polls
120124 for LRO operations if no Retry-After header is present.
121125 :rtype: ~azure.core.polling.AsyncLROPoller[None]
122126 """
127+ polling_interval = kwargs .pop ('polling_interval' , _DEFAULT_POLLING_INTERVAL_IN_SECONDS )
123128 return await self ._phone_number_client .phone_numbers .begin_release_phone_number (
124129 phone_number ,
130+ polling_interval = polling_interval ,
125131 ** kwargs
126132 )
127133
@@ -156,7 +162,7 @@ async def begin_search_available_phone_numbers(
156162 :keyword polling: Pass in True if you'd like the LROBasePolling polling method,
157163 False for no polling, or your own initialized polling object for a personal polling strategy.
158164 :paramtype polling: bool or ~azure.core.polling.PollingMethod
159- :keyword int polling_interval: Default waiting time between two polls
165+ :keyword int polling_interval: Default waiting time (seconds) between two polls
160166 for LRO operations if no Retry-After header is present.
161167 :rtype: ~azure.core.polling.AsyncLROPoller[~azure.communication.phonenumbers.models.PhoneNumberSearchResult]
162168 """
@@ -167,9 +173,11 @@ async def begin_search_available_phone_numbers(
167173 quantity = kwargs .pop ('quantity' , None ),
168174 area_code = kwargs .pop ('area_code' , None )
169175 )
176+ polling_interval = kwargs .pop ('polling_interval' , _DEFAULT_POLLING_INTERVAL_IN_SECONDS )
170177 return await self ._phone_number_client .phone_numbers .begin_search_available_phone_numbers (
171178 country_code ,
172179 search_request ,
180+ polling_interval = polling_interval ,
173181 ** kwargs
174182 )
175183
@@ -195,14 +203,16 @@ async def begin_update_phone_number_capabilities(
195203 :keyword polling: Pass in True if you'd like the LROBasePolling polling method,
196204 False for no polling, or your own initialized polling object for a personal polling strategy.
197205 :paramtype polling: bool or ~azure.core.polling.PollingMethod
198- :keyword int polling_interval: Default waiting time between two polls
206+ :keyword int polling_interval: Default waiting time (seconds) between two polls
199207 for LRO operations if no Retry-After header is present.
200208 :rtype: ~azure.core.polling.AsyncLROPoller[~azure.communication.phonenumbers.models.PurchasedPhoneNumber]
201209 """
210+ polling_interval = kwargs .pop ('polling_interval' , _DEFAULT_POLLING_INTERVAL_IN_SECONDS )
202211 return await self ._phone_number_client .phone_numbers .begin_update_capabilities (
203212 phone_number ,
204213 calling ,
205214 sms ,
215+ polling_interval = polling_interval ,
206216 ** kwargs
207217 )
208218
0 commit comments