Interface BusinessUnitSetCustomFieldAction
- All Superinterfaces:
BusinessUnitUpdateAction
,ResourceUpdateAction<BusinessUnitUpdateAction>
Adding a Custom Field to a Business Unit generates the BusinessUnitCustomFieldAdded Message, removing one generates the BusinessUnitCustomFieldRemoved Message, and updating an existing one generates the BusinessUnitCustomFieldChanged Message.
Example to create an instance using the builder pattern
BusinessUnitSetCustomFieldAction businessUnitSetCustomFieldAction = BusinessUnitSetCustomFieldAction.builder()
.name("{name}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for BusinessUnitSetCustomFieldAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for BusinessUnitSetCustomFieldActionbuilder
(BusinessUnitSetCustomFieldAction template) create builder for BusinessUnitSetCustomFieldAction instancedeepCopy
(BusinessUnitSetCustomFieldAction template) factory method to create a deep copy of BusinessUnitSetCustomFieldAction@NotNull String
getName()
Name of the Custom Field to add, update, or remove.getValue()
Ifvalue
is absent ornull
, this field will be removed if it exists.of()
factory methodof
(BusinessUnitSetCustomFieldAction template) factory method to create a shallow copy BusinessUnitSetCustomFieldActionvoid
Name of the Custom Field to add, update, or remove.void
Ifvalue
is absent ornull
, this field will be removed if it exists.static com.fasterxml.jackson.core.type.TypeReference<BusinessUnitSetCustomFieldAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.business_unit.BusinessUnitUpdateAction
getAction, withBusinessUnitUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_CUSTOM_FIELD
discriminator value for BusinessUnitSetCustomFieldAction- See Also:
-
-
Method Details
-
getName
Name of the Custom Field to add, update, or remove.
- Returns:
- name
-
getValue
Object getValue()If
value
is absent ornull
, this field will be removed if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error. Ifvalue
is provided, it is set for the field defined byname
.- Returns:
- value
-
setName
Name of the Custom Field to add, update, or remove.
- Parameters:
name
- value to be set
-
setValue
If
value
is absent ornull
, this field will be removed if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error. Ifvalue
is provided, it is set for the field defined byname
.- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of BusinessUnitSetCustomFieldAction
-
of
factory method to create a shallow copy BusinessUnitSetCustomFieldAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static BusinessUnitSetCustomFieldAction deepCopy(@Nullable BusinessUnitSetCustomFieldAction template) factory method to create a deep copy of BusinessUnitSetCustomFieldAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for BusinessUnitSetCustomFieldAction- Returns:
- builder
-
builder
create builder for BusinessUnitSetCustomFieldAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withBusinessUnitSetCustomFieldAction
default <T> T withBusinessUnitSetCustomFieldAction(Function<BusinessUnitSetCustomFieldAction, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
ofUnset
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<BusinessUnitSetCustomFieldAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-