Interface ProductAssignmentMissingError
- All Superinterfaces:
ErrorObject
Returned when a Product is not assigned to the Product Selection. The error is returned as a failed response either to the Set Variant Selection or to the Set Variant Exclusion update action.
Example to create an instance using the builder pattern
ProductAssignmentMissingError productAssignmentMissingError = ProductAssignmentMissingError.builder()
.message("{message}")
.product(productBuilder -> productBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductAssignmentMissingError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductAssignmentMissingErrorbuilder
(ProductAssignmentMissingError template) create builder for ProductAssignmentMissingError instancedeepCopy
(ProductAssignmentMissingError template) factory method to create a deep copy of ProductAssignmentMissingError@NotNull String
getCode()
Error identifier.@NotNull String
For Product Selection of mode Individual, the message is:"A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection."
For Product Selection of mode IndividualExclusion, the message is:"A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."
@NotNull @Valid ProductReference
Reference to the Product for which the error was returned.of()
factory methodof
(ProductAssignmentMissingError template) factory method to create a shallow copy ProductAssignmentMissingErrorvoid
setMessage
(String message) For Product Selection of mode Individual, the message is:"A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection."
For Product Selection of mode IndividualExclusion, the message is:"A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."
void
setProduct
(ProductReference product) Reference to the Product for which the error was returned.static com.fasterxml.jackson.core.type.TypeReference<ProductAssignmentMissingError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
PRODUCT_ASSIGNMENT_MISSING
discriminator value for ProductAssignmentMissingError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
For Product Selection of mode Individual, the message is:
"A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection."
For Product Selection of mode IndividualExclusion, the message is:"A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getProduct
Reference to the Product for which the error was returned.
- Returns:
- product
-
setMessage
For Product Selection of mode Individual, the message is:
"A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection."
For Product Selection of mode IndividualExclusion, the message is:"A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setProduct
Reference to the Product for which the error was returned.
- Parameters:
product
- value to be set
-
of
factory method- Returns:
- instance of ProductAssignmentMissingError
-
of
factory method to create a shallow copy ProductAssignmentMissingError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductAssignmentMissingError deepCopy(@Nullable ProductAssignmentMissingError template) factory method to create a deep copy of ProductAssignmentMissingError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductAssignmentMissingError- Returns:
- builder
-
builder
create builder for ProductAssignmentMissingError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductAssignmentMissingError
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
-