Skip to content

Commit 7e769c0

Browse files
committed
Expand docstring for 'payload' / 'from_api_repr' to indicate polymorphism.
Addresses: #1569 (comment) #1569 (comment)
1 parent 3f24f71 commit 7e769c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gcloud/logging/entries.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
class _BaseEntry(object):
2222
"""Base class for TextEntry, StructEntry.
2323
24-
:type payload: text
25-
:param payload: The payload passed as ``textPayload``.
24+
:type payload: text or dict
25+
:param payload: The payload passed as ``textPayload``, ``jsonPayload``,
26+
or ``protoPayload``.
2627
2728
:type logger: :class:`gcloud.logging.logger.Logger`
2829
:param logger: the logger used to write the entry.
@@ -41,7 +42,7 @@ def __init__(self, payload, logger, insert_id=None, timestamp=None):
4142

4243
@classmethod
4344
def from_api_repr(cls, resource, client, loggers=None):
44-
"""Factory: construct a text entry given its API representation
45+
"""Factory: construct an entry given its API representation
4546
4647
:type resource: dict
4748
:param resource: text entry resource representation returned from

0 commit comments

Comments
 (0)