Class Object.Retention.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Object.Retention.Builder>
com.google.storage.v2.Object.Retention.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Object.RetentionOrBuilder, Cloneable
Enclosing class:
Object.Retention

public static final class Object.Retention.Builder extends com.google.protobuf.GeneratedMessage.Builder<Object.Retention.Builder> implements Object.RetentionOrBuilder
 Specifies retention parameters of the object. Objects under retention
 cannot be deleted or overwritten until their retention expires.
 
Protobuf type google.storage.v2.Object.Retention
  • 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<Object.Retention.Builder>
    • clear

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

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

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

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

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

      public Object.Retention.Builder mergeFrom(Object.Retention other)
    • isInitialized

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

      public Object.Retention.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<Object.Retention.Builder>
      Throws:
      IOException
    • getModeValue

      public int getModeValue()
       Optional. The mode of the Retention.
       
      .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModeValue in interface Object.RetentionOrBuilder
      Returns:
      The enum numeric value on the wire for mode.
    • setModeValue

      public Object.Retention.Builder setModeValue(int value)
       Optional. The mode of the Retention.
       
      .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for mode to set.
      Returns:
      This builder for chaining.
    • getMode

      public Object.Retention.Mode getMode()
       Optional. The mode of the Retention.
       
      .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMode in interface Object.RetentionOrBuilder
      Returns:
      The mode.
    • setMode

       Optional. The mode of the Retention.
       
      .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The mode to set.
      Returns:
      This builder for chaining.
    • clearMode

      public Object.Retention.Builder clearMode()
       Optional. The mode of the Retention.
       
      .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasRetainUntilTime

      public boolean hasRetainUntilTime()
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasRetainUntilTime in interface Object.RetentionOrBuilder
      Returns:
      Whether the retainUntilTime field is set.
    • getRetainUntilTime

      public com.google.protobuf.Timestamp getRetainUntilTime()
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRetainUntilTime in interface Object.RetentionOrBuilder
      Returns:
      The retainUntilTime.
    • setRetainUntilTime

      public Object.Retention.Builder setRetainUntilTime(com.google.protobuf.Timestamp value)
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
    • setRetainUntilTime

      public Object.Retention.Builder setRetainUntilTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
    • mergeRetainUntilTime

      public Object.Retention.Builder mergeRetainUntilTime(com.google.protobuf.Timestamp value)
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
    • clearRetainUntilTime

      public Object.Retention.Builder clearRetainUntilTime()
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getRetainUntilTimeBuilder

      public com.google.protobuf.Timestamp.Builder getRetainUntilTimeBuilder()
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getRetainUntilTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getRetainUntilTimeOrBuilder()
       Optional. The timestamp that the object needs to be retained until.
       Value cannot be set in the past or more than 100 years in the future.
       
      .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRetainUntilTimeOrBuilder in interface Object.RetentionOrBuilder