Class GABuildersKt
-
- All Implemented Interfaces:
public final class GABuildersKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static ConnectorTypegaConnectorType
-
Method Summary
Modifier and Type Method Description final ConnectorTypegetGaConnectorType()The Google Assistant ConnectorType. final static <T extends Bus<T>> TsendToGoogleAssistant(T $self, Function1<T, GAResponseConnectorMessage> messageProvider, Long delay)Sends a Google Assistant message only if the ConnectorType of the current BotBus is gaConnectorType. final static <T extends Bus<T>> TendForGoogleAssistant(T $self, Function1<T, GAResponseConnectorMessage> messageProvider, Long delay)Sends a Google Assistant message as last bot answer, only if the ConnectorType of the current BotBus is gaConnectorType. final static <T extends Bus<T>> TwithGoogleAssistant(T $self, Function0<GAResponseConnectorMessage> messageProvider)Adds a Google Assistant ConnectorMessage if the current connector is Google Assistant. final static <T extends Bus<T>> TwithGoogleVoiceAssistant(T $self, Function0<GAResponseConnectorMessage> messageProvider)If the device supports audio, adds a Google Assistant ConnectorMessage if the current connector is Google Assistant. final static GAResponseConnectorMessagegaFinalMessage(I18nTranslator $self, GARichResponse richResponse)Final Google Assistant message (end of conversation). final static GAResponseConnectorMessagegaFinalMessage(I18nTranslator $self, CharSequence text)Final Google Assistant message (end of conversation). final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, GAInputPrompt inputPrompt, List<GAExpectedIntent> possibleIntents, List<String> speechBiasingHints)Google Assistant Message with all available parameters. final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, CharSequence text, CharSequence suggestions)Google Assistant Message with suggestions. final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, CharSequence text, GABasicCard basicCard)Google Assistant Message with GABasicCard. final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, GARichResponse richResponse)Google Assistant Message with GARichResponse. final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, GAExpectedIntent possibleIntent)Google Assistant Message with one GAExpectedIntent. final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, List<GAExpectedIntent> possibleIntents)Google Assistant Message with multiple GAExpectedIntent. final static GAResponseConnectorMessagegaMessage(I18nTranslator $self, CharSequence text, List<GAExpectedIntent> possibleIntents)Google Assistant Message with text and multiple GAExpectedIntent. final static GAResponseConnectorMessagegaLogout()final static GAExpectedIntentpermissionIntent(I18nTranslator $self, CharSequence optionalContext, GAPermission permissions)Google Assistant Message asking for GAPermission. final static GAExpectedIntentupdatePermissionIntent(I18nTranslator $self, String intent)Google Assistant Message asking for update GAPermission. final static GALinkOutSuggestionlinkOutSuggestion(I18nTranslator $self, CharSequence destinationName, String url)Provides a GALinkOutSuggestion. final static GAItemitem(I18nTranslator $self, GASimpleResponse simpleResponse, GABasicCard basicCard, GAStructuredResponse structuredResponse)Provides a GAItem with all available parameters. final static GAItemitem(I18nTranslator $self, GABasicCard basicCard)Provides a GAItem with a GABasicCard. final static GAItemitem(I18nTranslator $self, GAStructuredResponse structuredResponse)Provides a GAItem with a GAStructuredResponse. final static GAItemitem(I18nTranslator $self, GASimpleResponse simpleResponse)Provides a GAItem with a GASimpleResponse. final static GAImagegaImage(I18nTranslator $self, String url, CharSequence accessibilityText, Integer height, Integer width)Provides a GAImage with all available parameters. final static GAOptionValueSpecoptionValueSpec(I18nTranslator $self, GASimpleSelect simpleSelect, GAListSelect listSelect, GACarouselSelect carouselSelect)Provides a GAOptionValueSpec with all available parameters. final static GAInputPromptinputPrompt(I18nTranslator $self, GARichResponse richResponse, List<GASimpleResponse> noInputPrompts)Provides a GAInputPrompt with all available parameters. final static GAInputPromptinputPrompt(I18nTranslator $self, CharSequence text, GALinkOutSuggestion linkOutSuggestion, List<GASimpleResponse> noInputPrompts)Provides a GAInputPrompt with a simple GARichResponse builder. final static GAButtongaButton(I18nTranslator $self, CharSequence title, String url)Provides a GAButton. final static <T extends Bus<T>> GAOptionInfooptionInfo(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)Provides a GAOptionInfo with all available parameters. final static GAExpectedIntentexpectedTextIntent()The common GAIntent.text. -
-
Method Detail
-
getGaConnectorType
final ConnectorType getGaConnectorType()
The Google Assistant ConnectorType.
-
sendToGoogleAssistant
final static <T extends Bus<T>> T sendToGoogleAssistant(T $self, Function1<T, GAResponseConnectorMessage> messageProvider, Long delay)
Sends a Google Assistant message only if the ConnectorType of the current BotBus is gaConnectorType.
-
endForGoogleAssistant
final static <T extends Bus<T>> T endForGoogleAssistant(T $self, Function1<T, GAResponseConnectorMessage> messageProvider, Long delay)
Sends a Google Assistant message as last bot answer, only if the ConnectorType of the current BotBus is gaConnectorType.
-
withGoogleAssistant
final static <T extends Bus<T>> T withGoogleAssistant(T $self, Function0<GAResponseConnectorMessage> messageProvider)
Adds a Google Assistant ConnectorMessage if the current connector is Google Assistant. You need to call BotBus.send or BotBus.end later to send this message.
-
withGoogleVoiceAssistant
final static <T extends Bus<T>> T withGoogleVoiceAssistant(T $self, Function0<GAResponseConnectorMessage> messageProvider)
If the device supports audio, adds a Google Assistant ConnectorMessage if the current connector is Google Assistant. You need to call BotBus.send or BotBus.end later to send this message.
-
gaFinalMessage
final static GAResponseConnectorMessage gaFinalMessage(I18nTranslator $self, GARichResponse richResponse)
Final Google Assistant message (end of conversation).
-
gaFinalMessage
final static GAResponseConnectorMessage gaFinalMessage(I18nTranslator $self, CharSequence text)
Final Google Assistant message (end of conversation).
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, GAInputPrompt inputPrompt, List<GAExpectedIntent> possibleIntents, List<String> speechBiasingHints)
Google Assistant Message with all available parameters.
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, CharSequence text, CharSequence suggestions)
Google Assistant Message with suggestions.
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, CharSequence text, GABasicCard basicCard)
Google Assistant Message with GABasicCard.
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, GARichResponse richResponse)
Google Assistant Message with GARichResponse.
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, GAExpectedIntent possibleIntent)
Google Assistant Message with one GAExpectedIntent.
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, List<GAExpectedIntent> possibleIntents)
Google Assistant Message with multiple GAExpectedIntent.
-
gaMessage
final static GAResponseConnectorMessage gaMessage(I18nTranslator $self, CharSequence text, List<GAExpectedIntent> possibleIntents)
Google Assistant Message with text and multiple GAExpectedIntent.
-
gaLogout
final static GAResponseConnectorMessage gaLogout()
-
permissionIntent
final static GAExpectedIntent permissionIntent(I18nTranslator $self, CharSequence optionalContext, GAPermission permissions)
Google Assistant Message asking for GAPermission.
-
updatePermissionIntent
final static GAExpectedIntent updatePermissionIntent(I18nTranslator $self, String intent)
Google Assistant Message asking for update GAPermission.
-
linkOutSuggestion
final static GALinkOutSuggestion linkOutSuggestion(I18nTranslator $self, CharSequence destinationName, String url)
Provides a GALinkOutSuggestion.
-
item
final static GAItem item(I18nTranslator $self, GASimpleResponse simpleResponse, GABasicCard basicCard, GAStructuredResponse structuredResponse)
Provides a GAItem with all available parameters.
-
item
final static GAItem item(I18nTranslator $self, GABasicCard basicCard)
Provides a GAItem with a GABasicCard.
-
item
final static GAItem item(I18nTranslator $self, GAStructuredResponse structuredResponse)
Provides a GAItem with a GAStructuredResponse.
-
item
final static GAItem item(I18nTranslator $self, GASimpleResponse simpleResponse)
Provides a GAItem with a GASimpleResponse.
-
gaImage
final static GAImage gaImage(I18nTranslator $self, String url, CharSequence accessibilityText, Integer height, Integer width)
Provides a GAImage with all available parameters.
-
optionValueSpec
final static GAOptionValueSpec optionValueSpec(I18nTranslator $self, GASimpleSelect simpleSelect, GAListSelect listSelect, GACarouselSelect carouselSelect)
Provides a GAOptionValueSpec with all available parameters.
-
inputPrompt
final static GAInputPrompt inputPrompt(I18nTranslator $self, GARichResponse richResponse, List<GASimpleResponse> noInputPrompts)
Provides a GAInputPrompt with all available parameters.
-
inputPrompt
final static GAInputPrompt inputPrompt(I18nTranslator $self, CharSequence text, GALinkOutSuggestion linkOutSuggestion, List<GASimpleResponse> noInputPrompts)
Provides a GAInputPrompt with a simple GARichResponse builder.
-
gaButton
final static GAButton gaButton(I18nTranslator $self, CharSequence title, String url)
Provides a GAButton.
-
optionInfo
final static <T extends Bus<T>> GAOptionInfo optionInfo(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)
Provides a GAOptionInfo with all available parameters.
-
expectedTextIntent
final static GAExpectedIntent expectedTextIntent()
The common GAIntent.text.
-
-
-
-