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