|
45 | 45 | import com.google.pubsub.v1.ListTopicsRequest; |
46 | 46 | import com.google.pubsub.v1.ListTopicsResponse; |
47 | 47 | import com.google.pubsub.v1.ProjectName; |
48 | | -import com.google.pubsub.v1.ProjectTopicName; |
49 | 48 | import com.google.pubsub.v1.PublishRequest; |
50 | 49 | import com.google.pubsub.v1.PublishResponse; |
51 | 50 | import com.google.pubsub.v1.PubsubMessage; |
@@ -256,35 +255,6 @@ public final Topic createTopic(String name) { |
256 | 255 | return createTopic(request); |
257 | 256 | } |
258 | 257 |
|
259 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
260 | | - /** |
261 | | - * Creates the given topic with the given name. See the <a |
262 | | - * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name |
263 | | - * rules</a>. |
264 | | - * |
265 | | - * <p>Sample code: |
266 | | - * |
267 | | - * <pre><code> |
268 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
269 | | - * ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]"); |
270 | | - * Topic response = topicAdminClient.createTopic(name); |
271 | | - * } |
272 | | - * </code></pre> |
273 | | - * |
274 | | - * @param name Required. The name of the topic. It must have the format |
275 | | - * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only |
276 | | - * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), |
277 | | - * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in |
278 | | - * length, and it must not start with `"goog"`. |
279 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
280 | | - * @deprecated Use {@link #createTopic(TopicName)} instead. |
281 | | - */ |
282 | | - @Deprecated |
283 | | - public final Topic createTopic(ProjectTopicName name) { |
284 | | - Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); |
285 | | - return createTopic(request); |
286 | | - } |
287 | | - |
288 | 258 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
289 | 259 | /** |
290 | 260 | * Creates the given topic with the given name. See the [resource name rules] |
@@ -618,31 +588,6 @@ public final Topic getTopic(String topic) { |
618 | 588 | return getTopic(request); |
619 | 589 | } |
620 | 590 |
|
621 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
622 | | - /** |
623 | | - * Gets the configuration of a topic. |
624 | | - * |
625 | | - * <p>Sample code: |
626 | | - * |
627 | | - * <pre><code> |
628 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
629 | | - * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]"); |
630 | | - * Topic response = topicAdminClient.getTopic(topic); |
631 | | - * } |
632 | | - * </code></pre> |
633 | | - * |
634 | | - * @param topic Required. The name of the topic to get. Format is |
635 | | - * `projects/{project}/topics/{topic}`. |
636 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
637 | | - * @deprecated Use {@link #getTopic(TopicName)} instead. |
638 | | - */ |
639 | | - @Deprecated |
640 | | - public final Topic getTopic(ProjectTopicName topic) { |
641 | | - GetTopicRequest request = |
642 | | - GetTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); |
643 | | - return getTopic(request); |
644 | | - } |
645 | | - |
646 | 591 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
647 | 592 | /** |
648 | 593 | * Gets the configuration of a topic. |
@@ -922,35 +867,6 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t |
922 | 867 | return listTopicSubscriptions(request); |
923 | 868 | } |
924 | 869 |
|
925 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
926 | | - /** |
927 | | - * Lists the names of the subscriptions on this topic. |
928 | | - * |
929 | | - * <p>Sample code: |
930 | | - * |
931 | | - * <pre><code> |
932 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
933 | | - * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]"); |
934 | | - * for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic).iterateAllAsProjectSubscriptionName()) { |
935 | | - * // doThingsWith(element); |
936 | | - * } |
937 | | - * } |
938 | | - * </code></pre> |
939 | | - * |
940 | | - * @param topic Required. The name of the topic that subscriptions are attached to. Format is |
941 | | - * `projects/{project}/topics/{topic}`. |
942 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
943 | | - * @deprecated Use {@link #listTopicSubscriptions(TopicName)} instead. |
944 | | - */ |
945 | | - @Deprecated |
946 | | - public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) { |
947 | | - ListTopicSubscriptionsRequest request = |
948 | | - ListTopicSubscriptionsRequest.newBuilder() |
949 | | - .setTopic(topic == null ? null : topic.toString()) |
950 | | - .build(); |
951 | | - return listTopicSubscriptions(request); |
952 | | - } |
953 | | - |
954 | 870 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
955 | 871 | /** |
956 | 872 | * Lists the names of the attached subscriptions on this topic. |
@@ -1301,34 +1217,6 @@ public final void deleteTopic(String topic) { |
1301 | 1217 | deleteTopic(request); |
1302 | 1218 | } |
1303 | 1219 |
|
1304 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
1305 | | - /** |
1306 | | - * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a |
1307 | | - * topic is deleted, a new topic may be created with the same name; this is an entirely new topic |
1308 | | - * with none of the old configuration or subscriptions. Existing subscriptions to this topic are |
1309 | | - * not deleted, but their `topic` field is set to `_deleted-topic_`. |
1310 | | - * |
1311 | | - * <p>Sample code: |
1312 | | - * |
1313 | | - * <pre><code> |
1314 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
1315 | | - * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]"); |
1316 | | - * topicAdminClient.deleteTopic(topic); |
1317 | | - * } |
1318 | | - * </code></pre> |
1319 | | - * |
1320 | | - * @param topic Required. Name of the topic to delete. Format is |
1321 | | - * `projects/{project}/topics/{topic}`. |
1322 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
1323 | | - * @deprecated Use {@link #deleteTopic(TopicName)} instead. |
1324 | | - */ |
1325 | | - @Deprecated |
1326 | | - public final void deleteTopic(ProjectTopicName topic) { |
1327 | | - DeleteTopicRequest request = |
1328 | | - DeleteTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); |
1329 | | - deleteTopic(request); |
1330 | | - } |
1331 | | - |
1332 | 1220 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
1333 | 1221 | /** |
1334 | 1222 | * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a |
@@ -1483,37 +1371,6 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { |
1483 | 1371 | return setIamPolicyCallable().call(request); |
1484 | 1372 | } |
1485 | 1373 |
|
1486 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
1487 | | - /** |
1488 | | - * Sets the access control policy on the specified resource. Replaces any existing policy. |
1489 | | - * |
1490 | | - * <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED |
1491 | | - * |
1492 | | - * <p>Sample code: |
1493 | | - * |
1494 | | - * <pre><code> |
1495 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
1496 | | - * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]"); |
1497 | | - * Policy policy = Policy.newBuilder().build(); |
1498 | | - * Policy response = topicAdminClient.setIamPolicy(formattedResource, policy); |
1499 | | - * } |
1500 | | - * </code></pre> |
1501 | | - * |
1502 | | - * @param resource REQUIRED: The resource for which the policy is being specified. See the |
1503 | | - * operation documentation for the appropriate value for this field. |
1504 | | - * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the |
1505 | | - * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud |
1506 | | - * Platform services (such as Projects) might reject them. |
1507 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
1508 | | - * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead. |
1509 | | - */ |
1510 | | - @Deprecated |
1511 | | - public final Policy setIamPolicy(String resource, Policy policy) { |
1512 | | - SetIamPolicyRequest request = |
1513 | | - SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); |
1514 | | - return setIamPolicy(request); |
1515 | | - } |
1516 | | - |
1517 | 1374 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
1518 | 1375 | /** |
1519 | 1376 | * Sets the access control policy on the specified resource. Replacesany existing policy. |
@@ -1575,31 +1432,6 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { |
1575 | 1432 | return getIamPolicyCallable().call(request); |
1576 | 1433 | } |
1577 | 1434 |
|
1578 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
1579 | | - /** |
1580 | | - * Gets the access control policy for a resource. Returns an empty policy if the resource exists |
1581 | | - * and does not have a policy set. |
1582 | | - * |
1583 | | - * <p>Sample code: |
1584 | | - * |
1585 | | - * <pre><code> |
1586 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
1587 | | - * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]"); |
1588 | | - * Policy response = topicAdminClient.getIamPolicy(formattedResource); |
1589 | | - * } |
1590 | | - * </code></pre> |
1591 | | - * |
1592 | | - * @param resource REQUIRED: The resource for which the policy is being requested. See the |
1593 | | - * operation documentation for the appropriate value for this field. |
1594 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
1595 | | - * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead. |
1596 | | - */ |
1597 | | - @Deprecated |
1598 | | - public final Policy getIamPolicy(String resource) { |
1599 | | - GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); |
1600 | | - return getIamPolicy(request); |
1601 | | - } |
1602 | | - |
1603 | 1435 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
1604 | 1436 | /** |
1605 | 1437 | * Gets the access control policy for a resource. Returns an empty policyif the resource exists |
@@ -1663,44 +1495,6 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq |
1663 | 1495 | return testIamPermissionsCallable().call(request); |
1664 | 1496 | } |
1665 | 1497 |
|
1666 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
1667 | | - /** |
1668 | | - * Returns permissions that a caller has on the specified resource. If the resource does not |
1669 | | - * exist, this will return an empty set of permissions, not a NOT_FOUND error. |
1670 | | - * |
1671 | | - * <p>Note: This operation is designed to be used for building permission-aware UIs and |
1672 | | - * command-line tools, not for authorization checking. This operation may "fail open" without |
1673 | | - * warning. |
1674 | | - * |
1675 | | - * <p>Sample code: |
1676 | | - * |
1677 | | - * <pre><code> |
1678 | | - * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { |
1679 | | - * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]"); |
1680 | | - * List<String> permissions = new ArrayList<>(); |
1681 | | - * TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions); |
1682 | | - * } |
1683 | | - * </code></pre> |
1684 | | - * |
1685 | | - * @param resource REQUIRED: The resource for which the policy detail is being requested. See the |
1686 | | - * operation documentation for the appropriate value for this field. |
1687 | | - * @param permissions The set of permissions to check for the `resource`. Permissions with |
1688 | | - * wildcards (such as '*' or 'storage.*') are not allowed. For more information see |
1689 | | - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
1690 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
1691 | | - * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead. |
1692 | | - */ |
1693 | | - @Deprecated |
1694 | | - public final TestIamPermissionsResponse testIamPermissions( |
1695 | | - String resource, List<String> permissions) { |
1696 | | - TestIamPermissionsRequest request = |
1697 | | - TestIamPermissionsRequest.newBuilder() |
1698 | | - .setResource(resource) |
1699 | | - .addAllPermissions(permissions) |
1700 | | - .build(); |
1701 | | - return testIamPermissions(request); |
1702 | | - } |
1703 | | - |
1704 | 1498 | // AUTO-GENERATED DOCUMENTATION AND METHOD. |
1705 | 1499 | /** |
1706 | 1500 | * Returns permissions that a caller has on the specified resource. If theresource does not exist, |
|
0 commit comments