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

use strict;

package Raritan::RPC::smartcard::CardReader_1_0_3::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;
