/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.polly.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Description of the voice. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Voice implements Serializable, Cloneable, StructuredPojo { /** ** Gender of the voice. *
*/ private String gender; /** *
* Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech
* operation.
*
* Language code of the voice. *
*/ private String languageCode; /** ** Human readable name of the language in English. *
*/ private String languageName; /** ** Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might * display in your application. *
*/ private String name; /** ** Additional codes for languages available for the specified voice in addition to its default language. *
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the
* code hi-IN
.
*
* Specifies which engines (standard
or neural
) that are supported by a given voice.
*
* Gender of the voice. *
* * @param gender * Gender of the voice. * @see Gender */ public void setGender(String gender) { this.gender = gender; } /** ** Gender of the voice. *
* * @return Gender of the voice. * @see Gender */ public String getGender() { return this.gender; } /** ** Gender of the voice. *
* * @param gender * Gender of the voice. * @return Returns a reference to this object so that method calls can be chained together. * @see Gender */ public Voice withGender(String gender) { setGender(gender); return this; } /** ** Gender of the voice. *
* * @param gender * Gender of the voice. * @see Gender */ public void setGender(Gender gender) { withGender(gender); } /** ** Gender of the voice. *
* * @param gender * Gender of the voice. * @return Returns a reference to this object so that method calls can be chained together. * @see Gender */ public Voice withGender(Gender gender) { this.gender = gender.toString(); return this; } /** *
* Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech
* operation.
*
SynthesizeSpeech
operation.
* @see VoiceId
*/
public void setId(String id) {
this.id = id;
}
/**
*
* Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech
* operation.
*
SynthesizeSpeech
operation.
* @see VoiceId
*/
public String getId() {
return this.id;
}
/**
*
* Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech
* operation.
*
SynthesizeSpeech
operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VoiceId
*/
public Voice withId(String id) {
setId(id);
return this;
}
/**
*
* Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech
* operation.
*
SynthesizeSpeech
operation.
* @see VoiceId
*/
public void setId(VoiceId id) {
withId(id);
}
/**
*
* Amazon Polly assigned voice ID. This is the ID that you specify when calling the SynthesizeSpeech
* operation.
*
SynthesizeSpeech
operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VoiceId
*/
public Voice withId(VoiceId id) {
this.id = id.toString();
return this;
}
/**
* * Language code of the voice. *
* * @param languageCode * Language code of the voice. * @see LanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** ** Language code of the voice. *
* * @return Language code of the voice. * @see LanguageCode */ public String getLanguageCode() { return this.languageCode; } /** ** Language code of the voice. *
* * @param languageCode * Language code of the voice. * @return Returns a reference to this object so that method calls can be chained together. * @see LanguageCode */ public Voice withLanguageCode(String languageCode) { setLanguageCode(languageCode); return this; } /** ** Language code of the voice. *
* * @param languageCode * Language code of the voice. * @see LanguageCode */ public void setLanguageCode(LanguageCode languageCode) { withLanguageCode(languageCode); } /** ** Language code of the voice. *
* * @param languageCode * Language code of the voice. * @return Returns a reference to this object so that method calls can be chained together. * @see LanguageCode */ public Voice withLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** ** Human readable name of the language in English. *
* * @param languageName * Human readable name of the language in English. */ public void setLanguageName(String languageName) { this.languageName = languageName; } /** ** Human readable name of the language in English. *
* * @return Human readable name of the language in English. */ public String getLanguageName() { return this.languageName; } /** ** Human readable name of the language in English. *
* * @param languageName * Human readable name of the language in English. * @return Returns a reference to this object so that method calls can be chained together. */ public Voice withLanguageName(String languageName) { setLanguageName(languageName); return this; } /** ** Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might * display in your application. *
* * @param name * Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you * might display in your application. */ public void setName(String name) { this.name = name; } /** ** Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might * display in your application. *
* * @return Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you * might display in your application. */ public String getName() { return this.name; } /** ** Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might * display in your application. *
* * @param name * Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you * might display in your application. * @return Returns a reference to this object so that method calls can be chained together. */ public Voice withName(String name) { setName(name); return this; } /** ** Additional codes for languages available for the specified voice in addition to its default language. *
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the
* code hi-IN
.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show
* the code
* Additional codes for languages available for the specified voice in addition to its default language.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the
* code hi-IN
.
* @see LanguageCode
*/
public java.util.Listhi-IN
.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show
* the code
* Additional codes for languages available for the specified voice in addition to its default language.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the
* code
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAdditionalLanguageCodes(java.util.Collection)} or
* {@link #withAdditionalLanguageCodes(java.util.Collection)} if you want to override the existing values.
* hi-IN
.
* @see LanguageCode
*/
public void setAdditionalLanguageCodes(java.util.Collectionhi-IN
.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show
* the code
* Additional codes for languages available for the specified voice in addition to its default language.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the
* code hi-IN
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LanguageCode
*/
public Voice withAdditionalLanguageCodes(String... additionalLanguageCodes) {
if (this.additionalLanguageCodes == null) {
setAdditionalLanguageCodes(new java.util.ArrayListhi-IN
.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show
* the code
* Additional codes for languages available for the specified voice in addition to its default language.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the
* code hi-IN
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LanguageCode
*/
public Voice withAdditionalLanguageCodes(java.util.Collectionhi-IN
.
*
* For example, the default language for Aditi is Indian English (en-IN) because it was first used for that
* language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show
* the code
* Specifies which engines (
* Specifies which engines (
* Specifies which engines (
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSupportedEngines(java.util.Collection)} or {@link #withSupportedEngines(java.util.Collection)} if you
* want to override the existing values.
*
* Specifies which engines (
* Specifies which engines (hi-IN
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LanguageCode
*/
public Voice withAdditionalLanguageCodes(LanguageCode... additionalLanguageCodes) {
java.util.ArrayListstandard
or neural
) that are supported by a given voice.
* standard
or neural
) that are supported by a given
* voice.
* @see Engine
*/
public java.util.Liststandard
or neural
) that are supported by a given voice.
* standard
or neural
) that are supported by a given
* voice.
* @see Engine
*/
public void setSupportedEngines(java.util.Collectionstandard
or neural
) that are supported by a given voice.
* standard
or neural
) that are supported by a given
* voice.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Engine
*/
public Voice withSupportedEngines(String... supportedEngines) {
if (this.supportedEngines == null) {
setSupportedEngines(new java.util.ArrayListstandard
or neural
) that are supported by a given voice.
* standard
or neural
) that are supported by a given
* voice.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Engine
*/
public Voice withSupportedEngines(java.util.Collectionstandard
or neural
) that are supported by a given voice.
* standard
or neural
) that are supported by a given
* voice.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Engine
*/
public Voice withSupportedEngines(Engine... supportedEngines) {
java.util.ArrayList