Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,13 @@ def _from_amqp_message(self, message):

@property
def body(self) -> Any:
"""The body of the Message. The format may vary depending on the body type:
For ~azure.eventhub.AmqpMessageBodyType.DATA, the body could be bytes or Iterable[bytes]
For ~azure.eventhub.AmqpMessageBodyType.SEQUENCE, the body could be List or Iterable[List]
For ~azure.eventhub.AmqpMessageBodyType.VALUE, the body could be any type.
"""
The body of the Message. The format may vary depending on the body type:

For AmqpMessageBodyType.DATA, the body could be bytes or Iterable[bytes].
For AmqpMessageBodyType.SEQUENCE, the body could be List or Iterable[List].
For AmqpMessageBodyType.VALUE, the body could be any type.

:rtype: Any
"""
if self._body_type == AmqpMessageBodyType.DATA: # pylint:disable=no-else-return
Expand All @@ -186,15 +189,18 @@ def body(self) -> Any:

@property
def body_type(self) -> AmqpMessageBodyType:
"""The body type of the underlying AMQP message.
rtype: ~azure.eventhub.amqp.AmqpMessageBodyType
"""
The body type of the underlying AMQP message.

:rtype: ~azure.eventhub.amqp.AmqpMessageBodyType
"""
return self._body_type

@property
def properties(self) -> Optional[AmqpMessageProperties]:
"""
Properties to add to the message.

:rtype: Optional[~azure.eventhub.amqp.AmqpMessageProperties]
"""
return self._properties
Expand Down Expand Up @@ -247,6 +253,7 @@ def delivery_annotations(self, value: Optional[Dict[Union[str, bytes], Any]]) ->
def header(self) -> Optional[AmqpMessageHeader]:
"""
The message header.

:rtype: Optional[~azure.eventhub.amqp.AmqpMessageHeader]
"""
return self._header
Expand Down