fidl_fuchsia_net_dhcp/
fidl_fuchsia_net_dhcp.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::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13/// A DHCP option field of IP addresses.
14///
15/// Per https://tools.ietf.org/html/rfc2132#section-2:
16///
17///   All other options are variable-length with a length octet following the tag octet.
18///
19/// The maximum length is given by 0xFF/sizeof([`fuchsia.net.Ipv4Address`]).
20pub type Addresses = Vec<fidl_fuchsia_net::Ipv4Address>;
21
22/// A DHCP option field of ASCII characters.
23///
24/// Per https://tools.ietf.org/html/rfc2132#section-2:
25///
26///   All other options are variable-length with a length octet following the tag octet.
27///
28/// Valid iff it consists of characters from the ASCII character set.
29pub type AsciiString = String;
30
31/// A DHCP duration value, in seconds. As specified in
32/// https://tools.ietf.org/html/rfc2131#section-3.3, DHCP duration values are
33/// relative times.
34pub type Duration = u32;
35
36/// The maximum possible number of DNS servers that can be included in an
37/// acquired DHCP configuration.
38///
39/// According to [RFC 2132 section
40/// 3.8](https://www.rfc-editor.org/rfc/rfc2132#section-3.8), the length of the
41/// DNS server list in bytes is represented in the protocol by an 8-bit unsigned
42/// integer:
43/// "[variable-length options have] a length octet following the tag octet. The
44/// value of the length octet does not include the two octets specifying the tag
45/// and length."
46/// 2^8 = 256, which divided by 4 bytes gives us 64 as an upper bound on the
47/// maximum possible number of DNS servers that can be included in an acquired
48/// DHCP configuration.
49pub const MAX_DNS_SERVERS: u8 = 64;
50
51/// The maximum possible number of routers that can be included in an acquired
52/// DHCP configuration.
53///
54/// According to [RFC 2132 section
55/// 3.5](https://www.rfc-editor.org/rfc/rfc2132#section-3.5), the length of the
56/// routers list in bytes is represented in the protocol by an 8-bit unsigned
57/// integer:
58/// "[variable-length options have] a length octet following the tag octet. The
59/// value of the length octet does not include the two octets specifying the
60/// tag and length."
61/// 2^8 = 256, which divided by 4 bytes gives us 64 as an upper bound on the
62/// maximum possible number of routers that can be included in an acquired
63/// DHCP configuration.
64pub const MAX_ROUTERS: u8 = 64;
65
66bitflags! {
67    /// A NetBIOS over TCP/IP node type as defined in RFC 1001/1002. This bitflag is for use with the
68    /// NetBiosOverTcpipNodeType option.
69    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
70    pub struct NodeTypes: u8 {
71        /// A B node type.
72        const B_NODE = 1;
73        /// A P node type.
74        const P_NODE = 2;
75        /// A M node type.
76        const M_NODE = 4;
77        /// A H node type.
78        const H_NODE = 8;
79    }
80}
81
82impl NodeTypes {
83    #[deprecated = "Strict bits should not use `has_unknown_bits`"]
84    #[inline(always)]
85    pub fn has_unknown_bits(&self) -> bool {
86        false
87    }
88
89    #[deprecated = "Strict bits should not use `get_unknown_bits`"]
90    #[inline(always)]
91    pub fn get_unknown_bits(&self) -> u8 {
92        0
93    }
94}
95
96#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
97#[repr(u32)]
98pub enum ClientExitReason {
99    /// A client already exists on the interface.
100    ClientAlreadyExistsOnInterface = 1,
101    /// More than one concurrent call to `WatchConfiguration` was made.
102    WatchConfigurationAlreadyPending = 2,
103    /// The interface identified is invalid for acquiring configuration.
104    InvalidInterface = 3,
105    /// Invalid `NewClientParams` were provided.
106    InvalidParams = 4,
107    /// The network was, or became, unreachable over the interface
108    /// provided to the DHCP client.
109    NetworkUnreachable = 5,
110    /// The client was unable to open a socket.
111    UnableToOpenSocket = 6,
112    /// Graceful shutdown was performed.
113    GracefulShutdown = 7,
114    /// An address acquired by this client was removed by a user.
115    AddressRemovedByUser = 8,
116    /// The `AddressStateProvider` for an address acquired by this
117    /// client exited with an error (or without providing a reason for
118    /// the address removal).
119    AddressStateProviderError = 9,
120}
121
122impl ClientExitReason {
123    #[inline]
124    pub fn from_primitive(prim: u32) -> Option<Self> {
125        match prim {
126            1 => Some(Self::ClientAlreadyExistsOnInterface),
127            2 => Some(Self::WatchConfigurationAlreadyPending),
128            3 => Some(Self::InvalidInterface),
129            4 => Some(Self::InvalidParams),
130            5 => Some(Self::NetworkUnreachable),
131            6 => Some(Self::UnableToOpenSocket),
132            7 => Some(Self::GracefulShutdown),
133            8 => Some(Self::AddressRemovedByUser),
134            9 => Some(Self::AddressStateProviderError),
135            _ => None,
136        }
137    }
138
139    #[inline]
140    pub const fn into_primitive(self) -> u32 {
141        self as u32
142    }
143
144    #[deprecated = "Strict enums should not use `is_unknown`"]
145    #[inline]
146    pub fn is_unknown(&self) -> bool {
147        false
148    }
149}
150
151/// The type of DHCP message. The DHCP protocol requires that all messages identify
152/// their type by including the MessageType option. These values are specified
153/// in https://tools.ietf.org/html/rfc2132#section-9.6.
154#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
155#[repr(u8)]
156pub enum MessageType {
157    /// A DHCP Discover message.
158    Dhcpdiscover = 1,
159    /// A DHCP Offer message.
160    Dhcpoffer = 2,
161    /// A DHCP Request message.
162    Dhcprequest = 3,
163    /// A DHCP Decline message.
164    Dhcpdecline = 4,
165    /// A DHCP Ack message.
166    Dhcpack = 5,
167    /// A DHCP Nak message;
168    Dhcpnak = 6,
169    /// A DHCP Release message;
170    Dhcprelease = 7,
171    /// A DHCP Inform message.
172    Dhcpinform = 8,
173}
174
175impl MessageType {
176    #[inline]
177    pub fn from_primitive(prim: u8) -> Option<Self> {
178        match prim {
179            1 => Some(Self::Dhcpdiscover),
180            2 => Some(Self::Dhcpoffer),
181            3 => Some(Self::Dhcprequest),
182            4 => Some(Self::Dhcpdecline),
183            5 => Some(Self::Dhcpack),
184            6 => Some(Self::Dhcpnak),
185            7 => Some(Self::Dhcprelease),
186            8 => Some(Self::Dhcpinform),
187            _ => None,
188        }
189    }
190
191    #[inline]
192    pub const fn into_primitive(self) -> u8 {
193        self as u8
194    }
195
196    #[deprecated = "Strict enums should not use `is_unknown`"]
197    #[inline]
198    pub fn is_unknown(&self) -> bool {
199        false
200    }
201}
202
203/// The code of a DHCP option to be retrieved by Server.GetOption(). The code
204/// values are from https://tools.ietf.org/html/rfc2132 and the enum variants
205/// have been listed in the order they are presented in the RFC.
206#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
207#[repr(u32)]
208pub enum OptionCode {
209    SubnetMask = 1,
210    TimeOffset = 2,
211    Router = 3,
212    TimeServer = 4,
213    NameServer = 5,
214    DomainNameServer = 6,
215    LogServer = 7,
216    CookieServer = 8,
217    LprServer = 9,
218    ImpressServer = 10,
219    ResourceLocationServer = 11,
220    HostName = 12,
221    BootFileSize = 13,
222    MeritDumpFile = 14,
223    DomainName = 15,
224    SwapServer = 16,
225    RootPath = 17,
226    ExtensionsPath = 18,
227    IpForwarding = 19,
228    NonLocalSourceRouting = 20,
229    PolicyFilter = 21,
230    MaxDatagramReassemblySize = 22,
231    DefaultIpTtl = 23,
232    PathMtuAgingTimeout = 24,
233    PathMtuPlateauTable = 25,
234    InterfaceMtu = 26,
235    AllSubnetsLocal = 27,
236    BroadcastAddress = 28,
237    PerformMaskDiscovery = 29,
238    MaskSupplier = 30,
239    PerformRouterDiscovery = 31,
240    RouterSolicitationAddress = 32,
241    StaticRoute = 33,
242    TrailerEncapsulation = 34,
243    ArpCacheTimeout = 35,
244    EthernetEncapsulation = 36,
245    TcpDefaultTtl = 37,
246    TcpKeepaliveInterval = 38,
247    TcpKeepaliveGarbage = 39,
248    NetworkInformationServiceDomain = 40,
249    NetworkInformationServers = 41,
250    NetworkTimeProtocolServers = 42,
251    VendorSpecificInformation = 43,
252    NetbiosOverTcpipNameServer = 44,
253    NetbiosOverTcpipDatagramDistributionServer = 45,
254    NetbiosOverTcpipNodeType = 46,
255    NetbiosOverTcpipScope = 47,
256    XWindowSystemFontServer = 48,
257    XWindowSystemDisplayManager = 49,
258    NetworkInformationServicePlusDomain = 64,
259    NetworkInformationServicePlusServers = 65,
260    MobileIpHomeAgent = 68,
261    SmtpServer = 69,
262    Pop3Server = 70,
263    NntpServer = 71,
264    DefaultWwwServer = 72,
265    DefaultFingerServer = 73,
266    DefaultIrcServer = 74,
267    StreettalkServer = 75,
268    StreettalkDirectoryAssistanceServer = 76,
269    OptionOverload = 52,
270    TftpServerName = 66,
271    BootfileName = 67,
272    MaxDhcpMessageSize = 57,
273    RenewalTimeValue = 58,
274    RebindingTimeValue = 59,
275}
276
277impl OptionCode {
278    #[inline]
279    pub fn from_primitive(prim: u32) -> Option<Self> {
280        match prim {
281            1 => Some(Self::SubnetMask),
282            2 => Some(Self::TimeOffset),
283            3 => Some(Self::Router),
284            4 => Some(Self::TimeServer),
285            5 => Some(Self::NameServer),
286            6 => Some(Self::DomainNameServer),
287            7 => Some(Self::LogServer),
288            8 => Some(Self::CookieServer),
289            9 => Some(Self::LprServer),
290            10 => Some(Self::ImpressServer),
291            11 => Some(Self::ResourceLocationServer),
292            12 => Some(Self::HostName),
293            13 => Some(Self::BootFileSize),
294            14 => Some(Self::MeritDumpFile),
295            15 => Some(Self::DomainName),
296            16 => Some(Self::SwapServer),
297            17 => Some(Self::RootPath),
298            18 => Some(Self::ExtensionsPath),
299            19 => Some(Self::IpForwarding),
300            20 => Some(Self::NonLocalSourceRouting),
301            21 => Some(Self::PolicyFilter),
302            22 => Some(Self::MaxDatagramReassemblySize),
303            23 => Some(Self::DefaultIpTtl),
304            24 => Some(Self::PathMtuAgingTimeout),
305            25 => Some(Self::PathMtuPlateauTable),
306            26 => Some(Self::InterfaceMtu),
307            27 => Some(Self::AllSubnetsLocal),
308            28 => Some(Self::BroadcastAddress),
309            29 => Some(Self::PerformMaskDiscovery),
310            30 => Some(Self::MaskSupplier),
311            31 => Some(Self::PerformRouterDiscovery),
312            32 => Some(Self::RouterSolicitationAddress),
313            33 => Some(Self::StaticRoute),
314            34 => Some(Self::TrailerEncapsulation),
315            35 => Some(Self::ArpCacheTimeout),
316            36 => Some(Self::EthernetEncapsulation),
317            37 => Some(Self::TcpDefaultTtl),
318            38 => Some(Self::TcpKeepaliveInterval),
319            39 => Some(Self::TcpKeepaliveGarbage),
320            40 => Some(Self::NetworkInformationServiceDomain),
321            41 => Some(Self::NetworkInformationServers),
322            42 => Some(Self::NetworkTimeProtocolServers),
323            43 => Some(Self::VendorSpecificInformation),
324            44 => Some(Self::NetbiosOverTcpipNameServer),
325            45 => Some(Self::NetbiosOverTcpipDatagramDistributionServer),
326            46 => Some(Self::NetbiosOverTcpipNodeType),
327            47 => Some(Self::NetbiosOverTcpipScope),
328            48 => Some(Self::XWindowSystemFontServer),
329            49 => Some(Self::XWindowSystemDisplayManager),
330            64 => Some(Self::NetworkInformationServicePlusDomain),
331            65 => Some(Self::NetworkInformationServicePlusServers),
332            68 => Some(Self::MobileIpHomeAgent),
333            69 => Some(Self::SmtpServer),
334            70 => Some(Self::Pop3Server),
335            71 => Some(Self::NntpServer),
336            72 => Some(Self::DefaultWwwServer),
337            73 => Some(Self::DefaultFingerServer),
338            74 => Some(Self::DefaultIrcServer),
339            75 => Some(Self::StreettalkServer),
340            76 => Some(Self::StreettalkDirectoryAssistanceServer),
341            52 => Some(Self::OptionOverload),
342            66 => Some(Self::TftpServerName),
343            67 => Some(Self::BootfileName),
344            57 => Some(Self::MaxDhcpMessageSize),
345            58 => Some(Self::RenewalTimeValue),
346            59 => Some(Self::RebindingTimeValue),
347            _ => None,
348        }
349    }
350
351    #[inline]
352    pub const fn into_primitive(self) -> u32 {
353        self as u32
354    }
355
356    #[deprecated = "Strict enums should not use `is_unknown`"]
357    #[inline]
358    pub fn is_unknown(&self) -> bool {
359        false
360    }
361}
362
363/// A indication of which DHCP message field should be used to store additional options.
364#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
365#[repr(u8)]
366pub enum OptionOverloadValue {
367    /// The file DHCP field.
368    File = 1,
369    /// The sname DHCP field.
370    Sname = 2,
371    /// Both file and sname DHCP fields.
372    Both = 3,
373}
374
375impl OptionOverloadValue {
376    #[inline]
377    pub fn from_primitive(prim: u8) -> Option<Self> {
378        match prim {
379            1 => Some(Self::File),
380            2 => Some(Self::Sname),
381            3 => Some(Self::Both),
382            _ => None,
383        }
384    }
385
386    #[inline]
387    pub const fn into_primitive(self) -> u8 {
388        self as u8
389    }
390
391    #[deprecated = "Strict enums should not use `is_unknown`"]
392    #[inline]
393    pub fn is_unknown(&self) -> bool {
394        false
395    }
396}
397
398/// The name of the Parameter to be retrieved by Server.GetParameter().
399#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
400#[repr(u32)]
401pub enum ParameterName {
402    IpAddrs = 0,
403    AddressPool = 1,
404    LeaseLength = 2,
405    PermittedMacs = 3,
406    StaticallyAssignedAddrs = 4,
407    ArpProbe = 5,
408    BoundDeviceNames = 6,
409}
410
411impl ParameterName {
412    #[inline]
413    pub fn from_primitive(prim: u32) -> Option<Self> {
414        match prim {
415            0 => Some(Self::IpAddrs),
416            1 => Some(Self::AddressPool),
417            2 => Some(Self::LeaseLength),
418            3 => Some(Self::PermittedMacs),
419            4 => Some(Self::StaticallyAssignedAddrs),
420            5 => Some(Self::ArpProbe),
421            6 => Some(Self::BoundDeviceNames),
422            _ => None,
423        }
424    }
425
426    #[inline]
427    pub const fn into_primitive(self) -> u32 {
428        self as u32
429    }
430
431    #[deprecated = "Strict enums should not use `is_unknown`"]
432    #[inline]
433    pub fn is_unknown(&self) -> bool {
434        false
435    }
436}
437
438#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
439pub struct ClientOnExitRequest {
440    pub reason: ClientExitReason,
441}
442
443impl fidl::Persistable for ClientOnExitRequest {}
444
445#[derive(Debug, PartialEq)]
446pub struct ClientProviderNewClientRequest {
447    /// The ID of the interface the client runs on.
448    pub interface_id: u64,
449    /// The parameters with which to create the DHCP client.
450    /// If `configuration_to_request` is unset and `request_ip_address` is
451    /// false, `request` is closed with terminal event `INVALID_PARAMS`.
452    pub params: NewClientParams,
453    pub request: fidl::endpoints::ServerEnd<ClientMarker>,
454}
455
456impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
457    for ClientProviderNewClientRequest
458{
459}
460
461#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
462pub struct ServerGetOptionRequest {
463    pub code: OptionCode,
464}
465
466impl fidl::Persistable for ServerGetOptionRequest {}
467
468#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
469pub struct ServerGetParameterRequest {
470    pub name: ParameterName,
471}
472
473impl fidl::Persistable for ServerGetParameterRequest {}
474
475#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
476pub struct ServerIsServingResponse {
477    pub enabled: bool,
478}
479
480impl fidl::Persistable for ServerIsServingResponse {}
481
482#[derive(Clone, Debug, PartialEq)]
483pub struct ServerSetOptionRequest {
484    pub value: Option_,
485}
486
487impl fidl::Persistable for ServerSetOptionRequest {}
488
489#[derive(Clone, Debug, PartialEq)]
490pub struct ServerSetParameterRequest {
491    pub value: Parameter,
492}
493
494impl fidl::Persistable for ServerSetParameterRequest {}
495
496#[derive(Clone, Debug, PartialEq)]
497pub struct ServerGetOptionResponse {
498    pub value: Option_,
499}
500
501impl fidl::Persistable for ServerGetOptionResponse {}
502
503#[derive(Clone, Debug, PartialEq)]
504pub struct ServerGetParameterResponse {
505    pub value: Parameter,
506}
507
508impl fidl::Persistable for ServerGetParameterResponse {}
509
510#[derive(Clone, Debug, PartialEq)]
511pub struct ServerListOptionsResponse {
512    pub options: Vec<Option_>,
513}
514
515impl fidl::Persistable for ServerListOptionsResponse {}
516
517#[derive(Clone, Debug, PartialEq)]
518pub struct ServerListParametersResponse {
519    pub parameters: Vec<Parameter>,
520}
521
522impl fidl::Persistable for ServerListParametersResponse {}
523
524#[derive(Debug, Default, PartialEq)]
525pub struct Address {
526    /// The assigned address and prefix length.
527    pub address: Option<fidl_fuchsia_net::Ipv4AddressWithPrefix>,
528    /// The parameters of the address.
529    pub address_parameters: Option<fidl_fuchsia_net_interfaces_admin::AddressParameters>,
530    /// Provides address assignment state and enables updating address
531    /// properties; the DHCP client closes the client end if the address
532    /// becomes invalid (its valid lifetime expires and Renew and Rebind
533    /// have not succeeded).
534    /// The server end can be closed with a terminal OnAddressRemoved
535    /// value in order to signal to the DHCP client that an address is
536    /// rejected (e.g. due to failing duplicate address detection).
537    pub address_state_provider: Option<
538        fidl::endpoints::ServerEnd<fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker>,
539    >,
540    #[doc(hidden)]
541    pub __source_breaking: fidl::marker::SourceBreaking,
542}
543
544impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Address {}
545
546#[derive(Clone, Debug, Default, PartialEq)]
547pub struct AddressPool {
548    /// The prefix length (in bits) of the address pool's subnet mask.
549    pub prefix_length: Option<u8>,
550    /// The starting address, inclusive, of the range of addresses which the
551    /// DHCP server will lease to clients.
552    pub range_start: Option<fidl_fuchsia_net::Ipv4Address>,
553    /// The ending address, exclusive, of the range of addresses which the
554    /// server will lease to clients.
555    pub range_stop: Option<fidl_fuchsia_net::Ipv4Address>,
556    #[doc(hidden)]
557    pub __source_breaking: fidl::marker::SourceBreaking,
558}
559
560impl fidl::Persistable for AddressPool {}
561
562#[derive(Debug, Default, PartialEq)]
563pub struct ClientWatchConfigurationResponse {
564    pub address: Option<Address>,
565    pub dns_servers: Option<Vec<fidl_fuchsia_net::Ipv4Address>>,
566    pub routers: Option<Vec<fidl_fuchsia_net::Ipv4Address>>,
567    #[doc(hidden)]
568    pub __source_breaking: fidl::marker::SourceBreaking,
569}
570
571impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
572    for ClientWatchConfigurationResponse
573{
574}
575
576/// Describes the configuration information the DHCP client requests from DHCP
577/// servers.
578#[derive(Clone, Debug, Default, PartialEq)]
579pub struct ConfigurationToRequest {
580    /// Request a list of IP addresses for routers on the client's subnet,
581    /// in order of preference.
582    /// See [RFC 2132 section 3.5](https://www.rfc-editor.org/rfc/rfc2132#section-3.5).
583    ///
584    /// If not set, interpreted as false.
585    pub routers: Option<bool>,
586    /// Request a list of available DNS servers.
587    /// See [RFC 2132 section 3.8](https://www.rfc-editor.org/rfc/rfc2132#section-3.8).
588    ///
589    /// If not set, interpreted as false.
590    pub dns_servers: Option<bool>,
591    #[doc(hidden)]
592    pub __source_breaking: fidl::marker::SourceBreaking,
593}
594
595impl fidl::Persistable for ConfigurationToRequest {}
596
597#[derive(Clone, Debug, Default, PartialEq)]
598pub struct LeaseLength {
599    /// The default lease length to be issued to clients. This field must
600    /// have a value.
601    pub default: Option<u32>,
602    /// The maximum lease length value which the server will issue to
603    /// clients who have requested a specific lease length. If omitted, the
604    /// max lease length is equivalent to the default lease length.
605    pub max: Option<u32>,
606    #[doc(hidden)]
607    pub __source_breaking: fidl::marker::SourceBreaking,
608}
609
610impl fidl::Persistable for LeaseLength {}
611
612#[derive(Clone, Debug, Default, PartialEq)]
613pub struct NewClientParams {
614    /// Parameters for describing the configuration information the DHCP
615    /// client requests from DHCP servers.
616    ///
617    /// If not set, interpreted as empty (no configuration information
618    /// is requested).
619    pub configuration_to_request: Option<ConfigurationToRequest>,
620    /// Whether the client negotiates an IP address.
621    ///
622    /// If false or not set, the client asks only for local
623    /// configuration parameters.
624    /// See [RFC 2131 section 3.4](https://www.rfc-editor.org/rfc/rfc2131#section-3.4).
625    pub request_ip_address: Option<bool>,
626    #[doc(hidden)]
627    pub __source_breaking: fidl::marker::SourceBreaking,
628}
629
630impl fidl::Persistable for NewClientParams {}
631
632#[derive(Clone, Debug, Default, PartialEq)]
633pub struct StaticAssignment {
634    /// The MAC address of the host or device which will have the static IP
635    /// address assignment.
636    pub host: Option<fidl_fuchsia_net::MacAddress>,
637    /// The IP address which the host or device will always be assigned the
638    /// server.
639    pub assigned_addr: Option<fidl_fuchsia_net::Ipv4Address>,
640    #[doc(hidden)]
641    pub __source_breaking: fidl::marker::SourceBreaking,
642}
643
644impl fidl::Persistable for StaticAssignment {}
645
646/// A generic representation of client configuration parameters and DHCP settings. Options are the
647/// mechanism by which the DHCP protocol communicates configuration parameters from a repository on
648/// a DHCP server to DHCP clients, or by which DHCP clients and servers communicate data relevant to
649/// a DHCP transaction.
650/// All DHCP option values must have a length which can fit within a single byte, i.e. less than 256.
651/// Options for which there is no reasonable administrator-configurable value have been omitted
652/// from this xunion. The omitted options are:
653/// * Pad - never has a value
654/// * End - never has a value
655/// * RequestedIpAddress - value always selected by the DHCP client.
656/// * DhcpMessageType - value always determined by state of transaction between DHCP client and server.
657/// * ServerIdentifier - value always determined by address to which the server is bound.
658/// * ParameterRequestList - value always selected by the DHCP client.
659/// * Message - value determined in response to runtime error.
660/// * VendorClassIdentifer - value always selected by the DHCP client.
661/// * ClientIdentifier - value always selected by the DHCP client.
662#[derive(Clone, Debug)]
663pub enum Option_ {
664    /// A 32-bit IPv4 subnet mask.
665    SubnetMask(fidl_fuchsia_net::Ipv4Address),
666    /// The client's offset from UTC in seconds. A positive offset is east of the zero meridian, and
667    /// a negative offset is west of the zero meridian.
668    TimeOffset(i32),
669    /// A list of the routers in a client's subnet, listed in order of preference.
670    Router(Vec<fidl_fuchsia_net::Ipv4Address>),
671    /// A list of time servers available to the client, in order of preference.
672    TimeServer(Vec<fidl_fuchsia_net::Ipv4Address>),
673    /// A list of IEN 116 Name servers available to the client, in order of preference.
674    NameServer(Vec<fidl_fuchsia_net::Ipv4Address>),
675    /// A list of Domain Name System servers available to the client, in order of preference;
676    DomainNameServer(Vec<fidl_fuchsia_net::Ipv4Address>),
677    /// A list of MIT-LCS UDP Log servers available to the client, in order of preference.
678    LogServer(Vec<fidl_fuchsia_net::Ipv4Address>),
679    /// A list of RFC 865 Cookie servers available to the client, in order of preference.
680    CookieServer(Vec<fidl_fuchsia_net::Ipv4Address>),
681    /// A list of RFC 1179 Line Printer servers available to the client, in order of preference.
682    LprServer(Vec<fidl_fuchsia_net::Ipv4Address>),
683    /// A list of Imagen Impress servers available to the client, in order of preference.
684    ImpressServer(Vec<fidl_fuchsia_net::Ipv4Address>),
685    /// A list of RFC 887 Resource Location servers available to the client, in order of preference.
686    ResourceLocationServer(Vec<fidl_fuchsia_net::Ipv4Address>),
687    /// The host name of the client, which may or may not be qualified with the local domain name.
688    HostName(String),
689    /// The size of the client's default boot image in 512-octet blocks.
690    BootFileSize(u16),
691    /// The path name to the client's core dump in the event the client crashes.
692    MeritDumpFile(String),
693    /// The client's domain name for use in resolving hostnames in the DNS.
694    DomainName(String),
695    /// The address of the client's swap server.
696    SwapServer(fidl_fuchsia_net::Ipv4Address),
697    /// The path name to the client's root disk.
698    RootPath(String),
699    /// The path name to a TFTP-retrievable file. This file contains data which can be interpreted
700    /// as the BOOTP vendor-extension field. Unlike the BOOTP vendor-extension field, this file has
701    /// an unconstrained length and any references to Tag 18 are ignored.
702    ExtensionsPath(String),
703    /// A flag which will enabled IP layer packet forwarding when true.
704    IpForwarding(bool),
705    /// A flag which will enable forwarding of IP packets with non-local source routes.
706    NonLocalSourceRouting(bool),
707    /// Policy filters for non-local source routing.
708    /// A list of IP Address and Subnet Mask pairs. If an incoming source-routed packet has a
709    /// next-hop that does not match one of these pairs, then the packet will be dropped.
710    PolicyFilter(Vec<fidl_fuchsia_net::Ipv4Address>),
711    /// The maximum sized datagram that the client should be able to reassemble, in octets. The
712    /// minimum legal value is 576.
713    MaxDatagramReassemblySize(u16),
714    /// The default time-to-live to use on outgoing IP datagrams. The value must be between 1 and
715    /// 255.
716    DefaultIpTtl(u8),
717    /// The timeout to be used when aging Path MTU values by the mechanism in RFC 1191.
718    PathMtuAgingTimeout(u32),
719    /// Table of MTU sizes for Path MTU Discovery.
720    /// A list of MTU sizes, ordered from smallest to largest. The smallest value cannot be smaller
721    /// than 68.
722    PathMtuPlateauTable(Vec<u16>),
723    /// The MTU for the client's interface. Minimum value of 68.
724    InterfaceMtu(u16),
725    /// A flag indicating if all subents of the IP network to which the client is connected have the
726    /// same MTU.
727    AllSubnetsLocal(bool),
728    /// The broadcast address of the client's subnet. Legal values are defined in RFC 1122.
729    BroadcastAddress(fidl_fuchsia_net::Ipv4Address),
730    /// A flag indicating whether the client should perform subnet mask discovery via ICMP.
731    PerformMaskDiscovery(bool),
732    /// A flag indicating whether the client should respond to subnet mask discovery requests via
733    /// ICMP.
734    MaskSupplier(bool),
735    /// A flag indicating whether the client should solicit routers using Router Discovery as
736    /// defined in RFC 1256.
737    PerformRouterDiscovery(bool),
738    /// The address to which the client should transmit Router Solicitation requests.
739    RouterSolicitationAddress(fidl_fuchsia_net::Ipv4Address),
740    /// Static Routes which the host should put in its routing cache.
741    /// A list of Destination address/Next-hop address pairs defining static routes for the client's
742    /// routing table. The routes should be listed in descending order of priority. It is illegal
743    /// to use 0.0.0.0 as the destination in a static route.
744    StaticRoute(Vec<fidl_fuchsia_net::Ipv4Address>),
745    /// A flag specifying whether the client negotiate the use of trailers when using ARP, per RFC
746    /// 893.
747    TrailerEncapsulation(bool),
748    /// The timeout for ARP cache entries.
749    ArpCacheTimeout(u32),
750    /// A flag specifying that the client should use Ethernet v2 encapsulation when false, and IEEE
751    /// 802.3 encapsulation when true.
752    EthernetEncapsulation(bool),
753    /// The default time-to-live that the client should use for outgoing TCP segments. The minimum
754    /// value is 1.
755    TcpDefaultTtl(u8),
756    /// The interval the client should wait before sending a TCP keepalive message. A
757    /// value of 0 indicates that the client should not send keepalive messages unless specifically
758    /// requested by an application.
759    TcpKeepaliveInterval(u32),
760    /// A flag specifying whether the client should send TCP keepalive messages with an octet of
761    /// garbage for compatibility with older implementations.
762    TcpKeepaliveGarbage(bool),
763    /// The name of the client's Network Information Service domain.
764    NetworkInformationServiceDomain(String),
765    /// A list of Network Information Service server addresses available to the client, listed in
766    /// order of preference.
767    NetworkInformationServers(Vec<fidl_fuchsia_net::Ipv4Address>),
768    /// A list of Network Time Protocol (NTP) server addresses available to the client, listed in
769    /// order of preference.
770    NetworkTimeProtocolServers(Vec<fidl_fuchsia_net::Ipv4Address>),
771    /// An opaque object of octets for exchanging vendor-specific information.
772    VendorSpecificInformation(Vec<u8>),
773    /// A list of NetBIOS name server addresses available to the client, listed in order of
774    /// preference.
775    NetbiosOverTcpipNameServer(Vec<fidl_fuchsia_net::Ipv4Address>),
776    /// A list of NetBIOS datagram distribution servers available to the client, listed in order of
777    /// preference.
778    NetbiosOverTcpipDatagramDistributionServer(Vec<fidl_fuchsia_net::Ipv4Address>),
779    /// The NetBIOS node type which should be used by the client.
780    NetbiosOverTcpipNodeType(NodeTypes),
781    /// The NetBIOS over TCP/IP scope parameter, as defined in RFC 1001, for the client.
782    NetbiosOverTcpipScope(String),
783    /// A list of X Window System Font server addresses available to the client, listed in order of
784    /// preference.
785    XWindowSystemFontServer(Vec<fidl_fuchsia_net::Ipv4Address>),
786    /// A list of X Window System Display Manager system addresses available to the client, listed
787    /// in order of preference.
788    XWindowSystemDisplayManager(Vec<fidl_fuchsia_net::Ipv4Address>),
789    /// The name of the client's Network Information System+ domain.
790    NetworkInformationServicePlusDomain(String),
791    /// A list of Network Information System+ server addresses available to the client, listed in
792    /// order of preference.
793    NetworkInformationServicePlusServers(Vec<fidl_fuchsia_net::Ipv4Address>),
794    /// A list of mobile IP home agent addresses available to the client, listed in order of
795    /// preference.
796    MobileIpHomeAgent(Vec<fidl_fuchsia_net::Ipv4Address>),
797    /// A list of Simple Mail Transport Protocol (SMTP) server address available to the client,
798    /// listed in order of preference.
799    SmtpServer(Vec<fidl_fuchsia_net::Ipv4Address>),
800    /// A list of Post Office Protocol (POP3) server addresses available to the client, listed in
801    /// order of preference.
802    Pop3Server(Vec<fidl_fuchsia_net::Ipv4Address>),
803    /// A list Network News Transport Protocol (NNTP) server addresses available to the client,
804    /// listed in order of preference.
805    NntpServer(Vec<fidl_fuchsia_net::Ipv4Address>),
806    /// A list of default World Wide Web (WWW) server addresses available to the client, listed in
807    /// order of preference.
808    DefaultWwwServer(Vec<fidl_fuchsia_net::Ipv4Address>),
809    /// A list of default Finger server addresses available to the client, listed in order of
810    /// preference.
811    DefaultFingerServer(Vec<fidl_fuchsia_net::Ipv4Address>),
812    /// A list of Internet Relay Chat server addresses available to the client, listed in order of
813    /// preference.
814    DefaultIrcServer(Vec<fidl_fuchsia_net::Ipv4Address>),
815    /// A list of StreetTalk server addresses available to the client, listed in order of
816    /// preference.
817    StreettalkServer(Vec<fidl_fuchsia_net::Ipv4Address>),
818    /// A list of StreetTalk Directory Assistance server addresses available to the client, listed
819    /// in order of preference.
820    StreettalkDirectoryAssistanceServer(Vec<fidl_fuchsia_net::Ipv4Address>),
821    /// An option specifying whether the `sname`, `file`, or both fields have been overloaded to
822    /// carry DHCP options. If this option is present, the client interprets the additional fields
823    /// after it concludes interpreting standard option fields.
824    OptionOverload(OptionOverloadValue),
825    /// The TFTP server name available to the client. This option should be used when the `sname`
826    /// field has been overloaded to carry options.
827    TftpServerName(String),
828    /// The bootfile name for the client. This option should be used when the `file` field has been
829    /// overloaded to carry options.
830    BootfileName(String),
831    /// The maximum length in octets of a DHCP message that the participant is willing to accept.
832    /// The minimum value is 576.
833    MaxDhcpMessageSize(u16),
834    /// The time interval after address assignment at which the client will transition
835    /// to the Renewing state.
836    RenewalTimeValue(u32),
837    /// The time interval after address assignment at which the client will transition
838    /// to the Rebinding state.
839    RebindingTimeValue(u32),
840    #[doc(hidden)]
841    __SourceBreaking { unknown_ordinal: u64 },
842}
843
844/// Pattern that matches an unknown `Option_` member.
845#[macro_export]
846macro_rules! Option_Unknown {
847    () => {
848        _
849    };
850}
851
852// Custom PartialEq so that unknown variants are not equal to themselves.
853impl PartialEq for Option_ {
854    fn eq(&self, other: &Self) -> bool {
855        match (self, other) {
856            (Self::SubnetMask(x), Self::SubnetMask(y)) => *x == *y,
857            (Self::TimeOffset(x), Self::TimeOffset(y)) => *x == *y,
858            (Self::Router(x), Self::Router(y)) => *x == *y,
859            (Self::TimeServer(x), Self::TimeServer(y)) => *x == *y,
860            (Self::NameServer(x), Self::NameServer(y)) => *x == *y,
861            (Self::DomainNameServer(x), Self::DomainNameServer(y)) => *x == *y,
862            (Self::LogServer(x), Self::LogServer(y)) => *x == *y,
863            (Self::CookieServer(x), Self::CookieServer(y)) => *x == *y,
864            (Self::LprServer(x), Self::LprServer(y)) => *x == *y,
865            (Self::ImpressServer(x), Self::ImpressServer(y)) => *x == *y,
866            (Self::ResourceLocationServer(x), Self::ResourceLocationServer(y)) => *x == *y,
867            (Self::HostName(x), Self::HostName(y)) => *x == *y,
868            (Self::BootFileSize(x), Self::BootFileSize(y)) => *x == *y,
869            (Self::MeritDumpFile(x), Self::MeritDumpFile(y)) => *x == *y,
870            (Self::DomainName(x), Self::DomainName(y)) => *x == *y,
871            (Self::SwapServer(x), Self::SwapServer(y)) => *x == *y,
872            (Self::RootPath(x), Self::RootPath(y)) => *x == *y,
873            (Self::ExtensionsPath(x), Self::ExtensionsPath(y)) => *x == *y,
874            (Self::IpForwarding(x), Self::IpForwarding(y)) => *x == *y,
875            (Self::NonLocalSourceRouting(x), Self::NonLocalSourceRouting(y)) => *x == *y,
876            (Self::PolicyFilter(x), Self::PolicyFilter(y)) => *x == *y,
877            (Self::MaxDatagramReassemblySize(x), Self::MaxDatagramReassemblySize(y)) => *x == *y,
878            (Self::DefaultIpTtl(x), Self::DefaultIpTtl(y)) => *x == *y,
879            (Self::PathMtuAgingTimeout(x), Self::PathMtuAgingTimeout(y)) => *x == *y,
880            (Self::PathMtuPlateauTable(x), Self::PathMtuPlateauTable(y)) => *x == *y,
881            (Self::InterfaceMtu(x), Self::InterfaceMtu(y)) => *x == *y,
882            (Self::AllSubnetsLocal(x), Self::AllSubnetsLocal(y)) => *x == *y,
883            (Self::BroadcastAddress(x), Self::BroadcastAddress(y)) => *x == *y,
884            (Self::PerformMaskDiscovery(x), Self::PerformMaskDiscovery(y)) => *x == *y,
885            (Self::MaskSupplier(x), Self::MaskSupplier(y)) => *x == *y,
886            (Self::PerformRouterDiscovery(x), Self::PerformRouterDiscovery(y)) => *x == *y,
887            (Self::RouterSolicitationAddress(x), Self::RouterSolicitationAddress(y)) => *x == *y,
888            (Self::StaticRoute(x), Self::StaticRoute(y)) => *x == *y,
889            (Self::TrailerEncapsulation(x), Self::TrailerEncapsulation(y)) => *x == *y,
890            (Self::ArpCacheTimeout(x), Self::ArpCacheTimeout(y)) => *x == *y,
891            (Self::EthernetEncapsulation(x), Self::EthernetEncapsulation(y)) => *x == *y,
892            (Self::TcpDefaultTtl(x), Self::TcpDefaultTtl(y)) => *x == *y,
893            (Self::TcpKeepaliveInterval(x), Self::TcpKeepaliveInterval(y)) => *x == *y,
894            (Self::TcpKeepaliveGarbage(x), Self::TcpKeepaliveGarbage(y)) => *x == *y,
895            (
896                Self::NetworkInformationServiceDomain(x),
897                Self::NetworkInformationServiceDomain(y),
898            ) => *x == *y,
899            (Self::NetworkInformationServers(x), Self::NetworkInformationServers(y)) => *x == *y,
900            (Self::NetworkTimeProtocolServers(x), Self::NetworkTimeProtocolServers(y)) => *x == *y,
901            (Self::VendorSpecificInformation(x), Self::VendorSpecificInformation(y)) => *x == *y,
902            (Self::NetbiosOverTcpipNameServer(x), Self::NetbiosOverTcpipNameServer(y)) => *x == *y,
903            (
904                Self::NetbiosOverTcpipDatagramDistributionServer(x),
905                Self::NetbiosOverTcpipDatagramDistributionServer(y),
906            ) => *x == *y,
907            (Self::NetbiosOverTcpipNodeType(x), Self::NetbiosOverTcpipNodeType(y)) => *x == *y,
908            (Self::NetbiosOverTcpipScope(x), Self::NetbiosOverTcpipScope(y)) => *x == *y,
909            (Self::XWindowSystemFontServer(x), Self::XWindowSystemFontServer(y)) => *x == *y,
910            (Self::XWindowSystemDisplayManager(x), Self::XWindowSystemDisplayManager(y)) => {
911                *x == *y
912            }
913            (
914                Self::NetworkInformationServicePlusDomain(x),
915                Self::NetworkInformationServicePlusDomain(y),
916            ) => *x == *y,
917            (
918                Self::NetworkInformationServicePlusServers(x),
919                Self::NetworkInformationServicePlusServers(y),
920            ) => *x == *y,
921            (Self::MobileIpHomeAgent(x), Self::MobileIpHomeAgent(y)) => *x == *y,
922            (Self::SmtpServer(x), Self::SmtpServer(y)) => *x == *y,
923            (Self::Pop3Server(x), Self::Pop3Server(y)) => *x == *y,
924            (Self::NntpServer(x), Self::NntpServer(y)) => *x == *y,
925            (Self::DefaultWwwServer(x), Self::DefaultWwwServer(y)) => *x == *y,
926            (Self::DefaultFingerServer(x), Self::DefaultFingerServer(y)) => *x == *y,
927            (Self::DefaultIrcServer(x), Self::DefaultIrcServer(y)) => *x == *y,
928            (Self::StreettalkServer(x), Self::StreettalkServer(y)) => *x == *y,
929            (
930                Self::StreettalkDirectoryAssistanceServer(x),
931                Self::StreettalkDirectoryAssistanceServer(y),
932            ) => *x == *y,
933            (Self::OptionOverload(x), Self::OptionOverload(y)) => *x == *y,
934            (Self::TftpServerName(x), Self::TftpServerName(y)) => *x == *y,
935            (Self::BootfileName(x), Self::BootfileName(y)) => *x == *y,
936            (Self::MaxDhcpMessageSize(x), Self::MaxDhcpMessageSize(y)) => *x == *y,
937            (Self::RenewalTimeValue(x), Self::RenewalTimeValue(y)) => *x == *y,
938            (Self::RebindingTimeValue(x), Self::RebindingTimeValue(y)) => *x == *y,
939            _ => false,
940        }
941    }
942}
943
944impl Option_ {
945    #[inline]
946    pub fn ordinal(&self) -> u64 {
947        match *self {
948            Self::SubnetMask(_) => 1,
949            Self::TimeOffset(_) => 2,
950            Self::Router(_) => 3,
951            Self::TimeServer(_) => 4,
952            Self::NameServer(_) => 5,
953            Self::DomainNameServer(_) => 6,
954            Self::LogServer(_) => 7,
955            Self::CookieServer(_) => 8,
956            Self::LprServer(_) => 9,
957            Self::ImpressServer(_) => 10,
958            Self::ResourceLocationServer(_) => 11,
959            Self::HostName(_) => 12,
960            Self::BootFileSize(_) => 13,
961            Self::MeritDumpFile(_) => 14,
962            Self::DomainName(_) => 15,
963            Self::SwapServer(_) => 16,
964            Self::RootPath(_) => 17,
965            Self::ExtensionsPath(_) => 18,
966            Self::IpForwarding(_) => 19,
967            Self::NonLocalSourceRouting(_) => 20,
968            Self::PolicyFilter(_) => 21,
969            Self::MaxDatagramReassemblySize(_) => 22,
970            Self::DefaultIpTtl(_) => 23,
971            Self::PathMtuAgingTimeout(_) => 24,
972            Self::PathMtuPlateauTable(_) => 25,
973            Self::InterfaceMtu(_) => 26,
974            Self::AllSubnetsLocal(_) => 27,
975            Self::BroadcastAddress(_) => 28,
976            Self::PerformMaskDiscovery(_) => 29,
977            Self::MaskSupplier(_) => 30,
978            Self::PerformRouterDiscovery(_) => 31,
979            Self::RouterSolicitationAddress(_) => 32,
980            Self::StaticRoute(_) => 33,
981            Self::TrailerEncapsulation(_) => 34,
982            Self::ArpCacheTimeout(_) => 35,
983            Self::EthernetEncapsulation(_) => 36,
984            Self::TcpDefaultTtl(_) => 37,
985            Self::TcpKeepaliveInterval(_) => 38,
986            Self::TcpKeepaliveGarbage(_) => 39,
987            Self::NetworkInformationServiceDomain(_) => 40,
988            Self::NetworkInformationServers(_) => 41,
989            Self::NetworkTimeProtocolServers(_) => 42,
990            Self::VendorSpecificInformation(_) => 43,
991            Self::NetbiosOverTcpipNameServer(_) => 44,
992            Self::NetbiosOverTcpipDatagramDistributionServer(_) => 45,
993            Self::NetbiosOverTcpipNodeType(_) => 46,
994            Self::NetbiosOverTcpipScope(_) => 47,
995            Self::XWindowSystemFontServer(_) => 48,
996            Self::XWindowSystemDisplayManager(_) => 49,
997            Self::NetworkInformationServicePlusDomain(_) => 50,
998            Self::NetworkInformationServicePlusServers(_) => 51,
999            Self::MobileIpHomeAgent(_) => 52,
1000            Self::SmtpServer(_) => 53,
1001            Self::Pop3Server(_) => 54,
1002            Self::NntpServer(_) => 55,
1003            Self::DefaultWwwServer(_) => 56,
1004            Self::DefaultFingerServer(_) => 57,
1005            Self::DefaultIrcServer(_) => 58,
1006            Self::StreettalkServer(_) => 59,
1007            Self::StreettalkDirectoryAssistanceServer(_) => 60,
1008            Self::OptionOverload(_) => 61,
1009            Self::TftpServerName(_) => 62,
1010            Self::BootfileName(_) => 63,
1011            Self::MaxDhcpMessageSize(_) => 64,
1012            Self::RenewalTimeValue(_) => 65,
1013            Self::RebindingTimeValue(_) => 66,
1014            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1015        }
1016    }
1017
1018    #[inline]
1019    pub fn unknown_variant_for_testing() -> Self {
1020        Self::__SourceBreaking { unknown_ordinal: 0 }
1021    }
1022
1023    #[inline]
1024    pub fn is_unknown(&self) -> bool {
1025        match self {
1026            Self::__SourceBreaking { .. } => true,
1027            _ => false,
1028        }
1029    }
1030}
1031
1032impl fidl::Persistable for Option_ {}
1033
1034/// The configurable server parameters.
1035#[derive(Clone, Debug)]
1036pub enum Parameter {
1037    /// The IP addresses to which the server is bound. The vector bound has been
1038    /// arbitrarily selected as a generous upper limit.
1039    IpAddrs(Vec<fidl_fuchsia_net::Ipv4Address>),
1040    /// The pool of addresses managed by a DHCP server and from which leases are
1041    /// supplied.
1042    ///
1043    /// The pool is valid iff all of the following are true:
1044    ///   1) All fields are present.
1045    ///   2) The stop address is larger than the start address.
1046    ///   3) The prefix length is large enough to fit the full range of
1047    ///      addresses.
1048    ///
1049    /// For example, a pool of 4 addresses with a 24 bit subnet mask could be
1050    /// specified as:
1051    ///   {
1052    ///     prefix_length: 24,
1053    ///     range_start: 192.168.1.2,
1054    ///     range_stop: 192.168.1.5,
1055    ///   }
1056    ///
1057    /// Changing the address pool will not cancel existing leases because the
1058    /// DHCP protocol does not provide a mechanism for doing so. Administrators
1059    /// should take care when changing the address pool for a server with active
1060    /// leases.
1061    AddressPool(AddressPool),
1062    /// The duration of leases offered by the server.
1063    Lease(LeaseLength),
1064    /// The client MAC addresses which the server will issue leases to. By
1065    /// default, the server will not have a permitted MAC list, in which case it
1066    /// will attempt to issue a lease to every client which requests one. If
1067    /// permitted_macs has a non-zero length then the server will only respond
1068    /// to lease requests from clients with  MAC in the list. The vector bound
1069    /// has been arbitrarily selected as a generous upper limit.
1070    PermittedMacs(Vec<fidl_fuchsia_net::MacAddress>),
1071    /// Addresses statically assigned to specific hosts or devices. Typically, a
1072    /// network administrator will statically assign addresses to always-on
1073    /// network devices which should always have the same IP address, such as
1074    /// network printers. The vector bound has been arbitrarily selected as a
1075    /// generous upper limit.
1076    StaticallyAssignedAddrs(Vec<StaticAssignment>),
1077    /// Enables server behavior where the server ARPs an IP address prior to
1078    /// issuing it in a lease. If the server receives a response, the server
1079    /// will mark the address as in-use and try again with a different address.
1080    ArpProbe(bool),
1081    /// The names of the interface to which the server will listen. If this
1082    /// vector is empty, the server will listen on all interfaces and will
1083    /// process incoming DHCP messages regardless of the interface on which they
1084    /// arrive. If this vector is not empty, then the server will only listen
1085    /// for incoming DHCP messages on the named interfaces contained by this
1086    /// vector. The string and vectors bounds have been arbitrarily selected as
1087    /// generous upper limits.
1088    BoundDeviceNames(Vec<String>),
1089    #[doc(hidden)]
1090    __SourceBreaking { unknown_ordinal: u64 },
1091}
1092
1093/// Pattern that matches an unknown `Parameter` member.
1094#[macro_export]
1095macro_rules! ParameterUnknown {
1096    () => {
1097        _
1098    };
1099}
1100
1101// Custom PartialEq so that unknown variants are not equal to themselves.
1102impl PartialEq for Parameter {
1103    fn eq(&self, other: &Self) -> bool {
1104        match (self, other) {
1105            (Self::IpAddrs(x), Self::IpAddrs(y)) => *x == *y,
1106            (Self::AddressPool(x), Self::AddressPool(y)) => *x == *y,
1107            (Self::Lease(x), Self::Lease(y)) => *x == *y,
1108            (Self::PermittedMacs(x), Self::PermittedMacs(y)) => *x == *y,
1109            (Self::StaticallyAssignedAddrs(x), Self::StaticallyAssignedAddrs(y)) => *x == *y,
1110            (Self::ArpProbe(x), Self::ArpProbe(y)) => *x == *y,
1111            (Self::BoundDeviceNames(x), Self::BoundDeviceNames(y)) => *x == *y,
1112            _ => false,
1113        }
1114    }
1115}
1116
1117impl Parameter {
1118    #[inline]
1119    pub fn ordinal(&self) -> u64 {
1120        match *self {
1121            Self::IpAddrs(_) => 1,
1122            Self::AddressPool(_) => 2,
1123            Self::Lease(_) => 3,
1124            Self::PermittedMacs(_) => 4,
1125            Self::StaticallyAssignedAddrs(_) => 5,
1126            Self::ArpProbe(_) => 6,
1127            Self::BoundDeviceNames(_) => 7,
1128            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1129        }
1130    }
1131
1132    #[inline]
1133    pub fn unknown_variant_for_testing() -> Self {
1134        Self::__SourceBreaking { unknown_ordinal: 0 }
1135    }
1136
1137    #[inline]
1138    pub fn is_unknown(&self) -> bool {
1139        match self {
1140            Self::__SourceBreaking { .. } => true,
1141            _ => false,
1142        }
1143    }
1144}
1145
1146impl fidl::Persistable for Parameter {}
1147
1148#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1149pub struct ClientMarker;
1150
1151impl fidl::endpoints::ProtocolMarker for ClientMarker {
1152    type Proxy = ClientProxy;
1153    type RequestStream = ClientRequestStream;
1154    #[cfg(target_os = "fuchsia")]
1155    type SynchronousProxy = ClientSynchronousProxy;
1156
1157    const DEBUG_NAME: &'static str = "(anonymous) Client";
1158}
1159
1160pub trait ClientProxyInterface: Send + Sync {
1161    type WatchConfigurationResponseFut: std::future::Future<Output = Result<ClientWatchConfigurationResponse, fidl::Error>>
1162        + Send;
1163    fn r#watch_configuration(&self) -> Self::WatchConfigurationResponseFut;
1164    fn r#shutdown(&self) -> Result<(), fidl::Error>;
1165}
1166#[derive(Debug)]
1167#[cfg(target_os = "fuchsia")]
1168pub struct ClientSynchronousProxy {
1169    client: fidl::client::sync::Client,
1170}
1171
1172#[cfg(target_os = "fuchsia")]
1173impl fidl::endpoints::SynchronousProxy for ClientSynchronousProxy {
1174    type Proxy = ClientProxy;
1175    type Protocol = ClientMarker;
1176
1177    fn from_channel(inner: fidl::Channel) -> Self {
1178        Self::new(inner)
1179    }
1180
1181    fn into_channel(self) -> fidl::Channel {
1182        self.client.into_channel()
1183    }
1184
1185    fn as_channel(&self) -> &fidl::Channel {
1186        self.client.as_channel()
1187    }
1188}
1189
1190#[cfg(target_os = "fuchsia")]
1191impl ClientSynchronousProxy {
1192    pub fn new(channel: fidl::Channel) -> Self {
1193        let protocol_name = <ClientMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1194        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1195    }
1196
1197    pub fn into_channel(self) -> fidl::Channel {
1198        self.client.into_channel()
1199    }
1200
1201    /// Waits until an event arrives and returns it. It is safe for other
1202    /// threads to make concurrent requests while waiting for an event.
1203    pub fn wait_for_event(
1204        &self,
1205        deadline: zx::MonotonicInstant,
1206    ) -> Result<ClientEvent, fidl::Error> {
1207        ClientEvent::decode(self.client.wait_for_event(deadline)?)
1208    }
1209
1210    /// Returns acquired DHCP configuration.
1211    ///
1212    /// Yields a value whenever the client acquires new configuration. Notably,
1213    /// does not yield a value upon DHCP lease expiry; instead, expiry of the IP
1214    /// address is communicated via the `AddressStateProvider` (refer to
1215    /// documentation of `fuchsia.net.interfaces.admin/AddressStateProvider` for
1216    /// details). Non-address configuration does not expire, but is replaced by
1217    /// new configuration once a new DHCP lease is obtained.
1218    ///
1219    /// It is invalid to call this method while a previous call is pending.
1220    /// Doing so causes the server end of the protocol to be closed.
1221    ///
1222    /// - response `address` the assigned address. If set, the client has
1223    ///     acquired a new lease on an IP address. If not set, then either the
1224    ///     client has not requested an IP address (in which case this `Client`
1225    ///     instance has never yielded an address), or the client continues to
1226    ///     hold a lease on a previously-acquired IP address (whose lifetime is
1227    ///     updated via `AddressStateProvider`).
1228    /// - response `dns_servers` addresses of discovered DNS servers. If absent,
1229    ///     must be interpreted as empty (the client's configuration indicates
1230    ///     no DNS servers, even if previously-yielded configuration included
1231    ///     DNS servers).
1232    /// - response `routers` addresses of discovered routers on the client's
1233    ///     subnet, in descending order of preference according to the DHCP
1234    ///     server. If absent, must be interpreted as empty (the client's
1235    ///     configuration indicates no routers, even if previously-yielded
1236    ///     configuration included routers).
1237    pub fn r#watch_configuration(
1238        &self,
1239        ___deadline: zx::MonotonicInstant,
1240    ) -> Result<ClientWatchConfigurationResponse, fidl::Error> {
1241        let _response = self
1242            .client
1243            .send_query::<fidl::encoding::EmptyPayload, ClientWatchConfigurationResponse>(
1244                (),
1245                0x2b6f7c7d3bcc6682,
1246                fidl::encoding::DynamicFlags::empty(),
1247                ___deadline,
1248            )?;
1249        Ok(_response)
1250    }
1251
1252    /// Instructs the client to shut down gracefully (releasing any DHCP lease
1253    /// currently held). When the client is finished shutting down, it yields
1254    /// the `ClientExitReason::GRACEFUL_SHUTDOWN` `OnExit` event.
1255    pub fn r#shutdown(&self) -> Result<(), fidl::Error> {
1256        self.client.send::<fidl::encoding::EmptyPayload>(
1257            (),
1258            0x265a3213e9a8abde,
1259            fidl::encoding::DynamicFlags::empty(),
1260        )
1261    }
1262}
1263
1264#[derive(Debug, Clone)]
1265pub struct ClientProxy {
1266    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1267}
1268
1269impl fidl::endpoints::Proxy for ClientProxy {
1270    type Protocol = ClientMarker;
1271
1272    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1273        Self::new(inner)
1274    }
1275
1276    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1277        self.client.into_channel().map_err(|client| Self { client })
1278    }
1279
1280    fn as_channel(&self) -> &::fidl::AsyncChannel {
1281        self.client.as_channel()
1282    }
1283}
1284
1285impl ClientProxy {
1286    /// Create a new Proxy for fuchsia.net.dhcp/Client.
1287    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1288        let protocol_name = <ClientMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1289        Self { client: fidl::client::Client::new(channel, protocol_name) }
1290    }
1291
1292    /// Get a Stream of events from the remote end of the protocol.
1293    ///
1294    /// # Panics
1295    ///
1296    /// Panics if the event stream was already taken.
1297    pub fn take_event_stream(&self) -> ClientEventStream {
1298        ClientEventStream { event_receiver: self.client.take_event_receiver() }
1299    }
1300
1301    /// Returns acquired DHCP configuration.
1302    ///
1303    /// Yields a value whenever the client acquires new configuration. Notably,
1304    /// does not yield a value upon DHCP lease expiry; instead, expiry of the IP
1305    /// address is communicated via the `AddressStateProvider` (refer to
1306    /// documentation of `fuchsia.net.interfaces.admin/AddressStateProvider` for
1307    /// details). Non-address configuration does not expire, but is replaced by
1308    /// new configuration once a new DHCP lease is obtained.
1309    ///
1310    /// It is invalid to call this method while a previous call is pending.
1311    /// Doing so causes the server end of the protocol to be closed.
1312    ///
1313    /// - response `address` the assigned address. If set, the client has
1314    ///     acquired a new lease on an IP address. If not set, then either the
1315    ///     client has not requested an IP address (in which case this `Client`
1316    ///     instance has never yielded an address), or the client continues to
1317    ///     hold a lease on a previously-acquired IP address (whose lifetime is
1318    ///     updated via `AddressStateProvider`).
1319    /// - response `dns_servers` addresses of discovered DNS servers. If absent,
1320    ///     must be interpreted as empty (the client's configuration indicates
1321    ///     no DNS servers, even if previously-yielded configuration included
1322    ///     DNS servers).
1323    /// - response `routers` addresses of discovered routers on the client's
1324    ///     subnet, in descending order of preference according to the DHCP
1325    ///     server. If absent, must be interpreted as empty (the client's
1326    ///     configuration indicates no routers, even if previously-yielded
1327    ///     configuration included routers).
1328    pub fn r#watch_configuration(
1329        &self,
1330    ) -> fidl::client::QueryResponseFut<
1331        ClientWatchConfigurationResponse,
1332        fidl::encoding::DefaultFuchsiaResourceDialect,
1333    > {
1334        ClientProxyInterface::r#watch_configuration(self)
1335    }
1336
1337    /// Instructs the client to shut down gracefully (releasing any DHCP lease
1338    /// currently held). When the client is finished shutting down, it yields
1339    /// the `ClientExitReason::GRACEFUL_SHUTDOWN` `OnExit` event.
1340    pub fn r#shutdown(&self) -> Result<(), fidl::Error> {
1341        ClientProxyInterface::r#shutdown(self)
1342    }
1343}
1344
1345impl ClientProxyInterface for ClientProxy {
1346    type WatchConfigurationResponseFut = fidl::client::QueryResponseFut<
1347        ClientWatchConfigurationResponse,
1348        fidl::encoding::DefaultFuchsiaResourceDialect,
1349    >;
1350    fn r#watch_configuration(&self) -> Self::WatchConfigurationResponseFut {
1351        fn _decode(
1352            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1353        ) -> Result<ClientWatchConfigurationResponse, fidl::Error> {
1354            let _response = fidl::client::decode_transaction_body::<
1355                ClientWatchConfigurationResponse,
1356                fidl::encoding::DefaultFuchsiaResourceDialect,
1357                0x2b6f7c7d3bcc6682,
1358            >(_buf?)?;
1359            Ok(_response)
1360        }
1361        self.client.send_query_and_decode::<
1362            fidl::encoding::EmptyPayload,
1363            ClientWatchConfigurationResponse,
1364        >(
1365            (),
1366            0x2b6f7c7d3bcc6682,
1367            fidl::encoding::DynamicFlags::empty(),
1368            _decode,
1369        )
1370    }
1371
1372    fn r#shutdown(&self) -> Result<(), fidl::Error> {
1373        self.client.send::<fidl::encoding::EmptyPayload>(
1374            (),
1375            0x265a3213e9a8abde,
1376            fidl::encoding::DynamicFlags::empty(),
1377        )
1378    }
1379}
1380
1381pub struct ClientEventStream {
1382    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1383}
1384
1385impl std::marker::Unpin for ClientEventStream {}
1386
1387impl futures::stream::FusedStream for ClientEventStream {
1388    fn is_terminated(&self) -> bool {
1389        self.event_receiver.is_terminated()
1390    }
1391}
1392
1393impl futures::Stream for ClientEventStream {
1394    type Item = Result<ClientEvent, fidl::Error>;
1395
1396    fn poll_next(
1397        mut self: std::pin::Pin<&mut Self>,
1398        cx: &mut std::task::Context<'_>,
1399    ) -> std::task::Poll<Option<Self::Item>> {
1400        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1401            &mut self.event_receiver,
1402            cx
1403        )?) {
1404            Some(buf) => std::task::Poll::Ready(Some(ClientEvent::decode(buf))),
1405            None => std::task::Poll::Ready(None),
1406        }
1407    }
1408}
1409
1410#[derive(Debug)]
1411pub enum ClientEvent {
1412    OnExit { reason: ClientExitReason },
1413}
1414
1415impl ClientEvent {
1416    #[allow(irrefutable_let_patterns)]
1417    pub fn into_on_exit(self) -> Option<ClientExitReason> {
1418        if let ClientEvent::OnExit { reason } = self {
1419            Some((reason))
1420        } else {
1421            None
1422        }
1423    }
1424
1425    /// Decodes a message buffer as a [`ClientEvent`].
1426    fn decode(
1427        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1428    ) -> Result<ClientEvent, fidl::Error> {
1429        let (bytes, _handles) = buf.split_mut();
1430        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1431        debug_assert_eq!(tx_header.tx_id, 0);
1432        match tx_header.ordinal {
1433            0x2a2a052260f657c0 => {
1434                let mut out = fidl::new_empty!(
1435                    ClientOnExitRequest,
1436                    fidl::encoding::DefaultFuchsiaResourceDialect
1437                );
1438                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientOnExitRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1439                Ok((ClientEvent::OnExit { reason: out.reason }))
1440            }
1441            _ => Err(fidl::Error::UnknownOrdinal {
1442                ordinal: tx_header.ordinal,
1443                protocol_name: <ClientMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1444            }),
1445        }
1446    }
1447}
1448
1449/// A Stream of incoming requests for fuchsia.net.dhcp/Client.
1450pub struct ClientRequestStream {
1451    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1452    is_terminated: bool,
1453}
1454
1455impl std::marker::Unpin for ClientRequestStream {}
1456
1457impl futures::stream::FusedStream for ClientRequestStream {
1458    fn is_terminated(&self) -> bool {
1459        self.is_terminated
1460    }
1461}
1462
1463impl fidl::endpoints::RequestStream for ClientRequestStream {
1464    type Protocol = ClientMarker;
1465    type ControlHandle = ClientControlHandle;
1466
1467    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1468        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1469    }
1470
1471    fn control_handle(&self) -> Self::ControlHandle {
1472        ClientControlHandle { inner: self.inner.clone() }
1473    }
1474
1475    fn into_inner(
1476        self,
1477    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1478    {
1479        (self.inner, self.is_terminated)
1480    }
1481
1482    fn from_inner(
1483        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1484        is_terminated: bool,
1485    ) -> Self {
1486        Self { inner, is_terminated }
1487    }
1488}
1489
1490impl futures::Stream for ClientRequestStream {
1491    type Item = Result<ClientRequest, fidl::Error>;
1492
1493    fn poll_next(
1494        mut self: std::pin::Pin<&mut Self>,
1495        cx: &mut std::task::Context<'_>,
1496    ) -> std::task::Poll<Option<Self::Item>> {
1497        let this = &mut *self;
1498        if this.inner.check_shutdown(cx) {
1499            this.is_terminated = true;
1500            return std::task::Poll::Ready(None);
1501        }
1502        if this.is_terminated {
1503            panic!("polled ClientRequestStream after completion");
1504        }
1505        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1506            |bytes, handles| {
1507                match this.inner.channel().read_etc(cx, bytes, handles) {
1508                    std::task::Poll::Ready(Ok(())) => {}
1509                    std::task::Poll::Pending => return std::task::Poll::Pending,
1510                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1511                        this.is_terminated = true;
1512                        return std::task::Poll::Ready(None);
1513                    }
1514                    std::task::Poll::Ready(Err(e)) => {
1515                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1516                            e.into(),
1517                        ))))
1518                    }
1519                }
1520
1521                // A message has been received from the channel
1522                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1523
1524                std::task::Poll::Ready(Some(match header.ordinal {
1525                    0x2b6f7c7d3bcc6682 => {
1526                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1527                        let mut req = fidl::new_empty!(
1528                            fidl::encoding::EmptyPayload,
1529                            fidl::encoding::DefaultFuchsiaResourceDialect
1530                        );
1531                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1532                        let control_handle = ClientControlHandle { inner: this.inner.clone() };
1533                        Ok(ClientRequest::WatchConfiguration {
1534                            responder: ClientWatchConfigurationResponder {
1535                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1536                                tx_id: header.tx_id,
1537                            },
1538                        })
1539                    }
1540                    0x265a3213e9a8abde => {
1541                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1542                        let mut req = fidl::new_empty!(
1543                            fidl::encoding::EmptyPayload,
1544                            fidl::encoding::DefaultFuchsiaResourceDialect
1545                        );
1546                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1547                        let control_handle = ClientControlHandle { inner: this.inner.clone() };
1548                        Ok(ClientRequest::Shutdown { control_handle })
1549                    }
1550                    _ => Err(fidl::Error::UnknownOrdinal {
1551                        ordinal: header.ordinal,
1552                        protocol_name:
1553                            <ClientMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1554                    }),
1555                }))
1556            },
1557        )
1558    }
1559}
1560
1561/// Provides methods to watch for discovered network configurations and control
1562/// the DHCP client discovering them.
1563///
1564/// This protocol encodes the DHCP client's lifetime in both directions;
1565/// the DHCP client remains alive iff both ends of the protocol are open. That
1566/// is:
1567///
1568/// - Closing the client end causes the DHCP client to be destroyed.
1569/// - Observing a closure of the server end indicates the DHCP client no longer
1570///   exists.
1571#[derive(Debug)]
1572pub enum ClientRequest {
1573    /// Returns acquired DHCP configuration.
1574    ///
1575    /// Yields a value whenever the client acquires new configuration. Notably,
1576    /// does not yield a value upon DHCP lease expiry; instead, expiry of the IP
1577    /// address is communicated via the `AddressStateProvider` (refer to
1578    /// documentation of `fuchsia.net.interfaces.admin/AddressStateProvider` for
1579    /// details). Non-address configuration does not expire, but is replaced by
1580    /// new configuration once a new DHCP lease is obtained.
1581    ///
1582    /// It is invalid to call this method while a previous call is pending.
1583    /// Doing so causes the server end of the protocol to be closed.
1584    ///
1585    /// - response `address` the assigned address. If set, the client has
1586    ///     acquired a new lease on an IP address. If not set, then either the
1587    ///     client has not requested an IP address (in which case this `Client`
1588    ///     instance has never yielded an address), or the client continues to
1589    ///     hold a lease on a previously-acquired IP address (whose lifetime is
1590    ///     updated via `AddressStateProvider`).
1591    /// - response `dns_servers` addresses of discovered DNS servers. If absent,
1592    ///     must be interpreted as empty (the client's configuration indicates
1593    ///     no DNS servers, even if previously-yielded configuration included
1594    ///     DNS servers).
1595    /// - response `routers` addresses of discovered routers on the client's
1596    ///     subnet, in descending order of preference according to the DHCP
1597    ///     server. If absent, must be interpreted as empty (the client's
1598    ///     configuration indicates no routers, even if previously-yielded
1599    ///     configuration included routers).
1600    WatchConfiguration { responder: ClientWatchConfigurationResponder },
1601    /// Instructs the client to shut down gracefully (releasing any DHCP lease
1602    /// currently held). When the client is finished shutting down, it yields
1603    /// the `ClientExitReason::GRACEFUL_SHUTDOWN` `OnExit` event.
1604    Shutdown { control_handle: ClientControlHandle },
1605}
1606
1607impl ClientRequest {
1608    #[allow(irrefutable_let_patterns)]
1609    pub fn into_watch_configuration(self) -> Option<(ClientWatchConfigurationResponder)> {
1610        if let ClientRequest::WatchConfiguration { responder } = self {
1611            Some((responder))
1612        } else {
1613            None
1614        }
1615    }
1616
1617    #[allow(irrefutable_let_patterns)]
1618    pub fn into_shutdown(self) -> Option<(ClientControlHandle)> {
1619        if let ClientRequest::Shutdown { control_handle } = self {
1620            Some((control_handle))
1621        } else {
1622            None
1623        }
1624    }
1625
1626    /// Name of the method defined in FIDL
1627    pub fn method_name(&self) -> &'static str {
1628        match *self {
1629            ClientRequest::WatchConfiguration { .. } => "watch_configuration",
1630            ClientRequest::Shutdown { .. } => "shutdown",
1631        }
1632    }
1633}
1634
1635#[derive(Debug, Clone)]
1636pub struct ClientControlHandle {
1637    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1638}
1639
1640impl fidl::endpoints::ControlHandle for ClientControlHandle {
1641    fn shutdown(&self) {
1642        self.inner.shutdown()
1643    }
1644    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1645        self.inner.shutdown_with_epitaph(status)
1646    }
1647
1648    fn is_closed(&self) -> bool {
1649        self.inner.channel().is_closed()
1650    }
1651    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1652        self.inner.channel().on_closed()
1653    }
1654
1655    #[cfg(target_os = "fuchsia")]
1656    fn signal_peer(
1657        &self,
1658        clear_mask: zx::Signals,
1659        set_mask: zx::Signals,
1660    ) -> Result<(), zx_status::Status> {
1661        use fidl::Peered;
1662        self.inner.channel().signal_peer(clear_mask, set_mask)
1663    }
1664}
1665
1666impl ClientControlHandle {
1667    pub fn send_on_exit(&self, mut reason: ClientExitReason) -> Result<(), fidl::Error> {
1668        self.inner.send::<ClientOnExitRequest>(
1669            (reason,),
1670            0,
1671            0x2a2a052260f657c0,
1672            fidl::encoding::DynamicFlags::empty(),
1673        )
1674    }
1675}
1676
1677#[must_use = "FIDL methods require a response to be sent"]
1678#[derive(Debug)]
1679pub struct ClientWatchConfigurationResponder {
1680    control_handle: std::mem::ManuallyDrop<ClientControlHandle>,
1681    tx_id: u32,
1682}
1683
1684/// Set the the channel to be shutdown (see [`ClientControlHandle::shutdown`])
1685/// if the responder is dropped without sending a response, so that the client
1686/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1687impl std::ops::Drop for ClientWatchConfigurationResponder {
1688    fn drop(&mut self) {
1689        self.control_handle.shutdown();
1690        // Safety: drops once, never accessed again
1691        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1692    }
1693}
1694
1695impl fidl::endpoints::Responder for ClientWatchConfigurationResponder {
1696    type ControlHandle = ClientControlHandle;
1697
1698    fn control_handle(&self) -> &ClientControlHandle {
1699        &self.control_handle
1700    }
1701
1702    fn drop_without_shutdown(mut self) {
1703        // Safety: drops once, never accessed again due to mem::forget
1704        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1705        // Prevent Drop from running (which would shut down the channel)
1706        std::mem::forget(self);
1707    }
1708}
1709
1710impl ClientWatchConfigurationResponder {
1711    /// Sends a response to the FIDL transaction.
1712    ///
1713    /// Sets the channel to shutdown if an error occurs.
1714    pub fn send(self, mut payload: ClientWatchConfigurationResponse) -> Result<(), fidl::Error> {
1715        let _result = self.send_raw(payload);
1716        if _result.is_err() {
1717            self.control_handle.shutdown();
1718        }
1719        self.drop_without_shutdown();
1720        _result
1721    }
1722
1723    /// Similar to "send" but does not shutdown the channel if an error occurs.
1724    pub fn send_no_shutdown_on_err(
1725        self,
1726        mut payload: ClientWatchConfigurationResponse,
1727    ) -> Result<(), fidl::Error> {
1728        let _result = self.send_raw(payload);
1729        self.drop_without_shutdown();
1730        _result
1731    }
1732
1733    fn send_raw(&self, mut payload: ClientWatchConfigurationResponse) -> Result<(), fidl::Error> {
1734        self.control_handle.inner.send::<ClientWatchConfigurationResponse>(
1735            &mut payload,
1736            self.tx_id,
1737            0x2b6f7c7d3bcc6682,
1738            fidl::encoding::DynamicFlags::empty(),
1739        )
1740    }
1741}
1742
1743#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1744pub struct ClientProviderMarker;
1745
1746impl fidl::endpoints::ProtocolMarker for ClientProviderMarker {
1747    type Proxy = ClientProviderProxy;
1748    type RequestStream = ClientProviderRequestStream;
1749    #[cfg(target_os = "fuchsia")]
1750    type SynchronousProxy = ClientProviderSynchronousProxy;
1751
1752    const DEBUG_NAME: &'static str = "fuchsia.net.dhcp.ClientProvider";
1753}
1754impl fidl::endpoints::DiscoverableProtocolMarker for ClientProviderMarker {}
1755
1756pub trait ClientProviderProxyInterface: Send + Sync {
1757    fn r#new_client(
1758        &self,
1759        interface_id: u64,
1760        params: &NewClientParams,
1761        request: fidl::endpoints::ServerEnd<ClientMarker>,
1762    ) -> Result<(), fidl::Error>;
1763    type CheckPresenceResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
1764    fn r#check_presence(&self) -> Self::CheckPresenceResponseFut;
1765}
1766#[derive(Debug)]
1767#[cfg(target_os = "fuchsia")]
1768pub struct ClientProviderSynchronousProxy {
1769    client: fidl::client::sync::Client,
1770}
1771
1772#[cfg(target_os = "fuchsia")]
1773impl fidl::endpoints::SynchronousProxy for ClientProviderSynchronousProxy {
1774    type Proxy = ClientProviderProxy;
1775    type Protocol = ClientProviderMarker;
1776
1777    fn from_channel(inner: fidl::Channel) -> Self {
1778        Self::new(inner)
1779    }
1780
1781    fn into_channel(self) -> fidl::Channel {
1782        self.client.into_channel()
1783    }
1784
1785    fn as_channel(&self) -> &fidl::Channel {
1786        self.client.as_channel()
1787    }
1788}
1789
1790#[cfg(target_os = "fuchsia")]
1791impl ClientProviderSynchronousProxy {
1792    pub fn new(channel: fidl::Channel) -> Self {
1793        let protocol_name = <ClientProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1794        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1795    }
1796
1797    pub fn into_channel(self) -> fidl::Channel {
1798        self.client.into_channel()
1799    }
1800
1801    /// Waits until an event arrives and returns it. It is safe for other
1802    /// threads to make concurrent requests while waiting for an event.
1803    pub fn wait_for_event(
1804        &self,
1805        deadline: zx::MonotonicInstant,
1806    ) -> Result<ClientProviderEvent, fidl::Error> {
1807        ClientProviderEvent::decode(self.client.wait_for_event(deadline)?)
1808    }
1809
1810    /// Provides a DHCPv4 client.
1811    ///
1812    /// + request `params` the parameters to create the client with.
1813    /// + request `request` grants control over the client.
1814    pub fn r#new_client(
1815        &self,
1816        mut interface_id: u64,
1817        mut params: &NewClientParams,
1818        mut request: fidl::endpoints::ServerEnd<ClientMarker>,
1819    ) -> Result<(), fidl::Error> {
1820        self.client.send::<ClientProviderNewClientRequest>(
1821            (interface_id, params, request),
1822            0x317e9af2e462cbcd,
1823            fidl::encoding::DynamicFlags::empty(),
1824        )
1825    }
1826
1827    /// No-op method that allows checking for presence.
1828    ///
1829    /// TODO(https://fxbug.dev/296283299): It's not currently possible for a
1830    /// client with an optionally-provided protocol to check whether there's
1831    /// someone on the other end without making a FIDL call . This method
1832    /// provides a workaround by giving a client a method that it can call to
1833    /// check for liveness.
1834    ///
1835    /// TODO(https://fxbug.dev/42076541): Remove this once the DHCP out-of-stack
1836    /// client is always being used.
1837    pub fn r#check_presence(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
1838        let _response =
1839            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
1840                (),
1841                0x7ba657cd730bbf60,
1842                fidl::encoding::DynamicFlags::empty(),
1843                ___deadline,
1844            )?;
1845        Ok(_response)
1846    }
1847}
1848
1849#[derive(Debug, Clone)]
1850pub struct ClientProviderProxy {
1851    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1852}
1853
1854impl fidl::endpoints::Proxy for ClientProviderProxy {
1855    type Protocol = ClientProviderMarker;
1856
1857    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1858        Self::new(inner)
1859    }
1860
1861    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1862        self.client.into_channel().map_err(|client| Self { client })
1863    }
1864
1865    fn as_channel(&self) -> &::fidl::AsyncChannel {
1866        self.client.as_channel()
1867    }
1868}
1869
1870impl ClientProviderProxy {
1871    /// Create a new Proxy for fuchsia.net.dhcp/ClientProvider.
1872    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1873        let protocol_name = <ClientProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1874        Self { client: fidl::client::Client::new(channel, protocol_name) }
1875    }
1876
1877    /// Get a Stream of events from the remote end of the protocol.
1878    ///
1879    /// # Panics
1880    ///
1881    /// Panics if the event stream was already taken.
1882    pub fn take_event_stream(&self) -> ClientProviderEventStream {
1883        ClientProviderEventStream { event_receiver: self.client.take_event_receiver() }
1884    }
1885
1886    /// Provides a DHCPv4 client.
1887    ///
1888    /// + request `params` the parameters to create the client with.
1889    /// + request `request` grants control over the client.
1890    pub fn r#new_client(
1891        &self,
1892        mut interface_id: u64,
1893        mut params: &NewClientParams,
1894        mut request: fidl::endpoints::ServerEnd<ClientMarker>,
1895    ) -> Result<(), fidl::Error> {
1896        ClientProviderProxyInterface::r#new_client(self, interface_id, params, request)
1897    }
1898
1899    /// No-op method that allows checking for presence.
1900    ///
1901    /// TODO(https://fxbug.dev/296283299): It's not currently possible for a
1902    /// client with an optionally-provided protocol to check whether there's
1903    /// someone on the other end without making a FIDL call . This method
1904    /// provides a workaround by giving a client a method that it can call to
1905    /// check for liveness.
1906    ///
1907    /// TODO(https://fxbug.dev/42076541): Remove this once the DHCP out-of-stack
1908    /// client is always being used.
1909    pub fn r#check_presence(
1910        &self,
1911    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1912        ClientProviderProxyInterface::r#check_presence(self)
1913    }
1914}
1915
1916impl ClientProviderProxyInterface for ClientProviderProxy {
1917    fn r#new_client(
1918        &self,
1919        mut interface_id: u64,
1920        mut params: &NewClientParams,
1921        mut request: fidl::endpoints::ServerEnd<ClientMarker>,
1922    ) -> Result<(), fidl::Error> {
1923        self.client.send::<ClientProviderNewClientRequest>(
1924            (interface_id, params, request),
1925            0x317e9af2e462cbcd,
1926            fidl::encoding::DynamicFlags::empty(),
1927        )
1928    }
1929
1930    type CheckPresenceResponseFut =
1931        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1932    fn r#check_presence(&self) -> Self::CheckPresenceResponseFut {
1933        fn _decode(
1934            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1935        ) -> Result<(), fidl::Error> {
1936            let _response = fidl::client::decode_transaction_body::<
1937                fidl::encoding::EmptyPayload,
1938                fidl::encoding::DefaultFuchsiaResourceDialect,
1939                0x7ba657cd730bbf60,
1940            >(_buf?)?;
1941            Ok(_response)
1942        }
1943        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
1944            (),
1945            0x7ba657cd730bbf60,
1946            fidl::encoding::DynamicFlags::empty(),
1947            _decode,
1948        )
1949    }
1950}
1951
1952pub struct ClientProviderEventStream {
1953    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1954}
1955
1956impl std::marker::Unpin for ClientProviderEventStream {}
1957
1958impl futures::stream::FusedStream for ClientProviderEventStream {
1959    fn is_terminated(&self) -> bool {
1960        self.event_receiver.is_terminated()
1961    }
1962}
1963
1964impl futures::Stream for ClientProviderEventStream {
1965    type Item = Result<ClientProviderEvent, fidl::Error>;
1966
1967    fn poll_next(
1968        mut self: std::pin::Pin<&mut Self>,
1969        cx: &mut std::task::Context<'_>,
1970    ) -> std::task::Poll<Option<Self::Item>> {
1971        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1972            &mut self.event_receiver,
1973            cx
1974        )?) {
1975            Some(buf) => std::task::Poll::Ready(Some(ClientProviderEvent::decode(buf))),
1976            None => std::task::Poll::Ready(None),
1977        }
1978    }
1979}
1980
1981#[derive(Debug)]
1982pub enum ClientProviderEvent {}
1983
1984impl ClientProviderEvent {
1985    /// Decodes a message buffer as a [`ClientProviderEvent`].
1986    fn decode(
1987        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1988    ) -> Result<ClientProviderEvent, fidl::Error> {
1989        let (bytes, _handles) = buf.split_mut();
1990        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1991        debug_assert_eq!(tx_header.tx_id, 0);
1992        match tx_header.ordinal {
1993            _ => Err(fidl::Error::UnknownOrdinal {
1994                ordinal: tx_header.ordinal,
1995                protocol_name:
1996                    <ClientProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1997            }),
1998        }
1999    }
2000}
2001
2002/// A Stream of incoming requests for fuchsia.net.dhcp/ClientProvider.
2003pub struct ClientProviderRequestStream {
2004    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2005    is_terminated: bool,
2006}
2007
2008impl std::marker::Unpin for ClientProviderRequestStream {}
2009
2010impl futures::stream::FusedStream for ClientProviderRequestStream {
2011    fn is_terminated(&self) -> bool {
2012        self.is_terminated
2013    }
2014}
2015
2016impl fidl::endpoints::RequestStream for ClientProviderRequestStream {
2017    type Protocol = ClientProviderMarker;
2018    type ControlHandle = ClientProviderControlHandle;
2019
2020    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2021        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2022    }
2023
2024    fn control_handle(&self) -> Self::ControlHandle {
2025        ClientProviderControlHandle { inner: self.inner.clone() }
2026    }
2027
2028    fn into_inner(
2029        self,
2030    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2031    {
2032        (self.inner, self.is_terminated)
2033    }
2034
2035    fn from_inner(
2036        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2037        is_terminated: bool,
2038    ) -> Self {
2039        Self { inner, is_terminated }
2040    }
2041}
2042
2043impl futures::Stream for ClientProviderRequestStream {
2044    type Item = Result<ClientProviderRequest, fidl::Error>;
2045
2046    fn poll_next(
2047        mut self: std::pin::Pin<&mut Self>,
2048        cx: &mut std::task::Context<'_>,
2049    ) -> std::task::Poll<Option<Self::Item>> {
2050        let this = &mut *self;
2051        if this.inner.check_shutdown(cx) {
2052            this.is_terminated = true;
2053            return std::task::Poll::Ready(None);
2054        }
2055        if this.is_terminated {
2056            panic!("polled ClientProviderRequestStream after completion");
2057        }
2058        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2059            |bytes, handles| {
2060                match this.inner.channel().read_etc(cx, bytes, handles) {
2061                    std::task::Poll::Ready(Ok(())) => {}
2062                    std::task::Poll::Pending => return std::task::Poll::Pending,
2063                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2064                        this.is_terminated = true;
2065                        return std::task::Poll::Ready(None);
2066                    }
2067                    std::task::Poll::Ready(Err(e)) => {
2068                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2069                            e.into(),
2070                        ))))
2071                    }
2072                }
2073
2074                // A message has been received from the channel
2075                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2076
2077                std::task::Poll::Ready(Some(match header.ordinal {
2078                    0x317e9af2e462cbcd => {
2079                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2080                        let mut req = fidl::new_empty!(
2081                            ClientProviderNewClientRequest,
2082                            fidl::encoding::DefaultFuchsiaResourceDialect
2083                        );
2084                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientProviderNewClientRequest>(&header, _body_bytes, handles, &mut req)?;
2085                        let control_handle =
2086                            ClientProviderControlHandle { inner: this.inner.clone() };
2087                        Ok(ClientProviderRequest::NewClient {
2088                            interface_id: req.interface_id,
2089                            params: req.params,
2090                            request: req.request,
2091
2092                            control_handle,
2093                        })
2094                    }
2095                    0x7ba657cd730bbf60 => {
2096                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2097                        let mut req = fidl::new_empty!(
2098                            fidl::encoding::EmptyPayload,
2099                            fidl::encoding::DefaultFuchsiaResourceDialect
2100                        );
2101                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2102                        let control_handle =
2103                            ClientProviderControlHandle { inner: this.inner.clone() };
2104                        Ok(ClientProviderRequest::CheckPresence {
2105                            responder: ClientProviderCheckPresenceResponder {
2106                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2107                                tx_id: header.tx_id,
2108                            },
2109                        })
2110                    }
2111                    _ => Err(fidl::Error::UnknownOrdinal {
2112                        ordinal: header.ordinal,
2113                        protocol_name:
2114                            <ClientProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2115                    }),
2116                }))
2117            },
2118        )
2119    }
2120}
2121
2122/// Provides a method to create new DHCP clients.
2123#[derive(Debug)]
2124pub enum ClientProviderRequest {
2125    /// Provides a DHCPv4 client.
2126    ///
2127    /// + request `params` the parameters to create the client with.
2128    /// + request `request` grants control over the client.
2129    NewClient {
2130        interface_id: u64,
2131        params: NewClientParams,
2132        request: fidl::endpoints::ServerEnd<ClientMarker>,
2133        control_handle: ClientProviderControlHandle,
2134    },
2135    /// No-op method that allows checking for presence.
2136    ///
2137    /// TODO(https://fxbug.dev/296283299): It's not currently possible for a
2138    /// client with an optionally-provided protocol to check whether there's
2139    /// someone on the other end without making a FIDL call . This method
2140    /// provides a workaround by giving a client a method that it can call to
2141    /// check for liveness.
2142    ///
2143    /// TODO(https://fxbug.dev/42076541): Remove this once the DHCP out-of-stack
2144    /// client is always being used.
2145    CheckPresence { responder: ClientProviderCheckPresenceResponder },
2146}
2147
2148impl ClientProviderRequest {
2149    #[allow(irrefutable_let_patterns)]
2150    pub fn into_new_client(
2151        self,
2152    ) -> Option<(
2153        u64,
2154        NewClientParams,
2155        fidl::endpoints::ServerEnd<ClientMarker>,
2156        ClientProviderControlHandle,
2157    )> {
2158        if let ClientProviderRequest::NewClient { interface_id, params, request, control_handle } =
2159            self
2160        {
2161            Some((interface_id, params, request, control_handle))
2162        } else {
2163            None
2164        }
2165    }
2166
2167    #[allow(irrefutable_let_patterns)]
2168    pub fn into_check_presence(self) -> Option<(ClientProviderCheckPresenceResponder)> {
2169        if let ClientProviderRequest::CheckPresence { responder } = self {
2170            Some((responder))
2171        } else {
2172            None
2173        }
2174    }
2175
2176    /// Name of the method defined in FIDL
2177    pub fn method_name(&self) -> &'static str {
2178        match *self {
2179            ClientProviderRequest::NewClient { .. } => "new_client",
2180            ClientProviderRequest::CheckPresence { .. } => "check_presence",
2181        }
2182    }
2183}
2184
2185#[derive(Debug, Clone)]
2186pub struct ClientProviderControlHandle {
2187    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2188}
2189
2190impl fidl::endpoints::ControlHandle for ClientProviderControlHandle {
2191    fn shutdown(&self) {
2192        self.inner.shutdown()
2193    }
2194    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2195        self.inner.shutdown_with_epitaph(status)
2196    }
2197
2198    fn is_closed(&self) -> bool {
2199        self.inner.channel().is_closed()
2200    }
2201    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2202        self.inner.channel().on_closed()
2203    }
2204
2205    #[cfg(target_os = "fuchsia")]
2206    fn signal_peer(
2207        &self,
2208        clear_mask: zx::Signals,
2209        set_mask: zx::Signals,
2210    ) -> Result<(), zx_status::Status> {
2211        use fidl::Peered;
2212        self.inner.channel().signal_peer(clear_mask, set_mask)
2213    }
2214}
2215
2216impl ClientProviderControlHandle {}
2217
2218#[must_use = "FIDL methods require a response to be sent"]
2219#[derive(Debug)]
2220pub struct ClientProviderCheckPresenceResponder {
2221    control_handle: std::mem::ManuallyDrop<ClientProviderControlHandle>,
2222    tx_id: u32,
2223}
2224
2225/// Set the the channel to be shutdown (see [`ClientProviderControlHandle::shutdown`])
2226/// if the responder is dropped without sending a response, so that the client
2227/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2228impl std::ops::Drop for ClientProviderCheckPresenceResponder {
2229    fn drop(&mut self) {
2230        self.control_handle.shutdown();
2231        // Safety: drops once, never accessed again
2232        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2233    }
2234}
2235
2236impl fidl::endpoints::Responder for ClientProviderCheckPresenceResponder {
2237    type ControlHandle = ClientProviderControlHandle;
2238
2239    fn control_handle(&self) -> &ClientProviderControlHandle {
2240        &self.control_handle
2241    }
2242
2243    fn drop_without_shutdown(mut self) {
2244        // Safety: drops once, never accessed again due to mem::forget
2245        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2246        // Prevent Drop from running (which would shut down the channel)
2247        std::mem::forget(self);
2248    }
2249}
2250
2251impl ClientProviderCheckPresenceResponder {
2252    /// Sends a response to the FIDL transaction.
2253    ///
2254    /// Sets the channel to shutdown if an error occurs.
2255    pub fn send(self) -> Result<(), fidl::Error> {
2256        let _result = self.send_raw();
2257        if _result.is_err() {
2258            self.control_handle.shutdown();
2259        }
2260        self.drop_without_shutdown();
2261        _result
2262    }
2263
2264    /// Similar to "send" but does not shutdown the channel if an error occurs.
2265    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2266        let _result = self.send_raw();
2267        self.drop_without_shutdown();
2268        _result
2269    }
2270
2271    fn send_raw(&self) -> Result<(), fidl::Error> {
2272        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2273            (),
2274            self.tx_id,
2275            0x7ba657cd730bbf60,
2276            fidl::encoding::DynamicFlags::empty(),
2277        )
2278    }
2279}
2280
2281#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2282pub struct Server_Marker;
2283
2284impl fidl::endpoints::ProtocolMarker for Server_Marker {
2285    type Proxy = Server_Proxy;
2286    type RequestStream = Server_RequestStream;
2287    #[cfg(target_os = "fuchsia")]
2288    type SynchronousProxy = Server_SynchronousProxy;
2289
2290    const DEBUG_NAME: &'static str = "fuchsia.net.dhcp.Server";
2291}
2292impl fidl::endpoints::DiscoverableProtocolMarker for Server_Marker {}
2293pub type ServerStartServingResult = Result<(), i32>;
2294pub type ServerGetOptionResult = Result<Option_, i32>;
2295pub type ServerGetParameterResult = Result<Parameter, i32>;
2296pub type ServerSetOptionResult = Result<(), i32>;
2297pub type ServerSetParameterResult = Result<(), i32>;
2298pub type ServerListOptionsResult = Result<Vec<Option_>, i32>;
2299pub type ServerListParametersResult = Result<Vec<Parameter>, i32>;
2300pub type ServerResetOptionsResult = Result<(), i32>;
2301pub type ServerResetParametersResult = Result<(), i32>;
2302pub type ServerClearLeasesResult = Result<(), i32>;
2303
2304pub trait Server_ProxyInterface: Send + Sync {
2305    type StartServingResponseFut: std::future::Future<Output = Result<ServerStartServingResult, fidl::Error>>
2306        + Send;
2307    fn r#start_serving(&self) -> Self::StartServingResponseFut;
2308    type StopServingResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2309    fn r#stop_serving(&self) -> Self::StopServingResponseFut;
2310    type IsServingResponseFut: std::future::Future<Output = Result<bool, fidl::Error>> + Send;
2311    fn r#is_serving(&self) -> Self::IsServingResponseFut;
2312    type GetOptionResponseFut: std::future::Future<Output = Result<ServerGetOptionResult, fidl::Error>>
2313        + Send;
2314    fn r#get_option(&self, code: OptionCode) -> Self::GetOptionResponseFut;
2315    type GetParameterResponseFut: std::future::Future<Output = Result<ServerGetParameterResult, fidl::Error>>
2316        + Send;
2317    fn r#get_parameter(&self, name: ParameterName) -> Self::GetParameterResponseFut;
2318    type SetOptionResponseFut: std::future::Future<Output = Result<ServerSetOptionResult, fidl::Error>>
2319        + Send;
2320    fn r#set_option(&self, value: &Option_) -> Self::SetOptionResponseFut;
2321    type SetParameterResponseFut: std::future::Future<Output = Result<ServerSetParameterResult, fidl::Error>>
2322        + Send;
2323    fn r#set_parameter(&self, value: &Parameter) -> Self::SetParameterResponseFut;
2324    type ListOptionsResponseFut: std::future::Future<Output = Result<ServerListOptionsResult, fidl::Error>>
2325        + Send;
2326    fn r#list_options(&self) -> Self::ListOptionsResponseFut;
2327    type ListParametersResponseFut: std::future::Future<Output = Result<ServerListParametersResult, fidl::Error>>
2328        + Send;
2329    fn r#list_parameters(&self) -> Self::ListParametersResponseFut;
2330    type ResetOptionsResponseFut: std::future::Future<Output = Result<ServerResetOptionsResult, fidl::Error>>
2331        + Send;
2332    fn r#reset_options(&self) -> Self::ResetOptionsResponseFut;
2333    type ResetParametersResponseFut: std::future::Future<Output = Result<ServerResetParametersResult, fidl::Error>>
2334        + Send;
2335    fn r#reset_parameters(&self) -> Self::ResetParametersResponseFut;
2336    type ClearLeasesResponseFut: std::future::Future<Output = Result<ServerClearLeasesResult, fidl::Error>>
2337        + Send;
2338    fn r#clear_leases(&self) -> Self::ClearLeasesResponseFut;
2339}
2340#[derive(Debug)]
2341#[cfg(target_os = "fuchsia")]
2342pub struct Server_SynchronousProxy {
2343    client: fidl::client::sync::Client,
2344}
2345
2346#[cfg(target_os = "fuchsia")]
2347impl fidl::endpoints::SynchronousProxy for Server_SynchronousProxy {
2348    type Proxy = Server_Proxy;
2349    type Protocol = Server_Marker;
2350
2351    fn from_channel(inner: fidl::Channel) -> Self {
2352        Self::new(inner)
2353    }
2354
2355    fn into_channel(self) -> fidl::Channel {
2356        self.client.into_channel()
2357    }
2358
2359    fn as_channel(&self) -> &fidl::Channel {
2360        self.client.as_channel()
2361    }
2362}
2363
2364#[cfg(target_os = "fuchsia")]
2365impl Server_SynchronousProxy {
2366    pub fn new(channel: fidl::Channel) -> Self {
2367        let protocol_name = <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2368        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2369    }
2370
2371    pub fn into_channel(self) -> fidl::Channel {
2372        self.client.into_channel()
2373    }
2374
2375    /// Waits until an event arrives and returns it. It is safe for other
2376    /// threads to make concurrent requests while waiting for an event.
2377    pub fn wait_for_event(
2378        &self,
2379        deadline: zx::MonotonicInstant,
2380    ) -> Result<Server_Event, fidl::Error> {
2381        Server_Event::decode(self.client.wait_for_event(deadline)?)
2382    }
2383
2384    /// Starts serving DHCP leases.
2385    ///
2386    /// Starts the DHCP server with the current set of parameters.
2387    ///
2388    /// On error the server remains in the stopped state. If the server is
2389    /// already serving, `StartServing` is a no-op.
2390    ///
2391    /// *error a zx.Status indicating why the server could not be started.
2392    pub fn r#start_serving(
2393        &self,
2394        ___deadline: zx::MonotonicInstant,
2395    ) -> Result<ServerStartServingResult, fidl::Error> {
2396        let _response = self.client.send_query::<
2397            fidl::encoding::EmptyPayload,
2398            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2399        >(
2400            (),
2401            0x10990e324ac53cd1,
2402            fidl::encoding::DynamicFlags::empty(),
2403            ___deadline,
2404        )?;
2405        Ok(_response.map(|x| x))
2406    }
2407
2408    /// Stops serving DHCP leases.
2409    ///
2410    /// Stopping causes all the listening ports to be closed.
2411    ///
2412    /// Configuring parameters on the DHCP server is only allowed when the
2413    /// server is stopped.
2414    ///
2415    /// If the server is not currently serving, `StopServing` is a no-op.
2416    pub fn r#stop_serving(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2417        let _response =
2418            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
2419                (),
2420                0x7776cfe9f68a0dbe,
2421                fidl::encoding::DynamicFlags::empty(),
2422                ___deadline,
2423            )?;
2424        Ok(_response)
2425    }
2426
2427    /// Returns whether or not the server is serving DHCP leases.
2428    pub fn r#is_serving(&self, ___deadline: zx::MonotonicInstant) -> Result<bool, fidl::Error> {
2429        let _response =
2430            self.client.send_query::<fidl::encoding::EmptyPayload, ServerIsServingResponse>(
2431                (),
2432                0x45aadc35fcbe3826,
2433                fidl::encoding::DynamicFlags::empty(),
2434                ___deadline,
2435            )?;
2436        Ok(_response.enabled)
2437    }
2438
2439    /// Returns the requested Option if it is supported.
2440    ///
2441    /// + request `code` the code of an Option whose value has been requested.
2442    /// - response `value` the value of the requested Option.
2443    /// * error a zx.Status indicating why the value could not be retrieved.
2444    pub fn r#get_option(
2445        &self,
2446        mut code: OptionCode,
2447        ___deadline: zx::MonotonicInstant,
2448    ) -> Result<ServerGetOptionResult, fidl::Error> {
2449        let _response = self.client.send_query::<
2450            ServerGetOptionRequest,
2451            fidl::encoding::ResultType<ServerGetOptionResponse, i32>,
2452        >(
2453            (code,),
2454            0x5305ee2c593f68a,
2455            fidl::encoding::DynamicFlags::empty(),
2456            ___deadline,
2457        )?;
2458        Ok(_response.map(|x| x.value))
2459    }
2460
2461    /// Returns the requested Parameter if it is supported.
2462    ///
2463    /// + request `name` the name of a Parameter whose value has been requested.
2464    /// - response `value` the value of the requested Parameter.
2465    /// * error a zx.Status indicating why the value could not be retrieved.
2466    pub fn r#get_parameter(
2467        &self,
2468        mut name: ParameterName,
2469        ___deadline: zx::MonotonicInstant,
2470    ) -> Result<ServerGetParameterResult, fidl::Error> {
2471        let _response = self.client.send_query::<
2472            ServerGetParameterRequest,
2473            fidl::encoding::ResultType<ServerGetParameterResponse, i32>,
2474        >(
2475            (name,),
2476            0x1e8c98758fb82714,
2477            fidl::encoding::DynamicFlags::empty(),
2478            ___deadline,
2479        )?;
2480        Ok(_response.map(|x| x.value))
2481    }
2482
2483    /// Sets the Option to the argument. On success, a SetOption will take
2484    /// effect immediately.
2485    ///
2486    /// + request `value` an Option whose value will be set to the value of this
2487    /// argument.
2488    /// * error a zx.Status indicating the cause of failure.
2489    pub fn r#set_option(
2490        &self,
2491        mut value: &Option_,
2492        ___deadline: zx::MonotonicInstant,
2493    ) -> Result<ServerSetOptionResult, fidl::Error> {
2494        let _response = self.client.send_query::<
2495            ServerSetOptionRequest,
2496            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2497        >(
2498            (value,),
2499            0x63c98b670db8d96a,
2500            fidl::encoding::DynamicFlags::empty(),
2501            ___deadline,
2502        )?;
2503        Ok(_response.map(|x| x))
2504    }
2505
2506    /// Sets the Parameter to the argument. On success, the new parameter value
2507    /// can be queried by GetParameter or ListParameter immediately. However,
2508    /// the server may require a restart in order for the new Parameter value to
2509    /// take effect.
2510    ///
2511    /// Setting parameters is only allowed if the server is stopped.
2512    /// `ZX_ERR_BAD_STATE` is returned otherwise.
2513    ///
2514    /// + request `value` a Parameter whose value will be set to the value of
2515    /// this argument.
2516    /// * error a zx.Status indicating the cause of failure.
2517    pub fn r#set_parameter(
2518        &self,
2519        mut value: &Parameter,
2520        ___deadline: zx::MonotonicInstant,
2521    ) -> Result<ServerSetParameterResult, fidl::Error> {
2522        let _response = self.client.send_query::<
2523            ServerSetParameterRequest,
2524            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2525        >(
2526            (value,),
2527            0x3002d0d956eb4bdc,
2528            fidl::encoding::DynamicFlags::empty(),
2529            ___deadline,
2530        )?;
2531        Ok(_response.map(|x| x))
2532    }
2533
2534    /// Lists all DHCP options for which the Server has a value. Any option
2535    /// which does not have a value will be omitted from the returned list.
2536    /// ListOptions provides administrators a means to print a server's
2537    /// configuration as opposed to querying the value of a single Option.
2538    ///
2539    /// - response `options` a vector containing all of the options for which
2540    /// the Server has a value. Bounded to 256 as options are identified by a 1
2541    /// octet code and 256 is the maximum number of such codes.
2542    /// * error a zx.Status indicating the cause of failure.
2543    pub fn r#list_options(
2544        &self,
2545        ___deadline: zx::MonotonicInstant,
2546    ) -> Result<ServerListOptionsResult, fidl::Error> {
2547        let _response = self.client.send_query::<
2548            fidl::encoding::EmptyPayload,
2549            fidl::encoding::ResultType<ServerListOptionsResponse, i32>,
2550        >(
2551            (),
2552            0x72c8161c69ca67b,
2553            fidl::encoding::DynamicFlags::empty(),
2554            ___deadline,
2555        )?;
2556        Ok(_response.map(|x| x.options))
2557    }
2558
2559    /// Lists all DHCP server parameters. ListParameters provides administrators
2560    /// a means to print a server's configuration as opposed to querying the
2561    /// value of a single Parameter.
2562    ///
2563    /// - response `parameter` a vector containing the values of all of the
2564    /// Server's parameters. Bounded to 256 to provide a generous upper limit
2565    /// on the number of server parameters while being of the same size as
2566    /// ListOptions.
2567    /// * error a zx.Status indicating the cause of failure.
2568    pub fn r#list_parameters(
2569        &self,
2570        ___deadline: zx::MonotonicInstant,
2571    ) -> Result<ServerListParametersResult, fidl::Error> {
2572        let _response = self.client.send_query::<
2573            fidl::encoding::EmptyPayload,
2574            fidl::encoding::ResultType<ServerListParametersResponse, i32>,
2575        >(
2576            (),
2577            0xa201b1d6d121c59,
2578            fidl::encoding::DynamicFlags::empty(),
2579            ___deadline,
2580        )?;
2581        Ok(_response.map(|x| x.parameters))
2582    }
2583
2584    /// Resets all DHCP options to have no value. On success, ResetOptions will
2585    /// take effect immediately.
2586    ///
2587    /// * error a zx.Status indicating the cause of failure.
2588    pub fn r#reset_options(
2589        &self,
2590        ___deadline: zx::MonotonicInstant,
2591    ) -> Result<ServerResetOptionsResult, fidl::Error> {
2592        let _response = self.client.send_query::<
2593            fidl::encoding::EmptyPayload,
2594            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2595        >(
2596            (),
2597            0x31014911fd21cc13,
2598            fidl::encoding::DynamicFlags::empty(),
2599            ___deadline,
2600        )?;
2601        Ok(_response.map(|x| x))
2602    }
2603
2604    /// Resets all DHCP server parameters to their default value. On success,
2605    /// the reset parameter values can be queried immediately with GetParameter
2606    /// or ListParameters. However, the server must be restarted before all new
2607    /// parameter values take effect.
2608    ///
2609    /// Setting parameters is only allowed if the server is stopped.
2610    /// `ZX_ERR_BAD_STATE` is returned otherwise.
2611    ///
2612    /// * error a zx.Status indicating the cause of failure.
2613    pub fn r#reset_parameters(
2614        &self,
2615        ___deadline: zx::MonotonicInstant,
2616    ) -> Result<ServerResetParametersResult, fidl::Error> {
2617        let _response = self.client.send_query::<
2618            fidl::encoding::EmptyPayload,
2619            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2620        >(
2621            (),
2622            0x353fba50bcf4ecec,
2623            fidl::encoding::DynamicFlags::empty(),
2624            ___deadline,
2625        )?;
2626        Ok(_response.map(|x| x))
2627    }
2628
2629    /// Clears all leases maintained by the Server. On success, ClearLeases will
2630    /// take effect immediately. Server administrators should take care when
2631    /// calling this method as the DHCP protocol does not provide a mechanism by
2632    /// which a Server can notify a client that its lease has been cleared.
2633    ///
2634    /// * error a zx.Status indicating the cause of failure.
2635    pub fn r#clear_leases(
2636        &self,
2637        ___deadline: zx::MonotonicInstant,
2638    ) -> Result<ServerClearLeasesResult, fidl::Error> {
2639        let _response = self.client.send_query::<
2640            fidl::encoding::EmptyPayload,
2641            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2642        >(
2643            (),
2644            0xe39e35cda85a04d,
2645            fidl::encoding::DynamicFlags::empty(),
2646            ___deadline,
2647        )?;
2648        Ok(_response.map(|x| x))
2649    }
2650}
2651
2652#[derive(Debug, Clone)]
2653pub struct Server_Proxy {
2654    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2655}
2656
2657impl fidl::endpoints::Proxy for Server_Proxy {
2658    type Protocol = Server_Marker;
2659
2660    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2661        Self::new(inner)
2662    }
2663
2664    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2665        self.client.into_channel().map_err(|client| Self { client })
2666    }
2667
2668    fn as_channel(&self) -> &::fidl::AsyncChannel {
2669        self.client.as_channel()
2670    }
2671}
2672
2673impl Server_Proxy {
2674    /// Create a new Proxy for fuchsia.net.dhcp/Server.
2675    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2676        let protocol_name = <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2677        Self { client: fidl::client::Client::new(channel, protocol_name) }
2678    }
2679
2680    /// Get a Stream of events from the remote end of the protocol.
2681    ///
2682    /// # Panics
2683    ///
2684    /// Panics if the event stream was already taken.
2685    pub fn take_event_stream(&self) -> Server_EventStream {
2686        Server_EventStream { event_receiver: self.client.take_event_receiver() }
2687    }
2688
2689    /// Starts serving DHCP leases.
2690    ///
2691    /// Starts the DHCP server with the current set of parameters.
2692    ///
2693    /// On error the server remains in the stopped state. If the server is
2694    /// already serving, `StartServing` is a no-op.
2695    ///
2696    /// *error a zx.Status indicating why the server could not be started.
2697    pub fn r#start_serving(
2698        &self,
2699    ) -> fidl::client::QueryResponseFut<
2700        ServerStartServingResult,
2701        fidl::encoding::DefaultFuchsiaResourceDialect,
2702    > {
2703        Server_ProxyInterface::r#start_serving(self)
2704    }
2705
2706    /// Stops serving DHCP leases.
2707    ///
2708    /// Stopping causes all the listening ports to be closed.
2709    ///
2710    /// Configuring parameters on the DHCP server is only allowed when the
2711    /// server is stopped.
2712    ///
2713    /// If the server is not currently serving, `StopServing` is a no-op.
2714    pub fn r#stop_serving(
2715        &self,
2716    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2717        Server_ProxyInterface::r#stop_serving(self)
2718    }
2719
2720    /// Returns whether or not the server is serving DHCP leases.
2721    pub fn r#is_serving(
2722        &self,
2723    ) -> fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect> {
2724        Server_ProxyInterface::r#is_serving(self)
2725    }
2726
2727    /// Returns the requested Option if it is supported.
2728    ///
2729    /// + request `code` the code of an Option whose value has been requested.
2730    /// - response `value` the value of the requested Option.
2731    /// * error a zx.Status indicating why the value could not be retrieved.
2732    pub fn r#get_option(
2733        &self,
2734        mut code: OptionCode,
2735    ) -> fidl::client::QueryResponseFut<
2736        ServerGetOptionResult,
2737        fidl::encoding::DefaultFuchsiaResourceDialect,
2738    > {
2739        Server_ProxyInterface::r#get_option(self, code)
2740    }
2741
2742    /// Returns the requested Parameter if it is supported.
2743    ///
2744    /// + request `name` the name of a Parameter whose value has been requested.
2745    /// - response `value` the value of the requested Parameter.
2746    /// * error a zx.Status indicating why the value could not be retrieved.
2747    pub fn r#get_parameter(
2748        &self,
2749        mut name: ParameterName,
2750    ) -> fidl::client::QueryResponseFut<
2751        ServerGetParameterResult,
2752        fidl::encoding::DefaultFuchsiaResourceDialect,
2753    > {
2754        Server_ProxyInterface::r#get_parameter(self, name)
2755    }
2756
2757    /// Sets the Option to the argument. On success, a SetOption will take
2758    /// effect immediately.
2759    ///
2760    /// + request `value` an Option whose value will be set to the value of this
2761    /// argument.
2762    /// * error a zx.Status indicating the cause of failure.
2763    pub fn r#set_option(
2764        &self,
2765        mut value: &Option_,
2766    ) -> fidl::client::QueryResponseFut<
2767        ServerSetOptionResult,
2768        fidl::encoding::DefaultFuchsiaResourceDialect,
2769    > {
2770        Server_ProxyInterface::r#set_option(self, value)
2771    }
2772
2773    /// Sets the Parameter to the argument. On success, the new parameter value
2774    /// can be queried by GetParameter or ListParameter immediately. However,
2775    /// the server may require a restart in order for the new Parameter value to
2776    /// take effect.
2777    ///
2778    /// Setting parameters is only allowed if the server is stopped.
2779    /// `ZX_ERR_BAD_STATE` is returned otherwise.
2780    ///
2781    /// + request `value` a Parameter whose value will be set to the value of
2782    /// this argument.
2783    /// * error a zx.Status indicating the cause of failure.
2784    pub fn r#set_parameter(
2785        &self,
2786        mut value: &Parameter,
2787    ) -> fidl::client::QueryResponseFut<
2788        ServerSetParameterResult,
2789        fidl::encoding::DefaultFuchsiaResourceDialect,
2790    > {
2791        Server_ProxyInterface::r#set_parameter(self, value)
2792    }
2793
2794    /// Lists all DHCP options for which the Server has a value. Any option
2795    /// which does not have a value will be omitted from the returned list.
2796    /// ListOptions provides administrators a means to print a server's
2797    /// configuration as opposed to querying the value of a single Option.
2798    ///
2799    /// - response `options` a vector containing all of the options for which
2800    /// the Server has a value. Bounded to 256 as options are identified by a 1
2801    /// octet code and 256 is the maximum number of such codes.
2802    /// * error a zx.Status indicating the cause of failure.
2803    pub fn r#list_options(
2804        &self,
2805    ) -> fidl::client::QueryResponseFut<
2806        ServerListOptionsResult,
2807        fidl::encoding::DefaultFuchsiaResourceDialect,
2808    > {
2809        Server_ProxyInterface::r#list_options(self)
2810    }
2811
2812    /// Lists all DHCP server parameters. ListParameters provides administrators
2813    /// a means to print a server's configuration as opposed to querying the
2814    /// value of a single Parameter.
2815    ///
2816    /// - response `parameter` a vector containing the values of all of the
2817    /// Server's parameters. Bounded to 256 to provide a generous upper limit
2818    /// on the number of server parameters while being of the same size as
2819    /// ListOptions.
2820    /// * error a zx.Status indicating the cause of failure.
2821    pub fn r#list_parameters(
2822        &self,
2823    ) -> fidl::client::QueryResponseFut<
2824        ServerListParametersResult,
2825        fidl::encoding::DefaultFuchsiaResourceDialect,
2826    > {
2827        Server_ProxyInterface::r#list_parameters(self)
2828    }
2829
2830    /// Resets all DHCP options to have no value. On success, ResetOptions will
2831    /// take effect immediately.
2832    ///
2833    /// * error a zx.Status indicating the cause of failure.
2834    pub fn r#reset_options(
2835        &self,
2836    ) -> fidl::client::QueryResponseFut<
2837        ServerResetOptionsResult,
2838        fidl::encoding::DefaultFuchsiaResourceDialect,
2839    > {
2840        Server_ProxyInterface::r#reset_options(self)
2841    }
2842
2843    /// Resets all DHCP server parameters to their default value. On success,
2844    /// the reset parameter values can be queried immediately with GetParameter
2845    /// or ListParameters. However, the server must be restarted before all new
2846    /// parameter values take effect.
2847    ///
2848    /// Setting parameters is only allowed if the server is stopped.
2849    /// `ZX_ERR_BAD_STATE` is returned otherwise.
2850    ///
2851    /// * error a zx.Status indicating the cause of failure.
2852    pub fn r#reset_parameters(
2853        &self,
2854    ) -> fidl::client::QueryResponseFut<
2855        ServerResetParametersResult,
2856        fidl::encoding::DefaultFuchsiaResourceDialect,
2857    > {
2858        Server_ProxyInterface::r#reset_parameters(self)
2859    }
2860
2861    /// Clears all leases maintained by the Server. On success, ClearLeases will
2862    /// take effect immediately. Server administrators should take care when
2863    /// calling this method as the DHCP protocol does not provide a mechanism by
2864    /// which a Server can notify a client that its lease has been cleared.
2865    ///
2866    /// * error a zx.Status indicating the cause of failure.
2867    pub fn r#clear_leases(
2868        &self,
2869    ) -> fidl::client::QueryResponseFut<
2870        ServerClearLeasesResult,
2871        fidl::encoding::DefaultFuchsiaResourceDialect,
2872    > {
2873        Server_ProxyInterface::r#clear_leases(self)
2874    }
2875}
2876
2877impl Server_ProxyInterface for Server_Proxy {
2878    type StartServingResponseFut = fidl::client::QueryResponseFut<
2879        ServerStartServingResult,
2880        fidl::encoding::DefaultFuchsiaResourceDialect,
2881    >;
2882    fn r#start_serving(&self) -> Self::StartServingResponseFut {
2883        fn _decode(
2884            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2885        ) -> Result<ServerStartServingResult, fidl::Error> {
2886            let _response = fidl::client::decode_transaction_body::<
2887                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2888                fidl::encoding::DefaultFuchsiaResourceDialect,
2889                0x10990e324ac53cd1,
2890            >(_buf?)?;
2891            Ok(_response.map(|x| x))
2892        }
2893        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ServerStartServingResult>(
2894            (),
2895            0x10990e324ac53cd1,
2896            fidl::encoding::DynamicFlags::empty(),
2897            _decode,
2898        )
2899    }
2900
2901    type StopServingResponseFut =
2902        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
2903    fn r#stop_serving(&self) -> Self::StopServingResponseFut {
2904        fn _decode(
2905            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2906        ) -> Result<(), fidl::Error> {
2907            let _response = fidl::client::decode_transaction_body::<
2908                fidl::encoding::EmptyPayload,
2909                fidl::encoding::DefaultFuchsiaResourceDialect,
2910                0x7776cfe9f68a0dbe,
2911            >(_buf?)?;
2912            Ok(_response)
2913        }
2914        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
2915            (),
2916            0x7776cfe9f68a0dbe,
2917            fidl::encoding::DynamicFlags::empty(),
2918            _decode,
2919        )
2920    }
2921
2922    type IsServingResponseFut =
2923        fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect>;
2924    fn r#is_serving(&self) -> Self::IsServingResponseFut {
2925        fn _decode(
2926            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2927        ) -> Result<bool, fidl::Error> {
2928            let _response = fidl::client::decode_transaction_body::<
2929                ServerIsServingResponse,
2930                fidl::encoding::DefaultFuchsiaResourceDialect,
2931                0x45aadc35fcbe3826,
2932            >(_buf?)?;
2933            Ok(_response.enabled)
2934        }
2935        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, bool>(
2936            (),
2937            0x45aadc35fcbe3826,
2938            fidl::encoding::DynamicFlags::empty(),
2939            _decode,
2940        )
2941    }
2942
2943    type GetOptionResponseFut = fidl::client::QueryResponseFut<
2944        ServerGetOptionResult,
2945        fidl::encoding::DefaultFuchsiaResourceDialect,
2946    >;
2947    fn r#get_option(&self, mut code: OptionCode) -> Self::GetOptionResponseFut {
2948        fn _decode(
2949            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2950        ) -> Result<ServerGetOptionResult, fidl::Error> {
2951            let _response = fidl::client::decode_transaction_body::<
2952                fidl::encoding::ResultType<ServerGetOptionResponse, i32>,
2953                fidl::encoding::DefaultFuchsiaResourceDialect,
2954                0x5305ee2c593f68a,
2955            >(_buf?)?;
2956            Ok(_response.map(|x| x.value))
2957        }
2958        self.client.send_query_and_decode::<ServerGetOptionRequest, ServerGetOptionResult>(
2959            (code,),
2960            0x5305ee2c593f68a,
2961            fidl::encoding::DynamicFlags::empty(),
2962            _decode,
2963        )
2964    }
2965
2966    type GetParameterResponseFut = fidl::client::QueryResponseFut<
2967        ServerGetParameterResult,
2968        fidl::encoding::DefaultFuchsiaResourceDialect,
2969    >;
2970    fn r#get_parameter(&self, mut name: ParameterName) -> Self::GetParameterResponseFut {
2971        fn _decode(
2972            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2973        ) -> Result<ServerGetParameterResult, fidl::Error> {
2974            let _response = fidl::client::decode_transaction_body::<
2975                fidl::encoding::ResultType<ServerGetParameterResponse, i32>,
2976                fidl::encoding::DefaultFuchsiaResourceDialect,
2977                0x1e8c98758fb82714,
2978            >(_buf?)?;
2979            Ok(_response.map(|x| x.value))
2980        }
2981        self.client.send_query_and_decode::<ServerGetParameterRequest, ServerGetParameterResult>(
2982            (name,),
2983            0x1e8c98758fb82714,
2984            fidl::encoding::DynamicFlags::empty(),
2985            _decode,
2986        )
2987    }
2988
2989    type SetOptionResponseFut = fidl::client::QueryResponseFut<
2990        ServerSetOptionResult,
2991        fidl::encoding::DefaultFuchsiaResourceDialect,
2992    >;
2993    fn r#set_option(&self, mut value: &Option_) -> Self::SetOptionResponseFut {
2994        fn _decode(
2995            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2996        ) -> Result<ServerSetOptionResult, fidl::Error> {
2997            let _response = fidl::client::decode_transaction_body::<
2998                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2999                fidl::encoding::DefaultFuchsiaResourceDialect,
3000                0x63c98b670db8d96a,
3001            >(_buf?)?;
3002            Ok(_response.map(|x| x))
3003        }
3004        self.client.send_query_and_decode::<ServerSetOptionRequest, ServerSetOptionResult>(
3005            (value,),
3006            0x63c98b670db8d96a,
3007            fidl::encoding::DynamicFlags::empty(),
3008            _decode,
3009        )
3010    }
3011
3012    type SetParameterResponseFut = fidl::client::QueryResponseFut<
3013        ServerSetParameterResult,
3014        fidl::encoding::DefaultFuchsiaResourceDialect,
3015    >;
3016    fn r#set_parameter(&self, mut value: &Parameter) -> Self::SetParameterResponseFut {
3017        fn _decode(
3018            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3019        ) -> Result<ServerSetParameterResult, fidl::Error> {
3020            let _response = fidl::client::decode_transaction_body::<
3021                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3022                fidl::encoding::DefaultFuchsiaResourceDialect,
3023                0x3002d0d956eb4bdc,
3024            >(_buf?)?;
3025            Ok(_response.map(|x| x))
3026        }
3027        self.client.send_query_and_decode::<ServerSetParameterRequest, ServerSetParameterResult>(
3028            (value,),
3029            0x3002d0d956eb4bdc,
3030            fidl::encoding::DynamicFlags::empty(),
3031            _decode,
3032        )
3033    }
3034
3035    type ListOptionsResponseFut = fidl::client::QueryResponseFut<
3036        ServerListOptionsResult,
3037        fidl::encoding::DefaultFuchsiaResourceDialect,
3038    >;
3039    fn r#list_options(&self) -> Self::ListOptionsResponseFut {
3040        fn _decode(
3041            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3042        ) -> Result<ServerListOptionsResult, fidl::Error> {
3043            let _response = fidl::client::decode_transaction_body::<
3044                fidl::encoding::ResultType<ServerListOptionsResponse, i32>,
3045                fidl::encoding::DefaultFuchsiaResourceDialect,
3046                0x72c8161c69ca67b,
3047            >(_buf?)?;
3048            Ok(_response.map(|x| x.options))
3049        }
3050        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ServerListOptionsResult>(
3051            (),
3052            0x72c8161c69ca67b,
3053            fidl::encoding::DynamicFlags::empty(),
3054            _decode,
3055        )
3056    }
3057
3058    type ListParametersResponseFut = fidl::client::QueryResponseFut<
3059        ServerListParametersResult,
3060        fidl::encoding::DefaultFuchsiaResourceDialect,
3061    >;
3062    fn r#list_parameters(&self) -> Self::ListParametersResponseFut {
3063        fn _decode(
3064            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3065        ) -> Result<ServerListParametersResult, fidl::Error> {
3066            let _response = fidl::client::decode_transaction_body::<
3067                fidl::encoding::ResultType<ServerListParametersResponse, i32>,
3068                fidl::encoding::DefaultFuchsiaResourceDialect,
3069                0xa201b1d6d121c59,
3070            >(_buf?)?;
3071            Ok(_response.map(|x| x.parameters))
3072        }
3073        self.client
3074            .send_query_and_decode::<fidl::encoding::EmptyPayload, ServerListParametersResult>(
3075                (),
3076                0xa201b1d6d121c59,
3077                fidl::encoding::DynamicFlags::empty(),
3078                _decode,
3079            )
3080    }
3081
3082    type ResetOptionsResponseFut = fidl::client::QueryResponseFut<
3083        ServerResetOptionsResult,
3084        fidl::encoding::DefaultFuchsiaResourceDialect,
3085    >;
3086    fn r#reset_options(&self) -> Self::ResetOptionsResponseFut {
3087        fn _decode(
3088            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3089        ) -> Result<ServerResetOptionsResult, fidl::Error> {
3090            let _response = fidl::client::decode_transaction_body::<
3091                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3092                fidl::encoding::DefaultFuchsiaResourceDialect,
3093                0x31014911fd21cc13,
3094            >(_buf?)?;
3095            Ok(_response.map(|x| x))
3096        }
3097        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ServerResetOptionsResult>(
3098            (),
3099            0x31014911fd21cc13,
3100            fidl::encoding::DynamicFlags::empty(),
3101            _decode,
3102        )
3103    }
3104
3105    type ResetParametersResponseFut = fidl::client::QueryResponseFut<
3106        ServerResetParametersResult,
3107        fidl::encoding::DefaultFuchsiaResourceDialect,
3108    >;
3109    fn r#reset_parameters(&self) -> Self::ResetParametersResponseFut {
3110        fn _decode(
3111            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3112        ) -> Result<ServerResetParametersResult, fidl::Error> {
3113            let _response = fidl::client::decode_transaction_body::<
3114                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3115                fidl::encoding::DefaultFuchsiaResourceDialect,
3116                0x353fba50bcf4ecec,
3117            >(_buf?)?;
3118            Ok(_response.map(|x| x))
3119        }
3120        self.client
3121            .send_query_and_decode::<fidl::encoding::EmptyPayload, ServerResetParametersResult>(
3122                (),
3123                0x353fba50bcf4ecec,
3124                fidl::encoding::DynamicFlags::empty(),
3125                _decode,
3126            )
3127    }
3128
3129    type ClearLeasesResponseFut = fidl::client::QueryResponseFut<
3130        ServerClearLeasesResult,
3131        fidl::encoding::DefaultFuchsiaResourceDialect,
3132    >;
3133    fn r#clear_leases(&self) -> Self::ClearLeasesResponseFut {
3134        fn _decode(
3135            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3136        ) -> Result<ServerClearLeasesResult, fidl::Error> {
3137            let _response = fidl::client::decode_transaction_body::<
3138                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3139                fidl::encoding::DefaultFuchsiaResourceDialect,
3140                0xe39e35cda85a04d,
3141            >(_buf?)?;
3142            Ok(_response.map(|x| x))
3143        }
3144        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ServerClearLeasesResult>(
3145            (),
3146            0xe39e35cda85a04d,
3147            fidl::encoding::DynamicFlags::empty(),
3148            _decode,
3149        )
3150    }
3151}
3152
3153pub struct Server_EventStream {
3154    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3155}
3156
3157impl std::marker::Unpin for Server_EventStream {}
3158
3159impl futures::stream::FusedStream for Server_EventStream {
3160    fn is_terminated(&self) -> bool {
3161        self.event_receiver.is_terminated()
3162    }
3163}
3164
3165impl futures::Stream for Server_EventStream {
3166    type Item = Result<Server_Event, fidl::Error>;
3167
3168    fn poll_next(
3169        mut self: std::pin::Pin<&mut Self>,
3170        cx: &mut std::task::Context<'_>,
3171    ) -> std::task::Poll<Option<Self::Item>> {
3172        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3173            &mut self.event_receiver,
3174            cx
3175        )?) {
3176            Some(buf) => std::task::Poll::Ready(Some(Server_Event::decode(buf))),
3177            None => std::task::Poll::Ready(None),
3178        }
3179    }
3180}
3181
3182#[derive(Debug)]
3183pub enum Server_Event {}
3184
3185impl Server_Event {
3186    /// Decodes a message buffer as a [`Server_Event`].
3187    fn decode(
3188        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3189    ) -> Result<Server_Event, fidl::Error> {
3190        let (bytes, _handles) = buf.split_mut();
3191        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3192        debug_assert_eq!(tx_header.tx_id, 0);
3193        match tx_header.ordinal {
3194            _ => Err(fidl::Error::UnknownOrdinal {
3195                ordinal: tx_header.ordinal,
3196                protocol_name: <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3197            }),
3198        }
3199    }
3200}
3201
3202/// A Stream of incoming requests for fuchsia.net.dhcp/Server.
3203pub struct Server_RequestStream {
3204    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3205    is_terminated: bool,
3206}
3207
3208impl std::marker::Unpin for Server_RequestStream {}
3209
3210impl futures::stream::FusedStream for Server_RequestStream {
3211    fn is_terminated(&self) -> bool {
3212        self.is_terminated
3213    }
3214}
3215
3216impl fidl::endpoints::RequestStream for Server_RequestStream {
3217    type Protocol = Server_Marker;
3218    type ControlHandle = Server_ControlHandle;
3219
3220    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3221        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3222    }
3223
3224    fn control_handle(&self) -> Self::ControlHandle {
3225        Server_ControlHandle { inner: self.inner.clone() }
3226    }
3227
3228    fn into_inner(
3229        self,
3230    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3231    {
3232        (self.inner, self.is_terminated)
3233    }
3234
3235    fn from_inner(
3236        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3237        is_terminated: bool,
3238    ) -> Self {
3239        Self { inner, is_terminated }
3240    }
3241}
3242
3243impl futures::Stream for Server_RequestStream {
3244    type Item = Result<Server_Request, fidl::Error>;
3245
3246    fn poll_next(
3247        mut self: std::pin::Pin<&mut Self>,
3248        cx: &mut std::task::Context<'_>,
3249    ) -> std::task::Poll<Option<Self::Item>> {
3250        let this = &mut *self;
3251        if this.inner.check_shutdown(cx) {
3252            this.is_terminated = true;
3253            return std::task::Poll::Ready(None);
3254        }
3255        if this.is_terminated {
3256            panic!("polled Server_RequestStream after completion");
3257        }
3258        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3259            |bytes, handles| {
3260                match this.inner.channel().read_etc(cx, bytes, handles) {
3261                    std::task::Poll::Ready(Ok(())) => {}
3262                    std::task::Poll::Pending => return std::task::Poll::Pending,
3263                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3264                        this.is_terminated = true;
3265                        return std::task::Poll::Ready(None);
3266                    }
3267                    std::task::Poll::Ready(Err(e)) => {
3268                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3269                            e.into(),
3270                        ))))
3271                    }
3272                }
3273
3274                // A message has been received from the channel
3275                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3276
3277                std::task::Poll::Ready(Some(match header.ordinal {
3278                    0x10990e324ac53cd1 => {
3279                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3280                        let mut req = fidl::new_empty!(
3281                            fidl::encoding::EmptyPayload,
3282                            fidl::encoding::DefaultFuchsiaResourceDialect
3283                        );
3284                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3285                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3286                        Ok(Server_Request::StartServing {
3287                            responder: Server_StartServingResponder {
3288                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3289                                tx_id: header.tx_id,
3290                            },
3291                        })
3292                    }
3293                    0x7776cfe9f68a0dbe => {
3294                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3295                        let mut req = fidl::new_empty!(
3296                            fidl::encoding::EmptyPayload,
3297                            fidl::encoding::DefaultFuchsiaResourceDialect
3298                        );
3299                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3300                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3301                        Ok(Server_Request::StopServing {
3302                            responder: Server_StopServingResponder {
3303                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3304                                tx_id: header.tx_id,
3305                            },
3306                        })
3307                    }
3308                    0x45aadc35fcbe3826 => {
3309                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3310                        let mut req = fidl::new_empty!(
3311                            fidl::encoding::EmptyPayload,
3312                            fidl::encoding::DefaultFuchsiaResourceDialect
3313                        );
3314                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3315                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3316                        Ok(Server_Request::IsServing {
3317                            responder: Server_IsServingResponder {
3318                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3319                                tx_id: header.tx_id,
3320                            },
3321                        })
3322                    }
3323                    0x5305ee2c593f68a => {
3324                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3325                        let mut req = fidl::new_empty!(
3326                            ServerGetOptionRequest,
3327                            fidl::encoding::DefaultFuchsiaResourceDialect
3328                        );
3329                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ServerGetOptionRequest>(&header, _body_bytes, handles, &mut req)?;
3330                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3331                        Ok(Server_Request::GetOption {
3332                            code: req.code,
3333
3334                            responder: Server_GetOptionResponder {
3335                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3336                                tx_id: header.tx_id,
3337                            },
3338                        })
3339                    }
3340                    0x1e8c98758fb82714 => {
3341                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3342                        let mut req = fidl::new_empty!(
3343                            ServerGetParameterRequest,
3344                            fidl::encoding::DefaultFuchsiaResourceDialect
3345                        );
3346                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ServerGetParameterRequest>(&header, _body_bytes, handles, &mut req)?;
3347                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3348                        Ok(Server_Request::GetParameter {
3349                            name: req.name,
3350
3351                            responder: Server_GetParameterResponder {
3352                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3353                                tx_id: header.tx_id,
3354                            },
3355                        })
3356                    }
3357                    0x63c98b670db8d96a => {
3358                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3359                        let mut req = fidl::new_empty!(
3360                            ServerSetOptionRequest,
3361                            fidl::encoding::DefaultFuchsiaResourceDialect
3362                        );
3363                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ServerSetOptionRequest>(&header, _body_bytes, handles, &mut req)?;
3364                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3365                        Ok(Server_Request::SetOption {
3366                            value: req.value,
3367
3368                            responder: Server_SetOptionResponder {
3369                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3370                                tx_id: header.tx_id,
3371                            },
3372                        })
3373                    }
3374                    0x3002d0d956eb4bdc => {
3375                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3376                        let mut req = fidl::new_empty!(
3377                            ServerSetParameterRequest,
3378                            fidl::encoding::DefaultFuchsiaResourceDialect
3379                        );
3380                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ServerSetParameterRequest>(&header, _body_bytes, handles, &mut req)?;
3381                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3382                        Ok(Server_Request::SetParameter {
3383                            value: req.value,
3384
3385                            responder: Server_SetParameterResponder {
3386                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3387                                tx_id: header.tx_id,
3388                            },
3389                        })
3390                    }
3391                    0x72c8161c69ca67b => {
3392                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3393                        let mut req = fidl::new_empty!(
3394                            fidl::encoding::EmptyPayload,
3395                            fidl::encoding::DefaultFuchsiaResourceDialect
3396                        );
3397                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3398                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3399                        Ok(Server_Request::ListOptions {
3400                            responder: Server_ListOptionsResponder {
3401                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3402                                tx_id: header.tx_id,
3403                            },
3404                        })
3405                    }
3406                    0xa201b1d6d121c59 => {
3407                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3408                        let mut req = fidl::new_empty!(
3409                            fidl::encoding::EmptyPayload,
3410                            fidl::encoding::DefaultFuchsiaResourceDialect
3411                        );
3412                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3413                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3414                        Ok(Server_Request::ListParameters {
3415                            responder: Server_ListParametersResponder {
3416                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3417                                tx_id: header.tx_id,
3418                            },
3419                        })
3420                    }
3421                    0x31014911fd21cc13 => {
3422                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3423                        let mut req = fidl::new_empty!(
3424                            fidl::encoding::EmptyPayload,
3425                            fidl::encoding::DefaultFuchsiaResourceDialect
3426                        );
3427                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3428                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3429                        Ok(Server_Request::ResetOptions {
3430                            responder: Server_ResetOptionsResponder {
3431                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3432                                tx_id: header.tx_id,
3433                            },
3434                        })
3435                    }
3436                    0x353fba50bcf4ecec => {
3437                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3438                        let mut req = fidl::new_empty!(
3439                            fidl::encoding::EmptyPayload,
3440                            fidl::encoding::DefaultFuchsiaResourceDialect
3441                        );
3442                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3443                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3444                        Ok(Server_Request::ResetParameters {
3445                            responder: Server_ResetParametersResponder {
3446                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3447                                tx_id: header.tx_id,
3448                            },
3449                        })
3450                    }
3451                    0xe39e35cda85a04d => {
3452                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3453                        let mut req = fidl::new_empty!(
3454                            fidl::encoding::EmptyPayload,
3455                            fidl::encoding::DefaultFuchsiaResourceDialect
3456                        );
3457                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3458                        let control_handle = Server_ControlHandle { inner: this.inner.clone() };
3459                        Ok(Server_Request::ClearLeases {
3460                            responder: Server_ClearLeasesResponder {
3461                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3462                                tx_id: header.tx_id,
3463                            },
3464                        })
3465                    }
3466                    _ => Err(fidl::Error::UnknownOrdinal {
3467                        ordinal: header.ordinal,
3468                        protocol_name:
3469                            <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3470                    }),
3471                }))
3472            },
3473        )
3474    }
3475}
3476
3477/// Provides methods for DHCP Server configuration.
3478#[derive(Debug)]
3479pub enum Server_Request {
3480    /// Starts serving DHCP leases.
3481    ///
3482    /// Starts the DHCP server with the current set of parameters.
3483    ///
3484    /// On error the server remains in the stopped state. If the server is
3485    /// already serving, `StartServing` is a no-op.
3486    ///
3487    /// *error a zx.Status indicating why the server could not be started.
3488    StartServing { responder: Server_StartServingResponder },
3489    /// Stops serving DHCP leases.
3490    ///
3491    /// Stopping causes all the listening ports to be closed.
3492    ///
3493    /// Configuring parameters on the DHCP server is only allowed when the
3494    /// server is stopped.
3495    ///
3496    /// If the server is not currently serving, `StopServing` is a no-op.
3497    StopServing { responder: Server_StopServingResponder },
3498    /// Returns whether or not the server is serving DHCP leases.
3499    IsServing { responder: Server_IsServingResponder },
3500    /// Returns the requested Option if it is supported.
3501    ///
3502    /// + request `code` the code of an Option whose value has been requested.
3503    /// - response `value` the value of the requested Option.
3504    /// * error a zx.Status indicating why the value could not be retrieved.
3505    GetOption { code: OptionCode, responder: Server_GetOptionResponder },
3506    /// Returns the requested Parameter if it is supported.
3507    ///
3508    /// + request `name` the name of a Parameter whose value has been requested.
3509    /// - response `value` the value of the requested Parameter.
3510    /// * error a zx.Status indicating why the value could not be retrieved.
3511    GetParameter { name: ParameterName, responder: Server_GetParameterResponder },
3512    /// Sets the Option to the argument. On success, a SetOption will take
3513    /// effect immediately.
3514    ///
3515    /// + request `value` an Option whose value will be set to the value of this
3516    /// argument.
3517    /// * error a zx.Status indicating the cause of failure.
3518    SetOption { value: Option_, responder: Server_SetOptionResponder },
3519    /// Sets the Parameter to the argument. On success, the new parameter value
3520    /// can be queried by GetParameter or ListParameter immediately. However,
3521    /// the server may require a restart in order for the new Parameter value to
3522    /// take effect.
3523    ///
3524    /// Setting parameters is only allowed if the server is stopped.
3525    /// `ZX_ERR_BAD_STATE` is returned otherwise.
3526    ///
3527    /// + request `value` a Parameter whose value will be set to the value of
3528    /// this argument.
3529    /// * error a zx.Status indicating the cause of failure.
3530    SetParameter { value: Parameter, responder: Server_SetParameterResponder },
3531    /// Lists all DHCP options for which the Server has a value. Any option
3532    /// which does not have a value will be omitted from the returned list.
3533    /// ListOptions provides administrators a means to print a server's
3534    /// configuration as opposed to querying the value of a single Option.
3535    ///
3536    /// - response `options` a vector containing all of the options for which
3537    /// the Server has a value. Bounded to 256 as options are identified by a 1
3538    /// octet code and 256 is the maximum number of such codes.
3539    /// * error a zx.Status indicating the cause of failure.
3540    ListOptions { responder: Server_ListOptionsResponder },
3541    /// Lists all DHCP server parameters. ListParameters provides administrators
3542    /// a means to print a server's configuration as opposed to querying the
3543    /// value of a single Parameter.
3544    ///
3545    /// - response `parameter` a vector containing the values of all of the
3546    /// Server's parameters. Bounded to 256 to provide a generous upper limit
3547    /// on the number of server parameters while being of the same size as
3548    /// ListOptions.
3549    /// * error a zx.Status indicating the cause of failure.
3550    ListParameters { responder: Server_ListParametersResponder },
3551    /// Resets all DHCP options to have no value. On success, ResetOptions will
3552    /// take effect immediately.
3553    ///
3554    /// * error a zx.Status indicating the cause of failure.
3555    ResetOptions { responder: Server_ResetOptionsResponder },
3556    /// Resets all DHCP server parameters to their default value. On success,
3557    /// the reset parameter values can be queried immediately with GetParameter
3558    /// or ListParameters. However, the server must be restarted before all new
3559    /// parameter values take effect.
3560    ///
3561    /// Setting parameters is only allowed if the server is stopped.
3562    /// `ZX_ERR_BAD_STATE` is returned otherwise.
3563    ///
3564    /// * error a zx.Status indicating the cause of failure.
3565    ResetParameters { responder: Server_ResetParametersResponder },
3566    /// Clears all leases maintained by the Server. On success, ClearLeases will
3567    /// take effect immediately. Server administrators should take care when
3568    /// calling this method as the DHCP protocol does not provide a mechanism by
3569    /// which a Server can notify a client that its lease has been cleared.
3570    ///
3571    /// * error a zx.Status indicating the cause of failure.
3572    ClearLeases { responder: Server_ClearLeasesResponder },
3573}
3574
3575impl Server_Request {
3576    #[allow(irrefutable_let_patterns)]
3577    pub fn into_start_serving(self) -> Option<(Server_StartServingResponder)> {
3578        if let Server_Request::StartServing { responder } = self {
3579            Some((responder))
3580        } else {
3581            None
3582        }
3583    }
3584
3585    #[allow(irrefutable_let_patterns)]
3586    pub fn into_stop_serving(self) -> Option<(Server_StopServingResponder)> {
3587        if let Server_Request::StopServing { responder } = self {
3588            Some((responder))
3589        } else {
3590            None
3591        }
3592    }
3593
3594    #[allow(irrefutable_let_patterns)]
3595    pub fn into_is_serving(self) -> Option<(Server_IsServingResponder)> {
3596        if let Server_Request::IsServing { responder } = self {
3597            Some((responder))
3598        } else {
3599            None
3600        }
3601    }
3602
3603    #[allow(irrefutable_let_patterns)]
3604    pub fn into_get_option(self) -> Option<(OptionCode, Server_GetOptionResponder)> {
3605        if let Server_Request::GetOption { code, responder } = self {
3606            Some((code, responder))
3607        } else {
3608            None
3609        }
3610    }
3611
3612    #[allow(irrefutable_let_patterns)]
3613    pub fn into_get_parameter(self) -> Option<(ParameterName, Server_GetParameterResponder)> {
3614        if let Server_Request::GetParameter { name, responder } = self {
3615            Some((name, responder))
3616        } else {
3617            None
3618        }
3619    }
3620
3621    #[allow(irrefutable_let_patterns)]
3622    pub fn into_set_option(self) -> Option<(Option_, Server_SetOptionResponder)> {
3623        if let Server_Request::SetOption { value, responder } = self {
3624            Some((value, responder))
3625        } else {
3626            None
3627        }
3628    }
3629
3630    #[allow(irrefutable_let_patterns)]
3631    pub fn into_set_parameter(self) -> Option<(Parameter, Server_SetParameterResponder)> {
3632        if let Server_Request::SetParameter { value, responder } = self {
3633            Some((value, responder))
3634        } else {
3635            None
3636        }
3637    }
3638
3639    #[allow(irrefutable_let_patterns)]
3640    pub fn into_list_options(self) -> Option<(Server_ListOptionsResponder)> {
3641        if let Server_Request::ListOptions { responder } = self {
3642            Some((responder))
3643        } else {
3644            None
3645        }
3646    }
3647
3648    #[allow(irrefutable_let_patterns)]
3649    pub fn into_list_parameters(self) -> Option<(Server_ListParametersResponder)> {
3650        if let Server_Request::ListParameters { responder } = self {
3651            Some((responder))
3652        } else {
3653            None
3654        }
3655    }
3656
3657    #[allow(irrefutable_let_patterns)]
3658    pub fn into_reset_options(self) -> Option<(Server_ResetOptionsResponder)> {
3659        if let Server_Request::ResetOptions { responder } = self {
3660            Some((responder))
3661        } else {
3662            None
3663        }
3664    }
3665
3666    #[allow(irrefutable_let_patterns)]
3667    pub fn into_reset_parameters(self) -> Option<(Server_ResetParametersResponder)> {
3668        if let Server_Request::ResetParameters { responder } = self {
3669            Some((responder))
3670        } else {
3671            None
3672        }
3673    }
3674
3675    #[allow(irrefutable_let_patterns)]
3676    pub fn into_clear_leases(self) -> Option<(Server_ClearLeasesResponder)> {
3677        if let Server_Request::ClearLeases { responder } = self {
3678            Some((responder))
3679        } else {
3680            None
3681        }
3682    }
3683
3684    /// Name of the method defined in FIDL
3685    pub fn method_name(&self) -> &'static str {
3686        match *self {
3687            Server_Request::StartServing { .. } => "start_serving",
3688            Server_Request::StopServing { .. } => "stop_serving",
3689            Server_Request::IsServing { .. } => "is_serving",
3690            Server_Request::GetOption { .. } => "get_option",
3691            Server_Request::GetParameter { .. } => "get_parameter",
3692            Server_Request::SetOption { .. } => "set_option",
3693            Server_Request::SetParameter { .. } => "set_parameter",
3694            Server_Request::ListOptions { .. } => "list_options",
3695            Server_Request::ListParameters { .. } => "list_parameters",
3696            Server_Request::ResetOptions { .. } => "reset_options",
3697            Server_Request::ResetParameters { .. } => "reset_parameters",
3698            Server_Request::ClearLeases { .. } => "clear_leases",
3699        }
3700    }
3701}
3702
3703#[derive(Debug, Clone)]
3704pub struct Server_ControlHandle {
3705    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3706}
3707
3708impl fidl::endpoints::ControlHandle for Server_ControlHandle {
3709    fn shutdown(&self) {
3710        self.inner.shutdown()
3711    }
3712    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3713        self.inner.shutdown_with_epitaph(status)
3714    }
3715
3716    fn is_closed(&self) -> bool {
3717        self.inner.channel().is_closed()
3718    }
3719    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3720        self.inner.channel().on_closed()
3721    }
3722
3723    #[cfg(target_os = "fuchsia")]
3724    fn signal_peer(
3725        &self,
3726        clear_mask: zx::Signals,
3727        set_mask: zx::Signals,
3728    ) -> Result<(), zx_status::Status> {
3729        use fidl::Peered;
3730        self.inner.channel().signal_peer(clear_mask, set_mask)
3731    }
3732}
3733
3734impl Server_ControlHandle {}
3735
3736#[must_use = "FIDL methods require a response to be sent"]
3737#[derive(Debug)]
3738pub struct Server_StartServingResponder {
3739    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
3740    tx_id: u32,
3741}
3742
3743/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
3744/// if the responder is dropped without sending a response, so that the client
3745/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3746impl std::ops::Drop for Server_StartServingResponder {
3747    fn drop(&mut self) {
3748        self.control_handle.shutdown();
3749        // Safety: drops once, never accessed again
3750        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3751    }
3752}
3753
3754impl fidl::endpoints::Responder for Server_StartServingResponder {
3755    type ControlHandle = Server_ControlHandle;
3756
3757    fn control_handle(&self) -> &Server_ControlHandle {
3758        &self.control_handle
3759    }
3760
3761    fn drop_without_shutdown(mut self) {
3762        // Safety: drops once, never accessed again due to mem::forget
3763        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3764        // Prevent Drop from running (which would shut down the channel)
3765        std::mem::forget(self);
3766    }
3767}
3768
3769impl Server_StartServingResponder {
3770    /// Sends a response to the FIDL transaction.
3771    ///
3772    /// Sets the channel to shutdown if an error occurs.
3773    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3774        let _result = self.send_raw(result);
3775        if _result.is_err() {
3776            self.control_handle.shutdown();
3777        }
3778        self.drop_without_shutdown();
3779        _result
3780    }
3781
3782    /// Similar to "send" but does not shutdown the channel if an error occurs.
3783    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3784        let _result = self.send_raw(result);
3785        self.drop_without_shutdown();
3786        _result
3787    }
3788
3789    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3790        self.control_handle
3791            .inner
3792            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3793                result,
3794                self.tx_id,
3795                0x10990e324ac53cd1,
3796                fidl::encoding::DynamicFlags::empty(),
3797            )
3798    }
3799}
3800
3801#[must_use = "FIDL methods require a response to be sent"]
3802#[derive(Debug)]
3803pub struct Server_StopServingResponder {
3804    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
3805    tx_id: u32,
3806}
3807
3808/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
3809/// if the responder is dropped without sending a response, so that the client
3810/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3811impl std::ops::Drop for Server_StopServingResponder {
3812    fn drop(&mut self) {
3813        self.control_handle.shutdown();
3814        // Safety: drops once, never accessed again
3815        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3816    }
3817}
3818
3819impl fidl::endpoints::Responder for Server_StopServingResponder {
3820    type ControlHandle = Server_ControlHandle;
3821
3822    fn control_handle(&self) -> &Server_ControlHandle {
3823        &self.control_handle
3824    }
3825
3826    fn drop_without_shutdown(mut self) {
3827        // Safety: drops once, never accessed again due to mem::forget
3828        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3829        // Prevent Drop from running (which would shut down the channel)
3830        std::mem::forget(self);
3831    }
3832}
3833
3834impl Server_StopServingResponder {
3835    /// Sends a response to the FIDL transaction.
3836    ///
3837    /// Sets the channel to shutdown if an error occurs.
3838    pub fn send(self) -> Result<(), fidl::Error> {
3839        let _result = self.send_raw();
3840        if _result.is_err() {
3841            self.control_handle.shutdown();
3842        }
3843        self.drop_without_shutdown();
3844        _result
3845    }
3846
3847    /// Similar to "send" but does not shutdown the channel if an error occurs.
3848    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
3849        let _result = self.send_raw();
3850        self.drop_without_shutdown();
3851        _result
3852    }
3853
3854    fn send_raw(&self) -> Result<(), fidl::Error> {
3855        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
3856            (),
3857            self.tx_id,
3858            0x7776cfe9f68a0dbe,
3859            fidl::encoding::DynamicFlags::empty(),
3860        )
3861    }
3862}
3863
3864#[must_use = "FIDL methods require a response to be sent"]
3865#[derive(Debug)]
3866pub struct Server_IsServingResponder {
3867    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
3868    tx_id: u32,
3869}
3870
3871/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
3872/// if the responder is dropped without sending a response, so that the client
3873/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3874impl std::ops::Drop for Server_IsServingResponder {
3875    fn drop(&mut self) {
3876        self.control_handle.shutdown();
3877        // Safety: drops once, never accessed again
3878        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3879    }
3880}
3881
3882impl fidl::endpoints::Responder for Server_IsServingResponder {
3883    type ControlHandle = Server_ControlHandle;
3884
3885    fn control_handle(&self) -> &Server_ControlHandle {
3886        &self.control_handle
3887    }
3888
3889    fn drop_without_shutdown(mut self) {
3890        // Safety: drops once, never accessed again due to mem::forget
3891        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3892        // Prevent Drop from running (which would shut down the channel)
3893        std::mem::forget(self);
3894    }
3895}
3896
3897impl Server_IsServingResponder {
3898    /// Sends a response to the FIDL transaction.
3899    ///
3900    /// Sets the channel to shutdown if an error occurs.
3901    pub fn send(self, mut enabled: bool) -> Result<(), fidl::Error> {
3902        let _result = self.send_raw(enabled);
3903        if _result.is_err() {
3904            self.control_handle.shutdown();
3905        }
3906        self.drop_without_shutdown();
3907        _result
3908    }
3909
3910    /// Similar to "send" but does not shutdown the channel if an error occurs.
3911    pub fn send_no_shutdown_on_err(self, mut enabled: bool) -> Result<(), fidl::Error> {
3912        let _result = self.send_raw(enabled);
3913        self.drop_without_shutdown();
3914        _result
3915    }
3916
3917    fn send_raw(&self, mut enabled: bool) -> Result<(), fidl::Error> {
3918        self.control_handle.inner.send::<ServerIsServingResponse>(
3919            (enabled,),
3920            self.tx_id,
3921            0x45aadc35fcbe3826,
3922            fidl::encoding::DynamicFlags::empty(),
3923        )
3924    }
3925}
3926
3927#[must_use = "FIDL methods require a response to be sent"]
3928#[derive(Debug)]
3929pub struct Server_GetOptionResponder {
3930    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
3931    tx_id: u32,
3932}
3933
3934/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
3935/// if the responder is dropped without sending a response, so that the client
3936/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3937impl std::ops::Drop for Server_GetOptionResponder {
3938    fn drop(&mut self) {
3939        self.control_handle.shutdown();
3940        // Safety: drops once, never accessed again
3941        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3942    }
3943}
3944
3945impl fidl::endpoints::Responder for Server_GetOptionResponder {
3946    type ControlHandle = Server_ControlHandle;
3947
3948    fn control_handle(&self) -> &Server_ControlHandle {
3949        &self.control_handle
3950    }
3951
3952    fn drop_without_shutdown(mut self) {
3953        // Safety: drops once, never accessed again due to mem::forget
3954        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3955        // Prevent Drop from running (which would shut down the channel)
3956        std::mem::forget(self);
3957    }
3958}
3959
3960impl Server_GetOptionResponder {
3961    /// Sends a response to the FIDL transaction.
3962    ///
3963    /// Sets the channel to shutdown if an error occurs.
3964    pub fn send(self, mut result: Result<&Option_, i32>) -> Result<(), fidl::Error> {
3965        let _result = self.send_raw(result);
3966        if _result.is_err() {
3967            self.control_handle.shutdown();
3968        }
3969        self.drop_without_shutdown();
3970        _result
3971    }
3972
3973    /// Similar to "send" but does not shutdown the channel if an error occurs.
3974    pub fn send_no_shutdown_on_err(
3975        self,
3976        mut result: Result<&Option_, i32>,
3977    ) -> Result<(), fidl::Error> {
3978        let _result = self.send_raw(result);
3979        self.drop_without_shutdown();
3980        _result
3981    }
3982
3983    fn send_raw(&self, mut result: Result<&Option_, i32>) -> Result<(), fidl::Error> {
3984        self.control_handle.inner.send::<fidl::encoding::ResultType<ServerGetOptionResponse, i32>>(
3985            result.map(|value| (value,)),
3986            self.tx_id,
3987            0x5305ee2c593f68a,
3988            fidl::encoding::DynamicFlags::empty(),
3989        )
3990    }
3991}
3992
3993#[must_use = "FIDL methods require a response to be sent"]
3994#[derive(Debug)]
3995pub struct Server_GetParameterResponder {
3996    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
3997    tx_id: u32,
3998}
3999
4000/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4001/// if the responder is dropped without sending a response, so that the client
4002/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4003impl std::ops::Drop for Server_GetParameterResponder {
4004    fn drop(&mut self) {
4005        self.control_handle.shutdown();
4006        // Safety: drops once, never accessed again
4007        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4008    }
4009}
4010
4011impl fidl::endpoints::Responder for Server_GetParameterResponder {
4012    type ControlHandle = Server_ControlHandle;
4013
4014    fn control_handle(&self) -> &Server_ControlHandle {
4015        &self.control_handle
4016    }
4017
4018    fn drop_without_shutdown(mut self) {
4019        // Safety: drops once, never accessed again due to mem::forget
4020        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4021        // Prevent Drop from running (which would shut down the channel)
4022        std::mem::forget(self);
4023    }
4024}
4025
4026impl Server_GetParameterResponder {
4027    /// Sends a response to the FIDL transaction.
4028    ///
4029    /// Sets the channel to shutdown if an error occurs.
4030    pub fn send(self, mut result: Result<&Parameter, i32>) -> Result<(), fidl::Error> {
4031        let _result = self.send_raw(result);
4032        if _result.is_err() {
4033            self.control_handle.shutdown();
4034        }
4035        self.drop_without_shutdown();
4036        _result
4037    }
4038
4039    /// Similar to "send" but does not shutdown the channel if an error occurs.
4040    pub fn send_no_shutdown_on_err(
4041        self,
4042        mut result: Result<&Parameter, i32>,
4043    ) -> Result<(), fidl::Error> {
4044        let _result = self.send_raw(result);
4045        self.drop_without_shutdown();
4046        _result
4047    }
4048
4049    fn send_raw(&self, mut result: Result<&Parameter, i32>) -> Result<(), fidl::Error> {
4050        self.control_handle
4051            .inner
4052            .send::<fidl::encoding::ResultType<ServerGetParameterResponse, i32>>(
4053                result.map(|value| (value,)),
4054                self.tx_id,
4055                0x1e8c98758fb82714,
4056                fidl::encoding::DynamicFlags::empty(),
4057            )
4058    }
4059}
4060
4061#[must_use = "FIDL methods require a response to be sent"]
4062#[derive(Debug)]
4063pub struct Server_SetOptionResponder {
4064    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4065    tx_id: u32,
4066}
4067
4068/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4069/// if the responder is dropped without sending a response, so that the client
4070/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4071impl std::ops::Drop for Server_SetOptionResponder {
4072    fn drop(&mut self) {
4073        self.control_handle.shutdown();
4074        // Safety: drops once, never accessed again
4075        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4076    }
4077}
4078
4079impl fidl::endpoints::Responder for Server_SetOptionResponder {
4080    type ControlHandle = Server_ControlHandle;
4081
4082    fn control_handle(&self) -> &Server_ControlHandle {
4083        &self.control_handle
4084    }
4085
4086    fn drop_without_shutdown(mut self) {
4087        // Safety: drops once, never accessed again due to mem::forget
4088        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4089        // Prevent Drop from running (which would shut down the channel)
4090        std::mem::forget(self);
4091    }
4092}
4093
4094impl Server_SetOptionResponder {
4095    /// Sends a response to the FIDL transaction.
4096    ///
4097    /// Sets the channel to shutdown if an error occurs.
4098    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4099        let _result = self.send_raw(result);
4100        if _result.is_err() {
4101            self.control_handle.shutdown();
4102        }
4103        self.drop_without_shutdown();
4104        _result
4105    }
4106
4107    /// Similar to "send" but does not shutdown the channel if an error occurs.
4108    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4109        let _result = self.send_raw(result);
4110        self.drop_without_shutdown();
4111        _result
4112    }
4113
4114    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4115        self.control_handle
4116            .inner
4117            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4118                result,
4119                self.tx_id,
4120                0x63c98b670db8d96a,
4121                fidl::encoding::DynamicFlags::empty(),
4122            )
4123    }
4124}
4125
4126#[must_use = "FIDL methods require a response to be sent"]
4127#[derive(Debug)]
4128pub struct Server_SetParameterResponder {
4129    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4130    tx_id: u32,
4131}
4132
4133/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4134/// if the responder is dropped without sending a response, so that the client
4135/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4136impl std::ops::Drop for Server_SetParameterResponder {
4137    fn drop(&mut self) {
4138        self.control_handle.shutdown();
4139        // Safety: drops once, never accessed again
4140        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4141    }
4142}
4143
4144impl fidl::endpoints::Responder for Server_SetParameterResponder {
4145    type ControlHandle = Server_ControlHandle;
4146
4147    fn control_handle(&self) -> &Server_ControlHandle {
4148        &self.control_handle
4149    }
4150
4151    fn drop_without_shutdown(mut self) {
4152        // Safety: drops once, never accessed again due to mem::forget
4153        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4154        // Prevent Drop from running (which would shut down the channel)
4155        std::mem::forget(self);
4156    }
4157}
4158
4159impl Server_SetParameterResponder {
4160    /// Sends a response to the FIDL transaction.
4161    ///
4162    /// Sets the channel to shutdown if an error occurs.
4163    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4164        let _result = self.send_raw(result);
4165        if _result.is_err() {
4166            self.control_handle.shutdown();
4167        }
4168        self.drop_without_shutdown();
4169        _result
4170    }
4171
4172    /// Similar to "send" but does not shutdown the channel if an error occurs.
4173    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4174        let _result = self.send_raw(result);
4175        self.drop_without_shutdown();
4176        _result
4177    }
4178
4179    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4180        self.control_handle
4181            .inner
4182            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4183                result,
4184                self.tx_id,
4185                0x3002d0d956eb4bdc,
4186                fidl::encoding::DynamicFlags::empty(),
4187            )
4188    }
4189}
4190
4191#[must_use = "FIDL methods require a response to be sent"]
4192#[derive(Debug)]
4193pub struct Server_ListOptionsResponder {
4194    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4195    tx_id: u32,
4196}
4197
4198/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4199/// if the responder is dropped without sending a response, so that the client
4200/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4201impl std::ops::Drop for Server_ListOptionsResponder {
4202    fn drop(&mut self) {
4203        self.control_handle.shutdown();
4204        // Safety: drops once, never accessed again
4205        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4206    }
4207}
4208
4209impl fidl::endpoints::Responder for Server_ListOptionsResponder {
4210    type ControlHandle = Server_ControlHandle;
4211
4212    fn control_handle(&self) -> &Server_ControlHandle {
4213        &self.control_handle
4214    }
4215
4216    fn drop_without_shutdown(mut self) {
4217        // Safety: drops once, never accessed again due to mem::forget
4218        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4219        // Prevent Drop from running (which would shut down the channel)
4220        std::mem::forget(self);
4221    }
4222}
4223
4224impl Server_ListOptionsResponder {
4225    /// Sends a response to the FIDL transaction.
4226    ///
4227    /// Sets the channel to shutdown if an error occurs.
4228    pub fn send(self, mut result: Result<&[Option_], i32>) -> Result<(), fidl::Error> {
4229        let _result = self.send_raw(result);
4230        if _result.is_err() {
4231            self.control_handle.shutdown();
4232        }
4233        self.drop_without_shutdown();
4234        _result
4235    }
4236
4237    /// Similar to "send" but does not shutdown the channel if an error occurs.
4238    pub fn send_no_shutdown_on_err(
4239        self,
4240        mut result: Result<&[Option_], i32>,
4241    ) -> Result<(), fidl::Error> {
4242        let _result = self.send_raw(result);
4243        self.drop_without_shutdown();
4244        _result
4245    }
4246
4247    fn send_raw(&self, mut result: Result<&[Option_], i32>) -> Result<(), fidl::Error> {
4248        self.control_handle
4249            .inner
4250            .send::<fidl::encoding::ResultType<ServerListOptionsResponse, i32>>(
4251                result.map(|options| (options,)),
4252                self.tx_id,
4253                0x72c8161c69ca67b,
4254                fidl::encoding::DynamicFlags::empty(),
4255            )
4256    }
4257}
4258
4259#[must_use = "FIDL methods require a response to be sent"]
4260#[derive(Debug)]
4261pub struct Server_ListParametersResponder {
4262    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4263    tx_id: u32,
4264}
4265
4266/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4267/// if the responder is dropped without sending a response, so that the client
4268/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4269impl std::ops::Drop for Server_ListParametersResponder {
4270    fn drop(&mut self) {
4271        self.control_handle.shutdown();
4272        // Safety: drops once, never accessed again
4273        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4274    }
4275}
4276
4277impl fidl::endpoints::Responder for Server_ListParametersResponder {
4278    type ControlHandle = Server_ControlHandle;
4279
4280    fn control_handle(&self) -> &Server_ControlHandle {
4281        &self.control_handle
4282    }
4283
4284    fn drop_without_shutdown(mut self) {
4285        // Safety: drops once, never accessed again due to mem::forget
4286        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4287        // Prevent Drop from running (which would shut down the channel)
4288        std::mem::forget(self);
4289    }
4290}
4291
4292impl Server_ListParametersResponder {
4293    /// Sends a response to the FIDL transaction.
4294    ///
4295    /// Sets the channel to shutdown if an error occurs.
4296    pub fn send(self, mut result: Result<&[Parameter], i32>) -> Result<(), fidl::Error> {
4297        let _result = self.send_raw(result);
4298        if _result.is_err() {
4299            self.control_handle.shutdown();
4300        }
4301        self.drop_without_shutdown();
4302        _result
4303    }
4304
4305    /// Similar to "send" but does not shutdown the channel if an error occurs.
4306    pub fn send_no_shutdown_on_err(
4307        self,
4308        mut result: Result<&[Parameter], i32>,
4309    ) -> Result<(), fidl::Error> {
4310        let _result = self.send_raw(result);
4311        self.drop_without_shutdown();
4312        _result
4313    }
4314
4315    fn send_raw(&self, mut result: Result<&[Parameter], i32>) -> Result<(), fidl::Error> {
4316        self.control_handle
4317            .inner
4318            .send::<fidl::encoding::ResultType<ServerListParametersResponse, i32>>(
4319                result.map(|parameters| (parameters,)),
4320                self.tx_id,
4321                0xa201b1d6d121c59,
4322                fidl::encoding::DynamicFlags::empty(),
4323            )
4324    }
4325}
4326
4327#[must_use = "FIDL methods require a response to be sent"]
4328#[derive(Debug)]
4329pub struct Server_ResetOptionsResponder {
4330    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4331    tx_id: u32,
4332}
4333
4334/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4335/// if the responder is dropped without sending a response, so that the client
4336/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4337impl std::ops::Drop for Server_ResetOptionsResponder {
4338    fn drop(&mut self) {
4339        self.control_handle.shutdown();
4340        // Safety: drops once, never accessed again
4341        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4342    }
4343}
4344
4345impl fidl::endpoints::Responder for Server_ResetOptionsResponder {
4346    type ControlHandle = Server_ControlHandle;
4347
4348    fn control_handle(&self) -> &Server_ControlHandle {
4349        &self.control_handle
4350    }
4351
4352    fn drop_without_shutdown(mut self) {
4353        // Safety: drops once, never accessed again due to mem::forget
4354        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4355        // Prevent Drop from running (which would shut down the channel)
4356        std::mem::forget(self);
4357    }
4358}
4359
4360impl Server_ResetOptionsResponder {
4361    /// Sends a response to the FIDL transaction.
4362    ///
4363    /// Sets the channel to shutdown if an error occurs.
4364    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4365        let _result = self.send_raw(result);
4366        if _result.is_err() {
4367            self.control_handle.shutdown();
4368        }
4369        self.drop_without_shutdown();
4370        _result
4371    }
4372
4373    /// Similar to "send" but does not shutdown the channel if an error occurs.
4374    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4375        let _result = self.send_raw(result);
4376        self.drop_without_shutdown();
4377        _result
4378    }
4379
4380    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4381        self.control_handle
4382            .inner
4383            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4384                result,
4385                self.tx_id,
4386                0x31014911fd21cc13,
4387                fidl::encoding::DynamicFlags::empty(),
4388            )
4389    }
4390}
4391
4392#[must_use = "FIDL methods require a response to be sent"]
4393#[derive(Debug)]
4394pub struct Server_ResetParametersResponder {
4395    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4396    tx_id: u32,
4397}
4398
4399/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4400/// if the responder is dropped without sending a response, so that the client
4401/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4402impl std::ops::Drop for Server_ResetParametersResponder {
4403    fn drop(&mut self) {
4404        self.control_handle.shutdown();
4405        // Safety: drops once, never accessed again
4406        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4407    }
4408}
4409
4410impl fidl::endpoints::Responder for Server_ResetParametersResponder {
4411    type ControlHandle = Server_ControlHandle;
4412
4413    fn control_handle(&self) -> &Server_ControlHandle {
4414        &self.control_handle
4415    }
4416
4417    fn drop_without_shutdown(mut self) {
4418        // Safety: drops once, never accessed again due to mem::forget
4419        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4420        // Prevent Drop from running (which would shut down the channel)
4421        std::mem::forget(self);
4422    }
4423}
4424
4425impl Server_ResetParametersResponder {
4426    /// Sends a response to the FIDL transaction.
4427    ///
4428    /// Sets the channel to shutdown if an error occurs.
4429    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4430        let _result = self.send_raw(result);
4431        if _result.is_err() {
4432            self.control_handle.shutdown();
4433        }
4434        self.drop_without_shutdown();
4435        _result
4436    }
4437
4438    /// Similar to "send" but does not shutdown the channel if an error occurs.
4439    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4440        let _result = self.send_raw(result);
4441        self.drop_without_shutdown();
4442        _result
4443    }
4444
4445    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4446        self.control_handle
4447            .inner
4448            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4449                result,
4450                self.tx_id,
4451                0x353fba50bcf4ecec,
4452                fidl::encoding::DynamicFlags::empty(),
4453            )
4454    }
4455}
4456
4457#[must_use = "FIDL methods require a response to be sent"]
4458#[derive(Debug)]
4459pub struct Server_ClearLeasesResponder {
4460    control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
4461    tx_id: u32,
4462}
4463
4464/// Set the the channel to be shutdown (see [`Server_ControlHandle::shutdown`])
4465/// if the responder is dropped without sending a response, so that the client
4466/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4467impl std::ops::Drop for Server_ClearLeasesResponder {
4468    fn drop(&mut self) {
4469        self.control_handle.shutdown();
4470        // Safety: drops once, never accessed again
4471        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4472    }
4473}
4474
4475impl fidl::endpoints::Responder for Server_ClearLeasesResponder {
4476    type ControlHandle = Server_ControlHandle;
4477
4478    fn control_handle(&self) -> &Server_ControlHandle {
4479        &self.control_handle
4480    }
4481
4482    fn drop_without_shutdown(mut self) {
4483        // Safety: drops once, never accessed again due to mem::forget
4484        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4485        // Prevent Drop from running (which would shut down the channel)
4486        std::mem::forget(self);
4487    }
4488}
4489
4490impl Server_ClearLeasesResponder {
4491    /// Sends a response to the FIDL transaction.
4492    ///
4493    /// Sets the channel to shutdown if an error occurs.
4494    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4495        let _result = self.send_raw(result);
4496        if _result.is_err() {
4497            self.control_handle.shutdown();
4498        }
4499        self.drop_without_shutdown();
4500        _result
4501    }
4502
4503    /// Similar to "send" but does not shutdown the channel if an error occurs.
4504    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4505        let _result = self.send_raw(result);
4506        self.drop_without_shutdown();
4507        _result
4508    }
4509
4510    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4511        self.control_handle
4512            .inner
4513            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4514                result,
4515                self.tx_id,
4516                0xe39e35cda85a04d,
4517                fidl::encoding::DynamicFlags::empty(),
4518            )
4519    }
4520}
4521
4522mod internal {
4523    use super::*;
4524    unsafe impl fidl::encoding::TypeMarker for NodeTypes {
4525        type Owned = Self;
4526
4527        #[inline(always)]
4528        fn inline_align(_context: fidl::encoding::Context) -> usize {
4529            1
4530        }
4531
4532        #[inline(always)]
4533        fn inline_size(_context: fidl::encoding::Context) -> usize {
4534            1
4535        }
4536    }
4537
4538    impl fidl::encoding::ValueTypeMarker for NodeTypes {
4539        type Borrowed<'a> = Self;
4540        #[inline(always)]
4541        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4542            *value
4543        }
4544    }
4545
4546    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for NodeTypes {
4547        #[inline]
4548        unsafe fn encode(
4549            self,
4550            encoder: &mut fidl::encoding::Encoder<'_, D>,
4551            offset: usize,
4552            _depth: fidl::encoding::Depth,
4553        ) -> fidl::Result<()> {
4554            encoder.debug_check_bounds::<Self>(offset);
4555            if self.bits() & Self::all().bits() != self.bits() {
4556                return Err(fidl::Error::InvalidBitsValue);
4557            }
4558            encoder.write_num(self.bits(), offset);
4559            Ok(())
4560        }
4561    }
4562
4563    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeTypes {
4564        #[inline(always)]
4565        fn new_empty() -> Self {
4566            Self::empty()
4567        }
4568
4569        #[inline]
4570        unsafe fn decode(
4571            &mut self,
4572            decoder: &mut fidl::encoding::Decoder<'_, D>,
4573            offset: usize,
4574            _depth: fidl::encoding::Depth,
4575        ) -> fidl::Result<()> {
4576            decoder.debug_check_bounds::<Self>(offset);
4577            let prim = decoder.read_num::<u8>(offset);
4578            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
4579            Ok(())
4580        }
4581    }
4582    unsafe impl fidl::encoding::TypeMarker for ClientExitReason {
4583        type Owned = Self;
4584
4585        #[inline(always)]
4586        fn inline_align(_context: fidl::encoding::Context) -> usize {
4587            std::mem::align_of::<u32>()
4588        }
4589
4590        #[inline(always)]
4591        fn inline_size(_context: fidl::encoding::Context) -> usize {
4592            std::mem::size_of::<u32>()
4593        }
4594
4595        #[inline(always)]
4596        fn encode_is_copy() -> bool {
4597            true
4598        }
4599
4600        #[inline(always)]
4601        fn decode_is_copy() -> bool {
4602            false
4603        }
4604    }
4605
4606    impl fidl::encoding::ValueTypeMarker for ClientExitReason {
4607        type Borrowed<'a> = Self;
4608        #[inline(always)]
4609        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4610            *value
4611        }
4612    }
4613
4614    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
4615        for ClientExitReason
4616    {
4617        #[inline]
4618        unsafe fn encode(
4619            self,
4620            encoder: &mut fidl::encoding::Encoder<'_, D>,
4621            offset: usize,
4622            _depth: fidl::encoding::Depth,
4623        ) -> fidl::Result<()> {
4624            encoder.debug_check_bounds::<Self>(offset);
4625            encoder.write_num(self.into_primitive(), offset);
4626            Ok(())
4627        }
4628    }
4629
4630    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientExitReason {
4631        #[inline(always)]
4632        fn new_empty() -> Self {
4633            Self::ClientAlreadyExistsOnInterface
4634        }
4635
4636        #[inline]
4637        unsafe fn decode(
4638            &mut self,
4639            decoder: &mut fidl::encoding::Decoder<'_, D>,
4640            offset: usize,
4641            _depth: fidl::encoding::Depth,
4642        ) -> fidl::Result<()> {
4643            decoder.debug_check_bounds::<Self>(offset);
4644            let prim = decoder.read_num::<u32>(offset);
4645
4646            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
4647            Ok(())
4648        }
4649    }
4650    unsafe impl fidl::encoding::TypeMarker for MessageType {
4651        type Owned = Self;
4652
4653        #[inline(always)]
4654        fn inline_align(_context: fidl::encoding::Context) -> usize {
4655            std::mem::align_of::<u8>()
4656        }
4657
4658        #[inline(always)]
4659        fn inline_size(_context: fidl::encoding::Context) -> usize {
4660            std::mem::size_of::<u8>()
4661        }
4662
4663        #[inline(always)]
4664        fn encode_is_copy() -> bool {
4665            true
4666        }
4667
4668        #[inline(always)]
4669        fn decode_is_copy() -> bool {
4670            false
4671        }
4672    }
4673
4674    impl fidl::encoding::ValueTypeMarker for MessageType {
4675        type Borrowed<'a> = Self;
4676        #[inline(always)]
4677        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4678            *value
4679        }
4680    }
4681
4682    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for MessageType {
4683        #[inline]
4684        unsafe fn encode(
4685            self,
4686            encoder: &mut fidl::encoding::Encoder<'_, D>,
4687            offset: usize,
4688            _depth: fidl::encoding::Depth,
4689        ) -> fidl::Result<()> {
4690            encoder.debug_check_bounds::<Self>(offset);
4691            encoder.write_num(self.into_primitive(), offset);
4692            Ok(())
4693        }
4694    }
4695
4696    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MessageType {
4697        #[inline(always)]
4698        fn new_empty() -> Self {
4699            Self::Dhcpdiscover
4700        }
4701
4702        #[inline]
4703        unsafe fn decode(
4704            &mut self,
4705            decoder: &mut fidl::encoding::Decoder<'_, D>,
4706            offset: usize,
4707            _depth: fidl::encoding::Depth,
4708        ) -> fidl::Result<()> {
4709            decoder.debug_check_bounds::<Self>(offset);
4710            let prim = decoder.read_num::<u8>(offset);
4711
4712            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
4713            Ok(())
4714        }
4715    }
4716    unsafe impl fidl::encoding::TypeMarker for OptionCode {
4717        type Owned = Self;
4718
4719        #[inline(always)]
4720        fn inline_align(_context: fidl::encoding::Context) -> usize {
4721            std::mem::align_of::<u32>()
4722        }
4723
4724        #[inline(always)]
4725        fn inline_size(_context: fidl::encoding::Context) -> usize {
4726            std::mem::size_of::<u32>()
4727        }
4728
4729        #[inline(always)]
4730        fn encode_is_copy() -> bool {
4731            true
4732        }
4733
4734        #[inline(always)]
4735        fn decode_is_copy() -> bool {
4736            false
4737        }
4738    }
4739
4740    impl fidl::encoding::ValueTypeMarker for OptionCode {
4741        type Borrowed<'a> = Self;
4742        #[inline(always)]
4743        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4744            *value
4745        }
4746    }
4747
4748    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OptionCode {
4749        #[inline]
4750        unsafe fn encode(
4751            self,
4752            encoder: &mut fidl::encoding::Encoder<'_, D>,
4753            offset: usize,
4754            _depth: fidl::encoding::Depth,
4755        ) -> fidl::Result<()> {
4756            encoder.debug_check_bounds::<Self>(offset);
4757            encoder.write_num(self.into_primitive(), offset);
4758            Ok(())
4759        }
4760    }
4761
4762    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionCode {
4763        #[inline(always)]
4764        fn new_empty() -> Self {
4765            Self::SubnetMask
4766        }
4767
4768        #[inline]
4769        unsafe fn decode(
4770            &mut self,
4771            decoder: &mut fidl::encoding::Decoder<'_, D>,
4772            offset: usize,
4773            _depth: fidl::encoding::Depth,
4774        ) -> fidl::Result<()> {
4775            decoder.debug_check_bounds::<Self>(offset);
4776            let prim = decoder.read_num::<u32>(offset);
4777
4778            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
4779            Ok(())
4780        }
4781    }
4782    unsafe impl fidl::encoding::TypeMarker for OptionOverloadValue {
4783        type Owned = Self;
4784
4785        #[inline(always)]
4786        fn inline_align(_context: fidl::encoding::Context) -> usize {
4787            std::mem::align_of::<u8>()
4788        }
4789
4790        #[inline(always)]
4791        fn inline_size(_context: fidl::encoding::Context) -> usize {
4792            std::mem::size_of::<u8>()
4793        }
4794
4795        #[inline(always)]
4796        fn encode_is_copy() -> bool {
4797            true
4798        }
4799
4800        #[inline(always)]
4801        fn decode_is_copy() -> bool {
4802            false
4803        }
4804    }
4805
4806    impl fidl::encoding::ValueTypeMarker for OptionOverloadValue {
4807        type Borrowed<'a> = Self;
4808        #[inline(always)]
4809        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4810            *value
4811        }
4812    }
4813
4814    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
4815        for OptionOverloadValue
4816    {
4817        #[inline]
4818        unsafe fn encode(
4819            self,
4820            encoder: &mut fidl::encoding::Encoder<'_, D>,
4821            offset: usize,
4822            _depth: fidl::encoding::Depth,
4823        ) -> fidl::Result<()> {
4824            encoder.debug_check_bounds::<Self>(offset);
4825            encoder.write_num(self.into_primitive(), offset);
4826            Ok(())
4827        }
4828    }
4829
4830    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionOverloadValue {
4831        #[inline(always)]
4832        fn new_empty() -> Self {
4833            Self::File
4834        }
4835
4836        #[inline]
4837        unsafe fn decode(
4838            &mut self,
4839            decoder: &mut fidl::encoding::Decoder<'_, D>,
4840            offset: usize,
4841            _depth: fidl::encoding::Depth,
4842        ) -> fidl::Result<()> {
4843            decoder.debug_check_bounds::<Self>(offset);
4844            let prim = decoder.read_num::<u8>(offset);
4845
4846            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
4847            Ok(())
4848        }
4849    }
4850    unsafe impl fidl::encoding::TypeMarker for ParameterName {
4851        type Owned = Self;
4852
4853        #[inline(always)]
4854        fn inline_align(_context: fidl::encoding::Context) -> usize {
4855            std::mem::align_of::<u32>()
4856        }
4857
4858        #[inline(always)]
4859        fn inline_size(_context: fidl::encoding::Context) -> usize {
4860            std::mem::size_of::<u32>()
4861        }
4862
4863        #[inline(always)]
4864        fn encode_is_copy() -> bool {
4865            true
4866        }
4867
4868        #[inline(always)]
4869        fn decode_is_copy() -> bool {
4870            false
4871        }
4872    }
4873
4874    impl fidl::encoding::ValueTypeMarker for ParameterName {
4875        type Borrowed<'a> = Self;
4876        #[inline(always)]
4877        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4878            *value
4879        }
4880    }
4881
4882    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ParameterName {
4883        #[inline]
4884        unsafe fn encode(
4885            self,
4886            encoder: &mut fidl::encoding::Encoder<'_, D>,
4887            offset: usize,
4888            _depth: fidl::encoding::Depth,
4889        ) -> fidl::Result<()> {
4890            encoder.debug_check_bounds::<Self>(offset);
4891            encoder.write_num(self.into_primitive(), offset);
4892            Ok(())
4893        }
4894    }
4895
4896    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParameterName {
4897        #[inline(always)]
4898        fn new_empty() -> Self {
4899            Self::IpAddrs
4900        }
4901
4902        #[inline]
4903        unsafe fn decode(
4904            &mut self,
4905            decoder: &mut fidl::encoding::Decoder<'_, D>,
4906            offset: usize,
4907            _depth: fidl::encoding::Depth,
4908        ) -> fidl::Result<()> {
4909            decoder.debug_check_bounds::<Self>(offset);
4910            let prim = decoder.read_num::<u32>(offset);
4911
4912            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
4913            Ok(())
4914        }
4915    }
4916
4917    impl fidl::encoding::ValueTypeMarker for ClientOnExitRequest {
4918        type Borrowed<'a> = &'a Self;
4919        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4920            value
4921        }
4922    }
4923
4924    unsafe impl fidl::encoding::TypeMarker for ClientOnExitRequest {
4925        type Owned = Self;
4926
4927        #[inline(always)]
4928        fn inline_align(_context: fidl::encoding::Context) -> usize {
4929            4
4930        }
4931
4932        #[inline(always)]
4933        fn inline_size(_context: fidl::encoding::Context) -> usize {
4934            4
4935        }
4936    }
4937
4938    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientOnExitRequest, D>
4939        for &ClientOnExitRequest
4940    {
4941        #[inline]
4942        unsafe fn encode(
4943            self,
4944            encoder: &mut fidl::encoding::Encoder<'_, D>,
4945            offset: usize,
4946            _depth: fidl::encoding::Depth,
4947        ) -> fidl::Result<()> {
4948            encoder.debug_check_bounds::<ClientOnExitRequest>(offset);
4949            // Delegate to tuple encoding.
4950            fidl::encoding::Encode::<ClientOnExitRequest, D>::encode(
4951                (<ClientExitReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
4952                encoder,
4953                offset,
4954                _depth,
4955            )
4956        }
4957    }
4958    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ClientExitReason, D>>
4959        fidl::encoding::Encode<ClientOnExitRequest, D> for (T0,)
4960    {
4961        #[inline]
4962        unsafe fn encode(
4963            self,
4964            encoder: &mut fidl::encoding::Encoder<'_, D>,
4965            offset: usize,
4966            depth: fidl::encoding::Depth,
4967        ) -> fidl::Result<()> {
4968            encoder.debug_check_bounds::<ClientOnExitRequest>(offset);
4969            // Zero out padding regions. There's no need to apply masks
4970            // because the unmasked parts will be overwritten by fields.
4971            // Write the fields.
4972            self.0.encode(encoder, offset + 0, depth)?;
4973            Ok(())
4974        }
4975    }
4976
4977    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientOnExitRequest {
4978        #[inline(always)]
4979        fn new_empty() -> Self {
4980            Self { reason: fidl::new_empty!(ClientExitReason, D) }
4981        }
4982
4983        #[inline]
4984        unsafe fn decode(
4985            &mut self,
4986            decoder: &mut fidl::encoding::Decoder<'_, D>,
4987            offset: usize,
4988            _depth: fidl::encoding::Depth,
4989        ) -> fidl::Result<()> {
4990            decoder.debug_check_bounds::<Self>(offset);
4991            // Verify that padding bytes are zero.
4992            fidl::decode!(ClientExitReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
4993            Ok(())
4994        }
4995    }
4996
4997    impl fidl::encoding::ResourceTypeMarker for ClientProviderNewClientRequest {
4998        type Borrowed<'a> = &'a mut Self;
4999        fn take_or_borrow<'a>(
5000            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5001        ) -> Self::Borrowed<'a> {
5002            value
5003        }
5004    }
5005
5006    unsafe impl fidl::encoding::TypeMarker for ClientProviderNewClientRequest {
5007        type Owned = Self;
5008
5009        #[inline(always)]
5010        fn inline_align(_context: fidl::encoding::Context) -> usize {
5011            8
5012        }
5013
5014        #[inline(always)]
5015        fn inline_size(_context: fidl::encoding::Context) -> usize {
5016            32
5017        }
5018    }
5019
5020    unsafe impl
5021        fidl::encoding::Encode<
5022            ClientProviderNewClientRequest,
5023            fidl::encoding::DefaultFuchsiaResourceDialect,
5024        > for &mut ClientProviderNewClientRequest
5025    {
5026        #[inline]
5027        unsafe fn encode(
5028            self,
5029            encoder: &mut fidl::encoding::Encoder<
5030                '_,
5031                fidl::encoding::DefaultFuchsiaResourceDialect,
5032            >,
5033            offset: usize,
5034            _depth: fidl::encoding::Depth,
5035        ) -> fidl::Result<()> {
5036            encoder.debug_check_bounds::<ClientProviderNewClientRequest>(offset);
5037            // Delegate to tuple encoding.
5038            fidl::encoding::Encode::<ClientProviderNewClientRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5039                (
5040                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.interface_id),
5041                    <NewClientParams as fidl::encoding::ValueTypeMarker>::borrow(&self.params),
5042                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.request),
5043                ),
5044                encoder, offset, _depth
5045            )
5046        }
5047    }
5048    unsafe impl<
5049            T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
5050            T1: fidl::encoding::Encode<NewClientParams, fidl::encoding::DefaultFuchsiaResourceDialect>,
5051            T2: fidl::encoding::Encode<
5052                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientMarker>>,
5053                fidl::encoding::DefaultFuchsiaResourceDialect,
5054            >,
5055        >
5056        fidl::encoding::Encode<
5057            ClientProviderNewClientRequest,
5058            fidl::encoding::DefaultFuchsiaResourceDialect,
5059        > for (T0, T1, T2)
5060    {
5061        #[inline]
5062        unsafe fn encode(
5063            self,
5064            encoder: &mut fidl::encoding::Encoder<
5065                '_,
5066                fidl::encoding::DefaultFuchsiaResourceDialect,
5067            >,
5068            offset: usize,
5069            depth: fidl::encoding::Depth,
5070        ) -> fidl::Result<()> {
5071            encoder.debug_check_bounds::<ClientProviderNewClientRequest>(offset);
5072            // Zero out padding regions. There's no need to apply masks
5073            // because the unmasked parts will be overwritten by fields.
5074            unsafe {
5075                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
5076                (ptr as *mut u64).write_unaligned(0);
5077            }
5078            // Write the fields.
5079            self.0.encode(encoder, offset + 0, depth)?;
5080            self.1.encode(encoder, offset + 8, depth)?;
5081            self.2.encode(encoder, offset + 24, depth)?;
5082            Ok(())
5083        }
5084    }
5085
5086    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5087        for ClientProviderNewClientRequest
5088    {
5089        #[inline(always)]
5090        fn new_empty() -> Self {
5091            Self {
5092                interface_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
5093                params: fidl::new_empty!(
5094                    NewClientParams,
5095                    fidl::encoding::DefaultFuchsiaResourceDialect
5096                ),
5097                request: fidl::new_empty!(
5098                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientMarker>>,
5099                    fidl::encoding::DefaultFuchsiaResourceDialect
5100                ),
5101            }
5102        }
5103
5104        #[inline]
5105        unsafe fn decode(
5106            &mut self,
5107            decoder: &mut fidl::encoding::Decoder<
5108                '_,
5109                fidl::encoding::DefaultFuchsiaResourceDialect,
5110            >,
5111            offset: usize,
5112            _depth: fidl::encoding::Depth,
5113        ) -> fidl::Result<()> {
5114            decoder.debug_check_bounds::<Self>(offset);
5115            // Verify that padding bytes are zero.
5116            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
5117            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5118            let mask = 0xffffffff00000000u64;
5119            let maskedval = padval & mask;
5120            if maskedval != 0 {
5121                return Err(fidl::Error::NonZeroPadding {
5122                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
5123                });
5124            }
5125            fidl::decode!(
5126                u64,
5127                fidl::encoding::DefaultFuchsiaResourceDialect,
5128                &mut self.interface_id,
5129                decoder,
5130                offset + 0,
5131                _depth
5132            )?;
5133            fidl::decode!(
5134                NewClientParams,
5135                fidl::encoding::DefaultFuchsiaResourceDialect,
5136                &mut self.params,
5137                decoder,
5138                offset + 8,
5139                _depth
5140            )?;
5141            fidl::decode!(
5142                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientMarker>>,
5143                fidl::encoding::DefaultFuchsiaResourceDialect,
5144                &mut self.request,
5145                decoder,
5146                offset + 24,
5147                _depth
5148            )?;
5149            Ok(())
5150        }
5151    }
5152
5153    impl fidl::encoding::ValueTypeMarker for ServerGetOptionRequest {
5154        type Borrowed<'a> = &'a Self;
5155        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5156            value
5157        }
5158    }
5159
5160    unsafe impl fidl::encoding::TypeMarker for ServerGetOptionRequest {
5161        type Owned = Self;
5162
5163        #[inline(always)]
5164        fn inline_align(_context: fidl::encoding::Context) -> usize {
5165            4
5166        }
5167
5168        #[inline(always)]
5169        fn inline_size(_context: fidl::encoding::Context) -> usize {
5170            4
5171        }
5172    }
5173
5174    unsafe impl<D: fidl::encoding::ResourceDialect>
5175        fidl::encoding::Encode<ServerGetOptionRequest, D> for &ServerGetOptionRequest
5176    {
5177        #[inline]
5178        unsafe fn encode(
5179            self,
5180            encoder: &mut fidl::encoding::Encoder<'_, D>,
5181            offset: usize,
5182            _depth: fidl::encoding::Depth,
5183        ) -> fidl::Result<()> {
5184            encoder.debug_check_bounds::<ServerGetOptionRequest>(offset);
5185            // Delegate to tuple encoding.
5186            fidl::encoding::Encode::<ServerGetOptionRequest, D>::encode(
5187                (<OptionCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
5188                encoder,
5189                offset,
5190                _depth,
5191            )
5192        }
5193    }
5194    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionCode, D>>
5195        fidl::encoding::Encode<ServerGetOptionRequest, D> for (T0,)
5196    {
5197        #[inline]
5198        unsafe fn encode(
5199            self,
5200            encoder: &mut fidl::encoding::Encoder<'_, D>,
5201            offset: usize,
5202            depth: fidl::encoding::Depth,
5203        ) -> fidl::Result<()> {
5204            encoder.debug_check_bounds::<ServerGetOptionRequest>(offset);
5205            // Zero out padding regions. There's no need to apply masks
5206            // because the unmasked parts will be overwritten by fields.
5207            // Write the fields.
5208            self.0.encode(encoder, offset + 0, depth)?;
5209            Ok(())
5210        }
5211    }
5212
5213    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5214        for ServerGetOptionRequest
5215    {
5216        #[inline(always)]
5217        fn new_empty() -> Self {
5218            Self { code: fidl::new_empty!(OptionCode, D) }
5219        }
5220
5221        #[inline]
5222        unsafe fn decode(
5223            &mut self,
5224            decoder: &mut fidl::encoding::Decoder<'_, D>,
5225            offset: usize,
5226            _depth: fidl::encoding::Depth,
5227        ) -> fidl::Result<()> {
5228            decoder.debug_check_bounds::<Self>(offset);
5229            // Verify that padding bytes are zero.
5230            fidl::decode!(OptionCode, D, &mut self.code, decoder, offset + 0, _depth)?;
5231            Ok(())
5232        }
5233    }
5234
5235    impl fidl::encoding::ValueTypeMarker for ServerGetParameterRequest {
5236        type Borrowed<'a> = &'a Self;
5237        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5238            value
5239        }
5240    }
5241
5242    unsafe impl fidl::encoding::TypeMarker for ServerGetParameterRequest {
5243        type Owned = Self;
5244
5245        #[inline(always)]
5246        fn inline_align(_context: fidl::encoding::Context) -> usize {
5247            4
5248        }
5249
5250        #[inline(always)]
5251        fn inline_size(_context: fidl::encoding::Context) -> usize {
5252            4
5253        }
5254    }
5255
5256    unsafe impl<D: fidl::encoding::ResourceDialect>
5257        fidl::encoding::Encode<ServerGetParameterRequest, D> for &ServerGetParameterRequest
5258    {
5259        #[inline]
5260        unsafe fn encode(
5261            self,
5262            encoder: &mut fidl::encoding::Encoder<'_, D>,
5263            offset: usize,
5264            _depth: fidl::encoding::Depth,
5265        ) -> fidl::Result<()> {
5266            encoder.debug_check_bounds::<ServerGetParameterRequest>(offset);
5267            // Delegate to tuple encoding.
5268            fidl::encoding::Encode::<ServerGetParameterRequest, D>::encode(
5269                (<ParameterName as fidl::encoding::ValueTypeMarker>::borrow(&self.name),),
5270                encoder,
5271                offset,
5272                _depth,
5273            )
5274        }
5275    }
5276    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ParameterName, D>>
5277        fidl::encoding::Encode<ServerGetParameterRequest, D> for (T0,)
5278    {
5279        #[inline]
5280        unsafe fn encode(
5281            self,
5282            encoder: &mut fidl::encoding::Encoder<'_, D>,
5283            offset: usize,
5284            depth: fidl::encoding::Depth,
5285        ) -> fidl::Result<()> {
5286            encoder.debug_check_bounds::<ServerGetParameterRequest>(offset);
5287            // Zero out padding regions. There's no need to apply masks
5288            // because the unmasked parts will be overwritten by fields.
5289            // Write the fields.
5290            self.0.encode(encoder, offset + 0, depth)?;
5291            Ok(())
5292        }
5293    }
5294
5295    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5296        for ServerGetParameterRequest
5297    {
5298        #[inline(always)]
5299        fn new_empty() -> Self {
5300            Self { name: fidl::new_empty!(ParameterName, D) }
5301        }
5302
5303        #[inline]
5304        unsafe fn decode(
5305            &mut self,
5306            decoder: &mut fidl::encoding::Decoder<'_, D>,
5307            offset: usize,
5308            _depth: fidl::encoding::Depth,
5309        ) -> fidl::Result<()> {
5310            decoder.debug_check_bounds::<Self>(offset);
5311            // Verify that padding bytes are zero.
5312            fidl::decode!(ParameterName, D, &mut self.name, decoder, offset + 0, _depth)?;
5313            Ok(())
5314        }
5315    }
5316
5317    impl fidl::encoding::ValueTypeMarker for ServerIsServingResponse {
5318        type Borrowed<'a> = &'a Self;
5319        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5320            value
5321        }
5322    }
5323
5324    unsafe impl fidl::encoding::TypeMarker for ServerIsServingResponse {
5325        type Owned = Self;
5326
5327        #[inline(always)]
5328        fn inline_align(_context: fidl::encoding::Context) -> usize {
5329            1
5330        }
5331
5332        #[inline(always)]
5333        fn inline_size(_context: fidl::encoding::Context) -> usize {
5334            1
5335        }
5336    }
5337
5338    unsafe impl<D: fidl::encoding::ResourceDialect>
5339        fidl::encoding::Encode<ServerIsServingResponse, D> for &ServerIsServingResponse
5340    {
5341        #[inline]
5342        unsafe fn encode(
5343            self,
5344            encoder: &mut fidl::encoding::Encoder<'_, D>,
5345            offset: usize,
5346            _depth: fidl::encoding::Depth,
5347        ) -> fidl::Result<()> {
5348            encoder.debug_check_bounds::<ServerIsServingResponse>(offset);
5349            // Delegate to tuple encoding.
5350            fidl::encoding::Encode::<ServerIsServingResponse, D>::encode(
5351                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
5352                encoder,
5353                offset,
5354                _depth,
5355            )
5356        }
5357    }
5358    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5359        fidl::encoding::Encode<ServerIsServingResponse, D> for (T0,)
5360    {
5361        #[inline]
5362        unsafe fn encode(
5363            self,
5364            encoder: &mut fidl::encoding::Encoder<'_, D>,
5365            offset: usize,
5366            depth: fidl::encoding::Depth,
5367        ) -> fidl::Result<()> {
5368            encoder.debug_check_bounds::<ServerIsServingResponse>(offset);
5369            // Zero out padding regions. There's no need to apply masks
5370            // because the unmasked parts will be overwritten by fields.
5371            // Write the fields.
5372            self.0.encode(encoder, offset + 0, depth)?;
5373            Ok(())
5374        }
5375    }
5376
5377    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5378        for ServerIsServingResponse
5379    {
5380        #[inline(always)]
5381        fn new_empty() -> Self {
5382            Self { enabled: fidl::new_empty!(bool, D) }
5383        }
5384
5385        #[inline]
5386        unsafe fn decode(
5387            &mut self,
5388            decoder: &mut fidl::encoding::Decoder<'_, D>,
5389            offset: usize,
5390            _depth: fidl::encoding::Depth,
5391        ) -> fidl::Result<()> {
5392            decoder.debug_check_bounds::<Self>(offset);
5393            // Verify that padding bytes are zero.
5394            fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
5395            Ok(())
5396        }
5397    }
5398
5399    impl fidl::encoding::ValueTypeMarker for ServerSetOptionRequest {
5400        type Borrowed<'a> = &'a Self;
5401        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5402            value
5403        }
5404    }
5405
5406    unsafe impl fidl::encoding::TypeMarker for ServerSetOptionRequest {
5407        type Owned = Self;
5408
5409        #[inline(always)]
5410        fn inline_align(_context: fidl::encoding::Context) -> usize {
5411            8
5412        }
5413
5414        #[inline(always)]
5415        fn inline_size(_context: fidl::encoding::Context) -> usize {
5416            16
5417        }
5418    }
5419
5420    unsafe impl<D: fidl::encoding::ResourceDialect>
5421        fidl::encoding::Encode<ServerSetOptionRequest, D> for &ServerSetOptionRequest
5422    {
5423        #[inline]
5424        unsafe fn encode(
5425            self,
5426            encoder: &mut fidl::encoding::Encoder<'_, D>,
5427            offset: usize,
5428            _depth: fidl::encoding::Depth,
5429        ) -> fidl::Result<()> {
5430            encoder.debug_check_bounds::<ServerSetOptionRequest>(offset);
5431            // Delegate to tuple encoding.
5432            fidl::encoding::Encode::<ServerSetOptionRequest, D>::encode(
5433                (<Option_ as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5434                encoder,
5435                offset,
5436                _depth,
5437            )
5438        }
5439    }
5440    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Option_, D>>
5441        fidl::encoding::Encode<ServerSetOptionRequest, D> for (T0,)
5442    {
5443        #[inline]
5444        unsafe fn encode(
5445            self,
5446            encoder: &mut fidl::encoding::Encoder<'_, D>,
5447            offset: usize,
5448            depth: fidl::encoding::Depth,
5449        ) -> fidl::Result<()> {
5450            encoder.debug_check_bounds::<ServerSetOptionRequest>(offset);
5451            // Zero out padding regions. There's no need to apply masks
5452            // because the unmasked parts will be overwritten by fields.
5453            // Write the fields.
5454            self.0.encode(encoder, offset + 0, depth)?;
5455            Ok(())
5456        }
5457    }
5458
5459    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5460        for ServerSetOptionRequest
5461    {
5462        #[inline(always)]
5463        fn new_empty() -> Self {
5464            Self { value: fidl::new_empty!(Option_, D) }
5465        }
5466
5467        #[inline]
5468        unsafe fn decode(
5469            &mut self,
5470            decoder: &mut fidl::encoding::Decoder<'_, D>,
5471            offset: usize,
5472            _depth: fidl::encoding::Depth,
5473        ) -> fidl::Result<()> {
5474            decoder.debug_check_bounds::<Self>(offset);
5475            // Verify that padding bytes are zero.
5476            fidl::decode!(Option_, D, &mut self.value, decoder, offset + 0, _depth)?;
5477            Ok(())
5478        }
5479    }
5480
5481    impl fidl::encoding::ValueTypeMarker for ServerSetParameterRequest {
5482        type Borrowed<'a> = &'a Self;
5483        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5484            value
5485        }
5486    }
5487
5488    unsafe impl fidl::encoding::TypeMarker for ServerSetParameterRequest {
5489        type Owned = Self;
5490
5491        #[inline(always)]
5492        fn inline_align(_context: fidl::encoding::Context) -> usize {
5493            8
5494        }
5495
5496        #[inline(always)]
5497        fn inline_size(_context: fidl::encoding::Context) -> usize {
5498            16
5499        }
5500    }
5501
5502    unsafe impl<D: fidl::encoding::ResourceDialect>
5503        fidl::encoding::Encode<ServerSetParameterRequest, D> for &ServerSetParameterRequest
5504    {
5505        #[inline]
5506        unsafe fn encode(
5507            self,
5508            encoder: &mut fidl::encoding::Encoder<'_, D>,
5509            offset: usize,
5510            _depth: fidl::encoding::Depth,
5511        ) -> fidl::Result<()> {
5512            encoder.debug_check_bounds::<ServerSetParameterRequest>(offset);
5513            // Delegate to tuple encoding.
5514            fidl::encoding::Encode::<ServerSetParameterRequest, D>::encode(
5515                (<Parameter as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5516                encoder,
5517                offset,
5518                _depth,
5519            )
5520        }
5521    }
5522    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Parameter, D>>
5523        fidl::encoding::Encode<ServerSetParameterRequest, D> for (T0,)
5524    {
5525        #[inline]
5526        unsafe fn encode(
5527            self,
5528            encoder: &mut fidl::encoding::Encoder<'_, D>,
5529            offset: usize,
5530            depth: fidl::encoding::Depth,
5531        ) -> fidl::Result<()> {
5532            encoder.debug_check_bounds::<ServerSetParameterRequest>(offset);
5533            // Zero out padding regions. There's no need to apply masks
5534            // because the unmasked parts will be overwritten by fields.
5535            // Write the fields.
5536            self.0.encode(encoder, offset + 0, depth)?;
5537            Ok(())
5538        }
5539    }
5540
5541    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5542        for ServerSetParameterRequest
5543    {
5544        #[inline(always)]
5545        fn new_empty() -> Self {
5546            Self { value: fidl::new_empty!(Parameter, D) }
5547        }
5548
5549        #[inline]
5550        unsafe fn decode(
5551            &mut self,
5552            decoder: &mut fidl::encoding::Decoder<'_, D>,
5553            offset: usize,
5554            _depth: fidl::encoding::Depth,
5555        ) -> fidl::Result<()> {
5556            decoder.debug_check_bounds::<Self>(offset);
5557            // Verify that padding bytes are zero.
5558            fidl::decode!(Parameter, D, &mut self.value, decoder, offset + 0, _depth)?;
5559            Ok(())
5560        }
5561    }
5562
5563    impl fidl::encoding::ValueTypeMarker for ServerGetOptionResponse {
5564        type Borrowed<'a> = &'a Self;
5565        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5566            value
5567        }
5568    }
5569
5570    unsafe impl fidl::encoding::TypeMarker for ServerGetOptionResponse {
5571        type Owned = Self;
5572
5573        #[inline(always)]
5574        fn inline_align(_context: fidl::encoding::Context) -> usize {
5575            8
5576        }
5577
5578        #[inline(always)]
5579        fn inline_size(_context: fidl::encoding::Context) -> usize {
5580            16
5581        }
5582    }
5583
5584    unsafe impl<D: fidl::encoding::ResourceDialect>
5585        fidl::encoding::Encode<ServerGetOptionResponse, D> for &ServerGetOptionResponse
5586    {
5587        #[inline]
5588        unsafe fn encode(
5589            self,
5590            encoder: &mut fidl::encoding::Encoder<'_, D>,
5591            offset: usize,
5592            _depth: fidl::encoding::Depth,
5593        ) -> fidl::Result<()> {
5594            encoder.debug_check_bounds::<ServerGetOptionResponse>(offset);
5595            // Delegate to tuple encoding.
5596            fidl::encoding::Encode::<ServerGetOptionResponse, D>::encode(
5597                (<Option_ as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5598                encoder,
5599                offset,
5600                _depth,
5601            )
5602        }
5603    }
5604    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Option_, D>>
5605        fidl::encoding::Encode<ServerGetOptionResponse, D> for (T0,)
5606    {
5607        #[inline]
5608        unsafe fn encode(
5609            self,
5610            encoder: &mut fidl::encoding::Encoder<'_, D>,
5611            offset: usize,
5612            depth: fidl::encoding::Depth,
5613        ) -> fidl::Result<()> {
5614            encoder.debug_check_bounds::<ServerGetOptionResponse>(offset);
5615            // Zero out padding regions. There's no need to apply masks
5616            // because the unmasked parts will be overwritten by fields.
5617            // Write the fields.
5618            self.0.encode(encoder, offset + 0, depth)?;
5619            Ok(())
5620        }
5621    }
5622
5623    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5624        for ServerGetOptionResponse
5625    {
5626        #[inline(always)]
5627        fn new_empty() -> Self {
5628            Self { value: fidl::new_empty!(Option_, D) }
5629        }
5630
5631        #[inline]
5632        unsafe fn decode(
5633            &mut self,
5634            decoder: &mut fidl::encoding::Decoder<'_, D>,
5635            offset: usize,
5636            _depth: fidl::encoding::Depth,
5637        ) -> fidl::Result<()> {
5638            decoder.debug_check_bounds::<Self>(offset);
5639            // Verify that padding bytes are zero.
5640            fidl::decode!(Option_, D, &mut self.value, decoder, offset + 0, _depth)?;
5641            Ok(())
5642        }
5643    }
5644
5645    impl fidl::encoding::ValueTypeMarker for ServerGetParameterResponse {
5646        type Borrowed<'a> = &'a Self;
5647        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5648            value
5649        }
5650    }
5651
5652    unsafe impl fidl::encoding::TypeMarker for ServerGetParameterResponse {
5653        type Owned = Self;
5654
5655        #[inline(always)]
5656        fn inline_align(_context: fidl::encoding::Context) -> usize {
5657            8
5658        }
5659
5660        #[inline(always)]
5661        fn inline_size(_context: fidl::encoding::Context) -> usize {
5662            16
5663        }
5664    }
5665
5666    unsafe impl<D: fidl::encoding::ResourceDialect>
5667        fidl::encoding::Encode<ServerGetParameterResponse, D> for &ServerGetParameterResponse
5668    {
5669        #[inline]
5670        unsafe fn encode(
5671            self,
5672            encoder: &mut fidl::encoding::Encoder<'_, D>,
5673            offset: usize,
5674            _depth: fidl::encoding::Depth,
5675        ) -> fidl::Result<()> {
5676            encoder.debug_check_bounds::<ServerGetParameterResponse>(offset);
5677            // Delegate to tuple encoding.
5678            fidl::encoding::Encode::<ServerGetParameterResponse, D>::encode(
5679                (<Parameter as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5680                encoder,
5681                offset,
5682                _depth,
5683            )
5684        }
5685    }
5686    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Parameter, D>>
5687        fidl::encoding::Encode<ServerGetParameterResponse, D> for (T0,)
5688    {
5689        #[inline]
5690        unsafe fn encode(
5691            self,
5692            encoder: &mut fidl::encoding::Encoder<'_, D>,
5693            offset: usize,
5694            depth: fidl::encoding::Depth,
5695        ) -> fidl::Result<()> {
5696            encoder.debug_check_bounds::<ServerGetParameterResponse>(offset);
5697            // Zero out padding regions. There's no need to apply masks
5698            // because the unmasked parts will be overwritten by fields.
5699            // Write the fields.
5700            self.0.encode(encoder, offset + 0, depth)?;
5701            Ok(())
5702        }
5703    }
5704
5705    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5706        for ServerGetParameterResponse
5707    {
5708        #[inline(always)]
5709        fn new_empty() -> Self {
5710            Self { value: fidl::new_empty!(Parameter, D) }
5711        }
5712
5713        #[inline]
5714        unsafe fn decode(
5715            &mut self,
5716            decoder: &mut fidl::encoding::Decoder<'_, D>,
5717            offset: usize,
5718            _depth: fidl::encoding::Depth,
5719        ) -> fidl::Result<()> {
5720            decoder.debug_check_bounds::<Self>(offset);
5721            // Verify that padding bytes are zero.
5722            fidl::decode!(Parameter, D, &mut self.value, decoder, offset + 0, _depth)?;
5723            Ok(())
5724        }
5725    }
5726
5727    impl fidl::encoding::ValueTypeMarker for ServerListOptionsResponse {
5728        type Borrowed<'a> = &'a Self;
5729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5730            value
5731        }
5732    }
5733
5734    unsafe impl fidl::encoding::TypeMarker for ServerListOptionsResponse {
5735        type Owned = Self;
5736
5737        #[inline(always)]
5738        fn inline_align(_context: fidl::encoding::Context) -> usize {
5739            8
5740        }
5741
5742        #[inline(always)]
5743        fn inline_size(_context: fidl::encoding::Context) -> usize {
5744            16
5745        }
5746    }
5747
5748    unsafe impl<D: fidl::encoding::ResourceDialect>
5749        fidl::encoding::Encode<ServerListOptionsResponse, D> for &ServerListOptionsResponse
5750    {
5751        #[inline]
5752        unsafe fn encode(
5753            self,
5754            encoder: &mut fidl::encoding::Encoder<'_, D>,
5755            offset: usize,
5756            _depth: fidl::encoding::Depth,
5757        ) -> fidl::Result<()> {
5758            encoder.debug_check_bounds::<ServerListOptionsResponse>(offset);
5759            // Delegate to tuple encoding.
5760            fidl::encoding::Encode::<ServerListOptionsResponse, D>::encode(
5761                (
5762                    <fidl::encoding::Vector<Option_, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
5763                ),
5764                encoder, offset, _depth
5765            )
5766        }
5767    }
5768    unsafe impl<
5769            D: fidl::encoding::ResourceDialect,
5770            T0: fidl::encoding::Encode<fidl::encoding::Vector<Option_, 256>, D>,
5771        > fidl::encoding::Encode<ServerListOptionsResponse, D> for (T0,)
5772    {
5773        #[inline]
5774        unsafe fn encode(
5775            self,
5776            encoder: &mut fidl::encoding::Encoder<'_, D>,
5777            offset: usize,
5778            depth: fidl::encoding::Depth,
5779        ) -> fidl::Result<()> {
5780            encoder.debug_check_bounds::<ServerListOptionsResponse>(offset);
5781            // Zero out padding regions. There's no need to apply masks
5782            // because the unmasked parts will be overwritten by fields.
5783            // Write the fields.
5784            self.0.encode(encoder, offset + 0, depth)?;
5785            Ok(())
5786        }
5787    }
5788
5789    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5790        for ServerListOptionsResponse
5791    {
5792        #[inline(always)]
5793        fn new_empty() -> Self {
5794            Self { options: fidl::new_empty!(fidl::encoding::Vector<Option_, 256>, D) }
5795        }
5796
5797        #[inline]
5798        unsafe fn decode(
5799            &mut self,
5800            decoder: &mut fidl::encoding::Decoder<'_, D>,
5801            offset: usize,
5802            _depth: fidl::encoding::Depth,
5803        ) -> fidl::Result<()> {
5804            decoder.debug_check_bounds::<Self>(offset);
5805            // Verify that padding bytes are zero.
5806            fidl::decode!(fidl::encoding::Vector<Option_, 256>, D, &mut self.options, decoder, offset + 0, _depth)?;
5807            Ok(())
5808        }
5809    }
5810
5811    impl fidl::encoding::ValueTypeMarker for ServerListParametersResponse {
5812        type Borrowed<'a> = &'a Self;
5813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5814            value
5815        }
5816    }
5817
5818    unsafe impl fidl::encoding::TypeMarker for ServerListParametersResponse {
5819        type Owned = Self;
5820
5821        #[inline(always)]
5822        fn inline_align(_context: fidl::encoding::Context) -> usize {
5823            8
5824        }
5825
5826        #[inline(always)]
5827        fn inline_size(_context: fidl::encoding::Context) -> usize {
5828            16
5829        }
5830    }
5831
5832    unsafe impl<D: fidl::encoding::ResourceDialect>
5833        fidl::encoding::Encode<ServerListParametersResponse, D> for &ServerListParametersResponse
5834    {
5835        #[inline]
5836        unsafe fn encode(
5837            self,
5838            encoder: &mut fidl::encoding::Encoder<'_, D>,
5839            offset: usize,
5840            _depth: fidl::encoding::Depth,
5841        ) -> fidl::Result<()> {
5842            encoder.debug_check_bounds::<ServerListParametersResponse>(offset);
5843            // Delegate to tuple encoding.
5844            fidl::encoding::Encode::<ServerListParametersResponse, D>::encode(
5845                (
5846                    <fidl::encoding::Vector<Parameter, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.parameters),
5847                ),
5848                encoder, offset, _depth
5849            )
5850        }
5851    }
5852    unsafe impl<
5853            D: fidl::encoding::ResourceDialect,
5854            T0: fidl::encoding::Encode<fidl::encoding::Vector<Parameter, 256>, D>,
5855        > fidl::encoding::Encode<ServerListParametersResponse, D> for (T0,)
5856    {
5857        #[inline]
5858        unsafe fn encode(
5859            self,
5860            encoder: &mut fidl::encoding::Encoder<'_, D>,
5861            offset: usize,
5862            depth: fidl::encoding::Depth,
5863        ) -> fidl::Result<()> {
5864            encoder.debug_check_bounds::<ServerListParametersResponse>(offset);
5865            // Zero out padding regions. There's no need to apply masks
5866            // because the unmasked parts will be overwritten by fields.
5867            // Write the fields.
5868            self.0.encode(encoder, offset + 0, depth)?;
5869            Ok(())
5870        }
5871    }
5872
5873    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5874        for ServerListParametersResponse
5875    {
5876        #[inline(always)]
5877        fn new_empty() -> Self {
5878            Self { parameters: fidl::new_empty!(fidl::encoding::Vector<Parameter, 256>, D) }
5879        }
5880
5881        #[inline]
5882        unsafe fn decode(
5883            &mut self,
5884            decoder: &mut fidl::encoding::Decoder<'_, D>,
5885            offset: usize,
5886            _depth: fidl::encoding::Depth,
5887        ) -> fidl::Result<()> {
5888            decoder.debug_check_bounds::<Self>(offset);
5889            // Verify that padding bytes are zero.
5890            fidl::decode!(fidl::encoding::Vector<Parameter, 256>, D, &mut self.parameters, decoder, offset + 0, _depth)?;
5891            Ok(())
5892        }
5893    }
5894
5895    impl Address {
5896        #[inline(always)]
5897        fn max_ordinal_present(&self) -> u64 {
5898            if let Some(_) = self.address_state_provider {
5899                return 3;
5900            }
5901            if let Some(_) = self.address_parameters {
5902                return 2;
5903            }
5904            if let Some(_) = self.address {
5905                return 1;
5906            }
5907            0
5908        }
5909    }
5910
5911    impl fidl::encoding::ResourceTypeMarker for Address {
5912        type Borrowed<'a> = &'a mut Self;
5913        fn take_or_borrow<'a>(
5914            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5915        ) -> Self::Borrowed<'a> {
5916            value
5917        }
5918    }
5919
5920    unsafe impl fidl::encoding::TypeMarker for Address {
5921        type Owned = Self;
5922
5923        #[inline(always)]
5924        fn inline_align(_context: fidl::encoding::Context) -> usize {
5925            8
5926        }
5927
5928        #[inline(always)]
5929        fn inline_size(_context: fidl::encoding::Context) -> usize {
5930            16
5931        }
5932    }
5933
5934    unsafe impl fidl::encoding::Encode<Address, fidl::encoding::DefaultFuchsiaResourceDialect>
5935        for &mut Address
5936    {
5937        unsafe fn encode(
5938            self,
5939            encoder: &mut fidl::encoding::Encoder<
5940                '_,
5941                fidl::encoding::DefaultFuchsiaResourceDialect,
5942            >,
5943            offset: usize,
5944            mut depth: fidl::encoding::Depth,
5945        ) -> fidl::Result<()> {
5946            encoder.debug_check_bounds::<Address>(offset);
5947            // Vector header
5948            let max_ordinal: u64 = self.max_ordinal_present();
5949            encoder.write_num(max_ordinal, offset);
5950            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5951            // Calling encoder.out_of_line_offset(0) is not allowed.
5952            if max_ordinal == 0 {
5953                return Ok(());
5954            }
5955            depth.increment()?;
5956            let envelope_size = 8;
5957            let bytes_len = max_ordinal as usize * envelope_size;
5958            #[allow(unused_variables)]
5959            let offset = encoder.out_of_line_offset(bytes_len);
5960            let mut _prev_end_offset: usize = 0;
5961            if 1 > max_ordinal {
5962                return Ok(());
5963            }
5964
5965            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5966            // are envelope_size bytes.
5967            let cur_offset: usize = (1 - 1) * envelope_size;
5968
5969            // Zero reserved fields.
5970            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5971
5972            // Safety:
5973            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5974            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5975            //   envelope_size bytes, there is always sufficient room.
5976            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4AddressWithPrefix, fidl::encoding::DefaultFuchsiaResourceDialect>(
5977            self.address.as_ref().map(<fidl_fuchsia_net::Ipv4AddressWithPrefix as fidl::encoding::ValueTypeMarker>::borrow),
5978            encoder, offset + cur_offset, depth
5979        )?;
5980
5981            _prev_end_offset = cur_offset + envelope_size;
5982            if 2 > max_ordinal {
5983                return Ok(());
5984            }
5985
5986            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5987            // are envelope_size bytes.
5988            let cur_offset: usize = (2 - 1) * envelope_size;
5989
5990            // Zero reserved fields.
5991            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5992
5993            // Safety:
5994            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5995            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5996            //   envelope_size bytes, there is always sufficient room.
5997            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_interfaces_admin::AddressParameters, fidl::encoding::DefaultFuchsiaResourceDialect>(
5998            self.address_parameters.as_ref().map(<fidl_fuchsia_net_interfaces_admin::AddressParameters as fidl::encoding::ValueTypeMarker>::borrow),
5999            encoder, offset + cur_offset, depth
6000        )?;
6001
6002            _prev_end_offset = cur_offset + envelope_size;
6003            if 3 > max_ordinal {
6004                return Ok(());
6005            }
6006
6007            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6008            // are envelope_size bytes.
6009            let cur_offset: usize = (3 - 1) * envelope_size;
6010
6011            // Zero reserved fields.
6012            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6013
6014            // Safety:
6015            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6016            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6017            //   envelope_size bytes, there is always sufficient room.
6018            fidl::encoding::encode_in_envelope_optional::<
6019                fidl::encoding::Endpoint<
6020                    fidl::endpoints::ServerEnd<
6021                        fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
6022                    >,
6023                >,
6024                fidl::encoding::DefaultFuchsiaResourceDialect,
6025            >(
6026                self.address_state_provider.as_mut().map(
6027                    <fidl::encoding::Endpoint<
6028                        fidl::endpoints::ServerEnd<
6029                            fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
6030                        >,
6031                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
6032                ),
6033                encoder,
6034                offset + cur_offset,
6035                depth,
6036            )?;
6037
6038            _prev_end_offset = cur_offset + envelope_size;
6039
6040            Ok(())
6041        }
6042    }
6043
6044    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Address {
6045        #[inline(always)]
6046        fn new_empty() -> Self {
6047            Self::default()
6048        }
6049
6050        unsafe fn decode(
6051            &mut self,
6052            decoder: &mut fidl::encoding::Decoder<
6053                '_,
6054                fidl::encoding::DefaultFuchsiaResourceDialect,
6055            >,
6056            offset: usize,
6057            mut depth: fidl::encoding::Depth,
6058        ) -> fidl::Result<()> {
6059            decoder.debug_check_bounds::<Self>(offset);
6060            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6061                None => return Err(fidl::Error::NotNullable),
6062                Some(len) => len,
6063            };
6064            // Calling decoder.out_of_line_offset(0) is not allowed.
6065            if len == 0 {
6066                return Ok(());
6067            };
6068            depth.increment()?;
6069            let envelope_size = 8;
6070            let bytes_len = len * envelope_size;
6071            let offset = decoder.out_of_line_offset(bytes_len)?;
6072            // Decode the envelope for each type.
6073            let mut _next_ordinal_to_read = 0;
6074            let mut next_offset = offset;
6075            let end_offset = offset + bytes_len;
6076            _next_ordinal_to_read += 1;
6077            if next_offset >= end_offset {
6078                return Ok(());
6079            }
6080
6081            // Decode unknown envelopes for gaps in ordinals.
6082            while _next_ordinal_to_read < 1 {
6083                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6084                _next_ordinal_to_read += 1;
6085                next_offset += envelope_size;
6086            }
6087
6088            let next_out_of_line = decoder.next_out_of_line();
6089            let handles_before = decoder.remaining_handles();
6090            if let Some((inlined, num_bytes, num_handles)) =
6091                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6092            {
6093                let member_inline_size = <fidl_fuchsia_net::Ipv4AddressWithPrefix as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6094                if inlined != (member_inline_size <= 4) {
6095                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6096                }
6097                let inner_offset;
6098                let mut inner_depth = depth.clone();
6099                if inlined {
6100                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6101                    inner_offset = next_offset;
6102                } else {
6103                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6104                    inner_depth.increment()?;
6105                }
6106                let val_ref = self.address.get_or_insert_with(|| {
6107                    fidl::new_empty!(
6108                        fidl_fuchsia_net::Ipv4AddressWithPrefix,
6109                        fidl::encoding::DefaultFuchsiaResourceDialect
6110                    )
6111                });
6112                fidl::decode!(
6113                    fidl_fuchsia_net::Ipv4AddressWithPrefix,
6114                    fidl::encoding::DefaultFuchsiaResourceDialect,
6115                    val_ref,
6116                    decoder,
6117                    inner_offset,
6118                    inner_depth
6119                )?;
6120                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6121                {
6122                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6123                }
6124                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6125                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6126                }
6127            }
6128
6129            next_offset += envelope_size;
6130            _next_ordinal_to_read += 1;
6131            if next_offset >= end_offset {
6132                return Ok(());
6133            }
6134
6135            // Decode unknown envelopes for gaps in ordinals.
6136            while _next_ordinal_to_read < 2 {
6137                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6138                _next_ordinal_to_read += 1;
6139                next_offset += envelope_size;
6140            }
6141
6142            let next_out_of_line = decoder.next_out_of_line();
6143            let handles_before = decoder.remaining_handles();
6144            if let Some((inlined, num_bytes, num_handles)) =
6145                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6146            {
6147                let member_inline_size = <fidl_fuchsia_net_interfaces_admin::AddressParameters as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6148                if inlined != (member_inline_size <= 4) {
6149                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6150                }
6151                let inner_offset;
6152                let mut inner_depth = depth.clone();
6153                if inlined {
6154                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6155                    inner_offset = next_offset;
6156                } else {
6157                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6158                    inner_depth.increment()?;
6159                }
6160                let val_ref = self.address_parameters.get_or_insert_with(|| {
6161                    fidl::new_empty!(
6162                        fidl_fuchsia_net_interfaces_admin::AddressParameters,
6163                        fidl::encoding::DefaultFuchsiaResourceDialect
6164                    )
6165                });
6166                fidl::decode!(
6167                    fidl_fuchsia_net_interfaces_admin::AddressParameters,
6168                    fidl::encoding::DefaultFuchsiaResourceDialect,
6169                    val_ref,
6170                    decoder,
6171                    inner_offset,
6172                    inner_depth
6173                )?;
6174                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6175                {
6176                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6177                }
6178                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6179                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6180                }
6181            }
6182
6183            next_offset += envelope_size;
6184            _next_ordinal_to_read += 1;
6185            if next_offset >= end_offset {
6186                return Ok(());
6187            }
6188
6189            // Decode unknown envelopes for gaps in ordinals.
6190            while _next_ordinal_to_read < 3 {
6191                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6192                _next_ordinal_to_read += 1;
6193                next_offset += envelope_size;
6194            }
6195
6196            let next_out_of_line = decoder.next_out_of_line();
6197            let handles_before = decoder.remaining_handles();
6198            if let Some((inlined, num_bytes, num_handles)) =
6199                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6200            {
6201                let member_inline_size = <fidl::encoding::Endpoint<
6202                    fidl::endpoints::ServerEnd<
6203                        fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
6204                    >,
6205                > as fidl::encoding::TypeMarker>::inline_size(
6206                    decoder.context
6207                );
6208                if inlined != (member_inline_size <= 4) {
6209                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6210                }
6211                let inner_offset;
6212                let mut inner_depth = depth.clone();
6213                if inlined {
6214                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6215                    inner_offset = next_offset;
6216                } else {
6217                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6218                    inner_depth.increment()?;
6219                }
6220                let val_ref = self.address_state_provider.get_or_insert_with(|| {
6221                    fidl::new_empty!(
6222                        fidl::encoding::Endpoint<
6223                            fidl::endpoints::ServerEnd<
6224                                fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
6225                            >,
6226                        >,
6227                        fidl::encoding::DefaultFuchsiaResourceDialect
6228                    )
6229                });
6230                fidl::decode!(
6231                    fidl::encoding::Endpoint<
6232                        fidl::endpoints::ServerEnd<
6233                            fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
6234                        >,
6235                    >,
6236                    fidl::encoding::DefaultFuchsiaResourceDialect,
6237                    val_ref,
6238                    decoder,
6239                    inner_offset,
6240                    inner_depth
6241                )?;
6242                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6243                {
6244                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6245                }
6246                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6247                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6248                }
6249            }
6250
6251            next_offset += envelope_size;
6252
6253            // Decode the remaining unknown envelopes.
6254            while next_offset < end_offset {
6255                _next_ordinal_to_read += 1;
6256                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6257                next_offset += envelope_size;
6258            }
6259
6260            Ok(())
6261        }
6262    }
6263
6264    impl AddressPool {
6265        #[inline(always)]
6266        fn max_ordinal_present(&self) -> u64 {
6267            if let Some(_) = self.range_stop {
6268                return 3;
6269            }
6270            if let Some(_) = self.range_start {
6271                return 2;
6272            }
6273            if let Some(_) = self.prefix_length {
6274                return 1;
6275            }
6276            0
6277        }
6278    }
6279
6280    impl fidl::encoding::ValueTypeMarker for AddressPool {
6281        type Borrowed<'a> = &'a Self;
6282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6283            value
6284        }
6285    }
6286
6287    unsafe impl fidl::encoding::TypeMarker for AddressPool {
6288        type Owned = Self;
6289
6290        #[inline(always)]
6291        fn inline_align(_context: fidl::encoding::Context) -> usize {
6292            8
6293        }
6294
6295        #[inline(always)]
6296        fn inline_size(_context: fidl::encoding::Context) -> usize {
6297            16
6298        }
6299    }
6300
6301    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddressPool, D>
6302        for &AddressPool
6303    {
6304        unsafe fn encode(
6305            self,
6306            encoder: &mut fidl::encoding::Encoder<'_, D>,
6307            offset: usize,
6308            mut depth: fidl::encoding::Depth,
6309        ) -> fidl::Result<()> {
6310            encoder.debug_check_bounds::<AddressPool>(offset);
6311            // Vector header
6312            let max_ordinal: u64 = self.max_ordinal_present();
6313            encoder.write_num(max_ordinal, offset);
6314            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6315            // Calling encoder.out_of_line_offset(0) is not allowed.
6316            if max_ordinal == 0 {
6317                return Ok(());
6318            }
6319            depth.increment()?;
6320            let envelope_size = 8;
6321            let bytes_len = max_ordinal as usize * envelope_size;
6322            #[allow(unused_variables)]
6323            let offset = encoder.out_of_line_offset(bytes_len);
6324            let mut _prev_end_offset: usize = 0;
6325            if 1 > max_ordinal {
6326                return Ok(());
6327            }
6328
6329            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6330            // are envelope_size bytes.
6331            let cur_offset: usize = (1 - 1) * envelope_size;
6332
6333            // Zero reserved fields.
6334            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6335
6336            // Safety:
6337            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6338            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6339            //   envelope_size bytes, there is always sufficient room.
6340            fidl::encoding::encode_in_envelope_optional::<u8, D>(
6341                self.prefix_length.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
6342                encoder,
6343                offset + cur_offset,
6344                depth,
6345            )?;
6346
6347            _prev_end_offset = cur_offset + envelope_size;
6348            if 2 > max_ordinal {
6349                return Ok(());
6350            }
6351
6352            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6353            // are envelope_size bytes.
6354            let cur_offset: usize = (2 - 1) * envelope_size;
6355
6356            // Zero reserved fields.
6357            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6358
6359            // Safety:
6360            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6361            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6362            //   envelope_size bytes, there is always sufficient room.
6363            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4Address, D>(
6364                self.range_start.as_ref().map(
6365                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow,
6366                ),
6367                encoder,
6368                offset + cur_offset,
6369                depth,
6370            )?;
6371
6372            _prev_end_offset = cur_offset + envelope_size;
6373            if 3 > max_ordinal {
6374                return Ok(());
6375            }
6376
6377            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6378            // are envelope_size bytes.
6379            let cur_offset: usize = (3 - 1) * envelope_size;
6380
6381            // Zero reserved fields.
6382            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6383
6384            // Safety:
6385            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6386            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6387            //   envelope_size bytes, there is always sufficient room.
6388            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4Address, D>(
6389                self.range_stop.as_ref().map(
6390                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow,
6391                ),
6392                encoder,
6393                offset + cur_offset,
6394                depth,
6395            )?;
6396
6397            _prev_end_offset = cur_offset + envelope_size;
6398
6399            Ok(())
6400        }
6401    }
6402
6403    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddressPool {
6404        #[inline(always)]
6405        fn new_empty() -> Self {
6406            Self::default()
6407        }
6408
6409        unsafe fn decode(
6410            &mut self,
6411            decoder: &mut fidl::encoding::Decoder<'_, D>,
6412            offset: usize,
6413            mut depth: fidl::encoding::Depth,
6414        ) -> fidl::Result<()> {
6415            decoder.debug_check_bounds::<Self>(offset);
6416            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6417                None => return Err(fidl::Error::NotNullable),
6418                Some(len) => len,
6419            };
6420            // Calling decoder.out_of_line_offset(0) is not allowed.
6421            if len == 0 {
6422                return Ok(());
6423            };
6424            depth.increment()?;
6425            let envelope_size = 8;
6426            let bytes_len = len * envelope_size;
6427            let offset = decoder.out_of_line_offset(bytes_len)?;
6428            // Decode the envelope for each type.
6429            let mut _next_ordinal_to_read = 0;
6430            let mut next_offset = offset;
6431            let end_offset = offset + bytes_len;
6432            _next_ordinal_to_read += 1;
6433            if next_offset >= end_offset {
6434                return Ok(());
6435            }
6436
6437            // Decode unknown envelopes for gaps in ordinals.
6438            while _next_ordinal_to_read < 1 {
6439                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6440                _next_ordinal_to_read += 1;
6441                next_offset += envelope_size;
6442            }
6443
6444            let next_out_of_line = decoder.next_out_of_line();
6445            let handles_before = decoder.remaining_handles();
6446            if let Some((inlined, num_bytes, num_handles)) =
6447                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6448            {
6449                let member_inline_size =
6450                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6451                if inlined != (member_inline_size <= 4) {
6452                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6453                }
6454                let inner_offset;
6455                let mut inner_depth = depth.clone();
6456                if inlined {
6457                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6458                    inner_offset = next_offset;
6459                } else {
6460                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6461                    inner_depth.increment()?;
6462                }
6463                let val_ref = self.prefix_length.get_or_insert_with(|| fidl::new_empty!(u8, D));
6464                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
6465                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6466                {
6467                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6468                }
6469                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6470                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6471                }
6472            }
6473
6474            next_offset += envelope_size;
6475            _next_ordinal_to_read += 1;
6476            if next_offset >= end_offset {
6477                return Ok(());
6478            }
6479
6480            // Decode unknown envelopes for gaps in ordinals.
6481            while _next_ordinal_to_read < 2 {
6482                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6483                _next_ordinal_to_read += 1;
6484                next_offset += envelope_size;
6485            }
6486
6487            let next_out_of_line = decoder.next_out_of_line();
6488            let handles_before = decoder.remaining_handles();
6489            if let Some((inlined, num_bytes, num_handles)) =
6490                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6491            {
6492                let member_inline_size =
6493                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(
6494                        decoder.context,
6495                    );
6496                if inlined != (member_inline_size <= 4) {
6497                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6498                }
6499                let inner_offset;
6500                let mut inner_depth = depth.clone();
6501                if inlined {
6502                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6503                    inner_offset = next_offset;
6504                } else {
6505                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6506                    inner_depth.increment()?;
6507                }
6508                let val_ref = self
6509                    .range_start
6510                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
6511                fidl::decode!(
6512                    fidl_fuchsia_net::Ipv4Address,
6513                    D,
6514                    val_ref,
6515                    decoder,
6516                    inner_offset,
6517                    inner_depth
6518                )?;
6519                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6520                {
6521                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6522                }
6523                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6524                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6525                }
6526            }
6527
6528            next_offset += envelope_size;
6529            _next_ordinal_to_read += 1;
6530            if next_offset >= end_offset {
6531                return Ok(());
6532            }
6533
6534            // Decode unknown envelopes for gaps in ordinals.
6535            while _next_ordinal_to_read < 3 {
6536                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6537                _next_ordinal_to_read += 1;
6538                next_offset += envelope_size;
6539            }
6540
6541            let next_out_of_line = decoder.next_out_of_line();
6542            let handles_before = decoder.remaining_handles();
6543            if let Some((inlined, num_bytes, num_handles)) =
6544                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6545            {
6546                let member_inline_size =
6547                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(
6548                        decoder.context,
6549                    );
6550                if inlined != (member_inline_size <= 4) {
6551                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6552                }
6553                let inner_offset;
6554                let mut inner_depth = depth.clone();
6555                if inlined {
6556                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6557                    inner_offset = next_offset;
6558                } else {
6559                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6560                    inner_depth.increment()?;
6561                }
6562                let val_ref = self
6563                    .range_stop
6564                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
6565                fidl::decode!(
6566                    fidl_fuchsia_net::Ipv4Address,
6567                    D,
6568                    val_ref,
6569                    decoder,
6570                    inner_offset,
6571                    inner_depth
6572                )?;
6573                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6574                {
6575                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6576                }
6577                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6578                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6579                }
6580            }
6581
6582            next_offset += envelope_size;
6583
6584            // Decode the remaining unknown envelopes.
6585            while next_offset < end_offset {
6586                _next_ordinal_to_read += 1;
6587                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6588                next_offset += envelope_size;
6589            }
6590
6591            Ok(())
6592        }
6593    }
6594
6595    impl ClientWatchConfigurationResponse {
6596        #[inline(always)]
6597        fn max_ordinal_present(&self) -> u64 {
6598            if let Some(_) = self.routers {
6599                return 3;
6600            }
6601            if let Some(_) = self.dns_servers {
6602                return 2;
6603            }
6604            if let Some(_) = self.address {
6605                return 1;
6606            }
6607            0
6608        }
6609    }
6610
6611    impl fidl::encoding::ResourceTypeMarker for ClientWatchConfigurationResponse {
6612        type Borrowed<'a> = &'a mut Self;
6613        fn take_or_borrow<'a>(
6614            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6615        ) -> Self::Borrowed<'a> {
6616            value
6617        }
6618    }
6619
6620    unsafe impl fidl::encoding::TypeMarker for ClientWatchConfigurationResponse {
6621        type Owned = Self;
6622
6623        #[inline(always)]
6624        fn inline_align(_context: fidl::encoding::Context) -> usize {
6625            8
6626        }
6627
6628        #[inline(always)]
6629        fn inline_size(_context: fidl::encoding::Context) -> usize {
6630            16
6631        }
6632    }
6633
6634    unsafe impl
6635        fidl::encoding::Encode<
6636            ClientWatchConfigurationResponse,
6637            fidl::encoding::DefaultFuchsiaResourceDialect,
6638        > for &mut ClientWatchConfigurationResponse
6639    {
6640        unsafe fn encode(
6641            self,
6642            encoder: &mut fidl::encoding::Encoder<
6643                '_,
6644                fidl::encoding::DefaultFuchsiaResourceDialect,
6645            >,
6646            offset: usize,
6647            mut depth: fidl::encoding::Depth,
6648        ) -> fidl::Result<()> {
6649            encoder.debug_check_bounds::<ClientWatchConfigurationResponse>(offset);
6650            // Vector header
6651            let max_ordinal: u64 = self.max_ordinal_present();
6652            encoder.write_num(max_ordinal, offset);
6653            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6654            // Calling encoder.out_of_line_offset(0) is not allowed.
6655            if max_ordinal == 0 {
6656                return Ok(());
6657            }
6658            depth.increment()?;
6659            let envelope_size = 8;
6660            let bytes_len = max_ordinal as usize * envelope_size;
6661            #[allow(unused_variables)]
6662            let offset = encoder.out_of_line_offset(bytes_len);
6663            let mut _prev_end_offset: usize = 0;
6664            if 1 > max_ordinal {
6665                return Ok(());
6666            }
6667
6668            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6669            // are envelope_size bytes.
6670            let cur_offset: usize = (1 - 1) * envelope_size;
6671
6672            // Zero reserved fields.
6673            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6674
6675            // Safety:
6676            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6677            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6678            //   envelope_size bytes, there is always sufficient room.
6679            fidl::encoding::encode_in_envelope_optional::<
6680                Address,
6681                fidl::encoding::DefaultFuchsiaResourceDialect,
6682            >(
6683                self.address
6684                    .as_mut()
6685                    .map(<Address as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
6686                encoder,
6687                offset + cur_offset,
6688                depth,
6689            )?;
6690
6691            _prev_end_offset = cur_offset + envelope_size;
6692            if 2 > max_ordinal {
6693                return Ok(());
6694            }
6695
6696            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6697            // are envelope_size bytes.
6698            let cur_offset: usize = (2 - 1) * envelope_size;
6699
6700            // Zero reserved fields.
6701            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6702
6703            // Safety:
6704            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6705            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6706            //   envelope_size bytes, there is always sufficient room.
6707            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6708            self.dns_servers.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64> as fidl::encoding::ValueTypeMarker>::borrow),
6709            encoder, offset + cur_offset, depth
6710        )?;
6711
6712            _prev_end_offset = cur_offset + envelope_size;
6713            if 3 > max_ordinal {
6714                return Ok(());
6715            }
6716
6717            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6718            // are envelope_size bytes.
6719            let cur_offset: usize = (3 - 1) * envelope_size;
6720
6721            // Zero reserved fields.
6722            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6723
6724            // Safety:
6725            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6726            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6727            //   envelope_size bytes, there is always sufficient room.
6728            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6729            self.routers.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64> as fidl::encoding::ValueTypeMarker>::borrow),
6730            encoder, offset + cur_offset, depth
6731        )?;
6732
6733            _prev_end_offset = cur_offset + envelope_size;
6734
6735            Ok(())
6736        }
6737    }
6738
6739    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6740        for ClientWatchConfigurationResponse
6741    {
6742        #[inline(always)]
6743        fn new_empty() -> Self {
6744            Self::default()
6745        }
6746
6747        unsafe fn decode(
6748            &mut self,
6749            decoder: &mut fidl::encoding::Decoder<
6750                '_,
6751                fidl::encoding::DefaultFuchsiaResourceDialect,
6752            >,
6753            offset: usize,
6754            mut depth: fidl::encoding::Depth,
6755        ) -> fidl::Result<()> {
6756            decoder.debug_check_bounds::<Self>(offset);
6757            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6758                None => return Err(fidl::Error::NotNullable),
6759                Some(len) => len,
6760            };
6761            // Calling decoder.out_of_line_offset(0) is not allowed.
6762            if len == 0 {
6763                return Ok(());
6764            };
6765            depth.increment()?;
6766            let envelope_size = 8;
6767            let bytes_len = len * envelope_size;
6768            let offset = decoder.out_of_line_offset(bytes_len)?;
6769            // Decode the envelope for each type.
6770            let mut _next_ordinal_to_read = 0;
6771            let mut next_offset = offset;
6772            let end_offset = offset + bytes_len;
6773            _next_ordinal_to_read += 1;
6774            if next_offset >= end_offset {
6775                return Ok(());
6776            }
6777
6778            // Decode unknown envelopes for gaps in ordinals.
6779            while _next_ordinal_to_read < 1 {
6780                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6781                _next_ordinal_to_read += 1;
6782                next_offset += envelope_size;
6783            }
6784
6785            let next_out_of_line = decoder.next_out_of_line();
6786            let handles_before = decoder.remaining_handles();
6787            if let Some((inlined, num_bytes, num_handles)) =
6788                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6789            {
6790                let member_inline_size =
6791                    <Address as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6792                if inlined != (member_inline_size <= 4) {
6793                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6794                }
6795                let inner_offset;
6796                let mut inner_depth = depth.clone();
6797                if inlined {
6798                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6799                    inner_offset = next_offset;
6800                } else {
6801                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6802                    inner_depth.increment()?;
6803                }
6804                let val_ref = self.address.get_or_insert_with(|| {
6805                    fidl::new_empty!(Address, fidl::encoding::DefaultFuchsiaResourceDialect)
6806                });
6807                fidl::decode!(
6808                    Address,
6809                    fidl::encoding::DefaultFuchsiaResourceDialect,
6810                    val_ref,
6811                    decoder,
6812                    inner_offset,
6813                    inner_depth
6814                )?;
6815                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6816                {
6817                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6818                }
6819                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6820                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6821                }
6822            }
6823
6824            next_offset += envelope_size;
6825            _next_ordinal_to_read += 1;
6826            if next_offset >= end_offset {
6827                return Ok(());
6828            }
6829
6830            // Decode unknown envelopes for gaps in ordinals.
6831            while _next_ordinal_to_read < 2 {
6832                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6833                _next_ordinal_to_read += 1;
6834                next_offset += envelope_size;
6835            }
6836
6837            let next_out_of_line = decoder.next_out_of_line();
6838            let handles_before = decoder.remaining_handles();
6839            if let Some((inlined, num_bytes, num_handles)) =
6840                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6841            {
6842                let member_inline_size = <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6843                if inlined != (member_inline_size <= 4) {
6844                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6845                }
6846                let inner_offset;
6847                let mut inner_depth = depth.clone();
6848                if inlined {
6849                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6850                    inner_offset = next_offset;
6851                } else {
6852                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6853                    inner_depth.increment()?;
6854                }
6855                let val_ref =
6856                self.dns_servers.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64>, fidl::encoding::DefaultFuchsiaResourceDialect));
6857                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
6858                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6859                {
6860                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6861                }
6862                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6863                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6864                }
6865            }
6866
6867            next_offset += envelope_size;
6868            _next_ordinal_to_read += 1;
6869            if next_offset >= end_offset {
6870                return Ok(());
6871            }
6872
6873            // Decode unknown envelopes for gaps in ordinals.
6874            while _next_ordinal_to_read < 3 {
6875                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6876                _next_ordinal_to_read += 1;
6877                next_offset += envelope_size;
6878            }
6879
6880            let next_out_of_line = decoder.next_out_of_line();
6881            let handles_before = decoder.remaining_handles();
6882            if let Some((inlined, num_bytes, num_handles)) =
6883                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6884            {
6885                let member_inline_size = <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6886                if inlined != (member_inline_size <= 4) {
6887                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6888                }
6889                let inner_offset;
6890                let mut inner_depth = depth.clone();
6891                if inlined {
6892                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6893                    inner_offset = next_offset;
6894                } else {
6895                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6896                    inner_depth.increment()?;
6897                }
6898                let val_ref =
6899                self.routers.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64>, fidl::encoding::DefaultFuchsiaResourceDialect));
6900                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 64>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
6901                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6902                {
6903                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6904                }
6905                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6906                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6907                }
6908            }
6909
6910            next_offset += envelope_size;
6911
6912            // Decode the remaining unknown envelopes.
6913            while next_offset < end_offset {
6914                _next_ordinal_to_read += 1;
6915                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6916                next_offset += envelope_size;
6917            }
6918
6919            Ok(())
6920        }
6921    }
6922
6923    impl ConfigurationToRequest {
6924        #[inline(always)]
6925        fn max_ordinal_present(&self) -> u64 {
6926            if let Some(_) = self.dns_servers {
6927                return 2;
6928            }
6929            if let Some(_) = self.routers {
6930                return 1;
6931            }
6932            0
6933        }
6934    }
6935
6936    impl fidl::encoding::ValueTypeMarker for ConfigurationToRequest {
6937        type Borrowed<'a> = &'a Self;
6938        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6939            value
6940        }
6941    }
6942
6943    unsafe impl fidl::encoding::TypeMarker for ConfigurationToRequest {
6944        type Owned = Self;
6945
6946        #[inline(always)]
6947        fn inline_align(_context: fidl::encoding::Context) -> usize {
6948            8
6949        }
6950
6951        #[inline(always)]
6952        fn inline_size(_context: fidl::encoding::Context) -> usize {
6953            16
6954        }
6955    }
6956
6957    unsafe impl<D: fidl::encoding::ResourceDialect>
6958        fidl::encoding::Encode<ConfigurationToRequest, D> for &ConfigurationToRequest
6959    {
6960        unsafe fn encode(
6961            self,
6962            encoder: &mut fidl::encoding::Encoder<'_, D>,
6963            offset: usize,
6964            mut depth: fidl::encoding::Depth,
6965        ) -> fidl::Result<()> {
6966            encoder.debug_check_bounds::<ConfigurationToRequest>(offset);
6967            // Vector header
6968            let max_ordinal: u64 = self.max_ordinal_present();
6969            encoder.write_num(max_ordinal, offset);
6970            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6971            // Calling encoder.out_of_line_offset(0) is not allowed.
6972            if max_ordinal == 0 {
6973                return Ok(());
6974            }
6975            depth.increment()?;
6976            let envelope_size = 8;
6977            let bytes_len = max_ordinal as usize * envelope_size;
6978            #[allow(unused_variables)]
6979            let offset = encoder.out_of_line_offset(bytes_len);
6980            let mut _prev_end_offset: usize = 0;
6981            if 1 > max_ordinal {
6982                return Ok(());
6983            }
6984
6985            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6986            // are envelope_size bytes.
6987            let cur_offset: usize = (1 - 1) * envelope_size;
6988
6989            // Zero reserved fields.
6990            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6991
6992            // Safety:
6993            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6994            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6995            //   envelope_size bytes, there is always sufficient room.
6996            fidl::encoding::encode_in_envelope_optional::<bool, D>(
6997                self.routers.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
6998                encoder,
6999                offset + cur_offset,
7000                depth,
7001            )?;
7002
7003            _prev_end_offset = cur_offset + envelope_size;
7004            if 2 > max_ordinal {
7005                return Ok(());
7006            }
7007
7008            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7009            // are envelope_size bytes.
7010            let cur_offset: usize = (2 - 1) * envelope_size;
7011
7012            // Zero reserved fields.
7013            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7014
7015            // Safety:
7016            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7017            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7018            //   envelope_size bytes, there is always sufficient room.
7019            fidl::encoding::encode_in_envelope_optional::<bool, D>(
7020                self.dns_servers.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
7021                encoder,
7022                offset + cur_offset,
7023                depth,
7024            )?;
7025
7026            _prev_end_offset = cur_offset + envelope_size;
7027
7028            Ok(())
7029        }
7030    }
7031
7032    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7033        for ConfigurationToRequest
7034    {
7035        #[inline(always)]
7036        fn new_empty() -> Self {
7037            Self::default()
7038        }
7039
7040        unsafe fn decode(
7041            &mut self,
7042            decoder: &mut fidl::encoding::Decoder<'_, D>,
7043            offset: usize,
7044            mut depth: fidl::encoding::Depth,
7045        ) -> fidl::Result<()> {
7046            decoder.debug_check_bounds::<Self>(offset);
7047            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7048                None => return Err(fidl::Error::NotNullable),
7049                Some(len) => len,
7050            };
7051            // Calling decoder.out_of_line_offset(0) is not allowed.
7052            if len == 0 {
7053                return Ok(());
7054            };
7055            depth.increment()?;
7056            let envelope_size = 8;
7057            let bytes_len = len * envelope_size;
7058            let offset = decoder.out_of_line_offset(bytes_len)?;
7059            // Decode the envelope for each type.
7060            let mut _next_ordinal_to_read = 0;
7061            let mut next_offset = offset;
7062            let end_offset = offset + bytes_len;
7063            _next_ordinal_to_read += 1;
7064            if next_offset >= end_offset {
7065                return Ok(());
7066            }
7067
7068            // Decode unknown envelopes for gaps in ordinals.
7069            while _next_ordinal_to_read < 1 {
7070                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7071                _next_ordinal_to_read += 1;
7072                next_offset += envelope_size;
7073            }
7074
7075            let next_out_of_line = decoder.next_out_of_line();
7076            let handles_before = decoder.remaining_handles();
7077            if let Some((inlined, num_bytes, num_handles)) =
7078                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7079            {
7080                let member_inline_size =
7081                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7082                if inlined != (member_inline_size <= 4) {
7083                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7084                }
7085                let inner_offset;
7086                let mut inner_depth = depth.clone();
7087                if inlined {
7088                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7089                    inner_offset = next_offset;
7090                } else {
7091                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7092                    inner_depth.increment()?;
7093                }
7094                let val_ref = self.routers.get_or_insert_with(|| fidl::new_empty!(bool, D));
7095                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
7096                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7097                {
7098                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7099                }
7100                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7101                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7102                }
7103            }
7104
7105            next_offset += envelope_size;
7106            _next_ordinal_to_read += 1;
7107            if next_offset >= end_offset {
7108                return Ok(());
7109            }
7110
7111            // Decode unknown envelopes for gaps in ordinals.
7112            while _next_ordinal_to_read < 2 {
7113                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7114                _next_ordinal_to_read += 1;
7115                next_offset += envelope_size;
7116            }
7117
7118            let next_out_of_line = decoder.next_out_of_line();
7119            let handles_before = decoder.remaining_handles();
7120            if let Some((inlined, num_bytes, num_handles)) =
7121                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7122            {
7123                let member_inline_size =
7124                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7125                if inlined != (member_inline_size <= 4) {
7126                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7127                }
7128                let inner_offset;
7129                let mut inner_depth = depth.clone();
7130                if inlined {
7131                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7132                    inner_offset = next_offset;
7133                } else {
7134                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7135                    inner_depth.increment()?;
7136                }
7137                let val_ref = self.dns_servers.get_or_insert_with(|| fidl::new_empty!(bool, D));
7138                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
7139                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7140                {
7141                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7142                }
7143                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7144                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7145                }
7146            }
7147
7148            next_offset += envelope_size;
7149
7150            // Decode the remaining unknown envelopes.
7151            while next_offset < end_offset {
7152                _next_ordinal_to_read += 1;
7153                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7154                next_offset += envelope_size;
7155            }
7156
7157            Ok(())
7158        }
7159    }
7160
7161    impl LeaseLength {
7162        #[inline(always)]
7163        fn max_ordinal_present(&self) -> u64 {
7164            if let Some(_) = self.max {
7165                return 2;
7166            }
7167            if let Some(_) = self.default {
7168                return 1;
7169            }
7170            0
7171        }
7172    }
7173
7174    impl fidl::encoding::ValueTypeMarker for LeaseLength {
7175        type Borrowed<'a> = &'a Self;
7176        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7177            value
7178        }
7179    }
7180
7181    unsafe impl fidl::encoding::TypeMarker for LeaseLength {
7182        type Owned = Self;
7183
7184        #[inline(always)]
7185        fn inline_align(_context: fidl::encoding::Context) -> usize {
7186            8
7187        }
7188
7189        #[inline(always)]
7190        fn inline_size(_context: fidl::encoding::Context) -> usize {
7191            16
7192        }
7193    }
7194
7195    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LeaseLength, D>
7196        for &LeaseLength
7197    {
7198        unsafe fn encode(
7199            self,
7200            encoder: &mut fidl::encoding::Encoder<'_, D>,
7201            offset: usize,
7202            mut depth: fidl::encoding::Depth,
7203        ) -> fidl::Result<()> {
7204            encoder.debug_check_bounds::<LeaseLength>(offset);
7205            // Vector header
7206            let max_ordinal: u64 = self.max_ordinal_present();
7207            encoder.write_num(max_ordinal, offset);
7208            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7209            // Calling encoder.out_of_line_offset(0) is not allowed.
7210            if max_ordinal == 0 {
7211                return Ok(());
7212            }
7213            depth.increment()?;
7214            let envelope_size = 8;
7215            let bytes_len = max_ordinal as usize * envelope_size;
7216            #[allow(unused_variables)]
7217            let offset = encoder.out_of_line_offset(bytes_len);
7218            let mut _prev_end_offset: usize = 0;
7219            if 1 > max_ordinal {
7220                return Ok(());
7221            }
7222
7223            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7224            // are envelope_size bytes.
7225            let cur_offset: usize = (1 - 1) * envelope_size;
7226
7227            // Zero reserved fields.
7228            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7229
7230            // Safety:
7231            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7232            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7233            //   envelope_size bytes, there is always sufficient room.
7234            fidl::encoding::encode_in_envelope_optional::<u32, D>(
7235                self.default.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
7236                encoder,
7237                offset + cur_offset,
7238                depth,
7239            )?;
7240
7241            _prev_end_offset = cur_offset + envelope_size;
7242            if 2 > max_ordinal {
7243                return Ok(());
7244            }
7245
7246            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7247            // are envelope_size bytes.
7248            let cur_offset: usize = (2 - 1) * envelope_size;
7249
7250            // Zero reserved fields.
7251            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7252
7253            // Safety:
7254            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7255            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7256            //   envelope_size bytes, there is always sufficient room.
7257            fidl::encoding::encode_in_envelope_optional::<u32, D>(
7258                self.max.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
7259                encoder,
7260                offset + cur_offset,
7261                depth,
7262            )?;
7263
7264            _prev_end_offset = cur_offset + envelope_size;
7265
7266            Ok(())
7267        }
7268    }
7269
7270    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LeaseLength {
7271        #[inline(always)]
7272        fn new_empty() -> Self {
7273            Self::default()
7274        }
7275
7276        unsafe fn decode(
7277            &mut self,
7278            decoder: &mut fidl::encoding::Decoder<'_, D>,
7279            offset: usize,
7280            mut depth: fidl::encoding::Depth,
7281        ) -> fidl::Result<()> {
7282            decoder.debug_check_bounds::<Self>(offset);
7283            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7284                None => return Err(fidl::Error::NotNullable),
7285                Some(len) => len,
7286            };
7287            // Calling decoder.out_of_line_offset(0) is not allowed.
7288            if len == 0 {
7289                return Ok(());
7290            };
7291            depth.increment()?;
7292            let envelope_size = 8;
7293            let bytes_len = len * envelope_size;
7294            let offset = decoder.out_of_line_offset(bytes_len)?;
7295            // Decode the envelope for each type.
7296            let mut _next_ordinal_to_read = 0;
7297            let mut next_offset = offset;
7298            let end_offset = offset + bytes_len;
7299            _next_ordinal_to_read += 1;
7300            if next_offset >= end_offset {
7301                return Ok(());
7302            }
7303
7304            // Decode unknown envelopes for gaps in ordinals.
7305            while _next_ordinal_to_read < 1 {
7306                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7307                _next_ordinal_to_read += 1;
7308                next_offset += envelope_size;
7309            }
7310
7311            let next_out_of_line = decoder.next_out_of_line();
7312            let handles_before = decoder.remaining_handles();
7313            if let Some((inlined, num_bytes, num_handles)) =
7314                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7315            {
7316                let member_inline_size =
7317                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7318                if inlined != (member_inline_size <= 4) {
7319                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7320                }
7321                let inner_offset;
7322                let mut inner_depth = depth.clone();
7323                if inlined {
7324                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7325                    inner_offset = next_offset;
7326                } else {
7327                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7328                    inner_depth.increment()?;
7329                }
7330                let val_ref = self.default.get_or_insert_with(|| fidl::new_empty!(u32, D));
7331                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
7332                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7333                {
7334                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7335                }
7336                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7337                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7338                }
7339            }
7340
7341            next_offset += envelope_size;
7342            _next_ordinal_to_read += 1;
7343            if next_offset >= end_offset {
7344                return Ok(());
7345            }
7346
7347            // Decode unknown envelopes for gaps in ordinals.
7348            while _next_ordinal_to_read < 2 {
7349                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7350                _next_ordinal_to_read += 1;
7351                next_offset += envelope_size;
7352            }
7353
7354            let next_out_of_line = decoder.next_out_of_line();
7355            let handles_before = decoder.remaining_handles();
7356            if let Some((inlined, num_bytes, num_handles)) =
7357                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7358            {
7359                let member_inline_size =
7360                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7361                if inlined != (member_inline_size <= 4) {
7362                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7363                }
7364                let inner_offset;
7365                let mut inner_depth = depth.clone();
7366                if inlined {
7367                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7368                    inner_offset = next_offset;
7369                } else {
7370                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7371                    inner_depth.increment()?;
7372                }
7373                let val_ref = self.max.get_or_insert_with(|| fidl::new_empty!(u32, D));
7374                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
7375                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7376                {
7377                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7378                }
7379                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7380                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7381                }
7382            }
7383
7384            next_offset += envelope_size;
7385
7386            // Decode the remaining unknown envelopes.
7387            while next_offset < end_offset {
7388                _next_ordinal_to_read += 1;
7389                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7390                next_offset += envelope_size;
7391            }
7392
7393            Ok(())
7394        }
7395    }
7396
7397    impl NewClientParams {
7398        #[inline(always)]
7399        fn max_ordinal_present(&self) -> u64 {
7400            if let Some(_) = self.request_ip_address {
7401                return 2;
7402            }
7403            if let Some(_) = self.configuration_to_request {
7404                return 1;
7405            }
7406            0
7407        }
7408    }
7409
7410    impl fidl::encoding::ValueTypeMarker for NewClientParams {
7411        type Borrowed<'a> = &'a Self;
7412        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7413            value
7414        }
7415    }
7416
7417    unsafe impl fidl::encoding::TypeMarker for NewClientParams {
7418        type Owned = Self;
7419
7420        #[inline(always)]
7421        fn inline_align(_context: fidl::encoding::Context) -> usize {
7422            8
7423        }
7424
7425        #[inline(always)]
7426        fn inline_size(_context: fidl::encoding::Context) -> usize {
7427            16
7428        }
7429    }
7430
7431    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NewClientParams, D>
7432        for &NewClientParams
7433    {
7434        unsafe fn encode(
7435            self,
7436            encoder: &mut fidl::encoding::Encoder<'_, D>,
7437            offset: usize,
7438            mut depth: fidl::encoding::Depth,
7439        ) -> fidl::Result<()> {
7440            encoder.debug_check_bounds::<NewClientParams>(offset);
7441            // Vector header
7442            let max_ordinal: u64 = self.max_ordinal_present();
7443            encoder.write_num(max_ordinal, offset);
7444            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7445            // Calling encoder.out_of_line_offset(0) is not allowed.
7446            if max_ordinal == 0 {
7447                return Ok(());
7448            }
7449            depth.increment()?;
7450            let envelope_size = 8;
7451            let bytes_len = max_ordinal as usize * envelope_size;
7452            #[allow(unused_variables)]
7453            let offset = encoder.out_of_line_offset(bytes_len);
7454            let mut _prev_end_offset: usize = 0;
7455            if 1 > max_ordinal {
7456                return Ok(());
7457            }
7458
7459            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7460            // are envelope_size bytes.
7461            let cur_offset: usize = (1 - 1) * envelope_size;
7462
7463            // Zero reserved fields.
7464            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7465
7466            // Safety:
7467            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7468            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7469            //   envelope_size bytes, there is always sufficient room.
7470            fidl::encoding::encode_in_envelope_optional::<ConfigurationToRequest, D>(
7471                self.configuration_to_request
7472                    .as_ref()
7473                    .map(<ConfigurationToRequest as fidl::encoding::ValueTypeMarker>::borrow),
7474                encoder,
7475                offset + cur_offset,
7476                depth,
7477            )?;
7478
7479            _prev_end_offset = cur_offset + envelope_size;
7480            if 2 > max_ordinal {
7481                return Ok(());
7482            }
7483
7484            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7485            // are envelope_size bytes.
7486            let cur_offset: usize = (2 - 1) * envelope_size;
7487
7488            // Zero reserved fields.
7489            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7490
7491            // Safety:
7492            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7493            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7494            //   envelope_size bytes, there is always sufficient room.
7495            fidl::encoding::encode_in_envelope_optional::<bool, D>(
7496                self.request_ip_address
7497                    .as_ref()
7498                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
7499                encoder,
7500                offset + cur_offset,
7501                depth,
7502            )?;
7503
7504            _prev_end_offset = cur_offset + envelope_size;
7505
7506            Ok(())
7507        }
7508    }
7509
7510    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NewClientParams {
7511        #[inline(always)]
7512        fn new_empty() -> Self {
7513            Self::default()
7514        }
7515
7516        unsafe fn decode(
7517            &mut self,
7518            decoder: &mut fidl::encoding::Decoder<'_, D>,
7519            offset: usize,
7520            mut depth: fidl::encoding::Depth,
7521        ) -> fidl::Result<()> {
7522            decoder.debug_check_bounds::<Self>(offset);
7523            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7524                None => return Err(fidl::Error::NotNullable),
7525                Some(len) => len,
7526            };
7527            // Calling decoder.out_of_line_offset(0) is not allowed.
7528            if len == 0 {
7529                return Ok(());
7530            };
7531            depth.increment()?;
7532            let envelope_size = 8;
7533            let bytes_len = len * envelope_size;
7534            let offset = decoder.out_of_line_offset(bytes_len)?;
7535            // Decode the envelope for each type.
7536            let mut _next_ordinal_to_read = 0;
7537            let mut next_offset = offset;
7538            let end_offset = offset + bytes_len;
7539            _next_ordinal_to_read += 1;
7540            if next_offset >= end_offset {
7541                return Ok(());
7542            }
7543
7544            // Decode unknown envelopes for gaps in ordinals.
7545            while _next_ordinal_to_read < 1 {
7546                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7547                _next_ordinal_to_read += 1;
7548                next_offset += envelope_size;
7549            }
7550
7551            let next_out_of_line = decoder.next_out_of_line();
7552            let handles_before = decoder.remaining_handles();
7553            if let Some((inlined, num_bytes, num_handles)) =
7554                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7555            {
7556                let member_inline_size =
7557                    <ConfigurationToRequest as fidl::encoding::TypeMarker>::inline_size(
7558                        decoder.context,
7559                    );
7560                if inlined != (member_inline_size <= 4) {
7561                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7562                }
7563                let inner_offset;
7564                let mut inner_depth = depth.clone();
7565                if inlined {
7566                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7567                    inner_offset = next_offset;
7568                } else {
7569                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7570                    inner_depth.increment()?;
7571                }
7572                let val_ref = self
7573                    .configuration_to_request
7574                    .get_or_insert_with(|| fidl::new_empty!(ConfigurationToRequest, D));
7575                fidl::decode!(
7576                    ConfigurationToRequest,
7577                    D,
7578                    val_ref,
7579                    decoder,
7580                    inner_offset,
7581                    inner_depth
7582                )?;
7583                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7584                {
7585                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7586                }
7587                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7588                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7589                }
7590            }
7591
7592            next_offset += envelope_size;
7593            _next_ordinal_to_read += 1;
7594            if next_offset >= end_offset {
7595                return Ok(());
7596            }
7597
7598            // Decode unknown envelopes for gaps in ordinals.
7599            while _next_ordinal_to_read < 2 {
7600                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7601                _next_ordinal_to_read += 1;
7602                next_offset += envelope_size;
7603            }
7604
7605            let next_out_of_line = decoder.next_out_of_line();
7606            let handles_before = decoder.remaining_handles();
7607            if let Some((inlined, num_bytes, num_handles)) =
7608                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7609            {
7610                let member_inline_size =
7611                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7612                if inlined != (member_inline_size <= 4) {
7613                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7614                }
7615                let inner_offset;
7616                let mut inner_depth = depth.clone();
7617                if inlined {
7618                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7619                    inner_offset = next_offset;
7620                } else {
7621                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7622                    inner_depth.increment()?;
7623                }
7624                let val_ref =
7625                    self.request_ip_address.get_or_insert_with(|| fidl::new_empty!(bool, D));
7626                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
7627                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7628                {
7629                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7630                }
7631                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7632                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7633                }
7634            }
7635
7636            next_offset += envelope_size;
7637
7638            // Decode the remaining unknown envelopes.
7639            while next_offset < end_offset {
7640                _next_ordinal_to_read += 1;
7641                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7642                next_offset += envelope_size;
7643            }
7644
7645            Ok(())
7646        }
7647    }
7648
7649    impl StaticAssignment {
7650        #[inline(always)]
7651        fn max_ordinal_present(&self) -> u64 {
7652            if let Some(_) = self.assigned_addr {
7653                return 2;
7654            }
7655            if let Some(_) = self.host {
7656                return 1;
7657            }
7658            0
7659        }
7660    }
7661
7662    impl fidl::encoding::ValueTypeMarker for StaticAssignment {
7663        type Borrowed<'a> = &'a Self;
7664        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7665            value
7666        }
7667    }
7668
7669    unsafe impl fidl::encoding::TypeMarker for StaticAssignment {
7670        type Owned = Self;
7671
7672        #[inline(always)]
7673        fn inline_align(_context: fidl::encoding::Context) -> usize {
7674            8
7675        }
7676
7677        #[inline(always)]
7678        fn inline_size(_context: fidl::encoding::Context) -> usize {
7679            16
7680        }
7681    }
7682
7683    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StaticAssignment, D>
7684        for &StaticAssignment
7685    {
7686        unsafe fn encode(
7687            self,
7688            encoder: &mut fidl::encoding::Encoder<'_, D>,
7689            offset: usize,
7690            mut depth: fidl::encoding::Depth,
7691        ) -> fidl::Result<()> {
7692            encoder.debug_check_bounds::<StaticAssignment>(offset);
7693            // Vector header
7694            let max_ordinal: u64 = self.max_ordinal_present();
7695            encoder.write_num(max_ordinal, offset);
7696            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7697            // Calling encoder.out_of_line_offset(0) is not allowed.
7698            if max_ordinal == 0 {
7699                return Ok(());
7700            }
7701            depth.increment()?;
7702            let envelope_size = 8;
7703            let bytes_len = max_ordinal as usize * envelope_size;
7704            #[allow(unused_variables)]
7705            let offset = encoder.out_of_line_offset(bytes_len);
7706            let mut _prev_end_offset: usize = 0;
7707            if 1 > max_ordinal {
7708                return Ok(());
7709            }
7710
7711            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7712            // are envelope_size bytes.
7713            let cur_offset: usize = (1 - 1) * envelope_size;
7714
7715            // Zero reserved fields.
7716            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7717
7718            // Safety:
7719            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7720            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7721            //   envelope_size bytes, there is always sufficient room.
7722            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::MacAddress, D>(
7723                self.host
7724                    .as_ref()
7725                    .map(<fidl_fuchsia_net::MacAddress as fidl::encoding::ValueTypeMarker>::borrow),
7726                encoder,
7727                offset + cur_offset,
7728                depth,
7729            )?;
7730
7731            _prev_end_offset = cur_offset + envelope_size;
7732            if 2 > max_ordinal {
7733                return Ok(());
7734            }
7735
7736            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7737            // are envelope_size bytes.
7738            let cur_offset: usize = (2 - 1) * envelope_size;
7739
7740            // Zero reserved fields.
7741            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7742
7743            // Safety:
7744            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7745            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7746            //   envelope_size bytes, there is always sufficient room.
7747            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4Address, D>(
7748                self.assigned_addr.as_ref().map(
7749                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow,
7750                ),
7751                encoder,
7752                offset + cur_offset,
7753                depth,
7754            )?;
7755
7756            _prev_end_offset = cur_offset + envelope_size;
7757
7758            Ok(())
7759        }
7760    }
7761
7762    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StaticAssignment {
7763        #[inline(always)]
7764        fn new_empty() -> Self {
7765            Self::default()
7766        }
7767
7768        unsafe fn decode(
7769            &mut self,
7770            decoder: &mut fidl::encoding::Decoder<'_, D>,
7771            offset: usize,
7772            mut depth: fidl::encoding::Depth,
7773        ) -> fidl::Result<()> {
7774            decoder.debug_check_bounds::<Self>(offset);
7775            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7776                None => return Err(fidl::Error::NotNullable),
7777                Some(len) => len,
7778            };
7779            // Calling decoder.out_of_line_offset(0) is not allowed.
7780            if len == 0 {
7781                return Ok(());
7782            };
7783            depth.increment()?;
7784            let envelope_size = 8;
7785            let bytes_len = len * envelope_size;
7786            let offset = decoder.out_of_line_offset(bytes_len)?;
7787            // Decode the envelope for each type.
7788            let mut _next_ordinal_to_read = 0;
7789            let mut next_offset = offset;
7790            let end_offset = offset + bytes_len;
7791            _next_ordinal_to_read += 1;
7792            if next_offset >= end_offset {
7793                return Ok(());
7794            }
7795
7796            // Decode unknown envelopes for gaps in ordinals.
7797            while _next_ordinal_to_read < 1 {
7798                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7799                _next_ordinal_to_read += 1;
7800                next_offset += envelope_size;
7801            }
7802
7803            let next_out_of_line = decoder.next_out_of_line();
7804            let handles_before = decoder.remaining_handles();
7805            if let Some((inlined, num_bytes, num_handles)) =
7806                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7807            {
7808                let member_inline_size =
7809                    <fidl_fuchsia_net::MacAddress as fidl::encoding::TypeMarker>::inline_size(
7810                        decoder.context,
7811                    );
7812                if inlined != (member_inline_size <= 4) {
7813                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7814                }
7815                let inner_offset;
7816                let mut inner_depth = depth.clone();
7817                if inlined {
7818                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7819                    inner_offset = next_offset;
7820                } else {
7821                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7822                    inner_depth.increment()?;
7823                }
7824                let val_ref = self
7825                    .host
7826                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::MacAddress, D));
7827                fidl::decode!(
7828                    fidl_fuchsia_net::MacAddress,
7829                    D,
7830                    val_ref,
7831                    decoder,
7832                    inner_offset,
7833                    inner_depth
7834                )?;
7835                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7836                {
7837                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7838                }
7839                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7840                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7841                }
7842            }
7843
7844            next_offset += envelope_size;
7845            _next_ordinal_to_read += 1;
7846            if next_offset >= end_offset {
7847                return Ok(());
7848            }
7849
7850            // Decode unknown envelopes for gaps in ordinals.
7851            while _next_ordinal_to_read < 2 {
7852                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7853                _next_ordinal_to_read += 1;
7854                next_offset += envelope_size;
7855            }
7856
7857            let next_out_of_line = decoder.next_out_of_line();
7858            let handles_before = decoder.remaining_handles();
7859            if let Some((inlined, num_bytes, num_handles)) =
7860                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7861            {
7862                let member_inline_size =
7863                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(
7864                        decoder.context,
7865                    );
7866                if inlined != (member_inline_size <= 4) {
7867                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7868                }
7869                let inner_offset;
7870                let mut inner_depth = depth.clone();
7871                if inlined {
7872                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7873                    inner_offset = next_offset;
7874                } else {
7875                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7876                    inner_depth.increment()?;
7877                }
7878                let val_ref = self
7879                    .assigned_addr
7880                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
7881                fidl::decode!(
7882                    fidl_fuchsia_net::Ipv4Address,
7883                    D,
7884                    val_ref,
7885                    decoder,
7886                    inner_offset,
7887                    inner_depth
7888                )?;
7889                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7890                {
7891                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7892                }
7893                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7894                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7895                }
7896            }
7897
7898            next_offset += envelope_size;
7899
7900            // Decode the remaining unknown envelopes.
7901            while next_offset < end_offset {
7902                _next_ordinal_to_read += 1;
7903                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7904                next_offset += envelope_size;
7905            }
7906
7907            Ok(())
7908        }
7909    }
7910
7911    impl fidl::encoding::ValueTypeMarker for Option_ {
7912        type Borrowed<'a> = &'a Self;
7913        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7914            value
7915        }
7916    }
7917
7918    unsafe impl fidl::encoding::TypeMarker for Option_ {
7919        type Owned = Self;
7920
7921        #[inline(always)]
7922        fn inline_align(_context: fidl::encoding::Context) -> usize {
7923            8
7924        }
7925
7926        #[inline(always)]
7927        fn inline_size(_context: fidl::encoding::Context) -> usize {
7928            16
7929        }
7930    }
7931
7932    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Option_, D> for &Option_ {
7933        #[inline]
7934        unsafe fn encode(
7935            self,
7936            encoder: &mut fidl::encoding::Encoder<'_, D>,
7937            offset: usize,
7938            _depth: fidl::encoding::Depth,
7939        ) -> fidl::Result<()> {
7940            encoder.debug_check_bounds::<Option_>(offset);
7941            encoder.write_num::<u64>(self.ordinal(), offset);
7942            match self {
7943            Option_::SubnetMask(ref val) => {
7944                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
7945                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
7946                    encoder, offset + 8, _depth
7947                )
7948            }
7949            Option_::TimeOffset(ref val) => {
7950                fidl::encoding::encode_in_envelope::<i32, D>(
7951                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
7952                    encoder, offset + 8, _depth
7953                )
7954            }
7955            Option_::Router(ref val) => {
7956                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7957                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7958                    encoder, offset + 8, _depth
7959                )
7960            }
7961            Option_::TimeServer(ref val) => {
7962                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7963                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7964                    encoder, offset + 8, _depth
7965                )
7966            }
7967            Option_::NameServer(ref val) => {
7968                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7969                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7970                    encoder, offset + 8, _depth
7971                )
7972            }
7973            Option_::DomainNameServer(ref val) => {
7974                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7975                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7976                    encoder, offset + 8, _depth
7977                )
7978            }
7979            Option_::LogServer(ref val) => {
7980                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7981                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7982                    encoder, offset + 8, _depth
7983                )
7984            }
7985            Option_::CookieServer(ref val) => {
7986                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7987                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7988                    encoder, offset + 8, _depth
7989                )
7990            }
7991            Option_::LprServer(ref val) => {
7992                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7993                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
7994                    encoder, offset + 8, _depth
7995                )
7996            }
7997            Option_::ImpressServer(ref val) => {
7998                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
7999                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8000                    encoder, offset + 8, _depth
8001                )
8002            }
8003            Option_::ResourceLocationServer(ref val) => {
8004                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8005                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8006                    encoder, offset + 8, _depth
8007                )
8008            }
8009            Option_::HostName(ref val) => {
8010                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8011                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8012                    encoder, offset + 8, _depth
8013                )
8014            }
8015            Option_::BootFileSize(ref val) => {
8016                fidl::encoding::encode_in_envelope::<u16, D>(
8017                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
8018                    encoder, offset + 8, _depth
8019                )
8020            }
8021            Option_::MeritDumpFile(ref val) => {
8022                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8023                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8024                    encoder, offset + 8, _depth
8025                )
8026            }
8027            Option_::DomainName(ref val) => {
8028                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8029                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8030                    encoder, offset + 8, _depth
8031                )
8032            }
8033            Option_::SwapServer(ref val) => {
8034                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
8035                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
8036                    encoder, offset + 8, _depth
8037                )
8038            }
8039            Option_::RootPath(ref val) => {
8040                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8041                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8042                    encoder, offset + 8, _depth
8043                )
8044            }
8045            Option_::ExtensionsPath(ref val) => {
8046                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8047                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8048                    encoder, offset + 8, _depth
8049                )
8050            }
8051            Option_::IpForwarding(ref val) => {
8052                fidl::encoding::encode_in_envelope::<bool, D>(
8053                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8054                    encoder, offset + 8, _depth
8055                )
8056            }
8057            Option_::NonLocalSourceRouting(ref val) => {
8058                fidl::encoding::encode_in_envelope::<bool, D>(
8059                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8060                    encoder, offset + 8, _depth
8061                )
8062            }
8063            Option_::PolicyFilter(ref val) => {
8064                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8065                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8066                    encoder, offset + 8, _depth
8067                )
8068            }
8069            Option_::MaxDatagramReassemblySize(ref val) => {
8070                fidl::encoding::encode_in_envelope::<u16, D>(
8071                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
8072                    encoder, offset + 8, _depth
8073                )
8074            }
8075            Option_::DefaultIpTtl(ref val) => {
8076                fidl::encoding::encode_in_envelope::<u8, D>(
8077                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
8078                    encoder, offset + 8, _depth
8079                )
8080            }
8081            Option_::PathMtuAgingTimeout(ref val) => {
8082                fidl::encoding::encode_in_envelope::<u32, D>(
8083                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
8084                    encoder, offset + 8, _depth
8085                )
8086            }
8087            Option_::PathMtuPlateauTable(ref val) => {
8088                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u16, 127>, D>(
8089                    <fidl::encoding::Vector<u16, 127> as fidl::encoding::ValueTypeMarker>::borrow(val),
8090                    encoder, offset + 8, _depth
8091                )
8092            }
8093            Option_::InterfaceMtu(ref val) => {
8094                fidl::encoding::encode_in_envelope::<u16, D>(
8095                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
8096                    encoder, offset + 8, _depth
8097                )
8098            }
8099            Option_::AllSubnetsLocal(ref val) => {
8100                fidl::encoding::encode_in_envelope::<bool, D>(
8101                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8102                    encoder, offset + 8, _depth
8103                )
8104            }
8105            Option_::BroadcastAddress(ref val) => {
8106                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
8107                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
8108                    encoder, offset + 8, _depth
8109                )
8110            }
8111            Option_::PerformMaskDiscovery(ref val) => {
8112                fidl::encoding::encode_in_envelope::<bool, D>(
8113                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8114                    encoder, offset + 8, _depth
8115                )
8116            }
8117            Option_::MaskSupplier(ref val) => {
8118                fidl::encoding::encode_in_envelope::<bool, D>(
8119                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8120                    encoder, offset + 8, _depth
8121                )
8122            }
8123            Option_::PerformRouterDiscovery(ref val) => {
8124                fidl::encoding::encode_in_envelope::<bool, D>(
8125                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8126                    encoder, offset + 8, _depth
8127                )
8128            }
8129            Option_::RouterSolicitationAddress(ref val) => {
8130                fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
8131                    <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
8132                    encoder, offset + 8, _depth
8133                )
8134            }
8135            Option_::StaticRoute(ref val) => {
8136                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8137                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8138                    encoder, offset + 8, _depth
8139                )
8140            }
8141            Option_::TrailerEncapsulation(ref val) => {
8142                fidl::encoding::encode_in_envelope::<bool, D>(
8143                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8144                    encoder, offset + 8, _depth
8145                )
8146            }
8147            Option_::ArpCacheTimeout(ref val) => {
8148                fidl::encoding::encode_in_envelope::<u32, D>(
8149                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
8150                    encoder, offset + 8, _depth
8151                )
8152            }
8153            Option_::EthernetEncapsulation(ref val) => {
8154                fidl::encoding::encode_in_envelope::<bool, D>(
8155                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8156                    encoder, offset + 8, _depth
8157                )
8158            }
8159            Option_::TcpDefaultTtl(ref val) => {
8160                fidl::encoding::encode_in_envelope::<u8, D>(
8161                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
8162                    encoder, offset + 8, _depth
8163                )
8164            }
8165            Option_::TcpKeepaliveInterval(ref val) => {
8166                fidl::encoding::encode_in_envelope::<u32, D>(
8167                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
8168                    encoder, offset + 8, _depth
8169                )
8170            }
8171            Option_::TcpKeepaliveGarbage(ref val) => {
8172                fidl::encoding::encode_in_envelope::<bool, D>(
8173                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
8174                    encoder, offset + 8, _depth
8175                )
8176            }
8177            Option_::NetworkInformationServiceDomain(ref val) => {
8178                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8179                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8180                    encoder, offset + 8, _depth
8181                )
8182            }
8183            Option_::NetworkInformationServers(ref val) => {
8184                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8185                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8186                    encoder, offset + 8, _depth
8187                )
8188            }
8189            Option_::NetworkTimeProtocolServers(ref val) => {
8190                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8191                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8192                    encoder, offset + 8, _depth
8193                )
8194            }
8195            Option_::VendorSpecificInformation(ref val) => {
8196                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 255>, D>(
8197                    <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8198                    encoder, offset + 8, _depth
8199                )
8200            }
8201            Option_::NetbiosOverTcpipNameServer(ref val) => {
8202                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8203                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8204                    encoder, offset + 8, _depth
8205                )
8206            }
8207            Option_::NetbiosOverTcpipDatagramDistributionServer(ref val) => {
8208                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8209                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8210                    encoder, offset + 8, _depth
8211                )
8212            }
8213            Option_::NetbiosOverTcpipNodeType(ref val) => {
8214                fidl::encoding::encode_in_envelope::<NodeTypes, D>(
8215                    <NodeTypes as fidl::encoding::ValueTypeMarker>::borrow(val),
8216                    encoder, offset + 8, _depth
8217                )
8218            }
8219            Option_::NetbiosOverTcpipScope(ref val) => {
8220                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8221                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8222                    encoder, offset + 8, _depth
8223                )
8224            }
8225            Option_::XWindowSystemFontServer(ref val) => {
8226                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8227                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8228                    encoder, offset + 8, _depth
8229                )
8230            }
8231            Option_::XWindowSystemDisplayManager(ref val) => {
8232                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8233                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8234                    encoder, offset + 8, _depth
8235                )
8236            }
8237            Option_::NetworkInformationServicePlusDomain(ref val) => {
8238                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8239                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8240                    encoder, offset + 8, _depth
8241                )
8242            }
8243            Option_::NetworkInformationServicePlusServers(ref val) => {
8244                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8245                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8246                    encoder, offset + 8, _depth
8247                )
8248            }
8249            Option_::MobileIpHomeAgent(ref val) => {
8250                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8251                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8252                    encoder, offset + 8, _depth
8253                )
8254            }
8255            Option_::SmtpServer(ref val) => {
8256                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8257                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8258                    encoder, offset + 8, _depth
8259                )
8260            }
8261            Option_::Pop3Server(ref val) => {
8262                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8263                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8264                    encoder, offset + 8, _depth
8265                )
8266            }
8267            Option_::NntpServer(ref val) => {
8268                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8269                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8270                    encoder, offset + 8, _depth
8271                )
8272            }
8273            Option_::DefaultWwwServer(ref val) => {
8274                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8275                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8276                    encoder, offset + 8, _depth
8277                )
8278            }
8279            Option_::DefaultFingerServer(ref val) => {
8280                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8281                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8282                    encoder, offset + 8, _depth
8283                )
8284            }
8285            Option_::DefaultIrcServer(ref val) => {
8286                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8287                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8288                    encoder, offset + 8, _depth
8289                )
8290            }
8291            Option_::StreettalkServer(ref val) => {
8292                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8293                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8294                    encoder, offset + 8, _depth
8295                )
8296            }
8297            Option_::StreettalkDirectoryAssistanceServer(ref val) => {
8298                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
8299                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
8300                    encoder, offset + 8, _depth
8301                )
8302            }
8303            Option_::OptionOverload(ref val) => {
8304                fidl::encoding::encode_in_envelope::<OptionOverloadValue, D>(
8305                    <OptionOverloadValue as fidl::encoding::ValueTypeMarker>::borrow(val),
8306                    encoder, offset + 8, _depth
8307                )
8308            }
8309            Option_::TftpServerName(ref val) => {
8310                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8311                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8312                    encoder, offset + 8, _depth
8313                )
8314            }
8315            Option_::BootfileName(ref val) => {
8316                fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
8317                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
8318                    encoder, offset + 8, _depth
8319                )
8320            }
8321            Option_::MaxDhcpMessageSize(ref val) => {
8322                fidl::encoding::encode_in_envelope::<u16, D>(
8323                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
8324                    encoder, offset + 8, _depth
8325                )
8326            }
8327            Option_::RenewalTimeValue(ref val) => {
8328                fidl::encoding::encode_in_envelope::<u32, D>(
8329                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
8330                    encoder, offset + 8, _depth
8331                )
8332            }
8333            Option_::RebindingTimeValue(ref val) => {
8334                fidl::encoding::encode_in_envelope::<u32, D>(
8335                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
8336                    encoder, offset + 8, _depth
8337                )
8338            }
8339            Option_::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
8340        }
8341        }
8342    }
8343
8344    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Option_ {
8345        #[inline(always)]
8346        fn new_empty() -> Self {
8347            Self::__SourceBreaking { unknown_ordinal: 0 }
8348        }
8349
8350        #[inline]
8351        unsafe fn decode(
8352            &mut self,
8353            decoder: &mut fidl::encoding::Decoder<'_, D>,
8354            offset: usize,
8355            mut depth: fidl::encoding::Depth,
8356        ) -> fidl::Result<()> {
8357            decoder.debug_check_bounds::<Self>(offset);
8358            #[allow(unused_variables)]
8359            let next_out_of_line = decoder.next_out_of_line();
8360            let handles_before = decoder.remaining_handles();
8361            let (ordinal, inlined, num_bytes, num_handles) =
8362                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
8363
8364            let member_inline_size = match ordinal {
8365            1 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8366            2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8367            3 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8368            4 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8369            5 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8370            6 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8371            7 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8372            8 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8373            9 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8374            10 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8375            11 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8376            12 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8377            13 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8378            14 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8379            15 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8380            16 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8381            17 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8382            18 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8383            19 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8384            20 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8385            21 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8386            22 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8387            23 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8388            24 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8389            25 => <fidl::encoding::Vector<u16, 127> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8390            26 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8391            27 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8392            28 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8393            29 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8394            30 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8395            31 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8396            32 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8397            33 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8398            34 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8399            35 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8400            36 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8401            37 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8402            38 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8403            39 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8404            40 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8405            41 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8406            42 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8407            43 => <fidl::encoding::Vector<u8, 255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8408            44 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8409            45 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8410            46 => <NodeTypes as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8411            47 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8412            48 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8413            49 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8414            50 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8415            51 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8416            52 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8417            53 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8418            54 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8419            55 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8420            56 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8421            57 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8422            58 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8423            59 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8424            60 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8425            61 => <OptionOverloadValue as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8426            62 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8427            63 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8428            64 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8429            65 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8430            66 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
8431            0 => return Err(fidl::Error::UnknownUnionTag),
8432            _ => num_bytes as usize,
8433        };
8434
8435            if inlined != (member_inline_size <= 4) {
8436                return Err(fidl::Error::InvalidInlineBitInEnvelope);
8437            }
8438            let _inner_offset;
8439            if inlined {
8440                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
8441                _inner_offset = offset + 8;
8442            } else {
8443                depth.increment()?;
8444                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8445            }
8446            match ordinal {
8447                1 => {
8448                    #[allow(irrefutable_let_patterns)]
8449                    if let Option_::SubnetMask(_) = self {
8450                        // Do nothing, read the value into the object
8451                    } else {
8452                        // Initialize `self` to the right variant
8453                        *self =
8454                            Option_::SubnetMask(fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
8455                    }
8456                    #[allow(irrefutable_let_patterns)]
8457                    if let Option_::SubnetMask(ref mut val) = self {
8458                        fidl::decode!(
8459                            fidl_fuchsia_net::Ipv4Address,
8460                            D,
8461                            val,
8462                            decoder,
8463                            _inner_offset,
8464                            depth
8465                        )?;
8466                    } else {
8467                        unreachable!()
8468                    }
8469                }
8470                2 => {
8471                    #[allow(irrefutable_let_patterns)]
8472                    if let Option_::TimeOffset(_) = self {
8473                        // Do nothing, read the value into the object
8474                    } else {
8475                        // Initialize `self` to the right variant
8476                        *self = Option_::TimeOffset(fidl::new_empty!(i32, D));
8477                    }
8478                    #[allow(irrefutable_let_patterns)]
8479                    if let Option_::TimeOffset(ref mut val) = self {
8480                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
8481                    } else {
8482                        unreachable!()
8483                    }
8484                }
8485                3 => {
8486                    #[allow(irrefutable_let_patterns)]
8487                    if let Option_::Router(_) = self {
8488                        // Do nothing, read the value into the object
8489                    } else {
8490                        // Initialize `self` to the right variant
8491                        *self = Option_::Router(
8492                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8493                        );
8494                    }
8495                    #[allow(irrefutable_let_patterns)]
8496                    if let Option_::Router(ref mut val) = self {
8497                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8498                    } else {
8499                        unreachable!()
8500                    }
8501                }
8502                4 => {
8503                    #[allow(irrefutable_let_patterns)]
8504                    if let Option_::TimeServer(_) = self {
8505                        // Do nothing, read the value into the object
8506                    } else {
8507                        // Initialize `self` to the right variant
8508                        *self = Option_::TimeServer(
8509                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8510                        );
8511                    }
8512                    #[allow(irrefutable_let_patterns)]
8513                    if let Option_::TimeServer(ref mut val) = self {
8514                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8515                    } else {
8516                        unreachable!()
8517                    }
8518                }
8519                5 => {
8520                    #[allow(irrefutable_let_patterns)]
8521                    if let Option_::NameServer(_) = self {
8522                        // Do nothing, read the value into the object
8523                    } else {
8524                        // Initialize `self` to the right variant
8525                        *self = Option_::NameServer(
8526                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8527                        );
8528                    }
8529                    #[allow(irrefutable_let_patterns)]
8530                    if let Option_::NameServer(ref mut val) = self {
8531                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8532                    } else {
8533                        unreachable!()
8534                    }
8535                }
8536                6 => {
8537                    #[allow(irrefutable_let_patterns)]
8538                    if let Option_::DomainNameServer(_) = self {
8539                        // Do nothing, read the value into the object
8540                    } else {
8541                        // Initialize `self` to the right variant
8542                        *self = Option_::DomainNameServer(
8543                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8544                        );
8545                    }
8546                    #[allow(irrefutable_let_patterns)]
8547                    if let Option_::DomainNameServer(ref mut val) = self {
8548                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8549                    } else {
8550                        unreachable!()
8551                    }
8552                }
8553                7 => {
8554                    #[allow(irrefutable_let_patterns)]
8555                    if let Option_::LogServer(_) = self {
8556                        // Do nothing, read the value into the object
8557                    } else {
8558                        // Initialize `self` to the right variant
8559                        *self = Option_::LogServer(
8560                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8561                        );
8562                    }
8563                    #[allow(irrefutable_let_patterns)]
8564                    if let Option_::LogServer(ref mut val) = self {
8565                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8566                    } else {
8567                        unreachable!()
8568                    }
8569                }
8570                8 => {
8571                    #[allow(irrefutable_let_patterns)]
8572                    if let Option_::CookieServer(_) = self {
8573                        // Do nothing, read the value into the object
8574                    } else {
8575                        // Initialize `self` to the right variant
8576                        *self = Option_::CookieServer(
8577                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8578                        );
8579                    }
8580                    #[allow(irrefutable_let_patterns)]
8581                    if let Option_::CookieServer(ref mut val) = self {
8582                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8583                    } else {
8584                        unreachable!()
8585                    }
8586                }
8587                9 => {
8588                    #[allow(irrefutable_let_patterns)]
8589                    if let Option_::LprServer(_) = self {
8590                        // Do nothing, read the value into the object
8591                    } else {
8592                        // Initialize `self` to the right variant
8593                        *self = Option_::LprServer(
8594                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8595                        );
8596                    }
8597                    #[allow(irrefutable_let_patterns)]
8598                    if let Option_::LprServer(ref mut val) = self {
8599                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8600                    } else {
8601                        unreachable!()
8602                    }
8603                }
8604                10 => {
8605                    #[allow(irrefutable_let_patterns)]
8606                    if let Option_::ImpressServer(_) = self {
8607                        // Do nothing, read the value into the object
8608                    } else {
8609                        // Initialize `self` to the right variant
8610                        *self = Option_::ImpressServer(
8611                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8612                        );
8613                    }
8614                    #[allow(irrefutable_let_patterns)]
8615                    if let Option_::ImpressServer(ref mut val) = self {
8616                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8617                    } else {
8618                        unreachable!()
8619                    }
8620                }
8621                11 => {
8622                    #[allow(irrefutable_let_patterns)]
8623                    if let Option_::ResourceLocationServer(_) = self {
8624                        // Do nothing, read the value into the object
8625                    } else {
8626                        // Initialize `self` to the right variant
8627                        *self = Option_::ResourceLocationServer(
8628                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8629                        );
8630                    }
8631                    #[allow(irrefutable_let_patterns)]
8632                    if let Option_::ResourceLocationServer(ref mut val) = self {
8633                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8634                    } else {
8635                        unreachable!()
8636                    }
8637                }
8638                12 => {
8639                    #[allow(irrefutable_let_patterns)]
8640                    if let Option_::HostName(_) = self {
8641                        // Do nothing, read the value into the object
8642                    } else {
8643                        // Initialize `self` to the right variant
8644                        *self = Option_::HostName(fidl::new_empty!(
8645                            fidl::encoding::BoundedString<255>,
8646                            D
8647                        ));
8648                    }
8649                    #[allow(irrefutable_let_patterns)]
8650                    if let Option_::HostName(ref mut val) = self {
8651                        fidl::decode!(
8652                            fidl::encoding::BoundedString<255>,
8653                            D,
8654                            val,
8655                            decoder,
8656                            _inner_offset,
8657                            depth
8658                        )?;
8659                    } else {
8660                        unreachable!()
8661                    }
8662                }
8663                13 => {
8664                    #[allow(irrefutable_let_patterns)]
8665                    if let Option_::BootFileSize(_) = self {
8666                        // Do nothing, read the value into the object
8667                    } else {
8668                        // Initialize `self` to the right variant
8669                        *self = Option_::BootFileSize(fidl::new_empty!(u16, D));
8670                    }
8671                    #[allow(irrefutable_let_patterns)]
8672                    if let Option_::BootFileSize(ref mut val) = self {
8673                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
8674                    } else {
8675                        unreachable!()
8676                    }
8677                }
8678                14 => {
8679                    #[allow(irrefutable_let_patterns)]
8680                    if let Option_::MeritDumpFile(_) = self {
8681                        // Do nothing, read the value into the object
8682                    } else {
8683                        // Initialize `self` to the right variant
8684                        *self = Option_::MeritDumpFile(fidl::new_empty!(
8685                            fidl::encoding::BoundedString<255>,
8686                            D
8687                        ));
8688                    }
8689                    #[allow(irrefutable_let_patterns)]
8690                    if let Option_::MeritDumpFile(ref mut val) = self {
8691                        fidl::decode!(
8692                            fidl::encoding::BoundedString<255>,
8693                            D,
8694                            val,
8695                            decoder,
8696                            _inner_offset,
8697                            depth
8698                        )?;
8699                    } else {
8700                        unreachable!()
8701                    }
8702                }
8703                15 => {
8704                    #[allow(irrefutable_let_patterns)]
8705                    if let Option_::DomainName(_) = self {
8706                        // Do nothing, read the value into the object
8707                    } else {
8708                        // Initialize `self` to the right variant
8709                        *self = Option_::DomainName(fidl::new_empty!(
8710                            fidl::encoding::BoundedString<255>,
8711                            D
8712                        ));
8713                    }
8714                    #[allow(irrefutable_let_patterns)]
8715                    if let Option_::DomainName(ref mut val) = self {
8716                        fidl::decode!(
8717                            fidl::encoding::BoundedString<255>,
8718                            D,
8719                            val,
8720                            decoder,
8721                            _inner_offset,
8722                            depth
8723                        )?;
8724                    } else {
8725                        unreachable!()
8726                    }
8727                }
8728                16 => {
8729                    #[allow(irrefutable_let_patterns)]
8730                    if let Option_::SwapServer(_) = self {
8731                        // Do nothing, read the value into the object
8732                    } else {
8733                        // Initialize `self` to the right variant
8734                        *self =
8735                            Option_::SwapServer(fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
8736                    }
8737                    #[allow(irrefutable_let_patterns)]
8738                    if let Option_::SwapServer(ref mut val) = self {
8739                        fidl::decode!(
8740                            fidl_fuchsia_net::Ipv4Address,
8741                            D,
8742                            val,
8743                            decoder,
8744                            _inner_offset,
8745                            depth
8746                        )?;
8747                    } else {
8748                        unreachable!()
8749                    }
8750                }
8751                17 => {
8752                    #[allow(irrefutable_let_patterns)]
8753                    if let Option_::RootPath(_) = self {
8754                        // Do nothing, read the value into the object
8755                    } else {
8756                        // Initialize `self` to the right variant
8757                        *self = Option_::RootPath(fidl::new_empty!(
8758                            fidl::encoding::BoundedString<255>,
8759                            D
8760                        ));
8761                    }
8762                    #[allow(irrefutable_let_patterns)]
8763                    if let Option_::RootPath(ref mut val) = self {
8764                        fidl::decode!(
8765                            fidl::encoding::BoundedString<255>,
8766                            D,
8767                            val,
8768                            decoder,
8769                            _inner_offset,
8770                            depth
8771                        )?;
8772                    } else {
8773                        unreachable!()
8774                    }
8775                }
8776                18 => {
8777                    #[allow(irrefutable_let_patterns)]
8778                    if let Option_::ExtensionsPath(_) = self {
8779                        // Do nothing, read the value into the object
8780                    } else {
8781                        // Initialize `self` to the right variant
8782                        *self = Option_::ExtensionsPath(fidl::new_empty!(
8783                            fidl::encoding::BoundedString<255>,
8784                            D
8785                        ));
8786                    }
8787                    #[allow(irrefutable_let_patterns)]
8788                    if let Option_::ExtensionsPath(ref mut val) = self {
8789                        fidl::decode!(
8790                            fidl::encoding::BoundedString<255>,
8791                            D,
8792                            val,
8793                            decoder,
8794                            _inner_offset,
8795                            depth
8796                        )?;
8797                    } else {
8798                        unreachable!()
8799                    }
8800                }
8801                19 => {
8802                    #[allow(irrefutable_let_patterns)]
8803                    if let Option_::IpForwarding(_) = self {
8804                        // Do nothing, read the value into the object
8805                    } else {
8806                        // Initialize `self` to the right variant
8807                        *self = Option_::IpForwarding(fidl::new_empty!(bool, D));
8808                    }
8809                    #[allow(irrefutable_let_patterns)]
8810                    if let Option_::IpForwarding(ref mut val) = self {
8811                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
8812                    } else {
8813                        unreachable!()
8814                    }
8815                }
8816                20 => {
8817                    #[allow(irrefutable_let_patterns)]
8818                    if let Option_::NonLocalSourceRouting(_) = self {
8819                        // Do nothing, read the value into the object
8820                    } else {
8821                        // Initialize `self` to the right variant
8822                        *self = Option_::NonLocalSourceRouting(fidl::new_empty!(bool, D));
8823                    }
8824                    #[allow(irrefutable_let_patterns)]
8825                    if let Option_::NonLocalSourceRouting(ref mut val) = self {
8826                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
8827                    } else {
8828                        unreachable!()
8829                    }
8830                }
8831                21 => {
8832                    #[allow(irrefutable_let_patterns)]
8833                    if let Option_::PolicyFilter(_) = self {
8834                        // Do nothing, read the value into the object
8835                    } else {
8836                        // Initialize `self` to the right variant
8837                        *self = Option_::PolicyFilter(
8838                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
8839                        );
8840                    }
8841                    #[allow(irrefutable_let_patterns)]
8842                    if let Option_::PolicyFilter(ref mut val) = self {
8843                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
8844                    } else {
8845                        unreachable!()
8846                    }
8847                }
8848                22 => {
8849                    #[allow(irrefutable_let_patterns)]
8850                    if let Option_::MaxDatagramReassemblySize(_) = self {
8851                        // Do nothing, read the value into the object
8852                    } else {
8853                        // Initialize `self` to the right variant
8854                        *self = Option_::MaxDatagramReassemblySize(fidl::new_empty!(u16, D));
8855                    }
8856                    #[allow(irrefutable_let_patterns)]
8857                    if let Option_::MaxDatagramReassemblySize(ref mut val) = self {
8858                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
8859                    } else {
8860                        unreachable!()
8861                    }
8862                }
8863                23 => {
8864                    #[allow(irrefutable_let_patterns)]
8865                    if let Option_::DefaultIpTtl(_) = self {
8866                        // Do nothing, read the value into the object
8867                    } else {
8868                        // Initialize `self` to the right variant
8869                        *self = Option_::DefaultIpTtl(fidl::new_empty!(u8, D));
8870                    }
8871                    #[allow(irrefutable_let_patterns)]
8872                    if let Option_::DefaultIpTtl(ref mut val) = self {
8873                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
8874                    } else {
8875                        unreachable!()
8876                    }
8877                }
8878                24 => {
8879                    #[allow(irrefutable_let_patterns)]
8880                    if let Option_::PathMtuAgingTimeout(_) = self {
8881                        // Do nothing, read the value into the object
8882                    } else {
8883                        // Initialize `self` to the right variant
8884                        *self = Option_::PathMtuAgingTimeout(fidl::new_empty!(u32, D));
8885                    }
8886                    #[allow(irrefutable_let_patterns)]
8887                    if let Option_::PathMtuAgingTimeout(ref mut val) = self {
8888                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
8889                    } else {
8890                        unreachable!()
8891                    }
8892                }
8893                25 => {
8894                    #[allow(irrefutable_let_patterns)]
8895                    if let Option_::PathMtuPlateauTable(_) = self {
8896                        // Do nothing, read the value into the object
8897                    } else {
8898                        // Initialize `self` to the right variant
8899                        *self = Option_::PathMtuPlateauTable(
8900                            fidl::new_empty!(fidl::encoding::Vector<u16, 127>, D),
8901                        );
8902                    }
8903                    #[allow(irrefutable_let_patterns)]
8904                    if let Option_::PathMtuPlateauTable(ref mut val) = self {
8905                        fidl::decode!(fidl::encoding::Vector<u16, 127>, D, val, decoder, _inner_offset, depth)?;
8906                    } else {
8907                        unreachable!()
8908                    }
8909                }
8910                26 => {
8911                    #[allow(irrefutable_let_patterns)]
8912                    if let Option_::InterfaceMtu(_) = self {
8913                        // Do nothing, read the value into the object
8914                    } else {
8915                        // Initialize `self` to the right variant
8916                        *self = Option_::InterfaceMtu(fidl::new_empty!(u16, D));
8917                    }
8918                    #[allow(irrefutable_let_patterns)]
8919                    if let Option_::InterfaceMtu(ref mut val) = self {
8920                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
8921                    } else {
8922                        unreachable!()
8923                    }
8924                }
8925                27 => {
8926                    #[allow(irrefutable_let_patterns)]
8927                    if let Option_::AllSubnetsLocal(_) = self {
8928                        // Do nothing, read the value into the object
8929                    } else {
8930                        // Initialize `self` to the right variant
8931                        *self = Option_::AllSubnetsLocal(fidl::new_empty!(bool, D));
8932                    }
8933                    #[allow(irrefutable_let_patterns)]
8934                    if let Option_::AllSubnetsLocal(ref mut val) = self {
8935                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
8936                    } else {
8937                        unreachable!()
8938                    }
8939                }
8940                28 => {
8941                    #[allow(irrefutable_let_patterns)]
8942                    if let Option_::BroadcastAddress(_) = self {
8943                        // Do nothing, read the value into the object
8944                    } else {
8945                        // Initialize `self` to the right variant
8946                        *self = Option_::BroadcastAddress(fidl::new_empty!(
8947                            fidl_fuchsia_net::Ipv4Address,
8948                            D
8949                        ));
8950                    }
8951                    #[allow(irrefutable_let_patterns)]
8952                    if let Option_::BroadcastAddress(ref mut val) = self {
8953                        fidl::decode!(
8954                            fidl_fuchsia_net::Ipv4Address,
8955                            D,
8956                            val,
8957                            decoder,
8958                            _inner_offset,
8959                            depth
8960                        )?;
8961                    } else {
8962                        unreachable!()
8963                    }
8964                }
8965                29 => {
8966                    #[allow(irrefutable_let_patterns)]
8967                    if let Option_::PerformMaskDiscovery(_) = self {
8968                        // Do nothing, read the value into the object
8969                    } else {
8970                        // Initialize `self` to the right variant
8971                        *self = Option_::PerformMaskDiscovery(fidl::new_empty!(bool, D));
8972                    }
8973                    #[allow(irrefutable_let_patterns)]
8974                    if let Option_::PerformMaskDiscovery(ref mut val) = self {
8975                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
8976                    } else {
8977                        unreachable!()
8978                    }
8979                }
8980                30 => {
8981                    #[allow(irrefutable_let_patterns)]
8982                    if let Option_::MaskSupplier(_) = self {
8983                        // Do nothing, read the value into the object
8984                    } else {
8985                        // Initialize `self` to the right variant
8986                        *self = Option_::MaskSupplier(fidl::new_empty!(bool, D));
8987                    }
8988                    #[allow(irrefutable_let_patterns)]
8989                    if let Option_::MaskSupplier(ref mut val) = self {
8990                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
8991                    } else {
8992                        unreachable!()
8993                    }
8994                }
8995                31 => {
8996                    #[allow(irrefutable_let_patterns)]
8997                    if let Option_::PerformRouterDiscovery(_) = self {
8998                        // Do nothing, read the value into the object
8999                    } else {
9000                        // Initialize `self` to the right variant
9001                        *self = Option_::PerformRouterDiscovery(fidl::new_empty!(bool, D));
9002                    }
9003                    #[allow(irrefutable_let_patterns)]
9004                    if let Option_::PerformRouterDiscovery(ref mut val) = self {
9005                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
9006                    } else {
9007                        unreachable!()
9008                    }
9009                }
9010                32 => {
9011                    #[allow(irrefutable_let_patterns)]
9012                    if let Option_::RouterSolicitationAddress(_) = self {
9013                        // Do nothing, read the value into the object
9014                    } else {
9015                        // Initialize `self` to the right variant
9016                        *self = Option_::RouterSolicitationAddress(fidl::new_empty!(
9017                            fidl_fuchsia_net::Ipv4Address,
9018                            D
9019                        ));
9020                    }
9021                    #[allow(irrefutable_let_patterns)]
9022                    if let Option_::RouterSolicitationAddress(ref mut val) = self {
9023                        fidl::decode!(
9024                            fidl_fuchsia_net::Ipv4Address,
9025                            D,
9026                            val,
9027                            decoder,
9028                            _inner_offset,
9029                            depth
9030                        )?;
9031                    } else {
9032                        unreachable!()
9033                    }
9034                }
9035                33 => {
9036                    #[allow(irrefutable_let_patterns)]
9037                    if let Option_::StaticRoute(_) = self {
9038                        // Do nothing, read the value into the object
9039                    } else {
9040                        // Initialize `self` to the right variant
9041                        *self = Option_::StaticRoute(
9042                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9043                        );
9044                    }
9045                    #[allow(irrefutable_let_patterns)]
9046                    if let Option_::StaticRoute(ref mut val) = self {
9047                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9048                    } else {
9049                        unreachable!()
9050                    }
9051                }
9052                34 => {
9053                    #[allow(irrefutable_let_patterns)]
9054                    if let Option_::TrailerEncapsulation(_) = self {
9055                        // Do nothing, read the value into the object
9056                    } else {
9057                        // Initialize `self` to the right variant
9058                        *self = Option_::TrailerEncapsulation(fidl::new_empty!(bool, D));
9059                    }
9060                    #[allow(irrefutable_let_patterns)]
9061                    if let Option_::TrailerEncapsulation(ref mut val) = self {
9062                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
9063                    } else {
9064                        unreachable!()
9065                    }
9066                }
9067                35 => {
9068                    #[allow(irrefutable_let_patterns)]
9069                    if let Option_::ArpCacheTimeout(_) = self {
9070                        // Do nothing, read the value into the object
9071                    } else {
9072                        // Initialize `self` to the right variant
9073                        *self = Option_::ArpCacheTimeout(fidl::new_empty!(u32, D));
9074                    }
9075                    #[allow(irrefutable_let_patterns)]
9076                    if let Option_::ArpCacheTimeout(ref mut val) = self {
9077                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
9078                    } else {
9079                        unreachable!()
9080                    }
9081                }
9082                36 => {
9083                    #[allow(irrefutable_let_patterns)]
9084                    if let Option_::EthernetEncapsulation(_) = self {
9085                        // Do nothing, read the value into the object
9086                    } else {
9087                        // Initialize `self` to the right variant
9088                        *self = Option_::EthernetEncapsulation(fidl::new_empty!(bool, D));
9089                    }
9090                    #[allow(irrefutable_let_patterns)]
9091                    if let Option_::EthernetEncapsulation(ref mut val) = self {
9092                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
9093                    } else {
9094                        unreachable!()
9095                    }
9096                }
9097                37 => {
9098                    #[allow(irrefutable_let_patterns)]
9099                    if let Option_::TcpDefaultTtl(_) = self {
9100                        // Do nothing, read the value into the object
9101                    } else {
9102                        // Initialize `self` to the right variant
9103                        *self = Option_::TcpDefaultTtl(fidl::new_empty!(u8, D));
9104                    }
9105                    #[allow(irrefutable_let_patterns)]
9106                    if let Option_::TcpDefaultTtl(ref mut val) = self {
9107                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
9108                    } else {
9109                        unreachable!()
9110                    }
9111                }
9112                38 => {
9113                    #[allow(irrefutable_let_patterns)]
9114                    if let Option_::TcpKeepaliveInterval(_) = self {
9115                        // Do nothing, read the value into the object
9116                    } else {
9117                        // Initialize `self` to the right variant
9118                        *self = Option_::TcpKeepaliveInterval(fidl::new_empty!(u32, D));
9119                    }
9120                    #[allow(irrefutable_let_patterns)]
9121                    if let Option_::TcpKeepaliveInterval(ref mut val) = self {
9122                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
9123                    } else {
9124                        unreachable!()
9125                    }
9126                }
9127                39 => {
9128                    #[allow(irrefutable_let_patterns)]
9129                    if let Option_::TcpKeepaliveGarbage(_) = self {
9130                        // Do nothing, read the value into the object
9131                    } else {
9132                        // Initialize `self` to the right variant
9133                        *self = Option_::TcpKeepaliveGarbage(fidl::new_empty!(bool, D));
9134                    }
9135                    #[allow(irrefutable_let_patterns)]
9136                    if let Option_::TcpKeepaliveGarbage(ref mut val) = self {
9137                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
9138                    } else {
9139                        unreachable!()
9140                    }
9141                }
9142                40 => {
9143                    #[allow(irrefutable_let_patterns)]
9144                    if let Option_::NetworkInformationServiceDomain(_) = self {
9145                        // Do nothing, read the value into the object
9146                    } else {
9147                        // Initialize `self` to the right variant
9148                        *self = Option_::NetworkInformationServiceDomain(fidl::new_empty!(
9149                            fidl::encoding::BoundedString<255>,
9150                            D
9151                        ));
9152                    }
9153                    #[allow(irrefutable_let_patterns)]
9154                    if let Option_::NetworkInformationServiceDomain(ref mut val) = self {
9155                        fidl::decode!(
9156                            fidl::encoding::BoundedString<255>,
9157                            D,
9158                            val,
9159                            decoder,
9160                            _inner_offset,
9161                            depth
9162                        )?;
9163                    } else {
9164                        unreachable!()
9165                    }
9166                }
9167                41 => {
9168                    #[allow(irrefutable_let_patterns)]
9169                    if let Option_::NetworkInformationServers(_) = self {
9170                        // Do nothing, read the value into the object
9171                    } else {
9172                        // Initialize `self` to the right variant
9173                        *self = Option_::NetworkInformationServers(
9174                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9175                        );
9176                    }
9177                    #[allow(irrefutable_let_patterns)]
9178                    if let Option_::NetworkInformationServers(ref mut val) = self {
9179                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9180                    } else {
9181                        unreachable!()
9182                    }
9183                }
9184                42 => {
9185                    #[allow(irrefutable_let_patterns)]
9186                    if let Option_::NetworkTimeProtocolServers(_) = self {
9187                        // Do nothing, read the value into the object
9188                    } else {
9189                        // Initialize `self` to the right variant
9190                        *self = Option_::NetworkTimeProtocolServers(
9191                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9192                        );
9193                    }
9194                    #[allow(irrefutable_let_patterns)]
9195                    if let Option_::NetworkTimeProtocolServers(ref mut val) = self {
9196                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9197                    } else {
9198                        unreachable!()
9199                    }
9200                }
9201                43 => {
9202                    #[allow(irrefutable_let_patterns)]
9203                    if let Option_::VendorSpecificInformation(_) = self {
9204                        // Do nothing, read the value into the object
9205                    } else {
9206                        // Initialize `self` to the right variant
9207                        *self = Option_::VendorSpecificInformation(
9208                            fidl::new_empty!(fidl::encoding::Vector<u8, 255>, D),
9209                        );
9210                    }
9211                    #[allow(irrefutable_let_patterns)]
9212                    if let Option_::VendorSpecificInformation(ref mut val) = self {
9213                        fidl::decode!(fidl::encoding::Vector<u8, 255>, D, val, decoder, _inner_offset, depth)?;
9214                    } else {
9215                        unreachable!()
9216                    }
9217                }
9218                44 => {
9219                    #[allow(irrefutable_let_patterns)]
9220                    if let Option_::NetbiosOverTcpipNameServer(_) = self {
9221                        // Do nothing, read the value into the object
9222                    } else {
9223                        // Initialize `self` to the right variant
9224                        *self = Option_::NetbiosOverTcpipNameServer(
9225                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9226                        );
9227                    }
9228                    #[allow(irrefutable_let_patterns)]
9229                    if let Option_::NetbiosOverTcpipNameServer(ref mut val) = self {
9230                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9231                    } else {
9232                        unreachable!()
9233                    }
9234                }
9235                45 => {
9236                    #[allow(irrefutable_let_patterns)]
9237                    if let Option_::NetbiosOverTcpipDatagramDistributionServer(_) = self {
9238                        // Do nothing, read the value into the object
9239                    } else {
9240                        // Initialize `self` to the right variant
9241                        *self = Option_::NetbiosOverTcpipDatagramDistributionServer(
9242                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9243                        );
9244                    }
9245                    #[allow(irrefutable_let_patterns)]
9246                    if let Option_::NetbiosOverTcpipDatagramDistributionServer(ref mut val) = self {
9247                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9248                    } else {
9249                        unreachable!()
9250                    }
9251                }
9252                46 => {
9253                    #[allow(irrefutable_let_patterns)]
9254                    if let Option_::NetbiosOverTcpipNodeType(_) = self {
9255                        // Do nothing, read the value into the object
9256                    } else {
9257                        // Initialize `self` to the right variant
9258                        *self = Option_::NetbiosOverTcpipNodeType(fidl::new_empty!(NodeTypes, D));
9259                    }
9260                    #[allow(irrefutable_let_patterns)]
9261                    if let Option_::NetbiosOverTcpipNodeType(ref mut val) = self {
9262                        fidl::decode!(NodeTypes, D, val, decoder, _inner_offset, depth)?;
9263                    } else {
9264                        unreachable!()
9265                    }
9266                }
9267                47 => {
9268                    #[allow(irrefutable_let_patterns)]
9269                    if let Option_::NetbiosOverTcpipScope(_) = self {
9270                        // Do nothing, read the value into the object
9271                    } else {
9272                        // Initialize `self` to the right variant
9273                        *self = Option_::NetbiosOverTcpipScope(fidl::new_empty!(
9274                            fidl::encoding::BoundedString<255>,
9275                            D
9276                        ));
9277                    }
9278                    #[allow(irrefutable_let_patterns)]
9279                    if let Option_::NetbiosOverTcpipScope(ref mut val) = self {
9280                        fidl::decode!(
9281                            fidl::encoding::BoundedString<255>,
9282                            D,
9283                            val,
9284                            decoder,
9285                            _inner_offset,
9286                            depth
9287                        )?;
9288                    } else {
9289                        unreachable!()
9290                    }
9291                }
9292                48 => {
9293                    #[allow(irrefutable_let_patterns)]
9294                    if let Option_::XWindowSystemFontServer(_) = self {
9295                        // Do nothing, read the value into the object
9296                    } else {
9297                        // Initialize `self` to the right variant
9298                        *self = Option_::XWindowSystemFontServer(
9299                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9300                        );
9301                    }
9302                    #[allow(irrefutable_let_patterns)]
9303                    if let Option_::XWindowSystemFontServer(ref mut val) = self {
9304                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9305                    } else {
9306                        unreachable!()
9307                    }
9308                }
9309                49 => {
9310                    #[allow(irrefutable_let_patterns)]
9311                    if let Option_::XWindowSystemDisplayManager(_) = self {
9312                        // Do nothing, read the value into the object
9313                    } else {
9314                        // Initialize `self` to the right variant
9315                        *self = Option_::XWindowSystemDisplayManager(
9316                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9317                        );
9318                    }
9319                    #[allow(irrefutable_let_patterns)]
9320                    if let Option_::XWindowSystemDisplayManager(ref mut val) = self {
9321                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9322                    } else {
9323                        unreachable!()
9324                    }
9325                }
9326                50 => {
9327                    #[allow(irrefutable_let_patterns)]
9328                    if let Option_::NetworkInformationServicePlusDomain(_) = self {
9329                        // Do nothing, read the value into the object
9330                    } else {
9331                        // Initialize `self` to the right variant
9332                        *self = Option_::NetworkInformationServicePlusDomain(fidl::new_empty!(
9333                            fidl::encoding::BoundedString<255>,
9334                            D
9335                        ));
9336                    }
9337                    #[allow(irrefutable_let_patterns)]
9338                    if let Option_::NetworkInformationServicePlusDomain(ref mut val) = self {
9339                        fidl::decode!(
9340                            fidl::encoding::BoundedString<255>,
9341                            D,
9342                            val,
9343                            decoder,
9344                            _inner_offset,
9345                            depth
9346                        )?;
9347                    } else {
9348                        unreachable!()
9349                    }
9350                }
9351                51 => {
9352                    #[allow(irrefutable_let_patterns)]
9353                    if let Option_::NetworkInformationServicePlusServers(_) = self {
9354                        // Do nothing, read the value into the object
9355                    } else {
9356                        // Initialize `self` to the right variant
9357                        *self = Option_::NetworkInformationServicePlusServers(
9358                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9359                        );
9360                    }
9361                    #[allow(irrefutable_let_patterns)]
9362                    if let Option_::NetworkInformationServicePlusServers(ref mut val) = self {
9363                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9364                    } else {
9365                        unreachable!()
9366                    }
9367                }
9368                52 => {
9369                    #[allow(irrefutable_let_patterns)]
9370                    if let Option_::MobileIpHomeAgent(_) = self {
9371                        // Do nothing, read the value into the object
9372                    } else {
9373                        // Initialize `self` to the right variant
9374                        *self = Option_::MobileIpHomeAgent(
9375                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9376                        );
9377                    }
9378                    #[allow(irrefutable_let_patterns)]
9379                    if let Option_::MobileIpHomeAgent(ref mut val) = self {
9380                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9381                    } else {
9382                        unreachable!()
9383                    }
9384                }
9385                53 => {
9386                    #[allow(irrefutable_let_patterns)]
9387                    if let Option_::SmtpServer(_) = self {
9388                        // Do nothing, read the value into the object
9389                    } else {
9390                        // Initialize `self` to the right variant
9391                        *self = Option_::SmtpServer(
9392                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9393                        );
9394                    }
9395                    #[allow(irrefutable_let_patterns)]
9396                    if let Option_::SmtpServer(ref mut val) = self {
9397                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9398                    } else {
9399                        unreachable!()
9400                    }
9401                }
9402                54 => {
9403                    #[allow(irrefutable_let_patterns)]
9404                    if let Option_::Pop3Server(_) = self {
9405                        // Do nothing, read the value into the object
9406                    } else {
9407                        // Initialize `self` to the right variant
9408                        *self = Option_::Pop3Server(
9409                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9410                        );
9411                    }
9412                    #[allow(irrefutable_let_patterns)]
9413                    if let Option_::Pop3Server(ref mut val) = self {
9414                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9415                    } else {
9416                        unreachable!()
9417                    }
9418                }
9419                55 => {
9420                    #[allow(irrefutable_let_patterns)]
9421                    if let Option_::NntpServer(_) = self {
9422                        // Do nothing, read the value into the object
9423                    } else {
9424                        // Initialize `self` to the right variant
9425                        *self = Option_::NntpServer(
9426                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9427                        );
9428                    }
9429                    #[allow(irrefutable_let_patterns)]
9430                    if let Option_::NntpServer(ref mut val) = self {
9431                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9432                    } else {
9433                        unreachable!()
9434                    }
9435                }
9436                56 => {
9437                    #[allow(irrefutable_let_patterns)]
9438                    if let Option_::DefaultWwwServer(_) = self {
9439                        // Do nothing, read the value into the object
9440                    } else {
9441                        // Initialize `self` to the right variant
9442                        *self = Option_::DefaultWwwServer(
9443                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9444                        );
9445                    }
9446                    #[allow(irrefutable_let_patterns)]
9447                    if let Option_::DefaultWwwServer(ref mut val) = self {
9448                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9449                    } else {
9450                        unreachable!()
9451                    }
9452                }
9453                57 => {
9454                    #[allow(irrefutable_let_patterns)]
9455                    if let Option_::DefaultFingerServer(_) = self {
9456                        // Do nothing, read the value into the object
9457                    } else {
9458                        // Initialize `self` to the right variant
9459                        *self = Option_::DefaultFingerServer(
9460                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9461                        );
9462                    }
9463                    #[allow(irrefutable_let_patterns)]
9464                    if let Option_::DefaultFingerServer(ref mut val) = self {
9465                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9466                    } else {
9467                        unreachable!()
9468                    }
9469                }
9470                58 => {
9471                    #[allow(irrefutable_let_patterns)]
9472                    if let Option_::DefaultIrcServer(_) = self {
9473                        // Do nothing, read the value into the object
9474                    } else {
9475                        // Initialize `self` to the right variant
9476                        *self = Option_::DefaultIrcServer(
9477                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9478                        );
9479                    }
9480                    #[allow(irrefutable_let_patterns)]
9481                    if let Option_::DefaultIrcServer(ref mut val) = self {
9482                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9483                    } else {
9484                        unreachable!()
9485                    }
9486                }
9487                59 => {
9488                    #[allow(irrefutable_let_patterns)]
9489                    if let Option_::StreettalkServer(_) = self {
9490                        // Do nothing, read the value into the object
9491                    } else {
9492                        // Initialize `self` to the right variant
9493                        *self = Option_::StreettalkServer(
9494                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9495                        );
9496                    }
9497                    #[allow(irrefutable_let_patterns)]
9498                    if let Option_::StreettalkServer(ref mut val) = self {
9499                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9500                    } else {
9501                        unreachable!()
9502                    }
9503                }
9504                60 => {
9505                    #[allow(irrefutable_let_patterns)]
9506                    if let Option_::StreettalkDirectoryAssistanceServer(_) = self {
9507                        // Do nothing, read the value into the object
9508                    } else {
9509                        // Initialize `self` to the right variant
9510                        *self = Option_::StreettalkDirectoryAssistanceServer(
9511                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
9512                        );
9513                    }
9514                    #[allow(irrefutable_let_patterns)]
9515                    if let Option_::StreettalkDirectoryAssistanceServer(ref mut val) = self {
9516                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
9517                    } else {
9518                        unreachable!()
9519                    }
9520                }
9521                61 => {
9522                    #[allow(irrefutable_let_patterns)]
9523                    if let Option_::OptionOverload(_) = self {
9524                        // Do nothing, read the value into the object
9525                    } else {
9526                        // Initialize `self` to the right variant
9527                        *self = Option_::OptionOverload(fidl::new_empty!(OptionOverloadValue, D));
9528                    }
9529                    #[allow(irrefutable_let_patterns)]
9530                    if let Option_::OptionOverload(ref mut val) = self {
9531                        fidl::decode!(OptionOverloadValue, D, val, decoder, _inner_offset, depth)?;
9532                    } else {
9533                        unreachable!()
9534                    }
9535                }
9536                62 => {
9537                    #[allow(irrefutable_let_patterns)]
9538                    if let Option_::TftpServerName(_) = self {
9539                        // Do nothing, read the value into the object
9540                    } else {
9541                        // Initialize `self` to the right variant
9542                        *self = Option_::TftpServerName(fidl::new_empty!(
9543                            fidl::encoding::BoundedString<255>,
9544                            D
9545                        ));
9546                    }
9547                    #[allow(irrefutable_let_patterns)]
9548                    if let Option_::TftpServerName(ref mut val) = self {
9549                        fidl::decode!(
9550                            fidl::encoding::BoundedString<255>,
9551                            D,
9552                            val,
9553                            decoder,
9554                            _inner_offset,
9555                            depth
9556                        )?;
9557                    } else {
9558                        unreachable!()
9559                    }
9560                }
9561                63 => {
9562                    #[allow(irrefutable_let_patterns)]
9563                    if let Option_::BootfileName(_) = self {
9564                        // Do nothing, read the value into the object
9565                    } else {
9566                        // Initialize `self` to the right variant
9567                        *self = Option_::BootfileName(fidl::new_empty!(
9568                            fidl::encoding::BoundedString<255>,
9569                            D
9570                        ));
9571                    }
9572                    #[allow(irrefutable_let_patterns)]
9573                    if let Option_::BootfileName(ref mut val) = self {
9574                        fidl::decode!(
9575                            fidl::encoding::BoundedString<255>,
9576                            D,
9577                            val,
9578                            decoder,
9579                            _inner_offset,
9580                            depth
9581                        )?;
9582                    } else {
9583                        unreachable!()
9584                    }
9585                }
9586                64 => {
9587                    #[allow(irrefutable_let_patterns)]
9588                    if let Option_::MaxDhcpMessageSize(_) = self {
9589                        // Do nothing, read the value into the object
9590                    } else {
9591                        // Initialize `self` to the right variant
9592                        *self = Option_::MaxDhcpMessageSize(fidl::new_empty!(u16, D));
9593                    }
9594                    #[allow(irrefutable_let_patterns)]
9595                    if let Option_::MaxDhcpMessageSize(ref mut val) = self {
9596                        fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
9597                    } else {
9598                        unreachable!()
9599                    }
9600                }
9601                65 => {
9602                    #[allow(irrefutable_let_patterns)]
9603                    if let Option_::RenewalTimeValue(_) = self {
9604                        // Do nothing, read the value into the object
9605                    } else {
9606                        // Initialize `self` to the right variant
9607                        *self = Option_::RenewalTimeValue(fidl::new_empty!(u32, D));
9608                    }
9609                    #[allow(irrefutable_let_patterns)]
9610                    if let Option_::RenewalTimeValue(ref mut val) = self {
9611                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
9612                    } else {
9613                        unreachable!()
9614                    }
9615                }
9616                66 => {
9617                    #[allow(irrefutable_let_patterns)]
9618                    if let Option_::RebindingTimeValue(_) = self {
9619                        // Do nothing, read the value into the object
9620                    } else {
9621                        // Initialize `self` to the right variant
9622                        *self = Option_::RebindingTimeValue(fidl::new_empty!(u32, D));
9623                    }
9624                    #[allow(irrefutable_let_patterns)]
9625                    if let Option_::RebindingTimeValue(ref mut val) = self {
9626                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
9627                    } else {
9628                        unreachable!()
9629                    }
9630                }
9631                #[allow(deprecated)]
9632                ordinal => {
9633                    for _ in 0..num_handles {
9634                        decoder.drop_next_handle()?;
9635                    }
9636                    *self = Option_::__SourceBreaking { unknown_ordinal: ordinal };
9637                }
9638            }
9639            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
9640                return Err(fidl::Error::InvalidNumBytesInEnvelope);
9641            }
9642            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9643                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9644            }
9645            Ok(())
9646        }
9647    }
9648
9649    impl fidl::encoding::ValueTypeMarker for Parameter {
9650        type Borrowed<'a> = &'a Self;
9651        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9652            value
9653        }
9654    }
9655
9656    unsafe impl fidl::encoding::TypeMarker for Parameter {
9657        type Owned = Self;
9658
9659        #[inline(always)]
9660        fn inline_align(_context: fidl::encoding::Context) -> usize {
9661            8
9662        }
9663
9664        #[inline(always)]
9665        fn inline_size(_context: fidl::encoding::Context) -> usize {
9666            16
9667        }
9668    }
9669
9670    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Parameter, D>
9671        for &Parameter
9672    {
9673        #[inline]
9674        unsafe fn encode(
9675            self,
9676            encoder: &mut fidl::encoding::Encoder<'_, D>,
9677            offset: usize,
9678            _depth: fidl::encoding::Depth,
9679        ) -> fidl::Result<()> {
9680            encoder.debug_check_bounds::<Parameter>(offset);
9681            encoder.write_num::<u64>(self.ordinal(), offset);
9682            match self {
9683            Parameter::IpAddrs(ref val) => {
9684                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256>, D>(
9685                    <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
9686                    encoder, offset + 8, _depth
9687                )
9688            }
9689            Parameter::AddressPool(ref val) => {
9690                fidl::encoding::encode_in_envelope::<AddressPool, D>(
9691                    <AddressPool as fidl::encoding::ValueTypeMarker>::borrow(val),
9692                    encoder, offset + 8, _depth
9693                )
9694            }
9695            Parameter::Lease(ref val) => {
9696                fidl::encoding::encode_in_envelope::<LeaseLength, D>(
9697                    <LeaseLength as fidl::encoding::ValueTypeMarker>::borrow(val),
9698                    encoder, offset + 8, _depth
9699                )
9700            }
9701            Parameter::PermittedMacs(ref val) => {
9702                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256>, D>(
9703                    <fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
9704                    encoder, offset + 8, _depth
9705                )
9706            }
9707            Parameter::StaticallyAssignedAddrs(ref val) => {
9708                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<StaticAssignment, 256>, D>(
9709                    <fidl::encoding::Vector<StaticAssignment, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
9710                    encoder, offset + 8, _depth
9711                )
9712            }
9713            Parameter::ArpProbe(ref val) => {
9714                fidl::encoding::encode_in_envelope::<bool, D>(
9715                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
9716                    encoder, offset + 8, _depth
9717                )
9718            }
9719            Parameter::BoundDeviceNames(ref val) => {
9720                fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>, D>(
9721                    <fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
9722                    encoder, offset + 8, _depth
9723                )
9724            }
9725            Parameter::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
9726        }
9727        }
9728    }
9729
9730    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Parameter {
9731        #[inline(always)]
9732        fn new_empty() -> Self {
9733            Self::__SourceBreaking { unknown_ordinal: 0 }
9734        }
9735
9736        #[inline]
9737        unsafe fn decode(
9738            &mut self,
9739            decoder: &mut fidl::encoding::Decoder<'_, D>,
9740            offset: usize,
9741            mut depth: fidl::encoding::Depth,
9742        ) -> fidl::Result<()> {
9743            decoder.debug_check_bounds::<Self>(offset);
9744            #[allow(unused_variables)]
9745            let next_out_of_line = decoder.next_out_of_line();
9746            let handles_before = decoder.remaining_handles();
9747            let (ordinal, inlined, num_bytes, num_handles) =
9748                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
9749
9750            let member_inline_size = match ordinal {
9751            1 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9752            2 => <AddressPool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9753            3 => <LeaseLength as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9754            4 => <fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9755            5 => <fidl::encoding::Vector<StaticAssignment, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9756            6 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9757            7 => <fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
9758            0 => return Err(fidl::Error::UnknownUnionTag),
9759            _ => num_bytes as usize,
9760        };
9761
9762            if inlined != (member_inline_size <= 4) {
9763                return Err(fidl::Error::InvalidInlineBitInEnvelope);
9764            }
9765            let _inner_offset;
9766            if inlined {
9767                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
9768                _inner_offset = offset + 8;
9769            } else {
9770                depth.increment()?;
9771                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9772            }
9773            match ordinal {
9774                1 => {
9775                    #[allow(irrefutable_let_patterns)]
9776                    if let Parameter::IpAddrs(_) = self {
9777                        // Do nothing, read the value into the object
9778                    } else {
9779                        // Initialize `self` to the right variant
9780                        *self = Parameter::IpAddrs(
9781                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256>, D),
9782                        );
9783                    }
9784                    #[allow(irrefutable_let_patterns)]
9785                    if let Parameter::IpAddrs(ref mut val) = self {
9786                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256>, D, val, decoder, _inner_offset, depth)?;
9787                    } else {
9788                        unreachable!()
9789                    }
9790                }
9791                2 => {
9792                    #[allow(irrefutable_let_patterns)]
9793                    if let Parameter::AddressPool(_) = self {
9794                        // Do nothing, read the value into the object
9795                    } else {
9796                        // Initialize `self` to the right variant
9797                        *self = Parameter::AddressPool(fidl::new_empty!(AddressPool, D));
9798                    }
9799                    #[allow(irrefutable_let_patterns)]
9800                    if let Parameter::AddressPool(ref mut val) = self {
9801                        fidl::decode!(AddressPool, D, val, decoder, _inner_offset, depth)?;
9802                    } else {
9803                        unreachable!()
9804                    }
9805                }
9806                3 => {
9807                    #[allow(irrefutable_let_patterns)]
9808                    if let Parameter::Lease(_) = self {
9809                        // Do nothing, read the value into the object
9810                    } else {
9811                        // Initialize `self` to the right variant
9812                        *self = Parameter::Lease(fidl::new_empty!(LeaseLength, D));
9813                    }
9814                    #[allow(irrefutable_let_patterns)]
9815                    if let Parameter::Lease(ref mut val) = self {
9816                        fidl::decode!(LeaseLength, D, val, decoder, _inner_offset, depth)?;
9817                    } else {
9818                        unreachable!()
9819                    }
9820                }
9821                4 => {
9822                    #[allow(irrefutable_let_patterns)]
9823                    if let Parameter::PermittedMacs(_) = self {
9824                        // Do nothing, read the value into the object
9825                    } else {
9826                        // Initialize `self` to the right variant
9827                        *self = Parameter::PermittedMacs(
9828                            fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256>, D),
9829                        );
9830                    }
9831                    #[allow(irrefutable_let_patterns)]
9832                    if let Parameter::PermittedMacs(ref mut val) = self {
9833                        fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256>, D, val, decoder, _inner_offset, depth)?;
9834                    } else {
9835                        unreachable!()
9836                    }
9837                }
9838                5 => {
9839                    #[allow(irrefutable_let_patterns)]
9840                    if let Parameter::StaticallyAssignedAddrs(_) = self {
9841                        // Do nothing, read the value into the object
9842                    } else {
9843                        // Initialize `self` to the right variant
9844                        *self = Parameter::StaticallyAssignedAddrs(
9845                            fidl::new_empty!(fidl::encoding::Vector<StaticAssignment, 256>, D),
9846                        );
9847                    }
9848                    #[allow(irrefutable_let_patterns)]
9849                    if let Parameter::StaticallyAssignedAddrs(ref mut val) = self {
9850                        fidl::decode!(fidl::encoding::Vector<StaticAssignment, 256>, D, val, decoder, _inner_offset, depth)?;
9851                    } else {
9852                        unreachable!()
9853                    }
9854                }
9855                6 => {
9856                    #[allow(irrefutable_let_patterns)]
9857                    if let Parameter::ArpProbe(_) = self {
9858                        // Do nothing, read the value into the object
9859                    } else {
9860                        // Initialize `self` to the right variant
9861                        *self = Parameter::ArpProbe(fidl::new_empty!(bool, D));
9862                    }
9863                    #[allow(irrefutable_let_patterns)]
9864                    if let Parameter::ArpProbe(ref mut val) = self {
9865                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
9866                    } else {
9867                        unreachable!()
9868                    }
9869                }
9870                7 => {
9871                    #[allow(irrefutable_let_patterns)]
9872                    if let Parameter::BoundDeviceNames(_) = self {
9873                        // Do nothing, read the value into the object
9874                    } else {
9875                        // Initialize `self` to the right variant
9876                        *self = Parameter::BoundDeviceNames(fidl::new_empty!(
9877                            fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>,
9878                            D
9879                        ));
9880                    }
9881                    #[allow(irrefutable_let_patterns)]
9882                    if let Parameter::BoundDeviceNames(ref mut val) = self {
9883                        fidl::decode!(
9884                            fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>,
9885                            D,
9886                            val,
9887                            decoder,
9888                            _inner_offset,
9889                            depth
9890                        )?;
9891                    } else {
9892                        unreachable!()
9893                    }
9894                }
9895                #[allow(deprecated)]
9896                ordinal => {
9897                    for _ in 0..num_handles {
9898                        decoder.drop_next_handle()?;
9899                    }
9900                    *self = Parameter::__SourceBreaking { unknown_ordinal: ordinal };
9901                }
9902            }
9903            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
9904                return Err(fidl::Error::InvalidNumBytesInEnvelope);
9905            }
9906            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9907                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9908            }
9909            Ok(())
9910        }
9911    }
9912}