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

use strict;

package Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerStatus;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'powerState'} = 1 * $in->{'powerState'};
    $encoded->{'lastPowerControlResult'} = 1 * $in->{'lastPowerControlResult'};
    $encoded->{'reachable'} = 1 * $in->{'reachable'};
    $encoded->{'lastRequest'} = 1 * $in->{'lastRequest'};
    $encoded->{'lastResponse'} = 1 * $in->{'lastResponse'};
    $encoded->{'requests'} = 1 * $in->{'requests'};
    $encoded->{'responses'} = 1 * $in->{'responses'};
    $encoded->{'failures'} = 1 * $in->{'failures'};
    $encoded->{'resumes'} = 1 * $in->{'resumes'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'powerState'} = $in->{'powerState'};
    $decoded->{'lastPowerControlResult'} = $in->{'lastPowerControlResult'};
    $decoded->{'reachable'} = $in->{'reachable'};
    $decoded->{'lastRequest'} = $in->{'lastRequest'};
    $decoded->{'lastResponse'} = $in->{'lastResponse'};
    $decoded->{'requests'} = $in->{'requests'};
    $decoded->{'responses'} = $in->{'responses'};
    $decoded->{'failures'} = $in->{'failures'};
    $decoded->{'resumes'} = $in->{'resumes'};
    return $decoded;
}

1;
