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

use strict;

package Raritan::RPC::dsam::DsamManager::DsamAttachedEvent;

use constant typeId => "dsam.DsamManager.DsamAttachedEvent:1.0.0";
use Raritan::RPC::idl::Event;
use Raritan::RPC::dsam::DsamDevice::Info;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'info'} = Raritan::RPC::dsam::DsamDevice::Info::encode($in->{'info'});
    $encoded->{'device'} = Raritan::RPC::ObjectCodec::encode($in->{'device'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'info'} = Raritan::RPC::dsam::DsamDevice::Info::decode($agent, $in->{'info'});
    $decoded->{'device'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'device'}, 'dsam.DsamDevice');
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('dsam.DsamManager.DsamAttachedEvent', 1, 0, 0, 'Raritan::RPC::dsam::DsamManager::DsamAttachedEvent');
1;
