Class MultiLanguageDetectionMetadata.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MultiLanguageDetectionMetadata.Builder>
com.google.cloud.modelarmor.v1beta.MultiLanguageDetectionMetadata.Builder
All Implemented Interfaces:
MultiLanguageDetectionMetadataOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
MultiLanguageDetectionMetadata

public static final class MultiLanguageDetectionMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<MultiLanguageDetectionMetadata.Builder> implements MultiLanguageDetectionMetadataOrBuilder
 Message for Enabling Multi Language Detection.
 
Protobuf type google.cloud.modelarmor.v1beta.MultiLanguageDetectionMetadata
  • 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<MultiLanguageDetectionMetadata.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<MultiLanguageDetectionMetadata.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<MultiLanguageDetectionMetadata.Builder>
    • getDefaultInstanceForType

      public MultiLanguageDetectionMetadata 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 MultiLanguageDetectionMetadata buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

      public MultiLanguageDetectionMetadata.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<MultiLanguageDetectionMetadata.Builder>
      Throws:
      IOException
    • getSourceLanguage

      public String getSourceLanguage()
       Optional. Optional Source language of the user prompt.
      
       If multi-language detection is enabled and this field is not set, the
       source language will be automatically detected. When a source language is
       provided, Model Armor uses it to sanitize the input. In that case the
       system does not perform auto-detection and relies solely on the specified
       language.
      
       This string field accepts a language code from the ISO-639 standard.
       For a list of languages supported by Model Armor, see
       [Model Armor supported languages]
       (https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
       For a comprehensive list of language codes, see
       [ISO-639](https://cloud.google.com/translate/docs/languages#nmt).
       
      string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourceLanguage in interface MultiLanguageDetectionMetadataOrBuilder
      Returns:
      The sourceLanguage.
    • getSourceLanguageBytes

      public com.google.protobuf.ByteString getSourceLanguageBytes()
       Optional. Optional Source language of the user prompt.
      
       If multi-language detection is enabled and this field is not set, the
       source language will be automatically detected. When a source language is
       provided, Model Armor uses it to sanitize the input. In that case the
       system does not perform auto-detection and relies solely on the specified
       language.
      
       This string field accepts a language code from the ISO-639 standard.
       For a list of languages supported by Model Armor, see
       [Model Armor supported languages]
       (https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
       For a comprehensive list of language codes, see
       [ISO-639](https://cloud.google.com/translate/docs/languages#nmt).
       
      string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourceLanguageBytes in interface MultiLanguageDetectionMetadataOrBuilder
      Returns:
      The bytes for sourceLanguage.
    • setSourceLanguage

      public MultiLanguageDetectionMetadata.Builder setSourceLanguage(String value)
       Optional. Optional Source language of the user prompt.
      
       If multi-language detection is enabled and this field is not set, the
       source language will be automatically detected. When a source language is
       provided, Model Armor uses it to sanitize the input. In that case the
       system does not perform auto-detection and relies solely on the specified
       language.
      
       This string field accepts a language code from the ISO-639 standard.
       For a list of languages supported by Model Armor, see
       [Model Armor supported languages]
       (https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
       For a comprehensive list of language codes, see
       [ISO-639](https://cloud.google.com/translate/docs/languages#nmt).
       
      string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sourceLanguage to set.
      Returns:
      This builder for chaining.
    • clearSourceLanguage

      public MultiLanguageDetectionMetadata.Builder clearSourceLanguage()
       Optional. Optional Source language of the user prompt.
      
       If multi-language detection is enabled and this field is not set, the
       source language will be automatically detected. When a source language is
       provided, Model Armor uses it to sanitize the input. In that case the
       system does not perform auto-detection and relies solely on the specified
       language.
      
       This string field accepts a language code from the ISO-639 standard.
       For a list of languages supported by Model Armor, see
       [Model Armor supported languages]
       (https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
       For a comprehensive list of language codes, see
       [ISO-639](https://cloud.google.com/translate/docs/languages#nmt).
       
      string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setSourceLanguageBytes

      public MultiLanguageDetectionMetadata.Builder setSourceLanguageBytes(com.google.protobuf.ByteString value)
       Optional. Optional Source language of the user prompt.
      
       If multi-language detection is enabled and this field is not set, the
       source language will be automatically detected. When a source language is
       provided, Model Armor uses it to sanitize the input. In that case the
       system does not perform auto-detection and relies solely on the specified
       language.
      
       This string field accepts a language code from the ISO-639 standard.
       For a list of languages supported by Model Armor, see
       [Model Armor supported languages]
       (https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
       For a comprehensive list of language codes, see
       [ISO-639](https://cloud.google.com/translate/docs/languages#nmt).
       
      string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for sourceLanguage to set.
      Returns:
      This builder for chaining.
    • getEnableMultiLanguageDetection

      public boolean getEnableMultiLanguageDetection()
       Optional. Enable detection of multi-language prompts and responses.
       
      bool enable_multi_language_detection = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEnableMultiLanguageDetection in interface MultiLanguageDetectionMetadataOrBuilder
      Returns:
      The enableMultiLanguageDetection.
    • setEnableMultiLanguageDetection

      public MultiLanguageDetectionMetadata.Builder setEnableMultiLanguageDetection(boolean value)
       Optional. Enable detection of multi-language prompts and responses.
       
      bool enable_multi_language_detection = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enableMultiLanguageDetection to set.
      Returns:
      This builder for chaining.
    • clearEnableMultiLanguageDetection

      public MultiLanguageDetectionMetadata.Builder clearEnableMultiLanguageDetection()
       Optional. Enable detection of multi-language prompts and responses.
       
      bool enable_multi_language_detection = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.