Skip to main content

fidl_fuchsia_feedback_common/
fidl_fuchsia_feedback_common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// Maximum length for an annotation's key.
12pub const MAX_ANNOTATION_KEY_LENGTH: u64 = 128;
13
14/// Maximum length for an annotation's value.
15pub const MAX_ANNOTATION_VALUE_LENGTH: u64 = 1024;
16
17pub const MAX_CRASH_SIGNATURE_LENGTH: u32 = 128;
18
19pub const MAX_EVENT_ID_LENGTH: u32 = 128;
20
21pub const MAX_EXCEPTION_MESSAGE_LENGTH: u32 = 4096;
22
23pub const MAX_EXCEPTION_TYPE_LENGTH: u32 = 128;
24
25pub const MAX_NAMESPACE_LENGTH: u32 = 32;
26
27pub const MAX_NUM_ANNOTATIONS2_PROVIDED: u32 = 512;
28
29pub const MAX_NUM_ANNOTATIONS_PER_CRASH_REPORT: u32 = 32;
30
31pub const MAX_NUM_ANNOTATIONS_PER_NAMESPACE: u32 = 16;
32
33pub const MAX_NUM_ATTACHMENTS_PER_CRASH_REPORT: u32 = 16;
34
35pub const MAX_PROCESS_NAME_LENGTH: u32 = 64;
36
37pub const MAX_PROGRAM_NAME_LENGTH: u32 = 1024;
38
39pub const MAX_REPORT_ID_LENGTH: u32 = 64;
40
41pub const MAX_THREAD_NAME_LENGTH: u32 = 64;
42
43#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
44pub enum FilingError {
45    Unknown,
46    InvalidArgsError,
47    ServerError,
48    PersistenceError,
49    QuotaReachedError,
50    #[doc(hidden)]
51    __SourceBreaking {
52        unknown_ordinal: u32,
53    },
54}
55
56/// Pattern that matches an unknown `FilingError` member.
57#[macro_export]
58macro_rules! FilingErrorUnknown {
59    () => {
60        _
61    };
62}
63
64impl FilingError {
65    #[inline]
66    pub fn from_primitive(prim: u32) -> Option<Self> {
67        match prim {
68            0 => Some(Self::Unknown),
69            1 => Some(Self::InvalidArgsError),
70            2 => Some(Self::ServerError),
71            3 => Some(Self::PersistenceError),
72            4 => Some(Self::QuotaReachedError),
73            _ => None,
74        }
75    }
76
77    #[inline]
78    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
79        match prim {
80            0 => Self::Unknown,
81            1 => Self::InvalidArgsError,
82            2 => Self::ServerError,
83            3 => Self::PersistenceError,
84            4 => Self::QuotaReachedError,
85            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
86        }
87    }
88
89    #[inline]
90    pub fn unknown() -> Self {
91        Self::__SourceBreaking { unknown_ordinal: 0x0 }
92    }
93
94    #[inline]
95    pub const fn into_primitive(self) -> u32 {
96        match self {
97            Self::Unknown => 0,
98            Self::InvalidArgsError => 1,
99            Self::ServerError => 2,
100            Self::PersistenceError => 3,
101            Self::QuotaReachedError => 4,
102            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
103        }
104    }
105
106    #[inline]
107    pub fn is_unknown(&self) -> bool {
108        match self {
109            Self::__SourceBreaking { unknown_ordinal: _ } => true,
110            _ => false,
111        }
112    }
113}
114
115/// "Memory" refers to a non-persistent location, e.g. a memory-backed
116/// filesystem.
117#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
118pub enum FilingSuccess {
119    Unknown,
120    ReportUploaded,
121    ReportOnDisk,
122    ReportInMemory,
123    ReportNotFiledUserOptedOut,
124    #[doc(hidden)]
125    __SourceBreaking {
126        unknown_ordinal: u32,
127    },
128}
129
130/// Pattern that matches an unknown `FilingSuccess` member.
131#[macro_export]
132macro_rules! FilingSuccessUnknown {
133    () => {
134        _
135    };
136}
137
138impl FilingSuccess {
139    #[inline]
140    pub fn from_primitive(prim: u32) -> Option<Self> {
141        match prim {
142            0 => Some(Self::Unknown),
143            1 => Some(Self::ReportUploaded),
144            2 => Some(Self::ReportOnDisk),
145            3 => Some(Self::ReportInMemory),
146            4 => Some(Self::ReportNotFiledUserOptedOut),
147            _ => None,
148        }
149    }
150
151    #[inline]
152    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
153        match prim {
154            0 => Self::Unknown,
155            1 => Self::ReportUploaded,
156            2 => Self::ReportOnDisk,
157            3 => Self::ReportInMemory,
158            4 => Self::ReportNotFiledUserOptedOut,
159            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
160        }
161    }
162
163    #[inline]
164    pub fn unknown() -> Self {
165        Self::__SourceBreaking { unknown_ordinal: 0x0 }
166    }
167
168    #[inline]
169    pub const fn into_primitive(self) -> u32 {
170        match self {
171            Self::Unknown => 0,
172            Self::ReportUploaded => 1,
173            Self::ReportOnDisk => 2,
174            Self::ReportInMemory => 3,
175            Self::ReportNotFiledUserOptedOut => 4,
176            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
177        }
178    }
179
180    #[inline]
181    pub fn is_unknown(&self) -> bool {
182        match self {
183            Self::__SourceBreaking { unknown_ordinal: _ } => true,
184            _ => false,
185        }
186    }
187}
188
189/// Reasons why a device last rebooted.
190#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
191pub enum RebootReason {
192    /// The client will get this value if the server is sending a new enum value that the client
193    /// was not compiled with.
194    Unknown,
195    /// The device booted from a cold state.
196    ///
197    /// This is most likely the result of an extended period of time without power or a device
198    /// booting with Fuchsia for the first time.
199    Cold,
200    /// The device rebooted due to a brief loss of power.
201    ///
202    /// On some hardware this could be the result of a user disconnecting, then reconnecting their
203    /// device's power supply in rapid succession.
204    BriefPowerLoss,
205    /// The device rebooted because its voltage dipped below an allowable level without going to 0.
206    Brownout,
207    KernelPanic,
208    SystemOutOfMemory,
209    HardwareWatchdogTimeout,
210    SoftwareWatchdogTimeout,
211    /// The device rebooted because the userspace root job was terminated, most likely because one
212    /// of its critical processes crashed.
213    RootJobTermination,
214    /// The device rebooted because the user intentionally held the power button to hard reset it.
215    UserHardReset,
216    /// The device rebooted because the end user of the device initiated the reboot.
217    ///
218    /// DO NOT USE for any code path not directly related to an end user explicit reboot action.
219    /// Use DEVELOPER_REQUEST below instead.
220    UserRequest,
221    /// The device rebooted because the end user of the device initiated the reboot because the
222    /// device was stuck.
223    UserRequestDeviceStuck,
224    /// The device rebooted because a developer initiated the reboot, typically via a shell command
225    /// or similar interface, including within an automated test.
226    DeveloperRequest,
227    /// The device rebooted because applying the OTA failed and we want to retry.
228    RetrySystemUpdate,
229    /// The device rebooted because it was determined to be too hot.
230    HighTemperature,
231    /// The device rebooted because of an issue with a session or because the session manager was
232    /// unable to  recover from an error.
233    SessionFailure,
234    /// The device rebooted because the system manager (sysmgr) was unable to recover from an
235    /// error.
236    SysmgrFailure,
237    /// The device rebooted following a data reset to factory defaults.
238    /// See [`fuchsia.recovery.FactoryReset`].
239    FactoryDataReset,
240    /// The device rebooted because a critical component managed by sysmgr has failed.
241    CriticalComponentFailure,
242    /// The device rebooted to apply the swap of Zircon boot images.
243    ZbiSwap,
244    /// An Android-initiated reboot reason that Starnix doesn't recognize.
245    AndroidUnexpectedReason,
246    /// An Android-initiated shutdown that Starnix doesn't know the reason for.
247    AndroidNoReason,
248    /// The device rebooted because Android called for the "RescueParty".
249    AndroidRescueParty,
250    /// The device rebooted because one of Android critical processes failed.
251    AndroidCriticalProcessFailure,
252    /// The device battery is drained.
253    BatteryDrained,
254    /// The system failed to suspend or resume within the expected time.
255    SuspensionFailure,
256    /// The device rebooted because of an OTA.
257    SystemUpdate,
258    /// The Netstack component is changing versions.
259    NetstackMigration,
260    #[doc(hidden)]
261    __SourceBreaking {
262        unknown_ordinal: u16,
263    },
264}
265
266/// Pattern that matches an unknown `RebootReason` member.
267#[macro_export]
268macro_rules! RebootReasonUnknown {
269    () => {
270        _
271    };
272}
273
274impl RebootReason {
275    #[inline]
276    pub fn from_primitive(prim: u16) -> Option<Self> {
277        match prim {
278            0 => Some(Self::Unknown),
279            2 => Some(Self::Cold),
280            3 => Some(Self::BriefPowerLoss),
281            4 => Some(Self::Brownout),
282            5 => Some(Self::KernelPanic),
283            6 => Some(Self::SystemOutOfMemory),
284            7 => Some(Self::HardwareWatchdogTimeout),
285            8 => Some(Self::SoftwareWatchdogTimeout),
286            19 => Some(Self::RootJobTermination),
287            28 => Some(Self::UserHardReset),
288            9 => Some(Self::UserRequest),
289            26 => Some(Self::UserRequestDeviceStuck),
290            22 => Some(Self::DeveloperRequest),
291            17 => Some(Self::RetrySystemUpdate),
292            11 => Some(Self::HighTemperature),
293            12 => Some(Self::SessionFailure),
294            15 => Some(Self::SysmgrFailure),
295            14 => Some(Self::FactoryDataReset),
296            16 => Some(Self::CriticalComponentFailure),
297            18 => Some(Self::ZbiSwap),
298            21 => Some(Self::AndroidUnexpectedReason),
299            25 => Some(Self::AndroidNoReason),
300            23 => Some(Self::AndroidRescueParty),
301            24 => Some(Self::AndroidCriticalProcessFailure),
302            27 => Some(Self::BatteryDrained),
303            29 => Some(Self::SuspensionFailure),
304            10 => Some(Self::SystemUpdate),
305            20 => Some(Self::NetstackMigration),
306            _ => None,
307        }
308    }
309
310    #[inline]
311    pub fn from_primitive_allow_unknown(prim: u16) -> Self {
312        match prim {
313            0 => Self::Unknown,
314            2 => Self::Cold,
315            3 => Self::BriefPowerLoss,
316            4 => Self::Brownout,
317            5 => Self::KernelPanic,
318            6 => Self::SystemOutOfMemory,
319            7 => Self::HardwareWatchdogTimeout,
320            8 => Self::SoftwareWatchdogTimeout,
321            19 => Self::RootJobTermination,
322            28 => Self::UserHardReset,
323            9 => Self::UserRequest,
324            26 => Self::UserRequestDeviceStuck,
325            22 => Self::DeveloperRequest,
326            17 => Self::RetrySystemUpdate,
327            11 => Self::HighTemperature,
328            12 => Self::SessionFailure,
329            15 => Self::SysmgrFailure,
330            14 => Self::FactoryDataReset,
331            16 => Self::CriticalComponentFailure,
332            18 => Self::ZbiSwap,
333            21 => Self::AndroidUnexpectedReason,
334            25 => Self::AndroidNoReason,
335            23 => Self::AndroidRescueParty,
336            24 => Self::AndroidCriticalProcessFailure,
337            27 => Self::BatteryDrained,
338            29 => Self::SuspensionFailure,
339            10 => Self::SystemUpdate,
340            20 => Self::NetstackMigration,
341            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
342        }
343    }
344
345    #[inline]
346    pub fn unknown() -> Self {
347        Self::__SourceBreaking { unknown_ordinal: 0x0 }
348    }
349
350    #[inline]
351    pub const fn into_primitive(self) -> u16 {
352        match self {
353            Self::Unknown => 0,
354            Self::Cold => 2,
355            Self::BriefPowerLoss => 3,
356            Self::Brownout => 4,
357            Self::KernelPanic => 5,
358            Self::SystemOutOfMemory => 6,
359            Self::HardwareWatchdogTimeout => 7,
360            Self::SoftwareWatchdogTimeout => 8,
361            Self::RootJobTermination => 19,
362            Self::UserHardReset => 28,
363            Self::UserRequest => 9,
364            Self::UserRequestDeviceStuck => 26,
365            Self::DeveloperRequest => 22,
366            Self::RetrySystemUpdate => 17,
367            Self::HighTemperature => 11,
368            Self::SessionFailure => 12,
369            Self::SysmgrFailure => 15,
370            Self::FactoryDataReset => 14,
371            Self::CriticalComponentFailure => 16,
372            Self::ZbiSwap => 18,
373            Self::AndroidUnexpectedReason => 21,
374            Self::AndroidNoReason => 25,
375            Self::AndroidRescueParty => 23,
376            Self::AndroidCriticalProcessFailure => 24,
377            Self::BatteryDrained => 27,
378            Self::SuspensionFailure => 29,
379            Self::SystemUpdate => 10,
380            Self::NetstackMigration => 20,
381            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
382        }
383    }
384
385    #[inline]
386    pub fn is_unknown(&self) -> bool {
387        match self {
388            Self::__SourceBreaking { unknown_ordinal: _ } => true,
389            _ => false,
390        }
391    }
392}
393
394/// How a device last shutdown.
395#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
396pub enum ShutdownAction {
397    Poweroff,
398    Reboot,
399    RebootToRecovery,
400    RebootToBootloader,
401    #[doc(hidden)]
402    __SourceBreaking {
403        unknown_ordinal: u32,
404    },
405}
406
407/// Pattern that matches an unknown `ShutdownAction` member.
408#[macro_export]
409macro_rules! ShutdownActionUnknown {
410    () => {
411        _
412    };
413}
414
415impl ShutdownAction {
416    #[inline]
417    pub fn from_primitive(prim: u32) -> Option<Self> {
418        match prim {
419            1 => Some(Self::Poweroff),
420            2 => Some(Self::Reboot),
421            3 => Some(Self::RebootToRecovery),
422            4 => Some(Self::RebootToBootloader),
423            _ => None,
424        }
425    }
426
427    #[inline]
428    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
429        match prim {
430            1 => Self::Poweroff,
431            2 => Self::Reboot,
432            3 => Self::RebootToRecovery,
433            4 => Self::RebootToBootloader,
434            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
435        }
436    }
437
438    #[inline]
439    pub fn unknown() -> Self {
440        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
441    }
442
443    #[inline]
444    pub const fn into_primitive(self) -> u32 {
445        match self {
446            Self::Poweroff => 1,
447            Self::Reboot => 2,
448            Self::RebootToRecovery => 3,
449            Self::RebootToBootloader => 4,
450            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
451        }
452    }
453
454    #[inline]
455    pub fn is_unknown(&self) -> bool {
456        match self {
457            Self::__SourceBreaking { unknown_ordinal: _ } => true,
458            _ => false,
459        }
460    }
461}
462
463/// An annotation and its plain ASCII string key.
464/// Annotations are short strings, e.g., the board name or the build version.
465#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
466pub struct Annotation {
467    pub key: String,
468    pub value: String,
469}
470
471impl fidl::Persistable for Annotation {}
472
473#[derive(Clone, Debug, PartialEq)]
474pub struct ComponentDataRegisterUpsertRequest {
475    pub data: ComponentData,
476}
477
478impl fidl::Persistable for ComponentDataRegisterUpsertRequest {}
479
480#[derive(Clone, Debug, PartialEq)]
481pub struct CrashReporterFileReportResponse {
482    pub results: FileReportResults,
483}
484
485impl fidl::Persistable for CrashReporterFileReportResponse {}
486
487#[derive(Clone, Debug, PartialEq)]
488pub struct CrashReportingProductRegisterUpsertRequest {
489    /// 2083 is the maximum expected component URL length. The request will be rejected if
490    /// component_url contains a null byte.
491    pub component_url: String,
492    pub product: CrashReportingProduct,
493}
494
495impl fidl::Persistable for CrashReportingProductRegisterUpsertRequest {}
496
497#[derive(Clone, Debug, PartialEq)]
498pub struct CrashReportingProductRegisterUpsertWithAckRequest {
499    /// 2083 is the maximum expected component URL length. The request will be rejected if
500    /// component_url contains a null byte.
501    pub component_url: String,
502    pub product: CrashReportingProduct,
503}
504
505impl fidl::Persistable for CrashReportingProductRegisterUpsertWithAckRequest {}
506
507#[derive(Clone, Debug, PartialEq)]
508pub struct DataProviderGetAnnotationsRequest {
509    pub params: GetAnnotationsParameters,
510}
511
512impl fidl::Persistable for DataProviderGetAnnotationsRequest {}
513
514#[derive(Clone, Debug, PartialEq)]
515pub struct DataProviderGetAnnotationsResponse {
516    pub annotations: Annotations,
517}
518
519impl fidl::Persistable for DataProviderGetAnnotationsResponse {}
520
521#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
522pub struct DeviceIdProviderGetIdResponse {
523    pub feedback_id: String,
524}
525
526impl fidl::Persistable for DeviceIdProviderGetIdResponse {}
527
528#[derive(Clone, Debug, PartialEq)]
529pub struct LastRebootInfoProviderGetResponse {
530    pub last_reboot: LastReboot,
531}
532
533impl fidl::Persistable for LastRebootInfoProviderGetResponse {}
534
535/// Annotations about the device's state.
536///
537/// Clients typically upload the data straight to servers. So the data comes in the form of
538/// arbitrary key-value pairs that clients can directly forward to the servers.
539#[derive(Clone, Debug, Default, PartialEq)]
540pub struct Annotations {
541    /// A vector of key-value string pairs. Keys are guaranteed to be unique.
542    pub annotations2: Option<Vec<Annotation>>,
543    #[doc(hidden)]
544    pub __source_breaking: fidl::marker::SourceBreaking,
545}
546
547impl fidl::Persistable for Annotations {}
548
549/// Data known to a component, but not exposed to the platform, to attach to feedback reports.
550#[derive(Clone, Debug, Default, PartialEq)]
551pub struct ComponentData {
552    /// The top-level namespace associated with the data:
553    /// * Is intended to group related data together and reduce data key collisions across
554    ///   namespaces.
555    /// * May be shared by multiple clients, e.g., there could be multiple clients within the same
556    ///   component or across components that want to expose related data and they would all use
557    ///   the same namespace.
558    /// * Will be prefixed to every data key passed within that namespace in all feedback reports,
559    ///   e.g., the annotation "version" would appear as "foo.version" in all feedback reports if
560    ///   the namespace is "foo".
561    /// * Must match [a-z\-]+, i.e. only lowercase letters and hyphens or this will result in a
562    ///   ZX_ERR_INVALID_ARGS epitaph.
563    /// * Must not match a reserved namespace used internally for platform data, e.g., "build", or
564    ///   this will result in a ZX_ERR_INVALID_ARGS epitaph. The list of reserved namespaces is
565    ///   internal and subject to change for now.
566    pub namespace: Option<String>,
567    /// A vector of key-value string pairs, e.g., `<"version", "1.2.3.45">`.
568    ///
569    /// Keys:
570    /// * Should be unique as only the latest value for a given key in the vector will be
571    ///   considered.
572    /// * Must match [a-z\-\.]+, i.e. only lowercase letters, hyphens and periods. Use periods for
573    ///   sub-namespacing, e.g., "build.label" and "build.type", so that related annotations are
574    ///   grouped together (here related to "build") when sorted lexicographically.
575    pub annotations: Option<Vec<Annotation>>,
576    #[doc(hidden)]
577    pub __source_breaking: fidl::marker::SourceBreaking,
578}
579
580impl fidl::Persistable for ComponentData {}
581
582/// Product information to report to the crash server.
583#[derive(Clone, Debug, Default, PartialEq)]
584pub struct CrashReportingProduct {
585    /// The product name on the crash server.
586    /// * The first character has to be alphanumeric. The remaining characters must be printable,
587    ///   but cannot be a space, which leaves values 33 to 127 in the ASCII table. Any other
588    ///   characters will result in a ZX_ERR_INVALID_ARGS epitaph.
589    /// * Missing this required field will result in a ZX_ERR_INVALID_ARGS epitaph.
590    pub name: Option<String>,
591    /// Optional product version of the component.
592    /// * The first character has to be alphanumeric. The remaining characters must be printable,
593    ///   but cannot be a space, which leaves values 33 to 127 in the ASCII table. Any other
594    ///   characters will result in a ZX_ERR_INVALID_ARGS epitaph.
595    ///
596    /// If no version is specified then none is reported to the crash server.
597    pub version: Option<String>,
598    /// Optional product release channel for the component, e.g., "canary", "beta", "stable".
599    ///
600    /// If no channel is specified then none is reported to the crash server.
601    pub channel: Option<String>,
602    #[doc(hidden)]
603    pub __source_breaking: fidl::marker::SourceBreaking,
604}
605
606impl fidl::Persistable for CrashReportingProduct {}
607
608#[derive(Clone, Debug, Default, PartialEq)]
609pub struct FileReportResults {
610    /// The success type.
611    pub result: Option<FilingSuccess>,
612    /// A non-empty value if |result| is FilingSuccess::REPORT_UPLOADED.
613    pub report_id: Option<String>,
614    #[doc(hidden)]
615    pub __source_breaking: fidl::marker::SourceBreaking,
616}
617
618impl fidl::Persistable for FileReportResults {}
619
620/// Parameters for the DataProvider::GetAnnotations() method.
621#[derive(Clone, Debug, Default, PartialEq)]
622pub struct GetAnnotationsParameters {
623    /// Annotations are collected in parallel from various places in the platform, each with a
624    /// timeout.
625    ///
626    /// `collection_timeout_per_annotation` allows clients to control how much time is given to
627    /// each annotation collection. It enables clients to get a partial set of annotations under a
628    /// certain time.
629    pub collection_timeout_per_annotation: Option<i64>,
630    #[doc(hidden)]
631    pub __source_breaking: fidl::marker::SourceBreaking,
632}
633
634impl fidl::Persistable for GetAnnotationsParameters {}
635
636/// Information about why a device last rebooted.
637#[derive(Clone, Debug, Default, PartialEq)]
638pub struct LastReboot {
639    /// Whether the last reboot was graceful, i.e. the device didn't reboot in response to an error
640    /// and rebooted in a controlled manner.
641    ///
642    /// This field allows clients to know whether the last reboot was graceful without having to
643    /// parse the optional |reason| field. This is useful when |reason| is not set, i.e. because
644    /// the system doesn't know more than the fact that the reboot was graceful, or when the API
645    /// evolves to support new RebootReason values and the clients hasn't been updated yet.
646    ///
647    /// This field is always has a value if |reason| is provided. However, |reason| might not
648    /// always have a value this field is provided.
649    pub graceful: Option<bool>,
650    /// Why a device last rebooted.
651    pub reason: Option<RebootReason>,
652    /// The uptime of the device before it rebooted. This is the amount of time since boot,
653    /// including any time spent in suspend-to-idle.
654    pub uptime: Option<i64>,
655    /// Whether the last reboot was planned, i.e. the device rebooted in accordance to a schedule
656    /// applied by the system.
657    ///
658    /// This field allows clients to know whether the last reboot was planned without having to
659    /// parse the |reason| field.
660    ///
661    /// Planned reboots are by nature, graceful.
662    pub planned: Option<bool>,
663    /// The runtime of the device before it rebooted. This is the amount of time since boot
664    /// excluding any time spent in suspend-to-idle.
665    pub runtime: Option<i64>,
666    /// How a device last shutdown.
667    pub action: Option<ShutdownAction>,
668    #[doc(hidden)]
669    pub __source_breaking: fidl::marker::SourceBreaking,
670}
671
672impl fidl::Persistable for LastReboot {}
673
674pub mod component_data_register_ordinals {
675    pub const UPSERT: u64 = 0xa25b7c4e125c0a1;
676}
677
678pub mod crash_reporter_ordinals {
679    pub const FILE_REPORT: u64 = 0x6f660f55b3160dd4;
680}
681
682pub mod crash_reporting_product_register_ordinals {
683    pub const UPSERT: u64 = 0x668cdc9615c91d7f;
684    pub const UPSERT_WITH_ACK: u64 = 0x4a4f1279b3439c9d;
685}
686
687pub mod data_provider_ordinals {
688    pub const GET_SNAPSHOT: u64 = 0x753649a04e5d0bc0;
689    pub const GET_ANNOTATIONS: u64 = 0x367b4b6afe4345d8;
690}
691
692pub mod device_id_provider_ordinals {
693    pub const GET_ID: u64 = 0xea7f28a243488dc;
694}
695
696pub mod last_reboot_info_provider_ordinals {
697    pub const GET: u64 = 0xbc32d10e081ffac;
698}
699
700mod internal {
701    use super::*;
702    unsafe impl fidl::encoding::TypeMarker for FilingError {
703        type Owned = Self;
704
705        #[inline(always)]
706        fn inline_align(_context: fidl::encoding::Context) -> usize {
707            std::mem::align_of::<u32>()
708        }
709
710        #[inline(always)]
711        fn inline_size(_context: fidl::encoding::Context) -> usize {
712            std::mem::size_of::<u32>()
713        }
714
715        #[inline(always)]
716        fn encode_is_copy() -> bool {
717            false
718        }
719
720        #[inline(always)]
721        fn decode_is_copy() -> bool {
722            false
723        }
724    }
725
726    impl fidl::encoding::ValueTypeMarker for FilingError {
727        type Borrowed<'a> = Self;
728        #[inline(always)]
729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
730            *value
731        }
732    }
733
734    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FilingError {
735        #[inline]
736        unsafe fn encode(
737            self,
738            encoder: &mut fidl::encoding::Encoder<'_, D>,
739            offset: usize,
740            _depth: fidl::encoding::Depth,
741        ) -> fidl::Result<()> {
742            encoder.debug_check_bounds::<Self>(offset);
743            encoder.write_num(self.into_primitive(), offset);
744            Ok(())
745        }
746    }
747
748    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FilingError {
749        #[inline(always)]
750        fn new_empty() -> Self {
751            Self::unknown()
752        }
753
754        #[inline]
755        unsafe fn decode(
756            &mut self,
757            decoder: &mut fidl::encoding::Decoder<'_, D>,
758            offset: usize,
759            _depth: fidl::encoding::Depth,
760        ) -> fidl::Result<()> {
761            decoder.debug_check_bounds::<Self>(offset);
762            let prim = decoder.read_num::<u32>(offset);
763
764            *self = Self::from_primitive_allow_unknown(prim);
765            Ok(())
766        }
767    }
768    unsafe impl fidl::encoding::TypeMarker for FilingSuccess {
769        type Owned = Self;
770
771        #[inline(always)]
772        fn inline_align(_context: fidl::encoding::Context) -> usize {
773            std::mem::align_of::<u32>()
774        }
775
776        #[inline(always)]
777        fn inline_size(_context: fidl::encoding::Context) -> usize {
778            std::mem::size_of::<u32>()
779        }
780
781        #[inline(always)]
782        fn encode_is_copy() -> bool {
783            false
784        }
785
786        #[inline(always)]
787        fn decode_is_copy() -> bool {
788            false
789        }
790    }
791
792    impl fidl::encoding::ValueTypeMarker for FilingSuccess {
793        type Borrowed<'a> = Self;
794        #[inline(always)]
795        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
796            *value
797        }
798    }
799
800    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FilingSuccess {
801        #[inline]
802        unsafe fn encode(
803            self,
804            encoder: &mut fidl::encoding::Encoder<'_, D>,
805            offset: usize,
806            _depth: fidl::encoding::Depth,
807        ) -> fidl::Result<()> {
808            encoder.debug_check_bounds::<Self>(offset);
809            encoder.write_num(self.into_primitive(), offset);
810            Ok(())
811        }
812    }
813
814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FilingSuccess {
815        #[inline(always)]
816        fn new_empty() -> Self {
817            Self::unknown()
818        }
819
820        #[inline]
821        unsafe fn decode(
822            &mut self,
823            decoder: &mut fidl::encoding::Decoder<'_, D>,
824            offset: usize,
825            _depth: fidl::encoding::Depth,
826        ) -> fidl::Result<()> {
827            decoder.debug_check_bounds::<Self>(offset);
828            let prim = decoder.read_num::<u32>(offset);
829
830            *self = Self::from_primitive_allow_unknown(prim);
831            Ok(())
832        }
833    }
834    unsafe impl fidl::encoding::TypeMarker for RebootReason {
835        type Owned = Self;
836
837        #[inline(always)]
838        fn inline_align(_context: fidl::encoding::Context) -> usize {
839            std::mem::align_of::<u16>()
840        }
841
842        #[inline(always)]
843        fn inline_size(_context: fidl::encoding::Context) -> usize {
844            std::mem::size_of::<u16>()
845        }
846
847        #[inline(always)]
848        fn encode_is_copy() -> bool {
849            false
850        }
851
852        #[inline(always)]
853        fn decode_is_copy() -> bool {
854            false
855        }
856    }
857
858    impl fidl::encoding::ValueTypeMarker for RebootReason {
859        type Borrowed<'a> = Self;
860        #[inline(always)]
861        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
862            *value
863        }
864    }
865
866    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RebootReason {
867        #[inline]
868        unsafe fn encode(
869            self,
870            encoder: &mut fidl::encoding::Encoder<'_, D>,
871            offset: usize,
872            _depth: fidl::encoding::Depth,
873        ) -> fidl::Result<()> {
874            encoder.debug_check_bounds::<Self>(offset);
875            encoder.write_num(self.into_primitive(), offset);
876            Ok(())
877        }
878    }
879
880    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RebootReason {
881        #[inline(always)]
882        fn new_empty() -> Self {
883            Self::unknown()
884        }
885
886        #[inline]
887        unsafe fn decode(
888            &mut self,
889            decoder: &mut fidl::encoding::Decoder<'_, D>,
890            offset: usize,
891            _depth: fidl::encoding::Depth,
892        ) -> fidl::Result<()> {
893            decoder.debug_check_bounds::<Self>(offset);
894            let prim = decoder.read_num::<u16>(offset);
895
896            *self = Self::from_primitive_allow_unknown(prim);
897            Ok(())
898        }
899    }
900    unsafe impl fidl::encoding::TypeMarker for ShutdownAction {
901        type Owned = Self;
902
903        #[inline(always)]
904        fn inline_align(_context: fidl::encoding::Context) -> usize {
905            std::mem::align_of::<u32>()
906        }
907
908        #[inline(always)]
909        fn inline_size(_context: fidl::encoding::Context) -> usize {
910            std::mem::size_of::<u32>()
911        }
912
913        #[inline(always)]
914        fn encode_is_copy() -> bool {
915            false
916        }
917
918        #[inline(always)]
919        fn decode_is_copy() -> bool {
920            false
921        }
922    }
923
924    impl fidl::encoding::ValueTypeMarker for ShutdownAction {
925        type Borrowed<'a> = Self;
926        #[inline(always)]
927        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
928            *value
929        }
930    }
931
932    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ShutdownAction {
933        #[inline]
934        unsafe fn encode(
935            self,
936            encoder: &mut fidl::encoding::Encoder<'_, D>,
937            offset: usize,
938            _depth: fidl::encoding::Depth,
939        ) -> fidl::Result<()> {
940            encoder.debug_check_bounds::<Self>(offset);
941            encoder.write_num(self.into_primitive(), offset);
942            Ok(())
943        }
944    }
945
946    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShutdownAction {
947        #[inline(always)]
948        fn new_empty() -> Self {
949            Self::unknown()
950        }
951
952        #[inline]
953        unsafe fn decode(
954            &mut self,
955            decoder: &mut fidl::encoding::Decoder<'_, D>,
956            offset: usize,
957            _depth: fidl::encoding::Depth,
958        ) -> fidl::Result<()> {
959            decoder.debug_check_bounds::<Self>(offset);
960            let prim = decoder.read_num::<u32>(offset);
961
962            *self = Self::from_primitive_allow_unknown(prim);
963            Ok(())
964        }
965    }
966
967    impl fidl::encoding::ValueTypeMarker for Annotation {
968        type Borrowed<'a> = &'a Self;
969        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
970            value
971        }
972    }
973
974    unsafe impl fidl::encoding::TypeMarker for Annotation {
975        type Owned = Self;
976
977        #[inline(always)]
978        fn inline_align(_context: fidl::encoding::Context) -> usize {
979            8
980        }
981
982        #[inline(always)]
983        fn inline_size(_context: fidl::encoding::Context) -> usize {
984            32
985        }
986    }
987
988    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Annotation, D>
989        for &Annotation
990    {
991        #[inline]
992        unsafe fn encode(
993            self,
994            encoder: &mut fidl::encoding::Encoder<'_, D>,
995            offset: usize,
996            _depth: fidl::encoding::Depth,
997        ) -> fidl::Result<()> {
998            encoder.debug_check_bounds::<Annotation>(offset);
999            // Delegate to tuple encoding.
1000            fidl::encoding::Encode::<Annotation, D>::encode(
1001                (
1002                    <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
1003                    <fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1004                ),
1005                encoder, offset, _depth
1006            )
1007        }
1008    }
1009    unsafe impl<
1010        D: fidl::encoding::ResourceDialect,
1011        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
1012        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
1013    > fidl::encoding::Encode<Annotation, D> for (T0, T1)
1014    {
1015        #[inline]
1016        unsafe fn encode(
1017            self,
1018            encoder: &mut fidl::encoding::Encoder<'_, D>,
1019            offset: usize,
1020            depth: fidl::encoding::Depth,
1021        ) -> fidl::Result<()> {
1022            encoder.debug_check_bounds::<Annotation>(offset);
1023            // Zero out padding regions. There's no need to apply masks
1024            // because the unmasked parts will be overwritten by fields.
1025            // Write the fields.
1026            self.0.encode(encoder, offset + 0, depth)?;
1027            self.1.encode(encoder, offset + 16, depth)?;
1028            Ok(())
1029        }
1030    }
1031
1032    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Annotation {
1033        #[inline(always)]
1034        fn new_empty() -> Self {
1035            Self {
1036                key: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
1037                value: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D),
1038            }
1039        }
1040
1041        #[inline]
1042        unsafe fn decode(
1043            &mut self,
1044            decoder: &mut fidl::encoding::Decoder<'_, D>,
1045            offset: usize,
1046            _depth: fidl::encoding::Depth,
1047        ) -> fidl::Result<()> {
1048            decoder.debug_check_bounds::<Self>(offset);
1049            // Verify that padding bytes are zero.
1050            fidl::decode!(
1051                fidl::encoding::BoundedString<128>,
1052                D,
1053                &mut self.key,
1054                decoder,
1055                offset + 0,
1056                _depth
1057            )?;
1058            fidl::decode!(
1059                fidl::encoding::BoundedString<1024>,
1060                D,
1061                &mut self.value,
1062                decoder,
1063                offset + 16,
1064                _depth
1065            )?;
1066            Ok(())
1067        }
1068    }
1069
1070    impl fidl::encoding::ValueTypeMarker for ComponentDataRegisterUpsertRequest {
1071        type Borrowed<'a> = &'a Self;
1072        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1073            value
1074        }
1075    }
1076
1077    unsafe impl fidl::encoding::TypeMarker for ComponentDataRegisterUpsertRequest {
1078        type Owned = Self;
1079
1080        #[inline(always)]
1081        fn inline_align(_context: fidl::encoding::Context) -> usize {
1082            8
1083        }
1084
1085        #[inline(always)]
1086        fn inline_size(_context: fidl::encoding::Context) -> usize {
1087            16
1088        }
1089    }
1090
1091    unsafe impl<D: fidl::encoding::ResourceDialect>
1092        fidl::encoding::Encode<ComponentDataRegisterUpsertRequest, D>
1093        for &ComponentDataRegisterUpsertRequest
1094    {
1095        #[inline]
1096        unsafe fn encode(
1097            self,
1098            encoder: &mut fidl::encoding::Encoder<'_, D>,
1099            offset: usize,
1100            _depth: fidl::encoding::Depth,
1101        ) -> fidl::Result<()> {
1102            encoder.debug_check_bounds::<ComponentDataRegisterUpsertRequest>(offset);
1103            // Delegate to tuple encoding.
1104            fidl::encoding::Encode::<ComponentDataRegisterUpsertRequest, D>::encode(
1105                (<ComponentData as fidl::encoding::ValueTypeMarker>::borrow(&self.data),),
1106                encoder,
1107                offset,
1108                _depth,
1109            )
1110        }
1111    }
1112    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ComponentData, D>>
1113        fidl::encoding::Encode<ComponentDataRegisterUpsertRequest, D> for (T0,)
1114    {
1115        #[inline]
1116        unsafe fn encode(
1117            self,
1118            encoder: &mut fidl::encoding::Encoder<'_, D>,
1119            offset: usize,
1120            depth: fidl::encoding::Depth,
1121        ) -> fidl::Result<()> {
1122            encoder.debug_check_bounds::<ComponentDataRegisterUpsertRequest>(offset);
1123            // Zero out padding regions. There's no need to apply masks
1124            // because the unmasked parts will be overwritten by fields.
1125            // Write the fields.
1126            self.0.encode(encoder, offset + 0, depth)?;
1127            Ok(())
1128        }
1129    }
1130
1131    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1132        for ComponentDataRegisterUpsertRequest
1133    {
1134        #[inline(always)]
1135        fn new_empty() -> Self {
1136            Self { data: fidl::new_empty!(ComponentData, D) }
1137        }
1138
1139        #[inline]
1140        unsafe fn decode(
1141            &mut self,
1142            decoder: &mut fidl::encoding::Decoder<'_, D>,
1143            offset: usize,
1144            _depth: fidl::encoding::Depth,
1145        ) -> fidl::Result<()> {
1146            decoder.debug_check_bounds::<Self>(offset);
1147            // Verify that padding bytes are zero.
1148            fidl::decode!(ComponentData, D, &mut self.data, decoder, offset + 0, _depth)?;
1149            Ok(())
1150        }
1151    }
1152
1153    impl fidl::encoding::ValueTypeMarker for CrashReporterFileReportResponse {
1154        type Borrowed<'a> = &'a Self;
1155        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1156            value
1157        }
1158    }
1159
1160    unsafe impl fidl::encoding::TypeMarker for CrashReporterFileReportResponse {
1161        type Owned = Self;
1162
1163        #[inline(always)]
1164        fn inline_align(_context: fidl::encoding::Context) -> usize {
1165            8
1166        }
1167
1168        #[inline(always)]
1169        fn inline_size(_context: fidl::encoding::Context) -> usize {
1170            16
1171        }
1172    }
1173
1174    unsafe impl<D: fidl::encoding::ResourceDialect>
1175        fidl::encoding::Encode<CrashReporterFileReportResponse, D>
1176        for &CrashReporterFileReportResponse
1177    {
1178        #[inline]
1179        unsafe fn encode(
1180            self,
1181            encoder: &mut fidl::encoding::Encoder<'_, D>,
1182            offset: usize,
1183            _depth: fidl::encoding::Depth,
1184        ) -> fidl::Result<()> {
1185            encoder.debug_check_bounds::<CrashReporterFileReportResponse>(offset);
1186            // Delegate to tuple encoding.
1187            fidl::encoding::Encode::<CrashReporterFileReportResponse, D>::encode(
1188                (<FileReportResults as fidl::encoding::ValueTypeMarker>::borrow(&self.results),),
1189                encoder,
1190                offset,
1191                _depth,
1192            )
1193        }
1194    }
1195    unsafe impl<
1196        D: fidl::encoding::ResourceDialect,
1197        T0: fidl::encoding::Encode<FileReportResults, D>,
1198    > fidl::encoding::Encode<CrashReporterFileReportResponse, D> for (T0,)
1199    {
1200        #[inline]
1201        unsafe fn encode(
1202            self,
1203            encoder: &mut fidl::encoding::Encoder<'_, D>,
1204            offset: usize,
1205            depth: fidl::encoding::Depth,
1206        ) -> fidl::Result<()> {
1207            encoder.debug_check_bounds::<CrashReporterFileReportResponse>(offset);
1208            // Zero out padding regions. There's no need to apply masks
1209            // because the unmasked parts will be overwritten by fields.
1210            // Write the fields.
1211            self.0.encode(encoder, offset + 0, depth)?;
1212            Ok(())
1213        }
1214    }
1215
1216    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1217        for CrashReporterFileReportResponse
1218    {
1219        #[inline(always)]
1220        fn new_empty() -> Self {
1221            Self { results: fidl::new_empty!(FileReportResults, D) }
1222        }
1223
1224        #[inline]
1225        unsafe fn decode(
1226            &mut self,
1227            decoder: &mut fidl::encoding::Decoder<'_, D>,
1228            offset: usize,
1229            _depth: fidl::encoding::Depth,
1230        ) -> fidl::Result<()> {
1231            decoder.debug_check_bounds::<Self>(offset);
1232            // Verify that padding bytes are zero.
1233            fidl::decode!(FileReportResults, D, &mut self.results, decoder, offset + 0, _depth)?;
1234            Ok(())
1235        }
1236    }
1237
1238    impl fidl::encoding::ValueTypeMarker for CrashReportingProductRegisterUpsertRequest {
1239        type Borrowed<'a> = &'a Self;
1240        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1241            value
1242        }
1243    }
1244
1245    unsafe impl fidl::encoding::TypeMarker for CrashReportingProductRegisterUpsertRequest {
1246        type Owned = Self;
1247
1248        #[inline(always)]
1249        fn inline_align(_context: fidl::encoding::Context) -> usize {
1250            8
1251        }
1252
1253        #[inline(always)]
1254        fn inline_size(_context: fidl::encoding::Context) -> usize {
1255            32
1256        }
1257    }
1258
1259    unsafe impl<D: fidl::encoding::ResourceDialect>
1260        fidl::encoding::Encode<CrashReportingProductRegisterUpsertRequest, D>
1261        for &CrashReportingProductRegisterUpsertRequest
1262    {
1263        #[inline]
1264        unsafe fn encode(
1265            self,
1266            encoder: &mut fidl::encoding::Encoder<'_, D>,
1267            offset: usize,
1268            _depth: fidl::encoding::Depth,
1269        ) -> fidl::Result<()> {
1270            encoder.debug_check_bounds::<CrashReportingProductRegisterUpsertRequest>(offset);
1271            // Delegate to tuple encoding.
1272            fidl::encoding::Encode::<CrashReportingProductRegisterUpsertRequest, D>::encode(
1273                (
1274                    <fidl::encoding::BoundedString<2083> as fidl::encoding::ValueTypeMarker>::borrow(&self.component_url),
1275                    <CrashReportingProduct as fidl::encoding::ValueTypeMarker>::borrow(&self.product),
1276                ),
1277                encoder, offset, _depth
1278            )
1279        }
1280    }
1281    unsafe impl<
1282        D: fidl::encoding::ResourceDialect,
1283        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2083>, D>,
1284        T1: fidl::encoding::Encode<CrashReportingProduct, D>,
1285    > fidl::encoding::Encode<CrashReportingProductRegisterUpsertRequest, D> for (T0, T1)
1286    {
1287        #[inline]
1288        unsafe fn encode(
1289            self,
1290            encoder: &mut fidl::encoding::Encoder<'_, D>,
1291            offset: usize,
1292            depth: fidl::encoding::Depth,
1293        ) -> fidl::Result<()> {
1294            encoder.debug_check_bounds::<CrashReportingProductRegisterUpsertRequest>(offset);
1295            // Zero out padding regions. There's no need to apply masks
1296            // because the unmasked parts will be overwritten by fields.
1297            // Write the fields.
1298            self.0.encode(encoder, offset + 0, depth)?;
1299            self.1.encode(encoder, offset + 16, depth)?;
1300            Ok(())
1301        }
1302    }
1303
1304    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1305        for CrashReportingProductRegisterUpsertRequest
1306    {
1307        #[inline(always)]
1308        fn new_empty() -> Self {
1309            Self {
1310                component_url: fidl::new_empty!(fidl::encoding::BoundedString<2083>, D),
1311                product: fidl::new_empty!(CrashReportingProduct, D),
1312            }
1313        }
1314
1315        #[inline]
1316        unsafe fn decode(
1317            &mut self,
1318            decoder: &mut fidl::encoding::Decoder<'_, D>,
1319            offset: usize,
1320            _depth: fidl::encoding::Depth,
1321        ) -> fidl::Result<()> {
1322            decoder.debug_check_bounds::<Self>(offset);
1323            // Verify that padding bytes are zero.
1324            fidl::decode!(
1325                fidl::encoding::BoundedString<2083>,
1326                D,
1327                &mut self.component_url,
1328                decoder,
1329                offset + 0,
1330                _depth
1331            )?;
1332            fidl::decode!(
1333                CrashReportingProduct,
1334                D,
1335                &mut self.product,
1336                decoder,
1337                offset + 16,
1338                _depth
1339            )?;
1340            Ok(())
1341        }
1342    }
1343
1344    impl fidl::encoding::ValueTypeMarker for CrashReportingProductRegisterUpsertWithAckRequest {
1345        type Borrowed<'a> = &'a Self;
1346        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1347            value
1348        }
1349    }
1350
1351    unsafe impl fidl::encoding::TypeMarker for CrashReportingProductRegisterUpsertWithAckRequest {
1352        type Owned = Self;
1353
1354        #[inline(always)]
1355        fn inline_align(_context: fidl::encoding::Context) -> usize {
1356            8
1357        }
1358
1359        #[inline(always)]
1360        fn inline_size(_context: fidl::encoding::Context) -> usize {
1361            32
1362        }
1363    }
1364
1365    unsafe impl<D: fidl::encoding::ResourceDialect>
1366        fidl::encoding::Encode<CrashReportingProductRegisterUpsertWithAckRequest, D>
1367        for &CrashReportingProductRegisterUpsertWithAckRequest
1368    {
1369        #[inline]
1370        unsafe fn encode(
1371            self,
1372            encoder: &mut fidl::encoding::Encoder<'_, D>,
1373            offset: usize,
1374            _depth: fidl::encoding::Depth,
1375        ) -> fidl::Result<()> {
1376            encoder.debug_check_bounds::<CrashReportingProductRegisterUpsertWithAckRequest>(offset);
1377            // Delegate to tuple encoding.
1378            fidl::encoding::Encode::<CrashReportingProductRegisterUpsertWithAckRequest, D>::encode(
1379                (
1380                    <fidl::encoding::BoundedString<2083> as fidl::encoding::ValueTypeMarker>::borrow(&self.component_url),
1381                    <CrashReportingProduct as fidl::encoding::ValueTypeMarker>::borrow(&self.product),
1382                ),
1383                encoder, offset, _depth
1384            )
1385        }
1386    }
1387    unsafe impl<
1388        D: fidl::encoding::ResourceDialect,
1389        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2083>, D>,
1390        T1: fidl::encoding::Encode<CrashReportingProduct, D>,
1391    > fidl::encoding::Encode<CrashReportingProductRegisterUpsertWithAckRequest, D> for (T0, T1)
1392    {
1393        #[inline]
1394        unsafe fn encode(
1395            self,
1396            encoder: &mut fidl::encoding::Encoder<'_, D>,
1397            offset: usize,
1398            depth: fidl::encoding::Depth,
1399        ) -> fidl::Result<()> {
1400            encoder.debug_check_bounds::<CrashReportingProductRegisterUpsertWithAckRequest>(offset);
1401            // Zero out padding regions. There's no need to apply masks
1402            // because the unmasked parts will be overwritten by fields.
1403            // Write the fields.
1404            self.0.encode(encoder, offset + 0, depth)?;
1405            self.1.encode(encoder, offset + 16, depth)?;
1406            Ok(())
1407        }
1408    }
1409
1410    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1411        for CrashReportingProductRegisterUpsertWithAckRequest
1412    {
1413        #[inline(always)]
1414        fn new_empty() -> Self {
1415            Self {
1416                component_url: fidl::new_empty!(fidl::encoding::BoundedString<2083>, D),
1417                product: fidl::new_empty!(CrashReportingProduct, D),
1418            }
1419        }
1420
1421        #[inline]
1422        unsafe fn decode(
1423            &mut self,
1424            decoder: &mut fidl::encoding::Decoder<'_, D>,
1425            offset: usize,
1426            _depth: fidl::encoding::Depth,
1427        ) -> fidl::Result<()> {
1428            decoder.debug_check_bounds::<Self>(offset);
1429            // Verify that padding bytes are zero.
1430            fidl::decode!(
1431                fidl::encoding::BoundedString<2083>,
1432                D,
1433                &mut self.component_url,
1434                decoder,
1435                offset + 0,
1436                _depth
1437            )?;
1438            fidl::decode!(
1439                CrashReportingProduct,
1440                D,
1441                &mut self.product,
1442                decoder,
1443                offset + 16,
1444                _depth
1445            )?;
1446            Ok(())
1447        }
1448    }
1449
1450    impl fidl::encoding::ValueTypeMarker for DataProviderGetAnnotationsRequest {
1451        type Borrowed<'a> = &'a Self;
1452        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1453            value
1454        }
1455    }
1456
1457    unsafe impl fidl::encoding::TypeMarker for DataProviderGetAnnotationsRequest {
1458        type Owned = Self;
1459
1460        #[inline(always)]
1461        fn inline_align(_context: fidl::encoding::Context) -> usize {
1462            8
1463        }
1464
1465        #[inline(always)]
1466        fn inline_size(_context: fidl::encoding::Context) -> usize {
1467            16
1468        }
1469    }
1470
1471    unsafe impl<D: fidl::encoding::ResourceDialect>
1472        fidl::encoding::Encode<DataProviderGetAnnotationsRequest, D>
1473        for &DataProviderGetAnnotationsRequest
1474    {
1475        #[inline]
1476        unsafe fn encode(
1477            self,
1478            encoder: &mut fidl::encoding::Encoder<'_, D>,
1479            offset: usize,
1480            _depth: fidl::encoding::Depth,
1481        ) -> fidl::Result<()> {
1482            encoder.debug_check_bounds::<DataProviderGetAnnotationsRequest>(offset);
1483            // Delegate to tuple encoding.
1484            fidl::encoding::Encode::<DataProviderGetAnnotationsRequest, D>::encode(
1485                (<GetAnnotationsParameters as fidl::encoding::ValueTypeMarker>::borrow(
1486                    &self.params,
1487                ),),
1488                encoder,
1489                offset,
1490                _depth,
1491            )
1492        }
1493    }
1494    unsafe impl<
1495        D: fidl::encoding::ResourceDialect,
1496        T0: fidl::encoding::Encode<GetAnnotationsParameters, D>,
1497    > fidl::encoding::Encode<DataProviderGetAnnotationsRequest, D> for (T0,)
1498    {
1499        #[inline]
1500        unsafe fn encode(
1501            self,
1502            encoder: &mut fidl::encoding::Encoder<'_, D>,
1503            offset: usize,
1504            depth: fidl::encoding::Depth,
1505        ) -> fidl::Result<()> {
1506            encoder.debug_check_bounds::<DataProviderGetAnnotationsRequest>(offset);
1507            // Zero out padding regions. There's no need to apply masks
1508            // because the unmasked parts will be overwritten by fields.
1509            // Write the fields.
1510            self.0.encode(encoder, offset + 0, depth)?;
1511            Ok(())
1512        }
1513    }
1514
1515    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1516        for DataProviderGetAnnotationsRequest
1517    {
1518        #[inline(always)]
1519        fn new_empty() -> Self {
1520            Self { params: fidl::new_empty!(GetAnnotationsParameters, D) }
1521        }
1522
1523        #[inline]
1524        unsafe fn decode(
1525            &mut self,
1526            decoder: &mut fidl::encoding::Decoder<'_, D>,
1527            offset: usize,
1528            _depth: fidl::encoding::Depth,
1529        ) -> fidl::Result<()> {
1530            decoder.debug_check_bounds::<Self>(offset);
1531            // Verify that padding bytes are zero.
1532            fidl::decode!(
1533                GetAnnotationsParameters,
1534                D,
1535                &mut self.params,
1536                decoder,
1537                offset + 0,
1538                _depth
1539            )?;
1540            Ok(())
1541        }
1542    }
1543
1544    impl fidl::encoding::ValueTypeMarker for DataProviderGetAnnotationsResponse {
1545        type Borrowed<'a> = &'a Self;
1546        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1547            value
1548        }
1549    }
1550
1551    unsafe impl fidl::encoding::TypeMarker for DataProviderGetAnnotationsResponse {
1552        type Owned = Self;
1553
1554        #[inline(always)]
1555        fn inline_align(_context: fidl::encoding::Context) -> usize {
1556            8
1557        }
1558
1559        #[inline(always)]
1560        fn inline_size(_context: fidl::encoding::Context) -> usize {
1561            16
1562        }
1563    }
1564
1565    unsafe impl<D: fidl::encoding::ResourceDialect>
1566        fidl::encoding::Encode<DataProviderGetAnnotationsResponse, D>
1567        for &DataProviderGetAnnotationsResponse
1568    {
1569        #[inline]
1570        unsafe fn encode(
1571            self,
1572            encoder: &mut fidl::encoding::Encoder<'_, D>,
1573            offset: usize,
1574            _depth: fidl::encoding::Depth,
1575        ) -> fidl::Result<()> {
1576            encoder.debug_check_bounds::<DataProviderGetAnnotationsResponse>(offset);
1577            // Delegate to tuple encoding.
1578            fidl::encoding::Encode::<DataProviderGetAnnotationsResponse, D>::encode(
1579                (<Annotations as fidl::encoding::ValueTypeMarker>::borrow(&self.annotations),),
1580                encoder,
1581                offset,
1582                _depth,
1583            )
1584        }
1585    }
1586    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Annotations, D>>
1587        fidl::encoding::Encode<DataProviderGetAnnotationsResponse, D> for (T0,)
1588    {
1589        #[inline]
1590        unsafe fn encode(
1591            self,
1592            encoder: &mut fidl::encoding::Encoder<'_, D>,
1593            offset: usize,
1594            depth: fidl::encoding::Depth,
1595        ) -> fidl::Result<()> {
1596            encoder.debug_check_bounds::<DataProviderGetAnnotationsResponse>(offset);
1597            // Zero out padding regions. There's no need to apply masks
1598            // because the unmasked parts will be overwritten by fields.
1599            // Write the fields.
1600            self.0.encode(encoder, offset + 0, depth)?;
1601            Ok(())
1602        }
1603    }
1604
1605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1606        for DataProviderGetAnnotationsResponse
1607    {
1608        #[inline(always)]
1609        fn new_empty() -> Self {
1610            Self { annotations: fidl::new_empty!(Annotations, D) }
1611        }
1612
1613        #[inline]
1614        unsafe fn decode(
1615            &mut self,
1616            decoder: &mut fidl::encoding::Decoder<'_, D>,
1617            offset: usize,
1618            _depth: fidl::encoding::Depth,
1619        ) -> fidl::Result<()> {
1620            decoder.debug_check_bounds::<Self>(offset);
1621            // Verify that padding bytes are zero.
1622            fidl::decode!(Annotations, D, &mut self.annotations, decoder, offset + 0, _depth)?;
1623            Ok(())
1624        }
1625    }
1626
1627    impl fidl::encoding::ValueTypeMarker for DeviceIdProviderGetIdResponse {
1628        type Borrowed<'a> = &'a Self;
1629        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1630            value
1631        }
1632    }
1633
1634    unsafe impl fidl::encoding::TypeMarker for DeviceIdProviderGetIdResponse {
1635        type Owned = Self;
1636
1637        #[inline(always)]
1638        fn inline_align(_context: fidl::encoding::Context) -> usize {
1639            8
1640        }
1641
1642        #[inline(always)]
1643        fn inline_size(_context: fidl::encoding::Context) -> usize {
1644            16
1645        }
1646    }
1647
1648    unsafe impl<D: fidl::encoding::ResourceDialect>
1649        fidl::encoding::Encode<DeviceIdProviderGetIdResponse, D>
1650        for &DeviceIdProviderGetIdResponse
1651    {
1652        #[inline]
1653        unsafe fn encode(
1654            self,
1655            encoder: &mut fidl::encoding::Encoder<'_, D>,
1656            offset: usize,
1657            _depth: fidl::encoding::Depth,
1658        ) -> fidl::Result<()> {
1659            encoder.debug_check_bounds::<DeviceIdProviderGetIdResponse>(offset);
1660            // Delegate to tuple encoding.
1661            fidl::encoding::Encode::<DeviceIdProviderGetIdResponse, D>::encode(
1662                (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
1663                    &self.feedback_id,
1664                ),),
1665                encoder,
1666                offset,
1667                _depth,
1668            )
1669        }
1670    }
1671    unsafe impl<
1672        D: fidl::encoding::ResourceDialect,
1673        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
1674    > fidl::encoding::Encode<DeviceIdProviderGetIdResponse, D> for (T0,)
1675    {
1676        #[inline]
1677        unsafe fn encode(
1678            self,
1679            encoder: &mut fidl::encoding::Encoder<'_, D>,
1680            offset: usize,
1681            depth: fidl::encoding::Depth,
1682        ) -> fidl::Result<()> {
1683            encoder.debug_check_bounds::<DeviceIdProviderGetIdResponse>(offset);
1684            // Zero out padding regions. There's no need to apply masks
1685            // because the unmasked parts will be overwritten by fields.
1686            // Write the fields.
1687            self.0.encode(encoder, offset + 0, depth)?;
1688            Ok(())
1689        }
1690    }
1691
1692    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1693        for DeviceIdProviderGetIdResponse
1694    {
1695        #[inline(always)]
1696        fn new_empty() -> Self {
1697            Self { feedback_id: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
1698        }
1699
1700        #[inline]
1701        unsafe fn decode(
1702            &mut self,
1703            decoder: &mut fidl::encoding::Decoder<'_, D>,
1704            offset: usize,
1705            _depth: fidl::encoding::Depth,
1706        ) -> fidl::Result<()> {
1707            decoder.debug_check_bounds::<Self>(offset);
1708            // Verify that padding bytes are zero.
1709            fidl::decode!(
1710                fidl::encoding::BoundedString<64>,
1711                D,
1712                &mut self.feedback_id,
1713                decoder,
1714                offset + 0,
1715                _depth
1716            )?;
1717            Ok(())
1718        }
1719    }
1720
1721    impl fidl::encoding::ValueTypeMarker for LastRebootInfoProviderGetResponse {
1722        type Borrowed<'a> = &'a Self;
1723        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1724            value
1725        }
1726    }
1727
1728    unsafe impl fidl::encoding::TypeMarker for LastRebootInfoProviderGetResponse {
1729        type Owned = Self;
1730
1731        #[inline(always)]
1732        fn inline_align(_context: fidl::encoding::Context) -> usize {
1733            8
1734        }
1735
1736        #[inline(always)]
1737        fn inline_size(_context: fidl::encoding::Context) -> usize {
1738            16
1739        }
1740    }
1741
1742    unsafe impl<D: fidl::encoding::ResourceDialect>
1743        fidl::encoding::Encode<LastRebootInfoProviderGetResponse, D>
1744        for &LastRebootInfoProviderGetResponse
1745    {
1746        #[inline]
1747        unsafe fn encode(
1748            self,
1749            encoder: &mut fidl::encoding::Encoder<'_, D>,
1750            offset: usize,
1751            _depth: fidl::encoding::Depth,
1752        ) -> fidl::Result<()> {
1753            encoder.debug_check_bounds::<LastRebootInfoProviderGetResponse>(offset);
1754            // Delegate to tuple encoding.
1755            fidl::encoding::Encode::<LastRebootInfoProviderGetResponse, D>::encode(
1756                (<LastReboot as fidl::encoding::ValueTypeMarker>::borrow(&self.last_reboot),),
1757                encoder,
1758                offset,
1759                _depth,
1760            )
1761        }
1762    }
1763    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<LastReboot, D>>
1764        fidl::encoding::Encode<LastRebootInfoProviderGetResponse, D> for (T0,)
1765    {
1766        #[inline]
1767        unsafe fn encode(
1768            self,
1769            encoder: &mut fidl::encoding::Encoder<'_, D>,
1770            offset: usize,
1771            depth: fidl::encoding::Depth,
1772        ) -> fidl::Result<()> {
1773            encoder.debug_check_bounds::<LastRebootInfoProviderGetResponse>(offset);
1774            // Zero out padding regions. There's no need to apply masks
1775            // because the unmasked parts will be overwritten by fields.
1776            // Write the fields.
1777            self.0.encode(encoder, offset + 0, depth)?;
1778            Ok(())
1779        }
1780    }
1781
1782    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1783        for LastRebootInfoProviderGetResponse
1784    {
1785        #[inline(always)]
1786        fn new_empty() -> Self {
1787            Self { last_reboot: fidl::new_empty!(LastReboot, D) }
1788        }
1789
1790        #[inline]
1791        unsafe fn decode(
1792            &mut self,
1793            decoder: &mut fidl::encoding::Decoder<'_, D>,
1794            offset: usize,
1795            _depth: fidl::encoding::Depth,
1796        ) -> fidl::Result<()> {
1797            decoder.debug_check_bounds::<Self>(offset);
1798            // Verify that padding bytes are zero.
1799            fidl::decode!(LastReboot, D, &mut self.last_reboot, decoder, offset + 0, _depth)?;
1800            Ok(())
1801        }
1802    }
1803
1804    impl Annotations {
1805        #[inline(always)]
1806        fn max_ordinal_present(&self) -> u64 {
1807            if let Some(_) = self.annotations2 {
1808                return 2;
1809            }
1810            0
1811        }
1812    }
1813
1814    impl fidl::encoding::ValueTypeMarker for Annotations {
1815        type Borrowed<'a> = &'a Self;
1816        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1817            value
1818        }
1819    }
1820
1821    unsafe impl fidl::encoding::TypeMarker for Annotations {
1822        type Owned = Self;
1823
1824        #[inline(always)]
1825        fn inline_align(_context: fidl::encoding::Context) -> usize {
1826            8
1827        }
1828
1829        #[inline(always)]
1830        fn inline_size(_context: fidl::encoding::Context) -> usize {
1831            16
1832        }
1833    }
1834
1835    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Annotations, D>
1836        for &Annotations
1837    {
1838        unsafe fn encode(
1839            self,
1840            encoder: &mut fidl::encoding::Encoder<'_, D>,
1841            offset: usize,
1842            mut depth: fidl::encoding::Depth,
1843        ) -> fidl::Result<()> {
1844            encoder.debug_check_bounds::<Annotations>(offset);
1845            // Vector header
1846            let max_ordinal: u64 = self.max_ordinal_present();
1847            encoder.write_num(max_ordinal, offset);
1848            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1849            // Calling encoder.out_of_line_offset(0) is not allowed.
1850            if max_ordinal == 0 {
1851                return Ok(());
1852            }
1853            depth.increment()?;
1854            let envelope_size = 8;
1855            let bytes_len = max_ordinal as usize * envelope_size;
1856            #[allow(unused_variables)]
1857            let offset = encoder.out_of_line_offset(bytes_len);
1858            let mut _prev_end_offset: usize = 0;
1859            if 2 > max_ordinal {
1860                return Ok(());
1861            }
1862
1863            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1864            // are envelope_size bytes.
1865            let cur_offset: usize = (2 - 1) * envelope_size;
1866
1867            // Zero reserved fields.
1868            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1869
1870            // Safety:
1871            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1872            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1873            //   envelope_size bytes, there is always sufficient room.
1874            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<Annotation, 512>, D>(
1875            self.annotations2.as_ref().map(<fidl::encoding::Vector<Annotation, 512> as fidl::encoding::ValueTypeMarker>::borrow),
1876            encoder, offset + cur_offset, depth
1877        )?;
1878
1879            _prev_end_offset = cur_offset + envelope_size;
1880
1881            Ok(())
1882        }
1883    }
1884
1885    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Annotations {
1886        #[inline(always)]
1887        fn new_empty() -> Self {
1888            Self::default()
1889        }
1890
1891        unsafe fn decode(
1892            &mut self,
1893            decoder: &mut fidl::encoding::Decoder<'_, D>,
1894            offset: usize,
1895            mut depth: fidl::encoding::Depth,
1896        ) -> fidl::Result<()> {
1897            decoder.debug_check_bounds::<Self>(offset);
1898            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1899                None => return Err(fidl::Error::NotNullable),
1900                Some(len) => len,
1901            };
1902            // Calling decoder.out_of_line_offset(0) is not allowed.
1903            if len == 0 {
1904                return Ok(());
1905            };
1906            depth.increment()?;
1907            let envelope_size = 8;
1908            let bytes_len = len * envelope_size;
1909            let offset = decoder.out_of_line_offset(bytes_len)?;
1910            // Decode the envelope for each type.
1911            let mut _next_ordinal_to_read = 0;
1912            let mut next_offset = offset;
1913            let end_offset = offset + bytes_len;
1914            _next_ordinal_to_read += 1;
1915            if next_offset >= end_offset {
1916                return Ok(());
1917            }
1918
1919            // Decode unknown envelopes for gaps in ordinals.
1920            while _next_ordinal_to_read < 2 {
1921                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1922                _next_ordinal_to_read += 1;
1923                next_offset += envelope_size;
1924            }
1925
1926            let next_out_of_line = decoder.next_out_of_line();
1927            let handles_before = decoder.remaining_handles();
1928            if let Some((inlined, num_bytes, num_handles)) =
1929                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1930            {
1931                let member_inline_size = <fidl::encoding::Vector<Annotation, 512> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1932                if inlined != (member_inline_size <= 4) {
1933                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1934                }
1935                let inner_offset;
1936                let mut inner_depth = depth.clone();
1937                if inlined {
1938                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1939                    inner_offset = next_offset;
1940                } else {
1941                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1942                    inner_depth.increment()?;
1943                }
1944                let val_ref = self.annotations2.get_or_insert_with(
1945                    || fidl::new_empty!(fidl::encoding::Vector<Annotation, 512>, D),
1946                );
1947                fidl::decode!(fidl::encoding::Vector<Annotation, 512>, D, val_ref, decoder, inner_offset, inner_depth)?;
1948                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1949                {
1950                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1951                }
1952                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1953                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1954                }
1955            }
1956
1957            next_offset += envelope_size;
1958
1959            // Decode the remaining unknown envelopes.
1960            while next_offset < end_offset {
1961                _next_ordinal_to_read += 1;
1962                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1963                next_offset += envelope_size;
1964            }
1965
1966            Ok(())
1967        }
1968    }
1969
1970    impl ComponentData {
1971        #[inline(always)]
1972        fn max_ordinal_present(&self) -> u64 {
1973            if let Some(_) = self.annotations {
1974                return 2;
1975            }
1976            if let Some(_) = self.namespace {
1977                return 1;
1978            }
1979            0
1980        }
1981    }
1982
1983    impl fidl::encoding::ValueTypeMarker for ComponentData {
1984        type Borrowed<'a> = &'a Self;
1985        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1986            value
1987        }
1988    }
1989
1990    unsafe impl fidl::encoding::TypeMarker for ComponentData {
1991        type Owned = Self;
1992
1993        #[inline(always)]
1994        fn inline_align(_context: fidl::encoding::Context) -> usize {
1995            8
1996        }
1997
1998        #[inline(always)]
1999        fn inline_size(_context: fidl::encoding::Context) -> usize {
2000            16
2001        }
2002    }
2003
2004    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ComponentData, D>
2005        for &ComponentData
2006    {
2007        unsafe fn encode(
2008            self,
2009            encoder: &mut fidl::encoding::Encoder<'_, D>,
2010            offset: usize,
2011            mut depth: fidl::encoding::Depth,
2012        ) -> fidl::Result<()> {
2013            encoder.debug_check_bounds::<ComponentData>(offset);
2014            // Vector header
2015            let max_ordinal: u64 = self.max_ordinal_present();
2016            encoder.write_num(max_ordinal, offset);
2017            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2018            // Calling encoder.out_of_line_offset(0) is not allowed.
2019            if max_ordinal == 0 {
2020                return Ok(());
2021            }
2022            depth.increment()?;
2023            let envelope_size = 8;
2024            let bytes_len = max_ordinal as usize * envelope_size;
2025            #[allow(unused_variables)]
2026            let offset = encoder.out_of_line_offset(bytes_len);
2027            let mut _prev_end_offset: usize = 0;
2028            if 1 > max_ordinal {
2029                return Ok(());
2030            }
2031
2032            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2033            // are envelope_size bytes.
2034            let cur_offset: usize = (1 - 1) * envelope_size;
2035
2036            // Zero reserved fields.
2037            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2038
2039            // Safety:
2040            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2041            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2042            //   envelope_size bytes, there is always sufficient room.
2043            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<32>, D>(
2044                self.namespace.as_ref().map(
2045                    <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow,
2046                ),
2047                encoder,
2048                offset + cur_offset,
2049                depth,
2050            )?;
2051
2052            _prev_end_offset = cur_offset + envelope_size;
2053            if 2 > max_ordinal {
2054                return Ok(());
2055            }
2056
2057            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2058            // are envelope_size bytes.
2059            let cur_offset: usize = (2 - 1) * envelope_size;
2060
2061            // Zero reserved fields.
2062            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2063
2064            // Safety:
2065            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2066            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2067            //   envelope_size bytes, there is always sufficient room.
2068            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<Annotation, 16>, D>(
2069            self.annotations.as_ref().map(<fidl::encoding::Vector<Annotation, 16> as fidl::encoding::ValueTypeMarker>::borrow),
2070            encoder, offset + cur_offset, depth
2071        )?;
2072
2073            _prev_end_offset = cur_offset + envelope_size;
2074
2075            Ok(())
2076        }
2077    }
2078
2079    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ComponentData {
2080        #[inline(always)]
2081        fn new_empty() -> Self {
2082            Self::default()
2083        }
2084
2085        unsafe fn decode(
2086            &mut self,
2087            decoder: &mut fidl::encoding::Decoder<'_, D>,
2088            offset: usize,
2089            mut depth: fidl::encoding::Depth,
2090        ) -> fidl::Result<()> {
2091            decoder.debug_check_bounds::<Self>(offset);
2092            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2093                None => return Err(fidl::Error::NotNullable),
2094                Some(len) => len,
2095            };
2096            // Calling decoder.out_of_line_offset(0) is not allowed.
2097            if len == 0 {
2098                return Ok(());
2099            };
2100            depth.increment()?;
2101            let envelope_size = 8;
2102            let bytes_len = len * envelope_size;
2103            let offset = decoder.out_of_line_offset(bytes_len)?;
2104            // Decode the envelope for each type.
2105            let mut _next_ordinal_to_read = 0;
2106            let mut next_offset = offset;
2107            let end_offset = offset + bytes_len;
2108            _next_ordinal_to_read += 1;
2109            if next_offset >= end_offset {
2110                return Ok(());
2111            }
2112
2113            // Decode unknown envelopes for gaps in ordinals.
2114            while _next_ordinal_to_read < 1 {
2115                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2116                _next_ordinal_to_read += 1;
2117                next_offset += envelope_size;
2118            }
2119
2120            let next_out_of_line = decoder.next_out_of_line();
2121            let handles_before = decoder.remaining_handles();
2122            if let Some((inlined, num_bytes, num_handles)) =
2123                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2124            {
2125                let member_inline_size =
2126                    <fidl::encoding::BoundedString<32> as fidl::encoding::TypeMarker>::inline_size(
2127                        decoder.context,
2128                    );
2129                if inlined != (member_inline_size <= 4) {
2130                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2131                }
2132                let inner_offset;
2133                let mut inner_depth = depth.clone();
2134                if inlined {
2135                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2136                    inner_offset = next_offset;
2137                } else {
2138                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2139                    inner_depth.increment()?;
2140                }
2141                let val_ref = self
2142                    .namespace
2143                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<32>, D));
2144                fidl::decode!(
2145                    fidl::encoding::BoundedString<32>,
2146                    D,
2147                    val_ref,
2148                    decoder,
2149                    inner_offset,
2150                    inner_depth
2151                )?;
2152                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2153                {
2154                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2155                }
2156                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2157                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2158                }
2159            }
2160
2161            next_offset += envelope_size;
2162            _next_ordinal_to_read += 1;
2163            if next_offset >= end_offset {
2164                return Ok(());
2165            }
2166
2167            // Decode unknown envelopes for gaps in ordinals.
2168            while _next_ordinal_to_read < 2 {
2169                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2170                _next_ordinal_to_read += 1;
2171                next_offset += envelope_size;
2172            }
2173
2174            let next_out_of_line = decoder.next_out_of_line();
2175            let handles_before = decoder.remaining_handles();
2176            if let Some((inlined, num_bytes, num_handles)) =
2177                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2178            {
2179                let member_inline_size = <fidl::encoding::Vector<Annotation, 16> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2180                if inlined != (member_inline_size <= 4) {
2181                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2182                }
2183                let inner_offset;
2184                let mut inner_depth = depth.clone();
2185                if inlined {
2186                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2187                    inner_offset = next_offset;
2188                } else {
2189                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2190                    inner_depth.increment()?;
2191                }
2192                let val_ref = self.annotations.get_or_insert_with(
2193                    || fidl::new_empty!(fidl::encoding::Vector<Annotation, 16>, D),
2194                );
2195                fidl::decode!(fidl::encoding::Vector<Annotation, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
2196                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2197                {
2198                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2199                }
2200                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2201                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2202                }
2203            }
2204
2205            next_offset += envelope_size;
2206
2207            // Decode the remaining unknown envelopes.
2208            while next_offset < end_offset {
2209                _next_ordinal_to_read += 1;
2210                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2211                next_offset += envelope_size;
2212            }
2213
2214            Ok(())
2215        }
2216    }
2217
2218    impl CrashReportingProduct {
2219        #[inline(always)]
2220        fn max_ordinal_present(&self) -> u64 {
2221            if let Some(_) = self.channel {
2222                return 3;
2223            }
2224            if let Some(_) = self.version {
2225                return 2;
2226            }
2227            if let Some(_) = self.name {
2228                return 1;
2229            }
2230            0
2231        }
2232    }
2233
2234    impl fidl::encoding::ValueTypeMarker for CrashReportingProduct {
2235        type Borrowed<'a> = &'a Self;
2236        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2237            value
2238        }
2239    }
2240
2241    unsafe impl fidl::encoding::TypeMarker for CrashReportingProduct {
2242        type Owned = Self;
2243
2244        #[inline(always)]
2245        fn inline_align(_context: fidl::encoding::Context) -> usize {
2246            8
2247        }
2248
2249        #[inline(always)]
2250        fn inline_size(_context: fidl::encoding::Context) -> usize {
2251            16
2252        }
2253    }
2254
2255    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CrashReportingProduct, D>
2256        for &CrashReportingProduct
2257    {
2258        unsafe fn encode(
2259            self,
2260            encoder: &mut fidl::encoding::Encoder<'_, D>,
2261            offset: usize,
2262            mut depth: fidl::encoding::Depth,
2263        ) -> fidl::Result<()> {
2264            encoder.debug_check_bounds::<CrashReportingProduct>(offset);
2265            // Vector header
2266            let max_ordinal: u64 = self.max_ordinal_present();
2267            encoder.write_num(max_ordinal, offset);
2268            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2269            // Calling encoder.out_of_line_offset(0) is not allowed.
2270            if max_ordinal == 0 {
2271                return Ok(());
2272            }
2273            depth.increment()?;
2274            let envelope_size = 8;
2275            let bytes_len = max_ordinal as usize * envelope_size;
2276            #[allow(unused_variables)]
2277            let offset = encoder.out_of_line_offset(bytes_len);
2278            let mut _prev_end_offset: usize = 0;
2279            if 1 > max_ordinal {
2280                return Ok(());
2281            }
2282
2283            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2284            // are envelope_size bytes.
2285            let cur_offset: usize = (1 - 1) * envelope_size;
2286
2287            // Zero reserved fields.
2288            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2289
2290            // Safety:
2291            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2292            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2293            //   envelope_size bytes, there is always sufficient room.
2294            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
2295                self.name.as_ref().map(
2296                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
2297                ),
2298                encoder,
2299                offset + cur_offset,
2300                depth,
2301            )?;
2302
2303            _prev_end_offset = cur_offset + envelope_size;
2304            if 2 > max_ordinal {
2305                return Ok(());
2306            }
2307
2308            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2309            // are envelope_size bytes.
2310            let cur_offset: usize = (2 - 1) * envelope_size;
2311
2312            // Zero reserved fields.
2313            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2314
2315            // Safety:
2316            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2317            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2318            //   envelope_size bytes, there is always sufficient room.
2319            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
2320                self.version.as_ref().map(
2321                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
2322                ),
2323                encoder,
2324                offset + cur_offset,
2325                depth,
2326            )?;
2327
2328            _prev_end_offset = cur_offset + envelope_size;
2329            if 3 > max_ordinal {
2330                return Ok(());
2331            }
2332
2333            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2334            // are envelope_size bytes.
2335            let cur_offset: usize = (3 - 1) * envelope_size;
2336
2337            // Zero reserved fields.
2338            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2339
2340            // Safety:
2341            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2342            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2343            //   envelope_size bytes, there is always sufficient room.
2344            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
2345                self.channel.as_ref().map(
2346                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
2347                ),
2348                encoder,
2349                offset + cur_offset,
2350                depth,
2351            )?;
2352
2353            _prev_end_offset = cur_offset + envelope_size;
2354
2355            Ok(())
2356        }
2357    }
2358
2359    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CrashReportingProduct {
2360        #[inline(always)]
2361        fn new_empty() -> Self {
2362            Self::default()
2363        }
2364
2365        unsafe fn decode(
2366            &mut self,
2367            decoder: &mut fidl::encoding::Decoder<'_, D>,
2368            offset: usize,
2369            mut depth: fidl::encoding::Depth,
2370        ) -> fidl::Result<()> {
2371            decoder.debug_check_bounds::<Self>(offset);
2372            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2373                None => return Err(fidl::Error::NotNullable),
2374                Some(len) => len,
2375            };
2376            // Calling decoder.out_of_line_offset(0) is not allowed.
2377            if len == 0 {
2378                return Ok(());
2379            };
2380            depth.increment()?;
2381            let envelope_size = 8;
2382            let bytes_len = len * envelope_size;
2383            let offset = decoder.out_of_line_offset(bytes_len)?;
2384            // Decode the envelope for each type.
2385            let mut _next_ordinal_to_read = 0;
2386            let mut next_offset = offset;
2387            let end_offset = offset + bytes_len;
2388            _next_ordinal_to_read += 1;
2389            if next_offset >= end_offset {
2390                return Ok(());
2391            }
2392
2393            // Decode unknown envelopes for gaps in ordinals.
2394            while _next_ordinal_to_read < 1 {
2395                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2396                _next_ordinal_to_read += 1;
2397                next_offset += envelope_size;
2398            }
2399
2400            let next_out_of_line = decoder.next_out_of_line();
2401            let handles_before = decoder.remaining_handles();
2402            if let Some((inlined, num_bytes, num_handles)) =
2403                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2404            {
2405                let member_inline_size =
2406                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
2407                        decoder.context,
2408                    );
2409                if inlined != (member_inline_size <= 4) {
2410                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2411                }
2412                let inner_offset;
2413                let mut inner_depth = depth.clone();
2414                if inlined {
2415                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2416                    inner_offset = next_offset;
2417                } else {
2418                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2419                    inner_depth.increment()?;
2420                }
2421                let val_ref = self
2422                    .name
2423                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
2424                fidl::decode!(
2425                    fidl::encoding::UnboundedString,
2426                    D,
2427                    val_ref,
2428                    decoder,
2429                    inner_offset,
2430                    inner_depth
2431                )?;
2432                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2433                {
2434                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2435                }
2436                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2437                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2438                }
2439            }
2440
2441            next_offset += envelope_size;
2442            _next_ordinal_to_read += 1;
2443            if next_offset >= end_offset {
2444                return Ok(());
2445            }
2446
2447            // Decode unknown envelopes for gaps in ordinals.
2448            while _next_ordinal_to_read < 2 {
2449                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2450                _next_ordinal_to_read += 1;
2451                next_offset += envelope_size;
2452            }
2453
2454            let next_out_of_line = decoder.next_out_of_line();
2455            let handles_before = decoder.remaining_handles();
2456            if let Some((inlined, num_bytes, num_handles)) =
2457                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2458            {
2459                let member_inline_size =
2460                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
2461                        decoder.context,
2462                    );
2463                if inlined != (member_inline_size <= 4) {
2464                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2465                }
2466                let inner_offset;
2467                let mut inner_depth = depth.clone();
2468                if inlined {
2469                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2470                    inner_offset = next_offset;
2471                } else {
2472                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2473                    inner_depth.increment()?;
2474                }
2475                let val_ref = self
2476                    .version
2477                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
2478                fidl::decode!(
2479                    fidl::encoding::UnboundedString,
2480                    D,
2481                    val_ref,
2482                    decoder,
2483                    inner_offset,
2484                    inner_depth
2485                )?;
2486                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2487                {
2488                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2489                }
2490                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2491                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2492                }
2493            }
2494
2495            next_offset += envelope_size;
2496            _next_ordinal_to_read += 1;
2497            if next_offset >= end_offset {
2498                return Ok(());
2499            }
2500
2501            // Decode unknown envelopes for gaps in ordinals.
2502            while _next_ordinal_to_read < 3 {
2503                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2504                _next_ordinal_to_read += 1;
2505                next_offset += envelope_size;
2506            }
2507
2508            let next_out_of_line = decoder.next_out_of_line();
2509            let handles_before = decoder.remaining_handles();
2510            if let Some((inlined, num_bytes, num_handles)) =
2511                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2512            {
2513                let member_inline_size =
2514                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
2515                        decoder.context,
2516                    );
2517                if inlined != (member_inline_size <= 4) {
2518                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2519                }
2520                let inner_offset;
2521                let mut inner_depth = depth.clone();
2522                if inlined {
2523                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2524                    inner_offset = next_offset;
2525                } else {
2526                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2527                    inner_depth.increment()?;
2528                }
2529                let val_ref = self
2530                    .channel
2531                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
2532                fidl::decode!(
2533                    fidl::encoding::UnboundedString,
2534                    D,
2535                    val_ref,
2536                    decoder,
2537                    inner_offset,
2538                    inner_depth
2539                )?;
2540                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2541                {
2542                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2543                }
2544                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2545                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2546                }
2547            }
2548
2549            next_offset += envelope_size;
2550
2551            // Decode the remaining unknown envelopes.
2552            while next_offset < end_offset {
2553                _next_ordinal_to_read += 1;
2554                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2555                next_offset += envelope_size;
2556            }
2557
2558            Ok(())
2559        }
2560    }
2561
2562    impl FileReportResults {
2563        #[inline(always)]
2564        fn max_ordinal_present(&self) -> u64 {
2565            if let Some(_) = self.report_id {
2566                return 2;
2567            }
2568            if let Some(_) = self.result {
2569                return 1;
2570            }
2571            0
2572        }
2573    }
2574
2575    impl fidl::encoding::ValueTypeMarker for FileReportResults {
2576        type Borrowed<'a> = &'a Self;
2577        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2578            value
2579        }
2580    }
2581
2582    unsafe impl fidl::encoding::TypeMarker for FileReportResults {
2583        type Owned = Self;
2584
2585        #[inline(always)]
2586        fn inline_align(_context: fidl::encoding::Context) -> usize {
2587            8
2588        }
2589
2590        #[inline(always)]
2591        fn inline_size(_context: fidl::encoding::Context) -> usize {
2592            16
2593        }
2594    }
2595
2596    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FileReportResults, D>
2597        for &FileReportResults
2598    {
2599        unsafe fn encode(
2600            self,
2601            encoder: &mut fidl::encoding::Encoder<'_, D>,
2602            offset: usize,
2603            mut depth: fidl::encoding::Depth,
2604        ) -> fidl::Result<()> {
2605            encoder.debug_check_bounds::<FileReportResults>(offset);
2606            // Vector header
2607            let max_ordinal: u64 = self.max_ordinal_present();
2608            encoder.write_num(max_ordinal, offset);
2609            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2610            // Calling encoder.out_of_line_offset(0) is not allowed.
2611            if max_ordinal == 0 {
2612                return Ok(());
2613            }
2614            depth.increment()?;
2615            let envelope_size = 8;
2616            let bytes_len = max_ordinal as usize * envelope_size;
2617            #[allow(unused_variables)]
2618            let offset = encoder.out_of_line_offset(bytes_len);
2619            let mut _prev_end_offset: usize = 0;
2620            if 1 > max_ordinal {
2621                return Ok(());
2622            }
2623
2624            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2625            // are envelope_size bytes.
2626            let cur_offset: usize = (1 - 1) * envelope_size;
2627
2628            // Zero reserved fields.
2629            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2630
2631            // Safety:
2632            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2633            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2634            //   envelope_size bytes, there is always sufficient room.
2635            fidl::encoding::encode_in_envelope_optional::<FilingSuccess, D>(
2636                self.result
2637                    .as_ref()
2638                    .map(<FilingSuccess as fidl::encoding::ValueTypeMarker>::borrow),
2639                encoder,
2640                offset + cur_offset,
2641                depth,
2642            )?;
2643
2644            _prev_end_offset = cur_offset + envelope_size;
2645            if 2 > max_ordinal {
2646                return Ok(());
2647            }
2648
2649            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2650            // are envelope_size bytes.
2651            let cur_offset: usize = (2 - 1) * envelope_size;
2652
2653            // Zero reserved fields.
2654            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2655
2656            // Safety:
2657            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2658            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2659            //   envelope_size bytes, there is always sufficient room.
2660            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<64>, D>(
2661                self.report_id.as_ref().map(
2662                    <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow,
2663                ),
2664                encoder,
2665                offset + cur_offset,
2666                depth,
2667            )?;
2668
2669            _prev_end_offset = cur_offset + envelope_size;
2670
2671            Ok(())
2672        }
2673    }
2674
2675    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FileReportResults {
2676        #[inline(always)]
2677        fn new_empty() -> Self {
2678            Self::default()
2679        }
2680
2681        unsafe fn decode(
2682            &mut self,
2683            decoder: &mut fidl::encoding::Decoder<'_, D>,
2684            offset: usize,
2685            mut depth: fidl::encoding::Depth,
2686        ) -> fidl::Result<()> {
2687            decoder.debug_check_bounds::<Self>(offset);
2688            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2689                None => return Err(fidl::Error::NotNullable),
2690                Some(len) => len,
2691            };
2692            // Calling decoder.out_of_line_offset(0) is not allowed.
2693            if len == 0 {
2694                return Ok(());
2695            };
2696            depth.increment()?;
2697            let envelope_size = 8;
2698            let bytes_len = len * envelope_size;
2699            let offset = decoder.out_of_line_offset(bytes_len)?;
2700            // Decode the envelope for each type.
2701            let mut _next_ordinal_to_read = 0;
2702            let mut next_offset = offset;
2703            let end_offset = offset + bytes_len;
2704            _next_ordinal_to_read += 1;
2705            if next_offset >= end_offset {
2706                return Ok(());
2707            }
2708
2709            // Decode unknown envelopes for gaps in ordinals.
2710            while _next_ordinal_to_read < 1 {
2711                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2712                _next_ordinal_to_read += 1;
2713                next_offset += envelope_size;
2714            }
2715
2716            let next_out_of_line = decoder.next_out_of_line();
2717            let handles_before = decoder.remaining_handles();
2718            if let Some((inlined, num_bytes, num_handles)) =
2719                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2720            {
2721                let member_inline_size =
2722                    <FilingSuccess as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2723                if inlined != (member_inline_size <= 4) {
2724                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2725                }
2726                let inner_offset;
2727                let mut inner_depth = depth.clone();
2728                if inlined {
2729                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2730                    inner_offset = next_offset;
2731                } else {
2732                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2733                    inner_depth.increment()?;
2734                }
2735                let val_ref = self.result.get_or_insert_with(|| fidl::new_empty!(FilingSuccess, D));
2736                fidl::decode!(FilingSuccess, D, val_ref, decoder, inner_offset, inner_depth)?;
2737                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2738                {
2739                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2740                }
2741                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2742                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2743                }
2744            }
2745
2746            next_offset += envelope_size;
2747            _next_ordinal_to_read += 1;
2748            if next_offset >= end_offset {
2749                return Ok(());
2750            }
2751
2752            // Decode unknown envelopes for gaps in ordinals.
2753            while _next_ordinal_to_read < 2 {
2754                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2755                _next_ordinal_to_read += 1;
2756                next_offset += envelope_size;
2757            }
2758
2759            let next_out_of_line = decoder.next_out_of_line();
2760            let handles_before = decoder.remaining_handles();
2761            if let Some((inlined, num_bytes, num_handles)) =
2762                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2763            {
2764                let member_inline_size =
2765                    <fidl::encoding::BoundedString<64> as fidl::encoding::TypeMarker>::inline_size(
2766                        decoder.context,
2767                    );
2768                if inlined != (member_inline_size <= 4) {
2769                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2770                }
2771                let inner_offset;
2772                let mut inner_depth = depth.clone();
2773                if inlined {
2774                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2775                    inner_offset = next_offset;
2776                } else {
2777                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2778                    inner_depth.increment()?;
2779                }
2780                let val_ref = self
2781                    .report_id
2782                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<64>, D));
2783                fidl::decode!(
2784                    fidl::encoding::BoundedString<64>,
2785                    D,
2786                    val_ref,
2787                    decoder,
2788                    inner_offset,
2789                    inner_depth
2790                )?;
2791                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2792                {
2793                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2794                }
2795                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2796                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2797                }
2798            }
2799
2800            next_offset += envelope_size;
2801
2802            // Decode the remaining unknown envelopes.
2803            while next_offset < end_offset {
2804                _next_ordinal_to_read += 1;
2805                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2806                next_offset += envelope_size;
2807            }
2808
2809            Ok(())
2810        }
2811    }
2812
2813    impl GetAnnotationsParameters {
2814        #[inline(always)]
2815        fn max_ordinal_present(&self) -> u64 {
2816            if let Some(_) = self.collection_timeout_per_annotation {
2817                return 1;
2818            }
2819            0
2820        }
2821    }
2822
2823    impl fidl::encoding::ValueTypeMarker for GetAnnotationsParameters {
2824        type Borrowed<'a> = &'a Self;
2825        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2826            value
2827        }
2828    }
2829
2830    unsafe impl fidl::encoding::TypeMarker for GetAnnotationsParameters {
2831        type Owned = Self;
2832
2833        #[inline(always)]
2834        fn inline_align(_context: fidl::encoding::Context) -> usize {
2835            8
2836        }
2837
2838        #[inline(always)]
2839        fn inline_size(_context: fidl::encoding::Context) -> usize {
2840            16
2841        }
2842    }
2843
2844    unsafe impl<D: fidl::encoding::ResourceDialect>
2845        fidl::encoding::Encode<GetAnnotationsParameters, D> for &GetAnnotationsParameters
2846    {
2847        unsafe fn encode(
2848            self,
2849            encoder: &mut fidl::encoding::Encoder<'_, D>,
2850            offset: usize,
2851            mut depth: fidl::encoding::Depth,
2852        ) -> fidl::Result<()> {
2853            encoder.debug_check_bounds::<GetAnnotationsParameters>(offset);
2854            // Vector header
2855            let max_ordinal: u64 = self.max_ordinal_present();
2856            encoder.write_num(max_ordinal, offset);
2857            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2858            // Calling encoder.out_of_line_offset(0) is not allowed.
2859            if max_ordinal == 0 {
2860                return Ok(());
2861            }
2862            depth.increment()?;
2863            let envelope_size = 8;
2864            let bytes_len = max_ordinal as usize * envelope_size;
2865            #[allow(unused_variables)]
2866            let offset = encoder.out_of_line_offset(bytes_len);
2867            let mut _prev_end_offset: usize = 0;
2868            if 1 > max_ordinal {
2869                return Ok(());
2870            }
2871
2872            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2873            // are envelope_size bytes.
2874            let cur_offset: usize = (1 - 1) * envelope_size;
2875
2876            // Zero reserved fields.
2877            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2878
2879            // Safety:
2880            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2881            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2882            //   envelope_size bytes, there is always sufficient room.
2883            fidl::encoding::encode_in_envelope_optional::<i64, D>(
2884                self.collection_timeout_per_annotation
2885                    .as_ref()
2886                    .map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
2887                encoder,
2888                offset + cur_offset,
2889                depth,
2890            )?;
2891
2892            _prev_end_offset = cur_offset + envelope_size;
2893
2894            Ok(())
2895        }
2896    }
2897
2898    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2899        for GetAnnotationsParameters
2900    {
2901        #[inline(always)]
2902        fn new_empty() -> Self {
2903            Self::default()
2904        }
2905
2906        unsafe fn decode(
2907            &mut self,
2908            decoder: &mut fidl::encoding::Decoder<'_, D>,
2909            offset: usize,
2910            mut depth: fidl::encoding::Depth,
2911        ) -> fidl::Result<()> {
2912            decoder.debug_check_bounds::<Self>(offset);
2913            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2914                None => return Err(fidl::Error::NotNullable),
2915                Some(len) => len,
2916            };
2917            // Calling decoder.out_of_line_offset(0) is not allowed.
2918            if len == 0 {
2919                return Ok(());
2920            };
2921            depth.increment()?;
2922            let envelope_size = 8;
2923            let bytes_len = len * envelope_size;
2924            let offset = decoder.out_of_line_offset(bytes_len)?;
2925            // Decode the envelope for each type.
2926            let mut _next_ordinal_to_read = 0;
2927            let mut next_offset = offset;
2928            let end_offset = offset + bytes_len;
2929            _next_ordinal_to_read += 1;
2930            if next_offset >= end_offset {
2931                return Ok(());
2932            }
2933
2934            // Decode unknown envelopes for gaps in ordinals.
2935            while _next_ordinal_to_read < 1 {
2936                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2937                _next_ordinal_to_read += 1;
2938                next_offset += envelope_size;
2939            }
2940
2941            let next_out_of_line = decoder.next_out_of_line();
2942            let handles_before = decoder.remaining_handles();
2943            if let Some((inlined, num_bytes, num_handles)) =
2944                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2945            {
2946                let member_inline_size =
2947                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2948                if inlined != (member_inline_size <= 4) {
2949                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2950                }
2951                let inner_offset;
2952                let mut inner_depth = depth.clone();
2953                if inlined {
2954                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2955                    inner_offset = next_offset;
2956                } else {
2957                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2958                    inner_depth.increment()?;
2959                }
2960                let val_ref = self
2961                    .collection_timeout_per_annotation
2962                    .get_or_insert_with(|| fidl::new_empty!(i64, D));
2963                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
2964                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2965                {
2966                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2967                }
2968                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2969                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2970                }
2971            }
2972
2973            next_offset += envelope_size;
2974
2975            // Decode the remaining unknown envelopes.
2976            while next_offset < end_offset {
2977                _next_ordinal_to_read += 1;
2978                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2979                next_offset += envelope_size;
2980            }
2981
2982            Ok(())
2983        }
2984    }
2985
2986    impl LastReboot {
2987        #[inline(always)]
2988        fn max_ordinal_present(&self) -> u64 {
2989            if let Some(_) = self.action {
2990                return 6;
2991            }
2992            if let Some(_) = self.runtime {
2993                return 5;
2994            }
2995            if let Some(_) = self.planned {
2996                return 4;
2997            }
2998            if let Some(_) = self.uptime {
2999                return 3;
3000            }
3001            if let Some(_) = self.reason {
3002                return 2;
3003            }
3004            if let Some(_) = self.graceful {
3005                return 1;
3006            }
3007            0
3008        }
3009    }
3010
3011    impl fidl::encoding::ValueTypeMarker for LastReboot {
3012        type Borrowed<'a> = &'a Self;
3013        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3014            value
3015        }
3016    }
3017
3018    unsafe impl fidl::encoding::TypeMarker for LastReboot {
3019        type Owned = Self;
3020
3021        #[inline(always)]
3022        fn inline_align(_context: fidl::encoding::Context) -> usize {
3023            8
3024        }
3025
3026        #[inline(always)]
3027        fn inline_size(_context: fidl::encoding::Context) -> usize {
3028            16
3029        }
3030    }
3031
3032    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LastReboot, D>
3033        for &LastReboot
3034    {
3035        unsafe fn encode(
3036            self,
3037            encoder: &mut fidl::encoding::Encoder<'_, D>,
3038            offset: usize,
3039            mut depth: fidl::encoding::Depth,
3040        ) -> fidl::Result<()> {
3041            encoder.debug_check_bounds::<LastReboot>(offset);
3042            // Vector header
3043            let max_ordinal: u64 = self.max_ordinal_present();
3044            encoder.write_num(max_ordinal, offset);
3045            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3046            // Calling encoder.out_of_line_offset(0) is not allowed.
3047            if max_ordinal == 0 {
3048                return Ok(());
3049            }
3050            depth.increment()?;
3051            let envelope_size = 8;
3052            let bytes_len = max_ordinal as usize * envelope_size;
3053            #[allow(unused_variables)]
3054            let offset = encoder.out_of_line_offset(bytes_len);
3055            let mut _prev_end_offset: usize = 0;
3056            if 1 > max_ordinal {
3057                return Ok(());
3058            }
3059
3060            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3061            // are envelope_size bytes.
3062            let cur_offset: usize = (1 - 1) * envelope_size;
3063
3064            // Zero reserved fields.
3065            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3066
3067            // Safety:
3068            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3069            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3070            //   envelope_size bytes, there is always sufficient room.
3071            fidl::encoding::encode_in_envelope_optional::<bool, D>(
3072                self.graceful.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3073                encoder,
3074                offset + cur_offset,
3075                depth,
3076            )?;
3077
3078            _prev_end_offset = cur_offset + envelope_size;
3079            if 2 > max_ordinal {
3080                return Ok(());
3081            }
3082
3083            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3084            // are envelope_size bytes.
3085            let cur_offset: usize = (2 - 1) * envelope_size;
3086
3087            // Zero reserved fields.
3088            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3089
3090            // Safety:
3091            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3092            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3093            //   envelope_size bytes, there is always sufficient room.
3094            fidl::encoding::encode_in_envelope_optional::<RebootReason, D>(
3095                self.reason.as_ref().map(<RebootReason as fidl::encoding::ValueTypeMarker>::borrow),
3096                encoder,
3097                offset + cur_offset,
3098                depth,
3099            )?;
3100
3101            _prev_end_offset = cur_offset + envelope_size;
3102            if 3 > max_ordinal {
3103                return Ok(());
3104            }
3105
3106            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3107            // are envelope_size bytes.
3108            let cur_offset: usize = (3 - 1) * envelope_size;
3109
3110            // Zero reserved fields.
3111            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3112
3113            // Safety:
3114            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3115            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3116            //   envelope_size bytes, there is always sufficient room.
3117            fidl::encoding::encode_in_envelope_optional::<i64, D>(
3118                self.uptime.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
3119                encoder,
3120                offset + cur_offset,
3121                depth,
3122            )?;
3123
3124            _prev_end_offset = cur_offset + envelope_size;
3125            if 4 > max_ordinal {
3126                return Ok(());
3127            }
3128
3129            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3130            // are envelope_size bytes.
3131            let cur_offset: usize = (4 - 1) * envelope_size;
3132
3133            // Zero reserved fields.
3134            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3135
3136            // Safety:
3137            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3138            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3139            //   envelope_size bytes, there is always sufficient room.
3140            fidl::encoding::encode_in_envelope_optional::<bool, D>(
3141                self.planned.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3142                encoder,
3143                offset + cur_offset,
3144                depth,
3145            )?;
3146
3147            _prev_end_offset = cur_offset + envelope_size;
3148            if 5 > max_ordinal {
3149                return Ok(());
3150            }
3151
3152            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3153            // are envelope_size bytes.
3154            let cur_offset: usize = (5 - 1) * envelope_size;
3155
3156            // Zero reserved fields.
3157            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3158
3159            // Safety:
3160            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3161            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3162            //   envelope_size bytes, there is always sufficient room.
3163            fidl::encoding::encode_in_envelope_optional::<i64, D>(
3164                self.runtime.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
3165                encoder,
3166                offset + cur_offset,
3167                depth,
3168            )?;
3169
3170            _prev_end_offset = cur_offset + envelope_size;
3171            if 6 > max_ordinal {
3172                return Ok(());
3173            }
3174
3175            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3176            // are envelope_size bytes.
3177            let cur_offset: usize = (6 - 1) * envelope_size;
3178
3179            // Zero reserved fields.
3180            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3181
3182            // Safety:
3183            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3184            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3185            //   envelope_size bytes, there is always sufficient room.
3186            fidl::encoding::encode_in_envelope_optional::<ShutdownAction, D>(
3187                self.action
3188                    .as_ref()
3189                    .map(<ShutdownAction as fidl::encoding::ValueTypeMarker>::borrow),
3190                encoder,
3191                offset + cur_offset,
3192                depth,
3193            )?;
3194
3195            _prev_end_offset = cur_offset + envelope_size;
3196
3197            Ok(())
3198        }
3199    }
3200
3201    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LastReboot {
3202        #[inline(always)]
3203        fn new_empty() -> Self {
3204            Self::default()
3205        }
3206
3207        unsafe fn decode(
3208            &mut self,
3209            decoder: &mut fidl::encoding::Decoder<'_, D>,
3210            offset: usize,
3211            mut depth: fidl::encoding::Depth,
3212        ) -> fidl::Result<()> {
3213            decoder.debug_check_bounds::<Self>(offset);
3214            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3215                None => return Err(fidl::Error::NotNullable),
3216                Some(len) => len,
3217            };
3218            // Calling decoder.out_of_line_offset(0) is not allowed.
3219            if len == 0 {
3220                return Ok(());
3221            };
3222            depth.increment()?;
3223            let envelope_size = 8;
3224            let bytes_len = len * envelope_size;
3225            let offset = decoder.out_of_line_offset(bytes_len)?;
3226            // Decode the envelope for each type.
3227            let mut _next_ordinal_to_read = 0;
3228            let mut next_offset = offset;
3229            let end_offset = offset + bytes_len;
3230            _next_ordinal_to_read += 1;
3231            if next_offset >= end_offset {
3232                return Ok(());
3233            }
3234
3235            // Decode unknown envelopes for gaps in ordinals.
3236            while _next_ordinal_to_read < 1 {
3237                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3238                _next_ordinal_to_read += 1;
3239                next_offset += envelope_size;
3240            }
3241
3242            let next_out_of_line = decoder.next_out_of_line();
3243            let handles_before = decoder.remaining_handles();
3244            if let Some((inlined, num_bytes, num_handles)) =
3245                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3246            {
3247                let member_inline_size =
3248                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3249                if inlined != (member_inline_size <= 4) {
3250                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3251                }
3252                let inner_offset;
3253                let mut inner_depth = depth.clone();
3254                if inlined {
3255                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3256                    inner_offset = next_offset;
3257                } else {
3258                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3259                    inner_depth.increment()?;
3260                }
3261                let val_ref = self.graceful.get_or_insert_with(|| fidl::new_empty!(bool, D));
3262                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3263                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3264                {
3265                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3266                }
3267                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3268                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3269                }
3270            }
3271
3272            next_offset += envelope_size;
3273            _next_ordinal_to_read += 1;
3274            if next_offset >= end_offset {
3275                return Ok(());
3276            }
3277
3278            // Decode unknown envelopes for gaps in ordinals.
3279            while _next_ordinal_to_read < 2 {
3280                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3281                _next_ordinal_to_read += 1;
3282                next_offset += envelope_size;
3283            }
3284
3285            let next_out_of_line = decoder.next_out_of_line();
3286            let handles_before = decoder.remaining_handles();
3287            if let Some((inlined, num_bytes, num_handles)) =
3288                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3289            {
3290                let member_inline_size =
3291                    <RebootReason as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3292                if inlined != (member_inline_size <= 4) {
3293                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3294                }
3295                let inner_offset;
3296                let mut inner_depth = depth.clone();
3297                if inlined {
3298                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3299                    inner_offset = next_offset;
3300                } else {
3301                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3302                    inner_depth.increment()?;
3303                }
3304                let val_ref = self.reason.get_or_insert_with(|| fidl::new_empty!(RebootReason, D));
3305                fidl::decode!(RebootReason, D, val_ref, decoder, inner_offset, inner_depth)?;
3306                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3307                {
3308                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3309                }
3310                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3311                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3312                }
3313            }
3314
3315            next_offset += envelope_size;
3316            _next_ordinal_to_read += 1;
3317            if next_offset >= end_offset {
3318                return Ok(());
3319            }
3320
3321            // Decode unknown envelopes for gaps in ordinals.
3322            while _next_ordinal_to_read < 3 {
3323                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3324                _next_ordinal_to_read += 1;
3325                next_offset += envelope_size;
3326            }
3327
3328            let next_out_of_line = decoder.next_out_of_line();
3329            let handles_before = decoder.remaining_handles();
3330            if let Some((inlined, num_bytes, num_handles)) =
3331                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3332            {
3333                let member_inline_size =
3334                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3335                if inlined != (member_inline_size <= 4) {
3336                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3337                }
3338                let inner_offset;
3339                let mut inner_depth = depth.clone();
3340                if inlined {
3341                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3342                    inner_offset = next_offset;
3343                } else {
3344                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3345                    inner_depth.increment()?;
3346                }
3347                let val_ref = self.uptime.get_or_insert_with(|| fidl::new_empty!(i64, D));
3348                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
3349                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3350                {
3351                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3352                }
3353                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3354                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3355                }
3356            }
3357
3358            next_offset += envelope_size;
3359            _next_ordinal_to_read += 1;
3360            if next_offset >= end_offset {
3361                return Ok(());
3362            }
3363
3364            // Decode unknown envelopes for gaps in ordinals.
3365            while _next_ordinal_to_read < 4 {
3366                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3367                _next_ordinal_to_read += 1;
3368                next_offset += envelope_size;
3369            }
3370
3371            let next_out_of_line = decoder.next_out_of_line();
3372            let handles_before = decoder.remaining_handles();
3373            if let Some((inlined, num_bytes, num_handles)) =
3374                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3375            {
3376                let member_inline_size =
3377                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3378                if inlined != (member_inline_size <= 4) {
3379                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3380                }
3381                let inner_offset;
3382                let mut inner_depth = depth.clone();
3383                if inlined {
3384                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3385                    inner_offset = next_offset;
3386                } else {
3387                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3388                    inner_depth.increment()?;
3389                }
3390                let val_ref = self.planned.get_or_insert_with(|| fidl::new_empty!(bool, D));
3391                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3392                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3393                {
3394                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3395                }
3396                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3397                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3398                }
3399            }
3400
3401            next_offset += envelope_size;
3402            _next_ordinal_to_read += 1;
3403            if next_offset >= end_offset {
3404                return Ok(());
3405            }
3406
3407            // Decode unknown envelopes for gaps in ordinals.
3408            while _next_ordinal_to_read < 5 {
3409                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3410                _next_ordinal_to_read += 1;
3411                next_offset += envelope_size;
3412            }
3413
3414            let next_out_of_line = decoder.next_out_of_line();
3415            let handles_before = decoder.remaining_handles();
3416            if let Some((inlined, num_bytes, num_handles)) =
3417                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3418            {
3419                let member_inline_size =
3420                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3421                if inlined != (member_inline_size <= 4) {
3422                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3423                }
3424                let inner_offset;
3425                let mut inner_depth = depth.clone();
3426                if inlined {
3427                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3428                    inner_offset = next_offset;
3429                } else {
3430                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3431                    inner_depth.increment()?;
3432                }
3433                let val_ref = self.runtime.get_or_insert_with(|| fidl::new_empty!(i64, D));
3434                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
3435                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3436                {
3437                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3438                }
3439                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3440                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3441                }
3442            }
3443
3444            next_offset += envelope_size;
3445            _next_ordinal_to_read += 1;
3446            if next_offset >= end_offset {
3447                return Ok(());
3448            }
3449
3450            // Decode unknown envelopes for gaps in ordinals.
3451            while _next_ordinal_to_read < 6 {
3452                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3453                _next_ordinal_to_read += 1;
3454                next_offset += envelope_size;
3455            }
3456
3457            let next_out_of_line = decoder.next_out_of_line();
3458            let handles_before = decoder.remaining_handles();
3459            if let Some((inlined, num_bytes, num_handles)) =
3460                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3461            {
3462                let member_inline_size =
3463                    <ShutdownAction as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3464                if inlined != (member_inline_size <= 4) {
3465                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3466                }
3467                let inner_offset;
3468                let mut inner_depth = depth.clone();
3469                if inlined {
3470                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3471                    inner_offset = next_offset;
3472                } else {
3473                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3474                    inner_depth.increment()?;
3475                }
3476                let val_ref =
3477                    self.action.get_or_insert_with(|| fidl::new_empty!(ShutdownAction, D));
3478                fidl::decode!(ShutdownAction, D, val_ref, decoder, inner_offset, inner_depth)?;
3479                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3480                {
3481                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3482                }
3483                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3484                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3485                }
3486            }
3487
3488            next_offset += envelope_size;
3489
3490            // Decode the remaining unknown envelopes.
3491            while next_offset < end_offset {
3492                _next_ordinal_to_read += 1;
3493                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3494                next_offset += envelope_size;
3495            }
3496
3497            Ok(())
3498        }
3499    }
3500}