-- Copyright (c) 2024 Huawei Technologies Co., Ltd.
-- openUBMC is licensed under Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
--
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-- EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-- MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-- See the Mulan PSL v2 for more details.

local login_rule_str = {
    "Rule1",
    "Rule2",
    "Rule3"
}
local login_rule_info = {}
for i = 1, #Input do
    local rule_info = {}
    local input_info = Input[i]
    rule_info.ID = login_rule_str[input_info.ID + 1]
    rule_info.Enabled = input_info.Status
    rule_info.StartTime = input_info.StartTime
    rule_info.EndTime = input_info.EndTime
    rule_info.IP = input_info.IP
    rule_info.Mac = input_info.Mac
    login_rule_info[i] = rule_info
end

return login_rule_info