@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@Override public ListSnapshotsRequest injectToken(ListSnapshotsRequest payload, String token) { return ListSnapshotsRequest.newBuilder(payload).setPageToken(token).build(); }
@Override public ListSnapshotsRequest injectPageSize(ListSnapshotsRequest payload, int pageSize) { return ListSnapshotsRequest.newBuilder(payload).setPageSize(pageSize).build(); }
/** * Lists the existing snapshots. Snapshots are used in <a * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment * state of messages in an existing subscription to the state captured by a * snapshot.<br><br> <b>BETA:</b> This feature is part of a beta release. * This API might be changed in backward-incompatible ways and is not recommended for production * use. It is not subject to any SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * ProjectName project = ProjectName.of("[PROJECT]"); * for (Snapshot element : subscriptionAdminClient.listSnapshots(project.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param project The name of the project in which to list snapshots. Format is * `projects/{project-id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSnapshotsPagedResponse listSnapshots(String project) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setProject(project).build(); return listSnapshots(request); }
ListSnapshotsRequest.newBuilder() .setProject(project == null ? null : project.toString()) .build();
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }