Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Snooze.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>
      • setField

        public Snooze.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                       Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>
      • clearField

        public Snooze.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>
      • clearOneof

        public Snooze.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>
      • setRepeatedField

        public Snooze.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               int index,
                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>
      • addRepeatedField

        public Snooze.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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. 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) = REQUIRED];
        Specified by:
        getName in interface SnoozeOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. 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) = REQUIRED];
        Specified by:
        getNameBytes in interface SnoozeOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Snooze.Builder setName​(String value)
         Required. 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) = REQUIRED];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Snooze.Builder clearName()
         Required. 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) = REQUIRED];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Snooze.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. 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) = REQUIRED];
        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.
      • setUnknownFields

        public final Snooze.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>
      • mergeUnknownFields

        public final Snooze.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Snooze.Builder>