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

use strict;

package Raritan::RPC::bulkcfg::BulkConfiguration_1_0_2::SavedEvent;

use constant typeId => "bulkcfg.BulkConfiguration_1_0_2.SavedEvent:1.0.0";
use Raritan::RPC::event::UserEvent;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::event::UserEvent::encode($in);
    $encoded->{'isBackup'} = ($in->{'isBackup'}) ? JSON::true : JSON::false;
    return $encoded;
}

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

Raritan::RPC::Registry::registerCodecClass('bulkcfg.BulkConfiguration_1_0_2.SavedEvent', 1, 0, 0, 'Raritan::RPC::bulkcfg::BulkConfiguration_1_0_2::SavedEvent');
1;
