androidenterprise  v1
app_restrictions_schema_restriction.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: 2020-02-11, 20:26:36 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 Play EMM API (androidenterprise/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 218
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ANDROIDENTERPRISE_API_APP_RESTRICTIONS_SCHEMA_RESTRICTION_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_APP_RESTRICTIONS_SCHEMA_RESTRICTION_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/androidenterprise_api/app_restrictions_schema_restriction.h"
39 #include "google/androidenterprise_api/app_restrictions_schema_restriction_restriction_value.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
54 class AppRestrictionsSchemaRestriction : public client::JsonCppData {
55  public:
62 
68  explicit AppRestrictionsSchemaRestriction(const Json::Value& storage);
69 
75  explicit AppRestrictionsSchemaRestriction(Json::Value* storage);
76 
81 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_androidenterprise_api::AppRestrictionsSchemaRestriction");
90  }
91 
97  bool has_default_value() const {
98  return Storage().isMember("defaultValue");
99  }
100 
105  MutableStorage()->removeMember("defaultValue");
106  }
107 
108 
112  const AppRestrictionsSchemaRestrictionRestrictionValue get_default_value() const;
113 
124 
130  bool has_description() const {
131  return Storage().isMember("description");
132  }
133 
138  MutableStorage()->removeMember("description");
139  }
140 
141 
145  const StringPiece get_description() const {
146  const Json::Value& v = Storage("description");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
159  void set_description(const StringPiece& value) {
160  *MutableStorage("description") = value.data();
161  }
162 
168  bool has_entry() const {
169  return Storage().isMember("entry");
170  }
171 
175  void clear_entry() {
176  MutableStorage()->removeMember("entry");
177  }
178 
179 
183  const client::JsonCppArray<string > get_entry() const {
184  const Json::Value& storage = Storage("entry");
185  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
186  }
187 
196  client::JsonCppArray<string > mutable_entry() {
197  Json::Value* storage = MutableStorage("entry");
198  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
199  }
200 
206  bool has_entry_value() const {
207  return Storage().isMember("entryValue");
208  }
209 
214  MutableStorage()->removeMember("entryValue");
215  }
216 
217 
221  const client::JsonCppArray<string > get_entry_value() const {
222  const Json::Value& storage = Storage("entryValue");
223  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
224  }
225 
237  client::JsonCppArray<string > mutable_entryValue() {
238  Json::Value* storage = MutableStorage("entryValue");
239  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
240  }
241 
247  bool has_key() const {
248  return Storage().isMember("key");
249  }
250 
254  void clear_key() {
255  MutableStorage()->removeMember("key");
256  }
257 
258 
262  const StringPiece get_key() const {
263  const Json::Value& v = Storage("key");
264  if (v == Json::Value::null) return StringPiece("");
265  return StringPiece(v.asCString());
266  }
267 
276  void set_key(const StringPiece& value) {
277  *MutableStorage("key") = value.data();
278  }
279 
285  bool has_nested_restriction() const {
286  return Storage().isMember("nestedRestriction");
287  }
288 
293  MutableStorage()->removeMember("nestedRestriction");
294  }
295 
296 
301  const client::JsonCppArray<AppRestrictionsSchemaRestriction > get_nested_restriction() const;
302 
313  client::JsonCppArray<AppRestrictionsSchemaRestriction > mutable_nestedRestriction();
314 
320  bool has_restriction_type() const {
321  return Storage().isMember("restrictionType");
322  }
323 
328  MutableStorage()->removeMember("restrictionType");
329  }
330 
331 
335  const StringPiece get_restriction_type() const {
336  const Json::Value& v = Storage("restrictionType");
337  if (v == Json::Value::null) return StringPiece("");
338  return StringPiece(v.asCString());
339  }
340 
348  void set_restriction_type(const StringPiece& value) {
349  *MutableStorage("restrictionType") = value.data();
350  }
351 
357  bool has_title() const {
358  return Storage().isMember("title");
359  }
360 
364  void clear_title() {
365  MutableStorage()->removeMember("title");
366  }
367 
368 
372  const StringPiece get_title() const {
373  const Json::Value& v = Storage("title");
374  if (v == Json::Value::null) return StringPiece("");
375  return StringPiece(v.asCString());
376  }
377 
385  void set_title(const StringPiece& value) {
386  *MutableStorage("title") = value.data();
387  }
388 
389  private:
390  void operator=(const AppRestrictionsSchemaRestriction&);
391 }; // AppRestrictionsSchemaRestriction
392 } // namespace google_androidenterprise_api
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