deploymentmanager  v2
resource.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-03-20, 05:04:30 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Cloud Deployment Manager API (deploymentmanager/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 71
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DEPLOYMENTMANAGER_API_RESOURCE_H_
31 #define GOOGLE_DEPLOYMENTMANAGER_API_RESOURCE_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/deploymentmanager_api/resource_access_control.h"
40 #include "google/deploymentmanager_api/resource_update.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
47 using namespace googleapis;
48 
54 class Resource : public client::JsonCppData {
55  public:
61  class ResourceWarnings : public client::JsonCppData {
62  public:
68  class ResourceWarningsData : public client::JsonCppData {
69  public:
75  static ResourceWarningsData* New();
76 
82  explicit ResourceWarningsData(const Json::Value& storage);
83 
89  explicit ResourceWarningsData(Json::Value* storage);
90 
94  virtual ~ResourceWarningsData();
95 
101  const StringPiece GetTypeName() const {
102  return StringPiece("google_deploymentmanager_api::ResourceWarningsData");
103  }
104 
110  bool has_key() const {
111  return Storage().isMember("key");
112  }
113 
117  void clear_key() {
118  MutableStorage()->removeMember("key");
119  }
120 
121 
125  const StringPiece get_key() const {
126  const Json::Value& v = Storage("key");
127  if (v == Json::Value::null) return StringPiece("");
128  return StringPiece(v.asCString());
129  }
130 
144  void set_key(const StringPiece& value) {
145  *MutableStorage("key") = value.data();
146  }
147 
153  bool has_value() const {
154  return Storage().isMember("value");
155  }
156 
160  void clear_value() {
161  MutableStorage()->removeMember("value");
162  }
163 
164 
168  const StringPiece get_value() const {
169  const Json::Value& v = Storage("value");
170  if (v == Json::Value::null) return StringPiece("");
171  return StringPiece(v.asCString());
172  }
173 
181  void set_value(const StringPiece& value) {
182  *MutableStorage("value") = value.data();
183  }
184 
185  private:
186  void operator=(const ResourceWarningsData&);
187  }; // ResourceWarningsData
193  static ResourceWarnings* New();
194 
200  explicit ResourceWarnings(const Json::Value& storage);
201 
207  explicit ResourceWarnings(Json::Value* storage);
208 
212  virtual ~ResourceWarnings();
213 
219  const StringPiece GetTypeName() const {
220  return StringPiece("google_deploymentmanager_api::ResourceWarnings");
221  }
222 
228  bool has_code() const {
229  return Storage().isMember("code");
230  }
231 
235  void clear_code() {
236  MutableStorage()->removeMember("code");
237  }
238 
239 
243  const StringPiece get_code() const {
244  const Json::Value& v = Storage("code");
245  if (v == Json::Value::null) return StringPiece("");
246  return StringPiece(v.asCString());
247  }
248 
257  void set_code(const StringPiece& value) {
258  *MutableStorage("code") = value.data();
259  }
260 
266  bool has_data() const {
267  return Storage().isMember("data");
268  }
269 
273  void clear_data() {
274  MutableStorage()->removeMember("data");
275  }
276 
277 
281  const client::JsonCppArray<ResourceWarningsData > get_data() const {
282  const Json::Value& storage = Storage("data");
283  return client::JsonValueToCppValueHelper<client::JsonCppArray<ResourceWarningsData > >(storage);
284  }
285 
295  client::JsonCppArray<ResourceWarningsData > mutable_data() {
296  Json::Value* storage = MutableStorage("data");
297  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<ResourceWarningsData > >(storage);
298  }
299 
305  bool has_message() const {
306  return Storage().isMember("message");
307  }
308 
312  void clear_message() {
313  MutableStorage()->removeMember("message");
314  }
315 
316 
320  const StringPiece get_message() const {
321  const Json::Value& v = Storage("message");
322  if (v == Json::Value::null) return StringPiece("");
323  return StringPiece(v.asCString());
324  }
325 
333  void set_message(const StringPiece& value) {
334  *MutableStorage("message") = value.data();
335  }
336 
337  private:
338  void operator=(const ResourceWarnings&);
339  }; // ResourceWarnings
345  static Resource* New();
346 
352  explicit Resource(const Json::Value& storage);
353 
359  explicit Resource(Json::Value* storage);
360 
364  virtual ~Resource();
365 
371  const StringPiece GetTypeName() const {
372  return StringPiece("google_deploymentmanager_api::Resource");
373  }
374 
380  bool has_access_control() const {
381  return Storage().isMember("accessControl");
382  }
383 
388  MutableStorage()->removeMember("accessControl");
389  }
390 
391 
395  const ResourceAccessControl get_access_control() const;
396 
405  ResourceAccessControl mutable_accessControl();
406 
412  bool has_final_properties() const {
413  return Storage().isMember("finalProperties");
414  }
415 
420  MutableStorage()->removeMember("finalProperties");
421  }
422 
423 
427  const StringPiece get_final_properties() const {
428  const Json::Value& v = Storage("finalProperties");
429  if (v == Json::Value::null) return StringPiece("");
430  return StringPiece(v.asCString());
431  }
432 
441  void set_final_properties(const StringPiece& value) {
442  *MutableStorage("finalProperties") = value.data();
443  }
444 
450  bool has_id() const {
451  return Storage().isMember("id");
452  }
453 
457  void clear_id() {
458  MutableStorage()->removeMember("id");
459  }
460 
461 
465  uint64 get_id() const {
466  const Json::Value& storage = Storage("id");
467  return client::JsonValueToCppValueHelper<uint64 >(storage);
468  }
469 
474  void set_id(uint64 value) {
475  client::SetJsonValueFromCppValueHelper<uint64 >(
476  value, MutableStorage("id"));
477  }
478 
484  bool has_insert_time() const {
485  return Storage().isMember("insertTime");
486  }
487 
492  MutableStorage()->removeMember("insertTime");
493  }
494 
495 
499  const StringPiece get_insert_time() const {
500  const Json::Value& v = Storage("insertTime");
501  if (v == Json::Value::null) return StringPiece("");
502  return StringPiece(v.asCString());
503  }
504 
512  void set_insert_time(const StringPiece& value) {
513  *MutableStorage("insertTime") = value.data();
514  }
515 
521  bool has_manifest() const {
522  return Storage().isMember("manifest");
523  }
524 
528  void clear_manifest() {
529  MutableStorage()->removeMember("manifest");
530  }
531 
532 
536  const StringPiece get_manifest() const {
537  const Json::Value& v = Storage("manifest");
538  if (v == Json::Value::null) return StringPiece("");
539  return StringPiece(v.asCString());
540  }
541 
550  void set_manifest(const StringPiece& value) {
551  *MutableStorage("manifest") = value.data();
552  }
553 
559  bool has_name() const {
560  return Storage().isMember("name");
561  }
562 
566  void clear_name() {
567  MutableStorage()->removeMember("name");
568  }
569 
570 
574  const StringPiece get_name() const {
575  const Json::Value& v = Storage("name");
576  if (v == Json::Value::null) return StringPiece("");
577  return StringPiece(v.asCString());
578  }
579 
587  void set_name(const StringPiece& value) {
588  *MutableStorage("name") = value.data();
589  }
590 
596  bool has_properties() const {
597  return Storage().isMember("properties");
598  }
599 
604  MutableStorage()->removeMember("properties");
605  }
606 
607 
611  const StringPiece get_properties() const {
612  const Json::Value& v = Storage("properties");
613  if (v == Json::Value::null) return StringPiece("");
614  return StringPiece(v.asCString());
615  }
616 
625  void set_properties(const StringPiece& value) {
626  *MutableStorage("properties") = value.data();
627  }
628 
634  bool has_type() const {
635  return Storage().isMember("type");
636  }
637 
641  void clear_type() {
642  MutableStorage()->removeMember("type");
643  }
644 
645 
649  const StringPiece get_type() const {
650  const Json::Value& v = Storage("type");
651  if (v == Json::Value::null) return StringPiece("");
652  return StringPiece(v.asCString());
653  }
654 
663  void set_type(const StringPiece& value) {
664  *MutableStorage("type") = value.data();
665  }
666 
672  bool has_update() const {
673  return Storage().isMember("update");
674  }
675 
679  void clear_update() {
680  MutableStorage()->removeMember("update");
681  }
682 
683 
687  const ResourceUpdate get_update() const;
688 
697  ResourceUpdate mutable_update();
698 
704  bool has_update_time() const {
705  return Storage().isMember("updateTime");
706  }
707 
712  MutableStorage()->removeMember("updateTime");
713  }
714 
715 
719  const StringPiece get_update_time() const {
720  const Json::Value& v = Storage("updateTime");
721  if (v == Json::Value::null) return StringPiece("");
722  return StringPiece(v.asCString());
723  }
724 
732  void set_update_time(const StringPiece& value) {
733  *MutableStorage("updateTime") = value.data();
734  }
735 
741  bool has_url() const {
742  return Storage().isMember("url");
743  }
744 
748  void clear_url() {
749  MutableStorage()->removeMember("url");
750  }
751 
752 
756  const StringPiece get_url() const {
757  const Json::Value& v = Storage("url");
758  if (v == Json::Value::null) return StringPiece("");
759  return StringPiece(v.asCString());
760  }
761 
769  void set_url(const StringPiece& value) {
770  *MutableStorage("url") = value.data();
771  }
772 
778  bool has_warnings() const {
779  return Storage().isMember("warnings");
780  }
781 
785  void clear_warnings() {
786  MutableStorage()->removeMember("warnings");
787  }
788 
789 
793  const client::JsonCppArray<ResourceWarnings > get_warnings() const {
794  const Json::Value& storage = Storage("warnings");
795  return client::JsonValueToCppValueHelper<client::JsonCppArray<ResourceWarnings > >(storage);
796  }
797 
807  client::JsonCppArray<ResourceWarnings > mutable_warnings() {
808  Json::Value* storage = MutableStorage("warnings");
809  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<ResourceWarnings > >(storage);
810  }
811 
812  private:
813  void operator=(const Resource&);
814 }; // Resource
815 } // namespace google_deploymentmanager_api
816 #endif // GOOGLE_DEPLOYMENTMANAGER_API_RESOURCE_H_
const StringPiece get_key() const
Definition: resource.h:125
bool has_update_time() const
Definition: resource.h:704
bool has_name() const
Definition: resource.h:559
void set_url(const StringPiece &value)
Definition: resource.h:769
const StringPiece get_message() const
Definition: resource.h:320
const StringPiece get_insert_time() const
Definition: resource.h:499
void clear_name()
Definition: resource.h:566
bool has_insert_time() const
Definition: resource.h:484
void set_value(const StringPiece &value)
Definition: resource.h:181
void clear_manifest()
Definition: resource.h:528
void clear_type()
Definition: resource.h:641
void set_message(const StringPiece &value)
Definition: resource.h:333
const client::JsonCppArray< ResourceWarnings > get_warnings() const
Definition: resource.h:793
void set_key(const StringPiece &value)
Definition: resource.h:144
void set_id(uint64 value)
Definition: resource.h:474
const StringPiece get_update_time() const
Definition: resource.h:719
bool has_message() const
Definition: resource.h:305
bool has_data() const
Definition: resource.h:266
const StringPiece get_manifest() const
Definition: resource.h:536
Definition: resource_update.h:52
client::JsonCppArray< ResourceWarningsData > mutable_data()
Definition: resource.h:295
bool has_manifest() const
Definition: resource.h:521
client::JsonCppArray< ResourceWarnings > mutable_warnings()
Definition: resource.h:807
void set_update_time(const StringPiece &value)
Definition: resource.h:732
bool has_code() const
Definition: resource.h:228
bool has_update() const
Definition: resource.h:672
bool has_id() const
Definition: resource.h:450
const StringPiece get_value() const
Definition: resource.h:168
Definition: audit_config.h:40
void set_properties(const StringPiece &value)
Definition: resource.h:625
void clear_id()
Definition: resource.h:457
void clear_access_control()
Definition: resource.h:387
void set_manifest(const StringPiece &value)
Definition: resource.h:550
const StringPiece get_url() const
Definition: resource.h:756
const StringPiece get_final_properties() const
Definition: resource.h:427
void clear_properties()
Definition: resource.h:603
void clear_update()
Definition: resource.h:679
const StringPiece get_type() const
Definition: resource.h:649
void set_type(const StringPiece &value)
Definition: resource.h:663
bool has_final_properties() const
Definition: resource.h:412
void set_insert_time(const StringPiece &value)
Definition: resource.h:512
const StringPiece GetTypeName() const
Definition: resource.h:371
const StringPiece get_name() const
Definition: resource.h:574
Definition: audit_config.cc:42
void clear_url()
Definition: resource.h:748
bool has_url() const
Definition: resource.h:741
void clear_insert_time()
Definition: resource.h:491
void set_final_properties(const StringPiece &value)
Definition: resource.h:441
bool has_access_control() const
Definition: resource.h:380
const StringPiece get_code() const
Definition: resource.h:243
void set_code(const StringPiece &value)
Definition: resource.h:257
bool has_warnings() const
Definition: resource.h:778
const StringPiece GetTypeName() const
Definition: resource.h:101
const client::JsonCppArray< ResourceWarningsData > get_data() const
Definition: resource.h:281
bool has_properties() const
Definition: resource.h:596
void clear_final_properties()
Definition: resource.h:419
Definition: resource_access_control.h:50
const StringPiece get_properties() const
Definition: resource.h:611
bool has_type() const
Definition: resource.h:634
void clear_warnings()
Definition: resource.h:785
const StringPiece GetTypeName() const
Definition: resource.h:219
uint64 get_id() const
Definition: resource.h:465
void set_name(const StringPiece &value)
Definition: resource.h:587
void clear_update_time()
Definition: resource.h:711