Class TextInput (0.1.0)

public final class TextInput extends GeneratedMessageV3 implements TextInputOrBuilder

A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see Text input.

Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see Receive form data.

When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.TextInput

Implements

TextInputOrBuilder

Static Fields

AUTO_COMPLETE_ACTION_FIELD_NUMBER

public static final int AUTO_COMPLETE_ACTION_FIELD_NUMBER
Field Value
TypeDescription
int

HINT_TEXT_FIELD_NUMBER

public static final int HINT_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

INITIAL_SUGGESTIONS_FIELD_NUMBER

public static final int INITIAL_SUGGESTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

LABEL_FIELD_NUMBER

public static final int LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ON_CHANGE_ACTION_FIELD_NUMBER

public static final int ON_CHANGE_ACTION_FIELD_NUMBER
Field Value
TypeDescription
int

PLACEHOLDER_TEXT_FIELD_NUMBER

public static final int PLACEHOLDER_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

VALUE_FIELD_NUMBER

public static final int VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TextInput getDefaultInstance()
Returns
TypeDescription
TextInput

getDescriptor()

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

newBuilder()

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

newBuilder(TextInput prototype)

public static TextInput.Builder newBuilder(TextInput prototype)
Parameter
NameDescription
prototypeTextInput
Returns
TypeDescription
TextInput.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAutoCompleteAction()

public Action getAutoCompleteAction()

Optional. Specify what action to take when the text input field provides suggestions to users who interact with it.

If unspecified, the suggestions are set by initialSuggestions and are processed by the client.

If specified, the app takes the action specified here, such as running a custom function.

Google Workspace Add-ons:

.google.apps.card.v1.Action auto_complete_action = 8;

Returns
TypeDescription
Action

The autoCompleteAction.

getAutoCompleteActionOrBuilder()

public ActionOrBuilder getAutoCompleteActionOrBuilder()

Optional. Specify what action to take when the text input field provides suggestions to users who interact with it.

If unspecified, the suggestions are set by initialSuggestions and are processed by the client.

If specified, the app takes the action specified here, such as running a custom function.

Google Workspace Add-ons:

.google.apps.card.v1.Action auto_complete_action = 8;

Returns
TypeDescription
ActionOrBuilder

getDefaultInstanceForType()

public TextInput getDefaultInstanceForType()
Returns
TypeDescription
TextInput

getHintText()

public String getHintText()

Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible.

Required if label is unspecified. Otherwise, optional.

string hint_text = 3;

Returns
TypeDescription
String

The hintText.

getHintTextBytes()

public ByteString getHintTextBytes()

Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible.

Required if label is unspecified. Otherwise, optional.

string hint_text = 3;

Returns
TypeDescription
ByteString

The bytes for hintText.

getInitialSuggestions()

public Suggestions getInitialSuggestions()

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 just 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:

.google.apps.card.v1.Suggestions initial_suggestions = 7;

Returns
TypeDescription
Suggestions

The initialSuggestions.

getInitialSuggestionsOrBuilder()

public SuggestionsOrBuilder getInitialSuggestionsOrBuilder()

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 just 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:

.google.apps.card.v1.Suggestions initial_suggestions = 7;

Returns
TypeDescription
SuggestionsOrBuilder

getLabel()

public String getLabel()

The text that appears above the text input field in the user interface.

Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write surname instead of name.

Required if hintText is unspecified. Otherwise, optional.

string label = 2;

Returns
TypeDescription
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

The text that appears above the text input field in the user interface.

Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write surname instead of name.

Required if hintText is unspecified. Otherwise, optional.

string label = 2;

Returns
TypeDescription
ByteString

The bytes for label.

getName()

public String getName()

The name by which the text input is identified in a form input event.

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

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name by which the text input is identified in a form input event.

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

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getOnChangeAction()

public Action getOnChangeAction()

What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text.

Examples of actions to take include running a custom function or opening a dialog in Google Chat.

.google.apps.card.v1.Action on_change_action = 6;

Returns
TypeDescription
Action

The onChangeAction.

getOnChangeActionOrBuilder()

public ActionOrBuilder getOnChangeActionOrBuilder()

What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text.

Examples of actions to take include running a custom function or opening a dialog in Google Chat.

.google.apps.card.v1.Action on_change_action = 6;

Returns
TypeDescription
ActionOrBuilder

getParserForType()

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

getPlaceholderText()

public String getPlaceholderText()

Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, Enter a number from 0 to 100.

Google Chat apps:

string placeholder_text = 12;

Returns
TypeDescription
String

The placeholderText.

getPlaceholderTextBytes()

public ByteString getPlaceholderTextBytes()

Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, Enter a number from 0 to 100.

Google Chat apps:

string placeholder_text = 12;

Returns
TypeDescription
ByteString

The bytes for placeholderText.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getType()

public TextInput.Type getType()

How a text input field appears in the user interface. For example, whether the field is single or multi-line.

.google.apps.card.v1.TextInput.Type type = 5;

Returns
TypeDescription
TextInput.Type

The type.

getTypeValue()

public int getTypeValue()

How a text input field appears in the user interface. For example, whether the field is single or multi-line.

.google.apps.card.v1.TextInput.Type type = 5;

Returns
TypeDescription
int

The enum numeric value on the wire for type.

getValue()

public String getValue()

The value entered by a user, returned as part of a form input event.

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

string value = 4;

Returns
TypeDescription
String

The value.

getValueBytes()

public ByteString getValueBytes()

The value entered by a user, returned as part of a form input event.

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

string value = 4;

Returns
TypeDescription
ByteString

The bytes for value.

hasAutoCompleteAction()

public boolean hasAutoCompleteAction()

Optional. Specify what action to take when the text input field provides suggestions to users who interact with it.

If unspecified, the suggestions are set by initialSuggestions and are processed by the client.

If specified, the app takes the action specified here, such as running a custom function.

Google Workspace Add-ons:

.google.apps.card.v1.Action auto_complete_action = 8;

Returns
TypeDescription
boolean

Whether the autoCompleteAction field is set.

hasInitialSuggestions()

public boolean hasInitialSuggestions()

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 just 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:

.google.apps.card.v1.Suggestions initial_suggestions = 7;

Returns
TypeDescription
boolean

Whether the initialSuggestions field is set.

hasOnChangeAction()

public boolean hasOnChangeAction()

What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text.

Examples of actions to take include running a custom function or opening a dialog in Google Chat.

.google.apps.card.v1.Action on_change_action = 6;

Returns
TypeDescription
boolean

Whether the onChangeAction field is set.

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 TextInput.Builder newBuilderForType()
Returns
TypeDescription
TextInput.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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