Class TranslationConfig.Builder

java.lang.Object
com.google.genai.types.TranslationConfig.Builder
Enclosing class:
TranslationConfig

public abstract static class TranslationConfig.Builder extends Object
Builder for TranslationConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • echoTargetLanguage

      public abstract TranslationConfig.Builder echoTargetLanguage(boolean echoTargetLanguage)
      Setter for echoTargetLanguage.

      echoTargetLanguage: If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language.

    • clearEchoTargetLanguage

      @CanIgnoreReturnValue public TranslationConfig.Builder clearEchoTargetLanguage()
      Clears the value of echoTargetLanguage field.
    • targetLanguageCode

      public abstract TranslationConfig.Builder targetLanguageCode(String targetLanguageCode)
      Setter for targetLanguageCode.

      targetLanguageCode: The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr").

    • clearTargetLanguageCode

      @CanIgnoreReturnValue public TranslationConfig.Builder clearTargetLanguageCode()
      Clears the value of targetLanguageCode field.
    • build

      public abstract TranslationConfig build()