Class ContextualTrigger.Builder (2.21.0)

public static final class ContextualTrigger.Builder extends GeneratedMessageV3.Builder<ContextualTrigger.Builder> implements ContextualTriggerOrBuilder

Defines a trigger that fires when the open email meets a specific criteria. When the trigger fires, it executes a specific endpoint, usually in order to create new cards and update the UI.

Protobuf type google.apps.script.type.gmail.ContextualTrigger

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ContextualTrigger build()
Returns
TypeDescription
ContextualTrigger

buildPartial()

public ContextualTrigger buildPartial()
Returns
TypeDescription
ContextualTrigger

clear()

public ContextualTrigger.Builder clear()
Returns
TypeDescription
ContextualTrigger.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ContextualTrigger.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ContextualTrigger.Builder
Overrides

clearOnTriggerFunction()

public ContextualTrigger.Builder clearOnTriggerFunction()

Required. The name of the endpoint to call when a message matches the trigger.

string on_trigger_function = 4;

Returns
TypeDescription
ContextualTrigger.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTrigger()

public ContextualTrigger.Builder clearTrigger()
Returns
TypeDescription
ContextualTrigger.Builder

clearUnconditional()

public ContextualTrigger.Builder clearUnconditional()

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Returns
TypeDescription
ContextualTrigger.Builder

clone()

public ContextualTrigger.Builder clone()
Returns
TypeDescription
ContextualTrigger.Builder
Overrides

getDefaultInstanceForType()

public ContextualTrigger getDefaultInstanceForType()
Returns
TypeDescription
ContextualTrigger

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOnTriggerFunction()

public String getOnTriggerFunction()

Required. The name of the endpoint to call when a message matches the trigger.

string on_trigger_function = 4;

Returns
TypeDescription
String

The onTriggerFunction.

getOnTriggerFunctionBytes()

public ByteString getOnTriggerFunctionBytes()

Required. The name of the endpoint to call when a message matches the trigger.

string on_trigger_function = 4;

Returns
TypeDescription
ByteString

The bytes for onTriggerFunction.

getTriggerCase()

public ContextualTrigger.TriggerCase getTriggerCase()
Returns
TypeDescription
ContextualTrigger.TriggerCase

getUnconditional()

public UnconditionalTrigger getUnconditional()

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Returns
TypeDescription
UnconditionalTrigger

The unconditional.

getUnconditionalBuilder()

public UnconditionalTrigger.Builder getUnconditionalBuilder()

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Returns
TypeDescription
UnconditionalTrigger.Builder

getUnconditionalOrBuilder()

public UnconditionalTriggerOrBuilder getUnconditionalOrBuilder()

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Returns
TypeDescription
UnconditionalTriggerOrBuilder

hasUnconditional()

public boolean hasUnconditional()

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Returns
TypeDescription
boolean

Whether the unconditional field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ContextualTrigger other)

public ContextualTrigger.Builder mergeFrom(ContextualTrigger other)
Parameter
NameDescription
otherContextualTrigger
Returns
TypeDescription
ContextualTrigger.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ContextualTrigger.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ContextualTrigger.Builder
Overrides

mergeUnconditional(UnconditionalTrigger value)

public ContextualTrigger.Builder mergeUnconditional(UnconditionalTrigger value)

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Parameter
NameDescription
valueUnconditionalTrigger
Returns
TypeDescription
ContextualTrigger.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ContextualTrigger.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ContextualTrigger.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ContextualTrigger.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ContextualTrigger.Builder
Overrides

setOnTriggerFunction(String value)

public ContextualTrigger.Builder setOnTriggerFunction(String value)

Required. The name of the endpoint to call when a message matches the trigger.

string on_trigger_function = 4;

Parameter
NameDescription
valueString

The onTriggerFunction to set.

Returns
TypeDescription
ContextualTrigger.Builder

This builder for chaining.

setOnTriggerFunctionBytes(ByteString value)

public ContextualTrigger.Builder setOnTriggerFunctionBytes(ByteString value)

Required. The name of the endpoint to call when a message matches the trigger.

string on_trigger_function = 4;

Parameter
NameDescription
valueByteString

The bytes for onTriggerFunction to set.

Returns
TypeDescription
ContextualTrigger.Builder

This builder for chaining.

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

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

setUnconditional(UnconditionalTrigger value)

public ContextualTrigger.Builder setUnconditional(UnconditionalTrigger value)

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Parameter
NameDescription
valueUnconditionalTrigger
Returns
TypeDescription
ContextualTrigger.Builder

setUnconditional(UnconditionalTrigger.Builder builderForValue)

public ContextualTrigger.Builder setUnconditional(UnconditionalTrigger.Builder builderForValue)

UnconditionalTriggers are executed when any mail message is opened.

.google.apps.script.type.gmail.UnconditionalTrigger unconditional = 1;

Parameter
NameDescription
builderForValueUnconditionalTrigger.Builder
Returns
TypeDescription
ContextualTrigger.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ContextualTrigger.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ContextualTrigger.Builder
Overrides