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

use strict;

package Raritan::RPC::pdumodel::Outlet_3_0_3::ServiceModeChangedEvent;

use constant typeId => "pdumodel.Outlet_3_0_3.ServiceModeChangedEvent:1.0.0";
use Raritan::RPC::event::UserEvent;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'enabled'} = ($in->{'enabled'}) ? JSON::true : JSON::false;
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'enabled'} = ($in->{'enabled'}) ? 1 : 0;
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('pdumodel.Outlet_3_0_3.ServiceModeChangedEvent', 1, 0, 0, 'Raritan::RPC::pdumodel::Outlet_3_0_3::ServiceModeChangedEvent');
1;
