11# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
3- from typing import Any , List , Type , Generic , Mapping , TypeVar , Optional , cast
3+ from typing import List , Generic , TypeVar , Optional
44from typing_extensions import override
55
6- from httpx import Response
7-
8- from ._utils import is_mapping
9- from ._models import BaseModel
106from ._base_client import BasePage , PageInfo , BaseSyncPage , BaseAsyncPage
117
128__all__ = ["SyncMyOffsetPage" , "AsyncMyOffsetPage" ]
139
14- _BaseModelT = TypeVar ("_BaseModelT" , bound = BaseModel )
15-
1610_T = TypeVar ("_T" )
1711
1812
@@ -37,15 +31,6 @@ def next_page_info(self) -> Optional[PageInfo]:
3731
3832 return PageInfo (params = {"offset" : current_count })
3933
40- @classmethod
41- def build (cls : Type [_BaseModelT ], * , response : Response , data : object ) -> _BaseModelT : # noqa: ARG003
42- return cls .construct (
43- None ,
44- ** {
45- ** (cast (Mapping [str , Any ], data ) if is_mapping (data ) else {"items" : data }),
46- },
47- )
48-
4934
5035class AsyncMyOffsetPage (BaseAsyncPage [_T ], BasePage [_T ], Generic [_T ]):
5136 items : List [_T ]
@@ -67,12 +52,3 @@ def next_page_info(self) -> Optional[PageInfo]:
6752 current_count = offset + length
6853
6954 return PageInfo (params = {"offset" : current_count })
70-
71- @classmethod
72- def build (cls : Type [_BaseModelT ], * , response : Response , data : object ) -> _BaseModelT : # noqa: ARG003
73- return cls .construct (
74- None ,
75- ** {
76- ** (cast (Mapping [str , Any ], data ) if is_mapping (data ) else {"items" : data }),
77- },
78- )
0 commit comments