Class AdaptiveMtTranslateRequest.GlossaryConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AdaptiveMtTranslateRequest.GlossaryConfig.Builder>
com.google.cloud.translate.v3.AdaptiveMtTranslateRequest.GlossaryConfig.Builder
All Implemented Interfaces:
AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AdaptiveMtTranslateRequest.GlossaryConfig

public static final class AdaptiveMtTranslateRequest.GlossaryConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<AdaptiveMtTranslateRequest.GlossaryConfig.Builder> implements AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder
 Configures which glossary is used for a specific target language and
 defines
 options for applying that glossary.
 
Protobuf type google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig
  • 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<AdaptiveMtTranslateRequest.GlossaryConfig.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<AdaptiveMtTranslateRequest.GlossaryConfig.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<AdaptiveMtTranslateRequest.GlossaryConfig.Builder>
    • getDefaultInstanceForType

      public AdaptiveMtTranslateRequest.GlossaryConfig 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

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

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

      public AdaptiveMtTranslateRequest.GlossaryConfig.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<AdaptiveMtTranslateRequest.GlossaryConfig.Builder>
      Throws:
      IOException
    • getGlossary

      public String getGlossary()
       Required. The `glossary` to be applied for this translation.
      
       The format depends on the glossary:
      
       - User-provided custom glossary:
       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
       
      string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getGlossary in interface AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder
      Returns:
      The glossary.
    • getGlossaryBytes

      public com.google.protobuf.ByteString getGlossaryBytes()
       Required. The `glossary` to be applied for this translation.
      
       The format depends on the glossary:
      
       - User-provided custom glossary:
       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
       
      string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getGlossaryBytes in interface AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder
      Returns:
      The bytes for glossary.
    • setGlossary

       Required. The `glossary` to be applied for this translation.
      
       The format depends on the glossary:
      
       - User-provided custom glossary:
       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
       
      string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The glossary to set.
      Returns:
      This builder for chaining.
    • clearGlossary

       Required. The `glossary` to be applied for this translation.
      
       The format depends on the glossary:
      
       - User-provided custom glossary:
       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
       
      string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setGlossaryBytes

      public AdaptiveMtTranslateRequest.GlossaryConfig.Builder setGlossaryBytes(com.google.protobuf.ByteString value)
       Required. The `glossary` to be applied for this translation.
      
       The format depends on the glossary:
      
       - User-provided custom glossary:
       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
       
      string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for glossary to set.
      Returns:
      This builder for chaining.
    • getIgnoreCase

      public boolean getIgnoreCase()
       Optional. Indicates match is case insensitive. The default value is
       `false` if missing.
       
      bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getIgnoreCase in interface AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder
      Returns:
      The ignoreCase.
    • setIgnoreCase

      public AdaptiveMtTranslateRequest.GlossaryConfig.Builder setIgnoreCase(boolean value)
       Optional. Indicates match is case insensitive. The default value is
       `false` if missing.
       
      bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The ignoreCase to set.
      Returns:
      This builder for chaining.
    • clearIgnoreCase

       Optional. Indicates match is case insensitive. The default value is
       `false` if missing.
       
      bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getContextualTranslationEnabled

      public boolean getContextualTranslationEnabled()
       Optional. If set to true, the glossary will be used for contextual
       translation.
       
      bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContextualTranslationEnabled in interface AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder
      Returns:
      The contextualTranslationEnabled.
    • setContextualTranslationEnabled

      public AdaptiveMtTranslateRequest.GlossaryConfig.Builder setContextualTranslationEnabled(boolean value)
       Optional. If set to true, the glossary will be used for contextual
       translation.
       
      bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The contextualTranslationEnabled to set.
      Returns:
      This builder for chaining.
    • clearContextualTranslationEnabled

      public AdaptiveMtTranslateRequest.GlossaryConfig.Builder clearContextualTranslationEnabled()
       Optional. If set to true, the glossary will be used for contextual
       translation.
       
      bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.