-- 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 validate = require 'mc.validate'
local utils = require 'mc.utils'
local create_enum_type = require 'mc.enum'

local def_types = {}

---@class def_types.PasswordRulePolicy: Enum
local EPasswordRulePolicy = create_enum_type('PasswordRulePolicy')
EPasswordRulePolicy.default = EPasswordRulePolicy.new(2147483647)
EPasswordRulePolicy.struct = nil
EPasswordRulePolicy.Default = EPasswordRulePolicy.new(1)
EPasswordRulePolicy.Customized = EPasswordRulePolicy.new(2)
EPasswordRulePolicy.Hybrid = EPasswordRulePolicy.new(3)

def_types.PasswordRulePolicy = EPasswordRulePolicy

---@class def_types.IpRuleType: Enum
local EIpRuleType = create_enum_type('IpRuleType')
EIpRuleType.default = EIpRuleType.new(2147483647)
EIpRuleType.struct = nil
EIpRuleType.INVALID = EIpRuleType.new(0)
EIpRuleType.NO_MASK = EIpRuleType.new(1)
EIpRuleType.IPV6_NO_MASK = EIpRuleType.new(2)
EIpRuleType.MASK = EIpRuleType.new(3)
EIpRuleType.IPV6_MASK = EIpRuleType.new(4)
EIpRuleType.NULL = EIpRuleType.new(5)

def_types.IpRuleType = EIpRuleType

---@class def_types.LogLevel: Enum
local ELogLevel = create_enum_type('LogLevel')
ELogLevel.default = ELogLevel.new(2147483647)
ELogLevel.struct = nil
ELogLevel.DEBUG = ELogLevel.new(0)
ELogLevel.NOTICE = ELogLevel.new(1)
ELogLevel.ERROR = ELogLevel.new(2)

def_types.LogLevel = ELogLevel

---@class def_types.SNMPv3TrapAccountLimitPolicy: Enum
local ESNMPv3TrapAccountLimitPolicy = create_enum_type('SNMPv3TrapAccountLimitPolicy')
ESNMPv3TrapAccountLimitPolicy.default = ESNMPv3TrapAccountLimitPolicy.new(2147483647)
ESNMPv3TrapAccountLimitPolicy.struct = nil
ESNMPv3TrapAccountLimitPolicy.Modifiable = ESNMPv3TrapAccountLimitPolicy.new(0)
ESNMPv3TrapAccountLimitPolicy.NameModifiable = ESNMPv3TrapAccountLimitPolicy.new(1)
ESNMPv3TrapAccountLimitPolicy.NotModifiable = ESNMPv3TrapAccountLimitPolicy.new(2)

def_types.SNMPv3TrapAccountLimitPolicy = ESNMPv3TrapAccountLimitPolicy

---@class def_types.VncPasswordItem: Enum
local EVncPasswordItem = create_enum_type('VncPasswordItem')
EVncPasswordItem.default = EVncPasswordItem.new(2147483647)
EVncPasswordItem.struct = nil
EVncPasswordItem.SetPassword = EVncPasswordItem.new(1)
EVncPasswordItem.CheckPassword = EVncPasswordItem.new(2)

def_types.VncPasswordItem = EVncPasswordItem

---@class def_types.Progress: Enum
local EProgress = create_enum_type('Progress')
EProgress.default = EProgress.new(2147483647)
EProgress.struct = nil
EProgress.RUNNING = EProgress.new(1)
EProgress.COMPLETED = EProgress.new(2)

def_types.Progress = EProgress

---@class def_types.IpType: Enum
local EIpType = create_enum_type('IpType')
EIpType.default = EIpType.new(2147483647)
EIpType.struct = nil
EIpType.V4 = EIpType.new(0)
EIpType.V6 = EIpType.new(1)
EIpType.All = EIpType.new(2)

def_types.IpType = EIpType

---@class def_types.IpmiAccountServiceConfiguration: Enum
local EIpmiAccountServiceConfiguration = create_enum_type('IpmiAccountServiceConfiguration')
EIpmiAccountServiceConfiguration.default = EIpmiAccountServiceConfiguration.new(2147483647)
EIpmiAccountServiceConfiguration.struct = nil
EIpmiAccountServiceConfiguration.WeakPasswdCheck = EIpmiAccountServiceConfiguration.new(1)
EIpmiAccountServiceConfiguration.UserFirstLoginPasswdModifyPolicy = EIpmiAccountServiceConfiguration.new(2)
EIpmiAccountServiceConfiguration.HistoryPasswdCheckCount = EIpmiAccountServiceConfiguration.new(3)
EIpmiAccountServiceConfiguration.WebTimeOut = EIpmiAccountServiceConfiguration.new(4)
EIpmiAccountServiceConfiguration.EmergencyLoginAccount = EIpmiAccountServiceConfiguration.new(5)
EIpmiAccountServiceConfiguration.InitialPasswordPromptEnable = EIpmiAccountServiceConfiguration.new(6)

def_types.IpmiAccountServiceConfiguration = EIpmiAccountServiceConfiguration

---@class def_types.IpmiLongCommunityEnabled: Enum
local EIpmiLongCommunityEnabled = create_enum_type('IpmiLongCommunityEnabled')
EIpmiLongCommunityEnabled.default = EIpmiLongCommunityEnabled.new(2147483647)
EIpmiLongCommunityEnabled.struct = nil
EIpmiLongCommunityEnabled.Disable = EIpmiLongCommunityEnabled.new(0)
EIpmiLongCommunityEnabled.Enable = EIpmiLongCommunityEnabled.new(1)

def_types.IpmiLongCommunityEnabled = EIpmiLongCommunityEnabled

---@class def_types.IpmiSNMPCommunity: Enum
local EIpmiSNMPCommunity = create_enum_type('IpmiSNMPCommunity')
EIpmiSNMPCommunity.default = EIpmiSNMPCommunity.new(2147483647)
EIpmiSNMPCommunity.struct = nil
EIpmiSNMPCommunity.Ro = EIpmiSNMPCommunity.new(1)
EIpmiSNMPCommunity.Rw = EIpmiSNMPCommunity.new(2)

def_types.IpmiSNMPCommunity = EIpmiSNMPCommunity

---@class def_types.IpmiSNMPConfiguration: Enum
local EIpmiSNMPConfiguration = create_enum_type('IpmiSNMPConfiguration')
EIpmiSNMPConfiguration.default = EIpmiSNMPConfiguration.new(2147483647)
EIpmiSNMPConfiguration.struct = nil
EIpmiSNMPConfiguration.Community = EIpmiSNMPConfiguration.new(1)
EIpmiSNMPConfiguration.LongCommunityEnabled = EIpmiSNMPConfiguration.new(2)

def_types.IpmiSNMPConfiguration = EIpmiSNMPConfiguration

---@class def_types.IpMode: Enum
local EIpMode = create_enum_type('IpMode')
EIpMode.default = EIpMode.new(2147483647)
EIpMode.struct = nil
EIpMode.IPV4 = EIpMode.new(0)
EIpMode.IPV6 = EIpMode.new(1)

def_types.IpMode = EIpMode

---@class def_types.IpmiSetTwoFactorState: Enum
local EIpmiSetTwoFactorState = create_enum_type('IpmiSetTwoFactorState')
EIpmiSetTwoFactorState.default = EIpmiSetTwoFactorState.new(2147483647)
EIpmiSetTwoFactorState.struct = nil
EIpmiSetTwoFactorState.Disable = EIpmiSetTwoFactorState.new(0)
EIpmiSetTwoFactorState.Enable = EIpmiSetTwoFactorState.new(1)

def_types.IpmiSetTwoFactorState = EIpmiSetTwoFactorState

---@class def_types.RemoteGroupType: Enum
local ERemoteGroupType = create_enum_type('RemoteGroupType')
ERemoteGroupType.default = ERemoteGroupType.new(2147483647)
ERemoteGroupType.struct = nil
ERemoteGroupType.GROUP_TYPE_LDAP = ERemoteGroupType.new(0)
ERemoteGroupType.GROUP_TYPE_KERBEROS = ERemoteGroupType.new(1)

def_types.RemoteGroupType = ERemoteGroupType

---@class def_types.IpmiSetUserSNMPV3PrivacyPwd: Enum
local EIpmiSetUserSNMPV3PrivacyPwd = create_enum_type('IpmiSetUserSNMPV3PrivacyPwd')
EIpmiSetUserSNMPV3PrivacyPwd.default = EIpmiSetUserSNMPV3PrivacyPwd.new(2147483647)
EIpmiSetUserSNMPV3PrivacyPwd.struct = nil
EIpmiSetUserSNMPV3PrivacyPwd.SET_PASSWORD = EIpmiSetUserSNMPV3PrivacyPwd.new(0)
EIpmiSetUserSNMPV3PrivacyPwd.TEST_PASSWORD = EIpmiSetUserSNMPV3PrivacyPwd.new(1)

def_types.IpmiSetUserSNMPV3PrivacyPwd = EIpmiSetUserSNMPV3PrivacyPwd

---@class def_types.LdapCertVerifyLevel: Enum
local ELdapCertVerifyLevel = create_enum_type('LdapCertVerifyLevel')
ELdapCertVerifyLevel.default = ELdapCertVerifyLevel.new(2147483647)
ELdapCertVerifyLevel.struct = nil
ELdapCertVerifyLevel.LDAP_OPT_X_TLS_NEVER = ELdapCertVerifyLevel.new(0)
ELdapCertVerifyLevel.LDAP_OPT_X_TLS_HARD = ELdapCertVerifyLevel.new(1)
ELdapCertVerifyLevel.LDAP_OPT_X_TLS_DEMAND = ELdapCertVerifyLevel.new(2)
ELdapCertVerifyLevel.LDAP_OPT_X_TLS_ALLOW = ELdapCertVerifyLevel.new(3)
ELdapCertVerifyLevel.LDAP_OPT_X_TLS_TRY = ELdapCertVerifyLevel.new(4)

def_types.LdapCertVerifyLevel = ELdapCertVerifyLevel

---@class def_types.IpmiUserEnableByPassword: Enum
local EIpmiUserEnableByPassword = create_enum_type('IpmiUserEnableByPassword')
EIpmiUserEnableByPassword.default = EIpmiUserEnableByPassword.new(2147483647)
EIpmiUserEnableByPassword.struct = nil
EIpmiUserEnableByPassword.Disable = EIpmiUserEnableByPassword.new(0)
EIpmiUserEnableByPassword.UserEnable = EIpmiUserEnableByPassword.new(1)
EIpmiUserEnableByPassword.PasswordEnable = EIpmiUserEnableByPassword.new(2)

def_types.IpmiUserEnableByPassword = EIpmiUserEnableByPassword

---@class def_types.IpmiChannelType: Enum
local EIpmiChannelType = create_enum_type('IpmiChannelType')
EIpmiChannelType.default = EIpmiChannelType.new(2147483647)
EIpmiChannelType.struct = nil
EIpmiChannelType.IPMI_SMM = EIpmiChannelType.new(0)
EIpmiChannelType.IPMI_ME = EIpmiChannelType.new(1)
EIpmiChannelType.IPMI_MMC = EIpmiChannelType.new(2)
EIpmiChannelType.IPMI_HOST = EIpmiChannelType.new(3)
EIpmiChannelType.IPMI_LAN = EIpmiChannelType.new(4)
EIpmiChannelType.IPMI_BASE = EIpmiChannelType.new(5)
EIpmiChannelType.IPMI_FABRIC = EIpmiChannelType.new(6)
EIpmiChannelType.IPMI_FCOE = EIpmiChannelType.new(7)
EIpmiChannelType.IPMI_BMC = EIpmiChannelType.new(8)
EIpmiChannelType.IPMI_BMA = EIpmiChannelType.new(9)

def_types.IpmiChannelType = EIpmiChannelType

---@class def_types.UserLocked: Enum
local EUserLocked = create_enum_type('UserLocked')
EUserLocked.default = EUserLocked.new(2147483647)
EUserLocked.struct = nil
EUserLocked.USER_UNLOCK = EUserLocked.new(0)
EUserLocked.USER_LOCK = EUserLocked.new(1)

def_types.UserLocked = EUserLocked

---@class def_types.PrivilegeType: Enum
local EPrivilegeType = create_enum_type('PrivilegeType')
EPrivilegeType.default = EPrivilegeType.new(2147483647)
EPrivilegeType.struct = nil
EPrivilegeType.UserMgmt = EPrivilegeType.new(0)
EPrivilegeType.BasicSetting = EPrivilegeType.new(1)
EPrivilegeType.KVMMgmt = EPrivilegeType.new(2)
EPrivilegeType.VMMMgmt = EPrivilegeType.new(3)
EPrivilegeType.SecurityMgmt = EPrivilegeType.new(4)
EPrivilegeType.PowerMgmt = EPrivilegeType.new(5)
EPrivilegeType.DiagnoseMgmt = EPrivilegeType.new(6)
EPrivilegeType.ReadOnly = EPrivilegeType.new(7)
EPrivilegeType.ConfigureSelf = EPrivilegeType.new(8)

def_types.PrivilegeType = EPrivilegeType

---@class def_types.IpmiUserOperater: Enum
local EIpmiUserOperater = create_enum_type('IpmiUserOperater')
EIpmiUserOperater.default = EIpmiUserOperater.new(2147483647)
EIpmiUserOperater.struct = nil
EIpmiUserOperater.OPERATION_DISABLE_USER = EIpmiUserOperater.new(0)
EIpmiUserOperater.OPERATION_ENABLE_USER = EIpmiUserOperater.new(1)
EIpmiUserOperater.OPERATION_SET_PASSWD = EIpmiUserOperater.new(2)
EIpmiUserOperater.OPERATION_TEST_PASSWD = EIpmiUserOperater.new(3)
EIpmiUserOperater.OPERATION_DEFAULT = EIpmiUserOperater.new(4)
EIpmiUserOperater.OPERATION_SET_SNMP_PVACY_PASSWD = EIpmiUserOperater.new(5)
EIpmiUserOperater.OPERATION_TEST_SNMP_PRIVACY_PASSWD = EIpmiUserOperater.new(6)

def_types.IpmiUserOperater = EIpmiUserOperater

---@class def_types.IpmiInterfaceEnable: Enum
local EIpmiInterfaceEnable = create_enum_type('IpmiInterfaceEnable')
EIpmiInterfaceEnable.default = EIpmiInterfaceEnable.new(2147483647)
EIpmiInterfaceEnable.struct = nil
EIpmiInterfaceEnable.USER_LOGIN_INTERFACE_DISABLE = EIpmiInterfaceEnable.new(0)
EIpmiInterfaceEnable.USER_LOGIN_INTERFACE_ENABLE = EIpmiInterfaceEnable.new(1)

def_types.IpmiInterfaceEnable = EIpmiInterfaceEnable

---@class def_types.IpmiOperPassword: Enum
local EIpmiOperPassword = create_enum_type('IpmiOperPassword')
EIpmiOperPassword.default = EIpmiOperPassword.new(2147483647)
EIpmiOperPassword.struct = nil
EIpmiOperPassword.IPMI_OPERATION_NOT_SET_PASSWORD = EIpmiOperPassword.new(0)
EIpmiOperPassword.IPMI_OPERATION_SET_PASSWORD = EIpmiOperPassword.new(1)

def_types.IpmiOperPassword = EIpmiOperPassword

---@class def_types.IpmiPwdComplexityEnum: Enum
local EIpmiPwdComplexityEnum = create_enum_type('IpmiPwdComplexityEnum')
EIpmiPwdComplexityEnum.default = EIpmiPwdComplexityEnum.new(2147483647)
EIpmiPwdComplexityEnum.struct = nil
EIpmiPwdComplexityEnum.PWD_COMPLEXITY_DISABLE = EIpmiPwdComplexityEnum.new(0)
EIpmiPwdComplexityEnum.PWD_COMPLEXITY_ENABLE = EIpmiPwdComplexityEnum.new(1)
EIpmiPwdComplexityEnum.PWD_COMPLEXITY_STRONG_ENABLE = EIpmiPwdComplexityEnum.new(2)

def_types.IpmiPwdComplexityEnum = EIpmiPwdComplexityEnum

---@class def_types.IpmiChannel: Enum
local EIpmiChannel = create_enum_type('IpmiChannel')
EIpmiChannel.default = EIpmiChannel.new(2147483647)
EIpmiChannel.struct = nil
EIpmiChannel.IPMB_CHAN_NUM = EIpmiChannel.new(0)
EIpmiChannel.LAN1_CHAN_NUM = EIpmiChannel.new(1)
EIpmiChannel.LAN2_CHAN_NUM = EIpmiChannel.new(2)
EIpmiChannel.IPMB_CARD_CHAN_NUM = EIpmiChannel.new(5)
EIpmiChannel.IPMB_SM_CHAN_NUM = EIpmiChannel.new(6)
EIpmiChannel.IPMB_L_CHAN_NUM = EIpmiChannel.new(7)
EIpmiChannel.IPMB_ETH_CHAN_NUM = EIpmiChannel.new(8)
EIpmiChannel.EDMA_CHAN_NUM = EIpmiChannel.new(9)
EIpmiChannel.IPMB_MM_CHAN_NUM = EIpmiChannel.new(10)
EIpmiChannel.LOCAL_MM_CHAN_NUM = EIpmiChannel.new(11)
EIpmiChannel.CPLDRAM_CHAN_NUM = EIpmiChannel.new(13)
EIpmiChannel.PRSENT_CHAN_NUM = EIpmiChannel.new(14)
EIpmiChannel.SYS_CHAN_NUM = EIpmiChannel.new(15)
EIpmiChannel.MAINT_CHAN_NUM = EIpmiChannel.new(16)
EIpmiChannel.RACK_MAIN_CHAN_NUM = EIpmiChannel.new(17)
EIpmiChannel.RACK_BAK_CHAN_NUM = EIpmiChannel.new(18)
EIpmiChannel.REMOTE_BUS_NUM = EIpmiChannel.new(19)
EIpmiChannel.MAX_IPMI_CHAN_NUM = EIpmiChannel.new(20)
EIpmiChannel.INVALID_CHAN_NUM = EIpmiChannel.new(255)

def_types.IpmiChannel = EIpmiChannel

---@class def_types.SessionLogoutType: Enum
local ESessionLogoutType = create_enum_type('SessionLogoutType')
ESessionLogoutType.default = ESessionLogoutType.new(2147483647)
ESessionLogoutType.struct = nil
ESessionLogoutType.SessionLogout = ESessionLogoutType.new(0)
ESessionLogoutType.SessionTimeout = ESessionLogoutType.new(1)
ESessionLogoutType.SessionKickout = ESessionLogoutType.new(2)
ESessionLogoutType.SessionRelogin = ESessionLogoutType.new(3)
ESessionLogoutType.AccountConfigChange = ESessionLogoutType.new(4)
ESessionLogoutType.BMCConfigChange = ESessionLogoutType.new(5)

def_types.SessionLogoutType = ESessionLogoutType

---@class def_types.LoginRuleIds: Enum
local ELoginRuleIds = create_enum_type('LoginRuleIds')
ELoginRuleIds.default = ELoginRuleIds.new(2147483647)
ELoginRuleIds.struct = nil
ELoginRuleIds.Rule_Invalid = ELoginRuleIds.new(0)
ELoginRuleIds.Rule1 = ELoginRuleIds.new(1)
ELoginRuleIds.Rule2 = ELoginRuleIds.new(2)
ELoginRuleIds.Rule3 = ELoginRuleIds.new(4)

def_types.LoginRuleIds = ELoginRuleIds

---@class def_types.LoginInterface: Enum
local ELoginInterface = create_enum_type('LoginInterface')
ELoginInterface.default = ELoginInterface.new(2147483647)
ELoginInterface.struct = nil
ELoginInterface.Invalid = ELoginInterface.new(0)
ELoginInterface.Web = ELoginInterface.new(1)
ELoginInterface.SNMP = ELoginInterface.new(2)
ELoginInterface.IPMI = ELoginInterface.new(4)
ELoginInterface.SSH = ELoginInterface.new(8)
ELoginInterface.SFTP = ELoginInterface.new(16)
ELoginInterface.Local = ELoginInterface.new(64)
ELoginInterface.Redfish = ELoginInterface.new(128)

def_types.LoginInterface = ELoginInterface

---@class def_types.AccountType: Enum
local EAccountType = create_enum_type('AccountType')
EAccountType.default = EAccountType.new(2147483647)
EAccountType.struct = nil
EAccountType.Local = EAccountType.new(0)
EAccountType.LDAP = EAccountType.new(1)
EAccountType.Kerberos = EAccountType.new(2)
EAccountType.VNC = EAccountType.new(3)
EAccountType.KVM = EAccountType.new(4)
EAccountType.KerberosSSO = EAccountType.new(5)
EAccountType.IPMI_INNER = EAccountType.new(6)
EAccountType.SnmpCommunity = EAccountType.new(7)
EAccountType.OEM = EAccountType.new(8)
EAccountType.InterChassis = EAccountType.new(9)

def_types.AccountType = EAccountType

---@class def_types.IpmiPrivilege: Enum
local EIpmiPrivilege = create_enum_type('IpmiPrivilege')
EIpmiPrivilege.default = EIpmiPrivilege.new(2147483647)
EIpmiPrivilege.struct = nil
EIpmiPrivilege.RESERVED = EIpmiPrivilege.new(0)
EIpmiPrivilege.CALLBACK = EIpmiPrivilege.new(1)
EIpmiPrivilege.USER = EIpmiPrivilege.new(2)
EIpmiPrivilege.OPERATOR = EIpmiPrivilege.new(3)
EIpmiPrivilege.ADMIN = EIpmiPrivilege.new(4)
EIpmiPrivilege.OEM = EIpmiPrivilege.new(5)
EIpmiPrivilege.NO_ACCESS = EIpmiPrivilege.new(15)

def_types.IpmiPrivilege = EIpmiPrivilege

---@class def_types.RoleType: Enum
local ERoleType = create_enum_type('RoleType')
ERoleType.default = ERoleType.new(2147483647)
ERoleType.struct = nil
ERoleType.NoAccess = ERoleType.new(0)
ERoleType.CommonUser = ERoleType.new(2)
ERoleType.Operator = ERoleType.new(3)
ERoleType.Administrator = ERoleType.new(4)
ERoleType.CustomRole1 = ERoleType.new(5)
ERoleType.CustomRole2 = ERoleType.new(6)
ERoleType.CustomRole3 = ERoleType.new(7)
ERoleType.CustomRole4 = ERoleType.new(8)
ERoleType.CustomRole5 = ERoleType.new(9)
ERoleType.CustomRole6 = ERoleType.new(10)
ERoleType.CustomRole7 = ERoleType.new(11)
ERoleType.CustomRole8 = ERoleType.new(12)
ERoleType.CustomRole9 = ERoleType.new(13)
ERoleType.CustomRole10 = ERoleType.new(14)
ERoleType.CustomRole11 = ERoleType.new(15)
ERoleType.CustomRole12 = ERoleType.new(16)
ERoleType.CustomRole13 = ERoleType.new(17)
ERoleType.CustomRole14 = ERoleType.new(18)
ERoleType.CustomRole15 = ERoleType.new(19)
ERoleType.CustomRole16 = ERoleType.new(20)

def_types.RoleType = ERoleType

---@class def_types.WeakPwdDictEnum: Enum
local EWeakPwdDictEnum = create_enum_type('WeakPwdDictEnum')
EWeakPwdDictEnum.default = EWeakPwdDictEnum.new(2147483647)
EWeakPwdDictEnum.struct = nil
EWeakPwdDictEnum.WEAK_PWDDICT_COMPELETE = EWeakPwdDictEnum.new(0)
EWeakPwdDictEnum.WEAK_PWDDICT_IN_PROCESS = EWeakPwdDictEnum.new(1)

def_types.WeakPwdDictEnum = EWeakPwdDictEnum

---@class def_types.RmcpAuthAlgo: Enum
local ERmcpAuthAlgo = create_enum_type('RmcpAuthAlgo')
ERmcpAuthAlgo.default = ERmcpAuthAlgo.new(2147483647)
ERmcpAuthAlgo.struct = nil
ERmcpAuthAlgo.None = ERmcpAuthAlgo.new(0)
ERmcpAuthAlgo.HmacSha1 = ERmcpAuthAlgo.new(1)
ERmcpAuthAlgo.HmacMd5 = ERmcpAuthAlgo.new(2)
ERmcpAuthAlgo.HmacSha2 = ERmcpAuthAlgo.new(3)

def_types.RmcpAuthAlgo = ERmcpAuthAlgo

---@class def_types.OccupationMode: Enum
local EOccupationMode = create_enum_type('OccupationMode')
EOccupationMode.default = EOccupationMode.new(2147483647)
EOccupationMode.struct = nil
EOccupationMode.Shared = EOccupationMode.new(0)
EOccupationMode.Exclusive = EOccupationMode.new(1)

def_types.OccupationMode = EOccupationMode

---@class def_types.WebSessionType: Enum
local EWebSessionType = create_enum_type('WebSessionType')
EWebSessionType.default = EWebSessionType.new(2147483647)
EWebSessionType.struct = nil
EWebSessionType.Sso = EWebSessionType.new(0)
EWebSessionType.Web = EWebSessionType.new(1)

def_types.WebSessionType = EWebSessionType

---@class def_types.RedfishInnerSessionType: Enum
local ERedfishInnerSessionType = create_enum_type('RedfishInnerSessionType')
ERedfishInnerSessionType.default = ERedfishInnerSessionType.new(2147483647)
ERedfishInnerSessionType.struct = nil
ERedfishInnerSessionType.HMM = ERedfishInnerSessionType.new(0)
ERedfishInnerSessionType.BMA = ERedfishInnerSessionType.new(1)
ERedfishInnerSessionType.MAX = ERedfishInnerSessionType.new(2)
ERedfishInnerSessionType.Not_Inner = ERedfishInnerSessionType.new(16)
ERedfishInnerSessionType.Unknown = ERedfishInnerSessionType.new(255)

def_types.RedfishInnerSessionType = ERedfishInnerSessionType

---@class def_types.SessionType: Enum
local ESessionType = create_enum_type('SessionType')
ESessionType.default = ESessionType.new(2147483647)
ESessionType.struct = nil
ESessionType.GUI = ESessionType.new(0)
ESessionType.Redfish = ESessionType.new(1)
ESessionType.CLI = ESessionType.new(2)
ESessionType.SSO = ESessionType.new(3)
ESessionType.KVM = ESessionType.new(4)
ESessionType.VNC = ESessionType.new(5)
ESessionType.KVM_VMM = ESessionType.new(6)
ESessionType.VIDEO = ESessionType.new(7)
ESessionType.All = ESessionType.new(255)

def_types.SessionType = ESessionType

---@class def_types.AuthAlgorithm: Enum
local EAuthAlgorithm = create_enum_type('AuthAlgorithm')
EAuthAlgorithm.default = EAuthAlgorithm.new(2147483647)
EAuthAlgorithm.struct = nil
EAuthAlgorithm.AT_MD5 = EAuthAlgorithm.new(0)
EAuthAlgorithm.AT_SHA = EAuthAlgorithm.new(1)
EAuthAlgorithm.AT_SHA1 = EAuthAlgorithm.new(2)
EAuthAlgorithm.AT_SHA256 = EAuthAlgorithm.new(3)
EAuthAlgorithm.AT_SHA384 = EAuthAlgorithm.new(4)
EAuthAlgorithm.AT_SHA512 = EAuthAlgorithm.new(5)
EAuthAlgorithm.AT_INVLID = EAuthAlgorithm.new(255)

def_types.AuthAlgorithm = EAuthAlgorithm

---@class def_types.AuthType: Enum
local EAuthType = create_enum_type('AuthType')
EAuthType.default = EAuthType.new(2147483647)
EAuthType.struct = nil
EAuthType.Local = EAuthType.new(0)
EAuthType.ldap_auto_match = EAuthType.new(1)
EAuthType.ldap_server1 = EAuthType.new(2)
EAuthType.ldap_server2 = EAuthType.new(3)
EAuthType.ldap_server3 = EAuthType.new(4)
EAuthType.ldap_server4 = EAuthType.new(5)
EAuthType.ldap_server5 = EAuthType.new(6)
EAuthType.ldap_server6 = EAuthType.new(7)
EAuthType.ldap_kerberos_sso = EAuthType.new(12)
EAuthType.kerberos_server = EAuthType.new(13)
EAuthType.sso_local = EAuthType.new(14)
EAuthType.sso_ldap = EAuthType.new(15)
EAuthType.skip_auth = EAuthType.new(16)
EAuthType.auto_match = EAuthType.new(255)

def_types.AuthType = EAuthType

---@class def_types.TimeSource: Enum
local ETimeSource = create_enum_type('TimeSource')
ETimeSource.default = ETimeSource.new(2147483647)
ETimeSource.struct = nil
ETimeSource.TS_NTP = ETimeSource.new(0)
ETimeSource.TS_NOT_NTP = ETimeSource.new(1)

def_types.TimeSource = ETimeSource

---@class def_types.SNMPKuType: Enum
local ESNMPKuType = create_enum_type('SNMPKuType')
ESNMPKuType.default = ESNMPKuType.new(2147483647)
ESNMPKuType.struct = nil
ESNMPKuType.Authentication = ESNMPKuType.new(0)
ESNMPKuType.Encryption = ESNMPKuType.new(1)

def_types.SNMPKuType = ESNMPKuType

---@class def_types.SNMPEncryptionProtocols: Enum
local ESNMPEncryptionProtocols = create_enum_type('SNMPEncryptionProtocols')
ESNMPEncryptionProtocols.default = ESNMPEncryptionProtocols.new(2147483647)
ESNMPEncryptionProtocols.struct = nil
ESNMPEncryptionProtocols.None = ESNMPEncryptionProtocols.new(0)
ESNMPEncryptionProtocols.DES = ESNMPEncryptionProtocols.new(1)
ESNMPEncryptionProtocols.AES128 = ESNMPEncryptionProtocols.new(2)
ESNMPEncryptionProtocols.AES256 = ESNMPEncryptionProtocols.new(3)

def_types.SNMPEncryptionProtocols = ESNMPEncryptionProtocols

---@class def_types.SNMPAuthenticationProtocols: Enum
local ESNMPAuthenticationProtocols = create_enum_type('SNMPAuthenticationProtocols')
ESNMPAuthenticationProtocols.default = ESNMPAuthenticationProtocols.new(2147483647)
ESNMPAuthenticationProtocols.struct = nil
ESNMPAuthenticationProtocols.None = ESNMPAuthenticationProtocols.new(0)
ESNMPAuthenticationProtocols.MD5 = ESNMPAuthenticationProtocols.new(1)
ESNMPAuthenticationProtocols.SHA96 = ESNMPAuthenticationProtocols.new(2)
ESNMPAuthenticationProtocols.SHA224 = ESNMPAuthenticationProtocols.new(3)
ESNMPAuthenticationProtocols.SHA256 = ESNMPAuthenticationProtocols.new(4)
ESNMPAuthenticationProtocols.SHA384 = ESNMPAuthenticationProtocols.new(5)
ESNMPAuthenticationProtocols.SHA512 = ESNMPAuthenticationProtocols.new(6)

def_types.SNMPAuthenticationProtocols = ESNMPAuthenticationProtocols

---@class def_types.FirstLoginPolicy: Enum
local EFirstLoginPolicy = create_enum_type('FirstLoginPolicy')
EFirstLoginPolicy.default = EFirstLoginPolicy.new(2147483647)
EFirstLoginPolicy.struct = nil
EFirstLoginPolicy.Null = EFirstLoginPolicy.new(0)
EFirstLoginPolicy.PromptPasswordReset = EFirstLoginPolicy.new(1)
EFirstLoginPolicy.ForcePasswordReset = EFirstLoginPolicy.new(2)

def_types.FirstLoginPolicy = EFirstLoginPolicy

return def_types
