dataflow  v1b3
work_item_status.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_STATUS_H_
31 #define GOOGLE_DATAFLOW_API_WORK_ITEM_STATUS_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_reported_progress.h"
41 #include "google/dataflow_api/counter_update.h"
42 #include "google/dataflow_api/dynamic_source_split.h"
43 #include "google/dataflow_api/metric_update.h"
44 #include "google/dataflow_api/position.h"
45 #include "google/dataflow_api/source_fork.h"
46 #include "google/dataflow_api/source_operation_response.h"
47 #include "google/dataflow_api/status.h"
48 
49 namespace Json {
50 class Value;
51 } // namespace Json
52 
53 namespace google_dataflow_api {
54 using namespace googleapis;
55 
61 class WorkItemStatus : public client::JsonCppData {
62  public:
68  static WorkItemStatus* New();
69 
75  explicit WorkItemStatus(const Json::Value& storage);
76 
82  explicit WorkItemStatus(Json::Value* storage);
83 
87  virtual ~WorkItemStatus();
88 
94  const StringPiece GetTypeName() const {
95  return StringPiece("google_dataflow_api::WorkItemStatus");
96  }
97 
103  bool has_completed() const {
104  return Storage().isMember("completed");
105  }
106 
111  MutableStorage()->removeMember("completed");
112  }
113 
114 
118  bool get_completed() const {
119  const Json::Value& storage = Storage("completed");
120  return client::JsonValueToCppValueHelper<bool >(storage);
121  }
122 
130  void set_completed(bool value) {
131  client::SetJsonValueFromCppValueHelper<bool >(
132  value, MutableStorage("completed"));
133  }
134 
140  bool has_counter_updates() const {
141  return Storage().isMember("counterUpdates");
142  }
143 
148  MutableStorage()->removeMember("counterUpdates");
149  }
150 
151 
156  const client::JsonCppArray<CounterUpdate > get_counter_updates() const;
157 
166  client::JsonCppArray<CounterUpdate > mutable_counterUpdates();
167 
174  return Storage().isMember("dynamicSourceSplit");
175  }
176 
181  MutableStorage()->removeMember("dynamicSourceSplit");
182  }
183 
184 
189  const DynamicSourceSplit get_dynamic_source_split() const;
190 
199  DynamicSourceSplit mutable_dynamicSourceSplit();
200 
206  bool has_errors() const {
207  return Storage().isMember("errors");
208  }
209 
213  void clear_errors() {
214  MutableStorage()->removeMember("errors");
215  }
216 
217 
221  const client::JsonCppArray<Status > get_errors() const;
222 
232  client::JsonCppArray<Status > mutable_errors();
233 
239  bool has_metric_updates() const {
240  return Storage().isMember("metricUpdates");
241  }
242 
247  MutableStorage()->removeMember("metricUpdates");
248  }
249 
250 
254  const client::JsonCppArray<MetricUpdate > get_metric_updates() const;
255 
266  client::JsonCppArray<MetricUpdate > mutable_metricUpdates();
267 
273  bool has_progress() const {
274  return Storage().isMember("progress");
275  }
276 
280  void clear_progress() {
281  MutableStorage()->removeMember("progress");
282  }
283 
284 
288  const ApproximateProgress get_progress() const;
289 
300  ApproximateProgress mutable_progress();
301 
307  bool has_report_index() const {
308  return Storage().isMember("reportIndex");
309  }
310 
315  MutableStorage()->removeMember("reportIndex");
316  }
317 
318 
322  int64 get_report_index() const {
323  const Json::Value& storage = Storage("reportIndex");
324  return client::JsonValueToCppValueHelper<int64 >(storage);
325  }
326 
345  void set_report_index(int64 value) {
346  client::SetJsonValueFromCppValueHelper<int64 >(
347  value, MutableStorage("reportIndex"));
348  }
349 
355  bool has_reported_progress() const {
356  return Storage().isMember("reportedProgress");
357  }
358 
363  MutableStorage()->removeMember("reportedProgress");
364  }
365 
366 
371  const ApproximateReportedProgress get_reported_progress() const;
372 
381  ApproximateReportedProgress mutable_reportedProgress();
382 
390  return Storage().isMember("requestedLeaseDuration");
391  }
392 
397  MutableStorage()->removeMember("requestedLeaseDuration");
398  }
399 
400 
404  const StringPiece get_requested_lease_duration() const {
405  const Json::Value& v = Storage("requestedLeaseDuration");
406  if (v == Json::Value::null) return StringPiece("");
407  return StringPiece(v.asCString());
408  }
409 
417  void set_requested_lease_duration(const StringPiece& value) {
418  *MutableStorage("requestedLeaseDuration") = value.data();
419  }
420 
426  bool has_source_fork() const {
427  return Storage().isMember("sourceFork");
428  }
429 
434  MutableStorage()->removeMember("sourceFork");
435  }
436 
437 
441  const SourceFork get_source_fork() const;
442 
453  SourceFork mutable_sourceFork();
454 
462  return Storage().isMember("sourceOperationResponse");
463  }
464 
469  MutableStorage()->removeMember("sourceOperationResponse");
470  }
471 
472 
477  const SourceOperationResponse get_source_operation_response() const;
478 
488  SourceOperationResponse mutable_sourceOperationResponse();
489 
495  bool has_stop_position() const {
496  return Storage().isMember("stopPosition");
497  }
498 
503  MutableStorage()->removeMember("stopPosition");
504  }
505 
506 
510  const Position get_stop_position() const;
511 
549  Position mutable_stopPosition();
550 
559  return Storage().isMember("totalThrottlerWaitTimeSeconds");
560  }
561 
566  MutableStorage()->removeMember("totalThrottlerWaitTimeSeconds");
567  }
568 
569 
575  const Json::Value& storage = Storage("totalThrottlerWaitTimeSeconds");
576  return client::JsonValueToCppValueHelper<double >(storage);
577  }
578 
587  client::SetJsonValueFromCppValueHelper<double >(
588  value, MutableStorage("totalThrottlerWaitTimeSeconds"));
589  }
590 
596  bool has_work_item_id() const {
597  return Storage().isMember("workItemId");
598  }
599 
604  MutableStorage()->removeMember("workItemId");
605  }
606 
607 
611  const StringPiece get_work_item_id() const {
612  const Json::Value& v = Storage("workItemId");
613  if (v == Json::Value::null) return StringPiece("");
614  return StringPiece(v.asCString());
615  }
616 
624  void set_work_item_id(const StringPiece& value) {
625  *MutableStorage("workItemId") = value.data();
626  }
627 
628  private:
629  void operator=(const WorkItemStatus&);
630 }; // WorkItemStatus
631 } // namespace google_dataflow_api
632 #endif // GOOGLE_DATAFLOW_API_WORK_ITEM_STATUS_H_
Definition: approximate_reported_progress.h:52
bool get_completed() const
Definition: work_item_status.h:118
bool has_stop_position() const
Definition: work_item_status.h:495
const StringPiece GetTypeName() const
Definition: work_item_status.h:94
void clear_stop_position()
Definition: work_item_status.h:502
int64 get_report_index() const
Definition: work_item_status.h:322
bool has_metric_updates() const
Definition: work_item_status.h:239
void set_total_throttler_wait_time_seconds(double value)
Definition: work_item_status.h:586
const StringPiece get_requested_lease_duration() const
Definition: work_item_status.h:404
void clear_progress()
Definition: work_item_status.h:280
bool has_total_throttler_wait_time_seconds() const
Definition: work_item_status.h:558
Definition: work_item_status.h:61
bool has_completed() const
Definition: work_item_status.h:103
bool has_source_fork() const
Definition: work_item_status.h:426
void clear_source_fork()
Definition: work_item_status.h:433
bool has_reported_progress() const
Definition: work_item_status.h:355
void clear_reported_progress()
Definition: work_item_status.h:362
void clear_dynamic_source_split()
Definition: work_item_status.h:180
bool has_source_operation_response() const
Definition: work_item_status.h:461
Definition: position.h:55
Definition: source_operation_response.h:54
void clear_total_throttler_wait_time_seconds()
Definition: work_item_status.h:565
void clear_source_operation_response()
Definition: work_item_status.h:468
bool has_counter_updates() const
Definition: work_item_status.h:140
bool has_progress() const
Definition: work_item_status.h:273
bool has_report_index() const
Definition: work_item_status.h:307
bool has_work_item_id() const
Definition: work_item_status.h:596
void clear_requested_lease_duration()
Definition: work_item_status.h:396
void clear_counter_updates()
Definition: work_item_status.h:147
Definition: approximate_progress.h:40
void clear_work_item_id()
Definition: work_item_status.h:603
void set_requested_lease_duration(const StringPiece &value)
Definition: work_item_status.h:417
void set_report_index(int64 value)
Definition: work_item_status.h:345
bool has_errors() const
Definition: work_item_status.h:206
void set_work_item_id(const StringPiece &value)
Definition: work_item_status.h:624
const StringPiece get_work_item_id() const
Definition: work_item_status.h:611
double get_total_throttler_wait_time_seconds() const
Definition: work_item_status.h:574
Definition: approximate_progress.h:52
bool has_dynamic_source_split() const
Definition: work_item_status.h:173
void clear_metric_updates()
Definition: work_item_status.h:246
Definition: dynamic_source_split.h:53
bool has_requested_lease_duration() const
Definition: work_item_status.h:389
Definition: approximate_progress.cc:42
void clear_report_index()
Definition: work_item_status.h:314
Definition: source_fork.h:52
void clear_errors()
Definition: work_item_status.h:213
void clear_completed()
Definition: work_item_status.h:110
void set_completed(bool value)
Definition: work_item_status.h:130