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

use strict;

package Raritan::RPC::peripheral::DeviceManager_4_0_0::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;
