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

use strict;

package Raritan::RPC::pdumodel::PowerMeterController_1_1_4::PowerMeterDeletedEvent;

use constant typeId => "pdumodel.PowerMeterController_1_1_4.PowerMeterDeletedEvent:1.0.0";
use Raritan::RPC::pdumodel::PowerMeter_1_1_4::Config;
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::pdumodel::PowerMeter_1_1_4::Settings;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'config'} = Raritan::RPC::pdumodel::PowerMeter_1_1_4::Config::encode($in->{'config'});
    $encoded->{'settings'} = Raritan::RPC::pdumodel::PowerMeter_1_1_4::Settings::encode($in->{'settings'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::event::UserEvent::decode($agent, $in);
    $decoded->{'config'} = Raritan::RPC::pdumodel::PowerMeter_1_1_4::Config::decode($agent, $in->{'config'});
    $decoded->{'settings'} = Raritan::RPC::pdumodel::PowerMeter_1_1_4::Settings::decode($agent, $in->{'settings'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('pdumodel.PowerMeterController_1_1_4.PowerMeterDeletedEvent', 1, 0, 0, 'Raritan::RPC::pdumodel::PowerMeterController_1_1_4::PowerMeterDeletedEvent');
1;
