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

use strict;

package Raritan::RPC::smartlock::DoorAccessControl_1_2_3::DoorAccessRuleDeletedEvent;

use constant typeId => "smartlock.DoorAccessControl_1_2_3.DoorAccessRuleDeletedEvent:1.0.0";
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::smartlock::DoorAccessControl_1_2_3::DoorAccessRule;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'ruleId'} = 1 * $in->{'ruleId'};
    $encoded->{'rule'} = Raritan::RPC::smartlock::DoorAccessControl_1_2_3::DoorAccessRule::encode($in->{'rule'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'ruleId'} = $in->{'ruleId'};
    $decoded->{'rule'} = Raritan::RPC::smartlock::DoorAccessControl_1_2_3::DoorAccessRule::decode($agent, $in->{'rule'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('smartlock.DoorAccessControl_1_2_3.DoorAccessRuleDeletedEvent', 1, 0, 0, 'Raritan::RPC::smartlock::DoorAccessControl_1_2_3::DoorAccessRuleDeletedEvent');
1;
