Skip to content

Commit

Permalink
feat: regenerated to pick up changes in the API or client library gen…
Browse files Browse the repository at this point in the history
…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 16624f8
Show file tree
Hide file tree
Showing 27 changed files with 844 additions and 190 deletions.
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -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>
Expand All @@ -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>

```
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
*
Expand Down Expand Up @@ -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:
*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 16624f8

Please sign in to comment.