public static final class AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder> implements AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilder
A condition type that allows alert policies to be defined using [Prometheus Query Language (PromQL)](https://prometheus.io/docs/prometheus/latest/querying/basics/). The PrometheusQueryLanguageCondition message contains information from a Prometheus alerting rule and its associated rule group. A Prometheus alerting rule is described [here](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/). The semantics of a Prometheus alerting rule is described [here](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule). A Prometheus rule group is described [here](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/). The semantics of a Prometheus rule group is described [here](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule_group). Because Cloud Alerting has no representation of a Prometheus rule group resource, we must embed the information of the parent rule group inside each of the conditions that refer to it. We must also update the contents of all Prometheus alerts in case the information of their rule group changes. The PrometheusQueryLanguageCondition protocol buffer combines the information of the corresponding rule group and alerting rule. The structure of the PrometheusQueryLanguageCondition protocol buffer does NOT mimic the structure of the Prometheus rule group and alerting rule YAML declarations. The PrometheusQueryLanguageCondition protocol buffer may change in the future to support future rule group and/or alerting rule features. There are no new such features at the present time (2023-06-26).Protobuf type
google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageConditiongetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, 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.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.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<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.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<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.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<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.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<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder mergeFrom(AlertPolicy.Condition.PrometheusQueryLanguageCondition other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public AlertPolicy.Condition.PrometheusQueryLanguageCondition.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<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>IOExceptionpublic String getQuery()
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];getQuery in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic com.google.protobuf.ByteString getQueryBytes()
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];getQueryBytes in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setQuery(String value)
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];value - The query to set.public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearQuery()
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setQueryBytes(com.google.protobuf.ByteString value)
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];value - The bytes for query to set.public boolean hasDuration()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
hasDuration in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic com.google.protobuf.Duration getDuration()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
getDuration in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setDuration(com.google.protobuf.Duration value)
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setDuration(com.google.protobuf.Duration.Builder builderForValue)
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder mergeDuration(com.google.protobuf.Duration value)
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearDuration()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.Duration.Builder getDurationBuilder()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
getDurationOrBuilder in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic boolean hasEvaluationInterval()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
hasEvaluationInterval in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic com.google.protobuf.Duration getEvaluationInterval()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
getEvaluationInterval in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setEvaluationInterval(com.google.protobuf.Duration value)
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setEvaluationInterval(com.google.protobuf.Duration.Builder builderForValue)
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder mergeEvaluationInterval(com.google.protobuf.Duration value)
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearEvaluationInterval()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.Duration.Builder getEvaluationIntervalBuilder()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.DurationOrBuilder getEvaluationIntervalOrBuilder()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
getEvaluationIntervalOrBuilder in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic int getLabelsCount()
AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderOptional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
getLabelsCount in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic boolean containsLabels(String key)
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
containsLabels in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic Map<String,String> getLabelsMap()
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
getLabelsMap in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic String getLabelsOrDefault(String key, String defaultValue)
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrDefault in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic String getLabelsOrThrow(String key)
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrThrow in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearLabels()
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder removeLabels(String key)
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
@Deprecated public Map<String,String> getMutableLabels()
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder putLabels(String key, String value)
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder putAllLabels(Map<String,String> values)
Optional. Labels to add to or overwrite in the PromQL query result. Label names [must be valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be [templatized by using variables](https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including "__name__" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
public String getRuleGroup()
Optional. The rule group name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];getRuleGroup in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic com.google.protobuf.ByteString getRuleGroupBytes()
Optional. The rule group name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];getRuleGroupBytes in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setRuleGroup(String value)
Optional. The rule group name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];value - The ruleGroup to set.public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearRuleGroup()
Optional. The rule group name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setRuleGroupBytes(com.google.protobuf.ByteString value)
Optional. The rule group name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];value - The bytes for ruleGroup to set.public String getAlertRule()
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must be a [valid Prometheus label name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];getAlertRule in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic com.google.protobuf.ByteString getAlertRuleBytes()
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must be a [valid Prometheus label name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];getAlertRuleBytes in interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilderpublic AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setAlertRule(String value)
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must be a [valid Prometheus label name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];value - The alertRule to set.public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder clearAlertRule()
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must be a [valid Prometheus label name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];public AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setAlertRuleBytes(com.google.protobuf.ByteString value)
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file. Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future. This field is optional. If this field is not empty, then it must be a [valid Prometheus label name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];value - The bytes for alertRule to set.public final AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>public final AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AlertPolicy.Condition.PrometheusQueryLanguageCondition.Builder>Copyright © 2024 Google LLC. All rights reserved.