6#include "amqp_header.hpp"
7#include "amqp_properties.hpp"
8#include "amqp_value.hpp"
10#include <azure/core/nullable.hpp>
15namespace Azure {
namespace Core {
namespace Amqp {
namespace Models {
namespace _detail {
16 class AmqpMessageFactory;
19namespace Azure {
namespace Core {
namespace Amqp {
namespace Models {
24 enum class MessageBodyType
33 constexpr int AmqpDefaultMessageFormatValue
84 operator bool() const noexcept {
return m_hasValue; }
172 void SetBody(std::vector<AmqpList>
const& bodySequence);
211 void SetBody(std::vector<AmqpBinaryData>
const& bodyBinarySequence);
280 friend class _detail::AmqpMessageFactory;
283 std::vector<AmqpBinaryData> m_binaryDataBody;
284 std::vector<AmqpList> m_amqpSequenceBody;
286 bool m_hasValue{
true};
288 std::ostream& operator<<(std::ostream&, AmqpMessage
const&);
An AMQP binary value, a sequence of octets.
Definition amqp_value.hpp:784
An AMQP List is a sequence of polymorphic values. It has the behavioral characteristics of an AMQP ar...
Definition amqp_value.hpp:744
An AmqpMap represents an AMQP "map" type.
Definition amqp_value.hpp:681
An AmqpMessage object represents a received AMQP message.
Definition amqp_message.hpp:47
AmqpMessage(AmqpMessage &&)=default
Create a new AMQP Message from an existing message moving the contents.
static AmqpMessage Deserialize(std::uint8_t const *buffer, size_t size)
Deserialize the message from a buffer.
Definition amqp_message.cpp:745
~AmqpMessage()=default
Destroy an instance of an AMQP Message object.
AmqpValue const & GetBodyAsAmqpValue() const
Returns an Amqp Value message body.
Definition amqp_message.cpp:396
AmqpMessage()=default
Construct a new AMQP Message object.
std::vector< AmqpBinaryData > const & GetBodyAsBinary() const
Returns an Amqp Binary message body.
Definition amqp_message.cpp:404
uint32_t MessageFormat
The message format.
Definition amqp_message.hpp:94
AmqpMessage & operator=(AmqpMessage &&)=default
Move an AMQP message object to another object.
void SetBody(std::vector< AmqpList > const &bodySequence)
Sets the body of the message to a list of sequence sections.
Definition amqp_message.cpp:385
std::map< std::string, AmqpValue > ApplicationProperties
Application Properties for the message.
Definition amqp_message.hpp:130
AmqpMap MessageAnnotations
Message Annotations for the message.
Definition amqp_message.hpp:116
MessageBodyType BodyType
Definition amqp_message.hpp:155
AmqpMessage & operator=(AmqpMessage const &)=default
Copy an AMQP message object to another object.
std::vector< AmqpList > const & GetBodyAsAmqpList() const
Returns a list of Amqp Sequence values.
Definition amqp_message.cpp:361
AmqpMessage(AmqpMessage const &)=default
Construct a new AMQP message object from an existing object.
MessageHeader Header
The header for the message.
Definition amqp_message.hpp:102
AmqpValue DeliveryTag
Delivery Tag for the message.
Definition amqp_message.hpp:137
MessageProperties Properties
Immutable Properties for the message.
Definition amqp_message.hpp:123
static std::vector< uint8_t > Serialize(AmqpMessage const &message)
Serialize the message into a buffer.
Definition amqp_message.cpp:423
bool operator!=(AmqpMessage const &that) const noexcept
Compare two AmqpMessage values.
Definition amqp_message.hpp:75
AmqpMap Footer
Footer for the message.
Definition amqp_message.hpp:144
bool operator==(AmqpMessage const &that) const noexcept
Compare two AmqpMessages for equality.
Definition amqp_message.cpp:413
AmqpMap DeliveryAnnotations
Delivery Annotations for the message.
Definition amqp_message.hpp:109
AmqpMessage(std::nullptr_t)
Construct an empty AMQP Message.
Definition amqp_message.hpp:78
Definition amqp_value.hpp:104
Represents the immutable properties of an AMQP message.
Definition amqp_properties.hpp:24