google-genai 1.24.0__py3-none-any.whl → 1.26.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,17 +33,6 @@ def _PrebuiltVoiceConfig_to_mldev(
33
33
  return to_object
34
34
 
35
35
 
36
- def _PrebuiltVoiceConfig_to_vertex(
37
- from_object: Union[dict[str, Any], object],
38
- parent_object: Optional[dict[str, Any]] = None,
39
- ) -> dict[str, Any]:
40
- to_object: dict[str, Any] = {}
41
- if getv(from_object, ['voice_name']) is not None:
42
- setv(to_object, ['voiceName'], getv(from_object, ['voice_name']))
43
-
44
- return to_object
45
-
46
-
47
36
  def _VoiceConfig_to_mldev(
48
37
  from_object: Union[dict[str, Any], object],
49
38
  parent_object: Optional[dict[str, Any]] = None,
@@ -61,23 +50,6 @@ def _VoiceConfig_to_mldev(
61
50
  return to_object
62
51
 
63
52
 
64
- def _VoiceConfig_to_vertex(
65
- from_object: Union[dict[str, Any], object],
66
- parent_object: Optional[dict[str, Any]] = None,
67
- ) -> dict[str, Any]:
68
- to_object: dict[str, Any] = {}
69
- if getv(from_object, ['prebuilt_voice_config']) is not None:
70
- setv(
71
- to_object,
72
- ['prebuiltVoiceConfig'],
73
- _PrebuiltVoiceConfig_to_vertex(
74
- getv(from_object, ['prebuilt_voice_config']), to_object
75
- ),
76
- )
77
-
78
- return to_object
79
-
80
-
81
53
  def _SpeakerVoiceConfig_to_mldev(
82
54
  from_object: Union[dict[str, Any], object],
83
55
  parent_object: Optional[dict[str, Any]] = None,
@@ -96,20 +68,6 @@ def _SpeakerVoiceConfig_to_mldev(
96
68
  return to_object
97
69
 
98
70
 
99
- def _SpeakerVoiceConfig_to_vertex(
100
- from_object: Union[dict[str, Any], object],
101
- parent_object: Optional[dict[str, Any]] = None,
102
- ) -> dict[str, Any]:
103
- to_object: dict[str, Any] = {}
104
- if getv(from_object, ['speaker']) is not None:
105
- raise ValueError('speaker parameter is not supported in Vertex AI.')
106
-
107
- if getv(from_object, ['voice_config']) is not None:
108
- raise ValueError('voice_config parameter is not supported in Vertex AI.')
109
-
110
- return to_object
111
-
112
-
113
71
  def _MultiSpeakerVoiceConfig_to_mldev(
114
72
  from_object: Union[dict[str, Any], object],
115
73
  parent_object: Optional[dict[str, Any]] = None,
@@ -128,19 +86,6 @@ def _MultiSpeakerVoiceConfig_to_mldev(
128
86
  return to_object
129
87
 
130
88
 
131
- def _MultiSpeakerVoiceConfig_to_vertex(
132
- from_object: Union[dict[str, Any], object],
133
- parent_object: Optional[dict[str, Any]] = None,
134
- ) -> dict[str, Any]:
135
- to_object: dict[str, Any] = {}
136
- if getv(from_object, ['speaker_voice_configs']) is not None:
137
- raise ValueError(
138
- 'speaker_voice_configs parameter is not supported in Vertex AI.'
139
- )
140
-
141
- return to_object
142
-
143
-
144
89
  def _SpeechConfig_to_mldev(
145
90
  from_object: Union[dict[str, Any], object],
146
91
  parent_object: Optional[dict[str, Any]] = None,
@@ -168,29 +113,6 @@ def _SpeechConfig_to_mldev(
168
113
  return to_object
169
114
 
170
115
 
171
- def _SpeechConfig_to_vertex(
172
- from_object: Union[dict[str, Any], object],
173
- parent_object: Optional[dict[str, Any]] = None,
174
- ) -> dict[str, Any]:
175
- to_object: dict[str, Any] = {}
176
- if getv(from_object, ['voice_config']) is not None:
177
- setv(
178
- to_object,
179
- ['voiceConfig'],
180
- _VoiceConfig_to_vertex(getv(from_object, ['voice_config']), to_object),
181
- )
182
-
183
- if getv(from_object, ['multi_speaker_voice_config']) is not None:
184
- raise ValueError(
185
- 'multi_speaker_voice_config parameter is not supported in Vertex AI.'
186
- )
187
-
188
- if getv(from_object, ['language_code']) is not None:
189
- setv(to_object, ['languageCode'], getv(from_object, ['language_code']))
190
-
191
- return to_object
192
-
193
-
194
116
  def _VideoMetadata_to_mldev(
195
117
  from_object: Union[dict[str, Any], object],
196
118
  parent_object: Optional[dict[str, Any]] = None,
@@ -208,23 +130,6 @@ def _VideoMetadata_to_mldev(
208
130
  return to_object
209
131
 
210
132
 
211
- def _VideoMetadata_to_vertex(
212
- from_object: Union[dict[str, Any], object],
213
- parent_object: Optional[dict[str, Any]] = None,
214
- ) -> dict[str, Any]:
215
- to_object: dict[str, Any] = {}
216
- if getv(from_object, ['fps']) is not None:
217
- setv(to_object, ['fps'], getv(from_object, ['fps']))
218
-
219
- if getv(from_object, ['end_offset']) is not None:
220
- setv(to_object, ['endOffset'], getv(from_object, ['end_offset']))
221
-
222
- if getv(from_object, ['start_offset']) is not None:
223
- setv(to_object, ['startOffset'], getv(from_object, ['start_offset']))
224
-
225
- return to_object
226
-
227
-
228
133
  def _Blob_to_mldev(
229
134
  from_object: Union[dict[str, Any], object],
230
135
  parent_object: Optional[dict[str, Any]] = None,
@@ -242,23 +147,6 @@ def _Blob_to_mldev(
242
147
  return to_object
243
148
 
244
149
 
245
- def _Blob_to_vertex(
246
- from_object: Union[dict[str, Any], object],
247
- parent_object: Optional[dict[str, Any]] = None,
248
- ) -> dict[str, Any]:
249
- to_object: dict[str, Any] = {}
250
- if getv(from_object, ['display_name']) is not None:
251
- setv(to_object, ['displayName'], getv(from_object, ['display_name']))
252
-
253
- if getv(from_object, ['data']) is not None:
254
- setv(to_object, ['data'], getv(from_object, ['data']))
255
-
256
- if getv(from_object, ['mime_type']) is not None:
257
- setv(to_object, ['mimeType'], getv(from_object, ['mime_type']))
258
-
259
- return to_object
260
-
261
-
262
150
  def _FileData_to_mldev(
263
151
  from_object: Union[dict[str, Any], object],
264
152
  parent_object: Optional[dict[str, Any]] = None,
@@ -276,23 +164,6 @@ def _FileData_to_mldev(
276
164
  return to_object
277
165
 
278
166
 
279
- def _FileData_to_vertex(
280
- from_object: Union[dict[str, Any], object],
281
- parent_object: Optional[dict[str, Any]] = None,
282
- ) -> dict[str, Any]:
283
- to_object: dict[str, Any] = {}
284
- if getv(from_object, ['display_name']) is not None:
285
- setv(to_object, ['displayName'], getv(from_object, ['display_name']))
286
-
287
- if getv(from_object, ['file_uri']) is not None:
288
- setv(to_object, ['fileUri'], getv(from_object, ['file_uri']))
289
-
290
- if getv(from_object, ['mime_type']) is not None:
291
- setv(to_object, ['mimeType'], getv(from_object, ['mime_type']))
292
-
293
- return to_object
294
-
295
-
296
167
  def _Part_to_mldev(
297
168
  from_object: Union[dict[str, Any], object],
298
169
  parent_object: Optional[dict[str, Any]] = None,
@@ -357,70 +228,6 @@ def _Part_to_mldev(
357
228
  return to_object
358
229
 
359
230
 
360
- def _Part_to_vertex(
361
- from_object: Union[dict[str, Any], object],
362
- parent_object: Optional[dict[str, Any]] = None,
363
- ) -> dict[str, Any]:
364
- to_object: dict[str, Any] = {}
365
- if getv(from_object, ['video_metadata']) is not None:
366
- setv(
367
- to_object,
368
- ['videoMetadata'],
369
- _VideoMetadata_to_vertex(
370
- getv(from_object, ['video_metadata']), to_object
371
- ),
372
- )
373
-
374
- if getv(from_object, ['thought']) is not None:
375
- setv(to_object, ['thought'], getv(from_object, ['thought']))
376
-
377
- if getv(from_object, ['inline_data']) is not None:
378
- setv(
379
- to_object,
380
- ['inlineData'],
381
- _Blob_to_vertex(getv(from_object, ['inline_data']), to_object),
382
- )
383
-
384
- if getv(from_object, ['file_data']) is not None:
385
- setv(
386
- to_object,
387
- ['fileData'],
388
- _FileData_to_vertex(getv(from_object, ['file_data']), to_object),
389
- )
390
-
391
- if getv(from_object, ['thought_signature']) is not None:
392
- setv(
393
- to_object,
394
- ['thoughtSignature'],
395
- getv(from_object, ['thought_signature']),
396
- )
397
-
398
- if getv(from_object, ['code_execution_result']) is not None:
399
- setv(
400
- to_object,
401
- ['codeExecutionResult'],
402
- getv(from_object, ['code_execution_result']),
403
- )
404
-
405
- if getv(from_object, ['executable_code']) is not None:
406
- setv(to_object, ['executableCode'], getv(from_object, ['executable_code']))
407
-
408
- if getv(from_object, ['function_call']) is not None:
409
- setv(to_object, ['functionCall'], getv(from_object, ['function_call']))
410
-
411
- if getv(from_object, ['function_response']) is not None:
412
- setv(
413
- to_object,
414
- ['functionResponse'],
415
- getv(from_object, ['function_response']),
416
- )
417
-
418
- if getv(from_object, ['text']) is not None:
419
- setv(to_object, ['text'], getv(from_object, ['text']))
420
-
421
- return to_object
422
-
423
-
424
231
  def _Content_to_mldev(
425
232
  from_object: Union[dict[str, Any], object],
426
233
  parent_object: Optional[dict[str, Any]] = None,
@@ -442,27 +249,6 @@ def _Content_to_mldev(
442
249
  return to_object
443
250
 
444
251
 
445
- def _Content_to_vertex(
446
- from_object: Union[dict[str, Any], object],
447
- parent_object: Optional[dict[str, Any]] = None,
448
- ) -> dict[str, Any]:
449
- to_object: dict[str, Any] = {}
450
- if getv(from_object, ['parts']) is not None:
451
- setv(
452
- to_object,
453
- ['parts'],
454
- [
455
- _Part_to_vertex(item, to_object)
456
- for item in getv(from_object, ['parts'])
457
- ],
458
- )
459
-
460
- if getv(from_object, ['role']) is not None:
461
- setv(to_object, ['role'], getv(from_object, ['role']))
462
-
463
- return to_object
464
-
465
-
466
252
  def _FunctionDeclaration_to_mldev(
467
253
  from_object: Union[dict[str, Any], object],
468
254
  parent_object: Optional[dict[str, Any]] = None,
@@ -500,486 +286,457 @@ def _FunctionDeclaration_to_mldev(
500
286
  return to_object
501
287
 
502
288
 
503
- def _FunctionDeclaration_to_vertex(
289
+ def _Interval_to_mldev(
504
290
  from_object: Union[dict[str, Any], object],
505
291
  parent_object: Optional[dict[str, Any]] = None,
506
292
  ) -> dict[str, Any]:
507
293
  to_object: dict[str, Any] = {}
508
- if getv(from_object, ['behavior']) is not None:
509
- raise ValueError('behavior parameter is not supported in Vertex AI.')
294
+ if getv(from_object, ['start_time']) is not None:
295
+ setv(to_object, ['startTime'], getv(from_object, ['start_time']))
510
296
 
511
- if getv(from_object, ['description']) is not None:
512
- setv(to_object, ['description'], getv(from_object, ['description']))
297
+ if getv(from_object, ['end_time']) is not None:
298
+ setv(to_object, ['endTime'], getv(from_object, ['end_time']))
513
299
 
514
- if getv(from_object, ['name']) is not None:
515
- setv(to_object, ['name'], getv(from_object, ['name']))
300
+ return to_object
516
301
 
517
- if getv(from_object, ['parameters']) is not None:
518
- setv(to_object, ['parameters'], getv(from_object, ['parameters']))
519
302
 
520
- if getv(from_object, ['parameters_json_schema']) is not None:
303
+ def _GoogleSearch_to_mldev(
304
+ from_object: Union[dict[str, Any], object],
305
+ parent_object: Optional[dict[str, Any]] = None,
306
+ ) -> dict[str, Any]:
307
+ to_object: dict[str, Any] = {}
308
+ if getv(from_object, ['time_range_filter']) is not None:
521
309
  setv(
522
310
  to_object,
523
- ['parametersJsonSchema'],
524
- getv(from_object, ['parameters_json_schema']),
311
+ ['timeRangeFilter'],
312
+ _Interval_to_mldev(getv(from_object, ['time_range_filter']), to_object),
525
313
  )
526
314
 
527
- if getv(from_object, ['response']) is not None:
528
- setv(to_object, ['response'], getv(from_object, ['response']))
315
+ return to_object
529
316
 
530
- if getv(from_object, ['response_json_schema']) is not None:
317
+
318
+ def _DynamicRetrievalConfig_to_mldev(
319
+ from_object: Union[dict[str, Any], object],
320
+ parent_object: Optional[dict[str, Any]] = None,
321
+ ) -> dict[str, Any]:
322
+ to_object: dict[str, Any] = {}
323
+ if getv(from_object, ['mode']) is not None:
324
+ setv(to_object, ['mode'], getv(from_object, ['mode']))
325
+
326
+ if getv(from_object, ['dynamic_threshold']) is not None:
531
327
  setv(
532
328
  to_object,
533
- ['responseJsonSchema'],
534
- getv(from_object, ['response_json_schema']),
329
+ ['dynamicThreshold'],
330
+ getv(from_object, ['dynamic_threshold']),
535
331
  )
536
332
 
537
333
  return to_object
538
334
 
539
335
 
540
- def _Interval_to_mldev(
336
+ def _GoogleSearchRetrieval_to_mldev(
541
337
  from_object: Union[dict[str, Any], object],
542
338
  parent_object: Optional[dict[str, Any]] = None,
543
339
  ) -> dict[str, Any]:
544
340
  to_object: dict[str, Any] = {}
545
- if getv(from_object, ['start_time']) is not None:
546
- setv(to_object, ['startTime'], getv(from_object, ['start_time']))
547
-
548
- if getv(from_object, ['end_time']) is not None:
549
- setv(to_object, ['endTime'], getv(from_object, ['end_time']))
550
-
551
- return to_object
552
-
553
-
554
- def _Interval_to_vertex(
555
- from_object: Union[dict[str, Any], object],
556
- parent_object: Optional[dict[str, Any]] = None,
557
- ) -> dict[str, Any]:
558
- to_object: dict[str, Any] = {}
559
- if getv(from_object, ['start_time']) is not None:
560
- setv(to_object, ['startTime'], getv(from_object, ['start_time']))
561
-
562
- if getv(from_object, ['end_time']) is not None:
563
- setv(to_object, ['endTime'], getv(from_object, ['end_time']))
564
-
565
- return to_object
566
-
567
-
568
- def _GoogleSearch_to_mldev(
569
- from_object: Union[dict[str, Any], object],
570
- parent_object: Optional[dict[str, Any]] = None,
571
- ) -> dict[str, Any]:
572
- to_object: dict[str, Any] = {}
573
- if getv(from_object, ['time_range_filter']) is not None:
341
+ if getv(from_object, ['dynamic_retrieval_config']) is not None:
574
342
  setv(
575
343
  to_object,
576
- ['timeRangeFilter'],
577
- _Interval_to_mldev(getv(from_object, ['time_range_filter']), to_object),
344
+ ['dynamicRetrievalConfig'],
345
+ _DynamicRetrievalConfig_to_mldev(
346
+ getv(from_object, ['dynamic_retrieval_config']), to_object
347
+ ),
578
348
  )
579
349
 
580
350
  return to_object
581
351
 
582
352
 
583
- def _GoogleSearch_to_vertex(
353
+ def _UrlContext_to_mldev(
584
354
  from_object: Union[dict[str, Any], object],
585
355
  parent_object: Optional[dict[str, Any]] = None,
586
356
  ) -> dict[str, Any]:
587
357
  to_object: dict[str, Any] = {}
588
- if getv(from_object, ['time_range_filter']) is not None:
589
- setv(
590
- to_object,
591
- ['timeRangeFilter'],
592
- _Interval_to_vertex(
593
- getv(from_object, ['time_range_filter']), to_object
594
- ),
595
- )
596
358
 
597
359
  return to_object
598
360
 
599
361
 
600
- def _DynamicRetrievalConfig_to_mldev(
362
+ def _Tool_to_mldev(
601
363
  from_object: Union[dict[str, Any], object],
602
364
  parent_object: Optional[dict[str, Any]] = None,
603
365
  ) -> dict[str, Any]:
604
366
  to_object: dict[str, Any] = {}
605
- if getv(from_object, ['mode']) is not None:
606
- setv(to_object, ['mode'], getv(from_object, ['mode']))
607
-
608
- if getv(from_object, ['dynamic_threshold']) is not None:
367
+ if getv(from_object, ['function_declarations']) is not None:
609
368
  setv(
610
369
  to_object,
611
- ['dynamicThreshold'],
612
- getv(from_object, ['dynamic_threshold']),
370
+ ['functionDeclarations'],
371
+ [
372
+ _FunctionDeclaration_to_mldev(item, to_object)
373
+ for item in getv(from_object, ['function_declarations'])
374
+ ],
613
375
  )
614
376
 
615
- return to_object
616
-
617
-
618
- def _DynamicRetrievalConfig_to_vertex(
619
- from_object: Union[dict[str, Any], object],
620
- parent_object: Optional[dict[str, Any]] = None,
621
- ) -> dict[str, Any]:
622
- to_object: dict[str, Any] = {}
623
- if getv(from_object, ['mode']) is not None:
624
- setv(to_object, ['mode'], getv(from_object, ['mode']))
377
+ if getv(from_object, ['retrieval']) is not None:
378
+ raise ValueError('retrieval parameter is not supported in Gemini API.')
625
379
 
626
- if getv(from_object, ['dynamic_threshold']) is not None:
380
+ if getv(from_object, ['google_search']) is not None:
627
381
  setv(
628
382
  to_object,
629
- ['dynamicThreshold'],
630
- getv(from_object, ['dynamic_threshold']),
383
+ ['googleSearch'],
384
+ _GoogleSearch_to_mldev(getv(from_object, ['google_search']), to_object),
631
385
  )
632
386
 
633
- return to_object
634
-
635
-
636
- def _GoogleSearchRetrieval_to_mldev(
637
- from_object: Union[dict[str, Any], object],
638
- parent_object: Optional[dict[str, Any]] = None,
639
- ) -> dict[str, Any]:
640
- to_object: dict[str, Any] = {}
641
- if getv(from_object, ['dynamic_retrieval_config']) is not None:
387
+ if getv(from_object, ['google_search_retrieval']) is not None:
642
388
  setv(
643
389
  to_object,
644
- ['dynamicRetrievalConfig'],
645
- _DynamicRetrievalConfig_to_mldev(
646
- getv(from_object, ['dynamic_retrieval_config']), to_object
390
+ ['googleSearchRetrieval'],
391
+ _GoogleSearchRetrieval_to_mldev(
392
+ getv(from_object, ['google_search_retrieval']), to_object
647
393
  ),
648
394
  )
649
395
 
650
- return to_object
396
+ if getv(from_object, ['enterprise_web_search']) is not None:
397
+ raise ValueError(
398
+ 'enterprise_web_search parameter is not supported in Gemini API.'
399
+ )
651
400
 
401
+ if getv(from_object, ['google_maps']) is not None:
402
+ raise ValueError('google_maps parameter is not supported in Gemini API.')
652
403
 
653
- def _GoogleSearchRetrieval_to_vertex(
654
- from_object: Union[dict[str, Any], object],
655
- parent_object: Optional[dict[str, Any]] = None,
656
- ) -> dict[str, Any]:
657
- to_object: dict[str, Any] = {}
658
- if getv(from_object, ['dynamic_retrieval_config']) is not None:
404
+ if getv(from_object, ['url_context']) is not None:
659
405
  setv(
660
406
  to_object,
661
- ['dynamicRetrievalConfig'],
662
- _DynamicRetrievalConfig_to_vertex(
663
- getv(from_object, ['dynamic_retrieval_config']), to_object
664
- ),
407
+ ['urlContext'],
408
+ _UrlContext_to_mldev(getv(from_object, ['url_context']), to_object),
665
409
  )
666
410
 
667
- return to_object
668
-
411
+ if getv(from_object, ['code_execution']) is not None:
412
+ setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
669
413
 
670
- def _EnterpriseWebSearch_to_mldev(
671
- from_object: Union[dict[str, Any], object],
672
- parent_object: Optional[dict[str, Any]] = None,
673
- ) -> dict[str, Any]:
674
- to_object: dict[str, Any] = {}
414
+ if getv(from_object, ['computer_use']) is not None:
415
+ setv(to_object, ['computerUse'], getv(from_object, ['computer_use']))
675
416
 
676
417
  return to_object
677
418
 
678
419
 
679
- def _EnterpriseWebSearch_to_vertex(
420
+ def _SessionResumptionConfig_to_mldev(
680
421
  from_object: Union[dict[str, Any], object],
681
422
  parent_object: Optional[dict[str, Any]] = None,
682
423
  ) -> dict[str, Any]:
683
424
  to_object: dict[str, Any] = {}
425
+ if getv(from_object, ['handle']) is not None:
426
+ setv(to_object, ['handle'], getv(from_object, ['handle']))
684
427
 
685
- return to_object
686
-
687
-
688
- def _ApiKeyConfig_to_mldev(
689
- from_object: Union[dict[str, Any], object],
690
- parent_object: Optional[dict[str, Any]] = None,
691
- ) -> dict[str, Any]:
692
- to_object: dict[str, Any] = {}
693
- if getv(from_object, ['api_key_string']) is not None:
694
- raise ValueError('api_key_string parameter is not supported in Gemini API.')
428
+ if getv(from_object, ['transparent']) is not None:
429
+ raise ValueError('transparent parameter is not supported in Gemini API.')
695
430
 
696
431
  return to_object
697
432
 
698
433
 
699
- def _ApiKeyConfig_to_vertex(
434
+ def _AudioTranscriptionConfig_to_mldev(
700
435
  from_object: Union[dict[str, Any], object],
701
436
  parent_object: Optional[dict[str, Any]] = None,
702
437
  ) -> dict[str, Any]:
703
438
  to_object: dict[str, Any] = {}
704
- if getv(from_object, ['api_key_string']) is not None:
705
- setv(to_object, ['apiKeyString'], getv(from_object, ['api_key_string']))
706
439
 
707
440
  return to_object
708
441
 
709
442
 
710
- def _AuthConfig_to_mldev(
443
+ def _AutomaticActivityDetection_to_mldev(
711
444
  from_object: Union[dict[str, Any], object],
712
445
  parent_object: Optional[dict[str, Any]] = None,
713
446
  ) -> dict[str, Any]:
714
447
  to_object: dict[str, Any] = {}
715
- if getv(from_object, ['api_key_config']) is not None:
716
- raise ValueError('api_key_config parameter is not supported in Gemini API.')
717
-
718
- if getv(from_object, ['auth_type']) is not None:
719
- setv(to_object, ['authType'], getv(from_object, ['auth_type']))
448
+ if getv(from_object, ['disabled']) is not None:
449
+ setv(to_object, ['disabled'], getv(from_object, ['disabled']))
720
450
 
721
- if getv(from_object, ['google_service_account_config']) is not None:
451
+ if getv(from_object, ['start_of_speech_sensitivity']) is not None:
722
452
  setv(
723
453
  to_object,
724
- ['googleServiceAccountConfig'],
725
- getv(from_object, ['google_service_account_config']),
454
+ ['startOfSpeechSensitivity'],
455
+ getv(from_object, ['start_of_speech_sensitivity']),
726
456
  )
727
457
 
728
- if getv(from_object, ['http_basic_auth_config']) is not None:
458
+ if getv(from_object, ['end_of_speech_sensitivity']) is not None:
729
459
  setv(
730
460
  to_object,
731
- ['httpBasicAuthConfig'],
732
- getv(from_object, ['http_basic_auth_config']),
461
+ ['endOfSpeechSensitivity'],
462
+ getv(from_object, ['end_of_speech_sensitivity']),
733
463
  )
734
464
 
735
- if getv(from_object, ['oauth_config']) is not None:
736
- setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
465
+ if getv(from_object, ['prefix_padding_ms']) is not None:
466
+ setv(
467
+ to_object, ['prefixPaddingMs'], getv(from_object, ['prefix_padding_ms'])
468
+ )
737
469
 
738
- if getv(from_object, ['oidc_config']) is not None:
739
- setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
470
+ if getv(from_object, ['silence_duration_ms']) is not None:
471
+ setv(
472
+ to_object,
473
+ ['silenceDurationMs'],
474
+ getv(from_object, ['silence_duration_ms']),
475
+ )
740
476
 
741
477
  return to_object
742
478
 
743
479
 
744
- def _AuthConfig_to_vertex(
480
+ def _RealtimeInputConfig_to_mldev(
745
481
  from_object: Union[dict[str, Any], object],
746
482
  parent_object: Optional[dict[str, Any]] = None,
747
483
  ) -> dict[str, Any]:
748
484
  to_object: dict[str, Any] = {}
749
- if getv(from_object, ['api_key_config']) is not None:
485
+ if getv(from_object, ['automatic_activity_detection']) is not None:
750
486
  setv(
751
487
  to_object,
752
- ['apiKeyConfig'],
753
- _ApiKeyConfig_to_vertex(
754
- getv(from_object, ['api_key_config']), to_object
488
+ ['automaticActivityDetection'],
489
+ _AutomaticActivityDetection_to_mldev(
490
+ getv(from_object, ['automatic_activity_detection']), to_object
755
491
  ),
756
492
  )
757
493
 
758
- if getv(from_object, ['auth_type']) is not None:
759
- setv(to_object, ['authType'], getv(from_object, ['auth_type']))
760
-
761
- if getv(from_object, ['google_service_account_config']) is not None:
762
- setv(
763
- to_object,
764
- ['googleServiceAccountConfig'],
765
- getv(from_object, ['google_service_account_config']),
766
- )
767
-
768
- if getv(from_object, ['http_basic_auth_config']) is not None:
494
+ if getv(from_object, ['activity_handling']) is not None:
769
495
  setv(
770
496
  to_object,
771
- ['httpBasicAuthConfig'],
772
- getv(from_object, ['http_basic_auth_config']),
497
+ ['activityHandling'],
498
+ getv(from_object, ['activity_handling']),
773
499
  )
774
500
 
775
- if getv(from_object, ['oauth_config']) is not None:
776
- setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
777
-
778
- if getv(from_object, ['oidc_config']) is not None:
779
- setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
501
+ if getv(from_object, ['turn_coverage']) is not None:
502
+ setv(to_object, ['turnCoverage'], getv(from_object, ['turn_coverage']))
780
503
 
781
504
  return to_object
782
505
 
783
506
 
784
- def _GoogleMaps_to_mldev(
507
+ def _SlidingWindow_to_mldev(
785
508
  from_object: Union[dict[str, Any], object],
786
509
  parent_object: Optional[dict[str, Any]] = None,
787
510
  ) -> dict[str, Any]:
788
511
  to_object: dict[str, Any] = {}
789
- if getv(from_object, ['auth_config']) is not None:
790
- raise ValueError('auth_config parameter is not supported in Gemini API.')
512
+ if getv(from_object, ['target_tokens']) is not None:
513
+ setv(to_object, ['targetTokens'], getv(from_object, ['target_tokens']))
791
514
 
792
515
  return to_object
793
516
 
794
517
 
795
- def _GoogleMaps_to_vertex(
518
+ def _ContextWindowCompressionConfig_to_mldev(
796
519
  from_object: Union[dict[str, Any], object],
797
520
  parent_object: Optional[dict[str, Any]] = None,
798
521
  ) -> dict[str, Any]:
799
522
  to_object: dict[str, Any] = {}
800
- if getv(from_object, ['auth_config']) is not None:
523
+ if getv(from_object, ['trigger_tokens']) is not None:
524
+ setv(to_object, ['triggerTokens'], getv(from_object, ['trigger_tokens']))
525
+
526
+ if getv(from_object, ['sliding_window']) is not None:
801
527
  setv(
802
528
  to_object,
803
- ['authConfig'],
804
- _AuthConfig_to_vertex(getv(from_object, ['auth_config']), to_object),
529
+ ['slidingWindow'],
530
+ _SlidingWindow_to_mldev(
531
+ getv(from_object, ['sliding_window']), to_object
532
+ ),
805
533
  )
806
534
 
807
535
  return to_object
808
536
 
809
537
 
810
- def _UrlContext_to_mldev(
538
+ def _ProactivityConfig_to_mldev(
811
539
  from_object: Union[dict[str, Any], object],
812
540
  parent_object: Optional[dict[str, Any]] = None,
813
541
  ) -> dict[str, Any]:
814
542
  to_object: dict[str, Any] = {}
543
+ if getv(from_object, ['proactive_audio']) is not None:
544
+ setv(to_object, ['proactiveAudio'], getv(from_object, ['proactive_audio']))
815
545
 
816
546
  return to_object
817
547
 
818
548
 
819
- def _UrlContext_to_vertex(
549
+ def _LiveConnectConfig_to_mldev(
550
+ api_client: BaseApiClient,
820
551
  from_object: Union[dict[str, Any], object],
821
552
  parent_object: Optional[dict[str, Any]] = None,
822
553
  ) -> dict[str, Any]:
823
554
  to_object: dict[str, Any] = {}
824
555
 
825
- return to_object
826
-
827
-
828
- def _Tool_to_mldev(
829
- from_object: Union[dict[str, Any], object],
830
- parent_object: Optional[dict[str, Any]] = None,
831
- ) -> dict[str, Any]:
832
- to_object: dict[str, Any] = {}
833
- if getv(from_object, ['function_declarations']) is not None:
556
+ if getv(from_object, ['generation_config']) is not None:
834
557
  setv(
835
- to_object,
836
- ['functionDeclarations'],
837
- [
838
- _FunctionDeclaration_to_mldev(item, to_object)
839
- for item in getv(from_object, ['function_declarations'])
840
- ],
558
+ parent_object,
559
+ ['setup', 'generationConfig'],
560
+ getv(from_object, ['generation_config']),
841
561
  )
842
562
 
843
- if getv(from_object, ['retrieval']) is not None:
844
- raise ValueError('retrieval parameter is not supported in Gemini API.')
845
-
846
- if getv(from_object, ['google_search']) is not None:
563
+ if getv(from_object, ['response_modalities']) is not None:
847
564
  setv(
848
- to_object,
849
- ['googleSearch'],
850
- _GoogleSearch_to_mldev(getv(from_object, ['google_search']), to_object),
565
+ parent_object,
566
+ ['setup', 'generationConfig', 'responseModalities'],
567
+ getv(from_object, ['response_modalities']),
851
568
  )
852
569
 
853
- if getv(from_object, ['google_search_retrieval']) is not None:
570
+ if getv(from_object, ['temperature']) is not None:
854
571
  setv(
855
- to_object,
856
- ['googleSearchRetrieval'],
857
- _GoogleSearchRetrieval_to_mldev(
858
- getv(from_object, ['google_search_retrieval']), to_object
859
- ),
572
+ parent_object,
573
+ ['setup', 'generationConfig', 'temperature'],
574
+ getv(from_object, ['temperature']),
860
575
  )
861
576
 
862
- if getv(from_object, ['enterprise_web_search']) is not None:
863
- raise ValueError(
864
- 'enterprise_web_search parameter is not supported in Gemini API.'
577
+ if getv(from_object, ['top_p']) is not None:
578
+ setv(
579
+ parent_object,
580
+ ['setup', 'generationConfig', 'topP'],
581
+ getv(from_object, ['top_p']),
865
582
  )
866
583
 
867
- if getv(from_object, ['google_maps']) is not None:
868
- raise ValueError('google_maps parameter is not supported in Gemini API.')
584
+ if getv(from_object, ['top_k']) is not None:
585
+ setv(
586
+ parent_object,
587
+ ['setup', 'generationConfig', 'topK'],
588
+ getv(from_object, ['top_k']),
589
+ )
869
590
 
870
- if getv(from_object, ['url_context']) is not None:
591
+ if getv(from_object, ['max_output_tokens']) is not None:
871
592
  setv(
872
- to_object,
873
- ['urlContext'],
874
- _UrlContext_to_mldev(getv(from_object, ['url_context']), to_object),
593
+ parent_object,
594
+ ['setup', 'generationConfig', 'maxOutputTokens'],
595
+ getv(from_object, ['max_output_tokens']),
875
596
  )
876
597
 
877
- if getv(from_object, ['code_execution']) is not None:
878
- setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
598
+ if getv(from_object, ['media_resolution']) is not None:
599
+ setv(
600
+ parent_object,
601
+ ['setup', 'generationConfig', 'mediaResolution'],
602
+ getv(from_object, ['media_resolution']),
603
+ )
879
604
 
880
- if getv(from_object, ['computer_use']) is not None:
881
- setv(to_object, ['computerUse'], getv(from_object, ['computer_use']))
605
+ if getv(from_object, ['seed']) is not None:
606
+ setv(
607
+ parent_object,
608
+ ['setup', 'generationConfig', 'seed'],
609
+ getv(from_object, ['seed']),
610
+ )
882
611
 
883
- return to_object
612
+ if getv(from_object, ['speech_config']) is not None:
613
+ setv(
614
+ parent_object,
615
+ ['setup', 'generationConfig', 'speechConfig'],
616
+ _SpeechConfig_to_mldev(
617
+ t.t_live_speech_config(getv(from_object, ['speech_config'])),
618
+ to_object,
619
+ ),
620
+ )
884
621
 
622
+ if getv(from_object, ['enable_affective_dialog']) is not None:
623
+ setv(
624
+ parent_object,
625
+ ['setup', 'generationConfig', 'enableAffectiveDialog'],
626
+ getv(from_object, ['enable_affective_dialog']),
627
+ )
885
628
 
886
- def _Tool_to_vertex(
887
- from_object: Union[dict[str, Any], object],
888
- parent_object: Optional[dict[str, Any]] = None,
889
- ) -> dict[str, Any]:
890
- to_object: dict[str, Any] = {}
891
- if getv(from_object, ['function_declarations']) is not None:
629
+ if getv(from_object, ['system_instruction']) is not None:
892
630
  setv(
893
- to_object,
894
- ['functionDeclarations'],
631
+ parent_object,
632
+ ['setup', 'systemInstruction'],
633
+ _Content_to_mldev(
634
+ t.t_content(getv(from_object, ['system_instruction'])), to_object
635
+ ),
636
+ )
637
+
638
+ if getv(from_object, ['tools']) is not None:
639
+ setv(
640
+ parent_object,
641
+ ['setup', 'tools'],
895
642
  [
896
- _FunctionDeclaration_to_vertex(item, to_object)
897
- for item in getv(from_object, ['function_declarations'])
643
+ _Tool_to_mldev(t.t_tool(api_client, item), to_object)
644
+ for item in t.t_tools(api_client, getv(from_object, ['tools']))
898
645
  ],
899
646
  )
900
647
 
901
- if getv(from_object, ['retrieval']) is not None:
902
- setv(to_object, ['retrieval'], getv(from_object, ['retrieval']))
903
-
904
- if getv(from_object, ['google_search']) is not None:
648
+ if getv(from_object, ['session_resumption']) is not None:
905
649
  setv(
906
- to_object,
907
- ['googleSearch'],
908
- _GoogleSearch_to_vertex(
909
- getv(from_object, ['google_search']), to_object
650
+ parent_object,
651
+ ['setup', 'sessionResumption'],
652
+ _SessionResumptionConfig_to_mldev(
653
+ getv(from_object, ['session_resumption']), to_object
910
654
  ),
911
655
  )
912
656
 
913
- if getv(from_object, ['google_search_retrieval']) is not None:
657
+ if getv(from_object, ['input_audio_transcription']) is not None:
914
658
  setv(
915
- to_object,
916
- ['googleSearchRetrieval'],
917
- _GoogleSearchRetrieval_to_vertex(
918
- getv(from_object, ['google_search_retrieval']), to_object
659
+ parent_object,
660
+ ['setup', 'inputAudioTranscription'],
661
+ _AudioTranscriptionConfig_to_mldev(
662
+ getv(from_object, ['input_audio_transcription']), to_object
919
663
  ),
920
664
  )
921
665
 
922
- if getv(from_object, ['enterprise_web_search']) is not None:
666
+ if getv(from_object, ['output_audio_transcription']) is not None:
923
667
  setv(
924
- to_object,
925
- ['enterpriseWebSearch'],
926
- _EnterpriseWebSearch_to_vertex(
927
- getv(from_object, ['enterprise_web_search']), to_object
668
+ parent_object,
669
+ ['setup', 'outputAudioTranscription'],
670
+ _AudioTranscriptionConfig_to_mldev(
671
+ getv(from_object, ['output_audio_transcription']), to_object
928
672
  ),
929
673
  )
930
674
 
931
- if getv(from_object, ['google_maps']) is not None:
675
+ if getv(from_object, ['realtime_input_config']) is not None:
932
676
  setv(
933
- to_object,
934
- ['googleMaps'],
935
- _GoogleMaps_to_vertex(getv(from_object, ['google_maps']), to_object),
677
+ parent_object,
678
+ ['setup', 'realtimeInputConfig'],
679
+ _RealtimeInputConfig_to_mldev(
680
+ getv(from_object, ['realtime_input_config']), to_object
681
+ ),
936
682
  )
937
683
 
938
- if getv(from_object, ['url_context']) is not None:
684
+ if getv(from_object, ['context_window_compression']) is not None:
939
685
  setv(
940
- to_object,
941
- ['urlContext'],
942
- _UrlContext_to_vertex(getv(from_object, ['url_context']), to_object),
686
+ parent_object,
687
+ ['setup', 'contextWindowCompression'],
688
+ _ContextWindowCompressionConfig_to_mldev(
689
+ getv(from_object, ['context_window_compression']), to_object
690
+ ),
943
691
  )
944
692
 
945
- if getv(from_object, ['code_execution']) is not None:
946
- setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
947
-
948
- if getv(from_object, ['computer_use']) is not None:
949
- setv(to_object, ['computerUse'], getv(from_object, ['computer_use']))
693
+ if getv(from_object, ['proactivity']) is not None:
694
+ setv(
695
+ parent_object,
696
+ ['setup', 'proactivity'],
697
+ _ProactivityConfig_to_mldev(
698
+ getv(from_object, ['proactivity']), to_object
699
+ ),
700
+ )
950
701
 
951
702
  return to_object
952
703
 
953
704
 
954
- def _SessionResumptionConfig_to_mldev(
705
+ def _LiveConnectParameters_to_mldev(
706
+ api_client: BaseApiClient,
955
707
  from_object: Union[dict[str, Any], object],
956
708
  parent_object: Optional[dict[str, Any]] = None,
957
709
  ) -> dict[str, Any]:
958
710
  to_object: dict[str, Any] = {}
959
- if getv(from_object, ['handle']) is not None:
960
- setv(to_object, ['handle'], getv(from_object, ['handle']))
711
+ if getv(from_object, ['model']) is not None:
712
+ setv(
713
+ to_object,
714
+ ['setup', 'model'],
715
+ t.t_model(api_client, getv(from_object, ['model'])),
716
+ )
961
717
 
962
- if getv(from_object, ['transparent']) is not None:
963
- raise ValueError('transparent parameter is not supported in Gemini API.')
718
+ if getv(from_object, ['config']) is not None:
719
+ setv(
720
+ to_object,
721
+ ['config'],
722
+ _LiveConnectConfig_to_mldev(
723
+ api_client, getv(from_object, ['config']), to_object
724
+ ),
725
+ )
964
726
 
965
727
  return to_object
966
728
 
967
729
 
968
- def _SessionResumptionConfig_to_vertex(
730
+ def _ActivityStart_to_mldev(
969
731
  from_object: Union[dict[str, Any], object],
970
732
  parent_object: Optional[dict[str, Any]] = None,
971
733
  ) -> dict[str, Any]:
972
734
  to_object: dict[str, Any] = {}
973
- if getv(from_object, ['handle']) is not None:
974
- setv(to_object, ['handle'], getv(from_object, ['handle']))
975
-
976
- if getv(from_object, ['transparent']) is not None:
977
- setv(to_object, ['transparent'], getv(from_object, ['transparent']))
978
735
 
979
736
  return to_object
980
737
 
981
738
 
982
- def _AudioTranscriptionConfig_to_mldev(
739
+ def _ActivityEnd_to_mldev(
983
740
  from_object: Union[dict[str, Any], object],
984
741
  parent_object: Optional[dict[str, Any]] = None,
985
742
  ) -> dict[str, Any]:
@@ -988,1416 +745,1443 @@ def _AudioTranscriptionConfig_to_mldev(
988
745
  return to_object
989
746
 
990
747
 
991
- def _AudioTranscriptionConfig_to_vertex(
748
+ def _LiveSendRealtimeInputParameters_to_mldev(
992
749
  from_object: Union[dict[str, Any], object],
993
750
  parent_object: Optional[dict[str, Any]] = None,
994
751
  ) -> dict[str, Any]:
995
752
  to_object: dict[str, Any] = {}
753
+ if getv(from_object, ['media']) is not None:
754
+ setv(to_object, ['mediaChunks'], t.t_blobs(getv(from_object, ['media'])))
996
755
 
997
- return to_object
756
+ if getv(from_object, ['audio']) is not None:
757
+ setv(to_object, ['audio'], t.t_audio_blob(getv(from_object, ['audio'])))
998
758
 
759
+ if getv(from_object, ['audio_stream_end']) is not None:
760
+ setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
999
761
 
1000
- def _AutomaticActivityDetection_to_mldev(
1001
- from_object: Union[dict[str, Any], object],
1002
- parent_object: Optional[dict[str, Any]] = None,
1003
- ) -> dict[str, Any]:
1004
- to_object: dict[str, Any] = {}
1005
- if getv(from_object, ['disabled']) is not None:
1006
- setv(to_object, ['disabled'], getv(from_object, ['disabled']))
762
+ if getv(from_object, ['video']) is not None:
763
+ setv(to_object, ['video'], t.t_image_blob(getv(from_object, ['video'])))
1007
764
 
1008
- if getv(from_object, ['start_of_speech_sensitivity']) is not None:
1009
- setv(
1010
- to_object,
1011
- ['startOfSpeechSensitivity'],
1012
- getv(from_object, ['start_of_speech_sensitivity']),
1013
- )
765
+ if getv(from_object, ['text']) is not None:
766
+ setv(to_object, ['text'], getv(from_object, ['text']))
1014
767
 
1015
- if getv(from_object, ['end_of_speech_sensitivity']) is not None:
768
+ if getv(from_object, ['activity_start']) is not None:
1016
769
  setv(
1017
770
  to_object,
1018
- ['endOfSpeechSensitivity'],
1019
- getv(from_object, ['end_of_speech_sensitivity']),
1020
- )
1021
-
1022
- if getv(from_object, ['prefix_padding_ms']) is not None:
1023
- setv(
1024
- to_object, ['prefixPaddingMs'], getv(from_object, ['prefix_padding_ms'])
771
+ ['activityStart'],
772
+ _ActivityStart_to_mldev(
773
+ getv(from_object, ['activity_start']), to_object
774
+ ),
1025
775
  )
1026
776
 
1027
- if getv(from_object, ['silence_duration_ms']) is not None:
777
+ if getv(from_object, ['activity_end']) is not None:
1028
778
  setv(
1029
779
  to_object,
1030
- ['silenceDurationMs'],
1031
- getv(from_object, ['silence_duration_ms']),
780
+ ['activityEnd'],
781
+ _ActivityEnd_to_mldev(getv(from_object, ['activity_end']), to_object),
1032
782
  )
1033
783
 
1034
784
  return to_object
1035
785
 
1036
786
 
1037
- def _AutomaticActivityDetection_to_vertex(
787
+ def _LiveClientSetup_to_mldev(
788
+ api_client: BaseApiClient,
1038
789
  from_object: Union[dict[str, Any], object],
1039
790
  parent_object: Optional[dict[str, Any]] = None,
1040
791
  ) -> dict[str, Any]:
1041
792
  to_object: dict[str, Any] = {}
1042
- if getv(from_object, ['disabled']) is not None:
1043
- setv(to_object, ['disabled'], getv(from_object, ['disabled']))
793
+ if getv(from_object, ['model']) is not None:
794
+ setv(to_object, ['model'], getv(from_object, ['model']))
1044
795
 
1045
- if getv(from_object, ['start_of_speech_sensitivity']) is not None:
796
+ if getv(from_object, ['generation_config']) is not None:
1046
797
  setv(
1047
798
  to_object,
1048
- ['startOfSpeechSensitivity'],
1049
- getv(from_object, ['start_of_speech_sensitivity']),
799
+ ['generationConfig'],
800
+ getv(from_object, ['generation_config']),
1050
801
  )
1051
802
 
1052
- if getv(from_object, ['end_of_speech_sensitivity']) is not None:
803
+ if getv(from_object, ['system_instruction']) is not None:
1053
804
  setv(
1054
805
  to_object,
1055
- ['endOfSpeechSensitivity'],
1056
- getv(from_object, ['end_of_speech_sensitivity']),
1057
- )
1058
-
1059
- if getv(from_object, ['prefix_padding_ms']) is not None:
1060
- setv(
1061
- to_object, ['prefixPaddingMs'], getv(from_object, ['prefix_padding_ms'])
806
+ ['systemInstruction'],
807
+ _Content_to_mldev(
808
+ t.t_content(getv(from_object, ['system_instruction'])), to_object
809
+ ),
1062
810
  )
1063
811
 
1064
- if getv(from_object, ['silence_duration_ms']) is not None:
812
+ if getv(from_object, ['tools']) is not None:
1065
813
  setv(
1066
814
  to_object,
1067
- ['silenceDurationMs'],
1068
- getv(from_object, ['silence_duration_ms']),
815
+ ['tools'],
816
+ [
817
+ _Tool_to_mldev(t.t_tool(api_client, item), to_object)
818
+ for item in t.t_tools(api_client, getv(from_object, ['tools']))
819
+ ],
1069
820
  )
1070
821
 
1071
- return to_object
822
+ if getv(from_object, ['session_resumption']) is not None:
823
+ setv(
824
+ to_object,
825
+ ['sessionResumption'],
826
+ _SessionResumptionConfig_to_mldev(
827
+ getv(from_object, ['session_resumption']), to_object
828
+ ),
829
+ )
1072
830
 
831
+ if getv(from_object, ['context_window_compression']) is not None:
832
+ setv(
833
+ to_object,
834
+ ['contextWindowCompression'],
835
+ _ContextWindowCompressionConfig_to_mldev(
836
+ getv(from_object, ['context_window_compression']), to_object
837
+ ),
838
+ )
1073
839
 
1074
- def _RealtimeInputConfig_to_mldev(
1075
- from_object: Union[dict[str, Any], object],
1076
- parent_object: Optional[dict[str, Any]] = None,
1077
- ) -> dict[str, Any]:
1078
- to_object: dict[str, Any] = {}
1079
- if getv(from_object, ['automatic_activity_detection']) is not None:
840
+ if getv(from_object, ['input_audio_transcription']) is not None:
1080
841
  setv(
1081
842
  to_object,
1082
- ['automaticActivityDetection'],
1083
- _AutomaticActivityDetection_to_mldev(
1084
- getv(from_object, ['automatic_activity_detection']), to_object
843
+ ['inputAudioTranscription'],
844
+ _AudioTranscriptionConfig_to_mldev(
845
+ getv(from_object, ['input_audio_transcription']), to_object
1085
846
  ),
1086
847
  )
1087
848
 
1088
- if getv(from_object, ['activity_handling']) is not None:
849
+ if getv(from_object, ['output_audio_transcription']) is not None:
1089
850
  setv(
1090
851
  to_object,
1091
- ['activityHandling'],
1092
- getv(from_object, ['activity_handling']),
852
+ ['outputAudioTranscription'],
853
+ _AudioTranscriptionConfig_to_mldev(
854
+ getv(from_object, ['output_audio_transcription']), to_object
855
+ ),
1093
856
  )
1094
857
 
1095
- if getv(from_object, ['turn_coverage']) is not None:
1096
- setv(to_object, ['turnCoverage'], getv(from_object, ['turn_coverage']))
858
+ if getv(from_object, ['proactivity']) is not None:
859
+ setv(
860
+ to_object,
861
+ ['proactivity'],
862
+ _ProactivityConfig_to_mldev(
863
+ getv(from_object, ['proactivity']), to_object
864
+ ),
865
+ )
1097
866
 
1098
867
  return to_object
1099
868
 
1100
869
 
1101
- def _RealtimeInputConfig_to_vertex(
870
+ def _LiveClientContent_to_mldev(
1102
871
  from_object: Union[dict[str, Any], object],
1103
872
  parent_object: Optional[dict[str, Any]] = None,
1104
873
  ) -> dict[str, Any]:
1105
874
  to_object: dict[str, Any] = {}
1106
- if getv(from_object, ['automatic_activity_detection']) is not None:
1107
- setv(
1108
- to_object,
1109
- ['automaticActivityDetection'],
1110
- _AutomaticActivityDetection_to_vertex(
1111
- getv(from_object, ['automatic_activity_detection']), to_object
1112
- ),
1113
- )
1114
-
1115
- if getv(from_object, ['activity_handling']) is not None:
875
+ if getv(from_object, ['turns']) is not None:
1116
876
  setv(
1117
877
  to_object,
1118
- ['activityHandling'],
1119
- getv(from_object, ['activity_handling']),
878
+ ['turns'],
879
+ [
880
+ _Content_to_mldev(item, to_object)
881
+ for item in getv(from_object, ['turns'])
882
+ ],
1120
883
  )
1121
884
 
1122
- if getv(from_object, ['turn_coverage']) is not None:
1123
- setv(to_object, ['turnCoverage'], getv(from_object, ['turn_coverage']))
885
+ if getv(from_object, ['turn_complete']) is not None:
886
+ setv(to_object, ['turnComplete'], getv(from_object, ['turn_complete']))
1124
887
 
1125
888
  return to_object
1126
889
 
1127
890
 
1128
- def _SlidingWindow_to_mldev(
891
+ def _LiveClientRealtimeInput_to_mldev(
1129
892
  from_object: Union[dict[str, Any], object],
1130
893
  parent_object: Optional[dict[str, Any]] = None,
1131
894
  ) -> dict[str, Any]:
1132
895
  to_object: dict[str, Any] = {}
1133
- if getv(from_object, ['target_tokens']) is not None:
1134
- setv(to_object, ['targetTokens'], getv(from_object, ['target_tokens']))
896
+ if getv(from_object, ['media_chunks']) is not None:
897
+ setv(to_object, ['mediaChunks'], getv(from_object, ['media_chunks']))
898
+
899
+ if getv(from_object, ['audio']) is not None:
900
+ setv(to_object, ['audio'], getv(from_object, ['audio']))
901
+
902
+ if getv(from_object, ['audio_stream_end']) is not None:
903
+ setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
904
+
905
+ if getv(from_object, ['video']) is not None:
906
+ setv(to_object, ['video'], getv(from_object, ['video']))
907
+
908
+ if getv(from_object, ['text']) is not None:
909
+ setv(to_object, ['text'], getv(from_object, ['text']))
910
+
911
+ if getv(from_object, ['activity_start']) is not None:
912
+ setv(
913
+ to_object,
914
+ ['activityStart'],
915
+ _ActivityStart_to_mldev(
916
+ getv(from_object, ['activity_start']), to_object
917
+ ),
918
+ )
919
+
920
+ if getv(from_object, ['activity_end']) is not None:
921
+ setv(
922
+ to_object,
923
+ ['activityEnd'],
924
+ _ActivityEnd_to_mldev(getv(from_object, ['activity_end']), to_object),
925
+ )
1135
926
 
1136
927
  return to_object
1137
928
 
1138
929
 
1139
- def _SlidingWindow_to_vertex(
930
+ def _FunctionResponse_to_mldev(
1140
931
  from_object: Union[dict[str, Any], object],
1141
932
  parent_object: Optional[dict[str, Any]] = None,
1142
933
  ) -> dict[str, Any]:
1143
934
  to_object: dict[str, Any] = {}
1144
- if getv(from_object, ['target_tokens']) is not None:
1145
- setv(to_object, ['targetTokens'], getv(from_object, ['target_tokens']))
935
+ if getv(from_object, ['will_continue']) is not None:
936
+ setv(to_object, ['willContinue'], getv(from_object, ['will_continue']))
937
+
938
+ if getv(from_object, ['scheduling']) is not None:
939
+ setv(to_object, ['scheduling'], getv(from_object, ['scheduling']))
940
+
941
+ if getv(from_object, ['id']) is not None:
942
+ setv(to_object, ['id'], getv(from_object, ['id']))
943
+
944
+ if getv(from_object, ['name']) is not None:
945
+ setv(to_object, ['name'], getv(from_object, ['name']))
946
+
947
+ if getv(from_object, ['response']) is not None:
948
+ setv(to_object, ['response'], getv(from_object, ['response']))
1146
949
 
1147
950
  return to_object
1148
951
 
1149
952
 
1150
- def _ContextWindowCompressionConfig_to_mldev(
953
+ def _LiveClientToolResponse_to_mldev(
1151
954
  from_object: Union[dict[str, Any], object],
1152
955
  parent_object: Optional[dict[str, Any]] = None,
1153
956
  ) -> dict[str, Any]:
1154
957
  to_object: dict[str, Any] = {}
1155
- if getv(from_object, ['trigger_tokens']) is not None:
1156
- setv(to_object, ['triggerTokens'], getv(from_object, ['trigger_tokens']))
1157
-
1158
- if getv(from_object, ['sliding_window']) is not None:
958
+ if getv(from_object, ['function_responses']) is not None:
1159
959
  setv(
1160
960
  to_object,
1161
- ['slidingWindow'],
1162
- _SlidingWindow_to_mldev(
1163
- getv(from_object, ['sliding_window']), to_object
1164
- ),
961
+ ['functionResponses'],
962
+ [
963
+ _FunctionResponse_to_mldev(item, to_object)
964
+ for item in getv(from_object, ['function_responses'])
965
+ ],
1165
966
  )
1166
967
 
1167
968
  return to_object
1168
969
 
1169
970
 
1170
- def _ContextWindowCompressionConfig_to_vertex(
971
+ def _LiveClientMessage_to_mldev(
972
+ api_client: BaseApiClient,
1171
973
  from_object: Union[dict[str, Any], object],
1172
974
  parent_object: Optional[dict[str, Any]] = None,
1173
975
  ) -> dict[str, Any]:
1174
976
  to_object: dict[str, Any] = {}
1175
- if getv(from_object, ['trigger_tokens']) is not None:
1176
- setv(to_object, ['triggerTokens'], getv(from_object, ['trigger_tokens']))
977
+ if getv(from_object, ['setup']) is not None:
978
+ setv(
979
+ to_object,
980
+ ['setup'],
981
+ _LiveClientSetup_to_mldev(
982
+ api_client, getv(from_object, ['setup']), to_object
983
+ ),
984
+ )
1177
985
 
1178
- if getv(from_object, ['sliding_window']) is not None:
986
+ if getv(from_object, ['client_content']) is not None:
1179
987
  setv(
1180
988
  to_object,
1181
- ['slidingWindow'],
1182
- _SlidingWindow_to_vertex(
1183
- getv(from_object, ['sliding_window']), to_object
989
+ ['clientContent'],
990
+ _LiveClientContent_to_mldev(
991
+ getv(from_object, ['client_content']), to_object
992
+ ),
993
+ )
994
+
995
+ if getv(from_object, ['realtime_input']) is not None:
996
+ setv(
997
+ to_object,
998
+ ['realtimeInput'],
999
+ _LiveClientRealtimeInput_to_mldev(
1000
+ getv(from_object, ['realtime_input']), to_object
1001
+ ),
1002
+ )
1003
+
1004
+ if getv(from_object, ['tool_response']) is not None:
1005
+ setv(
1006
+ to_object,
1007
+ ['toolResponse'],
1008
+ _LiveClientToolResponse_to_mldev(
1009
+ getv(from_object, ['tool_response']), to_object
1184
1010
  ),
1185
1011
  )
1186
1012
 
1187
1013
  return to_object
1188
1014
 
1189
1015
 
1190
- def _ProactivityConfig_to_mldev(
1016
+ def _LiveMusicConnectParameters_to_mldev(
1191
1017
  from_object: Union[dict[str, Any], object],
1192
1018
  parent_object: Optional[dict[str, Any]] = None,
1193
1019
  ) -> dict[str, Any]:
1194
1020
  to_object: dict[str, Any] = {}
1195
- if getv(from_object, ['proactive_audio']) is not None:
1196
- setv(to_object, ['proactiveAudio'], getv(from_object, ['proactive_audio']))
1021
+ if getv(from_object, ['model']) is not None:
1022
+ setv(to_object, ['setup', 'model'], getv(from_object, ['model']))
1197
1023
 
1198
1024
  return to_object
1199
1025
 
1200
1026
 
1201
- def _ProactivityConfig_to_vertex(
1027
+ def _WeightedPrompt_to_mldev(
1202
1028
  from_object: Union[dict[str, Any], object],
1203
1029
  parent_object: Optional[dict[str, Any]] = None,
1204
1030
  ) -> dict[str, Any]:
1205
1031
  to_object: dict[str, Any] = {}
1206
- if getv(from_object, ['proactive_audio']) is not None:
1207
- setv(to_object, ['proactiveAudio'], getv(from_object, ['proactive_audio']))
1032
+ if getv(from_object, ['text']) is not None:
1033
+ setv(to_object, ['text'], getv(from_object, ['text']))
1034
+
1035
+ if getv(from_object, ['weight']) is not None:
1036
+ setv(to_object, ['weight'], getv(from_object, ['weight']))
1208
1037
 
1209
1038
  return to_object
1210
1039
 
1211
1040
 
1212
- def _LiveConnectConfig_to_mldev(
1213
- api_client: BaseApiClient,
1041
+ def _LiveMusicSetWeightedPromptsParameters_to_mldev(
1214
1042
  from_object: Union[dict[str, Any], object],
1215
1043
  parent_object: Optional[dict[str, Any]] = None,
1216
1044
  ) -> dict[str, Any]:
1217
1045
  to_object: dict[str, Any] = {}
1218
-
1219
- if getv(from_object, ['generation_config']) is not None:
1046
+ if getv(from_object, ['weighted_prompts']) is not None:
1220
1047
  setv(
1221
- parent_object,
1222
- ['setup', 'generationConfig'],
1223
- getv(from_object, ['generation_config']),
1048
+ to_object,
1049
+ ['weightedPrompts'],
1050
+ [
1051
+ _WeightedPrompt_to_mldev(item, to_object)
1052
+ for item in getv(from_object, ['weighted_prompts'])
1053
+ ],
1224
1054
  )
1225
1055
 
1226
- if getv(from_object, ['response_modalities']) is not None:
1227
- setv(
1228
- parent_object,
1229
- ['setup', 'generationConfig', 'responseModalities'],
1230
- getv(from_object, ['response_modalities']),
1231
- )
1056
+ return to_object
1232
1057
 
1233
- if getv(from_object, ['temperature']) is not None:
1234
- setv(
1235
- parent_object,
1236
- ['setup', 'generationConfig', 'temperature'],
1237
- getv(from_object, ['temperature']),
1238
- )
1239
1058
 
1240
- if getv(from_object, ['top_p']) is not None:
1241
- setv(
1242
- parent_object,
1243
- ['setup', 'generationConfig', 'topP'],
1244
- getv(from_object, ['top_p']),
1245
- )
1059
+ def _LiveMusicGenerationConfig_to_mldev(
1060
+ from_object: Union[dict[str, Any], object],
1061
+ parent_object: Optional[dict[str, Any]] = None,
1062
+ ) -> dict[str, Any]:
1063
+ to_object: dict[str, Any] = {}
1064
+ if getv(from_object, ['temperature']) is not None:
1065
+ setv(to_object, ['temperature'], getv(from_object, ['temperature']))
1246
1066
 
1247
1067
  if getv(from_object, ['top_k']) is not None:
1248
- setv(
1249
- parent_object,
1250
- ['setup', 'generationConfig', 'topK'],
1251
- getv(from_object, ['top_k']),
1252
- )
1068
+ setv(to_object, ['topK'], getv(from_object, ['top_k']))
1253
1069
 
1254
- if getv(from_object, ['max_output_tokens']) is not None:
1255
- setv(
1256
- parent_object,
1257
- ['setup', 'generationConfig', 'maxOutputTokens'],
1258
- getv(from_object, ['max_output_tokens']),
1259
- )
1070
+ if getv(from_object, ['seed']) is not None:
1071
+ setv(to_object, ['seed'], getv(from_object, ['seed']))
1260
1072
 
1261
- if getv(from_object, ['media_resolution']) is not None:
1262
- setv(
1263
- parent_object,
1264
- ['setup', 'generationConfig', 'mediaResolution'],
1265
- getv(from_object, ['media_resolution']),
1266
- )
1073
+ if getv(from_object, ['guidance']) is not None:
1074
+ setv(to_object, ['guidance'], getv(from_object, ['guidance']))
1267
1075
 
1268
- if getv(from_object, ['seed']) is not None:
1269
- setv(
1270
- parent_object,
1271
- ['setup', 'generationConfig', 'seed'],
1272
- getv(from_object, ['seed']),
1273
- )
1076
+ if getv(from_object, ['bpm']) is not None:
1077
+ setv(to_object, ['bpm'], getv(from_object, ['bpm']))
1274
1078
 
1275
- if getv(from_object, ['speech_config']) is not None:
1276
- setv(
1277
- parent_object,
1278
- ['setup', 'generationConfig', 'speechConfig'],
1279
- _SpeechConfig_to_mldev(
1280
- t.t_live_speech_config(getv(from_object, ['speech_config'])),
1281
- to_object,
1282
- ),
1283
- )
1079
+ if getv(from_object, ['density']) is not None:
1080
+ setv(to_object, ['density'], getv(from_object, ['density']))
1284
1081
 
1285
- if getv(from_object, ['enable_affective_dialog']) is not None:
1082
+ if getv(from_object, ['brightness']) is not None:
1083
+ setv(to_object, ['brightness'], getv(from_object, ['brightness']))
1084
+
1085
+ if getv(from_object, ['scale']) is not None:
1086
+ setv(to_object, ['scale'], getv(from_object, ['scale']))
1087
+
1088
+ if getv(from_object, ['mute_bass']) is not None:
1089
+ setv(to_object, ['muteBass'], getv(from_object, ['mute_bass']))
1090
+
1091
+ if getv(from_object, ['mute_drums']) is not None:
1092
+ setv(to_object, ['muteDrums'], getv(from_object, ['mute_drums']))
1093
+
1094
+ if getv(from_object, ['only_bass_and_drums']) is not None:
1286
1095
  setv(
1287
- parent_object,
1288
- ['setup', 'generationConfig', 'enableAffectiveDialog'],
1289
- getv(from_object, ['enable_affective_dialog']),
1096
+ to_object,
1097
+ ['onlyBassAndDrums'],
1098
+ getv(from_object, ['only_bass_and_drums']),
1290
1099
  )
1291
1100
 
1292
- if getv(from_object, ['system_instruction']) is not None:
1101
+ return to_object
1102
+
1103
+
1104
+ def _LiveMusicSetConfigParameters_to_mldev(
1105
+ from_object: Union[dict[str, Any], object],
1106
+ parent_object: Optional[dict[str, Any]] = None,
1107
+ ) -> dict[str, Any]:
1108
+ to_object: dict[str, Any] = {}
1109
+ if getv(from_object, ['music_generation_config']) is not None:
1293
1110
  setv(
1294
- parent_object,
1295
- ['setup', 'systemInstruction'],
1296
- _Content_to_mldev(
1297
- t.t_content(getv(from_object, ['system_instruction'])), to_object
1111
+ to_object,
1112
+ ['musicGenerationConfig'],
1113
+ _LiveMusicGenerationConfig_to_mldev(
1114
+ getv(from_object, ['music_generation_config']), to_object
1298
1115
  ),
1299
1116
  )
1300
1117
 
1301
- if getv(from_object, ['tools']) is not None:
1118
+ return to_object
1119
+
1120
+
1121
+ def _LiveMusicClientSetup_to_mldev(
1122
+ from_object: Union[dict[str, Any], object],
1123
+ parent_object: Optional[dict[str, Any]] = None,
1124
+ ) -> dict[str, Any]:
1125
+ to_object: dict[str, Any] = {}
1126
+ if getv(from_object, ['model']) is not None:
1127
+ setv(to_object, ['model'], getv(from_object, ['model']))
1128
+
1129
+ return to_object
1130
+
1131
+
1132
+ def _LiveMusicClientContent_to_mldev(
1133
+ from_object: Union[dict[str, Any], object],
1134
+ parent_object: Optional[dict[str, Any]] = None,
1135
+ ) -> dict[str, Any]:
1136
+ to_object: dict[str, Any] = {}
1137
+ if getv(from_object, ['weighted_prompts']) is not None:
1302
1138
  setv(
1303
- parent_object,
1304
- ['setup', 'tools'],
1139
+ to_object,
1140
+ ['weightedPrompts'],
1305
1141
  [
1306
- _Tool_to_mldev(t.t_tool(api_client, item), to_object)
1307
- for item in t.t_tools(api_client, getv(from_object, ['tools']))
1142
+ _WeightedPrompt_to_mldev(item, to_object)
1143
+ for item in getv(from_object, ['weighted_prompts'])
1308
1144
  ],
1309
1145
  )
1310
1146
 
1311
- if getv(from_object, ['session_resumption']) is not None:
1312
- setv(
1313
- parent_object,
1314
- ['setup', 'sessionResumption'],
1315
- _SessionResumptionConfig_to_mldev(
1316
- getv(from_object, ['session_resumption']), to_object
1317
- ),
1318
- )
1147
+ return to_object
1319
1148
 
1320
- if getv(from_object, ['input_audio_transcription']) is not None:
1321
- setv(
1322
- parent_object,
1323
- ['setup', 'inputAudioTranscription'],
1324
- _AudioTranscriptionConfig_to_mldev(
1325
- getv(from_object, ['input_audio_transcription']), to_object
1326
- ),
1327
- )
1328
1149
 
1329
- if getv(from_object, ['output_audio_transcription']) is not None:
1150
+ def _LiveMusicClientMessage_to_mldev(
1151
+ from_object: Union[dict[str, Any], object],
1152
+ parent_object: Optional[dict[str, Any]] = None,
1153
+ ) -> dict[str, Any]:
1154
+ to_object: dict[str, Any] = {}
1155
+ if getv(from_object, ['setup']) is not None:
1330
1156
  setv(
1331
- parent_object,
1332
- ['setup', 'outputAudioTranscription'],
1333
- _AudioTranscriptionConfig_to_mldev(
1334
- getv(from_object, ['output_audio_transcription']), to_object
1335
- ),
1157
+ to_object,
1158
+ ['setup'],
1159
+ _LiveMusicClientSetup_to_mldev(getv(from_object, ['setup']), to_object),
1336
1160
  )
1337
1161
 
1338
- if getv(from_object, ['realtime_input_config']) is not None:
1162
+ if getv(from_object, ['client_content']) is not None:
1339
1163
  setv(
1340
- parent_object,
1341
- ['setup', 'realtimeInputConfig'],
1342
- _RealtimeInputConfig_to_mldev(
1343
- getv(from_object, ['realtime_input_config']), to_object
1164
+ to_object,
1165
+ ['clientContent'],
1166
+ _LiveMusicClientContent_to_mldev(
1167
+ getv(from_object, ['client_content']), to_object
1344
1168
  ),
1345
1169
  )
1346
1170
 
1347
- if getv(from_object, ['context_window_compression']) is not None:
1171
+ if getv(from_object, ['music_generation_config']) is not None:
1348
1172
  setv(
1349
- parent_object,
1350
- ['setup', 'contextWindowCompression'],
1351
- _ContextWindowCompressionConfig_to_mldev(
1352
- getv(from_object, ['context_window_compression']), to_object
1173
+ to_object,
1174
+ ['musicGenerationConfig'],
1175
+ _LiveMusicGenerationConfig_to_mldev(
1176
+ getv(from_object, ['music_generation_config']), to_object
1353
1177
  ),
1354
1178
  )
1355
1179
 
1356
- if getv(from_object, ['proactivity']) is not None:
1180
+ if getv(from_object, ['playback_control']) is not None:
1357
1181
  setv(
1358
- parent_object,
1359
- ['setup', 'proactivity'],
1360
- _ProactivityConfig_to_mldev(
1361
- getv(from_object, ['proactivity']), to_object
1362
- ),
1182
+ to_object, ['playbackControl'], getv(from_object, ['playback_control'])
1363
1183
  )
1364
1184
 
1365
1185
  return to_object
1366
1186
 
1367
1187
 
1368
- def _LiveConnectConfig_to_vertex(
1369
- api_client: BaseApiClient,
1188
+ def _PrebuiltVoiceConfig_to_vertex(
1370
1189
  from_object: Union[dict[str, Any], object],
1371
1190
  parent_object: Optional[dict[str, Any]] = None,
1372
1191
  ) -> dict[str, Any]:
1373
1192
  to_object: dict[str, Any] = {}
1193
+ if getv(from_object, ['voice_name']) is not None:
1194
+ setv(to_object, ['voiceName'], getv(from_object, ['voice_name']))
1374
1195
 
1375
- if getv(from_object, ['generation_config']) is not None:
1376
- setv(
1377
- parent_object,
1378
- ['setup', 'generationConfig'],
1379
- getv(from_object, ['generation_config']),
1380
- )
1196
+ return to_object
1381
1197
 
1382
- if getv(from_object, ['response_modalities']) is not None:
1383
- setv(
1384
- parent_object,
1385
- ['setup', 'generationConfig', 'responseModalities'],
1386
- getv(from_object, ['response_modalities']),
1387
- )
1388
1198
 
1389
- if getv(from_object, ['temperature']) is not None:
1199
+ def _VoiceConfig_to_vertex(
1200
+ from_object: Union[dict[str, Any], object],
1201
+ parent_object: Optional[dict[str, Any]] = None,
1202
+ ) -> dict[str, Any]:
1203
+ to_object: dict[str, Any] = {}
1204
+ if getv(from_object, ['prebuilt_voice_config']) is not None:
1390
1205
  setv(
1391
- parent_object,
1392
- ['setup', 'generationConfig', 'temperature'],
1393
- getv(from_object, ['temperature']),
1206
+ to_object,
1207
+ ['prebuiltVoiceConfig'],
1208
+ _PrebuiltVoiceConfig_to_vertex(
1209
+ getv(from_object, ['prebuilt_voice_config']), to_object
1210
+ ),
1394
1211
  )
1395
1212
 
1396
- if getv(from_object, ['top_p']) is not None:
1397
- setv(
1398
- parent_object,
1399
- ['setup', 'generationConfig', 'topP'],
1400
- getv(from_object, ['top_p']),
1401
- )
1213
+ return to_object
1402
1214
 
1403
- if getv(from_object, ['top_k']) is not None:
1404
- setv(
1405
- parent_object,
1406
- ['setup', 'generationConfig', 'topK'],
1407
- getv(from_object, ['top_k']),
1408
- )
1409
1215
 
1410
- if getv(from_object, ['max_output_tokens']) is not None:
1216
+ def _SpeechConfig_to_vertex(
1217
+ from_object: Union[dict[str, Any], object],
1218
+ parent_object: Optional[dict[str, Any]] = None,
1219
+ ) -> dict[str, Any]:
1220
+ to_object: dict[str, Any] = {}
1221
+ if getv(from_object, ['voice_config']) is not None:
1411
1222
  setv(
1412
- parent_object,
1413
- ['setup', 'generationConfig', 'maxOutputTokens'],
1414
- getv(from_object, ['max_output_tokens']),
1223
+ to_object,
1224
+ ['voiceConfig'],
1225
+ _VoiceConfig_to_vertex(getv(from_object, ['voice_config']), to_object),
1415
1226
  )
1416
1227
 
1417
- if getv(from_object, ['media_resolution']) is not None:
1418
- setv(
1419
- parent_object,
1420
- ['setup', 'generationConfig', 'mediaResolution'],
1421
- getv(from_object, ['media_resolution']),
1228
+ if getv(from_object, ['multi_speaker_voice_config']) is not None:
1229
+ raise ValueError(
1230
+ 'multi_speaker_voice_config parameter is not supported in Vertex AI.'
1422
1231
  )
1423
1232
 
1424
- if getv(from_object, ['seed']) is not None:
1425
- setv(
1426
- parent_object,
1427
- ['setup', 'generationConfig', 'seed'],
1428
- getv(from_object, ['seed']),
1429
- )
1233
+ if getv(from_object, ['language_code']) is not None:
1234
+ setv(to_object, ['languageCode'], getv(from_object, ['language_code']))
1430
1235
 
1431
- if getv(from_object, ['speech_config']) is not None:
1432
- setv(
1433
- parent_object,
1434
- ['setup', 'generationConfig', 'speechConfig'],
1435
- _SpeechConfig_to_vertex(
1436
- t.t_live_speech_config(getv(from_object, ['speech_config'])),
1437
- to_object,
1438
- ),
1439
- )
1236
+ return to_object
1440
1237
 
1441
- if getv(from_object, ['enable_affective_dialog']) is not None:
1442
- setv(
1443
- parent_object,
1444
- ['setup', 'generationConfig', 'enableAffectiveDialog'],
1445
- getv(from_object, ['enable_affective_dialog']),
1446
- )
1447
1238
 
1448
- if getv(from_object, ['system_instruction']) is not None:
1449
- setv(
1450
- parent_object,
1451
- ['setup', 'systemInstruction'],
1452
- _Content_to_vertex(
1453
- t.t_content(getv(from_object, ['system_instruction'])), to_object
1454
- ),
1455
- )
1239
+ def _VideoMetadata_to_vertex(
1240
+ from_object: Union[dict[str, Any], object],
1241
+ parent_object: Optional[dict[str, Any]] = None,
1242
+ ) -> dict[str, Any]:
1243
+ to_object: dict[str, Any] = {}
1244
+ if getv(from_object, ['fps']) is not None:
1245
+ setv(to_object, ['fps'], getv(from_object, ['fps']))
1456
1246
 
1457
- if getv(from_object, ['tools']) is not None:
1458
- setv(
1459
- parent_object,
1460
- ['setup', 'tools'],
1461
- [
1462
- _Tool_to_vertex(t.t_tool(api_client, item), to_object)
1463
- for item in t.t_tools(api_client, getv(from_object, ['tools']))
1464
- ],
1465
- )
1247
+ if getv(from_object, ['end_offset']) is not None:
1248
+ setv(to_object, ['endOffset'], getv(from_object, ['end_offset']))
1466
1249
 
1467
- if getv(from_object, ['session_resumption']) is not None:
1250
+ if getv(from_object, ['start_offset']) is not None:
1251
+ setv(to_object, ['startOffset'], getv(from_object, ['start_offset']))
1252
+
1253
+ return to_object
1254
+
1255
+
1256
+ def _Blob_to_vertex(
1257
+ from_object: Union[dict[str, Any], object],
1258
+ parent_object: Optional[dict[str, Any]] = None,
1259
+ ) -> dict[str, Any]:
1260
+ to_object: dict[str, Any] = {}
1261
+ if getv(from_object, ['display_name']) is not None:
1262
+ setv(to_object, ['displayName'], getv(from_object, ['display_name']))
1263
+
1264
+ if getv(from_object, ['data']) is not None:
1265
+ setv(to_object, ['data'], getv(from_object, ['data']))
1266
+
1267
+ if getv(from_object, ['mime_type']) is not None:
1268
+ setv(to_object, ['mimeType'], getv(from_object, ['mime_type']))
1269
+
1270
+ return to_object
1271
+
1272
+
1273
+ def _FileData_to_vertex(
1274
+ from_object: Union[dict[str, Any], object],
1275
+ parent_object: Optional[dict[str, Any]] = None,
1276
+ ) -> dict[str, Any]:
1277
+ to_object: dict[str, Any] = {}
1278
+ if getv(from_object, ['display_name']) is not None:
1279
+ setv(to_object, ['displayName'], getv(from_object, ['display_name']))
1280
+
1281
+ if getv(from_object, ['file_uri']) is not None:
1282
+ setv(to_object, ['fileUri'], getv(from_object, ['file_uri']))
1283
+
1284
+ if getv(from_object, ['mime_type']) is not None:
1285
+ setv(to_object, ['mimeType'], getv(from_object, ['mime_type']))
1286
+
1287
+ return to_object
1288
+
1289
+
1290
+ def _Part_to_vertex(
1291
+ from_object: Union[dict[str, Any], object],
1292
+ parent_object: Optional[dict[str, Any]] = None,
1293
+ ) -> dict[str, Any]:
1294
+ to_object: dict[str, Any] = {}
1295
+ if getv(from_object, ['video_metadata']) is not None:
1468
1296
  setv(
1469
- parent_object,
1470
- ['setup', 'sessionResumption'],
1471
- _SessionResumptionConfig_to_vertex(
1472
- getv(from_object, ['session_resumption']), to_object
1297
+ to_object,
1298
+ ['videoMetadata'],
1299
+ _VideoMetadata_to_vertex(
1300
+ getv(from_object, ['video_metadata']), to_object
1473
1301
  ),
1474
1302
  )
1475
1303
 
1476
- if getv(from_object, ['input_audio_transcription']) is not None:
1304
+ if getv(from_object, ['thought']) is not None:
1305
+ setv(to_object, ['thought'], getv(from_object, ['thought']))
1306
+
1307
+ if getv(from_object, ['inline_data']) is not None:
1477
1308
  setv(
1478
- parent_object,
1479
- ['setup', 'inputAudioTranscription'],
1480
- _AudioTranscriptionConfig_to_vertex(
1481
- getv(from_object, ['input_audio_transcription']), to_object
1482
- ),
1309
+ to_object,
1310
+ ['inlineData'],
1311
+ _Blob_to_vertex(getv(from_object, ['inline_data']), to_object),
1483
1312
  )
1484
1313
 
1485
- if getv(from_object, ['output_audio_transcription']) is not None:
1314
+ if getv(from_object, ['file_data']) is not None:
1486
1315
  setv(
1487
- parent_object,
1488
- ['setup', 'outputAudioTranscription'],
1489
- _AudioTranscriptionConfig_to_vertex(
1490
- getv(from_object, ['output_audio_transcription']), to_object
1491
- ),
1316
+ to_object,
1317
+ ['fileData'],
1318
+ _FileData_to_vertex(getv(from_object, ['file_data']), to_object),
1492
1319
  )
1493
1320
 
1494
- if getv(from_object, ['realtime_input_config']) is not None:
1321
+ if getv(from_object, ['thought_signature']) is not None:
1495
1322
  setv(
1496
- parent_object,
1497
- ['setup', 'realtimeInputConfig'],
1498
- _RealtimeInputConfig_to_vertex(
1499
- getv(from_object, ['realtime_input_config']), to_object
1500
- ),
1323
+ to_object,
1324
+ ['thoughtSignature'],
1325
+ getv(from_object, ['thought_signature']),
1501
1326
  )
1502
1327
 
1503
- if getv(from_object, ['context_window_compression']) is not None:
1328
+ if getv(from_object, ['code_execution_result']) is not None:
1504
1329
  setv(
1505
- parent_object,
1506
- ['setup', 'contextWindowCompression'],
1507
- _ContextWindowCompressionConfig_to_vertex(
1508
- getv(from_object, ['context_window_compression']), to_object
1509
- ),
1330
+ to_object,
1331
+ ['codeExecutionResult'],
1332
+ getv(from_object, ['code_execution_result']),
1510
1333
  )
1511
1334
 
1512
- if getv(from_object, ['proactivity']) is not None:
1335
+ if getv(from_object, ['executable_code']) is not None:
1336
+ setv(to_object, ['executableCode'], getv(from_object, ['executable_code']))
1337
+
1338
+ if getv(from_object, ['function_call']) is not None:
1339
+ setv(to_object, ['functionCall'], getv(from_object, ['function_call']))
1340
+
1341
+ if getv(from_object, ['function_response']) is not None:
1513
1342
  setv(
1514
- parent_object,
1515
- ['setup', 'proactivity'],
1516
- _ProactivityConfig_to_vertex(
1517
- getv(from_object, ['proactivity']), to_object
1518
- ),
1343
+ to_object,
1344
+ ['functionResponse'],
1345
+ getv(from_object, ['function_response']),
1519
1346
  )
1520
1347
 
1348
+ if getv(from_object, ['text']) is not None:
1349
+ setv(to_object, ['text'], getv(from_object, ['text']))
1350
+
1521
1351
  return to_object
1522
1352
 
1523
1353
 
1524
- def _LiveConnectParameters_to_mldev(
1525
- api_client: BaseApiClient,
1354
+ def _Content_to_vertex(
1526
1355
  from_object: Union[dict[str, Any], object],
1527
1356
  parent_object: Optional[dict[str, Any]] = None,
1528
1357
  ) -> dict[str, Any]:
1529
1358
  to_object: dict[str, Any] = {}
1530
- if getv(from_object, ['model']) is not None:
1359
+ if getv(from_object, ['parts']) is not None:
1531
1360
  setv(
1532
1361
  to_object,
1533
- ['setup', 'model'],
1534
- t.t_model(api_client, getv(from_object, ['model'])),
1362
+ ['parts'],
1363
+ [
1364
+ _Part_to_vertex(item, to_object)
1365
+ for item in getv(from_object, ['parts'])
1366
+ ],
1535
1367
  )
1536
1368
 
1537
- if getv(from_object, ['config']) is not None:
1538
- setv(
1539
- to_object,
1540
- ['config'],
1541
- _LiveConnectConfig_to_mldev(
1542
- api_client, getv(from_object, ['config']), to_object
1543
- ),
1544
- )
1369
+ if getv(from_object, ['role']) is not None:
1370
+ setv(to_object, ['role'], getv(from_object, ['role']))
1545
1371
 
1546
1372
  return to_object
1547
1373
 
1548
1374
 
1549
- def _LiveConnectParameters_to_vertex(
1550
- api_client: BaseApiClient,
1375
+ def _FunctionDeclaration_to_vertex(
1551
1376
  from_object: Union[dict[str, Any], object],
1552
1377
  parent_object: Optional[dict[str, Any]] = None,
1553
1378
  ) -> dict[str, Any]:
1554
1379
  to_object: dict[str, Any] = {}
1555
- if getv(from_object, ['model']) is not None:
1380
+ if getv(from_object, ['behavior']) is not None:
1381
+ raise ValueError('behavior parameter is not supported in Vertex AI.')
1382
+
1383
+ if getv(from_object, ['description']) is not None:
1384
+ setv(to_object, ['description'], getv(from_object, ['description']))
1385
+
1386
+ if getv(from_object, ['name']) is not None:
1387
+ setv(to_object, ['name'], getv(from_object, ['name']))
1388
+
1389
+ if getv(from_object, ['parameters']) is not None:
1390
+ setv(to_object, ['parameters'], getv(from_object, ['parameters']))
1391
+
1392
+ if getv(from_object, ['parameters_json_schema']) is not None:
1556
1393
  setv(
1557
1394
  to_object,
1558
- ['setup', 'model'],
1559
- t.t_model(api_client, getv(from_object, ['model'])),
1395
+ ['parametersJsonSchema'],
1396
+ getv(from_object, ['parameters_json_schema']),
1560
1397
  )
1561
1398
 
1562
- if getv(from_object, ['config']) is not None:
1399
+ if getv(from_object, ['response']) is not None:
1400
+ setv(to_object, ['response'], getv(from_object, ['response']))
1401
+
1402
+ if getv(from_object, ['response_json_schema']) is not None:
1563
1403
  setv(
1564
1404
  to_object,
1565
- ['config'],
1566
- _LiveConnectConfig_to_vertex(
1567
- api_client, getv(from_object, ['config']), to_object
1568
- ),
1405
+ ['responseJsonSchema'],
1406
+ getv(from_object, ['response_json_schema']),
1569
1407
  )
1570
1408
 
1571
1409
  return to_object
1572
1410
 
1573
1411
 
1574
- def _ActivityStart_to_mldev(
1412
+ def _Interval_to_vertex(
1575
1413
  from_object: Union[dict[str, Any], object],
1576
1414
  parent_object: Optional[dict[str, Any]] = None,
1577
1415
  ) -> dict[str, Any]:
1578
1416
  to_object: dict[str, Any] = {}
1417
+ if getv(from_object, ['start_time']) is not None:
1418
+ setv(to_object, ['startTime'], getv(from_object, ['start_time']))
1579
1419
 
1580
- return to_object
1581
-
1582
-
1583
- def _ActivityStart_to_vertex(
1584
- from_object: Union[dict[str, Any], object],
1585
- parent_object: Optional[dict[str, Any]] = None,
1586
- ) -> dict[str, Any]:
1587
- to_object: dict[str, Any] = {}
1420
+ if getv(from_object, ['end_time']) is not None:
1421
+ setv(to_object, ['endTime'], getv(from_object, ['end_time']))
1588
1422
 
1589
1423
  return to_object
1590
1424
 
1591
1425
 
1592
- def _ActivityEnd_to_mldev(
1426
+ def _GoogleSearch_to_vertex(
1593
1427
  from_object: Union[dict[str, Any], object],
1594
1428
  parent_object: Optional[dict[str, Any]] = None,
1595
1429
  ) -> dict[str, Any]:
1596
1430
  to_object: dict[str, Any] = {}
1431
+ if getv(from_object, ['time_range_filter']) is not None:
1432
+ setv(
1433
+ to_object,
1434
+ ['timeRangeFilter'],
1435
+ _Interval_to_vertex(
1436
+ getv(from_object, ['time_range_filter']), to_object
1437
+ ),
1438
+ )
1597
1439
 
1598
1440
  return to_object
1599
1441
 
1600
1442
 
1601
- def _ActivityEnd_to_vertex(
1443
+ def _DynamicRetrievalConfig_to_vertex(
1602
1444
  from_object: Union[dict[str, Any], object],
1603
1445
  parent_object: Optional[dict[str, Any]] = None,
1604
1446
  ) -> dict[str, Any]:
1605
1447
  to_object: dict[str, Any] = {}
1448
+ if getv(from_object, ['mode']) is not None:
1449
+ setv(to_object, ['mode'], getv(from_object, ['mode']))
1450
+
1451
+ if getv(from_object, ['dynamic_threshold']) is not None:
1452
+ setv(
1453
+ to_object,
1454
+ ['dynamicThreshold'],
1455
+ getv(from_object, ['dynamic_threshold']),
1456
+ )
1606
1457
 
1607
1458
  return to_object
1608
1459
 
1609
1460
 
1610
- def _LiveSendRealtimeInputParameters_to_mldev(
1461
+ def _GoogleSearchRetrieval_to_vertex(
1611
1462
  from_object: Union[dict[str, Any], object],
1612
1463
  parent_object: Optional[dict[str, Any]] = None,
1613
1464
  ) -> dict[str, Any]:
1614
1465
  to_object: dict[str, Any] = {}
1615
- if getv(from_object, ['media']) is not None:
1616
- setv(to_object, ['mediaChunks'], t.t_blobs(getv(from_object, ['media'])))
1617
-
1618
- if getv(from_object, ['audio']) is not None:
1619
- setv(to_object, ['audio'], t.t_audio_blob(getv(from_object, ['audio'])))
1620
-
1621
- if getv(from_object, ['audio_stream_end']) is not None:
1622
- setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
1623
-
1624
- if getv(from_object, ['video']) is not None:
1625
- setv(to_object, ['video'], t.t_image_blob(getv(from_object, ['video'])))
1626
-
1627
- if getv(from_object, ['text']) is not None:
1628
- setv(to_object, ['text'], getv(from_object, ['text']))
1629
-
1630
- if getv(from_object, ['activity_start']) is not None:
1466
+ if getv(from_object, ['dynamic_retrieval_config']) is not None:
1631
1467
  setv(
1632
1468
  to_object,
1633
- ['activityStart'],
1634
- _ActivityStart_to_mldev(
1635
- getv(from_object, ['activity_start']), to_object
1469
+ ['dynamicRetrievalConfig'],
1470
+ _DynamicRetrievalConfig_to_vertex(
1471
+ getv(from_object, ['dynamic_retrieval_config']), to_object
1636
1472
  ),
1637
1473
  )
1638
1474
 
1639
- if getv(from_object, ['activity_end']) is not None:
1640
- setv(
1641
- to_object,
1642
- ['activityEnd'],
1643
- _ActivityEnd_to_mldev(getv(from_object, ['activity_end']), to_object),
1644
- )
1645
-
1646
1475
  return to_object
1647
1476
 
1648
1477
 
1649
- def _LiveSendRealtimeInputParameters_to_vertex(
1478
+ def _EnterpriseWebSearch_to_vertex(
1650
1479
  from_object: Union[dict[str, Any], object],
1651
1480
  parent_object: Optional[dict[str, Any]] = None,
1652
1481
  ) -> dict[str, Any]:
1653
1482
  to_object: dict[str, Any] = {}
1654
- if getv(from_object, ['media']) is not None:
1655
- setv(to_object, ['mediaChunks'], t.t_blobs(getv(from_object, ['media'])))
1656
-
1657
- if getv(from_object, ['audio']) is not None:
1658
- setv(to_object, ['audio'], t.t_audio_blob(getv(from_object, ['audio'])))
1659
-
1660
- if getv(from_object, ['audio_stream_end']) is not None:
1661
- setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
1662
-
1663
- if getv(from_object, ['video']) is not None:
1664
- setv(to_object, ['video'], t.t_image_blob(getv(from_object, ['video'])))
1665
1483
 
1666
- if getv(from_object, ['text']) is not None:
1667
- setv(to_object, ['text'], getv(from_object, ['text']))
1484
+ return to_object
1668
1485
 
1669
- if getv(from_object, ['activity_start']) is not None:
1670
- setv(
1671
- to_object,
1672
- ['activityStart'],
1673
- _ActivityStart_to_vertex(
1674
- getv(from_object, ['activity_start']), to_object
1675
- ),
1676
- )
1677
1486
 
1678
- if getv(from_object, ['activity_end']) is not None:
1679
- setv(
1680
- to_object,
1681
- ['activityEnd'],
1682
- _ActivityEnd_to_vertex(getv(from_object, ['activity_end']), to_object),
1683
- )
1487
+ def _ApiKeyConfig_to_vertex(
1488
+ from_object: Union[dict[str, Any], object],
1489
+ parent_object: Optional[dict[str, Any]] = None,
1490
+ ) -> dict[str, Any]:
1491
+ to_object: dict[str, Any] = {}
1492
+ if getv(from_object, ['api_key_string']) is not None:
1493
+ setv(to_object, ['apiKeyString'], getv(from_object, ['api_key_string']))
1684
1494
 
1685
1495
  return to_object
1686
1496
 
1687
1497
 
1688
- def _LiveClientSetup_to_mldev(
1689
- api_client: BaseApiClient,
1498
+ def _AuthConfig_to_vertex(
1690
1499
  from_object: Union[dict[str, Any], object],
1691
1500
  parent_object: Optional[dict[str, Any]] = None,
1692
1501
  ) -> dict[str, Any]:
1693
1502
  to_object: dict[str, Any] = {}
1694
- if getv(from_object, ['model']) is not None:
1695
- setv(to_object, ['model'], getv(from_object, ['model']))
1696
-
1697
- if getv(from_object, ['generation_config']) is not None:
1698
- setv(
1699
- to_object,
1700
- ['generationConfig'],
1701
- getv(from_object, ['generation_config']),
1702
- )
1703
-
1704
- if getv(from_object, ['system_instruction']) is not None:
1503
+ if getv(from_object, ['api_key_config']) is not None:
1705
1504
  setv(
1706
1505
  to_object,
1707
- ['systemInstruction'],
1708
- _Content_to_mldev(
1709
- t.t_content(getv(from_object, ['system_instruction'])), to_object
1506
+ ['apiKeyConfig'],
1507
+ _ApiKeyConfig_to_vertex(
1508
+ getv(from_object, ['api_key_config']), to_object
1710
1509
  ),
1711
1510
  )
1712
1511
 
1713
- if getv(from_object, ['tools']) is not None:
1714
- setv(
1715
- to_object,
1716
- ['tools'],
1717
- [
1718
- _Tool_to_mldev(t.t_tool(api_client, item), to_object)
1719
- for item in t.t_tools(api_client, getv(from_object, ['tools']))
1720
- ],
1721
- )
1512
+ if getv(from_object, ['auth_type']) is not None:
1513
+ setv(to_object, ['authType'], getv(from_object, ['auth_type']))
1722
1514
 
1723
- if getv(from_object, ['session_resumption']) is not None:
1515
+ if getv(from_object, ['google_service_account_config']) is not None:
1724
1516
  setv(
1725
1517
  to_object,
1726
- ['sessionResumption'],
1727
- _SessionResumptionConfig_to_mldev(
1728
- getv(from_object, ['session_resumption']), to_object
1729
- ),
1518
+ ['googleServiceAccountConfig'],
1519
+ getv(from_object, ['google_service_account_config']),
1730
1520
  )
1731
1521
 
1732
- if getv(from_object, ['context_window_compression']) is not None:
1522
+ if getv(from_object, ['http_basic_auth_config']) is not None:
1733
1523
  setv(
1734
1524
  to_object,
1735
- ['contextWindowCompression'],
1736
- _ContextWindowCompressionConfig_to_mldev(
1737
- getv(from_object, ['context_window_compression']), to_object
1738
- ),
1525
+ ['httpBasicAuthConfig'],
1526
+ getv(from_object, ['http_basic_auth_config']),
1739
1527
  )
1740
1528
 
1741
- if getv(from_object, ['input_audio_transcription']) is not None:
1742
- setv(
1743
- to_object,
1744
- ['inputAudioTranscription'],
1745
- _AudioTranscriptionConfig_to_mldev(
1746
- getv(from_object, ['input_audio_transcription']), to_object
1747
- ),
1748
- )
1529
+ if getv(from_object, ['oauth_config']) is not None:
1530
+ setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
1749
1531
 
1750
- if getv(from_object, ['output_audio_transcription']) is not None:
1751
- setv(
1752
- to_object,
1753
- ['outputAudioTranscription'],
1754
- _AudioTranscriptionConfig_to_mldev(
1755
- getv(from_object, ['output_audio_transcription']), to_object
1756
- ),
1757
- )
1532
+ if getv(from_object, ['oidc_config']) is not None:
1533
+ setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
1758
1534
 
1759
- if getv(from_object, ['proactivity']) is not None:
1535
+ return to_object
1536
+
1537
+
1538
+ def _GoogleMaps_to_vertex(
1539
+ from_object: Union[dict[str, Any], object],
1540
+ parent_object: Optional[dict[str, Any]] = None,
1541
+ ) -> dict[str, Any]:
1542
+ to_object: dict[str, Any] = {}
1543
+ if getv(from_object, ['auth_config']) is not None:
1760
1544
  setv(
1761
1545
  to_object,
1762
- ['proactivity'],
1763
- _ProactivityConfig_to_mldev(
1764
- getv(from_object, ['proactivity']), to_object
1765
- ),
1546
+ ['authConfig'],
1547
+ _AuthConfig_to_vertex(getv(from_object, ['auth_config']), to_object),
1766
1548
  )
1767
1549
 
1768
1550
  return to_object
1769
1551
 
1770
1552
 
1771
- def _LiveClientSetup_to_vertex(
1772
- api_client: BaseApiClient,
1553
+ def _UrlContext_to_vertex(
1773
1554
  from_object: Union[dict[str, Any], object],
1774
1555
  parent_object: Optional[dict[str, Any]] = None,
1775
1556
  ) -> dict[str, Any]:
1776
1557
  to_object: dict[str, Any] = {}
1777
- if getv(from_object, ['model']) is not None:
1778
- setv(to_object, ['model'], getv(from_object, ['model']))
1779
1558
 
1780
- if getv(from_object, ['generation_config']) is not None:
1781
- setv(
1782
- to_object,
1783
- ['generationConfig'],
1784
- getv(from_object, ['generation_config']),
1785
- )
1559
+ return to_object
1786
1560
 
1787
- if getv(from_object, ['system_instruction']) is not None:
1788
- setv(
1789
- to_object,
1790
- ['systemInstruction'],
1791
- _Content_to_vertex(
1792
- t.t_content(getv(from_object, ['system_instruction'])), to_object
1793
- ),
1794
- )
1795
1561
 
1796
- if getv(from_object, ['tools']) is not None:
1562
+ def _Tool_to_vertex(
1563
+ from_object: Union[dict[str, Any], object],
1564
+ parent_object: Optional[dict[str, Any]] = None,
1565
+ ) -> dict[str, Any]:
1566
+ to_object: dict[str, Any] = {}
1567
+ if getv(from_object, ['function_declarations']) is not None:
1797
1568
  setv(
1798
1569
  to_object,
1799
- ['tools'],
1570
+ ['functionDeclarations'],
1800
1571
  [
1801
- _Tool_to_vertex(t.t_tool(api_client, item), to_object)
1802
- for item in t.t_tools(api_client, getv(from_object, ['tools']))
1572
+ _FunctionDeclaration_to_vertex(item, to_object)
1573
+ for item in getv(from_object, ['function_declarations'])
1803
1574
  ],
1804
1575
  )
1805
1576
 
1806
- if getv(from_object, ['session_resumption']) is not None:
1577
+ if getv(from_object, ['retrieval']) is not None:
1578
+ setv(to_object, ['retrieval'], getv(from_object, ['retrieval']))
1579
+
1580
+ if getv(from_object, ['google_search']) is not None:
1807
1581
  setv(
1808
1582
  to_object,
1809
- ['sessionResumption'],
1810
- _SessionResumptionConfig_to_vertex(
1811
- getv(from_object, ['session_resumption']), to_object
1583
+ ['googleSearch'],
1584
+ _GoogleSearch_to_vertex(
1585
+ getv(from_object, ['google_search']), to_object
1812
1586
  ),
1813
1587
  )
1814
1588
 
1815
- if getv(from_object, ['context_window_compression']) is not None:
1589
+ if getv(from_object, ['google_search_retrieval']) is not None:
1816
1590
  setv(
1817
- to_object,
1818
- ['contextWindowCompression'],
1819
- _ContextWindowCompressionConfig_to_vertex(
1820
- getv(from_object, ['context_window_compression']), to_object
1591
+ to_object,
1592
+ ['googleSearchRetrieval'],
1593
+ _GoogleSearchRetrieval_to_vertex(
1594
+ getv(from_object, ['google_search_retrieval']), to_object
1821
1595
  ),
1822
1596
  )
1823
1597
 
1824
- if getv(from_object, ['input_audio_transcription']) is not None:
1598
+ if getv(from_object, ['enterprise_web_search']) is not None:
1825
1599
  setv(
1826
1600
  to_object,
1827
- ['inputAudioTranscription'],
1828
- _AudioTranscriptionConfig_to_vertex(
1829
- getv(from_object, ['input_audio_transcription']), to_object
1601
+ ['enterpriseWebSearch'],
1602
+ _EnterpriseWebSearch_to_vertex(
1603
+ getv(from_object, ['enterprise_web_search']), to_object
1830
1604
  ),
1831
1605
  )
1832
1606
 
1833
- if getv(from_object, ['output_audio_transcription']) is not None:
1607
+ if getv(from_object, ['google_maps']) is not None:
1834
1608
  setv(
1835
1609
  to_object,
1836
- ['outputAudioTranscription'],
1837
- _AudioTranscriptionConfig_to_vertex(
1838
- getv(from_object, ['output_audio_transcription']), to_object
1839
- ),
1610
+ ['googleMaps'],
1611
+ _GoogleMaps_to_vertex(getv(from_object, ['google_maps']), to_object),
1840
1612
  )
1841
1613
 
1842
- if getv(from_object, ['proactivity']) is not None:
1614
+ if getv(from_object, ['url_context']) is not None:
1843
1615
  setv(
1844
1616
  to_object,
1845
- ['proactivity'],
1846
- _ProactivityConfig_to_vertex(
1847
- getv(from_object, ['proactivity']), to_object
1848
- ),
1617
+ ['urlContext'],
1618
+ _UrlContext_to_vertex(getv(from_object, ['url_context']), to_object),
1849
1619
  )
1850
1620
 
1621
+ if getv(from_object, ['code_execution']) is not None:
1622
+ setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
1623
+
1624
+ if getv(from_object, ['computer_use']) is not None:
1625
+ setv(to_object, ['computerUse'], getv(from_object, ['computer_use']))
1626
+
1851
1627
  return to_object
1852
1628
 
1853
1629
 
1854
- def _LiveClientContent_to_mldev(
1630
+ def _SessionResumptionConfig_to_vertex(
1855
1631
  from_object: Union[dict[str, Any], object],
1856
1632
  parent_object: Optional[dict[str, Any]] = None,
1857
1633
  ) -> dict[str, Any]:
1858
1634
  to_object: dict[str, Any] = {}
1859
- if getv(from_object, ['turns']) is not None:
1860
- setv(
1861
- to_object,
1862
- ['turns'],
1863
- [
1864
- _Content_to_mldev(item, to_object)
1865
- for item in getv(from_object, ['turns'])
1866
- ],
1867
- )
1635
+ if getv(from_object, ['handle']) is not None:
1636
+ setv(to_object, ['handle'], getv(from_object, ['handle']))
1868
1637
 
1869
- if getv(from_object, ['turn_complete']) is not None:
1870
- setv(to_object, ['turnComplete'], getv(from_object, ['turn_complete']))
1638
+ if getv(from_object, ['transparent']) is not None:
1639
+ setv(to_object, ['transparent'], getv(from_object, ['transparent']))
1871
1640
 
1872
1641
  return to_object
1873
1642
 
1874
1643
 
1875
- def _LiveClientContent_to_vertex(
1644
+ def _AudioTranscriptionConfig_to_vertex(
1876
1645
  from_object: Union[dict[str, Any], object],
1877
1646
  parent_object: Optional[dict[str, Any]] = None,
1878
1647
  ) -> dict[str, Any]:
1879
1648
  to_object: dict[str, Any] = {}
1880
- if getv(from_object, ['turns']) is not None:
1881
- setv(
1882
- to_object,
1883
- ['turns'],
1884
- [
1885
- _Content_to_vertex(item, to_object)
1886
- for item in getv(from_object, ['turns'])
1887
- ],
1888
- )
1889
-
1890
- if getv(from_object, ['turn_complete']) is not None:
1891
- setv(to_object, ['turnComplete'], getv(from_object, ['turn_complete']))
1892
1649
 
1893
1650
  return to_object
1894
1651
 
1895
1652
 
1896
- def _LiveClientRealtimeInput_to_mldev(
1653
+ def _AutomaticActivityDetection_to_vertex(
1897
1654
  from_object: Union[dict[str, Any], object],
1898
1655
  parent_object: Optional[dict[str, Any]] = None,
1899
1656
  ) -> dict[str, Any]:
1900
1657
  to_object: dict[str, Any] = {}
1901
- if getv(from_object, ['media_chunks']) is not None:
1902
- setv(to_object, ['mediaChunks'], getv(from_object, ['media_chunks']))
1903
-
1904
- if getv(from_object, ['audio']) is not None:
1905
- setv(to_object, ['audio'], getv(from_object, ['audio']))
1906
-
1907
- if getv(from_object, ['audio_stream_end']) is not None:
1908
- setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
1909
-
1910
- if getv(from_object, ['video']) is not None:
1911
- setv(to_object, ['video'], getv(from_object, ['video']))
1658
+ if getv(from_object, ['disabled']) is not None:
1659
+ setv(to_object, ['disabled'], getv(from_object, ['disabled']))
1912
1660
 
1913
- if getv(from_object, ['text']) is not None:
1914
- setv(to_object, ['text'], getv(from_object, ['text']))
1661
+ if getv(from_object, ['start_of_speech_sensitivity']) is not None:
1662
+ setv(
1663
+ to_object,
1664
+ ['startOfSpeechSensitivity'],
1665
+ getv(from_object, ['start_of_speech_sensitivity']),
1666
+ )
1915
1667
 
1916
- if getv(from_object, ['activity_start']) is not None:
1668
+ if getv(from_object, ['end_of_speech_sensitivity']) is not None:
1917
1669
  setv(
1918
1670
  to_object,
1919
- ['activityStart'],
1920
- _ActivityStart_to_mldev(
1921
- getv(from_object, ['activity_start']), to_object
1922
- ),
1671
+ ['endOfSpeechSensitivity'],
1672
+ getv(from_object, ['end_of_speech_sensitivity']),
1923
1673
  )
1924
1674
 
1925
- if getv(from_object, ['activity_end']) is not None:
1675
+ if getv(from_object, ['prefix_padding_ms']) is not None:
1676
+ setv(
1677
+ to_object, ['prefixPaddingMs'], getv(from_object, ['prefix_padding_ms'])
1678
+ )
1679
+
1680
+ if getv(from_object, ['silence_duration_ms']) is not None:
1926
1681
  setv(
1927
1682
  to_object,
1928
- ['activityEnd'],
1929
- _ActivityEnd_to_mldev(getv(from_object, ['activity_end']), to_object),
1683
+ ['silenceDurationMs'],
1684
+ getv(from_object, ['silence_duration_ms']),
1930
1685
  )
1931
1686
 
1932
1687
  return to_object
1933
1688
 
1934
1689
 
1935
- def _LiveClientRealtimeInput_to_vertex(
1690
+ def _RealtimeInputConfig_to_vertex(
1936
1691
  from_object: Union[dict[str, Any], object],
1937
1692
  parent_object: Optional[dict[str, Any]] = None,
1938
1693
  ) -> dict[str, Any]:
1939
1694
  to_object: dict[str, Any] = {}
1940
- if getv(from_object, ['media_chunks']) is not None:
1941
- setv(to_object, ['mediaChunks'], getv(from_object, ['media_chunks']))
1942
-
1943
- if getv(from_object, ['audio']) is not None:
1944
- setv(to_object, ['audio'], getv(from_object, ['audio']))
1945
-
1946
- if getv(from_object, ['audio_stream_end']) is not None:
1947
- raise ValueError(
1948
- 'audio_stream_end parameter is not supported in Vertex AI.'
1949
- )
1950
-
1951
- if getv(from_object, ['video']) is not None:
1952
- setv(to_object, ['video'], getv(from_object, ['video']))
1953
-
1954
- if getv(from_object, ['text']) is not None:
1955
- setv(to_object, ['text'], getv(from_object, ['text']))
1956
-
1957
- if getv(from_object, ['activity_start']) is not None:
1695
+ if getv(from_object, ['automatic_activity_detection']) is not None:
1958
1696
  setv(
1959
1697
  to_object,
1960
- ['activityStart'],
1961
- _ActivityStart_to_vertex(
1962
- getv(from_object, ['activity_start']), to_object
1698
+ ['automaticActivityDetection'],
1699
+ _AutomaticActivityDetection_to_vertex(
1700
+ getv(from_object, ['automatic_activity_detection']), to_object
1963
1701
  ),
1964
1702
  )
1965
1703
 
1966
- if getv(from_object, ['activity_end']) is not None:
1704
+ if getv(from_object, ['activity_handling']) is not None:
1967
1705
  setv(
1968
1706
  to_object,
1969
- ['activityEnd'],
1970
- _ActivityEnd_to_vertex(getv(from_object, ['activity_end']), to_object),
1707
+ ['activityHandling'],
1708
+ getv(from_object, ['activity_handling']),
1971
1709
  )
1972
1710
 
1711
+ if getv(from_object, ['turn_coverage']) is not None:
1712
+ setv(to_object, ['turnCoverage'], getv(from_object, ['turn_coverage']))
1713
+
1973
1714
  return to_object
1974
1715
 
1975
1716
 
1976
- def _FunctionResponse_to_mldev(
1717
+ def _SlidingWindow_to_vertex(
1977
1718
  from_object: Union[dict[str, Any], object],
1978
1719
  parent_object: Optional[dict[str, Any]] = None,
1979
1720
  ) -> dict[str, Any]:
1980
1721
  to_object: dict[str, Any] = {}
1981
- if getv(from_object, ['will_continue']) is not None:
1982
- setv(to_object, ['willContinue'], getv(from_object, ['will_continue']))
1983
-
1984
- if getv(from_object, ['scheduling']) is not None:
1985
- setv(to_object, ['scheduling'], getv(from_object, ['scheduling']))
1986
-
1987
- if getv(from_object, ['id']) is not None:
1988
- setv(to_object, ['id'], getv(from_object, ['id']))
1989
-
1990
- if getv(from_object, ['name']) is not None:
1991
- setv(to_object, ['name'], getv(from_object, ['name']))
1992
-
1993
- if getv(from_object, ['response']) is not None:
1994
- setv(to_object, ['response'], getv(from_object, ['response']))
1722
+ if getv(from_object, ['target_tokens']) is not None:
1723
+ setv(to_object, ['targetTokens'], getv(from_object, ['target_tokens']))
1995
1724
 
1996
1725
  return to_object
1997
1726
 
1998
1727
 
1999
- def _FunctionResponse_to_vertex(
1728
+ def _ContextWindowCompressionConfig_to_vertex(
2000
1729
  from_object: Union[dict[str, Any], object],
2001
1730
  parent_object: Optional[dict[str, Any]] = None,
2002
1731
  ) -> dict[str, Any]:
2003
1732
  to_object: dict[str, Any] = {}
2004
- if getv(from_object, ['will_continue']) is not None:
2005
- raise ValueError('will_continue parameter is not supported in Vertex AI.')
1733
+ if getv(from_object, ['trigger_tokens']) is not None:
1734
+ setv(to_object, ['triggerTokens'], getv(from_object, ['trigger_tokens']))
2006
1735
 
2007
- if getv(from_object, ['scheduling']) is not None:
2008
- raise ValueError('scheduling parameter is not supported in Vertex AI.')
1736
+ if getv(from_object, ['sliding_window']) is not None:
1737
+ setv(
1738
+ to_object,
1739
+ ['slidingWindow'],
1740
+ _SlidingWindow_to_vertex(
1741
+ getv(from_object, ['sliding_window']), to_object
1742
+ ),
1743
+ )
2009
1744
 
2010
- if getv(from_object, ['id']) is not None:
2011
- setv(to_object, ['id'], getv(from_object, ['id']))
1745
+ return to_object
2012
1746
 
2013
- if getv(from_object, ['name']) is not None:
2014
- setv(to_object, ['name'], getv(from_object, ['name']))
2015
1747
 
2016
- if getv(from_object, ['response']) is not None:
2017
- setv(to_object, ['response'], getv(from_object, ['response']))
1748
+ def _ProactivityConfig_to_vertex(
1749
+ from_object: Union[dict[str, Any], object],
1750
+ parent_object: Optional[dict[str, Any]] = None,
1751
+ ) -> dict[str, Any]:
1752
+ to_object: dict[str, Any] = {}
1753
+ if getv(from_object, ['proactive_audio']) is not None:
1754
+ setv(to_object, ['proactiveAudio'], getv(from_object, ['proactive_audio']))
2018
1755
 
2019
1756
  return to_object
2020
1757
 
2021
1758
 
2022
- def _LiveClientToolResponse_to_mldev(
1759
+ def _LiveConnectConfig_to_vertex(
1760
+ api_client: BaseApiClient,
2023
1761
  from_object: Union[dict[str, Any], object],
2024
1762
  parent_object: Optional[dict[str, Any]] = None,
2025
1763
  ) -> dict[str, Any]:
2026
1764
  to_object: dict[str, Any] = {}
2027
- if getv(from_object, ['function_responses']) is not None:
1765
+
1766
+ if getv(from_object, ['generation_config']) is not None:
2028
1767
  setv(
2029
- to_object,
2030
- ['functionResponses'],
2031
- [
2032
- _FunctionResponse_to_mldev(item, to_object)
2033
- for item in getv(from_object, ['function_responses'])
2034
- ],
1768
+ parent_object,
1769
+ ['setup', 'generationConfig'],
1770
+ getv(from_object, ['generation_config']),
1771
+ )
1772
+
1773
+ if getv(from_object, ['response_modalities']) is not None:
1774
+ setv(
1775
+ parent_object,
1776
+ ['setup', 'generationConfig', 'responseModalities'],
1777
+ getv(from_object, ['response_modalities']),
1778
+ )
1779
+
1780
+ if getv(from_object, ['temperature']) is not None:
1781
+ setv(
1782
+ parent_object,
1783
+ ['setup', 'generationConfig', 'temperature'],
1784
+ getv(from_object, ['temperature']),
1785
+ )
1786
+
1787
+ if getv(from_object, ['top_p']) is not None:
1788
+ setv(
1789
+ parent_object,
1790
+ ['setup', 'generationConfig', 'topP'],
1791
+ getv(from_object, ['top_p']),
1792
+ )
1793
+
1794
+ if getv(from_object, ['top_k']) is not None:
1795
+ setv(
1796
+ parent_object,
1797
+ ['setup', 'generationConfig', 'topK'],
1798
+ getv(from_object, ['top_k']),
1799
+ )
1800
+
1801
+ if getv(from_object, ['max_output_tokens']) is not None:
1802
+ setv(
1803
+ parent_object,
1804
+ ['setup', 'generationConfig', 'maxOutputTokens'],
1805
+ getv(from_object, ['max_output_tokens']),
1806
+ )
1807
+
1808
+ if getv(from_object, ['media_resolution']) is not None:
1809
+ setv(
1810
+ parent_object,
1811
+ ['setup', 'generationConfig', 'mediaResolution'],
1812
+ getv(from_object, ['media_resolution']),
1813
+ )
1814
+
1815
+ if getv(from_object, ['seed']) is not None:
1816
+ setv(
1817
+ parent_object,
1818
+ ['setup', 'generationConfig', 'seed'],
1819
+ getv(from_object, ['seed']),
1820
+ )
1821
+
1822
+ if getv(from_object, ['speech_config']) is not None:
1823
+ setv(
1824
+ parent_object,
1825
+ ['setup', 'generationConfig', 'speechConfig'],
1826
+ _SpeechConfig_to_vertex(
1827
+ t.t_live_speech_config(getv(from_object, ['speech_config'])),
1828
+ to_object,
1829
+ ),
2035
1830
  )
2036
1831
 
2037
- return to_object
1832
+ if getv(from_object, ['enable_affective_dialog']) is not None:
1833
+ setv(
1834
+ parent_object,
1835
+ ['setup', 'generationConfig', 'enableAffectiveDialog'],
1836
+ getv(from_object, ['enable_affective_dialog']),
1837
+ )
2038
1838
 
1839
+ if getv(from_object, ['system_instruction']) is not None:
1840
+ setv(
1841
+ parent_object,
1842
+ ['setup', 'systemInstruction'],
1843
+ _Content_to_vertex(
1844
+ t.t_content(getv(from_object, ['system_instruction'])), to_object
1845
+ ),
1846
+ )
2039
1847
 
2040
- def _LiveClientToolResponse_to_vertex(
2041
- from_object: Union[dict[str, Any], object],
2042
- parent_object: Optional[dict[str, Any]] = None,
2043
- ) -> dict[str, Any]:
2044
- to_object: dict[str, Any] = {}
2045
- if getv(from_object, ['function_responses']) is not None:
1848
+ if getv(from_object, ['tools']) is not None:
2046
1849
  setv(
2047
- to_object,
2048
- ['functionResponses'],
1850
+ parent_object,
1851
+ ['setup', 'tools'],
2049
1852
  [
2050
- _FunctionResponse_to_vertex(item, to_object)
2051
- for item in getv(from_object, ['function_responses'])
1853
+ _Tool_to_vertex(t.t_tool(api_client, item), to_object)
1854
+ for item in t.t_tools(api_client, getv(from_object, ['tools']))
2052
1855
  ],
2053
1856
  )
2054
1857
 
2055
- return to_object
1858
+ if getv(from_object, ['session_resumption']) is not None:
1859
+ setv(
1860
+ parent_object,
1861
+ ['setup', 'sessionResumption'],
1862
+ _SessionResumptionConfig_to_vertex(
1863
+ getv(from_object, ['session_resumption']), to_object
1864
+ ),
1865
+ )
2056
1866
 
1867
+ if getv(from_object, ['input_audio_transcription']) is not None:
1868
+ setv(
1869
+ parent_object,
1870
+ ['setup', 'inputAudioTranscription'],
1871
+ _AudioTranscriptionConfig_to_vertex(
1872
+ getv(from_object, ['input_audio_transcription']), to_object
1873
+ ),
1874
+ )
2057
1875
 
2058
- def _LiveClientMessage_to_mldev(
2059
- api_client: BaseApiClient,
2060
- from_object: Union[dict[str, Any], object],
2061
- parent_object: Optional[dict[str, Any]] = None,
2062
- ) -> dict[str, Any]:
2063
- to_object: dict[str, Any] = {}
2064
- if getv(from_object, ['setup']) is not None:
1876
+ if getv(from_object, ['output_audio_transcription']) is not None:
2065
1877
  setv(
2066
- to_object,
2067
- ['setup'],
2068
- _LiveClientSetup_to_mldev(
2069
- api_client, getv(from_object, ['setup']), to_object
1878
+ parent_object,
1879
+ ['setup', 'outputAudioTranscription'],
1880
+ _AudioTranscriptionConfig_to_vertex(
1881
+ getv(from_object, ['output_audio_transcription']), to_object
2070
1882
  ),
2071
1883
  )
2072
1884
 
2073
- if getv(from_object, ['client_content']) is not None:
1885
+ if getv(from_object, ['realtime_input_config']) is not None:
2074
1886
  setv(
2075
- to_object,
2076
- ['clientContent'],
2077
- _LiveClientContent_to_mldev(
2078
- getv(from_object, ['client_content']), to_object
1887
+ parent_object,
1888
+ ['setup', 'realtimeInputConfig'],
1889
+ _RealtimeInputConfig_to_vertex(
1890
+ getv(from_object, ['realtime_input_config']), to_object
2079
1891
  ),
2080
1892
  )
2081
1893
 
2082
- if getv(from_object, ['realtime_input']) is not None:
1894
+ if getv(from_object, ['context_window_compression']) is not None:
2083
1895
  setv(
2084
- to_object,
2085
- ['realtimeInput'],
2086
- _LiveClientRealtimeInput_to_mldev(
2087
- getv(from_object, ['realtime_input']), to_object
1896
+ parent_object,
1897
+ ['setup', 'contextWindowCompression'],
1898
+ _ContextWindowCompressionConfig_to_vertex(
1899
+ getv(from_object, ['context_window_compression']), to_object
2088
1900
  ),
2089
1901
  )
2090
1902
 
2091
- if getv(from_object, ['tool_response']) is not None:
1903
+ if getv(from_object, ['proactivity']) is not None:
2092
1904
  setv(
2093
- to_object,
2094
- ['toolResponse'],
2095
- _LiveClientToolResponse_to_mldev(
2096
- getv(from_object, ['tool_response']), to_object
1905
+ parent_object,
1906
+ ['setup', 'proactivity'],
1907
+ _ProactivityConfig_to_vertex(
1908
+ getv(from_object, ['proactivity']), to_object
2097
1909
  ),
2098
1910
  )
2099
1911
 
2100
1912
  return to_object
2101
1913
 
2102
1914
 
2103
- def _LiveClientMessage_to_vertex(
1915
+ def _LiveConnectParameters_to_vertex(
2104
1916
  api_client: BaseApiClient,
2105
1917
  from_object: Union[dict[str, Any], object],
2106
1918
  parent_object: Optional[dict[str, Any]] = None,
2107
1919
  ) -> dict[str, Any]:
2108
1920
  to_object: dict[str, Any] = {}
2109
- if getv(from_object, ['setup']) is not None:
2110
- setv(
2111
- to_object,
2112
- ['setup'],
2113
- _LiveClientSetup_to_vertex(
2114
- api_client, getv(from_object, ['setup']), to_object
2115
- ),
2116
- )
2117
-
2118
- if getv(from_object, ['client_content']) is not None:
2119
- setv(
2120
- to_object,
2121
- ['clientContent'],
2122
- _LiveClientContent_to_vertex(
2123
- getv(from_object, ['client_content']), to_object
2124
- ),
2125
- )
2126
-
2127
- if getv(from_object, ['realtime_input']) is not None:
1921
+ if getv(from_object, ['model']) is not None:
2128
1922
  setv(
2129
1923
  to_object,
2130
- ['realtimeInput'],
2131
- _LiveClientRealtimeInput_to_vertex(
2132
- getv(from_object, ['realtime_input']), to_object
2133
- ),
1924
+ ['setup', 'model'],
1925
+ t.t_model(api_client, getv(from_object, ['model'])),
2134
1926
  )
2135
1927
 
2136
- if getv(from_object, ['tool_response']) is not None:
1928
+ if getv(from_object, ['config']) is not None:
2137
1929
  setv(
2138
1930
  to_object,
2139
- ['toolResponse'],
2140
- _LiveClientToolResponse_to_vertex(
2141
- getv(from_object, ['tool_response']), to_object
1931
+ ['config'],
1932
+ _LiveConnectConfig_to_vertex(
1933
+ api_client, getv(from_object, ['config']), to_object
2142
1934
  ),
2143
1935
  )
2144
1936
 
2145
1937
  return to_object
2146
1938
 
2147
1939
 
2148
- def _LiveMusicConnectParameters_to_mldev(
1940
+ def _ActivityStart_to_vertex(
2149
1941
  from_object: Union[dict[str, Any], object],
2150
1942
  parent_object: Optional[dict[str, Any]] = None,
2151
1943
  ) -> dict[str, Any]:
2152
1944
  to_object: dict[str, Any] = {}
2153
- if getv(from_object, ['model']) is not None:
2154
- setv(to_object, ['setup', 'model'], getv(from_object, ['model']))
2155
1945
 
2156
1946
  return to_object
2157
1947
 
2158
1948
 
2159
- def _LiveMusicConnectParameters_to_vertex(
1949
+ def _ActivityEnd_to_vertex(
2160
1950
  from_object: Union[dict[str, Any], object],
2161
1951
  parent_object: Optional[dict[str, Any]] = None,
2162
1952
  ) -> dict[str, Any]:
2163
1953
  to_object: dict[str, Any] = {}
2164
- if getv(from_object, ['model']) is not None:
2165
- raise ValueError('model parameter is not supported in Vertex AI.')
2166
1954
 
2167
1955
  return to_object
2168
1956
 
2169
1957
 
2170
- def _WeightedPrompt_to_mldev(
1958
+ def _LiveSendRealtimeInputParameters_to_vertex(
2171
1959
  from_object: Union[dict[str, Any], object],
2172
1960
  parent_object: Optional[dict[str, Any]] = None,
2173
1961
  ) -> dict[str, Any]:
2174
1962
  to_object: dict[str, Any] = {}
2175
- if getv(from_object, ['text']) is not None:
2176
- setv(to_object, ['text'], getv(from_object, ['text']))
1963
+ if getv(from_object, ['media']) is not None:
1964
+ setv(to_object, ['mediaChunks'], t.t_blobs(getv(from_object, ['media'])))
2177
1965
 
2178
- if getv(from_object, ['weight']) is not None:
2179
- setv(to_object, ['weight'], getv(from_object, ['weight']))
1966
+ if getv(from_object, ['audio']) is not None:
1967
+ setv(to_object, ['audio'], t.t_audio_blob(getv(from_object, ['audio'])))
2180
1968
 
2181
- return to_object
1969
+ if getv(from_object, ['audio_stream_end']) is not None:
1970
+ setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
2182
1971
 
1972
+ if getv(from_object, ['video']) is not None:
1973
+ setv(to_object, ['video'], t.t_image_blob(getv(from_object, ['video'])))
2183
1974
 
2184
- def _WeightedPrompt_to_vertex(
2185
- from_object: Union[dict[str, Any], object],
2186
- parent_object: Optional[dict[str, Any]] = None,
2187
- ) -> dict[str, Any]:
2188
- to_object: dict[str, Any] = {}
2189
1975
  if getv(from_object, ['text']) is not None:
2190
- raise ValueError('text parameter is not supported in Vertex AI.')
1976
+ setv(to_object, ['text'], getv(from_object, ['text']))
2191
1977
 
2192
- if getv(from_object, ['weight']) is not None:
2193
- raise ValueError('weight parameter is not supported in Vertex AI.')
1978
+ if getv(from_object, ['activity_start']) is not None:
1979
+ setv(
1980
+ to_object,
1981
+ ['activityStart'],
1982
+ _ActivityStart_to_vertex(
1983
+ getv(from_object, ['activity_start']), to_object
1984
+ ),
1985
+ )
1986
+
1987
+ if getv(from_object, ['activity_end']) is not None:
1988
+ setv(
1989
+ to_object,
1990
+ ['activityEnd'],
1991
+ _ActivityEnd_to_vertex(getv(from_object, ['activity_end']), to_object),
1992
+ )
2194
1993
 
2195
1994
  return to_object
2196
1995
 
2197
1996
 
2198
- def _LiveMusicSetWeightedPromptsParameters_to_mldev(
1997
+ def _LiveClientSetup_to_vertex(
1998
+ api_client: BaseApiClient,
2199
1999
  from_object: Union[dict[str, Any], object],
2200
2000
  parent_object: Optional[dict[str, Any]] = None,
2201
2001
  ) -> dict[str, Any]:
2202
2002
  to_object: dict[str, Any] = {}
2203
- if getv(from_object, ['weighted_prompts']) is not None:
2003
+ if getv(from_object, ['model']) is not None:
2004
+ setv(to_object, ['model'], getv(from_object, ['model']))
2005
+
2006
+ if getv(from_object, ['generation_config']) is not None:
2204
2007
  setv(
2205
2008
  to_object,
2206
- ['weightedPrompts'],
2009
+ ['generationConfig'],
2010
+ getv(from_object, ['generation_config']),
2011
+ )
2012
+
2013
+ if getv(from_object, ['system_instruction']) is not None:
2014
+ setv(
2015
+ to_object,
2016
+ ['systemInstruction'],
2017
+ _Content_to_vertex(
2018
+ t.t_content(getv(from_object, ['system_instruction'])), to_object
2019
+ ),
2020
+ )
2021
+
2022
+ if getv(from_object, ['tools']) is not None:
2023
+ setv(
2024
+ to_object,
2025
+ ['tools'],
2207
2026
  [
2208
- _WeightedPrompt_to_mldev(item, to_object)
2209
- for item in getv(from_object, ['weighted_prompts'])
2027
+ _Tool_to_vertex(t.t_tool(api_client, item), to_object)
2028
+ for item in t.t_tools(api_client, getv(from_object, ['tools']))
2210
2029
  ],
2211
2030
  )
2212
2031
 
2213
- return to_object
2032
+ if getv(from_object, ['session_resumption']) is not None:
2033
+ setv(
2034
+ to_object,
2035
+ ['sessionResumption'],
2036
+ _SessionResumptionConfig_to_vertex(
2037
+ getv(from_object, ['session_resumption']), to_object
2038
+ ),
2039
+ )
2040
+
2041
+ if getv(from_object, ['context_window_compression']) is not None:
2042
+ setv(
2043
+ to_object,
2044
+ ['contextWindowCompression'],
2045
+ _ContextWindowCompressionConfig_to_vertex(
2046
+ getv(from_object, ['context_window_compression']), to_object
2047
+ ),
2048
+ )
2214
2049
 
2050
+ if getv(from_object, ['input_audio_transcription']) is not None:
2051
+ setv(
2052
+ to_object,
2053
+ ['inputAudioTranscription'],
2054
+ _AudioTranscriptionConfig_to_vertex(
2055
+ getv(from_object, ['input_audio_transcription']), to_object
2056
+ ),
2057
+ )
2215
2058
 
2216
- def _LiveMusicSetWeightedPromptsParameters_to_vertex(
2217
- from_object: Union[dict[str, Any], object],
2218
- parent_object: Optional[dict[str, Any]] = None,
2219
- ) -> dict[str, Any]:
2220
- to_object: dict[str, Any] = {}
2221
- if getv(from_object, ['weighted_prompts']) is not None:
2222
- raise ValueError(
2223
- 'weighted_prompts parameter is not supported in Vertex AI.'
2059
+ if getv(from_object, ['output_audio_transcription']) is not None:
2060
+ setv(
2061
+ to_object,
2062
+ ['outputAudioTranscription'],
2063
+ _AudioTranscriptionConfig_to_vertex(
2064
+ getv(from_object, ['output_audio_transcription']), to_object
2065
+ ),
2066
+ )
2067
+
2068
+ if getv(from_object, ['proactivity']) is not None:
2069
+ setv(
2070
+ to_object,
2071
+ ['proactivity'],
2072
+ _ProactivityConfig_to_vertex(
2073
+ getv(from_object, ['proactivity']), to_object
2074
+ ),
2224
2075
  )
2225
2076
 
2226
2077
  return to_object
2227
2078
 
2228
2079
 
2229
- def _LiveMusicGenerationConfig_to_mldev(
2080
+ def _LiveClientContent_to_vertex(
2230
2081
  from_object: Union[dict[str, Any], object],
2231
2082
  parent_object: Optional[dict[str, Any]] = None,
2232
2083
  ) -> dict[str, Any]:
2233
2084
  to_object: dict[str, Any] = {}
2234
- if getv(from_object, ['temperature']) is not None:
2235
- setv(to_object, ['temperature'], getv(from_object, ['temperature']))
2236
-
2237
- if getv(from_object, ['top_k']) is not None:
2238
- setv(to_object, ['topK'], getv(from_object, ['top_k']))
2239
-
2240
- if getv(from_object, ['seed']) is not None:
2241
- setv(to_object, ['seed'], getv(from_object, ['seed']))
2242
-
2243
- if getv(from_object, ['guidance']) is not None:
2244
- setv(to_object, ['guidance'], getv(from_object, ['guidance']))
2245
-
2246
- if getv(from_object, ['bpm']) is not None:
2247
- setv(to_object, ['bpm'], getv(from_object, ['bpm']))
2248
-
2249
- if getv(from_object, ['density']) is not None:
2250
- setv(to_object, ['density'], getv(from_object, ['density']))
2251
-
2252
- if getv(from_object, ['brightness']) is not None:
2253
- setv(to_object, ['brightness'], getv(from_object, ['brightness']))
2254
-
2255
- if getv(from_object, ['scale']) is not None:
2256
- setv(to_object, ['scale'], getv(from_object, ['scale']))
2257
-
2258
- if getv(from_object, ['mute_bass']) is not None:
2259
- setv(to_object, ['muteBass'], getv(from_object, ['mute_bass']))
2260
-
2261
- if getv(from_object, ['mute_drums']) is not None:
2262
- setv(to_object, ['muteDrums'], getv(from_object, ['mute_drums']))
2263
-
2264
- if getv(from_object, ['only_bass_and_drums']) is not None:
2085
+ if getv(from_object, ['turns']) is not None:
2265
2086
  setv(
2266
2087
  to_object,
2267
- ['onlyBassAndDrums'],
2268
- getv(from_object, ['only_bass_and_drums']),
2088
+ ['turns'],
2089
+ [
2090
+ _Content_to_vertex(item, to_object)
2091
+ for item in getv(from_object, ['turns'])
2092
+ ],
2269
2093
  )
2270
2094
 
2095
+ if getv(from_object, ['turn_complete']) is not None:
2096
+ setv(to_object, ['turnComplete'], getv(from_object, ['turn_complete']))
2097
+
2271
2098
  return to_object
2272
2099
 
2273
2100
 
2274
- def _LiveMusicGenerationConfig_to_vertex(
2101
+ def _LiveClientRealtimeInput_to_vertex(
2275
2102
  from_object: Union[dict[str, Any], object],
2276
2103
  parent_object: Optional[dict[str, Any]] = None,
2277
2104
  ) -> dict[str, Any]:
2278
2105
  to_object: dict[str, Any] = {}
2279
- if getv(from_object, ['temperature']) is not None:
2280
- raise ValueError('temperature parameter is not supported in Vertex AI.')
2281
-
2282
- if getv(from_object, ['top_k']) is not None:
2283
- raise ValueError('top_k parameter is not supported in Vertex AI.')
2284
-
2285
- if getv(from_object, ['seed']) is not None:
2286
- raise ValueError('seed parameter is not supported in Vertex AI.')
2287
-
2288
- if getv(from_object, ['guidance']) is not None:
2289
- raise ValueError('guidance parameter is not supported in Vertex AI.')
2290
-
2291
- if getv(from_object, ['bpm']) is not None:
2292
- raise ValueError('bpm parameter is not supported in Vertex AI.')
2293
-
2294
- if getv(from_object, ['density']) is not None:
2295
- raise ValueError('density parameter is not supported in Vertex AI.')
2296
-
2297
- if getv(from_object, ['brightness']) is not None:
2298
- raise ValueError('brightness parameter is not supported in Vertex AI.')
2299
-
2300
- if getv(from_object, ['scale']) is not None:
2301
- raise ValueError('scale parameter is not supported in Vertex AI.')
2302
-
2303
- if getv(from_object, ['mute_bass']) is not None:
2304
- raise ValueError('mute_bass parameter is not supported in Vertex AI.')
2106
+ if getv(from_object, ['media_chunks']) is not None:
2107
+ setv(to_object, ['mediaChunks'], getv(from_object, ['media_chunks']))
2305
2108
 
2306
- if getv(from_object, ['mute_drums']) is not None:
2307
- raise ValueError('mute_drums parameter is not supported in Vertex AI.')
2109
+ if getv(from_object, ['audio']) is not None:
2110
+ setv(to_object, ['audio'], getv(from_object, ['audio']))
2308
2111
 
2309
- if getv(from_object, ['only_bass_and_drums']) is not None:
2112
+ if getv(from_object, ['audio_stream_end']) is not None:
2310
2113
  raise ValueError(
2311
- 'only_bass_and_drums parameter is not supported in Vertex AI.'
2114
+ 'audio_stream_end parameter is not supported in Vertex AI.'
2312
2115
  )
2313
2116
 
2314
- return to_object
2117
+ if getv(from_object, ['video']) is not None:
2118
+ setv(to_object, ['video'], getv(from_object, ['video']))
2315
2119
 
2120
+ if getv(from_object, ['text']) is not None:
2121
+ setv(to_object, ['text'], getv(from_object, ['text']))
2316
2122
 
2317
- def _LiveMusicSetConfigParameters_to_mldev(
2318
- from_object: Union[dict[str, Any], object],
2319
- parent_object: Optional[dict[str, Any]] = None,
2320
- ) -> dict[str, Any]:
2321
- to_object: dict[str, Any] = {}
2322
- if getv(from_object, ['music_generation_config']) is not None:
2123
+ if getv(from_object, ['activity_start']) is not None:
2323
2124
  setv(
2324
2125
  to_object,
2325
- ['musicGenerationConfig'],
2326
- _LiveMusicGenerationConfig_to_mldev(
2327
- getv(from_object, ['music_generation_config']), to_object
2126
+ ['activityStart'],
2127
+ _ActivityStart_to_vertex(
2128
+ getv(from_object, ['activity_start']), to_object
2328
2129
  ),
2329
2130
  )
2330
2131
 
2331
- return to_object
2332
-
2333
-
2334
- def _LiveMusicSetConfigParameters_to_vertex(
2335
- from_object: Union[dict[str, Any], object],
2336
- parent_object: Optional[dict[str, Any]] = None,
2337
- ) -> dict[str, Any]:
2338
- to_object: dict[str, Any] = {}
2339
- if getv(from_object, ['music_generation_config']) is not None:
2340
- raise ValueError(
2341
- 'music_generation_config parameter is not supported in Vertex AI.'
2132
+ if getv(from_object, ['activity_end']) is not None:
2133
+ setv(
2134
+ to_object,
2135
+ ['activityEnd'],
2136
+ _ActivityEnd_to_vertex(getv(from_object, ['activity_end']), to_object),
2342
2137
  )
2343
2138
 
2344
2139
  return to_object
2345
2140
 
2346
2141
 
2347
- def _LiveMusicClientSetup_to_mldev(
2142
+ def _FunctionResponse_to_vertex(
2348
2143
  from_object: Union[dict[str, Any], object],
2349
2144
  parent_object: Optional[dict[str, Any]] = None,
2350
2145
  ) -> dict[str, Any]:
2351
2146
  to_object: dict[str, Any] = {}
2352
- if getv(from_object, ['model']) is not None:
2353
- setv(to_object, ['model'], getv(from_object, ['model']))
2147
+ if getv(from_object, ['will_continue']) is not None:
2148
+ raise ValueError('will_continue parameter is not supported in Vertex AI.')
2354
2149
 
2355
- return to_object
2150
+ if getv(from_object, ['scheduling']) is not None:
2151
+ raise ValueError('scheduling parameter is not supported in Vertex AI.')
2356
2152
 
2153
+ if getv(from_object, ['id']) is not None:
2154
+ setv(to_object, ['id'], getv(from_object, ['id']))
2357
2155
 
2358
- def _LiveMusicClientSetup_to_vertex(
2359
- from_object: Union[dict[str, Any], object],
2360
- parent_object: Optional[dict[str, Any]] = None,
2361
- ) -> dict[str, Any]:
2362
- to_object: dict[str, Any] = {}
2363
- if getv(from_object, ['model']) is not None:
2364
- raise ValueError('model parameter is not supported in Vertex AI.')
2156
+ if getv(from_object, ['name']) is not None:
2157
+ setv(to_object, ['name'], getv(from_object, ['name']))
2158
+
2159
+ if getv(from_object, ['response']) is not None:
2160
+ setv(to_object, ['response'], getv(from_object, ['response']))
2365
2161
 
2366
2162
  return to_object
2367
2163
 
2368
2164
 
2369
- def _LiveMusicClientContent_to_mldev(
2165
+ def _LiveClientToolResponse_to_vertex(
2370
2166
  from_object: Union[dict[str, Any], object],
2371
2167
  parent_object: Optional[dict[str, Any]] = None,
2372
2168
  ) -> dict[str, Any]:
2373
2169
  to_object: dict[str, Any] = {}
2374
- if getv(from_object, ['weighted_prompts']) is not None:
2170
+ if getv(from_object, ['function_responses']) is not None:
2375
2171
  setv(
2376
2172
  to_object,
2377
- ['weightedPrompts'],
2173
+ ['functionResponses'],
2378
2174
  [
2379
- _WeightedPrompt_to_mldev(item, to_object)
2380
- for item in getv(from_object, ['weighted_prompts'])
2175
+ _FunctionResponse_to_vertex(item, to_object)
2176
+ for item in getv(from_object, ['function_responses'])
2381
2177
  ],
2382
2178
  )
2383
2179
 
2384
2180
  return to_object
2385
2181
 
2386
2182
 
2387
- def _LiveMusicClientContent_to_vertex(
2388
- from_object: Union[dict[str, Any], object],
2389
- parent_object: Optional[dict[str, Any]] = None,
2390
- ) -> dict[str, Any]:
2391
- to_object: dict[str, Any] = {}
2392
- if getv(from_object, ['weighted_prompts']) is not None:
2393
- raise ValueError(
2394
- 'weighted_prompts parameter is not supported in Vertex AI.'
2395
- )
2396
-
2397
- return to_object
2398
-
2399
-
2400
- def _LiveMusicClientMessage_to_mldev(
2183
+ def _LiveClientMessage_to_vertex(
2184
+ api_client: BaseApiClient,
2401
2185
  from_object: Union[dict[str, Any], object],
2402
2186
  parent_object: Optional[dict[str, Any]] = None,
2403
2187
  ) -> dict[str, Any]:
@@ -2406,153 +2190,136 @@ def _LiveMusicClientMessage_to_mldev(
2406
2190
  setv(
2407
2191
  to_object,
2408
2192
  ['setup'],
2409
- _LiveMusicClientSetup_to_mldev(getv(from_object, ['setup']), to_object),
2193
+ _LiveClientSetup_to_vertex(
2194
+ api_client, getv(from_object, ['setup']), to_object
2195
+ ),
2410
2196
  )
2411
2197
 
2412
2198
  if getv(from_object, ['client_content']) is not None:
2413
2199
  setv(
2414
2200
  to_object,
2415
2201
  ['clientContent'],
2416
- _LiveMusicClientContent_to_mldev(
2202
+ _LiveClientContent_to_vertex(
2417
2203
  getv(from_object, ['client_content']), to_object
2418
2204
  ),
2419
2205
  )
2420
2206
 
2421
- if getv(from_object, ['music_generation_config']) is not None:
2207
+ if getv(from_object, ['realtime_input']) is not None:
2422
2208
  setv(
2423
2209
  to_object,
2424
- ['musicGenerationConfig'],
2425
- _LiveMusicGenerationConfig_to_mldev(
2426
- getv(from_object, ['music_generation_config']), to_object
2210
+ ['realtimeInput'],
2211
+ _LiveClientRealtimeInput_to_vertex(
2212
+ getv(from_object, ['realtime_input']), to_object
2427
2213
  ),
2428
2214
  )
2429
2215
 
2430
- if getv(from_object, ['playback_control']) is not None:
2216
+ if getv(from_object, ['tool_response']) is not None:
2431
2217
  setv(
2432
- to_object, ['playbackControl'], getv(from_object, ['playback_control'])
2218
+ to_object,
2219
+ ['toolResponse'],
2220
+ _LiveClientToolResponse_to_vertex(
2221
+ getv(from_object, ['tool_response']), to_object
2222
+ ),
2433
2223
  )
2434
2224
 
2435
2225
  return to_object
2436
2226
 
2437
2227
 
2438
- def _LiveMusicClientMessage_to_vertex(
2228
+ def _LiveMusicConnectParameters_to_vertex(
2439
2229
  from_object: Union[dict[str, Any], object],
2440
2230
  parent_object: Optional[dict[str, Any]] = None,
2441
2231
  ) -> dict[str, Any]:
2442
2232
  to_object: dict[str, Any] = {}
2443
- if getv(from_object, ['setup']) is not None:
2444
- raise ValueError('setup parameter is not supported in Vertex AI.')
2445
-
2446
- if getv(from_object, ['client_content']) is not None:
2447
- raise ValueError('client_content parameter is not supported in Vertex AI.')
2448
-
2449
- if getv(from_object, ['music_generation_config']) is not None:
2450
- raise ValueError(
2451
- 'music_generation_config parameter is not supported in Vertex AI.'
2452
- )
2453
-
2454
- if getv(from_object, ['playback_control']) is not None:
2455
- raise ValueError(
2456
- 'playback_control parameter is not supported in Vertex AI.'
2457
- )
2233
+ if getv(from_object, ['model']) is not None:
2234
+ raise ValueError('model parameter is not supported in Vertex AI.')
2458
2235
 
2459
2236
  return to_object
2460
2237
 
2461
2238
 
2462
- def _LiveServerSetupComplete_from_mldev(
2239
+ def _LiveMusicSetWeightedPromptsParameters_to_vertex(
2463
2240
  from_object: Union[dict[str, Any], object],
2464
2241
  parent_object: Optional[dict[str, Any]] = None,
2465
2242
  ) -> dict[str, Any]:
2466
2243
  to_object: dict[str, Any] = {}
2244
+ if getv(from_object, ['weighted_prompts']) is not None:
2245
+ raise ValueError(
2246
+ 'weighted_prompts parameter is not supported in Vertex AI.'
2247
+ )
2467
2248
 
2468
2249
  return to_object
2469
2250
 
2470
2251
 
2471
- def _LiveServerSetupComplete_from_vertex(
2252
+ def _LiveMusicSetConfigParameters_to_vertex(
2472
2253
  from_object: Union[dict[str, Any], object],
2473
2254
  parent_object: Optional[dict[str, Any]] = None,
2474
2255
  ) -> dict[str, Any]:
2475
2256
  to_object: dict[str, Any] = {}
2476
- if getv(from_object, ['sessionId']) is not None:
2477
- setv(to_object, ['session_id'], getv(from_object, ['sessionId']))
2257
+ if getv(from_object, ['music_generation_config']) is not None:
2258
+ raise ValueError(
2259
+ 'music_generation_config parameter is not supported in Vertex AI.'
2260
+ )
2478
2261
 
2479
2262
  return to_object
2480
2263
 
2481
2264
 
2482
- def _VideoMetadata_from_mldev(
2265
+ def _LiveMusicClientMessage_to_vertex(
2483
2266
  from_object: Union[dict[str, Any], object],
2484
2267
  parent_object: Optional[dict[str, Any]] = None,
2485
2268
  ) -> dict[str, Any]:
2486
2269
  to_object: dict[str, Any] = {}
2487
- if getv(from_object, ['fps']) is not None:
2488
- setv(to_object, ['fps'], getv(from_object, ['fps']))
2489
-
2490
- if getv(from_object, ['endOffset']) is not None:
2491
- setv(to_object, ['end_offset'], getv(from_object, ['endOffset']))
2492
-
2493
- if getv(from_object, ['startOffset']) is not None:
2494
- setv(to_object, ['start_offset'], getv(from_object, ['startOffset']))
2495
-
2496
- return to_object
2497
-
2270
+ if getv(from_object, ['setup']) is not None:
2271
+ raise ValueError('setup parameter is not supported in Vertex AI.')
2498
2272
 
2499
- def _VideoMetadata_from_vertex(
2500
- from_object: Union[dict[str, Any], object],
2501
- parent_object: Optional[dict[str, Any]] = None,
2502
- ) -> dict[str, Any]:
2503
- to_object: dict[str, Any] = {}
2504
- if getv(from_object, ['fps']) is not None:
2505
- setv(to_object, ['fps'], getv(from_object, ['fps']))
2273
+ if getv(from_object, ['client_content']) is not None:
2274
+ raise ValueError('client_content parameter is not supported in Vertex AI.')
2506
2275
 
2507
- if getv(from_object, ['endOffset']) is not None:
2508
- setv(to_object, ['end_offset'], getv(from_object, ['endOffset']))
2276
+ if getv(from_object, ['music_generation_config']) is not None:
2277
+ raise ValueError(
2278
+ 'music_generation_config parameter is not supported in Vertex AI.'
2279
+ )
2509
2280
 
2510
- if getv(from_object, ['startOffset']) is not None:
2511
- setv(to_object, ['start_offset'], getv(from_object, ['startOffset']))
2281
+ if getv(from_object, ['playback_control']) is not None:
2282
+ raise ValueError(
2283
+ 'playback_control parameter is not supported in Vertex AI.'
2284
+ )
2512
2285
 
2513
2286
  return to_object
2514
2287
 
2515
2288
 
2516
- def _Blob_from_mldev(
2289
+ def _LiveServerSetupComplete_from_mldev(
2517
2290
  from_object: Union[dict[str, Any], object],
2518
2291
  parent_object: Optional[dict[str, Any]] = None,
2519
2292
  ) -> dict[str, Any]:
2520
2293
  to_object: dict[str, Any] = {}
2521
2294
 
2522
- if getv(from_object, ['data']) is not None:
2523
- setv(to_object, ['data'], getv(from_object, ['data']))
2524
-
2525
- if getv(from_object, ['mimeType']) is not None:
2526
- setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
2527
-
2528
2295
  return to_object
2529
2296
 
2530
2297
 
2531
- def _Blob_from_vertex(
2298
+ def _VideoMetadata_from_mldev(
2532
2299
  from_object: Union[dict[str, Any], object],
2533
2300
  parent_object: Optional[dict[str, Any]] = None,
2534
2301
  ) -> dict[str, Any]:
2535
2302
  to_object: dict[str, Any] = {}
2536
- if getv(from_object, ['displayName']) is not None:
2537
- setv(to_object, ['display_name'], getv(from_object, ['displayName']))
2303
+ if getv(from_object, ['fps']) is not None:
2304
+ setv(to_object, ['fps'], getv(from_object, ['fps']))
2538
2305
 
2539
- if getv(from_object, ['data']) is not None:
2540
- setv(to_object, ['data'], getv(from_object, ['data']))
2306
+ if getv(from_object, ['endOffset']) is not None:
2307
+ setv(to_object, ['end_offset'], getv(from_object, ['endOffset']))
2541
2308
 
2542
- if getv(from_object, ['mimeType']) is not None:
2543
- setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
2309
+ if getv(from_object, ['startOffset']) is not None:
2310
+ setv(to_object, ['start_offset'], getv(from_object, ['startOffset']))
2544
2311
 
2545
2312
  return to_object
2546
2313
 
2547
2314
 
2548
- def _FileData_from_mldev(
2315
+ def _Blob_from_mldev(
2549
2316
  from_object: Union[dict[str, Any], object],
2550
2317
  parent_object: Optional[dict[str, Any]] = None,
2551
2318
  ) -> dict[str, Any]:
2552
2319
  to_object: dict[str, Any] = {}
2553
2320
 
2554
- if getv(from_object, ['fileUri']) is not None:
2555
- setv(to_object, ['file_uri'], getv(from_object, ['fileUri']))
2321
+ if getv(from_object, ['data']) is not None:
2322
+ setv(to_object, ['data'], getv(from_object, ['data']))
2556
2323
 
2557
2324
  if getv(from_object, ['mimeType']) is not None:
2558
2325
  setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
@@ -2560,13 +2327,11 @@ def _FileData_from_mldev(
2560
2327
  return to_object
2561
2328
 
2562
2329
 
2563
- def _FileData_from_vertex(
2330
+ def _FileData_from_mldev(
2564
2331
  from_object: Union[dict[str, Any], object],
2565
2332
  parent_object: Optional[dict[str, Any]] = None,
2566
2333
  ) -> dict[str, Any]:
2567
2334
  to_object: dict[str, Any] = {}
2568
- if getv(from_object, ['displayName']) is not None:
2569
- setv(to_object, ['display_name'], getv(from_object, ['displayName']))
2570
2335
 
2571
2336
  if getv(from_object, ['fileUri']) is not None:
2572
2337
  setv(to_object, ['file_uri'], getv(from_object, ['fileUri']))
@@ -2641,70 +2406,6 @@ def _Part_from_mldev(
2641
2406
  return to_object
2642
2407
 
2643
2408
 
2644
- def _Part_from_vertex(
2645
- from_object: Union[dict[str, Any], object],
2646
- parent_object: Optional[dict[str, Any]] = None,
2647
- ) -> dict[str, Any]:
2648
- to_object: dict[str, Any] = {}
2649
- if getv(from_object, ['videoMetadata']) is not None:
2650
- setv(
2651
- to_object,
2652
- ['video_metadata'],
2653
- _VideoMetadata_from_vertex(
2654
- getv(from_object, ['videoMetadata']), to_object
2655
- ),
2656
- )
2657
-
2658
- if getv(from_object, ['thought']) is not None:
2659
- setv(to_object, ['thought'], getv(from_object, ['thought']))
2660
-
2661
- if getv(from_object, ['inlineData']) is not None:
2662
- setv(
2663
- to_object,
2664
- ['inline_data'],
2665
- _Blob_from_vertex(getv(from_object, ['inlineData']), to_object),
2666
- )
2667
-
2668
- if getv(from_object, ['fileData']) is not None:
2669
- setv(
2670
- to_object,
2671
- ['file_data'],
2672
- _FileData_from_vertex(getv(from_object, ['fileData']), to_object),
2673
- )
2674
-
2675
- if getv(from_object, ['thoughtSignature']) is not None:
2676
- setv(
2677
- to_object,
2678
- ['thought_signature'],
2679
- getv(from_object, ['thoughtSignature']),
2680
- )
2681
-
2682
- if getv(from_object, ['codeExecutionResult']) is not None:
2683
- setv(
2684
- to_object,
2685
- ['code_execution_result'],
2686
- getv(from_object, ['codeExecutionResult']),
2687
- )
2688
-
2689
- if getv(from_object, ['executableCode']) is not None:
2690
- setv(to_object, ['executable_code'], getv(from_object, ['executableCode']))
2691
-
2692
- if getv(from_object, ['functionCall']) is not None:
2693
- setv(to_object, ['function_call'], getv(from_object, ['functionCall']))
2694
-
2695
- if getv(from_object, ['functionResponse']) is not None:
2696
- setv(
2697
- to_object,
2698
- ['function_response'],
2699
- getv(from_object, ['functionResponse']),
2700
- )
2701
-
2702
- if getv(from_object, ['text']) is not None:
2703
- setv(to_object, ['text'], getv(from_object, ['text']))
2704
-
2705
- return to_object
2706
-
2707
-
2708
2409
  def _Content_from_mldev(
2709
2410
  from_object: Union[dict[str, Any], object],
2710
2411
  parent_object: Optional[dict[str, Any]] = None,
@@ -2726,27 +2427,6 @@ def _Content_from_mldev(
2726
2427
  return to_object
2727
2428
 
2728
2429
 
2729
- def _Content_from_vertex(
2730
- from_object: Union[dict[str, Any], object],
2731
- parent_object: Optional[dict[str, Any]] = None,
2732
- ) -> dict[str, Any]:
2733
- to_object: dict[str, Any] = {}
2734
- if getv(from_object, ['parts']) is not None:
2735
- setv(
2736
- to_object,
2737
- ['parts'],
2738
- [
2739
- _Part_from_vertex(item, to_object)
2740
- for item in getv(from_object, ['parts'])
2741
- ],
2742
- )
2743
-
2744
- if getv(from_object, ['role']) is not None:
2745
- setv(to_object, ['role'], getv(from_object, ['role']))
2746
-
2747
- return to_object
2748
-
2749
-
2750
2430
  def _Transcription_from_mldev(
2751
2431
  from_object: Union[dict[str, Any], object],
2752
2432
  parent_object: Optional[dict[str, Any]] = None,
@@ -2761,20 +2441,6 @@ def _Transcription_from_mldev(
2761
2441
  return to_object
2762
2442
 
2763
2443
 
2764
- def _Transcription_from_vertex(
2765
- from_object: Union[dict[str, Any], object],
2766
- parent_object: Optional[dict[str, Any]] = None,
2767
- ) -> dict[str, Any]:
2768
- to_object: dict[str, Any] = {}
2769
- if getv(from_object, ['text']) is not None:
2770
- setv(to_object, ['text'], getv(from_object, ['text']))
2771
-
2772
- if getv(from_object, ['finished']) is not None:
2773
- setv(to_object, ['finished'], getv(from_object, ['finished']))
2774
-
2775
- return to_object
2776
-
2777
-
2778
2444
  def _UrlMetadata_from_mldev(
2779
2445
  from_object: Union[dict[str, Any], object],
2780
2446
  parent_object: Optional[dict[str, Any]] = None,
@@ -2793,24 +2459,6 @@ def _UrlMetadata_from_mldev(
2793
2459
  return to_object
2794
2460
 
2795
2461
 
2796
- def _UrlMetadata_from_vertex(
2797
- from_object: Union[dict[str, Any], object],
2798
- parent_object: Optional[dict[str, Any]] = None,
2799
- ) -> dict[str, Any]:
2800
- to_object: dict[str, Any] = {}
2801
- if getv(from_object, ['retrievedUrl']) is not None:
2802
- setv(to_object, ['retrieved_url'], getv(from_object, ['retrievedUrl']))
2803
-
2804
- if getv(from_object, ['urlRetrievalStatus']) is not None:
2805
- setv(
2806
- to_object,
2807
- ['url_retrieval_status'],
2808
- getv(from_object, ['urlRetrievalStatus']),
2809
- )
2810
-
2811
- return to_object
2812
-
2813
-
2814
2462
  def _UrlContextMetadata_from_mldev(
2815
2463
  from_object: Union[dict[str, Any], object],
2816
2464
  parent_object: Optional[dict[str, Any]] = None,
@@ -2829,24 +2477,6 @@ def _UrlContextMetadata_from_mldev(
2829
2477
  return to_object
2830
2478
 
2831
2479
 
2832
- def _UrlContextMetadata_from_vertex(
2833
- from_object: Union[dict[str, Any], object],
2834
- parent_object: Optional[dict[str, Any]] = None,
2835
- ) -> dict[str, Any]:
2836
- to_object: dict[str, Any] = {}
2837
- if getv(from_object, ['urlMetadata']) is not None:
2838
- setv(
2839
- to_object,
2840
- ['url_metadata'],
2841
- [
2842
- _UrlMetadata_from_vertex(item, to_object)
2843
- for item in getv(from_object, ['urlMetadata'])
2844
- ],
2845
- )
2846
-
2847
- return to_object
2848
-
2849
-
2850
2480
  def _LiveServerContent_from_mldev(
2851
2481
  from_object: Union[dict[str, Any], object],
2852
2482
  parent_object: Optional[dict[str, Any]] = None,
@@ -2909,59 +2539,6 @@ def _LiveServerContent_from_mldev(
2909
2539
  return to_object
2910
2540
 
2911
2541
 
2912
- def _LiveServerContent_from_vertex(
2913
- from_object: Union[dict[str, Any], object],
2914
- parent_object: Optional[dict[str, Any]] = None,
2915
- ) -> dict[str, Any]:
2916
- to_object: dict[str, Any] = {}
2917
- if getv(from_object, ['modelTurn']) is not None:
2918
- setv(
2919
- to_object,
2920
- ['model_turn'],
2921
- _Content_from_vertex(getv(from_object, ['modelTurn']), to_object),
2922
- )
2923
-
2924
- if getv(from_object, ['turnComplete']) is not None:
2925
- setv(to_object, ['turn_complete'], getv(from_object, ['turnComplete']))
2926
-
2927
- if getv(from_object, ['interrupted']) is not None:
2928
- setv(to_object, ['interrupted'], getv(from_object, ['interrupted']))
2929
-
2930
- if getv(from_object, ['groundingMetadata']) is not None:
2931
- setv(
2932
- to_object,
2933
- ['grounding_metadata'],
2934
- getv(from_object, ['groundingMetadata']),
2935
- )
2936
-
2937
- if getv(from_object, ['generationComplete']) is not None:
2938
- setv(
2939
- to_object,
2940
- ['generation_complete'],
2941
- getv(from_object, ['generationComplete']),
2942
- )
2943
-
2944
- if getv(from_object, ['inputTranscription']) is not None:
2945
- setv(
2946
- to_object,
2947
- ['input_transcription'],
2948
- _Transcription_from_vertex(
2949
- getv(from_object, ['inputTranscription']), to_object
2950
- ),
2951
- )
2952
-
2953
- if getv(from_object, ['outputTranscription']) is not None:
2954
- setv(
2955
- to_object,
2956
- ['output_transcription'],
2957
- _Transcription_from_vertex(
2958
- getv(from_object, ['outputTranscription']), to_object
2959
- ),
2960
- )
2961
-
2962
- return to_object
2963
-
2964
-
2965
2542
  def _FunctionCall_from_mldev(
2966
2543
  from_object: Union[dict[str, Any], object],
2967
2544
  parent_object: Optional[dict[str, Any]] = None,
@@ -2979,21 +2556,6 @@ def _FunctionCall_from_mldev(
2979
2556
  return to_object
2980
2557
 
2981
2558
 
2982
- def _FunctionCall_from_vertex(
2983
- from_object: Union[dict[str, Any], object],
2984
- parent_object: Optional[dict[str, Any]] = None,
2985
- ) -> dict[str, Any]:
2986
- to_object: dict[str, Any] = {}
2987
-
2988
- if getv(from_object, ['args']) is not None:
2989
- setv(to_object, ['args'], getv(from_object, ['args']))
2990
-
2991
- if getv(from_object, ['name']) is not None:
2992
- setv(to_object, ['name'], getv(from_object, ['name']))
2993
-
2994
- return to_object
2995
-
2996
-
2997
2559
  def _LiveServerToolCall_from_mldev(
2998
2560
  from_object: Union[dict[str, Any], object],
2999
2561
  parent_object: Optional[dict[str, Any]] = None,
@@ -3005,43 +2567,14 @@ def _LiveServerToolCall_from_mldev(
3005
2567
  ['function_calls'],
3006
2568
  [
3007
2569
  _FunctionCall_from_mldev(item, to_object)
3008
- for item in getv(from_object, ['functionCalls'])
3009
- ],
3010
- )
3011
-
3012
- return to_object
3013
-
3014
-
3015
- def _LiveServerToolCall_from_vertex(
3016
- from_object: Union[dict[str, Any], object],
3017
- parent_object: Optional[dict[str, Any]] = None,
3018
- ) -> dict[str, Any]:
3019
- to_object: dict[str, Any] = {}
3020
- if getv(from_object, ['functionCalls']) is not None:
3021
- setv(
3022
- to_object,
3023
- ['function_calls'],
3024
- [
3025
- _FunctionCall_from_vertex(item, to_object)
3026
- for item in getv(from_object, ['functionCalls'])
3027
- ],
3028
- )
3029
-
3030
- return to_object
3031
-
3032
-
3033
- def _LiveServerToolCallCancellation_from_mldev(
3034
- from_object: Union[dict[str, Any], object],
3035
- parent_object: Optional[dict[str, Any]] = None,
3036
- ) -> dict[str, Any]:
3037
- to_object: dict[str, Any] = {}
3038
- if getv(from_object, ['ids']) is not None:
3039
- setv(to_object, ['ids'], getv(from_object, ['ids']))
2570
+ for item in getv(from_object, ['functionCalls'])
2571
+ ],
2572
+ )
3040
2573
 
3041
2574
  return to_object
3042
2575
 
3043
2576
 
3044
- def _LiveServerToolCallCancellation_from_vertex(
2577
+ def _LiveServerToolCallCancellation_from_mldev(
3045
2578
  from_object: Union[dict[str, Any], object],
3046
2579
  parent_object: Optional[dict[str, Any]] = None,
3047
2580
  ) -> dict[str, Any]:
@@ -3066,20 +2599,6 @@ def _ModalityTokenCount_from_mldev(
3066
2599
  return to_object
3067
2600
 
3068
2601
 
3069
- def _ModalityTokenCount_from_vertex(
3070
- from_object: Union[dict[str, Any], object],
3071
- parent_object: Optional[dict[str, Any]] = None,
3072
- ) -> dict[str, Any]:
3073
- to_object: dict[str, Any] = {}
3074
- if getv(from_object, ['modality']) is not None:
3075
- setv(to_object, ['modality'], getv(from_object, ['modality']))
3076
-
3077
- if getv(from_object, ['tokenCount']) is not None:
3078
- setv(to_object, ['token_count'], getv(from_object, ['tokenCount']))
3079
-
3080
- return to_object
3081
-
3082
-
3083
2602
  def _UsageMetadata_from_mldev(
3084
2603
  from_object: Union[dict[str, Any], object],
3085
2604
  parent_object: Optional[dict[str, Any]] = None,
@@ -3168,162 +2687,275 @@ def _UsageMetadata_from_mldev(
3168
2687
  return to_object
3169
2688
 
3170
2689
 
3171
- def _UsageMetadata_from_vertex(
2690
+ def _LiveServerGoAway_from_mldev(
3172
2691
  from_object: Union[dict[str, Any], object],
3173
2692
  parent_object: Optional[dict[str, Any]] = None,
3174
2693
  ) -> dict[str, Any]:
3175
2694
  to_object: dict[str, Any] = {}
3176
- if getv(from_object, ['promptTokenCount']) is not None:
2695
+ if getv(from_object, ['timeLeft']) is not None:
2696
+ setv(to_object, ['time_left'], getv(from_object, ['timeLeft']))
2697
+
2698
+ return to_object
2699
+
2700
+
2701
+ def _LiveServerSessionResumptionUpdate_from_mldev(
2702
+ from_object: Union[dict[str, Any], object],
2703
+ parent_object: Optional[dict[str, Any]] = None,
2704
+ ) -> dict[str, Any]:
2705
+ to_object: dict[str, Any] = {}
2706
+ if getv(from_object, ['newHandle']) is not None:
2707
+ setv(to_object, ['new_handle'], getv(from_object, ['newHandle']))
2708
+
2709
+ if getv(from_object, ['resumable']) is not None:
2710
+ setv(to_object, ['resumable'], getv(from_object, ['resumable']))
2711
+
2712
+ if getv(from_object, ['lastConsumedClientMessageIndex']) is not None:
3177
2713
  setv(
3178
2714
  to_object,
3179
- ['prompt_token_count'],
3180
- getv(from_object, ['promptTokenCount']),
2715
+ ['last_consumed_client_message_index'],
2716
+ getv(from_object, ['lastConsumedClientMessageIndex']),
3181
2717
  )
3182
2718
 
3183
- if getv(from_object, ['cachedContentTokenCount']) is not None:
2719
+ return to_object
2720
+
2721
+
2722
+ def _LiveServerMessage_from_mldev(
2723
+ from_object: Union[dict[str, Any], object],
2724
+ parent_object: Optional[dict[str, Any]] = None,
2725
+ ) -> dict[str, Any]:
2726
+ to_object: dict[str, Any] = {}
2727
+ if getv(from_object, ['setupComplete']) is not None:
3184
2728
  setv(
3185
2729
  to_object,
3186
- ['cached_content_token_count'],
3187
- getv(from_object, ['cachedContentTokenCount']),
2730
+ ['setup_complete'],
2731
+ _LiveServerSetupComplete_from_mldev(
2732
+ getv(from_object, ['setupComplete']), to_object
2733
+ ),
3188
2734
  )
3189
2735
 
3190
- if getv(from_object, ['candidatesTokenCount']) is not None:
2736
+ if getv(from_object, ['serverContent']) is not None:
3191
2737
  setv(
3192
2738
  to_object,
3193
- ['response_token_count'],
3194
- getv(from_object, ['candidatesTokenCount']),
2739
+ ['server_content'],
2740
+ _LiveServerContent_from_mldev(
2741
+ getv(from_object, ['serverContent']), to_object
2742
+ ),
3195
2743
  )
3196
2744
 
3197
- if getv(from_object, ['toolUsePromptTokenCount']) is not None:
2745
+ if getv(from_object, ['toolCall']) is not None:
3198
2746
  setv(
3199
2747
  to_object,
3200
- ['tool_use_prompt_token_count'],
3201
- getv(from_object, ['toolUsePromptTokenCount']),
2748
+ ['tool_call'],
2749
+ _LiveServerToolCall_from_mldev(
2750
+ getv(from_object, ['toolCall']), to_object
2751
+ ),
3202
2752
  )
3203
2753
 
3204
- if getv(from_object, ['thoughtsTokenCount']) is not None:
2754
+ if getv(from_object, ['toolCallCancellation']) is not None:
3205
2755
  setv(
3206
2756
  to_object,
3207
- ['thoughts_token_count'],
3208
- getv(from_object, ['thoughtsTokenCount']),
2757
+ ['tool_call_cancellation'],
2758
+ _LiveServerToolCallCancellation_from_mldev(
2759
+ getv(from_object, ['toolCallCancellation']), to_object
2760
+ ),
3209
2761
  )
3210
2762
 
3211
- if getv(from_object, ['totalTokenCount']) is not None:
2763
+ if getv(from_object, ['usageMetadata']) is not None:
3212
2764
  setv(
3213
- to_object, ['total_token_count'], getv(from_object, ['totalTokenCount'])
2765
+ to_object,
2766
+ ['usage_metadata'],
2767
+ _UsageMetadata_from_mldev(
2768
+ getv(from_object, ['usageMetadata']), to_object
2769
+ ),
3214
2770
  )
3215
2771
 
3216
- if getv(from_object, ['promptTokensDetails']) is not None:
2772
+ if getv(from_object, ['goAway']) is not None:
3217
2773
  setv(
3218
2774
  to_object,
3219
- ['prompt_tokens_details'],
3220
- [
3221
- _ModalityTokenCount_from_vertex(item, to_object)
3222
- for item in getv(from_object, ['promptTokensDetails'])
3223
- ],
2775
+ ['go_away'],
2776
+ _LiveServerGoAway_from_mldev(getv(from_object, ['goAway']), to_object),
3224
2777
  )
3225
2778
 
3226
- if getv(from_object, ['cacheTokensDetails']) is not None:
2779
+ if getv(from_object, ['sessionResumptionUpdate']) is not None:
3227
2780
  setv(
3228
2781
  to_object,
3229
- ['cache_tokens_details'],
3230
- [
3231
- _ModalityTokenCount_from_vertex(item, to_object)
3232
- for item in getv(from_object, ['cacheTokensDetails'])
3233
- ],
2782
+ ['session_resumption_update'],
2783
+ _LiveServerSessionResumptionUpdate_from_mldev(
2784
+ getv(from_object, ['sessionResumptionUpdate']), to_object
2785
+ ),
3234
2786
  )
3235
2787
 
3236
- if getv(from_object, ['candidatesTokensDetails']) is not None:
2788
+ return to_object
2789
+
2790
+
2791
+ def _LiveMusicServerSetupComplete_from_mldev(
2792
+ from_object: Union[dict[str, Any], object],
2793
+ parent_object: Optional[dict[str, Any]] = None,
2794
+ ) -> dict[str, Any]:
2795
+ to_object: dict[str, Any] = {}
2796
+
2797
+ return to_object
2798
+
2799
+
2800
+ def _WeightedPrompt_from_mldev(
2801
+ from_object: Union[dict[str, Any], object],
2802
+ parent_object: Optional[dict[str, Any]] = None,
2803
+ ) -> dict[str, Any]:
2804
+ to_object: dict[str, Any] = {}
2805
+ if getv(from_object, ['text']) is not None:
2806
+ setv(to_object, ['text'], getv(from_object, ['text']))
2807
+
2808
+ if getv(from_object, ['weight']) is not None:
2809
+ setv(to_object, ['weight'], getv(from_object, ['weight']))
2810
+
2811
+ return to_object
2812
+
2813
+
2814
+ def _LiveMusicClientContent_from_mldev(
2815
+ from_object: Union[dict[str, Any], object],
2816
+ parent_object: Optional[dict[str, Any]] = None,
2817
+ ) -> dict[str, Any]:
2818
+ to_object: dict[str, Any] = {}
2819
+ if getv(from_object, ['weightedPrompts']) is not None:
3237
2820
  setv(
3238
2821
  to_object,
3239
- ['response_tokens_details'],
2822
+ ['weighted_prompts'],
3240
2823
  [
3241
- _ModalityTokenCount_from_vertex(item, to_object)
3242
- for item in getv(from_object, ['candidatesTokensDetails'])
2824
+ _WeightedPrompt_from_mldev(item, to_object)
2825
+ for item in getv(from_object, ['weightedPrompts'])
3243
2826
  ],
3244
2827
  )
3245
2828
 
3246
- if getv(from_object, ['toolUsePromptTokensDetails']) is not None:
2829
+ return to_object
2830
+
2831
+
2832
+ def _LiveMusicGenerationConfig_from_mldev(
2833
+ from_object: Union[dict[str, Any], object],
2834
+ parent_object: Optional[dict[str, Any]] = None,
2835
+ ) -> dict[str, Any]:
2836
+ to_object: dict[str, Any] = {}
2837
+ if getv(from_object, ['temperature']) is not None:
2838
+ setv(to_object, ['temperature'], getv(from_object, ['temperature']))
2839
+
2840
+ if getv(from_object, ['topK']) is not None:
2841
+ setv(to_object, ['top_k'], getv(from_object, ['topK']))
2842
+
2843
+ if getv(from_object, ['seed']) is not None:
2844
+ setv(to_object, ['seed'], getv(from_object, ['seed']))
2845
+
2846
+ if getv(from_object, ['guidance']) is not None:
2847
+ setv(to_object, ['guidance'], getv(from_object, ['guidance']))
2848
+
2849
+ if getv(from_object, ['bpm']) is not None:
2850
+ setv(to_object, ['bpm'], getv(from_object, ['bpm']))
2851
+
2852
+ if getv(from_object, ['density']) is not None:
2853
+ setv(to_object, ['density'], getv(from_object, ['density']))
2854
+
2855
+ if getv(from_object, ['brightness']) is not None:
2856
+ setv(to_object, ['brightness'], getv(from_object, ['brightness']))
2857
+
2858
+ if getv(from_object, ['scale']) is not None:
2859
+ setv(to_object, ['scale'], getv(from_object, ['scale']))
2860
+
2861
+ if getv(from_object, ['muteBass']) is not None:
2862
+ setv(to_object, ['mute_bass'], getv(from_object, ['muteBass']))
2863
+
2864
+ if getv(from_object, ['muteDrums']) is not None:
2865
+ setv(to_object, ['mute_drums'], getv(from_object, ['muteDrums']))
2866
+
2867
+ if getv(from_object, ['onlyBassAndDrums']) is not None:
3247
2868
  setv(
3248
2869
  to_object,
3249
- ['tool_use_prompt_tokens_details'],
3250
- [
3251
- _ModalityTokenCount_from_vertex(item, to_object)
3252
- for item in getv(from_object, ['toolUsePromptTokensDetails'])
3253
- ],
2870
+ ['only_bass_and_drums'],
2871
+ getv(from_object, ['onlyBassAndDrums']),
3254
2872
  )
3255
2873
 
3256
- if getv(from_object, ['trafficType']) is not None:
3257
- setv(to_object, ['traffic_type'], getv(from_object, ['trafficType']))
3258
-
3259
2874
  return to_object
3260
2875
 
3261
2876
 
3262
- def _LiveServerGoAway_from_mldev(
2877
+ def _LiveMusicSourceMetadata_from_mldev(
3263
2878
  from_object: Union[dict[str, Any], object],
3264
2879
  parent_object: Optional[dict[str, Any]] = None,
3265
2880
  ) -> dict[str, Any]:
3266
2881
  to_object: dict[str, Any] = {}
3267
- if getv(from_object, ['timeLeft']) is not None:
3268
- setv(to_object, ['time_left'], getv(from_object, ['timeLeft']))
2882
+ if getv(from_object, ['clientContent']) is not None:
2883
+ setv(
2884
+ to_object,
2885
+ ['client_content'],
2886
+ _LiveMusicClientContent_from_mldev(
2887
+ getv(from_object, ['clientContent']), to_object
2888
+ ),
2889
+ )
2890
+
2891
+ if getv(from_object, ['musicGenerationConfig']) is not None:
2892
+ setv(
2893
+ to_object,
2894
+ ['music_generation_config'],
2895
+ _LiveMusicGenerationConfig_from_mldev(
2896
+ getv(from_object, ['musicGenerationConfig']), to_object
2897
+ ),
2898
+ )
3269
2899
 
3270
2900
  return to_object
3271
2901
 
3272
2902
 
3273
- def _LiveServerGoAway_from_vertex(
2903
+ def _AudioChunk_from_mldev(
3274
2904
  from_object: Union[dict[str, Any], object],
3275
2905
  parent_object: Optional[dict[str, Any]] = None,
3276
2906
  ) -> dict[str, Any]:
3277
2907
  to_object: dict[str, Any] = {}
3278
- if getv(from_object, ['timeLeft']) is not None:
3279
- setv(to_object, ['time_left'], getv(from_object, ['timeLeft']))
2908
+ if getv(from_object, ['data']) is not None:
2909
+ setv(to_object, ['data'], getv(from_object, ['data']))
2910
+
2911
+ if getv(from_object, ['mimeType']) is not None:
2912
+ setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
2913
+
2914
+ if getv(from_object, ['sourceMetadata']) is not None:
2915
+ setv(
2916
+ to_object,
2917
+ ['source_metadata'],
2918
+ _LiveMusicSourceMetadata_from_mldev(
2919
+ getv(from_object, ['sourceMetadata']), to_object
2920
+ ),
2921
+ )
3280
2922
 
3281
2923
  return to_object
3282
2924
 
3283
2925
 
3284
- def _LiveServerSessionResumptionUpdate_from_mldev(
2926
+ def _LiveMusicServerContent_from_mldev(
3285
2927
  from_object: Union[dict[str, Any], object],
3286
2928
  parent_object: Optional[dict[str, Any]] = None,
3287
2929
  ) -> dict[str, Any]:
3288
2930
  to_object: dict[str, Any] = {}
3289
- if getv(from_object, ['newHandle']) is not None:
3290
- setv(to_object, ['new_handle'], getv(from_object, ['newHandle']))
3291
-
3292
- if getv(from_object, ['resumable']) is not None:
3293
- setv(to_object, ['resumable'], getv(from_object, ['resumable']))
3294
-
3295
- if getv(from_object, ['lastConsumedClientMessageIndex']) is not None:
2931
+ if getv(from_object, ['audioChunks']) is not None:
3296
2932
  setv(
3297
2933
  to_object,
3298
- ['last_consumed_client_message_index'],
3299
- getv(from_object, ['lastConsumedClientMessageIndex']),
2934
+ ['audio_chunks'],
2935
+ [
2936
+ _AudioChunk_from_mldev(item, to_object)
2937
+ for item in getv(from_object, ['audioChunks'])
2938
+ ],
3300
2939
  )
3301
2940
 
3302
2941
  return to_object
3303
2942
 
3304
2943
 
3305
- def _LiveServerSessionResumptionUpdate_from_vertex(
2944
+ def _LiveMusicFilteredPrompt_from_mldev(
3306
2945
  from_object: Union[dict[str, Any], object],
3307
2946
  parent_object: Optional[dict[str, Any]] = None,
3308
2947
  ) -> dict[str, Any]:
3309
2948
  to_object: dict[str, Any] = {}
3310
- if getv(from_object, ['newHandle']) is not None:
3311
- setv(to_object, ['new_handle'], getv(from_object, ['newHandle']))
3312
-
3313
- if getv(from_object, ['resumable']) is not None:
3314
- setv(to_object, ['resumable'], getv(from_object, ['resumable']))
2949
+ if getv(from_object, ['text']) is not None:
2950
+ setv(to_object, ['text'], getv(from_object, ['text']))
3315
2951
 
3316
- if getv(from_object, ['lastConsumedClientMessageIndex']) is not None:
3317
- setv(
3318
- to_object,
3319
- ['last_consumed_client_message_index'],
3320
- getv(from_object, ['lastConsumedClientMessageIndex']),
3321
- )
2952
+ if getv(from_object, ['filteredReason']) is not None:
2953
+ setv(to_object, ['filtered_reason'], getv(from_object, ['filteredReason']))
3322
2954
 
3323
2955
  return to_object
3324
2956
 
3325
2957
 
3326
- def _LiveServerMessage_from_mldev(
2958
+ def _LiveMusicServerMessage_from_mldev(
3327
2959
  from_object: Union[dict[str, Any], object],
3328
2960
  parent_object: Optional[dict[str, Any]] = None,
3329
2961
  ) -> dict[str, Any]:
@@ -3332,7 +2964,7 @@ def _LiveServerMessage_from_mldev(
3332
2964
  setv(
3333
2965
  to_object,
3334
2966
  ['setup_complete'],
3335
- _LiveServerSetupComplete_from_mldev(
2967
+ _LiveMusicServerSetupComplete_from_mldev(
3336
2968
  getv(from_object, ['setupComplete']), to_object
3337
2969
  ),
3338
2970
  )
@@ -3341,145 +2973,171 @@ def _LiveServerMessage_from_mldev(
3341
2973
  setv(
3342
2974
  to_object,
3343
2975
  ['server_content'],
3344
- _LiveServerContent_from_mldev(
2976
+ _LiveMusicServerContent_from_mldev(
3345
2977
  getv(from_object, ['serverContent']), to_object
3346
2978
  ),
3347
2979
  )
3348
2980
 
3349
- if getv(from_object, ['toolCall']) is not None:
2981
+ if getv(from_object, ['filteredPrompt']) is not None:
3350
2982
  setv(
3351
2983
  to_object,
3352
- ['tool_call'],
3353
- _LiveServerToolCall_from_mldev(
3354
- getv(from_object, ['toolCall']), to_object
2984
+ ['filtered_prompt'],
2985
+ _LiveMusicFilteredPrompt_from_mldev(
2986
+ getv(from_object, ['filteredPrompt']), to_object
3355
2987
  ),
3356
2988
  )
3357
2989
 
3358
- if getv(from_object, ['toolCallCancellation']) is not None:
3359
- setv(
3360
- to_object,
3361
- ['tool_call_cancellation'],
3362
- _LiveServerToolCallCancellation_from_mldev(
3363
- getv(from_object, ['toolCallCancellation']), to_object
3364
- ),
3365
- )
2990
+ return to_object
3366
2991
 
3367
- if getv(from_object, ['usageMetadata']) is not None:
3368
- setv(
3369
- to_object,
3370
- ['usage_metadata'],
3371
- _UsageMetadata_from_mldev(
3372
- getv(from_object, ['usageMetadata']), to_object
3373
- ),
3374
- )
3375
2992
 
3376
- if getv(from_object, ['goAway']) is not None:
3377
- setv(
3378
- to_object,
3379
- ['go_away'],
3380
- _LiveServerGoAway_from_mldev(getv(from_object, ['goAway']), to_object),
3381
- )
2993
+ def _LiveServerSetupComplete_from_vertex(
2994
+ from_object: Union[dict[str, Any], object],
2995
+ parent_object: Optional[dict[str, Any]] = None,
2996
+ ) -> dict[str, Any]:
2997
+ to_object: dict[str, Any] = {}
2998
+ if getv(from_object, ['sessionId']) is not None:
2999
+ setv(to_object, ['session_id'], getv(from_object, ['sessionId']))
3382
3000
 
3383
- if getv(from_object, ['sessionResumptionUpdate']) is not None:
3384
- setv(
3385
- to_object,
3386
- ['session_resumption_update'],
3387
- _LiveServerSessionResumptionUpdate_from_mldev(
3388
- getv(from_object, ['sessionResumptionUpdate']), to_object
3389
- ),
3390
- )
3001
+ return to_object
3002
+
3003
+
3004
+ def _VideoMetadata_from_vertex(
3005
+ from_object: Union[dict[str, Any], object],
3006
+ parent_object: Optional[dict[str, Any]] = None,
3007
+ ) -> dict[str, Any]:
3008
+ to_object: dict[str, Any] = {}
3009
+ if getv(from_object, ['fps']) is not None:
3010
+ setv(to_object, ['fps'], getv(from_object, ['fps']))
3011
+
3012
+ if getv(from_object, ['endOffset']) is not None:
3013
+ setv(to_object, ['end_offset'], getv(from_object, ['endOffset']))
3014
+
3015
+ if getv(from_object, ['startOffset']) is not None:
3016
+ setv(to_object, ['start_offset'], getv(from_object, ['startOffset']))
3391
3017
 
3392
3018
  return to_object
3393
3019
 
3394
3020
 
3395
- def _LiveServerMessage_from_vertex(
3021
+ def _Blob_from_vertex(
3396
3022
  from_object: Union[dict[str, Any], object],
3397
3023
  parent_object: Optional[dict[str, Any]] = None,
3398
3024
  ) -> dict[str, Any]:
3399
3025
  to_object: dict[str, Any] = {}
3400
- if getv(from_object, ['setupComplete']) is not None:
3401
- setv(
3402
- to_object,
3403
- ['setup_complete'],
3404
- _LiveServerSetupComplete_from_vertex(
3405
- getv(from_object, ['setupComplete']), to_object
3406
- ),
3407
- )
3026
+ if getv(from_object, ['displayName']) is not None:
3027
+ setv(to_object, ['display_name'], getv(from_object, ['displayName']))
3408
3028
 
3409
- if getv(from_object, ['serverContent']) is not None:
3029
+ if getv(from_object, ['data']) is not None:
3030
+ setv(to_object, ['data'], getv(from_object, ['data']))
3031
+
3032
+ if getv(from_object, ['mimeType']) is not None:
3033
+ setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
3034
+
3035
+ return to_object
3036
+
3037
+
3038
+ def _FileData_from_vertex(
3039
+ from_object: Union[dict[str, Any], object],
3040
+ parent_object: Optional[dict[str, Any]] = None,
3041
+ ) -> dict[str, Any]:
3042
+ to_object: dict[str, Any] = {}
3043
+ if getv(from_object, ['displayName']) is not None:
3044
+ setv(to_object, ['display_name'], getv(from_object, ['displayName']))
3045
+
3046
+ if getv(from_object, ['fileUri']) is not None:
3047
+ setv(to_object, ['file_uri'], getv(from_object, ['fileUri']))
3048
+
3049
+ if getv(from_object, ['mimeType']) is not None:
3050
+ setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
3051
+
3052
+ return to_object
3053
+
3054
+
3055
+ def _Part_from_vertex(
3056
+ from_object: Union[dict[str, Any], object],
3057
+ parent_object: Optional[dict[str, Any]] = None,
3058
+ ) -> dict[str, Any]:
3059
+ to_object: dict[str, Any] = {}
3060
+ if getv(from_object, ['videoMetadata']) is not None:
3410
3061
  setv(
3411
3062
  to_object,
3412
- ['server_content'],
3413
- _LiveServerContent_from_vertex(
3414
- getv(from_object, ['serverContent']), to_object
3063
+ ['video_metadata'],
3064
+ _VideoMetadata_from_vertex(
3065
+ getv(from_object, ['videoMetadata']), to_object
3415
3066
  ),
3416
3067
  )
3417
3068
 
3418
- if getv(from_object, ['toolCall']) is not None:
3069
+ if getv(from_object, ['thought']) is not None:
3070
+ setv(to_object, ['thought'], getv(from_object, ['thought']))
3071
+
3072
+ if getv(from_object, ['inlineData']) is not None:
3419
3073
  setv(
3420
3074
  to_object,
3421
- ['tool_call'],
3422
- _LiveServerToolCall_from_vertex(
3423
- getv(from_object, ['toolCall']), to_object
3424
- ),
3075
+ ['inline_data'],
3076
+ _Blob_from_vertex(getv(from_object, ['inlineData']), to_object),
3425
3077
  )
3426
3078
 
3427
- if getv(from_object, ['toolCallCancellation']) is not None:
3079
+ if getv(from_object, ['fileData']) is not None:
3428
3080
  setv(
3429
3081
  to_object,
3430
- ['tool_call_cancellation'],
3431
- _LiveServerToolCallCancellation_from_vertex(
3432
- getv(from_object, ['toolCallCancellation']), to_object
3433
- ),
3082
+ ['file_data'],
3083
+ _FileData_from_vertex(getv(from_object, ['fileData']), to_object),
3434
3084
  )
3435
3085
 
3436
- if getv(from_object, ['usageMetadata']) is not None:
3086
+ if getv(from_object, ['thoughtSignature']) is not None:
3437
3087
  setv(
3438
3088
  to_object,
3439
- ['usage_metadata'],
3440
- _UsageMetadata_from_vertex(
3441
- getv(from_object, ['usageMetadata']), to_object
3442
- ),
3089
+ ['thought_signature'],
3090
+ getv(from_object, ['thoughtSignature']),
3443
3091
  )
3444
3092
 
3445
- if getv(from_object, ['goAway']) is not None:
3093
+ if getv(from_object, ['codeExecutionResult']) is not None:
3446
3094
  setv(
3447
3095
  to_object,
3448
- ['go_away'],
3449
- _LiveServerGoAway_from_vertex(getv(from_object, ['goAway']), to_object),
3096
+ ['code_execution_result'],
3097
+ getv(from_object, ['codeExecutionResult']),
3450
3098
  )
3451
3099
 
3452
- if getv(from_object, ['sessionResumptionUpdate']) is not None:
3100
+ if getv(from_object, ['executableCode']) is not None:
3101
+ setv(to_object, ['executable_code'], getv(from_object, ['executableCode']))
3102
+
3103
+ if getv(from_object, ['functionCall']) is not None:
3104
+ setv(to_object, ['function_call'], getv(from_object, ['functionCall']))
3105
+
3106
+ if getv(from_object, ['functionResponse']) is not None:
3453
3107
  setv(
3454
3108
  to_object,
3455
- ['session_resumption_update'],
3456
- _LiveServerSessionResumptionUpdate_from_vertex(
3457
- getv(from_object, ['sessionResumptionUpdate']), to_object
3458
- ),
3109
+ ['function_response'],
3110
+ getv(from_object, ['functionResponse']),
3459
3111
  )
3460
3112
 
3461
- return to_object
3462
-
3463
-
3464
- def _LiveMusicServerSetupComplete_from_mldev(
3465
- from_object: Union[dict[str, Any], object],
3466
- parent_object: Optional[dict[str, Any]] = None,
3467
- ) -> dict[str, Any]:
3468
- to_object: dict[str, Any] = {}
3113
+ if getv(from_object, ['text']) is not None:
3114
+ setv(to_object, ['text'], getv(from_object, ['text']))
3469
3115
 
3470
3116
  return to_object
3471
3117
 
3472
3118
 
3473
- def _LiveMusicServerSetupComplete_from_vertex(
3119
+ def _Content_from_vertex(
3474
3120
  from_object: Union[dict[str, Any], object],
3475
3121
  parent_object: Optional[dict[str, Any]] = None,
3476
3122
  ) -> dict[str, Any]:
3477
3123
  to_object: dict[str, Any] = {}
3124
+ if getv(from_object, ['parts']) is not None:
3125
+ setv(
3126
+ to_object,
3127
+ ['parts'],
3128
+ [
3129
+ _Part_from_vertex(item, to_object)
3130
+ for item in getv(from_object, ['parts'])
3131
+ ],
3132
+ )
3133
+
3134
+ if getv(from_object, ['role']) is not None:
3135
+ setv(to_object, ['role'], getv(from_object, ['role']))
3478
3136
 
3479
3137
  return to_object
3480
3138
 
3481
3139
 
3482
- def _WeightedPrompt_from_mldev(
3140
+ def _Transcription_from_vertex(
3483
3141
  from_object: Union[dict[str, Any], object],
3484
3142
  parent_object: Optional[dict[str, Any]] = None,
3485
3143
  ) -> dict[str, Any]:
@@ -3487,237 +3145,247 @@ def _WeightedPrompt_from_mldev(
3487
3145
  if getv(from_object, ['text']) is not None:
3488
3146
  setv(to_object, ['text'], getv(from_object, ['text']))
3489
3147
 
3490
- if getv(from_object, ['weight']) is not None:
3491
- setv(to_object, ['weight'], getv(from_object, ['weight']))
3148
+ if getv(from_object, ['finished']) is not None:
3149
+ setv(to_object, ['finished'], getv(from_object, ['finished']))
3492
3150
 
3493
3151
  return to_object
3494
3152
 
3495
3153
 
3496
- def _WeightedPrompt_from_vertex(
3154
+ def _LiveServerContent_from_vertex(
3497
3155
  from_object: Union[dict[str, Any], object],
3498
3156
  parent_object: Optional[dict[str, Any]] = None,
3499
3157
  ) -> dict[str, Any]:
3500
3158
  to_object: dict[str, Any] = {}
3159
+ if getv(from_object, ['modelTurn']) is not None:
3160
+ setv(
3161
+ to_object,
3162
+ ['model_turn'],
3163
+ _Content_from_vertex(getv(from_object, ['modelTurn']), to_object),
3164
+ )
3501
3165
 
3502
- return to_object
3166
+ if getv(from_object, ['turnComplete']) is not None:
3167
+ setv(to_object, ['turn_complete'], getv(from_object, ['turnComplete']))
3168
+
3169
+ if getv(from_object, ['interrupted']) is not None:
3170
+ setv(to_object, ['interrupted'], getv(from_object, ['interrupted']))
3503
3171
 
3172
+ if getv(from_object, ['groundingMetadata']) is not None:
3173
+ setv(
3174
+ to_object,
3175
+ ['grounding_metadata'],
3176
+ getv(from_object, ['groundingMetadata']),
3177
+ )
3504
3178
 
3505
- def _LiveMusicClientContent_from_mldev(
3506
- from_object: Union[dict[str, Any], object],
3507
- parent_object: Optional[dict[str, Any]] = None,
3508
- ) -> dict[str, Any]:
3509
- to_object: dict[str, Any] = {}
3510
- if getv(from_object, ['weightedPrompts']) is not None:
3179
+ if getv(from_object, ['generationComplete']) is not None:
3511
3180
  setv(
3512
3181
  to_object,
3513
- ['weighted_prompts'],
3514
- [
3515
- _WeightedPrompt_from_mldev(item, to_object)
3516
- for item in getv(from_object, ['weightedPrompts'])
3517
- ],
3182
+ ['generation_complete'],
3183
+ getv(from_object, ['generationComplete']),
3184
+ )
3185
+
3186
+ if getv(from_object, ['inputTranscription']) is not None:
3187
+ setv(
3188
+ to_object,
3189
+ ['input_transcription'],
3190
+ _Transcription_from_vertex(
3191
+ getv(from_object, ['inputTranscription']), to_object
3192
+ ),
3193
+ )
3194
+
3195
+ if getv(from_object, ['outputTranscription']) is not None:
3196
+ setv(
3197
+ to_object,
3198
+ ['output_transcription'],
3199
+ _Transcription_from_vertex(
3200
+ getv(from_object, ['outputTranscription']), to_object
3201
+ ),
3518
3202
  )
3519
3203
 
3520
3204
  return to_object
3521
3205
 
3522
3206
 
3523
- def _LiveMusicClientContent_from_vertex(
3207
+ def _FunctionCall_from_vertex(
3524
3208
  from_object: Union[dict[str, Any], object],
3525
3209
  parent_object: Optional[dict[str, Any]] = None,
3526
3210
  ) -> dict[str, Any]:
3527
3211
  to_object: dict[str, Any] = {}
3528
3212
 
3213
+ if getv(from_object, ['args']) is not None:
3214
+ setv(to_object, ['args'], getv(from_object, ['args']))
3215
+
3216
+ if getv(from_object, ['name']) is not None:
3217
+ setv(to_object, ['name'], getv(from_object, ['name']))
3218
+
3529
3219
  return to_object
3530
3220
 
3531
3221
 
3532
- def _LiveMusicGenerationConfig_from_mldev(
3222
+ def _LiveServerToolCall_from_vertex(
3533
3223
  from_object: Union[dict[str, Any], object],
3534
3224
  parent_object: Optional[dict[str, Any]] = None,
3535
3225
  ) -> dict[str, Any]:
3536
3226
  to_object: dict[str, Any] = {}
3537
- if getv(from_object, ['temperature']) is not None:
3538
- setv(to_object, ['temperature'], getv(from_object, ['temperature']))
3539
-
3540
- if getv(from_object, ['topK']) is not None:
3541
- setv(to_object, ['top_k'], getv(from_object, ['topK']))
3542
-
3543
- if getv(from_object, ['seed']) is not None:
3544
- setv(to_object, ['seed'], getv(from_object, ['seed']))
3545
-
3546
- if getv(from_object, ['guidance']) is not None:
3547
- setv(to_object, ['guidance'], getv(from_object, ['guidance']))
3548
-
3549
- if getv(from_object, ['bpm']) is not None:
3550
- setv(to_object, ['bpm'], getv(from_object, ['bpm']))
3551
-
3552
- if getv(from_object, ['density']) is not None:
3553
- setv(to_object, ['density'], getv(from_object, ['density']))
3554
-
3555
- if getv(from_object, ['brightness']) is not None:
3556
- setv(to_object, ['brightness'], getv(from_object, ['brightness']))
3557
-
3558
- if getv(from_object, ['scale']) is not None:
3559
- setv(to_object, ['scale'], getv(from_object, ['scale']))
3560
-
3561
- if getv(from_object, ['muteBass']) is not None:
3562
- setv(to_object, ['mute_bass'], getv(from_object, ['muteBass']))
3563
-
3564
- if getv(from_object, ['muteDrums']) is not None:
3565
- setv(to_object, ['mute_drums'], getv(from_object, ['muteDrums']))
3566
-
3567
- if getv(from_object, ['onlyBassAndDrums']) is not None:
3227
+ if getv(from_object, ['functionCalls']) is not None:
3568
3228
  setv(
3569
3229
  to_object,
3570
- ['only_bass_and_drums'],
3571
- getv(from_object, ['onlyBassAndDrums']),
3230
+ ['function_calls'],
3231
+ [
3232
+ _FunctionCall_from_vertex(item, to_object)
3233
+ for item in getv(from_object, ['functionCalls'])
3234
+ ],
3572
3235
  )
3573
3236
 
3574
3237
  return to_object
3575
3238
 
3576
3239
 
3577
- def _LiveMusicGenerationConfig_from_vertex(
3240
+ def _LiveServerToolCallCancellation_from_vertex(
3578
3241
  from_object: Union[dict[str, Any], object],
3579
3242
  parent_object: Optional[dict[str, Any]] = None,
3580
3243
  ) -> dict[str, Any]:
3581
3244
  to_object: dict[str, Any] = {}
3245
+ if getv(from_object, ['ids']) is not None:
3246
+ setv(to_object, ['ids'], getv(from_object, ['ids']))
3582
3247
 
3583
3248
  return to_object
3584
3249
 
3585
3250
 
3586
- def _LiveMusicSourceMetadata_from_mldev(
3251
+ def _ModalityTokenCount_from_vertex(
3587
3252
  from_object: Union[dict[str, Any], object],
3588
3253
  parent_object: Optional[dict[str, Any]] = None,
3589
3254
  ) -> dict[str, Any]:
3590
3255
  to_object: dict[str, Any] = {}
3591
- if getv(from_object, ['clientContent']) is not None:
3592
- setv(
3593
- to_object,
3594
- ['client_content'],
3595
- _LiveMusicClientContent_from_mldev(
3596
- getv(from_object, ['clientContent']), to_object
3597
- ),
3598
- )
3256
+ if getv(from_object, ['modality']) is not None:
3257
+ setv(to_object, ['modality'], getv(from_object, ['modality']))
3599
3258
 
3600
- if getv(from_object, ['musicGenerationConfig']) is not None:
3601
- setv(
3602
- to_object,
3603
- ['music_generation_config'],
3604
- _LiveMusicGenerationConfig_from_mldev(
3605
- getv(from_object, ['musicGenerationConfig']), to_object
3606
- ),
3607
- )
3259
+ if getv(from_object, ['tokenCount']) is not None:
3260
+ setv(to_object, ['token_count'], getv(from_object, ['tokenCount']))
3608
3261
 
3609
3262
  return to_object
3610
3263
 
3611
3264
 
3612
- def _LiveMusicSourceMetadata_from_vertex(
3265
+ def _UsageMetadata_from_vertex(
3613
3266
  from_object: Union[dict[str, Any], object],
3614
3267
  parent_object: Optional[dict[str, Any]] = None,
3615
3268
  ) -> dict[str, Any]:
3616
3269
  to_object: dict[str, Any] = {}
3617
- if getv(from_object, ['clientContent']) is not None:
3270
+ if getv(from_object, ['promptTokenCount']) is not None:
3618
3271
  setv(
3619
3272
  to_object,
3620
- ['client_content'],
3621
- _LiveMusicClientContent_from_vertex(
3622
- getv(from_object, ['clientContent']), to_object
3623
- ),
3273
+ ['prompt_token_count'],
3274
+ getv(from_object, ['promptTokenCount']),
3624
3275
  )
3625
3276
 
3626
- if getv(from_object, ['musicGenerationConfig']) is not None:
3277
+ if getv(from_object, ['cachedContentTokenCount']) is not None:
3627
3278
  setv(
3628
3279
  to_object,
3629
- ['music_generation_config'],
3630
- _LiveMusicGenerationConfig_from_vertex(
3631
- getv(from_object, ['musicGenerationConfig']), to_object
3632
- ),
3280
+ ['cached_content_token_count'],
3281
+ getv(from_object, ['cachedContentTokenCount']),
3633
3282
  )
3634
3283
 
3635
- return to_object
3636
-
3637
-
3638
- def _AudioChunk_from_mldev(
3639
- from_object: Union[dict[str, Any], object],
3640
- parent_object: Optional[dict[str, Any]] = None,
3641
- ) -> dict[str, Any]:
3642
- to_object: dict[str, Any] = {}
3643
- if getv(from_object, ['data']) is not None:
3644
- setv(to_object, ['data'], getv(from_object, ['data']))
3645
-
3646
- if getv(from_object, ['mimeType']) is not None:
3647
- setv(to_object, ['mime_type'], getv(from_object, ['mimeType']))
3284
+ if getv(from_object, ['candidatesTokenCount']) is not None:
3285
+ setv(
3286
+ to_object,
3287
+ ['response_token_count'],
3288
+ getv(from_object, ['candidatesTokenCount']),
3289
+ )
3648
3290
 
3649
- if getv(from_object, ['sourceMetadata']) is not None:
3291
+ if getv(from_object, ['toolUsePromptTokenCount']) is not None:
3650
3292
  setv(
3651
3293
  to_object,
3652
- ['source_metadata'],
3653
- _LiveMusicSourceMetadata_from_mldev(
3654
- getv(from_object, ['sourceMetadata']), to_object
3655
- ),
3294
+ ['tool_use_prompt_token_count'],
3295
+ getv(from_object, ['toolUsePromptTokenCount']),
3656
3296
  )
3657
3297
 
3658
- return to_object
3298
+ if getv(from_object, ['thoughtsTokenCount']) is not None:
3299
+ setv(
3300
+ to_object,
3301
+ ['thoughts_token_count'],
3302
+ getv(from_object, ['thoughtsTokenCount']),
3303
+ )
3659
3304
 
3305
+ if getv(from_object, ['totalTokenCount']) is not None:
3306
+ setv(
3307
+ to_object, ['total_token_count'], getv(from_object, ['totalTokenCount'])
3308
+ )
3660
3309
 
3661
- def _AudioChunk_from_vertex(
3662
- from_object: Union[dict[str, Any], object],
3663
- parent_object: Optional[dict[str, Any]] = None,
3664
- ) -> dict[str, Any]:
3665
- to_object: dict[str, Any] = {}
3310
+ if getv(from_object, ['promptTokensDetails']) is not None:
3311
+ setv(
3312
+ to_object,
3313
+ ['prompt_tokens_details'],
3314
+ [
3315
+ _ModalityTokenCount_from_vertex(item, to_object)
3316
+ for item in getv(from_object, ['promptTokensDetails'])
3317
+ ],
3318
+ )
3666
3319
 
3667
- return to_object
3320
+ if getv(from_object, ['cacheTokensDetails']) is not None:
3321
+ setv(
3322
+ to_object,
3323
+ ['cache_tokens_details'],
3324
+ [
3325
+ _ModalityTokenCount_from_vertex(item, to_object)
3326
+ for item in getv(from_object, ['cacheTokensDetails'])
3327
+ ],
3328
+ )
3668
3329
 
3330
+ if getv(from_object, ['candidatesTokensDetails']) is not None:
3331
+ setv(
3332
+ to_object,
3333
+ ['response_tokens_details'],
3334
+ [
3335
+ _ModalityTokenCount_from_vertex(item, to_object)
3336
+ for item in getv(from_object, ['candidatesTokensDetails'])
3337
+ ],
3338
+ )
3669
3339
 
3670
- def _LiveMusicServerContent_from_mldev(
3671
- from_object: Union[dict[str, Any], object],
3672
- parent_object: Optional[dict[str, Any]] = None,
3673
- ) -> dict[str, Any]:
3674
- to_object: dict[str, Any] = {}
3675
- if getv(from_object, ['audioChunks']) is not None:
3340
+ if getv(from_object, ['toolUsePromptTokensDetails']) is not None:
3676
3341
  setv(
3677
3342
  to_object,
3678
- ['audio_chunks'],
3343
+ ['tool_use_prompt_tokens_details'],
3679
3344
  [
3680
- _AudioChunk_from_mldev(item, to_object)
3681
- for item in getv(from_object, ['audioChunks'])
3345
+ _ModalityTokenCount_from_vertex(item, to_object)
3346
+ for item in getv(from_object, ['toolUsePromptTokensDetails'])
3682
3347
  ],
3683
3348
  )
3684
3349
 
3350
+ if getv(from_object, ['trafficType']) is not None:
3351
+ setv(to_object, ['traffic_type'], getv(from_object, ['trafficType']))
3352
+
3685
3353
  return to_object
3686
3354
 
3687
3355
 
3688
- def _LiveMusicServerContent_from_vertex(
3356
+ def _LiveServerGoAway_from_vertex(
3689
3357
  from_object: Union[dict[str, Any], object],
3690
3358
  parent_object: Optional[dict[str, Any]] = None,
3691
3359
  ) -> dict[str, Any]:
3692
3360
  to_object: dict[str, Any] = {}
3361
+ if getv(from_object, ['timeLeft']) is not None:
3362
+ setv(to_object, ['time_left'], getv(from_object, ['timeLeft']))
3693
3363
 
3694
3364
  return to_object
3695
3365
 
3696
3366
 
3697
- def _LiveMusicFilteredPrompt_from_mldev(
3367
+ def _LiveServerSessionResumptionUpdate_from_vertex(
3698
3368
  from_object: Union[dict[str, Any], object],
3699
3369
  parent_object: Optional[dict[str, Any]] = None,
3700
3370
  ) -> dict[str, Any]:
3701
3371
  to_object: dict[str, Any] = {}
3702
- if getv(from_object, ['text']) is not None:
3703
- setv(to_object, ['text'], getv(from_object, ['text']))
3704
-
3705
- if getv(from_object, ['filteredReason']) is not None:
3706
- setv(to_object, ['filtered_reason'], getv(from_object, ['filteredReason']))
3707
-
3708
- return to_object
3372
+ if getv(from_object, ['newHandle']) is not None:
3373
+ setv(to_object, ['new_handle'], getv(from_object, ['newHandle']))
3709
3374
 
3375
+ if getv(from_object, ['resumable']) is not None:
3376
+ setv(to_object, ['resumable'], getv(from_object, ['resumable']))
3710
3377
 
3711
- def _LiveMusicFilteredPrompt_from_vertex(
3712
- from_object: Union[dict[str, Any], object],
3713
- parent_object: Optional[dict[str, Any]] = None,
3714
- ) -> dict[str, Any]:
3715
- to_object: dict[str, Any] = {}
3378
+ if getv(from_object, ['lastConsumedClientMessageIndex']) is not None:
3379
+ setv(
3380
+ to_object,
3381
+ ['last_consumed_client_message_index'],
3382
+ getv(from_object, ['lastConsumedClientMessageIndex']),
3383
+ )
3716
3384
 
3717
3385
  return to_object
3718
3386
 
3719
3387
 
3720
- def _LiveMusicServerMessage_from_mldev(
3388
+ def _LiveServerMessage_from_vertex(
3721
3389
  from_object: Union[dict[str, Any], object],
3722
3390
  parent_object: Optional[dict[str, Any]] = None,
3723
3391
  ) -> dict[str, Any]:
@@ -3726,7 +3394,7 @@ def _LiveMusicServerMessage_from_mldev(
3726
3394
  setv(
3727
3395
  to_object,
3728
3396
  ['setup_complete'],
3729
- _LiveMusicServerSetupComplete_from_mldev(
3397
+ _LiveServerSetupComplete_from_vertex(
3730
3398
  getv(from_object, ['setupComplete']), to_object
3731
3399
  ),
3732
3400
  )
@@ -3735,17 +3403,51 @@ def _LiveMusicServerMessage_from_mldev(
3735
3403
  setv(
3736
3404
  to_object,
3737
3405
  ['server_content'],
3738
- _LiveMusicServerContent_from_mldev(
3406
+ _LiveServerContent_from_vertex(
3739
3407
  getv(from_object, ['serverContent']), to_object
3740
3408
  ),
3741
3409
  )
3742
3410
 
3743
- if getv(from_object, ['filteredPrompt']) is not None:
3411
+ if getv(from_object, ['toolCall']) is not None:
3744
3412
  setv(
3745
3413
  to_object,
3746
- ['filtered_prompt'],
3747
- _LiveMusicFilteredPrompt_from_mldev(
3748
- getv(from_object, ['filteredPrompt']), to_object
3414
+ ['tool_call'],
3415
+ _LiveServerToolCall_from_vertex(
3416
+ getv(from_object, ['toolCall']), to_object
3417
+ ),
3418
+ )
3419
+
3420
+ if getv(from_object, ['toolCallCancellation']) is not None:
3421
+ setv(
3422
+ to_object,
3423
+ ['tool_call_cancellation'],
3424
+ _LiveServerToolCallCancellation_from_vertex(
3425
+ getv(from_object, ['toolCallCancellation']), to_object
3426
+ ),
3427
+ )
3428
+
3429
+ if getv(from_object, ['usageMetadata']) is not None:
3430
+ setv(
3431
+ to_object,
3432
+ ['usage_metadata'],
3433
+ _UsageMetadata_from_vertex(
3434
+ getv(from_object, ['usageMetadata']), to_object
3435
+ ),
3436
+ )
3437
+
3438
+ if getv(from_object, ['goAway']) is not None:
3439
+ setv(
3440
+ to_object,
3441
+ ['go_away'],
3442
+ _LiveServerGoAway_from_vertex(getv(from_object, ['goAway']), to_object),
3443
+ )
3444
+
3445
+ if getv(from_object, ['sessionResumptionUpdate']) is not None:
3446
+ setv(
3447
+ to_object,
3448
+ ['session_resumption_update'],
3449
+ _LiveServerSessionResumptionUpdate_from_vertex(
3450
+ getv(from_object, ['sessionResumptionUpdate']), to_object
3749
3451
  ),
3750
3452
  )
3751
3453