Interface GraphQLMissingRoleOnChannelError
- All Superinterfaces:
GraphQLErrorObject
Returned when one of the following states occur:
- Channel is added or set on a Store with missing Channel
roles
. - Standalone Price references a Channel that does not contain the
ProductDistribution
role.
The error is returned as a failed response to:
- Add Distribution Channel, Set Distribution Channel, Add Supply Channel, and Set Supply Channel update actions.
- Create StandalonePrice request.
Example to create an instance using the builder pattern
GraphQLMissingRoleOnChannelError graphQLMissingRoleOnChannelError = GraphQLMissingRoleOnChannelError.builder()
.missingRole(ChannelRoleEnum.INVENTORY_SUPPLY)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLMissingRoleOnChannelError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLMissingRoleOnChannelErrorbuilder
(GraphQLMissingRoleOnChannelError template) create builder for GraphQLMissingRoleOnChannelError instancedeepCopy
(GraphQLMissingRoleOnChannelError template) factory method to create a deep copy of GraphQLMissingRoleOnChannelError@Valid ChannelResourceIdentifier
ResourceIdentifier to a given Channel.@NotNull String
getCode()
One of the error codes that is listed on the Errors page.@NotNull ChannelRoleEnum
ProductDistribution
for Product Distribution Channels allowed for the Store.of()
factory methodof
(GraphQLMissingRoleOnChannelError template) factory method to create a shallow copy GraphQLMissingRoleOnChannelErrorvoid
setChannel
(ChannelResourceIdentifier channel) ResourceIdentifier to a given Channel.void
setMissingRole
(ChannelRoleEnum missingRole) ProductDistribution
for Product Distribution Channels allowed for the Store.static com.fasterxml.jackson.core.type.TypeReference<GraphQLMissingRoleOnChannelError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
MISSING_ROLE_ON_CHANNEL
discriminator value for GraphQLMissingRoleOnChannelError- 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
-
getChannel
ResourceIdentifier to a given Channel.
- Returns:
- channel
-
getMissingRole
ProductDistribution
for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupply
for Inventory Supply Channels allowed for the Store.
- Returns:
- missingRole
-
setChannel
ResourceIdentifier to a given Channel.
- Parameters:
channel
- value to be set
-
setMissingRole
ProductDistribution
for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupply
for Inventory Supply Channels allowed for the Store.
- Parameters:
missingRole
- value to be set
-
of
factory method- Returns:
- instance of GraphQLMissingRoleOnChannelError
-
of
factory method to create a shallow copy GraphQLMissingRoleOnChannelError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static GraphQLMissingRoleOnChannelError deepCopy(@Nullable GraphQLMissingRoleOnChannelError template) factory method to create a deep copy of GraphQLMissingRoleOnChannelError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLMissingRoleOnChannelError- Returns:
- builder
-
builder
create builder for GraphQLMissingRoleOnChannelError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLMissingRoleOnChannelError
default <T> T withGraphQLMissingRoleOnChannelError(Function<GraphQLMissingRoleOnChannelError, 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<GraphQLMissingRoleOnChannelError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-