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

use strict;

package Raritan::RPC::peripheral::DeviceManager_5_0_1::FirmwareUpdateState;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'active'} = ($in->{'active'}) ? JSON::true : JSON::false;
    $encoded->{'remaining'} = 1 * $in->{'remaining'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'active'} = ($in->{'active'}) ? 1 : 0;
    $decoded->{'remaining'} = $in->{'remaining'};
    return $decoded;
}

1;
