30 #ifndef GOOGLE_CLOUDRESOURCEMANAGER_API_RESOURCE_ID_H_ 31 #define GOOGLE_CLOUDRESOURCEMANAGER_API_RESOURCE_ID_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 67 explicit ResourceId(
const Json::Value& storage);
87 return StringPiece(
"google_cloudresourcemanager_api::ResourceId");
96 return Storage().isMember(
"id");
103 MutableStorage()->removeMember(
"id");
111 const Json::Value& v = Storage(
"id");
112 if (v == Json::Value::null)
return StringPiece(
"");
113 return StringPiece(v.asCString());
125 *MutableStorage(
"id") = value.data();
134 return Storage().isMember(
"type");
141 MutableStorage()->removeMember(
"type");
149 const Json::Value& v = Storage(
"type");
150 if (v == Json::Value::null)
return StringPiece(
"");
151 return StringPiece(v.asCString());
163 *MutableStorage(
"type") = value.data();
170 #endif // GOOGLE_CLOUDRESOURCEMANAGER_API_RESOURCE_ID_H_ bool has_id() const
Definition: resource_id.h:95
void clear_type()
Definition: resource_id.h:140
const StringPiece GetTypeName() const
Definition: resource_id.h:86
Definition: ancestor.cc:41
Definition: ancestor.h:39
void clear_id()
Definition: resource_id.h:102
const StringPiece get_id() const
Definition: resource_id.h:110
void set_type(const StringPiece &value)
Definition: resource_id.h:162
const StringPiece get_type() const
Definition: resource_id.h:148
bool has_type() const
Definition: resource_id.h:133
void set_id(const StringPiece &value)
Definition: resource_id.h:124
Definition: resource_id.h:53