Class AdvancedVoiceOptions.SafetySetting.Builder

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

public static final class AdvancedVoiceOptions.SafetySetting.Builder extends com.google.protobuf.GeneratedMessage.Builder<AdvancedVoiceOptions.SafetySetting.Builder> implements AdvancedVoiceOptions.SafetySettingOrBuilder
 Safety setting for a single harm category.
 
Protobuf type google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting
  • 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<AdvancedVoiceOptions.SafetySetting.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<AdvancedVoiceOptions.SafetySetting.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<AdvancedVoiceOptions.SafetySetting.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

      public AdvancedVoiceOptions.SafetySetting.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<AdvancedVoiceOptions.SafetySetting.Builder>
      Throws:
      IOException
    • getCategoryValue

      public int getCategoryValue()
       The harm category to apply the safety setting to.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1;
      Specified by:
      getCategoryValue in interface AdvancedVoiceOptions.SafetySettingOrBuilder
      Returns:
      The enum numeric value on the wire for category.
    • setCategoryValue

      public AdvancedVoiceOptions.SafetySetting.Builder setCategoryValue(int value)
       The harm category to apply the safety setting to.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1;
      Parameters:
      value - The enum numeric value on the wire for category to set.
      Returns:
      This builder for chaining.
    • getCategory

      public AdvancedVoiceOptions.HarmCategory getCategory()
       The harm category to apply the safety setting to.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1;
      Specified by:
      getCategory in interface AdvancedVoiceOptions.SafetySettingOrBuilder
      Returns:
      The category.
    • setCategory

       The harm category to apply the safety setting to.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1;
      Parameters:
      value - The category to set.
      Returns:
      This builder for chaining.
    • clearCategory

       The harm category to apply the safety setting to.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1;
      Returns:
      This builder for chaining.
    • getThresholdValue

      public int getThresholdValue()
       The harm block threshold for the safety setting.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2;
      Specified by:
      getThresholdValue in interface AdvancedVoiceOptions.SafetySettingOrBuilder
      Returns:
      The enum numeric value on the wire for threshold.
    • setThresholdValue

      public AdvancedVoiceOptions.SafetySetting.Builder setThresholdValue(int value)
       The harm block threshold for the safety setting.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2;
      Parameters:
      value - The enum numeric value on the wire for threshold to set.
      Returns:
      This builder for chaining.
    • getThreshold

       The harm block threshold for the safety setting.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2;
      Specified by:
      getThreshold in interface AdvancedVoiceOptions.SafetySettingOrBuilder
      Returns:
      The threshold.
    • setThreshold

       The harm block threshold for the safety setting.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2;
      Parameters:
      value - The threshold to set.
      Returns:
      This builder for chaining.
    • clearThreshold

       The harm block threshold for the safety setting.
       
      .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2;
      Returns:
      This builder for chaining.