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

use strict;

package Raritan::RPC::security::SSHSettings;

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

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

1;
