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

use strict;

package Raritan::RPC::event::DataPushService_1_0_1::EntryAddedEvent;

use constant typeId => "event.DataPushService_1_0_1.EntryAddedEvent:1.0.0";
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::event::DataPushService_1_0_1::EntrySettings;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'entryId'} = 1 * $in->{'entryId'};
    $encoded->{'settings'} = Raritan::RPC::event::DataPushService_1_0_1::EntrySettings::encode($in->{'settings'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'entryId'} = $in->{'entryId'};
    $decoded->{'settings'} = Raritan::RPC::event::DataPushService_1_0_1::EntrySettings::decode($agent, $in->{'settings'});
    return $decoded;
}

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