Class UpdateSnoozeRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<UpdateSnoozeRequest.Builder>
com.google.monitoring.v3.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.GeneratedMessage.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 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<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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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];
    • getSnoozeOrBuilder

      public SnoozeOrBuilder getSnoozeOrBuilder()
       Required. The `Snooze` to update. Must have the name field present.
       
      .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSnoozeOrBuilder in interface UpdateSnoozeRequestOrBuilder
    • 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