Class AlertPolicy.AlertStrategy.Builder (3.36.0)

public static final class AlertPolicy.AlertStrategy.Builder extends GeneratedMessageV3.Builder<AlertPolicy.AlertStrategy.Builder> implements AlertPolicy.AlertStrategyOrBuilder

Control over how the notification channels in notification_channels are notified when this alert fires.

Protobuf type google.monitoring.v3.AlertPolicy.AlertStrategy

Static Methods

getDescriptor()

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

Methods

addAllNotificationChannelStrategy(Iterable<? extends AlertPolicy.AlertStrategy.NotificationChannelStrategy> values)

public AlertPolicy.AlertStrategy.Builder addAllNotificationChannelStrategy(Iterable<? extends AlertPolicy.AlertStrategy.NotificationChannelStrategy> values)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy>
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

addNotificationChannelStrategy(AlertPolicy.AlertStrategy.NotificationChannelStrategy value)

public AlertPolicy.AlertStrategy.Builder addNotificationChannelStrategy(AlertPolicy.AlertStrategy.NotificationChannelStrategy value)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
valueAlertPolicy.AlertStrategy.NotificationChannelStrategy
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

addNotificationChannelStrategy(AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)

public AlertPolicy.AlertStrategy.Builder addNotificationChannelStrategy(AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
builderForValueAlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

addNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy value)

public AlertPolicy.AlertStrategy.Builder addNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy value)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameters
NameDescription
indexint
valueAlertPolicy.AlertStrategy.NotificationChannelStrategy
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

addNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)

public AlertPolicy.AlertStrategy.Builder addNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameters
NameDescription
indexint
builderForValueAlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

addNotificationChannelStrategyBuilder()

public AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder addNotificationChannelStrategyBuilder()

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder

addNotificationChannelStrategyBuilder(int index)

public AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder addNotificationChannelStrategyBuilder(int index)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AlertPolicy.AlertStrategy build()
Returns
TypeDescription
AlertPolicy.AlertStrategy

buildPartial()

public AlertPolicy.AlertStrategy buildPartial()
Returns
TypeDescription
AlertPolicy.AlertStrategy

clear()

public AlertPolicy.AlertStrategy.Builder clear()
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder
Overrides

clearAutoClose()

public AlertPolicy.AlertStrategy.Builder clearAutoClose()

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearNotificationChannelStrategy()

public AlertPolicy.AlertStrategy.Builder clearNotificationChannelStrategy()

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

clearNotificationRateLimit()

public AlertPolicy.AlertStrategy.Builder clearNotificationRateLimit()

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public AlertPolicy.AlertStrategy.Builder clone()
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder
Overrides

getAutoClose()

public Duration getAutoClose()

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Returns
TypeDescription
Duration

The autoClose.

getAutoCloseBuilder()

public Duration.Builder getAutoCloseBuilder()

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Returns
TypeDescription
Builder

getAutoCloseOrBuilder()

public DurationOrBuilder getAutoCloseOrBuilder()

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Returns
TypeDescription
DurationOrBuilder

getDefaultInstanceForType()

public AlertPolicy.AlertStrategy getDefaultInstanceForType()
Returns
TypeDescription
AlertPolicy.AlertStrategy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getNotificationChannelStrategy(int index)

public AlertPolicy.AlertStrategy.NotificationChannelStrategy getNotificationChannelStrategy(int index)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationChannelStrategy

getNotificationChannelStrategyBuilder(int index)

public AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder getNotificationChannelStrategyBuilder(int index)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder

getNotificationChannelStrategyBuilderList()

public List<AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder> getNotificationChannelStrategyBuilderList()

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Returns
TypeDescription
List<Builder>

getNotificationChannelStrategyCount()

public int getNotificationChannelStrategyCount()

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Returns
TypeDescription
int

getNotificationChannelStrategyList()

public List<AlertPolicy.AlertStrategy.NotificationChannelStrategy> getNotificationChannelStrategyList()

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Returns
TypeDescription
List<NotificationChannelStrategy>

getNotificationChannelStrategyOrBuilder(int index)

public AlertPolicy.AlertStrategy.NotificationChannelStrategyOrBuilder getNotificationChannelStrategyOrBuilder(int index)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationChannelStrategyOrBuilder

getNotificationChannelStrategyOrBuilderList()

public List<? extends AlertPolicy.AlertStrategy.NotificationChannelStrategyOrBuilder> getNotificationChannelStrategyOrBuilderList()

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Returns
TypeDescription
List<? extends com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategyOrBuilder>

getNotificationRateLimit()

public AlertPolicy.AlertStrategy.NotificationRateLimit getNotificationRateLimit()

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationRateLimit

The notificationRateLimit.

getNotificationRateLimitBuilder()

public AlertPolicy.AlertStrategy.NotificationRateLimit.Builder getNotificationRateLimitBuilder()

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationRateLimit.Builder

getNotificationRateLimitOrBuilder()

public AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder getNotificationRateLimitOrBuilder()

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Returns
TypeDescription
AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder

hasAutoClose()

public boolean hasAutoClose()

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Returns
TypeDescription
boolean

Whether the autoClose field is set.

hasNotificationRateLimit()

public boolean hasNotificationRateLimit()

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Returns
TypeDescription
boolean

Whether the notificationRateLimit field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAutoClose(Duration value)

public AlertPolicy.AlertStrategy.Builder mergeAutoClose(Duration value)

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

mergeFrom(AlertPolicy.AlertStrategy other)

public AlertPolicy.AlertStrategy.Builder mergeFrom(AlertPolicy.AlertStrategy other)
Parameter
NameDescription
otherAlertPolicy.AlertStrategy
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNotificationRateLimit(AlertPolicy.AlertStrategy.NotificationRateLimit value)

public AlertPolicy.AlertStrategy.Builder mergeNotificationRateLimit(AlertPolicy.AlertStrategy.NotificationRateLimit value)

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Parameter
NameDescription
valueAlertPolicy.AlertStrategy.NotificationRateLimit
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeNotificationChannelStrategy(int index)

public AlertPolicy.AlertStrategy.Builder removeNotificationChannelStrategy(int index)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

setAutoClose(Duration value)

public AlertPolicy.AlertStrategy.Builder setAutoClose(Duration value)

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

setAutoClose(Duration.Builder builderForValue)

public AlertPolicy.AlertStrategy.Builder setAutoClose(Duration.Builder builderForValue)

If an alert policy that was active has no data for this long, any open incidents will close

.google.protobuf.Duration auto_close = 3;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy value)

public AlertPolicy.AlertStrategy.Builder setNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy value)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameters
NameDescription
indexint
valueAlertPolicy.AlertStrategy.NotificationChannelStrategy
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

setNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)

public AlertPolicy.AlertStrategy.Builder setNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)

Control how notifications will be sent out, on a per-channel basis.

repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;

Parameters
NameDescription
indexint
builderForValueAlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

setNotificationRateLimit(AlertPolicy.AlertStrategy.NotificationRateLimit value)

public AlertPolicy.AlertStrategy.Builder setNotificationRateLimit(AlertPolicy.AlertStrategy.NotificationRateLimit value)

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Parameter
NameDescription
valueAlertPolicy.AlertStrategy.NotificationRateLimit
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

setNotificationRateLimit(AlertPolicy.AlertStrategy.NotificationRateLimit.Builder builderForValue)

public AlertPolicy.AlertStrategy.Builder setNotificationRateLimit(AlertPolicy.AlertStrategy.NotificationRateLimit.Builder builderForValue)

Required for alert policies with a LogMatch condition.

This limit is not implemented for alert policies that are not log-based.

.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;

Parameter
NameDescription
builderForValueAlertPolicy.AlertStrategy.NotificationRateLimit.Builder
Returns
TypeDescription
AlertPolicy.AlertStrategy.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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