Class AlertPolicy.Condition

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.monitoring.v3.AlertPolicy.Condition
All Implemented Interfaces:
AlertPolicy.ConditionOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
AlertPolicy

public static final class AlertPolicy.Condition extends com.google.protobuf.GeneratedMessage implements AlertPolicy.ConditionOrBuilder
 A condition is a true/false test that determines when an alerting policy
 should open an incident. If a condition evaluates to true, it signifies
 that something is wrong.
 
Protobuf type google.monitoring.v3.AlertPolicy.Condition
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • CONDITION_THRESHOLD_FIELD_NUMBER

      public static final int CONDITION_THRESHOLD_FIELD_NUMBER
      See Also:
    • CONDITION_ABSENT_FIELD_NUMBER

      public static final int CONDITION_ABSENT_FIELD_NUMBER
      See Also:
    • CONDITION_MATCHED_LOG_FIELD_NUMBER

      public static final int CONDITION_MATCHED_LOG_FIELD_NUMBER
      See Also:
    • CONDITION_MONITORING_QUERY_LANGUAGE_FIELD_NUMBER

      public static final int CONDITION_MONITORING_QUERY_LANGUAGE_FIELD_NUMBER
      See Also:
    • CONDITION_PROMETHEUS_QUERY_LANGUAGE_FIELD_NUMBER

      public static final int CONDITION_PROMETHEUS_QUERY_LANGUAGE_FIELD_NUMBER
      See Also:
    • CONDITION_SQL_FIELD_NUMBER

      public static final int CONDITION_SQL_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getConditionCase

      public AlertPolicy.Condition.ConditionCase getConditionCase()
      Specified by:
      getConditionCase in interface AlertPolicy.ConditionOrBuilder
    • getName

      public String getName()
       Required if the condition exists. The unique resource name for this
       condition. Its format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
      
       `[CONDITION_ID]` is assigned by Cloud Monitoring when the
       condition is created as part of a new or updated alerting policy.
      
       When calling the
       [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
       method, do not include the `name` field in the conditions of the
       requested alerting policy. Cloud Monitoring creates the
       condition identifiers and includes them in the new policy.
      
       When calling the
       [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
       method to update a policy, including a condition `name` causes the
       existing condition to be updated. Conditions without names are added to
       the updated policy. Existing conditions are deleted if they are not
       updated.
      
       Best practice is to preserve `[CONDITION_ID]` if you make only small
       changes, such as those to condition thresholds, durations, or trigger
       values.  Otherwise, treat the change as a new condition and let the
       existing condition be deleted.
       
      string name = 12;
      Specified by:
      getName in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required if the condition exists. The unique resource name for this
       condition. Its format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
      
       `[CONDITION_ID]` is assigned by Cloud Monitoring when the
       condition is created as part of a new or updated alerting policy.
      
       When calling the
       [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
       method, do not include the `name` field in the conditions of the
       requested alerting policy. Cloud Monitoring creates the
       condition identifiers and includes them in the new policy.
      
       When calling the
       [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
       method to update a policy, including a condition `name` causes the
       existing condition to be updated. Conditions without names are added to
       the updated policy. Existing conditions are deleted if they are not
       updated.
      
       Best practice is to preserve `[CONDITION_ID]` if you make only small
       changes, such as those to condition thresholds, durations, or trigger
       values.  Otherwise, treat the change as a new condition and let the
       existing condition be deleted.
       
      string name = 12;
      Specified by:
      getNameBytes in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The bytes for name.
    • getDisplayName

      public String getDisplayName()
       A short name or phrase used to identify the condition in dashboards,
       notifications, and incidents. To avoid confusion, don't use the same
       display name for multiple conditions in the same policy.
       
      string display_name = 6;
      Specified by:
      getDisplayName in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       A short name or phrase used to identify the condition in dashboards,
       notifications, and incidents. To avoid confusion, don't use the same
       display name for multiple conditions in the same policy.
       
      string display_name = 6;
      Specified by:
      getDisplayNameBytes in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The bytes for displayName.
    • hasConditionThreshold

      public boolean hasConditionThreshold()
       A condition that compares a time series against a threshold.
       
      .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
      Specified by:
      hasConditionThreshold in interface AlertPolicy.ConditionOrBuilder
      Returns:
      Whether the conditionThreshold field is set.
    • getConditionThreshold

      public AlertPolicy.Condition.MetricThreshold getConditionThreshold()
       A condition that compares a time series against a threshold.
       
      .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
      Specified by:
      getConditionThreshold in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The conditionThreshold.
    • getConditionThresholdOrBuilder

      public AlertPolicy.Condition.MetricThresholdOrBuilder getConditionThresholdOrBuilder()
       A condition that compares a time series against a threshold.
       
      .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
      Specified by:
      getConditionThresholdOrBuilder in interface AlertPolicy.ConditionOrBuilder
    • hasConditionAbsent

      public boolean hasConditionAbsent()
       A condition that checks that a time series continues to
       receive new data points.
       
      .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
      Specified by:
      hasConditionAbsent in interface AlertPolicy.ConditionOrBuilder
      Returns:
      Whether the conditionAbsent field is set.
    • getConditionAbsent

      public AlertPolicy.Condition.MetricAbsence getConditionAbsent()
       A condition that checks that a time series continues to
       receive new data points.
       
      .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
      Specified by:
      getConditionAbsent in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The conditionAbsent.
    • getConditionAbsentOrBuilder

      public AlertPolicy.Condition.MetricAbsenceOrBuilder getConditionAbsentOrBuilder()
       A condition that checks that a time series continues to
       receive new data points.
       
      .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
      Specified by:
      getConditionAbsentOrBuilder in interface AlertPolicy.ConditionOrBuilder
    • hasConditionMatchedLog

      public boolean hasConditionMatchedLog()
       A condition that checks for log messages matching given constraints. If
       set, no other conditions can be present.
       
      .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
      Specified by:
      hasConditionMatchedLog in interface AlertPolicy.ConditionOrBuilder
      Returns:
      Whether the conditionMatchedLog field is set.
    • getConditionMatchedLog

      public AlertPolicy.Condition.LogMatch getConditionMatchedLog()
       A condition that checks for log messages matching given constraints. If
       set, no other conditions can be present.
       
      .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
      Specified by:
      getConditionMatchedLog in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The conditionMatchedLog.
    • getConditionMatchedLogOrBuilder

      public AlertPolicy.Condition.LogMatchOrBuilder getConditionMatchedLogOrBuilder()
       A condition that checks for log messages matching given constraints. If
       set, no other conditions can be present.
       
      .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
      Specified by:
      getConditionMatchedLogOrBuilder in interface AlertPolicy.ConditionOrBuilder
    • hasConditionMonitoringQueryLanguage

      public boolean hasConditionMonitoringQueryLanguage()
       A condition that uses the Monitoring Query Language to define
       alerts.
       
      .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
      Specified by:
      hasConditionMonitoringQueryLanguage in interface AlertPolicy.ConditionOrBuilder
      Returns:
      Whether the conditionMonitoringQueryLanguage field is set.
    • getConditionMonitoringQueryLanguage

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition getConditionMonitoringQueryLanguage()
       A condition that uses the Monitoring Query Language to define
       alerts.
       
      .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
      Specified by:
      getConditionMonitoringQueryLanguage in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The conditionMonitoringQueryLanguage.
    • getConditionMonitoringQueryLanguageOrBuilder

      public AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder getConditionMonitoringQueryLanguageOrBuilder()
       A condition that uses the Monitoring Query Language to define
       alerts.
       
      .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
      Specified by:
      getConditionMonitoringQueryLanguageOrBuilder in interface AlertPolicy.ConditionOrBuilder
    • hasConditionPrometheusQueryLanguage

      public boolean hasConditionPrometheusQueryLanguage()
       A condition that uses the Prometheus query language to define alerts.
       
      .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21;
      Specified by:
      hasConditionPrometheusQueryLanguage in interface AlertPolicy.ConditionOrBuilder
      Returns:
      Whether the conditionPrometheusQueryLanguage field is set.
    • getConditionPrometheusQueryLanguage

      public AlertPolicy.Condition.PrometheusQueryLanguageCondition getConditionPrometheusQueryLanguage()
       A condition that uses the Prometheus query language to define alerts.
       
      .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21;
      Specified by:
      getConditionPrometheusQueryLanguage in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The conditionPrometheusQueryLanguage.
    • getConditionPrometheusQueryLanguageOrBuilder

      public AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilder getConditionPrometheusQueryLanguageOrBuilder()
       A condition that uses the Prometheus query language to define alerts.
       
      .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21;
      Specified by:
      getConditionPrometheusQueryLanguageOrBuilder in interface AlertPolicy.ConditionOrBuilder
    • hasConditionSql

      public boolean hasConditionSql()
       A condition that periodically evaluates a SQL query result.
       
      .google.monitoring.v3.AlertPolicy.Condition.SqlCondition condition_sql = 22;
      Specified by:
      hasConditionSql in interface AlertPolicy.ConditionOrBuilder
      Returns:
      Whether the conditionSql field is set.
    • getConditionSql

      public AlertPolicy.Condition.SqlCondition getConditionSql()
       A condition that periodically evaluates a SQL query result.
       
      .google.monitoring.v3.AlertPolicy.Condition.SqlCondition condition_sql = 22;
      Specified by:
      getConditionSql in interface AlertPolicy.ConditionOrBuilder
      Returns:
      The conditionSql.
    • getConditionSqlOrBuilder

      public AlertPolicy.Condition.SqlConditionOrBuilder getConditionSqlOrBuilder()
       A condition that periodically evaluates a SQL query result.
       
      .google.monitoring.v3.AlertPolicy.Condition.SqlCondition condition_sql = 22;
      Specified by:
      getConditionSqlOrBuilder in interface AlertPolicy.ConditionOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AlertPolicy.Condition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AlertPolicy.Condition parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AlertPolicy.Condition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AlertPolicy.Condition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public AlertPolicy.Condition.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static AlertPolicy.Condition.Builder newBuilder()
    • newBuilder

      public static AlertPolicy.Condition.Builder newBuilder(AlertPolicy.Condition prototype)
    • toBuilder

      public AlertPolicy.Condition.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AlertPolicy.Condition.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AlertPolicy.Condition getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AlertPolicy.Condition> parser()
    • getParserForType

      public com.google.protobuf.Parser<AlertPolicy.Condition> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AlertPolicy.Condition getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder