30 #ifndef GOOGLE_DATAFLOW_API_WORKER_LIFECYCLE_EVENT_H_ 31 #define GOOGLE_DATAFLOW_API_WORKER_LIFECYCLE_EVENT_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 89 return StringPiece(
"google_dataflow_api::WorkerLifecycleEvent");
98 return Storage().isMember(
"containerStartTime");
105 MutableStorage()->removeMember(
"containerStartTime");
113 const Json::Value& v = Storage(
"containerStartTime");
114 if (v == Json::Value::null)
return StringPiece(
"");
115 return StringPiece(v.asCString());
127 *MutableStorage(
"containerStartTime") = value.data();
136 return Storage().isMember(
"event");
143 MutableStorage()->removeMember(
"event");
151 const Json::Value& v = Storage(
"event");
152 if (v == Json::Value::null)
return StringPiece(
"");
153 return StringPiece(v.asCString());
164 *MutableStorage(
"event") = value.data();
173 return Storage().isMember(
"metadata");
180 MutableStorage()->removeMember(
"metadata");
188 const Json::Value& storage = Storage(
"metadata");
189 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
202 Json::Value* storage = MutableStorage(
"metadata");
203 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
210 #endif // GOOGLE_DATAFLOW_API_WORKER_LIFECYCLE_EVENT_H_ bool has_event() const
Definition: worker_lifecycle_event.h:135
void set_container_start_time(const StringPiece &value)
Definition: worker_lifecycle_event.h:126
bool has_container_start_time() const
Definition: worker_lifecycle_event.h:97
void set_event(const StringPiece &value)
Definition: worker_lifecycle_event.h:163
const StringPiece get_container_start_time() const
Definition: worker_lifecycle_event.h:112
client::JsonCppAssociativeArray< string > mutable_metadata()
Definition: worker_lifecycle_event.h:201
Definition: approximate_progress.h:40
const StringPiece get_event() const
Definition: worker_lifecycle_event.h:150
bool has_metadata() const
Definition: worker_lifecycle_event.h:172
void clear_event()
Definition: worker_lifecycle_event.h:142
void clear_metadata()
Definition: worker_lifecycle_event.h:179
Definition: worker_lifecycle_event.h:55
Definition: approximate_progress.cc:42
const client::JsonCppAssociativeArray< string > get_metadata() const
Definition: worker_lifecycle_event.h:187
const StringPiece GetTypeName() const
Definition: worker_lifecycle_event.h:88
void clear_container_start_time()
Definition: worker_lifecycle_event.h:104