Class Bucket.RetentionPolicy (2.44.1) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 2.44.1keyboard_arrow_down  
  
 
    
    
    
      
  
  
  
    
public   static   final   class  Bucket . RetentionPolicy   extends   GeneratedMessageV3   implements   Bucket . RetentionPolicyOrBuilder  
   Retention policy properties of a bucket.
 Protobuf type google.storage.v2.Bucket.RetentionPolicy
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT) 
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int) 
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
   
  EFFECTIVE_TIME_FIELD_NUMBER 
  
    
public   static   final   int   EFFECTIVE_TIME_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  IS_LOCKED_FIELD_NUMBER 
  
    
public   static   final   int   IS_LOCKED_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  RETENTION_DURATION_FIELD_NUMBER 
  
    
public   static   final   int   RETENTION_DURATION_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   Bucket . RetentionPolicy   getDefaultInstance ()  
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  newBuilder() 
  
    
public   static   Bucket . RetentionPolicy . Builder   newBuilder ()  
  
  newBuilder(Bucket.RetentionPolicy prototype) 
  
    
public   static   Bucket . RetentionPolicy . Builder   newBuilder ( Bucket . RetentionPolicy   prototype )  
  
  
  
    
public   static   Bucket . RetentionPolicy   parseDelimitedFrom ( InputStream   input )  
  
  
  
  
    
public   static   Bucket . RetentionPolicy   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(byte[] data) 
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(ByteString data) 
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( ByteString   data )  
  
  
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( CodedInputStream   input )  
  
  
  
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( InputStream   input )  
  
  
  
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(ByteBuffer data) 
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( ByteBuffer   data )  
  
  
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Bucket . RetentionPolicy   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parser() 
  
    
public   static   Parser<Bucket . RetentionPolicy >  parser ()  
  
  Methods
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  Overrides 
  
  getDefaultInstanceForType() 
  
    
public   Bucket . RetentionPolicy   getDefaultInstanceForType ()  
  
  getEffectiveTime() 
  
    
public   Timestamp   getEffectiveTime ()  
   Server-determined value that indicates the time from which policy was
 enforced and effective.
 .google.protobuf.Timestamp effective_time = 1;
    
      
        Returns  
      
        Type Description  
      
        Timestamp The effectiveTime.
 
     
  
  getEffectiveTimeOrBuilder() 
  
    
public   TimestampOrBuilder   getEffectiveTimeOrBuilder ()  
   Server-determined value that indicates the time from which policy was
 enforced and effective.
 .google.protobuf.Timestamp effective_time = 1;
getIsLocked() 
  
    
public   boolean   getIsLocked ()  
   Once locked, an object retention policy cannot be modified.
 bool is_locked = 2;
    
      
        Returns  
      
        Type Description  
      
        boolean The isLocked.
 
     
  
  getParserForType() 
  
    
public   Parser<Bucket . RetentionPolicy >  getParserForType ()  
  
  Overrides 
  
  getRetentionDuration() 
  
    
public   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;
    
      
        Returns  
      
        Type Description  
      
        Duration The retentionDuration.
 
     
  
  getRetentionDurationOrBuilder() 
  
    
public   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;
getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  hasEffectiveTime() 
  
    
public   boolean   hasEffectiveTime ()  
   Server-determined value that indicates the time from which policy was
 enforced and effective.
 .google.protobuf.Timestamp effective_time = 1;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the effectiveTime field is set.
 
     
  
  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;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the retentionDuration field is set.
 
     
  
  hashCode() 
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  newBuilderForType() 
  
    
public   Bucket . RetentionPolicy . Builder   newBuilderForType ()  
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Bucket . RetentionPolicy . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  toBuilder() 
  
    
public   Bucket . RetentionPolicy . Builder   toBuilder ()  
  
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
  
  Overrides 
  
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]