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

use strict;

package Raritan::RPC::smartcard::CardReader_1_0_2::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'};
    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'};
    return $decoded;
}

1;
