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

use strict;

package Raritan::RPC::lhxmodel::Config_1_0_1::ComSettingsChangedEvent;

use constant typeId => "lhxmodel.Config_1_0_1.ComSettingsChangedEvent:1.0.0";
use Raritan::RPC::lhxmodel::Config_1_0_1::ComSettings;
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::lhxmodel::Config_1_0_1::ComSettings;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'oldSettings'} = Raritan::RPC::lhxmodel::Config_1_0_1::ComSettings::encode($in->{'oldSettings'});
    $encoded->{'newSettings'} = Raritan::RPC::lhxmodel::Config_1_0_1::ComSettings::encode($in->{'newSettings'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'oldSettings'} = Raritan::RPC::lhxmodel::Config_1_0_1::ComSettings::decode($agent, $in->{'oldSettings'});
    $decoded->{'newSettings'} = Raritan::RPC::lhxmodel::Config_1_0_1::ComSettings::decode($agent, $in->{'newSettings'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('lhxmodel.Config_1_0_1.ComSettingsChangedEvent', 1, 0, 0, 'Raritan::RPC::lhxmodel::Config_1_0_1::ComSettingsChangedEvent');
1;
