azure-messaging-eventhubs
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Azure::Messaging::EventHubs::Models::EventData Class Reference

Represents an event sent to the Azure Event Hubs service.

#include <event_data.hpp>

Inheritance diagram for Azure::Messaging::EventHubs::Models::EventData:
Azure::Messaging::EventHubs::Models::ReceivedEventData

Public Member Functions

 EventData ()
 Construct a default EventData object.
 
 EventData (std::shared_ptr< Azure::Core::Amqp::Models::AmqpMessage const > const &message)
 Construct a new EventData object from an AMQP message.
 
 EventData (std::initializer_list< uint8_t > const &body)
 Construct a new EventData object from an initializer list of bytes.
 
 EventData (std::vector< uint8_t > const &body)
 Construct a new EventData object from a vector of bytes.
 
 EventData (std::string const &body)
 Construct a new EventData object from a string.
 
 EventData (EventData const &)=default
 
EventDataoperator= (EventData const &)=default
 
 EventData (EventData &&)=default
 
EventDataoperator= (EventData &&)=default
 
virtual std::shared_ptr< Azure::Core::Amqp::Models::AmqpMessage const > GetRawAmqpMessage () const
 Get the AMQP message associated with this EventData.
 

Public Attributes

std::vector< uint8_t > Body
 The body of the event data.
 
Azure::Nullable< std::string > ContentType
 
Azure::Nullable< Azure::Core::Amqp::Models::AmqpValue > CorrelationId
 The correlation identifier.
 
Azure::Nullable< Azure::Core::Amqp::Models::AmqpValue > MessageId
 The message identifier.
 
std::map< std::string, Azure::Core::Amqp::Models::AmqpValue > Properties
 The set of free-form event properties.
 

Protected Attributes

std::shared_ptr< Azure::Core::Amqp::Models::AmqpMessage const > m_message
 

Constructor & Destructor Documentation

◆ EventData() [1/6]

Azure::Messaging::EventHubs::Models::EventData::EventData ( std::shared_ptr< Azure::Core::Amqp::Models::AmqpMessage const > const &  message)
Parameters
message- AMQP message to construct the EventData from.

◆ EventData() [2/6]

Azure::Messaging::EventHubs::Models::EventData::EventData ( std::initializer_list< uint8_t > const &  body)
inline
Parameters
body- Body for the newly created EventData.

◆ EventData() [3/6]

Azure::Messaging::EventHubs::Models::EventData::EventData ( std::vector< uint8_t > const &  body)
inline
Parameters
body- Body for the newly created EventData.

◆ EventData() [4/6]

Azure::Messaging::EventHubs::Models::EventData::EventData ( std::string const &  body)
inline
Parameters
body- Body for the newly created EventData.

◆ EventData() [5/6]

Azure::Messaging::EventHubs::Models::EventData::EventData ( EventData const &  )
default

Copy an EventData to another.

◆ EventData() [6/6]

Azure::Messaging::EventHubs::Models::EventData::EventData ( EventData &&  )
default

Create an EventData moving from another.

Member Function Documentation

◆ GetRawAmqpMessage()

std::shared_ptr< Azure::Core::Amqp::Models::AmqpMessage const > Azure::Messaging::EventHubs::Models::EventData::GetRawAmqpMessage ( ) const
virtual

Returns an underlying AMQP message corresponding to this EventData object.

Note
When this method is called on an EventData object, the returned message is constructed from the fields of the EventData object and does NOT reflect the value received from the service.

Reimplemented in Azure::Messaging::EventHubs::Models::ReceivedEventData.

◆ operator=() [1/2]

EventData & Azure::Messaging::EventHubs::Models::EventData::operator= ( EventData &&  )
default

Move an EventData to another.

◆ operator=() [2/2]

EventData & Azure::Messaging::EventHubs::Models::EventData::operator= ( EventData const &  )
default

Assign an EventData to another.

Member Data Documentation

◆ ContentType

Azure::Nullable<std::string> Azure::Messaging::EventHubs::Models::EventData::ContentType

Represents the MIME ContentType of the event data.

◆ CorrelationId

Azure::Nullable<Azure::Core::Amqp::Models::AmqpValue> Azure::Messaging::EventHubs::Models::EventData::CorrelationId

Allows an application to specify a context for the event data, such as the type of the event data or the entity that produced the event data.

◆ m_message

std::shared_ptr<Azure::Core::Amqp::Models::AmqpMessage const> Azure::Messaging::EventHubs::Models::EventData::m_message
protected

The incoming AMQP message, if one was received.

◆ MessageId

Azure::Nullable<Azure::Core::Amqp::Models::AmqpValue> Azure::Messaging::EventHubs::Models::EventData::MessageId

The identifier is an application-defined value that uniquely identifies the message and its payload. The identifier is a free-form string and can reflect a GUID or an identifier derived from the application context.

◆ Properties

std::map<std::string, Azure::Core::Amqp::Models::AmqpValue> Azure::Messaging::EventHubs::Models::EventData::Properties

The properties are for application-specific use.


The documentation for this class was generated from the following files: