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

use strict;

package Raritan::RPC::webcam::StorageManager_1_0_3::WebcamStorageInfo;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'webcam'} = Raritan::RPC::ObjectCodec::encode($in->{'webcam'});
    $encoded->{'newestIndex'} = 1 * $in->{'newestIndex'};
    $encoded->{'oldestIndex'} = 1 * $in->{'oldestIndex'};
    $encoded->{'count'} = 1 * $in->{'count'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'webcam'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'webcam'}, 'webcam.Webcam');
    $decoded->{'newestIndex'} = $in->{'newestIndex'};
    $decoded->{'oldestIndex'} = $in->{'oldestIndex'};
    $decoded->{'count'} = $in->{'count'};
    return $decoded;
}

1;
