AI-generated Key Takeaways
- 
          
ActionResponseBuilder is used to build ActionResponse objects.
 - 
          
The
build()method constructs and validates the ActionResponse. - 
          
Methods like
setNavigation,setNotification,setOpenLink, andsetStateChangedconfigure the behavior of the action response. 
A builder for Action objects.
Methods
| Method | Return type | Brief description | 
|---|---|---|
build() | Action | Builds the current action response and validates it. | 
set | Action | Sets the response to a Navigation action. | 
set | Action | Sets the notification to display when the action is activated. | 
set | Action | Sets the URL to navigate to when the action is activated. | 
set | Action | Sets a flag to indicate that this action changed the existing data state. | 
Detailed documentation
build()
Builds the current action response and validates it.
Return
Action — A validated ActionResponse.
Throws
Error — if the constructed action response isn't valid.
setNotification(notification) 
Sets the notification to display when the action is activated.
Parameters
| Name | Type | Description | 
|---|---|---|
notification | Notification | The Notification to use. | 
Return
Action — This object, for chaining.
setOpenLink(openLink)  
Sets the URL to navigate to when the action is activated.
Parameters
| Name | Type | Description | 
|---|---|---|
open | Open | The Open to use. | 
Return
Action — 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
| Name | Type | Description | 
|---|---|---|
state | Boolean | Whether this action has changed the existing state data. Defaults to false. | 
Return
Action — This object, for chaining.