Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: regenerated to pick up changes in the API or client library generator #185

Merged
merged 6 commits into from May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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