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

use strict;

package Raritan::RPC::firmware::UpdateHistoryEntry;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'timestamp'} = 1 * $in->{'timestamp'};
    $encoded->{'oldVersion'} = "$in->{'oldVersion'}";
    $encoded->{'imageVersion'} = "$in->{'imageVersion'}";
    $encoded->{'imageMD5'} = "$in->{'imageMD5'}";
    $encoded->{'status'} = $in->{'status'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'timestamp'} = $in->{'timestamp'};
    $decoded->{'oldVersion'} = $in->{'oldVersion'};
    $decoded->{'imageVersion'} = $in->{'imageVersion'};
    $decoded->{'imageMD5'} = $in->{'imageMD5'};
    $decoded->{'status'} = $in->{'status'};
    return $decoded;
}

1;
