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

use strict;

package Raritan::RPC::datapush::AssetLogPushMessage;

use Raritan::RPC::assetmgrmodel::AssetStripLogger_1_0_6::Record;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'records'} = [];
    for (my $i0 = 0; $i0 <= $#{$in->{'records'}}; $i0++) {
        $encoded->{'records'}->[$i0] = Raritan::RPC::assetmgrmodel::AssetStripLogger_1_0_6::Record::encode($in->{'records'}->[$i0]);
    }
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'records'} = [];
    for (my $i0 = 0; $i0 <= $#{$in->{'records'}}; $i0++) {
        $decoded->{'records'}->[$i0] = Raritan::RPC::assetmgrmodel::AssetStripLogger_1_0_6::Record::decode($agent, $in->{'records'}->[$i0]);
    }
    return $decoded;
}

1;
