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

use strict;

package Raritan::RPC::net::LinkStateChangedEvent;

use constant typeId => "net.LinkStateChangedEvent:1.0.0";
use Raritan::RPC::idl::Event;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'ifName'} = "$in->{'ifName'}";
    $encoded->{'ifLabel'} = "$in->{'ifLabel'}";
    $encoded->{'ifType'} = 1 * $in->{'ifType'};
    $encoded->{'ifState'} = 1 * $in->{'ifState'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'ifName'} = $in->{'ifName'};
    $decoded->{'ifLabel'} = $in->{'ifLabel'};
    $decoded->{'ifType'} = $in->{'ifType'};
    $decoded->{'ifState'} = $in->{'ifState'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('net.LinkStateChangedEvent', 1, 0, 0, 'Raritan::RPC::net::LinkStateChangedEvent');
1;
