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

use strict;

package Raritan::RPC::usermgmt::Role;

use parent qw(Raritan::RPC::RemoteObject);

use constant typeId => "usermgmt.Role:1.0.0";

sub new {
    my ($class, $agent, $rid, $typeId) = @_;
    $typeId = $typeId || Raritan::RPC::usermgmt::Role::typeId;
    return $class->SUPER::new($agent, $rid, $typeId);
}

use constant ERR_INVALID_VALUE => 1;

use Raritan::RPC::usermgmt::Role::Info;

sub getInfo($) {
    my ($self) = @_;
    my $agent = $self->{'agent'};
    my $args = {};
    my $rsp = $agent->json_rpc($self->{'rid'}, 'getInfo', $args);
    my $_ret_;
    $_ret_ = Raritan::RPC::usermgmt::Role::Info::decode($agent, $rsp->{'_ret_'});
    return $_ret_;
}

use Raritan::RPC::usermgmt::Role::Info;

sub updateFull($$) {
    my ($self, $info) = @_;
    my $agent = $self->{'agent'};
    my $args = {};
    $args->{'info'} = Raritan::RPC::usermgmt::Role::Info::encode($info);
    my $rsp = $agent->json_rpc($self->{'rid'}, 'updateFull', $args);
    my $_ret_;
    $_ret_ = $rsp->{'_ret_'};
    return $_ret_;
}

Raritan::RPC::Registry::registerProxyClass('usermgmt.Role', 1, 0, 0, 'Raritan::RPC::usermgmt::Role');
1;
