Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit ec1cdc6

Browse files
AutoPrFromHttpClientPythonAutoPrFromHttpClientPython
authored andcommitted
Regenerate for autorest.python (2026-05-11 09:08:17)
1 parent 59777db commit ec1cdc6

12 files changed

Lines changed: 160 additions & 162 deletions

File tree

packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/operations/_paging_operations.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(self, *args, **kwargs) -> None:
8989
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
9090

9191
@distributed_trace
92-
def get_no_item_name_pages(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
92+
def get_no_item_name_pages(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
9393
"""A paging operation that must return result of the default 'value' node.
9494
9595
:return: An iterator like instance of either Product or the result of cls(response)
@@ -163,7 +163,7 @@ async def get_next(next_link=None):
163163
return AsyncItemPaged(get_next, extract_data)
164164

165165
@distributed_trace
166-
def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
166+
def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
167167
"""A paging operation that gets an empty next link and should stop after page 1.
168168
169169
:return: An iterator like instance of either Product or the result of cls(response)
@@ -237,7 +237,7 @@ async def get_next(next_link=None):
237237
return AsyncItemPaged(get_next, extract_data)
238238

239239
@distributed_trace
240-
def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
240+
def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
241241
"""A paging operation that must ignore any kind of nextLink, and stop after page 1.
242242
243243
:return: An iterator like instance of either Product or the result of cls(response)
@@ -311,7 +311,7 @@ async def get_next(next_link=None):
311311
return AsyncItemPaged(get_next, extract_data)
312312

313313
@distributed_trace
314-
def get_single_pages(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
314+
def get_single_pages(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
315315
"""A paging operation that finishes on the first call without a nextlink.
316316
317317
:return: An iterator like instance of either Product or the result of cls(response)
@@ -387,7 +387,7 @@ async def get_next(next_link=None):
387387
@distributed_trace
388388
def get_single_pages_with_body_params(
389389
self, name: Optional[str] = None, **kwargs: Any
390-
) -> AsyncItemPaged["_models.Product"]:
390+
) -> AsyncItemPaged[_models.Product]:
391391
"""A paging operation that finishes on the first call with body params without a nextlink.
392392
393393
:param name: Default value is None.
@@ -468,7 +468,7 @@ async def get_next(next_link=None):
468468
return AsyncItemPaged(get_next, extract_data)
469469

470470
@distributed_trace
471-
def first_response_empty(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
471+
def first_response_empty(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
472472
"""A paging operation whose first response's items list is empty, but still returns a next link.
473473
Second (and final) call, will give you an items list of 1.
474474
@@ -548,7 +548,7 @@ def get_multiple_pages(
548548
client_request_id: Optional[str] = None,
549549
paging_get_multiple_pages_options: Optional[_models.PagingGetMultiplePagesOptions] = None,
550550
**kwargs: Any
551-
) -> AsyncItemPaged["_models.Product"]:
551+
) -> AsyncItemPaged[_models.Product]:
552552
"""A paging operation that includes a nextLink that has 10 pages.
553553
554554
:param client_request_id: Default value is None.
@@ -635,7 +635,7 @@ async def get_next(next_link=None):
635635
return AsyncItemPaged(get_next, extract_data)
636636

637637
@distributed_trace
638-
def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
638+
def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
639639
"""A paging operation that includes a next operation. It has a different query parameter from it's
640640
next operation nextOperationWithQueryParams. Returns a ProductResult.
641641
@@ -707,7 +707,7 @@ async def get_next(next_link=None):
707707
return AsyncItemPaged(get_next, extract_data)
708708

709709
@distributed_trace
710-
def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
710+
def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
711711
"""Define ``filter`` as a query param for all calls. However, the returned next link will also
712712
include the ``filter`` as part of it. Make sure you don't end up duplicating the ``filter``
713713
param in the url sent.
@@ -788,7 +788,7 @@ async def get_next(next_link=None):
788788
@distributed_trace
789789
def page_with_max_page_size(
790790
self, maxpagesize: Literal["5"] = "5", **kwargs: Any
791-
) -> AsyncItemPaged["_models.Product"]:
791+
) -> AsyncItemPaged[_models.Product]:
792792
"""Paging with max page size. We don't want to.
793793
794794
:param maxpagesize: Max page size query param. Don't send. Known values are "5" and None.
@@ -871,7 +871,7 @@ def get_odata_multiple_pages(
871871
client_request_id: Optional[str] = None,
872872
paging_get_odata_multiple_pages_options: Optional[_models.PagingGetOdataMultiplePagesOptions] = None,
873873
**kwargs: Any
874-
) -> AsyncItemPaged["_models.Product"]:
874+
) -> AsyncItemPaged[_models.Product]:
875875
"""A paging operation that includes a nextLink in odata format that has 10 pages.
876876
877877
:param client_request_id: Default value is None.
@@ -963,7 +963,7 @@ def get_multiple_pages_with_offset(
963963
paging_get_multiple_pages_with_offset_options: _models.PagingGetMultiplePagesWithOffsetOptions,
964964
client_request_id: Optional[str] = None,
965965
**kwargs: Any
966-
) -> AsyncItemPaged["_models.Product"]:
966+
) -> AsyncItemPaged[_models.Product]:
967967
"""A paging operation that includes a nextLink that has 10 pages.
968968
969969
:param paging_get_multiple_pages_with_offset_options: Parameter group. Required.
@@ -1053,7 +1053,7 @@ async def get_next(next_link=None):
10531053
return AsyncItemPaged(get_next, extract_data)
10541054

10551055
@distributed_trace
1056-
def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1056+
def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
10571057
"""A paging operation that fails on the first call with 500 and then retries and then get a
10581058
response including a nextLink that has 10 pages.
10591059
@@ -1128,7 +1128,7 @@ async def get_next(next_link=None):
11281128
return AsyncItemPaged(get_next, extract_data)
11291129

11301130
@distributed_trace
1131-
def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1131+
def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
11321132
"""A paging operation that includes a nextLink that has 10 pages, of which the 2nd call fails
11331133
first with 500. The client should retry and finish all 10 pages eventually.
11341134
@@ -1203,7 +1203,7 @@ async def get_next(next_link=None):
12031203
return AsyncItemPaged(get_next, extract_data)
12041204

12051205
@distributed_trace
1206-
def get_single_pages_failure(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1206+
def get_single_pages_failure(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
12071207
"""A paging operation that receives a 400 on the first call.
12081208
12091209
:return: An iterator like instance of either Product or the result of cls(response)
@@ -1277,7 +1277,7 @@ async def get_next(next_link=None):
12771277
return AsyncItemPaged(get_next, extract_data)
12781278

12791279
@distributed_trace
1280-
def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1280+
def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
12811281
"""A paging operation that receives a 400 on the second call.
12821282
12831283
:return: An iterator like instance of either Product or the result of cls(response)
@@ -1351,7 +1351,7 @@ async def get_next(next_link=None):
13511351
return AsyncItemPaged(get_next, extract_data)
13521352

13531353
@distributed_trace
1354-
def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1354+
def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
13551355
"""A paging operation that receives an invalid nextLink.
13561356
13571357
:return: An iterator like instance of either Product or the result of cls(response)
@@ -1427,7 +1427,7 @@ async def get_next(next_link=None):
14271427
@distributed_trace
14281428
def get_multiple_pages_fragment_next_link(
14291429
self, api_version: str, tenant: str, **kwargs: Any
1430-
) -> AsyncItemPaged["_models.Product"]:
1430+
) -> AsyncItemPaged[_models.Product]:
14311431
"""A paging operation that doesn't return a full URL, just a fragment.
14321432
14331433
:param api_version: Sets the api version to use. Required.
@@ -1502,7 +1502,7 @@ async def get_next(next_link=None):
15021502
@distributed_trace
15031503
def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name-too-long
15041504
self, custom_parameter_group: _models.CustomParameterGroup, **kwargs: Any
1505-
) -> AsyncItemPaged["_models.Product"]:
1505+
) -> AsyncItemPaged[_models.Product]:
15061506
"""A paging operation that doesn't return a full URL, just a fragment with parameters grouped.
15071507
15081508
:param custom_parameter_group: Parameter group. Required.
@@ -1645,7 +1645,7 @@ async def begin_get_multiple_pages_lro(
16451645
client_request_id: Optional[str] = None,
16461646
paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None,
16471647
**kwargs: Any
1648-
) -> AsyncCustomPoller[AsyncItemPaged["_models.Product"]]:
1648+
) -> AsyncCustomPoller[AsyncItemPaged[_models.Product]]:
16491649
"""A long-running paging operation that includes a nextLink that has 10 pages.
16501650
16511651
:param client_request_id: Default value is None.
@@ -1762,18 +1762,18 @@ async def internal_get_next(next_link=None):
17621762
else:
17631763
polling_method = polling
17641764
if cont_token:
1765-
return AsyncCustomPoller[AsyncItemPaged["_models.Product"]].from_continuation_token(
1765+
return AsyncCustomPoller[AsyncItemPaged[_models.Product]].from_continuation_token(
17661766
polling_method=polling_method,
17671767
continuation_token=cont_token,
17681768
client=self._client,
17691769
deserialization_callback=get_long_running_output,
17701770
)
1771-
return AsyncCustomPoller[AsyncItemPaged["_models.Product"]](
1771+
return AsyncCustomPoller[AsyncItemPaged[_models.Product]](
17721772
self._client, raw_result, get_long_running_output, polling_method # type: ignore
17731773
)
17741774

17751775
@distributed_trace
1776-
def append_api_version(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1776+
def append_api_version(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
17771777
"""A paging operation with api version. When calling the next link, you want to append your
17781778
client's api version to the next link.
17791779
@@ -1850,7 +1850,7 @@ async def get_next(next_link=None):
18501850
return AsyncItemPaged(get_next, extract_data)
18511851

18521852
@distributed_trace
1853-
def replace_api_version(self, **kwargs: Any) -> AsyncItemPaged["_models.Product"]:
1853+
def replace_api_version(self, **kwargs: Any) -> AsyncItemPaged[_models.Product]:
18541854
"""A paging operation with api version. When calling the next link, you want to reformat it and
18551855
override the returned api version with your client's api version.
18561856
@@ -1929,7 +1929,7 @@ async def get_next(next_link=None):
19291929
@distributed_trace
19301930
def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=name-too-long
19311931
self, **kwargs: Any
1932-
) -> AsyncItemPaged["_models.Product"]:
1932+
) -> AsyncItemPaged[_models.Product]:
19331933
"""A paging operation that returns a paging model whose item name is is overriden by
19341934
x-ms-client-name 'indexes'.
19351935

0 commit comments

Comments
 (0)