Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::pubsub::MessageBuilder Class Reference

Constructs Message objects. More...

#include <google/cloud/pubsub/message.h>

Public Member Functions

 MessageBuilder ()=default
 
Message Build () &&
 Creates a new message. More...
 
MessageBuilderSetData (std::string data) &
 Sets the message payload to data. More...
 
MessageBuilder && SetData (std::string data) &&
 Sets the message payload to data. More...
 
MessageBuilderSetOrderingKey (std::string key) &
 Sets the ordering key to key. More...
 
MessageBuilder && SetOrderingKey (std::string key) &&
 Sets the ordering key to key. More...
 
MessageBuilderInsertAttribute (std::string const &key, std::string const &value) &
 Inserts an attribute to the message, leaving the message unchanged if key is already present. More...
 
MessageBuilder && InsertAttribute (std::string const &key, std::string const &value) &&
 Inserts an attribute to the message, leaving the message unchanged if key is already present. More...
 
MessageBuilderSetAttribute (std::string const &key, std::string value) &
 Inserts or sets an attribute on the message. More...
 
MessageBuilder && SetAttribute (std::string const &key, std::string value) &&
 Inserts or sets an attribute on the message. More...
 
template<typename Iterator >
MessageBuilderSetAttributes (Iterator begin, Iterator end) &
 Sets the attributes in the message to the attributes from the range [begin, end) More...
 
template<typename Iterator >
MessageBuilder && SetAttributes (Iterator begin, Iterator end) &&
 Sets the attributes in the message to the attributes from the range [begin, end) More...
 
MessageBuilderSetAttributes (std::vector< std::pair< std::string, std::string > > v) &
 Sets the attributes in the message to v. More...
 
MessageBuilder && SetAttributes (std::vector< std::pair< std::string, std::string > > v) &&
 Sets the attributes in the message to v. More...
 
template<typename Pair >
MessageBuilderSetAttributes (std::vector< Pair > v) &
 Sets the attributes in the message to v. More...
 
template<typename Pair >
MessageBuilder && SetAttributes (std::vector< Pair > v) &&
 Sets the attributes in the message to v. More...
 

Detailed Description

Constructs Message objects.

Constructor & Destructor Documentation

◆ MessageBuilder()

google::cloud::pubsub::MessageBuilder::MessageBuilder ( )
default

Member Function Documentation

◆ Build()

Message google::cloud::pubsub::MessageBuilder::Build ( ) &&
inline

Creates a new message.

◆ InsertAttribute() [1/2]

MessageBuilder & google::cloud::pubsub::MessageBuilder::InsertAttribute ( std::string const &  key,
std::string const &  value 
) &
inline

Inserts an attribute to the message, leaving the message unchanged if key is already present.

◆ InsertAttribute() [2/2]

MessageBuilder && google::cloud::pubsub::MessageBuilder::InsertAttribute ( std::string const &  key,
std::string const &  value 
) &&
inline

Inserts an attribute to the message, leaving the message unchanged if key is already present.

◆ SetAttribute() [1/2]

MessageBuilder & google::cloud::pubsub::MessageBuilder::SetAttribute ( std::string const &  key,
std::string  value 
) &
inline

Inserts or sets an attribute on the message.

◆ SetAttribute() [2/2]

MessageBuilder && google::cloud::pubsub::MessageBuilder::SetAttribute ( std::string const &  key,
std::string  value 
) &&
inline

Inserts or sets an attribute on the message.

◆ SetAttributes() [1/6]

template<typename Iterator >
MessageBuilder & google::cloud::pubsub::MessageBuilder::SetAttributes ( Iterator  begin,
Iterator  end 
) &
inline

Sets the attributes in the message to the attributes from the range [begin, end)

◆ SetAttributes() [2/6]

template<typename Iterator >
MessageBuilder && google::cloud::pubsub::MessageBuilder::SetAttributes ( Iterator  begin,
Iterator  end 
) &&
inline

Sets the attributes in the message to the attributes from the range [begin, end)

◆ SetAttributes() [3/6]

template<typename Pair >
MessageBuilder & google::cloud::pubsub::MessageBuilder::SetAttributes ( std::vector< Pair >  v) &
inline

Sets the attributes in the message to v.

◆ SetAttributes() [4/6]

template<typename Pair >
MessageBuilder && google::cloud::pubsub::MessageBuilder::SetAttributes ( std::vector< Pair >  v) &&
inline

Sets the attributes in the message to v.

◆ SetAttributes() [5/6]

MessageBuilder & google::cloud::pubsub::MessageBuilder::SetAttributes ( std::vector< std::pair< std::string, std::string > >  v) &
inline

Sets the attributes in the message to v.

◆ SetAttributes() [6/6]

MessageBuilder && google::cloud::pubsub::MessageBuilder::SetAttributes ( std::vector< std::pair< std::string, std::string > >  v) &&
inline

Sets the attributes in the message to v.

◆ SetData() [1/2]

MessageBuilder & google::cloud::pubsub::MessageBuilder::SetData ( std::string  data) &
inline

Sets the message payload to data.

◆ SetData() [2/2]

MessageBuilder && google::cloud::pubsub::MessageBuilder::SetData ( std::string  data) &&
inline

Sets the message payload to data.

◆ SetOrderingKey() [1/2]

MessageBuilder & google::cloud::pubsub::MessageBuilder::SetOrderingKey ( std::string  key) &
inline

Sets the ordering key to key.

◆ SetOrderingKey() [2/2]

MessageBuilder && google::cloud::pubsub::MessageBuilder::SetOrderingKey ( std::string  key) &&
inline

Sets the ordering key to key.