Class VoiceSelectionParams.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<VoiceSelectionParams.Builder>
com.google.cloud.dialogflow.v2.VoiceSelectionParams.Builder
All Implemented Interfaces:
VoiceSelectionParamsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
VoiceSelectionParams

public static final class VoiceSelectionParams.Builder extends com.google.protobuf.GeneratedMessage.Builder<VoiceSelectionParams.Builder> implements VoiceSelectionParamsOrBuilder
 Description of which voice to use for speech synthesis.
 
Protobuf type google.cloud.dialogflow.v2.VoiceSelectionParams
  • 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<VoiceSelectionParams.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<VoiceSelectionParams.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<VoiceSelectionParams.Builder>
    • getDefaultInstanceForType

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

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

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

      public VoiceSelectionParams.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<VoiceSelectionParams.Builder>
    • mergeFrom

    • isInitialized

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

      public VoiceSelectionParams.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<VoiceSelectionParams.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Optional. The name of the voice. If not set, the service will choose a
       voice based on the other parameters such as language_code and
       [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender].
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getName in interface VoiceSelectionParamsOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Optional. The name of the voice. If not set, the service will choose a
       voice based on the other parameters such as language_code and
       [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender].
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNameBytes in interface VoiceSelectionParamsOrBuilder
      Returns:
      The bytes for name.
    • setName

      public VoiceSelectionParams.Builder setName(String value)
       Optional. The name of the voice. If not set, the service will choose a
       voice based on the other parameters such as language_code and
       [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender].
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public VoiceSelectionParams.Builder clearName()
       Optional. The name of the voice. If not set, the service will choose a
       voice based on the other parameters such as language_code and
       [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender].
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setNameBytes

      public VoiceSelectionParams.Builder setNameBytes(com.google.protobuf.ByteString value)
       Optional. The name of the voice. If not set, the service will choose a
       voice based on the other parameters such as language_code and
       [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender].
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getSsmlGenderValue

      public int getSsmlGenderValue()
       Optional. The preferred gender of the voice. If not set, the service will
       choose a voice based on the other parameters such as language_code and
       [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that
       this is only a preference, not requirement. If a voice of the appropriate
       gender is not available, the synthesizer should substitute a voice with a
       different gender rather than failing the request.
       
      .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSsmlGenderValue in interface VoiceSelectionParamsOrBuilder
      Returns:
      The enum numeric value on the wire for ssmlGender.
    • setSsmlGenderValue

      public VoiceSelectionParams.Builder setSsmlGenderValue(int value)
       Optional. The preferred gender of the voice. If not set, the service will
       choose a voice based on the other parameters such as language_code and
       [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that
       this is only a preference, not requirement. If a voice of the appropriate
       gender is not available, the synthesizer should substitute a voice with a
       different gender rather than failing the request.
       
      .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for ssmlGender to set.
      Returns:
      This builder for chaining.
    • getSsmlGender

      public SsmlVoiceGender getSsmlGender()
       Optional. The preferred gender of the voice. If not set, the service will
       choose a voice based on the other parameters such as language_code and
       [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that
       this is only a preference, not requirement. If a voice of the appropriate
       gender is not available, the synthesizer should substitute a voice with a
       different gender rather than failing the request.
       
      .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSsmlGender in interface VoiceSelectionParamsOrBuilder
      Returns:
      The ssmlGender.
    • setSsmlGender

      public VoiceSelectionParams.Builder setSsmlGender(SsmlVoiceGender value)
       Optional. The preferred gender of the voice. If not set, the service will
       choose a voice based on the other parameters such as language_code and
       [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that
       this is only a preference, not requirement. If a voice of the appropriate
       gender is not available, the synthesizer should substitute a voice with a
       different gender rather than failing the request.
       
      .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The ssmlGender to set.
      Returns:
      This builder for chaining.
    • clearSsmlGender

      public VoiceSelectionParams.Builder clearSsmlGender()
       Optional. The preferred gender of the voice. If not set, the service will
       choose a voice based on the other parameters such as language_code and
       [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that
       this is only a preference, not requirement. If a voice of the appropriate
       gender is not available, the synthesizer should substitute a voice with a
       different gender rather than failing the request.
       
      .google.cloud.dialogflow.v2.SsmlVoiceGender ssml_gender = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.