From 258c406c6d38f676d1961691453742cd6402cc45 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Wed, 13 Mar 2024 12:31:51 -0500 Subject: [PATCH] fix(stt): change smartFormattingVersion to a Long --- .../watson/speech_to_text/v1/model/CreateJobOptions.java | 8 ++++---- .../watson/speech_to_text/v1/model/RecognizeOptions.java | 8 ++++---- .../ibm/watson/speech_to_text/v1/SpeechToTextTest.java | 8 ++++---- .../speech_to_text/v1/model/CreateJobOptionsTest.java | 4 ++-- .../speech_to_text/v1/model/RecognizeOptionsTest.java | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java index 68797cc44f..6508138f67 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java @@ -229,7 +229,7 @@ public interface Events { protected Boolean timestamps; protected Boolean profanityFilter; protected Boolean smartFormatting; - protected Boolean smartFormattingVersion; + protected Long smartFormattingVersion; protected Boolean speakerLabels; protected String grammarName; protected Boolean redaction; @@ -265,7 +265,7 @@ public static class Builder { private Boolean timestamps; private Boolean profanityFilter; private Boolean smartFormatting; - private Boolean smartFormattingVersion; + private Long smartFormattingVersion; private Boolean speakerLabels; private String grammarName; private Boolean redaction; @@ -582,7 +582,7 @@ public Builder smartFormatting(Boolean smartFormatting) { * @param smartFormattingVersion the smartFormattingVersion * @return the CreateJobOptions builder */ - public Builder smartFormattingVersion(Boolean smartFormattingVersion) { + public Builder smartFormattingVersion(long smartFormattingVersion) { this.smartFormattingVersion = smartFormattingVersion; return this; } @@ -1122,7 +1122,7 @@ public Boolean smartFormatting() { * * @return the smartFormattingVersion */ - public Boolean smartFormattingVersion() { + public Long smartFormattingVersion() { return smartFormattingVersion; } diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java index ed65d04773..94476fbdb5 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptions.java @@ -197,7 +197,7 @@ public interface Model { protected Boolean timestamps; protected Boolean profanityFilter; protected Boolean smartFormatting; - protected Boolean smartFormattingVersion; + protected Long smartFormattingVersion; protected Boolean speakerLabels; protected String grammarName; protected Boolean redaction; @@ -227,7 +227,7 @@ public static class Builder { private Boolean timestamps; private Boolean profanityFilter; private Boolean smartFormatting; - private Boolean smartFormattingVersion; + private Long smartFormattingVersion; private Boolean speakerLabels; private String grammarName; private Boolean redaction; @@ -492,7 +492,7 @@ public Builder smartFormatting(Boolean smartFormatting) { * @param smartFormattingVersion the smartFormattingVersion * @return the RecognizeOptions builder */ - public Builder smartFormattingVersion(Boolean smartFormattingVersion) { + public Builder smartFormattingVersion(long smartFormattingVersion) { this.smartFormattingVersion = smartFormattingVersion; return this; } @@ -934,7 +934,7 @@ public Boolean smartFormatting() { * * @return the smartFormattingVersion */ - public Boolean smartFormattingVersion() { + public Long smartFormattingVersion() { return smartFormattingVersion; } diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java index c93b424a76..1c340b1772 100755 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/SpeechToTextTest.java @@ -239,7 +239,7 @@ public void testRecognizeWOptions() throws Throwable { .timestamps(false) .profanityFilter(true) .smartFormatting(false) - .smartFormattingVersion(false) + .smartFormattingVersion(Long.valueOf("0")) .speakerLabels(false) .grammarName("testString") .redaction(false) @@ -284,7 +284,7 @@ public void testRecognizeWOptions() throws Throwable { assertEquals(Boolean.valueOf(query.get("timestamps")), Boolean.valueOf(false)); assertEquals(Boolean.valueOf(query.get("profanity_filter")), Boolean.valueOf(true)); assertEquals(Boolean.valueOf(query.get("smart_formatting")), Boolean.valueOf(false)); - assertEquals(Boolean.valueOf(query.get("smart_formatting_version")), Boolean.valueOf(false)); + assertEquals(Long.valueOf(query.get("smart_formatting_version")), Long.valueOf("0")); assertEquals(Boolean.valueOf(query.get("speaker_labels")), Boolean.valueOf(false)); assertEquals(query.get("grammar_name"), "testString"); assertEquals(Boolean.valueOf(query.get("redaction")), Boolean.valueOf(false)); @@ -457,7 +457,7 @@ public void testCreateJobWOptions() throws Throwable { .timestamps(false) .profanityFilter(true) .smartFormatting(false) - .smartFormattingVersion(false) + .smartFormattingVersion(Long.valueOf("0")) .speakerLabels(false) .grammarName("testString") .redaction(false) @@ -508,7 +508,7 @@ public void testCreateJobWOptions() throws Throwable { assertEquals(Boolean.valueOf(query.get("timestamps")), Boolean.valueOf(false)); assertEquals(Boolean.valueOf(query.get("profanity_filter")), Boolean.valueOf(true)); assertEquals(Boolean.valueOf(query.get("smart_formatting")), Boolean.valueOf(false)); - assertEquals(Boolean.valueOf(query.get("smart_formatting_version")), Boolean.valueOf(false)); + assertEquals(Long.valueOf(query.get("smart_formatting_version")), Long.valueOf("0")); assertEquals(Boolean.valueOf(query.get("speaker_labels")), Boolean.valueOf(false)); assertEquals(query.get("grammar_name"), "testString"); assertEquals(Boolean.valueOf(query.get("redaction")), Boolean.valueOf(false)); diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptionsTest.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptionsTest.java index 2f4f6858a5..ba87a75647 100644 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptionsTest.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptionsTest.java @@ -53,7 +53,7 @@ public void testCreateJobOptions() throws Throwable { .timestamps(false) .profanityFilter(true) .smartFormatting(false) - .smartFormattingVersion(false) + .smartFormattingVersion(Long.valueOf("0")) .speakerLabels(false) .grammarName("testString") .redaction(false) @@ -89,7 +89,7 @@ public void testCreateJobOptions() throws Throwable { assertEquals(createJobOptionsModel.timestamps(), Boolean.valueOf(false)); assertEquals(createJobOptionsModel.profanityFilter(), Boolean.valueOf(true)); assertEquals(createJobOptionsModel.smartFormatting(), Boolean.valueOf(false)); - assertEquals(createJobOptionsModel.smartFormattingVersion(), Boolean.valueOf(false)); + assertEquals(createJobOptionsModel.smartFormattingVersion(), Long.valueOf("0")); assertEquals(createJobOptionsModel.speakerLabels(), Boolean.valueOf(false)); assertEquals(createJobOptionsModel.grammarName(), "testString"); assertEquals(createJobOptionsModel.redaction(), Boolean.valueOf(false)); diff --git a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptionsTest.java b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptionsTest.java index 8612fee626..f146f693b1 100644 --- a/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptionsTest.java +++ b/speech-to-text/src/test/java/com/ibm/watson/speech_to_text/v1/model/RecognizeOptionsTest.java @@ -49,7 +49,7 @@ public void testRecognizeOptions() throws Throwable { .timestamps(false) .profanityFilter(true) .smartFormatting(false) - .smartFormattingVersion(false) + .smartFormattingVersion(Long.valueOf("0")) .speakerLabels(false) .grammarName("testString") .redaction(false) @@ -79,7 +79,7 @@ public void testRecognizeOptions() throws Throwable { assertEquals(recognizeOptionsModel.timestamps(), Boolean.valueOf(false)); assertEquals(recognizeOptionsModel.profanityFilter(), Boolean.valueOf(true)); assertEquals(recognizeOptionsModel.smartFormatting(), Boolean.valueOf(false)); - assertEquals(recognizeOptionsModel.smartFormattingVersion(), Boolean.valueOf(false)); + assertEquals(recognizeOptionsModel.smartFormattingVersion(), Long.valueOf("0")); assertEquals(recognizeOptionsModel.speakerLabels(), Boolean.valueOf(false)); assertEquals(recognizeOptionsModel.grammarName(), "testString"); assertEquals(recognizeOptionsModel.redaction(), Boolean.valueOf(false));