Interface TypeRemoveLocalizedEnumValuesAction
- All Superinterfaces:
ResourceUpdateAction<TypeUpdateAction>,TypeUpdateAction
Removes LocalizedEnumValues from a LocalizedEnumType FieldDefinition. This update action can be used to update a LocalizedEnumType FieldDefinition and a SetType FieldDefinition of LocalizedEnumType.
This update action is always allowed, even if the FieldDefinition is required and even if a resource still has a Custom Field value referencing one of the removed keys. Existing Custom Field values are not updated or removed by this update action, and are returned unchanged until they are explicitly updated. Note that a subsequent update of a single Custom Field on such a resource can fail, because that update revalidates all Custom Field values on the resource.
Example to create an instance using the builder pattern
TypeRemoveLocalizedEnumValuesAction typeRemoveLocalizedEnumValuesAction = TypeRemoveLocalizedEnumValuesAction.builder()
.fieldName("{fieldName}")
.plusKeys(keysBuilder -> keysBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for TypeRemoveLocalizedEnumValuesAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for TypeRemoveLocalizedEnumValuesActionbuilder(TypeRemoveLocalizedEnumValuesAction template) create builder for TypeRemoveLocalizedEnumValuesAction instancecopyDeep()deepCopy(TypeRemoveLocalizedEnumValuesAction template) factory method to create a deep copy of TypeRemoveLocalizedEnumValuesAction@NotNull Stringnameof the FieldDefinition to update.getKeys()Keys of the LocalizedEnumValues to remove.of()factory methodof(TypeRemoveLocalizedEnumValuesAction template) factory method to create a shallow copy TypeRemoveLocalizedEnumValuesActionvoidsetFieldName(String fieldName) nameof the FieldDefinition to update.voidKeys of the LocalizedEnumValues to remove.voidKeys of the LocalizedEnumValues to remove.static tools.jackson.core.type.TypeReference<TypeRemoveLocalizedEnumValuesAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
getMethods inherited from interface com.commercetools.api.models.type.TypeUpdateAction
getAction, withTypeUpdateAction
-
Field Details
-
REMOVE_LOCALIZED_ENUM_VALUES
discriminator value for TypeRemoveLocalizedEnumValuesAction- See Also:
-
-
Method Details
-
getFieldName
nameof the FieldDefinition to update.- Returns:
- fieldName
-
getKeys
Keys of the LocalizedEnumValues to remove. An empty array results in no change.
- Returns:
- keys
-
setFieldName
nameof the FieldDefinition to update.- Parameters:
fieldName- value to be set
-
setKeys
Keys of the LocalizedEnumValues to remove. An empty array results in no change.
- Parameters:
keys- values to be set
-
setKeys
Keys of the LocalizedEnumValues to remove. An empty array results in no change.
- Parameters:
keys- values to be set
-
of
factory method- Returns:
- instance of TypeRemoveLocalizedEnumValuesAction
-
of
factory method to create a shallow copy TypeRemoveLocalizedEnumValuesAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TypeRemoveLocalizedEnumValuesAction copyDeep()- Specified by:
copyDeepin interfaceTypeUpdateAction
-
deepCopy
@Nullable static TypeRemoveLocalizedEnumValuesAction deepCopy(@Nullable TypeRemoveLocalizedEnumValuesAction template) factory method to create a deep copy of TypeRemoveLocalizedEnumValuesAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TypeRemoveLocalizedEnumValuesAction- Returns:
- builder
-
builder
static TypeRemoveLocalizedEnumValuesActionBuilder builder(TypeRemoveLocalizedEnumValuesAction template) create builder for TypeRemoveLocalizedEnumValuesAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTypeRemoveLocalizedEnumValuesAction
default <T> T withTypeRemoveLocalizedEnumValuesAction(Function<TypeRemoveLocalizedEnumValuesAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-