public static final class Snooze.Criteria.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder> implements Snooze.CriteriaOrBuilder
Criteria specific to the `AlertPolicy`s that this `Snooze` applies to. The `Snooze` will suppress alerts that come from one of the `AlertPolicy`s whose names are supplied.Protobuf type
google.monitoring.v3.Snooze.Criteria| Modifier and Type | Method and Description |
|---|---|
Snooze.Criteria.Builder |
addAllPolicies(Iterable<String> values)
The specific `AlertPolicy` names for the alert that should be snoozed.
|
Snooze.Criteria.Builder |
addPolicies(String value)
The specific `AlertPolicy` names for the alert that should be snoozed.
|
Snooze.Criteria.Builder |
addPoliciesBytes(com.google.protobuf.ByteString value)
The specific `AlertPolicy` names for the alert that should be snoozed.
|
Snooze.Criteria.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Snooze.Criteria |
build() |
Snooze.Criteria |
buildPartial() |
Snooze.Criteria.Builder |
clear() |
Snooze.Criteria.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Snooze.Criteria.Builder |
clearFilter()
Optional.
|
Snooze.Criteria.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Snooze.Criteria.Builder |
clearPolicies()
The specific `AlertPolicy` names for the alert that should be snoozed.
|
Snooze.Criteria.Builder |
clone() |
Snooze.Criteria |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getFilter()
Optional.
|
com.google.protobuf.ByteString |
getFilterBytes()
Optional.
|
String |
getPolicies(int index)
The specific `AlertPolicy` names for the alert that should be snoozed.
|
com.google.protobuf.ByteString |
getPoliciesBytes(int index)
The specific `AlertPolicy` names for the alert that should be snoozed.
|
int |
getPoliciesCount()
The specific `AlertPolicy` names for the alert that should be snoozed.
|
com.google.protobuf.ProtocolStringList |
getPoliciesList()
The specific `AlertPolicy` names for the alert that should be snoozed.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Snooze.Criteria.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Snooze.Criteria.Builder |
mergeFrom(com.google.protobuf.Message other) |
Snooze.Criteria.Builder |
mergeFrom(Snooze.Criteria other) |
Snooze.Criteria.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Snooze.Criteria.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Snooze.Criteria.Builder |
setFilter(String value)
Optional.
|
Snooze.Criteria.Builder |
setFilterBytes(com.google.protobuf.ByteString value)
Optional.
|
Snooze.Criteria.Builder |
setPolicies(int index,
String value)
The specific `AlertPolicy` names for the alert that should be snoozed.
|
Snooze.Criteria.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Snooze.Criteria.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Snooze.Criteria build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Snooze.Criteria buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Snooze.Criteria.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder mergeFrom(Snooze.Criteria other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public Snooze.Criteria.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Snooze.Criteria.Builder>IOExceptionpublic com.google.protobuf.ProtocolStringList getPoliciesList()
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }getPoliciesList in interface Snooze.CriteriaOrBuilderpublic int getPoliciesCount()
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }getPoliciesCount in interface Snooze.CriteriaOrBuilderpublic String getPolicies(int index)
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }getPolicies in interface Snooze.CriteriaOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getPoliciesBytes(int index)
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }getPoliciesBytes in interface Snooze.CriteriaOrBuilderindex - The index of the value to return.public Snooze.Criteria.Builder setPolicies(int index, String value)
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }index - The index to set the value at.value - The policies to set.public Snooze.Criteria.Builder addPolicies(String value)
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }value - The policies to add.public Snooze.Criteria.Builder addAllPolicies(Iterable<String> values)
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }values - The policies to add.public Snooze.Criteria.Builder clearPolicies()
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }public Snooze.Criteria.Builder addPoliciesBytes(com.google.protobuf.ByteString value)
The specific `AlertPolicy` names for the alert that should be snoozed.
The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
There is a limit of 16 policies per snooze. This limit is checked during
snooze creation.
Exactly 1 alert policy is required if `filter` is specified at the same
time.
repeated string policies = 1 [(.google.api.resource_reference) = { ... }value - The bytes of the policies to add.public String getFilter()
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of
`1234567890` and a zone of `us-central1-a`:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
string filter = 2;getFilter in interface Snooze.CriteriaOrBuilderpublic com.google.protobuf.ByteString getFilterBytes()
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of
`1234567890` and a zone of `us-central1-a`:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
string filter = 2;getFilterBytes in interface Snooze.CriteriaOrBuilderpublic Snooze.Criteria.Builder setFilter(String value)
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of
`1234567890` and a zone of `us-central1-a`:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
string filter = 2;value - The filter to set.public Snooze.Criteria.Builder clearFilter()
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of
`1234567890` and a zone of `us-central1-a`:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
string filter = 2;public Snooze.Criteria.Builder setFilterBytes(com.google.protobuf.ByteString value)
Optional. The filter string to match on Alert fields when silencing the
alerts. It follows the standard https://google.aip.dev/160 syntax.
A filter string used to apply the snooze to specific incidents
that have matching filter values.
Filters can be defined for snoozes that apply to one alerting
policy.
Filters must be a string formatted as one or more resource labels with
specific label values. If multiple resource labels are used, then they
must be connected with an AND operator. For example, the following filter
applies the snooze to incidents that have an instance ID of
`1234567890` and a zone of `us-central1-a`:
resource.labels.instance_id="1234567890" AND
resource.labels.zone="us-central1-a"
string filter = 2;value - The bytes for filter to set.public final Snooze.Criteria.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>public final Snooze.Criteria.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Criteria.Builder>Copyright © 2025 Google LLC. All rights reserved.