@@ -1825,12 +1825,8 @@ ObjectNode generateContentConfigToVertex(
18251825 Common .setValueByPath (
18261826 toObject ,
18271827 new String [] {"speechConfig" },
1828- speechConfigToVertex (
1829- JsonSerializable .toJsonNode (
1830- Transformers .tSpeechConfig (
1831- Common .getValueByPath (fromObject , new String [] {"speechConfig" }))),
1832- toObject ,
1833- rootObject ));
1828+ Transformers .tSpeechConfig (
1829+ Common .getValueByPath (fromObject , new String [] {"speechConfig" })));
18341830 }
18351831
18361832 if (Common .getValueByPath (fromObject , new String [] {"audioTimestamp" }) != null ) {
@@ -3334,11 +3330,7 @@ ObjectNode generationConfigToVertex(
33343330 Common .setValueByPath (
33353331 toObject ,
33363332 new String [] {"speechConfig" },
3337- speechConfigToVertex (
3338- JsonSerializable .toJsonNode (
3339- Common .getValueByPath (fromObject , new String [] {"speechConfig" })),
3340- toObject ,
3341- rootObject ));
3333+ Common .getValueByPath (fromObject , new String [] {"speechConfig" }));
33423334 }
33433335
33443336 if (Common .getValueByPath (fromObject , new String [] {"stopSequences" }) != null ) {
@@ -4054,26 +4046,6 @@ ObjectNode modelFromVertex(JsonNode fromObject, ObjectNode parentObject, JsonNod
40544046 return toObject ;
40554047 }
40564048
4057- @ ExcludeFromGeneratedCoverageReport
4058- ObjectNode multiSpeakerVoiceConfigToVertex (
4059- JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4060- ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4061- if (Common .getValueByPath (fromObject , new String [] {"speakerVoiceConfigs" }) != null ) {
4062- ArrayNode keyArray =
4063- (ArrayNode ) Common .getValueByPath (fromObject , new String [] {"speakerVoiceConfigs" });
4064- ObjectMapper objectMapper = new ObjectMapper ();
4065- ArrayNode result = objectMapper .createArrayNode ();
4066-
4067- for (JsonNode item : keyArray ) {
4068- result .add (
4069- speakerVoiceConfigToVertex (JsonSerializable .toJsonNode (item ), toObject , rootObject ));
4070- }
4071- Common .setValueByPath (toObject , new String [] {"speakerVoiceConfigs" }, result );
4072- }
4073-
4074- return toObject ;
4075- }
4076-
40774049 @ ExcludeFromGeneratedCoverageReport
40784050 ObjectNode partToMldev (JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
40794051 ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
@@ -4546,27 +4518,6 @@ ObjectNode referenceImageAPIToVertex(
45464518 return toObject ;
45474519 }
45484520
4549- @ ExcludeFromGeneratedCoverageReport
4550- ObjectNode replicatedVoiceConfigToVertex (
4551- JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4552- ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4553- if (Common .getValueByPath (fromObject , new String [] {"mimeType" }) != null ) {
4554- Common .setValueByPath (
4555- toObject ,
4556- new String [] {"mimeType" },
4557- Common .getValueByPath (fromObject , new String [] {"mimeType" }));
4558- }
4559-
4560- if (Common .getValueByPath (fromObject , new String [] {"voiceSampleAudio" }) != null ) {
4561- Common .setValueByPath (
4562- toObject ,
4563- new String [] {"voiceSampleAudio" },
4564- Common .getValueByPath (fromObject , new String [] {"voiceSampleAudio" }));
4565- }
4566-
4567- return toObject ;
4568- }
4569-
45704521 @ ExcludeFromGeneratedCoverageReport
45714522 ObjectNode safetyAttributesFromMldev (
45724523 JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
@@ -4807,67 +4758,6 @@ ObjectNode segmentImageSourceToVertex(
48074758 return toObject ;
48084759 }
48094760
4810- @ ExcludeFromGeneratedCoverageReport
4811- ObjectNode speakerVoiceConfigToVertex (
4812- JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4813- ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4814- if (Common .getValueByPath (fromObject , new String [] {"speaker" }) != null ) {
4815- Common .setValueByPath (
4816- toObject ,
4817- new String [] {"speaker" },
4818- Common .getValueByPath (fromObject , new String [] {"speaker" }));
4819- }
4820-
4821- if (Common .getValueByPath (fromObject , new String [] {"voiceConfig" }) != null ) {
4822- Common .setValueByPath (
4823- toObject ,
4824- new String [] {"voiceConfig" },
4825- voiceConfigToVertex (
4826- JsonSerializable .toJsonNode (
4827- Common .getValueByPath (fromObject , new String [] {"voiceConfig" })),
4828- toObject ,
4829- rootObject ));
4830- }
4831-
4832- return toObject ;
4833- }
4834-
4835- @ ExcludeFromGeneratedCoverageReport
4836- ObjectNode speechConfigToVertex (
4837- JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
4838- ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
4839- if (Common .getValueByPath (fromObject , new String [] {"voiceConfig" }) != null ) {
4840- Common .setValueByPath (
4841- toObject ,
4842- new String [] {"voiceConfig" },
4843- voiceConfigToVertex (
4844- JsonSerializable .toJsonNode (
4845- Common .getValueByPath (fromObject , new String [] {"voiceConfig" })),
4846- toObject ,
4847- rootObject ));
4848- }
4849-
4850- if (Common .getValueByPath (fromObject , new String [] {"languageCode" }) != null ) {
4851- Common .setValueByPath (
4852- toObject ,
4853- new String [] {"languageCode" },
4854- Common .getValueByPath (fromObject , new String [] {"languageCode" }));
4855- }
4856-
4857- if (Common .getValueByPath (fromObject , new String [] {"multiSpeakerVoiceConfig" }) != null ) {
4858- Common .setValueByPath (
4859- toObject ,
4860- new String [] {"multiSpeakerVoiceConfig" },
4861- multiSpeakerVoiceConfigToVertex (
4862- JsonSerializable .toJsonNode (
4863- Common .getValueByPath (fromObject , new String [] {"multiSpeakerVoiceConfig" })),
4864- toObject ,
4865- rootObject ));
4866- }
4867-
4868- return toObject ;
4869- }
4870-
48714761 @ ExcludeFromGeneratedCoverageReport
48724762 ObjectNode toolConfigToMldev (JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
48734763 ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
@@ -5580,31 +5470,6 @@ ObjectNode videoToVertex(JsonNode fromObject, ObjectNode parentObject, JsonNode
55805470 return toObject ;
55815471 }
55825472
5583- @ ExcludeFromGeneratedCoverageReport
5584- ObjectNode voiceConfigToVertex (
5585- JsonNode fromObject , ObjectNode parentObject , JsonNode rootObject ) {
5586- ObjectNode toObject = JsonSerializable .objectMapper ().createObjectNode ();
5587- if (Common .getValueByPath (fromObject , new String [] {"replicatedVoiceConfig" }) != null ) {
5588- Common .setValueByPath (
5589- toObject ,
5590- new String [] {"replicatedVoiceConfig" },
5591- replicatedVoiceConfigToVertex (
5592- JsonSerializable .toJsonNode (
5593- Common .getValueByPath (fromObject , new String [] {"replicatedVoiceConfig" })),
5594- toObject ,
5595- rootObject ));
5596- }
5597-
5598- if (Common .getValueByPath (fromObject , new String [] {"prebuiltVoiceConfig" }) != null ) {
5599- Common .setValueByPath (
5600- toObject ,
5601- new String [] {"prebuiltVoiceConfig" },
5602- Common .getValueByPath (fromObject , new String [] {"prebuiltVoiceConfig" }));
5603- }
5604-
5605- return toObject ;
5606- }
5607-
56085473 /** A shared buildRequest method for both sync and async methods. */
56095474 BuiltRequest buildRequestForPrivateGenerateContent (
56105475 String model , List <Content > contents , GenerateContentConfig config ) {
0 commit comments