Interface ElementalNode.Visitor
-
- All Implemented Interfaces:
public interface ElementalNode.Visitor<T extends Object>An interface that defines how to map each variant of ElementalNode to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitTextNodeWithType(ElementalTextNodeWithType textNodeWithType)abstract TvisitMetaNodeWithType(ElementalMetaNodeWithType metaNodeWithType)abstract TvisitChannelNodeWithType(ElementalChannelNodeWithType channelNodeWithType)The channel element allows a notification to be customized based on which channel it is sent through. abstract TvisitImageNodeWithType(ElementalImageNodeWithType imageNodeWithType)abstract TvisitActionNodeWithType(ElementalActionNodeWithType actionNodeWithType)abstract TvisitDividerNodeWithType(ElementalDividerNodeWithType dividerNodeWithType)abstract TvisitQuoteNodeWithType(ElementalQuoteNodeWithType quoteNodeWithType)Tunknown(JsonValue json)Maps an unknown variant of ElementalNode to a value of type T. -
-
Method Detail
-
visitTextNodeWithType
abstract T visitTextNodeWithType(ElementalTextNodeWithType textNodeWithType)
-
visitMetaNodeWithType
abstract T visitMetaNodeWithType(ElementalMetaNodeWithType metaNodeWithType)
-
visitChannelNodeWithType
abstract T visitChannelNodeWithType(ElementalChannelNodeWithType channelNodeWithType)
The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a
channelproperty. Which allows you to selectively display an individual element on a per channel basis. See the control flow docs for more details.
-
visitImageNodeWithType
abstract T visitImageNodeWithType(ElementalImageNodeWithType imageNodeWithType)
-
visitActionNodeWithType
abstract T visitActionNodeWithType(ElementalActionNodeWithType actionNodeWithType)
-
visitDividerNodeWithType
abstract T visitDividerNodeWithType(ElementalDividerNodeWithType dividerNodeWithType)
-
visitQuoteNodeWithType
abstract T visitQuoteNodeWithType(ElementalQuoteNodeWithType quoteNodeWithType)
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ElementalNode to a value of type T.
An instance of ElementalNode can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-