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

use strict;

package Raritan::RPC::smartlock::DoorAccessControl_1_2_3::DoorAccessDeniedEvent;

use constant typeId => "smartlock.DoorAccessControl_1_2_3.DoorAccessDeniedEvent:1.0.0";
use Raritan::RPC::idl::Event;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'reason'} = 1 * $in->{'reason'};
    $encoded->{'ruleId'} = 1 * $in->{'ruleId'};
    $encoded->{'ruleName'} = "$in->{'ruleName'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'reason'} = $in->{'reason'};
    $decoded->{'ruleId'} = $in->{'ruleId'};
    $decoded->{'ruleName'} = $in->{'ruleName'};
    return $decoded;
}

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