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

use strict;

package Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::StateSensorClass;

use constant typeId => "peripheral.GatewaySensorManager_2_0_1.StateSensorClass:1.0.0";
use Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::SensorClass;
use Raritan::RPC::sensors::Sensor_4_0_7::TypeSpec;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::SensorClass::encode($in);
    $encoded->{'type'} = Raritan::RPC::sensors::Sensor_4_0_7::TypeSpec::encode($in->{'type'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::SensorClass::decode($agent, $in);
    $decoded->{'type'} = Raritan::RPC::sensors::Sensor_4_0_7::TypeSpec::decode($agent, $in->{'type'});
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('peripheral.GatewaySensorManager_2_0_1.StateSensorClass', 1, 0, 0, 'Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::StateSensorClass');
1;
