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

use strict;

package Raritan::RPC::servermon::ServerMonitor::ServerStatus;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $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'};
    return $encoded;
}

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

1;
