# 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::AssetStrip;

use Raritan::RPC::assetmgrmodel::AssetStrip_2_0_5::DeviceInfo;
use Raritan::RPC::assetmgrmodel::AssetStrip_2_0_5::StripInfo;
use Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::StripSettings;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'stripInfo'} = Raritan::RPC::assetmgrmodel::AssetStrip_2_0_5::StripInfo::encode($in->{'stripInfo'});
    $encoded->{'deviceInfo'} = Raritan::RPC::assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::encode($in->{'deviceInfo'});
    $encoded->{'settings'} = Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::StripSettings::encode($in->{'settings'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'stripInfo'} = Raritan::RPC::assetmgrmodel::AssetStrip_2_0_5::StripInfo::decode($agent, $in->{'stripInfo'});
    $decoded->{'deviceInfo'} = Raritan::RPC::assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::decode($agent, $in->{'deviceInfo'});
    $decoded->{'settings'} = Raritan::RPC::assetmgrmodel::AssetStripConfig_1_0_1::StripSettings::decode($agent, $in->{'settings'});
    return $decoded;
}

1;
