compute  v1
url_map.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: 2019-05-15, 03:08:54 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 214
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_URL_MAP_H_
31 #define GOOGLE_COMPUTE_API_URL_MAP_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/compute_api/host_rule.h"
40 #include "google/compute_api/path_matcher.h"
41 #include "google/compute_api/url_map_test.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_compute_api {
48 using namespace googleapis;
49 
57 class UrlMap : public client::JsonCppData {
58  public:
64  static UrlMap* New();
65 
71  explicit UrlMap(const Json::Value& storage);
72 
78  explicit UrlMap(Json::Value* storage);
79 
83  virtual ~UrlMap();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_compute_api::UrlMap");
92  }
93 
99  bool has_creation_timestamp() const {
100  return Storage().isMember("creationTimestamp");
101  }
102 
107  MutableStorage()->removeMember("creationTimestamp");
108  }
109 
110 
114  const StringPiece get_creation_timestamp() const {
115  const Json::Value& v = Storage("creationTimestamp");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_creation_timestamp(const StringPiece& value) {
128  *MutableStorage("creationTimestamp") = value.data();
129  }
130 
136  bool has_default_service() const {
137  return Storage().isMember("defaultService");
138  }
139 
144  MutableStorage()->removeMember("defaultService");
145  }
146 
147 
151  const StringPiece get_default_service() const {
152  const Json::Value& v = Storage("defaultService");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
172  void set_default_service(const StringPiece& value) {
173  *MutableStorage("defaultService") = value.data();
174  }
175 
181  bool has_description() const {
182  return Storage().isMember("description");
183  }
184 
189  MutableStorage()->removeMember("description");
190  }
191 
192 
196  const StringPiece get_description() const {
197  const Json::Value& v = Storage("description");
198  if (v == Json::Value::null) return StringPiece("");
199  return StringPiece(v.asCString());
200  }
201 
210  void set_description(const StringPiece& value) {
211  *MutableStorage("description") = value.data();
212  }
213 
219  bool has_fingerprint() const {
220  return Storage().isMember("fingerprint");
221  }
222 
227  MutableStorage()->removeMember("fingerprint");
228  }
229 
230 
234  const StringPiece get_fingerprint() const {
235  const Json::Value& v = Storage("fingerprint");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
253  void set_fingerprint(const StringPiece& value) {
254  *MutableStorage("fingerprint") = value.data();
255  }
256 
262  bool has_host_rules() const {
263  return Storage().isMember("hostRules");
264  }
265 
270  MutableStorage()->removeMember("hostRules");
271  }
272 
273 
277  const client::JsonCppArray<HostRule > get_host_rules() const;
278 
287  client::JsonCppArray<HostRule > mutable_hostRules();
288 
294  bool has_id() const {
295  return Storage().isMember("id");
296  }
297 
301  void clear_id() {
302  MutableStorage()->removeMember("id");
303  }
304 
305 
309  uint64 get_id() const {
310  const Json::Value& storage = Storage("id");
311  return client::JsonValueToCppValueHelper<uint64 >(storage);
312  }
313 
322  void set_id(uint64 value) {
323  client::SetJsonValueFromCppValueHelper<uint64 >(
324  value, MutableStorage("id"));
325  }
326 
332  bool has_kind() const {
333  return Storage().isMember("kind");
334  }
335 
339  void clear_kind() {
340  MutableStorage()->removeMember("kind");
341  }
342 
343 
347  const StringPiece get_kind() const {
348  const Json::Value& v = Storage("kind");
349  if (v == Json::Value::null) return StringPiece("");
350  return StringPiece(v.asCString());
351  }
352 
360  void set_kind(const StringPiece& value) {
361  *MutableStorage("kind") = value.data();
362  }
363 
369  bool has_name() const {
370  return Storage().isMember("name");
371  }
372 
376  void clear_name() {
377  MutableStorage()->removeMember("name");
378  }
379 
380 
384  const StringPiece get_name() const {
385  const Json::Value& v = Storage("name");
386  if (v == Json::Value::null) return StringPiece("");
387  return StringPiece(v.asCString());
388  }
389 
403  void set_name(const StringPiece& value) {
404  *MutableStorage("name") = value.data();
405  }
406 
412  bool has_path_matchers() const {
413  return Storage().isMember("pathMatchers");
414  }
415 
420  MutableStorage()->removeMember("pathMatchers");
421  }
422 
423 
427  const client::JsonCppArray<PathMatcher > get_path_matchers() const;
428 
437  client::JsonCppArray<PathMatcher > mutable_pathMatchers();
438 
444  bool has_self_link() const {
445  return Storage().isMember("selfLink");
446  }
447 
452  MutableStorage()->removeMember("selfLink");
453  }
454 
455 
459  const StringPiece get_self_link() const {
460  const Json::Value& v = Storage("selfLink");
461  if (v == Json::Value::null) return StringPiece("");
462  return StringPiece(v.asCString());
463  }
464 
472  void set_self_link(const StringPiece& value) {
473  *MutableStorage("selfLink") = value.data();
474  }
475 
481  bool has_tests() const {
482  return Storage().isMember("tests");
483  }
484 
488  void clear_tests() {
489  MutableStorage()->removeMember("tests");
490  }
491 
492 
496  const client::JsonCppArray<UrlMapTest > get_tests() const;
497 
507  client::JsonCppArray<UrlMapTest > mutable_tests();
508 
509  private:
510  void operator=(const UrlMap&);
511 }; // UrlMap
512 } // namespace google_compute_api
513 #endif // GOOGLE_COMPUTE_API_URL_MAP_H_
const StringPiece GetTypeName() const
Definition: url_map.h:90
void set_fingerprint(const StringPiece &value)
Definition: url_map.h:253
uint64 get_id() const
Definition: url_map.h:309
bool has_kind() const
Definition: url_map.h:332
void clear_creation_timestamp()
Definition: url_map.h:106
void clear_default_service()
Definition: url_map.h:143
void clear_name()
Definition: url_map.h:376
const StringPiece get_creation_timestamp() const
Definition: url_map.h:114
void clear_path_matchers()
Definition: url_map.h:419
bool has_fingerprint() const
Definition: url_map.h:219
bool has_tests() const
Definition: url_map.h:481
void set_kind(const StringPiece &value)
Definition: url_map.h:360
void set_creation_timestamp(const StringPiece &value)
Definition: url_map.h:127
void clear_fingerprint()
Definition: url_map.h:226
bool has_path_matchers() const
Definition: url_map.h:412
void set_name(const StringPiece &value)
Definition: url_map.h:403
void clear_tests()
Definition: url_map.h:488
bool has_self_link() const
Definition: url_map.h:444
void set_default_service(const StringPiece &value)
Definition: url_map.h:172
void clear_kind()
Definition: url_map.h:339
void clear_host_rules()
Definition: url_map.h:269
void clear_self_link()
Definition: url_map.h:451
Definition: accelerator_config.h:39
const StringPiece get_name() const
Definition: url_map.h:384
const StringPiece get_default_service() const
Definition: url_map.h:151
void clear_description()
Definition: url_map.h:188
bool has_id() const
Definition: url_map.h:294
const StringPiece get_self_link() const
Definition: url_map.h:459
Definition: url_map.h:57
Definition: accelerator_config.cc:41
void clear_id()
Definition: url_map.h:301
void set_description(const StringPiece &value)
Definition: url_map.h:210
void set_self_link(const StringPiece &value)
Definition: url_map.h:472
bool has_description() const
Definition: url_map.h:181
const StringPiece get_fingerprint() const
Definition: url_map.h:234
const StringPiece get_description() const
Definition: url_map.h:196
bool has_creation_timestamp() const
Definition: url_map.h:99
void set_id(uint64 value)
Definition: url_map.h:322
bool has_name() const
Definition: url_map.h:369
const StringPiece get_kind() const
Definition: url_map.h:347
bool has_host_rules() const
Definition: url_map.h:262
bool has_default_service() const
Definition: url_map.h:136