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

use strict;

package Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholdsChangedEvent;

use constant typeId => "pdumodel.VoltageMonitoringSensor_1_0_1.DipSwellThresholdsChangedEvent:1.0.0";
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholds;
use Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholds;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'oldThresholds'} = Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholds::encode($in->{'oldThresholds'});
    $encoded->{'newThresholds'} = Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholds::encode($in->{'newThresholds'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'oldThresholds'} = Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholds::decode($agent, $in->{'oldThresholds'});
    $decoded->{'newThresholds'} = Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholds::decode($agent, $in->{'newThresholds'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('pdumodel.VoltageMonitoringSensor_1_0_1.DipSwellThresholdsChangedEvent', 1, 0, 0, 'Raritan::RPC::pdumodel::VoltageMonitoringSensor_1_0_1::DipSwellThresholdsChangedEvent');
1;
