dataflow  v1b3
approximate_reported_progress.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_APPROXIMATE_REPORTED_PROGRESS_H_
31 #define GOOGLE_DATAFLOW_API_APPROXIMATE_REPORTED_PROGRESS_H_
32 
33 #include "googleapis/base/macros.h"
34 #include "googleapis/client/data/jsoncpp_data.h"
35 #include "googleapis/strings/stringpiece.h"
36 
37 #include "google/dataflow_api/position.h"
38 #include "google/dataflow_api/reported_parallelism.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_dataflow_api {
45 using namespace googleapis;
46 
52 class ApproximateReportedProgress : public client::JsonCppData {
53  public:
59  static ApproximateReportedProgress* New();
60 
66  explicit ApproximateReportedProgress(const Json::Value& storage);
67 
73  explicit ApproximateReportedProgress(Json::Value* storage);
74 
78  virtual ~ApproximateReportedProgress();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_dataflow_api::ApproximateReportedProgress");
87  }
88 
94  bool has_consumed_parallelism() const {
95  return Storage().isMember("consumedParallelism");
96  }
97 
102  MutableStorage()->removeMember("consumedParallelism");
103  }
104 
105 
110  const ReportedParallelism get_consumed_parallelism() const;
111 
125  ReportedParallelism mutable_consumedParallelism();
126 
132  bool has_fraction_consumed() const {
133  return Storage().isMember("fractionConsumed");
134  }
135 
140  MutableStorage()->removeMember("fractionConsumed");
141  }
142 
143 
147  double get_fraction_consumed() const {
148  const Json::Value& storage = Storage("fractionConsumed");
149  return client::JsonValueToCppValueHelper<double >(storage);
150  }
151 
160  void set_fraction_consumed(double value) {
161  client::SetJsonValueFromCppValueHelper<double >(
162  value, MutableStorage("fractionConsumed"));
163  }
164 
170  bool has_position() const {
171  return Storage().isMember("position");
172  }
173 
177  void clear_position() {
178  MutableStorage()->removeMember("position");
179  }
180 
181 
185  const Position get_position() const;
186 
195  Position mutable_position();
196 
203  return Storage().isMember("remainingParallelism");
204  }
205 
210  MutableStorage()->removeMember("remainingParallelism");
211  }
212 
213 
218  const ReportedParallelism get_remaining_parallelism() const;
219 
252  ReportedParallelism mutable_remainingParallelism();
253 
254  private:
255  void operator=(const ApproximateReportedProgress&);
256 }; // ApproximateReportedProgress
257 } // namespace google_dataflow_api
258 #endif // GOOGLE_DATAFLOW_API_APPROXIMATE_REPORTED_PROGRESS_H_
Definition: approximate_reported_progress.h:52
bool has_position() const
Definition: approximate_reported_progress.h:170
void clear_consumed_parallelism()
Definition: approximate_reported_progress.h:101
void clear_fraction_consumed()
Definition: approximate_reported_progress.h:139
const StringPiece GetTypeName() const
Definition: approximate_reported_progress.h:85
double get_fraction_consumed() const
Definition: approximate_reported_progress.h:147
bool has_consumed_parallelism() const
Definition: approximate_reported_progress.h:94
Definition: position.h:55
Definition: reported_parallelism.h:50
void clear_position()
Definition: approximate_reported_progress.h:177
bool has_remaining_parallelism() const
Definition: approximate_reported_progress.h:202
Definition: approximate_progress.h:40
void clear_remaining_parallelism()
Definition: approximate_reported_progress.h:209
void set_fraction_consumed(double value)
Definition: approximate_reported_progress.h:160
Definition: approximate_progress.cc:42
bool has_fraction_consumed() const
Definition: approximate_reported_progress.h:132