deploymentmanager  v2
manifest.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_MANIFEST_H_
31 #define GOOGLE_DEPLOYMENTMANAGER_API_MANIFEST_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/config_file.h"
40 #include "google/deploymentmanager_api/import_file.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
47 using namespace googleapis;
48 
54 class Manifest : public client::JsonCppData {
55  public:
61  static Manifest* New();
62 
68  explicit Manifest(const Json::Value& storage);
69 
75  explicit Manifest(Json::Value* storage);
76 
80  virtual ~Manifest();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_deploymentmanager_api::Manifest");
89  }
90 
96  bool has_config() const {
97  return Storage().isMember("config");
98  }
99 
103  void clear_config() {
104  MutableStorage()->removeMember("config");
105  }
106 
107 
111  const ConfigFile get_config() const;
112 
120  ConfigFile mutable_config();
121 
127  bool has_expanded_config() const {
128  return Storage().isMember("expandedConfig");
129  }
130 
135  MutableStorage()->removeMember("expandedConfig");
136  }
137 
138 
142  const StringPiece get_expanded_config() const {
143  const Json::Value& v = Storage("expandedConfig");
144  if (v == Json::Value::null) return StringPiece("");
145  return StringPiece(v.asCString());
146  }
147 
156  void set_expanded_config(const StringPiece& value) {
157  *MutableStorage("expandedConfig") = value.data();
158  }
159 
165  bool has_id() const {
166  return Storage().isMember("id");
167  }
168 
172  void clear_id() {
173  MutableStorage()->removeMember("id");
174  }
175 
176 
180  uint64 get_id() const {
181  const Json::Value& storage = Storage("id");
182  return client::JsonValueToCppValueHelper<uint64 >(storage);
183  }
184 
189  void set_id(uint64 value) {
190  client::SetJsonValueFromCppValueHelper<uint64 >(
191  value, MutableStorage("id"));
192  }
193 
199  bool has_imports() const {
200  return Storage().isMember("imports");
201  }
202 
206  void clear_imports() {
207  MutableStorage()->removeMember("imports");
208  }
209 
210 
214  const client::JsonCppArray<ImportFile > get_imports() const;
215 
223  client::JsonCppArray<ImportFile > mutable_imports();
224 
230  bool has_insert_time() const {
231  return Storage().isMember("insertTime");
232  }
233 
238  MutableStorage()->removeMember("insertTime");
239  }
240 
241 
245  const StringPiece get_insert_time() const {
246  const Json::Value& v = Storage("insertTime");
247  if (v == Json::Value::null) return StringPiece("");
248  return StringPiece(v.asCString());
249  }
250 
258  void set_insert_time(const StringPiece& value) {
259  *MutableStorage("insertTime") = value.data();
260  }
261 
267  bool has_layout() const {
268  return Storage().isMember("layout");
269  }
270 
274  void clear_layout() {
275  MutableStorage()->removeMember("layout");
276  }
277 
278 
282  const StringPiece get_layout() const {
283  const Json::Value& v = Storage("layout");
284  if (v == Json::Value::null) return StringPiece("");
285  return StringPiece(v.asCString());
286  }
287 
295  void set_layout(const StringPiece& value) {
296  *MutableStorage("layout") = value.data();
297  }
298 
304  bool has_name() const {
305  return Storage().isMember("name");
306  }
307 
311  void clear_name() {
312  MutableStorage()->removeMember("name");
313  }
314 
315 
319  const StringPiece get_name() const {
320  const Json::Value& v = Storage("name");
321  if (v == Json::Value::null) return StringPiece("");
322  return StringPiece(v.asCString());
323  }
324 
334  void set_name(const StringPiece& value) {
335  *MutableStorage("name") = value.data();
336  }
337 
343  bool has_self_link() const {
344  return Storage().isMember("selfLink");
345  }
346 
351  MutableStorage()->removeMember("selfLink");
352  }
353 
354 
358  const StringPiece get_self_link() const {
359  const Json::Value& v = Storage("selfLink");
360  if (v == Json::Value::null) return StringPiece("");
361  return StringPiece(v.asCString());
362  }
363 
371  void set_self_link(const StringPiece& value) {
372  *MutableStorage("selfLink") = value.data();
373  }
374 
375  private:
376  void operator=(const Manifest&);
377 }; // Manifest
378 } // namespace google_deploymentmanager_api
379 #endif // GOOGLE_DEPLOYMENTMANAGER_API_MANIFEST_H_
bool has_layout() const
Definition: manifest.h:267
const StringPiece get_insert_time() const
Definition: manifest.h:245
void clear_layout()
Definition: manifest.h:274
void clear_insert_time()
Definition: manifest.h:237
void clear_name()
Definition: manifest.h:311
void set_layout(const StringPiece &value)
Definition: manifest.h:295
void set_name(const StringPiece &value)
Definition: manifest.h:334
bool has_self_link() const
Definition: manifest.h:343
void clear_config()
Definition: manifest.h:103
void set_expanded_config(const StringPiece &value)
Definition: manifest.h:156
void set_id(uint64 value)
Definition: manifest.h:189
bool has_id() const
Definition: manifest.h:165
const StringPiece get_self_link() const
Definition: manifest.h:358
bool has_name() const
Definition: manifest.h:304
void clear_id()
Definition: manifest.h:172
const StringPiece get_name() const
Definition: manifest.h:319
void clear_self_link()
Definition: manifest.h:350
void set_insert_time(const StringPiece &value)
Definition: manifest.h:258
const StringPiece GetTypeName() const
Definition: manifest.h:87
bool has_imports() const
Definition: manifest.h:199
Definition: audit_config.h:40
void clear_expanded_config()
Definition: manifest.h:134
const StringPiece get_expanded_config() const
Definition: manifest.h:142
bool has_config() const
Definition: manifest.h:96
Definition: config_file.h:50
Definition: audit_config.cc:42
uint64 get_id() const
Definition: manifest.h:180
bool has_expanded_config() const
Definition: manifest.h:127
void clear_imports()
Definition: manifest.h:206
bool has_insert_time() const
Definition: manifest.h:230
void set_self_link(const StringPiece &value)
Definition: manifest.h:371
const StringPiece get_layout() const
Definition: manifest.h:282