dataflow  v1b3
map_task.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_MAP_TASK_H_
31 #define GOOGLE_DATAFLOW_API_MAP_TASK_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/parallel_instruction.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_dataflow_api {
45 using namespace googleapis;
46 
57 class MapTask : public client::JsonCppData {
58  public:
64  static MapTask* New();
65 
71  explicit MapTask(const Json::Value& storage);
72 
78  explicit MapTask(Json::Value* storage);
79 
83  virtual ~MapTask();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_dataflow_api::MapTask");
92  }
93 
99  bool has_counter_prefix() const {
100  return Storage().isMember("counterPrefix");
101  }
102 
107  MutableStorage()->removeMember("counterPrefix");
108  }
109 
110 
114  const StringPiece get_counter_prefix() const {
115  const Json::Value& v = Storage("counterPrefix");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
128  void set_counter_prefix(const StringPiece& value) {
129  *MutableStorage("counterPrefix") = value.data();
130  }
131 
137  bool has_instructions() const {
138  return Storage().isMember("instructions");
139  }
140 
145  MutableStorage()->removeMember("instructions");
146  }
147 
148 
152  const client::JsonCppArray<ParallelInstruction > get_instructions() const;
153 
162  client::JsonCppArray<ParallelInstruction > mutable_instructions();
163 
169  bool has_stage_name() const {
170  return Storage().isMember("stageName");
171  }
172 
177  MutableStorage()->removeMember("stageName");
178  }
179 
180 
184  const StringPiece get_stage_name() const {
185  const Json::Value& v = Storage("stageName");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
198  void set_stage_name(const StringPiece& value) {
199  *MutableStorage("stageName") = value.data();
200  }
201 
207  bool has_system_name() const {
208  return Storage().isMember("systemName");
209  }
210 
215  MutableStorage()->removeMember("systemName");
216  }
217 
218 
222  const StringPiece get_system_name() const {
223  const Json::Value& v = Storage("systemName");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
236  void set_system_name(const StringPiece& value) {
237  *MutableStorage("systemName") = value.data();
238  }
239 
240  private:
241  void operator=(const MapTask&);
242 }; // MapTask
243 } // namespace google_dataflow_api
244 #endif // GOOGLE_DATAFLOW_API_MAP_TASK_H_
const StringPiece get_counter_prefix() const
Definition: map_task.h:114
bool has_stage_name() const
Definition: map_task.h:169
void clear_instructions()
Definition: map_task.h:144
bool has_counter_prefix() const
Definition: map_task.h:99
const StringPiece get_stage_name() const
Definition: map_task.h:184
const StringPiece get_system_name() const
Definition: map_task.h:222
Definition: map_task.h:57
bool has_instructions() const
Definition: map_task.h:137
const StringPiece GetTypeName() const
Definition: map_task.h:90
Definition: approximate_progress.h:40
void clear_counter_prefix()
Definition: map_task.h:106
void set_counter_prefix(const StringPiece &value)
Definition: map_task.h:128
void clear_stage_name()
Definition: map_task.h:176
void set_stage_name(const StringPiece &value)
Definition: map_task.h:198
Definition: approximate_progress.cc:42
bool has_system_name() const
Definition: map_task.h:207
void set_system_name(const StringPiece &value)
Definition: map_task.h:236
void clear_system_name()
Definition: map_task.h:214