@@ -144,6 +144,54 @@ void videoGenerationReferenceTypeMldevEnumValidate(Object enumValue) {
144144 }
145145 }
146146
147+ @ ExcludeFromGeneratedCoverageReport
148+ ObjectNode audioTranscriptionConfigToMldev (
149+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
150+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
151+ if (!Common .isZero (Common .getValueByPath (fromObject , new String [] {"languageCodes" }))) {
152+ throw new IllegalArgumentException (
153+ "languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not"
154+ + " in Gemini Developer API mode." );
155+ }
156+
157+ if (Common .getValueByPath (fromObject , new String [] {"languageAuto" }) != null ) {
158+ Common .setValueByPath (
159+ toObject ,
160+ new String [] {"languageAuto" },
161+ Common .getValueByPath (fromObject , new String [] {"languageAuto" }));
162+ }
163+
164+ if (Common .getValueByPath (fromObject , new String [] {"languageHints" }) != null ) {
165+ Common .setValueByPath (
166+ toObject ,
167+ new String [] {"languageHints" },
168+ Common .getValueByPath (fromObject , new String [] {"languageHints" }));
169+ }
170+
171+ if (Common .getValueByPath (fromObject , new String [] {"adaptationPhrases" }) != null ) {
172+ Common .setValueByPath (
173+ toObject ,
174+ new String [] {"adaptationPhrases" },
175+ Common .getValueByPath (fromObject , new String [] {"adaptationPhrases" }));
176+ }
177+
178+ if (Common .getValueByPath (fromObject , new String [] {"wordTimestamp" }) != null ) {
179+ Common .setValueByPath (
180+ toObject ,
181+ new String [] {"wordTimestamp" },
182+ Common .getValueByPath (fromObject , new String [] {"wordTimestamp" }));
183+ }
184+
185+ if (Common .getValueByPath (fromObject , new String [] {"diarization" }) != null ) {
186+ Common .setValueByPath (
187+ toObject ,
188+ new String [] {"diarization" },
189+ Common .getValueByPath (fromObject , new String [] {"diarization" }));
190+ }
191+
192+ return toObject ;
193+ }
194+
147195 @ ExcludeFromGeneratedCoverageReport
148196 ObjectNode authConfigToMldev (JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
149197 ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
@@ -1746,6 +1794,17 @@ ObjectNode generateContentConfigToMldev(
17461794 Common .getValueByPath (fromObject , new String [] {"serviceTier" }));
17471795 }
17481796
1797+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }) != null ) {
1798+ Common .setValueByPath (
1799+ toObject ,
1800+ new String [] {"audioTranscriptionConfig" },
1801+ audioTranscriptionConfigToMldev (
1802+ JsonSerializable .toJsonNode (
1803+ Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" })),
1804+ toObject ,
1805+ rootObject ));
1806+ }
1807+
17491808 return toObject ;
17501809 }
17511810
@@ -1998,6 +2057,13 @@ ObjectNode generateContentConfigToVertex(
19982057 Common .getValueByPath (fromObject , new String [] {"serviceTier" }));
19992058 }
20002059
2060+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }) != null ) {
2061+ Common .setValueByPath (
2062+ toObject ,
2063+ new String [] {"audioTranscriptionConfig" },
2064+ Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }));
2065+ }
2066+
20012067 return toObject ;
20022068 }
20032069
@@ -3568,6 +3634,13 @@ ObjectNode generationConfigToVertex(
35683634 + " Gemini Enterprise Agent Platform mode." );
35693635 }
35703636
3637+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }) != null ) {
3638+ Common .setValueByPath (
3639+ toObject ,
3640+ new String [] {"audioTranscriptionConfig" },
3641+ Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }));
3642+ }
3643+
35713644 return toObject ;
35723645 }
35733646
@@ -4401,6 +4474,13 @@ ObjectNode partToMldev(JsonNode fromObject, ObjectNode parentObject, JsonNode ro
44014474 Common .getValueByPath (fromObject , new String [] {"partMetadata" }));
44024475 }
44034476
4477+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscription" }) != null ) {
4478+ Common .setValueByPath (
4479+ toObject ,
4480+ new String [] {"audioTranscription" },
4481+ Common .getValueByPath (fromObject , new String [] {"audioTranscription" }));
4482+ }
4483+
44044484 return toObject ;
44054485 }
44064486
@@ -4510,6 +4590,13 @@ ObjectNode partToVertex(JsonNode fromObject, ObjectNode parentObject, JsonNode r
45104590 + " Enterprise Agent Platform mode." );
45114591 }
45124592
4593+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscription" }) != null ) {
4594+ Common .setValueByPath (
4595+ toObject ,
4596+ new String [] {"audioTranscription" },
4597+ Common .getValueByPath (fromObject , new String [] {"audioTranscription" }));
4598+ }
4599+
45134600 return toObject ;
45144601 }
45154602
0 commit comments