I am trying to create a dictionary as part of my message and I would like to have multiple keys for the dictionary. Here's what my message currently looks like:
message User {
string name = 1;
string manager = 2;
string id = 3;
map<string, string> metadata = 4;
}
In the metadata field I would like to save the following data:
metadata_info = {
"sync_direction": "OUTBOUND",
"status": "UNCONFIRMED",
}
What is the best way to save my metadata_info to the metadata field in my User message? Should I just use setattr(message, "metadata", metadata_info) to accomplish this? I am currently using Proto3 and Python3 at the moment.