Class DecoratedText.SwitchControl.Builder (2.48.0)

public static final class DecoratedText.SwitchControl.Builder extends GeneratedMessageV3.Builder<DecoratedText.SwitchControl.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

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

buildPartial()

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

clear()

public DecoratedText.SwitchControl.Builder clear()
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

clearControlType()

public DecoratedText.SwitchControl.Builder clearControlType()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DecoratedText.SwitchControl.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

clearName()

public DecoratedText.SwitchControl.Builder clearName()

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
DecoratedText.SwitchControl.Builder

This builder for chaining.

clearOnChangeAction()

public DecoratedText.SwitchControl.Builder clearOnChangeAction()

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
DecoratedText.SwitchControl.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public DecoratedText.SwitchControl.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

clearSelected()

public DecoratedText.SwitchControl.Builder clearSelected()

When true, the switch is selected.

bool selected = 3;

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

clearValue()

public DecoratedText.SwitchControl.Builder clearValue()

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
DecoratedText.SwitchControl.Builder

This builder for chaining.

clone()

public DecoratedText.SwitchControl.Builder clone()
Returns
Type Description
DecoratedText.SwitchControl.Builder
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

getDescriptorForType()

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

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.

getOnChangeActionBuilder()

public Action.Builder getOnChangeActionBuilder()

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

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

getSelected()

public boolean getSelected()

When true, the switch is selected.

bool selected = 3;

Returns
Type Description
boolean

The selected.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(DecoratedText.SwitchControl other)

public DecoratedText.SwitchControl.Builder mergeFrom(DecoratedText.SwitchControl other)
Parameter
Name Description
other DecoratedText.SwitchControl
Returns
Type Description
DecoratedText.SwitchControl.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public DecoratedText.SwitchControl.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

mergeOnChangeAction(Action value)

public DecoratedText.SwitchControl.Builder mergeOnChangeAction(Action value)

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;

Parameter
Name Description
value Action
Returns
Type Description
DecoratedText.SwitchControl.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DecoratedText.SwitchControl.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

setControlType(DecoratedText.SwitchControl.ControlType value)

public DecoratedText.SwitchControl.Builder setControlType(DecoratedText.SwitchControl.ControlType value)

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;

Parameter
Name Description
value DecoratedText.SwitchControl.ControlType

The controlType to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

setControlTypeValue(int value)

public DecoratedText.SwitchControl.Builder setControlTypeValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for controlType to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public DecoratedText.SwitchControl.Builder setName(String value)

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;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DecoratedText.SwitchControl.Builder setNameBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

setOnChangeAction(Action value)

public DecoratedText.SwitchControl.Builder setOnChangeAction(Action value)

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;

Parameter
Name Description
value Action
Returns
Type Description
DecoratedText.SwitchControl.Builder

setOnChangeAction(Action.Builder builderForValue)

public DecoratedText.SwitchControl.Builder setOnChangeAction(Action.Builder builderForValue)

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;

Parameter
Name Description
builderForValue Action.Builder
Returns
Type Description
DecoratedText.SwitchControl.Builder

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

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

setSelected(boolean value)

public DecoratedText.SwitchControl.Builder setSelected(boolean value)

When true, the switch is selected.

bool selected = 3;

Parameter
Name Description
value boolean

The selected to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final DecoratedText.SwitchControl.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DecoratedText.SwitchControl.Builder
Overrides

setValue(String value)

public DecoratedText.SwitchControl.Builder setValue(String value)

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;

Parameter
Name Description
value String

The value to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.

setValueBytes(ByteString value)

public DecoratedText.SwitchControl.Builder setValueBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
DecoratedText.SwitchControl.Builder

This builder for chaining.