pull in new policy updates
[profile/ivi/smartdevicelink.git] / src / components / policy / src / policy / policy_table / table_struct / validation.cc
1 // This file is generated, do not edit
2 #include "./functions.h"
3 #include "./types.h"
4
5 namespace rpc {
6 namespace policy_table_interface_base {
7 bool ApplicationParams::Validate() const {
8   return true;
9 }
10 bool RpcParameters::Validate() const {
11   return true;
12 }
13 bool Rpcs::Validate() const {
14   return true;
15 }
16 bool ModuleConfig::Validate() const {
17   return true;
18 }
19 bool MessageString::Validate() const {
20   return true;
21 }
22 bool MessageLanguages::Validate() const {
23   return true;
24 }
25 bool ConsumerFriendlyMessages::Validate() const {
26   return true;
27 }
28 bool ModuleMeta::Validate() const {
29   return true;
30 }
31 bool AppLevel::Validate() const {
32   return true;
33 }
34 bool UsageAndErrorCounts::Validate() const {
35   return true;
36 }
37 bool DeviceParams::Validate() const {
38   return true;
39 }
40 bool PolicyTable::Validate() const {
41   for (ApplicationPolicies::const_iterator it = app_policies.begin();
42        app_policies.end() != it; ++it) {
43     if (kDeviceApp == it->first) {
44       if (it->second.AppHMIType.is_initialized()
45           || it->second.memory_kb.is_initialized()
46           || it->second.heart_beat_timeout_ms.is_initialized()
47           || it->second.nicknames.is_initialized()) {
48         initialization_state__ = kUninitialized;
49         return false;
50       }
51       continue;
52     }
53     if (kDefaultApp == it->first || kPreDataConsentApp == it->first) {
54       if (!it->second.memory_kb.is_initialized()
55           || !it->second.heart_beat_timeout_ms.is_initialized()
56           || it->second.nicknames.is_initialized()) {
57         initialization_state__ = kUninitialized;
58         return false;
59       }
60       continue;
61     }
62     if (!it->second.is_null() && !it->second.is_string()
63         && (!it->second.nicknames.is_initialized()
64             || !it->second.AppHMIType.is_initialized()
65             || !it->second.memory_kb.is_initialized()
66             || !it->second.heart_beat_timeout_ms.is_initialized())) {
67       initialization_state__ = kUninitialized;
68       return false;
69     }
70   }
71   return true;
72 }
73 bool Table::Validate() const {
74   return true;
75 }
76 }  // namespace policy_table_interface_base
77 }  // namespace rpc
78