Package com.sap.ai.sdk.orchestration.model

# Class SAPDocumentTranslationApplyToSelector

java.lang.Object
com.sap.ai.sdk.orchestration.model.SAPDocumentTranslationApplyToSelector

public class SAPDocumentTranslationApplyToSelector extends Object
This selector allows you to define the scope of translation, such as specific placeholders or messages with specific roles. For example, `{\"category\": \"placeholders\", \"items\": [\"user_input\"], \"source_language\": \"de-DE\"}` targets the value of \"user_input\" in `placeholder_values` specified in the request payload; and considers the value to be in German.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `SAPDocumentTranslationApplyToSelector.Builder`
  Builder helper class.
  `static interface`
  `SAPDocumentTranslationApplyToSelector.Builder1`
  Builder helper class.
  `static enum`
  `SAPDocumentTranslationApplyToSelector.CategoryEnum`
  Category to apply translation to.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SAPDocumentTranslationApplyToSelector`
  `addItemsItem(String itemsItem)`
  Add one items instance to this `SAPDocumentTranslationApplyToSelector`.
  `SAPDocumentTranslationApplyToSelector`
  `category(SAPDocumentTranslationApplyToSelector.CategoryEnum category)`
  Set the category of this `SAPDocumentTranslationApplyToSelector` instance and return the same instance.
  `static SAPDocumentTranslationApplyToSelector.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `SAPDocumentTranslationApplyToSelector` instance with all required arguments.
  `boolean`
  `equals(Object o)`
  `SAPDocumentTranslationApplyToSelector.CategoryEnum`
  `getCategory()`
  Category to apply translation to.
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `SAPDocumentTranslationApplyToSelector`.
  `List<String>`
  `getItems()`
  List of placeholders or roles to apply translation to
  `String`
  `getSourceLanguage()`
  Language of the text to be translated.
  `int`
  `hashCode()`
  `SAPDocumentTranslationApplyToSelector`
  `items(List<String> items)`
  Set the items of this `SAPDocumentTranslationApplyToSelector` instance and return the same instance.
  `void`
  `setCategory(SAPDocumentTranslationApplyToSelector.CategoryEnum category)`
  Set the category of this `SAPDocumentTranslationApplyToSelector` instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `SAPDocumentTranslationApplyToSelector` instance.
  `void`
  `setItems(List<String> items)`
  Set the items of this `SAPDocumentTranslationApplyToSelector` instance.
  `void`
  `setSourceLanguage(String sourceLanguage)`
  Set the sourceLanguage of this `SAPDocumentTranslationApplyToSelector` instance.
  `SAPDocumentTranslationApplyToSelector`
  `sourceLanguage(String sourceLanguage)`
  Set the sourceLanguage of this `SAPDocumentTranslationApplyToSelector` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `SAPDocumentTranslationApplyToSelector` instance including unrecognized properties.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### SAPDocumentTranslationApplyToSelector

    protected SAPDocumentTranslationApplyToSelector()
    Default constructor for SAPDocumentTranslationApplyToSelector.

- ## Method Details

  - ### category

    @Nonnull public SAPDocumentTranslationApplyToSelector category(@Nonnull SAPDocumentTranslationApplyToSelector.CategoryEnum category)
    Set the category of this `SAPDocumentTranslationApplyToSelector` instance and return the same instance.
    Parameters:
      `category` - Category to apply translation to.
    Returns:
      The same instance of this `SAPDocumentTranslationApplyToSelector` class

  - ### getCategory

    @Nonnull public SAPDocumentTranslationApplyToSelector.CategoryEnum getCategory()
    Category to apply translation to.
    Returns:
      category The category of this `SAPDocumentTranslationApplyToSelector` instance.

  - ### setCategory

    public void setCategory(@Nonnull SAPDocumentTranslationApplyToSelector.CategoryEnum category)
    Set the category of this `SAPDocumentTranslationApplyToSelector` instance.
    Parameters:
      `category` - Category to apply translation to.

  - ### items

    @Nonnull public SAPDocumentTranslationApplyToSelector items(@Nonnull List<String> items)
    Set the items of this `SAPDocumentTranslationApplyToSelector` instance and return the same instance.
    Parameters:
      `items` - List of placeholders or roles to apply translation to
    Returns:
      The same instance of this `SAPDocumentTranslationApplyToSelector` class

  - ### addItemsItem

    @Nonnull public SAPDocumentTranslationApplyToSelector addItemsItem(@Nonnull String itemsItem)
    Add one items instance to this `SAPDocumentTranslationApplyToSelector`.
    Parameters:
      `itemsItem` - The items that should be added
    Returns:
      The same instance of type `SAPDocumentTranslationApplyToSelector`

  - ### getItems

    @Nonnull public List<String> getItems()
    List of placeholders or roles to apply translation to
    Returns:
      items The items of this `SAPDocumentTranslationApplyToSelector` instance.

  - ### setItems

    public void setItems(@Nonnull List<String> items)
    Set the items of this `SAPDocumentTranslationApplyToSelector` instance.
    Parameters:
      `items` - List of placeholders or roles to apply translation to

  - ### sourceLanguage

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

  - ### getSourceLanguage

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

  - ### setSourceLanguage

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

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `SAPDocumentTranslationApplyToSelector`.
    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 `SAPDocumentTranslationApplyToSelector` 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 `SAPDocumentTranslationApplyToSelector` 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 `SAPDocumentTranslationApplyToSelector` 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 SAPDocumentTranslationApplyToSelector.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `SAPDocumentTranslationApplyToSelector` instance with all required arguments.