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

use strict;

package Raritan::RPC::usermgmt::UserCapabilities;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'canSetPassword'} = ($in->{'canSetPassword'}) ? JSON::true : JSON::false;
    $encoded->{'canSetPreferences'} = ($in->{'canSetPreferences'}) ? JSON::true : JSON::false;
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'canSetPassword'} = ($in->{'canSetPassword'}) ? 1 : 0;
    $decoded->{'canSetPreferences'} = ($in->{'canSetPreferences'}) ? 1 : 0;
    return $decoded;
}

1;
