Skip to content

[Speech to Text] Add newest generated code and update tests #883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -189,103 +189,4 @@ public Long getProgress() {
public String getWarnings() {
return warnings;
}

/**
* Sets the customizationId.
*
* @param customizationId the new customizationId
*/
public void setCustomizationId(final String customizationId) {
this.customizationId = customizationId;
}

/**
* Sets the created.
*
* @param created the new created
*/
public void setCreated(final String created) {
this.created = created;
}

/**
* Sets the language.
*
* @param language the new language
*/
public void setLanguage(final String language) {
this.language = language;
}

/**
* Sets the versions.
*
* @param versions the new versions
*/
public void setVersions(final List<String> versions) {
this.versions = versions;
}

/**
* Sets the owner.
*
* @param owner the new owner
*/
public void setOwner(final String owner) {
this.owner = owner;
}

/**
* Sets the name.
*
* @param name the new name
*/
public void setName(final String name) {
this.name = name;
}

/**
* Sets the description.
*
* @param description the new description
*/
public void setDescription(final String description) {
this.description = description;
}

/**
* Sets the baseModelName.
*
* @param baseModelName the new baseModelName
*/
public void setBaseModelName(final String baseModelName) {
this.baseModelName = baseModelName;
}

/**
* Sets the status.
*
* @param status the new status
*/
public void setStatus(final String status) {
this.status = status;
}

/**
* Sets the progress.
*
* @param progress the new progress
*/
public void setProgress(final long progress) {
this.progress = progress;
}

/**
* Sets the warnings.
*
* @param warnings the new warnings
*/
public void setWarnings(final String warnings) {
this.warnings = warnings;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,4 @@ public class AcousticModels extends GenericModel {
public List<AcousticModel> getCustomizations() {
return customizations;
}

/**
* Sets the customizations.
*
* @param customizations the new customizations
*/
public void setCustomizations(final List<AcousticModel> customizations) {
this.customizations = customizations;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
public class AddAudioOptions extends GenericModel {

/**
* For an archive-type resource that contains audio files whose format is not `audio/wav`, specifies the format of the
* audio files. The header accepts all of the audio formats supported for use with speech recognition and with the
* `Content-Type` header, including the `rate`, `channels`, and `endianness` parameters that are used with some
* formats. For a complete list of supported audio formats, see [Audio
* formats](/docs/services/speech-to-text/input.html#formats).
* The type of the input: application/zip, application/gzip, audio/basic, audio/flac, audio/l16, audio/mp3,
* audio/mpeg, audio/mulaw, audio/ogg, audio/ogg;codecs=opus, audio/ogg;codecs=vorbis, audio/wav, audio/webm,
* audio/webm;codecs=opus, or audio/webm;codecs=vorbis.
*/
public interface ContainedContentType {
public interface ContentType {
/** application/zip. */
String APPLICATION_ZIP = "application/zip";
/** application/gzip. */
String APPLICATION_GZIP = "application/gzip";
/** audio/basic. */
String AUDIO_BASIC = "audio/basic";
/** audio/flac. */
Expand Down Expand Up @@ -62,15 +64,13 @@ public interface ContainedContentType {
}

/**
* The type of the input: application/zip, application/gzip, audio/basic, audio/flac, audio/l16, audio/mp3,
* audio/mpeg, audio/mulaw, audio/ogg, audio/ogg;codecs=opus, audio/ogg;codecs=vorbis, audio/wav, audio/webm,
* audio/webm;codecs=opus, or audio/webm;codecs=vorbis.
* For an archive-type resource that contains audio files whose format is not `audio/wav`, specifies the format of the
* audio files. The header accepts all of the audio formats supported for use with speech recognition and with the
* `Content-Type` header, including the `rate`, `channels`, and `endianness` parameters that are used with some
* formats. For a complete list of supported audio formats, see [Audio
* formats](/docs/services/speech-to-text/input.html#formats).
*/
public interface ContentType {
/** application/zip. */
String APPLICATION_ZIP = "application/zip";
/** application/gzip. */
String APPLICATION_GZIP = "application/gzip";
public interface ContainedContentType {
/** audio/basic. */
String AUDIO_BASIC = "audio/basic";
/** audio/flac. */
Expand Down Expand Up @@ -101,29 +101,29 @@ public interface ContentType {

private String customizationId;
private String audioName;
private String containedContentType;
private Boolean allowOverwrite;
private InputStream audioResource;
private String contentType;
private String containedContentType;
private Boolean allowOverwrite;

/**
* Builder.
*/
public static class Builder {
private String customizationId;
private String audioName;
private String containedContentType;
private Boolean allowOverwrite;
private InputStream audioResource;
private String contentType;
private String containedContentType;
private Boolean allowOverwrite;

private Builder(AddAudioOptions addAudioOptions) {
customizationId = addAudioOptions.customizationId;
audioName = addAudioOptions.audioName;
containedContentType = addAudioOptions.containedContentType;
allowOverwrite = addAudioOptions.allowOverwrite;
audioResource = addAudioOptions.audioResource;
contentType = addAudioOptions.contentType;
containedContentType = addAudioOptions.containedContentType;
allowOverwrite = addAudioOptions.allowOverwrite;
}

/**
Expand Down Expand Up @@ -175,46 +175,46 @@ public Builder audioName(String audioName) {
}

/**
* Set the containedContentType.
* Set the audioResource.
*
* @param containedContentType the containedContentType
* @param audioResource the audioResource
* @return the AddAudioOptions builder
*/
public Builder containedContentType(String containedContentType) {
this.containedContentType = containedContentType;
public Builder audioResource(InputStream audioResource) {
this.audioResource = audioResource;
return this;
}

/**
* Set the allowOverwrite.
* Set the contentType.
*
* @param allowOverwrite the allowOverwrite
* @param contentType the contentType
* @return the AddAudioOptions builder
*/
public Builder allowOverwrite(Boolean allowOverwrite) {
this.allowOverwrite = allowOverwrite;
public Builder contentType(String contentType) {
this.contentType = contentType;
return this;
}

/**
* Set the audioResource.
* Set the containedContentType.
*
* @param audioResource the audioResource
* @param containedContentType the containedContentType
* @return the AddAudioOptions builder
*/
public Builder audioResource(InputStream audioResource) {
this.audioResource = audioResource;
public Builder containedContentType(String containedContentType) {
this.containedContentType = containedContentType;
return this;
}

/**
* Set the contentType.
* Set the allowOverwrite.
*
* @param contentType the contentType
* @param allowOverwrite the allowOverwrite
* @return the AddAudioOptions builder
*/
public Builder contentType(String contentType) {
this.contentType = contentType;
public Builder allowOverwrite(Boolean allowOverwrite) {
this.allowOverwrite = allowOverwrite;
return this;
}

Expand All @@ -238,10 +238,10 @@ private AddAudioOptions(Builder builder) {
Validator.isTrue(builder.contentType != null, "contentType cannot be null");
customizationId = builder.customizationId;
audioName = builder.audioName;
containedContentType = builder.containedContentType;
allowOverwrite = builder.allowOverwrite;
audioResource = builder.audioResource;
contentType = builder.contentType;
containedContentType = builder.containedContentType;
allowOverwrite = builder.allowOverwrite;
}

/**
Expand Down Expand Up @@ -277,6 +277,28 @@ public String audioName() {
return audioName;
}

/**
* Gets the audioResource.
*
* @return the audioResource
*/
public InputStream audioResource() {
return audioResource;
}

/**
* Gets the contentType.
*
* The type of the input: application/zip, application/gzip, audio/basic, audio/flac, audio/l16, audio/mp3,
* audio/mpeg, audio/mulaw, audio/ogg, audio/ogg;codecs=opus, audio/ogg;codecs=vorbis, audio/wav, audio/webm,
* audio/webm;codecs=opus, or audio/webm;codecs=vorbis.
*
* @return the contentType
*/
public String contentType() {
return contentType;
}

/**
* Gets the containedContentType.
*
Expand Down Expand Up @@ -305,26 +327,4 @@ public String containedContentType() {
public Boolean allowOverwrite() {
return allowOverwrite;
}

/**
* Gets the audioResource.
*
* @return the audioResource
*/
public InputStream audioResource() {
return audioResource;
}

/**
* Gets the contentType.
*
* The type of the input: application/zip, application/gzip, audio/basic, audio/flac, audio/l16, audio/mp3,
* audio/mpeg, audio/mulaw, audio/ogg, audio/ogg;codecs=opus, audio/ogg;codecs=vorbis, audio/wav, audio/webm,
* audio/webm;codecs=opus, or audio/webm;codecs=vorbis.
*
* @return the contentType
*/
public String contentType() {
return contentType;
}
}
Loading