Class Voice.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
com.google.cloud.texttospeech.v1.Voice.Builder
All Implemented Interfaces:
VoiceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Voice

public static final class Voice.Builder extends com.google.protobuf.GeneratedMessage.Builder<Voice.Builder> implements VoiceOrBuilder
 Description of a voice supported by the TTS service.
 
Protobuf type google.cloud.texttospeech.v1.Voice
  • Method Summary

    Modifier and Type
    Method
    Description
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    addLanguageCodesBytes(com.google.protobuf.ByteString value)
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
     
     
     
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    The name of this voice.
    The natural sample rate (in hertz) for this voice.
    The gender of this voice.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    getLanguageCodes(int index)
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    com.google.protobuf.ByteString
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    int
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    com.google.protobuf.ProtocolStringList
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    The name of this voice.
    com.google.protobuf.ByteString
    The name of this voice.
    int
    The natural sample rate (in hertz) for this voice.
    The gender of this voice.
    int
    The gender of this voice.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setLanguageCodes(int index, String value)
    The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
    setName(String value)
    The name of this voice.
    setNameBytes(com.google.protobuf.ByteString value)
    The name of this voice.
    The natural sample rate (in hertz) for this voice.
    The gender of this voice.
    setSsmlGenderValue(int value)
    The gender of this voice.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
    • clear

      public Voice.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
    • getDefaultInstanceForType

      public Voice getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Voice build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Voice buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Voice.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Voice.Builder>
    • mergeFrom

      public Voice.Builder mergeFrom(Voice other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Voice.Builder>
    • mergeFrom

      public Voice.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Voice.Builder>
      Throws:
      IOException
    • getLanguageCodesList

      public com.google.protobuf.ProtocolStringList getLanguageCodesList()
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Specified by:
      getLanguageCodesList in interface VoiceOrBuilder
      Returns:
      A list containing the languageCodes.
    • getLanguageCodesCount

      public int getLanguageCodesCount()
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Specified by:
      getLanguageCodesCount in interface VoiceOrBuilder
      Returns:
      The count of languageCodes.
    • getLanguageCodes

      public String getLanguageCodes(int index)
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Specified by:
      getLanguageCodes in interface VoiceOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The languageCodes at the given index.
    • getLanguageCodesBytes

      public com.google.protobuf.ByteString getLanguageCodesBytes(int index)
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Specified by:
      getLanguageCodesBytes in interface VoiceOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the languageCodes at the given index.
    • setLanguageCodes

      public Voice.Builder setLanguageCodes(int index, String value)
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Parameters:
      index - The index to set the value at.
      value - The languageCodes to set.
      Returns:
      This builder for chaining.
    • addLanguageCodes

      public Voice.Builder addLanguageCodes(String value)
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Parameters:
      value - The languageCodes to add.
      Returns:
      This builder for chaining.
    • addAllLanguageCodes

      public Voice.Builder addAllLanguageCodes(Iterable<String> values)
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Parameters:
      values - The languageCodes to add.
      Returns:
      This builder for chaining.
    • clearLanguageCodes

      public Voice.Builder clearLanguageCodes()
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Returns:
      This builder for chaining.
    • addLanguageCodesBytes

      public Voice.Builder addLanguageCodesBytes(com.google.protobuf.ByteString value)
       The languages that this voice supports, expressed as
       [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
       "en-US", "es-419", "cmn-tw").
       
      repeated string language_codes = 1;
      Parameters:
      value - The bytes of the languageCodes to add.
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       The name of this voice.  Each distinct voice has a unique name.
       
      string name = 2;
      Specified by:
      getName in interface VoiceOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of this voice.  Each distinct voice has a unique name.
       
      string name = 2;
      Specified by:
      getNameBytes in interface VoiceOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Voice.Builder setName(String value)
       The name of this voice.  Each distinct voice has a unique name.
       
      string name = 2;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Voice.Builder clearName()
       The name of this voice.  Each distinct voice has a unique name.
       
      string name = 2;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Voice.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of this voice.  Each distinct voice has a unique name.
       
      string name = 2;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getSsmlGenderValue

      public int getSsmlGenderValue()
       The gender of this voice.
       
      .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
      Specified by:
      getSsmlGenderValue in interface VoiceOrBuilder
      Returns:
      The enum numeric value on the wire for ssmlGender.
    • setSsmlGenderValue

      public Voice.Builder setSsmlGenderValue(int value)
       The gender of this voice.
       
      .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
      Parameters:
      value - The enum numeric value on the wire for ssmlGender to set.
      Returns:
      This builder for chaining.
    • getSsmlGender

      public SsmlVoiceGender getSsmlGender()
       The gender of this voice.
       
      .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
      Specified by:
      getSsmlGender in interface VoiceOrBuilder
      Returns:
      The ssmlGender.
    • setSsmlGender

      public Voice.Builder setSsmlGender(SsmlVoiceGender value)
       The gender of this voice.
       
      .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
      Parameters:
      value - The ssmlGender to set.
      Returns:
      This builder for chaining.
    • clearSsmlGender

      public Voice.Builder clearSsmlGender()
       The gender of this voice.
       
      .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;
      Returns:
      This builder for chaining.
    • getNaturalSampleRateHertz

      public int getNaturalSampleRateHertz()
       The natural sample rate (in hertz) for this voice.
       
      int32 natural_sample_rate_hertz = 4;
      Specified by:
      getNaturalSampleRateHertz in interface VoiceOrBuilder
      Returns:
      The naturalSampleRateHertz.
    • setNaturalSampleRateHertz

      public Voice.Builder setNaturalSampleRateHertz(int value)
       The natural sample rate (in hertz) for this voice.
       
      int32 natural_sample_rate_hertz = 4;
      Parameters:
      value - The naturalSampleRateHertz to set.
      Returns:
      This builder for chaining.
    • clearNaturalSampleRateHertz

      public Voice.Builder clearNaturalSampleRateHertz()
       The natural sample rate (in hertz) for this voice.
       
      int32 natural_sample_rate_hertz = 4;
      Returns:
      This builder for chaining.