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

use strict;

package Raritan::RPC::pdumodel::Panel_1_0_1::CircuitCreatedEvent;

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

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::Config::encode($in->{'config'});
    $encoded->{'settings'} = Raritan::RPC::pdumodel::Circuit::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::Config::decode($agent, $in->{'config'});
    $decoded->{'settings'} = Raritan::RPC::pdumodel::Circuit::Settings::decode($agent, $in->{'settings'});
    return $decoded;
}

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