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

use strict;

package Raritan::RPC::pdumodel::OutletGroup_1_0_2::SensorsChangedEvent;

use constant typeId => "pdumodel.OutletGroup_1_0_2.SensorsChangedEvent:1.0.0";
use Raritan::RPC::idl::Event;
use Raritan::RPC::pdumodel::OutletGroup_1_0_2::Sensors;
use Raritan::RPC::pdumodel::OutletGroup_1_0_2::Sensors;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'oldSensors'} = Raritan::RPC::pdumodel::OutletGroup_1_0_2::Sensors::encode($in->{'oldSensors'});
    $encoded->{'newSensors'} = Raritan::RPC::pdumodel::OutletGroup_1_0_2::Sensors::encode($in->{'newSensors'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'oldSensors'} = Raritan::RPC::pdumodel::OutletGroup_1_0_2::Sensors::decode($agent, $in->{'oldSensors'});
    $decoded->{'newSensors'} = Raritan::RPC::pdumodel::OutletGroup_1_0_2::Sensors::decode($agent, $in->{'newSensors'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('pdumodel.OutletGroup_1_0_2.SensorsChangedEvent', 1, 0, 0, 'Raritan::RPC::pdumodel::OutletGroup_1_0_2::SensorsChangedEvent');
1;
