30 #ifndef GOOGLE_DATAFLOW_API_APPROXIMATE_REPORTED_PROGRESS_H_ 31 #define GOOGLE_DATAFLOW_API_APPROXIMATE_REPORTED_PROGRESS_H_ 33 #include "googleapis/base/macros.h" 34 #include "googleapis/client/data/jsoncpp_data.h" 35 #include "googleapis/strings/stringpiece.h" 37 #include "google/dataflow_api/position.h" 38 #include "google/dataflow_api/reported_parallelism.h" 86 return StringPiece(
"google_dataflow_api::ApproximateReportedProgress");
95 return Storage().isMember(
"consumedParallelism");
102 MutableStorage()->removeMember(
"consumedParallelism");
133 return Storage().isMember(
"fractionConsumed");
140 MutableStorage()->removeMember(
"fractionConsumed");
148 const Json::Value& storage = Storage(
"fractionConsumed");
149 return client::JsonValueToCppValueHelper<double >(storage);
161 client::SetJsonValueFromCppValueHelper<double >(
162 value, MutableStorage(
"fractionConsumed"));
171 return Storage().isMember(
"position");
178 MutableStorage()->removeMember(
"position");
185 const Position get_position()
const;
203 return Storage().isMember(
"remainingParallelism");
210 MutableStorage()->removeMember(
"remainingParallelism");
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