Class AlertPolicy.AlertStrategy.Builder

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

public static final class AlertPolicy.AlertStrategy.Builder extends com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.AlertStrategy.Builder> implements AlertPolicy.AlertStrategyOrBuilder
 Control over how the notification channels in `notification_channels`
 are notified when this alert fires.
 
Protobuf type google.monitoring.v3.AlertPolicy.AlertStrategy
  • 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.AlertStrategy.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.AlertStrategy.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.AlertStrategy.Builder>
    • getDefaultInstanceForType

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

      public AlertPolicy.AlertStrategy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public AlertPolicy.AlertStrategy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AlertPolicy.AlertStrategy.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.AlertStrategy.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.AlertStrategy.Builder>
    • mergeFrom

      public AlertPolicy.AlertStrategy.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.AlertStrategy.Builder>
      Throws:
      IOException
    • hasNotificationRateLimit

      public boolean hasNotificationRateLimit()
       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
      Specified by:
      hasNotificationRateLimit in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      Whether the notificationRateLimit field is set.
    • getNotificationRateLimit

      public AlertPolicy.AlertStrategy.NotificationRateLimit getNotificationRateLimit()
       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
      Specified by:
      getNotificationRateLimit in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      The notificationRateLimit.
    • setNotificationRateLimit

       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
    • setNotificationRateLimit

       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
    • mergeNotificationRateLimit

       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
    • clearNotificationRateLimit

      public AlertPolicy.AlertStrategy.Builder clearNotificationRateLimit()
       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
    • getNotificationRateLimitBuilder

      public AlertPolicy.AlertStrategy.NotificationRateLimit.Builder getNotificationRateLimitBuilder()
       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
    • getNotificationRateLimitOrBuilder

      public AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder getNotificationRateLimitOrBuilder()
       Required for log-based alerting policies, i.e. policies with a `LogMatch`
       condition.
      
       This limit is not implemented for alerting policies that do not have
       a LogMatch condition.
       
      .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
      Specified by:
      getNotificationRateLimitOrBuilder in interface AlertPolicy.AlertStrategyOrBuilder
    • getNotificationPromptsList

      public List<AlertPolicy.AlertStrategy.NotificationPrompt> getNotificationPromptsList()
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Specified by:
      getNotificationPromptsList in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      A list containing the notificationPrompts.
    • getNotificationPromptsCount

      public int getNotificationPromptsCount()
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Specified by:
      getNotificationPromptsCount in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      The count of notificationPrompts.
    • getNotificationPrompts

      public AlertPolicy.AlertStrategy.NotificationPrompt getNotificationPrompts(int index)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Specified by:
      getNotificationPrompts in interface AlertPolicy.AlertStrategyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The notificationPrompts at the given index.
    • setNotificationPrompts

      public AlertPolicy.AlertStrategy.Builder setNotificationPrompts(int index, AlertPolicy.AlertStrategy.NotificationPrompt value)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Parameters:
      index - The index to set the value at.
      value - The notificationPrompts to set.
      Returns:
      This builder for chaining.
    • addNotificationPrompts

       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Parameters:
      value - The notificationPrompts to add.
      Returns:
      This builder for chaining.
    • addAllNotificationPrompts

      public AlertPolicy.AlertStrategy.Builder addAllNotificationPrompts(Iterable<? extends AlertPolicy.AlertStrategy.NotificationPrompt> values)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Parameters:
      values - The notificationPrompts to add.
      Returns:
      This builder for chaining.
    • clearNotificationPrompts

      public AlertPolicy.AlertStrategy.Builder clearNotificationPrompts()
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Returns:
      This builder for chaining.
    • getNotificationPromptsValueList

      public List<Integer> getNotificationPromptsValueList()
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Specified by:
      getNotificationPromptsValueList in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for notificationPrompts.
    • getNotificationPromptsValue

      public int getNotificationPromptsValue(int index)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Specified by:
      getNotificationPromptsValue in interface AlertPolicy.AlertStrategyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of notificationPrompts at the given index.
    • setNotificationPromptsValue

      public AlertPolicy.AlertStrategy.Builder setNotificationPromptsValue(int index, int value)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for notificationPrompts to set.
      Returns:
      This builder for chaining.
    • addNotificationPromptsValue

      public AlertPolicy.AlertStrategy.Builder addNotificationPromptsValue(int value)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Parameters:
      value - The enum numeric value on the wire for notificationPrompts to add.
      Returns:
      This builder for chaining.
    • addAllNotificationPromptsValue

      public AlertPolicy.AlertStrategy.Builder addAllNotificationPromptsValue(Iterable<Integer> values)
       For log-based alert policies, the notification prompts is always
       [OPENED]. For non log-based alert policies, the notification prompts can
       be [OPENED] or [OPENED, CLOSED].
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2;
      Parameters:
      values - The enum numeric values on the wire for notificationPrompts to add.
      Returns:
      This builder for chaining.
    • hasAutoClose

      public boolean hasAutoClose()
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
      Specified by:
      hasAutoClose in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      Whether the autoClose field is set.
    • getAutoClose

      public com.google.protobuf.Duration getAutoClose()
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
      Specified by:
      getAutoClose in interface AlertPolicy.AlertStrategyOrBuilder
      Returns:
      The autoClose.
    • setAutoClose

      public AlertPolicy.AlertStrategy.Builder setAutoClose(com.google.protobuf.Duration value)
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
    • setAutoClose

      public AlertPolicy.AlertStrategy.Builder setAutoClose(com.google.protobuf.Duration.Builder builderForValue)
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
    • mergeAutoClose

      public AlertPolicy.AlertStrategy.Builder mergeAutoClose(com.google.protobuf.Duration value)
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
    • clearAutoClose

      public AlertPolicy.AlertStrategy.Builder clearAutoClose()
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
    • getAutoCloseBuilder

      public com.google.protobuf.Duration.Builder getAutoCloseBuilder()
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
    • getAutoCloseOrBuilder

      public com.google.protobuf.DurationOrBuilder getAutoCloseOrBuilder()
       If an alerting policy that was active has no data for this long, any open
       incidents will close
       
      .google.protobuf.Duration auto_close = 3;
      Specified by:
      getAutoCloseOrBuilder in interface AlertPolicy.AlertStrategyOrBuilder
    • getNotificationChannelStrategyList

      public List<AlertPolicy.AlertStrategy.NotificationChannelStrategy> getNotificationChannelStrategyList()
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
      Specified by:
      getNotificationChannelStrategyList in interface AlertPolicy.AlertStrategyOrBuilder
    • getNotificationChannelStrategyCount

      public int getNotificationChannelStrategyCount()
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
      Specified by:
      getNotificationChannelStrategyCount in interface AlertPolicy.AlertStrategyOrBuilder
    • getNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.NotificationChannelStrategy getNotificationChannelStrategy(int index)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
      Specified by:
      getNotificationChannelStrategy in interface AlertPolicy.AlertStrategyOrBuilder
    • setNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder setNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy value)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • setNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder setNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • addNotificationChannelStrategy

       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • addNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder addNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy value)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • addNotificationChannelStrategy

       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • addNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder addNotificationChannelStrategy(int index, AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder builderForValue)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • addAllNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder addAllNotificationChannelStrategy(Iterable<? extends AlertPolicy.AlertStrategy.NotificationChannelStrategy> values)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • clearNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder clearNotificationChannelStrategy()
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • removeNotificationChannelStrategy

      public AlertPolicy.AlertStrategy.Builder removeNotificationChannelStrategy(int index)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • getNotificationChannelStrategyBuilder

      public AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder getNotificationChannelStrategyBuilder(int index)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • getNotificationChannelStrategyOrBuilder

      public AlertPolicy.AlertStrategy.NotificationChannelStrategyOrBuilder getNotificationChannelStrategyOrBuilder(int index)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
      Specified by:
      getNotificationChannelStrategyOrBuilder in interface AlertPolicy.AlertStrategyOrBuilder
    • getNotificationChannelStrategyOrBuilderList

      public List<? extends AlertPolicy.AlertStrategy.NotificationChannelStrategyOrBuilder> getNotificationChannelStrategyOrBuilderList()
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
      Specified by:
      getNotificationChannelStrategyOrBuilderList in interface AlertPolicy.AlertStrategyOrBuilder
    • addNotificationChannelStrategyBuilder

      public AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder addNotificationChannelStrategyBuilder()
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • addNotificationChannelStrategyBuilder

      public AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder addNotificationChannelStrategyBuilder(int index)
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;
    • getNotificationChannelStrategyBuilderList

      public List<AlertPolicy.AlertStrategy.NotificationChannelStrategy.Builder> getNotificationChannelStrategyBuilderList()
       Control how notifications will be sent out, on a per-channel basis.
       
      repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4;