AI-generated Key Takeaways
-
SuggestionsResponseBuilder
helps create suggestion responses for auto-complete in Google Workspace Add-ons and Google Chat apps. -
It provides methods to set suggestions and build the response object.
-
The
build()
method creates the final response and validates it, whilesetSuggestions()
adds the desired suggestions. -
Calling
build()
without setting suggestions might result in an error, ensuring the response's validity.
A builder for Suggestions
objects.
Available for Google Workspace add-ons and Google Chat apps.
Methods
Method | Return type | Brief description |
---|---|---|
build() | Suggestions | Builds the current suggestions response and validates it. |
set | Suggestions | Sets the suggestions used in auto complete in text fields. |
Detailed documentation
build()
Builds the current suggestions response and validates it.
Return
Suggestions
— A validated SuggestionsResponse.
Throws
Error
— if the constructed suggestions response isn't valid.
setSuggestions(suggestions)
Sets the suggestions used in auto complete in text fields.
Parameters
Name | Type | Description |
---|---|---|
suggestions | Suggestions | The Suggestions to use. |
Return
Suggestions
— This object.