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

use strict;

package Raritan::RPC::luaservice::ScriptOptions;

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

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

1;
