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

use strict;

package Raritan::RPC::firmware::ImageStatus;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'state'} = 1 * $in->{'state'};
    $encoded->{'error_message'} = "$in->{'error_message'}";
    $encoded->{'time_started'} = 1 * $in->{'time_started'};
    $encoded->{'size_total'} = 1 * $in->{'size_total'};
    $encoded->{'size_done'} = 1 * $in->{'size_done'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'state'} = $in->{'state'};
    $decoded->{'error_message'} = $in->{'error_message'};
    $decoded->{'time_started'} = $in->{'time_started'};
    $decoded->{'size_total'} = $in->{'size_total'};
    $decoded->{'size_done'} = $in->{'size_done'};
    return $decoded;
}

1;
