androidenterprise  v1
managed_property.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_MANAGED_PROPERTY_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_MANAGED_PROPERTY_H_
32 
33 #include <string>
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"
38 
39 #include "google/androidenterprise_api/managed_property_bundle.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
56 class ManagedProperty : public client::JsonCppData {
57  public:
63  static ManagedProperty* New();
64 
70  explicit ManagedProperty(const Json::Value& storage);
71 
77  explicit ManagedProperty(Json::Value* storage);
78 
82  virtual ~ManagedProperty();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_androidenterprise_api::ManagedProperty");
91  }
92 
98  bool has_key() const {
99  return Storage().isMember("key");
100  }
101 
105  void clear_key() {
106  MutableStorage()->removeMember("key");
107  }
108 
109 
113  const StringPiece get_key() const {
114  const Json::Value& v = Storage("key");
115  if (v == Json::Value::null) return StringPiece("");
116  return StringPiece(v.asCString());
117  }
118 
126  void set_key(const StringPiece& value) {
127  *MutableStorage("key") = value.data();
128  }
129 
135  bool has_value_bool() const {
136  return Storage().isMember("valueBool");
137  }
138 
143  MutableStorage()->removeMember("valueBool");
144  }
145 
146 
150  bool get_value_bool() const {
151  const Json::Value& storage = Storage("valueBool");
152  return client::JsonValueToCppValueHelper<bool >(storage);
153  }
154 
163  void set_value_bool(bool value) {
164  client::SetJsonValueFromCppValueHelper<bool >(
165  value, MutableStorage("valueBool"));
166  }
167 
173  bool has_value_bundle() const {
174  return Storage().isMember("valueBundle");
175  }
176 
181  MutableStorage()->removeMember("valueBundle");
182  }
183 
184 
188  const ManagedPropertyBundle get_value_bundle() const;
189 
199  ManagedPropertyBundle mutable_valueBundle();
200 
206  bool has_value_bundle_array() const {
207  return Storage().isMember("valueBundleArray");
208  }
209 
214  MutableStorage()->removeMember("valueBundleArray");
215  }
216 
217 
222  const client::JsonCppArray<ManagedPropertyBundle > get_value_bundle_array() const;
223 
233  client::JsonCppArray<ManagedPropertyBundle > mutable_valueBundleArray();
234 
240  bool has_value_integer() const {
241  return Storage().isMember("valueInteger");
242  }
243 
248  MutableStorage()->removeMember("valueInteger");
249  }
250 
251 
255  int32 get_value_integer() const {
256  const Json::Value& storage = Storage("valueInteger");
257  return client::JsonValueToCppValueHelper<int32 >(storage);
258  }
259 
268  void set_value_integer(int32 value) {
269  client::SetJsonValueFromCppValueHelper<int32 >(
270  value, MutableStorage("valueInteger"));
271  }
272 
278  bool has_value_string() const {
279  return Storage().isMember("valueString");
280  }
281 
286  MutableStorage()->removeMember("valueString");
287  }
288 
289 
293  const StringPiece get_value_string() const {
294  const Json::Value& v = Storage("valueString");
295  if (v == Json::Value::null) return StringPiece("");
296  return StringPiece(v.asCString());
297  }
298 
307  void set_value_string(const StringPiece& value) {
308  *MutableStorage("valueString") = value.data();
309  }
310 
316  bool has_value_string_array() const {
317  return Storage().isMember("valueStringArray");
318  }
319 
324  MutableStorage()->removeMember("valueStringArray");
325  }
326 
327 
332  const client::JsonCppArray<string > get_value_string_array() const {
333  const Json::Value& storage = Storage("valueStringArray");
334  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
335  }
336 
346  client::JsonCppArray<string > mutable_valueStringArray() {
347  Json::Value* storage = MutableStorage("valueStringArray");
348  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
349  }
350 
351  private:
352  void operator=(const ManagedProperty&);
353 }; // ManagedProperty
354 } // namespace google_androidenterprise_api
355 #endif // GOOGLE_ANDROIDENTERPRISE_API_MANAGED_PROPERTY_H_
bool has_value_bundle() const
Definition: managed_property.h:173
bool has_value_string_array() const
Definition: managed_property.h:316
const StringPiece GetTypeName() const
Definition: managed_property.h:89
bool has_value_bool() const
Definition: managed_property.h:135
void clear_value_string_array()
Definition: managed_property.h:323
void clear_value_string()
Definition: managed_property.h:285
void set_key(const StringPiece &value)
Definition: managed_property.h:126
void clear_value_bundle()
Definition: managed_property.h:180
void set_value_bool(bool value)
Definition: managed_property.h:163
void clear_value_integer()
Definition: managed_property.h:247
void set_value_string(const StringPiece &value)
Definition: managed_property.h:307
void clear_value_bool()
Definition: managed_property.h:142
bool has_key() const
Definition: managed_property.h:98
const StringPiece get_key() const
Definition: managed_property.h:113
const StringPiece get_value_string() const
Definition: managed_property.h:293
Definition: administrator.h:38
Definition: administrator.cc:40
void clear_key()
Definition: managed_property.h:105
client::JsonCppArray< string > mutable_valueStringArray()
Definition: managed_property.h:346
bool has_value_bundle_array() const
Definition: managed_property.h:206
const client::JsonCppArray< string > get_value_string_array() const
Definition: managed_property.h:332
void clear_value_bundle_array()
Definition: managed_property.h:213
Definition: managed_property.h:56
bool has_value_integer() const
Definition: managed_property.h:240
void set_value_integer(int32 value)
Definition: managed_property.h:268
Definition: managed_property_bundle.h:51
int32 get_value_integer() const
Definition: managed_property.h:255
bool has_value_string() const
Definition: managed_property.h:278
bool get_value_bool() const
Definition: managed_property.h:150