Skip to content

Commit

Permalink
chore: generate topic retention changes (#798)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hannahrogers-google committed Aug 21, 2021
1 parent 070dad3 commit a1c8aa6
Show file tree
Hide file tree
Showing 48 changed files with 7,862 additions and 3,889 deletions.

Large diffs are not rendered by default.

@@ -1,18 +1,19 @@
/*
* Copyright 2020 Google LLC
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.pubsub.v1;

import static com.google.cloud.pubsub.v1.SchemaServiceClient.ListSchemasPagedResponse;
Expand All @@ -29,6 +30,11 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.pubsub.v1.stub.SchemaServiceStubSettings;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.Empty;
import com.google.pubsub.v1.CreateSchemaRequest;
import com.google.pubsub.v1.DeleteSchemaRequest;
Expand All @@ -44,7 +50,7 @@
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link SchemaServiceClient}.
*
Expand All @@ -61,22 +67,23 @@
*
* <p>For example, to set the total timeout of createSchema to 30 seconds:
*
* <pre>
* <code>
* SchemaServiceSettings.Builder schemaServiceSettingsBuilder =
* SchemaServiceSettings.newBuilder();
* <pre>{@code
* SchemaServiceSettings.Builder schemaServiceSettingsBuilder = SchemaServiceSettings.newBuilder();
* schemaServiceSettingsBuilder
* .createSchemaSettings()
* .setRetrySettings(
* schemaServiceSettingsBuilder.createSchemaSettings().getRetrySettings().toBuilder()
* schemaServiceSettingsBuilder
* .createSchemaSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* SchemaServiceSettings schemaServiceSettings = schemaServiceSettingsBuilder.build();
* </code>
* </pre>
* }</pre>
*/
@Generated("by gapic-generator")
@Generated("by gapic-generator-java")
public class SchemaServiceSettings extends ClientSettings<SchemaServiceSettings> {

/** Returns the object with the settings used for calls to createSchema. */
public UnaryCallSettings<CreateSchemaRequest, Schema> createSchemaSettings() {
return ((SchemaServiceStubSettings) getStubSettings()).createSchemaSettings();
Expand Down Expand Up @@ -109,6 +116,22 @@ public UnaryCallSettings<ValidateSchemaRequest, ValidateSchemaResponse> validate
return ((SchemaServiceStubSettings) getStubSettings()).validateMessageSettings();
}

/** Returns the object with the settings used for calls to setIamPolicy. */
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
return ((SchemaServiceStubSettings) getStubSettings()).setIamPolicySettings();
}

/** Returns the object with the settings used for calls to getIamPolicy. */
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return ((SchemaServiceStubSettings) getStubSettings()).getIamPolicySettings();
}

/** Returns the object with the settings used for calls to testIamPermissions. */
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsSettings() {
return ((SchemaServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
}

public static final SchemaServiceSettings create(SchemaServiceStubSettings stub)
throws IOException {
return new SchemaServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -169,18 +192,15 @@ protected SchemaServiceSettings(Builder settingsBuilder) throws IOException {

/** Builder for SchemaServiceSettings. */
public static class Builder extends ClientSettings.Builder<SchemaServiceSettings, Builder> {

protected Builder() throws IOException {
this((ClientContext) null);
this(((ClientContext) null));
}

protected Builder(ClientContext clientContext) {
super(SchemaServiceStubSettings.newBuilder(clientContext));
}

private static Builder createDefault() {
return new Builder(SchemaServiceStubSettings.newBuilder());
}

protected Builder(SchemaServiceSettings settings) {
super(settings.getStubSettings().toBuilder());
}
Expand All @@ -189,6 +209,10 @@ protected Builder(SchemaServiceStubSettings.Builder stubSettings) {
super(stubSettings);
}

private static Builder createDefault() {
return new Builder(SchemaServiceStubSettings.newBuilder());
}

public SchemaServiceStubSettings.Builder getStubSettingsBuilder() {
return ((SchemaServiceStubSettings.Builder) getStubSettings());
}
Expand Down Expand Up @@ -240,6 +264,22 @@ public UnaryCallSettings.Builder<DeleteSchemaRequest, Empty> deleteSchemaSetting
return getStubSettingsBuilder().validateMessageSettings();
}

/** Returns the builder for the settings used for calls to setIamPolicy. */
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
return getStubSettingsBuilder().setIamPolicySettings();
}

/** Returns the builder for the settings used for calls to getIamPolicy. */
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return getStubSettingsBuilder().getIamPolicySettings();
}

/** Returns the builder for the settings used for calls to testIamPermissions. */
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsSettings() {
return getStubSettingsBuilder().testIamPermissionsSettings();
}

@Override
public SchemaServiceSettings build() throws IOException {
return new SchemaServiceSettings(this);
Expand Down

0 comments on commit a1c8aa6

Please sign in to comment.