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