Skip to content

Commit e825419

Browse files
committed
fix(text-to-speech-v1): generated using api def sdk-2021-05-11-rerelease and gen 3.31.0
1 parent e955930 commit e825419

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ public ServiceCall<Prompt> addCustomPrompt(AddCustomPromptOptions addCustomPromp
10711071
multipartBuilder.addFormDataPart("metadata", addCustomPromptOptions.metadata().toString());
10721072
okhttp3.RequestBody fileBody =
10731073
RequestUtils.inputStreamBody(addCustomPromptOptions.file(), "audio/wav");
1074-
multipartBuilder.addFormDataPart("file", addCustomPromptOptions.filename(), fileBody);
1074+
multipartBuilder.addFormDataPart("file", "filename", fileBody);
10751075
builder.body(multipartBuilder.build());
10761076
ResponseConverter<Prompt> responseConverter =
10771077
ResponseConverterUtils.getValue(

text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/model/AddCustomPromptOptions.java

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,19 @@ public class AddCustomPromptOptions extends GenericModel {
2525
protected String promptId;
2626
protected PromptMetadata metadata;
2727
protected InputStream file;
28-
protected String filename;
2928

3029
/** Builder. */
3130
public static class Builder {
3231
private String customizationId;
3332
private String promptId;
3433
private PromptMetadata metadata;
3534
private InputStream file;
36-
private String filename;
3735

3836
private Builder(AddCustomPromptOptions addCustomPromptOptions) {
3937
this.customizationId = addCustomPromptOptions.customizationId;
4038
this.promptId = addCustomPromptOptions.promptId;
4139
this.metadata = addCustomPromptOptions.metadata;
4240
this.file = addCustomPromptOptions.file;
43-
this.filename = addCustomPromptOptions.filename;
4441
}
4542

4643
/** Instantiates a new builder. */
@@ -53,19 +50,13 @@ public Builder() {}
5350
* @param promptId the promptId
5451
* @param metadata the metadata
5552
* @param file the file
56-
* @param filename the filename
5753
*/
5854
public Builder(
59-
String customizationId,
60-
String promptId,
61-
PromptMetadata metadata,
62-
InputStream file,
63-
String filename) {
55+
String customizationId, String promptId, PromptMetadata metadata, InputStream file) {
6456
this.customizationId = customizationId;
6557
this.promptId = promptId;
6658
this.metadata = metadata;
6759
this.file = file;
68-
this.filename = filename;
6960
}
7061

7162
/**
@@ -121,17 +112,6 @@ public Builder file(InputStream file) {
121112
return this;
122113
}
123114

124-
/**
125-
* Set the filename.
126-
*
127-
* @param filename the filename
128-
* @return the AddCustomPromptOptions builder
129-
*/
130-
public Builder filename(String filename) {
131-
this.filename = filename;
132-
return this;
133-
}
134-
135115
/**
136116
* Set the file.
137117
*
@@ -141,7 +121,6 @@ public Builder filename(String filename) {
141121
*/
142122
public Builder file(File file) throws FileNotFoundException {
143123
this.file = new FileInputStream(file);
144-
this.filename = file.getName();
145124
return this;
146125
}
147126
}
@@ -152,12 +131,10 @@ protected AddCustomPromptOptions(Builder builder) {
152131
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.promptId, "promptId cannot be empty");
153132
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.metadata, "metadata cannot be null");
154133
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.file, "file cannot be null");
155-
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.filename, "filename cannot be null");
156134
customizationId = builder.customizationId;
157135
promptId = builder.promptId;
158136
metadata = builder.metadata;
159137
file = builder.file;
160-
filename = builder.filename;
161138
}
162139

163140
/**
@@ -227,15 +204,4 @@ public PromptMetadata metadata() {
227204
public InputStream file() {
228205
return file;
229206
}
230-
231-
/**
232-
* Gets the filename.
233-
*
234-
* <p>The filename for file.
235-
*
236-
* @return the filename
237-
*/
238-
public String filename() {
239-
return filename;
240-
}
241207
}

0 commit comments

Comments
 (0)