dataflow  v1b3
computation_topology.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_COMPUTATION_TOPOLOGY_H_
31 #define GOOGLE_DATAFLOW_API_COMPUTATION_TOPOLOGY_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/dataflow_api/key_range_location.h"
39 #include "google/dataflow_api/state_family_config.h"
40 #include "google/dataflow_api/stream_location.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_dataflow_api {
47 using namespace googleapis;
48 
54 class ComputationTopology : public client::JsonCppData {
55  public:
61  static ComputationTopology* New();
62 
68  explicit ComputationTopology(const Json::Value& storage);
69 
75  explicit ComputationTopology(Json::Value* storage);
76 
80  virtual ~ComputationTopology();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_dataflow_api::ComputationTopology");
89  }
90 
96  bool has_computation_id() const {
97  return Storage().isMember("computationId");
98  }
99 
104  MutableStorage()->removeMember("computationId");
105  }
106 
107 
111  const StringPiece get_computation_id() const {
112  const Json::Value& v = Storage("computationId");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_computation_id(const StringPiece& value) {
125  *MutableStorage("computationId") = value.data();
126  }
127 
133  bool has_inputs() const {
134  return Storage().isMember("inputs");
135  }
136 
140  void clear_inputs() {
141  MutableStorage()->removeMember("inputs");
142  }
143 
144 
148  const client::JsonCppArray<StreamLocation > get_inputs() const;
149 
157  client::JsonCppArray<StreamLocation > mutable_inputs();
158 
164  bool has_key_ranges() const {
165  return Storage().isMember("keyRanges");
166  }
167 
172  MutableStorage()->removeMember("keyRanges");
173  }
174 
175 
179  const client::JsonCppArray<KeyRangeLocation > get_key_ranges() const;
180 
189  client::JsonCppArray<KeyRangeLocation > mutable_keyRanges();
190 
196  bool has_outputs() const {
197  return Storage().isMember("outputs");
198  }
199 
203  void clear_outputs() {
204  MutableStorage()->removeMember("outputs");
205  }
206 
207 
211  const client::JsonCppArray<StreamLocation > get_outputs() const;
212 
220  client::JsonCppArray<StreamLocation > mutable_outputs();
221 
227  bool has_state_families() const {
228  return Storage().isMember("stateFamilies");
229  }
230 
235  MutableStorage()->removeMember("stateFamilies");
236  }
237 
238 
242  const client::JsonCppArray<StateFamilyConfig > get_state_families() const;
243 
252  client::JsonCppArray<StateFamilyConfig > mutable_stateFamilies();
253 
259  bool has_system_stage_name() const {
260  return Storage().isMember("systemStageName");
261  }
262 
267  MutableStorage()->removeMember("systemStageName");
268  }
269 
270 
274  const StringPiece get_system_stage_name() const {
275  const Json::Value& v = Storage("systemStageName");
276  if (v == Json::Value::null) return StringPiece("");
277  return StringPiece(v.asCString());
278  }
279 
287  void set_system_stage_name(const StringPiece& value) {
288  *MutableStorage("systemStageName") = value.data();
289  }
290 
291  private:
292  void operator=(const ComputationTopology&);
293 }; // ComputationTopology
294 } // namespace google_dataflow_api
295 #endif // GOOGLE_DATAFLOW_API_COMPUTATION_TOPOLOGY_H_
bool has_computation_id() const
Definition: computation_topology.h:96
bool has_key_ranges() const
Definition: computation_topology.h:164
void clear_state_families()
Definition: computation_topology.h:234
const StringPiece get_computation_id() const
Definition: computation_topology.h:111
void clear_outputs()
Definition: computation_topology.h:203
void clear_computation_id()
Definition: computation_topology.h:103
bool has_inputs() const
Definition: computation_topology.h:133
bool has_state_families() const
Definition: computation_topology.h:227
void set_computation_id(const StringPiece &value)
Definition: computation_topology.h:124
Definition: approximate_progress.h:40
Definition: computation_topology.h:54
bool has_outputs() const
Definition: computation_topology.h:196
Definition: approximate_progress.cc:42
void clear_key_ranges()
Definition: computation_topology.h:171
void set_system_stage_name(const StringPiece &value)
Definition: computation_topology.h:287
void clear_inputs()
Definition: computation_topology.h:140
void clear_system_stage_name()
Definition: computation_topology.h:266
const StringPiece GetTypeName() const
Definition: computation_topology.h:87
bool has_system_stage_name() const
Definition: computation_topology.h:259
const StringPiece get_system_stage_name() const
Definition: computation_topology.h:274