Class Object.Retention (2.58.1) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 2.58.1keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  Object . Retention   extends   GeneratedMessageV3   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
    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
   
  MODE_FIELD_NUMBER 
  
    
public   static   final   int   MODE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  RETAIN_UNTIL_TIME_FIELD_NUMBER 
  
    
public   static   final   int   RETAIN_UNTIL_TIME_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   Object . Retention   getDefaultInstance ()  
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  newBuilder() 
  
    
public   static   Object . Retention . Builder   newBuilder ()  
  
  newBuilder(Object.Retention prototype) 
  
    
public   static   Object . Retention . Builder   newBuilder ( Object . Retention   prototype )  
  
  
  
    
public   static   Object . Retention   parseDelimitedFrom ( InputStream   input )  
  
  
  
  
    
public   static   Object . Retention   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(byte[] data) 
  
    
public   static   Object . Retention   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Object . Retention   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(ByteString data) 
  
    
public   static   Object . Retention   parseFrom ( ByteString   data )  
  
  
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Object . Retention   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Object . Retention   parseFrom ( CodedInputStream   input )  
  
  
  
  
    
public   static   Object . Retention   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Object . Retention   parseFrom ( InputStream   input )  
  
  
  
  
    
public   static   Object . Retention   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(ByteBuffer data) 
  
    
public   static   Object . Retention   parseFrom ( ByteBuffer   data )  
  
  
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Object . Retention   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parser() 
  
    
public   static   Parser<Object . Retention >  parser ()  
  
  Methods
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  Overrides 
  
  getDefaultInstanceForType() 
  
    
public   Object . Retention   getDefaultInstanceForType ()  
  
  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];
 
getModeValue() 
  
    
public   int   getModeValue ()  
   Optional. The mode of the Retention.
 
 .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
 
    
      
        Returns  
      
        Type Description  
      
        int The enum numeric value on the wire for mode.
 
     
  
  getParserForType() 
  
    
public   Parser<Object . Retention >  getParserForType ()  
  
  Overrides 
  
  getRetainUntilTime() 
  
    
public   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];
 
    
      
        Returns  
      
        Type Description  
      
        Timestamp The retainUntilTime.
 
     
  
  getRetainUntilTimeOrBuilder() 
  
    
public   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];
 
getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  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];
 
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the retainUntilTime field is set.
 
     
  
  hashCode() 
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  newBuilderForType() 
  
    
public   Object . Retention . Builder   newBuilderForType ()  
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Object . Retention . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  toBuilder() 
  
    
public   Object . Retention . 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."],[],[]]