30 #ifndef GOOGLE_CLOUDRESOURCEMANAGER_API_PROJECT_H_ 31 #define GOOGLE_CLOUDRESOURCEMANAGER_API_PROJECT_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/cloudresourcemanager_api/resource_id.h" 55 class Project :
public client::JsonCppData {
69 explicit Project(
const Json::Value& storage);
76 explicit Project(Json::Value* storage);
89 return StringPiece(
"google_cloudresourcemanager_api::Project");
98 return Storage().isMember(
"createTime");
105 MutableStorage()->removeMember(
"createTime");
113 const Json::Value& v = Storage(
"createTime");
114 if (v == Json::Value::null)
return StringPiece(
"");
115 return StringPiece(v.asCString());
128 *MutableStorage(
"createTime") = value.data();
137 return Storage().isMember(
"labels");
144 MutableStorage()->removeMember(
"labels");
151 const client::JsonCppAssociativeArray<string >
get_labels()
const {
152 const Json::Value& storage = Storage(
"labels");
153 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
177 Json::Value* storage = MutableStorage(
"labels");
178 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
187 return Storage().isMember(
"lifecycleState");
194 MutableStorage()->removeMember(
"lifecycleState");
202 const Json::Value& v = Storage(
"lifecycleState");
203 if (v == Json::Value::null)
return StringPiece(
"");
204 return StringPiece(v.asCString());
217 *MutableStorage(
"lifecycleState") = value.data();
226 return Storage().isMember(
"name");
233 MutableStorage()->removeMember(
"name");
241 const Json::Value& v = Storage(
"name");
242 if (v == Json::Value::null)
return StringPiece(
"");
243 return StringPiece(v.asCString());
269 *MutableStorage(
"name") = value.data();
278 return Storage().isMember(
"parent");
285 MutableStorage()->removeMember(
"parent");
316 return Storage().isMember(
"projectId");
323 MutableStorage()->removeMember(
"projectId");
331 const Json::Value& v = Storage(
"projectId");
332 if (v == Json::Value::null)
return StringPiece(
"");
333 return StringPiece(v.asCString());
354 *MutableStorage(
"projectId") = value.data();
363 return Storage().isMember(
"projectNumber");
370 MutableStorage()->removeMember(
"projectNumber");
378 const Json::Value& storage = Storage(
"projectNumber");
379 return client::JsonValueToCppValueHelper<int64 >(storage);
397 client::SetJsonValueFromCppValueHelper<int64 >(
398 value, MutableStorage(
"projectNumber"));
402 void operator=(
const Project&);
405 #endif // GOOGLE_CLOUDRESOURCEMANAGER_API_PROJECT_H_ bool has_labels() const
Definition: project.h:136
void clear_lifecycle_state()
Definition: project.h:193
const StringPiece get_lifecycle_state() const
Definition: project.h:201
void set_project_number(int64 value)
Definition: project.h:396
void set_lifecycle_state(const StringPiece &value)
Definition: project.h:216
int64 get_project_number() const
Definition: project.h:377
bool has_name() const
Definition: project.h:225
void clear_project_id()
Definition: project.h:322
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: project.h:151
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: project.h:176
void clear_project_number()
Definition: project.h:369
Definition: ancestor.cc:41
const StringPiece get_name() const
Definition: project.h:240
bool has_parent() const
Definition: project.h:277
const StringPiece get_project_id() const
Definition: project.h:330
bool has_create_time() const
Definition: project.h:97
bool has_project_number() const
Definition: project.h:362
Definition: ancestor.h:39
void set_create_time(const StringPiece &value)
Definition: project.h:127
void set_project_id(const StringPiece &value)
Definition: project.h:353
void clear_parent()
Definition: project.h:284
const StringPiece GetTypeName() const
Definition: project.h:88
void set_name(const StringPiece &value)
Definition: project.h:268
bool has_lifecycle_state() const
Definition: project.h:186
void clear_name()
Definition: project.h:232
void clear_create_time()
Definition: project.h:104
void clear_labels()
Definition: project.h:143
bool has_project_id() const
Definition: project.h:315
const StringPiece get_create_time() const
Definition: project.h:112
Definition: resource_id.h:53