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

use strict;

package Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettingsChangedEvent;

use constant typeId => "servermon.ServerMonitor_2_0_1.ServerSettingsChangedEvent:1.0.0";
use Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettings;
use Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettings;
use Raritan::RPC::event::UserEvent;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'id'} = 1 * $in->{'id'};
    $encoded->{'oldSettings'} = Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettings::encode($in->{'oldSettings'});
    $encoded->{'newSettings'} = Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettings::encode($in->{'newSettings'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'id'} = $in->{'id'};
    $decoded->{'oldSettings'} = Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettings::decode($agent, $in->{'oldSettings'});
    $decoded->{'newSettings'} = Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettings::decode($agent, $in->{'newSettings'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('servermon.ServerMonitor_2_0_1.ServerSettingsChangedEvent', 1, 0, 0, 'Raritan::RPC::servermon::ServerMonitor_2_0_1::ServerSettingsChangedEvent');
1;
