Class Suggestions.Builder (2.38.0)

public static final class Suggestions.Builder extends GeneratedMessageV3.Builder<Suggestions.Builder> implements SuggestionsOrBuilder

Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed.

For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing Jav, the list of suggestions filters to show Java and JavaScript.

Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter javascript and others java script. Suggesting JavaScript can standardize how users interact with your app.

When specified, TextInput.type is always SINGLE_LINE, even if it's set to MULTIPLE_LINE.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.Suggestions

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllItems(Iterable<? extends Suggestions.SuggestionItem> values)

public Suggestions.Builder addAllItems(Iterable<? extends Suggestions.SuggestionItem> values)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
values Iterable<? extends com.google.apps.card.v1.Suggestions.SuggestionItem>
Returns
Type Description
Suggestions.Builder

addItems(Suggestions.SuggestionItem value)

public Suggestions.Builder addItems(Suggestions.SuggestionItem value)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
value Suggestions.SuggestionItem
Returns
Type Description
Suggestions.Builder

addItems(Suggestions.SuggestionItem.Builder builderForValue)

public Suggestions.Builder addItems(Suggestions.SuggestionItem.Builder builderForValue)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
builderForValue Suggestions.SuggestionItem.Builder
Returns
Type Description
Suggestions.Builder

addItems(int index, Suggestions.SuggestionItem value)

public Suggestions.Builder addItems(int index, Suggestions.SuggestionItem value)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameters
Name Description
index int
value Suggestions.SuggestionItem
Returns
Type Description
Suggestions.Builder

addItems(int index, Suggestions.SuggestionItem.Builder builderForValue)

public Suggestions.Builder addItems(int index, Suggestions.SuggestionItem.Builder builderForValue)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameters
Name Description
index int
builderForValue Suggestions.SuggestionItem.Builder
Returns
Type Description
Suggestions.Builder

addItemsBuilder()

public Suggestions.SuggestionItem.Builder addItemsBuilder()

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Returns
Type Description
Suggestions.SuggestionItem.Builder

addItemsBuilder(int index)

public Suggestions.SuggestionItem.Builder addItemsBuilder(int index)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
index int
Returns
Type Description
Suggestions.SuggestionItem.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Suggestions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Suggestions.Builder
Overrides

build()

public Suggestions build()
Returns
Type Description
Suggestions

buildPartial()

public Suggestions buildPartial()
Returns
Type Description
Suggestions

clear()

public Suggestions.Builder clear()
Returns
Type Description
Suggestions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Suggestions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Suggestions.Builder
Overrides

clearItems()

public Suggestions.Builder clearItems()

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Returns
Type Description
Suggestions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Suggestions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Suggestions.Builder
Overrides

clone()

public Suggestions.Builder clone()
Returns
Type Description
Suggestions.Builder
Overrides

getDefaultInstanceForType()

public Suggestions getDefaultInstanceForType()
Returns
Type Description
Suggestions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getItems(int index)

public Suggestions.SuggestionItem getItems(int index)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
index int
Returns
Type Description
Suggestions.SuggestionItem

getItemsBuilder(int index)

public Suggestions.SuggestionItem.Builder getItemsBuilder(int index)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
index int
Returns
Type Description
Suggestions.SuggestionItem.Builder

getItemsBuilderList()

public List<Suggestions.SuggestionItem.Builder> getItemsBuilderList()

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Returns
Type Description
List<Builder>

getItemsCount()

public int getItemsCount()

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Returns
Type Description
int

getItemsList()

public List<Suggestions.SuggestionItem> getItemsList()

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Returns
Type Description
List<SuggestionItem>

getItemsOrBuilder(int index)

public Suggestions.SuggestionItemOrBuilder getItemsOrBuilder(int index)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
index int
Returns
Type Description
Suggestions.SuggestionItemOrBuilder

getItemsOrBuilderList()

public List<? extends Suggestions.SuggestionItemOrBuilder> getItemsOrBuilderList()

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Returns
Type Description
List<? extends com.google.apps.card.v1.Suggestions.SuggestionItemOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Suggestions other)

public Suggestions.Builder mergeFrom(Suggestions other)
Parameter
Name Description
other Suggestions
Returns
Type Description
Suggestions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Suggestions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Suggestions.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Suggestions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Suggestions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Suggestions.Builder
Overrides

removeItems(int index)

public Suggestions.Builder removeItems(int index)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameter
Name Description
index int
Returns
Type Description
Suggestions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Suggestions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Suggestions.Builder
Overrides

setItems(int index, Suggestions.SuggestionItem value)

public Suggestions.Builder setItems(int index, Suggestions.SuggestionItem value)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameters
Name Description
index int
value Suggestions.SuggestionItem
Returns
Type Description
Suggestions.Builder

setItems(int index, Suggestions.SuggestionItem.Builder builderForValue)

public Suggestions.Builder setItems(int index, Suggestions.SuggestionItem.Builder builderForValue)

A list of suggestions used for autocomplete recommendations in text input fields.

repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;

Parameters
Name Description
index int
builderForValue Suggestions.SuggestionItem.Builder
Returns
Type Description
Suggestions.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Suggestions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Suggestions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Suggestions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Suggestions.Builder
Overrides