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

use strict;

package Raritan::RPC::pdumodel::OverCurrentProtectorTripSensor_1_1_11::TripEventInformation;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'cause'} = Raritan::RPC::ObjectCodec::encode($in->{'cause'});
    $encoded->{'timestamp'} = 1 * $in->{'timestamp'};
    $encoded->{'current'} = 1 * $in->{'current'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'cause'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'cause'}, 'pdumodel.Outlet');
    $decoded->{'timestamp'} = $in->{'timestamp'};
    $decoded->{'current'} = $in->{'current'};
    return $decoded;
}

1;
