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