66当前文件为自动生成的控制 API 客户端代码。请勿手动修改此文件。
77使用 `make codegen` 命令重新生成。
88
9- source: agentrun/agent_runtime/__client_async_template.py
9+ source: .claude/worktrees/infallible-pasteur-94186e/ agentrun/agent_runtime/__client_async_template.py
1010
1111Agent Runtime 客户端 / Agent Runtime Client
1212
@@ -180,7 +180,9 @@ async def delete_async(
180180 except HTTPError as e :
181181 raise e .to_resource_error ("AgentRuntime" , id ) from e
182182
183- def delete (self , id : str , config : Optional [Config ] = None ) -> AgentRuntime :
183+ def delete (
184+ self , id : str , config : Optional [Config ] = None
185+ ) -> AgentRuntime :
184186 """同步删除 Agent Runtime / Delete Agent Runtime synchronously
185187
186188 Args:
@@ -195,7 +197,9 @@ def delete(self, id: str, config: Optional[Config] = None) -> AgentRuntime:
195197 HTTPError: HTTP 请求错误 / HTTP request error
196198 """
197199 try :
198- result = self .__control_api .delete_agent_runtime (id , config = config )
200+ result = self .__control_api .delete_agent_runtime (
201+ id , config = config
202+ )
199203 # Delete 响应只有 agentRuntimeId 有效,其他字段为空字符串/零值,
200204 # 走 from_inner_object 会在 status/artifactType 等 Enum 字段上触发
201205 # 伪校验错误。这里直接构造一个只带 id 的极简对象。
@@ -443,12 +447,14 @@ def create_endpoint(
443447 HTTPError: HTTP 请求错误 / HTTP request error
444448 """
445449 try :
446- result = self .__control_api .create_agent_runtime_endpoint (
447- agent_runtime_id ,
448- CreateAgentRuntimeEndpointInput ().from_map (
449- endpoint .model_dump ()
450- ),
451- config = config ,
450+ result = (
451+ self .__control_api .create_agent_runtime_endpoint (
452+ agent_runtime_id ,
453+ CreateAgentRuntimeEndpointInput ().from_map (
454+ endpoint .model_dump ()
455+ ),
456+ config = config ,
457+ )
452458 )
453459 except HTTPError as e :
454460 raise e .to_resource_error (
@@ -521,10 +527,12 @@ def delete_endpoint(
521527 HTTPError: HTTP 请求错误 / HTTP request error
522528 """
523529 try :
524- result = self .__control_api .delete_agent_runtime_endpoint (
525- agent_runtime_id ,
526- endpoint_id ,
527- config = config ,
530+ result = (
531+ self .__control_api .delete_agent_runtime_endpoint (
532+ agent_runtime_id ,
533+ endpoint_id ,
534+ config = config ,
535+ )
528536 )
529537 except HTTPError as e :
530538 raise e .to_resource_error (
@@ -604,13 +612,15 @@ def update_endpoint(
604612 HTTPError: HTTP 请求错误 / HTTP request error
605613 """
606614 try :
607- result = self .__control_api .update_agent_runtime_endpoint (
608- agent_runtime_id ,
609- endpoint_id ,
610- UpdateAgentRuntimeEndpointInput ().from_map (
611- endpoint .model_dump ()
612- ),
613- config = config ,
615+ result = (
616+ self .__control_api .update_agent_runtime_endpoint (
617+ agent_runtime_id ,
618+ endpoint_id ,
619+ UpdateAgentRuntimeEndpointInput ().from_map (
620+ endpoint .model_dump ()
621+ ),
622+ config = config ,
623+ )
614624 )
615625 except HTTPError as e :
616626 raise e .to_resource_error (
@@ -759,10 +769,14 @@ def list_endpoints(
759769 if input is None :
760770 input = AgentRuntimeEndpointListInput ()
761771
762- results = self .__control_api .list_agent_runtime_endpoints (
763- agent_runtime_id ,
764- ListAgentRuntimeEndpointsRequest ().from_map (input .model_dump ()),
765- config = config ,
772+ results = (
773+ self .__control_api .list_agent_runtime_endpoints (
774+ agent_runtime_id ,
775+ ListAgentRuntimeEndpointsRequest ().from_map (
776+ input .model_dump ()
777+ ),
778+ config = config ,
779+ )
766780 )
767781 return [
768782 AgentRuntimeEndpoint .from_inner_object (item )
@@ -833,10 +847,14 @@ def list_versions(
833847 if input is None :
834848 input = AgentRuntimeVersionListInput ()
835849
836- results = self .__control_api .list_agent_runtime_versions (
837- agent_runtime_id ,
838- ListAgentRuntimeVersionsRequest ().from_map (input .model_dump ()),
839- config = config ,
850+ results = (
851+ self .__control_api .list_agent_runtime_versions (
852+ agent_runtime_id ,
853+ ListAgentRuntimeVersionsRequest ().from_map (
854+ input .model_dump ()
855+ ),
856+ config = config ,
857+ )
840858 )
841859 return [
842860 AgentRuntimeVersion .from_inner_object (item )
0 commit comments