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

use strict;

package Raritan::RPC::smartlock::Keypad::MetaData;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'id'} = "$in->{'id'}";
    $encoded->{'manufacturer'} = "$in->{'manufacturer'}";
    $encoded->{'product'} = "$in->{'product'}";
    $encoded->{'serialNumber'} = "$in->{'serialNumber'}";
    $encoded->{'channel'} = 1 * $in->{'channel'};
    $encoded->{'position'} = "$in->{'position'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'id'} = $in->{'id'};
    $decoded->{'manufacturer'} = $in->{'manufacturer'};
    $decoded->{'product'} = $in->{'product'};
    $decoded->{'serialNumber'} = $in->{'serialNumber'};
    $decoded->{'channel'} = $in->{'channel'};
    $decoded->{'position'} = $in->{'position'};
    return $decoded;
}

1;
