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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for BusinessUnitSetCustomFieldAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for BusinessUnitSetCustomFieldActionbuilder(BusinessUnitSetCustomFieldAction template) create builder for BusinessUnitSetCustomFieldAction instancecopyDeep()deepCopy(BusinessUnitSetCustomFieldAction template) factory method to create a deep copy of BusinessUnitSetCustomFieldAction@NotNull StringgetName()Name of the Custom Field to add, update, or remove.getValue()Ifvalueis absent ornull, this field will be removed if it exists.of()factory methodof(BusinessUnitSetCustomFieldAction template) factory method to create a shallow copy BusinessUnitSetCustomFieldActionvoidName of the Custom Field to add, update, or remove.voidIfvalueis 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> Taccessor map functionMethods inherited from interface com.commercetools.api.models.business_unit.BusinessUnitUpdateAction
getAction, withBusinessUnitUpdateActionMethods 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
valueis 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. Ifvalueis 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
valueis 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. Ifvalueis 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
-
copyDeep
BusinessUnitSetCustomFieldAction copyDeep()- Specified by:
copyDeepin interfaceBusinessUnitUpdateAction
-
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
-