Class Suggestions.Builder (0.1.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.apps.card.v1.Suggestions.SuggestionItem>
Returns
TypeDescription
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
NameDescription
valueSuggestions.SuggestionItem
Returns
TypeDescription
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
NameDescription
builderForValueSuggestions.SuggestionItem.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSuggestions.SuggestionItem
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSuggestions.SuggestionItem.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Suggestions.SuggestionItem.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Suggestions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Suggestions.Builder
Overrides

build()

public Suggestions build()
Returns
TypeDescription
Suggestions

buildPartial()

public Suggestions buildPartial()
Returns
TypeDescription
Suggestions

clear()

public Suggestions.Builder clear()
Returns
TypeDescription
Suggestions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Suggestions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Suggestions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Suggestions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Suggestions.Builder
Overrides

clone()

public Suggestions.Builder clone()
Returns
TypeDescription
Suggestions.Builder
Overrides

getDefaultInstanceForType()

public Suggestions getDefaultInstanceForType()
Returns
TypeDescription
Suggestions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.apps.card.v1.Suggestions.SuggestionItemOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Suggestions other)

public Suggestions.Builder mergeFrom(Suggestions other)
Parameter
NameDescription
otherSuggestions
Returns
TypeDescription
Suggestions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Suggestions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Suggestions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Suggestions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Suggestions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Suggestions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Suggestions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueSuggestions.SuggestionItem
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSuggestions.SuggestionItem.Builder
Returns
TypeDescription
Suggestions.Builder

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

public Suggestions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Suggestions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Suggestions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Suggestions.Builder
Overrides