dataflow  v1b3
lease_work_item_request.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_LEASE_WORK_ITEM_REQUEST_H_
31 #define GOOGLE_DATAFLOW_API_LEASE_WORK_ITEM_REQUEST_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_dataflow_api {
43 using namespace googleapis;
44 
50 class LeaseWorkItemRequest : public client::JsonCppData {
51  public:
57  static LeaseWorkItemRequest* New();
58 
64  explicit LeaseWorkItemRequest(const Json::Value& storage);
65 
71  explicit LeaseWorkItemRequest(Json::Value* storage);
72 
76  virtual ~LeaseWorkItemRequest();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_dataflow_api::LeaseWorkItemRequest");
85  }
86 
92  bool has_current_worker_time() const {
93  return Storage().isMember("currentWorkerTime");
94  }
95 
100  MutableStorage()->removeMember("currentWorkerTime");
101  }
102 
103 
107  const StringPiece get_current_worker_time() const {
108  const Json::Value& v = Storage("currentWorkerTime");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
120  void set_current_worker_time(const StringPiece& value) {
121  *MutableStorage("currentWorkerTime") = value.data();
122  }
123 
129  bool has_location() const {
130  return Storage().isMember("location");
131  }
132 
136  void clear_location() {
137  MutableStorage()->removeMember("location");
138  }
139 
140 
144  const StringPiece get_location() const {
145  const Json::Value& v = Storage("location");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
159  void set_location(const StringPiece& value) {
160  *MutableStorage("location") = value.data();
161  }
162 
170  return Storage().isMember("requestedLeaseDuration");
171  }
172 
177  MutableStorage()->removeMember("requestedLeaseDuration");
178  }
179 
180 
184  const StringPiece get_requested_lease_duration() const {
185  const Json::Value& v = Storage("requestedLeaseDuration");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_requested_lease_duration(const StringPiece& value) {
198  *MutableStorage("requestedLeaseDuration") = value.data();
199  }
200 
207  return Storage().isMember("unifiedWorkerRequest");
208  }
209 
214  MutableStorage()->removeMember("unifiedWorkerRequest");
215  }
216 
217 
222  const client::JsonCppAssociativeArray<client::JsonCppData > get_unified_worker_request() const {
223  const Json::Value& storage = Storage("unifiedWorkerRequest");
224  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
225  }
226 
235  client::JsonCppAssociativeArray<client::JsonCppData > mutable_unifiedWorkerRequest() {
236  Json::Value* storage = MutableStorage("unifiedWorkerRequest");
237  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
238  }
239 
245  bool has_work_item_types() const {
246  return Storage().isMember("workItemTypes");
247  }
248 
253  MutableStorage()->removeMember("workItemTypes");
254  }
255 
256 
260  const client::JsonCppArray<string > get_work_item_types() const {
261  const Json::Value& storage = Storage("workItemTypes");
262  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
263  }
264 
273  client::JsonCppArray<string > mutable_workItemTypes() {
274  Json::Value* storage = MutableStorage("workItemTypes");
275  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
276  }
277 
283  bool has_worker_capabilities() const {
284  return Storage().isMember("workerCapabilities");
285  }
286 
291  MutableStorage()->removeMember("workerCapabilities");
292  }
293 
294 
299  const client::JsonCppArray<string > get_worker_capabilities() const {
300  const Json::Value& storage = Storage("workerCapabilities");
301  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
302  }
303 
313  client::JsonCppArray<string > mutable_workerCapabilities() {
314  Json::Value* storage = MutableStorage("workerCapabilities");
315  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
316  }
317 
323  bool has_worker_id() const {
324  return Storage().isMember("workerId");
325  }
326 
331  MutableStorage()->removeMember("workerId");
332  }
333 
334 
338  const StringPiece get_worker_id() const {
339  const Json::Value& v = Storage("workerId");
340  if (v == Json::Value::null) return StringPiece("");
341  return StringPiece(v.asCString());
342  }
343 
352  void set_worker_id(const StringPiece& value) {
353  *MutableStorage("workerId") = value.data();
354  }
355 
356  private:
357  void operator=(const LeaseWorkItemRequest&);
358 }; // LeaseWorkItemRequest
359 } // namespace google_dataflow_api
360 #endif // GOOGLE_DATAFLOW_API_LEASE_WORK_ITEM_REQUEST_H_
client::JsonCppAssociativeArray< client::JsonCppData > mutable_unifiedWorkerRequest()
Definition: lease_work_item_request.h:235
const StringPiece get_location() const
Definition: lease_work_item_request.h:144
const StringPiece get_current_worker_time() const
Definition: lease_work_item_request.h:107
bool has_requested_lease_duration() const
Definition: lease_work_item_request.h:169
void clear_unified_worker_request()
Definition: lease_work_item_request.h:213
void clear_work_item_types()
Definition: lease_work_item_request.h:252
bool has_worker_id() const
Definition: lease_work_item_request.h:323
const client::JsonCppArray< string > get_worker_capabilities() const
Definition: lease_work_item_request.h:299
const StringPiece get_worker_id() const
Definition: lease_work_item_request.h:338
void set_worker_id(const StringPiece &value)
Definition: lease_work_item_request.h:352
void clear_requested_lease_duration()
Definition: lease_work_item_request.h:176
client::JsonCppArray< string > mutable_workItemTypes()
Definition: lease_work_item_request.h:273
const StringPiece GetTypeName() const
Definition: lease_work_item_request.h:83
void clear_current_worker_time()
Definition: lease_work_item_request.h:99
const StringPiece get_requested_lease_duration() const
Definition: lease_work_item_request.h:184
void clear_worker_id()
Definition: lease_work_item_request.h:330
void set_current_worker_time(const StringPiece &value)
Definition: lease_work_item_request.h:120
bool has_unified_worker_request() const
Definition: lease_work_item_request.h:206
client::JsonCppArray< string > mutable_workerCapabilities()
Definition: lease_work_item_request.h:313
bool has_location() const
Definition: lease_work_item_request.h:129
bool has_current_worker_time() const
Definition: lease_work_item_request.h:92
Definition: approximate_progress.h:40
void clear_worker_capabilities()
Definition: lease_work_item_request.h:290
const client::JsonCppAssociativeArray< client::JsonCppData > get_unified_worker_request() const
Definition: lease_work_item_request.h:222
void set_requested_lease_duration(const StringPiece &value)
Definition: lease_work_item_request.h:197
void set_location(const StringPiece &value)
Definition: lease_work_item_request.h:159
const client::JsonCppArray< string > get_work_item_types() const
Definition: lease_work_item_request.h:260
Definition: lease_work_item_request.h:50
bool has_worker_capabilities() const
Definition: lease_work_item_request.h:283
Definition: approximate_progress.cc:42
bool has_work_item_types() const
Definition: lease_work_item_request.h:245
void clear_location()
Definition: lease_work_item_request.h:136