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

use strict;

package Raritan::RPC::usb::UsbDevice_2_0_0;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'bus'} = 1 * $in->{'bus'};
    $encoded->{'device'} = 1 * $in->{'device'};
    $encoded->{'vendorId'} = 1 * $in->{'vendorId'};
    $encoded->{'productId'} = 1 * $in->{'productId'};
    $encoded->{'manufacturer'} = "$in->{'manufacturer'}";
    $encoded->{'product'} = "$in->{'product'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'bus'} = $in->{'bus'};
    $decoded->{'device'} = $in->{'device'};
    $decoded->{'vendorId'} = $in->{'vendorId'};
    $decoded->{'productId'} = $in->{'productId'};
    $decoded->{'manufacturer'} = $in->{'manufacturer'};
    $decoded->{'product'} = $in->{'product'};
    return $decoded;
}

1;
