mos_metrics_registry/
mos_metrics_registry.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
// This file was generated by Cobalt's Registry parser based on the registry YAML
// in the cobalt_config repository. Edit the YAML there to make changes.
pub const CUSTOMER_NAME: &str = "fuchsia";
pub const CUSTOMER_ID: u32 = 1;
pub const PROJECT_NAME: &str = "managed_os";
pub const PROJECT_ID: u32 = 285903809;

// Exponential bucket constants for update_check_response_time_migrated update_check_response_timing_histogram
pub const UPDATE_CHECK_RESPONSE_TIME_MIGRATED_UPDATE_CHECK_RESPONSE_TIMING_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_RESPONSE_TIME_MIGRATED_UPDATE_CHECK_RESPONSE_TIMING_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 20;
pub const UPDATE_CHECK_RESPONSE_TIME_MIGRATED_UPDATE_CHECK_RESPONSE_TIMING_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const UPDATE_CHECK_RESPONSE_TIME_MIGRATED_UPDATE_CHECK_RESPONSE_TIMING_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for update_check_interval_migrated update_check_interval_histogram
pub const UPDATE_CHECK_INTERVAL_MIGRATED_UPDATE_CHECK_INTERVAL_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_UPDATE_CHECK_INTERVAL_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 20;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_UPDATE_CHECK_INTERVAL_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_UPDATE_CHECK_INTERVAL_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Linear bucket constants for update_check_interval_migrated linear_histogram_1min_buckets
pub const UPDATE_CHECK_INTERVAL_MIGRATED_LINEAR_HISTOGRAM_1MIN_BUCKETS_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_LINEAR_HISTOGRAM_1MIN_BUCKETS_INT_BUCKETS_NUM_BUCKETS: u32 = 120;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_LINEAR_HISTOGRAM_1MIN_BUCKETS_INT_BUCKETS_STEP_SIZE: u32 = 60;

// Linear bucket constants for update_check_interval_migrated linear_histogram_10min_buckets
pub const UPDATE_CHECK_INTERVAL_MIGRATED_LINEAR_HISTOGRAM_10MIN_BUCKETS_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_LINEAR_HISTOGRAM_10MIN_BUCKETS_INT_BUCKETS_NUM_BUCKETS: u32 = 144;
pub const UPDATE_CHECK_INTERVAL_MIGRATED_LINEAR_HISTOGRAM_10MIN_BUCKETS_INT_BUCKETS_STEP_SIZE: u32 = 600;

// Exponential bucket constants for update_duration_migrated update_duration_histogram
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Linear bucket constants for update_duration_migrated update_duration_histogram_10sec_buckets
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_10SEC_BUCKETS_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_10SEC_BUCKETS_INT_BUCKETS_NUM_BUCKETS: u32 = 90;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_10SEC_BUCKETS_INT_BUCKETS_STEP_SIZE: u32 = 10;

// Linear bucket constants for update_duration_migrated update_duration_histogram_1min_buckets
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_1MIN_BUCKETS_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_1MIN_BUCKETS_INT_BUCKETS_NUM_BUCKETS: u32 = 120;
pub const UPDATE_DURATION_MIGRATED_UPDATE_DURATION_HISTOGRAM_1MIN_BUCKETS_INT_BUCKETS_STEP_SIZE: u32 = 60;

// Exponential bucket constants for update_duration_from_first_seen_migrated update_duration_from_first_seen_histogram
pub const UPDATE_DURATION_FROM_FIRST_SEEN_MIGRATED_UPDATE_DURATION_FROM_FIRST_SEEN_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_DURATION_FROM_FIRST_SEEN_MIGRATED_UPDATE_DURATION_FROM_FIRST_SEEN_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 20;
pub const UPDATE_DURATION_FROM_FIRST_SEEN_MIGRATED_UPDATE_DURATION_FROM_FIRST_SEEN_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const UPDATE_DURATION_FROM_FIRST_SEEN_MIGRATED_UPDATE_DURATION_FROM_FIRST_SEEN_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for requests_per_check_migrated requests_per_check_exponential_histogram
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Linear bucket constants for requests_per_check_migrated requests_per_check_linear_histogram
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_LINEAR_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 1;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_LINEAR_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_LINEAR_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Linear bucket constants for requests_per_check_migrated requests_per_check_per_device_min_histogram
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_PER_DEVICE_MIN_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 1;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_PER_DEVICE_MIN_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_PER_DEVICE_MIN_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Linear bucket constants for requests_per_check_migrated requests_per_check_per_device_max_histogram
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_PER_DEVICE_MAX_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 1;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_PER_DEVICE_MAX_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const REQUESTS_PER_CHECK_MIGRATED_REQUESTS_PER_CHECK_PER_DEVICE_MAX_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Exponential bucket constants for attempts_to_successful_check_migrated attempts_to_successful_check_histogram
pub const ATTEMPTS_TO_SUCCESSFUL_CHECK_MIGRATED_ATTEMPTS_TO_SUCCESSFUL_CHECK_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const ATTEMPTS_TO_SUCCESSFUL_CHECK_MIGRATED_ATTEMPTS_TO_SUCCESSFUL_CHECK_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const ATTEMPTS_TO_SUCCESSFUL_CHECK_MIGRATED_ATTEMPTS_TO_SUCCESSFUL_CHECK_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const ATTEMPTS_TO_SUCCESSFUL_CHECK_MIGRATED_ATTEMPTS_TO_SUCCESSFUL_CHECK_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for waited_for_reboot_duration_migrated waited_for_reboot_duration_histogram
pub const WAITED_FOR_REBOOT_DURATION_MIGRATED_WAITED_FOR_REBOOT_DURATION_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const WAITED_FOR_REBOOT_DURATION_MIGRATED_WAITED_FOR_REBOOT_DURATION_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 20;
pub const WAITED_FOR_REBOOT_DURATION_MIGRATED_WAITED_FOR_REBOOT_DURATION_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const WAITED_FOR_REBOOT_DURATION_MIGRATED_WAITED_FOR_REBOOT_DURATION_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for failed_boot_attempts_migrated failed_boot_attempts_histogram
pub const FAILED_BOOT_ATTEMPTS_MIGRATED_FAILED_BOOT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const FAILED_BOOT_ATTEMPTS_MIGRATED_FAILED_BOOT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const FAILED_BOOT_ATTEMPTS_MIGRATED_FAILED_BOOT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const FAILED_BOOT_ATTEMPTS_MIGRATED_FAILED_BOOT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for update_check_failure_count_migrated per_device_exponential_histogram
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_EXPONENTIAL_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Linear bucket constants for update_check_failure_count_migrated per_device_linear_histogram
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 64;
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Linear bucket constants for update_check_performed_migrated per_device_linear_histogram
pub const UPDATE_CHECK_PERFORMED_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const UPDATE_CHECK_PERFORMED_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 64;
pub const UPDATE_CHECK_PERFORMED_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Linear bucket constants for omaha_event_lost_migrated per_device_linear_histogram
pub const OMAHA_EVENT_LOST_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const OMAHA_EVENT_LOST_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 64;
pub const OMAHA_EVENT_LOST_MIGRATED_PER_DEVICE_LINEAR_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Linear bucket constants for attempts_per_device_day_migrated device_count_attempts_histogram
pub const ATTEMPTS_PER_DEVICE_DAY_MIGRATED_DEVICE_COUNT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 1;
pub const ATTEMPTS_PER_DEVICE_DAY_MIGRATED_DEVICE_COUNT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 32;
pub const ATTEMPTS_PER_DEVICE_DAY_MIGRATED_DEVICE_COUNT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Linear bucket constants for attempts_to_reach_success_migrated device_count_attempts_histogram
pub const ATTEMPTS_TO_REACH_SUCCESS_MIGRATED_DEVICE_COUNT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 1;
pub const ATTEMPTS_TO_REACH_SUCCESS_MIGRATED_DEVICE_COUNT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 32;
pub const ATTEMPTS_TO_REACH_SUCCESS_MIGRATED_DEVICE_COUNT_ATTEMPTS_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;

// Metric ID Constants
// update_check_response_time_migrated
pub const UPDATE_CHECK_RESPONSE_TIME_MIGRATED_METRIC_ID: u32 = 101;
// update_check_interval_migrated
pub const UPDATE_CHECK_INTERVAL_MIGRATED_METRIC_ID: u32 = 102;
// update_duration_migrated
pub const UPDATE_DURATION_MIGRATED_METRIC_ID: u32 = 103;
// update_duration_from_first_seen_migrated
pub const UPDATE_DURATION_FROM_FIRST_SEEN_MIGRATED_METRIC_ID: u32 = 104;
// update_check_failure_migrated
pub const UPDATE_CHECK_FAILURE_MIGRATED_METRIC_ID: u32 = 105;
// requests_per_check_migrated
pub const REQUESTS_PER_CHECK_MIGRATED_METRIC_ID: u32 = 106;
// attempts_to_successful_check_migrated
pub const ATTEMPTS_TO_SUCCESSFUL_CHECK_MIGRATED_METRIC_ID: u32 = 107;
// waited_for_reboot_duration_migrated
pub const WAITED_FOR_REBOOT_DURATION_MIGRATED_METRIC_ID: u32 = 108;
// failed_boot_attempts_migrated
pub const FAILED_BOOT_ATTEMPTS_MIGRATED_METRIC_ID: u32 = 109;
// update_check_failure_count_migrated
pub const UPDATE_CHECK_FAILURE_COUNT_MIGRATED_METRIC_ID: u32 = 110;
// update_check_performed_migrated
pub const UPDATE_CHECK_PERFORMED_MIGRATED_METRIC_ID: u32 = 111;
// omaha_event_lost_migrated
pub const OMAHA_EVENT_LOST_MIGRATED_METRIC_ID: u32 = 112;
// attempts_per_device_day_migrated
pub const ATTEMPTS_PER_DEVICE_DAY_MIGRATED_METRIC_ID: u32 = 113;
// attempts_to_reach_success_migrated
pub const ATTEMPTS_TO_REACH_SUCCESS_MIGRATED_METRIC_ID: u32 = 114;
// update_check_opt_out_preference_migrated
pub const UPDATE_CHECK_OPT_OUT_PREFERENCE_MIGRATED_METRIC_ID: u32 = 115;

// Enum for update_check_response_time_migrated (Metric Dimension Result)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum UpdateCheckResponseTimeMigratedMetricDimensionResult {
  Success = 0,
  Failed = 1,
}

impl cobalt_client::traits::AsEventCode for UpdateCheckResponseTimeMigratedMetricDimensionResult {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Alias for update_duration_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckResponseTimeMigratedMetricDimensionResult as UpdateDurationMigratedMetricDimensionResult;

// Alias for requests_per_check_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckResponseTimeMigratedMetricDimensionResult as RequestsPerCheckMigratedMetricDimensionResult;

// Alias for update_check_performed_migrated (Metric Dimension CheckResult) which has the same event codes
pub use UpdateCheckResponseTimeMigratedMetricDimensionResult as UpdateCheckPerformedMigratedMetricDimensionCheckResult;

// Alias for attempts_per_device_day_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckResponseTimeMigratedMetricDimensionResult as AttemptsPerDeviceDayMigratedMetricDimensionResult;

// Alias for attempts_to_reach_success_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckResponseTimeMigratedMetricDimensionResult as AttemptsToReachSuccessMigratedMetricDimensionResult;

// Enum for update_check_interval_migrated (Metric Dimension Result)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum UpdateCheckIntervalMigratedMetricDimensionResult {
  Success = 0,
}

impl cobalt_client::traits::AsEventCode for UpdateCheckIntervalMigratedMetricDimensionResult {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Alias for update_duration_from_first_seen_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckIntervalMigratedMetricDimensionResult as UpdateDurationFromFirstSeenMigratedMetricDimensionResult;

// Alias for attempts_to_successful_check_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckIntervalMigratedMetricDimensionResult as AttemptsToSuccessfulCheckMigratedMetricDimensionResult;

// Alias for waited_for_reboot_duration_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckIntervalMigratedMetricDimensionResult as WaitedForRebootDurationMigratedMetricDimensionResult;

// Alias for failed_boot_attempts_migrated (Metric Dimension Result) which has the same event codes
pub use UpdateCheckIntervalMigratedMetricDimensionResult as FailedBootAttemptsMigratedMetricDimensionResult;

// Enum for update_check_interval_migrated (Metric Dimension Clock)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum UpdateCheckIntervalMigratedMetricDimensionClock {
  Unreported = 0,
  Wall = 1,
  Monotonic = 2,
}

impl cobalt_client::traits::AsEventCode for UpdateCheckIntervalMigratedMetricDimensionClock {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Enum for update_check_interval_migrated (Metric Dimension Initiator)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum UpdateCheckIntervalMigratedMetricDimensionInitiator {
  Unreported = 0,
  OnDemand = 1,
  ScheduledTask = 2,
}

impl cobalt_client::traits::AsEventCode for UpdateCheckIntervalMigratedMetricDimensionInitiator {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Enum for update_duration_from_first_seen_migrated (Metric Dimension Clock)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum UpdateDurationFromFirstSeenMigratedMetricDimensionClock {
  Unreported = 0,
  Monotonic = 1,
  Wall = 2,
}

impl cobalt_client::traits::AsEventCode for UpdateDurationFromFirstSeenMigratedMetricDimensionClock {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Enum for managed_os (Metric Dimension Reason)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ManagedOsMetricDimensionReason {
  Omaha = 0,
  Network = 1,
  Proxy = 2,
  Configuration = 3,
  Internal = 4,
}

impl cobalt_client::traits::AsEventCode for ManagedOsMetricDimensionReason {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for update_check_failure_migrated (Metric Dimension Reason) which has the same event codes
pub use ManagedOsMetricDimensionReason as UpdateCheckFailureMigratedMetricDimensionReason;

// Alias for update_check_failure_count_migrated (Metric Dimension Reason) which has the same event codes
pub use ManagedOsMetricDimensionReason as UpdateCheckFailureCountMigratedMetricDimensionReason;

// Enum for update_check_performed_migrated (Metric Dimension Initiator)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum UpdateCheckPerformedMigratedMetricDimensionInitiator {
  Unreported = 0,
  ScheduledTask = 1,
  OnDemand = 2,
}

impl cobalt_client::traits::AsEventCode for UpdateCheckPerformedMigratedMetricDimensionInitiator {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Enum for managed_os (Metric Dimension Availability)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ManagedOsMetricDimensionAvailability {
  Unreported = 0,
  UpdateAvailable = 1,
  NoUpdateAvailable = 2,
}

impl cobalt_client::traits::AsEventCode for ManagedOsMetricDimensionAvailability {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for update_check_performed_migrated (Metric Dimension Availability) which has the same event codes
pub use ManagedOsMetricDimensionAvailability as UpdateCheckPerformedMigratedMetricDimensionAvailability;

// Enum for managed_os (Metric Dimension UpdateResult)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ManagedOsMetricDimensionUpdateResult {
  Unreported = 0,
  None = 1,
  Success = 2,
  Failed = 3,
}

impl cobalt_client::traits::AsEventCode for ManagedOsMetricDimensionUpdateResult {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for update_check_performed_migrated (Metric Dimension UpdateResult) which has the same event codes
pub use ManagedOsMetricDimensionUpdateResult as UpdateCheckPerformedMigratedMetricDimensionUpdateResult;

// Enum for managed_os (Metric Dimension EventType)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ManagedOsMetricDimensionEventType {
  Unknown = 0,
  DownloadComplete = 1,
  InstallComplete = 2,
  UpdateComplete = 3,
  UpdateDownloadStarted = 4,
  UpdateDownloadFinished = 5,
  RebootedAfterUpdate = 6,
}

impl cobalt_client::traits::AsEventCode for ManagedOsMetricDimensionEventType {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for omaha_event_lost_migrated (Metric Dimension EventType) which has the same event codes
pub use ManagedOsMetricDimensionEventType as OmahaEventLostMigratedMetricDimensionEventType;

// Enum for managed_os (Metric Dimension EventResult)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ManagedOsMetricDimensionEventResult {
  Unreported = 0,
  Error = 1,
  Success = 2,
  SuccessAndRestartRequired = 3,
  SuccessAndAppRestartRequired = 4,
  Cancelled = 5,
  ErrorInSystemInstaller = 6,
  UpdateDeferred = 7,
}

impl cobalt_client::traits::AsEventCode for ManagedOsMetricDimensionEventResult {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for omaha_event_lost_migrated (Metric Dimension EventResult) which has the same event codes
pub use ManagedOsMetricDimensionEventResult as OmahaEventLostMigratedMetricDimensionEventResult;

// Enum for managed_os (Metric Dimension Preference)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ManagedOsMetricDimensionPreference {
  Unknown = 0,
  AllowAllUpdates = 1,
  AllowOnlySecurityUpdates = 2,
}

impl cobalt_client::traits::AsEventCode for ManagedOsMetricDimensionPreference {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for update_check_opt_out_preference_migrated (Metric Dimension Preference) which has the same event codes
pub use ManagedOsMetricDimensionPreference as UpdateCheckOptOutPreferenceMigratedMetricDimensionPreference;

#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct UpdateCheckIntervalMigratedEventCodes {
  pub result: UpdateCheckIntervalMigratedMetricDimensionResult,
  pub clock: UpdateCheckIntervalMigratedMetricDimensionClock,
  pub initiator: UpdateCheckIntervalMigratedMetricDimensionInitiator,
}

impl cobalt_client::traits::AsEventCodes for UpdateCheckIntervalMigratedEventCodes {
  fn as_event_codes(&self) -> Vec<u32> {
    use cobalt_client::traits::AsEventCode;
    vec![
      self.result.as_event_code(),
      self.clock.as_event_code(),
      self.initiator.as_event_code(),
    ]
  }
}

#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct UpdateDurationFromFirstSeenMigratedEventCodes {
  pub result: UpdateDurationFromFirstSeenMigratedMetricDimensionResult,
  pub clock: UpdateDurationFromFirstSeenMigratedMetricDimensionClock,
}

impl cobalt_client::traits::AsEventCodes for UpdateDurationFromFirstSeenMigratedEventCodes {
  fn as_event_codes(&self) -> Vec<u32> {
    use cobalt_client::traits::AsEventCode;
    vec![
      self.result.as_event_code(),
      self.clock.as_event_code(),
    ]
  }
}

#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct UpdateCheckPerformedMigratedEventCodes {
  pub check_result: UpdateCheckPerformedMigratedMetricDimensionCheckResult,
  pub initiator: UpdateCheckPerformedMigratedMetricDimensionInitiator,
  pub availability: UpdateCheckPerformedMigratedMetricDimensionAvailability,
  pub update_result: UpdateCheckPerformedMigratedMetricDimensionUpdateResult,
}

impl cobalt_client::traits::AsEventCodes for UpdateCheckPerformedMigratedEventCodes {
  fn as_event_codes(&self) -> Vec<u32> {
    use cobalt_client::traits::AsEventCode;
    vec![
      self.check_result.as_event_code(),
      self.initiator.as_event_code(),
      self.availability.as_event_code(),
      self.update_result.as_event_code(),
    ]
  }
}

#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct OmahaEventLostMigratedEventCodes {
  pub event_type: OmahaEventLostMigratedMetricDimensionEventType,
  pub event_result: OmahaEventLostMigratedMetricDimensionEventResult,
}

impl cobalt_client::traits::AsEventCodes for OmahaEventLostMigratedEventCodes {
  fn as_event_codes(&self) -> Vec<u32> {
    use cobalt_client::traits::AsEventCode;
    vec![
      self.event_type.as_event_code(),
      self.event_result.as_event_code(),
    ]
  }
}