Interface TypeRemoveEnumValuesAction
- All Superinterfaces:
ResourceUpdateAction<TypeUpdateAction>,TypeUpdateAction
Removes EnumValues from an EnumType FieldDefinition. This update action can be used to update an EnumType FieldDefinition and a SetType FieldDefinition of EnumType.
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
TypeRemoveEnumValuesAction typeRemoveEnumValuesAction = TypeRemoveEnumValuesAction.builder()
.fieldName("{fieldName}")
.plusKeys(keysBuilder -> keysBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for TypeRemoveEnumValuesAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for TypeRemoveEnumValuesActionbuilder(TypeRemoveEnumValuesAction template) create builder for TypeRemoveEnumValuesAction instancecopyDeep()static TypeRemoveEnumValuesActiondeepCopy(TypeRemoveEnumValuesAction template) factory method to create a deep copy of TypeRemoveEnumValuesAction@NotNull Stringnameof the FieldDefinition to update.getKeys()Keys of the EnumValues to remove.static TypeRemoveEnumValuesActionof()factory methodstatic TypeRemoveEnumValuesActionof(TypeRemoveEnumValuesAction template) factory method to create a shallow copy TypeRemoveEnumValuesActionvoidsetFieldName(String fieldName) nameof the FieldDefinition to update.voidKeys of the EnumValues to remove.voidKeys of the EnumValues to remove.static tools.jackson.core.type.TypeReference<TypeRemoveEnumValuesAction>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_ENUM_VALUES
discriminator value for TypeRemoveEnumValuesAction- See Also:
-
-
Method Details
-
getFieldName
nameof the FieldDefinition to update.- Returns:
- fieldName
-
getKeys
Keys of the EnumValues 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 EnumValues to remove. An empty array results in no change.
- Parameters:
keys- values to be set
-
setKeys
Keys of the EnumValues to remove. An empty array results in no change.
- Parameters:
keys- values to be set
-
of
factory method- Returns:
- instance of TypeRemoveEnumValuesAction
-
of
factory method to create a shallow copy TypeRemoveEnumValuesAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TypeRemoveEnumValuesAction copyDeep()- Specified by:
copyDeepin interfaceTypeUpdateAction
-
deepCopy
factory method to create a deep copy of TypeRemoveEnumValuesAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TypeRemoveEnumValuesAction- Returns:
- builder
-
builder
create builder for TypeRemoveEnumValuesAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTypeRemoveEnumValuesAction
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
-