Skip to content

Commit

Permalink
fixing ~ wip
Browse files Browse the repository at this point in the history
  • Loading branch information
l0lawrence committed Oct 29, 2024
1 parent 6ea41fe commit bfd9ebc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions sdk/eventhub/azure-eventhub/azure/eventhub/amqp/_amqp_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,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 @@ -190,15 +193,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 @@ -251,6 +257,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

0 comments on commit bfd9ebc

Please sign in to comment.