Class SuggestionsResponseBuilder

  • SuggestionsResponseBuilder is used to build SuggestionsResponse objects.

  • It is available for Google Workspace add-ons and Google Chat apps.

  • It has methods to build the suggestions response and set the suggestions used in autocomplete in text fields.

SuggestionsResponseBuilder

A builder forSuggestionsResponse objects.

Available for Google Workspace add-ons and Google Chat apps.

Methods

MethodReturn typeBrief description
build()SuggestionsResponseBuilds the current suggestions response and validates it.
setSuggestions(suggestions)SuggestionsResponseBuilderSets the suggestions used in auto complete in text fields.

Detailed documentation

build()

Builds the current suggestions response and validates it.

Return

SuggestionsResponse — 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

NameTypeDescription
suggestionsSuggestionsTheSuggestions to use.

Return

SuggestionsResponseBuilder — This object.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-03 UTC.