@@ -384,8 +384,11 @@ internal JsonNode GenerationConfigToVertex(JsonNode fromObject, JsonObject paren
384384 }
385385
386386 if ( Common . GetValueByPath ( fromObject , new string [ ] { "speechConfig" } ) != null ) {
387- Common . SetValueByPath ( toObject , new string [ ] { "speechConfig" } ,
388- Common . GetValueByPath ( fromObject , new string [ ] { "speechConfig" } ) ) ;
387+ Common . SetValueByPath (
388+ toObject , new string [ ] { "speechConfig" } ,
389+ SpeechConfigToVertex ( Common . ParseToJsonNode ( Common . GetValueByPath (
390+ fromObject , new string [ ] { "speechConfig" } ) ) ,
391+ toObject ) ) ;
389392 }
390393
391394 if ( Common . GetValueByPath ( fromObject , new string [ ] { "stopSequences" } ) != null ) {
@@ -1092,10 +1095,12 @@ internal JsonNode LiveConnectConfigToVertex(JsonNode fromObject, JsonObject pare
10921095 }
10931096
10941097 if ( Common . GetValueByPath ( fromObject , new string [ ] { "speechConfig" } ) != null ) {
1095- Common . SetValueByPath ( parentObject ,
1096- new string [ ] { "setup" , "generationConfig" , "speechConfig" } ,
1097- Transformers . TLiveSpeechConfig ( Common . GetValueByPath (
1098- fromObject , new string [ ] { "speechConfig" } ) ) ) ;
1098+ Common . SetValueByPath (
1099+ parentObject , new string [ ] { "setup" , "generationConfig" , "speechConfig" } ,
1100+ SpeechConfigToVertex (
1101+ Common . ParseToJsonNode ( Transformers . TLiveSpeechConfig (
1102+ Common . GetValueByPath ( fromObject , new string [ ] { "speechConfig" } ) ) ) ,
1103+ toObject ) ) ;
10991104 }
11001105
11011106 if ( Common . GetValueByPath ( fromObject , new string [ ] { "thinkingConfig" } ) != null ) {
@@ -1466,6 +1471,24 @@ internal JsonNode McpServerToVertex(JsonNode fromObject, JsonObject parentObject
14661471 return toObject ;
14671472 }
14681473
1474+ internal JsonNode MultiSpeakerVoiceConfigToVertex ( JsonNode fromObject ,
1475+ JsonObject parentObject ) {
1476+ JsonObject toObject = new JsonObject ( ) ;
1477+
1478+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "speakerVoiceConfigs" } ) != null ) {
1479+ JsonArray keyArray =
1480+ ( JsonArray ) Common . GetValueByPath ( fromObject , new string [ ] { "speakerVoiceConfigs" } ) ;
1481+ JsonArray result = new JsonArray ( ) ;
1482+
1483+ foreach ( var record in keyArray ) {
1484+ result . Add ( SpeakerVoiceConfigToVertex ( Common . ParseToJsonNode ( record ) , toObject ) ) ;
1485+ }
1486+ Common . SetValueByPath ( toObject , new string [ ] { "speakerVoiceConfigs" } , result ) ;
1487+ }
1488+
1489+ return toObject ;
1490+ }
1491+
14691492 internal JsonNode PartToMldev ( JsonNode fromObject , JsonObject parentObject ) {
14701493 JsonObject toObject = new JsonObject ( ) ;
14711494
@@ -1637,6 +1660,34 @@ internal JsonNode PartToVertex(JsonNode fromObject, JsonObject parentObject) {
16371660 return toObject ;
16381661 }
16391662
1663+ internal JsonNode ReplicatedVoiceConfigToVertex ( JsonNode fromObject , JsonObject parentObject ) {
1664+ JsonObject toObject = new JsonObject ( ) ;
1665+
1666+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "mimeType" } ) != null ) {
1667+ Common . SetValueByPath ( toObject , new string [ ] { "mimeType" } ,
1668+ Common . GetValueByPath ( fromObject , new string [ ] { "mimeType" } ) ) ;
1669+ }
1670+
1671+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "voiceSampleAudio" } ) != null ) {
1672+ Common . SetValueByPath (
1673+ toObject , new string [ ] { "voiceSampleAudio" } ,
1674+ Common . GetValueByPath ( fromObject , new string [ ] { "voiceSampleAudio" } ) ) ;
1675+ }
1676+
1677+ if ( ! Common . IsZero ( Common . GetValueByPath ( fromObject , new string [ ] { "consentAudio" } ) ) ) {
1678+ throw new NotSupportedException (
1679+ "consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode." ) ;
1680+ }
1681+
1682+ if ( ! Common . IsZero (
1683+ Common . GetValueByPath ( fromObject , new string [ ] { "voiceConsentSignature" } ) ) ) {
1684+ throw new NotSupportedException (
1685+ "voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode." ) ;
1686+ }
1687+
1688+ return toObject ;
1689+ }
1690+
16401691 internal JsonNode SafetySettingToMldev ( JsonNode fromObject , JsonObject parentObject ) {
16411692 JsonObject toObject = new JsonObject ( ) ;
16421693
@@ -1674,6 +1725,50 @@ internal JsonNode SessionResumptionConfigToMldev(JsonNode fromObject, JsonObject
16741725 return toObject ;
16751726 }
16761727
1728+ internal JsonNode SpeakerVoiceConfigToVertex ( JsonNode fromObject , JsonObject parentObject ) {
1729+ JsonObject toObject = new JsonObject ( ) ;
1730+
1731+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "speaker" } ) != null ) {
1732+ Common . SetValueByPath ( toObject , new string [ ] { "speaker" } ,
1733+ Common . GetValueByPath ( fromObject , new string [ ] { "speaker" } ) ) ;
1734+ }
1735+
1736+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "voiceConfig" } ) != null ) {
1737+ Common . SetValueByPath ( toObject , new string [ ] { "voiceConfig" } ,
1738+ VoiceConfigToVertex ( Common . ParseToJsonNode ( Common . GetValueByPath (
1739+ fromObject , new string [ ] { "voiceConfig" } ) ) ,
1740+ toObject ) ) ;
1741+ }
1742+
1743+ return toObject ;
1744+ }
1745+
1746+ internal JsonNode SpeechConfigToVertex ( JsonNode fromObject , JsonObject parentObject ) {
1747+ JsonObject toObject = new JsonObject ( ) ;
1748+
1749+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "voiceConfig" } ) != null ) {
1750+ Common . SetValueByPath ( toObject , new string [ ] { "voiceConfig" } ,
1751+ VoiceConfigToVertex ( Common . ParseToJsonNode ( Common . GetValueByPath (
1752+ fromObject , new string [ ] { "voiceConfig" } ) ) ,
1753+ toObject ) ) ;
1754+ }
1755+
1756+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "languageCode" } ) != null ) {
1757+ Common . SetValueByPath ( toObject , new string [ ] { "languageCode" } ,
1758+ Common . GetValueByPath ( fromObject , new string [ ] { "languageCode" } ) ) ;
1759+ }
1760+
1761+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "multiSpeakerVoiceConfig" } ) != null ) {
1762+ Common . SetValueByPath ( toObject , new string [ ] { "multiSpeakerVoiceConfig" } ,
1763+ MultiSpeakerVoiceConfigToVertex (
1764+ Common . ParseToJsonNode ( Common . GetValueByPath (
1765+ fromObject , new string [ ] { "multiSpeakerVoiceConfig" } ) ) ,
1766+ toObject ) ) ;
1767+ }
1768+
1769+ return toObject ;
1770+ }
1771+
16771772 internal JsonNode ToolToMldev ( JsonNode fromObject , JsonObject parentObject ) {
16781773 JsonObject toObject = new JsonObject ( ) ;
16791774
@@ -1938,5 +2033,25 @@ internal JsonNode VoiceActivityFromVertex(JsonNode fromObject, JsonObject parent
19382033
19392034 return toObject ;
19402035 }
2036+
2037+ internal JsonNode VoiceConfigToVertex ( JsonNode fromObject , JsonObject parentObject ) {
2038+ JsonObject toObject = new JsonObject ( ) ;
2039+
2040+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "replicatedVoiceConfig" } ) != null ) {
2041+ Common . SetValueByPath ( toObject , new string [ ] { "replicatedVoiceConfig" } ,
2042+ ReplicatedVoiceConfigToVertex (
2043+ Common . ParseToJsonNode ( Common . GetValueByPath (
2044+ fromObject , new string [ ] { "replicatedVoiceConfig" } ) ) ,
2045+ toObject ) ) ;
2046+ }
2047+
2048+ if ( Common . GetValueByPath ( fromObject , new string [ ] { "prebuiltVoiceConfig" } ) != null ) {
2049+ Common . SetValueByPath (
2050+ toObject , new string [ ] { "prebuiltVoiceConfig" } ,
2051+ Common . GetValueByPath ( fromObject , new string [ ] { "prebuiltVoiceConfig" } ) ) ;
2052+ }
2053+
2054+ return toObject ;
2055+ }
19412056 }
19422057}
0 commit comments