dataflow  v1b3
position.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_POSITION_H_
31 #define GOOGLE_DATAFLOW_API_POSITION_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/concat_position.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_dataflow_api {
46 using namespace googleapis;
47 
55 class Position : public client::JsonCppData {
56  public:
62  static Position* New();
63 
69  explicit Position(const Json::Value& storage);
70 
76  explicit Position(Json::Value* storage);
77 
81  virtual ~Position();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_dataflow_api::Position");
90  }
91 
97  bool has_byte_offset() const {
98  return Storage().isMember("byteOffset");
99  }
100 
105  MutableStorage()->removeMember("byteOffset");
106  }
107 
108 
112  int64 get_byte_offset() const {
113  const Json::Value& storage = Storage("byteOffset");
114  return client::JsonValueToCppValueHelper<int64 >(storage);
115  }
116 
124  void set_byte_offset(int64 value) {
125  client::SetJsonValueFromCppValueHelper<int64 >(
126  value, MutableStorage("byteOffset"));
127  }
128 
134  bool has_concat_position() const {
135  return Storage().isMember("concatPosition");
136  }
137 
142  MutableStorage()->removeMember("concatPosition");
143  }
144 
145 
150  const ConcatPosition get_concat_position() const;
151 
160  ConcatPosition mutable_concatPosition();
161 
167  bool has_end() const {
168  return Storage().isMember("end");
169  }
170 
174  void clear_end() {
175  MutableStorage()->removeMember("end");
176  }
177 
178 
182  bool get_end() const {
183  const Json::Value& storage = Storage("end");
184  return client::JsonValueToCppValueHelper<bool >(storage);
185  }
186 
195  void set_end(bool value) {
196  client::SetJsonValueFromCppValueHelper<bool >(
197  value, MutableStorage("end"));
198  }
199 
205  bool has_key() const {
206  return Storage().isMember("key");
207  }
208 
212  void clear_key() {
213  MutableStorage()->removeMember("key");
214  }
215 
216 
220  const StringPiece get_key() const {
221  const Json::Value& v = Storage("key");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
233  void set_key(const StringPiece& value) {
234  *MutableStorage("key") = value.data();
235  }
236 
242  bool has_record_index() const {
243  return Storage().isMember("recordIndex");
244  }
245 
250  MutableStorage()->removeMember("recordIndex");
251  }
252 
253 
257  int64 get_record_index() const {
258  const Json::Value& storage = Storage("recordIndex");
259  return client::JsonValueToCppValueHelper<int64 >(storage);
260  }
261 
269  void set_record_index(int64 value) {
270  client::SetJsonValueFromCppValueHelper<int64 >(
271  value, MutableStorage("recordIndex"));
272  }
273 
279  bool has_shuffle_position() const {
280  return Storage().isMember("shufflePosition");
281  }
282 
287  MutableStorage()->removeMember("shufflePosition");
288  }
289 
290 
294  const StringPiece get_shuffle_position() const {
295  const Json::Value& v = Storage("shufflePosition");
296  if (v == Json::Value::null) return StringPiece("");
297  return StringPiece(v.asCString());
298  }
299 
308  void set_shuffle_position(const StringPiece& value) {
309  *MutableStorage("shufflePosition") = value.data();
310  }
311 
312  private:
313  void operator=(const Position&);
314 }; // Position
315 } // namespace google_dataflow_api
316 #endif // GOOGLE_DATAFLOW_API_POSITION_H_
void clear_shuffle_position()
Definition: position.h:286
void clear_concat_position()
Definition: position.h:141
void set_end(bool value)
Definition: position.h:195
int64 get_record_index() const
Definition: position.h:257
const StringPiece GetTypeName() const
Definition: position.h:88
bool has_byte_offset() const
Definition: position.h:97
Definition: position.h:55
bool has_key() const
Definition: position.h:205
bool has_end() const
Definition: position.h:167
void set_key(const StringPiece &value)
Definition: position.h:233
void clear_byte_offset()
Definition: position.h:104
bool has_concat_position() const
Definition: position.h:134
int64 get_byte_offset() const
Definition: position.h:112
bool has_shuffle_position() const
Definition: position.h:279
void clear_key()
Definition: position.h:212
void set_shuffle_position(const StringPiece &value)
Definition: position.h:308
Definition: approximate_progress.h:40
bool has_record_index() const
Definition: position.h:242
void clear_end()
Definition: position.h:174
const StringPiece get_key() const
Definition: position.h:220
void set_record_index(int64 value)
Definition: position.h:269
const StringPiece get_shuffle_position() const
Definition: position.h:294
bool get_end() const
Definition: position.h:182
Definition: approximate_progress.cc:42
void clear_record_index()
Definition: position.h:249
void set_byte_offset(int64 value)
Definition: position.h:124
Definition: concat_position.h:54