Package com.google.monitoring.v3
Class Snooze.Criteria.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Snooze.Criteria.Builder>
com.google.monitoring.v3.Snooze.Criteria.Builder
- All Implemented Interfaces:
Snooze.CriteriaOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Snooze.Criteria
public static final class Snooze.Criteria.Builder
extends com.google.protobuf.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionaddAllPolicies(Iterable<String> values) The specific `AlertPolicy` names for the alert that should be snoozed.addPolicies(String value) The specific `AlertPolicy` names for the alert that should be snoozed.addPoliciesBytes(com.google.protobuf.ByteString value) The specific `AlertPolicy` names for the alert that should be snoozed.build()clear()Optional.The specific `AlertPolicy` names for the alert that should be snoozed.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.getPolicies(int index) The specific `AlertPolicy` names for the alert that should be snoozed.com.google.protobuf.ByteStringgetPoliciesBytes(int index) The specific `AlertPolicy` names for the alert that should be snoozed.intThe specific `AlertPolicy` names for the alert that should be snoozed.com.google.protobuf.ProtocolStringListThe specific `AlertPolicy` names for the alert that should be snoozed.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(Snooze.Criteria other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.setFilterBytes(com.google.protobuf.ByteString value) Optional.setPolicies(int index, String value) The specific `AlertPolicy` names for the alert that should be snoozed.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Snooze.Criteria.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Snooze.Criteria.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Snooze.Criteria.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Snooze.Criteria.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Snooze.Criteria.Builder>
-
mergeFrom
public Snooze.Criteria.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Snooze.Criteria.Builder>- Throws:
IOException
-
getPoliciesList
public 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) = { ... }- Specified by:
getPoliciesListin interfaceSnooze.CriteriaOrBuilder- Returns:
- A list containing the policies.
-
getPoliciesCount
public 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) = { ... }- Specified by:
getPoliciesCountin interfaceSnooze.CriteriaOrBuilder- Returns:
- The count of policies.
-
getPolicies
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) = { ... }- Specified by:
getPoliciesin interfaceSnooze.CriteriaOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The policies at the given index.
-
getPoliciesBytes
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) = { ... }- Specified by:
getPoliciesBytesin interfaceSnooze.CriteriaOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the policies at the given index.
-
setPolicies
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) = { ... }- Parameters:
index- The index to set the value at.value- The policies to set.- Returns:
- This builder for chaining.
-
addPolicies
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) = { ... }- Parameters:
value- The policies to add.- Returns:
- This builder for chaining.
-
addAllPolicies
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) = { ... }- Parameters:
values- The policies to add.- Returns:
- This builder for chaining.
-
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) = { ... }- Returns:
- This builder for chaining.
-
addPoliciesBytes
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) = { ... }- Parameters:
value- The bytes of the policies to add.- Returns:
- This builder for chaining.
-
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;- Specified by:
getFilterin interfaceSnooze.CriteriaOrBuilder- Returns:
- The filter.
-
getFilterBytes
public 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;- Specified by:
getFilterBytesin interfaceSnooze.CriteriaOrBuilder- Returns:
- The bytes for filter.
-
setFilter
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;- Parameters:
value- The filter to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
setFilterBytes
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;- Parameters:
value- The bytes for filter to set.- Returns:
- This builder for chaining.
-