30 #ifndef GOOGLE_ANDROIDENTERPRISE_API_APP_RESTRICTIONS_SCHEMA_RESTRICTION_H_ 31 #define GOOGLE_ANDROIDENTERPRISE_API_APP_RESTRICTIONS_SCHEMA_RESTRICTION_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/androidenterprise_api/app_restrictions_schema_restriction.h" 39 #include "google/androidenterprise_api/app_restrictions_schema_restriction_restriction_value.h" 89 return StringPiece(
"google_androidenterprise_api::AppRestrictionsSchemaRestriction");
98 return Storage().isMember(
"defaultValue");
105 MutableStorage()->removeMember(
"defaultValue");
131 return Storage().isMember(
"description");
138 MutableStorage()->removeMember(
"description");
146 const Json::Value& v = Storage(
"description");
147 if (v == Json::Value::null)
return StringPiece(
"");
148 return StringPiece(v.asCString());
160 *MutableStorage(
"description") = value.data();
169 return Storage().isMember(
"entry");
176 MutableStorage()->removeMember(
"entry");
184 const Json::Value& storage = Storage(
"entry");
185 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
197 Json::Value* storage = MutableStorage(
"entry");
198 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
207 return Storage().isMember(
"entryValue");
214 MutableStorage()->removeMember(
"entryValue");
222 const Json::Value& storage = Storage(
"entryValue");
223 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
238 Json::Value* storage = MutableStorage(
"entryValue");
239 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
248 return Storage().isMember(
"key");
255 MutableStorage()->removeMember(
"key");
263 const Json::Value& v = Storage(
"key");
264 if (v == Json::Value::null)
return StringPiece(
"");
265 return StringPiece(v.asCString());
277 *MutableStorage(
"key") = value.data();
286 return Storage().isMember(
"nestedRestriction");
293 MutableStorage()->removeMember(
"nestedRestriction");
301 const client::JsonCppArray<AppRestrictionsSchemaRestriction > get_nested_restriction()
const;
313 client::JsonCppArray<AppRestrictionsSchemaRestriction > mutable_nestedRestriction();
321 return Storage().isMember(
"restrictionType");
328 MutableStorage()->removeMember(
"restrictionType");
336 const Json::Value& v = Storage(
"restrictionType");
337 if (v == Json::Value::null)
return StringPiece(
"");
338 return StringPiece(v.asCString());
349 *MutableStorage(
"restrictionType") = value.data();
358 return Storage().isMember(
"title");
365 MutableStorage()->removeMember(
"title");
373 const Json::Value& v = Storage(
"title");
374 if (v == Json::Value::null)
return StringPiece(
"");
375 return StringPiece(v.asCString());
386 *MutableStorage(
"title") = value.data();
393 #endif // GOOGLE_ANDROIDENTERPRISE_API_APP_RESTRICTIONS_SCHEMA_RESTRICTION_H_ void set_restriction_type(const StringPiece &value)
Definition: app_restrictions_schema_restriction.h:348
void clear_title()
Definition: app_restrictions_schema_restriction.h:364
const StringPiece get_key() const
Definition: app_restrictions_schema_restriction.h:262
bool has_default_value() const
Definition: app_restrictions_schema_restriction.h:97
bool has_entry() const
Definition: app_restrictions_schema_restriction.h:168
bool has_nested_restriction() const
Definition: app_restrictions_schema_restriction.h:285
const client::JsonCppArray< string > get_entry_value() const
Definition: app_restrictions_schema_restriction.h:221
const client::JsonCppArray< string > get_entry() const
Definition: app_restrictions_schema_restriction.h:183
void clear_nested_restriction()
Definition: app_restrictions_schema_restriction.h:292
void clear_entry_value()
Definition: app_restrictions_schema_restriction.h:213
const StringPiece get_title() const
Definition: app_restrictions_schema_restriction.h:372
void set_description(const StringPiece &value)
Definition: app_restrictions_schema_restriction.h:159
const StringPiece get_restriction_type() const
Definition: app_restrictions_schema_restriction.h:335
void clear_restriction_type()
Definition: app_restrictions_schema_restriction.h:327
Definition: app_restrictions_schema_restriction.h:54
void clear_description()
Definition: app_restrictions_schema_restriction.h:137
Definition: administrator.h:38
Definition: administrator.cc:40
Definition: app_restrictions_schema_restriction_restriction_value.h:51
const StringPiece get_description() const
Definition: app_restrictions_schema_restriction.h:145
client::JsonCppArray< string > mutable_entryValue()
Definition: app_restrictions_schema_restriction.h:237
void clear_entry()
Definition: app_restrictions_schema_restriction.h:175
bool has_title() const
Definition: app_restrictions_schema_restriction.h:357
void clear_default_value()
Definition: app_restrictions_schema_restriction.h:104
bool has_key() const
Definition: app_restrictions_schema_restriction.h:247
client::JsonCppArray< string > mutable_entry()
Definition: app_restrictions_schema_restriction.h:196
void set_key(const StringPiece &value)
Definition: app_restrictions_schema_restriction.h:276
bool has_entry_value() const
Definition: app_restrictions_schema_restriction.h:206
bool has_description() const
Definition: app_restrictions_schema_restriction.h:130
bool has_restriction_type() const
Definition: app_restrictions_schema_restriction.h:320
void set_title(const StringPiece &value)
Definition: app_restrictions_schema_restriction.h:385
const StringPiece GetTypeName() const
Definition: app_restrictions_schema_restriction.h:88
void clear_key()
Definition: app_restrictions_schema_restriction.h:254