Skip to content

Commit

Permalink
πŸ¦‰ Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Feb 1, 2024
1 parent 571a50d commit 260e61c
Show file tree
Hide file tree
Showing 199 changed files with 31,981 additions and 19,017 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.30.0')
implementation platform('com.google.cloud:libraries-bom:26.31.0')
implementation 'com.google.cloud:google-cloud-pubsub'
```
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-pubsub:1.126.0'
implementation 'com.google.cloud:google-cloud-pubsub:1.126.2'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.126.0"
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.126.2"
```
<!-- {x-version-update-end} -->

Expand Down Expand Up @@ -409,7 +409,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.126.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.126.2
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.pubsub.v1.stub.SchemaServiceStubSettings;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StreamingCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.pubsub.v1.stub.SubscriberStubSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import com.google.pubsub.v1.ListTopicsRequest;
import com.google.pubsub.v1.ListTopicsResponse;
import com.google.pubsub.v1.ProjectName;
import com.google.pubsub.v1.ProjectTopicName;
import com.google.pubsub.v1.PublishRequest;
import com.google.pubsub.v1.PublishResponse;
import com.google.pubsub.v1.PubsubMessage;
Expand Down Expand Up @@ -462,6 +463,35 @@ public final Topic createTopic(String name) {
return createTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates the given topic with the given name. See the &lt;a
* href="https://cloud.google.com/pubsub/docs/admin#resource_names"&gt; resource name
* rules&lt;/a&gt;.
*
* <p>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
* Topic response = topicAdminClient.createTopic(name);
* }
* </code></pre>
*
* @param name Required. The name of the topic. It must have the format
* `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only
* letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`),
* tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in
* length, and it must not start with `"goog"`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #createTopic(TopicName)} instead.
*/
@Deprecated
public final Topic createTopic(ProjectTopicName name) {
Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build();
return createTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates the given topic with the given name. See the [resource name rules]
Expand Down Expand Up @@ -800,6 +830,31 @@ public final Topic getTopic(String topic) {
return getTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the configuration of a topic.
*
* <p>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
* Topic response = topicAdminClient.getTopic(topic);
* }
* </code></pre>
*
* @param topic Required. The name of the topic to get. Format is
* `projects/{project}/topics/{topic}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #getTopic(TopicName)} instead.
*/
@Deprecated
public final Topic getTopic(ProjectTopicName topic) {
GetTopicRequest request =
GetTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build();
return getTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the configuration of a topic.
Expand Down Expand Up @@ -1079,6 +1134,35 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t
return listTopicSubscriptions(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the names of the subscriptions on this topic.
*
* <p>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
* for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic).iterateAllAsProjectSubscriptionName()) {
* // doThingsWith(element);
* }
* }
* </code></pre>
*
* @param topic Required. The name of the topic that subscriptions are attached to. Format is
* `projects/{project}/topics/{topic}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #listTopicSubscriptions(TopicName)} instead.
*/
@Deprecated
public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) {
ListTopicSubscriptionsRequest request =
ListTopicSubscriptionsRequest.newBuilder()
.setTopic(topic == null ? null : topic.toString())
.build();
return listTopicSubscriptions(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the names of the attached subscriptions on this topic.
Expand Down Expand Up @@ -1429,6 +1513,34 @@ public final void deleteTopic(String topic) {
deleteTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a
* topic is deleted, a new topic may be created with the same name; this is an entirely new topic
* with none of the old configuration or subscriptions. Existing subscriptions to this topic are
* not deleted, but their `topic` field is set to `_deleted-topic_`.
*
* <p>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
* topicAdminClient.deleteTopic(topic);
* }
* </code></pre>
*
* @param topic Required. Name of the topic to delete. Format is
* `projects/{project}/topics/{topic}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #deleteTopic(TopicName)} instead.
*/
@Deprecated
public final void deleteTopic(ProjectTopicName topic) {
DeleteTopicRequest request =
DeleteTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build();
deleteTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a
Expand Down Expand Up @@ -1583,6 +1695,37 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
return setIamPolicyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* 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>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
* Policy policy = Policy.newBuilder().build();
* Policy response = topicAdminClient.setIamPolicy(formattedResource, policy);
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the
* operation documentation for the appropriate value for this field.
* @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
* policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
* Platform services (such as Projects) might reject them.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead.
*/
@Deprecated
public final Policy setIamPolicy(String resource, Policy policy) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
return setIamPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the access control policy on the specified resource. Replacesany existing policy.
Expand Down Expand Up @@ -1644,6 +1787,31 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
return getIamPolicyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* and does not have a policy set.
*
* <p>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
* Policy response = topicAdminClient.getIamPolicy(formattedResource);
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the
* operation documentation for the appropriate value for this field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead.
*/
@Deprecated
public final Policy getIamPolicy(String resource) {
GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
return getIamPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the access control policy for a resource. Returns an empty policyif the resource exists
Expand Down Expand Up @@ -1707,6 +1875,44 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
return testIamPermissionsCallable().call(request);
}

// 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.
*
* <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
* warning.
*
* <p>Sample code:
*
* <pre><code>
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
* List&lt;String&gt; permissions = new ArrayList&lt;&gt;();
* TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions);
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
* @param permissions The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '&#42;' or 'storage.&#42;') are not allowed. For more information see
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead.
*/
@Deprecated
public final TestIamPermissionsResponse testIamPermissions(
String resource, List<String> permissions) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(resource)
.addAllPermissions(permissions)
.build();
return testIamPermissions(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns permissions that a caller has on the specified resource. If theresource does not exist,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.pubsub.v1.stub.PublisherStubSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde

/** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
return InstantiatingGrpcChannelProvider.newBuilder().setMaxInboundMessageSize(20 << 20);
}

/** Returns a builder for the default REST ChannelProvider for this service. */
Expand Down
Loading

0 comments on commit 260e61c

Please sign in to comment.