androidenterprise  v1
auto_install_constraint.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_CONSTRAINT_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_AUTO_INSTALL_CONSTRAINT_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
43 using namespace googleapis;
44 
51 class AutoInstallConstraint : public client::JsonCppData {
52  public:
58  static AutoInstallConstraint* New();
59 
65  explicit AutoInstallConstraint(const Json::Value& storage);
66 
72  explicit AutoInstallConstraint(Json::Value* storage);
73 
77  virtual ~AutoInstallConstraint();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_androidenterprise_api::AutoInstallConstraint");
86  }
87 
95  return Storage().isMember("chargingStateConstraint");
96  }
97 
102  MutableStorage()->removeMember("chargingStateConstraint");
103  }
104 
105 
109  const StringPiece get_charging_state_constraint() const {
110  const Json::Value& v = Storage("chargingStateConstraint");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
122  void set_charging_state_constraint(const StringPiece& value) {
123  *MutableStorage("chargingStateConstraint") = value.data();
124  }
125 
134  return Storage().isMember("deviceIdleStateConstraint");
135  }
136 
141  MutableStorage()->removeMember("deviceIdleStateConstraint");
142  }
143 
144 
148  const StringPiece get_device_idle_state_constraint() const {
149  const Json::Value& v = Storage("deviceIdleStateConstraint");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
161  void set_device_idle_state_constraint(const StringPiece& value) {
162  *MutableStorage("deviceIdleStateConstraint") = value.data();
163  }
164 
171  return Storage().isMember("networkTypeConstraint");
172  }
173 
178  MutableStorage()->removeMember("networkTypeConstraint");
179  }
180 
181 
185  const StringPiece get_network_type_constraint() const {
186  const Json::Value& v = Storage("networkTypeConstraint");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
198  void set_network_type_constraint(const StringPiece& value) {
199  *MutableStorage("networkTypeConstraint") = value.data();
200  }
201 
202  private:
203  void operator=(const AutoInstallConstraint&);
204 }; // AutoInstallConstraint
205 } // namespace google_androidenterprise_api
206 #endif // GOOGLE_ANDROIDENTERPRISE_API_AUTO_INSTALL_CONSTRAINT_H_
bool has_device_idle_state_constraint() const
Definition: auto_install_constraint.h:133
Definition: auto_install_constraint.h:51
void clear_network_type_constraint()
Definition: auto_install_constraint.h:177
const StringPiece get_device_idle_state_constraint() const
Definition: auto_install_constraint.h:148
bool has_charging_state_constraint() const
Definition: auto_install_constraint.h:94
void set_network_type_constraint(const StringPiece &value)
Definition: auto_install_constraint.h:198
const StringPiece GetTypeName() const
Definition: auto_install_constraint.h:84
void set_device_idle_state_constraint(const StringPiece &value)
Definition: auto_install_constraint.h:161
void clear_device_idle_state_constraint()
Definition: auto_install_constraint.h:140
const StringPiece get_network_type_constraint() const
Definition: auto_install_constraint.h:185
const StringPiece get_charging_state_constraint() const
Definition: auto_install_constraint.h:109
Definition: administrator.h:38
Definition: administrator.cc:40
bool has_network_type_constraint() const
Definition: auto_install_constraint.h:170
void set_charging_state_constraint(const StringPiece &value)
Definition: auto_install_constraint.h:122
void clear_charging_state_constraint()
Definition: auto_install_constraint.h:101