From 633e91bbfc0a8f4f484089acff6812b754f40c75 Mon Sep 17 00:00:00 2001 From: Peter Lamut Date: Thu, 2 Sep 2021 16:15:25 +0200 Subject: [PATCH] docs: clarify the types of Message parameters (#486) --- google/cloud/pubsub_v1/subscriber/message.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/google/cloud/pubsub_v1/subscriber/message.py b/google/cloud/pubsub_v1/subscriber/message.py index 5f6e17901..02ffd9984 100644 --- a/google/cloud/pubsub_v1/subscriber/message.py +++ b/google/cloud/pubsub_v1/subscriber/message.py @@ -79,10 +79,12 @@ def __init__(self, message, ack_id, delivery_attempt, request_queue): responsibility of :class:`BasePolicy` subclasses to do so. Args: - message (~.pubsub_v1.types.PubsubMessage): The message received - from Pub/Sub. For performance reasons it should be the the raw - protobuf message wrapped by the ``PubsubMessage`` class obtained - through the message's ``.pb()`` method. + message (`pubsub_v1.types.PubsubMessage._meta._pb`): + The message received from Pub/Sub. For performance reasons it should be + the raw protobuf message normally wrapped by + :class:`~pubsub_v1.types.PubsubMessage`. A raw message can be obtained + from a :class:`~pubsub_v1.types.PubsubMessage` instance through the + latter's ``._pb`` attribute. ack_id (str): The ack_id received from Pub/Sub. delivery_attempt (int): The delivery attempt counter received from Pub/Sub if a DeadLetterPolicy is set on the subscription,