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

use strict;

package Raritan::RPC::cascading::CascadeManager_2_0_0::LinkUnit;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'host'} = "$in->{'host'}";
    $encoded->{'status'} = 1 * $in->{'status'};
    $encoded->{'fwVersion'} = "$in->{'fwVersion'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'host'} = $in->{'host'};
    $decoded->{'status'} = ($in->{'status'} < 6 ? $in->{'status'} : 0);
    $decoded->{'fwVersion'} = $in->{'fwVersion'};
    return $decoded;
}

1;
