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

use strict;

package Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettingsChangedEvent;

use constant typeId => "assetmgrmodel.AssetStripConfig_1_0_1.RackUnitSettingsChangedEvent:1.0.0";
use Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings;
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'rackUnitNumber'} = 1 * $in->{'rackUnitNumber'};
    $encoded->{'oldSettings'} = Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings::encode($in->{'oldSettings'});
    $encoded->{'newSettings'} = Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings::encode($in->{'newSettings'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'rackUnitNumber'} = $in->{'rackUnitNumber'};
    $decoded->{'oldSettings'} = Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings::decode($agent, $in->{'oldSettings'});
    $decoded->{'newSettings'} = Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings::decode($agent, $in->{'newSettings'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('assetmgrmodel.AssetStripConfig_1_0_1.RackUnitSettingsChangedEvent', 1, 0, 0, 'Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettingsChangedEvent');
1;
