androidenterprise  v1
auto_install_policy.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_AUTO_INSTALL_POLICY_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_AUTO_INSTALL_POLICY_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/auto_install_constraint.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
53 class AutoInstallPolicy : public client::JsonCppData {
54  public:
60  static AutoInstallPolicy* New();
61 
67  explicit AutoInstallPolicy(const Json::Value& storage);
68 
74  explicit AutoInstallPolicy(Json::Value* storage);
75 
79  virtual ~AutoInstallPolicy();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_androidenterprise_api::AutoInstallPolicy");
88  }
89 
96  return Storage().isMember("autoInstallConstraint");
97  }
98 
103  MutableStorage()->removeMember("autoInstallConstraint");
104  }
105 
106 
111  const client::JsonCppArray<AutoInstallConstraint > get_auto_install_constraint() const;
112 
122  client::JsonCppArray<AutoInstallConstraint > mutable_autoInstallConstraint();
123 
129  bool has_auto_install_mode() const {
130  return Storage().isMember("autoInstallMode");
131  }
132 
137  MutableStorage()->removeMember("autoInstallMode");
138  }
139 
140 
144  const StringPiece get_auto_install_mode() const {
145  const Json::Value& v = Storage("autoInstallMode");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
157  void set_auto_install_mode(const StringPiece& value) {
158  *MutableStorage("autoInstallMode") = value.data();
159  }
160 
167  return Storage().isMember("autoInstallPriority");
168  }
169 
174  MutableStorage()->removeMember("autoInstallPriority");
175  }
176 
177 
182  const Json::Value& storage = Storage("autoInstallPriority");
183  return client::JsonValueToCppValueHelper<int32 >(storage);
184  }
185 
194  void set_auto_install_priority(int32 value) {
195  client::SetJsonValueFromCppValueHelper<int32 >(
196  value, MutableStorage("autoInstallPriority"));
197  }
198 
205  return Storage().isMember("minimumVersionCode");
206  }
207 
212  MutableStorage()->removeMember("minimumVersionCode");
213  }
214 
215 
219  int32 get_minimum_version_code() const {
220  const Json::Value& storage = Storage("minimumVersionCode");
221  return client::JsonValueToCppValueHelper<int32 >(storage);
222  }
223 
234  void set_minimum_version_code(int32 value) {
235  client::SetJsonValueFromCppValueHelper<int32 >(
236  value, MutableStorage("minimumVersionCode"));
237  }
238 
239  private:
240  void operator=(const AutoInstallPolicy&);
241 }; // AutoInstallPolicy
242 } // namespace google_androidenterprise_api
243 #endif // GOOGLE_ANDROIDENTERPRISE_API_AUTO_INSTALL_POLICY_H_
void set_minimum_version_code(int32 value)
Definition: auto_install_policy.h:234
const StringPiece GetTypeName() const
Definition: auto_install_policy.h:86
int32 get_minimum_version_code() const
Definition: auto_install_policy.h:219
void set_auto_install_mode(const StringPiece &value)
Definition: auto_install_policy.h:157
const StringPiece get_auto_install_mode() const
Definition: auto_install_policy.h:144
bool has_auto_install_constraint() const
Definition: auto_install_policy.h:95
Definition: administrator.h:38
Definition: administrator.cc:40
bool has_minimum_version_code() const
Definition: auto_install_policy.h:204
Definition: auto_install_policy.h:53
int32 get_auto_install_priority() const
Definition: auto_install_policy.h:181
void clear_auto_install_priority()
Definition: auto_install_policy.h:173
void clear_auto_install_constraint()
Definition: auto_install_policy.h:102
void clear_minimum_version_code()
Definition: auto_install_policy.h:211
void set_auto_install_priority(int32 value)
Definition: auto_install_policy.h:194
void clear_auto_install_mode()
Definition: auto_install_policy.h:136
bool has_auto_install_mode() const
Definition: auto_install_policy.h:129
bool has_auto_install_priority() const
Definition: auto_install_policy.h:166