Class DecoratedText.SwitchControl (0.1.0)

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

SELECTED_FIELD_NUMBER

public static final int SELECTED_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 DecoratedText.SwitchControl getDefaultInstance()
Returns
TypeDescription
DecoratedText.SwitchControl

getDescriptor()

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

newBuilder()

public static DecoratedText.SwitchControl.Builder newBuilder()
Returns
TypeDescription
DecoratedText.SwitchControl.Builder

newBuilder(DecoratedText.SwitchControl prototype)

public static DecoratedText.SwitchControl.Builder newBuilder(DecoratedText.SwitchControl prototype)
Parameter
NameDescription
prototypeDecoratedText.SwitchControl
Returns
TypeDescription
DecoratedText.SwitchControl.Builder

parseDelimitedFrom(InputStream input)

public static DecoratedText.SwitchControl parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DecoratedText.SwitchControl
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static DecoratedText.SwitchControl parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DecoratedText.SwitchControl
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static DecoratedText.SwitchControl parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DecoratedText.SwitchControl
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static DecoratedText.SwitchControl parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DecoratedText.SwitchControl
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static DecoratedText.SwitchControl parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DecoratedText.SwitchControl
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for controlType.

getDefaultInstanceForType()

public DecoratedText.SwitchControl getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ActionOrBuilder

getParserForType()

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

getSelected()

public boolean getSelected()

When true, the switch is selected.

bool selected = 3;

Returns
TypeDescription
boolean

The selected.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
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 = 2;

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public DecoratedText.SwitchControl.Builder toBuilder()
Returns
TypeDescription
DecoratedText.SwitchControl.Builder

writeTo(CodedOutputStream output)

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