dataflow  v1b3
runtime_environment.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-19, 02:23:49 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Dataflow API (dataflow/v1b3)
24 // Generated from:
25 // Version: v1b3
26 // Revision: 302
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DATAFLOW_API_RUNTIME_ENVIRONMENT_H_
31 #define GOOGLE_DATAFLOW_API_RUNTIME_ENVIRONMENT_H_
32 
33 #include <string>
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"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_dataflow_api {
44 using namespace googleapis;
45 
51 class RuntimeEnvironment : public client::JsonCppData {
52  public:
58  static RuntimeEnvironment* New();
59 
65  explicit RuntimeEnvironment(const Json::Value& storage);
66 
72  explicit RuntimeEnvironment(Json::Value* storage);
73 
77  virtual ~RuntimeEnvironment();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_dataflow_api::RuntimeEnvironment");
86  }
87 
94  return Storage().isMember("additionalExperiments");
95  }
96 
101  MutableStorage()->removeMember("additionalExperiments");
102  }
103 
104 
109  const client::JsonCppArray<string > get_additional_experiments() const {
110  const Json::Value& storage = Storage("additionalExperiments");
111  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
112  }
113 
122  client::JsonCppArray<string > mutable_additionalExperiments() {
123  Json::Value* storage = MutableStorage("additionalExperiments");
124  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
125  }
126 
133  return Storage().isMember("additionalUserLabels");
134  }
135 
140  MutableStorage()->removeMember("additionalUserLabels");
141  }
142 
143 
148  const client::JsonCppAssociativeArray<string > get_additional_user_labels() const {
149  const Json::Value& storage = Storage("additionalUserLabels");
150  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
151  }
152 
165  client::JsonCppAssociativeArray<string > mutable_additionalUserLabels() {
166  Json::Value* storage = MutableStorage("additionalUserLabels");
167  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
168  }
169 
177  return Storage().isMember("bypassTempDirValidation");
178  }
179 
184  MutableStorage()->removeMember("bypassTempDirValidation");
185  }
186 
187 
192  const Json::Value& storage = Storage("bypassTempDirValidation");
193  return client::JsonValueToCppValueHelper<bool >(storage);
194  }
195 
205  client::SetJsonValueFromCppValueHelper<bool >(
206  value, MutableStorage("bypassTempDirValidation"));
207  }
208 
214  bool has_ip_configuration() const {
215  return Storage().isMember("ipConfiguration");
216  }
217 
222  MutableStorage()->removeMember("ipConfiguration");
223  }
224 
225 
229  const StringPiece get_ip_configuration() const {
230  const Json::Value& v = Storage("ipConfiguration");
231  if (v == Json::Value::null) return StringPiece("");
232  return StringPiece(v.asCString());
233  }
234 
242  void set_ip_configuration(const StringPiece& value) {
243  *MutableStorage("ipConfiguration") = value.data();
244  }
245 
251  bool has_kms_key_name() const {
252  return Storage().isMember("kmsKeyName");
253  }
254 
259  MutableStorage()->removeMember("kmsKeyName");
260  }
261 
262 
266  const StringPiece get_kms_key_name() const {
267  const Json::Value& v = Storage("kmsKeyName");
268  if (v == Json::Value::null) return StringPiece("");
269  return StringPiece(v.asCString());
270  }
271 
281  void set_kms_key_name(const StringPiece& value) {
282  *MutableStorage("kmsKeyName") = value.data();
283  }
284 
290  bool has_machine_type() const {
291  return Storage().isMember("machineType");
292  }
293 
298  MutableStorage()->removeMember("machineType");
299  }
300 
301 
305  const StringPiece get_machine_type() const {
306  const Json::Value& v = Storage("machineType");
307  if (v == Json::Value::null) return StringPiece("");
308  return StringPiece(v.asCString());
309  }
310 
319  void set_machine_type(const StringPiece& value) {
320  *MutableStorage("machineType") = value.data();
321  }
322 
328  bool has_max_workers() const {
329  return Storage().isMember("maxWorkers");
330  }
331 
336  MutableStorage()->removeMember("maxWorkers");
337  }
338 
339 
343  int32 get_max_workers() const {
344  const Json::Value& storage = Storage("maxWorkers");
345  return client::JsonValueToCppValueHelper<int32 >(storage);
346  }
347 
356  void set_max_workers(int32 value) {
357  client::SetJsonValueFromCppValueHelper<int32 >(
358  value, MutableStorage("maxWorkers"));
359  }
360 
366  bool has_network() const {
367  return Storage().isMember("network");
368  }
369 
373  void clear_network() {
374  MutableStorage()->removeMember("network");
375  }
376 
377 
381  const StringPiece get_network() const {
382  const Json::Value& v = Storage("network");
383  if (v == Json::Value::null) return StringPiece("");
384  return StringPiece(v.asCString());
385  }
386 
395  void set_network(const StringPiece& value) {
396  *MutableStorage("network") = value.data();
397  }
398 
404  bool has_num_workers() const {
405  return Storage().isMember("numWorkers");
406  }
407 
412  MutableStorage()->removeMember("numWorkers");
413  }
414 
415 
419  int32 get_num_workers() const {
420  const Json::Value& storage = Storage("numWorkers");
421  return client::JsonValueToCppValueHelper<int32 >(storage);
422  }
423 
431  void set_num_workers(int32 value) {
432  client::SetJsonValueFromCppValueHelper<int32 >(
433  value, MutableStorage("numWorkers"));
434  }
435 
442  return Storage().isMember("serviceAccountEmail");
443  }
444 
449  MutableStorage()->removeMember("serviceAccountEmail");
450  }
451 
452 
456  const StringPiece get_service_account_email() const {
457  const Json::Value& v = Storage("serviceAccountEmail");
458  if (v == Json::Value::null) return StringPiece("");
459  return StringPiece(v.asCString());
460  }
461 
469  void set_service_account_email(const StringPiece& value) {
470  *MutableStorage("serviceAccountEmail") = value.data();
471  }
472 
478  bool has_subnetwork() const {
479  return Storage().isMember("subnetwork");
480  }
481 
486  MutableStorage()->removeMember("subnetwork");
487  }
488 
489 
493  const StringPiece get_subnetwork() const {
494  const Json::Value& v = Storage("subnetwork");
495  if (v == Json::Value::null) return StringPiece("");
496  return StringPiece(v.asCString());
497  }
498 
507  void set_subnetwork(const StringPiece& value) {
508  *MutableStorage("subnetwork") = value.data();
509  }
510 
516  bool has_temp_location() const {
517  return Storage().isMember("tempLocation");
518  }
519 
524  MutableStorage()->removeMember("tempLocation");
525  }
526 
527 
531  const StringPiece get_temp_location() const {
532  const Json::Value& v = Storage("tempLocation");
533  if (v == Json::Value::null) return StringPiece("");
534  return StringPiece(v.asCString());
535  }
536 
545  void set_temp_location(const StringPiece& value) {
546  *MutableStorage("tempLocation") = value.data();
547  }
548 
554  bool has_worker_region() const {
555  return Storage().isMember("workerRegion");
556  }
557 
562  MutableStorage()->removeMember("workerRegion");
563  }
564 
565 
569  const StringPiece get_worker_region() const {
570  const Json::Value& v = Storage("workerRegion");
571  if (v == Json::Value::null) return StringPiece("");
572  return StringPiece(v.asCString());
573  }
574 
587  void set_worker_region(const StringPiece& value) {
588  *MutableStorage("workerRegion") = value.data();
589  }
590 
596  bool has_worker_zone() const {
597  return Storage().isMember("workerZone");
598  }
599 
604  MutableStorage()->removeMember("workerZone");
605  }
606 
607 
611  const StringPiece get_worker_zone() const {
612  const Json::Value& v = Storage("workerZone");
613  if (v == Json::Value::null) return StringPiece("");
614  return StringPiece(v.asCString());
615  }
616 
630  void set_worker_zone(const StringPiece& value) {
631  *MutableStorage("workerZone") = value.data();
632  }
633 
639  bool has_zone() const {
640  return Storage().isMember("zone");
641  }
642 
646  void clear_zone() {
647  MutableStorage()->removeMember("zone");
648  }
649 
650 
654  const StringPiece get_zone() const {
655  const Json::Value& v = Storage("zone");
656  if (v == Json::Value::null) return StringPiece("");
657  return StringPiece(v.asCString());
658  }
659 
670  void set_zone(const StringPiece& value) {
671  *MutableStorage("zone") = value.data();
672  }
673 
674  private:
675  void operator=(const RuntimeEnvironment&);
676 }; // RuntimeEnvironment
677 } // namespace google_dataflow_api
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