dataflow  v1b3
topology_config.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_TOPOLOGY_CONFIG_H_
31 #define GOOGLE_DATAFLOW_API_TOPOLOGY_CONFIG_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 #include "google/dataflow_api/computation_topology.h"
40 #include "google/dataflow_api/data_disk_assignment.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_dataflow_api {
47 using namespace googleapis;
48 
55 class TopologyConfig : public client::JsonCppData {
56  public:
62  static TopologyConfig* New();
63 
69  explicit TopologyConfig(const Json::Value& storage);
70 
76  explicit TopologyConfig(Json::Value* storage);
77 
81  virtual ~TopologyConfig();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_dataflow_api::TopologyConfig");
90  }
91 
97  bool has_computations() const {
98  return Storage().isMember("computations");
99  }
100 
105  MutableStorage()->removeMember("computations");
106  }
107 
108 
112  const client::JsonCppArray<ComputationTopology > get_computations() const;
113 
122  client::JsonCppArray<ComputationTopology > mutable_computations();
123 
130  return Storage().isMember("dataDiskAssignments");
131  }
132 
137  MutableStorage()->removeMember("dataDiskAssignments");
138  }
139 
140 
145  const client::JsonCppArray<DataDiskAssignment > get_data_disk_assignments() const;
146 
155  client::JsonCppArray<DataDiskAssignment > mutable_dataDiskAssignments();
156 
162  bool has_forwarding_key_bits() const {
163  return Storage().isMember("forwardingKeyBits");
164  }
165 
170  MutableStorage()->removeMember("forwardingKeyBits");
171  }
172 
173 
177  int32 get_forwarding_key_bits() const {
178  const Json::Value& storage = Storage("forwardingKeyBits");
179  return client::JsonValueToCppValueHelper<int32 >(storage);
180  }
181 
189  void set_forwarding_key_bits(int32 value) {
190  client::SetJsonValueFromCppValueHelper<int32 >(
191  value, MutableStorage("forwardingKeyBits"));
192  }
193 
201  return Storage().isMember("persistentStateVersion");
202  }
203 
208  MutableStorage()->removeMember("persistentStateVersion");
209  }
210 
211 
216  const Json::Value& storage = Storage("persistentStateVersion");
217  return client::JsonValueToCppValueHelper<int32 >(storage);
218  }
219 
227  void set_persistent_state_version(int32 value) {
228  client::SetJsonValueFromCppValueHelper<int32 >(
229  value, MutableStorage("persistentStateVersion"));
230  }
231 
240  return Storage().isMember("userStageToComputationNameMap");
241  }
242 
247  MutableStorage()->removeMember("userStageToComputationNameMap");
248  }
249 
250 
255  const client::JsonCppAssociativeArray<string > get_user_stage_to_computation_name_map() const {
256  const Json::Value& storage = Storage("userStageToComputationNameMap");
257  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
258  }
259 
268  client::JsonCppAssociativeArray<string > mutable_userStageToComputationNameMap() {
269  Json::Value* storage = MutableStorage("userStageToComputationNameMap");
270  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
271  }
272 
273  private:
274  void operator=(const TopologyConfig&);
275 }; // TopologyConfig
276 } // namespace google_dataflow_api
277 #endif // GOOGLE_DATAFLOW_API_TOPOLOGY_CONFIG_H_
void clear_data_disk_assignments()
Definition: topology_config.h:136
const StringPiece GetTypeName() const
Definition: topology_config.h:88
bool has_forwarding_key_bits() const
Definition: topology_config.h:162
bool has_persistent_state_version() const
Definition: topology_config.h:200
void clear_computations()
Definition: topology_config.h:104
client::JsonCppAssociativeArray< string > mutable_userStageToComputationNameMap()
Definition: topology_config.h:268
bool has_data_disk_assignments() const
Definition: topology_config.h:129
void set_forwarding_key_bits(int32 value)
Definition: topology_config.h:189
Definition: topology_config.h:55
int32 get_forwarding_key_bits() const
Definition: topology_config.h:177
const client::JsonCppAssociativeArray< string > get_user_stage_to_computation_name_map() const
Definition: topology_config.h:255
void clear_forwarding_key_bits()
Definition: topology_config.h:169
bool has_user_stage_to_computation_name_map() const
Definition: topology_config.h:239
void clear_persistent_state_version()
Definition: topology_config.h:207
void clear_user_stage_to_computation_name_map()
Definition: topology_config.h:246
Definition: approximate_progress.h:40
void set_persistent_state_version(int32 value)
Definition: topology_config.h:227
bool has_computations() const
Definition: topology_config.h:97
Definition: approximate_progress.cc:42
int32 get_persistent_state_version() const
Definition: topology_config.h:215