@@ -387,25 +387,107 @@ interface MessageConsumer extends AutoCloseable {
387387
388388 MessageConsumer pullAsync (String subscription , MessageProcessor callback , PullOption ... options );
389389
390+ /**
391+ * Acknowledges the given messages for the provided subscription. Ack ids identify the messages to
392+ * acknowledge, as returned in {@link ReceivedMessage#ackId()} by {@link #pull(String, int)} and
393+ * {@link #pullAsync(String, int)}.
394+ *
395+ * @param subscription the subscription whose messages must be acknowledged
396+ * @param ackId the ack id of the first message to acknowledge
397+ * @param ackIds other ack ids of messages to acknowledge
398+ * @throws PubSubException upon failure, or if the subscription was not found
399+ */
390400 void ack (String subscription , String ackId , String ... ackIds );
391401
402+ /**
403+ * Sends a request to acknowledge the given messages for the provided subscription. Ack ids
404+ * identify the messages to acknowledge, as returned in {@link ReceivedMessage#ackId()} by
405+ * {@link #pull(String, int)} and {@link #pullAsync(String, int)}. The method returns a
406+ * {@code Future} object that can be used to wait for the acknowledge operation to be completed.
407+ *
408+ * @param subscription the subscription whose messages must be acknowledged
409+ * @param ackId the ack id of the first message to acknowledge
410+ * @param ackIds other ack ids of messages to acknowledge
411+ */
392412 Future <Void > ackAsync (String subscription , String ackId , String ... ackIds );
393413
414+ /**
415+ * Acknowledges the given messages for the provided subscription. Ack ids identify the messages to
416+ * acknowledge, as returned in {@link ReceivedMessage#ackId()} by {@link #pull(String, int)} and
417+ * {@link #pullAsync(String, int)}.
418+ *
419+ * @param subscription the subscription whose messages must be acknowledged
420+ * @param ackIds the ack ids of messages to acknowledge
421+ * @throws PubSubException upon failure, or if the subscription was not found
422+ */
394423 void ack (String subscription , Iterable <String > ackIds );
395424
425+ /**
426+ * Sends a request to acknowledge the given messages for the provided subscription. Ack ids
427+ * identify the messages to acknowledge, as returned in {@link ReceivedMessage#ackId()} by
428+ * {@link #pull(String, int)} and {@link #pullAsync(String, int)}. The method returns a
429+ * {@code Future} object that can be used to wait for the acknowledge operation to be completed.
430+ *
431+ * @param subscription the subscription whose messages must be acknowledged
432+ * @param ackIds the ack ids of messages to acknowledge
433+ */
396434 Future <Void > ackAsync (String subscription , Iterable <String > ackIds );
397435
436+ /**
437+ * "Nacks" the given messages for the provided subscription. Ack ids identify the messages to
438+ * "nack", as returned in {@link ReceivedMessage#ackId()} by {@link #pull(String, int)} and
439+ * {@link #pullAsync(String, int)}. This method corresponds to calling
440+ * {@link #modifyAckDeadline(String, int, TimeUnit, String, String...)} with a deadline of 0.
441+ *
442+ * @param subscription the subscription whose messages must be "nacked"
443+ * @param ackId the ack id of the first message to "nack"
444+ * @param ackIds other ack ids of messages to "nack"
445+ * @throws PubSubException upon failure, or if the subscription was not found
446+ */
398447 void nack (String subscription , String ackId , String ... ackIds );
399448
449+ /**
450+ * Sends a request to "nack" the given messages for the provided subscription. Ack ids identify
451+ * the messages to "nack", as returned in {@link ReceivedMessage#ackId()} by
452+ * {@link #pull(String, int)} and {@link #pullAsync(String, int)}. This method corresponds to
453+ * calling {@link #modifyAckDeadlineAsync(String, int, TimeUnit, String, String...)} with a
454+ * deadline of 0. The method returns a {@code Future} object that can be used to wait for the
455+ * "nack" operation to be completed.
456+ *
457+ * @param subscription the subscription whose messages must be "nacked"
458+ * @param ackId the ack id of the first message to "nack"
459+ * @param ackIds other ack ids of messages to "nack"
460+ */
400461 Future <Void > nackAsync (String subscription , String ackId , String ... ackIds );
401462
463+ /**
464+ * "Nacks" the given messages for the provided subscription. Ack ids identify the messages to
465+ * "nack", as returned in {@link ReceivedMessage#ackId()} by {@link #pull(String, int)} and
466+ * {@link #pullAsync(String, int)}. This method corresponds to calling
467+ * {@link #modifyAckDeadline(String, int, TimeUnit, Iterable)} with a deadline of 0.
468+ *
469+ * @param subscription the subscription whose messages must be "nacked"
470+ * @param ackIds the ack ids of messages to "nack"
471+ * @throws PubSubException upon failure, or if the subscription was not found
472+ */
402473 void nack (String subscription , Iterable <String > ackIds );
403474
475+ /**
476+ * Sends a request to "nack" the given messages for the provided subscription. Ack ids identify
477+ * the messages to "nack", as returned in {@link ReceivedMessage#ackId()} by
478+ * {@link #pull(String, int)} and {@link #pullAsync(String, int)}. This method corresponds to
479+ * calling {@link #modifyAckDeadlineAsync(String, int, TimeUnit, Iterable)} with a deadline of 0.
480+ * The method returns a {@code Future} object that can be used to wait for the "nack" operation to
481+ * be completed.
482+ *
483+ * @param subscription the subscription whose messages must be "nacked"
484+ * @param ackIds the ack ids of messages to "nack"
485+ */
404486 Future <Void > nackAsync (String subscription , Iterable <String > ackIds );
405487
406488 /**
407- * Modifies the acknowledge deadline of the given messages. {@code deadline} must be > = 0 and is
408- * the new deadline with respect to the time the modify request was received by the Pub/Sub
489+ * Modifies the acknowledge deadline of the given messages. {@code deadline} must be > = 0 and
490+ * is the new deadline with respect to the time the modify request was received by the Pub/Sub
409491 * service. For example, if {@code deadline} is 10 and {@code unit} is {@link TimeUnit#SECONDS},
410492 * the new ack deadline will expire 10 seconds after the modify request was received by the
411493 * service. Specifying 0 may be used to make the message available for another pull request
@@ -425,8 +507,8 @@ void modifyAckDeadline(String subscription, int deadline, TimeUnit unit, String
425507
426508 /**
427509 * Sends a request to modify the acknowledge deadline of the given messages. {@code deadline}
428- * must be > = 0 and is the new deadline with respect to the time the modify request was received
429- * by the Pub/Sub service. For example, if {@code deadline} is 10 and {@code unit} is
510+ * must be > = 0 and is the new deadline with respect to the time the modify request was
511+ * received by the Pub/Sub service. For example, if {@code deadline} is 10 and {@code unit} is
430512 * {@link TimeUnit#SECONDS}, the new ack deadline will expire 10 seconds after the modify request
431513 * was received by the service. Specifying 0 may be used to make the message available for another
432514 * pull request (corresponds to calling {@link #nackAsync(String, Iterable)}). The method returns
@@ -444,8 +526,8 @@ Future<Void> modifyAckDeadlineAsync(String subscription, int deadline, TimeUnit
444526 String ackId , String ... ackIds );
445527
446528 /**
447- * Modifies the acknowledge deadline of the given messages. {@code deadline} must be > = 0 and is
448- * the new deadline with respect to the time the modify request was received by the Pub/Sub
529+ * Modifies the acknowledge deadline of the given messages. {@code deadline} must be > = 0 and
530+ * is the new deadline with respect to the time the modify request was received by the Pub/Sub
449531 * service. For example, if {@code deadline} is 10 and {@code unit} is {@link TimeUnit#SECONDS},
450532 * the new ack deadline will expire 10 seconds after the modify request was received by the
451533 * service. Specifying 0 may be used to make the message available for another pull request
@@ -462,8 +544,8 @@ Future<Void> modifyAckDeadlineAsync(String subscription, int deadline, TimeUnit
462544
463545 /**
464546 * Sends a request to modify the acknowledge deadline of the given messages. {@code deadline}
465- * must be > = 0 and is the new deadline with respect to the time the modify request was received
466- * by the Pub/Sub service. For example, if {@code deadline} is 10 and {@code unit} is
547+ * must be > = 0 and is the new deadline with respect to the time the modify request was
548+ * received by the Pub/Sub service. For example, if {@code deadline} is 10 and {@code unit} is
467549 * {@link TimeUnit#SECONDS}, the new ack deadline will expire 10 seconds after the modify request
468550 * was received by the service. Specifying 0 may be used to make the message available for another
469551 * pull request (corresponds to calling {@link #nackAsync(String, Iterable)}). The method returns
0 commit comments