Class AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder
All Implemented Interfaces:
AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AlertPolicy.Condition.MonitoringQueryLanguageCondition

public static final class AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder extends com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder> implements AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
 A condition type that allows alerting policies to be defined using
 [Monitoring Query Language](https://cloud.google.com/monitoring/mql).
 
Protobuf type google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
  • 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.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
    • mergeFrom

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder>
      Throws:
      IOException
    • getQuery

      public String getQuery()
       [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
       query that outputs a boolean stream.
       
      string query = 1;
      Specified by:
      getQuery in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      The query.
    • getQueryBytes

      public com.google.protobuf.ByteString getQueryBytes()
       [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
       query that outputs a boolean stream.
       
      string query = 1;
      Specified by:
      getQueryBytes in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      The bytes for query.
    • setQuery

       [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
       query that outputs a boolean stream.
       
      string query = 1;
      Parameters:
      value - The query to set.
      Returns:
      This builder for chaining.
    • clearQuery

       [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
       query that outputs a boolean stream.
       
      string query = 1;
      Returns:
      This builder for chaining.
    • setQueryBytes

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder setQueryBytes(com.google.protobuf.ByteString value)
       [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
       query that outputs a boolean stream.
       
      string query = 1;
      Parameters:
      value - The bytes for query to set.
      Returns:
      This builder for chaining.
    • hasDuration

      public boolean hasDuration()
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
      Specified by:
      hasDuration in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      Whether the duration field is set.
    • getDuration

      public com.google.protobuf.Duration getDuration()
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
      Specified by:
      getDuration in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      The duration.
    • setDuration

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder setDuration(com.google.protobuf.Duration value)
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
    • setDuration

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder setDuration(com.google.protobuf.Duration.Builder builderForValue)
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
    • mergeDuration

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder mergeDuration(com.google.protobuf.Duration value)
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
    • clearDuration

       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
    • getDurationBuilder

      public com.google.protobuf.Duration.Builder getDurationBuilder()
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
    • getDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
       The amount of time that a time series must violate the
       threshold to be considered failing. Currently, only values
       that are a multiple of a minute--e.g., 0, 60, 120, or 300
       seconds--are supported. If an invalid value is given, an
       error will be returned. When choosing a duration, it is useful to
       keep in mind the frequency of the underlying time series data
       (which may also be affected by any alignments specified in the
       `aggregations` field); a good duration is long enough so that a single
       outlier does not generate spurious alerts, but short enough that
       unhealthy states are detected and alerted on quickly.
       
      .google.protobuf.Duration duration = 2;
      Specified by:
      getDurationOrBuilder in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
    • hasTrigger

      public boolean hasTrigger()
       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
      Specified by:
      hasTrigger in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      Whether the trigger field is set.
    • getTrigger

      public AlertPolicy.Condition.Trigger getTrigger()
       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
      Specified by:
      getTrigger in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      The trigger.
    • setTrigger

       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
    • setTrigger

       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
    • mergeTrigger

       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
    • clearTrigger

       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
    • getTriggerBuilder

      public AlertPolicy.Condition.Trigger.Builder getTriggerBuilder()
       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
    • getTriggerOrBuilder

      public AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder()
       The number/percent of time series for which the comparison must hold
       in order for the condition to trigger. If unspecified, then the
       condition will trigger if the comparison is true for any of the
       time series that have been identified by `filter` and `aggregations`,
       or by the ratio, if `denominator_filter` and `denominator_aggregations`
       are specified.
       
      .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;
      Specified by:
      getTriggerOrBuilder in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
    • getEvaluationMissingDataValue

      public int getEvaluationMissingDataValue()
       A condition control that determines how metric-threshold conditions
       are evaluated when data stops arriving.
       
      .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
      Specified by:
      getEvaluationMissingDataValue in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      The enum numeric value on the wire for evaluationMissingData.
    • setEvaluationMissingDataValue

      public AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder setEvaluationMissingDataValue(int value)
       A condition control that determines how metric-threshold conditions
       are evaluated when data stops arriving.
       
      .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
      Parameters:
      value - The enum numeric value on the wire for evaluationMissingData to set.
      Returns:
      This builder for chaining.
    • getEvaluationMissingData

      public AlertPolicy.Condition.EvaluationMissingData getEvaluationMissingData()
       A condition control that determines how metric-threshold conditions
       are evaluated when data stops arriving.
       
      .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
      Specified by:
      getEvaluationMissingData in interface AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
      Returns:
      The evaluationMissingData.
    • setEvaluationMissingData

       A condition control that determines how metric-threshold conditions
       are evaluated when data stops arriving.
       
      .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
      Parameters:
      value - The evaluationMissingData to set.
      Returns:
      This builder for chaining.
    • clearEvaluationMissingData

       A condition control that determines how metric-threshold conditions
       are evaluated when data stops arriving.
       
      .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
      Returns:
      This builder for chaining.