Skip to content

Commit

Permalink
chore: Update the Java code generator (gapic-generator-java) to 2.25.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 563824709

Source-Link: googleapis/googleapis@8fe4127

Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8c0112151b19d890bb49b747b0ab28b816d47b1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhjMDExMjE1MWIxOWQ4OTBiYjQ5Yjc0N2IwYWIyOGI4MTZkNDdiMSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 8, 2023
1 parent 1157fbf commit e2b49ee
Show file tree
Hide file tree
Showing 194 changed files with 17,607 additions and 28,986 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
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,6 +30,7 @@
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,7 +45,6 @@
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 @@ -256,35 +255,6 @@ public final Topic createTopic(String name) {
return createTopic(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates the given topic with the given name. See the <a
* href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
* rules</a>.
*
* <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 @@ -618,31 +588,6 @@ 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 @@ -922,35 +867,6 @@ 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 @@ -1301,34 +1217,6 @@ 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 @@ -1483,37 +1371,6 @@ 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 @@ -1575,31 +1432,6 @@ 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 @@ -1663,44 +1495,6 @@ 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,6 +31,7 @@
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,6 +51,7 @@
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,6 +51,7 @@
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,6 +59,7 @@
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 @@ -414,7 +414,8 @@ 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(20 << 20);
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}

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

0 comments on commit e2b49ee

Please sign in to comment.