30 #ifndef GOOGLE_DATAFLOW_API_WORKER_SETTINGS_H_ 31 #define GOOGLE_DATAFLOW_API_WORKER_SETTINGS_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 84 return StringPiece(
"google_dataflow_api::WorkerSettings");
93 return Storage().isMember(
"baseUrl");
100 MutableStorage()->removeMember(
"baseUrl");
108 const Json::Value& v = Storage(
"baseUrl");
109 if (v == Json::Value::null)
return StringPiece(
"");
110 return StringPiece(v.asCString());
129 *MutableStorage(
"baseUrl") = value.data();
138 return Storage().isMember(
"reportingEnabled");
145 MutableStorage()->removeMember(
"reportingEnabled");
153 const Json::Value& storage = Storage(
"reportingEnabled");
154 return client::JsonValueToCppValueHelper<bool >(storage);
165 client::SetJsonValueFromCppValueHelper<bool >(
166 value, MutableStorage(
"reportingEnabled"));
175 return Storage().isMember(
"servicePath");
182 MutableStorage()->removeMember(
"servicePath");
190 const Json::Value& v = Storage(
"servicePath");
191 if (v == Json::Value::null)
return StringPiece(
"");
192 return StringPiece(v.asCString());
204 *MutableStorage(
"servicePath") = value.data();
213 return Storage().isMember(
"shuffleServicePath");
220 MutableStorage()->removeMember(
"shuffleServicePath");
228 const Json::Value& v = Storage(
"shuffleServicePath");
229 if (v == Json::Value::null)
return StringPiece(
"");
230 return StringPiece(v.asCString());
242 *MutableStorage(
"shuffleServicePath") = value.data();
251 return Storage().isMember(
"tempStoragePrefix");
258 MutableStorage()->removeMember(
"tempStoragePrefix");
266 const Json::Value& v = Storage(
"tempStoragePrefix");
267 if (v == Json::Value::null)
return StringPiece(
"");
268 return StringPiece(v.asCString());
287 *MutableStorage(
"tempStoragePrefix") = value.data();
296 return Storage().isMember(
"workerId");
303 MutableStorage()->removeMember(
"workerId");
311 const Json::Value& v = Storage(
"workerId");
312 if (v == Json::Value::null)
return StringPiece(
"");
313 return StringPiece(v.asCString());
324 *MutableStorage(
"workerId") = value.data();
331 #endif // GOOGLE_DATAFLOW_API_WORKER_SETTINGS_H_ bool get_reporting_enabled() const
Definition: worker_settings.h:152
const StringPiece get_shuffle_service_path() const
Definition: worker_settings.h:227
void clear_base_url()
Definition: worker_settings.h:99
const StringPiece get_service_path() const
Definition: worker_settings.h:189
void set_temp_storage_prefix(const StringPiece &value)
Definition: worker_settings.h:286
Definition: worker_settings.h:50
bool has_temp_storage_prefix() const
Definition: worker_settings.h:250
void clear_service_path()
Definition: worker_settings.h:181
bool has_worker_id() const
Definition: worker_settings.h:295
bool has_service_path() const
Definition: worker_settings.h:174
void clear_shuffle_service_path()
Definition: worker_settings.h:219
const StringPiece get_temp_storage_prefix() const
Definition: worker_settings.h:265
void clear_temp_storage_prefix()
Definition: worker_settings.h:257
Definition: approximate_progress.h:40
const StringPiece get_base_url() const
Definition: worker_settings.h:107
void clear_worker_id()
Definition: worker_settings.h:302
void set_worker_id(const StringPiece &value)
Definition: worker_settings.h:323
const StringPiece GetTypeName() const
Definition: worker_settings.h:83
bool has_reporting_enabled() const
Definition: worker_settings.h:137
bool has_shuffle_service_path() const
Definition: worker_settings.h:212
void set_service_path(const StringPiece &value)
Definition: worker_settings.h:203
void set_shuffle_service_path(const StringPiece &value)
Definition: worker_settings.h:241
Definition: approximate_progress.cc:42
const StringPiece get_worker_id() const
Definition: worker_settings.h:310
void set_base_url(const StringPiece &value)
Definition: worker_settings.h:128
bool has_base_url() const
Definition: worker_settings.h:92
void clear_reporting_enabled()
Definition: worker_settings.h:144
void set_reporting_enabled(bool value)
Definition: worker_settings.h:164