Class ActionResponseBuilder

ActionResponseBuilder

A builder for ActionResponse objects.

Methods

MethodReturn typeBrief description
build()ActionResponseBuilds the current action response and validates it.
setNavigation(navigation)ActionResponseBuilderSets the response to a Navigation action.
setNotification(notification)ActionResponseBuilderSets the notification to display when the action is activated.
setOpenLink(openLink)ActionResponseBuilderSets the URL to navigate to when the action is activated.
setStateChanged(stateChanged)ActionResponseBuilderSets a flag to indicate that this action changed the existing data state.

Detailed documentation

build()

Builds the current action response and validates it.

Return

ActionResponse — a validated ActionResponse.

Throws

Error — if the constructed action response isn't valid.


setNavigation(navigation)

Sets the response to a Navigation action.

Parameters

NameTypeDescription
navigationNavigationthe Navigation to use.

Return

ActionResponseBuilder — this object, for chaining.


setNotification(notification)

Sets the notification to display when the action is activated.

Parameters

NameTypeDescription
notificationNotificationthe Notification to use.

Return

ActionResponseBuilder — this object, for chaining.


setOpenLink(openLink)

Sets the URL to navigate to when the action is activated.

Parameters

NameTypeDescription
openLinkOpenLinkthe OpenLink to use.

Return

ActionResponseBuilder — this object, for chaining.


setStateChanged(stateChanged)

Sets a flag to indicate that this action changed the existing data state. For example, if the action created a task or updated contact information. When this flag is set to true, services such as Gmail can attempt to clear any cached state data associated with this action.

Parameters

NameTypeDescription
stateChangedBooleanWhether this action has changed the existing state data. Defaults to false.

Return

ActionResponseBuilder — this object, for chaining.

Enviar comentários sobre…

Precisa de ajuda? Acesse nossa página de suporte.