Class Suggestions (0.1.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
TypeDescription
int

Static Methods

getDefaultInstance()

public static Suggestions getDefaultInstance()
Returns
TypeDescription
Suggestions

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Suggestions.Builder newBuilder()
Returns
TypeDescription
Suggestions.Builder

newBuilder(Suggestions prototype)

public static Suggestions.Builder newBuilder(Suggestions prototype)
Parameter
NameDescription
prototypeSuggestions
Returns
TypeDescription
Suggestions.Builder

parseDelimitedFrom(InputStream input)

public static Suggestions parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Suggestions parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Suggestions parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Suggestions parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Suggestions parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Suggestions parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Suggestions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Suggestions
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Suggestions> parser()
Returns
TypeDescription
Parser<Suggestions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Suggestions getDefaultInstanceForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
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>

getParserForType()

public Parser<Suggestions> getParserForType()
Returns
TypeDescription
Parser<Suggestions>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Suggestions.Builder newBuilderForType()
Returns
TypeDescription
Suggestions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Suggestions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Suggestions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Suggestions.Builder toBuilder()
Returns
TypeDescription
Suggestions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException