pull in new policy updates
[profile/ivi/smartdevicelink.git] / src / components / policy / src / policy / policy_table / table_struct_ext / types.h
1 // This file is generated, do not edit
2 #ifndef POLICY_TABLE_INTERFACE_BASE_POLICY_TABLE_INTERFACE_BASE_TYPES_H_
3 #define POLICY_TABLE_INTERFACE_BASE_POLICY_TABLE_INTERFACE_BASE_TYPES_H_
4 #include "./enums.h"
5 #include "./types.h"
6 #include "rpc_base/rpc_message.h"
7 namespace Json {
8 class Value;
9 }  // namespace Json
10 namespace rpc {
11 namespace policy_table_interface_base {
12 struct AppLevel;
13 struct ApplicationParams;
14 struct ConsentRecords;
15 struct DeviceParams;
16 struct MessageLanguages;
17 struct MessageString;
18 struct RpcParameters;
19 struct Rpcs;
20 }  // namespace policy_table_interface_base
21 }  // namespace rpc
22
23
24 namespace rpc {
25 namespace policy_table_interface_base {
26
27 typedef Array< String<1, 255>, 0, 255 > Strings;
28
29 typedef Array< Enum<AppHMIType>, 0, 255 > AppHMITypes;
30
31 typedef Array< Enum<HmiLevel>, 0, 4 > HmiLevels;
32
33 typedef Array< Enum<Parameter>, 0, 24 > Parameters;
34
35 typedef Map< RpcParameters, 0, 50 > Rpc;
36
37 typedef Array< String<10, 255>, 1, 255 > URL;
38
39 typedef Map< URL, 1, 255 > URLList;
40
41 typedef Map< URLList, 1, 255 > ServiceEndpoints;
42
43 typedef Map< Integer<uint8_t, 0, 255>, 0, 6 > NumberOfNotificationsPerMinute;
44
45 typedef Array< Integer<uint16_t, 1, 1000>, 0, 10 > SecondsBetweenRetries;
46
47 typedef Map< MessageString, 0, 500 > Languages;
48
49 typedef Map< MessageLanguages, 0, 255 > Messages;
50
51 typedef Map< AppLevel, 0, 255 > AppLevels;
52
53 typedef Map< Boolean, 0, 255 > ConsentGroups;
54
55 typedef Map< ConsentRecords, 0, 1000 > UserConsentRecords;
56
57 typedef Map< Stringifyable < Nullable< ApplicationParams > >, 1, 1000 > ApplicationPolicies;
58
59 typedef Map< Rpcs, 1, 255 > FunctionalGroupings;
60
61 typedef Map< DeviceParams, 0, 255 > DeviceData;
62
63 struct ApplicationParams : CompositeType {
64   public:
65     Strings groups;
66     Optional< Strings > nicknames;
67     Optional< Strings > preconsented_groups;
68     Optional< AppHMITypes > AppHMIType;
69     Enum<Priority> priority;
70     Enum<HmiLevel> default_hmi;
71     Boolean keep_context;
72     Boolean steal_focus;
73     Optional< Integer<uint16_t, 1, 65225> > memory_kb;
74     Optional< Integer<uint16_t, 1, 65225> > heart_beat_timeout_ms;
75     Optional< String<0, 255> > certificate;
76   public:
77     ApplicationParams();
78     ApplicationParams(const Strings& groups, Priority priority, HmiLevel default_hmi, bool keep_context, bool steal_focus);
79     ~ApplicationParams();
80     explicit ApplicationParams(const Json::Value* value__);
81     Json::Value ToJsonValue() const;
82     bool is_valid() const;
83     bool is_initialized() const;
84     bool struct_empty() const;
85     void ReportErrors(rpc::ValidationReport* report__) const;
86   private:
87     bool Validate() const;
88 };
89
90 struct RpcParameters : CompositeType {
91   public:
92     HmiLevels hmi_levels;
93     Optional< Parameters > parameters;
94   public:
95     RpcParameters();
96     explicit RpcParameters(const HmiLevels& hmi_levels);
97     ~RpcParameters();
98     explicit RpcParameters(const Json::Value* value__);
99     Json::Value ToJsonValue() const;
100     bool is_valid() const;
101     bool is_initialized() const;
102     bool struct_empty() const;
103     void ReportErrors(rpc::ValidationReport* report__) const;
104   private:
105     bool Validate() const;
106 };
107
108 struct Rpcs : CompositeType {
109   public:
110     Optional< String<1, 255> > user_consent_prompt;
111     Nullable< Rpc > rpcs;
112   public:
113     Rpcs();
114     explicit Rpcs(const Rpc& rpcs);
115     ~Rpcs();
116     explicit Rpcs(const Json::Value* value__);
117     Json::Value ToJsonValue() const;
118     bool is_valid() const;
119     bool is_initialized() const;
120     bool struct_empty() const;
121     void ReportErrors(rpc::ValidationReport* report__) const;
122   private:
123     bool Validate() const;
124 };
125
126 struct ModuleConfig : CompositeType {
127   public:
128     Optional< Map< String<1, 100>, 1, 255 > > device_certificates;
129     Optional< Boolean > preloaded_pt;
130     Integer<uint8_t, 0, 255> exchange_after_x_ignition_cycles;
131     Integer<int64_t, 0, 4294967296> exchange_after_x_kilometers;
132     Integer<uint8_t, 0, 255> exchange_after_x_days;
133     Integer<uint16_t, 0, 65535> timeout_after_x_seconds;
134     SecondsBetweenRetries seconds_between_retries;
135     ServiceEndpoints endpoints;
136     NumberOfNotificationsPerMinute notifications_per_minute_by_priority;
137     Optional< String<1, 100> > vehicle_make;
138     Optional< String<1, 100> > vehicle_model;
139     Optional< String<4, 4> > vehicle_year;
140   public:
141     ModuleConfig();
142     ModuleConfig(uint8_t exchange_after_x_ignition_cycles, int64_t exchange_after_x_kilometers, uint8_t exchange_after_x_days, uint16_t timeout_after_x_seconds, const SecondsBetweenRetries& seconds_between_retries, const ServiceEndpoints& endpoints, const NumberOfNotificationsPerMinute& notifications_per_minute_by_priority);
143     ~ModuleConfig();
144     explicit ModuleConfig(const Json::Value* value__);
145     Json::Value ToJsonValue() const;
146     bool is_valid() const;
147     bool is_initialized() const;
148     bool struct_empty() const;
149     void ReportErrors(rpc::ValidationReport* report__) const;
150   private:
151     bool Validate() const;
152 };
153
154 struct MessageString : CompositeType {
155   public:
156     Optional< String<1, 255> > line1;
157     Optional< String<1, 255> > line2;
158     Optional< String<1, 65535> > tts;
159     Optional< String<1, 255> > label;
160     Optional< String<1, 500> > textBody;
161   public:
162     MessageString();
163     ~MessageString();
164     explicit MessageString(const Json::Value* value__);
165     Json::Value ToJsonValue() const;
166     bool is_valid() const;
167     bool is_initialized() const;
168     bool struct_empty() const;
169     void ReportErrors(rpc::ValidationReport* report__) const;
170   private:
171     bool Validate() const;
172 };
173
174 struct MessageLanguages : CompositeType {
175   public:
176     Languages languages;
177   public:
178     MessageLanguages();
179     explicit MessageLanguages(const Languages& languages);
180     ~MessageLanguages();
181     explicit MessageLanguages(const Json::Value* value__);
182     Json::Value ToJsonValue() const;
183     bool is_valid() const;
184     bool is_initialized() const;
185     bool struct_empty() const;
186     void ReportErrors(rpc::ValidationReport* report__) const;
187   private:
188     bool Validate() const;
189 };
190
191 struct ConsumerFriendlyMessages : CompositeType {
192   public:
193     String<1, 100> version;
194     Optional< Messages > messages;
195   public:
196     ConsumerFriendlyMessages();
197     explicit ConsumerFriendlyMessages(const std::string& version);
198     ~ConsumerFriendlyMessages();
199     explicit ConsumerFriendlyMessages(const Json::Value* value__);
200     Json::Value ToJsonValue() const;
201     bool is_valid() const;
202     bool is_initialized() const;
203     bool struct_empty() const;
204     void ReportErrors(rpc::ValidationReport* report__) const;
205   private:
206     bool Validate() const;
207 };
208
209 struct ModuleMeta : CompositeType {
210   public:
211     Optional< String<1, 250> > ccpu_version;
212     Optional< String<1, 250> > language;
213     Optional< String<1, 250> > wers_country_code;
214     Optional< Integer<uint16_t, 0, 65535> > pt_exchanged_at_odometer_x;
215     Optional< Integer<uint16_t, 0, 65535> > pt_exchanged_x_days_after_epoch;
216     Optional< Integer<uint16_t, 0, 65535> > ignition_cycles_since_last_exchange;
217     Optional< String<1, 250> > vin;
218   public:
219     ModuleMeta();
220     ~ModuleMeta();
221     explicit ModuleMeta(const Json::Value* value__);
222     Json::Value ToJsonValue() const;
223     bool is_valid() const;
224     bool is_initialized() const;
225     bool struct_empty() const;
226     void ReportErrors(rpc::ValidationReport* report__) const;
227   private:
228     bool Validate() const;
229 };
230
231 struct AppLevel : CompositeType {
232   public:
233     Integer<uint16_t, 0, 65535> minutes_in_hmi_full;
234     String<1, 10> app_registration_language_gui;
235     String<1, 10> app_registration_language_vui;
236     Integer<uint16_t, 0, 65535> count_of_rfcom_limit_reached;
237     Integer<uint16_t, 0, 65535> minutes_in_hmi_limited;
238     Integer<uint16_t, 0, 65535> minutes_in_hmi_background;
239     Integer<uint16_t, 0, 65535> minutes_in_hmi_none;
240     Integer<uint16_t, 0, 65535> count_of_user_selections;
241     Integer<uint16_t, 0, 65535> count_of_rejections_sync_out_of_memory;
242     Integer<uint16_t, 0, 65535> count_of_rejections_nickname_mismatch;
243     Integer<uint16_t, 0, 65535> count_of_rejections_duplicate_name;
244     Integer<uint16_t, 0, 65535> count_of_rejected_rpc_calls;
245     Integer<uint16_t, 0, 65535> count_of_rpcs_sent_in_hmi_none;
246     Integer<uint16_t, 0, 65535> count_of_removals_for_bad_behavior;
247     Integer<uint16_t, 0, 65535> count_of_run_attempts_while_revoked;
248   public:
249     AppLevel();
250     AppLevel(uint16_t minutes_in_hmi_full, const std::string& app_registration_language_gui, const std::string& app_registration_language_vui, uint16_t count_of_rfcom_limit_reached, uint16_t minutes_in_hmi_limited, uint16_t minutes_in_hmi_background, uint16_t minutes_in_hmi_none, uint16_t count_of_user_selections, uint16_t count_of_rejections_sync_out_of_memory, uint16_t count_of_rejections_nickname_mismatch, uint16_t count_of_rejections_duplicate_name, uint16_t count_of_rejected_rpc_calls, uint16_t count_of_rpcs_sent_in_hmi_none, uint16_t count_of_removals_for_bad_behavior, uint16_t count_of_run_attempts_while_revoked);
251     ~AppLevel();
252     explicit AppLevel(const Json::Value* value__);
253     Json::Value ToJsonValue() const;
254     bool is_valid() const;
255     bool is_initialized() const;
256     bool struct_empty() const;
257     void ReportErrors(rpc::ValidationReport* report__) const;
258   private:
259     bool Validate() const;
260 };
261
262 struct UsageAndErrorCounts : CompositeType {
263   public:
264     Optional< Integer<uint16_t, 0, 65535> > count_of_iap_buffer_full;
265     Optional< Integer<uint16_t, 0, 65535> > count_sync_out_of_memory;
266     Optional< Integer<uint16_t, 0, 65535> > count_of_sync_reboots;
267     Optional< AppLevels > app_level;
268   public:
269     UsageAndErrorCounts();
270     ~UsageAndErrorCounts();
271     explicit UsageAndErrorCounts(const Json::Value* value__);
272     Json::Value ToJsonValue() const;
273     bool is_valid() const;
274     bool is_initialized() const;
275     bool struct_empty() const;
276     void ReportErrors(rpc::ValidationReport* report__) const;
277   private:
278     bool Validate() const;
279 };
280
281 struct ConsentRecords : CompositeType {
282   public:
283     Optional< ConsentGroups > consent_groups;
284     Optional< Enum<Input> > input;
285     Optional< String<1, 255> > time_stamp;
286   public:
287     ConsentRecords();
288     ~ConsentRecords();
289     explicit ConsentRecords(const Json::Value* value__);
290     Json::Value ToJsonValue() const;
291     bool is_valid() const;
292     bool is_initialized() const;
293     bool struct_empty() const;
294     void ReportErrors(rpc::ValidationReport* report__) const;
295   private:
296     bool Validate() const;
297 };
298
299 struct DeviceParams : CompositeType {
300   public:
301     Optional< String<1, 255> > hardware;
302     Optional< Nullable< String<1, 255> > > firmware_rev;
303     Optional< String<1, 255> > os;
304     Optional< String<1, 255> > os_version;
305     Optional< Nullable< String<1, 255> > > carrier;
306     Optional< UserConsentRecords > user_consent_records;
307     Optional< Integer<uint8_t, 0, 255> > max_number_rfcom_ports;
308   public:
309     DeviceParams();
310     ~DeviceParams();
311     explicit DeviceParams(const Json::Value* value__);
312     Json::Value ToJsonValue() const;
313     bool is_valid() const;
314     bool is_initialized() const;
315     bool struct_empty() const;
316     void ReportErrors(rpc::ValidationReport* report__) const;
317   private:
318     bool Validate() const;
319 };
320
321 struct PolicyTable : CompositeType {
322   public:
323     ApplicationPolicies app_policies;
324     FunctionalGroupings functional_groupings;
325     Optional < ConsumerFriendlyMessages > consumer_friendly_messages;
326     ModuleConfig module_config;
327     Optional< ModuleMeta > module_meta;
328     Optional< UsageAndErrorCounts > usage_and_error_counts;
329     Optional< DeviceData > device_data;
330   public:
331     PolicyTable();
332     PolicyTable(const ApplicationPolicies& app_policies, const FunctionalGroupings& functional_groupings, const ConsumerFriendlyMessages& consumer_friendly_messages, const ModuleConfig& module_config);
333     ~PolicyTable();
334     explicit PolicyTable(const Json::Value* value__);
335     Json::Value ToJsonValue() const;
336     bool is_valid() const;
337     bool is_initialized() const;
338     bool struct_empty() const;
339     void ReportErrors(rpc::ValidationReport* report__) const;
340   private:
341     bool Validate() const;
342 };
343
344 struct Table : CompositeType {
345   public:
346     PolicyTable policy_table;
347   public:
348     Table();
349     explicit Table(const PolicyTable& policy_table);
350     ~Table();
351     explicit Table(const Json::Value* value__);
352     Json::Value ToJsonValue() const;
353     bool is_valid() const;
354     bool is_initialized() const;
355     bool struct_empty() const;
356     void ReportErrors(rpc::ValidationReport* report__) const;
357   private:
358     bool Validate() const;
359 };
360 }  // namespace policy_table_interface_base
361 }  // namespace rpc
362
363 #endif  // POLICY_TABLE_INTERFACE_BASE_POLICY_TABLE_INTERFACE_BASE_TYPES_H_