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

use strict;

package Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettingsChangedEvent;

use constant typeId => "smartcard.CardReaderManager_1_0_4.CardReaderSettingsChangedEvent:1.0.0";
use Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettings;
use Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettings;
use Raritan::RPC::event::UserEvent;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'oldSettings'} = Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettings::encode($in->{'oldSettings'});
    $encoded->{'newSettings'} = Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettings::encode($in->{'newSettings'});
    $encoded->{'position'} = "$in->{'position'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'oldSettings'} = Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettings::decode($agent, $in->{'oldSettings'});
    $decoded->{'newSettings'} = Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettings::decode($agent, $in->{'newSettings'});
    $decoded->{'position'} = $in->{'position'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('smartcard.CardReaderManager_1_0_4.CardReaderSettingsChangedEvent', 1, 0, 0, 'Raritan::RPC::smartcard::CardReaderManager_1_0_4::CardReaderSettingsChangedEvent');
1;
