Class SAPDocumentTranslationApplyToSelector
java.lang.Object
com.sap.ai.sdk.orchestration.model.SAPDocumentTranslationApplyToSelector
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 ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class.static enumCategory to apply translation to. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for SAPDocumentTranslationApplyToSelector. -
Method Summary
Modifier and TypeMethodDescriptionaddItemsItem(String itemsItem) Add one items instance to thisSAPDocumentTranslationApplyToSelector.Set the category of thisSAPDocumentTranslationApplyToSelectorinstance and return the same instance.create()Create a type-safe, fluent-api builder object to construct a newSAPDocumentTranslationApplyToSelectorinstance with all required arguments.booleanCategory to apply translation to.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theSAPDocumentTranslationApplyToSelector.getItems()List of placeholders or roles to apply translation toLanguage of the text to be translated.inthashCode()Set the items of thisSAPDocumentTranslationApplyToSelectorinstance and return the same instance.voidSet the category of thisSAPDocumentTranslationApplyToSelectorinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisSAPDocumentTranslationApplyToSelectorinstance.voidSet the items of thisSAPDocumentTranslationApplyToSelectorinstance.voidsetSourceLanguage(String sourceLanguage) Set the sourceLanguage of thisSAPDocumentTranslationApplyToSelectorinstance.sourceLanguage(String sourceLanguage) Set the sourceLanguage of thisSAPDocumentTranslationApplyToSelectorinstance and return the same instance.toMap()Get the value of all properties of thisSAPDocumentTranslationApplyToSelectorinstance including unrecognized properties.toString()
-
Constructor Details
-
SAPDocumentTranslationApplyToSelector
protected SAPDocumentTranslationApplyToSelector()Default constructor for SAPDocumentTranslationApplyToSelector.
-
-
Method Details
-
category
@Nonnull public SAPDocumentTranslationApplyToSelector category(@Nonnull SAPDocumentTranslationApplyToSelector.CategoryEnum category) Set the category of thisSAPDocumentTranslationApplyToSelectorinstance and return the same instance.- Parameters:
category- Category to apply translation to.- Returns:
- The same instance of this
SAPDocumentTranslationApplyToSelectorclass
-
getCategory
Category to apply translation to.- Returns:
- category The category of this
SAPDocumentTranslationApplyToSelectorinstance.
-
setCategory
Set the category of thisSAPDocumentTranslationApplyToSelectorinstance.- Parameters:
category- Category to apply translation to.
-
items
Set the items of thisSAPDocumentTranslationApplyToSelectorinstance and return the same instance.- Parameters:
items- List of placeholders or roles to apply translation to- Returns:
- The same instance of this
SAPDocumentTranslationApplyToSelectorclass
-
addItemsItem
Add one items instance to thisSAPDocumentTranslationApplyToSelector.- Parameters:
itemsItem- The items that should be added- Returns:
- The same instance of type
SAPDocumentTranslationApplyToSelector
-
getItems
List of placeholders or roles to apply translation to- Returns:
- items The items of this
SAPDocumentTranslationApplyToSelectorinstance.
-
setItems
Set the items of thisSAPDocumentTranslationApplyToSelectorinstance.- Parameters:
items- List of placeholders or roles to apply translation to
-
sourceLanguage
@Nonnull public SAPDocumentTranslationApplyToSelector sourceLanguage(@Nullable String sourceLanguage) Set the sourceLanguage of thisSAPDocumentTranslationApplyToSelectorinstance and return the same instance.- Parameters:
sourceLanguage- Language of the text to be translated.- Returns:
- The same instance of this
SAPDocumentTranslationApplyToSelectorclass
-
getSourceLanguage
Language of the text to be translated.- Returns:
- sourceLanguage The sourceLanguage of this
SAPDocumentTranslationApplyToSelectorinstance.
-
setSourceLanguage
Set the sourceLanguage of thisSAPDocumentTranslationApplyToSelectorinstance.- Parameters:
sourceLanguage- Language of the text to be translated.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theSAPDocumentTranslationApplyToSelector.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisSAPDocumentTranslationApplyToSelectorinstance.- 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
Get the value of all properties of thisSAPDocumentTranslationApplyToSelectorinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisSAPDocumentTranslationApplyToSelectorinstance. 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 propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newSAPDocumentTranslationApplyToSelectorinstance with all required arguments.
-
toMap()instead.