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

use strict;

package Raritan::RPC::serial::GsmModem_1_0_1::Information;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'imei'} = "$in->{'imei'}";
    $encoded->{'imsi'} = "$in->{'imsi'}";
    $encoded->{'manufacturer'} = "$in->{'manufacturer'}";
    $encoded->{'model'} = "$in->{'model'}";
    $encoded->{'revision'} = "$in->{'revision'}";
    $encoded->{'ownNumber'} = "$in->{'ownNumber'}";
    $encoded->{'simSmsc'} = "$in->{'simSmsc'}";
    $encoded->{'networkName'} = "$in->{'networkName'}";
    $encoded->{'serviceProviderName'} = "$in->{'serviceProviderName'}";
    $encoded->{'receptionLevel'} = 1 * $in->{'receptionLevel'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'imei'} = $in->{'imei'};
    $decoded->{'imsi'} = $in->{'imsi'};
    $decoded->{'manufacturer'} = $in->{'manufacturer'};
    $decoded->{'model'} = $in->{'model'};
    $decoded->{'revision'} = $in->{'revision'};
    $decoded->{'ownNumber'} = $in->{'ownNumber'};
    $decoded->{'simSmsc'} = $in->{'simSmsc'};
    $decoded->{'networkName'} = $in->{'networkName'};
    $decoded->{'serviceProviderName'} = $in->{'serviceProviderName'};
    $decoded->{'receptionLevel'} = $in->{'receptionLevel'};
    return $decoded;
}

1;
