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

use strict;

package Raritan::RPC::pdumodel::Panel_2_0_0::CircuitCreatedEvent;

use constant typeId => "pdumodel.Panel_2_0_0.CircuitCreatedEvent:1.0.0";
use Raritan::RPC::event::UserEvent;
use Raritan::RPC::pdumodel::Circuit_2_0_0::Config;
use Raritan::RPC::pdumodel::Circuit_2_0_0::Settings;

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

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

Raritan::RPC::Registry::registerCodecClass('pdumodel.Panel_2_0_0.CircuitCreatedEvent', 1, 0, 0, 'Raritan::RPC::pdumodel::Panel_2_0_0::CircuitCreatedEvent');
1;
