From 37718924b2f70566dcac3ce762ffb014869d8c68 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 24 Mar 2026 02:55:02 +0000 Subject: [PATCH 1/6] chore: Update generation configuration at Tue Mar 24 02:54:55 UTC 2026 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index f731019cd..4c22bfa92 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.68.0 -googleapis_commitish: 758d8244a84065ea6b0dfacff3d3e9284983390b +googleapis_commitish: 0b3dec847f1045e47991c1539d4c69d8b025cfe8 libraries_bom_version: 26.78.0 libraries: - api_shortname: firestore From 15f77692929a501a0dd5b317a0b0725c21a7885b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 25 Mar 2026 02:57:26 +0000 Subject: [PATCH 2/6] chore: Update generation configuration at Wed Mar 25 02:57:21 UTC 2026 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 4c22bfa92..c7fc233f8 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.68.0 -googleapis_commitish: 0b3dec847f1045e47991c1539d4c69d8b025cfe8 +googleapis_commitish: 59d5f2b46924714af627ac29ea6de78641a00835 libraries_bom_version: 26.78.0 libraries: - api_shortname: firestore From 258da81e8813d268ffe31f04af19c805cb85ed1c Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 26 Mar 2026 02:58:55 +0000 Subject: [PATCH 3/6] chore: Update generation configuration at Thu Mar 26 02:58:46 UTC 2026 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index c7fc233f8..289e70be5 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.68.0 -googleapis_commitish: 59d5f2b46924714af627ac29ea6de78641a00835 +googleapis_commitish: 1e1ca41d507f31b9ae307efbe002af864358214b libraries_bom_version: 26.78.0 libraries: - api_shortname: firestore From 078a5d754b8dab2063a36acd990ed17efdb95ae7 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 26 Mar 2026 03:01:51 +0000 Subject: [PATCH 4/6] chore: generate libraries at Thu Mar 26 02:59:18 UTC 2026 --- .../reflect-config.json | 63 +++++++++++++++++++ .../reflect-config.json | 63 +++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json b/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json index 212fd8e75..08826c726 100644 --- a/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json +++ b/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json @@ -1,4 +1,58 @@ [ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.ClientLibraryDestination", "queryAllDeclaredConstructors": true, @@ -116,6 +170,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.GoSettings", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json b/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json index 01d5baceb..307d5343f 100644 --- a/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json +++ b/google-cloud-firestore/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json @@ -1,4 +1,58 @@ [ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.ClientLibraryDestination", "queryAllDeclaredConstructors": true, @@ -116,6 +170,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.GoSettings", "queryAllDeclaredConstructors": true, From 775fe361af915369c2cd5378bc16502db69d474a Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 27 Mar 2026 02:58:54 +0000 Subject: [PATCH 5/6] chore: Update generation configuration at Fri Mar 27 02:58:48 UTC 2026 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 289e70be5..ee7b276af 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.68.0 -googleapis_commitish: 1e1ca41d507f31b9ae307efbe002af864358214b +googleapis_commitish: 77c78e90aeeb1c4612e9ab772c90bc40748a7a19 libraries_bom_version: 26.78.0 libraries: - api_shortname: firestore From 21b7fd5b220e83cf2447164929f8deea1c390624 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 27 Mar 2026 03:01:53 +0000 Subject: [PATCH 6/6] chore: generate libraries at Fri Mar 27 02:59:17 UTC 2026 --- .../com/google/firestore/admin/v1/Field.java | 493 +++++++++++++++++- .../admin/v1/FieldOperationMetadata.java | 349 ++++++++++++- .../google/firestore/admin/v1/FieldProto.java | 57 +- .../firestore/admin/v1/OperationProto.java | 64 +-- .../google/firestore/admin/v1/field.proto | 24 +- .../google/firestore/admin/v1/operation.proto | 5 + 6 files changed, 917 insertions(+), 75 deletions(-) diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java index 74cde456c..4bd13e9b0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java @@ -1561,6 +1561,70 @@ public interface TtlConfigOrBuilder * @return The state. */ com.google.firestore.admin.v1.Field.TtlConfig.State getState(); + + /** + * + * + *
+     * Optional. The offset, relative to the timestamp value from the
+     * TTL-enabled field, used to determine the document's expiration time.
+     *
+     * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+     * inclusive. Values more precise than seconds are rejected.
+     *
+     * If unset, defaults to 0, in which case the expiration time is the same
+     * as the timestamp value from the TTL-enabled field.
+     * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expirationOffset field is set. + */ + boolean hasExpirationOffset(); + + /** + * + * + *
+     * Optional. The offset, relative to the timestamp value from the
+     * TTL-enabled field, used to determine the document's expiration time.
+     *
+     * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+     * inclusive. Values more precise than seconds are rejected.
+     *
+     * If unset, defaults to 0, in which case the expiration time is the same
+     * as the timestamp value from the TTL-enabled field.
+     * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expirationOffset. + */ + com.google.protobuf.Duration getExpirationOffset(); + + /** + * + * + *
+     * Optional. The offset, relative to the timestamp value from the
+     * TTL-enabled field, used to determine the document's expiration time.
+     *
+     * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+     * inclusive. Values more precise than seconds are rejected.
+     *
+     * If unset, defaults to 0, in which case the expiration time is the same
+     * as the timestamp value from the TTL-enabled field.
+     * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder(); } /** @@ -1570,12 +1634,14 @@ public interface TtlConfigOrBuilder * The TTL (time-to-live) configuration for documents that have this `Field` * set. * - * Storing a timestamp value into a TTL-enabled field will be treated as - * the document's absolute expiration time. For Enterprise edition databases, - * the timestamp value may also be stored in an array value in the - * TTL-enabled field. + * A timestamp stored in a TTL-enabled field will be used to determine the + * expiration time of the document. The expiration time is the sum + * of the timestamp value and the `expiration_offset`. * - * Timestamp values in the past indicate that the document is eligible for + * For Enterprise edition databases, the timestamp value may alternatively be + * stored in an array value in the TTL-enabled field. + * + * An expiration time in the past indicates that the document is eligible for * immediate expiration. Using any other data type or leaving the field absent * will disable expiration for the individual document. * @@ -1828,6 +1894,7 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Field.TtlConfig.State) } + private int bitField0_; public static final int STATE_FIELD_NUMBER = 1; private int state_ = 0; @@ -1871,6 +1938,86 @@ public com.google.firestore.admin.v1.Field.TtlConfig.State getState() { : result; } + public static final int EXPIRATION_OFFSET_FIELD_NUMBER = 3; + private com.google.protobuf.Duration expirationOffset_; + + /** + * + * + *
+     * Optional. The offset, relative to the timestamp value from the
+     * TTL-enabled field, used to determine the document's expiration time.
+     *
+     * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+     * inclusive. Values more precise than seconds are rejected.
+     *
+     * If unset, defaults to 0, in which case the expiration time is the same
+     * as the timestamp value from the TTL-enabled field.
+     * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expirationOffset field is set. + */ + @java.lang.Override + public boolean hasExpirationOffset() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The offset, relative to the timestamp value from the
+     * TTL-enabled field, used to determine the document's expiration time.
+     *
+     * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+     * inclusive. Values more precise than seconds are rejected.
+     *
+     * If unset, defaults to 0, in which case the expiration time is the same
+     * as the timestamp value from the TTL-enabled field.
+     * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expirationOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getExpirationOffset() { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } + + /** + * + * + *
+     * Optional. The offset, relative to the timestamp value from the
+     * TTL-enabled field, used to determine the document's expiration time.
+     *
+     * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+     * inclusive. Values more precise than seconds are rejected.
+     *
+     * If unset, defaults to 0, in which case the expiration time is the same
+     * as the timestamp value from the TTL-enabled field.
+     * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder() { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1889,6 +2036,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.firestore.admin.v1.Field.TtlConfig.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(1, state_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getExpirationOffset()); + } getUnknownFields().writeTo(output); } @@ -1902,6 +2052,9 @@ public int getSerializedSize() { != com.google.firestore.admin.v1.Field.TtlConfig.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpirationOffset()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1919,6 +2072,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.firestore.admin.v1.Field.TtlConfig) obj; if (state_ != other.state_) return false; + if (hasExpirationOffset() != other.hasExpirationOffset()) return false; + if (hasExpirationOffset()) { + if (!getExpirationOffset().equals(other.getExpirationOffset())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1932,6 +2089,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; + if (hasExpirationOffset()) { + hash = (37 * hash) + EXPIRATION_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getExpirationOffset().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2040,12 +2201,14 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * The TTL (time-to-live) configuration for documents that have this `Field` * set. * - * Storing a timestamp value into a TTL-enabled field will be treated as - * the document's absolute expiration time. For Enterprise edition databases, - * the timestamp value may also be stored in an array value in the - * TTL-enabled field. + * A timestamp stored in a TTL-enabled field will be used to determine the + * expiration time of the document. The expiration time is the sum + * of the timestamp value and the `expiration_offset`. + * + * For Enterprise edition databases, the timestamp value may alternatively be + * stored in an array value in the TTL-enabled field. * - * Timestamp values in the past indicate that the document is eligible for + * An expiration time in the past indicates that the document is eligible for * immediate expiration. Using any other data type or leaving the field absent * will disable expiration for the individual document. * @@ -2072,10 +2235,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.firestore.admin.v1.Field.TtlConfig.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpirationOffsetFieldBuilder(); + } } @java.lang.Override @@ -2083,6 +2255,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; state_ = 0; + expirationOffset_ = null; + if (expirationOffsetBuilder_ != null) { + expirationOffsetBuilder_.dispose(); + expirationOffsetBuilder_ = null; + } return this; } @@ -2122,6 +2299,15 @@ private void buildPartial0(com.google.firestore.admin.v1.Field.TtlConfig result) if (((from_bitField0_ & 0x00000001) != 0)) { result.state_ = state_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.expirationOffset_ = + expirationOffsetBuilder_ == null + ? expirationOffset_ + : expirationOffsetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -2140,6 +2326,9 @@ public Builder mergeFrom(com.google.firestore.admin.v1.Field.TtlConfig other) { if (other.state_ != 0) { setStateValue(other.getStateValue()); } + if (other.hasExpirationOffset()) { + mergeExpirationOffset(other.getExpirationOffset()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2172,6 +2361,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 26: + { + input.readMessage( + internalGetExpirationOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2298,6 +2494,281 @@ public Builder clearState() { return this; } + private com.google.protobuf.Duration expirationOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + expirationOffsetBuilder_; + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expirationOffset field is set. + */ + public boolean hasExpirationOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expirationOffset. + */ + public com.google.protobuf.Duration getExpirationOffset() { + if (expirationOffsetBuilder_ == null) { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } else { + return expirationOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExpirationOffset(com.google.protobuf.Duration value) { + if (expirationOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationOffset_ = value; + } else { + expirationOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExpirationOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (expirationOffsetBuilder_ == null) { + expirationOffset_ = builderForValue.build(); + } else { + expirationOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExpirationOffset(com.google.protobuf.Duration value) { + if (expirationOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && expirationOffset_ != null + && expirationOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getExpirationOffsetBuilder().mergeFrom(value); + } else { + expirationOffset_ = value; + } + } else { + expirationOffsetBuilder_.mergeFrom(value); + } + if (expirationOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExpirationOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + expirationOffset_ = null; + if (expirationOffsetBuilder_ != null) { + expirationOffsetBuilder_.dispose(); + expirationOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getExpirationOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetExpirationOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder() { + if (expirationOffsetBuilder_ != null) { + return expirationOffsetBuilder_.getMessageOrBuilder(); + } else { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } + } + + /** + * + * + *
+       * Optional. The offset, relative to the timestamp value from the
+       * TTL-enabled field, used to determine the document's expiration time.
+       *
+       * `expiration_offset.seconds` must be between 0 and 2,147,483,647
+       * inclusive. Values more precise than seconds are rejected.
+       *
+       * If unset, defaults to 0, in which case the expiration time is the same
+       * as the timestamp value from the TTL-enabled field.
+       * 
+ * + * + * .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetExpirationOffsetFieldBuilder() { + if (expirationOffsetBuilder_ == null) { + expirationOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExpirationOffset(), getParentForChildren(), isClean()); + expirationOffset_ = null; + } + return expirationOffsetBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Field.TtlConfig) } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java index 3212dd418..0242d2c5a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java @@ -1225,6 +1225,46 @@ public interface TtlConfigDeltaOrBuilder * @return The changeType. */ com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType getChangeType(); + + /** + * + * + *
+     * The offset, relative to the timestamp value in the TTL-enabled field,
+     * used determine the document's expiration time.
+     * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + * + * @return Whether the expirationOffset field is set. + */ + boolean hasExpirationOffset(); + + /** + * + * + *
+     * The offset, relative to the timestamp value in the TTL-enabled field,
+     * used determine the document's expiration time.
+     * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + * + * @return The expirationOffset. + */ + com.google.protobuf.Duration getExpirationOffset(); + + /** + * + * + *
+     * The offset, relative to the timestamp value in the TTL-enabled field,
+     * used determine the document's expiration time.
+     * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder(); } /** @@ -1448,6 +1488,7 @@ private ChangeType(int value) { // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType) } + private int bitField0_; public static final int CHANGE_TYPE_FIELD_NUMBER = 1; private int changeType_ = 0; @@ -1494,6 +1535,62 @@ public int getChangeTypeValue() { : result; } + public static final int EXPIRATION_OFFSET_FIELD_NUMBER = 3; + private com.google.protobuf.Duration expirationOffset_; + + /** + * + * + *
+     * The offset, relative to the timestamp value in the TTL-enabled field,
+     * used determine the document's expiration time.
+     * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + * + * @return Whether the expirationOffset field is set. + */ + @java.lang.Override + public boolean hasExpirationOffset() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The offset, relative to the timestamp value in the TTL-enabled field,
+     * used determine the document's expiration time.
+     * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + * + * @return The expirationOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getExpirationOffset() { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } + + /** + * + * + *
+     * The offset, relative to the timestamp value in the TTL-enabled field,
+     * used determine the document's expiration time.
+     * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder() { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1514,6 +1611,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, changeType_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getExpirationOffset()); + } getUnknownFields().writeTo(output); } @@ -1529,6 +1629,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, changeType_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpirationOffset()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1546,6 +1649,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta) obj; if (changeType_ != other.changeType_) return false; + if (hasExpirationOffset() != other.hasExpirationOffset()) return false; + if (hasExpirationOffset()) { + if (!getExpirationOffset().equals(other.getExpirationOffset())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1559,6 +1666,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CHANGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + changeType_; + if (hasExpirationOffset()) { + hash = (37 * hash) + EXPIRATION_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getExpirationOffset().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1692,10 +1803,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpirationOffsetFieldBuilder(); + } } @java.lang.Override @@ -1703,6 +1823,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; changeType_ = 0; + expirationOffset_ = null; + if (expirationOffsetBuilder_ != null) { + expirationOffsetBuilder_.dispose(); + expirationOffsetBuilder_ = null; + } return this; } @@ -1745,6 +1870,15 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000001) != 0)) { result.changeType_ = changeType_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.expirationOffset_ = + expirationOffsetBuilder_ == null + ? expirationOffset_ + : expirationOffsetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1766,6 +1900,9 @@ public Builder mergeFrom( if (other.changeType_ != 0) { setChangeTypeValue(other.getChangeTypeValue()); } + if (other.hasExpirationOffset()) { + mergeExpirationOffset(other.getExpirationOffset()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1798,6 +1935,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 26: + { + input.readMessage( + internalGetExpirationOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1928,6 +2072,209 @@ public Builder clearChangeType() { return this; } + private com.google.protobuf.Duration expirationOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + expirationOffsetBuilder_; + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + * + * @return Whether the expirationOffset field is set. + */ + public boolean hasExpirationOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + * + * @return The expirationOffset. + */ + public com.google.protobuf.Duration getExpirationOffset() { + if (expirationOffsetBuilder_ == null) { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } else { + return expirationOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + public Builder setExpirationOffset(com.google.protobuf.Duration value) { + if (expirationOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationOffset_ = value; + } else { + expirationOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + public Builder setExpirationOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (expirationOffsetBuilder_ == null) { + expirationOffset_ = builderForValue.build(); + } else { + expirationOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + public Builder mergeExpirationOffset(com.google.protobuf.Duration value) { + if (expirationOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && expirationOffset_ != null + && expirationOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getExpirationOffsetBuilder().mergeFrom(value); + } else { + expirationOffset_ = value; + } + } else { + expirationOffsetBuilder_.mergeFrom(value); + } + if (expirationOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + public Builder clearExpirationOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + expirationOffset_ = null; + if (expirationOffsetBuilder_ != null) { + expirationOffsetBuilder_.dispose(); + expirationOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + public com.google.protobuf.Duration.Builder getExpirationOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetExpirationOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + public com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder() { + if (expirationOffsetBuilder_ != null) { + return expirationOffsetBuilder_.getMessageOrBuilder(); + } else { + return expirationOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expirationOffset_; + } + } + + /** + * + * + *
+       * The offset, relative to the timestamp value in the TTL-enabled field,
+       * used determine the document's expiration time.
+       * 
+ * + * .google.protobuf.Duration expiration_offset = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetExpirationOffsetFieldBuilder() { + if (expirationOffsetBuilder_ == null) { + expirationOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExpirationOffset(), getParentForChildren(), isClean()); + expirationOffset_ = null; + } + return expirationOffsetBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta) } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java index a7b3dcd7a..f40b558ce 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldProto.java @@ -61,36 +61,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "%google/firestore/admin/v1/field.proto\022" + "\n%google/firestore/admin/v1/field.proto\022" + "\031google.firestore.admin.v1\032\037google/api/f" + "ield_behavior.proto\032\031google/api/resource" - + ".proto\032%google/firestore/admin/v1/index.proto\"\305\004\n" - + "\005Field\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022B\n" - + "\014index_config\030\002" - + " \001(\0132,.google.firestore.admin.v1.Field.IndexConfig\022>\n\n" - + "ttl_config\030\003 \001(\0132*.google.firestore.admin.v1.Field.TtlConfig\032\211\001\n" - + "\013IndexConfig\0221\n" - + "\007indexes\030\001 \003(\0132 .google.firestore.admin.v1.Index\022\034\n" - + "\024uses_ancestor_config\030\002 \001(\010\022\026\n" - + "\016ancestor_field\030\003 \001(\t\022\021\n" - + "\treverting\030\004 \001(\010\032\235\001\n" - + "\tTtlConfig\022D\n" - + "\005state\030\001" - + " \001(\01620.google.firestore.admin.v1.Field.TtlConfig.StateB\003\340A\003\"J\n" - + "\005State\022\025\n" - + "\021STATE_UNSPECIFIED\020\000\022\014\n" - + "\010CREATING\020\001\022\n\n" - + "\006ACTIVE\020\002\022\020\n" - + "\014NEEDS_REPAIR\020\003:y\352Av\n" - + "\036firestore.googleapis.com/Field\022Tprojects/{proje" - + "ct}/databases/{database}/collectionGroups/{collection}/fields/{field}B\331\001\n" - + "\035com.google.firestore.admin.v1B\n" - + "FieldProtoP\001Z9cloud.google.com/go/firestore/apiv1/admin" - + "/adminpb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.F" - + "irestore.Admin.V1\312\002\037Google\\Cloud\\Firesto" - + "re\\Admin\\V1\352\002#Google::Cloud::Firestore::Admin::V1b\006proto3" + + ".proto\032%google/firestore/admin/v1/index." + + "proto\032\036google/protobuf/duration.proto\"\200\005" + + "\n\005Field\022\021\n\004name\030\001 \001(\tB\003\340A\002\022B\n\014index_conf" + + "ig\030\002 \001(\0132,.google.firestore.admin.v1.Fie" + + "ld.IndexConfig\022>\n\nttl_config\030\003 \001(\0132*.goo" + + "gle.firestore.admin.v1.Field.TtlConfig\032\211" + + "\001\n\013IndexConfig\0221\n\007indexes\030\001 \003(\0132 .google" + + ".firestore.admin.v1.Index\022\034\n\024uses_ancest" + + "or_config\030\002 \001(\010\022\026\n\016ancestor_field\030\003 \001(\t\022" + + "\021\n\treverting\030\004 \001(\010\032\330\001\n\tTtlConfig\022D\n\005stat" + + "e\030\001 \001(\01620.google.firestore.admin.v1.Fiel" + + "d.TtlConfig.StateB\003\340A\003\0229\n\021expiration_off" + + "set\030\003 \001(\0132\031.google.protobuf.DurationB\003\340A" + + "\001\"J\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE" + + "ATING\020\001\022\n\n\006ACTIVE\020\002\022\020\n\014NEEDS_REPAIR\020\003:y\352" + + "Av\n\036firestore.googleapis.com/Field\022Tproj" + + "ects/{project}/databases/{database}/coll" + + "ectionGroups/{collection}/fields/{field}" + + "B\331\001\n\035com.google.firestore.admin.v1B\nFiel" + + "dProtoP\001Z9cloud.google.com/go/firestore/" + + "apiv1/admin/adminpb;adminpb\242\002\004GCFS\252\002\037Goo" + + "gle.Cloud.Firestore.Admin.V1\312\002\037Google\\Cl" + + "oud\\Firestore\\Admin\\V1\352\002#Google::Cloud::" + + "Firestore::Admin::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -99,6 +96,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.firestore.admin.v1.IndexProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), }); internal_static_google_firestore_admin_v1_Field_descriptor = getDescriptor().getMessageType(0); internal_static_google_firestore_admin_v1_Field_fieldAccessorTable = @@ -121,12 +119,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_firestore_admin_v1_Field_TtlConfig_descriptor, new java.lang.String[] { - "State", + "State", "ExpirationOffset", }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.firestore.admin.v1.IndexProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java index 99fd03f31..7edde73bf 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java @@ -97,36 +97,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ")google/firestore/admin/v1/operation.pr" + "oto\022\031google.firestore.admin.v1\032\031google/a" + "pi/resource.proto\032%google/firestore/admin/v1/index.proto\032(google/firestore/admin" - + "/v1/snapshot.proto\032\037google/protobuf/timestamp.proto\"\275\002\n" + + "/v1/snapshot.proto\032\036google/protobuf/dura" + + "tion.proto\032\037google/protobuf/timestamp.proto\"\275\002\n" + "\026IndexOperationMetadata\022.\n\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\r\n" + "\005index\030\003 \001(\t\0228\n" + "\005state\030\004 \001(\0162).google.firestore.admin.v1.OperationState\022?\n" + "\022progress_documents\030\005 \001(\0132#.google.firestore.admin.v1.Progress\022;\n" - + "\016progress_bytes\030\006 \001(\0132#.google.firestore.admin.v1.Progress\"\231\007\n" + + "\016progress_bytes\030\006 \001(\0132#.google.firestore.admin.v1.Progress\"\317\007\n" + "\026FieldOperationMetadata\022.\n\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\r\n" + "\005field\030\003 \001(\t\022_\n" - + "\023index_config_deltas\030\004 \003(\0132B.google.firestore.admi" - + "n.v1.FieldOperationMetadata.IndexConfigDelta\0228\n" + + "\023index_config_deltas\030\004" + + " \003(\0132B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\0228\n" + "\005state\030\005 \001(\0162).google.firestore.admin.v1.OperationState\022?\n" + "\022progress_documents\030\006 \001(\0132#.google.firestore.admin.v1.Progress\022;\n" + "\016progress_bytes\030\007 \001(\0132#.google.firestore.admin.v1.Progress\022Z\n" - + "\020ttl_config_delta\030\010 \001(\0132@.google.firestore.admin." - + "v1.FieldOperationMetadata.TtlConfigDelta\032\347\001\n" + + "\020ttl_config_delta\030\010" + + " \001(\0132@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\032\347\001\n" + "\020IndexConfigDelta\022b\n" - + "\013change_type\030\001 \001(\0162M.google.firestore.admin.v1.FieldOper" - + "ationMetadata.IndexConfigDelta.ChangeType\022/\n" + + "\013change_type\030\001 \001(\0162M.goo" + + "gle.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\022/\n" + "\005index\030\002 \001(\0132 .google.firestore.admin.v1.Index\">\n\n" + "ChangeType\022\033\n" + "\027CHANGE_TYPE_UNSPECIFIED\020\000\022\007\n" + "\003ADD\020\001\022\n\n" - + "\006REMOVE\020\002\032\262\001\n" + + "\006REMOVE\020\002\032\350\001\n" + "\016TtlConfigDelta\022`\n" - + "\013change_type\030\001 \001(\0162K.goo" - + "gle.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\n" + + "\013change_type\030\001 \001(\0162K.google.fire" + + "store.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\0224\n" + + "\021expiration_offset\030\003 \001(\0132\031.google.protobuf.Duration\">\n" + + "\n" + "ChangeType\022\033\n" + "\027CHANGE_TYPE_UNSPECIFIED\020\000\022\007\n" + "\003ADD\020\001\022\n\n" @@ -134,8 +137,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027ExportDocumentsMetadata\022.\n\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022B\n" - + "\017operation_state\030\003 \001" - + "(\0162).google.firestore.admin.v1.OperationState\022?\n" + + "\017operation_state\030\003" + + " \001(\0162).google.firestore.admin.v1.OperationState\022?\n" + "\022progress_documents\030\004 \001(\0132#.google.firestore.admin.v1.Progress\022;\n" + "\016progress_bytes\030\005 \001(\0132#.google.firestore.admin.v1.Progress\022\026\n" + "\016collection_ids\030\006 \003(\t\022\031\n" @@ -145,19 +148,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027ImportDocumentsMetadata\022.\n\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022B\n" - + "\017operation_state\030\003 " - + "\001(\0162).google.firestore.admin.v1.OperationState\022?\n" + + "\017operation_state\030\003" + + " \001(\0162).google.firestore.admin.v1.OperationState\022?\n" + "\022progress_documents\030\004 \001(\0132#.google.firestore.admin.v1.Progress\022;\n" + "\016progress_bytes\030\005 \001(\0132#.google.firestore.admin.v1.Progress\022\026\n" + "\016collection_ids\030\006 \003(\t\022\030\n" + "\020input_uri_prefix\030\007 \001(\t\022\025\n\r" + "namespace_ids\030\010 \003(\t\"\237\003\n" - + "\033BulkDeleteDocumentsMetadata\022.\n" - + "\n" + + "\033BulkDeleteDocumentsMetadata\022.\n\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022B\n" - + "\017operation_state\030\003 \001(\0162).g" - + "oogle.firestore.admin.v1.OperationState\022?\n" + + "\017operation_state\030\003 \001" + + "(\0162).google.firestore.admin.v1.OperationState\022?\n" + "\022progress_documents\030\004 \001(\0132#.google.firestore.admin.v1.Progress\022;\n" + "\016progress_bytes\030\005 \001(\0132#.google.firestore.admin.v1.Progress\022\026\n" + "\016collection_ids\030\006 \003(\t\022\025\n\r" @@ -176,11 +178,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037firestore.googleapis.com/Backup\022@\n" + "\023progress_percentage\030\010" + " \001(\0132#.google.firestore.admin.v1.Progress\"\365\002\n" - + "\025CloneDatabaseMetadata\022.\n\n" + + "\025CloneDatabaseMetadata\022.\n" + + "\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022B\n" - + "\017operation_state\030\003" - + " \001(\0162).google.firestore.admin.v1.OperationState\0228\n" + + "\017operation_state\030\003 \001(\0162).g" + + "oogle.firestore.admin.v1.OperationState\0228\n" + "\010database\030\004 \001(\tB&\372A#\n" + "!firestore.googleapis.com/Database\022>\n\r" + "pitr_snapshot\030\007 \001(\0132\'.google.firestore.admin.v1.PitrSnapshot\022@\n" @@ -190,18 +193,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016completed_work\030\002 \001(\003*\236\001\n" + "\016OperationState\022\037\n" + "\033OPERATION_STATE_UNSPECIFIED\020\000\022\020\n" - + "\014INITIALIZING\020\001\022\016\n\n" + + "\014INITIALIZING\020\001\022\016\n" + + "\n" + "PROCESSING\020\002\022\016\n\n" + "CANCELLING\020\003\022\016\n\n" + "FINALIZING\020\004\022\016\n\n" + "SUCCESSFUL\020\005\022\n\n" + "\006FAILED\020\006\022\r\n" + "\tCANCELLED\020\007B\335\001\n" - + "\035com.google.firestore.admin.v1B\016OperationProtoP\001Z9cloud.google.com/go/fire" - + "store/apiv1/admin/adminpb;adminpb\242\002\004GCFS" - + "\252\002\037Google.Cloud.Firestore.Admin.V1\312\002\037Goo" - + "gle\\Cloud\\Firestore\\Admin\\V1\352\002#Google::C" - + "loud::Firestore::Admin::V1b\006proto3" + + "\035com.google.firestore.admin.v1B\016OperationProtoP\001Z9cloud.google.com/g" + + "o/firestore/apiv1/admin/adminpb;adminpb\242" + + "\002\004GCFS\252\002\037Google.Cloud.Firestore.Admin.V1" + + "\312\002\037Google\\Cloud\\Firestore\\Admin\\V1\352\002#Goo" + + "gle::Cloud::Firestore::Admin::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -210,6 +214,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.firestore.admin.v1.IndexProto.getDescriptor(), com.google.firestore.admin.v1.PitrSnapshotProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_firestore_admin_v1_IndexOperationMetadata_descriptor = @@ -251,7 +256,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_firestore_admin_v1_FieldOperationMetadata_TtlConfigDelta_descriptor, new java.lang.String[] { - "ChangeType", + "ChangeType", "ExpirationOffset", }); internal_static_google_firestore_admin_v1_ExportDocumentsMetadata_descriptor = getDescriptor().getMessageType(2); @@ -340,6 +345,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.firestore.admin.v1.IndexProto.getDescriptor(); com.google.firestore.admin.v1.PitrSnapshotProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto index cdd1c859e..239d791c0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto @@ -19,6 +19,7 @@ package google.firestore.admin.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/firestore/admin/v1/index.proto"; +import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; option go_package = "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb"; @@ -66,12 +67,14 @@ message Field { // The TTL (time-to-live) configuration for documents that have this `Field` // set. // - // Storing a timestamp value into a TTL-enabled field will be treated as - // the document's absolute expiration time. For Enterprise edition databases, - // the timestamp value may also be stored in an array value in the - // TTL-enabled field. + // A timestamp stored in a TTL-enabled field will be used to determine the + // expiration time of the document. The expiration time is the sum + // of the timestamp value and the `expiration_offset`. // - // Timestamp values in the past indicate that the document is eligible for + // For Enterprise edition databases, the timestamp value may alternatively be + // stored in an array value in the TTL-enabled field. + // + // An expiration time in the past indicates that the document is eligible for // immediate expiration. Using any other data type or leaving the field absent // will disable expiration for the individual document. message TtlConfig { @@ -99,6 +102,17 @@ message Field { // Output only. The state of the TTL configuration. State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The offset, relative to the timestamp value from the + // TTL-enabled field, used to determine the document's expiration time. + // + // `expiration_offset.seconds` must be between 0 and 2,147,483,647 + // inclusive. Values more precise than seconds are rejected. + // + // If unset, defaults to 0, in which case the expiration time is the same + // as the timestamp value from the TTL-enabled field. + google.protobuf.Duration expiration_offset = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Required. A field name of the form: diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto index eefc3e338..3d22fdf4a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto @@ -19,6 +19,7 @@ package google.firestore.admin.v1; import "google/api/resource.proto"; import "google/firestore/admin/v1/index.proto"; import "google/firestore/admin/v1/snapshot.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Firestore.Admin.V1"; @@ -96,6 +97,10 @@ message FieldOperationMetadata { // Specifies how the TTL configuration is changing. ChangeType change_type = 1; + + // The offset, relative to the timestamp value in the TTL-enabled field, + // used determine the document's expiration time. + google.protobuf.Duration expiration_offset = 3; } // The time this operation started.