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

use strict;

package Raritan::RPC::sensors::Logger_3_1_4::InfoChangedEvent;

use constant typeId => "sensors.Logger_3_1_4.InfoChangedEvent:1.0.0";
use Raritan::RPC::sensors::Logger_3_1_4::Info;
use Raritan::RPC::idl::Event;
use Raritan::RPC::sensors::Logger_3_1_4::Info;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'oldInfo'} = Raritan::RPC::sensors::Logger_3_1_4::Info::encode($in->{'oldInfo'});
    $encoded->{'newInfo'} = Raritan::RPC::sensors::Logger_3_1_4::Info::encode($in->{'newInfo'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'oldInfo'} = Raritan::RPC::sensors::Logger_3_1_4::Info::decode($agent, $in->{'oldInfo'});
    $decoded->{'newInfo'} = Raritan::RPC::sensors::Logger_3_1_4::Info::decode($agent, $in->{'newInfo'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('sensors.Logger_3_1_4.InfoChangedEvent', 1, 0, 0, 'Raritan::RPC::sensors::Logger_3_1_4::InfoChangedEvent');
1;
