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

use strict;

package Raritan::RPC::fitness::Fitness::DataEntry;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'id'} = "$in->{'id'}";
    $encoded->{'value'} = 1 * $in->{'value'};
    $encoded->{'maxValue'} = 1 * $in->{'maxValue'};
    $encoded->{'worstValue'} = 1 * $in->{'worstValue'};
    $encoded->{'thresholdValue'} = 1 * $in->{'thresholdValue'};
    $encoded->{'rawValue'} = 1 * $in->{'rawValue'};
    $encoded->{'flags'} = 1 * $in->{'flags'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'id'} = $in->{'id'};
    $decoded->{'value'} = $in->{'value'};
    $decoded->{'maxValue'} = $in->{'maxValue'};
    $decoded->{'worstValue'} = $in->{'worstValue'};
    $decoded->{'thresholdValue'} = $in->{'thresholdValue'};
    $decoded->{'rawValue'} = $in->{'rawValue'};
    $decoded->{'flags'} = $in->{'flags'};
    return $decoded;
}

1;
