fidl_fuchsia_net_dhcp__common/
fidl_fuchsia_net_dhcp__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/// A DHCP option field of IP addresses.
12///
13/// Per https://tools.ietf.org/html/rfc2132#section-2:
14///
15///   All other options are variable-length with a length octet following the tag octet.
16///
17/// The maximum length is given by 0xFF/sizeof([`fuchsia.net.Ipv4Address`]).
18pub type Addresses = Vec<fidl_fuchsia_net__common::Ipv4Address>;
19
20/// A DHCP option field of ASCII characters.
21///
22/// Per https://tools.ietf.org/html/rfc2132#section-2:
23///
24///   All other options are variable-length with a length octet following the tag octet.
25///
26/// Valid iff it consists of characters from the ASCII character set.
27pub type AsciiString = String;
28
29/// A DHCP duration value, in seconds. As specified in
30/// https://tools.ietf.org/html/rfc2131#section-3.3, DHCP duration values are
31/// relative times.
32pub type Duration = u32;
33
34/// The maximum possible number of DNS servers that can be included in an
35/// acquired DHCP configuration.
36///
37/// According to [RFC 2132 section
38/// 3.8](https://www.rfc-editor.org/rfc/rfc2132#section-3.8), the length of the
39/// DNS server list in bytes is represented in the protocol by an 8-bit unsigned
40/// integer:
41/// "[variable-length options have] a length octet following the tag octet. The
42/// value of the length octet does not include the two octets specifying the tag
43/// and length."
44/// 2^8 = 256, which divided by 4 bytes gives us 64 as an upper bound on the
45/// maximum possible number of DNS servers that can be included in an acquired
46/// DHCP configuration.
47pub const MAX_DNS_SERVERS: u8 = 64;
48
49/// The maximum possible number of routers that can be included in an acquired
50/// DHCP configuration.
51///
52/// According to [RFC 2132 section
53/// 3.5](https://www.rfc-editor.org/rfc/rfc2132#section-3.5), the length of the
54/// routers list in bytes is represented in the protocol by an 8-bit unsigned
55/// integer:
56/// "[variable-length options have] a length octet following the tag octet. The
57/// value of the length octet does not include the two octets specifying the
58/// tag and length."
59/// 2^8 = 256, which divided by 4 bytes gives us 64 as an upper bound on the
60/// maximum possible number of routers that can be included in an acquired
61/// DHCP configuration.
62pub const MAX_ROUTERS: u8 = 64;
63
64bitflags! {
65    /// A NetBIOS over TCP/IP node type as defined in RFC 1001/1002. This bitflag is for use with the
66    /// NetBiosOverTcpipNodeType option.
67    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
68    pub struct NodeTypes: u8 {
69        /// A B node type.
70        const B_NODE = 1;
71        /// A P node type.
72        const P_NODE = 2;
73        /// A M node type.
74        const M_NODE = 4;
75        /// A H node type.
76        const H_NODE = 8;
77    }
78}
79
80impl NodeTypes {}
81
82#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
83#[repr(u32)]
84pub enum ClientExitReason {
85    /// A client already exists on the interface.
86    ClientAlreadyExistsOnInterface = 1,
87    /// More than one concurrent call to `WatchConfiguration` was made.
88    WatchConfigurationAlreadyPending = 2,
89    /// The interface identified is invalid for acquiring configuration.
90    InvalidInterface = 3,
91    /// Invalid `NewClientParams` were provided.
92    InvalidParams = 4,
93    /// The network was, or became, unreachable over the interface
94    /// provided to the DHCP client.
95    NetworkUnreachable = 5,
96    /// The client was unable to open a socket.
97    UnableToOpenSocket = 6,
98    /// Graceful shutdown was performed.
99    GracefulShutdown = 7,
100    /// An address acquired by this client was removed by a user.
101    AddressRemovedByUser = 8,
102    /// The `AddressStateProvider` for an address acquired by this
103    /// client exited with an error (or without providing a reason for
104    /// the address removal).
105    AddressStateProviderError = 9,
106}
107
108impl ClientExitReason {
109    #[inline]
110    pub fn from_primitive(prim: u32) -> Option<Self> {
111        match prim {
112            1 => Some(Self::ClientAlreadyExistsOnInterface),
113            2 => Some(Self::WatchConfigurationAlreadyPending),
114            3 => Some(Self::InvalidInterface),
115            4 => Some(Self::InvalidParams),
116            5 => Some(Self::NetworkUnreachable),
117            6 => Some(Self::UnableToOpenSocket),
118            7 => Some(Self::GracefulShutdown),
119            8 => Some(Self::AddressRemovedByUser),
120            9 => Some(Self::AddressStateProviderError),
121            _ => None,
122        }
123    }
124
125    #[inline]
126    pub const fn into_primitive(self) -> u32 {
127        self as u32
128    }
129}
130
131/// The type of DHCP message. The DHCP protocol requires that all messages identify
132/// their type by including the MessageType option. These values are specified
133/// in https://tools.ietf.org/html/rfc2132#section-9.6.
134#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
135#[repr(u8)]
136pub enum MessageType {
137    /// A DHCP Discover message.
138    Dhcpdiscover = 1,
139    /// A DHCP Offer message.
140    Dhcpoffer = 2,
141    /// A DHCP Request message.
142    Dhcprequest = 3,
143    /// A DHCP Decline message.
144    Dhcpdecline = 4,
145    /// A DHCP Ack message.
146    Dhcpack = 5,
147    /// A DHCP Nak message;
148    Dhcpnak = 6,
149    /// A DHCP Release message;
150    Dhcprelease = 7,
151    /// A DHCP Inform message.
152    Dhcpinform = 8,
153}
154
155impl MessageType {
156    #[inline]
157    pub fn from_primitive(prim: u8) -> Option<Self> {
158        match prim {
159            1 => Some(Self::Dhcpdiscover),
160            2 => Some(Self::Dhcpoffer),
161            3 => Some(Self::Dhcprequest),
162            4 => Some(Self::Dhcpdecline),
163            5 => Some(Self::Dhcpack),
164            6 => Some(Self::Dhcpnak),
165            7 => Some(Self::Dhcprelease),
166            8 => Some(Self::Dhcpinform),
167            _ => None,
168        }
169    }
170
171    #[inline]
172    pub const fn into_primitive(self) -> u8 {
173        self as u8
174    }
175}
176
177/// The code of a DHCP option to be retrieved by Server.GetOption(). The code
178/// values are from https://tools.ietf.org/html/rfc2132 and the enum variants
179/// have been listed in the order they are presented in the RFC.
180#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
181#[repr(u32)]
182pub enum OptionCode {
183    SubnetMask = 1,
184    TimeOffset = 2,
185    Router = 3,
186    TimeServer = 4,
187    NameServer = 5,
188    DomainNameServer = 6,
189    LogServer = 7,
190    CookieServer = 8,
191    LprServer = 9,
192    ImpressServer = 10,
193    ResourceLocationServer = 11,
194    HostName = 12,
195    BootFileSize = 13,
196    MeritDumpFile = 14,
197    DomainName = 15,
198    SwapServer = 16,
199    RootPath = 17,
200    ExtensionsPath = 18,
201    IpForwarding = 19,
202    NonLocalSourceRouting = 20,
203    PolicyFilter = 21,
204    MaxDatagramReassemblySize = 22,
205    DefaultIpTtl = 23,
206    PathMtuAgingTimeout = 24,
207    PathMtuPlateauTable = 25,
208    InterfaceMtu = 26,
209    AllSubnetsLocal = 27,
210    BroadcastAddress = 28,
211    PerformMaskDiscovery = 29,
212    MaskSupplier = 30,
213    PerformRouterDiscovery = 31,
214    RouterSolicitationAddress = 32,
215    StaticRoute = 33,
216    TrailerEncapsulation = 34,
217    ArpCacheTimeout = 35,
218    EthernetEncapsulation = 36,
219    TcpDefaultTtl = 37,
220    TcpKeepaliveInterval = 38,
221    TcpKeepaliveGarbage = 39,
222    NetworkInformationServiceDomain = 40,
223    NetworkInformationServers = 41,
224    NetworkTimeProtocolServers = 42,
225    VendorSpecificInformation = 43,
226    NetbiosOverTcpipNameServer = 44,
227    NetbiosOverTcpipDatagramDistributionServer = 45,
228    NetbiosOverTcpipNodeType = 46,
229    NetbiosOverTcpipScope = 47,
230    XWindowSystemFontServer = 48,
231    XWindowSystemDisplayManager = 49,
232    NetworkInformationServicePlusDomain = 64,
233    NetworkInformationServicePlusServers = 65,
234    MobileIpHomeAgent = 68,
235    SmtpServer = 69,
236    Pop3Server = 70,
237    NntpServer = 71,
238    DefaultWwwServer = 72,
239    DefaultFingerServer = 73,
240    DefaultIrcServer = 74,
241    StreettalkServer = 75,
242    StreettalkDirectoryAssistanceServer = 76,
243    OptionOverload = 52,
244    TftpServerName = 66,
245    BootfileName = 67,
246    MaxDhcpMessageSize = 57,
247    RenewalTimeValue = 58,
248    RebindingTimeValue = 59,
249}
250
251impl OptionCode {
252    #[inline]
253    pub fn from_primitive(prim: u32) -> Option<Self> {
254        match prim {
255            1 => Some(Self::SubnetMask),
256            2 => Some(Self::TimeOffset),
257            3 => Some(Self::Router),
258            4 => Some(Self::TimeServer),
259            5 => Some(Self::NameServer),
260            6 => Some(Self::DomainNameServer),
261            7 => Some(Self::LogServer),
262            8 => Some(Self::CookieServer),
263            9 => Some(Self::LprServer),
264            10 => Some(Self::ImpressServer),
265            11 => Some(Self::ResourceLocationServer),
266            12 => Some(Self::HostName),
267            13 => Some(Self::BootFileSize),
268            14 => Some(Self::MeritDumpFile),
269            15 => Some(Self::DomainName),
270            16 => Some(Self::SwapServer),
271            17 => Some(Self::RootPath),
272            18 => Some(Self::ExtensionsPath),
273            19 => Some(Self::IpForwarding),
274            20 => Some(Self::NonLocalSourceRouting),
275            21 => Some(Self::PolicyFilter),
276            22 => Some(Self::MaxDatagramReassemblySize),
277            23 => Some(Self::DefaultIpTtl),
278            24 => Some(Self::PathMtuAgingTimeout),
279            25 => Some(Self::PathMtuPlateauTable),
280            26 => Some(Self::InterfaceMtu),
281            27 => Some(Self::AllSubnetsLocal),
282            28 => Some(Self::BroadcastAddress),
283            29 => Some(Self::PerformMaskDiscovery),
284            30 => Some(Self::MaskSupplier),
285            31 => Some(Self::PerformRouterDiscovery),
286            32 => Some(Self::RouterSolicitationAddress),
287            33 => Some(Self::StaticRoute),
288            34 => Some(Self::TrailerEncapsulation),
289            35 => Some(Self::ArpCacheTimeout),
290            36 => Some(Self::EthernetEncapsulation),
291            37 => Some(Self::TcpDefaultTtl),
292            38 => Some(Self::TcpKeepaliveInterval),
293            39 => Some(Self::TcpKeepaliveGarbage),
294            40 => Some(Self::NetworkInformationServiceDomain),
295            41 => Some(Self::NetworkInformationServers),
296            42 => Some(Self::NetworkTimeProtocolServers),
297            43 => Some(Self::VendorSpecificInformation),
298            44 => Some(Self::NetbiosOverTcpipNameServer),
299            45 => Some(Self::NetbiosOverTcpipDatagramDistributionServer),
300            46 => Some(Self::NetbiosOverTcpipNodeType),
301            47 => Some(Self::NetbiosOverTcpipScope),
302            48 => Some(Self::XWindowSystemFontServer),
303            49 => Some(Self::XWindowSystemDisplayManager),
304            64 => Some(Self::NetworkInformationServicePlusDomain),
305            65 => Some(Self::NetworkInformationServicePlusServers),
306            68 => Some(Self::MobileIpHomeAgent),
307            69 => Some(Self::SmtpServer),
308            70 => Some(Self::Pop3Server),
309            71 => Some(Self::NntpServer),
310            72 => Some(Self::DefaultWwwServer),
311            73 => Some(Self::DefaultFingerServer),
312            74 => Some(Self::DefaultIrcServer),
313            75 => Some(Self::StreettalkServer),
314            76 => Some(Self::StreettalkDirectoryAssistanceServer),
315            52 => Some(Self::OptionOverload),
316            66 => Some(Self::TftpServerName),
317            67 => Some(Self::BootfileName),
318            57 => Some(Self::MaxDhcpMessageSize),
319            58 => Some(Self::RenewalTimeValue),
320            59 => Some(Self::RebindingTimeValue),
321            _ => None,
322        }
323    }
324
325    #[inline]
326    pub const fn into_primitive(self) -> u32 {
327        self as u32
328    }
329}
330
331/// A indication of which DHCP message field should be used to store additional options.
332#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
333#[repr(u8)]
334pub enum OptionOverloadValue {
335    /// The file DHCP field.
336    File = 1,
337    /// The sname DHCP field.
338    Sname = 2,
339    /// Both file and sname DHCP fields.
340    Both = 3,
341}
342
343impl OptionOverloadValue {
344    #[inline]
345    pub fn from_primitive(prim: u8) -> Option<Self> {
346        match prim {
347            1 => Some(Self::File),
348            2 => Some(Self::Sname),
349            3 => Some(Self::Both),
350            _ => None,
351        }
352    }
353
354    #[inline]
355    pub const fn into_primitive(self) -> u8 {
356        self as u8
357    }
358}
359
360/// The name of the Parameter to be retrieved by Server.GetParameter().
361#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
362#[repr(u32)]
363pub enum ParameterName {
364    IpAddrs = 0,
365    AddressPool = 1,
366    LeaseLength = 2,
367    PermittedMacs = 3,
368    StaticallyAssignedAddrs = 4,
369    ArpProbe = 5,
370    BoundDeviceNames = 6,
371}
372
373impl ParameterName {
374    #[inline]
375    pub fn from_primitive(prim: u32) -> Option<Self> {
376        match prim {
377            0 => Some(Self::IpAddrs),
378            1 => Some(Self::AddressPool),
379            2 => Some(Self::LeaseLength),
380            3 => Some(Self::PermittedMacs),
381            4 => Some(Self::StaticallyAssignedAddrs),
382            5 => Some(Self::ArpProbe),
383            6 => Some(Self::BoundDeviceNames),
384            _ => None,
385        }
386    }
387
388    #[inline]
389    pub const fn into_primitive(self) -> u32 {
390        self as u32
391    }
392}
393
394#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
395pub struct ClientOnExitRequest {
396    pub reason: ClientExitReason,
397}
398
399impl fidl::Persistable for ClientOnExitRequest {}
400
401#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
402pub struct ServerGetOptionRequest {
403    pub code: OptionCode,
404}
405
406impl fidl::Persistable for ServerGetOptionRequest {}
407
408#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
409pub struct ServerGetParameterRequest {
410    pub name: ParameterName,
411}
412
413impl fidl::Persistable for ServerGetParameterRequest {}
414
415#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
416pub struct ServerIsServingResponse {
417    pub enabled: bool,
418}
419
420impl fidl::Persistable for ServerIsServingResponse {}
421
422#[derive(Clone, Debug, PartialEq)]
423pub struct ServerSetOptionRequest {
424    pub value: Option_,
425}
426
427impl fidl::Persistable for ServerSetOptionRequest {}
428
429#[derive(Clone, Debug, PartialEq)]
430pub struct ServerSetParameterRequest {
431    pub value: Parameter,
432}
433
434impl fidl::Persistable for ServerSetParameterRequest {}
435
436#[derive(Clone, Debug, PartialEq)]
437pub struct ServerGetOptionResponse {
438    pub value: Option_,
439}
440
441impl fidl::Persistable for ServerGetOptionResponse {}
442
443#[derive(Clone, Debug, PartialEq)]
444pub struct ServerGetParameterResponse {
445    pub value: Parameter,
446}
447
448impl fidl::Persistable for ServerGetParameterResponse {}
449
450#[derive(Clone, Debug, PartialEq)]
451pub struct ServerListOptionsResponse {
452    pub options: Vec<Option_>,
453}
454
455impl fidl::Persistable for ServerListOptionsResponse {}
456
457#[derive(Clone, Debug, PartialEq)]
458pub struct ServerListParametersResponse {
459    pub parameters: Vec<Parameter>,
460}
461
462impl fidl::Persistable for ServerListParametersResponse {}
463
464#[derive(Clone, Debug, Default, PartialEq)]
465pub struct AddressPool {
466    /// The prefix length (in bits) of the address pool's subnet mask.
467    pub prefix_length: Option<u8>,
468    /// The starting address, inclusive, of the range of addresses which the
469    /// DHCP server will lease to clients.
470    pub range_start: Option<fidl_fuchsia_net__common::Ipv4Address>,
471    /// The ending address, exclusive, of the range of addresses which the
472    /// server will lease to clients.
473    pub range_stop: Option<fidl_fuchsia_net__common::Ipv4Address>,
474    #[doc(hidden)]
475    pub __source_breaking: fidl::marker::SourceBreaking,
476}
477
478impl fidl::Persistable for AddressPool {}
479
480/// Describes the configuration information the DHCP client requests from DHCP
481/// servers.
482#[derive(Clone, Debug, Default, PartialEq)]
483pub struct ConfigurationToRequest {
484    /// Request a list of IP addresses for routers on the client's subnet,
485    /// in order of preference.
486    /// See [RFC 2132 section 3.5](https://www.rfc-editor.org/rfc/rfc2132#section-3.5).
487    ///
488    /// If not set, interpreted as false.
489    pub routers: Option<bool>,
490    /// Request a list of available DNS servers.
491    /// See [RFC 2132 section 3.8](https://www.rfc-editor.org/rfc/rfc2132#section-3.8).
492    ///
493    /// If not set, interpreted as false.
494    pub dns_servers: Option<bool>,
495    #[doc(hidden)]
496    pub __source_breaking: fidl::marker::SourceBreaking,
497}
498
499impl fidl::Persistable for ConfigurationToRequest {}
500
501#[derive(Clone, Debug, Default, PartialEq)]
502pub struct LeaseLength {
503    /// The default lease length to be issued to clients. This field must
504    /// have a value.
505    pub default: Option<u32>,
506    /// The maximum lease length value which the server will issue to
507    /// clients who have requested a specific lease length. If omitted, the
508    /// max lease length is equivalent to the default lease length.
509    pub max: Option<u32>,
510    #[doc(hidden)]
511    pub __source_breaking: fidl::marker::SourceBreaking,
512}
513
514impl fidl::Persistable for LeaseLength {}
515
516#[derive(Clone, Debug, Default, PartialEq)]
517pub struct NewClientParams {
518    /// Parameters for describing the configuration information the DHCP
519    /// client requests from DHCP servers.
520    ///
521    /// If not set, interpreted as empty (no configuration information
522    /// is requested).
523    pub configuration_to_request: Option<ConfigurationToRequest>,
524    /// Whether the client negotiates an IP address.
525    ///
526    /// If false or not set, the client asks only for local
527    /// configuration parameters.
528    /// See [RFC 2131 section 3.4](https://www.rfc-editor.org/rfc/rfc2131#section-3.4).
529    pub request_ip_address: Option<bool>,
530    #[doc(hidden)]
531    pub __source_breaking: fidl::marker::SourceBreaking,
532}
533
534impl fidl::Persistable for NewClientParams {}
535
536#[derive(Clone, Debug, Default, PartialEq)]
537pub struct StaticAssignment {
538    /// The MAC address of the host or device which will have the static IP
539    /// address assignment.
540    pub host: Option<fidl_fuchsia_net__common::MacAddress>,
541    /// The IP address which the host or device will always be assigned the
542    /// server.
543    pub assigned_addr: Option<fidl_fuchsia_net__common::Ipv4Address>,
544    #[doc(hidden)]
545    pub __source_breaking: fidl::marker::SourceBreaking,
546}
547
548impl fidl::Persistable for StaticAssignment {}
549
550/// A generic representation of client configuration parameters and DHCP settings. Options are the
551/// mechanism by which the DHCP protocol communicates configuration parameters from a repository on
552/// a DHCP server to DHCP clients, or by which DHCP clients and servers communicate data relevant to
553/// a DHCP transaction.
554/// All DHCP option values must have a length which can fit within a single byte, i.e. less than 256.
555/// Options for which there is no reasonable administrator-configurable value have been omitted
556/// from this xunion. The omitted options are:
557/// * Pad - never has a value
558/// * End - never has a value
559/// * RequestedIpAddress - value always selected by the DHCP client.
560/// * DhcpMessageType - value always determined by state of transaction between DHCP client and server.
561/// * ServerIdentifier - value always determined by address to which the server is bound.
562/// * ParameterRequestList - value always selected by the DHCP client.
563/// * Message - value determined in response to runtime error.
564/// * VendorClassIdentifer - value always selected by the DHCP client.
565/// * ClientIdentifier - value always selected by the DHCP client.
566#[derive(Clone, Debug)]
567pub enum Option_ {
568    /// A 32-bit IPv4 subnet mask.
569    SubnetMask(fidl_fuchsia_net__common::Ipv4Address),
570    /// The client's offset from UTC in seconds. A positive offset is east of the zero meridian, and
571    /// a negative offset is west of the zero meridian.
572    TimeOffset(i32),
573    /// A list of the routers in a client's subnet, listed in order of preference.
574    Router(Vec<fidl_fuchsia_net__common::Ipv4Address>),
575    /// A list of time servers available to the client, in order of preference.
576    TimeServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
577    /// A list of IEN 116 Name servers available to the client, in order of preference.
578    NameServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
579    /// A list of Domain Name System servers available to the client, in order of preference;
580    DomainNameServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
581    /// A list of MIT-LCS UDP Log servers available to the client, in order of preference.
582    LogServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
583    /// A list of RFC 865 Cookie servers available to the client, in order of preference.
584    CookieServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
585    /// A list of RFC 1179 Line Printer servers available to the client, in order of preference.
586    LprServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
587    /// A list of Imagen Impress servers available to the client, in order of preference.
588    ImpressServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
589    /// A list of RFC 887 Resource Location servers available to the client, in order of preference.
590    ResourceLocationServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
591    /// The host name of the client, which may or may not be qualified with the local domain name.
592    HostName(String),
593    /// The size of the client's default boot image in 512-octet blocks.
594    BootFileSize(u16),
595    /// The path name to the client's core dump in the event the client crashes.
596    MeritDumpFile(String),
597    /// The client's domain name for use in resolving hostnames in the DNS.
598    DomainName(String),
599    /// The address of the client's swap server.
600    SwapServer(fidl_fuchsia_net__common::Ipv4Address),
601    /// The path name to the client's root disk.
602    RootPath(String),
603    /// The path name to a TFTP-retrievable file. This file contains data which can be interpreted
604    /// as the BOOTP vendor-extension field. Unlike the BOOTP vendor-extension field, this file has
605    /// an unconstrained length and any references to Tag 18 are ignored.
606    ExtensionsPath(String),
607    /// A flag which will enabled IP layer packet forwarding when true.
608    IpForwarding(bool),
609    /// A flag which will enable forwarding of IP packets with non-local source routes.
610    NonLocalSourceRouting(bool),
611    /// Policy filters for non-local source routing.
612    /// A list of IP Address and Subnet Mask pairs. If an incoming source-routed packet has a
613    /// next-hop that does not match one of these pairs, then the packet will be dropped.
614    PolicyFilter(Vec<fidl_fuchsia_net__common::Ipv4Address>),
615    /// The maximum sized datagram that the client should be able to reassemble, in octets. The
616    /// minimum legal value is 576.
617    MaxDatagramReassemblySize(u16),
618    /// The default time-to-live to use on outgoing IP datagrams. The value must be between 1 and
619    /// 255.
620    DefaultIpTtl(u8),
621    /// The timeout to be used when aging Path MTU values by the mechanism in RFC 1191.
622    PathMtuAgingTimeout(u32),
623    /// Table of MTU sizes for Path MTU Discovery.
624    /// A list of MTU sizes, ordered from smallest to largest. The smallest value cannot be smaller
625    /// than 68.
626    PathMtuPlateauTable(Vec<u16>),
627    /// The MTU for the client's interface. Minimum value of 68.
628    InterfaceMtu(u16),
629    /// A flag indicating if all subents of the IP network to which the client is connected have the
630    /// same MTU.
631    AllSubnetsLocal(bool),
632    /// The broadcast address of the client's subnet. Legal values are defined in RFC 1122.
633    BroadcastAddress(fidl_fuchsia_net__common::Ipv4Address),
634    /// A flag indicating whether the client should perform subnet mask discovery via ICMP.
635    PerformMaskDiscovery(bool),
636    /// A flag indicating whether the client should respond to subnet mask discovery requests via
637    /// ICMP.
638    MaskSupplier(bool),
639    /// A flag indicating whether the client should solicit routers using Router Discovery as
640    /// defined in RFC 1256.
641    PerformRouterDiscovery(bool),
642    /// The address to which the client should transmit Router Solicitation requests.
643    RouterSolicitationAddress(fidl_fuchsia_net__common::Ipv4Address),
644    /// Static Routes which the host should put in its routing cache.
645    /// A list of Destination address/Next-hop address pairs defining static routes for the client's
646    /// routing table. The routes should be listed in descending order of priority. It is illegal
647    /// to use 0.0.0.0 as the destination in a static route.
648    StaticRoute(Vec<fidl_fuchsia_net__common::Ipv4Address>),
649    /// A flag specifying whether the client negotiate the use of trailers when using ARP, per RFC
650    /// 893.
651    TrailerEncapsulation(bool),
652    /// The timeout for ARP cache entries.
653    ArpCacheTimeout(u32),
654    /// A flag specifying that the client should use Ethernet v2 encapsulation when false, and IEEE
655    /// 802.3 encapsulation when true.
656    EthernetEncapsulation(bool),
657    /// The default time-to-live that the client should use for outgoing TCP segments. The minimum
658    /// value is 1.
659    TcpDefaultTtl(u8),
660    /// The interval the client should wait before sending a TCP keepalive message. A
661    /// value of 0 indicates that the client should not send keepalive messages unless specifically
662    /// requested by an application.
663    TcpKeepaliveInterval(u32),
664    /// A flag specifying whether the client should send TCP keepalive messages with an octet of
665    /// garbage for compatibility with older implementations.
666    TcpKeepaliveGarbage(bool),
667    /// The name of the client's Network Information Service domain.
668    NetworkInformationServiceDomain(String),
669    /// A list of Network Information Service server addresses available to the client, listed in
670    /// order of preference.
671    NetworkInformationServers(Vec<fidl_fuchsia_net__common::Ipv4Address>),
672    /// A list of Network Time Protocol (NTP) server addresses available to the client, listed in
673    /// order of preference.
674    NetworkTimeProtocolServers(Vec<fidl_fuchsia_net__common::Ipv4Address>),
675    /// An opaque object of octets for exchanging vendor-specific information.
676    VendorSpecificInformation(Vec<u8>),
677    /// A list of NetBIOS name server addresses available to the client, listed in order of
678    /// preference.
679    NetbiosOverTcpipNameServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
680    /// A list of NetBIOS datagram distribution servers available to the client, listed in order of
681    /// preference.
682    NetbiosOverTcpipDatagramDistributionServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
683    /// The NetBIOS node type which should be used by the client.
684    NetbiosOverTcpipNodeType(NodeTypes),
685    /// The NetBIOS over TCP/IP scope parameter, as defined in RFC 1001, for the client.
686    NetbiosOverTcpipScope(String),
687    /// A list of X Window System Font server addresses available to the client, listed in order of
688    /// preference.
689    XWindowSystemFontServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
690    /// A list of X Window System Display Manager system addresses available to the client, listed
691    /// in order of preference.
692    XWindowSystemDisplayManager(Vec<fidl_fuchsia_net__common::Ipv4Address>),
693    /// The name of the client's Network Information System+ domain.
694    NetworkInformationServicePlusDomain(String),
695    /// A list of Network Information System+ server addresses available to the client, listed in
696    /// order of preference.
697    NetworkInformationServicePlusServers(Vec<fidl_fuchsia_net__common::Ipv4Address>),
698    /// A list of mobile IP home agent addresses available to the client, listed in order of
699    /// preference.
700    MobileIpHomeAgent(Vec<fidl_fuchsia_net__common::Ipv4Address>),
701    /// A list of Simple Mail Transport Protocol (SMTP) server address available to the client,
702    /// listed in order of preference.
703    SmtpServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
704    /// A list of Post Office Protocol (POP3) server addresses available to the client, listed in
705    /// order of preference.
706    Pop3Server(Vec<fidl_fuchsia_net__common::Ipv4Address>),
707    /// A list Network News Transport Protocol (NNTP) server addresses available to the client,
708    /// listed in order of preference.
709    NntpServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
710    /// A list of default World Wide Web (WWW) server addresses available to the client, listed in
711    /// order of preference.
712    DefaultWwwServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
713    /// A list of default Finger server addresses available to the client, listed in order of
714    /// preference.
715    DefaultFingerServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
716    /// A list of Internet Relay Chat server addresses available to the client, listed in order of
717    /// preference.
718    DefaultIrcServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
719    /// A list of StreetTalk server addresses available to the client, listed in order of
720    /// preference.
721    StreettalkServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
722    /// A list of StreetTalk Directory Assistance server addresses available to the client, listed
723    /// in order of preference.
724    StreettalkDirectoryAssistanceServer(Vec<fidl_fuchsia_net__common::Ipv4Address>),
725    /// An option specifying whether the `sname`, `file`, or both fields have been overloaded to
726    /// carry DHCP options. If this option is present, the client interprets the additional fields
727    /// after it concludes interpreting standard option fields.
728    OptionOverload(OptionOverloadValue),
729    /// The TFTP server name available to the client. This option should be used when the `sname`
730    /// field has been overloaded to carry options.
731    TftpServerName(String),
732    /// The bootfile name for the client. This option should be used when the `file` field has been
733    /// overloaded to carry options.
734    BootfileName(String),
735    /// The maximum length in octets of a DHCP message that the participant is willing to accept.
736    /// The minimum value is 576.
737    MaxDhcpMessageSize(u16),
738    /// The time interval after address assignment at which the client will transition
739    /// to the Renewing state.
740    RenewalTimeValue(u32),
741    /// The time interval after address assignment at which the client will transition
742    /// to the Rebinding state.
743    RebindingTimeValue(u32),
744    #[doc(hidden)]
745    __SourceBreaking { unknown_ordinal: u64 },
746}
747
748/// Pattern that matches an unknown `Option_` member.
749#[macro_export]
750macro_rules! Option_Unknown {
751    () => {
752        _
753    };
754}
755
756// Custom PartialEq so that unknown variants are not equal to themselves.
757impl PartialEq for Option_ {
758    fn eq(&self, other: &Self) -> bool {
759        match (self, other) {
760            (Self::SubnetMask(x), Self::SubnetMask(y)) => *x == *y,
761            (Self::TimeOffset(x), Self::TimeOffset(y)) => *x == *y,
762            (Self::Router(x), Self::Router(y)) => *x == *y,
763            (Self::TimeServer(x), Self::TimeServer(y)) => *x == *y,
764            (Self::NameServer(x), Self::NameServer(y)) => *x == *y,
765            (Self::DomainNameServer(x), Self::DomainNameServer(y)) => *x == *y,
766            (Self::LogServer(x), Self::LogServer(y)) => *x == *y,
767            (Self::CookieServer(x), Self::CookieServer(y)) => *x == *y,
768            (Self::LprServer(x), Self::LprServer(y)) => *x == *y,
769            (Self::ImpressServer(x), Self::ImpressServer(y)) => *x == *y,
770            (Self::ResourceLocationServer(x), Self::ResourceLocationServer(y)) => *x == *y,
771            (Self::HostName(x), Self::HostName(y)) => *x == *y,
772            (Self::BootFileSize(x), Self::BootFileSize(y)) => *x == *y,
773            (Self::MeritDumpFile(x), Self::MeritDumpFile(y)) => *x == *y,
774            (Self::DomainName(x), Self::DomainName(y)) => *x == *y,
775            (Self::SwapServer(x), Self::SwapServer(y)) => *x == *y,
776            (Self::RootPath(x), Self::RootPath(y)) => *x == *y,
777            (Self::ExtensionsPath(x), Self::ExtensionsPath(y)) => *x == *y,
778            (Self::IpForwarding(x), Self::IpForwarding(y)) => *x == *y,
779            (Self::NonLocalSourceRouting(x), Self::NonLocalSourceRouting(y)) => *x == *y,
780            (Self::PolicyFilter(x), Self::PolicyFilter(y)) => *x == *y,
781            (Self::MaxDatagramReassemblySize(x), Self::MaxDatagramReassemblySize(y)) => *x == *y,
782            (Self::DefaultIpTtl(x), Self::DefaultIpTtl(y)) => *x == *y,
783            (Self::PathMtuAgingTimeout(x), Self::PathMtuAgingTimeout(y)) => *x == *y,
784            (Self::PathMtuPlateauTable(x), Self::PathMtuPlateauTable(y)) => *x == *y,
785            (Self::InterfaceMtu(x), Self::InterfaceMtu(y)) => *x == *y,
786            (Self::AllSubnetsLocal(x), Self::AllSubnetsLocal(y)) => *x == *y,
787            (Self::BroadcastAddress(x), Self::BroadcastAddress(y)) => *x == *y,
788            (Self::PerformMaskDiscovery(x), Self::PerformMaskDiscovery(y)) => *x == *y,
789            (Self::MaskSupplier(x), Self::MaskSupplier(y)) => *x == *y,
790            (Self::PerformRouterDiscovery(x), Self::PerformRouterDiscovery(y)) => *x == *y,
791            (Self::RouterSolicitationAddress(x), Self::RouterSolicitationAddress(y)) => *x == *y,
792            (Self::StaticRoute(x), Self::StaticRoute(y)) => *x == *y,
793            (Self::TrailerEncapsulation(x), Self::TrailerEncapsulation(y)) => *x == *y,
794            (Self::ArpCacheTimeout(x), Self::ArpCacheTimeout(y)) => *x == *y,
795            (Self::EthernetEncapsulation(x), Self::EthernetEncapsulation(y)) => *x == *y,
796            (Self::TcpDefaultTtl(x), Self::TcpDefaultTtl(y)) => *x == *y,
797            (Self::TcpKeepaliveInterval(x), Self::TcpKeepaliveInterval(y)) => *x == *y,
798            (Self::TcpKeepaliveGarbage(x), Self::TcpKeepaliveGarbage(y)) => *x == *y,
799            (
800                Self::NetworkInformationServiceDomain(x),
801                Self::NetworkInformationServiceDomain(y),
802            ) => *x == *y,
803            (Self::NetworkInformationServers(x), Self::NetworkInformationServers(y)) => *x == *y,
804            (Self::NetworkTimeProtocolServers(x), Self::NetworkTimeProtocolServers(y)) => *x == *y,
805            (Self::VendorSpecificInformation(x), Self::VendorSpecificInformation(y)) => *x == *y,
806            (Self::NetbiosOverTcpipNameServer(x), Self::NetbiosOverTcpipNameServer(y)) => *x == *y,
807            (
808                Self::NetbiosOverTcpipDatagramDistributionServer(x),
809                Self::NetbiosOverTcpipDatagramDistributionServer(y),
810            ) => *x == *y,
811            (Self::NetbiosOverTcpipNodeType(x), Self::NetbiosOverTcpipNodeType(y)) => *x == *y,
812            (Self::NetbiosOverTcpipScope(x), Self::NetbiosOverTcpipScope(y)) => *x == *y,
813            (Self::XWindowSystemFontServer(x), Self::XWindowSystemFontServer(y)) => *x == *y,
814            (Self::XWindowSystemDisplayManager(x), Self::XWindowSystemDisplayManager(y)) => {
815                *x == *y
816            }
817            (
818                Self::NetworkInformationServicePlusDomain(x),
819                Self::NetworkInformationServicePlusDomain(y),
820            ) => *x == *y,
821            (
822                Self::NetworkInformationServicePlusServers(x),
823                Self::NetworkInformationServicePlusServers(y),
824            ) => *x == *y,
825            (Self::MobileIpHomeAgent(x), Self::MobileIpHomeAgent(y)) => *x == *y,
826            (Self::SmtpServer(x), Self::SmtpServer(y)) => *x == *y,
827            (Self::Pop3Server(x), Self::Pop3Server(y)) => *x == *y,
828            (Self::NntpServer(x), Self::NntpServer(y)) => *x == *y,
829            (Self::DefaultWwwServer(x), Self::DefaultWwwServer(y)) => *x == *y,
830            (Self::DefaultFingerServer(x), Self::DefaultFingerServer(y)) => *x == *y,
831            (Self::DefaultIrcServer(x), Self::DefaultIrcServer(y)) => *x == *y,
832            (Self::StreettalkServer(x), Self::StreettalkServer(y)) => *x == *y,
833            (
834                Self::StreettalkDirectoryAssistanceServer(x),
835                Self::StreettalkDirectoryAssistanceServer(y),
836            ) => *x == *y,
837            (Self::OptionOverload(x), Self::OptionOverload(y)) => *x == *y,
838            (Self::TftpServerName(x), Self::TftpServerName(y)) => *x == *y,
839            (Self::BootfileName(x), Self::BootfileName(y)) => *x == *y,
840            (Self::MaxDhcpMessageSize(x), Self::MaxDhcpMessageSize(y)) => *x == *y,
841            (Self::RenewalTimeValue(x), Self::RenewalTimeValue(y)) => *x == *y,
842            (Self::RebindingTimeValue(x), Self::RebindingTimeValue(y)) => *x == *y,
843            _ => false,
844        }
845    }
846}
847
848impl Option_ {
849    #[inline]
850    pub fn ordinal(&self) -> u64 {
851        match *self {
852            Self::SubnetMask(_) => 1,
853            Self::TimeOffset(_) => 2,
854            Self::Router(_) => 3,
855            Self::TimeServer(_) => 4,
856            Self::NameServer(_) => 5,
857            Self::DomainNameServer(_) => 6,
858            Self::LogServer(_) => 7,
859            Self::CookieServer(_) => 8,
860            Self::LprServer(_) => 9,
861            Self::ImpressServer(_) => 10,
862            Self::ResourceLocationServer(_) => 11,
863            Self::HostName(_) => 12,
864            Self::BootFileSize(_) => 13,
865            Self::MeritDumpFile(_) => 14,
866            Self::DomainName(_) => 15,
867            Self::SwapServer(_) => 16,
868            Self::RootPath(_) => 17,
869            Self::ExtensionsPath(_) => 18,
870            Self::IpForwarding(_) => 19,
871            Self::NonLocalSourceRouting(_) => 20,
872            Self::PolicyFilter(_) => 21,
873            Self::MaxDatagramReassemblySize(_) => 22,
874            Self::DefaultIpTtl(_) => 23,
875            Self::PathMtuAgingTimeout(_) => 24,
876            Self::PathMtuPlateauTable(_) => 25,
877            Self::InterfaceMtu(_) => 26,
878            Self::AllSubnetsLocal(_) => 27,
879            Self::BroadcastAddress(_) => 28,
880            Self::PerformMaskDiscovery(_) => 29,
881            Self::MaskSupplier(_) => 30,
882            Self::PerformRouterDiscovery(_) => 31,
883            Self::RouterSolicitationAddress(_) => 32,
884            Self::StaticRoute(_) => 33,
885            Self::TrailerEncapsulation(_) => 34,
886            Self::ArpCacheTimeout(_) => 35,
887            Self::EthernetEncapsulation(_) => 36,
888            Self::TcpDefaultTtl(_) => 37,
889            Self::TcpKeepaliveInterval(_) => 38,
890            Self::TcpKeepaliveGarbage(_) => 39,
891            Self::NetworkInformationServiceDomain(_) => 40,
892            Self::NetworkInformationServers(_) => 41,
893            Self::NetworkTimeProtocolServers(_) => 42,
894            Self::VendorSpecificInformation(_) => 43,
895            Self::NetbiosOverTcpipNameServer(_) => 44,
896            Self::NetbiosOverTcpipDatagramDistributionServer(_) => 45,
897            Self::NetbiosOverTcpipNodeType(_) => 46,
898            Self::NetbiosOverTcpipScope(_) => 47,
899            Self::XWindowSystemFontServer(_) => 48,
900            Self::XWindowSystemDisplayManager(_) => 49,
901            Self::NetworkInformationServicePlusDomain(_) => 50,
902            Self::NetworkInformationServicePlusServers(_) => 51,
903            Self::MobileIpHomeAgent(_) => 52,
904            Self::SmtpServer(_) => 53,
905            Self::Pop3Server(_) => 54,
906            Self::NntpServer(_) => 55,
907            Self::DefaultWwwServer(_) => 56,
908            Self::DefaultFingerServer(_) => 57,
909            Self::DefaultIrcServer(_) => 58,
910            Self::StreettalkServer(_) => 59,
911            Self::StreettalkDirectoryAssistanceServer(_) => 60,
912            Self::OptionOverload(_) => 61,
913            Self::TftpServerName(_) => 62,
914            Self::BootfileName(_) => 63,
915            Self::MaxDhcpMessageSize(_) => 64,
916            Self::RenewalTimeValue(_) => 65,
917            Self::RebindingTimeValue(_) => 66,
918            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
919        }
920    }
921
922    #[inline]
923    pub fn unknown_variant_for_testing() -> Self {
924        Self::__SourceBreaking { unknown_ordinal: 0 }
925    }
926
927    #[inline]
928    pub fn is_unknown(&self) -> bool {
929        match self {
930            Self::__SourceBreaking { .. } => true,
931            _ => false,
932        }
933    }
934}
935
936impl fidl::Persistable for Option_ {}
937
938/// The configurable server parameters.
939#[derive(Clone, Debug)]
940pub enum Parameter {
941    /// The IP addresses to which the server is bound. The vector bound has been
942    /// arbitrarily selected as a generous upper limit.
943    IpAddrs(Vec<fidl_fuchsia_net__common::Ipv4Address>),
944    /// The pool of addresses managed by a DHCP server and from which leases are
945    /// supplied.
946    ///
947    /// The pool is valid iff all of the following are true:
948    ///   1) All fields are present.
949    ///   2) The stop address is larger than the start address.
950    ///   3) The prefix length is large enough to fit the full range of
951    ///      addresses.
952    ///
953    /// For example, a pool of 4 addresses with a 24 bit subnet mask could be
954    /// specified as:
955    ///   {
956    ///     prefix_length: 24,
957    ///     range_start: 192.168.1.2,
958    ///     range_stop: 192.168.1.5,
959    ///   }
960    ///
961    /// Changing the address pool will not cancel existing leases because the
962    /// DHCP protocol does not provide a mechanism for doing so. Administrators
963    /// should take care when changing the address pool for a server with active
964    /// leases.
965    AddressPool(AddressPool),
966    /// The duration of leases offered by the server.
967    Lease(LeaseLength),
968    /// The client MAC addresses which the server will issue leases to. By
969    /// default, the server will not have a permitted MAC list, in which case it
970    /// will attempt to issue a lease to every client which requests one. If
971    /// permitted_macs has a non-zero length then the server will only respond
972    /// to lease requests from clients with  MAC in the list. The vector bound
973    /// has been arbitrarily selected as a generous upper limit.
974    PermittedMacs(Vec<fidl_fuchsia_net__common::MacAddress>),
975    /// Addresses statically assigned to specific hosts or devices. Typically, a
976    /// network administrator will statically assign addresses to always-on
977    /// network devices which should always have the same IP address, such as
978    /// network printers. The vector bound has been arbitrarily selected as a
979    /// generous upper limit.
980    StaticallyAssignedAddrs(Vec<StaticAssignment>),
981    /// Enables server behavior where the server ARPs an IP address prior to
982    /// issuing it in a lease. If the server receives a response, the server
983    /// will mark the address as in-use and try again with a different address.
984    ArpProbe(bool),
985    /// The names of the interface to which the server will listen. If this
986    /// vector is empty, the server will listen on all interfaces and will
987    /// process incoming DHCP messages regardless of the interface on which they
988    /// arrive. If this vector is not empty, then the server will only listen
989    /// for incoming DHCP messages on the named interfaces contained by this
990    /// vector. The string and vectors bounds have been arbitrarily selected as
991    /// generous upper limits.
992    BoundDeviceNames(Vec<String>),
993    #[doc(hidden)]
994    __SourceBreaking { unknown_ordinal: u64 },
995}
996
997/// Pattern that matches an unknown `Parameter` member.
998#[macro_export]
999macro_rules! ParameterUnknown {
1000    () => {
1001        _
1002    };
1003}
1004
1005// Custom PartialEq so that unknown variants are not equal to themselves.
1006impl PartialEq for Parameter {
1007    fn eq(&self, other: &Self) -> bool {
1008        match (self, other) {
1009            (Self::IpAddrs(x), Self::IpAddrs(y)) => *x == *y,
1010            (Self::AddressPool(x), Self::AddressPool(y)) => *x == *y,
1011            (Self::Lease(x), Self::Lease(y)) => *x == *y,
1012            (Self::PermittedMacs(x), Self::PermittedMacs(y)) => *x == *y,
1013            (Self::StaticallyAssignedAddrs(x), Self::StaticallyAssignedAddrs(y)) => *x == *y,
1014            (Self::ArpProbe(x), Self::ArpProbe(y)) => *x == *y,
1015            (Self::BoundDeviceNames(x), Self::BoundDeviceNames(y)) => *x == *y,
1016            _ => false,
1017        }
1018    }
1019}
1020
1021impl Parameter {
1022    #[inline]
1023    pub fn ordinal(&self) -> u64 {
1024        match *self {
1025            Self::IpAddrs(_) => 1,
1026            Self::AddressPool(_) => 2,
1027            Self::Lease(_) => 3,
1028            Self::PermittedMacs(_) => 4,
1029            Self::StaticallyAssignedAddrs(_) => 5,
1030            Self::ArpProbe(_) => 6,
1031            Self::BoundDeviceNames(_) => 7,
1032            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1033        }
1034    }
1035
1036    #[inline]
1037    pub fn unknown_variant_for_testing() -> Self {
1038        Self::__SourceBreaking { unknown_ordinal: 0 }
1039    }
1040
1041    #[inline]
1042    pub fn is_unknown(&self) -> bool {
1043        match self {
1044            Self::__SourceBreaking { .. } => true,
1045            _ => false,
1046        }
1047    }
1048}
1049
1050impl fidl::Persistable for Parameter {}
1051
1052mod internal {
1053    use super::*;
1054    unsafe impl fidl::encoding::TypeMarker for NodeTypes {
1055        type Owned = Self;
1056
1057        #[inline(always)]
1058        fn inline_align(_context: fidl::encoding::Context) -> usize {
1059            1
1060        }
1061
1062        #[inline(always)]
1063        fn inline_size(_context: fidl::encoding::Context) -> usize {
1064            1
1065        }
1066    }
1067
1068    impl fidl::encoding::ValueTypeMarker for NodeTypes {
1069        type Borrowed<'a> = Self;
1070        #[inline(always)]
1071        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1072            *value
1073        }
1074    }
1075
1076    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for NodeTypes {
1077        #[inline]
1078        unsafe fn encode(
1079            self,
1080            encoder: &mut fidl::encoding::Encoder<'_, D>,
1081            offset: usize,
1082            _depth: fidl::encoding::Depth,
1083        ) -> fidl::Result<()> {
1084            encoder.debug_check_bounds::<Self>(offset);
1085            if self.bits() & Self::all().bits() != self.bits() {
1086                return Err(fidl::Error::InvalidBitsValue);
1087            }
1088            encoder.write_num(self.bits(), offset);
1089            Ok(())
1090        }
1091    }
1092
1093    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeTypes {
1094        #[inline(always)]
1095        fn new_empty() -> Self {
1096            Self::empty()
1097        }
1098
1099        #[inline]
1100        unsafe fn decode(
1101            &mut self,
1102            decoder: &mut fidl::encoding::Decoder<'_, D>,
1103            offset: usize,
1104            _depth: fidl::encoding::Depth,
1105        ) -> fidl::Result<()> {
1106            decoder.debug_check_bounds::<Self>(offset);
1107            let prim = decoder.read_num::<u8>(offset);
1108            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
1109            Ok(())
1110        }
1111    }
1112    unsafe impl fidl::encoding::TypeMarker for ClientExitReason {
1113        type Owned = Self;
1114
1115        #[inline(always)]
1116        fn inline_align(_context: fidl::encoding::Context) -> usize {
1117            std::mem::align_of::<u32>()
1118        }
1119
1120        #[inline(always)]
1121        fn inline_size(_context: fidl::encoding::Context) -> usize {
1122            std::mem::size_of::<u32>()
1123        }
1124
1125        #[inline(always)]
1126        fn encode_is_copy() -> bool {
1127            true
1128        }
1129
1130        #[inline(always)]
1131        fn decode_is_copy() -> bool {
1132            false
1133        }
1134    }
1135
1136    impl fidl::encoding::ValueTypeMarker for ClientExitReason {
1137        type Borrowed<'a> = Self;
1138        #[inline(always)]
1139        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1140            *value
1141        }
1142    }
1143
1144    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1145        for ClientExitReason
1146    {
1147        #[inline]
1148        unsafe fn encode(
1149            self,
1150            encoder: &mut fidl::encoding::Encoder<'_, D>,
1151            offset: usize,
1152            _depth: fidl::encoding::Depth,
1153        ) -> fidl::Result<()> {
1154            encoder.debug_check_bounds::<Self>(offset);
1155            encoder.write_num(self.into_primitive(), offset);
1156            Ok(())
1157        }
1158    }
1159
1160    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientExitReason {
1161        #[inline(always)]
1162        fn new_empty() -> Self {
1163            Self::ClientAlreadyExistsOnInterface
1164        }
1165
1166        #[inline]
1167        unsafe fn decode(
1168            &mut self,
1169            decoder: &mut fidl::encoding::Decoder<'_, D>,
1170            offset: usize,
1171            _depth: fidl::encoding::Depth,
1172        ) -> fidl::Result<()> {
1173            decoder.debug_check_bounds::<Self>(offset);
1174            let prim = decoder.read_num::<u32>(offset);
1175
1176            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1177            Ok(())
1178        }
1179    }
1180    unsafe impl fidl::encoding::TypeMarker for MessageType {
1181        type Owned = Self;
1182
1183        #[inline(always)]
1184        fn inline_align(_context: fidl::encoding::Context) -> usize {
1185            std::mem::align_of::<u8>()
1186        }
1187
1188        #[inline(always)]
1189        fn inline_size(_context: fidl::encoding::Context) -> usize {
1190            std::mem::size_of::<u8>()
1191        }
1192
1193        #[inline(always)]
1194        fn encode_is_copy() -> bool {
1195            true
1196        }
1197
1198        #[inline(always)]
1199        fn decode_is_copy() -> bool {
1200            false
1201        }
1202    }
1203
1204    impl fidl::encoding::ValueTypeMarker for MessageType {
1205        type Borrowed<'a> = Self;
1206        #[inline(always)]
1207        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1208            *value
1209        }
1210    }
1211
1212    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for MessageType {
1213        #[inline]
1214        unsafe fn encode(
1215            self,
1216            encoder: &mut fidl::encoding::Encoder<'_, D>,
1217            offset: usize,
1218            _depth: fidl::encoding::Depth,
1219        ) -> fidl::Result<()> {
1220            encoder.debug_check_bounds::<Self>(offset);
1221            encoder.write_num(self.into_primitive(), offset);
1222            Ok(())
1223        }
1224    }
1225
1226    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MessageType {
1227        #[inline(always)]
1228        fn new_empty() -> Self {
1229            Self::Dhcpdiscover
1230        }
1231
1232        #[inline]
1233        unsafe fn decode(
1234            &mut self,
1235            decoder: &mut fidl::encoding::Decoder<'_, D>,
1236            offset: usize,
1237            _depth: fidl::encoding::Depth,
1238        ) -> fidl::Result<()> {
1239            decoder.debug_check_bounds::<Self>(offset);
1240            let prim = decoder.read_num::<u8>(offset);
1241
1242            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1243            Ok(())
1244        }
1245    }
1246    unsafe impl fidl::encoding::TypeMarker for OptionCode {
1247        type Owned = Self;
1248
1249        #[inline(always)]
1250        fn inline_align(_context: fidl::encoding::Context) -> usize {
1251            std::mem::align_of::<u32>()
1252        }
1253
1254        #[inline(always)]
1255        fn inline_size(_context: fidl::encoding::Context) -> usize {
1256            std::mem::size_of::<u32>()
1257        }
1258
1259        #[inline(always)]
1260        fn encode_is_copy() -> bool {
1261            true
1262        }
1263
1264        #[inline(always)]
1265        fn decode_is_copy() -> bool {
1266            false
1267        }
1268    }
1269
1270    impl fidl::encoding::ValueTypeMarker for OptionCode {
1271        type Borrowed<'a> = Self;
1272        #[inline(always)]
1273        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1274            *value
1275        }
1276    }
1277
1278    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OptionCode {
1279        #[inline]
1280        unsafe fn encode(
1281            self,
1282            encoder: &mut fidl::encoding::Encoder<'_, D>,
1283            offset: usize,
1284            _depth: fidl::encoding::Depth,
1285        ) -> fidl::Result<()> {
1286            encoder.debug_check_bounds::<Self>(offset);
1287            encoder.write_num(self.into_primitive(), offset);
1288            Ok(())
1289        }
1290    }
1291
1292    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionCode {
1293        #[inline(always)]
1294        fn new_empty() -> Self {
1295            Self::SubnetMask
1296        }
1297
1298        #[inline]
1299        unsafe fn decode(
1300            &mut self,
1301            decoder: &mut fidl::encoding::Decoder<'_, D>,
1302            offset: usize,
1303            _depth: fidl::encoding::Depth,
1304        ) -> fidl::Result<()> {
1305            decoder.debug_check_bounds::<Self>(offset);
1306            let prim = decoder.read_num::<u32>(offset);
1307
1308            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1309            Ok(())
1310        }
1311    }
1312    unsafe impl fidl::encoding::TypeMarker for OptionOverloadValue {
1313        type Owned = Self;
1314
1315        #[inline(always)]
1316        fn inline_align(_context: fidl::encoding::Context) -> usize {
1317            std::mem::align_of::<u8>()
1318        }
1319
1320        #[inline(always)]
1321        fn inline_size(_context: fidl::encoding::Context) -> usize {
1322            std::mem::size_of::<u8>()
1323        }
1324
1325        #[inline(always)]
1326        fn encode_is_copy() -> bool {
1327            true
1328        }
1329
1330        #[inline(always)]
1331        fn decode_is_copy() -> bool {
1332            false
1333        }
1334    }
1335
1336    impl fidl::encoding::ValueTypeMarker for OptionOverloadValue {
1337        type Borrowed<'a> = Self;
1338        #[inline(always)]
1339        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1340            *value
1341        }
1342    }
1343
1344    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1345        for OptionOverloadValue
1346    {
1347        #[inline]
1348        unsafe fn encode(
1349            self,
1350            encoder: &mut fidl::encoding::Encoder<'_, D>,
1351            offset: usize,
1352            _depth: fidl::encoding::Depth,
1353        ) -> fidl::Result<()> {
1354            encoder.debug_check_bounds::<Self>(offset);
1355            encoder.write_num(self.into_primitive(), offset);
1356            Ok(())
1357        }
1358    }
1359
1360    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionOverloadValue {
1361        #[inline(always)]
1362        fn new_empty() -> Self {
1363            Self::File
1364        }
1365
1366        #[inline]
1367        unsafe fn decode(
1368            &mut self,
1369            decoder: &mut fidl::encoding::Decoder<'_, D>,
1370            offset: usize,
1371            _depth: fidl::encoding::Depth,
1372        ) -> fidl::Result<()> {
1373            decoder.debug_check_bounds::<Self>(offset);
1374            let prim = decoder.read_num::<u8>(offset);
1375
1376            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1377            Ok(())
1378        }
1379    }
1380    unsafe impl fidl::encoding::TypeMarker for ParameterName {
1381        type Owned = Self;
1382
1383        #[inline(always)]
1384        fn inline_align(_context: fidl::encoding::Context) -> usize {
1385            std::mem::align_of::<u32>()
1386        }
1387
1388        #[inline(always)]
1389        fn inline_size(_context: fidl::encoding::Context) -> usize {
1390            std::mem::size_of::<u32>()
1391        }
1392
1393        #[inline(always)]
1394        fn encode_is_copy() -> bool {
1395            true
1396        }
1397
1398        #[inline(always)]
1399        fn decode_is_copy() -> bool {
1400            false
1401        }
1402    }
1403
1404    impl fidl::encoding::ValueTypeMarker for ParameterName {
1405        type Borrowed<'a> = Self;
1406        #[inline(always)]
1407        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1408            *value
1409        }
1410    }
1411
1412    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ParameterName {
1413        #[inline]
1414        unsafe fn encode(
1415            self,
1416            encoder: &mut fidl::encoding::Encoder<'_, D>,
1417            offset: usize,
1418            _depth: fidl::encoding::Depth,
1419        ) -> fidl::Result<()> {
1420            encoder.debug_check_bounds::<Self>(offset);
1421            encoder.write_num(self.into_primitive(), offset);
1422            Ok(())
1423        }
1424    }
1425
1426    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParameterName {
1427        #[inline(always)]
1428        fn new_empty() -> Self {
1429            Self::IpAddrs
1430        }
1431
1432        #[inline]
1433        unsafe fn decode(
1434            &mut self,
1435            decoder: &mut fidl::encoding::Decoder<'_, D>,
1436            offset: usize,
1437            _depth: fidl::encoding::Depth,
1438        ) -> fidl::Result<()> {
1439            decoder.debug_check_bounds::<Self>(offset);
1440            let prim = decoder.read_num::<u32>(offset);
1441
1442            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1443            Ok(())
1444        }
1445    }
1446
1447    impl fidl::encoding::ValueTypeMarker for ClientOnExitRequest {
1448        type Borrowed<'a> = &'a Self;
1449        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1450            value
1451        }
1452    }
1453
1454    unsafe impl fidl::encoding::TypeMarker for ClientOnExitRequest {
1455        type Owned = Self;
1456
1457        #[inline(always)]
1458        fn inline_align(_context: fidl::encoding::Context) -> usize {
1459            4
1460        }
1461
1462        #[inline(always)]
1463        fn inline_size(_context: fidl::encoding::Context) -> usize {
1464            4
1465        }
1466    }
1467
1468    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientOnExitRequest, D>
1469        for &ClientOnExitRequest
1470    {
1471        #[inline]
1472        unsafe fn encode(
1473            self,
1474            encoder: &mut fidl::encoding::Encoder<'_, D>,
1475            offset: usize,
1476            _depth: fidl::encoding::Depth,
1477        ) -> fidl::Result<()> {
1478            encoder.debug_check_bounds::<ClientOnExitRequest>(offset);
1479            // Delegate to tuple encoding.
1480            fidl::encoding::Encode::<ClientOnExitRequest, D>::encode(
1481                (<ClientExitReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
1482                encoder,
1483                offset,
1484                _depth,
1485            )
1486        }
1487    }
1488    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ClientExitReason, D>>
1489        fidl::encoding::Encode<ClientOnExitRequest, D> for (T0,)
1490    {
1491        #[inline]
1492        unsafe fn encode(
1493            self,
1494            encoder: &mut fidl::encoding::Encoder<'_, D>,
1495            offset: usize,
1496            depth: fidl::encoding::Depth,
1497        ) -> fidl::Result<()> {
1498            encoder.debug_check_bounds::<ClientOnExitRequest>(offset);
1499            // Zero out padding regions. There's no need to apply masks
1500            // because the unmasked parts will be overwritten by fields.
1501            // Write the fields.
1502            self.0.encode(encoder, offset + 0, depth)?;
1503            Ok(())
1504        }
1505    }
1506
1507    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientOnExitRequest {
1508        #[inline(always)]
1509        fn new_empty() -> Self {
1510            Self { reason: fidl::new_empty!(ClientExitReason, D) }
1511        }
1512
1513        #[inline]
1514        unsafe fn decode(
1515            &mut self,
1516            decoder: &mut fidl::encoding::Decoder<'_, D>,
1517            offset: usize,
1518            _depth: fidl::encoding::Depth,
1519        ) -> fidl::Result<()> {
1520            decoder.debug_check_bounds::<Self>(offset);
1521            // Verify that padding bytes are zero.
1522            fidl::decode!(ClientExitReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
1523            Ok(())
1524        }
1525    }
1526
1527    impl fidl::encoding::ValueTypeMarker for ServerGetOptionRequest {
1528        type Borrowed<'a> = &'a Self;
1529        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1530            value
1531        }
1532    }
1533
1534    unsafe impl fidl::encoding::TypeMarker for ServerGetOptionRequest {
1535        type Owned = Self;
1536
1537        #[inline(always)]
1538        fn inline_align(_context: fidl::encoding::Context) -> usize {
1539            4
1540        }
1541
1542        #[inline(always)]
1543        fn inline_size(_context: fidl::encoding::Context) -> usize {
1544            4
1545        }
1546    }
1547
1548    unsafe impl<D: fidl::encoding::ResourceDialect>
1549        fidl::encoding::Encode<ServerGetOptionRequest, D> for &ServerGetOptionRequest
1550    {
1551        #[inline]
1552        unsafe fn encode(
1553            self,
1554            encoder: &mut fidl::encoding::Encoder<'_, D>,
1555            offset: usize,
1556            _depth: fidl::encoding::Depth,
1557        ) -> fidl::Result<()> {
1558            encoder.debug_check_bounds::<ServerGetOptionRequest>(offset);
1559            // Delegate to tuple encoding.
1560            fidl::encoding::Encode::<ServerGetOptionRequest, D>::encode(
1561                (<OptionCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1562                encoder,
1563                offset,
1564                _depth,
1565            )
1566        }
1567    }
1568    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionCode, D>>
1569        fidl::encoding::Encode<ServerGetOptionRequest, D> for (T0,)
1570    {
1571        #[inline]
1572        unsafe fn encode(
1573            self,
1574            encoder: &mut fidl::encoding::Encoder<'_, D>,
1575            offset: usize,
1576            depth: fidl::encoding::Depth,
1577        ) -> fidl::Result<()> {
1578            encoder.debug_check_bounds::<ServerGetOptionRequest>(offset);
1579            // Zero out padding regions. There's no need to apply masks
1580            // because the unmasked parts will be overwritten by fields.
1581            // Write the fields.
1582            self.0.encode(encoder, offset + 0, depth)?;
1583            Ok(())
1584        }
1585    }
1586
1587    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1588        for ServerGetOptionRequest
1589    {
1590        #[inline(always)]
1591        fn new_empty() -> Self {
1592            Self { code: fidl::new_empty!(OptionCode, D) }
1593        }
1594
1595        #[inline]
1596        unsafe fn decode(
1597            &mut self,
1598            decoder: &mut fidl::encoding::Decoder<'_, D>,
1599            offset: usize,
1600            _depth: fidl::encoding::Depth,
1601        ) -> fidl::Result<()> {
1602            decoder.debug_check_bounds::<Self>(offset);
1603            // Verify that padding bytes are zero.
1604            fidl::decode!(OptionCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1605            Ok(())
1606        }
1607    }
1608
1609    impl fidl::encoding::ValueTypeMarker for ServerGetParameterRequest {
1610        type Borrowed<'a> = &'a Self;
1611        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1612            value
1613        }
1614    }
1615
1616    unsafe impl fidl::encoding::TypeMarker for ServerGetParameterRequest {
1617        type Owned = Self;
1618
1619        #[inline(always)]
1620        fn inline_align(_context: fidl::encoding::Context) -> usize {
1621            4
1622        }
1623
1624        #[inline(always)]
1625        fn inline_size(_context: fidl::encoding::Context) -> usize {
1626            4
1627        }
1628    }
1629
1630    unsafe impl<D: fidl::encoding::ResourceDialect>
1631        fidl::encoding::Encode<ServerGetParameterRequest, D> for &ServerGetParameterRequest
1632    {
1633        #[inline]
1634        unsafe fn encode(
1635            self,
1636            encoder: &mut fidl::encoding::Encoder<'_, D>,
1637            offset: usize,
1638            _depth: fidl::encoding::Depth,
1639        ) -> fidl::Result<()> {
1640            encoder.debug_check_bounds::<ServerGetParameterRequest>(offset);
1641            // Delegate to tuple encoding.
1642            fidl::encoding::Encode::<ServerGetParameterRequest, D>::encode(
1643                (<ParameterName as fidl::encoding::ValueTypeMarker>::borrow(&self.name),),
1644                encoder,
1645                offset,
1646                _depth,
1647            )
1648        }
1649    }
1650    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ParameterName, D>>
1651        fidl::encoding::Encode<ServerGetParameterRequest, D> for (T0,)
1652    {
1653        #[inline]
1654        unsafe fn encode(
1655            self,
1656            encoder: &mut fidl::encoding::Encoder<'_, D>,
1657            offset: usize,
1658            depth: fidl::encoding::Depth,
1659        ) -> fidl::Result<()> {
1660            encoder.debug_check_bounds::<ServerGetParameterRequest>(offset);
1661            // Zero out padding regions. There's no need to apply masks
1662            // because the unmasked parts will be overwritten by fields.
1663            // Write the fields.
1664            self.0.encode(encoder, offset + 0, depth)?;
1665            Ok(())
1666        }
1667    }
1668
1669    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1670        for ServerGetParameterRequest
1671    {
1672        #[inline(always)]
1673        fn new_empty() -> Self {
1674            Self { name: fidl::new_empty!(ParameterName, D) }
1675        }
1676
1677        #[inline]
1678        unsafe fn decode(
1679            &mut self,
1680            decoder: &mut fidl::encoding::Decoder<'_, D>,
1681            offset: usize,
1682            _depth: fidl::encoding::Depth,
1683        ) -> fidl::Result<()> {
1684            decoder.debug_check_bounds::<Self>(offset);
1685            // Verify that padding bytes are zero.
1686            fidl::decode!(ParameterName, D, &mut self.name, decoder, offset + 0, _depth)?;
1687            Ok(())
1688        }
1689    }
1690
1691    impl fidl::encoding::ValueTypeMarker for ServerIsServingResponse {
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 ServerIsServingResponse {
1699        type Owned = Self;
1700
1701        #[inline(always)]
1702        fn inline_align(_context: fidl::encoding::Context) -> usize {
1703            1
1704        }
1705
1706        #[inline(always)]
1707        fn inline_size(_context: fidl::encoding::Context) -> usize {
1708            1
1709        }
1710    }
1711
1712    unsafe impl<D: fidl::encoding::ResourceDialect>
1713        fidl::encoding::Encode<ServerIsServingResponse, D> for &ServerIsServingResponse
1714    {
1715        #[inline]
1716        unsafe fn encode(
1717            self,
1718            encoder: &mut fidl::encoding::Encoder<'_, D>,
1719            offset: usize,
1720            _depth: fidl::encoding::Depth,
1721        ) -> fidl::Result<()> {
1722            encoder.debug_check_bounds::<ServerIsServingResponse>(offset);
1723            // Delegate to tuple encoding.
1724            fidl::encoding::Encode::<ServerIsServingResponse, D>::encode(
1725                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
1726                encoder,
1727                offset,
1728                _depth,
1729            )
1730        }
1731    }
1732    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1733        fidl::encoding::Encode<ServerIsServingResponse, D> for (T0,)
1734    {
1735        #[inline]
1736        unsafe fn encode(
1737            self,
1738            encoder: &mut fidl::encoding::Encoder<'_, D>,
1739            offset: usize,
1740            depth: fidl::encoding::Depth,
1741        ) -> fidl::Result<()> {
1742            encoder.debug_check_bounds::<ServerIsServingResponse>(offset);
1743            // Zero out padding regions. There's no need to apply masks
1744            // because the unmasked parts will be overwritten by fields.
1745            // Write the fields.
1746            self.0.encode(encoder, offset + 0, depth)?;
1747            Ok(())
1748        }
1749    }
1750
1751    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1752        for ServerIsServingResponse
1753    {
1754        #[inline(always)]
1755        fn new_empty() -> Self {
1756            Self { enabled: fidl::new_empty!(bool, D) }
1757        }
1758
1759        #[inline]
1760        unsafe fn decode(
1761            &mut self,
1762            decoder: &mut fidl::encoding::Decoder<'_, D>,
1763            offset: usize,
1764            _depth: fidl::encoding::Depth,
1765        ) -> fidl::Result<()> {
1766            decoder.debug_check_bounds::<Self>(offset);
1767            // Verify that padding bytes are zero.
1768            fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
1769            Ok(())
1770        }
1771    }
1772
1773    impl fidl::encoding::ValueTypeMarker for ServerSetOptionRequest {
1774        type Borrowed<'a> = &'a Self;
1775        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1776            value
1777        }
1778    }
1779
1780    unsafe impl fidl::encoding::TypeMarker for ServerSetOptionRequest {
1781        type Owned = Self;
1782
1783        #[inline(always)]
1784        fn inline_align(_context: fidl::encoding::Context) -> usize {
1785            8
1786        }
1787
1788        #[inline(always)]
1789        fn inline_size(_context: fidl::encoding::Context) -> usize {
1790            16
1791        }
1792    }
1793
1794    unsafe impl<D: fidl::encoding::ResourceDialect>
1795        fidl::encoding::Encode<ServerSetOptionRequest, D> for &ServerSetOptionRequest
1796    {
1797        #[inline]
1798        unsafe fn encode(
1799            self,
1800            encoder: &mut fidl::encoding::Encoder<'_, D>,
1801            offset: usize,
1802            _depth: fidl::encoding::Depth,
1803        ) -> fidl::Result<()> {
1804            encoder.debug_check_bounds::<ServerSetOptionRequest>(offset);
1805            // Delegate to tuple encoding.
1806            fidl::encoding::Encode::<ServerSetOptionRequest, D>::encode(
1807                (<Option_ as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
1808                encoder,
1809                offset,
1810                _depth,
1811            )
1812        }
1813    }
1814    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Option_, D>>
1815        fidl::encoding::Encode<ServerSetOptionRequest, D> for (T0,)
1816    {
1817        #[inline]
1818        unsafe fn encode(
1819            self,
1820            encoder: &mut fidl::encoding::Encoder<'_, D>,
1821            offset: usize,
1822            depth: fidl::encoding::Depth,
1823        ) -> fidl::Result<()> {
1824            encoder.debug_check_bounds::<ServerSetOptionRequest>(offset);
1825            // Zero out padding regions. There's no need to apply masks
1826            // because the unmasked parts will be overwritten by fields.
1827            // Write the fields.
1828            self.0.encode(encoder, offset + 0, depth)?;
1829            Ok(())
1830        }
1831    }
1832
1833    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1834        for ServerSetOptionRequest
1835    {
1836        #[inline(always)]
1837        fn new_empty() -> Self {
1838            Self { value: fidl::new_empty!(Option_, D) }
1839        }
1840
1841        #[inline]
1842        unsafe fn decode(
1843            &mut self,
1844            decoder: &mut fidl::encoding::Decoder<'_, D>,
1845            offset: usize,
1846            _depth: fidl::encoding::Depth,
1847        ) -> fidl::Result<()> {
1848            decoder.debug_check_bounds::<Self>(offset);
1849            // Verify that padding bytes are zero.
1850            fidl::decode!(Option_, D, &mut self.value, decoder, offset + 0, _depth)?;
1851            Ok(())
1852        }
1853    }
1854
1855    impl fidl::encoding::ValueTypeMarker for ServerSetParameterRequest {
1856        type Borrowed<'a> = &'a Self;
1857        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1858            value
1859        }
1860    }
1861
1862    unsafe impl fidl::encoding::TypeMarker for ServerSetParameterRequest {
1863        type Owned = Self;
1864
1865        #[inline(always)]
1866        fn inline_align(_context: fidl::encoding::Context) -> usize {
1867            8
1868        }
1869
1870        #[inline(always)]
1871        fn inline_size(_context: fidl::encoding::Context) -> usize {
1872            16
1873        }
1874    }
1875
1876    unsafe impl<D: fidl::encoding::ResourceDialect>
1877        fidl::encoding::Encode<ServerSetParameterRequest, D> for &ServerSetParameterRequest
1878    {
1879        #[inline]
1880        unsafe fn encode(
1881            self,
1882            encoder: &mut fidl::encoding::Encoder<'_, D>,
1883            offset: usize,
1884            _depth: fidl::encoding::Depth,
1885        ) -> fidl::Result<()> {
1886            encoder.debug_check_bounds::<ServerSetParameterRequest>(offset);
1887            // Delegate to tuple encoding.
1888            fidl::encoding::Encode::<ServerSetParameterRequest, D>::encode(
1889                (<Parameter as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
1890                encoder,
1891                offset,
1892                _depth,
1893            )
1894        }
1895    }
1896    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Parameter, D>>
1897        fidl::encoding::Encode<ServerSetParameterRequest, D> for (T0,)
1898    {
1899        #[inline]
1900        unsafe fn encode(
1901            self,
1902            encoder: &mut fidl::encoding::Encoder<'_, D>,
1903            offset: usize,
1904            depth: fidl::encoding::Depth,
1905        ) -> fidl::Result<()> {
1906            encoder.debug_check_bounds::<ServerSetParameterRequest>(offset);
1907            // Zero out padding regions. There's no need to apply masks
1908            // because the unmasked parts will be overwritten by fields.
1909            // Write the fields.
1910            self.0.encode(encoder, offset + 0, depth)?;
1911            Ok(())
1912        }
1913    }
1914
1915    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1916        for ServerSetParameterRequest
1917    {
1918        #[inline(always)]
1919        fn new_empty() -> Self {
1920            Self { value: fidl::new_empty!(Parameter, D) }
1921        }
1922
1923        #[inline]
1924        unsafe fn decode(
1925            &mut self,
1926            decoder: &mut fidl::encoding::Decoder<'_, D>,
1927            offset: usize,
1928            _depth: fidl::encoding::Depth,
1929        ) -> fidl::Result<()> {
1930            decoder.debug_check_bounds::<Self>(offset);
1931            // Verify that padding bytes are zero.
1932            fidl::decode!(Parameter, D, &mut self.value, decoder, offset + 0, _depth)?;
1933            Ok(())
1934        }
1935    }
1936
1937    impl fidl::encoding::ValueTypeMarker for ServerGetOptionResponse {
1938        type Borrowed<'a> = &'a Self;
1939        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1940            value
1941        }
1942    }
1943
1944    unsafe impl fidl::encoding::TypeMarker for ServerGetOptionResponse {
1945        type Owned = Self;
1946
1947        #[inline(always)]
1948        fn inline_align(_context: fidl::encoding::Context) -> usize {
1949            8
1950        }
1951
1952        #[inline(always)]
1953        fn inline_size(_context: fidl::encoding::Context) -> usize {
1954            16
1955        }
1956    }
1957
1958    unsafe impl<D: fidl::encoding::ResourceDialect>
1959        fidl::encoding::Encode<ServerGetOptionResponse, D> for &ServerGetOptionResponse
1960    {
1961        #[inline]
1962        unsafe fn encode(
1963            self,
1964            encoder: &mut fidl::encoding::Encoder<'_, D>,
1965            offset: usize,
1966            _depth: fidl::encoding::Depth,
1967        ) -> fidl::Result<()> {
1968            encoder.debug_check_bounds::<ServerGetOptionResponse>(offset);
1969            // Delegate to tuple encoding.
1970            fidl::encoding::Encode::<ServerGetOptionResponse, D>::encode(
1971                (<Option_ as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
1972                encoder,
1973                offset,
1974                _depth,
1975            )
1976        }
1977    }
1978    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Option_, D>>
1979        fidl::encoding::Encode<ServerGetOptionResponse, D> for (T0,)
1980    {
1981        #[inline]
1982        unsafe fn encode(
1983            self,
1984            encoder: &mut fidl::encoding::Encoder<'_, D>,
1985            offset: usize,
1986            depth: fidl::encoding::Depth,
1987        ) -> fidl::Result<()> {
1988            encoder.debug_check_bounds::<ServerGetOptionResponse>(offset);
1989            // Zero out padding regions. There's no need to apply masks
1990            // because the unmasked parts will be overwritten by fields.
1991            // Write the fields.
1992            self.0.encode(encoder, offset + 0, depth)?;
1993            Ok(())
1994        }
1995    }
1996
1997    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1998        for ServerGetOptionResponse
1999    {
2000        #[inline(always)]
2001        fn new_empty() -> Self {
2002            Self { value: fidl::new_empty!(Option_, D) }
2003        }
2004
2005        #[inline]
2006        unsafe fn decode(
2007            &mut self,
2008            decoder: &mut fidl::encoding::Decoder<'_, D>,
2009            offset: usize,
2010            _depth: fidl::encoding::Depth,
2011        ) -> fidl::Result<()> {
2012            decoder.debug_check_bounds::<Self>(offset);
2013            // Verify that padding bytes are zero.
2014            fidl::decode!(Option_, D, &mut self.value, decoder, offset + 0, _depth)?;
2015            Ok(())
2016        }
2017    }
2018
2019    impl fidl::encoding::ValueTypeMarker for ServerGetParameterResponse {
2020        type Borrowed<'a> = &'a Self;
2021        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2022            value
2023        }
2024    }
2025
2026    unsafe impl fidl::encoding::TypeMarker for ServerGetParameterResponse {
2027        type Owned = Self;
2028
2029        #[inline(always)]
2030        fn inline_align(_context: fidl::encoding::Context) -> usize {
2031            8
2032        }
2033
2034        #[inline(always)]
2035        fn inline_size(_context: fidl::encoding::Context) -> usize {
2036            16
2037        }
2038    }
2039
2040    unsafe impl<D: fidl::encoding::ResourceDialect>
2041        fidl::encoding::Encode<ServerGetParameterResponse, D> for &ServerGetParameterResponse
2042    {
2043        #[inline]
2044        unsafe fn encode(
2045            self,
2046            encoder: &mut fidl::encoding::Encoder<'_, D>,
2047            offset: usize,
2048            _depth: fidl::encoding::Depth,
2049        ) -> fidl::Result<()> {
2050            encoder.debug_check_bounds::<ServerGetParameterResponse>(offset);
2051            // Delegate to tuple encoding.
2052            fidl::encoding::Encode::<ServerGetParameterResponse, D>::encode(
2053                (<Parameter as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
2054                encoder,
2055                offset,
2056                _depth,
2057            )
2058        }
2059    }
2060    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Parameter, D>>
2061        fidl::encoding::Encode<ServerGetParameterResponse, D> for (T0,)
2062    {
2063        #[inline]
2064        unsafe fn encode(
2065            self,
2066            encoder: &mut fidl::encoding::Encoder<'_, D>,
2067            offset: usize,
2068            depth: fidl::encoding::Depth,
2069        ) -> fidl::Result<()> {
2070            encoder.debug_check_bounds::<ServerGetParameterResponse>(offset);
2071            // Zero out padding regions. There's no need to apply masks
2072            // because the unmasked parts will be overwritten by fields.
2073            // Write the fields.
2074            self.0.encode(encoder, offset + 0, depth)?;
2075            Ok(())
2076        }
2077    }
2078
2079    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2080        for ServerGetParameterResponse
2081    {
2082        #[inline(always)]
2083        fn new_empty() -> Self {
2084            Self { value: fidl::new_empty!(Parameter, D) }
2085        }
2086
2087        #[inline]
2088        unsafe fn decode(
2089            &mut self,
2090            decoder: &mut fidl::encoding::Decoder<'_, D>,
2091            offset: usize,
2092            _depth: fidl::encoding::Depth,
2093        ) -> fidl::Result<()> {
2094            decoder.debug_check_bounds::<Self>(offset);
2095            // Verify that padding bytes are zero.
2096            fidl::decode!(Parameter, D, &mut self.value, decoder, offset + 0, _depth)?;
2097            Ok(())
2098        }
2099    }
2100
2101    impl fidl::encoding::ValueTypeMarker for ServerListOptionsResponse {
2102        type Borrowed<'a> = &'a Self;
2103        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2104            value
2105        }
2106    }
2107
2108    unsafe impl fidl::encoding::TypeMarker for ServerListOptionsResponse {
2109        type Owned = Self;
2110
2111        #[inline(always)]
2112        fn inline_align(_context: fidl::encoding::Context) -> usize {
2113            8
2114        }
2115
2116        #[inline(always)]
2117        fn inline_size(_context: fidl::encoding::Context) -> usize {
2118            16
2119        }
2120    }
2121
2122    unsafe impl<D: fidl::encoding::ResourceDialect>
2123        fidl::encoding::Encode<ServerListOptionsResponse, D> for &ServerListOptionsResponse
2124    {
2125        #[inline]
2126        unsafe fn encode(
2127            self,
2128            encoder: &mut fidl::encoding::Encoder<'_, D>,
2129            offset: usize,
2130            _depth: fidl::encoding::Depth,
2131        ) -> fidl::Result<()> {
2132            encoder.debug_check_bounds::<ServerListOptionsResponse>(offset);
2133            // Delegate to tuple encoding.
2134            fidl::encoding::Encode::<ServerListOptionsResponse, D>::encode(
2135                (
2136                    <fidl::encoding::Vector<Option_, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
2137                ),
2138                encoder, offset, _depth
2139            )
2140        }
2141    }
2142    unsafe impl<
2143            D: fidl::encoding::ResourceDialect,
2144            T0: fidl::encoding::Encode<fidl::encoding::Vector<Option_, 256>, D>,
2145        > fidl::encoding::Encode<ServerListOptionsResponse, D> for (T0,)
2146    {
2147        #[inline]
2148        unsafe fn encode(
2149            self,
2150            encoder: &mut fidl::encoding::Encoder<'_, D>,
2151            offset: usize,
2152            depth: fidl::encoding::Depth,
2153        ) -> fidl::Result<()> {
2154            encoder.debug_check_bounds::<ServerListOptionsResponse>(offset);
2155            // Zero out padding regions. There's no need to apply masks
2156            // because the unmasked parts will be overwritten by fields.
2157            // Write the fields.
2158            self.0.encode(encoder, offset + 0, depth)?;
2159            Ok(())
2160        }
2161    }
2162
2163    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2164        for ServerListOptionsResponse
2165    {
2166        #[inline(always)]
2167        fn new_empty() -> Self {
2168            Self { options: fidl::new_empty!(fidl::encoding::Vector<Option_, 256>, D) }
2169        }
2170
2171        #[inline]
2172        unsafe fn decode(
2173            &mut self,
2174            decoder: &mut fidl::encoding::Decoder<'_, D>,
2175            offset: usize,
2176            _depth: fidl::encoding::Depth,
2177        ) -> fidl::Result<()> {
2178            decoder.debug_check_bounds::<Self>(offset);
2179            // Verify that padding bytes are zero.
2180            fidl::decode!(fidl::encoding::Vector<Option_, 256>, D, &mut self.options, decoder, offset + 0, _depth)?;
2181            Ok(())
2182        }
2183    }
2184
2185    impl fidl::encoding::ValueTypeMarker for ServerListParametersResponse {
2186        type Borrowed<'a> = &'a Self;
2187        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2188            value
2189        }
2190    }
2191
2192    unsafe impl fidl::encoding::TypeMarker for ServerListParametersResponse {
2193        type Owned = Self;
2194
2195        #[inline(always)]
2196        fn inline_align(_context: fidl::encoding::Context) -> usize {
2197            8
2198        }
2199
2200        #[inline(always)]
2201        fn inline_size(_context: fidl::encoding::Context) -> usize {
2202            16
2203        }
2204    }
2205
2206    unsafe impl<D: fidl::encoding::ResourceDialect>
2207        fidl::encoding::Encode<ServerListParametersResponse, D> for &ServerListParametersResponse
2208    {
2209        #[inline]
2210        unsafe fn encode(
2211            self,
2212            encoder: &mut fidl::encoding::Encoder<'_, D>,
2213            offset: usize,
2214            _depth: fidl::encoding::Depth,
2215        ) -> fidl::Result<()> {
2216            encoder.debug_check_bounds::<ServerListParametersResponse>(offset);
2217            // Delegate to tuple encoding.
2218            fidl::encoding::Encode::<ServerListParametersResponse, D>::encode(
2219                (
2220                    <fidl::encoding::Vector<Parameter, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.parameters),
2221                ),
2222                encoder, offset, _depth
2223            )
2224        }
2225    }
2226    unsafe impl<
2227            D: fidl::encoding::ResourceDialect,
2228            T0: fidl::encoding::Encode<fidl::encoding::Vector<Parameter, 256>, D>,
2229        > fidl::encoding::Encode<ServerListParametersResponse, D> for (T0,)
2230    {
2231        #[inline]
2232        unsafe fn encode(
2233            self,
2234            encoder: &mut fidl::encoding::Encoder<'_, D>,
2235            offset: usize,
2236            depth: fidl::encoding::Depth,
2237        ) -> fidl::Result<()> {
2238            encoder.debug_check_bounds::<ServerListParametersResponse>(offset);
2239            // Zero out padding regions. There's no need to apply masks
2240            // because the unmasked parts will be overwritten by fields.
2241            // Write the fields.
2242            self.0.encode(encoder, offset + 0, depth)?;
2243            Ok(())
2244        }
2245    }
2246
2247    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2248        for ServerListParametersResponse
2249    {
2250        #[inline(always)]
2251        fn new_empty() -> Self {
2252            Self { parameters: fidl::new_empty!(fidl::encoding::Vector<Parameter, 256>, D) }
2253        }
2254
2255        #[inline]
2256        unsafe fn decode(
2257            &mut self,
2258            decoder: &mut fidl::encoding::Decoder<'_, D>,
2259            offset: usize,
2260            _depth: fidl::encoding::Depth,
2261        ) -> fidl::Result<()> {
2262            decoder.debug_check_bounds::<Self>(offset);
2263            // Verify that padding bytes are zero.
2264            fidl::decode!(fidl::encoding::Vector<Parameter, 256>, D, &mut self.parameters, decoder, offset + 0, _depth)?;
2265            Ok(())
2266        }
2267    }
2268
2269    impl AddressPool {
2270        #[inline(always)]
2271        fn max_ordinal_present(&self) -> u64 {
2272            if let Some(_) = self.range_stop {
2273                return 3;
2274            }
2275            if let Some(_) = self.range_start {
2276                return 2;
2277            }
2278            if let Some(_) = self.prefix_length {
2279                return 1;
2280            }
2281            0
2282        }
2283    }
2284
2285    impl fidl::encoding::ValueTypeMarker for AddressPool {
2286        type Borrowed<'a> = &'a Self;
2287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2288            value
2289        }
2290    }
2291
2292    unsafe impl fidl::encoding::TypeMarker for AddressPool {
2293        type Owned = Self;
2294
2295        #[inline(always)]
2296        fn inline_align(_context: fidl::encoding::Context) -> usize {
2297            8
2298        }
2299
2300        #[inline(always)]
2301        fn inline_size(_context: fidl::encoding::Context) -> usize {
2302            16
2303        }
2304    }
2305
2306    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddressPool, D>
2307        for &AddressPool
2308    {
2309        unsafe fn encode(
2310            self,
2311            encoder: &mut fidl::encoding::Encoder<'_, D>,
2312            offset: usize,
2313            mut depth: fidl::encoding::Depth,
2314        ) -> fidl::Result<()> {
2315            encoder.debug_check_bounds::<AddressPool>(offset);
2316            // Vector header
2317            let max_ordinal: u64 = self.max_ordinal_present();
2318            encoder.write_num(max_ordinal, offset);
2319            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2320            // Calling encoder.out_of_line_offset(0) is not allowed.
2321            if max_ordinal == 0 {
2322                return Ok(());
2323            }
2324            depth.increment()?;
2325            let envelope_size = 8;
2326            let bytes_len = max_ordinal as usize * envelope_size;
2327            #[allow(unused_variables)]
2328            let offset = encoder.out_of_line_offset(bytes_len);
2329            let mut _prev_end_offset: usize = 0;
2330            if 1 > max_ordinal {
2331                return Ok(());
2332            }
2333
2334            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2335            // are envelope_size bytes.
2336            let cur_offset: usize = (1 - 1) * envelope_size;
2337
2338            // Zero reserved fields.
2339            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2340
2341            // Safety:
2342            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2343            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2344            //   envelope_size bytes, there is always sufficient room.
2345            fidl::encoding::encode_in_envelope_optional::<u8, D>(
2346                self.prefix_length.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
2347                encoder,
2348                offset + cur_offset,
2349                depth,
2350            )?;
2351
2352            _prev_end_offset = cur_offset + envelope_size;
2353            if 2 > max_ordinal {
2354                return Ok(());
2355            }
2356
2357            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2358            // are envelope_size bytes.
2359            let cur_offset: usize = (2 - 1) * envelope_size;
2360
2361            // Zero reserved fields.
2362            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2363
2364            // Safety:
2365            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2366            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2367            //   envelope_size bytes, there is always sufficient room.
2368            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::Ipv4Address, D>(
2369            self.range_start.as_ref().map(<fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow),
2370            encoder, offset + cur_offset, depth
2371        )?;
2372
2373            _prev_end_offset = cur_offset + envelope_size;
2374            if 3 > max_ordinal {
2375                return Ok(());
2376            }
2377
2378            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2379            // are envelope_size bytes.
2380            let cur_offset: usize = (3 - 1) * envelope_size;
2381
2382            // Zero reserved fields.
2383            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2384
2385            // Safety:
2386            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2387            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2388            //   envelope_size bytes, there is always sufficient room.
2389            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::Ipv4Address, D>(
2390            self.range_stop.as_ref().map(<fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow),
2391            encoder, offset + cur_offset, depth
2392        )?;
2393
2394            _prev_end_offset = cur_offset + envelope_size;
2395
2396            Ok(())
2397        }
2398    }
2399
2400    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddressPool {
2401        #[inline(always)]
2402        fn new_empty() -> Self {
2403            Self::default()
2404        }
2405
2406        unsafe fn decode(
2407            &mut self,
2408            decoder: &mut fidl::encoding::Decoder<'_, D>,
2409            offset: usize,
2410            mut depth: fidl::encoding::Depth,
2411        ) -> fidl::Result<()> {
2412            decoder.debug_check_bounds::<Self>(offset);
2413            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2414                None => return Err(fidl::Error::NotNullable),
2415                Some(len) => len,
2416            };
2417            // Calling decoder.out_of_line_offset(0) is not allowed.
2418            if len == 0 {
2419                return Ok(());
2420            };
2421            depth.increment()?;
2422            let envelope_size = 8;
2423            let bytes_len = len * envelope_size;
2424            let offset = decoder.out_of_line_offset(bytes_len)?;
2425            // Decode the envelope for each type.
2426            let mut _next_ordinal_to_read = 0;
2427            let mut next_offset = offset;
2428            let end_offset = offset + bytes_len;
2429            _next_ordinal_to_read += 1;
2430            if next_offset >= end_offset {
2431                return Ok(());
2432            }
2433
2434            // Decode unknown envelopes for gaps in ordinals.
2435            while _next_ordinal_to_read < 1 {
2436                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2437                _next_ordinal_to_read += 1;
2438                next_offset += envelope_size;
2439            }
2440
2441            let next_out_of_line = decoder.next_out_of_line();
2442            let handles_before = decoder.remaining_handles();
2443            if let Some((inlined, num_bytes, num_handles)) =
2444                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2445            {
2446                let member_inline_size =
2447                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2448                if inlined != (member_inline_size <= 4) {
2449                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2450                }
2451                let inner_offset;
2452                let mut inner_depth = depth.clone();
2453                if inlined {
2454                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2455                    inner_offset = next_offset;
2456                } else {
2457                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2458                    inner_depth.increment()?;
2459                }
2460                let val_ref = self.prefix_length.get_or_insert_with(|| fidl::new_empty!(u8, D));
2461                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
2462                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2463                {
2464                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2465                }
2466                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2467                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2468                }
2469            }
2470
2471            next_offset += envelope_size;
2472            _next_ordinal_to_read += 1;
2473            if next_offset >= end_offset {
2474                return Ok(());
2475            }
2476
2477            // Decode unknown envelopes for gaps in ordinals.
2478            while _next_ordinal_to_read < 2 {
2479                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2480                _next_ordinal_to_read += 1;
2481                next_offset += envelope_size;
2482            }
2483
2484            let next_out_of_line = decoder.next_out_of_line();
2485            let handles_before = decoder.remaining_handles();
2486            if let Some((inlined, num_bytes, num_handles)) =
2487                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2488            {
2489                let member_inline_size = <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2490                if inlined != (member_inline_size <= 4) {
2491                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2492                }
2493                let inner_offset;
2494                let mut inner_depth = depth.clone();
2495                if inlined {
2496                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2497                    inner_offset = next_offset;
2498                } else {
2499                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2500                    inner_depth.increment()?;
2501                }
2502                let val_ref = self.range_start.get_or_insert_with(|| {
2503                    fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D)
2504                });
2505                fidl::decode!(
2506                    fidl_fuchsia_net__common::Ipv4Address,
2507                    D,
2508                    val_ref,
2509                    decoder,
2510                    inner_offset,
2511                    inner_depth
2512                )?;
2513                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2514                {
2515                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2516                }
2517                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2518                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2519                }
2520            }
2521
2522            next_offset += envelope_size;
2523            _next_ordinal_to_read += 1;
2524            if next_offset >= end_offset {
2525                return Ok(());
2526            }
2527
2528            // Decode unknown envelopes for gaps in ordinals.
2529            while _next_ordinal_to_read < 3 {
2530                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2531                _next_ordinal_to_read += 1;
2532                next_offset += envelope_size;
2533            }
2534
2535            let next_out_of_line = decoder.next_out_of_line();
2536            let handles_before = decoder.remaining_handles();
2537            if let Some((inlined, num_bytes, num_handles)) =
2538                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2539            {
2540                let member_inline_size = <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2541                if inlined != (member_inline_size <= 4) {
2542                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2543                }
2544                let inner_offset;
2545                let mut inner_depth = depth.clone();
2546                if inlined {
2547                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2548                    inner_offset = next_offset;
2549                } else {
2550                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2551                    inner_depth.increment()?;
2552                }
2553                let val_ref = self.range_stop.get_or_insert_with(|| {
2554                    fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D)
2555                });
2556                fidl::decode!(
2557                    fidl_fuchsia_net__common::Ipv4Address,
2558                    D,
2559                    val_ref,
2560                    decoder,
2561                    inner_offset,
2562                    inner_depth
2563                )?;
2564                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2565                {
2566                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2567                }
2568                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2569                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2570                }
2571            }
2572
2573            next_offset += envelope_size;
2574
2575            // Decode the remaining unknown envelopes.
2576            while next_offset < end_offset {
2577                _next_ordinal_to_read += 1;
2578                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2579                next_offset += envelope_size;
2580            }
2581
2582            Ok(())
2583        }
2584    }
2585
2586    impl ConfigurationToRequest {
2587        #[inline(always)]
2588        fn max_ordinal_present(&self) -> u64 {
2589            if let Some(_) = self.dns_servers {
2590                return 2;
2591            }
2592            if let Some(_) = self.routers {
2593                return 1;
2594            }
2595            0
2596        }
2597    }
2598
2599    impl fidl::encoding::ValueTypeMarker for ConfigurationToRequest {
2600        type Borrowed<'a> = &'a Self;
2601        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2602            value
2603        }
2604    }
2605
2606    unsafe impl fidl::encoding::TypeMarker for ConfigurationToRequest {
2607        type Owned = Self;
2608
2609        #[inline(always)]
2610        fn inline_align(_context: fidl::encoding::Context) -> usize {
2611            8
2612        }
2613
2614        #[inline(always)]
2615        fn inline_size(_context: fidl::encoding::Context) -> usize {
2616            16
2617        }
2618    }
2619
2620    unsafe impl<D: fidl::encoding::ResourceDialect>
2621        fidl::encoding::Encode<ConfigurationToRequest, D> for &ConfigurationToRequest
2622    {
2623        unsafe fn encode(
2624            self,
2625            encoder: &mut fidl::encoding::Encoder<'_, D>,
2626            offset: usize,
2627            mut depth: fidl::encoding::Depth,
2628        ) -> fidl::Result<()> {
2629            encoder.debug_check_bounds::<ConfigurationToRequest>(offset);
2630            // Vector header
2631            let max_ordinal: u64 = self.max_ordinal_present();
2632            encoder.write_num(max_ordinal, offset);
2633            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2634            // Calling encoder.out_of_line_offset(0) is not allowed.
2635            if max_ordinal == 0 {
2636                return Ok(());
2637            }
2638            depth.increment()?;
2639            let envelope_size = 8;
2640            let bytes_len = max_ordinal as usize * envelope_size;
2641            #[allow(unused_variables)]
2642            let offset = encoder.out_of_line_offset(bytes_len);
2643            let mut _prev_end_offset: usize = 0;
2644            if 1 > max_ordinal {
2645                return Ok(());
2646            }
2647
2648            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2649            // are envelope_size bytes.
2650            let cur_offset: usize = (1 - 1) * envelope_size;
2651
2652            // Zero reserved fields.
2653            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2654
2655            // Safety:
2656            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2657            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2658            //   envelope_size bytes, there is always sufficient room.
2659            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2660                self.routers.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2661                encoder,
2662                offset + cur_offset,
2663                depth,
2664            )?;
2665
2666            _prev_end_offset = cur_offset + envelope_size;
2667            if 2 > max_ordinal {
2668                return Ok(());
2669            }
2670
2671            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2672            // are envelope_size bytes.
2673            let cur_offset: usize = (2 - 1) * envelope_size;
2674
2675            // Zero reserved fields.
2676            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2677
2678            // Safety:
2679            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2680            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2681            //   envelope_size bytes, there is always sufficient room.
2682            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2683                self.dns_servers.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2684                encoder,
2685                offset + cur_offset,
2686                depth,
2687            )?;
2688
2689            _prev_end_offset = cur_offset + envelope_size;
2690
2691            Ok(())
2692        }
2693    }
2694
2695    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2696        for ConfigurationToRequest
2697    {
2698        #[inline(always)]
2699        fn new_empty() -> Self {
2700            Self::default()
2701        }
2702
2703        unsafe fn decode(
2704            &mut self,
2705            decoder: &mut fidl::encoding::Decoder<'_, D>,
2706            offset: usize,
2707            mut depth: fidl::encoding::Depth,
2708        ) -> fidl::Result<()> {
2709            decoder.debug_check_bounds::<Self>(offset);
2710            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2711                None => return Err(fidl::Error::NotNullable),
2712                Some(len) => len,
2713            };
2714            // Calling decoder.out_of_line_offset(0) is not allowed.
2715            if len == 0 {
2716                return Ok(());
2717            };
2718            depth.increment()?;
2719            let envelope_size = 8;
2720            let bytes_len = len * envelope_size;
2721            let offset = decoder.out_of_line_offset(bytes_len)?;
2722            // Decode the envelope for each type.
2723            let mut _next_ordinal_to_read = 0;
2724            let mut next_offset = offset;
2725            let end_offset = offset + bytes_len;
2726            _next_ordinal_to_read += 1;
2727            if next_offset >= end_offset {
2728                return Ok(());
2729            }
2730
2731            // Decode unknown envelopes for gaps in ordinals.
2732            while _next_ordinal_to_read < 1 {
2733                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2734                _next_ordinal_to_read += 1;
2735                next_offset += envelope_size;
2736            }
2737
2738            let next_out_of_line = decoder.next_out_of_line();
2739            let handles_before = decoder.remaining_handles();
2740            if let Some((inlined, num_bytes, num_handles)) =
2741                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2742            {
2743                let member_inline_size =
2744                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2745                if inlined != (member_inline_size <= 4) {
2746                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2747                }
2748                let inner_offset;
2749                let mut inner_depth = depth.clone();
2750                if inlined {
2751                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2752                    inner_offset = next_offset;
2753                } else {
2754                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2755                    inner_depth.increment()?;
2756                }
2757                let val_ref = self.routers.get_or_insert_with(|| fidl::new_empty!(bool, D));
2758                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2759                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2760                {
2761                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2762                }
2763                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2764                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2765                }
2766            }
2767
2768            next_offset += envelope_size;
2769            _next_ordinal_to_read += 1;
2770            if next_offset >= end_offset {
2771                return Ok(());
2772            }
2773
2774            // Decode unknown envelopes for gaps in ordinals.
2775            while _next_ordinal_to_read < 2 {
2776                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2777                _next_ordinal_to_read += 1;
2778                next_offset += envelope_size;
2779            }
2780
2781            let next_out_of_line = decoder.next_out_of_line();
2782            let handles_before = decoder.remaining_handles();
2783            if let Some((inlined, num_bytes, num_handles)) =
2784                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2785            {
2786                let member_inline_size =
2787                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2788                if inlined != (member_inline_size <= 4) {
2789                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2790                }
2791                let inner_offset;
2792                let mut inner_depth = depth.clone();
2793                if inlined {
2794                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2795                    inner_offset = next_offset;
2796                } else {
2797                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2798                    inner_depth.increment()?;
2799                }
2800                let val_ref = self.dns_servers.get_or_insert_with(|| fidl::new_empty!(bool, D));
2801                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2802                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2803                {
2804                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2805                }
2806                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2807                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2808                }
2809            }
2810
2811            next_offset += envelope_size;
2812
2813            // Decode the remaining unknown envelopes.
2814            while next_offset < end_offset {
2815                _next_ordinal_to_read += 1;
2816                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2817                next_offset += envelope_size;
2818            }
2819
2820            Ok(())
2821        }
2822    }
2823
2824    impl LeaseLength {
2825        #[inline(always)]
2826        fn max_ordinal_present(&self) -> u64 {
2827            if let Some(_) = self.max {
2828                return 2;
2829            }
2830            if let Some(_) = self.default {
2831                return 1;
2832            }
2833            0
2834        }
2835    }
2836
2837    impl fidl::encoding::ValueTypeMarker for LeaseLength {
2838        type Borrowed<'a> = &'a Self;
2839        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2840            value
2841        }
2842    }
2843
2844    unsafe impl fidl::encoding::TypeMarker for LeaseLength {
2845        type Owned = Self;
2846
2847        #[inline(always)]
2848        fn inline_align(_context: fidl::encoding::Context) -> usize {
2849            8
2850        }
2851
2852        #[inline(always)]
2853        fn inline_size(_context: fidl::encoding::Context) -> usize {
2854            16
2855        }
2856    }
2857
2858    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LeaseLength, D>
2859        for &LeaseLength
2860    {
2861        unsafe fn encode(
2862            self,
2863            encoder: &mut fidl::encoding::Encoder<'_, D>,
2864            offset: usize,
2865            mut depth: fidl::encoding::Depth,
2866        ) -> fidl::Result<()> {
2867            encoder.debug_check_bounds::<LeaseLength>(offset);
2868            // Vector header
2869            let max_ordinal: u64 = self.max_ordinal_present();
2870            encoder.write_num(max_ordinal, offset);
2871            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2872            // Calling encoder.out_of_line_offset(0) is not allowed.
2873            if max_ordinal == 0 {
2874                return Ok(());
2875            }
2876            depth.increment()?;
2877            let envelope_size = 8;
2878            let bytes_len = max_ordinal as usize * envelope_size;
2879            #[allow(unused_variables)]
2880            let offset = encoder.out_of_line_offset(bytes_len);
2881            let mut _prev_end_offset: usize = 0;
2882            if 1 > max_ordinal {
2883                return Ok(());
2884            }
2885
2886            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2887            // are envelope_size bytes.
2888            let cur_offset: usize = (1 - 1) * envelope_size;
2889
2890            // Zero reserved fields.
2891            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2892
2893            // Safety:
2894            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2895            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2896            //   envelope_size bytes, there is always sufficient room.
2897            fidl::encoding::encode_in_envelope_optional::<u32, D>(
2898                self.default.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
2899                encoder,
2900                offset + cur_offset,
2901                depth,
2902            )?;
2903
2904            _prev_end_offset = cur_offset + envelope_size;
2905            if 2 > max_ordinal {
2906                return Ok(());
2907            }
2908
2909            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2910            // are envelope_size bytes.
2911            let cur_offset: usize = (2 - 1) * envelope_size;
2912
2913            // Zero reserved fields.
2914            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2915
2916            // Safety:
2917            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2918            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2919            //   envelope_size bytes, there is always sufficient room.
2920            fidl::encoding::encode_in_envelope_optional::<u32, D>(
2921                self.max.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
2922                encoder,
2923                offset + cur_offset,
2924                depth,
2925            )?;
2926
2927            _prev_end_offset = cur_offset + envelope_size;
2928
2929            Ok(())
2930        }
2931    }
2932
2933    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LeaseLength {
2934        #[inline(always)]
2935        fn new_empty() -> Self {
2936            Self::default()
2937        }
2938
2939        unsafe fn decode(
2940            &mut self,
2941            decoder: &mut fidl::encoding::Decoder<'_, D>,
2942            offset: usize,
2943            mut depth: fidl::encoding::Depth,
2944        ) -> fidl::Result<()> {
2945            decoder.debug_check_bounds::<Self>(offset);
2946            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2947                None => return Err(fidl::Error::NotNullable),
2948                Some(len) => len,
2949            };
2950            // Calling decoder.out_of_line_offset(0) is not allowed.
2951            if len == 0 {
2952                return Ok(());
2953            };
2954            depth.increment()?;
2955            let envelope_size = 8;
2956            let bytes_len = len * envelope_size;
2957            let offset = decoder.out_of_line_offset(bytes_len)?;
2958            // Decode the envelope for each type.
2959            let mut _next_ordinal_to_read = 0;
2960            let mut next_offset = offset;
2961            let end_offset = offset + bytes_len;
2962            _next_ordinal_to_read += 1;
2963            if next_offset >= end_offset {
2964                return Ok(());
2965            }
2966
2967            // Decode unknown envelopes for gaps in ordinals.
2968            while _next_ordinal_to_read < 1 {
2969                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2970                _next_ordinal_to_read += 1;
2971                next_offset += envelope_size;
2972            }
2973
2974            let next_out_of_line = decoder.next_out_of_line();
2975            let handles_before = decoder.remaining_handles();
2976            if let Some((inlined, num_bytes, num_handles)) =
2977                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2978            {
2979                let member_inline_size =
2980                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2981                if inlined != (member_inline_size <= 4) {
2982                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2983                }
2984                let inner_offset;
2985                let mut inner_depth = depth.clone();
2986                if inlined {
2987                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2988                    inner_offset = next_offset;
2989                } else {
2990                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2991                    inner_depth.increment()?;
2992                }
2993                let val_ref = self.default.get_or_insert_with(|| fidl::new_empty!(u32, D));
2994                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
2995                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2996                {
2997                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2998                }
2999                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3000                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3001                }
3002            }
3003
3004            next_offset += envelope_size;
3005            _next_ordinal_to_read += 1;
3006            if next_offset >= end_offset {
3007                return Ok(());
3008            }
3009
3010            // Decode unknown envelopes for gaps in ordinals.
3011            while _next_ordinal_to_read < 2 {
3012                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3013                _next_ordinal_to_read += 1;
3014                next_offset += envelope_size;
3015            }
3016
3017            let next_out_of_line = decoder.next_out_of_line();
3018            let handles_before = decoder.remaining_handles();
3019            if let Some((inlined, num_bytes, num_handles)) =
3020                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3021            {
3022                let member_inline_size =
3023                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3024                if inlined != (member_inline_size <= 4) {
3025                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3026                }
3027                let inner_offset;
3028                let mut inner_depth = depth.clone();
3029                if inlined {
3030                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3031                    inner_offset = next_offset;
3032                } else {
3033                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3034                    inner_depth.increment()?;
3035                }
3036                let val_ref = self.max.get_or_insert_with(|| fidl::new_empty!(u32, D));
3037                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
3038                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3039                {
3040                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3041                }
3042                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3043                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3044                }
3045            }
3046
3047            next_offset += envelope_size;
3048
3049            // Decode the remaining unknown envelopes.
3050            while next_offset < end_offset {
3051                _next_ordinal_to_read += 1;
3052                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3053                next_offset += envelope_size;
3054            }
3055
3056            Ok(())
3057        }
3058    }
3059
3060    impl NewClientParams {
3061        #[inline(always)]
3062        fn max_ordinal_present(&self) -> u64 {
3063            if let Some(_) = self.request_ip_address {
3064                return 2;
3065            }
3066            if let Some(_) = self.configuration_to_request {
3067                return 1;
3068            }
3069            0
3070        }
3071    }
3072
3073    impl fidl::encoding::ValueTypeMarker for NewClientParams {
3074        type Borrowed<'a> = &'a Self;
3075        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3076            value
3077        }
3078    }
3079
3080    unsafe impl fidl::encoding::TypeMarker for NewClientParams {
3081        type Owned = Self;
3082
3083        #[inline(always)]
3084        fn inline_align(_context: fidl::encoding::Context) -> usize {
3085            8
3086        }
3087
3088        #[inline(always)]
3089        fn inline_size(_context: fidl::encoding::Context) -> usize {
3090            16
3091        }
3092    }
3093
3094    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NewClientParams, D>
3095        for &NewClientParams
3096    {
3097        unsafe fn encode(
3098            self,
3099            encoder: &mut fidl::encoding::Encoder<'_, D>,
3100            offset: usize,
3101            mut depth: fidl::encoding::Depth,
3102        ) -> fidl::Result<()> {
3103            encoder.debug_check_bounds::<NewClientParams>(offset);
3104            // Vector header
3105            let max_ordinal: u64 = self.max_ordinal_present();
3106            encoder.write_num(max_ordinal, offset);
3107            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3108            // Calling encoder.out_of_line_offset(0) is not allowed.
3109            if max_ordinal == 0 {
3110                return Ok(());
3111            }
3112            depth.increment()?;
3113            let envelope_size = 8;
3114            let bytes_len = max_ordinal as usize * envelope_size;
3115            #[allow(unused_variables)]
3116            let offset = encoder.out_of_line_offset(bytes_len);
3117            let mut _prev_end_offset: usize = 0;
3118            if 1 > 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 = (1 - 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::<ConfigurationToRequest, D>(
3134                self.configuration_to_request
3135                    .as_ref()
3136                    .map(<ConfigurationToRequest as fidl::encoding::ValueTypeMarker>::borrow),
3137                encoder,
3138                offset + cur_offset,
3139                depth,
3140            )?;
3141
3142            _prev_end_offset = cur_offset + envelope_size;
3143            if 2 > max_ordinal {
3144                return Ok(());
3145            }
3146
3147            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3148            // are envelope_size bytes.
3149            let cur_offset: usize = (2 - 1) * envelope_size;
3150
3151            // Zero reserved fields.
3152            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3153
3154            // Safety:
3155            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3156            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3157            //   envelope_size bytes, there is always sufficient room.
3158            fidl::encoding::encode_in_envelope_optional::<bool, D>(
3159                self.request_ip_address
3160                    .as_ref()
3161                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3162                encoder,
3163                offset + cur_offset,
3164                depth,
3165            )?;
3166
3167            _prev_end_offset = cur_offset + envelope_size;
3168
3169            Ok(())
3170        }
3171    }
3172
3173    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NewClientParams {
3174        #[inline(always)]
3175        fn new_empty() -> Self {
3176            Self::default()
3177        }
3178
3179        unsafe fn decode(
3180            &mut self,
3181            decoder: &mut fidl::encoding::Decoder<'_, D>,
3182            offset: usize,
3183            mut depth: fidl::encoding::Depth,
3184        ) -> fidl::Result<()> {
3185            decoder.debug_check_bounds::<Self>(offset);
3186            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3187                None => return Err(fidl::Error::NotNullable),
3188                Some(len) => len,
3189            };
3190            // Calling decoder.out_of_line_offset(0) is not allowed.
3191            if len == 0 {
3192                return Ok(());
3193            };
3194            depth.increment()?;
3195            let envelope_size = 8;
3196            let bytes_len = len * envelope_size;
3197            let offset = decoder.out_of_line_offset(bytes_len)?;
3198            // Decode the envelope for each type.
3199            let mut _next_ordinal_to_read = 0;
3200            let mut next_offset = offset;
3201            let end_offset = offset + bytes_len;
3202            _next_ordinal_to_read += 1;
3203            if next_offset >= end_offset {
3204                return Ok(());
3205            }
3206
3207            // Decode unknown envelopes for gaps in ordinals.
3208            while _next_ordinal_to_read < 1 {
3209                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3210                _next_ordinal_to_read += 1;
3211                next_offset += envelope_size;
3212            }
3213
3214            let next_out_of_line = decoder.next_out_of_line();
3215            let handles_before = decoder.remaining_handles();
3216            if let Some((inlined, num_bytes, num_handles)) =
3217                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3218            {
3219                let member_inline_size =
3220                    <ConfigurationToRequest as fidl::encoding::TypeMarker>::inline_size(
3221                        decoder.context,
3222                    );
3223                if inlined != (member_inline_size <= 4) {
3224                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3225                }
3226                let inner_offset;
3227                let mut inner_depth = depth.clone();
3228                if inlined {
3229                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3230                    inner_offset = next_offset;
3231                } else {
3232                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3233                    inner_depth.increment()?;
3234                }
3235                let val_ref = self
3236                    .configuration_to_request
3237                    .get_or_insert_with(|| fidl::new_empty!(ConfigurationToRequest, D));
3238                fidl::decode!(
3239                    ConfigurationToRequest,
3240                    D,
3241                    val_ref,
3242                    decoder,
3243                    inner_offset,
3244                    inner_depth
3245                )?;
3246                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3247                {
3248                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3249                }
3250                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3251                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3252                }
3253            }
3254
3255            next_offset += envelope_size;
3256            _next_ordinal_to_read += 1;
3257            if next_offset >= end_offset {
3258                return Ok(());
3259            }
3260
3261            // Decode unknown envelopes for gaps in ordinals.
3262            while _next_ordinal_to_read < 2 {
3263                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3264                _next_ordinal_to_read += 1;
3265                next_offset += envelope_size;
3266            }
3267
3268            let next_out_of_line = decoder.next_out_of_line();
3269            let handles_before = decoder.remaining_handles();
3270            if let Some((inlined, num_bytes, num_handles)) =
3271                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3272            {
3273                let member_inline_size =
3274                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3275                if inlined != (member_inline_size <= 4) {
3276                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3277                }
3278                let inner_offset;
3279                let mut inner_depth = depth.clone();
3280                if inlined {
3281                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3282                    inner_offset = next_offset;
3283                } else {
3284                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3285                    inner_depth.increment()?;
3286                }
3287                let val_ref =
3288                    self.request_ip_address.get_or_insert_with(|| fidl::new_empty!(bool, D));
3289                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3290                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3291                {
3292                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3293                }
3294                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3295                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3296                }
3297            }
3298
3299            next_offset += envelope_size;
3300
3301            // Decode the remaining unknown envelopes.
3302            while next_offset < end_offset {
3303                _next_ordinal_to_read += 1;
3304                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3305                next_offset += envelope_size;
3306            }
3307
3308            Ok(())
3309        }
3310    }
3311
3312    impl StaticAssignment {
3313        #[inline(always)]
3314        fn max_ordinal_present(&self) -> u64 {
3315            if let Some(_) = self.assigned_addr {
3316                return 2;
3317            }
3318            if let Some(_) = self.host {
3319                return 1;
3320            }
3321            0
3322        }
3323    }
3324
3325    impl fidl::encoding::ValueTypeMarker for StaticAssignment {
3326        type Borrowed<'a> = &'a Self;
3327        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3328            value
3329        }
3330    }
3331
3332    unsafe impl fidl::encoding::TypeMarker for StaticAssignment {
3333        type Owned = Self;
3334
3335        #[inline(always)]
3336        fn inline_align(_context: fidl::encoding::Context) -> usize {
3337            8
3338        }
3339
3340        #[inline(always)]
3341        fn inline_size(_context: fidl::encoding::Context) -> usize {
3342            16
3343        }
3344    }
3345
3346    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StaticAssignment, D>
3347        for &StaticAssignment
3348    {
3349        unsafe fn encode(
3350            self,
3351            encoder: &mut fidl::encoding::Encoder<'_, D>,
3352            offset: usize,
3353            mut depth: fidl::encoding::Depth,
3354        ) -> fidl::Result<()> {
3355            encoder.debug_check_bounds::<StaticAssignment>(offset);
3356            // Vector header
3357            let max_ordinal: u64 = self.max_ordinal_present();
3358            encoder.write_num(max_ordinal, offset);
3359            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3360            // Calling encoder.out_of_line_offset(0) is not allowed.
3361            if max_ordinal == 0 {
3362                return Ok(());
3363            }
3364            depth.increment()?;
3365            let envelope_size = 8;
3366            let bytes_len = max_ordinal as usize * envelope_size;
3367            #[allow(unused_variables)]
3368            let offset = encoder.out_of_line_offset(bytes_len);
3369            let mut _prev_end_offset: usize = 0;
3370            if 1 > max_ordinal {
3371                return Ok(());
3372            }
3373
3374            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3375            // are envelope_size bytes.
3376            let cur_offset: usize = (1 - 1) * envelope_size;
3377
3378            // Zero reserved fields.
3379            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3380
3381            // Safety:
3382            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3383            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3384            //   envelope_size bytes, there is always sufficient room.
3385            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::MacAddress, D>(
3386            self.host.as_ref().map(<fidl_fuchsia_net__common::MacAddress as fidl::encoding::ValueTypeMarker>::borrow),
3387            encoder, offset + cur_offset, depth
3388        )?;
3389
3390            _prev_end_offset = cur_offset + envelope_size;
3391            if 2 > max_ordinal {
3392                return Ok(());
3393            }
3394
3395            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3396            // are envelope_size bytes.
3397            let cur_offset: usize = (2 - 1) * envelope_size;
3398
3399            // Zero reserved fields.
3400            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3401
3402            // Safety:
3403            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3404            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3405            //   envelope_size bytes, there is always sufficient room.
3406            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::Ipv4Address, D>(
3407            self.assigned_addr.as_ref().map(<fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow),
3408            encoder, offset + cur_offset, depth
3409        )?;
3410
3411            _prev_end_offset = cur_offset + envelope_size;
3412
3413            Ok(())
3414        }
3415    }
3416
3417    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StaticAssignment {
3418        #[inline(always)]
3419        fn new_empty() -> Self {
3420            Self::default()
3421        }
3422
3423        unsafe fn decode(
3424            &mut self,
3425            decoder: &mut fidl::encoding::Decoder<'_, D>,
3426            offset: usize,
3427            mut depth: fidl::encoding::Depth,
3428        ) -> fidl::Result<()> {
3429            decoder.debug_check_bounds::<Self>(offset);
3430            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3431                None => return Err(fidl::Error::NotNullable),
3432                Some(len) => len,
3433            };
3434            // Calling decoder.out_of_line_offset(0) is not allowed.
3435            if len == 0 {
3436                return Ok(());
3437            };
3438            depth.increment()?;
3439            let envelope_size = 8;
3440            let bytes_len = len * envelope_size;
3441            let offset = decoder.out_of_line_offset(bytes_len)?;
3442            // Decode the envelope for each type.
3443            let mut _next_ordinal_to_read = 0;
3444            let mut next_offset = offset;
3445            let end_offset = offset + bytes_len;
3446            _next_ordinal_to_read += 1;
3447            if next_offset >= end_offset {
3448                return Ok(());
3449            }
3450
3451            // Decode unknown envelopes for gaps in ordinals.
3452            while _next_ordinal_to_read < 1 {
3453                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3454                _next_ordinal_to_read += 1;
3455                next_offset += envelope_size;
3456            }
3457
3458            let next_out_of_line = decoder.next_out_of_line();
3459            let handles_before = decoder.remaining_handles();
3460            if let Some((inlined, num_bytes, num_handles)) =
3461                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3462            {
3463                let member_inline_size = <fidl_fuchsia_net__common::MacAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3464                if inlined != (member_inline_size <= 4) {
3465                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3466                }
3467                let inner_offset;
3468                let mut inner_depth = depth.clone();
3469                if inlined {
3470                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3471                    inner_offset = next_offset;
3472                } else {
3473                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3474                    inner_depth.increment()?;
3475                }
3476                let val_ref = self.host.get_or_insert_with(|| {
3477                    fidl::new_empty!(fidl_fuchsia_net__common::MacAddress, D)
3478                });
3479                fidl::decode!(
3480                    fidl_fuchsia_net__common::MacAddress,
3481                    D,
3482                    val_ref,
3483                    decoder,
3484                    inner_offset,
3485                    inner_depth
3486                )?;
3487                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3488                {
3489                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3490                }
3491                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3492                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3493                }
3494            }
3495
3496            next_offset += envelope_size;
3497            _next_ordinal_to_read += 1;
3498            if next_offset >= end_offset {
3499                return Ok(());
3500            }
3501
3502            // Decode unknown envelopes for gaps in ordinals.
3503            while _next_ordinal_to_read < 2 {
3504                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3505                _next_ordinal_to_read += 1;
3506                next_offset += envelope_size;
3507            }
3508
3509            let next_out_of_line = decoder.next_out_of_line();
3510            let handles_before = decoder.remaining_handles();
3511            if let Some((inlined, num_bytes, num_handles)) =
3512                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3513            {
3514                let member_inline_size = <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3515                if inlined != (member_inline_size <= 4) {
3516                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3517                }
3518                let inner_offset;
3519                let mut inner_depth = depth.clone();
3520                if inlined {
3521                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3522                    inner_offset = next_offset;
3523                } else {
3524                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3525                    inner_depth.increment()?;
3526                }
3527                let val_ref = self.assigned_addr.get_or_insert_with(|| {
3528                    fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D)
3529                });
3530                fidl::decode!(
3531                    fidl_fuchsia_net__common::Ipv4Address,
3532                    D,
3533                    val_ref,
3534                    decoder,
3535                    inner_offset,
3536                    inner_depth
3537                )?;
3538                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3539                {
3540                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3541                }
3542                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3543                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3544                }
3545            }
3546
3547            next_offset += envelope_size;
3548
3549            // Decode the remaining unknown envelopes.
3550            while next_offset < end_offset {
3551                _next_ordinal_to_read += 1;
3552                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3553                next_offset += envelope_size;
3554            }
3555
3556            Ok(())
3557        }
3558    }
3559
3560    impl fidl::encoding::ValueTypeMarker for Option_ {
3561        type Borrowed<'a> = &'a Self;
3562        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3563            value
3564        }
3565    }
3566
3567    unsafe impl fidl::encoding::TypeMarker for Option_ {
3568        type Owned = Self;
3569
3570        #[inline(always)]
3571        fn inline_align(_context: fidl::encoding::Context) -> usize {
3572            8
3573        }
3574
3575        #[inline(always)]
3576        fn inline_size(_context: fidl::encoding::Context) -> usize {
3577            16
3578        }
3579    }
3580
3581    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Option_, D> for &Option_ {
3582        #[inline]
3583        unsafe fn encode(
3584            self,
3585            encoder: &mut fidl::encoding::Encoder<'_, D>,
3586            offset: usize,
3587            _depth: fidl::encoding::Depth,
3588        ) -> fidl::Result<()> {
3589            encoder.debug_check_bounds::<Option_>(offset);
3590            encoder.write_num::<u64>(self.ordinal(), offset);
3591            match self {
3592            Option_::SubnetMask(ref val) => {
3593                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net__common::Ipv4Address, D>(
3594                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3595                    encoder, offset + 8, _depth
3596                )
3597            }
3598            Option_::TimeOffset(ref val) => {
3599                fidl::encoding::encode_in_envelope::<i32, D>(
3600                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3601                    encoder, offset + 8, _depth
3602                )
3603            }
3604            Option_::Router(ref val) => {
3605                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3606                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3607                    encoder, offset + 8, _depth
3608                )
3609            }
3610            Option_::TimeServer(ref val) => {
3611                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3612                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3613                    encoder, offset + 8, _depth
3614                )
3615            }
3616            Option_::NameServer(ref val) => {
3617                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3618                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3619                    encoder, offset + 8, _depth
3620                )
3621            }
3622            Option_::DomainNameServer(ref val) => {
3623                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3624                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3625                    encoder, offset + 8, _depth
3626                )
3627            }
3628            Option_::LogServer(ref val) => {
3629                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3630                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3631                    encoder, offset + 8, _depth
3632                )
3633            }
3634            Option_::CookieServer(ref val) => {
3635                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3636                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3637                    encoder, offset + 8, _depth
3638                )
3639            }
3640            Option_::LprServer(ref val) => {
3641                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3642                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3643                    encoder, offset + 8, _depth
3644                )
3645            }
3646            Option_::ImpressServer(ref val) => {
3647                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3648                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3649                    encoder, offset + 8, _depth
3650                )
3651            }
3652            Option_::ResourceLocationServer(ref val) => {
3653                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3654                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3655                    encoder, offset + 8, _depth
3656                )
3657            }
3658            Option_::HostName(ref val) => {
3659                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3660                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3661                    encoder, offset + 8, _depth
3662                )
3663            }
3664            Option_::BootFileSize(ref val) => {
3665                fidl::encoding::encode_in_envelope::<u16, D>(
3666                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3667                    encoder, offset + 8, _depth
3668                )
3669            }
3670            Option_::MeritDumpFile(ref val) => {
3671                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3672                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3673                    encoder, offset + 8, _depth
3674                )
3675            }
3676            Option_::DomainName(ref val) => {
3677                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3678                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3679                    encoder, offset + 8, _depth
3680                )
3681            }
3682            Option_::SwapServer(ref val) => {
3683                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net__common::Ipv4Address, D>(
3684                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3685                    encoder, offset + 8, _depth
3686                )
3687            }
3688            Option_::RootPath(ref val) => {
3689                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3690                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3691                    encoder, offset + 8, _depth
3692                )
3693            }
3694            Option_::ExtensionsPath(ref val) => {
3695                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3696                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3697                    encoder, offset + 8, _depth
3698                )
3699            }
3700            Option_::IpForwarding(ref val) => {
3701                fidl::encoding::encode_in_envelope::<bool, D>(
3702                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3703                    encoder, offset + 8, _depth
3704                )
3705            }
3706            Option_::NonLocalSourceRouting(ref val) => {
3707                fidl::encoding::encode_in_envelope::<bool, D>(
3708                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3709                    encoder, offset + 8, _depth
3710                )
3711            }
3712            Option_::PolicyFilter(ref val) => {
3713                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3714                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3715                    encoder, offset + 8, _depth
3716                )
3717            }
3718            Option_::MaxDatagramReassemblySize(ref val) => {
3719                fidl::encoding::encode_in_envelope::<u16, D>(
3720                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3721                    encoder, offset + 8, _depth
3722                )
3723            }
3724            Option_::DefaultIpTtl(ref val) => {
3725                fidl::encoding::encode_in_envelope::<u8, D>(
3726                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3727                    encoder, offset + 8, _depth
3728                )
3729            }
3730            Option_::PathMtuAgingTimeout(ref val) => {
3731                fidl::encoding::encode_in_envelope::<u32, D>(
3732                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3733                    encoder, offset + 8, _depth
3734                )
3735            }
3736            Option_::PathMtuPlateauTable(ref val) => {
3737                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u16, 127>, D>(
3738                    <fidl::encoding::Vector<u16, 127> as fidl::encoding::ValueTypeMarker>::borrow(val),
3739                    encoder, offset + 8, _depth
3740                )
3741            }
3742            Option_::InterfaceMtu(ref val) => {
3743                fidl::encoding::encode_in_envelope::<u16, D>(
3744                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3745                    encoder, offset + 8, _depth
3746                )
3747            }
3748            Option_::AllSubnetsLocal(ref val) => {
3749                fidl::encoding::encode_in_envelope::<bool, D>(
3750                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3751                    encoder, offset + 8, _depth
3752                )
3753            }
3754            Option_::BroadcastAddress(ref val) => {
3755                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net__common::Ipv4Address, D>(
3756                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3757                    encoder, offset + 8, _depth
3758                )
3759            }
3760            Option_::PerformMaskDiscovery(ref val) => {
3761                fidl::encoding::encode_in_envelope::<bool, D>(
3762                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3763                    encoder, offset + 8, _depth
3764                )
3765            }
3766            Option_::MaskSupplier(ref val) => {
3767                fidl::encoding::encode_in_envelope::<bool, D>(
3768                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3769                    encoder, offset + 8, _depth
3770                )
3771            }
3772            Option_::PerformRouterDiscovery(ref val) => {
3773                fidl::encoding::encode_in_envelope::<bool, D>(
3774                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3775                    encoder, offset + 8, _depth
3776                )
3777            }
3778            Option_::RouterSolicitationAddress(ref val) => {
3779                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net__common::Ipv4Address, D>(
3780                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3781                    encoder, offset + 8, _depth
3782                )
3783            }
3784            Option_::StaticRoute(ref val) => {
3785                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3786                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3787                    encoder, offset + 8, _depth
3788                )
3789            }
3790            Option_::TrailerEncapsulation(ref val) => {
3791                fidl::encoding::encode_in_envelope::<bool, D>(
3792                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3793                    encoder, offset + 8, _depth
3794                )
3795            }
3796            Option_::ArpCacheTimeout(ref val) => {
3797                fidl::encoding::encode_in_envelope::<u32, D>(
3798                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3799                    encoder, offset + 8, _depth
3800                )
3801            }
3802            Option_::EthernetEncapsulation(ref val) => {
3803                fidl::encoding::encode_in_envelope::<bool, D>(
3804                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3805                    encoder, offset + 8, _depth
3806                )
3807            }
3808            Option_::TcpDefaultTtl(ref val) => {
3809                fidl::encoding::encode_in_envelope::<u8, D>(
3810                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3811                    encoder, offset + 8, _depth
3812                )
3813            }
3814            Option_::TcpKeepaliveInterval(ref val) => {
3815                fidl::encoding::encode_in_envelope::<u32, D>(
3816                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3817                    encoder, offset + 8, _depth
3818                )
3819            }
3820            Option_::TcpKeepaliveGarbage(ref val) => {
3821                fidl::encoding::encode_in_envelope::<bool, D>(
3822                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3823                    encoder, offset + 8, _depth
3824                )
3825            }
3826            Option_::NetworkInformationServiceDomain(ref val) => {
3827                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3828                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3829                    encoder, offset + 8, _depth
3830                )
3831            }
3832            Option_::NetworkInformationServers(ref val) => {
3833                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3834                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3835                    encoder, offset + 8, _depth
3836                )
3837            }
3838            Option_::NetworkTimeProtocolServers(ref val) => {
3839                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3840                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3841                    encoder, offset + 8, _depth
3842                )
3843            }
3844            Option_::VendorSpecificInformation(ref val) => {
3845                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 255>, D>(
3846                    <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3847                    encoder, offset + 8, _depth
3848                )
3849            }
3850            Option_::NetbiosOverTcpipNameServer(ref val) => {
3851                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3852                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3853                    encoder, offset + 8, _depth
3854                )
3855            }
3856            Option_::NetbiosOverTcpipDatagramDistributionServer(ref val) => {
3857                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3858                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3859                    encoder, offset + 8, _depth
3860                )
3861            }
3862            Option_::NetbiosOverTcpipNodeType(ref val) => {
3863                fidl::encoding::encode_in_envelope::<NodeTypes, D>(
3864                    <NodeTypes as fidl::encoding::ValueTypeMarker>::borrow(val),
3865                    encoder, offset + 8, _depth
3866                )
3867            }
3868            Option_::NetbiosOverTcpipScope(ref val) => {
3869                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3870                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3871                    encoder, offset + 8, _depth
3872                )
3873            }
3874            Option_::XWindowSystemFontServer(ref val) => {
3875                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3876                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3877                    encoder, offset + 8, _depth
3878                )
3879            }
3880            Option_::XWindowSystemDisplayManager(ref val) => {
3881                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3882                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3883                    encoder, offset + 8, _depth
3884                )
3885            }
3886            Option_::NetworkInformationServicePlusDomain(ref val) => {
3887                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3888                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3889                    encoder, offset + 8, _depth
3890                )
3891            }
3892            Option_::NetworkInformationServicePlusServers(ref val) => {
3893                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3894                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3895                    encoder, offset + 8, _depth
3896                )
3897            }
3898            Option_::MobileIpHomeAgent(ref val) => {
3899                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3900                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3901                    encoder, offset + 8, _depth
3902                )
3903            }
3904            Option_::SmtpServer(ref val) => {
3905                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3906                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3907                    encoder, offset + 8, _depth
3908                )
3909            }
3910            Option_::Pop3Server(ref val) => {
3911                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3912                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3913                    encoder, offset + 8, _depth
3914                )
3915            }
3916            Option_::NntpServer(ref val) => {
3917                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3918                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3919                    encoder, offset + 8, _depth
3920                )
3921            }
3922            Option_::DefaultWwwServer(ref val) => {
3923                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3924                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3925                    encoder, offset + 8, _depth
3926                )
3927            }
3928            Option_::DefaultFingerServer(ref val) => {
3929                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3930                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3931                    encoder, offset + 8, _depth
3932                )
3933            }
3934            Option_::DefaultIrcServer(ref val) => {
3935                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3936                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3937                    encoder, offset + 8, _depth
3938                )
3939            }
3940            Option_::StreettalkServer(ref val) => {
3941                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3942                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3943                    encoder, offset + 8, _depth
3944                )
3945            }
3946            Option_::StreettalkDirectoryAssistanceServer(ref val) => {
3947                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D>(
3948                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3949                    encoder, offset + 8, _depth
3950                )
3951            }
3952            Option_::OptionOverload(ref val) => {
3953                fidl::encoding::encode_in_envelope::<OptionOverloadValue, D>(
3954                    <OptionOverloadValue as fidl::encoding::ValueTypeMarker>::borrow(val),
3955                    encoder, offset + 8, _depth
3956                )
3957            }
3958            Option_::TftpServerName(ref val) => {
3959                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3960                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3961                    encoder, offset + 8, _depth
3962                )
3963            }
3964            Option_::BootfileName(ref val) => {
3965                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3966                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3967                    encoder, offset + 8, _depth
3968                )
3969            }
3970            Option_::MaxDhcpMessageSize(ref val) => {
3971                fidl::encoding::encode_in_envelope::<u16, D>(
3972                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3973                    encoder, offset + 8, _depth
3974                )
3975            }
3976            Option_::RenewalTimeValue(ref val) => {
3977                fidl::encoding::encode_in_envelope::<u32, D>(
3978                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3979                    encoder, offset + 8, _depth
3980                )
3981            }
3982            Option_::RebindingTimeValue(ref val) => {
3983                fidl::encoding::encode_in_envelope::<u32, D>(
3984                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3985                    encoder, offset + 8, _depth
3986                )
3987            }
3988            Option_::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
3989        }
3990        }
3991    }
3992
3993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Option_ {
3994        #[inline(always)]
3995        fn new_empty() -> Self {
3996            Self::__SourceBreaking { unknown_ordinal: 0 }
3997        }
3998
3999        #[inline]
4000        unsafe fn decode(
4001            &mut self,
4002            decoder: &mut fidl::encoding::Decoder<'_, D>,
4003            offset: usize,
4004            mut depth: fidl::encoding::Depth,
4005        ) -> fidl::Result<()> {
4006            decoder.debug_check_bounds::<Self>(offset);
4007            #[allow(unused_variables)]
4008            let next_out_of_line = decoder.next_out_of_line();
4009            let handles_before = decoder.remaining_handles();
4010            let (ordinal, inlined, num_bytes, num_handles) =
4011                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4012
4013            let member_inline_size = match ordinal {
4014            1 => <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4015            2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4016            3 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4017            4 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4018            5 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4019            6 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4020            7 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4021            8 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4022            9 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4023            10 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4024            11 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4025            12 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4026            13 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4027            14 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4028            15 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4029            16 => <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4030            17 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4031            18 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4032            19 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4033            20 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4034            21 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4035            22 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4036            23 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4037            24 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4038            25 => <fidl::encoding::Vector<u16, 127> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4039            26 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4040            27 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4041            28 => <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4042            29 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4043            30 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4044            31 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4045            32 => <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4046            33 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4047            34 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4048            35 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4049            36 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4050            37 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4051            38 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4052            39 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4053            40 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4054            41 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4055            42 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4056            43 => <fidl::encoding::Vector<u8, 255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4057            44 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4058            45 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4059            46 => <NodeTypes as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4060            47 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4061            48 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4062            49 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4063            50 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4064            51 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4065            52 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4066            53 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4067            54 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4068            55 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4069            56 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4070            57 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4071            58 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4072            59 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4073            60 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4074            61 => <OptionOverloadValue as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4075            62 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4076            63 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4077            64 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4078            65 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4079            66 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4080            0 => return Err(fidl::Error::UnknownUnionTag),
4081            _ => num_bytes as usize,
4082        };
4083
4084            if inlined != (member_inline_size <= 4) {
4085                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4086            }
4087            let _inner_offset;
4088            if inlined {
4089                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4090                _inner_offset = offset + 8;
4091            } else {
4092                depth.increment()?;
4093                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4094            }
4095            match ordinal {
4096                1 => {
4097                    #[allow(irrefutable_let_patterns)]
4098                    if let Option_::SubnetMask(_) = self {
4099                        // Do nothing, read the value into the object
4100                    } else {
4101                        // Initialize `self` to the right variant
4102                        *self = Option_::SubnetMask(fidl::new_empty!(
4103                            fidl_fuchsia_net__common::Ipv4Address,
4104                            D
4105                        ));
4106                    }
4107                    #[allow(irrefutable_let_patterns)]
4108                    if let Option_::SubnetMask(ref mut val) = self {
4109                        fidl::decode!(
4110                            fidl_fuchsia_net__common::Ipv4Address,
4111                            D,
4112                            val,
4113                            decoder,
4114                            _inner_offset,
4115                            depth
4116                        )?;
4117                    } else {
4118                        unreachable!()
4119                    }
4120                }
4121                2 => {
4122                    #[allow(irrefutable_let_patterns)]
4123                    if let Option_::TimeOffset(_) = self {
4124                        // Do nothing, read the value into the object
4125                    } else {
4126                        // Initialize `self` to the right variant
4127                        *self = Option_::TimeOffset(fidl::new_empty!(i32, D));
4128                    }
4129                    #[allow(irrefutable_let_patterns)]
4130                    if let Option_::TimeOffset(ref mut val) = self {
4131                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4132                    } else {
4133                        unreachable!()
4134                    }
4135                }
4136                3 => {
4137                    #[allow(irrefutable_let_patterns)]
4138                    if let Option_::Router(_) = self {
4139                        // Do nothing, read the value into the object
4140                    } else {
4141                        // Initialize `self` to the right variant
4142                        *self = Option_::Router(
4143                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4144                        );
4145                    }
4146                    #[allow(irrefutable_let_patterns)]
4147                    if let Option_::Router(ref mut val) = self {
4148                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4149                    } else {
4150                        unreachable!()
4151                    }
4152                }
4153                4 => {
4154                    #[allow(irrefutable_let_patterns)]
4155                    if let Option_::TimeServer(_) = self {
4156                        // Do nothing, read the value into the object
4157                    } else {
4158                        // Initialize `self` to the right variant
4159                        *self = Option_::TimeServer(
4160                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4161                        );
4162                    }
4163                    #[allow(irrefutable_let_patterns)]
4164                    if let Option_::TimeServer(ref mut val) = self {
4165                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4166                    } else {
4167                        unreachable!()
4168                    }
4169                }
4170                5 => {
4171                    #[allow(irrefutable_let_patterns)]
4172                    if let Option_::NameServer(_) = self {
4173                        // Do nothing, read the value into the object
4174                    } else {
4175                        // Initialize `self` to the right variant
4176                        *self = Option_::NameServer(
4177                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4178                        );
4179                    }
4180                    #[allow(irrefutable_let_patterns)]
4181                    if let Option_::NameServer(ref mut val) = self {
4182                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4183                    } else {
4184                        unreachable!()
4185                    }
4186                }
4187                6 => {
4188                    #[allow(irrefutable_let_patterns)]
4189                    if let Option_::DomainNameServer(_) = self {
4190                        // Do nothing, read the value into the object
4191                    } else {
4192                        // Initialize `self` to the right variant
4193                        *self = Option_::DomainNameServer(
4194                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4195                        );
4196                    }
4197                    #[allow(irrefutable_let_patterns)]
4198                    if let Option_::DomainNameServer(ref mut val) = self {
4199                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4200                    } else {
4201                        unreachable!()
4202                    }
4203                }
4204                7 => {
4205                    #[allow(irrefutable_let_patterns)]
4206                    if let Option_::LogServer(_) = self {
4207                        // Do nothing, read the value into the object
4208                    } else {
4209                        // Initialize `self` to the right variant
4210                        *self = Option_::LogServer(
4211                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4212                        );
4213                    }
4214                    #[allow(irrefutable_let_patterns)]
4215                    if let Option_::LogServer(ref mut val) = self {
4216                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4217                    } else {
4218                        unreachable!()
4219                    }
4220                }
4221                8 => {
4222                    #[allow(irrefutable_let_patterns)]
4223                    if let Option_::CookieServer(_) = self {
4224                        // Do nothing, read the value into the object
4225                    } else {
4226                        // Initialize `self` to the right variant
4227                        *self = Option_::CookieServer(
4228                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4229                        );
4230                    }
4231                    #[allow(irrefutable_let_patterns)]
4232                    if let Option_::CookieServer(ref mut val) = self {
4233                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4234                    } else {
4235                        unreachable!()
4236                    }
4237                }
4238                9 => {
4239                    #[allow(irrefutable_let_patterns)]
4240                    if let Option_::LprServer(_) = self {
4241                        // Do nothing, read the value into the object
4242                    } else {
4243                        // Initialize `self` to the right variant
4244                        *self = Option_::LprServer(
4245                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4246                        );
4247                    }
4248                    #[allow(irrefutable_let_patterns)]
4249                    if let Option_::LprServer(ref mut val) = self {
4250                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4251                    } else {
4252                        unreachable!()
4253                    }
4254                }
4255                10 => {
4256                    #[allow(irrefutable_let_patterns)]
4257                    if let Option_::ImpressServer(_) = self {
4258                        // Do nothing, read the value into the object
4259                    } else {
4260                        // Initialize `self` to the right variant
4261                        *self = Option_::ImpressServer(
4262                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4263                        );
4264                    }
4265                    #[allow(irrefutable_let_patterns)]
4266                    if let Option_::ImpressServer(ref mut val) = self {
4267                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4268                    } else {
4269                        unreachable!()
4270                    }
4271                }
4272                11 => {
4273                    #[allow(irrefutable_let_patterns)]
4274                    if let Option_::ResourceLocationServer(_) = self {
4275                        // Do nothing, read the value into the object
4276                    } else {
4277                        // Initialize `self` to the right variant
4278                        *self = Option_::ResourceLocationServer(
4279                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4280                        );
4281                    }
4282                    #[allow(irrefutable_let_patterns)]
4283                    if let Option_::ResourceLocationServer(ref mut val) = self {
4284                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4285                    } else {
4286                        unreachable!()
4287                    }
4288                }
4289                12 => {
4290                    #[allow(irrefutable_let_patterns)]
4291                    if let Option_::HostName(_) = self {
4292                        // Do nothing, read the value into the object
4293                    } else {
4294                        // Initialize `self` to the right variant
4295                        *self = Option_::HostName(fidl::new_empty!(
4296                            fidl::encoding::BoundedString<255>,
4297                            D
4298                        ));
4299                    }
4300                    #[allow(irrefutable_let_patterns)]
4301                    if let Option_::HostName(ref mut val) = self {
4302                        fidl::decode!(
4303                            fidl::encoding::BoundedString<255>,
4304                            D,
4305                            val,
4306                            decoder,
4307                            _inner_offset,
4308                            depth
4309                        )?;
4310                    } else {
4311                        unreachable!()
4312                    }
4313                }
4314                13 => {
4315                    #[allow(irrefutable_let_patterns)]
4316                    if let Option_::BootFileSize(_) = self {
4317                        // Do nothing, read the value into the object
4318                    } else {
4319                        // Initialize `self` to the right variant
4320                        *self = Option_::BootFileSize(fidl::new_empty!(u16, D));
4321                    }
4322                    #[allow(irrefutable_let_patterns)]
4323                    if let Option_::BootFileSize(ref mut val) = self {
4324                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
4325                    } else {
4326                        unreachable!()
4327                    }
4328                }
4329                14 => {
4330                    #[allow(irrefutable_let_patterns)]
4331                    if let Option_::MeritDumpFile(_) = self {
4332                        // Do nothing, read the value into the object
4333                    } else {
4334                        // Initialize `self` to the right variant
4335                        *self = Option_::MeritDumpFile(fidl::new_empty!(
4336                            fidl::encoding::BoundedString<255>,
4337                            D
4338                        ));
4339                    }
4340                    #[allow(irrefutable_let_patterns)]
4341                    if let Option_::MeritDumpFile(ref mut val) = self {
4342                        fidl::decode!(
4343                            fidl::encoding::BoundedString<255>,
4344                            D,
4345                            val,
4346                            decoder,
4347                            _inner_offset,
4348                            depth
4349                        )?;
4350                    } else {
4351                        unreachable!()
4352                    }
4353                }
4354                15 => {
4355                    #[allow(irrefutable_let_patterns)]
4356                    if let Option_::DomainName(_) = self {
4357                        // Do nothing, read the value into the object
4358                    } else {
4359                        // Initialize `self` to the right variant
4360                        *self = Option_::DomainName(fidl::new_empty!(
4361                            fidl::encoding::BoundedString<255>,
4362                            D
4363                        ));
4364                    }
4365                    #[allow(irrefutable_let_patterns)]
4366                    if let Option_::DomainName(ref mut val) = self {
4367                        fidl::decode!(
4368                            fidl::encoding::BoundedString<255>,
4369                            D,
4370                            val,
4371                            decoder,
4372                            _inner_offset,
4373                            depth
4374                        )?;
4375                    } else {
4376                        unreachable!()
4377                    }
4378                }
4379                16 => {
4380                    #[allow(irrefutable_let_patterns)]
4381                    if let Option_::SwapServer(_) = self {
4382                        // Do nothing, read the value into the object
4383                    } else {
4384                        // Initialize `self` to the right variant
4385                        *self = Option_::SwapServer(fidl::new_empty!(
4386                            fidl_fuchsia_net__common::Ipv4Address,
4387                            D
4388                        ));
4389                    }
4390                    #[allow(irrefutable_let_patterns)]
4391                    if let Option_::SwapServer(ref mut val) = self {
4392                        fidl::decode!(
4393                            fidl_fuchsia_net__common::Ipv4Address,
4394                            D,
4395                            val,
4396                            decoder,
4397                            _inner_offset,
4398                            depth
4399                        )?;
4400                    } else {
4401                        unreachable!()
4402                    }
4403                }
4404                17 => {
4405                    #[allow(irrefutable_let_patterns)]
4406                    if let Option_::RootPath(_) = self {
4407                        // Do nothing, read the value into the object
4408                    } else {
4409                        // Initialize `self` to the right variant
4410                        *self = Option_::RootPath(fidl::new_empty!(
4411                            fidl::encoding::BoundedString<255>,
4412                            D
4413                        ));
4414                    }
4415                    #[allow(irrefutable_let_patterns)]
4416                    if let Option_::RootPath(ref mut val) = self {
4417                        fidl::decode!(
4418                            fidl::encoding::BoundedString<255>,
4419                            D,
4420                            val,
4421                            decoder,
4422                            _inner_offset,
4423                            depth
4424                        )?;
4425                    } else {
4426                        unreachable!()
4427                    }
4428                }
4429                18 => {
4430                    #[allow(irrefutable_let_patterns)]
4431                    if let Option_::ExtensionsPath(_) = self {
4432                        // Do nothing, read the value into the object
4433                    } else {
4434                        // Initialize `self` to the right variant
4435                        *self = Option_::ExtensionsPath(fidl::new_empty!(
4436                            fidl::encoding::BoundedString<255>,
4437                            D
4438                        ));
4439                    }
4440                    #[allow(irrefutable_let_patterns)]
4441                    if let Option_::ExtensionsPath(ref mut val) = self {
4442                        fidl::decode!(
4443                            fidl::encoding::BoundedString<255>,
4444                            D,
4445                            val,
4446                            decoder,
4447                            _inner_offset,
4448                            depth
4449                        )?;
4450                    } else {
4451                        unreachable!()
4452                    }
4453                }
4454                19 => {
4455                    #[allow(irrefutable_let_patterns)]
4456                    if let Option_::IpForwarding(_) = self {
4457                        // Do nothing, read the value into the object
4458                    } else {
4459                        // Initialize `self` to the right variant
4460                        *self = Option_::IpForwarding(fidl::new_empty!(bool, D));
4461                    }
4462                    #[allow(irrefutable_let_patterns)]
4463                    if let Option_::IpForwarding(ref mut val) = self {
4464                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4465                    } else {
4466                        unreachable!()
4467                    }
4468                }
4469                20 => {
4470                    #[allow(irrefutable_let_patterns)]
4471                    if let Option_::NonLocalSourceRouting(_) = self {
4472                        // Do nothing, read the value into the object
4473                    } else {
4474                        // Initialize `self` to the right variant
4475                        *self = Option_::NonLocalSourceRouting(fidl::new_empty!(bool, D));
4476                    }
4477                    #[allow(irrefutable_let_patterns)]
4478                    if let Option_::NonLocalSourceRouting(ref mut val) = self {
4479                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4480                    } else {
4481                        unreachable!()
4482                    }
4483                }
4484                21 => {
4485                    #[allow(irrefutable_let_patterns)]
4486                    if let Option_::PolicyFilter(_) = self {
4487                        // Do nothing, read the value into the object
4488                    } else {
4489                        // Initialize `self` to the right variant
4490                        *self = Option_::PolicyFilter(
4491                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4492                        );
4493                    }
4494                    #[allow(irrefutable_let_patterns)]
4495                    if let Option_::PolicyFilter(ref mut val) = self {
4496                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4497                    } else {
4498                        unreachable!()
4499                    }
4500                }
4501                22 => {
4502                    #[allow(irrefutable_let_patterns)]
4503                    if let Option_::MaxDatagramReassemblySize(_) = self {
4504                        // Do nothing, read the value into the object
4505                    } else {
4506                        // Initialize `self` to the right variant
4507                        *self = Option_::MaxDatagramReassemblySize(fidl::new_empty!(u16, D));
4508                    }
4509                    #[allow(irrefutable_let_patterns)]
4510                    if let Option_::MaxDatagramReassemblySize(ref mut val) = self {
4511                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
4512                    } else {
4513                        unreachable!()
4514                    }
4515                }
4516                23 => {
4517                    #[allow(irrefutable_let_patterns)]
4518                    if let Option_::DefaultIpTtl(_) = self {
4519                        // Do nothing, read the value into the object
4520                    } else {
4521                        // Initialize `self` to the right variant
4522                        *self = Option_::DefaultIpTtl(fidl::new_empty!(u8, D));
4523                    }
4524                    #[allow(irrefutable_let_patterns)]
4525                    if let Option_::DefaultIpTtl(ref mut val) = self {
4526                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
4527                    } else {
4528                        unreachable!()
4529                    }
4530                }
4531                24 => {
4532                    #[allow(irrefutable_let_patterns)]
4533                    if let Option_::PathMtuAgingTimeout(_) = self {
4534                        // Do nothing, read the value into the object
4535                    } else {
4536                        // Initialize `self` to the right variant
4537                        *self = Option_::PathMtuAgingTimeout(fidl::new_empty!(u32, D));
4538                    }
4539                    #[allow(irrefutable_let_patterns)]
4540                    if let Option_::PathMtuAgingTimeout(ref mut val) = self {
4541                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
4542                    } else {
4543                        unreachable!()
4544                    }
4545                }
4546                25 => {
4547                    #[allow(irrefutable_let_patterns)]
4548                    if let Option_::PathMtuPlateauTable(_) = self {
4549                        // Do nothing, read the value into the object
4550                    } else {
4551                        // Initialize `self` to the right variant
4552                        *self = Option_::PathMtuPlateauTable(
4553                            fidl::new_empty!(fidl::encoding::Vector<u16, 127>, D),
4554                        );
4555                    }
4556                    #[allow(irrefutable_let_patterns)]
4557                    if let Option_::PathMtuPlateauTable(ref mut val) = self {
4558                        fidl::decode!(fidl::encoding::Vector<u16, 127>, D, val, decoder, _inner_offset, depth)?;
4559                    } else {
4560                        unreachable!()
4561                    }
4562                }
4563                26 => {
4564                    #[allow(irrefutable_let_patterns)]
4565                    if let Option_::InterfaceMtu(_) = self {
4566                        // Do nothing, read the value into the object
4567                    } else {
4568                        // Initialize `self` to the right variant
4569                        *self = Option_::InterfaceMtu(fidl::new_empty!(u16, D));
4570                    }
4571                    #[allow(irrefutable_let_patterns)]
4572                    if let Option_::InterfaceMtu(ref mut val) = self {
4573                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
4574                    } else {
4575                        unreachable!()
4576                    }
4577                }
4578                27 => {
4579                    #[allow(irrefutable_let_patterns)]
4580                    if let Option_::AllSubnetsLocal(_) = self {
4581                        // Do nothing, read the value into the object
4582                    } else {
4583                        // Initialize `self` to the right variant
4584                        *self = Option_::AllSubnetsLocal(fidl::new_empty!(bool, D));
4585                    }
4586                    #[allow(irrefutable_let_patterns)]
4587                    if let Option_::AllSubnetsLocal(ref mut val) = self {
4588                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4589                    } else {
4590                        unreachable!()
4591                    }
4592                }
4593                28 => {
4594                    #[allow(irrefutable_let_patterns)]
4595                    if let Option_::BroadcastAddress(_) = self {
4596                        // Do nothing, read the value into the object
4597                    } else {
4598                        // Initialize `self` to the right variant
4599                        *self = Option_::BroadcastAddress(fidl::new_empty!(
4600                            fidl_fuchsia_net__common::Ipv4Address,
4601                            D
4602                        ));
4603                    }
4604                    #[allow(irrefutable_let_patterns)]
4605                    if let Option_::BroadcastAddress(ref mut val) = self {
4606                        fidl::decode!(
4607                            fidl_fuchsia_net__common::Ipv4Address,
4608                            D,
4609                            val,
4610                            decoder,
4611                            _inner_offset,
4612                            depth
4613                        )?;
4614                    } else {
4615                        unreachable!()
4616                    }
4617                }
4618                29 => {
4619                    #[allow(irrefutable_let_patterns)]
4620                    if let Option_::PerformMaskDiscovery(_) = self {
4621                        // Do nothing, read the value into the object
4622                    } else {
4623                        // Initialize `self` to the right variant
4624                        *self = Option_::PerformMaskDiscovery(fidl::new_empty!(bool, D));
4625                    }
4626                    #[allow(irrefutable_let_patterns)]
4627                    if let Option_::PerformMaskDiscovery(ref mut val) = self {
4628                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4629                    } else {
4630                        unreachable!()
4631                    }
4632                }
4633                30 => {
4634                    #[allow(irrefutable_let_patterns)]
4635                    if let Option_::MaskSupplier(_) = self {
4636                        // Do nothing, read the value into the object
4637                    } else {
4638                        // Initialize `self` to the right variant
4639                        *self = Option_::MaskSupplier(fidl::new_empty!(bool, D));
4640                    }
4641                    #[allow(irrefutable_let_patterns)]
4642                    if let Option_::MaskSupplier(ref mut val) = self {
4643                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4644                    } else {
4645                        unreachable!()
4646                    }
4647                }
4648                31 => {
4649                    #[allow(irrefutable_let_patterns)]
4650                    if let Option_::PerformRouterDiscovery(_) = self {
4651                        // Do nothing, read the value into the object
4652                    } else {
4653                        // Initialize `self` to the right variant
4654                        *self = Option_::PerformRouterDiscovery(fidl::new_empty!(bool, D));
4655                    }
4656                    #[allow(irrefutable_let_patterns)]
4657                    if let Option_::PerformRouterDiscovery(ref mut val) = self {
4658                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4659                    } else {
4660                        unreachable!()
4661                    }
4662                }
4663                32 => {
4664                    #[allow(irrefutable_let_patterns)]
4665                    if let Option_::RouterSolicitationAddress(_) = self {
4666                        // Do nothing, read the value into the object
4667                    } else {
4668                        // Initialize `self` to the right variant
4669                        *self = Option_::RouterSolicitationAddress(fidl::new_empty!(
4670                            fidl_fuchsia_net__common::Ipv4Address,
4671                            D
4672                        ));
4673                    }
4674                    #[allow(irrefutable_let_patterns)]
4675                    if let Option_::RouterSolicitationAddress(ref mut val) = self {
4676                        fidl::decode!(
4677                            fidl_fuchsia_net__common::Ipv4Address,
4678                            D,
4679                            val,
4680                            decoder,
4681                            _inner_offset,
4682                            depth
4683                        )?;
4684                    } else {
4685                        unreachable!()
4686                    }
4687                }
4688                33 => {
4689                    #[allow(irrefutable_let_patterns)]
4690                    if let Option_::StaticRoute(_) = self {
4691                        // Do nothing, read the value into the object
4692                    } else {
4693                        // Initialize `self` to the right variant
4694                        *self = Option_::StaticRoute(
4695                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4696                        );
4697                    }
4698                    #[allow(irrefutable_let_patterns)]
4699                    if let Option_::StaticRoute(ref mut val) = self {
4700                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4701                    } else {
4702                        unreachable!()
4703                    }
4704                }
4705                34 => {
4706                    #[allow(irrefutable_let_patterns)]
4707                    if let Option_::TrailerEncapsulation(_) = self {
4708                        // Do nothing, read the value into the object
4709                    } else {
4710                        // Initialize `self` to the right variant
4711                        *self = Option_::TrailerEncapsulation(fidl::new_empty!(bool, D));
4712                    }
4713                    #[allow(irrefutable_let_patterns)]
4714                    if let Option_::TrailerEncapsulation(ref mut val) = self {
4715                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4716                    } else {
4717                        unreachable!()
4718                    }
4719                }
4720                35 => {
4721                    #[allow(irrefutable_let_patterns)]
4722                    if let Option_::ArpCacheTimeout(_) = self {
4723                        // Do nothing, read the value into the object
4724                    } else {
4725                        // Initialize `self` to the right variant
4726                        *self = Option_::ArpCacheTimeout(fidl::new_empty!(u32, D));
4727                    }
4728                    #[allow(irrefutable_let_patterns)]
4729                    if let Option_::ArpCacheTimeout(ref mut val) = self {
4730                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
4731                    } else {
4732                        unreachable!()
4733                    }
4734                }
4735                36 => {
4736                    #[allow(irrefutable_let_patterns)]
4737                    if let Option_::EthernetEncapsulation(_) = self {
4738                        // Do nothing, read the value into the object
4739                    } else {
4740                        // Initialize `self` to the right variant
4741                        *self = Option_::EthernetEncapsulation(fidl::new_empty!(bool, D));
4742                    }
4743                    #[allow(irrefutable_let_patterns)]
4744                    if let Option_::EthernetEncapsulation(ref mut val) = self {
4745                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4746                    } else {
4747                        unreachable!()
4748                    }
4749                }
4750                37 => {
4751                    #[allow(irrefutable_let_patterns)]
4752                    if let Option_::TcpDefaultTtl(_) = self {
4753                        // Do nothing, read the value into the object
4754                    } else {
4755                        // Initialize `self` to the right variant
4756                        *self = Option_::TcpDefaultTtl(fidl::new_empty!(u8, D));
4757                    }
4758                    #[allow(irrefutable_let_patterns)]
4759                    if let Option_::TcpDefaultTtl(ref mut val) = self {
4760                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
4761                    } else {
4762                        unreachable!()
4763                    }
4764                }
4765                38 => {
4766                    #[allow(irrefutable_let_patterns)]
4767                    if let Option_::TcpKeepaliveInterval(_) = self {
4768                        // Do nothing, read the value into the object
4769                    } else {
4770                        // Initialize `self` to the right variant
4771                        *self = Option_::TcpKeepaliveInterval(fidl::new_empty!(u32, D));
4772                    }
4773                    #[allow(irrefutable_let_patterns)]
4774                    if let Option_::TcpKeepaliveInterval(ref mut val) = self {
4775                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
4776                    } else {
4777                        unreachable!()
4778                    }
4779                }
4780                39 => {
4781                    #[allow(irrefutable_let_patterns)]
4782                    if let Option_::TcpKeepaliveGarbage(_) = self {
4783                        // Do nothing, read the value into the object
4784                    } else {
4785                        // Initialize `self` to the right variant
4786                        *self = Option_::TcpKeepaliveGarbage(fidl::new_empty!(bool, D));
4787                    }
4788                    #[allow(irrefutable_let_patterns)]
4789                    if let Option_::TcpKeepaliveGarbage(ref mut val) = self {
4790                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4791                    } else {
4792                        unreachable!()
4793                    }
4794                }
4795                40 => {
4796                    #[allow(irrefutable_let_patterns)]
4797                    if let Option_::NetworkInformationServiceDomain(_) = self {
4798                        // Do nothing, read the value into the object
4799                    } else {
4800                        // Initialize `self` to the right variant
4801                        *self = Option_::NetworkInformationServiceDomain(fidl::new_empty!(
4802                            fidl::encoding::BoundedString<255>,
4803                            D
4804                        ));
4805                    }
4806                    #[allow(irrefutable_let_patterns)]
4807                    if let Option_::NetworkInformationServiceDomain(ref mut val) = self {
4808                        fidl::decode!(
4809                            fidl::encoding::BoundedString<255>,
4810                            D,
4811                            val,
4812                            decoder,
4813                            _inner_offset,
4814                            depth
4815                        )?;
4816                    } else {
4817                        unreachable!()
4818                    }
4819                }
4820                41 => {
4821                    #[allow(irrefutable_let_patterns)]
4822                    if let Option_::NetworkInformationServers(_) = self {
4823                        // Do nothing, read the value into the object
4824                    } else {
4825                        // Initialize `self` to the right variant
4826                        *self = Option_::NetworkInformationServers(
4827                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4828                        );
4829                    }
4830                    #[allow(irrefutable_let_patterns)]
4831                    if let Option_::NetworkInformationServers(ref mut val) = self {
4832                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4833                    } else {
4834                        unreachable!()
4835                    }
4836                }
4837                42 => {
4838                    #[allow(irrefutable_let_patterns)]
4839                    if let Option_::NetworkTimeProtocolServers(_) = self {
4840                        // Do nothing, read the value into the object
4841                    } else {
4842                        // Initialize `self` to the right variant
4843                        *self = Option_::NetworkTimeProtocolServers(
4844                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4845                        );
4846                    }
4847                    #[allow(irrefutable_let_patterns)]
4848                    if let Option_::NetworkTimeProtocolServers(ref mut val) = self {
4849                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4850                    } else {
4851                        unreachable!()
4852                    }
4853                }
4854                43 => {
4855                    #[allow(irrefutable_let_patterns)]
4856                    if let Option_::VendorSpecificInformation(_) = self {
4857                        // Do nothing, read the value into the object
4858                    } else {
4859                        // Initialize `self` to the right variant
4860                        *self = Option_::VendorSpecificInformation(
4861                            fidl::new_empty!(fidl::encoding::Vector<u8, 255>, D),
4862                        );
4863                    }
4864                    #[allow(irrefutable_let_patterns)]
4865                    if let Option_::VendorSpecificInformation(ref mut val) = self {
4866                        fidl::decode!(fidl::encoding::Vector<u8, 255>, D, val, decoder, _inner_offset, depth)?;
4867                    } else {
4868                        unreachable!()
4869                    }
4870                }
4871                44 => {
4872                    #[allow(irrefutable_let_patterns)]
4873                    if let Option_::NetbiosOverTcpipNameServer(_) = self {
4874                        // Do nothing, read the value into the object
4875                    } else {
4876                        // Initialize `self` to the right variant
4877                        *self = Option_::NetbiosOverTcpipNameServer(
4878                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4879                        );
4880                    }
4881                    #[allow(irrefutable_let_patterns)]
4882                    if let Option_::NetbiosOverTcpipNameServer(ref mut val) = self {
4883                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4884                    } else {
4885                        unreachable!()
4886                    }
4887                }
4888                45 => {
4889                    #[allow(irrefutable_let_patterns)]
4890                    if let Option_::NetbiosOverTcpipDatagramDistributionServer(_) = self {
4891                        // Do nothing, read the value into the object
4892                    } else {
4893                        // Initialize `self` to the right variant
4894                        *self = Option_::NetbiosOverTcpipDatagramDistributionServer(
4895                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4896                        );
4897                    }
4898                    #[allow(irrefutable_let_patterns)]
4899                    if let Option_::NetbiosOverTcpipDatagramDistributionServer(ref mut val) = self {
4900                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4901                    } else {
4902                        unreachable!()
4903                    }
4904                }
4905                46 => {
4906                    #[allow(irrefutable_let_patterns)]
4907                    if let Option_::NetbiosOverTcpipNodeType(_) = self {
4908                        // Do nothing, read the value into the object
4909                    } else {
4910                        // Initialize `self` to the right variant
4911                        *self = Option_::NetbiosOverTcpipNodeType(fidl::new_empty!(NodeTypes, D));
4912                    }
4913                    #[allow(irrefutable_let_patterns)]
4914                    if let Option_::NetbiosOverTcpipNodeType(ref mut val) = self {
4915                        fidl::decode!(NodeTypes, D, val, decoder, _inner_offset, depth)?;
4916                    } else {
4917                        unreachable!()
4918                    }
4919                }
4920                47 => {
4921                    #[allow(irrefutable_let_patterns)]
4922                    if let Option_::NetbiosOverTcpipScope(_) = self {
4923                        // Do nothing, read the value into the object
4924                    } else {
4925                        // Initialize `self` to the right variant
4926                        *self = Option_::NetbiosOverTcpipScope(fidl::new_empty!(
4927                            fidl::encoding::BoundedString<255>,
4928                            D
4929                        ));
4930                    }
4931                    #[allow(irrefutable_let_patterns)]
4932                    if let Option_::NetbiosOverTcpipScope(ref mut val) = self {
4933                        fidl::decode!(
4934                            fidl::encoding::BoundedString<255>,
4935                            D,
4936                            val,
4937                            decoder,
4938                            _inner_offset,
4939                            depth
4940                        )?;
4941                    } else {
4942                        unreachable!()
4943                    }
4944                }
4945                48 => {
4946                    #[allow(irrefutable_let_patterns)]
4947                    if let Option_::XWindowSystemFontServer(_) = self {
4948                        // Do nothing, read the value into the object
4949                    } else {
4950                        // Initialize `self` to the right variant
4951                        *self = Option_::XWindowSystemFontServer(
4952                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4953                        );
4954                    }
4955                    #[allow(irrefutable_let_patterns)]
4956                    if let Option_::XWindowSystemFontServer(ref mut val) = self {
4957                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4958                    } else {
4959                        unreachable!()
4960                    }
4961                }
4962                49 => {
4963                    #[allow(irrefutable_let_patterns)]
4964                    if let Option_::XWindowSystemDisplayManager(_) = self {
4965                        // Do nothing, read the value into the object
4966                    } else {
4967                        // Initialize `self` to the right variant
4968                        *self = Option_::XWindowSystemDisplayManager(
4969                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
4970                        );
4971                    }
4972                    #[allow(irrefutable_let_patterns)]
4973                    if let Option_::XWindowSystemDisplayManager(ref mut val) = self {
4974                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4975                    } else {
4976                        unreachable!()
4977                    }
4978                }
4979                50 => {
4980                    #[allow(irrefutable_let_patterns)]
4981                    if let Option_::NetworkInformationServicePlusDomain(_) = self {
4982                        // Do nothing, read the value into the object
4983                    } else {
4984                        // Initialize `self` to the right variant
4985                        *self = Option_::NetworkInformationServicePlusDomain(fidl::new_empty!(
4986                            fidl::encoding::BoundedString<255>,
4987                            D
4988                        ));
4989                    }
4990                    #[allow(irrefutable_let_patterns)]
4991                    if let Option_::NetworkInformationServicePlusDomain(ref mut val) = self {
4992                        fidl::decode!(
4993                            fidl::encoding::BoundedString<255>,
4994                            D,
4995                            val,
4996                            decoder,
4997                            _inner_offset,
4998                            depth
4999                        )?;
5000                    } else {
5001                        unreachable!()
5002                    }
5003                }
5004                51 => {
5005                    #[allow(irrefutable_let_patterns)]
5006                    if let Option_::NetworkInformationServicePlusServers(_) = self {
5007                        // Do nothing, read the value into the object
5008                    } else {
5009                        // Initialize `self` to the right variant
5010                        *self = Option_::NetworkInformationServicePlusServers(
5011                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5012                        );
5013                    }
5014                    #[allow(irrefutable_let_patterns)]
5015                    if let Option_::NetworkInformationServicePlusServers(ref mut val) = self {
5016                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5017                    } else {
5018                        unreachable!()
5019                    }
5020                }
5021                52 => {
5022                    #[allow(irrefutable_let_patterns)]
5023                    if let Option_::MobileIpHomeAgent(_) = self {
5024                        // Do nothing, read the value into the object
5025                    } else {
5026                        // Initialize `self` to the right variant
5027                        *self = Option_::MobileIpHomeAgent(
5028                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5029                        );
5030                    }
5031                    #[allow(irrefutable_let_patterns)]
5032                    if let Option_::MobileIpHomeAgent(ref mut val) = self {
5033                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5034                    } else {
5035                        unreachable!()
5036                    }
5037                }
5038                53 => {
5039                    #[allow(irrefutable_let_patterns)]
5040                    if let Option_::SmtpServer(_) = self {
5041                        // Do nothing, read the value into the object
5042                    } else {
5043                        // Initialize `self` to the right variant
5044                        *self = Option_::SmtpServer(
5045                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5046                        );
5047                    }
5048                    #[allow(irrefutable_let_patterns)]
5049                    if let Option_::SmtpServer(ref mut val) = self {
5050                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5051                    } else {
5052                        unreachable!()
5053                    }
5054                }
5055                54 => {
5056                    #[allow(irrefutable_let_patterns)]
5057                    if let Option_::Pop3Server(_) = self {
5058                        // Do nothing, read the value into the object
5059                    } else {
5060                        // Initialize `self` to the right variant
5061                        *self = Option_::Pop3Server(
5062                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5063                        );
5064                    }
5065                    #[allow(irrefutable_let_patterns)]
5066                    if let Option_::Pop3Server(ref mut val) = self {
5067                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5068                    } else {
5069                        unreachable!()
5070                    }
5071                }
5072                55 => {
5073                    #[allow(irrefutable_let_patterns)]
5074                    if let Option_::NntpServer(_) = self {
5075                        // Do nothing, read the value into the object
5076                    } else {
5077                        // Initialize `self` to the right variant
5078                        *self = Option_::NntpServer(
5079                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5080                        );
5081                    }
5082                    #[allow(irrefutable_let_patterns)]
5083                    if let Option_::NntpServer(ref mut val) = self {
5084                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5085                    } else {
5086                        unreachable!()
5087                    }
5088                }
5089                56 => {
5090                    #[allow(irrefutable_let_patterns)]
5091                    if let Option_::DefaultWwwServer(_) = self {
5092                        // Do nothing, read the value into the object
5093                    } else {
5094                        // Initialize `self` to the right variant
5095                        *self = Option_::DefaultWwwServer(
5096                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5097                        );
5098                    }
5099                    #[allow(irrefutable_let_patterns)]
5100                    if let Option_::DefaultWwwServer(ref mut val) = self {
5101                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5102                    } else {
5103                        unreachable!()
5104                    }
5105                }
5106                57 => {
5107                    #[allow(irrefutable_let_patterns)]
5108                    if let Option_::DefaultFingerServer(_) = self {
5109                        // Do nothing, read the value into the object
5110                    } else {
5111                        // Initialize `self` to the right variant
5112                        *self = Option_::DefaultFingerServer(
5113                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5114                        );
5115                    }
5116                    #[allow(irrefutable_let_patterns)]
5117                    if let Option_::DefaultFingerServer(ref mut val) = self {
5118                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5119                    } else {
5120                        unreachable!()
5121                    }
5122                }
5123                58 => {
5124                    #[allow(irrefutable_let_patterns)]
5125                    if let Option_::DefaultIrcServer(_) = self {
5126                        // Do nothing, read the value into the object
5127                    } else {
5128                        // Initialize `self` to the right variant
5129                        *self = Option_::DefaultIrcServer(
5130                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5131                        );
5132                    }
5133                    #[allow(irrefutable_let_patterns)]
5134                    if let Option_::DefaultIrcServer(ref mut val) = self {
5135                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5136                    } else {
5137                        unreachable!()
5138                    }
5139                }
5140                59 => {
5141                    #[allow(irrefutable_let_patterns)]
5142                    if let Option_::StreettalkServer(_) = self {
5143                        // Do nothing, read the value into the object
5144                    } else {
5145                        // Initialize `self` to the right variant
5146                        *self = Option_::StreettalkServer(
5147                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5148                        );
5149                    }
5150                    #[allow(irrefutable_let_patterns)]
5151                    if let Option_::StreettalkServer(ref mut val) = self {
5152                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5153                    } else {
5154                        unreachable!()
5155                    }
5156                }
5157                60 => {
5158                    #[allow(irrefutable_let_patterns)]
5159                    if let Option_::StreettalkDirectoryAssistanceServer(_) = self {
5160                        // Do nothing, read the value into the object
5161                    } else {
5162                        // Initialize `self` to the right variant
5163                        *self = Option_::StreettalkDirectoryAssistanceServer(
5164                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D),
5165                        );
5166                    }
5167                    #[allow(irrefutable_let_patterns)]
5168                    if let Option_::StreettalkDirectoryAssistanceServer(ref mut val) = self {
5169                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5170                    } else {
5171                        unreachable!()
5172                    }
5173                }
5174                61 => {
5175                    #[allow(irrefutable_let_patterns)]
5176                    if let Option_::OptionOverload(_) = self {
5177                        // Do nothing, read the value into the object
5178                    } else {
5179                        // Initialize `self` to the right variant
5180                        *self = Option_::OptionOverload(fidl::new_empty!(OptionOverloadValue, D));
5181                    }
5182                    #[allow(irrefutable_let_patterns)]
5183                    if let Option_::OptionOverload(ref mut val) = self {
5184                        fidl::decode!(OptionOverloadValue, D, val, decoder, _inner_offset, depth)?;
5185                    } else {
5186                        unreachable!()
5187                    }
5188                }
5189                62 => {
5190                    #[allow(irrefutable_let_patterns)]
5191                    if let Option_::TftpServerName(_) = self {
5192                        // Do nothing, read the value into the object
5193                    } else {
5194                        // Initialize `self` to the right variant
5195                        *self = Option_::TftpServerName(fidl::new_empty!(
5196                            fidl::encoding::BoundedString<255>,
5197                            D
5198                        ));
5199                    }
5200                    #[allow(irrefutable_let_patterns)]
5201                    if let Option_::TftpServerName(ref mut val) = self {
5202                        fidl::decode!(
5203                            fidl::encoding::BoundedString<255>,
5204                            D,
5205                            val,
5206                            decoder,
5207                            _inner_offset,
5208                            depth
5209                        )?;
5210                    } else {
5211                        unreachable!()
5212                    }
5213                }
5214                63 => {
5215                    #[allow(irrefutable_let_patterns)]
5216                    if let Option_::BootfileName(_) = self {
5217                        // Do nothing, read the value into the object
5218                    } else {
5219                        // Initialize `self` to the right variant
5220                        *self = Option_::BootfileName(fidl::new_empty!(
5221                            fidl::encoding::BoundedString<255>,
5222                            D
5223                        ));
5224                    }
5225                    #[allow(irrefutable_let_patterns)]
5226                    if let Option_::BootfileName(ref mut val) = self {
5227                        fidl::decode!(
5228                            fidl::encoding::BoundedString<255>,
5229                            D,
5230                            val,
5231                            decoder,
5232                            _inner_offset,
5233                            depth
5234                        )?;
5235                    } else {
5236                        unreachable!()
5237                    }
5238                }
5239                64 => {
5240                    #[allow(irrefutable_let_patterns)]
5241                    if let Option_::MaxDhcpMessageSize(_) = self {
5242                        // Do nothing, read the value into the object
5243                    } else {
5244                        // Initialize `self` to the right variant
5245                        *self = Option_::MaxDhcpMessageSize(fidl::new_empty!(u16, D));
5246                    }
5247                    #[allow(irrefutable_let_patterns)]
5248                    if let Option_::MaxDhcpMessageSize(ref mut val) = self {
5249                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
5250                    } else {
5251                        unreachable!()
5252                    }
5253                }
5254                65 => {
5255                    #[allow(irrefutable_let_patterns)]
5256                    if let Option_::RenewalTimeValue(_) = self {
5257                        // Do nothing, read the value into the object
5258                    } else {
5259                        // Initialize `self` to the right variant
5260                        *self = Option_::RenewalTimeValue(fidl::new_empty!(u32, D));
5261                    }
5262                    #[allow(irrefutable_let_patterns)]
5263                    if let Option_::RenewalTimeValue(ref mut val) = self {
5264                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
5265                    } else {
5266                        unreachable!()
5267                    }
5268                }
5269                66 => {
5270                    #[allow(irrefutable_let_patterns)]
5271                    if let Option_::RebindingTimeValue(_) = self {
5272                        // Do nothing, read the value into the object
5273                    } else {
5274                        // Initialize `self` to the right variant
5275                        *self = Option_::RebindingTimeValue(fidl::new_empty!(u32, D));
5276                    }
5277                    #[allow(irrefutable_let_patterns)]
5278                    if let Option_::RebindingTimeValue(ref mut val) = self {
5279                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
5280                    } else {
5281                        unreachable!()
5282                    }
5283                }
5284                #[allow(deprecated)]
5285                ordinal => {
5286                    for _ in 0..num_handles {
5287                        decoder.drop_next_handle()?;
5288                    }
5289                    *self = Option_::__SourceBreaking { unknown_ordinal: ordinal };
5290                }
5291            }
5292            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5293                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5294            }
5295            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5296                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5297            }
5298            Ok(())
5299        }
5300    }
5301
5302    impl fidl::encoding::ValueTypeMarker for Parameter {
5303        type Borrowed<'a> = &'a Self;
5304        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5305            value
5306        }
5307    }
5308
5309    unsafe impl fidl::encoding::TypeMarker for Parameter {
5310        type Owned = Self;
5311
5312        #[inline(always)]
5313        fn inline_align(_context: fidl::encoding::Context) -> usize {
5314            8
5315        }
5316
5317        #[inline(always)]
5318        fn inline_size(_context: fidl::encoding::Context) -> usize {
5319            16
5320        }
5321    }
5322
5323    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Parameter, D>
5324        for &Parameter
5325    {
5326        #[inline]
5327        unsafe fn encode(
5328            self,
5329            encoder: &mut fidl::encoding::Encoder<'_, D>,
5330            offset: usize,
5331            _depth: fidl::encoding::Depth,
5332        ) -> fidl::Result<()> {
5333            encoder.debug_check_bounds::<Parameter>(offset);
5334            encoder.write_num::<u64>(self.ordinal(), offset);
5335            match self {
5336            Parameter::IpAddrs(ref val) => {
5337                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 256>, D>(
5338                    <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5339                    encoder, offset + 8, _depth
5340                )
5341            }
5342            Parameter::AddressPool(ref val) => {
5343                fidl::encoding::encode_in_envelope::<AddressPool, D>(
5344                    <AddressPool as fidl::encoding::ValueTypeMarker>::borrow(val),
5345                    encoder, offset + 8, _depth
5346                )
5347            }
5348            Parameter::Lease(ref val) => {
5349                fidl::encoding::encode_in_envelope::<LeaseLength, D>(
5350                    <LeaseLength as fidl::encoding::ValueTypeMarker>::borrow(val),
5351                    encoder, offset + 8, _depth
5352                )
5353            }
5354            Parameter::PermittedMacs(ref val) => {
5355                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net__common::MacAddress, 256>, D>(
5356                    <fidl::encoding::Vector<fidl_fuchsia_net__common::MacAddress, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5357                    encoder, offset + 8, _depth
5358                )
5359            }
5360            Parameter::StaticallyAssignedAddrs(ref val) => {
5361                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<StaticAssignment, 256>, D>(
5362                    <fidl::encoding::Vector<StaticAssignment, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5363                    encoder, offset + 8, _depth
5364                )
5365            }
5366            Parameter::ArpProbe(ref val) => {
5367                fidl::encoding::encode_in_envelope::<bool, D>(
5368                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
5369                    encoder, offset + 8, _depth
5370                )
5371            }
5372            Parameter::BoundDeviceNames(ref val) => {
5373                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>, D>(
5374                    <fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5375                    encoder, offset + 8, _depth
5376                )
5377            }
5378            Parameter::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
5379        }
5380        }
5381    }
5382
5383    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Parameter {
5384        #[inline(always)]
5385        fn new_empty() -> Self {
5386            Self::__SourceBreaking { unknown_ordinal: 0 }
5387        }
5388
5389        #[inline]
5390        unsafe fn decode(
5391            &mut self,
5392            decoder: &mut fidl::encoding::Decoder<'_, D>,
5393            offset: usize,
5394            mut depth: fidl::encoding::Depth,
5395        ) -> fidl::Result<()> {
5396            decoder.debug_check_bounds::<Self>(offset);
5397            #[allow(unused_variables)]
5398            let next_out_of_line = decoder.next_out_of_line();
5399            let handles_before = decoder.remaining_handles();
5400            let (ordinal, inlined, num_bytes, num_handles) =
5401                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5402
5403            let member_inline_size = match ordinal {
5404            1 => <fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5405            2 => <AddressPool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5406            3 => <LeaseLength as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5407            4 => <fidl::encoding::Vector<fidl_fuchsia_net__common::MacAddress, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5408            5 => <fidl::encoding::Vector<StaticAssignment, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5409            6 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5410            7 => <fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5411            0 => return Err(fidl::Error::UnknownUnionTag),
5412            _ => num_bytes as usize,
5413        };
5414
5415            if inlined != (member_inline_size <= 4) {
5416                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5417            }
5418            let _inner_offset;
5419            if inlined {
5420                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5421                _inner_offset = offset + 8;
5422            } else {
5423                depth.increment()?;
5424                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5425            }
5426            match ordinal {
5427                1 => {
5428                    #[allow(irrefutable_let_patterns)]
5429                    if let Parameter::IpAddrs(_) = self {
5430                        // Do nothing, read the value into the object
5431                    } else {
5432                        // Initialize `self` to the right variant
5433                        *self = Parameter::IpAddrs(
5434                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 256>, D),
5435                        );
5436                    }
5437                    #[allow(irrefutable_let_patterns)]
5438                    if let Parameter::IpAddrs(ref mut val) = self {
5439                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::Ipv4Address, 256>, D, val, decoder, _inner_offset, depth)?;
5440                    } else {
5441                        unreachable!()
5442                    }
5443                }
5444                2 => {
5445                    #[allow(irrefutable_let_patterns)]
5446                    if let Parameter::AddressPool(_) = self {
5447                        // Do nothing, read the value into the object
5448                    } else {
5449                        // Initialize `self` to the right variant
5450                        *self = Parameter::AddressPool(fidl::new_empty!(AddressPool, D));
5451                    }
5452                    #[allow(irrefutable_let_patterns)]
5453                    if let Parameter::AddressPool(ref mut val) = self {
5454                        fidl::decode!(AddressPool, D, val, decoder, _inner_offset, depth)?;
5455                    } else {
5456                        unreachable!()
5457                    }
5458                }
5459                3 => {
5460                    #[allow(irrefutable_let_patterns)]
5461                    if let Parameter::Lease(_) = self {
5462                        // Do nothing, read the value into the object
5463                    } else {
5464                        // Initialize `self` to the right variant
5465                        *self = Parameter::Lease(fidl::new_empty!(LeaseLength, D));
5466                    }
5467                    #[allow(irrefutable_let_patterns)]
5468                    if let Parameter::Lease(ref mut val) = self {
5469                        fidl::decode!(LeaseLength, D, val, decoder, _inner_offset, depth)?;
5470                    } else {
5471                        unreachable!()
5472                    }
5473                }
5474                4 => {
5475                    #[allow(irrefutable_let_patterns)]
5476                    if let Parameter::PermittedMacs(_) = self {
5477                        // Do nothing, read the value into the object
5478                    } else {
5479                        // Initialize `self` to the right variant
5480                        *self = Parameter::PermittedMacs(
5481                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net__common::MacAddress, 256>, D),
5482                        );
5483                    }
5484                    #[allow(irrefutable_let_patterns)]
5485                    if let Parameter::PermittedMacs(ref mut val) = self {
5486                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net__common::MacAddress, 256>, D, val, decoder, _inner_offset, depth)?;
5487                    } else {
5488                        unreachable!()
5489                    }
5490                }
5491                5 => {
5492                    #[allow(irrefutable_let_patterns)]
5493                    if let Parameter::StaticallyAssignedAddrs(_) = self {
5494                        // Do nothing, read the value into the object
5495                    } else {
5496                        // Initialize `self` to the right variant
5497                        *self = Parameter::StaticallyAssignedAddrs(
5498                            fidl::new_empty!(fidl::encoding::Vector<StaticAssignment, 256>, D),
5499                        );
5500                    }
5501                    #[allow(irrefutable_let_patterns)]
5502                    if let Parameter::StaticallyAssignedAddrs(ref mut val) = self {
5503                        fidl::decode!(fidl::encoding::Vector<StaticAssignment, 256>, D, val, decoder, _inner_offset, depth)?;
5504                    } else {
5505                        unreachable!()
5506                    }
5507                }
5508                6 => {
5509                    #[allow(irrefutable_let_patterns)]
5510                    if let Parameter::ArpProbe(_) = self {
5511                        // Do nothing, read the value into the object
5512                    } else {
5513                        // Initialize `self` to the right variant
5514                        *self = Parameter::ArpProbe(fidl::new_empty!(bool, D));
5515                    }
5516                    #[allow(irrefutable_let_patterns)]
5517                    if let Parameter::ArpProbe(ref mut val) = self {
5518                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
5519                    } else {
5520                        unreachable!()
5521                    }
5522                }
5523                7 => {
5524                    #[allow(irrefutable_let_patterns)]
5525                    if let Parameter::BoundDeviceNames(_) = self {
5526                        // Do nothing, read the value into the object
5527                    } else {
5528                        // Initialize `self` to the right variant
5529                        *self = Parameter::BoundDeviceNames(fidl::new_empty!(
5530                            fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>,
5531                            D
5532                        ));
5533                    }
5534                    #[allow(irrefutable_let_patterns)]
5535                    if let Parameter::BoundDeviceNames(ref mut val) = self {
5536                        fidl::decode!(
5537                            fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>,
5538                            D,
5539                            val,
5540                            decoder,
5541                            _inner_offset,
5542                            depth
5543                        )?;
5544                    } else {
5545                        unreachable!()
5546                    }
5547                }
5548                #[allow(deprecated)]
5549                ordinal => {
5550                    for _ in 0..num_handles {
5551                        decoder.drop_next_handle()?;
5552                    }
5553                    *self = Parameter::__SourceBreaking { unknown_ordinal: ordinal };
5554                }
5555            }
5556            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5557                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5558            }
5559            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5560                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5561            }
5562            Ok(())
5563        }
5564    }
5565}