dataflow  v1b3
worker_settings.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_WORKER_SETTINGS_H_
31 #define GOOGLE_DATAFLOW_API_WORKER_SETTINGS_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 WorkerSettings : public client::JsonCppData {
51  public:
57  static WorkerSettings* New();
58 
64  explicit WorkerSettings(const Json::Value& storage);
65 
71  explicit WorkerSettings(Json::Value* storage);
72 
76  virtual ~WorkerSettings();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_dataflow_api::WorkerSettings");
85  }
86 
92  bool has_base_url() const {
93  return Storage().isMember("baseUrl");
94  }
95 
99  void clear_base_url() {
100  MutableStorage()->removeMember("baseUrl");
101  }
102 
103 
107  const StringPiece get_base_url() const {
108  const Json::Value& v = Storage("baseUrl");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
128  void set_base_url(const StringPiece& value) {
129  *MutableStorage("baseUrl") = value.data();
130  }
131 
137  bool has_reporting_enabled() const {
138  return Storage().isMember("reportingEnabled");
139  }
140 
145  MutableStorage()->removeMember("reportingEnabled");
146  }
147 
148 
152  bool get_reporting_enabled() const {
153  const Json::Value& storage = Storage("reportingEnabled");
154  return client::JsonValueToCppValueHelper<bool >(storage);
155  }
156 
164  void set_reporting_enabled(bool value) {
165  client::SetJsonValueFromCppValueHelper<bool >(
166  value, MutableStorage("reportingEnabled"));
167  }
168 
174  bool has_service_path() const {
175  return Storage().isMember("servicePath");
176  }
177 
182  MutableStorage()->removeMember("servicePath");
183  }
184 
185 
189  const StringPiece get_service_path() const {
190  const Json::Value& v = Storage("servicePath");
191  if (v == Json::Value::null) return StringPiece("");
192  return StringPiece(v.asCString());
193  }
194 
203  void set_service_path(const StringPiece& value) {
204  *MutableStorage("servicePath") = value.data();
205  }
206 
213  return Storage().isMember("shuffleServicePath");
214  }
215 
220  MutableStorage()->removeMember("shuffleServicePath");
221  }
222 
223 
227  const StringPiece get_shuffle_service_path() const {
228  const Json::Value& v = Storage("shuffleServicePath");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
241  void set_shuffle_service_path(const StringPiece& value) {
242  *MutableStorage("shuffleServicePath") = value.data();
243  }
244 
250  bool has_temp_storage_prefix() const {
251  return Storage().isMember("tempStoragePrefix");
252  }
253 
258  MutableStorage()->removeMember("tempStoragePrefix");
259  }
260 
261 
265  const StringPiece get_temp_storage_prefix() const {
266  const Json::Value& v = Storage("tempStoragePrefix");
267  if (v == Json::Value::null) return StringPiece("");
268  return StringPiece(v.asCString());
269  }
270 
286  void set_temp_storage_prefix(const StringPiece& value) {
287  *MutableStorage("tempStoragePrefix") = value.data();
288  }
289 
295  bool has_worker_id() const {
296  return Storage().isMember("workerId");
297  }
298 
303  MutableStorage()->removeMember("workerId");
304  }
305 
306 
310  const StringPiece get_worker_id() const {
311  const Json::Value& v = Storage("workerId");
312  if (v == Json::Value::null) return StringPiece("");
313  return StringPiece(v.asCString());
314  }
315 
323  void set_worker_id(const StringPiece& value) {
324  *MutableStorage("workerId") = value.data();
325  }
326 
327  private:
328  void operator=(const WorkerSettings&);
329 }; // WorkerSettings
330 } // namespace google_dataflow_api
331 #endif // GOOGLE_DATAFLOW_API_WORKER_SETTINGS_H_
bool get_reporting_enabled() const
Definition: worker_settings.h:152
const StringPiece get_shuffle_service_path() const
Definition: worker_settings.h:227
void clear_base_url()
Definition: worker_settings.h:99
const StringPiece get_service_path() const
Definition: worker_settings.h:189
void set_temp_storage_prefix(const StringPiece &value)
Definition: worker_settings.h:286
Definition: worker_settings.h:50
bool has_temp_storage_prefix() const
Definition: worker_settings.h:250
void clear_service_path()
Definition: worker_settings.h:181
bool has_worker_id() const
Definition: worker_settings.h:295
bool has_service_path() const
Definition: worker_settings.h:174
void clear_shuffle_service_path()
Definition: worker_settings.h:219
const StringPiece get_temp_storage_prefix() const
Definition: worker_settings.h:265
void clear_temp_storage_prefix()
Definition: worker_settings.h:257
Definition: approximate_progress.h:40
const StringPiece get_base_url() const
Definition: worker_settings.h:107
void clear_worker_id()
Definition: worker_settings.h:302
void set_worker_id(const StringPiece &value)
Definition: worker_settings.h:323
const StringPiece GetTypeName() const
Definition: worker_settings.h:83
bool has_reporting_enabled() const
Definition: worker_settings.h:137
bool has_shuffle_service_path() const
Definition: worker_settings.h:212
void set_service_path(const StringPiece &value)
Definition: worker_settings.h:203
void set_shuffle_service_path(const StringPiece &value)
Definition: worker_settings.h:241
Definition: approximate_progress.cc:42
const StringPiece get_worker_id() const
Definition: worker_settings.h:310
void set_base_url(const StringPiece &value)
Definition: worker_settings.h:128
bool has_base_url() const
Definition: worker_settings.h:92
void clear_reporting_enabled()
Definition: worker_settings.h:144
void set_reporting_enabled(bool value)
Definition: worker_settings.h:164