@@ -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 (
@@ -293,13 +309,18 @@ def __init__(self, client: TogetherClient) -> None:
293309 self ._client = client
294310
295311 async def list (
296- self , type : Optional [Literal ["dedicated" , "serverless" ]] = None
312+ self ,
313+ type : Optional [Literal ["dedicated" , "serverless" ]] = None ,
314+ usage_type : Optional [Literal ["on-demand" , "reserved" ]] = None ,
315+ mine : Optional [bool ] = None ,
297316 ) -> List [ListEndpoint ]:
298317 """
299- List all endpoints, can be filtered by type.
318+ List all endpoints, can be filtered by type and ownership .
300319
301320 Args:
302321 type (str, optional): Filter endpoints by type ("dedicated" or "serverless"). Defaults to None.
322+ usage_type (str, optional): Filter endpoints by usage type ("on-demand" or "reserved"). Defaults to None.
323+ mine (bool, optional): If True, return only endpoints owned by the caller. Defaults to None.
303324
304325 Returns:
305326 List[ListEndpoint]: List of endpoint objects
@@ -308,9 +329,20 @@ async def list(
308329 client = self ._client ,
309330 )
310331
311- params = {}
332+ params : Dict [
333+ str ,
334+ Union [
335+ Literal ["dedicated" , "serverless" ],
336+ Literal ["on-demand" , "reserved" ],
337+ bool ,
338+ ],
339+ ] = {}
312340 if type is not None :
313341 params ["type" ] = type
342+ if usage_type is not None :
343+ params ["usage_type" ] = usage_type
344+ if mine is not None :
345+ params ["mine" ] = mine
314346
315347 response , _ , _ = await requestor .arequest (
316348 options = TogetherRequest (
0 commit comments