/* * Copyright 2010-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; /** *

* Contains metadata describing the lexicon such as the number of lexemes, * language code, and so on. For more information, see Managing Lexicons. *

*/ public class LexiconAttributes implements Serializable { /** *

* Phonetic alphabet used in the lexicon. Valid values are ipa * and x-sampa. *

*/ private String alphabet; /** *

* Language code that the lexicon applies to. A lexicon with a language code * such as "en" would be applied to all English languages (en-GB, en-US, * en-AUS, en-WLS, and so on. *

*

* Constraints:
* Allowed Values: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, * en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, * ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, * sv-SE, tr-TR, en-NZ, en-ZA, ca-ES, de-AT, yue-CN, ar-AE, fi-FI, en-IE */ private String languageCode; /** *

* Date lexicon was last modified (a timestamp value). *

*/ private java.util.Date lastModified; /** *

* Amazon Resource Name (ARN) of the lexicon. *

*/ private String lexiconArn; /** *

* Number of lexemes in the lexicon. *

*/ private Integer lexemesCount; /** *

* Total size of the lexicon, in characters. *

*/ private Integer size; /** *

* Phonetic alphabet used in the lexicon. Valid values are ipa * and x-sampa. *

* * @return

* Phonetic alphabet used in the lexicon. Valid values are * ipa and x-sampa. *

*/ public String getAlphabet() { return alphabet; } /** *

* Phonetic alphabet used in the lexicon. Valid values are ipa * and x-sampa. *

* * @param alphabet

* Phonetic alphabet used in the lexicon. Valid values are * ipa and x-sampa. *

*/ public void setAlphabet(String alphabet) { this.alphabet = alphabet; } /** *

* Phonetic alphabet used in the lexicon. Valid values are ipa * and x-sampa. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param alphabet

* Phonetic alphabet used in the lexicon. Valid values are * ipa and x-sampa. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexiconAttributes withAlphabet(String alphabet) { this.alphabet = alphabet; return this; } /** *

* Language code that the lexicon applies to. A lexicon with a language code * such as "en" would be applied to all English languages (en-GB, en-US, * en-AUS, en-WLS, and so on. *

*

* Constraints:
* Allowed Values: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, * en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, * ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, * sv-SE, tr-TR, en-NZ, en-ZA, ca-ES, de-AT, yue-CN, ar-AE, fi-FI, en-IE * * @return

* Language code that the lexicon applies to. A lexicon with a * language code such as "en" would be applied to all English * languages (en-GB, en-US, en-AUS, en-WLS, and so on. *

* @see LanguageCode */ public String getLanguageCode() { return languageCode; } /** *

* Language code that the lexicon applies to. A lexicon with a language code * such as "en" would be applied to all English languages (en-GB, en-US, * en-AUS, en-WLS, and so on. *

*

* Constraints:
* Allowed Values: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, * en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, * ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, * sv-SE, tr-TR, en-NZ, en-ZA, ca-ES, de-AT, yue-CN, ar-AE, fi-FI, en-IE * * @param languageCode

* Language code that the lexicon applies to. A lexicon with a * language code such as "en" would be applied to all English * languages (en-GB, en-US, en-AUS, en-WLS, and so on. *

* @see LanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** *

* Language code that the lexicon applies to. A lexicon with a language code * such as "en" would be applied to all English languages (en-GB, en-US, * en-AUS, en-WLS, and so on. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, * en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, * ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, * sv-SE, tr-TR, en-NZ, en-ZA, ca-ES, de-AT, yue-CN, ar-AE, fi-FI, en-IE * * @param languageCode

* Language code that the lexicon applies to. A lexicon with a * language code such as "en" would be applied to all English * languages (en-GB, en-US, en-AUS, en-WLS, and so on. *

* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public LexiconAttributes withLanguageCode(String languageCode) { this.languageCode = languageCode; return this; } /** *

* Language code that the lexicon applies to. A lexicon with a language code * such as "en" would be applied to all English languages (en-GB, en-US, * en-AUS, en-WLS, and so on. *

*

* Constraints:
* Allowed Values: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, * en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, * ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, * sv-SE, tr-TR, en-NZ, en-ZA, ca-ES, de-AT, yue-CN, ar-AE, fi-FI, en-IE * * @param languageCode

* Language code that the lexicon applies to. A lexicon with a * language code such as "en" would be applied to all English * languages (en-GB, en-US, en-AUS, en-WLS, and so on. *

* @see LanguageCode */ public void setLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); } /** *

* Language code that the lexicon applies to. A lexicon with a language code * such as "en" would be applied to all English languages (en-GB, en-US, * en-AUS, en-WLS, and so on. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: arb, cmn-CN, cy-GB, da-DK, de-DE, en-AU, en-GB, * en-GB-WLS, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, is-IS, it-IT, * ja-JP, hi-IN, ko-KR, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, * sv-SE, tr-TR, en-NZ, en-ZA, ca-ES, de-AT, yue-CN, ar-AE, fi-FI, en-IE * * @param languageCode

* Language code that the lexicon applies to. A lexicon with a * language code such as "en" would be applied to all English * languages (en-GB, en-US, en-AUS, en-WLS, and so on. *

* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public LexiconAttributes withLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** *

* Date lexicon was last modified (a timestamp value). *

* * @return

* Date lexicon was last modified (a timestamp value). *

*/ public java.util.Date getLastModified() { return lastModified; } /** *

* Date lexicon was last modified (a timestamp value). *

* * @param lastModified

* Date lexicon was last modified (a timestamp value). *

*/ public void setLastModified(java.util.Date lastModified) { this.lastModified = lastModified; } /** *

* Date lexicon was last modified (a timestamp value). *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param lastModified

* Date lexicon was last modified (a timestamp value). *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexiconAttributes withLastModified(java.util.Date lastModified) { this.lastModified = lastModified; return this; } /** *

* Amazon Resource Name (ARN) of the lexicon. *

* * @return

* Amazon Resource Name (ARN) of the lexicon. *

*/ public String getLexiconArn() { return lexiconArn; } /** *

* Amazon Resource Name (ARN) of the lexicon. *

* * @param lexiconArn

* Amazon Resource Name (ARN) of the lexicon. *

*/ public void setLexiconArn(String lexiconArn) { this.lexiconArn = lexiconArn; } /** *

* Amazon Resource Name (ARN) of the lexicon. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param lexiconArn

* Amazon Resource Name (ARN) of the lexicon. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexiconAttributes withLexiconArn(String lexiconArn) { this.lexiconArn = lexiconArn; return this; } /** *

* Number of lexemes in the lexicon. *

* * @return

* Number of lexemes in the lexicon. *

*/ public Integer getLexemesCount() { return lexemesCount; } /** *

* Number of lexemes in the lexicon. *

* * @param lexemesCount

* Number of lexemes in the lexicon. *

*/ public void setLexemesCount(Integer lexemesCount) { this.lexemesCount = lexemesCount; } /** *

* Number of lexemes in the lexicon. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param lexemesCount

* Number of lexemes in the lexicon. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexiconAttributes withLexemesCount(Integer lexemesCount) { this.lexemesCount = lexemesCount; return this; } /** *

* Total size of the lexicon, in characters. *

* * @return

* Total size of the lexicon, in characters. *

*/ public Integer getSize() { return size; } /** *

* Total size of the lexicon, in characters. *

* * @param size

* Total size of the lexicon, in characters. *

*/ public void setSize(Integer size) { this.size = size; } /** *

* Total size of the lexicon, in characters. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param size

* Total size of the lexicon, in characters. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexiconAttributes withSize(Integer size) { this.size = size; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAlphabet() != null) sb.append("Alphabet: " + getAlphabet() + ","); if (getLanguageCode() != null) sb.append("LanguageCode: " + getLanguageCode() + ","); if (getLastModified() != null) sb.append("LastModified: " + getLastModified() + ","); if (getLexiconArn() != null) sb.append("LexiconArn: " + getLexiconArn() + ","); if (getLexemesCount() != null) sb.append("LexemesCount: " + getLexemesCount() + ","); if (getSize() != null) sb.append("Size: " + getSize()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlphabet() == null) ? 0 : getAlphabet().hashCode()); hashCode = prime * hashCode + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); hashCode = prime * hashCode + ((getLastModified() == null) ? 0 : getLastModified().hashCode()); hashCode = prime * hashCode + ((getLexiconArn() == null) ? 0 : getLexiconArn().hashCode()); hashCode = prime * hashCode + ((getLexemesCount() == null) ? 0 : getLexemesCount().hashCode()); hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LexiconAttributes == false) return false; LexiconAttributes other = (LexiconAttributes) obj; if (other.getAlphabet() == null ^ this.getAlphabet() == null) return false; if (other.getAlphabet() != null && other.getAlphabet().equals(this.getAlphabet()) == false) return false; if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) return false; if (other.getLanguageCode() != null && other.getLanguageCode().equals(this.getLanguageCode()) == false) return false; if (other.getLastModified() == null ^ this.getLastModified() == null) return false; if (other.getLastModified() != null && other.getLastModified().equals(this.getLastModified()) == false) return false; if (other.getLexiconArn() == null ^ this.getLexiconArn() == null) return false; if (other.getLexiconArn() != null && other.getLexiconArn().equals(this.getLexiconArn()) == false) return false; if (other.getLexemesCount() == null ^ this.getLexemesCount() == null) return false; if (other.getLexemesCount() != null && other.getLexemesCount().equals(this.getLexemesCount()) == false) return false; if (other.getSize() == null ^ this.getSize() == null) return false; if (other.getSize() != null && other.getSize().equals(this.getSize()) == false) return false; return true; } }