Class Snooze.Builder

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

public static final class Snooze.Builder extends com.google.protobuf.GeneratedMessage.Builder<Snooze.Builder> implements SnoozeOrBuilder
 A `Snooze` will prevent any alerts from being opened, and close any that
 are already open. The `Snooze` will work on alerts that match the
 criteria defined in the `Snooze`. The `Snooze` will be active from
 `interval.start_time` through `interval.end_time`.
 
Protobuf type google.monitoring.v3.Snooze
  • 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<Snooze.Builder>
    • clear

      public Snooze.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<Snooze.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<Snooze.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Snooze.Builder mergeFrom(Snooze other)
    • isInitialized

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

      public Snooze.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<Snooze.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Required. Identifier. The name of the `Snooze`. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
      
       The ID of the `Snooze` will be generated by the system.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface SnoozeOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. Identifier. The name of the `Snooze`. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
      
       The ID of the `Snooze` will be generated by the system.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface SnoozeOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Snooze.Builder setName(String value)
       Required. Identifier. The name of the `Snooze`. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
      
       The ID of the `Snooze` will be generated by the system.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Snooze.Builder clearName()
       Required. Identifier. The name of the `Snooze`. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
      
       The ID of the `Snooze` will be generated by the system.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Snooze.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. Identifier. The name of the `Snooze`. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
      
       The ID of the `Snooze` will be generated by the system.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasCriteria

      public boolean hasCriteria()
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasCriteria in interface SnoozeOrBuilder
      Returns:
      Whether the criteria field is set.
    • getCriteria

      public Snooze.Criteria getCriteria()
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCriteria in interface SnoozeOrBuilder
      Returns:
      The criteria.
    • setCriteria

      public Snooze.Builder setCriteria(Snooze.Criteria value)
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
    • setCriteria

      public Snooze.Builder setCriteria(Snooze.Criteria.Builder builderForValue)
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
    • mergeCriteria

      public Snooze.Builder mergeCriteria(Snooze.Criteria value)
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
    • clearCriteria

      public Snooze.Builder clearCriteria()
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
    • getCriteriaBuilder

      public Snooze.Criteria.Builder getCriteriaBuilder()
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
    • getCriteriaOrBuilder

      public Snooze.CriteriaOrBuilder getCriteriaOrBuilder()
       Required. This defines the criteria for applying the `Snooze`. See
       `Criteria` for more information.
       
      .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCriteriaOrBuilder in interface SnoozeOrBuilder
    • hasInterval

      public boolean hasInterval()
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasInterval in interface SnoozeOrBuilder
      Returns:
      Whether the interval field is set.
    • getInterval

      public TimeInterval getInterval()
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getInterval in interface SnoozeOrBuilder
      Returns:
      The interval.
    • setInterval

      public Snooze.Builder setInterval(TimeInterval value)
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
    • setInterval

      public Snooze.Builder setInterval(TimeInterval.Builder builderForValue)
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
    • mergeInterval

      public Snooze.Builder mergeInterval(TimeInterval value)
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
    • clearInterval

      public Snooze.Builder clearInterval()
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
    • getIntervalBuilder

      public TimeInterval.Builder getIntervalBuilder()
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
    • getIntervalOrBuilder

      public TimeIntervalOrBuilder getIntervalOrBuilder()
       Required. The `Snooze` will be active from `interval.start_time` through
       `interval.end_time`.
       `interval.start_time` cannot be in the past. There is a 15 second clock
       skew to account for the time it takes for a request to reach the API from
       the UI.
       
      .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getIntervalOrBuilder in interface SnoozeOrBuilder
    • getDisplayName

      public String getDisplayName()
       Required. A display name for the `Snooze`. This can be, at most, 512
       unicode characters.
       
      string display_name = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface SnoozeOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. A display name for the `Snooze`. This can be, at most, 512
       unicode characters.
       
      string display_name = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface SnoozeOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Snooze.Builder setDisplayName(String value)
       Required. A display name for the `Snooze`. This can be, at most, 512
       unicode characters.
       
      string display_name = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Snooze.Builder clearDisplayName()
       Required. A display name for the `Snooze`. This can be, at most, 512
       unicode characters.
       
      string display_name = 5 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Snooze.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. A display name for the `Snooze`. This can be, at most, 512
       unicode characters.
       
      string display_name = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.