# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2026 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from Net.idl.

use strict;

package Raritan::RPC::net::InterfaceState_2_0_0;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'mode'} = 1 * $in->{'mode'};
    $encoded->{'activeMode'} = 1 * $in->{'activeMode'};
    $encoded->{'wirelessSupported'} = ($in->{'wirelessSupported'}) ? JSON::true : JSON::false;
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'mode'} = $in->{'mode'};
    $decoded->{'activeMode'} = $in->{'activeMode'};
    $decoded->{'wirelessSupported'} = ($in->{'wirelessSupported'}) ? 1 : 0;
    return $decoded;
}

1;
