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

use strict;

package Raritan::RPC::firmware::FirmwareUpdateEvent;

use constant typeId => "firmware.FirmwareUpdateEvent:1.0.0";
use Raritan::RPC::event::UserEvent;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'oldVersion'} = "$in->{'oldVersion'}";
    $encoded->{'newVersion'} = "$in->{'newVersion'}";
    return $encoded;
}

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

Raritan::RPC::Registry::registerCodecClass('firmware.FirmwareUpdateEvent', 1, 0, 0, 'Raritan::RPC::firmware::FirmwareUpdateEvent');
1;
