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

use strict;

package Raritan::RPC::smartlock::KeypadManager_1_0_1::KeypadEvent;

use constant typeId => "smartlock.KeypadManager_1_0_1.KeypadEvent:1.0.0";
use Raritan::RPC::idl::Event;
use Raritan::RPC::smartlock::Keypad::MetaData;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'keypad'} = Raritan::RPC::ObjectCodec::encode($in->{'keypad'});
    $encoded->{'metaData'} = Raritan::RPC::smartlock::Keypad::MetaData::encode($in->{'metaData'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'keypad'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'keypad'}, 'smartlock.Keypad');
    $decoded->{'metaData'} = Raritan::RPC::smartlock::Keypad::MetaData::decode($agent, $in->{'metaData'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('smartlock.KeypadManager_1_0_1.KeypadEvent', 1, 0, 0, 'Raritan::RPC::smartlock::KeypadManager_1_0_1::KeypadEvent');
1;
