Class SelectionInput.SelectionItem.Builder (2.37.1)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SelectionInput.SelectionItem build()
Returns
TypeDescription
SelectionInput.SelectionItem

buildPartial()

public SelectionInput.SelectionItem buildPartial()
Returns
TypeDescription
SelectionInput.SelectionItem

clear()

public SelectionInput.SelectionItem.Builder clear()
Returns
TypeDescription
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
TypeDescription
SelectionInput.SelectionItem.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SelectionInput.SelectionItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SelectionInput.SelectionItem.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SelectionInput.SelectionItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
SelectionInput.SelectionItem.Builder

This builder for chaining.

clone()

public SelectionInput.SelectionItem.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for bottomText.

getDefaultInstanceForType()

public SelectionInput.SelectionItem getDefaultInstanceForType()
Returns
TypeDescription
SelectionInput.SelectionItem

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Returns
TypeDescription
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/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Returns
TypeDescription
ByteString

The bytes for startIconUri.

getText()

public String getText()

The text that identifies or describes the item to users.

string text = 1;

Returns
TypeDescription
String

The text.

getTextBytes()

public ByteString getTextBytes()

The text that identifies or describes the item to users.

string text = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for value.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SelectionInput.SelectionItem other)

public SelectionInput.SelectionItem.Builder mergeFrom(SelectionInput.SelectionItem other)
Parameter
NameDescription
otherSelectionInput.SelectionItem
Returns
TypeDescription
SelectionInput.SelectionItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The bottomText to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for bottomText to set.

Returns
TypeDescription
SelectionInput.SelectionItem.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SelectionInput.SelectionItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The selected to set.

Returns
TypeDescription
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/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Parameter
NameDescription
valueString

The startIconUri to set.

Returns
TypeDescription
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/chat/images/quickstart-app-avatar.png.

string start_icon_uri = 4;

Parameter
NameDescription
valueByteString

The bytes for startIconUri to set.

Returns
TypeDescription
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
NameDescription
valueString

The text to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for text to set.

Returns
TypeDescription
SelectionInput.SelectionItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SelectionInput.SelectionItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The value to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for value to set.

Returns
TypeDescription
SelectionInput.SelectionItem.Builder

This builder for chaining.