Skip to content

Commit a1c8aa6

Browse files
chore: generate topic retention changes (#798)
* Modifying Publish example in README to match other examples given, and fix issue #6784 * fix: Modifying Publish example in README to match other examples, and fix Issue #11 * feat: Adding support for DLQs Adding delivery attempt count to PubsubMessages as a message attribute, and creating helper function to allow users to get the count without knowing implementation details. * Fix formatting * fix: making changes requested in pull request * fix: creating fix to not populate delivery attempt attribute when dead lettering is not enabled * Adding unit test for case in which a received message has no delivery attempt * Making MessageWaiter class more generic to also be used for outstanding ack operations * Waiting for acks to complete before shutting down a streaming subscriber connection * Fixing formatting error * fix: making sure all publishes complete before shutting down the publisher * adding default max outstanding request bytes * fix: make push endpoint valid https * fix: use default zero value if a flow control setting is not provided * fix lint issues * fix: better cleanup during publisher test * fix: format issues * fix: test timeouts should be a minute * fix: make subscriberIt less flaky * fix: add deprecated tag for deprecated methods * fix: retrying sync pulls in subscriberIT test * Revert "fix: retrying sync pulls in subscriberIT test" This reverts commit fef9956. * fix: do not send ModAck if auto ack extensions are disabled * Adding test for zero ack extension * revert maxAckExtension changes * generate topic retention feature * fix lambdas * fix: schema sample * fix: formatting * fix:docs * fix: doc names
1 parent 070dad3 commit a1c8aa6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+7862
-3889
lines changed

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java

+351-177
Large diffs are not rendered by default.

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java

+56-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* Copyright 2020 Google LLC
2+
* Copyright 2021 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.google.cloud.pubsub.v1;
1718

1819
import static com.google.cloud.pubsub.v1.SchemaServiceClient.ListSchemasPagedResponse;
@@ -29,6 +30,11 @@
2930
import com.google.api.gax.rpc.TransportChannelProvider;
3031
import com.google.api.gax.rpc.UnaryCallSettings;
3132
import com.google.cloud.pubsub.v1.stub.SchemaServiceStubSettings;
33+
import com.google.iam.v1.GetIamPolicyRequest;
34+
import com.google.iam.v1.Policy;
35+
import com.google.iam.v1.SetIamPolicyRequest;
36+
import com.google.iam.v1.TestIamPermissionsRequest;
37+
import com.google.iam.v1.TestIamPermissionsResponse;
3238
import com.google.protobuf.Empty;
3339
import com.google.pubsub.v1.CreateSchemaRequest;
3440
import com.google.pubsub.v1.DeleteSchemaRequest;
@@ -44,7 +50,7 @@
4450
import java.util.List;
4551
import javax.annotation.Generated;
4652

47-
// AUTO-GENERATED DOCUMENTATION AND CLASS
53+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
4854
/**
4955
* Settings class to configure an instance of {@link SchemaServiceClient}.
5056
*
@@ -61,22 +67,23 @@
6167
*
6268
* <p>For example, to set the total timeout of createSchema to 30 seconds:
6369
*
64-
* <pre>
65-
* <code>
66-
* SchemaServiceSettings.Builder schemaServiceSettingsBuilder =
67-
* SchemaServiceSettings.newBuilder();
70+
* <pre>{@code
71+
* SchemaServiceSettings.Builder schemaServiceSettingsBuilder = SchemaServiceSettings.newBuilder();
6872
* schemaServiceSettingsBuilder
6973
* .createSchemaSettings()
7074
* .setRetrySettings(
71-
* schemaServiceSettingsBuilder.createSchemaSettings().getRetrySettings().toBuilder()
75+
* schemaServiceSettingsBuilder
76+
* .createSchemaSettings()
77+
* .getRetrySettings()
78+
* .toBuilder()
7279
* .setTotalTimeout(Duration.ofSeconds(30))
7380
* .build());
7481
* SchemaServiceSettings schemaServiceSettings = schemaServiceSettingsBuilder.build();
75-
* </code>
76-
* </pre>
82+
* }</pre>
7783
*/
78-
@Generated("by gapic-generator")
84+
@Generated("by gapic-generator-java")
7985
public class SchemaServiceSettings extends ClientSettings<SchemaServiceSettings> {
86+
8087
/** Returns the object with the settings used for calls to createSchema. */
8188
public UnaryCallSettings<CreateSchemaRequest, Schema> createSchemaSettings() {
8289
return ((SchemaServiceStubSettings) getStubSettings()).createSchemaSettings();
@@ -109,6 +116,22 @@ public UnaryCallSettings<ValidateSchemaRequest, ValidateSchemaResponse> validate
109116
return ((SchemaServiceStubSettings) getStubSettings()).validateMessageSettings();
110117
}
111118

119+
/** Returns the object with the settings used for calls to setIamPolicy. */
120+
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
121+
return ((SchemaServiceStubSettings) getStubSettings()).setIamPolicySettings();
122+
}
123+
124+
/** Returns the object with the settings used for calls to getIamPolicy. */
125+
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
126+
return ((SchemaServiceStubSettings) getStubSettings()).getIamPolicySettings();
127+
}
128+
129+
/** Returns the object with the settings used for calls to testIamPermissions. */
130+
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
131+
testIamPermissionsSettings() {
132+
return ((SchemaServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
133+
}
134+
112135
public static final SchemaServiceSettings create(SchemaServiceStubSettings stub)
113136
throws IOException {
114137
return new SchemaServiceSettings.Builder(stub.toBuilder()).build();
@@ -169,18 +192,15 @@ protected SchemaServiceSettings(Builder settingsBuilder) throws IOException {
169192

170193
/** Builder for SchemaServiceSettings. */
171194
public static class Builder extends ClientSettings.Builder<SchemaServiceSettings, Builder> {
195+
172196
protected Builder() throws IOException {
173-
this((ClientContext) null);
197+
this(((ClientContext) null));
174198
}
175199

176200
protected Builder(ClientContext clientContext) {
177201
super(SchemaServiceStubSettings.newBuilder(clientContext));
178202
}
179203

180-
private static Builder createDefault() {
181-
return new Builder(SchemaServiceStubSettings.newBuilder());
182-
}
183-
184204
protected Builder(SchemaServiceSettings settings) {
185205
super(settings.getStubSettings().toBuilder());
186206
}
@@ -189,6 +209,10 @@ protected Builder(SchemaServiceStubSettings.Builder stubSettings) {
189209
super(stubSettings);
190210
}
191211

212+
private static Builder createDefault() {
213+
return new Builder(SchemaServiceStubSettings.newBuilder());
214+
}
215+
192216
public SchemaServiceStubSettings.Builder getStubSettingsBuilder() {
193217
return ((SchemaServiceStubSettings.Builder) getStubSettings());
194218
}
@@ -240,6 +264,22 @@ public UnaryCallSettings.Builder<DeleteSchemaRequest, Empty> deleteSchemaSetting
240264
return getStubSettingsBuilder().validateMessageSettings();
241265
}
242266

267+
/** Returns the builder for the settings used for calls to setIamPolicy. */
268+
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
269+
return getStubSettingsBuilder().setIamPolicySettings();
270+
}
271+
272+
/** Returns the builder for the settings used for calls to getIamPolicy. */
273+
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
274+
return getStubSettingsBuilder().getIamPolicySettings();
275+
}
276+
277+
/** Returns the builder for the settings used for calls to testIamPermissions. */
278+
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
279+
testIamPermissionsSettings() {
280+
return getStubSettingsBuilder().testIamPermissionsSettings();
281+
}
282+
243283
@Override
244284
public SchemaServiceSettings build() throws IOException {
245285
return new SchemaServiceSettings(this);

0 commit comments

Comments
 (0)