@@ -145,6 +145,61 @@ void videoGenerationReferenceTypeMldevEnumValidate(Object enumValue) {
145145 }
146146 }
147147
148+ @ ExcludeFromGeneratedCoverageReport
149+ ObjectNode audioTranscriptionConfigToMldev (
150+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
151+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
152+ if (!Common .isZero (Common .getValueByPath (fromObject , new String [] {"languageCodes" }))) {
153+ throw new IllegalArgumentException (
154+ "languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not"
155+ + " in Gemini Developer API mode." );
156+ }
157+
158+ if (Common .getValueByPath (fromObject , new String [] {"languageAuto" }) != null ) {
159+ Common .setValueByPath (
160+ toObject ,
161+ new String [] {"languageAuto" },
162+ Common .getValueByPath (fromObject , new String [] {"languageAuto" }));
163+ }
164+
165+ if (Common .getValueByPath (fromObject , new String [] {"languageHints" }) != null ) {
166+ Common .setValueByPath (
167+ toObject ,
168+ new String [] {"languageHints" },
169+ Common .getValueByPath (fromObject , new String [] {"languageHints" }));
170+ }
171+
172+ if (Common .getValueByPath (fromObject , new String [] {"customVocabulary" }) != null ) {
173+ Common .setValueByPath (
174+ toObject ,
175+ new String [] {"customVocabulary" },
176+ Common .getValueByPath (fromObject , new String [] {"customVocabulary" }));
177+ }
178+
179+ if (Common .getValueByPath (fromObject , new String [] {"adaptationPhrases" }) != null ) {
180+ Common .setValueByPath (
181+ toObject ,
182+ new String [] {"adaptationPhrases" },
183+ Common .getValueByPath (fromObject , new String [] {"adaptationPhrases" }));
184+ }
185+
186+ if (Common .getValueByPath (fromObject , new String [] {"diarization" }) != null ) {
187+ Common .setValueByPath (
188+ toObject ,
189+ new String [] {"diarization" },
190+ Common .getValueByPath (fromObject , new String [] {"diarization" }));
191+ }
192+
193+ if (Common .getValueByPath (fromObject , new String [] {"wordTimestamp" }) != null ) {
194+ Common .setValueByPath (
195+ toObject ,
196+ new String [] {"wordTimestamp" },
197+ Common .getValueByPath (fromObject , new String [] {"wordTimestamp" }));
198+ }
199+
200+ return toObject ;
201+ }
202+
148203 @ ExcludeFromGeneratedCoverageReport
149204 ObjectNode authConfigToMldev (JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
150205 ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
@@ -1757,6 +1812,17 @@ ObjectNode generateContentConfigToMldev(
17571812 Common .getValueByPath (fromObject , new String [] {"serviceTier" }));
17581813 }
17591814
1815+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }) != null ) {
1816+ Common .setValueByPath (
1817+ toObject ,
1818+ new String [] {"audioTranscriptionConfig" },
1819+ audioTranscriptionConfigToMldev (
1820+ JsonSerializable .toJsonNode (
1821+ Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" })),
1822+ toObject ,
1823+ rootObject ));
1824+ }
1825+
17601826 return toObject ;
17611827 }
17621828
@@ -2009,6 +2075,13 @@ ObjectNode generateContentConfigToVertex(
20092075 Common .getValueByPath (fromObject , new String [] {"serviceTier" }));
20102076 }
20112077
2078+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }) != null ) {
2079+ Common .setValueByPath (
2080+ toObject ,
2081+ new String [] {"audioTranscriptionConfig" },
2082+ Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }));
2083+ }
2084+
20122085 return toObject ;
20132086 }
20142087
@@ -3579,6 +3652,13 @@ ObjectNode generationConfigToVertex(
35793652 + " Gemini Enterprise Agent Platform mode." );
35803653 }
35813654
3655+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }) != null ) {
3656+ Common .setValueByPath (
3657+ toObject ,
3658+ new String [] {"audioTranscriptionConfig" },
3659+ Common .getValueByPath (fromObject , new String [] {"audioTranscriptionConfig" }));
3660+ }
3661+
35823662 return toObject ;
35833663 }
35843664
@@ -4412,6 +4492,13 @@ ObjectNode partToMldev(JsonNode fromObject, ObjectNode parentObject, JsonNode ro
44124492 Common .getValueByPath (fromObject , new String [] {"partMetadata" }));
44134493 }
44144494
4495+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscription" }) != null ) {
4496+ Common .setValueByPath (
4497+ toObject ,
4498+ new String [] {"audioTranscription" },
4499+ Common .getValueByPath (fromObject , new String [] {"audioTranscription" }));
4500+ }
4501+
44154502 return toObject ;
44164503 }
44174504
@@ -4521,6 +4608,13 @@ ObjectNode partToVertex(JsonNode fromObject, ObjectNode parentObject, JsonNode r
45214608 + " Enterprise Agent Platform mode." );
45224609 }
45234610
4611+ if (Common .getValueByPath (fromObject , new String [] {"audioTranscription" }) != null ) {
4612+ Common .setValueByPath (
4613+ toObject ,
4614+ new String [] {"audioTranscription" },
4615+ Common .getValueByPath (fromObject , new String [] {"audioTranscription" }));
4616+ }
4617+
45244618 return toObject ;
45254619 }
45264620
0 commit comments