Package com.sap.ai.sdk.prompt.registry.model

# Class SAPDocumentTranslationInputConfig

java.lang.Object
com.sap.ai.sdk.prompt.registry.model.SAPDocumentTranslationInputConfig

public class SAPDocumentTranslationInputConfig extends Object
Configuration for `sap_document_translation` translation provider.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `SAPDocumentTranslationInputConfig.Builder`
  Builder helper class.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `SAPDocumentTranslationInputConfig()`
  Default constructor for SAPDocumentTranslationInputConfig.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SAPDocumentTranslationInputConfig`
  `addApplyToItem(SAPDocumentTranslationApplyToSelector applyToItem)`
  Add one applyTo instance to this `SAPDocumentTranslationInputConfig`.
  `SAPDocumentTranslationInputConfig`
  `applyTo(List<SAPDocumentTranslationApplyToSelector> applyTo)`
  Set the applyTo of this `SAPDocumentTranslationInputConfig` instance and return the same instance.
  `static SAPDocumentTranslationInputConfig.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `SAPDocumentTranslationInputConfig` instance with all required arguments.
  `boolean`
  `equals(Object o)`
  `List<SAPDocumentTranslationApplyToSelector>`
  `getApplyTo()`
  Get applyTo
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `SAPDocumentTranslationInputConfig`.
  `String`
  `getSourceLanguage()`
  Language of the text to be translated.
  `String`
  `getTargetLanguage()`
  Language to which the text should be translated.
  `int`
  `hashCode()`
  `void`
  `setApplyTo(List<SAPDocumentTranslationApplyToSelector> applyTo)`
  Set the applyTo of this `SAPDocumentTranslationInputConfig` instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `SAPDocumentTranslationInputConfig` instance.
  `void`
  `setSourceLanguage(String sourceLanguage)`
  Set the sourceLanguage of this `SAPDocumentTranslationInputConfig` instance.
  `void`
  `setTargetLanguage(String targetLanguage)`
  Set the targetLanguage of this `SAPDocumentTranslationInputConfig` instance.
  `SAPDocumentTranslationInputConfig`
  `sourceLanguage(String sourceLanguage)`
  Set the sourceLanguage of this `SAPDocumentTranslationInputConfig` instance and return the same instance.
  `SAPDocumentTranslationInputConfig`
  `targetLanguage(String targetLanguage)`
  Set the targetLanguage of this `SAPDocumentTranslationInputConfig` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `SAPDocumentTranslationInputConfig` instance including unrecognized properties.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SAPDocumentTranslationInputConfig

    protected SAPDocumentTranslationInputConfig()
    Default constructor for SAPDocumentTranslationInputConfig.

- ## Method Details

  - ### sourceLanguage

    @Nonnull public SAPDocumentTranslationInputConfig sourceLanguage(@Nullable String sourceLanguage)
    Set the sourceLanguage of this `SAPDocumentTranslationInputConfig` instance and return the same instance.
    Parameters:
      `sourceLanguage` - Language of the text to be translated.
    Returns:
      The same instance of this `SAPDocumentTranslationInputConfig` class

  - ### getSourceLanguage

    @Nonnull public String getSourceLanguage()
    Language of the text to be translated.
    Returns:
      sourceLanguage The sourceLanguage of this `SAPDocumentTranslationInputConfig` instance.

  - ### setSourceLanguage

    public void setSourceLanguage(@Nullable String sourceLanguage)
    Set the sourceLanguage of this `SAPDocumentTranslationInputConfig` instance.
    Parameters:
      `sourceLanguage` - Language of the text to be translated.

  - ### applyTo

    @Nonnull public SAPDocumentTranslationInputConfig applyTo(@Nullable List<SAPDocumentTranslationApplyToSelector> applyTo)
    Set the applyTo of this `SAPDocumentTranslationInputConfig` instance and return the same instance.
    Parameters:
      `applyTo` - The applyTo of this `SAPDocumentTranslationInputConfig`
    Returns:
      The same instance of this `SAPDocumentTranslationInputConfig` class

  - ### addApplyToItem

    @Nonnull public SAPDocumentTranslationInputConfig addApplyToItem(@Nonnull SAPDocumentTranslationApplyToSelector applyToItem)
    Add one applyTo instance to this `SAPDocumentTranslationInputConfig`.
    Parameters:
      `applyToItem` - The applyTo that should be added
    Returns:
      The same instance of type `SAPDocumentTranslationInputConfig`

  - ### getApplyTo

    @Nonnull public List<SAPDocumentTranslationApplyToSelector> getApplyTo()
    Get applyTo
    Returns:
      applyTo The applyTo of this `SAPDocumentTranslationInputConfig` instance.

  - ### setApplyTo

    public void setApplyTo(@Nullable List<SAPDocumentTranslationApplyToSelector> applyTo)
    Set the applyTo of this `SAPDocumentTranslationInputConfig` instance.
    Parameters:
      `applyTo` - The applyTo of this `SAPDocumentTranslationInputConfig`

  - ### targetLanguage

    @Nonnull public SAPDocumentTranslationInputConfig targetLanguage(@Nonnull String targetLanguage)
    Set the targetLanguage of this `SAPDocumentTranslationInputConfig` instance and return the same instance.
    Parameters:
      `targetLanguage` - Language to which the text should be translated.
    Returns:
      The same instance of this `SAPDocumentTranslationInputConfig` class

  - ### getTargetLanguage

    @Nonnull public String getTargetLanguage()
    Language to which the text should be translated.
    Returns:
      targetLanguage The targetLanguage of this `SAPDocumentTranslationInputConfig` instance.

  - ### setTargetLanguage

    public void setTargetLanguage(@Nonnull String targetLanguage)
    Set the targetLanguage of this `SAPDocumentTranslationInputConfig` instance.
    Parameters:
      `targetLanguage` - Language to which the text should be translated.

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `SAPDocumentTranslationInputConfig`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `SAPDocumentTranslationInputConfig` instance.
    Parameters:
      `name` - The name of the property
    Returns:
      The value of the property
    Throws:
      `NoSuchElementException` - If no property with the given name could be found.

  - ### toMap

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `SAPDocumentTranslationInputConfig` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `SAPDocumentTranslationInputConfig` instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
    Parameters:
      `customFieldName` - The name of the property
      `customFieldValue` - The value of the property

  - ### equals

    public boolean equals(@Nullable Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    @Nonnull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### create

    public static SAPDocumentTranslationInputConfig.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `SAPDocumentTranslationInputConfig` instance with all required arguments.