diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f930d4846..f56920557 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:bc2bf47c7370f1b1a8a46b0c104ce7e43644ac58902c9de265fe1f253fcc2506 -# created: 2023-10-31T13:44:21.909247346Z + digest: sha256:81f75d962cd28b7ad10740a643b8069b8fa0357cb495b782eef8560bb7a8fd65 +# created: 2023-12-05T19:16:19.735195992Z diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e27b2c575..ae66b1973 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - java: [11, 17] + java: [11, 17, 21] steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c5c11bbe7..445c5c1f0 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -170,30 +170,30 @@ colorlog==6.7.0 \ --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 # via gcp-docuploader -cryptography==41.0.2 \ - --hash=sha256:01f1d9e537f9a15b037d5d9ee442b8c22e3ae11ce65ea1f3316a41c78756b711 \ - --hash=sha256:079347de771f9282fbfe0e0236c716686950c19dee1b76240ab09ce1624d76d7 \ - --hash=sha256:182be4171f9332b6741ee818ec27daff9fb00349f706629f5cbf417bd50e66fd \ - --hash=sha256:192255f539d7a89f2102d07d7375b1e0a81f7478925b3bc2e0549ebf739dae0e \ - --hash=sha256:2a034bf7d9ca894720f2ec1d8b7b5832d7e363571828037f9e0c4f18c1b58a58 \ - --hash=sha256:342f3767e25876751e14f8459ad85e77e660537ca0a066e10e75df9c9e9099f0 \ - --hash=sha256:439c3cc4c0d42fa999b83ded80a9a1fb54d53c58d6e59234cfe97f241e6c781d \ - --hash=sha256:49c3222bb8f8e800aead2e376cbef687bc9e3cb9b58b29a261210456a7783d83 \ - --hash=sha256:674b669d5daa64206c38e507808aae49904c988fa0a71c935e7006a3e1e83831 \ - --hash=sha256:7a9a3bced53b7f09da251685224d6a260c3cb291768f54954e28f03ef14e3766 \ - --hash=sha256:7af244b012711a26196450d34f483357e42aeddb04128885d95a69bd8b14b69b \ - --hash=sha256:7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c \ - --hash=sha256:84609ade00a6ec59a89729e87a503c6e36af98ddcd566d5f3be52e29ba993182 \ - --hash=sha256:9a6673c1828db6270b76b22cc696f40cde9043eb90373da5c2f8f2158957f42f \ - --hash=sha256:9b6d717393dbae53d4e52684ef4f022444fc1cce3c48c38cb74fca29e1f08eaa \ - --hash=sha256:9c3fe6534d59d071ee82081ca3d71eed3210f76ebd0361798c74abc2bcf347d4 \ - --hash=sha256:a719399b99377b218dac6cf547b6ec54e6ef20207b6165126a280b0ce97e0d2a \ - --hash=sha256:b332cba64d99a70c1e0836902720887fb4529ea49ea7f5462cf6640e095e11d2 \ - --hash=sha256:d124682c7a23c9764e54ca9ab5b308b14b18eba02722b8659fb238546de83a76 \ - --hash=sha256:d73f419a56d74fef257955f51b18d046f3506270a5fd2ac5febbfa259d6c0fa5 \ - --hash=sha256:f0dc40e6f7aa37af01aba07277d3d64d5a03dc66d682097541ec4da03cc140ee \ - --hash=sha256:f14ad275364c8b4e525d018f6716537ae7b6d369c094805cae45300847e0894f \ - --hash=sha256:f772610fe364372de33d76edcd313636a25684edb94cee53fd790195f5989d14 +cryptography==41.0.6 \ + --hash=sha256:068bc551698c234742c40049e46840843f3d98ad7ce265fd2bd4ec0d11306596 \ + --hash=sha256:0f27acb55a4e77b9be8d550d762b0513ef3fc658cd3eb15110ebbcbd626db12c \ + --hash=sha256:2132d5865eea673fe6712c2ed5fb4fa49dba10768bb4cc798345748380ee3660 \ + --hash=sha256:3288acccef021e3c3c10d58933f44e8602cf04dba96d9796d70d537bb2f4bbc4 \ + --hash=sha256:35f3f288e83c3f6f10752467c48919a7a94b7d88cc00b0668372a0d2ad4f8ead \ + --hash=sha256:398ae1fc711b5eb78e977daa3cbf47cec20f2c08c5da129b7a296055fbb22aed \ + --hash=sha256:422e3e31d63743855e43e5a6fcc8b4acab860f560f9321b0ee6269cc7ed70cc3 \ + --hash=sha256:48783b7e2bef51224020efb61b42704207dde583d7e371ef8fc2a5fb6c0aabc7 \ + --hash=sha256:4d03186af98b1c01a4eda396b137f29e4e3fb0173e30f885e27acec8823c1b09 \ + --hash=sha256:5daeb18e7886a358064a68dbcaf441c036cbdb7da52ae744e7b9207b04d3908c \ + --hash=sha256:60e746b11b937911dc70d164060d28d273e31853bb359e2b2033c9e93e6f3c43 \ + --hash=sha256:742ae5e9a2310e9dade7932f9576606836ed174da3c7d26bc3d3ab4bd49b9f65 \ + --hash=sha256:7e00fb556bda398b99b0da289ce7053639d33b572847181d6483ad89835115f6 \ + --hash=sha256:85abd057699b98fce40b41737afb234fef05c67e116f6f3650782c10862c43da \ + --hash=sha256:8efb2af8d4ba9dbc9c9dd8f04d19a7abb5b49eab1f3694e7b5a16a5fc2856f5c \ + --hash=sha256:ae236bb8760c1e55b7a39b6d4d32d2279bc6c7c8500b7d5a13b6fb9fc97be35b \ + --hash=sha256:afda76d84b053923c27ede5edc1ed7d53e3c9f475ebaf63c68e69f1403c405a8 \ + --hash=sha256:b27a7fd4229abef715e064269d98a7e2909ebf92eb6912a9603c7e14c181928c \ + --hash=sha256:b648fe2a45e426aaee684ddca2632f62ec4613ef362f4d681a9a6283d10e079d \ + --hash=sha256:c5a550dc7a3b50b116323e3d376241829fd326ac47bc195e04eb33a8170902a9 \ + --hash=sha256:da46e2b5df770070412c46f87bac0849b8d685c5f2679771de277a422c7d0b86 \ + --hash=sha256:f39812f70fc5c71a15aa3c97b2bbe213c3f2a460b79bd21c40d033bb34a9bf36 \ + --hash=sha256:ff369dd19e8fe0528b02e8df9f2aeb2479f89b1270d90f96a63500afe9af5cae # via # gcp-releasetool # secretstorage diff --git a/CHANGELOG.md b/CHANGELOG.md index 547b68d6b..091a7109b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [1.126.0](https://github.com/googleapis/java-pubsub/compare/v1.125.13...v1.126.0) (2024-01-13) + + +### Features + +* Add `use_table_schema` field to BigQueryConfig ([#1838](https://github.com/googleapis/java-pubsub/issues/1838)) ([8653f4f](https://github.com/googleapis/java-pubsub/commit/8653f4f3dbd61466b8ea05b342c5f66c9e536cf1)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.31.0 ([#1855](https://github.com/googleapis/java-pubsub/issues/1855)) ([7e733d2](https://github.com/googleapis/java-pubsub/commit/7e733d20093e0cd492758dd1ff3efc3a72eb1e0c)) +* Swap writer and reader schema to correct places in sample ([#1849](https://github.com/googleapis/java-pubsub/issues/1849)) ([1c79ad7](https://github.com/googleapis/java-pubsub/commit/1c79ad7336f51ffd4e177be5c2f2a7de902b47b8)) +* Temporarily remove publisher tests causing timeouts ([#1860](https://github.com/googleapis/java-pubsub/issues/1860)) ([a8fa24d](https://github.com/googleapis/java-pubsub/commit/a8fa24d7185d5345e746f8e2563afffe08f3bd6e)) +* Use message ordering enabled property that comes with streaming pull responses ([#1851](https://github.com/googleapis/java-pubsub/issues/1851)) ([d816138](https://github.com/googleapis/java-pubsub/commit/d8161380e232fd4be408e6298827423907a027fb)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.21.0 ([#1854](https://github.com/googleapis/java-pubsub/issues/1854)) ([b36825b](https://github.com/googleapis/java-pubsub/commit/b36825bf476f8bf83a7ca594932e03d06bc05f07)) +* Update dependency com.google.cloud:google-cloud-storage to v2.30.1 ([#1841](https://github.com/googleapis/java-pubsub/issues/1841)) ([d6f1352](https://github.com/googleapis/java-pubsub/commit/d6f1352ec3debe106ba238343c0c05b9278dc964)) + ## [1.125.13](https://github.com/googleapis/java-pubsub/compare/v1.125.12...v1.125.13) (2023-11-30) diff --git a/README.md b/README.md index c0e69f407..e8765d4ad 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.27.0 + 26.29.0 pom import @@ -44,7 +44,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.125.12 + 1.125.13 ``` @@ -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.27.0') +implementation platform('com.google.cloud:libraries-bom:26.29.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.125.12' +implementation 'com.google.cloud:google-cloud-pubsub:1.125.13' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.125.12" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.125.13" ``` @@ -409,7 +409,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.125.12 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.125.13 [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 0539a8cb7..61460ed9a 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.125.13 + 1.126.0 pom com.google.cloud google-cloud-shared-config - 1.6.1 + 1.7.1 Google Cloud pubsub BOM @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.125.13 + 1.126.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.107.13 + 1.108.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.107.13 + 1.108.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 53ad0fded..f77782b40 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.125.13 + 1.126.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.125.13 + 1.126.0 google-cloud-pubsub diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java index b257594ea..635bc92d5 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java @@ -82,6 +82,7 @@ class MessageDispatcher { private final FlowController flowController; private AtomicBoolean exactlyOnceDeliveryEnabled = new AtomicBoolean(false); + private AtomicBoolean messageOrderingEnabled = new AtomicBoolean(false); private final Waiter messagesWaiter; @@ -343,6 +344,11 @@ void setExactlyOnceDeliveryEnabled(boolean exactlyOnceDeliveryEnabled) { } } + @InternalApi + void setMessageOrderingEnabled(boolean messageOrderingEnabled) { + this.messageOrderingEnabled.set(messageOrderingEnabled); + } + private static class OutstandingMessage { private final ReceivedMessage receivedMessage; private final AckHandler ackHandler; @@ -506,7 +512,7 @@ public void run() { } } }; - if (message.getOrderingKey().isEmpty()) { + if (!messageOrderingEnabled.get() || message.getOrderingKey().isEmpty()) { executor.execute(deliverMessageTask); } else { sequentialExecutor.submit(message.getOrderingKey(), deliverMessageTask); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java index 2bf0c15f2..ddc98a2f0 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -79,19 +79,245 @@ *

Note: close() needs to be called on the SchemaServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants
CreateSchema

Creates a schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSchema(CreateSchemaRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSchema(ProjectName parent, Schema schema, String schemaId) + *
  • createSchema(String parent, Schema schema, String schemaId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSchemaCallable() + *
+ *
GetSchema

Gets a schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSchema(GetSchemaRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSchema(SchemaName name) + *
  • getSchema(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSchemaCallable() + *
+ *
ListSchemas

Lists schemas in a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSchemas(ListSchemasRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSchemas(ProjectName parent) + *
  • listSchemas(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSchemasPagedCallable() + *
  • listSchemasCallable() + *
+ *
ListSchemaRevisions

Lists all schema revisions for the named schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSchemaRevisions(ListSchemaRevisionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSchemaRevisions(SchemaName name) + *
  • listSchemaRevisions(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSchemaRevisionsPagedCallable() + *
  • listSchemaRevisionsCallable() + *
+ *
CommitSchema

Commits a new schema revision to an existing schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • commitSchema(CommitSchemaRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • commitSchema(SchemaName name, Schema schema) + *
  • commitSchema(String name, Schema schema) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • commitSchemaCallable() + *
+ *
RollbackSchema

Creates a new schema revision that is a copy of the provided revision_id.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • rollbackSchema(RollbackSchemaRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • rollbackSchema(SchemaName name, String revisionId) + *
  • rollbackSchema(String name, String revisionId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • rollbackSchemaCallable() + *
+ *
DeleteSchemaRevision

Deletes a specific schema revision.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSchemaRevision(DeleteSchemaRevisionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSchemaRevision(SchemaName name, String revisionId) + *
  • deleteSchemaRevision(String name, String revisionId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSchemaRevisionCallable() + *
+ *
DeleteSchema

Deletes a schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSchema(DeleteSchemaRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSchema(SchemaName name) + *
  • deleteSchema(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSchemaCallable() + *
+ *
ValidateSchema

Validates a schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • validateSchema(ValidateSchemaRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • validateSchema(ProjectName parent, Schema schema) + *
  • validateSchema(String parent, Schema schema) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • validateSchemaCallable() + *
+ *
ValidateMessage

Validates a message against a schema.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • validateMessage(ValidateMessageRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • validateMessageCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java index 014771f2a..7849bdb74 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java @@ -236,9 +236,12 @@ public void onResponse(StreamingPullResponse response) { boolean exactlyOnceDeliveryEnabledResponse = response.getSubscriptionProperties().getExactlyOnceDeliveryEnabled(); + boolean messageOrderingEnabledResponse = + response.getSubscriptionProperties().getMessageOrderingEnabled(); setExactlyOnceDeliveryEnabled(exactlyOnceDeliveryEnabledResponse); messageDispatcher.setExactlyOnceDeliveryEnabled(exactlyOnceDeliveryEnabledResponse); + messageDispatcher.setMessageOrderingEnabled(messageOrderingEnabledResponse); messageDispatcher.processReceivedMessages(response.getReceivedMessagesList()); // Only request more if we're not shutdown. diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 068970f64..e7617298c 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -99,19 +99,357 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants
CreateSubscription

Creates a subscription to a given topic. See the [resource name rules] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. + *

If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic, conforming to the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is populated in the returned Subscription object. Note that for REST API requests, you must specify a name in the request.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSubscription(Subscription request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSubscription(SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
  • createSubscription(SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
  • createSubscription(String name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
  • createSubscription(String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSubscriptionCallable() + *
+ *
GetSubscription

Gets the configuration details of a subscription.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSubscription(GetSubscriptionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSubscription(SubscriptionName subscription) + *
  • getSubscription(String subscription) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSubscriptionCallable() + *
+ *
UpdateSubscription

Updates an existing subscription. Note that certain properties of a subscription, such as its topic, are not modifiable.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSubscription(UpdateSubscriptionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSubscription(Subscription subscription, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSubscriptionCallable() + *
+ *
ListSubscriptions

Lists matching subscriptions.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSubscriptions(ListSubscriptionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSubscriptions(ProjectName project) + *
  • listSubscriptions(String project) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSubscriptionsPagedCallable() + *
  • listSubscriptionsCallable() + *
+ *
DeleteSubscription

Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSubscription(DeleteSubscriptionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSubscription(SubscriptionName subscription) + *
  • deleteSubscription(String subscription) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSubscriptionCallable() + *
+ *
ModifyAckDeadline

Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • modifyAckDeadline(ModifyAckDeadlineRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • modifyAckDeadline(SubscriptionName subscription, List<String> ackIds, int ackDeadlineSeconds) + *
  • modifyAckDeadline(String subscription, List<String> ackIds, int ackDeadlineSeconds) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • modifyAckDeadlineCallable() + *
+ *
Acknowledge

Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. + *

Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • acknowledge(AcknowledgeRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • acknowledge(SubscriptionName subscription, List<String> ackIds) + *
  • acknowledge(String subscription, List<String> ackIds) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • acknowledgeCallable() + *
+ *
Pull

Pulls messages from the server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • pull(PullRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • pull(SubscriptionName subscription, int maxMessages) + *
  • pull(String subscription, int maxMessages) + *
  • pull(SubscriptionName subscription, boolean returnImmediately, int maxMessages) + *
  • pull(String subscription, boolean returnImmediately, int maxMessages) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • pullCallable() + *
+ *
StreamingPull

Establishes a stream with the server, which sends messages down to the client. The client streams acknowledgements and ack deadline modifications back to the server. The server will close the stream and return the status on any error. The server may close the stream with status `UNAVAILABLE` to reassign server-side resources, in which case, the client should re-establish the stream. Flow control can be achieved by configuring the underlying RPC channel.

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • streamingPullCallable() + *
+ *
ModifyPushConfig

Modifies the `PushConfig` for a specified subscription. + *

This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • modifyPushConfig(ModifyPushConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) + *
  • modifyPushConfig(String subscription, PushConfig pushConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • modifyPushConfigCallable() + *
+ *
GetSnapshot

Gets the configuration details of a snapshot. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSnapshot(GetSnapshotRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSnapshot(SnapshotName snapshot) + *
  • getSnapshot(String snapshot) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSnapshotCallable() + *
+ *
ListSnapshots

Lists the existing snapshots. Snapshots are used in [Seek]( https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSnapshots(ListSnapshotsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSnapshots(ProjectName project) + *
  • listSnapshots(String project) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSnapshotsPagedCallable() + *
  • listSnapshotsCallable() + *
+ *
CreateSnapshot

Creates a snapshot from the requested subscription. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. If the snapshot already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the `Snapshot.expire_time` field. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription, conforming to the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must specify a name in the request.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSnapshot(CreateSnapshotRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSnapshot(SnapshotName name, SubscriptionName subscription) + *
  • createSnapshot(SnapshotName name, String subscription) + *
  • createSnapshot(String name, SubscriptionName subscription) + *
  • createSnapshot(String name, String subscription) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSnapshotCallable() + *
+ *
UpdateSnapshot

Updates an existing snapshot. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSnapshot(UpdateSnapshotRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSnapshot(Snapshot snapshot, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSnapshotCallable() + *
+ *
DeleteSnapshot

Removes an existing snapshot. Snapshots are used in [Seek] (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new one may be created with the same name, but the new one has no association with the old snapshot or its subscription, unless the same subscription is specified.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSnapshot(DeleteSnapshotRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSnapshot(SnapshotName snapshot) + *
  • deleteSnapshot(String snapshot) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSnapshotCallable() + *
+ *
Seek

Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided in the request. Snapshots are used in [Seek] (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. Note that both the subscription and the snapshot must be on the same topic.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • seek(SeekRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • seekCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index b1f0dc35f..4e2652585 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -80,19 +80,226 @@ *

Note: close() needs to be called on the TopicAdminClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants
CreateTopic

Creates the given topic with the given name. See the [resource name rules] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTopic(Topic request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTopic(TopicName name) + *
  • createTopic(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTopicCallable() + *
+ *
UpdateTopic

Updates an existing topic. Note that certain properties of a topic are not modifiable.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateTopic(UpdateTopicRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateTopic(Topic topic, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateTopicCallable() + *
+ *
Publish

Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • publish(PublishRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • publish(TopicName topic, List<PubsubMessage> messages) + *
  • publish(String topic, List<PubsubMessage> messages) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • publishCallable() + *
+ *
GetTopic

Gets the configuration of a topic.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTopic(GetTopicRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTopic(TopicName topic) + *
  • getTopic(String topic) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTopicCallable() + *
+ *
ListTopics

Lists matching topics.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTopics(ListTopicsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTopics(ProjectName project) + *
  • listTopics(String project) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTopicsPagedCallable() + *
  • listTopicsCallable() + *
+ *
ListTopicSubscriptions

Lists the names of the attached subscriptions on this topic.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTopicSubscriptions(ListTopicSubscriptionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTopicSubscriptions(TopicName topic) + *
  • listTopicSubscriptions(String topic) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTopicSubscriptionsPagedCallable() + *
  • listTopicSubscriptionsCallable() + *
+ *
ListTopicSnapshots

Lists the names of the snapshots on this topic. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTopicSnapshots(ListTopicSnapshotsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTopicSnapshots(TopicName topic) + *
  • listTopicSnapshots(String topic) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTopicSnapshotsPagedCallable() + *
  • listTopicSnapshotsCallable() + *
+ *
DeleteTopic

Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteTopic(DeleteTopicRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteTopic(TopicName topic) + *
  • deleteTopic(String topic) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteTopicCallable() + *
+ *
DetachSubscription

Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • detachSubscription(DetachSubscriptionRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • detachSubscriptionCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java index 73510eee0..f3c495688 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java @@ -480,6 +480,12 @@ public PublisherStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "pubsub"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java index 3be71b72a..8b036328d 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java @@ -340,6 +340,12 @@ public SchemaServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "pubsub"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java index 459c80624..c517f17d6 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java @@ -385,6 +385,12 @@ public SubscriberStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "pubsub"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java index 9321272b4..c608ee8d5 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java @@ -30,18 +30,41 @@ import java.util.concurrent.*; import org.junit.Before; import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; import org.threeten.bp.Duration; public class MessageDispatcherTest { private static final ByteString MESSAGE_DATA = ByteString.copyFromUtf8("message-data"); private static final int DELIVERY_INFO_COUNT = 3; private static final String ACK_ID = "ACK-ID"; + private static final String ORDERING_KEY = "KEY"; private static final ReceivedMessage TEST_MESSAGE = ReceivedMessage.newBuilder() .setAckId(ACK_ID) .setMessage(PubsubMessage.newBuilder().setData(MESSAGE_DATA).build()) .setDeliveryAttempt(DELIVERY_INFO_COUNT) .build(); + private static final ByteString ORDERED_MESSAGE_DATA_1 = ByteString.copyFromUtf8("message-data1"); + private static final ReceivedMessage ORDERED_TEST_MESSAGE_1 = + ReceivedMessage.newBuilder() + .setAckId("ACK-ID-1") + .setMessage( + PubsubMessage.newBuilder() + .setData(ORDERED_MESSAGE_DATA_1) + .setOrderingKey(ORDERING_KEY) + .build()) + .build(); + private static final ByteString ORDERED_MESSAGE_DATA_2 = ByteString.copyFromUtf8("message-data2"); + private static final ReceivedMessage ORDERED_TEST_MESSAGE_2 = + ReceivedMessage.newBuilder() + .setAckId("ACK-ID-2") + .setMessage( + PubsubMessage.newBuilder() + .setData(ORDERED_MESSAGE_DATA_2) + .setOrderingKey(ORDERING_KEY) + .build()) + .build(); private static final int MAX_SECONDS_PER_ACK_EXTENSION = 60; private static final int MIN_ACK_DEADLINE_SECONDS = 10; private static final Duration MAX_ACK_EXTENSION_PERIOD = Duration.ofMinutes(60); @@ -494,6 +517,84 @@ public void testAckExtensionDefaultsExactlyOnceDeliveryEnabledThenDisabled() { Math.toIntExact(Subscriber.MAX_STREAM_ACK_DEADLINE.getSeconds())); } + @Test + public void testOrderedDeliveryOrderingDisabled() throws Exception { + MessageReceiver mockMessageReceiver = mock(MessageReceiver.class); + MessageDispatcher messageDispatcher = + getMessageDispatcher(mockMessageReceiver, Executors.newFixedThreadPool(5)); + + // This would normally be set from the streaming pull response in the + // StreamingSubscriberConnection + messageDispatcher.setMessageOrderingEnabled(false); + + CountDownLatch receiveCalls = new CountDownLatch(2); + + doAnswer( + new Answer() { + public Void answer(InvocationOnMock invocation) throws Exception { + Thread.sleep(1000); + receiveCalls.countDown(); + return null; + } + }) + .when(mockMessageReceiver) + .receiveMessage(eq(ORDERED_TEST_MESSAGE_1.getMessage()), any(AckReplyConsumer.class)); + doAnswer( + new Answer() { + public Void answer(InvocationOnMock invocation) { + // Ensure the previous method didn't finish and we could process in parallel. + assertEquals(2, receiveCalls.getCount()); + receiveCalls.countDown(); + return null; + } + }) + .when(mockMessageReceiver) + .receiveMessage(eq(ORDERED_TEST_MESSAGE_2.getMessage()), any(AckReplyConsumer.class)); + + messageDispatcher.processReceivedMessages( + Arrays.asList(ORDERED_TEST_MESSAGE_1, ORDERED_TEST_MESSAGE_2)); + receiveCalls.await(); + } + + @Test + public void testOrderedDeliveryOrderingEnabled() throws Exception { + MessageReceiver mockMessageReceiver = mock(MessageReceiver.class); + MessageDispatcher messageDispatcher = + getMessageDispatcher(mockMessageReceiver, Executors.newFixedThreadPool(5)); + + // This would normally be set from the streaming pull response in the + // StreamingSubscriberConnection + messageDispatcher.setMessageOrderingEnabled(true); + + CountDownLatch receiveCalls = new CountDownLatch(2); + + doAnswer( + new Answer() { + public Void answer(InvocationOnMock invocation) throws Exception { + Thread.sleep(1000); + receiveCalls.countDown(); + return null; + } + }) + .when(mockMessageReceiver) + .receiveMessage(eq(ORDERED_TEST_MESSAGE_1.getMessage()), any(AckReplyConsumer.class)); + doAnswer( + new Answer() { + public Void answer(InvocationOnMock invocation) { + // Ensure the previous method has finished completely. + assertEquals(1, receiveCalls.getCount()); + receiveCalls.countDown(); + return null; + } + }) + .when(mockMessageReceiver) + .receiveMessage(eq(ORDERED_TEST_MESSAGE_2.getMessage()), any(AckReplyConsumer.class)); + + messageDispatcher.processReceivedMessages( + Arrays.asList(ORDERED_TEST_MESSAGE_1, ORDERED_TEST_MESSAGE_2)); + receiveCalls.await(); + } + @Test public void testAckExtensionCustomMinExactlyOnceDeliveryDisabledThenEnabled() { int customMinSeconds = 30; @@ -569,20 +670,28 @@ private void assertMinAndMaxAckDeadlines( } private MessageDispatcher getMessageDispatcher() { - return getMessageDispatcher(mock(MessageReceiver.class)); + return getMessageDispatcher(mock(MessageReceiver.class), MoreExecutors.directExecutor()); } private MessageDispatcher getMessageDispatcher(MessageReceiver messageReceiver) { - return getMessageDispatcherFromBuilder(MessageDispatcher.newBuilder(messageReceiver)); + return getMessageDispatcherFromBuilder( + MessageDispatcher.newBuilder(messageReceiver), MoreExecutors.directExecutor()); + } + + private MessageDispatcher getMessageDispatcher( + MessageReceiver messageReceiver, Executor executor) { + return getMessageDispatcherFromBuilder(MessageDispatcher.newBuilder(messageReceiver), executor); } private MessageDispatcher getMessageDispatcher( MessageReceiverWithAckResponse messageReceiverWithAckResponse) { return getMessageDispatcherFromBuilder( - MessageDispatcher.newBuilder(messageReceiverWithAckResponse)); + MessageDispatcher.newBuilder(messageReceiverWithAckResponse), + MoreExecutors.directExecutor()); } - private MessageDispatcher getMessageDispatcherFromBuilder(MessageDispatcher.Builder builder) { + private MessageDispatcher getMessageDispatcherFromBuilder( + MessageDispatcher.Builder builder, Executor executor) { MessageDispatcher messageDispatcher = builder .setAckProcessor(mockAckProcessor) @@ -594,7 +703,7 @@ private MessageDispatcher getMessageDispatcherFromBuilder(MessageDispatcher.Buil .setMaxDurationPerAckExtensionDefaultUsed(true) .setAckLatencyDistribution(mock(Distribution.class)) .setFlowController(mock(FlowController.class)) - .setExecutor(MoreExecutors.directExecutor()) + .setExecutor(executor) .setSystemExecutor(systemExecutor) .setApiClock(clock) .build(); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java index 9985efc6b..9785b7716 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java @@ -56,7 +56,6 @@ import java.util.concurrent.TimeUnit; import org.easymock.EasyMock; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -501,7 +500,6 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); } - @Test /** * Make sure that resume publishing works as expected: * @@ -513,6 +511,10 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { *

  • publish with key orderA, which should now succeed * */ + /* + Temporarily disabled due to https://github.com/googleapis/java-pubsub/issues/1861. + TODO(maitrimangal): Enable once resolved. + @Test public void testResumePublish() throws Exception { Publisher publisher = getTestPublisherBuilder() @@ -538,13 +540,13 @@ public void testResumePublish() throws Exception { try { future1.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { } try { future2.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { } @@ -554,14 +556,14 @@ public void testResumePublish() throws Exception { try { future3.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); } try { future4.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); } @@ -641,6 +643,7 @@ public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws E assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); } } + */ private ApiFuture sendTestMessageWithOrderingKey( Publisher publisher, String data, String orderingKey) { diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 601f8793c..f3e521109 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.107.13 + 1.108.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.125.13 + 1.126.0 diff --git a/pom.xml b/pom.xml index 4f538ab53..7cf0b592e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.125.13 + 1.126.0 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.6.1 + 1.7.1 @@ -61,7 +61,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.20.0 + 3.21.0 pom import @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.107.13 + 1.108.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.107.13 + 1.108.0 com.google.cloud google-cloud-pubsub - 1.125.13 + 1.126.0 @@ -104,7 +104,7 @@ com.google.truth truth - 1.1.5 + 1.2.0 test @@ -145,7 +145,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.5 + 3.5.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index 977e30241..e27b4d615 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.107.13 + 1.108.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.125.13 + 1.126.0 diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java index 536ed0caf..2683f75df 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java @@ -333,11 +333,12 @@ public com.google.protobuf.ByteString getTableBytes() { * * *
    -   * When true, use the topic's schema as the columns to write to in BigQuery,
    -   * if it exists.
    +   * Optional. When true, use the topic's schema as the columns to write to in
    +   * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
    +   * enabled at the same time.
        * 
    * - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @@ -431,6 +432,26 @@ public com.google.pubsub.v1.BigQueryConfig.State getState() { return result == null ? com.google.pubsub.v1.BigQueryConfig.State.UNRECOGNIZED : result; } + public static final int USE_TABLE_SCHEMA_FIELD_NUMBER = 6; + private boolean useTableSchema_ = false; + /** + * + * + *
    +   * Optional. When true, use the BigQuery table's schema as the columns to
    +   * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
    +   * enabled at the same time.
    +   * 
    + * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useTableSchema. + */ + @java.lang.Override + public boolean getUseTableSchema() { + return useTableSchema_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -460,6 +481,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (state_ != com.google.pubsub.v1.BigQueryConfig.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(5, state_); } + if (useTableSchema_ != false) { + output.writeBool(6, useTableSchema_); + } getUnknownFields().writeTo(output); } @@ -484,6 +508,9 @@ public int getSerializedSize() { if (state_ != com.google.pubsub.v1.BigQueryConfig.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); } + if (useTableSchema_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, useTableSchema_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -504,6 +531,7 @@ public boolean equals(final java.lang.Object obj) { if (getWriteMetadata() != other.getWriteMetadata()) return false; if (getDropUnknownFields() != other.getDropUnknownFields()) return false; if (state_ != other.state_) return false; + if (getUseTableSchema() != other.getUseTableSchema()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -525,6 +553,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDropUnknownFields()); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; + hash = (37 * hash) + USE_TABLE_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseTableSchema()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -668,6 +698,7 @@ public Builder clear() { writeMetadata_ = false; dropUnknownFields_ = false; state_ = 0; + useTableSchema_ = false; return this; } @@ -718,6 +749,9 @@ private void buildPartial0(com.google.pubsub.v1.BigQueryConfig result) { if (((from_bitField0_ & 0x00000010) != 0)) { result.state_ = state_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.useTableSchema_ = useTableSchema_; + } } @java.lang.Override @@ -782,6 +816,9 @@ public Builder mergeFrom(com.google.pubsub.v1.BigQueryConfig other) { if (other.state_ != 0) { setStateValue(other.getStateValue()); } + if (other.getUseTableSchema() != false) { + setUseTableSchema(other.getUseTableSchema()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -838,6 +875,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 40 + case 48: + { + useTableSchema_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -973,11 +1016,12 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { * * *
    -     * When true, use the topic's schema as the columns to write to in BigQuery,
    -     * if it exists.
    +     * Optional. When true, use the topic's schema as the columns to write to in
    +     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
    +     * enabled at the same time.
          * 
    * - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @@ -989,11 +1033,12 @@ public boolean getUseTopicSchema() { * * *
    -     * When true, use the topic's schema as the columns to write to in BigQuery,
    -     * if it exists.
    +     * Optional. When true, use the topic's schema as the columns to write to in
    +     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
    +     * enabled at the same time.
          * 
    * - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The useTopicSchema to set. * @return This builder for chaining. @@ -1009,11 +1054,12 @@ public Builder setUseTopicSchema(boolean value) { * * *
    -     * When true, use the topic's schema as the columns to write to in BigQuery,
    -     * if it exists.
    +     * Optional. When true, use the topic's schema as the columns to write to in
    +     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
    +     * enabled at the same time.
          * 
    * - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1259,6 +1305,65 @@ public Builder clearState() { return this; } + private boolean useTableSchema_; + /** + * + * + *
    +     * Optional. When true, use the BigQuery table's schema as the columns to
    +     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
    +     * enabled at the same time.
    +     * 
    + * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useTableSchema. + */ + @java.lang.Override + public boolean getUseTableSchema() { + return useTableSchema_; + } + /** + * + * + *
    +     * Optional. When true, use the BigQuery table's schema as the columns to
    +     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
    +     * enabled at the same time.
    +     * 
    + * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The useTableSchema to set. + * @return This builder for chaining. + */ + public Builder setUseTableSchema(boolean value) { + + useTableSchema_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. When true, use the BigQuery table's schema as the columns to
    +     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
    +     * enabled at the same time.
    +     * 
    + * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUseTableSchema() { + bitField0_ = (bitField0_ & ~0x00000020); + useTableSchema_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java index a498ded18..bc805214f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java @@ -54,11 +54,12 @@ public interface BigQueryConfigOrBuilder * * *
    -   * When true, use the topic's schema as the columns to write to in BigQuery,
    -   * if it exists.
    +   * Optional. When true, use the topic's schema as the columns to write to in
    +   * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
    +   * enabled at the same time.
        * 
    * - * bool use_topic_schema = 2; + * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @@ -128,4 +129,19 @@ public interface BigQueryConfigOrBuilder * @return The state. */ com.google.pubsub.v1.BigQueryConfig.State getState(); + + /** + * + * + *
    +   * Optional. When true, use the BigQuery table's schema as the columns to
    +   * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
    +   * enabled at the same time.
    +   * 
    + * + * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useTableSchema. + */ + boolean getUseTableSchema(); } 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 fcb75b41f..b680117a0 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 @@ -383,230 +383,231 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "dience\030\002 \001(\t\032\017\n\rPubsubWrapper\032#\n\tNoWrapp" + "er\022\026\n\016write_metadata\030\001 \001(\010\0321\n\017Attributes" + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n" - + "\025authentication_methodB\t\n\007wrapper\"\222\002\n\016Bi" - + "gQueryConfig\022\r\n\005table\030\001 \001(\t\022\030\n\020use_topic" - + "_schema\030\002 \001(\010\022\026\n\016write_metadata\030\003 \001(\010\022\033\n" - + "\023drop_unknown_fields\030\004 \001(\010\022;\n\005state\030\005 \001(" - + "\0162&.google.pubsub.v1.BigQueryConfig.Stat" - + "eB\004\342A\001\003\"e\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\023\n\017SCHEMA_MISMATCH\020\004\"\210\004\n\022Cloud" - + "StorageConfig\022\024\n\006bucket\030\001 \001(\tB\004\342A\001\002\022\027\n\017f" - + "ilename_prefix\030\002 \001(\t\022\027\n\017filename_suffix\030" - + "\003 \001(\t\022F\n\013text_config\030\004 \001(\0132/.google.pubs" - + "ub.v1.CloudStorageConfig.TextConfigH\000\022F\n" - + "\013avro_config\030\005 \001(\0132/.google.pubsub.v1.Cl" - + "oudStorageConfig.AvroConfigH\000\022/\n\014max_dur" - + "ation\030\006 \001(\0132\031.google.protobuf.Duration\022\021" - + "\n\tmax_bytes\030\007 \001(\003\022?\n\005state\030\t \001(\0162*.googl" - + "e.pubsub.v1.CloudStorageConfig.StateB\004\342A" - + "\001\003\032\014\n\nTextConfig\032$\n\nAvroConfig\022\026\n\016write_" - + "metadata\030\001 \001(\010\"P\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020" - + "\002\022\r\n\tNOT_FOUND\020\003B\017\n\routput_format\"m\n\017Rec" - + "eivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030" - + "\002 \001(\0132\037.google.pubsub.v1.PubsubMessage\022\030" - + "\n\020delivery_attempt\030\003 \001(\005\"[\n\026GetSubscript" - + "ionRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A" - + "$\n\"pubsub.googleapis.com/Subscription\"\216\001" - + "\n\031UpdateSubscriptionRequest\022:\n\014subscript" - + "ion\030\001 \001(\0132\036.google.pubsub.v1.Subscriptio" - + "nB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.pr" - + "otobuf.FieldMaskB\004\342A\001\002\"\210\001\n\030ListSubscript" - + "ionsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002\372A-\n+c" - + "loudresourcemanager.googleapis.com/Proje" - + "ct\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\"k\n\031ListSubscriptionsResponse\0225\n\rsubscr" - + "iptions\030\001 \003(\0132\036.google.pubsub.v1.Subscri" - + "ption\022\027\n\017next_page_token\030\002 \001(\t\"^\n\031Delete" - + "SubscriptionRequest\022A\n\014subscription\030\001 \001(" - + "\tB+\342A\001\002\372A$\n\"pubsub.googleapis.com/Subscr" - + "iption\"\225\001\n\027ModifyPushConfigRequest\022A\n\014su" - + "bscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.google" - + "apis.com/Subscription\0227\n\013push_config\030\002 \001" - + "(\0132\034.google.pubsub.v1.PushConfigB\004\342A\001\002\"\220" - + "\001\n\013PullRequest\022A\n\014subscription\030\001 \001(\tB+\342A" - + "\001\002\372A$\n\"pubsub.googleapis.com/Subscriptio" - + "n\022\"\n\022return_immediately\030\002 \001(\010B\006\030\001\342A\001\001\022\032\n" - + "\014max_messages\030\003 \001(\005B\004\342A\001\002\"L\n\014PullRespons" - + "e\022<\n\021received_messages\030\001 \003(\0132!.google.pu" - + "bsub.v1.ReceivedMessage\"\230\001\n\030ModifyAckDea" - + "dlineRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002" + + "\025authentication_methodB\t\n\007wrapper\"\270\002\n\016Bi" + + "gQueryConfig\022\r\n\005table\030\001 \001(\t\022\036\n\020use_topic" + + "_schema\030\002 \001(\010B\004\342A\001\001\022\026\n\016write_metadata\030\003 " + + "\001(\010\022\033\n\023drop_unknown_fields\030\004 \001(\010\022;\n\005stat" + + "e\030\005 \001(\0162&.google.pubsub.v1.BigQueryConfi" + + "g.StateB\004\342A\001\003\022\036\n\020use_table_schema\030\006 \001(\010B" + + "\004\342A\001\001\"e\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\tNOT_" + + "FOUND\020\003\022\023\n\017SCHEMA_MISMATCH\020\004\"\210\004\n\022CloudSt" + + "orageConfig\022\024\n\006bucket\030\001 \001(\tB\004\342A\001\002\022\027\n\017fil" + + "ename_prefix\030\002 \001(\t\022\027\n\017filename_suffix\030\003 " + + "\001(\t\022F\n\013text_config\030\004 \001(\0132/.google.pubsub" + + ".v1.CloudStorageConfig.TextConfigH\000\022F\n\013a" + + "vro_config\030\005 \001(\0132/.google.pubsub.v1.Clou" + + "dStorageConfig.AvroConfigH\000\022/\n\014max_durat" + + "ion\030\006 \001(\0132\031.google.protobuf.Duration\022\021\n\t" + + "max_bytes\030\007 \001(\003\022?\n\005state\030\t \001(\0162*.google." + + "pubsub.v1.CloudStorageConfig.StateB\004\342A\001\003" + + "\032\014\n\nTextConfig\032$\n\nAvroConfig\022\026\n\016write_me" + + "tadata\030\001 \001(\010\"P\n\005State\022\025\n\021STATE_UNSPECIFI" + + "ED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022" + + "\r\n\tNOT_FOUND\020\003B\017\n\routput_format\"m\n\017Recei" + + "vedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030\002 " + + "\001(\0132\037.google.pubsub.v1.PubsubMessage\022\030\n\020" + + "delivery_attempt\030\003 \001(\005\"[\n\026GetSubscriptio" + + "nRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\216\001\n\031" + + "UpdateSubscriptionRequest\022:\n\014subscriptio" + + "n\030\001 \001(\0132\036.google.pubsub.v1.SubscriptionB" + + "\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.prot" + + "obuf.FieldMaskB\004\342A\001\002\"\210\001\n\030ListSubscriptio" + + "nsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002\372A-\n+clo" + + "udresourcemanager.googleapis.com/Project" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" + + "k\n\031ListSubscriptionsResponse\0225\n\rsubscrip" + + "tions\030\001 \003(\0132\036.google.pubsub.v1.Subscript" + + "ion\022\027\n\017next_page_token\030\002 \001(\t\"^\n\031DeleteSu" + + "bscriptionRequest\022A\n\014subscription\030\001 \001(\tB" + + "+\342A\001\002\372A$\n\"pubsub.googleapis.com/Subscrip" + + "tion\"\225\001\n\027ModifyPushConfigRequest\022A\n\014subs" + + "cription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.googleap" + + "is.com/Subscription\0227\n\013push_config\030\002 \001(\013" + + "2\034.google.pubsub.v1.PushConfigB\004\342A\001\002\"\220\001\n" + + "\013PullRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002" + "\372A$\n\"pubsub.googleapis.com/Subscription\022" - + "\025\n\007ack_ids\030\004 \003(\tB\004\342A\001\002\022\"\n\024ack_deadline_s" - + "econds\030\003 \001(\005B\004\342A\001\002\"n\n\022AcknowledgeRequest" - + "\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub." - + "googleapis.com/Subscription\022\025\n\007ack_ids\030\002" - + " \003(\tB\004\342A\001\002\"\253\002\n\024StreamingPullRequest\022A\n\014s" - + "ubscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.googl" - + "eapis.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022" - + "\037\n\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027modi" - + "fy_deadline_ack_ids\030\004 \003(\t\022)\n\033stream_ack_" - + "deadline_seconds\030\005 \001(\005B\004\342A\001\002\022\021\n\tclient_i" - + "d\030\006 \001(\t\022 \n\030max_outstanding_messages\030\007 \001(" - + "\003\022\035\n\025max_outstanding_bytes\030\010 \001(\003\"\335\005\n\025Str" - + "eamingPullResponse\022<\n\021received_messages\030" - + "\001 \003(\0132!.google.pubsub.v1.ReceivedMessage" - + "\022a\n\030acknowledge_confirmation\030\005 \001(\0132?.goo" - + "gle.pubsub.v1.StreamingPullResponse.Ackn" - + "owledgeConfirmation\022o\n modify_ack_deadli" - + "ne_confirmation\030\003 \001(\0132E.google.pubsub.v1" - + ".StreamingPullResponse.ModifyAckDeadline" - + "Confirmation\022_\n\027subscription_properties\030" - + "\004 \001(\0132>.google.pubsub.v1.StreamingPullRe" - + "sponse.SubscriptionProperties\032\200\001\n\027Acknow" - + "ledgeConfirmation\022\017\n\007ack_ids\030\001 \003(\t\022\027\n\017in" - + "valid_ack_ids\030\002 \003(\t\022\031\n\021unordered_ack_ids" - + "\030\003 \003(\t\022 \n\030temporary_failed_ack_ids\030\004 \003(\t" - + "\032k\n\035ModifyAckDeadlineConfirmation\022\017\n\007ack" - + "_ids\030\001 \003(\t\022\027\n\017invalid_ack_ids\030\002 \003(\t\022 \n\030t" - + "emporary_failed_ack_ids\030\003 \003(\t\032a\n\026Subscri" - + "ptionProperties\022%\n\035exactly_once_delivery" - + "_enabled\030\001 \001(\010\022 \n\030message_ordering_enabl" - + "ed\030\002 \001(\010\"\205\002\n\025CreateSnapshotRequest\0225\n\004na" - + "me\030\001 \001(\tB\'\342A\001\002\372A \n\036pubsub.googleapis.com" - + "/Snapshot\022A\n\014subscription\030\002 \001(\tB+\342A\001\002\372A$" - + "\n\"pubsub.googleapis.com/Subscription\022C\n\006" - + "labels\030\003 \003(\01323.google.pubsub.v1.CreateSn" - + "apshotRequest.LabelsEntry\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\202\001\n\025Upd" - + "ateSnapshotRequest\0222\n\010snapshot\030\001 \001(\0132\032.g" - + "oogle.pubsub.v1.SnapshotB\004\342A\001\002\0225\n\013update" - + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB" - + "\004\342A\001\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topi" - + "c\030\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topi" - + "c\022/\n\013expire_time\030\003 \001(\0132\032.google.protobuf" - + ".Timestamp\0226\n\006labels\030\004 \003(\0132&.google.pubs" - + "ub.v1.Snapshot.LabelsEntry\032-\n\013LabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036" - + "pubsub.googleapis.com/Snapshot\022\'projects" - + "/{project}/snapshots/{snapshot}\"O\n\022GetSn" - + "apshotRequest\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A " - + "\n\036pubsub.googleapis.com/Snapshot\"\204\001\n\024Lis" - + "tSnapshotsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002" - + "\372A-\n+cloudresourcemanager.googleapis.com" - + "/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" - + "n\030\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnap" - + "shots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022" - + "\027\n\017next_page_token\030\002 \001(\t\"R\n\025DeleteSnapsh" - + "otRequest\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A \n\036pu" - + "bsub.googleapis.com/Snapshot\"\277\001\n\013SeekReq" - + "uest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pub" - + "sub.googleapis.com/Subscription\022*\n\004time\030" - + "\002 \001(\0132\032.google.protobuf.TimestampH\000\0227\n\010s" - + "napshot\030\003 \001(\tB#\372A \n\036pubsub.googleapis.co" - + "m/SnapshotH\000B\010\n\006target\"\016\n\014SeekResponse2\270" - + "\013\n\tPublisher\022q\n\013CreateTopic\022\027.google.pub" - + "sub.v1.Topic\032\027.google.pubsub.v1.Topic\"0\332" - + "A\004name\202\323\344\223\002#\032\036/v1/{name=projects/*/topic" - + "s/*}:\001*\022\221\001\n\013UpdateTopic\022$.google.pubsub." - + "v1.UpdateTopicRequest\032\027.google.pubsub.v1" - + ".Topic\"C\332A\021topic,update_mask\202\323\344\223\002)2$/v1/" - + "{topic.name=projects/*/topics/*}:\001*\022\223\001\n\007" - + "Publish\022 .google.pubsub.v1.PublishReques" - + "t\032!.google.pubsub.v1.PublishResponse\"C\332A" - + "\016topic,messages\202\323\344\223\002,\"\'/v1/{topic=projec" - + "ts/*/topics/*}:publish:\001*\022w\n\010GetTopic\022!." - + "google.pubsub.v1.GetTopicRequest\032\027.googl" - + "e.pubsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{" - + "topic=projects/*/topics/*}\022\212\001\n\nListTopic" - + "s\022#.google.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/.goo" - + "gle.pubsub.v1.ListTopicSubscriptionsRequ" - + "est\0320.google.pubsub.v1.ListTopicSubscrip" - + "tionsResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topi" - + "c=projects/*/topics/*}/subscriptions\022\252\001\n" - + "\022ListTopicSnapshots\022+.google.pubsub.v1.L" - + "istTopicSnapshotsRequest\032,.google.pubsub" - + ".v1.ListTopicSnapshotsResponse\"9\332A\005topic" - + "\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/" - + "snapshots\022|\n\013DeleteTopic\022$.google.pubsub" - + ".v1.DeleteTopicRequest\032\026.google.protobuf" - + ".Empty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=proje" - + "cts/*/topics/*}\022\255\001\n\022DetachSubscription\022+" - + ".google.pubsub.v1.DetachSubscriptionRequ" - + "est\032,.google.pubsub.v1.DetachSubscriptio" - + "nResponse\"<\202\323\344\223\0026\"4/v1/{subscription=pro" - + "jects/*/subscriptions/*}:detach\032p\312A\025pubs" - + "ub.googleapis.com\322AUhttps://www.googleap" - + "is.com/auth/cloud-platform,https://www.g" - + "oogleapis.com/auth/pubsub2\322\025\n\nSubscriber" - + "\022\264\001\n\022CreateSubscription\022\036.google.pubsub." - + "v1.Subscription\032\036.google.pubsub.v1.Subsc" - + "ription\"^\332A+name,topic,push_config,ack_d" - + "eadline_seconds\202\323\344\223\002*\032%/v1/{name=project" - + "s/*/subscriptions/*}:\001*\022\241\001\n\017GetSubscript" - + "ion\022(.google.pubsub.v1.GetSubscriptionRe" - + "quest\032\036.google.pubsub.v1.Subscription\"D\332" - + "A\014subscription\202\323\344\223\002/\022-/v1/{subscription=" - + "projects/*/subscriptions/*}\022\273\001\n\022UpdateSu" - + "bscription\022+.google.pubsub.v1.UpdateSubs" - + "criptionRequest\032\036.google.pubsub.v1.Subsc" - + "ription\"X\332A\030subscription,update_mask\202\323\344\223" - + "\002722/v1/{subscription.name=projects/*/su" - + "bscriptions/*}:\001*\022\246\001\n\021ListSubscriptions\022" - + "*.google.pubsub.v1.ListSubscriptionsRequ" - + "est\032+.google.pubsub.v1.ListSubscriptions" - + "Response\"8\332A\007project\202\323\344\223\002(\022&/v1/{project" - + "=projects/*}/subscriptions\022\237\001\n\022DeleteSub" - + "scription\022+.google.pubsub.v1.DeleteSubsc" - + "riptionRequest\032\026.google.protobuf.Empty\"D" - + "\332A\014subscription\202\323\344\223\002/*-/v1/{subscription" - + "=projects/*/subscriptions/*}\022\317\001\n\021ModifyA" - + "ckDeadline\022*.google.pubsub.v1.ModifyAckD" - + "eadlineRequest\032\026.google.protobuf.Empty\"v" - + "\332A)subscription,ack_ids,ack_deadline_sec" - + "onds\202\323\344\223\002D\"?/v1/{subscription=projects/*" - + "/subscriptions/*}:modifyAckDeadline:\001*\022\250" - + "\001\n\013Acknowledge\022$.google.pubsub.v1.Acknow" - + "ledgeRequest\032\026.google.protobuf.Empty\"[\332A" - + "\024subscription,ack_ids\202\323\344\223\002>\"9/v1/{subscr" - + "iption=projects/*/subscriptions/*}:ackno" - + "wledge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.Pu" - + "llRequest\032\036.google.pubsub.v1.PullRespons" - + "e\"\210\001\332A,subscription,return_immediately,m" - + "ax_messages\332A\031subscription,max_messages\202" - + "\323\344\223\0027\"2/v1/{subscription=projects/*/subs" - + "criptions/*}:pull:\001*\022f\n\rStreamingPull\022&." - + "google.pubsub.v1.StreamingPullRequest\032\'." - + "google.pubsub.v1.StreamingPullResponse\"\000" - + "(\0010\001\022\273\001\n\020ModifyPushConfig\022).google.pubsu" - + "b.v1.ModifyPushConfigRequest\032\026.google.pr" - + "otobuf.Empty\"d\332A\030subscription,push_confi" - + "g\202\323\344\223\002C\">/v1/{subscription=projects/*/su" - + "bscriptions/*}:modifyPushConfig:\001*\022\211\001\n\013G" - + "etSnapshot\022$.google.pubsub.v1.GetSnapsho" - + "tRequest\032\032.google.pubsub.v1.Snapshot\"8\332A" - + "\010snapshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/" - + "*/snapshots/*}\022\226\001\n\rListSnapshots\022&.googl" - + "e.pubsub.v1.ListSnapshotsRequest\032\'.googl" - + "e.pubsub.v1.ListSnapshotsResponse\"4\332A\007pr" - + "oject\202\323\344\223\002$\022\"/v1/{project=projects/*}/sn" - + "apshots\022\227\001\n\016CreateSnapshot\022\'.google.pubs" - + "ub.v1.CreateSnapshotRequest\032\032.google.pub" - + "sub.v1.Snapshot\"@\332A\021name,subscription\202\323\344" - + "\223\002&\032!/v1/{name=projects/*/snapshots/*}:\001" - + "*\022\243\001\n\016UpdateSnapshot\022\'.google.pubsub.v1." - + "UpdateSnapshotRequest\032\032.google.pubsub.v1" - + ".Snapshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/" - + "2*/v1/{snapshot.name=projects/*/snapshot" - + "s/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubs" - + "ub.v1.DeleteSnapshotRequest\032\026.google.pro" - + "tobuf.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{sna" - + "pshot=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035" - + ".google.pubsub.v1.SeekRequest\032\036.google.p" - + "ubsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subs" - + "cription=projects/*/subscriptions/*}:see" - + "k:\001*\032p\312A\025pubsub.googleapis.com\322AUhttps:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/pubsubB\252" - + "\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z2" - + "cloud.google.com/go/pubsub/apiv1/pubsubp" - + "b;pubsubpb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002" - + "\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Cloud:" - + ":PubSub::V1b\006proto3" + + "\"\n\022return_immediately\030\002 \001(\010B\006\030\001\342A\001\001\022\032\n\014m" + + "ax_messages\030\003 \001(\005B\004\342A\001\002\"L\n\014PullResponse\022" + + "<\n\021received_messages\030\001 \003(\0132!.google.pubs" + + "ub.v1.ReceivedMessage\"\230\001\n\030ModifyAckDeadl" + + "ineRequest\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A" + + "$\n\"pubsub.googleapis.com/Subscription\022\025\n" + + "\007ack_ids\030\004 \003(\tB\004\342A\001\002\022\"\n\024ack_deadline_sec" + + "onds\030\003 \001(\005B\004\342A\001\002\"n\n\022AcknowledgeRequest\022A" + + "\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.go" + + "ogleapis.com/Subscription\022\025\n\007ack_ids\030\002 \003" + + "(\tB\004\342A\001\002\"\253\002\n\024StreamingPullRequest\022A\n\014sub" + + "scription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsub.googlea" + + "pis.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n" + + "\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027modify" + + "_deadline_ack_ids\030\004 \003(\t\022)\n\033stream_ack_de" + + "adline_seconds\030\005 \001(\005B\004\342A\001\002\022\021\n\tclient_id\030" + + "\006 \001(\t\022 \n\030max_outstanding_messages\030\007 \001(\003\022" + + "\035\n\025max_outstanding_bytes\030\010 \001(\003\"\335\005\n\025Strea" + + "mingPullResponse\022<\n\021received_messages\030\001 " + + "\003(\0132!.google.pubsub.v1.ReceivedMessage\022a" + + "\n\030acknowledge_confirmation\030\005 \001(\0132?.googl" + + "e.pubsub.v1.StreamingPullResponse.Acknow" + + "ledgeConfirmation\022o\n modify_ack_deadline" + + "_confirmation\030\003 \001(\0132E.google.pubsub.v1.S" + + "treamingPullResponse.ModifyAckDeadlineCo" + + "nfirmation\022_\n\027subscription_properties\030\004 " + + "\001(\0132>.google.pubsub.v1.StreamingPullResp" + + "onse.SubscriptionProperties\032\200\001\n\027Acknowle" + + "dgeConfirmation\022\017\n\007ack_ids\030\001 \003(\t\022\027\n\017inva" + + "lid_ack_ids\030\002 \003(\t\022\031\n\021unordered_ack_ids\030\003" + + " \003(\t\022 \n\030temporary_failed_ack_ids\030\004 \003(\t\032k" + + "\n\035ModifyAckDeadlineConfirmation\022\017\n\007ack_i" + + "ds\030\001 \003(\t\022\027\n\017invalid_ack_ids\030\002 \003(\t\022 \n\030tem" + + "porary_failed_ack_ids\030\003 \003(\t\032a\n\026Subscript" + + "ionProperties\022%\n\035exactly_once_delivery_e" + + "nabled\030\001 \001(\010\022 \n\030message_ordering_enabled" + + "\030\002 \001(\010\"\205\002\n\025CreateSnapshotRequest\0225\n\004name" + + "\030\001 \001(\tB\'\342A\001\002\372A \n\036pubsub.googleapis.com/S" + + "napshot\022A\n\014subscription\030\002 \001(\tB+\342A\001\002\372A$\n\"" + + "pubsub.googleapis.com/Subscription\022C\n\006la" + + "bels\030\003 \003(\01323.google.pubsub.v1.CreateSnap" + + "shotRequest.LabelsEntry\032-\n\013LabelsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\202\001\n\025Updat" + + "eSnapshotRequest\0222\n\010snapshot\030\001 \001(\0132\032.goo" + + "gle.pubsub.v1.SnapshotB\004\342A\001\002\0225\n\013update_m" + + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\004\342" + + "A\001\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topic\030" + + "\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topic\022" + + "/\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\0226\n\006labels\030\004 \003(\0132&.google.pubsub" + + ".v1.Snapshot.LabelsEntry\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036pu" + + "bsub.googleapis.com/Snapshot\022\'projects/{" + + "project}/snapshots/{snapshot}\"O\n\022GetSnap" + + "shotRequest\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A \n\036" + + "pubsub.googleapis.com/Snapshot\"\204\001\n\024ListS" + + "napshotsRequest\022E\n\007project\030\001 \001(\tB4\342A\001\002\372A" + + "-\n+cloudresourcemanager.googleapis.com/P" + + "roject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapsh" + + "ots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n" + + "\017next_page_token\030\002 \001(\t\"R\n\025DeleteSnapshot" + + "Request\0229\n\010snapshot\030\001 \001(\tB\'\342A\001\002\372A \n\036pubs" + + "ub.googleapis.com/Snapshot\"\277\001\n\013SeekReque" + + "st\022A\n\014subscription\030\001 \001(\tB+\342A\001\002\372A$\n\"pubsu" + + "b.googleapis.com/Subscription\022*\n\004time\030\002 " + + "\001(\0132\032.google.protobuf.TimestampH\000\0227\n\010sna" + + "pshot\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/" + + "SnapshotH\000B\010\n\006target\"\016\n\014SeekResponse2\270\013\n" + + "\tPublisher\022q\n\013CreateTopic\022\027.google.pubsu" + + "b.v1.Topic\032\027.google.pubsub.v1.Topic\"0\332A\004" + + "name\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/" + + "*}:\001*\022\221\001\n\013UpdateTopic\022$.google.pubsub.v1" + + ".UpdateTopicRequest\032\027.google.pubsub.v1.T" + + "opic\"C\332A\021topic,update_mask\202\323\344\223\002)2$/v1/{t" + + "opic.name=projects/*/topics/*}:\001*\022\223\001\n\007Pu" + + "blish\022 .google.pubsub.v1.PublishRequest\032" + + "!.google.pubsub.v1.PublishResponse\"C\332A\016t" + + "opic,messages\202\323\344\223\002,\"\'/v1/{topic=projects" + + "/*/topics/*}:publish:\001*\022w\n\010GetTopic\022!.go" + + "ogle.pubsub.v1.GetTopicRequest\032\027.google." + + "pubsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{to" + + "pic=projects/*/topics/*}\022\212\001\n\nListTopics\022" + + "#.google.pubsub.v1.ListTopicsRequest\032$.g" + + "oogle.pubsub.v1.ListTopicsResponse\"1\332A\007p" + + "roject\202\323\344\223\002!\022\037/v1/{project=projects/*}/t" + + "opics\022\272\001\n\026ListTopicSubscriptions\022/.googl" + + "e.pubsub.v1.ListTopicSubscriptionsReques" + + "t\0320.google.pubsub.v1.ListTopicSubscripti" + + "onsResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic=" + + "projects/*/topics/*}/subscriptions\022\252\001\n\022L" + + "istTopicSnapshots\022+.google.pubsub.v1.Lis" + + "tTopicSnapshotsRequest\032,.google.pubsub.v" + + "1.ListTopicSnapshotsResponse\"9\332A\005topic\202\323" + + "\344\223\002+\022)/v1/{topic=projects/*/topics/*}/sn" + + "apshots\022|\n\013DeleteTopic\022$.google.pubsub.v" + + "1.DeleteTopicRequest\032\026.google.protobuf.E" + + "mpty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=project" + + "s/*/topics/*}\022\255\001\n\022DetachSubscription\022+.g" + + "oogle.pubsub.v1.DetachSubscriptionReques" + + "t\032,.google.pubsub.v1.DetachSubscriptionR" + + "esponse\"<\202\323\344\223\0026\"4/v1/{subscription=proje" + + "cts/*/subscriptions/*}:detach\032p\312A\025pubsub" + + ".googleapis.com\322AUhttps://www.googleapis" + + ".com/auth/cloud-platform,https://www.goo" + + "gleapis.com/auth/pubsub2\322\025\n\nSubscriber\022\264" + + "\001\n\022CreateSubscription\022\036.google.pubsub.v1" + + ".Subscription\032\036.google.pubsub.v1.Subscri" + + "ption\"^\332A+name,topic,push_config,ack_dea" + + "dline_seconds\202\323\344\223\002*\032%/v1/{name=projects/" + + "*/subscriptions/*}:\001*\022\241\001\n\017GetSubscriptio" + + "n\022(.google.pubsub.v1.GetSubscriptionRequ" + + "est\032\036.google.pubsub.v1.Subscription\"D\332A\014" + + "subscription\202\323\344\223\002/\022-/v1/{subscription=pr" + + "ojects/*/subscriptions/*}\022\273\001\n\022UpdateSubs" + + "cription\022+.google.pubsub.v1.UpdateSubscr" + + "iptionRequest\032\036.google.pubsub.v1.Subscri" + + "ption\"X\332A\030subscription,update_mask\202\323\344\223\0027" + + "22/v1/{subscription.name=projects/*/subs" + + "criptions/*}:\001*\022\246\001\n\021ListSubscriptions\022*." + + "google.pubsub.v1.ListSubscriptionsReques" + + "t\032+.google.pubsub.v1.ListSubscriptionsRe" + + "sponse\"8\332A\007project\202\323\344\223\002(\022&/v1/{project=p" + + "rojects/*}/subscriptions\022\237\001\n\022DeleteSubsc" + + "ription\022+.google.pubsub.v1.DeleteSubscri" + + "ptionRequest\032\026.google.protobuf.Empty\"D\332A" + + "\014subscription\202\323\344\223\002/*-/v1/{subscription=p" + + "rojects/*/subscriptions/*}\022\317\001\n\021ModifyAck" + + "Deadline\022*.google.pubsub.v1.ModifyAckDea" + + "dlineRequest\032\026.google.protobuf.Empty\"v\332A" + + ")subscription,ack_ids,ack_deadline_secon" + + "ds\202\323\344\223\002D\"?/v1/{subscription=projects/*/s" + + "ubscriptions/*}:modifyAckDeadline:\001*\022\250\001\n" + + "\013Acknowledge\022$.google.pubsub.v1.Acknowle" + + "dgeRequest\032\026.google.protobuf.Empty\"[\332A\024s" + + "ubscription,ack_ids\202\323\344\223\002>\"9/v1/{subscrip" + + "tion=projects/*/subscriptions/*}:acknowl" + + "edge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.Pull" + + "Request\032\036.google.pubsub.v1.PullResponse\"" + + "\210\001\332A,subscription,return_immediately,max" + + "_messages\332A\031subscription,max_messages\202\323\344" + + "\223\0027\"2/v1/{subscription=projects/*/subscr" + + "iptions/*}:pull:\001*\022f\n\rStreamingPull\022&.go" + + "ogle.pubsub.v1.StreamingPullRequest\032\'.go" + + "ogle.pubsub.v1.StreamingPullResponse\"\000(\001" + + "0\001\022\273\001\n\020ModifyPushConfig\022).google.pubsub." + + "v1.ModifyPushConfigRequest\032\026.google.prot" + + "obuf.Empty\"d\332A\030subscription,push_config\202" + + "\323\344\223\002C\">/v1/{subscription=projects/*/subs" + + "criptions/*}:modifyPushConfig:\001*\022\211\001\n\013Get" + + "Snapshot\022$.google.pubsub.v1.GetSnapshotR" + + "equest\032\032.google.pubsub.v1.Snapshot\"8\332A\010s" + + "napshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/" + + "snapshots/*}\022\226\001\n\rListSnapshots\022&.google." + + "pubsub.v1.ListSnapshotsRequest\032\'.google." + + "pubsub.v1.ListSnapshotsResponse\"4\332A\007proj" + + "ect\202\323\344\223\002$\022\"/v1/{project=projects/*}/snap" + + "shots\022\227\001\n\016CreateSnapshot\022\'.google.pubsub" + + ".v1.CreateSnapshotRequest\032\032.google.pubsu" + + "b.v1.Snapshot\"@\332A\021name,subscription\202\323\344\223\002" + + "&\032!/v1/{name=projects/*/snapshots/*}:\001*\022" + + "\243\001\n\016UpdateSnapshot\022\'.google.pubsub.v1.Up" + + "dateSnapshotRequest\032\032.google.pubsub.v1.S" + + "napshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/2*" + + "/v1/{snapshot.name=projects/*/snapshots/" + + "*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubsub" + + ".v1.DeleteSnapshotRequest\032\026.google.proto" + + "buf.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snaps" + + "hot=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035.g" + + "oogle.pubsub.v1.SeekRequest\032\036.google.pub" + + "sub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscr" + + "iption=projects/*/subscriptions/*}:seek:" + + "\001*\032p\312A\025pubsub.googleapis.com\322AUhttps://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/pubsubB\252\001\n" + + "\024com.google.pubsub.v1B\013PubsubProtoP\001Z2cl" + + "oud.google.com/go/pubsub/apiv1/pubsubpb;" + + "pubsubpb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026G" + + "oogle\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::P" + + "ubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -884,7 +885,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_BigQueryConfig_descriptor, new java.lang.String[] { - "Table", "UseTopicSchema", "WriteMetadata", "DropUnknownFields", "State", + "Table", + "UseTopicSchema", + "WriteMetadata", + "DropUnknownFields", + "State", + "UseTableSchema", }); internal_static_google_pubsub_v1_CloudStorageConfig_descriptor = getDescriptor().getMessageTypes().get(23); 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 476d5384d..30c5431b8 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 @@ -136,7 +136,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1227 + * google/pubsub/v1/pubsub.proto;l=1233 * @return The returnImmediately. */ @java.lang.Override @@ -687,7 +687,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=1227 + * google/pubsub/v1/pubsub.proto;l=1233 * @return The returnImmediately. */ @java.lang.Override @@ -713,7 +713,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1227 + * google/pubsub/v1/pubsub.proto;l=1233 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -743,7 +743,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1227 + * google/pubsub/v1/pubsub.proto;l=1233 * @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 740269f4a..9f9ccf387 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 @@ -71,7 +71,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1227 + * google/pubsub/v1/pubsub.proto;l=1233 * @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 700324dc7..393893b10 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 @@ -997,9 +997,10 @@ message BigQueryConfig { // {projectId}.{datasetId}.{tableId} string table = 1; - // When true, use the topic's schema as the columns to write to in BigQuery, - // if it exists. - bool use_topic_schema = 2; + // Optional. When true, use the topic's schema as the columns to write to in + // BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be + // enabled at the same time. + bool use_topic_schema = 2 [(google.api.field_behavior) = OPTIONAL]; // When true, write the subscription name, message_id, publish_time, // attributes, and ordering_key to additional columns in the table. The @@ -1018,6 +1019,11 @@ message BigQueryConfig { // Output only. An output-only field that indicates whether or not the // subscription can receive messages. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. When true, use the BigQuery table's schema as the columns to + // write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be + // enabled at the same time. + bool use_table_schema = 6 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for a Cloud Storage subscription. diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index f1c736587..bedd4b707 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.125.12 + 1.125.13 @@ -69,7 +69,7 @@ com.google.truth truth - 1.1.5 + 1.2.0 test @@ -91,7 +91,7 @@ com.google.cloud google-cloud-storage - 2.29.1 + 2.30.1
    diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index dd902c86a..d7dfc9687 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -30,7 +30,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.cloud libraries-bom - 26.27.0 + 26.29.0 pom import @@ -56,7 +56,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.truth truth - 1.1.5 + 1.2.0 test
    @@ -124,7 +124,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.maven.plugins maven-surefire-plugin - 3.2.1 + 3.2.3 **/*IT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 8a954efad..bce5c7d4f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.125.13 + 1.126.0 @@ -73,7 +73,7 @@ com.google.truth truth - 1.1.5 + 1.2.0 test @@ -90,7 +90,7 @@ com.google.cloud google-cloud-storage - 2.29.1 + 2.30.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b2282edd2..ba9075966 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 26.27.0 + 26.29.0 pom import @@ -92,7 +92,7 @@ com.google.truth truth - 1.1.5 + 1.2.0 test diff --git a/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java b/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java index 6c2d31efe..204867006 100644 --- a/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java +++ b/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java @@ -93,7 +93,7 @@ public static void subscribeWithAvroSchemaRevisionsExample( Schema schema = schemaServiceClient.getSchema(name + "@" + revision); org.apache.avro.Schema avroSchema = new org.apache.avro.Schema.Parser().parse(schema.getDefinition()); - reader = new SpecificDatumReader(State.getClassSchema(), avroSchema); + reader = new SpecificDatumReader(avroSchema, State.getClassSchema()); synchronized (revisionReaders) { revisionReaders.put(revision, reader); } diff --git a/versions.txt b/versions.txt index d92cb37a2..101beca33 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.125.13:1.125.13 -grpc-google-cloud-pubsub-v1:1.107.13:1.107.13 -proto-google-cloud-pubsub-v1:1.107.13:1.107.13 +google-cloud-pubsub:1.126.0:1.126.0 +grpc-google-cloud-pubsub-v1:1.108.0:1.108.0 +proto-google-cloud-pubsub-v1:1.108.0:1.108.0