Interface GraphQLProductPresentWithDifferentVariantSelectionError
- All Superinterfaces:
GraphQLErrorObject
Returned when a Product is already assigned to a Product Selection, but the Product Selection has either a different Product Variant Selection or a different Product Variant Exclusion.
The error is returned as a failed response either to the Add Product or to the Exclude Product update action.
Example to create an instance using the builder pattern
GraphQLProductPresentWithDifferentVariantSelectionError graphQLProductPresentWithDifferentVariantSelectionError = GraphQLProductPresentWithDifferentVariantSelectionError.builder()
.product(productBuilder -> productBuilder)
.existingVariantSelection(existingVariantSelectionBuilder -> existingVariantSelectionBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLProductPresentWithDifferentVariantSelectionError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLProductPresentWithDifferentVariantSelectionErrorcreate builder for GraphQLProductPresentWithDifferentVariantSelectionError instancefactory method to create a deep copy of GraphQLProductPresentWithDifferentVariantSelectionError@NotNull String
getCode()
One of the error codes that is listed on the Errors page.@NotNull @Valid ProductVariantSelection
Existing Product Variant Selection or Exclusion for the Product in the Product Selection.@NotNull @Valid ProductReference
Reference to the Product for which the error was returned.of()
factory methodfactory method to create a shallow copy GraphQLProductPresentWithDifferentVariantSelectionErrorvoid
setExistingVariantSelection
(ProductVariantSelection existingVariantSelection) Existing Product Variant Selection or Exclusion for the Product in the Product Selection.void
setProduct
(ProductReference product) Reference to the Product for which the error was returned.static com.fasterxml.jackson.core.type.TypeReference<GraphQLProductPresentWithDifferentVariantSelectionError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLProductPresentWithDifferentVariantSelectionError
(Function<GraphQLProductPresentWithDifferentVariantSelectionError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
PRODUCT_PRESENT_WITH_DIFFERENT_VARIANT_SELECTION
discriminator value for GraphQLProductPresentWithDifferentVariantSelectionError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObject
One of the error codes that is listed on the Errors page.
- Specified by:
getCode
in interfaceGraphQLErrorObject
- Returns:
- code
-
getProduct
Reference to the Product for which the error was returned.
- Returns:
- product
-
getExistingVariantSelection
Existing Product Variant Selection or Exclusion for the Product in the Product Selection.
- Returns:
- existingVariantSelection
-
setProduct
Reference to the Product for which the error was returned.
- Parameters:
product
- value to be set
-
setExistingVariantSelection
Existing Product Variant Selection or Exclusion for the Product in the Product Selection.
- Parameters:
existingVariantSelection
- value to be set
-
of
factory method- Returns:
- instance of GraphQLProductPresentWithDifferentVariantSelectionError
-
of
static GraphQLProductPresentWithDifferentVariantSelectionError of(GraphQLProductPresentWithDifferentVariantSelectionError template) factory method to create a shallow copy GraphQLProductPresentWithDifferentVariantSelectionError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static GraphQLProductPresentWithDifferentVariantSelectionError deepCopy(@Nullable GraphQLProductPresentWithDifferentVariantSelectionError template) factory method to create a deep copy of GraphQLProductPresentWithDifferentVariantSelectionError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLProductPresentWithDifferentVariantSelectionError- Returns:
- builder
-
builder
static GraphQLProductPresentWithDifferentVariantSelectionErrorBuilder builder(GraphQLProductPresentWithDifferentVariantSelectionError template) create builder for GraphQLProductPresentWithDifferentVariantSelectionError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLProductPresentWithDifferentVariantSelectionError
default <T> T withGraphQLProductPresentWithDifferentVariantSelectionError(Function<GraphQLProductPresentWithDifferentVariantSelectionError, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<GraphQLProductPresentWithDifferentVariantSelectionError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-