Class DecoratedText.SwitchControl.Builder (2.37.1)

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DecoratedText.SwitchControl build()
Returns
TypeDescription
DecoratedText.SwitchControl

buildPartial()

public DecoratedText.SwitchControl buildPartial()
Returns
TypeDescription
DecoratedText.SwitchControl

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DecoratedText.SwitchControl.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
DecoratedText.SwitchControl.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public DecoratedText.SwitchControl.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DecoratedText.SwitchControl.Builder
Overrides

clearSelected()

public DecoratedText.SwitchControl.Builder clearSelected()

When true, the switch is selected.

bool selected = 3;

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

This builder for chaining.

clone()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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.

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

getSelected()

public boolean getSelected()

When true, the switch is selected.

bool selected = 3;

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DecoratedText.SwitchControl other)

public DecoratedText.SwitchControl.Builder mergeFrom(DecoratedText.SwitchControl other)
Parameter
NameDescription
otherDecoratedText.SwitchControl
Returns
TypeDescription
DecoratedText.SwitchControl.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public DecoratedText.SwitchControl.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueAction
Returns
TypeDescription
DecoratedText.SwitchControl.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DecoratedText.SwitchControl.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueDecoratedText.SwitchControl.ControlType

The controlType to set.

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

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

Returns
TypeDescription
DecoratedText.SwitchControl.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DecoratedText.SwitchControl.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

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

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueAction
Returns
TypeDescription
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
NameDescription
builderForValueAction.Builder
Returns
TypeDescription
DecoratedText.SwitchControl.Builder

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

public DecoratedText.SwitchControl.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DecoratedText.SwitchControl.Builder
Overrides

setSelected(boolean value)

public DecoratedText.SwitchControl.Builder setSelected(boolean value)

When true, the switch is selected.

bool selected = 3;

Parameter
NameDescription
valueboolean

The selected to set.

Returns
TypeDescription
DecoratedText.SwitchControl.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

The value to set.

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

The bytes for value to set.

Returns
TypeDescription
DecoratedText.SwitchControl.Builder

This builder for chaining.