30 #ifndef GOOGLE_DATAFLOW_API_RUNTIME_ENVIRONMENT_H_ 31 #define GOOGLE_DATAFLOW_API_RUNTIME_ENVIRONMENT_H_ 34 #include "googleapis/base/integral_types.h" 35 #include "googleapis/base/macros.h" 36 #include "googleapis/client/data/jsoncpp_data.h" 37 #include "googleapis/strings/stringpiece.h" 85 return StringPiece(
"google_dataflow_api::RuntimeEnvironment");
94 return Storage().isMember(
"additionalExperiments");
101 MutableStorage()->removeMember(
"additionalExperiments");
110 const Json::Value& storage = Storage(
"additionalExperiments");
111 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
123 Json::Value* storage = MutableStorage(
"additionalExperiments");
124 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
133 return Storage().isMember(
"additionalUserLabels");
140 MutableStorage()->removeMember(
"additionalUserLabels");
149 const Json::Value& storage = Storage(
"additionalUserLabels");
150 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
166 Json::Value* storage = MutableStorage(
"additionalUserLabels");
167 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
177 return Storage().isMember(
"bypassTempDirValidation");
184 MutableStorage()->removeMember(
"bypassTempDirValidation");
192 const Json::Value& storage = Storage(
"bypassTempDirValidation");
193 return client::JsonValueToCppValueHelper<bool >(storage);
205 client::SetJsonValueFromCppValueHelper<bool >(
206 value, MutableStorage(
"bypassTempDirValidation"));
215 return Storage().isMember(
"ipConfiguration");
222 MutableStorage()->removeMember(
"ipConfiguration");
230 const Json::Value& v = Storage(
"ipConfiguration");
231 if (v == Json::Value::null)
return StringPiece(
"");
232 return StringPiece(v.asCString());
243 *MutableStorage(
"ipConfiguration") = value.data();
252 return Storage().isMember(
"kmsKeyName");
259 MutableStorage()->removeMember(
"kmsKeyName");
267 const Json::Value& v = Storage(
"kmsKeyName");
268 if (v == Json::Value::null)
return StringPiece(
"");
269 return StringPiece(v.asCString());
282 *MutableStorage(
"kmsKeyName") = value.data();
291 return Storage().isMember(
"machineType");
298 MutableStorage()->removeMember(
"machineType");
306 const Json::Value& v = Storage(
"machineType");
307 if (v == Json::Value::null)
return StringPiece(
"");
308 return StringPiece(v.asCString());
320 *MutableStorage(
"machineType") = value.data();
329 return Storage().isMember(
"maxWorkers");
336 MutableStorage()->removeMember(
"maxWorkers");
344 const Json::Value& storage = Storage(
"maxWorkers");
345 return client::JsonValueToCppValueHelper<int32 >(storage);
357 client::SetJsonValueFromCppValueHelper<int32 >(
358 value, MutableStorage(
"maxWorkers"));
367 return Storage().isMember(
"network");
374 MutableStorage()->removeMember(
"network");
382 const Json::Value& v = Storage(
"network");
383 if (v == Json::Value::null)
return StringPiece(
"");
384 return StringPiece(v.asCString());
396 *MutableStorage(
"network") = value.data();
405 return Storage().isMember(
"numWorkers");
412 MutableStorage()->removeMember(
"numWorkers");
420 const Json::Value& storage = Storage(
"numWorkers");
421 return client::JsonValueToCppValueHelper<int32 >(storage);
432 client::SetJsonValueFromCppValueHelper<int32 >(
433 value, MutableStorage(
"numWorkers"));
442 return Storage().isMember(
"serviceAccountEmail");
449 MutableStorage()->removeMember(
"serviceAccountEmail");
457 const Json::Value& v = Storage(
"serviceAccountEmail");
458 if (v == Json::Value::null)
return StringPiece(
"");
459 return StringPiece(v.asCString());
470 *MutableStorage(
"serviceAccountEmail") = value.data();
479 return Storage().isMember(
"subnetwork");
486 MutableStorage()->removeMember(
"subnetwork");
494 const Json::Value& v = Storage(
"subnetwork");
495 if (v == Json::Value::null)
return StringPiece(
"");
496 return StringPiece(v.asCString());
508 *MutableStorage(
"subnetwork") = value.data();
517 return Storage().isMember(
"tempLocation");
524 MutableStorage()->removeMember(
"tempLocation");
532 const Json::Value& v = Storage(
"tempLocation");
533 if (v == Json::Value::null)
return StringPiece(
"");
534 return StringPiece(v.asCString());
546 *MutableStorage(
"tempLocation") = value.data();
555 return Storage().isMember(
"workerRegion");
562 MutableStorage()->removeMember(
"workerRegion");
570 const Json::Value& v = Storage(
"workerRegion");
571 if (v == Json::Value::null)
return StringPiece(
"");
572 return StringPiece(v.asCString());
588 *MutableStorage(
"workerRegion") = value.data();
597 return Storage().isMember(
"workerZone");
604 MutableStorage()->removeMember(
"workerZone");
612 const Json::Value& v = Storage(
"workerZone");
613 if (v == Json::Value::null)
return StringPiece(
"");
614 return StringPiece(v.asCString());
631 *MutableStorage(
"workerZone") = value.data();
640 return Storage().isMember(
"zone");
647 MutableStorage()->removeMember(
"zone");
655 const Json::Value& v = Storage(
"zone");
656 if (v == Json::Value::null)
return StringPiece(
"");
657 return StringPiece(v.asCString());
671 *MutableStorage(
"zone") = value.data();
678 #endif // GOOGLE_DATAFLOW_API_RUNTIME_ENVIRONMENT_H_ bool has_worker_region() const
Definition: runtime_environment.h:554
const StringPiece get_kms_key_name() const
Definition: runtime_environment.h:266
void clear_additional_user_labels()
Definition: runtime_environment.h:139
const StringPiece get_worker_zone() const
Definition: runtime_environment.h:611
void set_network(const StringPiece &value)
Definition: runtime_environment.h:395
const StringPiece get_machine_type() const
Definition: runtime_environment.h:305
void set_ip_configuration(const StringPiece &value)
Definition: runtime_environment.h:242
void set_kms_key_name(const StringPiece &value)
Definition: runtime_environment.h:281
bool get_bypass_temp_dir_validation() const
Definition: runtime_environment.h:191
void set_temp_location(const StringPiece &value)
Definition: runtime_environment.h:545
void clear_max_workers()
Definition: runtime_environment.h:335
void clear_bypass_temp_dir_validation()
Definition: runtime_environment.h:183
void set_service_account_email(const StringPiece &value)
Definition: runtime_environment.h:469
const StringPiece get_worker_region() const
Definition: runtime_environment.h:569
bool has_kms_key_name() const
Definition: runtime_environment.h:251
void clear_network()
Definition: runtime_environment.h:373
void clear_service_account_email()
Definition: runtime_environment.h:448
void clear_worker_region()
Definition: runtime_environment.h:561
void set_zone(const StringPiece &value)
Definition: runtime_environment.h:670
const StringPiece get_service_account_email() const
Definition: runtime_environment.h:456
const StringPiece get_network() const
Definition: runtime_environment.h:381
bool has_machine_type() const
Definition: runtime_environment.h:290
bool has_additional_user_labels() const
Definition: runtime_environment.h:132
bool has_additional_experiments() const
Definition: runtime_environment.h:93
bool has_subnetwork() const
Definition: runtime_environment.h:478
void clear_subnetwork()
Definition: runtime_environment.h:485
void clear_ip_configuration()
Definition: runtime_environment.h:221
void set_worker_zone(const StringPiece &value)
Definition: runtime_environment.h:630
void set_num_workers(int32 value)
Definition: runtime_environment.h:431
const StringPiece get_temp_location() const
Definition: runtime_environment.h:531
const StringPiece get_ip_configuration() const
Definition: runtime_environment.h:229
void set_subnetwork(const StringPiece &value)
Definition: runtime_environment.h:507
const StringPiece get_zone() const
Definition: runtime_environment.h:654
Definition: approximate_progress.h:40
bool has_num_workers() const
Definition: runtime_environment.h:404
bool has_zone() const
Definition: runtime_environment.h:639
bool has_bypass_temp_dir_validation() const
Definition: runtime_environment.h:176
void clear_zone()
Definition: runtime_environment.h:646
Definition: runtime_environment.h:51
void clear_num_workers()
Definition: runtime_environment.h:411
void clear_kms_key_name()
Definition: runtime_environment.h:258
void set_bypass_temp_dir_validation(bool value)
Definition: runtime_environment.h:204
void clear_additional_experiments()
Definition: runtime_environment.h:100
client::JsonCppAssociativeArray< string > mutable_additionalUserLabels()
Definition: runtime_environment.h:165
bool has_ip_configuration() const
Definition: runtime_environment.h:214
void clear_machine_type()
Definition: runtime_environment.h:297
client::JsonCppArray< string > mutable_additionalExperiments()
Definition: runtime_environment.h:122
int32 get_num_workers() const
Definition: runtime_environment.h:419
void clear_temp_location()
Definition: runtime_environment.h:523
void set_machine_type(const StringPiece &value)
Definition: runtime_environment.h:319
bool has_network() const
Definition: runtime_environment.h:366
int32 get_max_workers() const
Definition: runtime_environment.h:343
const client::JsonCppAssociativeArray< string > get_additional_user_labels() const
Definition: runtime_environment.h:148
const client::JsonCppArray< string > get_additional_experiments() const
Definition: runtime_environment.h:109
Definition: approximate_progress.cc:42
bool has_worker_zone() const
Definition: runtime_environment.h:596
bool has_max_workers() const
Definition: runtime_environment.h:328
bool has_temp_location() const
Definition: runtime_environment.h:516
void set_worker_region(const StringPiece &value)
Definition: runtime_environment.h:587
void set_max_workers(int32 value)
Definition: runtime_environment.h:356
const StringPiece GetTypeName() const
Definition: runtime_environment.h:84
const StringPiece get_subnetwork() const
Definition: runtime_environment.h:493
void clear_worker_zone()
Definition: runtime_environment.h:603
bool has_service_account_email() const
Definition: runtime_environment.h:441