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

use strict;

package Raritan::RPC::peripheral::GatewaySensorManager_2_0_0::RemoteSnmpV3Device;

use constant typeId => "peripheral.GatewaySensorManager_2_0_0.RemoteSnmpV3Device:1.0.0";
use Raritan::RPC::peripheral::GatewaySensorManager_2_0_0::RemoteSnmpDevice;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::peripheral::GatewaySensorManager_2_0_0::RemoteSnmpDevice::encode($in);
    $encoded->{'user'} = "$in->{'user'}";
    $encoded->{'level'} = 1 * $in->{'level'};
    $encoded->{'authProtocol'} = 1 * $in->{'authProtocol'};
    $encoded->{'authPassphrase'} = "$in->{'authPassphrase'}";
    $encoded->{'privacyProtocol'} = 1 * $in->{'privacyProtocol'};
    $encoded->{'privacyPassphrase'} = "$in->{'privacyPassphrase'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::peripheral::GatewaySensorManager_2_0_0::RemoteSnmpDevice::decode($agent, $in);
    $decoded->{'user'} = $in->{'user'};
    $decoded->{'level'} = $in->{'level'};
    $decoded->{'authProtocol'} = $in->{'authProtocol'};
    $decoded->{'authPassphrase'} = $in->{'authPassphrase'};
    $decoded->{'privacyProtocol'} = $in->{'privacyProtocol'};
    $decoded->{'privacyPassphrase'} = $in->{'privacyPassphrase'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('peripheral.GatewaySensorManager_2_0_0.RemoteSnmpV3Device', 1, 0, 0, 'Raritan::RPC::peripheral::GatewaySensorManager_2_0_0::RemoteSnmpV3Device');
1;
