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

use strict;

package Raritan::RPC::security::ServiceAuthorization;

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

use constant typeId => "security.ServiceAuthorization:1.0.0";

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

use constant ERR_PASSWORD_INVALID => 1;

sub setPassword($$$) {
    my ($self, $service, $password) = @_;
    my $agent = $self->{'agent'};
    my $args = {};
    $args->{'service'} = "$service";
    $args->{'password'} = "$password";
    my $rsp = $agent->json_rpc($self->{'rid'}, 'setPassword', $args);
    my $_ret_;
    $_ret_ = $rsp->{'_ret_'};
    return $_ret_;
}

Raritan::RPC::Registry::registerProxyClass('security.ServiceAuthorization', 1, 0, 0, 'Raritan::RPC::security::ServiceAuthorization');
1;
