androidenterprise  v1
notification.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_NOTIFICATION_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_NOTIFICATION_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/app_restrictions_schema_change_event.h"
40 #include "google/androidenterprise_api/app_update_event.h"
41 #include "google/androidenterprise_api/device_report_update_event.h"
42 #include "google/androidenterprise_api/install_failure_event.h"
43 #include "google/androidenterprise_api/new_device_event.h"
44 #include "google/androidenterprise_api/new_permissions_event.h"
45 #include "google/androidenterprise_api/product_approval_event.h"
46 #include "google/androidenterprise_api/product_availability_change_event.h"
47 
48 namespace Json {
49 class Value;
50 } // namespace Json
51 
53 using namespace googleapis;
54 
60 class Notification : public client::JsonCppData {
61  public:
67  static Notification* New();
68 
74  explicit Notification(const Json::Value& storage);
75 
81  explicit Notification(Json::Value* storage);
82 
86  virtual ~Notification();
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_androidenterprise_api::Notification");
95  }
96 
105  return Storage().isMember("appRestrictionsSchemaChangeEvent");
106  }
107 
112  MutableStorage()->removeMember("appRestrictionsSchemaChangeEvent");
113  }
114 
115 
120  const AppRestrictionsSchemaChangeEvent get_app_restrictions_schema_change_event() const;
121 
130  AppRestrictionsSchemaChangeEvent mutable_appRestrictionsSchemaChangeEvent();
131 
137  bool has_app_update_event() const {
138  return Storage().isMember("appUpdateEvent");
139  }
140 
145  MutableStorage()->removeMember("appUpdateEvent");
146  }
147 
148 
153  const AppUpdateEvent get_app_update_event() const;
154 
163  AppUpdateEvent mutable_appUpdateEvent();
164 
172  return Storage().isMember("deviceReportUpdateEvent");
173  }
174 
179  MutableStorage()->removeMember("deviceReportUpdateEvent");
180  }
181 
182 
187  const DeviceReportUpdateEvent get_device_report_update_event() const;
188 
197  DeviceReportUpdateEvent mutable_deviceReportUpdateEvent();
198 
204  bool has_enterprise_id() const {
205  return Storage().isMember("enterpriseId");
206  }
207 
212  MutableStorage()->removeMember("enterpriseId");
213  }
214 
215 
219  const StringPiece get_enterprise_id() const {
220  const Json::Value& v = Storage("enterpriseId");
221  if (v == Json::Value::null) return StringPiece("");
222  return StringPiece(v.asCString());
223  }
224 
233  void set_enterprise_id(const StringPiece& value) {
234  *MutableStorage("enterpriseId") = value.data();
235  }
236 
243  return Storage().isMember("installFailureEvent");
244  }
245 
250  MutableStorage()->removeMember("installFailureEvent");
251  }
252 
253 
258  const InstallFailureEvent get_install_failure_event() const;
259 
268  InstallFailureEvent mutable_installFailureEvent();
269 
275  bool has_new_device_event() const {
276  return Storage().isMember("newDeviceEvent");
277  }
278 
283  MutableStorage()->removeMember("newDeviceEvent");
284  }
285 
286 
291  const NewDeviceEvent get_new_device_event() const;
292 
301  NewDeviceEvent mutable_newDeviceEvent();
302 
309  return Storage().isMember("newPermissionsEvent");
310  }
311 
316  MutableStorage()->removeMember("newPermissionsEvent");
317  }
318 
319 
324  const NewPermissionsEvent get_new_permissions_event() const;
325 
334  NewPermissionsEvent mutable_newPermissionsEvent();
335 
341  bool has_notification_type() const {
342  return Storage().isMember("notificationType");
343  }
344 
349  MutableStorage()->removeMember("notificationType");
350  }
351 
352 
356  const StringPiece get_notification_type() const {
357  const Json::Value& v = Storage("notificationType");
358  if (v == Json::Value::null) return StringPiece("");
359  return StringPiece(v.asCString());
360  }
361 
369  void set_notification_type(const StringPiece& value) {
370  *MutableStorage("notificationType") = value.data();
371  }
372 
379  return Storage().isMember("productApprovalEvent");
380  }
381 
386  MutableStorage()->removeMember("productApprovalEvent");
387  }
388 
389 
394  const ProductApprovalEvent get_product_approval_event() const;
395 
404  ProductApprovalEvent mutable_productApprovalEvent();
405 
414  return Storage().isMember("productAvailabilityChangeEvent");
415  }
416 
421  MutableStorage()->removeMember("productAvailabilityChangeEvent");
422  }
423 
424 
429  const ProductAvailabilityChangeEvent get_product_availability_change_event() const;
430 
439  ProductAvailabilityChangeEvent mutable_productAvailabilityChangeEvent();
440 
446  bool has_timestamp_millis() const {
447  return Storage().isMember("timestampMillis");
448  }
449 
454  MutableStorage()->removeMember("timestampMillis");
455  }
456 
457 
461  int64 get_timestamp_millis() const {
462  const Json::Value& storage = Storage("timestampMillis");
463  return client::JsonValueToCppValueHelper<int64 >(storage);
464  }
465 
474  void set_timestamp_millis(int64 value) {
475  client::SetJsonValueFromCppValueHelper<int64 >(
476  value, MutableStorage("timestampMillis"));
477  }
478 
479  private:
480  void operator=(const Notification&);
481 }; // Notification
482 } // namespace google_androidenterprise_api
483 #endif // GOOGLE_ANDROIDENTERPRISE_API_NOTIFICATION_H_
Definition: device_report_update_event.h:52
void set_enterprise_id(const StringPiece &value)
Definition: notification.h:233
void clear_app_restrictions_schema_change_event()
Definition: notification.h:111
bool has_device_report_update_event() const
Definition: notification.h:171
void clear_install_failure_event()
Definition: notification.h:249
void set_notification_type(const StringPiece &value)
Definition: notification.h:369
int64 get_timestamp_millis() const
Definition: notification.h:461
void clear_notification_type()
Definition: notification.h:348
bool has_new_permissions_event() const
Definition: notification.h:308
void clear_enterprise_id()
Definition: notification.h:211
bool has_product_availability_change_event() const
Definition: notification.h:413
const StringPiece get_enterprise_id() const
Definition: notification.h:219
Definition: app_update_event.h:53
const StringPiece GetTypeName() const
Definition: notification.h:93
const StringPiece get_notification_type() const
Definition: notification.h:356
Definition: product_availability_change_event.h:50
bool has_product_approval_event() const
Definition: notification.h:378
void clear_app_update_event()
Definition: notification.h:144
Definition: new_device_event.h:50
Definition: install_failure_event.h:50
bool has_app_update_event() const
Definition: notification.h:137
void clear_product_approval_event()
Definition: notification.h:385
Definition: product_approval_event.h:50
bool has_notification_type() const
Definition: notification.h:341
Definition: app_restrictions_schema_change_event.h:52
void set_timestamp_millis(int64 value)
Definition: notification.h:474
void clear_new_permissions_event()
Definition: notification.h:315
bool has_app_restrictions_schema_change_event() const
Definition: notification.h:104
Definition: administrator.h:38
Definition: administrator.cc:40
Definition: new_permissions_event.h:50
void clear_timestamp_millis()
Definition: notification.h:453
bool has_install_failure_event() const
Definition: notification.h:242
void clear_product_availability_change_event()
Definition: notification.h:420
Definition: notification.h:60
bool has_timestamp_millis() const
Definition: notification.h:446
bool has_enterprise_id() const
Definition: notification.h:204
void clear_device_report_update_event()
Definition: notification.h:178
void clear_new_device_event()
Definition: notification.h:282
bool has_new_device_event() const
Definition: notification.h:275