@@ -1151,6 +1151,59 @@ def _LiveSendRealtimeInputParameters_to_vertex(
11511151 return to_object
11521152
11531153
1154+ def _LiveServerMessage_from_mldev (
1155+ from_object : Union [dict [str , Any ], object ],
1156+ parent_object : Optional [dict [str , Any ]] = None ,
1157+ ) -> dict [str , Any ]:
1158+ to_object : dict [str , Any ] = {}
1159+ if getv (from_object , ['setupComplete' ]) is not None :
1160+ setv (to_object , ['setup_complete' ], getv (from_object , ['setupComplete' ]))
1161+
1162+ if getv (from_object , ['serverContent' ]) is not None :
1163+ setv (to_object , ['server_content' ], getv (from_object , ['serverContent' ]))
1164+
1165+ if getv (from_object , ['toolCall' ]) is not None :
1166+ setv (to_object , ['tool_call' ], getv (from_object , ['toolCall' ]))
1167+
1168+ if getv (from_object , ['toolCallCancellation' ]) is not None :
1169+ setv (
1170+ to_object ,
1171+ ['tool_call_cancellation' ],
1172+ getv (from_object , ['toolCallCancellation' ]),
1173+ )
1174+
1175+ if getv (from_object , ['usageMetadata' ]) is not None :
1176+ setv (to_object , ['usage_metadata' ], getv (from_object , ['usageMetadata' ]))
1177+
1178+ if getv (from_object , ['goAway' ]) is not None :
1179+ setv (to_object , ['go_away' ], getv (from_object , ['goAway' ]))
1180+
1181+ if getv (from_object , ['sessionResumptionUpdate' ]) is not None :
1182+ setv (
1183+ to_object ,
1184+ ['session_resumption_update' ],
1185+ getv (from_object , ['sessionResumptionUpdate' ]),
1186+ )
1187+
1188+ if getv (from_object , ['voiceActivityDetectionSignal' ]) is not None :
1189+ setv (
1190+ to_object ,
1191+ ['voice_activity_detection_signal' ],
1192+ getv (from_object , ['voiceActivityDetectionSignal' ]),
1193+ )
1194+
1195+ if getv (from_object , ['voiceActivity' ]) is not None :
1196+ setv (
1197+ to_object ,
1198+ ['voice_activity' ],
1199+ _VoiceActivity_from_mldev (
1200+ getv (from_object , ['voiceActivity' ]), to_object
1201+ ),
1202+ )
1203+
1204+ return to_object
1205+
1206+
11541207def _LiveServerMessage_from_vertex (
11551208 from_object : Union [dict [str , Any ], object ],
11561209 parent_object : Optional [dict [str , Any ]] = None ,
@@ -1198,6 +1251,15 @@ def _LiveServerMessage_from_vertex(
11981251 getv (from_object , ['voiceActivityDetectionSignal' ]),
11991252 )
12001253
1254+ if getv (from_object , ['voiceActivity' ]) is not None :
1255+ setv (
1256+ to_object ,
1257+ ['voice_activity' ],
1258+ _VoiceActivity_from_vertex (
1259+ getv (from_object , ['voiceActivity' ]), to_object
1260+ ),
1261+ )
1262+
12011263 return to_object
12021264
12031265
@@ -1468,3 +1530,25 @@ def _UsageMetadata_from_vertex(
14681530 setv (to_object , ['traffic_type' ], getv (from_object , ['trafficType' ]))
14691531
14701532 return to_object
1533+
1534+
1535+ def _VoiceActivity_from_mldev (
1536+ from_object : Union [dict [str , Any ], object ],
1537+ parent_object : Optional [dict [str , Any ]] = None ,
1538+ ) -> dict [str , Any ]:
1539+ to_object : dict [str , Any ] = {}
1540+ if getv (from_object , ['type' ]) is not None :
1541+ setv (to_object , ['voice_activity_type' ], getv (from_object , ['type' ]))
1542+
1543+ return to_object
1544+
1545+
1546+ def _VoiceActivity_from_vertex (
1547+ from_object : Union [dict [str , Any ], object ],
1548+ parent_object : Optional [dict [str , Any ]] = None ,
1549+ ) -> dict [str , Any ]:
1550+ to_object : dict [str , Any ] = {}
1551+ if getv (from_object , ['type' ]) is not None :
1552+ setv (to_object , ['voice_activity_type' ], getv (from_object , ['type' ]))
1553+
1554+ return to_object
0 commit comments