@@ -1818,8 +1818,12 @@ ObjectNode generateContentConfigToVertex(
18181818 Common .setValueByPath (
18191819 toObject ,
18201820 new String [] {"speechConfig" },
1821- Transformers .tSpeechConfig (
1822- Common .getValueByPath (fromObject , new String [] {"speechConfig" })));
1821+ speechConfigToVertex (
1822+ JsonSerializable .toJsonNode (
1823+ Transformers .tSpeechConfig (
1824+ Common .getValueByPath (fromObject , new String [] {"speechConfig" }))),
1825+ toObject ,
1826+ rootObject ));
18231827 }
18241828
18251829 if (Common .getValueByPath (fromObject , new String [] {"audioTimestamp" }) != null ) {
@@ -3305,7 +3309,11 @@ ObjectNode generationConfigToVertex(
33053309 Common .setValueByPath (
33063310 toObject ,
33073311 new String [] {"speechConfig" },
3308- Common .getValueByPath (fromObject , new String [] {"speechConfig" }));
3312+ speechConfigToVertex (
3313+ JsonSerializable .toJsonNode (
3314+ Common .getValueByPath (fromObject , new String [] {"speechConfig" })),
3315+ toObject ,
3316+ rootObject ));
33093317 }
33103318
33113319 if (Common .getValueByPath (fromObject , new String [] {"stopSequences" }) != null ) {
@@ -4021,6 +4029,26 @@ ObjectNode modelFromVertex(JsonNode fromObject, ObjectNode parentObject, JsonNod
40214029 return toObject ;
40224030 }
40234031
4032+ @ ExcludeFromGeneratedCoverageReport
4033+ ObjectNode multiSpeakerVoiceConfigToVertex (
4034+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4035+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4036+ if (Common .getValueByPath (fromObject , new String [] {"speakerVoiceConfigs" }) != null ) {
4037+ ArrayNode keyArray =
4038+ (ArrayNode ) Common .getValueByPath (fromObject , new String [] {"speakerVoiceConfigs" });
4039+ ObjectMapper objectMapper = new ObjectMapper ();
4040+ ArrayNode result = objectMapper .createArrayNode ();
4041+
4042+ for (JsonNode item : keyArray ) {
4043+ result .add (
4044+ speakerVoiceConfigToVertex (JsonSerializable .toJsonNode (item ), toObject , rootObject ));
4045+ }
4046+ Common .setValueByPath (toObject , new String [] {"speakerVoiceConfigs" }, result );
4047+ }
4048+
4049+ return toObject ;
4050+ }
4051+
40244052 @ ExcludeFromGeneratedCoverageReport
40254053 ObjectNode partToMldev (JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
40264054 ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
@@ -4493,6 +4521,27 @@ ObjectNode referenceImageAPIToVertex(
44934521 return toObject ;
44944522 }
44954523
4524+ @ ExcludeFromGeneratedCoverageReport
4525+ ObjectNode replicatedVoiceConfigToVertex (
4526+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4527+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4528+ if (Common .getValueByPath (fromObject , new String [] {"mimeType" }) != null ) {
4529+ Common .setValueByPath (
4530+ toObject ,
4531+ new String [] {"mimeType" },
4532+ Common .getValueByPath (fromObject , new String [] {"mimeType" }));
4533+ }
4534+
4535+ if (Common .getValueByPath (fromObject , new String [] {"voiceSampleAudio" }) != null ) {
4536+ Common .setValueByPath (
4537+ toObject ,
4538+ new String [] {"voiceSampleAudio" },
4539+ Common .getValueByPath (fromObject , new String [] {"voiceSampleAudio" }));
4540+ }
4541+
4542+ return toObject ;
4543+ }
4544+
44964545 @ ExcludeFromGeneratedCoverageReport
44974546 ObjectNode safetyAttributesFromMldev (
44984547 JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
@@ -4733,6 +4782,67 @@ ObjectNode segmentImageSourceToVertex(
47334782 return toObject ;
47344783 }
47354784
4785+ @ ExcludeFromGeneratedCoverageReport
4786+ ObjectNode speakerVoiceConfigToVertex (
4787+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4788+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4789+ if (Common .getValueByPath (fromObject , new String [] {"speaker" }) != null ) {
4790+ Common .setValueByPath (
4791+ toObject ,
4792+ new String [] {"speaker" },
4793+ Common .getValueByPath (fromObject , new String [] {"speaker" }));
4794+ }
4795+
4796+ if (Common .getValueByPath (fromObject , new String [] {"voiceConfig" }) != null ) {
4797+ Common .setValueByPath (
4798+ toObject ,
4799+ new String [] {"voiceConfig" },
4800+ voiceConfigToVertex (
4801+ JsonSerializable .toJsonNode (
4802+ Common .getValueByPath (fromObject , new String [] {"voiceConfig" })),
4803+ toObject ,
4804+ rootObject ));
4805+ }
4806+
4807+ return toObject ;
4808+ }
4809+
4810+ @ ExcludeFromGeneratedCoverageReport
4811+ ObjectNode speechConfigToVertex (
4812+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4813+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4814+ if (Common .getValueByPath (fromObject , new String [] {"voiceConfig" }) != null ) {
4815+ Common .setValueByPath (
4816+ toObject ,
4817+ new String [] {"voiceConfig" },
4818+ voiceConfigToVertex (
4819+ JsonSerializable .toJsonNode (
4820+ Common .getValueByPath (fromObject , new String [] {"voiceConfig" })),
4821+ toObject ,
4822+ rootObject ));
4823+ }
4824+
4825+ if (Common .getValueByPath (fromObject , new String [] {"languageCode" }) != null ) {
4826+ Common .setValueByPath (
4827+ toObject ,
4828+ new String [] {"languageCode" },
4829+ Common .getValueByPath (fromObject , new String [] {"languageCode" }));
4830+ }
4831+
4832+ if (Common .getValueByPath (fromObject , new String [] {"multiSpeakerVoiceConfig" }) != null ) {
4833+ Common .setValueByPath (
4834+ toObject ,
4835+ new String [] {"multiSpeakerVoiceConfig" },
4836+ multiSpeakerVoiceConfigToVertex (
4837+ JsonSerializable .toJsonNode (
4838+ Common .getValueByPath (fromObject , new String [] {"multiSpeakerVoiceConfig" })),
4839+ toObject ,
4840+ rootObject ));
4841+ }
4842+
4843+ return toObject ;
4844+ }
4845+
47364846 @ ExcludeFromGeneratedCoverageReport
47374847 ObjectNode toolConfigToMldev (JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
47384848 ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
@@ -5445,6 +5555,31 @@ ObjectNode videoToVertex(JsonNode fromObject, ObjectNode parentObject, JsonNode
54455555 return toObject ;
54465556 }
54475557
5558+ @ ExcludeFromGeneratedCoverageReport
5559+ ObjectNode voiceConfigToVertex (
5560+ JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
5561+ ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
5562+ if (Common .getValueByPath (fromObject , new String [] {"replicatedVoiceConfig" }) != null ) {
5563+ Common .setValueByPath (
5564+ toObject ,
5565+ new String [] {"replicatedVoiceConfig" },
5566+ replicatedVoiceConfigToVertex (
5567+ JsonSerializable .toJsonNode (
5568+ Common .getValueByPath (fromObject , new String [] {"replicatedVoiceConfig" })),
5569+ toObject ,
5570+ rootObject ));
5571+ }
5572+
5573+ if (Common .getValueByPath (fromObject , new String [] {"prebuiltVoiceConfig" }) != null ) {
5574+ Common .setValueByPath (
5575+ toObject ,
5576+ new String [] {"prebuiltVoiceConfig" },
5577+ Common .getValueByPath (fromObject , new String [] {"prebuiltVoiceConfig" }));
5578+ }
5579+
5580+ return toObject ;
5581+ }
5582+
54485583 /** A shared buildRequest method for both sync and async methods. */
54495584 BuiltRequest buildRequestForPrivateGenerateContent (
54505585 String model , List <Content > contents , GenerateContentConfig config ) {
0 commit comments