diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index db1099bec..6167135e9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:084ad4c60551b075846bcb2405ec1c14b0d00ec1eb5503d4dd0d2a92cdc2d3e2 -# created: 2024-03-15T14:33:32.257974519Z + digest: sha256:81c3ec554428c8ff6c92f0d58668b7ef52265d053a82284c97a326745e786949 +# created: 2024-03-27T17:59:25.436353226Z diff --git a/CHANGELOG.md b/CHANGELOG.md index 68581690d..9497564bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.128.0](https://github.com/googleapis/java-pubsub/compare/v1.127.3...v1.128.0) (2024-04-03) + + +### Features + +* Add custom datetime format for Cloud Storage subscriptions ([#1970](https://github.com/googleapis/java-pubsub/issues/1970)) ([7113f06](https://github.com/googleapis/java-pubsub/commit/7113f065973bb8b56ab811e0589ffb7975873679)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.38.2 ([#1965](https://github.com/googleapis/java-pubsub/issues/1965)) ([ec3b386](https://github.com/googleapis/java-pubsub/commit/ec3b38665ddc6336f975d597d27c4aa25732c474)) +* Update dependency com.google.cloud:google-cloud-storage to v2.36.1 ([#1968](https://github.com/googleapis/java-pubsub/issues/1968)) ([524109c](https://github.com/googleapis/java-pubsub/commit/524109c1afc5118c79fd97769e194a1325322107)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.26.1 ([#1972](https://github.com/googleapis/java-pubsub/issues/1972)) ([53c1120](https://github.com/googleapis/java-pubsub/commit/53c112033dc721cf91aceddfc1eeb3c6daddb45e)) + + +### Documentation + +* Add Kinesis ingestion samples ([#1947](https://github.com/googleapis/java-pubsub/issues/1947)) ([5b5c14b](https://github.com/googleapis/java-pubsub/commit/5b5c14ba31636c037c2b8d6a166bd48670e23688)) + ## [1.127.3](https://github.com/googleapis/java-pubsub/compare/v1.127.2...v1.127.3) (2024-03-20) diff --git a/README.md b/README.md index 9dbc0de33..069947cbf 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.127.2 + 1.127.3 ``` @@ -52,20 +52,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.34.0') +implementation platform('com.google.cloud:libraries-bom:26.36.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-pubsub:1.127.2' +implementation 'com.google.cloud:google-cloud-pubsub:1.127.3' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.127.2" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.127.3" ``` @@ -257,6 +257,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | Create Subscription With Filtering | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithFiltering.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithFiltering.java) | | Create Subscription With Ordering | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithOrdering.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithOrdering.java) | | Create Topic Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicExample.java) | +| Create Topic With Kinesis Ingestion Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java) | | Create Topic With Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaExample.java) | | Create Topic With Schema Revisions Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaRevisionsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaRevisionsExample.java) | | Create Unwrapped Push Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java) | @@ -307,6 +308,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | Update Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java) | | Update Push Configuration Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/UpdatePushConfigurationExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UpdatePushConfigurationExample.java) | | Update Topic Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/UpdateTopicSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UpdateTopicSchemaExample.java) | +| Update Topic Type Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/UpdateTopicTypeExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UpdateTopicTypeExample.java) | | Use Pub Sub Emulator Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/UsePubSubEmulatorExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UsePubSubEmulatorExample.java) | | State | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/utilities/State.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/utilities/State.java) | | State Proto | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/utilities/StateProto.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/utilities/StateProto.java) | @@ -409,7 +411,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.127.2 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.127.3 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 33edff3a9..ee13a6f05 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.127.3 + 1.128.0 pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.127.3 + 1.128.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.109.3 + 1.110.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.109.3 + 1.110.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index d7cf97351..f1c57e859 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.127.3 + 1.128.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.127.3 + 1.128.0 google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 1805c4e14..99490c619 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.109.3 + 1.110.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.127.3 + 1.128.0 diff --git a/pom.xml b/pom.xml index 215476329..9c10f67c6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.127.3 + 1.128.0 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.109.3 + 1.110.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.109.3 + 1.110.0 com.google.cloud google-cloud-pubsub - 1.127.3 + 1.128.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index 9a79ebaff..3b1dc1da2 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.109.3 + 1.110.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.127.3 + 1.128.0 diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java index def2b0461..1d1cbaf18 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java @@ -42,6 +42,7 @@ private CloudStorageConfig() { bucket_ = ""; filenamePrefix_ = ""; filenameSuffix_ = ""; + filenameDatetimeFormat_ = ""; state_ = 0; } @@ -1478,6 +1479,61 @@ public com.google.protobuf.ByteString getFilenameSuffixBytes() { } } + public static final int FILENAME_DATETIME_FORMAT_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object filenameDatetimeFormat_ = ""; + /** + * + * + *
+   * Optional. User-provided format string specifying how to represent datetimes
+   * in Cloud Storage filenames. See the [datetime format
+   * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+   * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filenameDatetimeFormat. + */ + @java.lang.Override + public java.lang.String getFilenameDatetimeFormat() { + java.lang.Object ref = filenameDatetimeFormat_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filenameDatetimeFormat_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-provided format string specifying how to represent datetimes
+   * in Cloud Storage filenames. See the [datetime format
+   * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+   * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filenameDatetimeFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilenameDatetimeFormatBytes() { + java.lang.Object ref = filenameDatetimeFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filenameDatetimeFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int TEXT_CONFIG_FIELD_NUMBER = 4; /** * @@ -1752,6 +1808,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (state_ != com.google.pubsub.v1.CloudStorageConfig.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(9, state_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameDatetimeFormat_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, filenameDatetimeFormat_); + } getUnknownFields().writeTo(output); } @@ -1789,6 +1848,9 @@ public int getSerializedSize() { if (state_ != com.google.pubsub.v1.CloudStorageConfig.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameDatetimeFormat_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, filenameDatetimeFormat_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1807,6 +1869,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBucket().equals(other.getBucket())) return false; if (!getFilenamePrefix().equals(other.getFilenamePrefix())) return false; if (!getFilenameSuffix().equals(other.getFilenameSuffix())) return false; + if (!getFilenameDatetimeFormat().equals(other.getFilenameDatetimeFormat())) return false; if (hasMaxDuration() != other.hasMaxDuration()) return false; if (hasMaxDuration()) { if (!getMaxDuration().equals(other.getMaxDuration())) return false; @@ -1841,6 +1904,8 @@ public int hashCode() { hash = (53 * hash) + getFilenamePrefix().hashCode(); hash = (37 * hash) + FILENAME_SUFFIX_FIELD_NUMBER; hash = (53 * hash) + getFilenameSuffix().hashCode(); + hash = (37 * hash) + FILENAME_DATETIME_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFilenameDatetimeFormat().hashCode(); if (hasMaxDuration()) { hash = (37 * hash) + MAX_DURATION_FIELD_NUMBER; hash = (53 * hash) + getMaxDuration().hashCode(); @@ -2012,6 +2077,7 @@ public Builder clear() { bucket_ = ""; filenamePrefix_ = ""; filenameSuffix_ = ""; + filenameDatetimeFormat_ = ""; if (textConfigBuilder_ != null) { textConfigBuilder_.clear(); } @@ -2073,16 +2139,19 @@ private void buildPartial0(com.google.pubsub.v1.CloudStorageConfig result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.filenameSuffix_ = filenameSuffix_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filenameDatetimeFormat_ = filenameDatetimeFormat_; + } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.maxDuration_ = maxDurationBuilder_ == null ? maxDuration_ : maxDurationBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.maxBytes_ = maxBytes_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.state_ = state_; } result.bitField0_ |= to_bitField0_; @@ -2159,6 +2228,11 @@ public Builder mergeFrom(com.google.pubsub.v1.CloudStorageConfig other) { bitField0_ |= 0x00000004; onChanged(); } + if (!other.getFilenameDatetimeFormat().isEmpty()) { + filenameDatetimeFormat_ = other.filenameDatetimeFormat_; + bitField0_ |= 0x00000008; + onChanged(); + } if (other.hasMaxDuration()) { mergeMaxDuration(other.getMaxDuration()); } @@ -2243,21 +2317,27 @@ public Builder mergeFrom( case 50: { input.readMessage(getMaxDurationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 50 case 56: { maxBytes_ = input.readInt64(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 56 case 72: { state_ = input.readEnum(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 72 + case 82: + { + filenameDatetimeFormat_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2639,6 +2719,122 @@ public Builder setFilenameSuffixBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filenameDatetimeFormat_ = ""; + /** + * + * + *
+     * Optional. User-provided format string specifying how to represent datetimes
+     * in Cloud Storage filenames. See the [datetime format
+     * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+     * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filenameDatetimeFormat. + */ + public java.lang.String getFilenameDatetimeFormat() { + java.lang.Object ref = filenameDatetimeFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filenameDatetimeFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-provided format string specifying how to represent datetimes
+     * in Cloud Storage filenames. See the [datetime format
+     * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+     * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filenameDatetimeFormat. + */ + public com.google.protobuf.ByteString getFilenameDatetimeFormatBytes() { + java.lang.Object ref = filenameDatetimeFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filenameDatetimeFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-provided format string specifying how to represent datetimes
+     * in Cloud Storage filenames. See the [datetime format
+     * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+     * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filenameDatetimeFormat to set. + * @return This builder for chaining. + */ + public Builder setFilenameDatetimeFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filenameDatetimeFormat_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided format string specifying how to represent datetimes
+     * in Cloud Storage filenames. See the [datetime format
+     * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+     * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilenameDatetimeFormat() { + filenameDatetimeFormat_ = getDefaultInstance().getFilenameDatetimeFormat(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided format string specifying how to represent datetimes
+     * in Cloud Storage filenames. See the [datetime format
+     * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+     * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filenameDatetimeFormat to set. + * @return This builder for chaining. + */ + public Builder setFilenameDatetimeFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filenameDatetimeFormat_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.pubsub.v1.CloudStorageConfig.TextConfig, com.google.pubsub.v1.CloudStorageConfig.TextConfig.Builder, @@ -3134,7 +3330,7 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig * @return Whether the maxDuration field is set. */ public boolean hasMaxDuration() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -3180,7 +3376,7 @@ public Builder setMaxDuration(com.google.protobuf.Duration value) { } else { maxDurationBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3202,7 +3398,7 @@ public Builder setMaxDuration(com.google.protobuf.Duration.Builder builderForVal } else { maxDurationBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3220,7 +3416,7 @@ public Builder setMaxDuration(com.google.protobuf.Duration.Builder builderForVal */ public Builder mergeMaxDuration(com.google.protobuf.Duration value) { if (maxDurationBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && maxDuration_ != null && maxDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getMaxDurationBuilder().mergeFrom(value); @@ -3231,7 +3427,7 @@ public Builder mergeMaxDuration(com.google.protobuf.Duration value) { maxDurationBuilder_.mergeFrom(value); } if (maxDuration_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -3249,7 +3445,7 @@ public Builder mergeMaxDuration(com.google.protobuf.Duration value) { * */ public Builder clearMaxDuration() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); maxDuration_ = null; if (maxDurationBuilder_ != null) { maxDurationBuilder_.dispose(); @@ -3271,7 +3467,7 @@ public Builder clearMaxDuration() { * */ public com.google.protobuf.Duration.Builder getMaxDurationBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getMaxDurationFieldBuilder().getBuilder(); } @@ -3360,7 +3556,7 @@ public long getMaxBytes() { public Builder setMaxBytes(long value) { maxBytes_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3378,7 +3574,7 @@ public Builder setMaxBytes(long value) { * @return This builder for chaining. */ public Builder clearMaxBytes() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); maxBytes_ = 0L; onChanged(); return this; @@ -3420,7 +3616,7 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3463,7 +3659,7 @@ public Builder setState(com.google.pubsub.v1.CloudStorageConfig.State value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; state_ = value.getNumber(); onChanged(); return this; @@ -3483,7 +3679,7 @@ public Builder setState(com.google.pubsub.v1.CloudStorageConfig.State value) { * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); state_ = 0; onChanged(); return this; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java index 8b561caf3..d643ff50a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java @@ -111,6 +111,35 @@ public interface CloudStorageConfigOrBuilder */ com.google.protobuf.ByteString getFilenameSuffixBytes(); + /** + * + * + *
+   * Optional. User-provided format string specifying how to represent datetimes
+   * in Cloud Storage filenames. See the [datetime format
+   * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+   * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filenameDatetimeFormat. + */ + java.lang.String getFilenameDatetimeFormat(); + /** + * + * + *
+   * Optional. User-provided format string specifying how to represent datetimes
+   * in Cloud Storage filenames. See the [datetime format
+   * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
+   * 
+ * + * string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filenameDatetimeFormat. + */ + com.google.protobuf.ByteString getFilenameDatetimeFormatBytes(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java index 1e2f25b46..ec2faf3c1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java @@ -310,7 +310,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * *
        * Permission denied encountered while publishing to the topic. This can
-       * happen due to Pub/Sub SA has not been granted the [appropriate publish
+       * happen if the Pub/Sub SA has not been granted the [appropriate publish
        * permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
        * 
* @@ -383,7 +383,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * *
        * Permission denied encountered while publishing to the topic. This can
-       * happen due to Pub/Sub SA has not been granted the [appropriate publish
+       * happen if the Pub/Sub SA has not been granted the [appropriate publish
        * permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
        * 
* diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 687428395..84afba3bf 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -426,229 +426,230 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006 \001(\010B\003\340A\001\"\212\001\n\005State\022\025\n\021STATE_UNSPECIFIE" + "D\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r" + "\n\tNOT_FOUND\020\003\022\023\n\017SCHEMA_MISMATCH\020\004\022#\n\037IN" - + "_TRANSIT_LOCATION_RESTRICTION\020\005\"\316\004\n\022Clou" + + "_TRANSIT_LOCATION_RESTRICTION\020\005\"\365\004\n\022Clou" + "dStorageConfig\022\023\n\006bucket\030\001 \001(\tB\003\340A\002\022\034\n\017f" + "ilename_prefix\030\002 \001(\tB\003\340A\001\022\034\n\017filename_su" - + "ffix\030\003 \001(\tB\003\340A\001\022K\n\013text_config\030\004 \001(\0132/.g" - + "oogle.pubsub.v1.CloudStorageConfig.TextC" - + "onfigB\003\340A\001H\000\022K\n\013avro_config\030\005 \001(\0132/.goog" - + "le.pubsub.v1.CloudStorageConfig.AvroConf" - + "igB\003\340A\001H\000\0224\n\014max_duration\030\006 \001(\0132\031.google" - + ".protobuf.DurationB\003\340A\001\022\026\n\tmax_bytes\030\007 \001" - + "(\003B\003\340A\001\022>\n\005state\030\t \001(\0162*.google.pubsub.v" - + "1.CloudStorageConfig.StateB\003\340A\003\032\014\n\nTextC" - + "onfig\032)\n\nAvroConfig\022\033\n\016write_metadata\030\001 " - + "\001(\010B\003\340A\001\"u\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000" - + "\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r\n\tN" - + "OT_FOUND\020\003\022#\n\037IN_TRANSIT_LOCATION_RESTRI" - + "CTION\020\004B\017\n\routput_format\"|\n\017ReceivedMess" - + "age\022\023\n\006ack_id\030\001 \001(\tB\003\340A\001\0225\n\007message\030\002 \001(" - + "\0132\037.google.pubsub.v1.PubsubMessageB\003\340A\001\022" - + "\035\n\020delivery_attempt\030\003 \001(\005B\003\340A\001\"Z\n\026GetSub" - + "scriptionRequest\022@\n\014subscription\030\001 \001(\tB*" - + "\340A\002\372A$\n\"pubsub.googleapis.com/Subscripti" - + "on\"\214\001\n\031UpdateSubscriptionRequest\0229\n\014subs" - + "cription\030\001 \001(\0132\036.google.pubsub.v1.Subscr" - + "iptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.googl" - + "e.protobuf.FieldMaskB\003\340A\002\"\221\001\n\030ListSubscr" - + "iptionsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n" - + "+cloudresourcemanager.googleapis.com/Pro" - + "ject\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_tok" - + "en\030\003 \001(\tB\003\340A\001\"u\n\031ListSubscriptionsRespon" - + "se\022:\n\rsubscriptions\030\001 \003(\0132\036.google.pubsu" - + "b.v1.SubscriptionB\003\340A\001\022\034\n\017next_page_toke" - + "n\030\002 \001(\tB\003\340A\001\"]\n\031DeleteSubscriptionReques" - + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." - + "googleapis.com/Subscription\"\223\001\n\027ModifyPu" - + "shConfigRequest\022@\n\014subscription\030\001 \001(\tB*\340" + + "ffix\030\003 \001(\tB\003\340A\001\022%\n\030filename_datetime_for" + + "mat\030\n \001(\tB\003\340A\001\022K\n\013text_config\030\004 \001(\0132/.go" + + "ogle.pubsub.v1.CloudStorageConfig.TextCo" + + "nfigB\003\340A\001H\000\022K\n\013avro_config\030\005 \001(\0132/.googl" + + "e.pubsub.v1.CloudStorageConfig.AvroConfi" + + "gB\003\340A\001H\000\0224\n\014max_duration\030\006 \001(\0132\031.google." + + "protobuf.DurationB\003\340A\001\022\026\n\tmax_bytes\030\007 \001(" + + "\003B\003\340A\001\022>\n\005state\030\t \001(\0162*.google.pubsub.v1" + + ".CloudStorageConfig.StateB\003\340A\003\032\014\n\nTextCo" + + "nfig\032)\n\nAvroConfig\022\033\n\016write_metadata\030\001 \001" + + "(\010B\003\340A\001\"u\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + + "\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r\n\tNO" + + "T_FOUND\020\003\022#\n\037IN_TRANSIT_LOCATION_RESTRIC" + + "TION\020\004B\017\n\routput_format\"|\n\017ReceivedMessa" + + "ge\022\023\n\006ack_id\030\001 \001(\tB\003\340A\001\0225\n\007message\030\002 \001(\013" + + "2\037.google.pubsub.v1.PubsubMessageB\003\340A\001\022\035" + + "\n\020delivery_attempt\030\003 \001(\005B\003\340A\001\"Z\n\026GetSubs" + + "criptionRequest\022@\n\014subscription\030\001 \001(\tB*\340" + "A\002\372A$\n\"pubsub.googleapis.com/Subscriptio" - + "n\0226\n\013push_config\030\002 \001(\0132\034.google.pubsub.v" - + "1.PushConfigB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014sub" - + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" - + "is.com/Subscription\022!\n\022return_immediatel" - + "y\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A" - + "\002\"Q\n\014PullResponse\022A\n\021received_messages\030\001" - + " \003(\0132!.google.pubsub.v1.ReceivedMessageB" - + "\003\340A\001\"\225\001\n\030ModifyAckDeadlineRequest\022@\n\014sub" - + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" - + "is.com/Subscription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A" - + "\002\022!\n\024ack_deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022" - + "AcknowledgeRequest\022@\n\014subscription\030\001 \001(\t" - + "B*\340A\002\372A$\n\"pubsub.googleapis.com/Subscrip" - + "tion\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\307\002\n\024Streaming" - + "PullRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A" - + "$\n\"pubsub.googleapis.com/Subscription\022\024\n" - + "\007ack_ids\030\002 \003(\tB\003\340A\001\022$\n\027modify_deadline_s" - + "econds\030\003 \003(\005B\003\340A\001\022$\n\027modify_deadline_ack" - + "_ids\030\004 \003(\tB\003\340A\001\022(\n\033stream_ack_deadline_s" - + "econds\030\005 \001(\005B\003\340A\002\022\026\n\tclient_id\030\006 \001(\tB\003\340A" - + "\001\022%\n\030max_outstanding_messages\030\007 \001(\003B\003\340A\001" - + "\022\"\n\025max_outstanding_bytes\030\010 \001(\003B\003\340A\001\"\236\006\n" - + "\025StreamingPullResponse\022A\n\021received_messa" - + "ges\030\001 \003(\0132!.google.pubsub.v1.ReceivedMes" - + "sageB\003\340A\001\022f\n\030acknowledge_confirmation\030\005 " - + "\001(\0132?.google.pubsub.v1.StreamingPullResp" - + "onse.AcknowledgeConfirmationB\003\340A\001\022t\n mod" - + "ify_ack_deadline_confirmation\030\003 \001(\0132E.go" - + "ogle.pubsub.v1.StreamingPullResponse.Mod" - + "ifyAckDeadlineConfirmationB\003\340A\001\022d\n\027subsc" - + "ription_properties\030\004 \001(\0132>.google.pubsub" - + ".v1.StreamingPullResponse.SubscriptionPr" - + "opertiesB\003\340A\001\032\224\001\n\027AcknowledgeConfirmatio" - + "n\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_i" - + "ds\030\002 \003(\tB\003\340A\001\022\036\n\021unordered_ack_ids\030\003 \003(\t" - + "B\003\340A\001\022%\n\030temporary_failed_ack_ids\030\004 \003(\tB" - + "\003\340A\001\032z\n\035ModifyAckDeadlineConfirmation\022\024\n" - + "\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_ids\030\002" - + " \003(\tB\003\340A\001\022%\n\030temporary_failed_ack_ids\030\003 " - + "\003(\tB\003\340A\001\032k\n\026SubscriptionProperties\022*\n\035ex" - + "actly_once_delivery_enabled\030\001 \001(\010B\003\340A\001\022%" - + "\n\030message_ordering_enabled\030\002 \001(\010B\003\340A\001\"\210\002" - + "\n\025CreateSnapshotRequest\0224\n\004name\030\001 \001(\tB&\340" - + "A\002\372A \n\036pubsub.googleapis.com/Snapshot\022@\n" - + "\014subscription\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.goog" - + "leapis.com/Subscription\022H\n\006labels\030\003 \003(\0132" - + "3.google.pubsub.v1.CreateSnapshotRequest" - + ".LabelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030" - + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateSnaps" - + "hotRequest\0221\n\010snapshot\030\001 \001(\0132\032.google.pu" - + "bsub.v1.SnapshotB\003\340A\002\0224\n\013update_mask\030\002 \001" - + "(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\301\002\n\010" - + "Snapshot\022\021\n\004name\030\001 \001(\tB\003\340A\001\0222\n\005topic\030\002 \001" - + "(\tB#\340A\001\372A\035\n\033pubsub.googleapis.com/Topic\022" - + "4\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" - + "imestampB\003\340A\001\022;\n\006labels\030\004 \003(\0132&.google.p" - + "ubsub.v1.Snapshot.LabelsEntryB\003\340A\001\032-\n\013La" - + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001:L\352AI\n\036pubsub.googleapis.com/Snapshot\022\'" - + "projects/{project}/snapshots/{snapshot}\"" - + "N\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB" - + "&\340A\002\372A \n\036pubsub.googleapis.com/Snapshot\"" - + "\215\001\n\024ListSnapshotsRequest\022D\n\007project\030\001 \001(" - + "\tB3\340A\002\372A-\n+cloudresourcemanager.googleap" - + "is.com/Project\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027" - + "\n\npage_token\030\003 \001(\tB\003\340A\001\"i\n\025ListSnapshots" - + "Response\0222\n\tsnapshots\030\001 \003(\0132\032.google.pub" - + "sub.v1.SnapshotB\003\340A\001\022\034\n\017next_page_token\030" - + "\002 \001(\tB\003\340A\001\"Q\n\025DeleteSnapshotRequest\0228\n\010s" - + "napshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis" - + ".com/Snapshot\"\306\001\n\013SeekRequest\022@\n\014subscri" - + "ption\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.c" - + "om/Subscription\022/\n\004time\030\002 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\001H\000\022:\n\010snapshot\030\003 \001" - + "(\tB&\340A\001\372A \n\036pubsub.googleapis.com/Snapsh" - + "otH\000B\010\n\006target\"\016\n\014SeekResponse2\270\013\n\tPubli" - + "sher\022q\n\013CreateTopic\022\027.google.pubsub.v1.T" - + "opic\032\027.google.pubsub.v1.Topic\"0\332A\004name\202\323" - + "\344\223\002#\032\036/v1/{name=projects/*/topics/*}:\001*\022" - + "\221\001\n\013UpdateTopic\022$.google.pubsub.v1.Updat" - + "eTopicRequest\032\027.google.pubsub.v1.Topic\"C" - + "\332A\021topic,update_mask\202\323\344\223\002)2$/v1/{topic.n" - + "ame=projects/*/topics/*}:\001*\022\223\001\n\007Publish\022" - + " .google.pubsub.v1.PublishRequest\032!.goog" - + "le.pubsub.v1.PublishResponse\"C\332A\016topic,m" - + "essages\202\323\344\223\002,\"\'/v1/{topic=projects/*/top" - + "ics/*}:publish:\001*\022w\n\010GetTopic\022!.google.p" - + "ubsub.v1.GetTopicRequest\032\027.google.pubsub" - + ".v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{topic=pr" - + "ojects/*/topics/*}\022\212\001\n\nListTopics\022#.goog" - + "le.pubsub.v1.ListTopicsRequest\032$.google." - + "pubsub.v1.ListTopicsResponse\"1\332A\007project" - + "\202\323\344\223\002!\022\037/v1/{project=projects/*}/topics\022" - + "\272\001\n\026ListTopicSubscriptions\022/.google.pubs" - + "ub.v1.ListTopicSubscriptionsRequest\0320.go" - + "ogle.pubsub.v1.ListTopicSubscriptionsRes" - + "ponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic=projec" - + "ts/*/topics/*}/subscriptions\022\252\001\n\022ListTop" - + "icSnapshots\022+.google.pubsub.v1.ListTopic" - + "SnapshotsRequest\032,.google.pubsub.v1.List" - + "TopicSnapshotsResponse\"9\332A\005topic\202\323\344\223\002+\022)" - + "/v1/{topic=projects/*/topics/*}/snapshot" - + "s\022|\n\013DeleteTopic\022$.google.pubsub.v1.Dele" - + "teTopicRequest\032\026.google.protobuf.Empty\"/" - + "\332A\005topic\202\323\344\223\002!*\037/v1/{topic=projects/*/to" - + "pics/*}\022\255\001\n\022DetachSubscription\022+.google." - + "pubsub.v1.DetachSubscriptionRequest\032,.go" - + "ogle.pubsub.v1.DetachSubscriptionRespons" - + "e\"<\202\323\344\223\0026\"4/v1/{subscription=projects/*/" - + "subscriptions/*}:detach\032p\312A\025pubsub.googl" - + "eapis.com\322AUhttps://www.googleapis.com/a" - + "uth/cloud-platform,https://www.googleapi" - + "s.com/auth/pubsub2\322\025\n\nSubscriber\022\264\001\n\022Cre" - + "ateSubscription\022\036.google.pubsub.v1.Subsc" - + "ription\032\036.google.pubsub.v1.Subscription\"" - + "^\332A+name,topic,push_config,ack_deadline_" - + "seconds\202\323\344\223\002*\032%/v1/{name=projects/*/subs" - + "criptions/*}:\001*\022\241\001\n\017GetSubscription\022(.go" - + "ogle.pubsub.v1.GetSubscriptionRequest\032\036." - + "google.pubsub.v1.Subscription\"D\332A\014subscr" - + "iption\202\323\344\223\002/\022-/v1/{subscription=projects" - + "/*/subscriptions/*}\022\273\001\n\022UpdateSubscripti" - + "on\022+.google.pubsub.v1.UpdateSubscription" - + "Request\032\036.google.pubsub.v1.Subscription\"" - + "X\332A\030subscription,update_mask\202\323\344\223\002722/v1/" - + "{subscription.name=projects/*/subscripti" - + "ons/*}:\001*\022\246\001\n\021ListSubscriptions\022*.google" - + ".pubsub.v1.ListSubscriptionsRequest\032+.go" - + "ogle.pubsub.v1.ListSubscriptionsResponse" - + "\"8\332A\007project\202\323\344\223\002(\022&/v1/{project=project" - + "s/*}/subscriptions\022\237\001\n\022DeleteSubscriptio" - + "n\022+.google.pubsub.v1.DeleteSubscriptionR" - + "equest\032\026.google.protobuf.Empty\"D\332A\014subsc" - + "ription\202\323\344\223\002/*-/v1/{subscription=project" - + "s/*/subscriptions/*}\022\317\001\n\021ModifyAckDeadli" - + "ne\022*.google.pubsub.v1.ModifyAckDeadlineR" - + "equest\032\026.google.protobuf.Empty\"v\332A)subsc" - + "ription,ack_ids,ack_deadline_seconds\202\323\344\223" - + "\002D\"?/v1/{subscription=projects/*/subscri" - + "ptions/*}:modifyAckDeadline:\001*\022\250\001\n\013Ackno" - + "wledge\022$.google.pubsub.v1.AcknowledgeReq" - + "uest\032\026.google.protobuf.Empty\"[\332A\024subscri" - + "ption,ack_ids\202\323\344\223\002>\"9/v1/{subscription=p" - + "rojects/*/subscriptions/*}:acknowledge:\001" - + "*\022\320\001\n\004Pull\022\035.google.pubsub.v1.PullReques" - + "t\032\036.google.pubsub.v1.PullResponse\"\210\001\332A,s" - + "ubscription,return_immediately,max_messa" - + "ges\332A\031subscription,max_messages\202\323\344\223\0027\"2/" - + "v1/{subscription=projects/*/subscription" - + "s/*}:pull:\001*\022f\n\rStreamingPull\022&.google.p" - + "ubsub.v1.StreamingPullRequest\032\'.google.p" - + "ubsub.v1.StreamingPullResponse\"\000(\0010\001\022\273\001\n" - + "\020ModifyPushConfig\022).google.pubsub.v1.Mod" - + "ifyPushConfigRequest\032\026.google.protobuf.E" - + "mpty\"d\332A\030subscription,push_config\202\323\344\223\002C\"" - + ">/v1/{subscription=projects/*/subscripti" - + "ons/*}:modifyPushConfig:\001*\022\211\001\n\013GetSnapsh" - + "ot\022$.google.pubsub.v1.GetSnapshotRequest" - + "\032\032.google.pubsub.v1.Snapshot\"8\332A\010snapsho" - + "t\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/snapsh" - + "ots/*}\022\226\001\n\rListSnapshots\022&.google.pubsub" - + ".v1.ListSnapshotsRequest\032\'.google.pubsub" - + ".v1.ListSnapshotsResponse\"4\332A\007project\202\323\344" - + "\223\002$\022\"/v1/{project=projects/*}/snapshots\022" - + "\227\001\n\016CreateSnapshot\022\'.google.pubsub.v1.Cr" - + "eateSnapshotRequest\032\032.google.pubsub.v1.S" - + "napshot\"@\332A\021name,subscription\202\323\344\223\002&\032!/v1" - + "/{name=projects/*/snapshots/*}:\001*\022\243\001\n\016Up" - + "dateSnapshot\022\'.google.pubsub.v1.UpdateSn" - + "apshotRequest\032\032.google.pubsub.v1.Snapsho" - + "t\"L\332A\024snapshot,update_mask\202\323\344\223\002/2*/v1/{s" - + "napshot.name=projects/*/snapshots/*}:\001*\022" - + "\213\001\n\016DeleteSnapshot\022\'.google.pubsub.v1.De" - + "leteSnapshotRequest\032\026.google.protobuf.Em" - + "pty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snapshot=pr" - + "ojects/*/snapshots/*}\022\204\001\n\004Seek\022\035.google." - + "pubsub.v1.SeekRequest\032\036.google.pubsub.v1" - + ".SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscription" - + "=projects/*/subscriptions/*}:seek:\001*\032p\312A" - + "\025pubsub.googleapis.com\322AUhttps://www.goo" - + "gleapis.com/auth/cloud-platform,https://" - + "www.googleapis.com/auth/pubsubB\252\001\n\024com.g" - + "oogle.pubsub.v1B\013PubsubProtoP\001Z2cloud.go" - + "ogle.com/go/pubsub/apiv1/pubsubpb;pubsub" - + "pb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Google\\" - + "Cloud\\PubSub\\V1\352\002\031Google::Cloud::PubSub:" - + ":V1b\006proto3" + + "n\"\214\001\n\031UpdateSubscriptionRequest\0229\n\014subsc" + + "ription\030\001 \001(\0132\036.google.pubsub.v1.Subscri" + + "ptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMaskB\003\340A\002\"\221\001\n\030ListSubscri" + + "ptionsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+" + + "cloudresourcemanager.googleapis.com/Proj" + + "ect\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\"u\n\031ListSubscriptionsRespons" + + "e\022:\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub" + + ".v1.SubscriptionB\003\340A\001\022\034\n\017next_page_token" + + "\030\002 \001(\tB\003\340A\001\"]\n\031DeleteSubscriptionRequest" + + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" + + "oogleapis.com/Subscription\"\223\001\n\027ModifyPus" + + "hConfigRequest\022@\n\014subscription\030\001 \001(\tB*\340A" + + "\002\372A$\n\"pubsub.googleapis.com/Subscription" + + "\0226\n\013push_config\030\002 \001(\0132\034.google.pubsub.v1" + + ".PushConfigB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subs" + + "cription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapi" + + "s.com/Subscription\022!\n\022return_immediately" + + "\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002" + + "\"Q\n\014PullResponse\022A\n\021received_messages\030\001 " + + "\003(\0132!.google.pubsub.v1.ReceivedMessageB\003" + + "\340A\001\"\225\001\n\030ModifyAckDeadlineRequest\022@\n\014subs" + + "cription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapi" + + "s.com/Subscription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002" + + "\022!\n\024ack_deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022A" + + "cknowledgeRequest\022@\n\014subscription\030\001 \001(\tB" + + "*\340A\002\372A$\n\"pubsub.googleapis.com/Subscript" + + "ion\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\307\002\n\024StreamingP" + + "ullRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$" + + "\n\"pubsub.googleapis.com/Subscription\022\024\n\007" + + "ack_ids\030\002 \003(\tB\003\340A\001\022$\n\027modify_deadline_se" + + "conds\030\003 \003(\005B\003\340A\001\022$\n\027modify_deadline_ack_" + + "ids\030\004 \003(\tB\003\340A\001\022(\n\033stream_ack_deadline_se" + + "conds\030\005 \001(\005B\003\340A\002\022\026\n\tclient_id\030\006 \001(\tB\003\340A\001" + + "\022%\n\030max_outstanding_messages\030\007 \001(\003B\003\340A\001\022" + + "\"\n\025max_outstanding_bytes\030\010 \001(\003B\003\340A\001\"\236\006\n\025" + + "StreamingPullResponse\022A\n\021received_messag" + + "es\030\001 \003(\0132!.google.pubsub.v1.ReceivedMess" + + "ageB\003\340A\001\022f\n\030acknowledge_confirmation\030\005 \001" + + "(\0132?.google.pubsub.v1.StreamingPullRespo" + + "nse.AcknowledgeConfirmationB\003\340A\001\022t\n modi" + + "fy_ack_deadline_confirmation\030\003 \001(\0132E.goo" + + "gle.pubsub.v1.StreamingPullResponse.Modi" + + "fyAckDeadlineConfirmationB\003\340A\001\022d\n\027subscr" + + "iption_properties\030\004 \001(\0132>.google.pubsub." + + "v1.StreamingPullResponse.SubscriptionPro" + + "pertiesB\003\340A\001\032\224\001\n\027AcknowledgeConfirmation" + + "\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_id" + + "s\030\002 \003(\tB\003\340A\001\022\036\n\021unordered_ack_ids\030\003 \003(\tB" + + "\003\340A\001\022%\n\030temporary_failed_ack_ids\030\004 \003(\tB\003" + + "\340A\001\032z\n\035ModifyAckDeadlineConfirmation\022\024\n\007" + + "ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_ids\030\002 " + + "\003(\tB\003\340A\001\022%\n\030temporary_failed_ack_ids\030\003 \003" + + "(\tB\003\340A\001\032k\n\026SubscriptionProperties\022*\n\035exa" + + "ctly_once_delivery_enabled\030\001 \001(\010B\003\340A\001\022%\n" + + "\030message_ordering_enabled\030\002 \001(\010B\003\340A\001\"\210\002\n" + + "\025CreateSnapshotRequest\0224\n\004name\030\001 \001(\tB&\340A" + + "\002\372A \n\036pubsub.googleapis.com/Snapshot\022@\n\014" + + "subscription\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googl" + + "eapis.com/Subscription\022H\n\006labels\030\003 \003(\01323" + + ".google.pubsub.v1.CreateSnapshotRequest." + + "LabelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateSnapsh" + + "otRequest\0221\n\010snapshot\030\001 \001(\0132\032.google.pub" + + "sub.v1.SnapshotB\003\340A\002\0224\n\013update_mask\030\002 \001(" + + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\301\002\n\010S" + + "napshot\022\021\n\004name\030\001 \001(\tB\003\340A\001\0222\n\005topic\030\002 \001(" + + "\tB#\340A\001\372A\035\n\033pubsub.googleapis.com/Topic\0224" + + "\n\013expire_time\030\003 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\001\022;\n\006labels\030\004 \003(\0132&.google.pu" + + "bsub.v1.Snapshot.LabelsEntryB\003\340A\001\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + ":L\352AI\n\036pubsub.googleapis.com/Snapshot\022\'p" + + "rojects/{project}/snapshots/{snapshot}\"N" + + "\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB&" + + "\340A\002\372A \n\036pubsub.googleapis.com/Snapshot\"\215" + + "\001\n\024ListSnapshotsRequest\022D\n\007project\030\001 \001(\t" + + "B3\340A\002\372A-\n+cloudresourcemanager.googleapi" + + "s.com/Project\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\npage_token\030\003 \001(\tB\003\340A\001\"i\n\025ListSnapshotsR" + + "esponse\0222\n\tsnapshots\030\001 \003(\0132\032.google.pubs" + + "ub.v1.SnapshotB\003\340A\001\022\034\n\017next_page_token\030\002" + + " \001(\tB\003\340A\001\"Q\n\025DeleteSnapshotRequest\0228\n\010sn" + + "apshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis." + + "com/Snapshot\"\306\001\n\013SeekRequest\022@\n\014subscrip" + + "tion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.co" + + "m/Subscription\022/\n\004time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\001H\000\022:\n\010snapshot\030\003 \001(" + + "\tB&\340A\001\372A \n\036pubsub.googleapis.com/Snapsho" + + "tH\000B\010\n\006target\"\016\n\014SeekResponse2\270\013\n\tPublis" + + "her\022q\n\013CreateTopic\022\027.google.pubsub.v1.To" + + "pic\032\027.google.pubsub.v1.Topic\"0\332A\004name\202\323\344" + + "\223\002#\032\036/v1/{name=projects/*/topics/*}:\001*\022\221" + + "\001\n\013UpdateTopic\022$.google.pubsub.v1.Update" + + "TopicRequest\032\027.google.pubsub.v1.Topic\"C\332" + + "A\021topic,update_mask\202\323\344\223\002)2$/v1/{topic.na" + + "me=projects/*/topics/*}:\001*\022\223\001\n\007Publish\022 " + + ".google.pubsub.v1.PublishRequest\032!.googl" + + "e.pubsub.v1.PublishResponse\"C\332A\016topic,me" + + "ssages\202\323\344\223\002,\"\'/v1/{topic=projects/*/topi" + + "cs/*}:publish:\001*\022w\n\010GetTopic\022!.google.pu" + + "bsub.v1.GetTopicRequest\032\027.google.pubsub." + + "v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{topic=pro" + + "jects/*/topics/*}\022\212\001\n\nListTopics\022#.googl" + + "e.pubsub.v1.ListTopicsRequest\032$.google.p" + + "ubsub.v1.ListTopicsResponse\"1\332A\007project\202" + + "\323\344\223\002!\022\037/v1/{project=projects/*}/topics\022\272" + + "\001\n\026ListTopicSubscriptions\022/.google.pubsu" + + "b.v1.ListTopicSubscriptionsRequest\0320.goo" + + "gle.pubsub.v1.ListTopicSubscriptionsResp" + + "onse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic=project" + + "s/*/topics/*}/subscriptions\022\252\001\n\022ListTopi" + + "cSnapshots\022+.google.pubsub.v1.ListTopicS" + + "napshotsRequest\032,.google.pubsub.v1.ListT" + + "opicSnapshotsResponse\"9\332A\005topic\202\323\344\223\002+\022)/" + + "v1/{topic=projects/*/topics/*}/snapshots" + + "\022|\n\013DeleteTopic\022$.google.pubsub.v1.Delet" + + "eTopicRequest\032\026.google.protobuf.Empty\"/\332" + + "A\005topic\202\323\344\223\002!*\037/v1/{topic=projects/*/top" + + "ics/*}\022\255\001\n\022DetachSubscription\022+.google.p" + + "ubsub.v1.DetachSubscriptionRequest\032,.goo" + + "gle.pubsub.v1.DetachSubscriptionResponse" + + "\"<\202\323\344\223\0026\"4/v1/{subscription=projects/*/s" + + "ubscriptions/*}:detach\032p\312A\025pubsub.google" + + "apis.com\322AUhttps://www.googleapis.com/au" + + "th/cloud-platform,https://www.googleapis" + + ".com/auth/pubsub2\322\025\n\nSubscriber\022\264\001\n\022Crea" + + "teSubscription\022\036.google.pubsub.v1.Subscr" + + "iption\032\036.google.pubsub.v1.Subscription\"^" + + "\332A+name,topic,push_config,ack_deadline_s" + + "econds\202\323\344\223\002*\032%/v1/{name=projects/*/subsc" + + "riptions/*}:\001*\022\241\001\n\017GetSubscription\022(.goo" + + "gle.pubsub.v1.GetSubscriptionRequest\032\036.g" + + "oogle.pubsub.v1.Subscription\"D\332A\014subscri" + + "ption\202\323\344\223\002/\022-/v1/{subscription=projects/" + + "*/subscriptions/*}\022\273\001\n\022UpdateSubscriptio" + + "n\022+.google.pubsub.v1.UpdateSubscriptionR" + + "equest\032\036.google.pubsub.v1.Subscription\"X" + + "\332A\030subscription,update_mask\202\323\344\223\002722/v1/{" + + "subscription.name=projects/*/subscriptio" + + "ns/*}:\001*\022\246\001\n\021ListSubscriptions\022*.google." + + "pubsub.v1.ListSubscriptionsRequest\032+.goo" + + "gle.pubsub.v1.ListSubscriptionsResponse\"" + + "8\332A\007project\202\323\344\223\002(\022&/v1/{project=projects" + + "/*}/subscriptions\022\237\001\n\022DeleteSubscription" + + "\022+.google.pubsub.v1.DeleteSubscriptionRe" + + "quest\032\026.google.protobuf.Empty\"D\332A\014subscr" + + "iption\202\323\344\223\002/*-/v1/{subscription=projects" + + "/*/subscriptions/*}\022\317\001\n\021ModifyAckDeadlin" + + "e\022*.google.pubsub.v1.ModifyAckDeadlineRe" + + "quest\032\026.google.protobuf.Empty\"v\332A)subscr" + + "iption,ack_ids,ack_deadline_seconds\202\323\344\223\002" + + "D\"?/v1/{subscription=projects/*/subscrip" + + "tions/*}:modifyAckDeadline:\001*\022\250\001\n\013Acknow" + + "ledge\022$.google.pubsub.v1.AcknowledgeRequ" + + "est\032\026.google.protobuf.Empty\"[\332A\024subscrip" + + "tion,ack_ids\202\323\344\223\002>\"9/v1/{subscription=pr" + + "ojects/*/subscriptions/*}:acknowledge:\001*" + + "\022\320\001\n\004Pull\022\035.google.pubsub.v1.PullRequest" + + "\032\036.google.pubsub.v1.PullResponse\"\210\001\332A,su" + + "bscription,return_immediately,max_messag" + + "es\332A\031subscription,max_messages\202\323\344\223\0027\"2/v" + + "1/{subscription=projects/*/subscriptions" + + "/*}:pull:\001*\022f\n\rStreamingPull\022&.google.pu" + + "bsub.v1.StreamingPullRequest\032\'.google.pu" + + "bsub.v1.StreamingPullResponse\"\000(\0010\001\022\273\001\n\020" + + "ModifyPushConfig\022).google.pubsub.v1.Modi" + + "fyPushConfigRequest\032\026.google.protobuf.Em" + + "pty\"d\332A\030subscription,push_config\202\323\344\223\002C\">" + + "/v1/{subscription=projects/*/subscriptio" + + "ns/*}:modifyPushConfig:\001*\022\211\001\n\013GetSnapsho" + + "t\022$.google.pubsub.v1.GetSnapshotRequest\032" + + "\032.google.pubsub.v1.Snapshot\"8\332A\010snapshot" + + "\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/snapsho" + + "ts/*}\022\226\001\n\rListSnapshots\022&.google.pubsub." + + "v1.ListSnapshotsRequest\032\'.google.pubsub." + + "v1.ListSnapshotsResponse\"4\332A\007project\202\323\344\223" + + "\002$\022\"/v1/{project=projects/*}/snapshots\022\227" + + "\001\n\016CreateSnapshot\022\'.google.pubsub.v1.Cre" + + "ateSnapshotRequest\032\032.google.pubsub.v1.Sn" + + "apshot\"@\332A\021name,subscription\202\323\344\223\002&\032!/v1/" + + "{name=projects/*/snapshots/*}:\001*\022\243\001\n\016Upd" + + "ateSnapshot\022\'.google.pubsub.v1.UpdateSna" + + "pshotRequest\032\032.google.pubsub.v1.Snapshot" + + "\"L\332A\024snapshot,update_mask\202\323\344\223\002/2*/v1/{sn" + + "apshot.name=projects/*/snapshots/*}:\001*\022\213" + + "\001\n\016DeleteSnapshot\022\'.google.pubsub.v1.Del" + + "eteSnapshotRequest\032\026.google.protobuf.Emp" + + "ty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snapshot=pro" + + "jects/*/snapshots/*}\022\204\001\n\004Seek\022\035.google.p" + + "ubsub.v1.SeekRequest\032\036.google.pubsub.v1." + + "SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscription=" + + "projects/*/subscriptions/*}:seek:\001*\032p\312A\025" + + "pubsub.googleapis.com\322AUhttps://www.goog" + + "leapis.com/auth/cloud-platform,https://w" + + "ww.googleapis.com/auth/pubsubB\252\001\n\024com.go" + + "ogle.pubsub.v1B\013PubsubProtoP\001Z2cloud.goo" + + "gle.com/go/pubsub/apiv1/pubsubpb;pubsubp" + + "b\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Google\\C" + + "loud\\PubSub\\V1\352\002\031Google::Cloud::PubSub::" + + "V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -962,6 +963,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Bucket", "FilenamePrefix", "FilenameSuffix", + "FilenameDatetimeFormat", "TextConfig", "AvroConfig", "MaxDuration", diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java index 49e0f1204..37e6cb313 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java @@ -137,7 +137,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1358 + * google/pubsub/v1/pubsub.proto;l=1363 * @return The returnImmediately. */ @java.lang.Override @@ -688,7 +688,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1358 + * google/pubsub/v1/pubsub.proto;l=1363 * @return The returnImmediately. */ @java.lang.Override @@ -714,7 +714,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1358 + * google/pubsub/v1/pubsub.proto;l=1363 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -744,7 +744,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1358 + * google/pubsub/v1/pubsub.proto;l=1363 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index bcc0846fa..93dce1877 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -72,7 +72,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1358 + * google/pubsub/v1/pubsub.proto;l=1363 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index 93e1e84a7..c3a90cd40 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -203,7 +203,7 @@ message IngestionDataSourceSettings { KINESIS_PERMISSION_DENIED = 2; // Permission denied encountered while publishing to the topic. This can - // happen due to Pub/Sub SA has not been granted the [appropriate publish + // happen if the Pub/Sub SA has not been granted the [appropriate publish // permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher) PUBLISH_PERMISSION_DENIED = 3; @@ -1197,6 +1197,11 @@ message CloudStorageConfig { // Must not end in "/". string filename_suffix = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. User-provided format string specifying how to represent datetimes + // in Cloud Storage filenames. See the [datetime format + // guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). + string filename_datetime_format = 10 [(google.api.field_behavior) = OPTIONAL]; + // Defaults to text format. oneof output_format { // Optional. If set, message data will be written to Cloud Storage in text diff --git a/renovate.json b/renovate.json index bd4ed7ef1..58c97664e 100644 --- a/renovate.json +++ b/renovate.json @@ -12,7 +12,10 @@ ], "ignorePaths": [ ".kokoro/requirements.txt", - ".github/workflows/**" + ".github/workflows/approve-readme.yaml", + ".github/workflows/ci.yaml", + ".github/workflows/renovate_config_check.yaml", + ".github/workflows/samples.yaml" ], "customManagers": [ { @@ -23,6 +26,15 @@ "matchStrings": ["value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\""], "depNameTemplate": "com.google.cloud:sdk-platform-java-config", "datasourceTemplate": "maven" + }, + { + "customType": "regex", + "fileMatch": [ + "^.github/workflows/unmanaged_dependency_check.yaml$" + ], + "matchStrings": ["uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v(?.+?)\\n"], + "depNameTemplate": "com.google.cloud:sdk-platform-java-config", + "datasourceTemplate": "maven" } ], "packageRules": [ diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c394454f9..741044ca5 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-pubsub - 1.127.2 + 1.127.3 @@ -75,7 +75,7 @@ com.google.protobuf protobuf-java-util - 4.26.0 + 4.26.1 com.google.cloud @@ -86,12 +86,12 @@ com.google.cloud google-cloud-bigquery - 2.38.1 + 2.38.2 com.google.cloud google-cloud-storage - 2.36.0 + 2.36.1
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index e0b4e56f4..28b930472 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.127.3 + 1.128.0 @@ -61,7 +61,7 @@ com.google.protobuf protobuf-java-util - 4.26.0 + 4.26.1 @@ -85,12 +85,12 @@ com.google.cloud google-cloud-bigquery - 2.38.1 + 2.38.2 com.google.cloud google-cloud-storage - 2.36.0 + 2.36.1
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index d0a14bd26..396be5afb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -80,7 +80,7 @@ com.google.protobuf protobuf-java-util - 4.26.0 + 4.26.1 diff --git a/samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java b/samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java new file mode 100644 index 000000000..6f79ef6b7 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java @@ -0,0 +1,74 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_topic_with_kinesis_ingestion] + +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.IngestionDataSourceSettings; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; + +public class CreateTopicWithKinesisIngestionExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + // Kinesis ingestion settings. + String streamArn = "stream-arn"; + String consumerArn = "consumer-arn"; + String awsRoleArn = "aws-role-arn"; + String gcpServiceAccount = "gcp-service-account"; + + createTopicWithKinesisIngestionExample( + projectId, topicId, streamArn, consumerArn, awsRoleArn, gcpServiceAccount); + } + + public static void createTopicWithKinesisIngestionExample( + String projectId, + String topicId, + String streamArn, + String consumerArn, + String awsRoleArn, + String gcpServiceAccount) + throws IOException { + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + TopicName topicName = TopicName.of(projectId, topicId); + + IngestionDataSourceSettings.AwsKinesis awsKinesis = + IngestionDataSourceSettings.AwsKinesis.newBuilder() + .setStreamArn(streamArn) + .setConsumerArn(consumerArn) + .setAwsRoleArn(awsRoleArn) + .setGcpServiceAccount(gcpServiceAccount) + .build(); + IngestionDataSourceSettings ingestionDataSourceSettings = + IngestionDataSourceSettings.newBuilder().setAwsKinesis(awsKinesis).build(); + + Topic topic = + topicAdminClient.createTopic( + Topic.newBuilder() + .setName(topicName.toString()) + .setIngestionDataSourceSettings(ingestionDataSourceSettings) + .build()); + + System.out.println("Created topic with Kinesis ingestion settings: " + topic.getAllFields()); + } + } +} +// [END pubsub_create_topic_with_kinesis_ingestion] diff --git a/samples/snippets/src/main/java/pubsub/UpdateTopicTypeExample.java b/samples/snippets/src/main/java/pubsub/UpdateTopicTypeExample.java new file mode 100644 index 000000000..6b8497ea7 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/UpdateTopicTypeExample.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_update_topic_type] + +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.protobuf.FieldMask; +import com.google.pubsub.v1.IngestionDataSourceSettings; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import com.google.pubsub.v1.UpdateTopicRequest; +import java.io.IOException; + +public class UpdateTopicTypeExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + // Kinesis ingestion settings. + String streamArn = "stream-arn"; + String consumerArn = "consumer-arn"; + String awsRoleArn = "aws-role-arn"; + String gcpServiceAccount = "gcp-service-account"; + + UpdateTopicTypeExample.updateTopicTypeExample( + projectId, topicId, streamArn, consumerArn, awsRoleArn, gcpServiceAccount); + } + + public static void updateTopicTypeExample( + String projectId, + String topicId, + String streamArn, + String consumerArn, + String awsRoleArn, + String gcpServiceAccount) + throws IOException { + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + TopicName topicName = TopicName.of(projectId, topicId); + + IngestionDataSourceSettings.AwsKinesis awsKinesis = + IngestionDataSourceSettings.AwsKinesis.newBuilder() + .setStreamArn(streamArn) + .setConsumerArn(consumerArn) + .setAwsRoleArn(awsRoleArn) + .setGcpServiceAccount(gcpServiceAccount) + .build(); + IngestionDataSourceSettings ingestionDataSourceSettings = + IngestionDataSourceSettings.newBuilder().setAwsKinesis(awsKinesis).build(); + + // Construct the topic with Kinesis ingestion settings. + Topic topic = + Topic.newBuilder() + .setName(topicName.toString()) + .setIngestionDataSourceSettings(ingestionDataSourceSettings) + .build(); + + // Construct a field mask to indicate which field to update in the topic. + FieldMask updateMask = + FieldMask.newBuilder().addPaths("ingestion_data_source_settings").build(); + + UpdateTopicRequest request = + UpdateTopicRequest.newBuilder().setTopic(topic).setUpdateMask(updateMask).build(); + + Topic response = topicAdminClient.updateTopic(request); + + System.out.println( + "Updated topic with Kinesis ingestion settings: " + response.getAllFields()); + } + } +} +// [END pubsub_update_topic_type] diff --git a/samples/snippets/src/test/java/pubsub/AdminIT.java b/samples/snippets/src/test/java/pubsub/AdminIT.java index e42c81290..a2eb7ebfd 100644 --- a/samples/snippets/src/test/java/pubsub/AdminIT.java +++ b/samples/snippets/src/test/java/pubsub/AdminIT.java @@ -52,6 +52,7 @@ public class AdminIT { private static final String projectId = System.getenv("GOOGLE_CLOUD_PROJECT"); private static final String _suffix = UUID.randomUUID().toString(); private static final String topicId = "iam-topic-" + _suffix; + private static final String ingestionTopicId = "ingestion-topic-" + _suffix; private static final String pullSubscriptionId = "iam-pull-subscription-" + _suffix; private static final String pushSubscriptionId = "iam-push-subscription-" + _suffix; private static final String orderedSubscriptionId = "iam-ordered-subscription-" + _suffix; @@ -63,8 +64,20 @@ public class AdminIT { "java_samples_data_set" + _suffix.replace("-", "_"); private static final String bigquerySubscriptionId = "iam-bigquery-subscription-" + _suffix; private static final String bigqueryTableId = "java_samples_table_" + _suffix; + private static final String streamArn = + "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name"; + private static final String consumerArn = + "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/" + + "consumer/consumer-1:1111111111"; + private static final String consumerArn2 = + "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/" + + "consumer/consumer-2:2222222222"; + private static final String awsRoleArn = "arn:aws:iam::111111111111:role/fake-role-name"; + private static final String gcpServiceAccount = + "fake-service-account@fake-gcp-project.iam.gserviceaccount.com"; private static final TopicName topicName = TopicName.of(projectId, topicId); + private static final TopicName ingestionTopicName = TopicName.of(projectId, ingestionTopicId); private static final SubscriptionName pullSubscriptionName = SubscriptionName.of(projectId, pullSubscriptionId); private static final SubscriptionName pushSubscriptionName = @@ -273,9 +286,46 @@ public void testAdmin() throws Exception { DeleteSubscriptionExample.deleteSubscriptionExample(projectId, bigquerySubscriptionId); assertThat(bout.toString()).contains("Deleted subscription."); + bout.reset(); + // Update topic type to Kinesis ingestion. + UpdateTopicTypeExample.updateTopicTypeExample( + projectId, topicId, streamArn, consumerArn, awsRoleArn, gcpServiceAccount); + assertThat(bout.toString()).contains("google.pubsub.v1.Topic.name=" + topicName.toString()); + assertThat(bout.toString()).contains(streamArn); + assertThat(bout.toString()).contains(consumerArn); + assertThat(bout.toString()).contains(awsRoleArn); + assertThat(bout.toString()).contains(gcpServiceAccount); + bout.reset(); // Test delete topic. DeleteTopicExample.deleteTopicExample(projectId, topicId); assertThat(bout.toString()).contains("Deleted topic."); + + bout.reset(); + // Test create topic with Kinesis ingestion settings. + CreateTopicWithKinesisIngestionExample.createTopicWithKinesisIngestionExample( + projectId, ingestionTopicId, streamArn, consumerArn, awsRoleArn, gcpServiceAccount); + assertThat(bout.toString()) + .contains("google.pubsub.v1.Topic.name=" + ingestionTopicName.toString()); + assertThat(bout.toString()).contains(streamArn); + assertThat(bout.toString()).contains(consumerArn); + assertThat(bout.toString()).contains(awsRoleArn); + assertThat(bout.toString()).contains(gcpServiceAccount); + + bout.reset(); + // Test update existing Kinesis ingestion settings. + UpdateTopicTypeExample.updateTopicTypeExample( + projectId, ingestionTopicId, streamArn, consumerArn2, awsRoleArn, gcpServiceAccount); + assertThat(bout.toString()) + .contains("google.pubsub.v1.Topic.name=" + ingestionTopicName.toString()); + assertThat(bout.toString()).contains(streamArn); + assertThat(bout.toString()).contains(consumerArn2); + assertThat(bout.toString()).contains(awsRoleArn); + assertThat(bout.toString()).contains(gcpServiceAccount); + + bout.reset(); + // Test delete Kinesis ingestion topic. + DeleteTopicExample.deleteTopicExample(projectId, ingestionTopicId); + assertThat(bout.toString()).contains("Deleted topic."); } } diff --git a/versions.txt b/versions.txt index 448f60b81..2851c93c4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.127.3:1.127.3 -grpc-google-cloud-pubsub-v1:1.109.3:1.109.3 -proto-google-cloud-pubsub-v1:1.109.3:1.109.3 +google-cloud-pubsub:1.128.0:1.128.0 +grpc-google-cloud-pubsub-v1:1.110.0:1.110.0 +proto-google-cloud-pubsub-v1:1.110.0:1.110.0