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

use strict;

package Raritan::RPC::sensors::NumericSensor_4_0_6::DefaultThresholdsChangedEvent;

use constant typeId => "sensors.NumericSensor_4_0_6.DefaultThresholdsChangedEvent:1.0.0";
use Raritan::RPC::sensors::NumericSensor_4_0_6::Thresholds;
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::sensors::NumericSensor_4_0_6::Thresholds;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'oldDefaultThresholds'} = Raritan::RPC::sensors::NumericSensor_4_0_6::Thresholds::encode($in->{'oldDefaultThresholds'});
    $encoded->{'newDefaultThresholds'} = Raritan::RPC::sensors::NumericSensor_4_0_6::Thresholds::encode($in->{'newDefaultThresholds'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'oldDefaultThresholds'} = Raritan::RPC::sensors::NumericSensor_4_0_6::Thresholds::decode($agent, $in->{'oldDefaultThresholds'});
    $decoded->{'newDefaultThresholds'} = Raritan::RPC::sensors::NumericSensor_4_0_6::Thresholds::decode($agent, $in->{'newDefaultThresholds'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('sensors.NumericSensor_4_0_6.DefaultThresholdsChangedEvent', 1, 0, 0, 'Raritan::RPC::sensors::NumericSensor_4_0_6::DefaultThresholdsChangedEvent');
1;
