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

use strict;

package Raritan::RPC::serial::AnalogModem::Settings;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'dialInEnabled'} = ($in->{'dialInEnabled'}) ? JSON::true : JSON::false;
    $encoded->{'ringsUntilAnswer'} = 1 * $in->{'ringsUntilAnswer'};
    return $encoded;
}

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

1;
