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

use strict;

package Raritan::RPC::sensors::Logger_3_0_0::InfoChangedEvent;

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

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'oldInfo'} = Raritan::RPC::sensors::Logger_3_0_0::Info::encode($in->{'oldInfo'});
    $encoded->{'newInfo'} = Raritan::RPC::sensors::Logger_3_0_0::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_0_0::Info::decode($agent, $in->{'oldInfo'});
    $decoded->{'newInfo'} = Raritan::RPC::sensors::Logger_3_0_0::Info::decode($agent, $in->{'newInfo'});
    return $decoded;
}

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