Class UpdateSnoozeRequest.Builder

  • All Implemented Interfaces:
    UpdateSnoozeRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    UpdateSnoozeRequest

    public static final class UpdateSnoozeRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<UpdateSnoozeRequest.Builder>
    implements UpdateSnoozeRequestOrBuilder
     The message definition for updating a `Snooze`. The field, `snooze.name`
     identifies the `Snooze` to be updated. The remainder of `snooze` gives the
     content the `Snooze` in question will be assigned.
    
     What fields can be updated depends on the start time and end time of the
     `Snooze`.
    
       * end time is in the past: These `Snooze`s are considered
         read-only and cannot be updated.
       * start time is in the past and end time is in the future: `display_name`
         and `interval.end_time` can be updated.
       * start time is in the future: `display_name`, `interval.start_time` and
         `interval.end_time` can be updated.
     
    Protobuf type google.monitoring.v3.UpdateSnoozeRequest
    • 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<UpdateSnoozeRequest.Builder>
      • clear

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

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

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

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

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • setField

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • clearField

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • clearOneof

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • setRepeatedField

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • addRepeatedField

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

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • isInitialized

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

        public UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
        Throws:
        IOException
      • hasSnooze

        public boolean hasSnooze()
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasSnooze in interface UpdateSnoozeRequestOrBuilder
        Returns:
        Whether the snooze field is set.
      • getSnooze

        public Snooze getSnooze()
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getSnooze in interface UpdateSnoozeRequestOrBuilder
        Returns:
        The snooze.
      • setSnooze

        public UpdateSnoozeRequest.Builder setSnooze​(Snooze value)
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
      • setSnooze

        public UpdateSnoozeRequest.Builder setSnooze​(Snooze.Builder builderForValue)
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
      • mergeSnooze

        public UpdateSnoozeRequest.Builder mergeSnooze​(Snooze value)
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
      • clearSnooze

        public UpdateSnoozeRequest.Builder clearSnooze()
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
      • getSnoozeBuilder

        public Snooze.Builder getSnoozeBuilder()
         Required. The `Snooze` to update. Must have the name field present.
         
        .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
      • hasUpdateMask

        public boolean hasUpdateMask()
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasUpdateMask in interface UpdateSnoozeRequestOrBuilder
        Returns:
        Whether the updateMask field is set.
      • getUpdateMask

        public com.google.protobuf.FieldMask getUpdateMask()
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getUpdateMask in interface UpdateSnoozeRequestOrBuilder
        Returns:
        The updateMask.
      • setUpdateMask

        public UpdateSnoozeRequest.Builder setUpdateMask​(com.google.protobuf.FieldMask value)
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
      • setUpdateMask

        public UpdateSnoozeRequest.Builder setUpdateMask​(com.google.protobuf.FieldMask.Builder builderForValue)
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
      • mergeUpdateMask

        public UpdateSnoozeRequest.Builder mergeUpdateMask​(com.google.protobuf.FieldMask value)
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
      • clearUpdateMask

        public UpdateSnoozeRequest.Builder clearUpdateMask()
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
      • getUpdateMaskBuilder

        public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder()
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
      • getUpdateMaskOrBuilder

        public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder()
         Required. The fields to update.
        
         For each field listed in `update_mask`:
        
           * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a
             value for that field, the value of the field in the existing `Snooze`
             will be set to the value of the field in the supplied `Snooze`.
           * If the field does not have a value in the supplied `Snooze`, the field
             in the existing `Snooze` is set to its default value.
        
         Fields not listed retain their existing value.
        
         The following are the field names that are accepted in `update_mask`:
        
           * `display_name`
           * `interval.start_time`
           * `interval.end_time`
        
         That said, the start time and end time of the `Snooze` determines which
         fields can legally be updated. Before attempting an update, users should
         consult the documentation for `UpdateSnoozeRequest`, which talks about
         which fields can be updated.
         
        .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getUpdateMaskOrBuilder in interface UpdateSnoozeRequestOrBuilder
      • setUnknownFields

        public final UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>
      • mergeUnknownFields

        public final UpdateSnoozeRequest.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<UpdateSnoozeRequest.Builder>