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

use strict;

package Raritan::RPC::firmware::UpdateStatus;

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

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

1;
