Class SelectionInput.SelectionItem.Builder (2.46.0)

public static final class SelectionInput.SelectionItem.Builder extends GeneratedMessageV3.Builder<SelectionInput.SelectionItem.Builder> implements SelectionInput.SelectionItemOrBuilder

An item that users can select in a selection input, such as a checkbox or switch.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.SelectionInput.SelectionItem

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SelectionInput.SelectionItem build()
Returns
Type Description
SelectionInput.SelectionItem

buildPartial()

public SelectionInput.SelectionItem buildPartial()
Returns
Type Description
SelectionInput.SelectionItem

clear()

public SelectionInput.SelectionItem.Builder clear()
Returns
Type Description
SelectionInput.SelectionItem.Builder
Overrides

clearBottomText()

public SelectionInput.SelectionItem.Builder clearBottomText()

For multiselect menus, a text description or label that's displayed below the item's text field.

string bottom_text = 5;

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSelected()

public SelectionInput.SelectionItem.Builder clearSelected()

Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item.

bool selected = 3;

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

clearStartIconUri()

public SelectionInput.SelectionItem.Builder clearStartIconUri()

For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. Must be an HTTPS URL. For example, https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

clearText()

public SelectionInput.SelectionItem.Builder clearText()

The text that identifies or describes the item to users.

string text = 1;

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

clearValue()

public SelectionInput.SelectionItem.Builder clearValue()

The value associated with this item. The client should use this as a form input value.

For details about working with form inputs, see Receive form data.

string value = 2;

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

clone()

public SelectionInput.SelectionItem.Builder clone()
Returns
Type Description
SelectionInput.SelectionItem.Builder
Overrides

getBottomText()

public String getBottomText()

For multiselect menus, a text description or label that's displayed below the item's text field.

string bottom_text = 5;

Returns
Type Description
String

The bottomText.

getBottomTextBytes()

public ByteString getBottomTextBytes()

For multiselect menus, a text description or label that's displayed below the item's text field.

string bottom_text = 5;

Returns
Type Description
ByteString

The bytes for bottomText.

getDefaultInstanceForType()

public SelectionInput.SelectionItem getDefaultInstanceForType()
Returns
Type Description
SelectionInput.SelectionItem

getDescriptorForType()

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

getSelected()

public boolean getSelected()

Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item.

bool selected = 3;

Returns
Type Description
boolean

The selected.

getStartIconUri()

public String getStartIconUri()

For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. Must be an HTTPS URL. For example, https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Returns
Type Description
String

The startIconUri.

getStartIconUriBytes()

public ByteString getStartIconUriBytes()

For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. Must be an HTTPS URL. For example, https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Returns
Type Description
ByteString

The bytes for startIconUri.

getText()

public String getText()

The text that identifies or describes the item to users.

string text = 1;

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

The text that identifies or describes the item to users.

string text = 1;

Returns
Type Description
ByteString

The bytes for text.

getValue()

public String getValue()

The value associated with this item. The client should use this as a form input value.

For details about working with form inputs, see Receive form data.

string value = 2;

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

The value associated with this item. The client should use this as a form input value.

For details about working with form inputs, see Receive form data.

string value = 2;

Returns
Type Description
ByteString

The bytes for value.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SelectionInput.SelectionItem other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBottomText(String value)

public SelectionInput.SelectionItem.Builder setBottomText(String value)

For multiselect menus, a text description or label that's displayed below the item's text field.

string bottom_text = 5;

Parameter
Name Description
value String

The bottomText to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setBottomTextBytes(ByteString value)

public SelectionInput.SelectionItem.Builder setBottomTextBytes(ByteString value)

For multiselect menus, a text description or label that's displayed below the item's text field.

string bottom_text = 5;

Parameter
Name Description
value ByteString

The bytes for bottomText to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSelected(boolean value)

public SelectionInput.SelectionItem.Builder setSelected(boolean value)

Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item.

bool selected = 3;

Parameter
Name Description
value boolean

The selected to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setStartIconUri(String value)

public SelectionInput.SelectionItem.Builder setStartIconUri(String value)

For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. Must be an HTTPS URL. For example, https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Parameter
Name Description
value String

The startIconUri to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setStartIconUriBytes(ByteString value)

public SelectionInput.SelectionItem.Builder setStartIconUriBytes(ByteString value)

For multiselect menus, the URL for the icon displayed next to the item's text field. Supports PNG and JPEG files. Must be an HTTPS URL. For example, https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Parameter
Name Description
value ByteString

The bytes for startIconUri to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setText(String value)

public SelectionInput.SelectionItem.Builder setText(String value)

The text that identifies or describes the item to users.

string text = 1;

Parameter
Name Description
value String

The text to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setTextBytes(ByteString value)

public SelectionInput.SelectionItem.Builder setTextBytes(ByteString value)

The text that identifies or describes the item to users.

string text = 1;

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setValue(String value)

public SelectionInput.SelectionItem.Builder setValue(String value)

The value associated with this item. The client should use this as a form input value.

For details about working with form inputs, see Receive form data.

string value = 2;

Parameter
Name Description
value String

The value to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.

setValueBytes(ByteString value)

public SelectionInput.SelectionItem.Builder setValueBytes(ByteString value)

The value associated with this item. The client should use this as a form input value.

For details about working with form inputs, see Receive form data.

string value = 2;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
SelectionInput.SelectionItem.Builder

This builder for chaining.