androidenterprise  v1
keyed_app_state.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_KEYED_APP_STATE_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_KEYED_APP_STATE_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
44 using namespace googleapis;
45 
52 class KeyedAppState : public client::JsonCppData {
53  public:
59  static KeyedAppState* New();
60 
66  explicit KeyedAppState(const Json::Value& storage);
67 
73  explicit KeyedAppState(Json::Value* storage);
74 
78  virtual ~KeyedAppState();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_androidenterprise_api::KeyedAppState");
87  }
88 
94  bool has_data() const {
95  return Storage().isMember("data");
96  }
97 
101  void clear_data() {
102  MutableStorage()->removeMember("data");
103  }
104 
105 
109  const StringPiece get_data() const {
110  const Json::Value& v = Storage("data");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
124  void set_data(const StringPiece& value) {
125  *MutableStorage("data") = value.data();
126  }
127 
133  bool has_key() const {
134  return Storage().isMember("key");
135  }
136 
140  void clear_key() {
141  MutableStorage()->removeMember("key");
142  }
143 
144 
148  const StringPiece get_key() const {
149  const Json::Value& v = Storage("key");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
164  void set_key(const StringPiece& value) {
165  *MutableStorage("key") = value.data();
166  }
167 
173  bool has_message() const {
174  return Storage().isMember("message");
175  }
176 
180  void clear_message() {
181  MutableStorage()->removeMember("message");
182  }
183 
184 
188  const StringPiece get_message() const {
189  const Json::Value& v = Storage("message");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
203  void set_message(const StringPiece& value) {
204  *MutableStorage("message") = value.data();
205  }
206 
212  bool has_severity() const {
213  return Storage().isMember("severity");
214  }
215 
219  void clear_severity() {
220  MutableStorage()->removeMember("severity");
221  }
222 
223 
227  const StringPiece get_severity() const {
228  const Json::Value& v = Storage("severity");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
240  void set_severity(const StringPiece& value) {
241  *MutableStorage("severity") = value.data();
242  }
243 
250  return Storage().isMember("stateTimestampMillis");
251  }
252 
257  MutableStorage()->removeMember("stateTimestampMillis");
258  }
259 
260 
265  const Json::Value& storage = Storage("stateTimestampMillis");
266  return client::JsonValueToCppValueHelper<int64 >(storage);
267  }
268 
277  void set_state_timestamp_millis(int64 value) {
278  client::SetJsonValueFromCppValueHelper<int64 >(
279  value, MutableStorage("stateTimestampMillis"));
280  }
281 
282  private:
283  void operator=(const KeyedAppState&);
284 }; // KeyedAppState
285 } // namespace google_androidenterprise_api
286 #endif // GOOGLE_ANDROIDENTERPRISE_API_KEYED_APP_STATE_H_
void set_severity(const StringPiece &value)
Definition: keyed_app_state.h:240
void clear_message()
Definition: keyed_app_state.h:180
const StringPiece get_key() const
Definition: keyed_app_state.h:148
void set_key(const StringPiece &value)
Definition: keyed_app_state.h:164
bool has_message() const
Definition: keyed_app_state.h:173
int64 get_state_timestamp_millis() const
Definition: keyed_app_state.h:264
const StringPiece get_data() const
Definition: keyed_app_state.h:109
void set_state_timestamp_millis(int64 value)
Definition: keyed_app_state.h:277
Definition: keyed_app_state.h:52
void clear_key()
Definition: keyed_app_state.h:140
bool has_key() const
Definition: keyed_app_state.h:133
Definition: administrator.h:38
Definition: administrator.cc:40
void clear_state_timestamp_millis()
Definition: keyed_app_state.h:256
void set_message(const StringPiece &value)
Definition: keyed_app_state.h:203
void clear_data()
Definition: keyed_app_state.h:101
void clear_severity()
Definition: keyed_app_state.h:219
const StringPiece get_message() const
Definition: keyed_app_state.h:188
bool has_data() const
Definition: keyed_app_state.h:94
void set_data(const StringPiece &value)
Definition: keyed_app_state.h:124
bool has_severity() const
Definition: keyed_app_state.h:212
bool has_state_timestamp_millis() const
Definition: keyed_app_state.h:249
const StringPiece GetTypeName() const
Definition: keyed_app_state.h:85
const StringPiece get_severity() const
Definition: keyed_app_state.h:227