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
ProductDistributionrole.
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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLMissingRoleOnChannelError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLMissingRoleOnChannelErrorbuilder(GraphQLMissingRoleOnChannelError template) create builder for GraphQLMissingRoleOnChannelError instancecopyDeep()deepCopy(GraphQLMissingRoleOnChannelError template) factory method to create a deep copy of GraphQLMissingRoleOnChannelError@Valid ChannelResourceIdentifierResourceIdentifier to a given Channel.@NotNull StringgetCode()One of the error codes that is listed on the Errors page.@NotNull ChannelRoleEnumProductDistributionfor Product Distribution Channels allowed for the Store.of()factory methodof(GraphQLMissingRoleOnChannelError template) factory method to create a shallow copy GraphQLMissingRoleOnChannelErrorvoidsetChannel(ChannelResourceIdentifier channel) ResourceIdentifier to a given Channel.voidsetMissingRole(ChannelRoleEnum missingRole) ProductDistributionfor Product Distribution Channels allowed for the Store.static com.fasterxml.jackson.core.type.TypeReference<GraphQLMissingRoleOnChannelError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor 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:GraphQLErrorObjectOne of the error codes that is listed on the Errors page.
- Specified by:
getCodein interfaceGraphQLErrorObject- Returns:
- code
-
getChannel
ResourceIdentifier to a given Channel.
- Returns:
- channel
-
getMissingRole
ProductDistributionfor Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupplyfor Inventory Supply Channels allowed for the Store.
- Returns:
- missingRole
-
setChannel
ResourceIdentifier to a given Channel.
- Parameters:
channel- value to be set
-
setMissingRole
ProductDistributionfor Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupplyfor 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
-
copyDeep
GraphQLMissingRoleOnChannelError copyDeep()- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
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
-