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

use strict;

package Raritan::RPC::webcam::StorageManager_1_0_1::StorageImage;

use Raritan::RPC::webcam::StorageManager_1_0_1::StorageMetaData;
use Raritan::RPC::webcam::Image_2_0_0;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'image'} = Raritan::RPC::webcam::Image_2_0_0::encode($in->{'image'});
    $encoded->{'metaData'} = Raritan::RPC::webcam::StorageManager_1_0_1::StorageMetaData::encode($in->{'metaData'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'image'} = Raritan::RPC::webcam::Image_2_0_0::decode($agent, $in->{'image'});
    $decoded->{'metaData'} = Raritan::RPC::webcam::StorageManager_1_0_1::StorageMetaData::decode($agent, $in->{'metaData'});
    return $decoded;
}

1;
