2626public class AddAudioOptions extends GenericModel {
2727
2828 /**
29- * For an audio-type resource, the format (MIME type) of the audio. For more information, see **Content types for
30- * audio-type resources** in the method description.
29+ * **For an archive-type resource,** specify the format of the audio files that are contained in the archive file if
30+ * they are of type `audio/alaw`, `audio/basic`, `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and
31+ * `endianness` parameters where necessary. In this case, all audio files that are contained in the archive file must
32+ * be of the indicated type.
3133 *
32- * For an archive-type resource, the media type of the archive file. For more information, see **Content types for
33- * archive-type resources** in the method description.
34+ * For all other audio formats, you can omit the header. In this case, the audio files can be of multiple types as
35+ * long as they are not of the types listed in the previous paragraph.
36+ *
37+ * The parameter accepts all of the audio formats that are supported for use with speech recognition. For more
38+ * information, see **Content types for audio-type resources** in the method description.
39+ *
40+ * **For an audio-type resource,** omit the header.
3441 */
35- public interface ContentType {
36- /** application/zip. */
37- String APPLICATION_ZIP = "application/zip" ;
38- /** application/gzip. */
39- String APPLICATION_GZIP = "application/gzip" ;
42+ public interface ContainedContentType {
43+ /** audio/alaw. */
44+ String AUDIO_ALAW = "audio/alaw" ;
4045 /** audio/basic. */
4146 String AUDIO_BASIC = "audio/basic" ;
4247 /** audio/flac. */
@@ -68,12 +73,19 @@ public interface ContentType {
6873 }
6974
7075 /**
71- * For an archive-type resource, specifies the format of the audio files that are contained in the archive file. The
72- * parameter accepts all of the audio formats that are supported for use with speech recognition, including the
73- * `rate`, `channels`, and `endianness` parameters that are used with some formats. For more information, see
74- * **Content types for audio-type resources** in the method description.
76+ * For an audio-type resource, the format (MIME type) of the audio. For more information, see **Content types for
77+ * audio-type resources** in the method description.
78+ *
79+ * For an archive-type resource, the media type of the archive file. For more information, see **Content types for
80+ * archive-type resources** in the method description.
7581 */
76- public interface ContainedContentType {
82+ public interface ContentType {
83+ /** application/zip. */
84+ String APPLICATION_ZIP = "application/zip" ;
85+ /** application/gzip. */
86+ String APPLICATION_GZIP = "application/gzip" ;
87+ /** audio/alaw. */
88+ String AUDIO_ALAW = "audio/alaw" ;
7789 /** audio/basic. */
7890 String AUDIO_BASIC = "audio/basic" ;
7991 /** audio/flac. */
@@ -107,9 +119,9 @@ public interface ContainedContentType {
107119 private String customizationId ;
108120 private String audioName ;
109121 private InputStream audioResource ;
110- private String contentType ;
111122 private String containedContentType ;
112123 private Boolean allowOverwrite ;
124+ private String contentType ;
113125
114126 /**
115127 * Builder.
@@ -118,17 +130,17 @@ public static class Builder {
118130 private String customizationId ;
119131 private String audioName ;
120132 private InputStream audioResource ;
121- private String contentType ;
122133 private String containedContentType ;
123134 private Boolean allowOverwrite ;
135+ private String contentType ;
124136
125137 private Builder (AddAudioOptions addAudioOptions ) {
126- customizationId = addAudioOptions .customizationId ;
127- audioName = addAudioOptions .audioName ;
128- audioResource = addAudioOptions .audioResource ;
129- contentType = addAudioOptions .contentType ;
130- containedContentType = addAudioOptions .containedContentType ;
131- allowOverwrite = addAudioOptions .allowOverwrite ;
138+ this . customizationId = addAudioOptions .customizationId ;
139+ this . audioName = addAudioOptions .audioName ;
140+ this . audioResource = addAudioOptions .audioResource ;
141+ this . containedContentType = addAudioOptions .containedContentType ;
142+ this . allowOverwrite = addAudioOptions .allowOverwrite ;
143+ this . contentType = addAudioOptions .contentType ;
132144 }
133145
134146 /**
@@ -137,34 +149,6 @@ private Builder(AddAudioOptions addAudioOptions) {
137149 public Builder () {
138150 }
139151
140- /**
141- * Instantiates a new builder.
142- *
143- * @param customizationId the customizationId
144- * @param audioName the audioName
145- * @deprecated audioResource is now required, so this constructor will be removed in the next major release.
146- */
147- public Builder (String customizationId , String audioName ) {
148- this .customizationId = customizationId ;
149- this .audioName = audioName ;
150- }
151-
152- /**
153- * Instantiates a new builder.
154- *
155- * @param customizationId the customizationId
156- * @param audioName the audioName
157- * @param audioResource the audioResource
158- * @param contentType the contentType
159- * @deprecated contentType is no longer required, so this constructor will be removed in the next major release.
160- */
161- public Builder (String customizationId , String audioName , InputStream audioResource , String contentType ) {
162- this .customizationId = customizationId ;
163- this .audioName = audioName ;
164- this .audioResource = audioResource ;
165- this .contentType = contentType ;
166- }
167-
168152 /**
169153 * Instantiates a new builder with required properties.
170154 *
@@ -220,17 +204,6 @@ public Builder audioResource(InputStream audioResource) {
220204 return this ;
221205 }
222206
223- /**
224- * Set the contentType.
225- *
226- * @param contentType the contentType
227- * @return the AddAudioOptions builder
228- */
229- public Builder contentType (String contentType ) {
230- this .contentType = contentType ;
231- return this ;
232- }
233-
234207 /**
235208 * Set the containedContentType.
236209 *
@@ -253,6 +226,17 @@ public Builder allowOverwrite(Boolean allowOverwrite) {
253226 return this ;
254227 }
255228
229+ /**
230+ * Set the contentType.
231+ *
232+ * @param contentType the contentType
233+ * @return the AddAudioOptions builder
234+ */
235+ public Builder contentType (String contentType ) {
236+ this .contentType = contentType ;
237+ return this ;
238+ }
239+
256240 /**
257241 * Set the audioResource.
258242 *
@@ -274,9 +258,9 @@ private AddAudioOptions(Builder builder) {
274258 customizationId = builder .customizationId ;
275259 audioName = builder .audioName ;
276260 audioResource = builder .audioResource ;
277- contentType = builder .contentType ;
278261 containedContentType = builder .containedContentType ;
279262 allowOverwrite = builder .allowOverwrite ;
263+ contentType = builder .contentType ;
280264 }
281265
282266 /**
@@ -327,27 +311,20 @@ public InputStream audioResource() {
327311 }
328312
329313 /**
330- * Gets the contentType .
314+ * Gets the containedContentType .
331315 *
332- * For an audio-type resource, the format (MIME type) of the audio. For more information, see **Content types for
333- * audio-type resources** in the method description.
316+ * **For an archive-type resource,** specify the format of the audio files that are contained in the archive file if
317+ * they are of type `audio/alaw`, `audio/basic`, `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and
318+ * `endianness` parameters where necessary. In this case, all audio files that are contained in the archive file must
319+ * be of the indicated type.
334320 *
335- * For an archive-type resource, the media type of the archive file. For more information, see **Content types for
336- * archive-type resources** in the method description .
321+ * For all other audio formats, you can omit the header. In this case, the audio files can be of multiple types as
322+ * long as they are not of the types listed in the previous paragraph .
337323 *
338- * @return the contentType
339- */
340- public String contentType () {
341- return contentType ;
342- }
343-
344- /**
345- * Gets the containedContentType.
324+ * The parameter accepts all of the audio formats that are supported for use with speech recognition. For more
325+ * information, see **Content types for audio-type resources** in the method description.
346326 *
347- * For an archive-type resource, specifies the format of the audio files that are contained in the archive file. The
348- * parameter accepts all of the audio formats that are supported for use with speech recognition, including the
349- * `rate`, `channels`, and `endianness` parameters that are used with some formats. For more information, see
350- * **Content types for audio-type resources** in the method description.
327+ * **For an audio-type resource,** omit the header.
351328 *
352329 * @return the containedContentType
353330 */
@@ -367,4 +344,19 @@ public String containedContentType() {
367344 public Boolean allowOverwrite () {
368345 return allowOverwrite ;
369346 }
347+
348+ /**
349+ * Gets the contentType.
350+ *
351+ * For an audio-type resource, the format (MIME type) of the audio. For more information, see **Content types for
352+ * audio-type resources** in the method description.
353+ *
354+ * For an archive-type resource, the media type of the archive file. For more information, see **Content types for
355+ * archive-type resources** in the method description.
356+ *
357+ * @return the contentType
358+ */
359+ public String contentType () {
360+ return contentType ;
361+ }
370362}
0 commit comments