30 #ifndef GOOGLE_DEPLOYMENTMANAGER_API_DEPLOYMENT_H_ 31 #define GOOGLE_DEPLOYMENTMANAGER_API_DEPLOYMENT_H_ 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" 39 #include "google/deploymentmanager_api/deployment_label_entry.h" 40 #include "google/deploymentmanager_api/deployment_update.h" 41 #include "google/deploymentmanager_api/operation.h" 42 #include "google/deploymentmanager_api/target_configuration.h" 70 explicit Deployment(
const Json::Value& storage);
90 return StringPiece(
"google_deploymentmanager_api::Deployment");
99 return Storage().isMember(
"description");
106 MutableStorage()->removeMember(
"description");
114 const Json::Value& v = Storage(
"description");
115 if (v == Json::Value::null)
return StringPiece(
"");
116 return StringPiece(v.asCString());
127 *MutableStorage(
"description") = value.data();
136 return Storage().isMember(
"fingerprint");
143 MutableStorage()->removeMember(
"fingerprint");
151 const Json::Value& v = Storage(
"fingerprint");
152 if (v == Json::Value::null)
return StringPiece(
"");
153 return StringPiece(v.asCString());
172 *MutableStorage(
"fingerprint") = value.data();
181 return Storage().isMember(
"id");
188 MutableStorage()->removeMember(
"id");
196 const Json::Value& storage = Storage(
"id");
197 return client::JsonValueToCppValueHelper<uint64 >(storage);
205 client::SetJsonValueFromCppValueHelper<uint64 >(
206 value, MutableStorage(
"id"));
215 return Storage().isMember(
"insertTime");
222 MutableStorage()->removeMember(
"insertTime");
230 const Json::Value& v = Storage(
"insertTime");
231 if (v == Json::Value::null)
return StringPiece(
"");
232 return StringPiece(v.asCString());
243 *MutableStorage(
"insertTime") = value.data();
252 return Storage().isMember(
"labels");
259 MutableStorage()->removeMember(
"labels");
266 const client::JsonCppArray<DeploymentLabelEntry > get_labels()
const;
280 client::JsonCppArray<DeploymentLabelEntry > mutable_labels();
288 return Storage().isMember(
"manifest");
295 MutableStorage()->removeMember(
"manifest");
303 const Json::Value& v = Storage(
"manifest");
304 if (v == Json::Value::null)
return StringPiece(
"");
305 return StringPiece(v.asCString());
317 *MutableStorage(
"manifest") = value.data();
326 return Storage().isMember(
"name");
333 MutableStorage()->removeMember(
"name");
341 const Json::Value& v = Storage(
"name");
342 if (v == Json::Value::null)
return StringPiece(
"");
343 return StringPiece(v.asCString());
360 *MutableStorage(
"name") = value.data();
369 return Storage().isMember(
"operation");
376 MutableStorage()->removeMember(
"operation");
402 return Storage().isMember(
"selfLink");
409 MutableStorage()->removeMember(
"selfLink");
417 const Json::Value& v = Storage(
"selfLink");
418 if (v == Json::Value::null)
return StringPiece(
"");
419 return StringPiece(v.asCString());
430 *MutableStorage(
"selfLink") = value.data();
439 return Storage().isMember(
"target");
446 MutableStorage()->removeMember(
"target");
471 return Storage().isMember(
"update");
478 MutableStorage()->removeMember(
"update");
503 return Storage().isMember(
"updateTime");
510 MutableStorage()->removeMember(
"updateTime");
518 const Json::Value& v = Storage(
"updateTime");
519 if (v == Json::Value::null)
return StringPiece(
"");
520 return StringPiece(v.asCString());
531 *MutableStorage(
"updateTime") = value.data();
538 #endif // GOOGLE_DEPLOYMENTMANAGER_API_DEPLOYMENT_H_ bool has_update_time() const
Definition: deployment.h:502
bool has_fingerprint() const
Definition: deployment.h:135
void clear_insert_time()
Definition: deployment.h:221
void clear_operation()
Definition: deployment.h:375
Definition: target_configuration.h:52
const StringPiece get_fingerprint() const
Definition: deployment.h:150
bool has_id() const
Definition: deployment.h:180
void clear_labels()
Definition: deployment.h:258
void clear_fingerprint()
Definition: deployment.h:142
uint64 get_id() const
Definition: deployment.h:195
bool has_operation() const
Definition: deployment.h:368
void clear_target()
Definition: deployment.h:445
void clear_manifest()
Definition: deployment.h:294
void set_name(const StringPiece &value)
Definition: deployment.h:359
void set_description(const StringPiece &value)
Definition: deployment.h:126
void clear_description()
Definition: deployment.h:105
void set_self_link(const StringPiece &value)
Definition: deployment.h:429
const StringPiece get_insert_time() const
Definition: deployment.h:229
bool has_insert_time() const
Definition: deployment.h:214
const StringPiece get_description() const
Definition: deployment.h:113
void clear_update()
Definition: deployment.h:477
bool has_manifest() const
Definition: deployment.h:287
bool has_self_link() const
Definition: deployment.h:401
Definition: operation.h:55
void clear_name()
Definition: deployment.h:332
const StringPiece get_update_time() const
Definition: deployment.h:517
Definition: audit_config.h:40
bool has_target() const
Definition: deployment.h:438
const StringPiece get_name() const
Definition: deployment.h:340
const StringPiece GetTypeName() const
Definition: deployment.h:89
bool has_name() const
Definition: deployment.h:325
void set_insert_time(const StringPiece &value)
Definition: deployment.h:242
bool has_update() const
Definition: deployment.h:470
Definition: audit_config.cc:42
void set_update_time(const StringPiece &value)
Definition: deployment.h:530
void set_id(uint64 value)
Definition: deployment.h:204
void clear_id()
Definition: deployment.h:187
void set_fingerprint(const StringPiece &value)
Definition: deployment.h:171
bool has_description() const
Definition: deployment.h:98
void clear_update_time()
Definition: deployment.h:509
const StringPiece get_manifest() const
Definition: deployment.h:302
Definition: deployment_update.h:52
const StringPiece get_self_link() const
Definition: deployment.h:416
void clear_self_link()
Definition: deployment.h:408
void set_manifest(const StringPiece &value)
Definition: deployment.h:316
Definition: deployment.h:56
bool has_labels() const
Definition: deployment.h:251