Class Suggestions (2.50.0)

public final class Suggestions extends GeneratedMessageV3 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 Fields

ITEMS_FIELD_NUMBER

public static final int ITEMS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Suggestions getDefaultInstance()
Returns
Type Description
Suggestions

getDescriptor()

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

newBuilder()

public static Suggestions.Builder newBuilder()
Returns
Type Description
Suggestions.Builder

newBuilder(Suggestions prototype)

public static Suggestions.Builder newBuilder(Suggestions prototype)
Parameter
Name Description
prototype Suggestions
Returns
Type Description
Suggestions.Builder

parseDelimitedFrom(InputStream input)

public static Suggestions parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Suggestions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Suggestions parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Suggestions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Suggestions parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Suggestions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Suggestions parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Suggestions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Suggestions parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Suggestions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Suggestions parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Suggestions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Suggestions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Suggestions> parser()
Returns
Type Description
Parser<Suggestions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Suggestions getDefaultInstanceForType()
Returns
Type Description
Suggestions

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

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>

getParserForType()

public Parser<Suggestions> getParserForType()
Returns
Type Description
Parser<Suggestions>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Suggestions.Builder newBuilderForType()
Returns
Type Description
Suggestions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Suggestions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Suggestions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Suggestions.Builder toBuilder()
Returns
Type Description
Suggestions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException