public final class SelectionInput extends GeneratedMessageV3 implements SelectionInputOrBuilder
A widget that creates one or more UI items that users can select.
For example, a dropdown menu or checkboxes. You can use this widget to
collect data that can be predicted or enumerated. For an example in Google
Chat apps, see Add selectable UI
elements.
Chat apps can process the value of items that users select or input. For
details about working with form inputs, see Receive form
data.
To collect undefined or abstract data from users, use
the TextInput widget.
Google Workspace Add-ons
and Chat apps:
Protobuf type google.apps.card.v1.SelectionInput
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int EXTERNAL_DATA_SOURCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int ITEMS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int LABEL_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int MULTI_SELECT_MAX_SELECTED_ITEMS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int MULTI_SELECT_MIN_QUERY_LENGTH_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int ON_CHANGE_ACTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int PLATFORM_DATA_SOURCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static SelectionInput getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static SelectionInput.Builder newBuilder()
public static SelectionInput.Builder newBuilder(SelectionInput prototype)
public static SelectionInput parseDelimitedFrom(InputStream input)
public static SelectionInput parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static SelectionInput parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
public static SelectionInput parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static SelectionInput parseFrom(ByteString data)
public static SelectionInput parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static SelectionInput parseFrom(CodedInputStream input)
public static SelectionInput parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static SelectionInput parseFrom(InputStream input)
public static SelectionInput parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static SelectionInput parseFrom(ByteBuffer data)
public static SelectionInput parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<SelectionInput> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public SelectionInput getDefaultInstanceForType()
getExternalDataSource()
public Action getExternalDataSource()
An external data source, such as a relational data base.
.google.apps.card.v1.Action external_data_source = 8;
Returns |
Type |
Description |
Action |
The externalDataSource.
|
getExternalDataSourceOrBuilder()
public ActionOrBuilder getExternalDataSourceOrBuilder()
An external data source, such as a relational data base.
.google.apps.card.v1.Action external_data_source = 8;
public SelectionInput.SelectionItem getItems(int index)
An array of selectable items. For example, an array of radio buttons or
checkboxes. Supports up to 100 items.
repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
Parameter |
Name |
Description |
index |
int
|
public int getItemsCount()
An array of selectable items. For example, an array of radio buttons or
checkboxes. Supports up to 100 items.
repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
Returns |
Type |
Description |
int |
|
public List<SelectionInput.SelectionItem> getItemsList()
An array of selectable items. For example, an array of radio buttons or
checkboxes. Supports up to 100 items.
repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
public SelectionInput.SelectionItemOrBuilder getItemsOrBuilder(int index)
An array of selectable items. For example, an array of radio buttons or
checkboxes. Supports up to 100 items.
repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
Parameter |
Name |
Description |
index |
int
|
public List<? extends SelectionInput.SelectionItemOrBuilder> getItemsOrBuilderList()
An array of selectable items. For example, an array of radio buttons or
checkboxes. Supports up to 100 items.
repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
Returns |
Type |
Description |
List<? extends com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder> |
|
The text that appears above the selection input field in the user
interface.
Specify text that helps the user enter the information your app needs.
For example, if users are selecting the urgency of a work ticket from a
drop-down menu, the label might be "Urgency" or "Select urgency".
string label = 2;
Returns |
Type |
Description |
String |
The label.
|
public ByteString getLabelBytes()
The text that appears above the selection input field in the user
interface.
Specify text that helps the user enter the information your app needs.
For example, if users are selecting the urgency of a work ticket from a
drop-down menu, the label might be "Urgency" or "Select urgency".
string label = 2;
Returns |
Type |
Description |
ByteString |
The bytes for label.
|
public SelectionInput.MultiSelectDataSourceCase getMultiSelectDataSourceCase()
public int getMultiSelectMaxSelectedItems()
For multiselect menus, the maximum number of items that a user can select.
Minimum value is 1 item. If unspecified, defaults to 3 items.
int32 multi_select_max_selected_items = 6;
Returns |
Type |
Description |
int |
The multiSelectMaxSelectedItems.
|
public int getMultiSelectMinQueryLength()
For multiselect menus, the number of text characters that a user inputs
before the app queries autocomplete and displays suggested items
in the menu.
If unspecified, defaults to 0 characters for static data sources and 3
characters for external data sources.
int32 multi_select_min_query_length = 7;
Returns |
Type |
Description |
int |
The multiSelectMinQueryLength.
|
The name that identifies the selection input in a form input event.
For details about working with form inputs, see Receive form
data.
string name = 1;
Returns |
Type |
Description |
String |
The name.
|
public ByteString getNameBytes()
The name that identifies the selection input in a form input event.
For details about working with form inputs, see Receive form
data.
string name = 1;
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
public Action getOnChangeAction()
If specified, the form is submitted when the selection changes. If not
specified, you must specify a separate button that submits the form.
For details about working with form inputs, see Receive form
data.
.google.apps.card.v1.Action on_change_action = 5;
Returns |
Type |
Description |
Action |
The onChangeAction.
|
public ActionOrBuilder getOnChangeActionOrBuilder()
If specified, the form is submitted when the selection changes. If not
specified, you must specify a separate button that submits the form.
For details about working with form inputs, see Receive form
data.
.google.apps.card.v1.Action on_change_action = 5;
public Parser<SelectionInput> getParserForType()
Overrides
public SelectionInput.PlatformDataSource getPlatformDataSource()
A data source from Google Workspace.
.google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
public SelectionInput.PlatformDataSourceOrBuilder getPlatformDataSourceOrBuilder()
A data source from Google Workspace.
.google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public SelectionInput.SelectionType getType()
The type of items that are displayed to users in a SelectionInput
widget.
Selection types support different types of interactions. For example, users
can select one or more checkboxes, but they can only select one value from
a dropdown menu.
.google.apps.card.v1.SelectionInput.SelectionType type = 3;
public int getTypeValue()
The type of items that are displayed to users in a SelectionInput
widget.
Selection types support different types of interactions. For example, users
can select one or more checkboxes, but they can only select one value from
a dropdown menu.
.google.apps.card.v1.SelectionInput.SelectionType type = 3;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for type.
|
public boolean hasExternalDataSource()
An external data source, such as a relational data base.
.google.apps.card.v1.Action external_data_source = 8;
Returns |
Type |
Description |
boolean |
Whether the externalDataSource field is set.
|
public boolean hasOnChangeAction()
If specified, the form is submitted when the selection changes. If not
specified, you must specify a separate button that submits the form.
For details about working with form inputs, see Receive form
data.
.google.apps.card.v1.Action on_change_action = 5;
Returns |
Type |
Description |
boolean |
Whether the onChangeAction field is set.
|
public boolean hasPlatformDataSource()
A data source from Google Workspace.
.google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
Returns |
Type |
Description |
boolean |
Whether the platformDataSource field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public SelectionInput.Builder newBuilderForType()
protected SelectionInput.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public SelectionInput.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides