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_
6 #include "rpc_base/rpc_message.h"
11 namespace policy_table_interface_base {
13 struct ApplicationParams;
14 struct ConsentRecords;
16 struct MessageLanguages;
20 } // namespace policy_table_interface_base
25 namespace policy_table_interface_base {
27 typedef Array< String<1, 255>, 0, 255 > Strings;
29 typedef Array< Enum<AppHMIType>, 0, 255 > AppHMITypes;
31 typedef Array< Enum<HmiLevel>, 0, 4 > HmiLevels;
33 typedef Array< Enum<Parameter>, 0, 24 > Parameters;
35 typedef Map< RpcParameters, 0, 50 > Rpc;
37 typedef Array< String<10, 255>, 1, 255 > URL;
39 typedef Map< URL, 1, 255 > URLList;
41 typedef Map< URLList, 1, 255 > ServiceEndpoints;
43 typedef Map< Integer<uint8_t, 0, 255>, 0, 6 > NumberOfNotificationsPerMinute;
45 typedef Array< Integer<uint16_t, 1, 1000>, 0, 10 > SecondsBetweenRetries;
47 typedef Map< MessageString, 0, 500 > Languages;
49 typedef Map< MessageLanguages, 0, 255 > Messages;
51 typedef Map< AppLevel, 0, 255 > AppLevels;
53 typedef Map< Boolean, 0, 255 > ConsentGroups;
55 typedef Map< ConsentRecords, 0, 1000 > UserConsentRecords;
57 typedef Map< Stringifyable < Nullable< ApplicationParams > >, 1, 1000 > ApplicationPolicies;
59 typedef Map< Rpcs, 1, 255 > FunctionalGroupings;
61 typedef Map< DeviceParams, 0, 255 > DeviceData;
63 struct ApplicationParams : CompositeType {
66 Optional< Strings > nicknames;
67 Optional< Strings > preconsented_groups;
68 Optional< AppHMITypes > AppHMIType;
69 Enum<Priority> priority;
70 Enum<HmiLevel> default_hmi;
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;
78 ApplicationParams(const Strings& groups, Priority priority, HmiLevel default_hmi, bool keep_context, bool steal_focus);
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;
87 bool Validate() const;
90 struct RpcParameters : CompositeType {
93 Optional< Parameters > parameters;
96 explicit RpcParameters(const HmiLevels& hmi_levels);
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;
105 bool Validate() const;
108 struct Rpcs : CompositeType {
110 Optional< String<1, 255> > user_consent_prompt;
111 Nullable< Rpc > rpcs;
114 explicit Rpcs(const Rpc& 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;
123 bool Validate() const;
126 struct ModuleConfig : CompositeType {
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;
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);
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;
151 bool Validate() const;
154 struct MessageString : CompositeType {
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;
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;
171 bool Validate() const;
174 struct MessageLanguages : CompositeType {
179 explicit MessageLanguages(const Languages& languages);
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;
188 bool Validate() const;
191 struct ConsumerFriendlyMessages : CompositeType {
193 String<1, 100> version;
194 Optional< Messages > messages;
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;
206 bool Validate() const;
209 struct ModuleMeta : CompositeType {
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;
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;
228 bool Validate() const;
231 struct AppLevel : CompositeType {
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;
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);
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;
259 bool Validate() const;
262 struct UsageAndErrorCounts : CompositeType {
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;
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;
278 bool Validate() const;
281 struct ConsentRecords : CompositeType {
283 Optional< ConsentGroups > consent_groups;
284 Optional< Enum<Input> > input;
285 Optional< String<1, 255> > time_stamp;
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;
296 bool Validate() const;
299 struct DeviceParams : CompositeType {
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;
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;
318 bool Validate() const;
321 struct PolicyTable : CompositeType {
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;
332 PolicyTable(const ApplicationPolicies& app_policies, const FunctionalGroupings& functional_groupings, const ConsumerFriendlyMessages& consumer_friendly_messages, const ModuleConfig& module_config);
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;
341 bool Validate() const;
344 struct Table : CompositeType {
346 PolicyTable policy_table;
349 explicit Table(const PolicyTable& policy_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;
358 bool Validate() const;
360 } // namespace policy_table_interface_base
363 #endif // POLICY_TABLE_INTERFACE_BASE_POLICY_TABLE_INTERFACE_BASE_TYPES_H_