@@ -13,13 +13,18 @@ def __init__(self, client: TogetherClient) -> None:
1313 self ._client = client
1414
1515 def list (
16- self , type : Optional [Literal ["dedicated" , "serverless" ]] = None
16+ self ,
17+ type : Optional [Literal ["dedicated" , "serverless" ]] = None ,
18+ usage_type : Optional [Literal ["on-demand" , "reserved" ]] = None ,
19+ mine : Optional [bool ] = None ,
1720 ) -> List [ListEndpoint ]:
1821 """
19- List all endpoints, can be filtered by type.
22+ List all endpoints, can be filtered by endpoint type and ownership .
2023
2124 Args:
22- type (str, optional): Filter endpoints by type ("dedicated" or "serverless"). Defaults to None.
25+ type (str, optional): Filter endpoints by endpoint type ("dedicated" or "serverless"). Defaults to None.
26+ usage_type (str, optional): Filter endpoints by usage type ("on-demand" or "reserved"). Defaults to None.
27+ mine (bool, optional): If True, return only endpoints owned by the caller. Defaults to None.
2328
2429 Returns:
2530 List[ListEndpoint]: List of endpoint objects
@@ -28,9 +33,20 @@ def list(
2833 client = self ._client ,
2934 )
3035
31- params = {}
36+ params : Dict [
37+ str ,
38+ Union [
39+ Literal ["dedicated" , "serverless" ],
40+ Literal ["on-demand" , "reserved" ],
41+ bool ,
42+ ],
43+ ] = {}
3244 if type is not None :
3345 params ["type" ] = type
46+ if usage_type is not None :
47+ params ["usage_type" ] = usage_type
48+ if mine is not None :
49+ params ["mine" ] = mine
3450
3551 response , _ , _ = requestor .request (
3652 options = TogetherRequest (
@@ -263,13 +279,18 @@ def __init__(self, client: TogetherClient) -> None:
263279 self ._client = client
264280
265281 async def list (
266- self , type : Optional [Literal ["dedicated" , "serverless" ]] = None
282+ self ,
283+ type : Optional [Literal ["dedicated" , "serverless" ]] = None ,
284+ usage_type : Optional [Literal ["on-demand" , "reserved" ]] = None ,
285+ mine : Optional [bool ] = None ,
267286 ) -> List [ListEndpoint ]:
268287 """
269- List all endpoints, can be filtered by type.
288+ List all endpoints, can be filtered by type and ownership .
270289
271290 Args:
272291 type (str, optional): Filter endpoints by type ("dedicated" or "serverless"). Defaults to None.
292+ usage_type (str, optional): Filter endpoints by usage type ("on-demand" or "reserved"). Defaults to None.
293+ mine (bool, optional): If True, return only endpoints owned by the caller. Defaults to None.
273294
274295 Returns:
275296 List[ListEndpoint]: List of endpoint objects
@@ -278,9 +299,20 @@ async def list(
278299 client = self ._client ,
279300 )
280301
281- params = {}
302+ params : Dict [
303+ str ,
304+ Union [
305+ Literal ["dedicated" , "serverless" ],
306+ Literal ["on-demand" , "reserved" ],
307+ bool ,
308+ ],
309+ ] = {}
282310 if type is not None :
283311 params ["type" ] = type
312+ if usage_type is not None :
313+ params ["usage_type" ] = usage_type
314+ if mine is not None :
315+ params ["mine" ] = mine
284316
285317 response , _ , _ = await requestor .arequest (
286318 options = TogetherRequest (
0 commit comments