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

use strict;

package Raritan::RPC::event::UserEvent;

use constant typeId => "event.UserEvent:1.0.0";
use Raritan::RPC::idl::Event;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'actUserName'} = "$in->{'actUserName'}";
    $encoded->{'actIpAddr'} = "$in->{'actIpAddr'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'actUserName'} = $in->{'actUserName'};
    $decoded->{'actIpAddr'} = $in->{'actIpAddr'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('event.UserEvent', 1, 0, 0, 'Raritan::RPC::event::UserEvent');
1;
