Class Bucket.RetentionPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Bucket.RetentionPolicy.Builder>
com.google.storage.v2.Bucket.RetentionPolicy.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Bucket.RetentionPolicyOrBuilder, Cloneable
Enclosing class:
Bucket.RetentionPolicy

public static final class Bucket.RetentionPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Bucket.RetentionPolicy.Builder> implements Bucket.RetentionPolicyOrBuilder
 Retention policy properties of a bucket.
 
Protobuf type google.storage.v2.Bucket.RetentionPolicy
  • Method Details

    • 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<Bucket.RetentionPolicy.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<Bucket.RetentionPolicy.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<Bucket.RetentionPolicy.Builder>
    • getDefaultInstanceForType

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

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

      public Bucket.RetentionPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<Bucket.RetentionPolicy.Builder>
    • setField

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

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

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

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

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

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

    • isInitialized

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

      public Bucket.RetentionPolicy.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<Bucket.RetentionPolicy.Builder>
      Throws:
      IOException
    • hasEffectiveTime

      public boolean hasEffectiveTime()
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
      Specified by:
      hasEffectiveTime in interface Bucket.RetentionPolicyOrBuilder
      Returns:
      Whether the effectiveTime field is set.
    • getEffectiveTime

      public com.google.protobuf.Timestamp getEffectiveTime()
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
      Specified by:
      getEffectiveTime in interface Bucket.RetentionPolicyOrBuilder
      Returns:
      The effectiveTime.
    • setEffectiveTime

      public Bucket.RetentionPolicy.Builder setEffectiveTime(com.google.protobuf.Timestamp value)
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
    • setEffectiveTime

      public Bucket.RetentionPolicy.Builder setEffectiveTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
    • mergeEffectiveTime

      public Bucket.RetentionPolicy.Builder mergeEffectiveTime(com.google.protobuf.Timestamp value)
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
    • clearEffectiveTime

      public Bucket.RetentionPolicy.Builder clearEffectiveTime()
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
    • getEffectiveTimeBuilder

      public com.google.protobuf.Timestamp.Builder getEffectiveTimeBuilder()
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
    • getEffectiveTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder()
       Server-determined value that indicates the time from which policy was
       enforced and effective.
       
      .google.protobuf.Timestamp effective_time = 1;
      Specified by:
      getEffectiveTimeOrBuilder in interface Bucket.RetentionPolicyOrBuilder
    • getIsLocked

      public boolean getIsLocked()
       Once locked, an object retention policy cannot be modified.
       
      bool is_locked = 2;
      Specified by:
      getIsLocked in interface Bucket.RetentionPolicyOrBuilder
      Returns:
      The isLocked.
    • setIsLocked

      public Bucket.RetentionPolicy.Builder setIsLocked(boolean value)
       Once locked, an object retention policy cannot be modified.
       
      bool is_locked = 2;
      Parameters:
      value - The isLocked to set.
      Returns:
      This builder for chaining.
    • clearIsLocked

      public Bucket.RetentionPolicy.Builder clearIsLocked()
       Once locked, an object retention policy cannot be modified.
       
      bool is_locked = 2;
      Returns:
      This builder for chaining.
    • hasRetentionDuration

      public boolean hasRetentionDuration()
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
      Specified by:
      hasRetentionDuration in interface Bucket.RetentionPolicyOrBuilder
      Returns:
      Whether the retentionDuration field is set.
    • getRetentionDuration

      public com.google.protobuf.Duration getRetentionDuration()
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
      Specified by:
      getRetentionDuration in interface Bucket.RetentionPolicyOrBuilder
      Returns:
      The retentionDuration.
    • setRetentionDuration

      public Bucket.RetentionPolicy.Builder setRetentionDuration(com.google.protobuf.Duration value)
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
    • setRetentionDuration

      public Bucket.RetentionPolicy.Builder setRetentionDuration(com.google.protobuf.Duration.Builder builderForValue)
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
    • mergeRetentionDuration

      public Bucket.RetentionPolicy.Builder mergeRetentionDuration(com.google.protobuf.Duration value)
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
    • clearRetentionDuration

      public Bucket.RetentionPolicy.Builder clearRetentionDuration()
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
    • getRetentionDurationBuilder

      public com.google.protobuf.Duration.Builder getRetentionDurationBuilder()
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
    • getRetentionDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder()
       The duration that objects need to be retained. Retention duration must be
       greater than zero and less than 100 years. Note that enforcement of
       retention periods less than a day is not guaranteed. Such periods should
       only be used for testing purposes. Any `nanos` value specified will be
       rounded down to the nearest second.
       
      .google.protobuf.Duration retention_duration = 4;
      Specified by:
      getRetentionDurationOrBuilder in interface Bucket.RetentionPolicyOrBuilder
    • setUnknownFields

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

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