dataflow  v1b3
work_item_service_state.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_WORK_ITEM_SERVICE_STATE_H_
31 #define GOOGLE_DATAFLOW_API_WORK_ITEM_SERVICE_STATE_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/approximate_progress.h"
40 #include "google/dataflow_api/approximate_split_request.h"
41 #include "google/dataflow_api/hot_key_detection.h"
42 #include "google/dataflow_api/metric_short_id.h"
43 #include "google/dataflow_api/position.h"
44 
45 namespace Json {
46 class Value;
47 } // namespace Json
48 
49 namespace google_dataflow_api {
50 using namespace googleapis;
51 
58 class WorkItemServiceState : public client::JsonCppData {
59  public:
65  static WorkItemServiceState* New();
66 
72  explicit WorkItemServiceState(const Json::Value& storage);
73 
79  explicit WorkItemServiceState(Json::Value* storage);
80 
84  virtual ~WorkItemServiceState();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_dataflow_api::WorkItemServiceState");
93  }
94 
100  bool has_harness_data() const {
101  return Storage().isMember("harnessData");
102  }
103 
108  MutableStorage()->removeMember("harnessData");
109  }
110 
111 
115  const client::JsonCppAssociativeArray<client::JsonCppData > get_harness_data() const {
116  const Json::Value& storage = Storage("harnessData");
117  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
118  }
119 
129  client::JsonCppAssociativeArray<client::JsonCppData > mutable_harnessData() {
130  Json::Value* storage = MutableStorage("harnessData");
131  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
132  }
133 
139  bool has_hot_key_detection() const {
140  return Storage().isMember("hotKeyDetection");
141  }
142 
147  MutableStorage()->removeMember("hotKeyDetection");
148  }
149 
150 
155  const HotKeyDetection get_hot_key_detection() const;
156 
167  HotKeyDetection mutable_hotKeyDetection();
168 
174  bool has_lease_expire_time() const {
175  return Storage().isMember("leaseExpireTime");
176  }
177 
182  MutableStorage()->removeMember("leaseExpireTime");
183  }
184 
185 
189  const StringPiece get_lease_expire_time() const {
190  const Json::Value& v = Storage("leaseExpireTime");
191  if (v == Json::Value::null) return StringPiece("");
192  return StringPiece(v.asCString());
193  }
194 
202  void set_lease_expire_time(const StringPiece& value) {
203  *MutableStorage("leaseExpireTime") = value.data();
204  }
205 
211  bool has_metric_short_id() const {
212  return Storage().isMember("metricShortId");
213  }
214 
219  MutableStorage()->removeMember("metricShortId");
220  }
221 
222 
226  const client::JsonCppArray<MetricShortId > get_metric_short_id() const;
227 
241  client::JsonCppArray<MetricShortId > mutable_metricShortId();
242 
248  bool has_next_report_index() const {
249  return Storage().isMember("nextReportIndex");
250  }
251 
256  MutableStorage()->removeMember("nextReportIndex");
257  }
258 
259 
263  int64 get_next_report_index() const {
264  const Json::Value& storage = Storage("nextReportIndex");
265  return client::JsonValueToCppValueHelper<int64 >(storage);
266  }
267 
277  void set_next_report_index(int64 value) {
278  client::SetJsonValueFromCppValueHelper<int64 >(
279  value, MutableStorage("nextReportIndex"));
280  }
281 
288  return Storage().isMember("reportStatusInterval");
289  }
290 
295  MutableStorage()->removeMember("reportStatusInterval");
296  }
297 
298 
302  const StringPiece get_report_status_interval() const {
303  const Json::Value& v = Storage("reportStatusInterval");
304  if (v == Json::Value::null) return StringPiece("");
305  return StringPiece(v.asCString());
306  }
307 
315  void set_report_status_interval(const StringPiece& value) {
316  *MutableStorage("reportStatusInterval") = value.data();
317  }
318 
324  bool has_split_request() const {
325  return Storage().isMember("splitRequest");
326  }
327 
332  MutableStorage()->removeMember("splitRequest");
333  }
334 
335 
339  const ApproximateSplitRequest get_split_request() const;
340 
350  ApproximateSplitRequest mutable_splitRequest();
351 
358  return Storage().isMember("suggestedStopPoint");
359  }
360 
365  MutableStorage()->removeMember("suggestedStopPoint");
366  }
367 
368 
373  const ApproximateProgress get_suggested_stop_point() const;
374 
385  ApproximateProgress mutable_suggestedStopPoint();
386 
393  return Storage().isMember("suggestedStopPosition");
394  }
395 
400  MutableStorage()->removeMember("suggestedStopPosition");
401  }
402 
403 
408  const Position get_suggested_stop_position() const;
409 
418  Position mutable_suggestedStopPosition();
419 
420  private:
421  void operator=(const WorkItemServiceState&);
422 }; // WorkItemServiceState
423 } // namespace google_dataflow_api
424 #endif // GOOGLE_DATAFLOW_API_WORK_ITEM_SERVICE_STATE_H_
void clear_report_status_interval()
Definition: work_item_service_state.h:294
void clear_suggested_stop_position()
Definition: work_item_service_state.h:399
void clear_next_report_index()
Definition: work_item_service_state.h:255
bool has_lease_expire_time() const
Definition: work_item_service_state.h:174
bool has_harness_data() const
Definition: work_item_service_state.h:100
void set_next_report_index(int64 value)
Definition: work_item_service_state.h:277
Definition: hot_key_detection.h:50
Definition: position.h:55
void set_report_status_interval(const StringPiece &value)
Definition: work_item_service_state.h:315
bool has_metric_short_id() const
Definition: work_item_service_state.h:211
void clear_harness_data()
Definition: work_item_service_state.h:107
void clear_metric_short_id()
Definition: work_item_service_state.h:218
bool has_suggested_stop_position() const
Definition: work_item_service_state.h:392
bool has_split_request() const
Definition: work_item_service_state.h:324
client::JsonCppAssociativeArray< client::JsonCppData > mutable_harnessData()
Definition: work_item_service_state.h:129
bool has_suggested_stop_point() const
Definition: work_item_service_state.h:357
void clear_hot_key_detection()
Definition: work_item_service_state.h:146
Definition: approximate_progress.h:40
bool has_hot_key_detection() const
Definition: work_item_service_state.h:139
void set_lease_expire_time(const StringPiece &value)
Definition: work_item_service_state.h:202
const StringPiece GetTypeName() const
Definition: work_item_service_state.h:91
const StringPiece get_report_status_interval() const
Definition: work_item_service_state.h:302
Definition: approximate_progress.h:52
bool has_report_status_interval() const
Definition: work_item_service_state.h:287
int64 get_next_report_index() const
Definition: work_item_service_state.h:263
void clear_split_request()
Definition: work_item_service_state.h:331
Definition: work_item_service_state.h:58
void clear_lease_expire_time()
Definition: work_item_service_state.h:181
Definition: approximate_progress.cc:42
const client::JsonCppAssociativeArray< client::JsonCppData > get_harness_data() const
Definition: work_item_service_state.h:115
bool has_next_report_index() const
Definition: work_item_service_state.h:248
const StringPiece get_lease_expire_time() const
Definition: work_item_service_state.h:189
Definition: approximate_split_request.h:51
void clear_suggested_stop_point()
Definition: work_item_service_state.h:364