Skip to content
Permalink
Browse files
feat: regenerated to pick up changes in the API or client library gen…
…erator (#185)

* Integrate Python GAPIC Microgenerator in googleapis.
This PR uses using documentai as an example.
Depends on googleapis/gapic-generator-python#402

PiperOrigin-RevId: 309824146

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon May 4 15:06:44 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb
Source-Link: googleapis/googleapis@e0f9d9e

* Removing the experimental tag from dead letter policy related fields.

PiperOrigin-RevId: 310595049

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri May 8 11:29:18 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 73d4b5d9a791f8b1ee63d439ffe909bb8ffa07f7
Source-Link: googleapis/googleapis@73d4b5d

* ci(java): switch to GitHub Actions (#533)

* ci: switch to GitHub Actions

* update based on comment

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Mon May 11 12:54:00 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 55cdc844877d97139f25004229842624a6a86a02
Source-Link: googleapis/synthtool@55cdc84

* chore: move ci.yaml to workflows dir (#535)

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Mon May 11 16:24:04 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 98c50772ec23295c64cf0d2ddf199ea52961fd4c
Source-Link: googleapis/synthtool@98c5077

* docs: update CONTRIBUTING.md to include code formatting (#534)

Co-authored-by: Jeff Ching <chingor@google.com>
Co-authored-by: Jeffrey Rennie <rennie@google.com>

Source-Author: Brian Chen <chenbrian@google.com>
Source-Date: Tue May 12 10:24:59 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 5b48b0716a36ca069db3038da7e205c87a22ed19
Source-Link: googleapis/synthtool@5b48b07

Co-authored-by: hannahrogers-google <52459909+hannahrogers-google@users.noreply.github.com>
  • Loading branch information
yoshi-automation and hannahrogers-google committed May 24, 2020
1 parent 240e141 commit 16624f88ad19ccaf2ea074a62242496be103659f
Showing with 844 additions and 190 deletions.
  1. +10 −1 CONTRIBUTING.md
  2. +3 −3 README.md
  3. +109 −4 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
  4. +12 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java
  5. +239 −4 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java
  6. +17 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java
  7. +51 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
  8. +29 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java
  9. +13 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java
  10. +99 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java
  11. +5 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java
  12. +29 −0 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java
  13. +18 −0 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java
  14. +17 −1 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java
  15. +42 −0 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
  16. +51 −0 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
  17. +7 −7 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java
  18. +2 −2 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java
  19. +24 −28 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java
  20. +6 −7 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java
  21. +0 −36 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
  22. +0 −9 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java
  23. +0 −24 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java
  24. +36 −36 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java
  25. +9 −9 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java
  26. +11 −14 proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
  27. +5 −5 synth.metadata
@@ -99,7 +99,16 @@ mvn -Penable-samples clean verify
```

2. [Activate](#profile-activation) the profile.
3. Define your samples in a normal Maven project in the `samples/` directory
3. Define your samples in a normal Maven project in the `samples/` directory.

### Code Formatting

Code in this repo is formatted with
[google-java-format](https://github.com/google/google-java-format).
To run formatting on your project, you can run:
```
mvn com.coveo:fmt-maven-plugin:format
```

### Profile Activation

@@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>5.1.0</version>
<version>5.3.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.105.0</version>
<version>1.105.1</version>
</dependency>

```
@@ -259,7 +259,7 @@ Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4]
Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]

[product-docs]: https://cloud.google.com/pubsub/docs/
[javadocs]: https://googleapis.dev/java/google-cloud-pubsub/latest/index.html
[javadocs]: https://googleapis.dev/java/google-cloud-pubusb/latest/index.html
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8.svg
@@ -39,6 +39,7 @@
import com.google.pubsub.v1.CreateSnapshotRequest;
import com.google.pubsub.v1.DeleteSnapshotRequest;
import com.google.pubsub.v1.DeleteSubscriptionRequest;
import com.google.pubsub.v1.GetSnapshotRequest;
import com.google.pubsub.v1.GetSubscriptionRequest;
import com.google.pubsub.v1.ListSnapshotsRequest;
import com.google.pubsub.v1.ListSnapshotsResponse;
@@ -861,6 +862,110 @@ public final UnaryCallable<DeleteSubscriptionRequest, Empty> deleteSubscriptionC
return stub.deleteSubscriptionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the configuration details of a snapshot. Snapshots are used in &lt;a
* href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt; 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.
*
* <p>Sample code:
*
* <pre><code>
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
* Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
* }
* </code></pre>
*
* @param snapshot Required. The name of the snapshot to get. Format is
* `projects/{project}/snapshots/{snap}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
/* package-private */ final Snapshot getSnapshot(ProjectSnapshotName snapshot) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder()
.setSnapshot(snapshot == null ? null : snapshot.toString())
.build();
return getSnapshot(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the configuration details of a snapshot. Snapshots are used in &lt;a
* href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt; 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.
*
* <p>Sample code:
*
* <pre><code>
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
* Snapshot response = subscriptionAdminClient.getSnapshot(snapshot.toString());
* }
* </code></pre>
*
* @param snapshot Required. The name of the snapshot to get. Format is
* `projects/{project}/snapshots/{snap}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
/* package-private */ final Snapshot getSnapshot(String snapshot) {
GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setSnapshot(snapshot).build();
return getSnapshot(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the configuration details of a snapshot. Snapshots are used in &lt;a
* href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt; 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.
*
* <p>Sample code:
*
* <pre><code>
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
* GetSnapshotRequest request = GetSnapshotRequest.newBuilder()
* .setSnapshot(snapshot.toString())
* .build();
* Snapshot response = subscriptionAdminClient.getSnapshot(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
/* package-private */ final Snapshot getSnapshot(GetSnapshotRequest request) {
return getSnapshotCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the configuration details of a snapshot. Snapshots are used in &lt;a
* href="https://cloud.google.com/pubsub/docs/replay-overview"&gt;Seek&lt;/a&gt; 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.
*
* <p>Sample code:
*
* <pre><code>
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
* GetSnapshotRequest request = GetSnapshotRequest.newBuilder()
* .setSnapshot(snapshot.toString())
* .build();
* ApiFuture&lt;Snapshot&gt; future = subscriptionAdminClient.getSnapshotCallable().futureCall(request);
* // Do something
* Snapshot response = future.get();
* }
* </code></pre>
*/
/* package-private */ final UnaryCallable<GetSnapshotRequest, Snapshot> getSnapshotCallable() {
return stub.getSnapshotCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Modifies the ack deadline for a specific message. This method is useful to indicate that more
@@ -1989,7 +2094,7 @@ public final UnaryCallable<SeekRequest, SeekResponse> seekCallable() {
/**
* Sets the access control policy on the specified resource. Replaces any existing policy.
*
* <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* <p>Sample code:
*
@@ -2046,7 +2151,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
/**
* Sets the access control policy on the specified resource. Replaces any existing policy.
*
* <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* <p>Sample code:
*
@@ -2142,7 +2247,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a NOT_FOUND error.
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
*
* <p>Note: This operation is designed to be used for building permission-aware UIs and
* command-line tools, not for authorization checking. This operation may "fail open" without
@@ -2209,7 +2314,7 @@ public final TestIamPermissionsResponse testIamPermissions(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a NOT_FOUND error.
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
*
* <p>Note: This operation is designed to be used for building permission-aware UIs and
* command-line tools, not for authorization checking. This operation may "fail open" without
@@ -41,6 +41,7 @@
import com.google.pubsub.v1.CreateSnapshotRequest;
import com.google.pubsub.v1.DeleteSnapshotRequest;
import com.google.pubsub.v1.DeleteSubscriptionRequest;
import com.google.pubsub.v1.GetSnapshotRequest;
import com.google.pubsub.v1.GetSubscriptionRequest;
import com.google.pubsub.v1.ListSnapshotsRequest;
import com.google.pubsub.v1.ListSnapshotsResponse;
@@ -122,6 +123,11 @@ public UnaryCallSettings<DeleteSubscriptionRequest, Empty> deleteSubscriptionSet
return ((SubscriberStubSettings) getStubSettings()).deleteSubscriptionSettings();
}

/** Returns the object with the settings used for calls to getSnapshot. */
/* package-private */ UnaryCallSettings<GetSnapshotRequest, Snapshot> getSnapshotSettings() {
return ((SubscriberStubSettings) getStubSettings()).getSnapshotSettings();
}

/** Returns the object with the settings used for calls to modifyAckDeadline. */
/* package-private */ UnaryCallSettings<ModifyAckDeadlineRequest, Empty>
modifyAckDeadlineSettings() {
@@ -318,6 +324,12 @@ public UnaryCallSettings.Builder<Subscription, Subscription> createSubscriptionS
return getStubSettingsBuilder().deleteSubscriptionSettings();
}

/** Returns the builder for the settings used for calls to getSnapshot. */
/* package-private */ UnaryCallSettings.Builder<GetSnapshotRequest, Snapshot>
getSnapshotSettings() {
return getStubSettingsBuilder().getSnapshotSettings();
}

/** Returns the builder for the settings used for calls to modifyAckDeadline. */
/* package-private */ UnaryCallSettings.Builder<ModifyAckDeadlineRequest, Empty>
modifyAckDeadlineSettings() {

0 comments on commit 16624f8

Please sign in to comment.