Class DecoratedText.SwitchControl (2.39.1)

public static final class DecoratedText.SwitchControl extends GeneratedMessageV3 implements DecoratedText.SwitchControlOrBuilder

Either a toggle-style switch or a checkbox inside a decoratedText widget.

Google Workspace Add-ons and Chat apps:

Only supported in the decoratedText widget.

Protobuf type google.apps.card.v1.DecoratedText.SwitchControl

Static Fields

CONTROL_TYPE_FIELD_NUMBER

public static final int CONTROL_TYPE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

ON_CHANGE_ACTION_FIELD_NUMBER

public static final int ON_CHANGE_ACTION_FIELD_NUMBER
Field Value
Type Description
int

SELECTED_FIELD_NUMBER

public static final int SELECTED_FIELD_NUMBER
Field Value
Type Description
int

VALUE_FIELD_NUMBER

public static final int VALUE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DecoratedText.SwitchControl getDefaultInstance()
Returns
Type Description
DecoratedText.SwitchControl

getDescriptor()

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

newBuilder()

public static DecoratedText.SwitchControl.Builder newBuilder()
Returns
Type Description
DecoratedText.SwitchControl.Builder

newBuilder(DecoratedText.SwitchControl prototype)

public static DecoratedText.SwitchControl.Builder newBuilder(DecoratedText.SwitchControl prototype)
Parameter
Name Description
prototype DecoratedText.SwitchControl
Returns
Type Description
DecoratedText.SwitchControl.Builder

parseDelimitedFrom(InputStream input)

public static DecoratedText.SwitchControl parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DecoratedText.SwitchControl parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DecoratedText.SwitchControl parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DecoratedText.SwitchControl parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DecoratedText.SwitchControl parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DecoratedText.SwitchControl parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DecoratedText.SwitchControl parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DecoratedText.SwitchControl parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DecoratedText.SwitchControl parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DecoratedText.SwitchControl parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DecoratedText.SwitchControl parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DecoratedText.SwitchControl parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DecoratedText.SwitchControl
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DecoratedText.SwitchControl> parser()
Returns
Type Description
Parser<SwitchControl>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getControlType()

public DecoratedText.SwitchControl.ControlType getControlType()

How the switch appears in the user interface.

Google Workspace Add-ons and Chat apps:

.google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;

Returns
Type Description
DecoratedText.SwitchControl.ControlType

The controlType.

getControlTypeValue()

public int getControlTypeValue()

How the switch appears in the user interface.

Google Workspace Add-ons and Chat apps:

.google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;

Returns
Type Description
int

The enum numeric value on the wire for controlType.

getDefaultInstanceForType()

public DecoratedText.SwitchControl getDefaultInstanceForType()
Returns
Type Description
DecoratedText.SwitchControl

getName()

public String getName()

The name by which the switch widget is identified 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.

getNameBytes()

public ByteString getNameBytes()

The name by which the switch widget is identified 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.

getOnChangeAction()

public Action getOnChangeAction()

The action to perform when the switch state is changed, such as what function to run.

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

Returns
Type Description
Action

The onChangeAction.

getOnChangeActionOrBuilder()

public ActionOrBuilder getOnChangeActionOrBuilder()

The action to perform when the switch state is changed, such as what function to run.

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

Returns
Type Description
ActionOrBuilder

getParserForType()

public Parser<DecoratedText.SwitchControl> getParserForType()
Returns
Type Description
Parser<SwitchControl>
Overrides

getSelected()

public boolean getSelected()

When true, the switch is selected.

bool selected = 3;

Returns
Type Description
boolean

The selected.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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 = 2;

Returns
Type Description
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 = 2;

Returns
Type Description
ByteString

The bytes for value.

hasOnChangeAction()

public boolean hasOnChangeAction()

The action to perform when the switch state is changed, such as what function to run.

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

Returns
Type Description
boolean

Whether the onChangeAction field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DecoratedText.SwitchControl.Builder newBuilderForType()
Returns
Type Description
DecoratedText.SwitchControl.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DecoratedText.SwitchControl.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public DecoratedText.SwitchControl.Builder toBuilder()
Returns
Type Description
DecoratedText.SwitchControl.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException