@@ -111,6 +111,8 @@ public final class OmKeyInfo extends WithParentObjectId
111111 // been modified.
112112 private Long expectedDataGeneration = null ;
113113 private String expectedETag ;
114+ private Long seqNumMin ;
115+ private Long seqNumMax ;
114116
115117 private OmKeyInfo (Builder b ) {
116118 super (b );
@@ -131,6 +133,8 @@ private OmKeyInfo(Builder b) {
131133 this .tags = b .tags .build ();
132134 this .expectedDataGeneration = b .expectedDataGeneration ;
133135 this .expectedETag = b .expectedETag ;
136+ this .seqNumMin = b .seqNumMin ;
137+ this .seqNumMax = b .seqNumMax ;
134138 }
135139
136140 private static Codec <OmKeyInfo > newCodec (boolean ignorePipeline ) {
@@ -199,6 +203,30 @@ public String getExpectedETag() {
199203 return expectedETag ;
200204 }
201205
206+ public void setSeqNumMin (Long seqNumMin ) {
207+ this .seqNumMin = seqNumMin ;
208+ }
209+
210+ public Long getSeqNumMin () {
211+ return seqNumMin ;
212+ }
213+
214+ public boolean hasSeqNumMin () {
215+ return seqNumMin != null ;
216+ }
217+
218+ public void setSeqNumMax (Long seqNumMax ) {
219+ this .seqNumMax = seqNumMax ;
220+ }
221+
222+ public Long getSeqNumMax () {
223+ return seqNumMax ;
224+ }
225+
226+ public boolean hasSeqNumMax () {
227+ return seqNumMax != null ;
228+ }
229+
202230 public String getOwnerName () {
203231 return ownerName ;
204232 }
@@ -475,6 +503,8 @@ public String toString() {
475503 ", fileChecksum=" + fileChecksum +
476504 ", isFile=" + isFile +
477505 ", fileName='" + fileName + '\'' +
506+ ", seqNumMin=" + seqNumMin +
507+ ", seqNumMax=" + seqNumMax +
478508 ", acls=" + acls +
479509 '}' ;
480510 }
@@ -503,6 +533,8 @@ public static class Builder extends WithParentObjectId.Builder<OmKeyInfo> {
503533 private final MapBuilder <String , String > tags ;
504534 private Long expectedDataGeneration = null ;
505535 private String expectedETag ;
536+ private Long seqNumMin ;
537+ private Long seqNumMax ;
506538
507539 public Builder () {
508540 this .acls = AclListBuilder .empty ();
@@ -526,6 +558,8 @@ public Builder(OmKeyInfo obj) {
526558 this .isFile = obj .isFile ;
527559 this .expectedDataGeneration = obj .expectedDataGeneration ;
528560 this .expectedETag = obj .expectedETag ;
561+ this .seqNumMin = obj .seqNumMin ;
562+ this .seqNumMax = obj .seqNumMax ;
529563 this .tags = MapBuilder .of (obj .tags );
530564 obj .keyLocationVersions .forEach (keyLocationVersion ->
531565 this .omKeyLocationInfoGroups .add (
@@ -702,6 +736,16 @@ public Builder setExpectedETag(String eTag) {
702736 return this ;
703737 }
704738
739+ public Builder setSeqNumMin (Long seqNum ) {
740+ this .seqNumMin = seqNum ;
741+ return this ;
742+ }
743+
744+ public Builder setSeqNumMax (Long seqNum ) {
745+ this .seqNumMax = seqNum ;
746+ return this ;
747+ }
748+
705749 @ Override
706750 protected void validate () {
707751 super .validate ();
@@ -824,6 +868,12 @@ private KeyInfo getProtobuf(boolean ignorePipeline, String fullKeyName,
824868 if (expectedETag != null ) {
825869 kb .setExpectedETag (expectedETag );
826870 }
871+ if (seqNumMin != null ) {
872+ kb .setSeqNumMin (seqNumMin );
873+ }
874+ if (seqNumMax != null ) {
875+ kb .setSeqNumMax (seqNumMax );
876+ }
827877 if (ownerName != null ) {
828878 kb .setOwnerName (ownerName );
829879 }
@@ -880,6 +930,12 @@ public static Builder builderFromProtobuf(KeyInfo keyInfo) {
880930 if (keyInfo .hasExpectedETag ()) {
881931 builder .setExpectedETag (keyInfo .getExpectedETag ());
882932 }
933+ if (keyInfo .hasSeqNumMin ()) {
934+ builder .setSeqNumMin (keyInfo .getSeqNumMin ());
935+ }
936+ if (keyInfo .hasSeqNumMax ()) {
937+ builder .setSeqNumMax (keyInfo .getSeqNumMax ());
938+ }
883939
884940 if (keyInfo .hasOwnerName ()) {
885941 builder .setOwnerName (keyInfo .getOwnerName ());
@@ -903,6 +959,8 @@ public String getObjectInfo() {
903959 ", creationTime='" + creationTime + '\'' +
904960 ", objectID='" + getObjectID () + '\'' +
905961 ", parentID='" + getParentObjectID () + '\'' +
962+ ", seqNumMin='" + seqNumMin + '\'' +
963+ ", seqNumMax='" + seqNumMax + '\'' +
906964 ", replication='" + replicationConfig + '\'' +
907965 ", fileChecksum='" + fileChecksum +
908966 '}' ;
@@ -921,6 +979,8 @@ public boolean isKeyInfoSame(OmKeyInfo omKeyInfo, boolean checkPath,
921979 Objects .equals (getMetadata (), omKeyInfo .getMetadata ()) &&
922980 Objects .equals (acls , omKeyInfo .acls ) &&
923981 Objects .equals (getTags (), omKeyInfo .getTags ()) &&
982+ Objects .equals (seqNumMin , omKeyInfo .seqNumMin ) &&
983+ Objects .equals (seqNumMax , omKeyInfo .seqNumMax ) &&
924984 getObjectID () == omKeyInfo .getObjectID ();
925985
926986 if (isEqual && checkUpdateID ) {
0 commit comments