-- Copyright (c) 2026 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 MSystemsPCIeTopoInfo = {}

---@class MSystemsPCIeTopoInfo.MMIO5Limit
---@field MMIO5Limit integer
local TMMIO5Limit = {}
TMMIO5Limit.__index = TMMIO5Limit
TMMIO5Limit.group = {}

local function TMMIO5Limit_from_obj(obj)
    return setmetatable(obj, TMMIO5Limit)
end

function TMMIO5Limit.new(MMIO5Limit)
    return TMMIO5Limit_from_obj({MMIO5Limit = MMIO5Limit or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO5Limit
function TMMIO5Limit:init_from_obj(obj)
    self.MMIO5Limit = obj.MMIO5Limit or 0
end

function TMMIO5Limit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO5Limit.group)
end

TMMIO5Limit.from_obj = TMMIO5Limit_from_obj

TMMIO5Limit.proto_property = {'MMIO5Limit'}

TMMIO5Limit.default = {0}

TMMIO5Limit.struct = {{name = 'MMIO5Limit', is_array = false, struct = nil}}

function TMMIO5Limit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO5Limit', self.MMIO5Limit, 'uint64', false, errs, need_convert)

    TMMIO5Limit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO5Limit.proto_property, errs, need_convert)
    return self
end

function TMMIO5Limit:unpack(_)
    return self.MMIO5Limit
end

MSystemsPCIeTopoInfo.MMIO5Limit = TMMIO5Limit

---@class MSystemsPCIeTopoInfo.MMIO5Base
---@field MMIO5Base integer
local TMMIO5Base = {}
TMMIO5Base.__index = TMMIO5Base
TMMIO5Base.group = {}

local function TMMIO5Base_from_obj(obj)
    return setmetatable(obj, TMMIO5Base)
end

function TMMIO5Base.new(MMIO5Base)
    return TMMIO5Base_from_obj({MMIO5Base = MMIO5Base or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO5Base
function TMMIO5Base:init_from_obj(obj)
    self.MMIO5Base = obj.MMIO5Base or 0
end

function TMMIO5Base:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO5Base.group)
end

TMMIO5Base.from_obj = TMMIO5Base_from_obj

TMMIO5Base.proto_property = {'MMIO5Base'}

TMMIO5Base.default = {0}

TMMIO5Base.struct = {{name = 'MMIO5Base', is_array = false, struct = nil}}

function TMMIO5Base:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO5Base', self.MMIO5Base, 'uint64', false, errs, need_convert)

    TMMIO5Base:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO5Base.proto_property, errs, need_convert)
    return self
end

function TMMIO5Base:unpack(_)
    return self.MMIO5Base
end

MSystemsPCIeTopoInfo.MMIO5Base = TMMIO5Base

---@class MSystemsPCIeTopoInfo.MMIO4Limit
---@field MMIO4Limit integer
local TMMIO4Limit = {}
TMMIO4Limit.__index = TMMIO4Limit
TMMIO4Limit.group = {}

local function TMMIO4Limit_from_obj(obj)
    return setmetatable(obj, TMMIO4Limit)
end

function TMMIO4Limit.new(MMIO4Limit)
    return TMMIO4Limit_from_obj({MMIO4Limit = MMIO4Limit or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO4Limit
function TMMIO4Limit:init_from_obj(obj)
    self.MMIO4Limit = obj.MMIO4Limit or 0
end

function TMMIO4Limit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO4Limit.group)
end

TMMIO4Limit.from_obj = TMMIO4Limit_from_obj

TMMIO4Limit.proto_property = {'MMIO4Limit'}

TMMIO4Limit.default = {0}

TMMIO4Limit.struct = {{name = 'MMIO4Limit', is_array = false, struct = nil}}

function TMMIO4Limit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO4Limit', self.MMIO4Limit, 'uint64', false, errs, need_convert)

    TMMIO4Limit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO4Limit.proto_property, errs, need_convert)
    return self
end

function TMMIO4Limit:unpack(_)
    return self.MMIO4Limit
end

MSystemsPCIeTopoInfo.MMIO4Limit = TMMIO4Limit

---@class MSystemsPCIeTopoInfo.MMIO4Base
---@field MMIO4Base integer
local TMMIO4Base = {}
TMMIO4Base.__index = TMMIO4Base
TMMIO4Base.group = {}

local function TMMIO4Base_from_obj(obj)
    return setmetatable(obj, TMMIO4Base)
end

function TMMIO4Base.new(MMIO4Base)
    return TMMIO4Base_from_obj({MMIO4Base = MMIO4Base or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO4Base
function TMMIO4Base:init_from_obj(obj)
    self.MMIO4Base = obj.MMIO4Base or 0
end

function TMMIO4Base:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO4Base.group)
end

TMMIO4Base.from_obj = TMMIO4Base_from_obj

TMMIO4Base.proto_property = {'MMIO4Base'}

TMMIO4Base.default = {0}

TMMIO4Base.struct = {{name = 'MMIO4Base', is_array = false, struct = nil}}

function TMMIO4Base:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO4Base', self.MMIO4Base, 'uint64', false, errs, need_convert)

    TMMIO4Base:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO4Base.proto_property, errs, need_convert)
    return self
end

function TMMIO4Base:unpack(_)
    return self.MMIO4Base
end

MSystemsPCIeTopoInfo.MMIO4Base = TMMIO4Base

---@class MSystemsPCIeTopoInfo.MMIO3Limit
---@field MMIO3Limit integer
local TMMIO3Limit = {}
TMMIO3Limit.__index = TMMIO3Limit
TMMIO3Limit.group = {}

local function TMMIO3Limit_from_obj(obj)
    return setmetatable(obj, TMMIO3Limit)
end

function TMMIO3Limit.new(MMIO3Limit)
    return TMMIO3Limit_from_obj({MMIO3Limit = MMIO3Limit or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO3Limit
function TMMIO3Limit:init_from_obj(obj)
    self.MMIO3Limit = obj.MMIO3Limit or 0
end

function TMMIO3Limit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO3Limit.group)
end

TMMIO3Limit.from_obj = TMMIO3Limit_from_obj

TMMIO3Limit.proto_property = {'MMIO3Limit'}

TMMIO3Limit.default = {0}

TMMIO3Limit.struct = {{name = 'MMIO3Limit', is_array = false, struct = nil}}

function TMMIO3Limit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO3Limit', self.MMIO3Limit, 'uint64', false, errs, need_convert)

    TMMIO3Limit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO3Limit.proto_property, errs, need_convert)
    return self
end

function TMMIO3Limit:unpack(_)
    return self.MMIO3Limit
end

MSystemsPCIeTopoInfo.MMIO3Limit = TMMIO3Limit

---@class MSystemsPCIeTopoInfo.MMIO3Base
---@field MMIO3Base integer
local TMMIO3Base = {}
TMMIO3Base.__index = TMMIO3Base
TMMIO3Base.group = {}

local function TMMIO3Base_from_obj(obj)
    return setmetatable(obj, TMMIO3Base)
end

function TMMIO3Base.new(MMIO3Base)
    return TMMIO3Base_from_obj({MMIO3Base = MMIO3Base or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO3Base
function TMMIO3Base:init_from_obj(obj)
    self.MMIO3Base = obj.MMIO3Base or 0
end

function TMMIO3Base:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO3Base.group)
end

TMMIO3Base.from_obj = TMMIO3Base_from_obj

TMMIO3Base.proto_property = {'MMIO3Base'}

TMMIO3Base.default = {0}

TMMIO3Base.struct = {{name = 'MMIO3Base', is_array = false, struct = nil}}

function TMMIO3Base:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO3Base', self.MMIO3Base, 'uint64', false, errs, need_convert)

    TMMIO3Base:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO3Base.proto_property, errs, need_convert)
    return self
end

function TMMIO3Base:unpack(_)
    return self.MMIO3Base
end

MSystemsPCIeTopoInfo.MMIO3Base = TMMIO3Base

---@class MSystemsPCIeTopoInfo.MMIO2Limit
---@field MMIO2Limit integer
local TMMIO2Limit = {}
TMMIO2Limit.__index = TMMIO2Limit
TMMIO2Limit.group = {}

local function TMMIO2Limit_from_obj(obj)
    return setmetatable(obj, TMMIO2Limit)
end

function TMMIO2Limit.new(MMIO2Limit)
    return TMMIO2Limit_from_obj({MMIO2Limit = MMIO2Limit or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO2Limit
function TMMIO2Limit:init_from_obj(obj)
    self.MMIO2Limit = obj.MMIO2Limit or 0
end

function TMMIO2Limit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO2Limit.group)
end

TMMIO2Limit.from_obj = TMMIO2Limit_from_obj

TMMIO2Limit.proto_property = {'MMIO2Limit'}

TMMIO2Limit.default = {0}

TMMIO2Limit.struct = {{name = 'MMIO2Limit', is_array = false, struct = nil}}

function TMMIO2Limit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO2Limit', self.MMIO2Limit, 'uint64', false, errs, need_convert)

    TMMIO2Limit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO2Limit.proto_property, errs, need_convert)
    return self
end

function TMMIO2Limit:unpack(_)
    return self.MMIO2Limit
end

MSystemsPCIeTopoInfo.MMIO2Limit = TMMIO2Limit

---@class MSystemsPCIeTopoInfo.MMIO2Base
---@field MMIO2Base integer
local TMMIO2Base = {}
TMMIO2Base.__index = TMMIO2Base
TMMIO2Base.group = {}

local function TMMIO2Base_from_obj(obj)
    return setmetatable(obj, TMMIO2Base)
end

function TMMIO2Base.new(MMIO2Base)
    return TMMIO2Base_from_obj({MMIO2Base = MMIO2Base or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO2Base
function TMMIO2Base:init_from_obj(obj)
    self.MMIO2Base = obj.MMIO2Base or 0
end

function TMMIO2Base:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO2Base.group)
end

TMMIO2Base.from_obj = TMMIO2Base_from_obj

TMMIO2Base.proto_property = {'MMIO2Base'}

TMMIO2Base.default = {0}

TMMIO2Base.struct = {{name = 'MMIO2Base', is_array = false, struct = nil}}

function TMMIO2Base:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO2Base', self.MMIO2Base, 'uint64', false, errs, need_convert)

    TMMIO2Base:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO2Base.proto_property, errs, need_convert)
    return self
end

function TMMIO2Base:unpack(_)
    return self.MMIO2Base
end

MSystemsPCIeTopoInfo.MMIO2Base = TMMIO2Base

---@class MSystemsPCIeTopoInfo.MMIO1Limit
---@field MMIO1Limit integer
local TMMIO1Limit = {}
TMMIO1Limit.__index = TMMIO1Limit
TMMIO1Limit.group = {}

local function TMMIO1Limit_from_obj(obj)
    return setmetatable(obj, TMMIO1Limit)
end

function TMMIO1Limit.new(MMIO1Limit)
    return TMMIO1Limit_from_obj({MMIO1Limit = MMIO1Limit or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO1Limit
function TMMIO1Limit:init_from_obj(obj)
    self.MMIO1Limit = obj.MMIO1Limit or 0
end

function TMMIO1Limit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO1Limit.group)
end

TMMIO1Limit.from_obj = TMMIO1Limit_from_obj

TMMIO1Limit.proto_property = {'MMIO1Limit'}

TMMIO1Limit.default = {0}

TMMIO1Limit.struct = {{name = 'MMIO1Limit', is_array = false, struct = nil}}

function TMMIO1Limit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO1Limit', self.MMIO1Limit, 'uint64', false, errs, need_convert)

    TMMIO1Limit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO1Limit.proto_property, errs, need_convert)
    return self
end

function TMMIO1Limit:unpack(_)
    return self.MMIO1Limit
end

MSystemsPCIeTopoInfo.MMIO1Limit = TMMIO1Limit

---@class MSystemsPCIeTopoInfo.MMIO1Base
---@field MMIO1Base integer
local TMMIO1Base = {}
TMMIO1Base.__index = TMMIO1Base
TMMIO1Base.group = {}

local function TMMIO1Base_from_obj(obj)
    return setmetatable(obj, TMMIO1Base)
end

function TMMIO1Base.new(MMIO1Base)
    return TMMIO1Base_from_obj({MMIO1Base = MMIO1Base or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO1Base
function TMMIO1Base:init_from_obj(obj)
    self.MMIO1Base = obj.MMIO1Base or 0
end

function TMMIO1Base:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO1Base.group)
end

TMMIO1Base.from_obj = TMMIO1Base_from_obj

TMMIO1Base.proto_property = {'MMIO1Base'}

TMMIO1Base.default = {0}

TMMIO1Base.struct = {{name = 'MMIO1Base', is_array = false, struct = nil}}

function TMMIO1Base:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO1Base', self.MMIO1Base, 'uint64', false, errs, need_convert)

    TMMIO1Base:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO1Base.proto_property, errs, need_convert)
    return self
end

function TMMIO1Base:unpack(_)
    return self.MMIO1Base
end

MSystemsPCIeTopoInfo.MMIO1Base = TMMIO1Base

---@class MSystemsPCIeTopoInfo.MMIO0Limit
---@field MMIO0Limit integer
local TMMIO0Limit = {}
TMMIO0Limit.__index = TMMIO0Limit
TMMIO0Limit.group = {}

local function TMMIO0Limit_from_obj(obj)
    return setmetatable(obj, TMMIO0Limit)
end

function TMMIO0Limit.new(MMIO0Limit)
    return TMMIO0Limit_from_obj({MMIO0Limit = MMIO0Limit or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO0Limit
function TMMIO0Limit:init_from_obj(obj)
    self.MMIO0Limit = obj.MMIO0Limit or 0
end

function TMMIO0Limit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO0Limit.group)
end

TMMIO0Limit.from_obj = TMMIO0Limit_from_obj

TMMIO0Limit.proto_property = {'MMIO0Limit'}

TMMIO0Limit.default = {0}

TMMIO0Limit.struct = {{name = 'MMIO0Limit', is_array = false, struct = nil}}

function TMMIO0Limit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO0Limit', self.MMIO0Limit, 'uint64', false, errs, need_convert)

    TMMIO0Limit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO0Limit.proto_property, errs, need_convert)
    return self
end

function TMMIO0Limit:unpack(_)
    return self.MMIO0Limit
end

MSystemsPCIeTopoInfo.MMIO0Limit = TMMIO0Limit

---@class MSystemsPCIeTopoInfo.MMIO0Base
---@field MMIO0Base integer
local TMMIO0Base = {}
TMMIO0Base.__index = TMMIO0Base
TMMIO0Base.group = {}

local function TMMIO0Base_from_obj(obj)
    return setmetatable(obj, TMMIO0Base)
end

function TMMIO0Base.new(MMIO0Base)
    return TMMIO0Base_from_obj({MMIO0Base = MMIO0Base or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIO0Base
function TMMIO0Base:init_from_obj(obj)
    self.MMIO0Base = obj.MMIO0Base or 0
end

function TMMIO0Base:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIO0Base.group)
end

TMMIO0Base.from_obj = TMMIO0Base_from_obj

TMMIO0Base.proto_property = {'MMIO0Base'}

TMMIO0Base.default = {0}

TMMIO0Base.struct = {{name = 'MMIO0Base', is_array = false, struct = nil}}

function TMMIO0Base:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIO0Base', self.MMIO0Base, 'uint64', false, errs, need_convert)

    TMMIO0Base:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIO0Base.proto_property, errs, need_convert)
    return self
end

function TMMIO0Base:unpack(_)
    return self.MMIO0Base
end

MSystemsPCIeTopoInfo.MMIO0Base = TMMIO0Base

---@class MSystemsPCIeTopoInfo.MMIOCnt
---@field MMIOCnt integer
local TMMIOCnt = {}
TMMIOCnt.__index = TMMIOCnt
TMMIOCnt.group = {}

local function TMMIOCnt_from_obj(obj)
    return setmetatable(obj, TMMIOCnt)
end

function TMMIOCnt.new(MMIOCnt)
    return TMMIOCnt_from_obj({MMIOCnt = MMIOCnt or 0})
end
---@param obj MSystemsPCIeTopoInfo.MMIOCnt
function TMMIOCnt:init_from_obj(obj)
    self.MMIOCnt = obj.MMIOCnt or 0
end

function TMMIOCnt:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMMIOCnt.group)
end

TMMIOCnt.from_obj = TMMIOCnt_from_obj

TMMIOCnt.proto_property = {'MMIOCnt'}

TMMIOCnt.default = {0}

TMMIOCnt.struct = {{name = 'MMIOCnt', is_array = false, struct = nil}}

function TMMIOCnt:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MMIOCnt', self.MMIOCnt, 'uint8', false, errs, need_convert)

    TMMIOCnt:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMMIOCnt.proto_property, errs, need_convert)
    return self
end

function TMMIOCnt:unpack(_)
    return self.MMIOCnt
end

MSystemsPCIeTopoInfo.MMIOCnt = TMMIOCnt

---@class MSystemsPCIeTopoInfo.UpdateFlag
---@field UpdateFlag integer
local TUpdateFlag = {}
TUpdateFlag.__index = TUpdateFlag
TUpdateFlag.group = {}

local function TUpdateFlag_from_obj(obj)
    return setmetatable(obj, TUpdateFlag)
end

function TUpdateFlag.new(UpdateFlag)
    return TUpdateFlag_from_obj({UpdateFlag = UpdateFlag or 0})
end
---@param obj MSystemsPCIeTopoInfo.UpdateFlag
function TUpdateFlag:init_from_obj(obj)
    self.UpdateFlag = obj.UpdateFlag or 0
end

function TUpdateFlag:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TUpdateFlag.group)
end

TUpdateFlag.from_obj = TUpdateFlag_from_obj

TUpdateFlag.proto_property = {'UpdateFlag'}

TUpdateFlag.default = {0}

TUpdateFlag.struct = {{name = 'UpdateFlag', is_array = false, struct = nil}}

function TUpdateFlag:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'UpdateFlag', self.UpdateFlag, 'uint8', false, errs, need_convert)

    TUpdateFlag:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TUpdateFlag.proto_property, errs, need_convert)
    return self
end

function TUpdateFlag:unpack(_)
    return self.UpdateFlag
end

MSystemsPCIeTopoInfo.UpdateFlag = TUpdateFlag

---@class MSystemsPCIeTopoInfo.Reserved4
---@field Reserved4 integer
local TReserved4 = {}
TReserved4.__index = TReserved4
TReserved4.group = {}

local function TReserved4_from_obj(obj)
    return setmetatable(obj, TReserved4)
end

function TReserved4.new(Reserved4)
    return TReserved4_from_obj({Reserved4 = Reserved4 or 0})
end
---@param obj MSystemsPCIeTopoInfo.Reserved4
function TReserved4:init_from_obj(obj)
    self.Reserved4 = obj.Reserved4 or 0
end

function TReserved4:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TReserved4.group)
end

TReserved4.from_obj = TReserved4_from_obj

TReserved4.proto_property = {'Reserved4'}

TReserved4.default = {0}

TReserved4.struct = {{name = 'Reserved4', is_array = false, struct = nil}}

function TReserved4:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Reserved4', self.Reserved4, 'uint32', false, errs, need_convert)

    TReserved4:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TReserved4.proto_property, errs, need_convert)
    return self
end

function TReserved4:unpack(_)
    return self.Reserved4
end

MSystemsPCIeTopoInfo.Reserved4 = TReserved4

---@class MSystemsPCIeTopoInfo.Reserved2
---@field Reserved2 integer
local TReserved2 = {}
TReserved2.__index = TReserved2
TReserved2.group = {}

local function TReserved2_from_obj(obj)
    return setmetatable(obj, TReserved2)
end

function TReserved2.new(Reserved2)
    return TReserved2_from_obj({Reserved2 = Reserved2 or 0})
end
---@param obj MSystemsPCIeTopoInfo.Reserved2
function TReserved2:init_from_obj(obj)
    self.Reserved2 = obj.Reserved2 or 0
end

function TReserved2:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TReserved2.group)
end

TReserved2.from_obj = TReserved2_from_obj

TReserved2.proto_property = {'Reserved2'}

TReserved2.default = {0}

TReserved2.struct = {{name = 'Reserved2', is_array = false, struct = nil}}

function TReserved2:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Reserved2', self.Reserved2, 'uint16', false, errs, need_convert)

    TReserved2:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TReserved2.proto_property, errs, need_convert)
    return self
end

function TReserved2:unpack(_)
    return self.Reserved2
end

MSystemsPCIeTopoInfo.Reserved2 = TReserved2

---@class MSystemsPCIeTopoInfo.CfgHighLimit
---@field CfgHighLimit integer
local TCfgHighLimit = {}
TCfgHighLimit.__index = TCfgHighLimit
TCfgHighLimit.group = {}

local function TCfgHighLimit_from_obj(obj)
    return setmetatable(obj, TCfgHighLimit)
end

function TCfgHighLimit.new(CfgHighLimit)
    return TCfgHighLimit_from_obj({CfgHighLimit = CfgHighLimit or 0})
end
---@param obj MSystemsPCIeTopoInfo.CfgHighLimit
function TCfgHighLimit:init_from_obj(obj)
    self.CfgHighLimit = obj.CfgHighLimit or 0
end

function TCfgHighLimit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCfgHighLimit.group)
end

TCfgHighLimit.from_obj = TCfgHighLimit_from_obj

TCfgHighLimit.proto_property = {'CfgHighLimit'}

TCfgHighLimit.default = {0}

TCfgHighLimit.struct = {{name = 'CfgHighLimit', is_array = false, struct = nil}}

function TCfgHighLimit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'CfgHighLimit', self.CfgHighLimit, 'uint64', false, errs, need_convert)

    TCfgHighLimit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCfgHighLimit.proto_property, errs, need_convert)
    return self
end

function TCfgHighLimit:unpack(_)
    return self.CfgHighLimit
end

MSystemsPCIeTopoInfo.CfgHighLimit = TCfgHighLimit

---@class MSystemsPCIeTopoInfo.CfgHighBase
---@field CfgHighBase integer
local TCfgHighBase = {}
TCfgHighBase.__index = TCfgHighBase
TCfgHighBase.group = {}

local function TCfgHighBase_from_obj(obj)
    return setmetatable(obj, TCfgHighBase)
end

function TCfgHighBase.new(CfgHighBase)
    return TCfgHighBase_from_obj({CfgHighBase = CfgHighBase or 0})
end
---@param obj MSystemsPCIeTopoInfo.CfgHighBase
function TCfgHighBase:init_from_obj(obj)
    self.CfgHighBase = obj.CfgHighBase or 0
end

function TCfgHighBase:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCfgHighBase.group)
end

TCfgHighBase.from_obj = TCfgHighBase_from_obj

TCfgHighBase.proto_property = {'CfgHighBase'}

TCfgHighBase.default = {0}

TCfgHighBase.struct = {{name = 'CfgHighBase', is_array = false, struct = nil}}

function TCfgHighBase:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'CfgHighBase', self.CfgHighBase, 'uint64', false, errs, need_convert)

    TCfgHighBase:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCfgHighBase.proto_property, errs, need_convert)
    return self
end

function TCfgHighBase:unpack(_)
    return self.CfgHighBase
end

MSystemsPCIeTopoInfo.CfgHighBase = TCfgHighBase

---@class MSystemsPCIeTopoInfo.CfgLowLimit
---@field CfgLowLimit integer
local TCfgLowLimit = {}
TCfgLowLimit.__index = TCfgLowLimit
TCfgLowLimit.group = {}

local function TCfgLowLimit_from_obj(obj)
    return setmetatable(obj, TCfgLowLimit)
end

function TCfgLowLimit.new(CfgLowLimit)
    return TCfgLowLimit_from_obj({CfgLowLimit = CfgLowLimit or 0})
end
---@param obj MSystemsPCIeTopoInfo.CfgLowLimit
function TCfgLowLimit:init_from_obj(obj)
    self.CfgLowLimit = obj.CfgLowLimit or 0
end

function TCfgLowLimit:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCfgLowLimit.group)
end

TCfgLowLimit.from_obj = TCfgLowLimit_from_obj

TCfgLowLimit.proto_property = {'CfgLowLimit'}

TCfgLowLimit.default = {0}

TCfgLowLimit.struct = {{name = 'CfgLowLimit', is_array = false, struct = nil}}

function TCfgLowLimit:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'CfgLowLimit', self.CfgLowLimit, 'uint32', false, errs, need_convert)

    TCfgLowLimit:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCfgLowLimit.proto_property, errs, need_convert)
    return self
end

function TCfgLowLimit:unpack(_)
    return self.CfgLowLimit
end

MSystemsPCIeTopoInfo.CfgLowLimit = TCfgLowLimit

---@class MSystemsPCIeTopoInfo.CfgLowBase
---@field CfgLowBase integer
local TCfgLowBase = {}
TCfgLowBase.__index = TCfgLowBase
TCfgLowBase.group = {}

local function TCfgLowBase_from_obj(obj)
    return setmetatable(obj, TCfgLowBase)
end

function TCfgLowBase.new(CfgLowBase)
    return TCfgLowBase_from_obj({CfgLowBase = CfgLowBase or 0})
end
---@param obj MSystemsPCIeTopoInfo.CfgLowBase
function TCfgLowBase:init_from_obj(obj)
    self.CfgLowBase = obj.CfgLowBase or 0
end

function TCfgLowBase:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCfgLowBase.group)
end

TCfgLowBase.from_obj = TCfgLowBase_from_obj

TCfgLowBase.proto_property = {'CfgLowBase'}

TCfgLowBase.default = {0}

TCfgLowBase.struct = {{name = 'CfgLowBase', is_array = false, struct = nil}}

function TCfgLowBase:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'CfgLowBase', self.CfgLowBase, 'uint32', false, errs, need_convert)

    TCfgLowBase:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCfgLowBase.proto_property, errs, need_convert)
    return self
end

function TCfgLowBase:unpack(_)
    return self.CfgLowBase
end

MSystemsPCIeTopoInfo.CfgLowBase = TCfgLowBase

---@class MSystemsPCIeTopoInfo.Reserved1
---@field Reserved1 integer
local TReserved1 = {}
TReserved1.__index = TReserved1
TReserved1.group = {}

local function TReserved1_from_obj(obj)
    return setmetatable(obj, TReserved1)
end

function TReserved1.new(Reserved1)
    return TReserved1_from_obj({Reserved1 = Reserved1 or 0})
end
---@param obj MSystemsPCIeTopoInfo.Reserved1
function TReserved1:init_from_obj(obj)
    self.Reserved1 = obj.Reserved1 or 0
end

function TReserved1:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TReserved1.group)
end

TReserved1.from_obj = TReserved1_from_obj

TReserved1.proto_property = {'Reserved1'}

TReserved1.default = {0}

TReserved1.struct = {{name = 'Reserved1', is_array = false, struct = nil}}

function TReserved1:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Reserved1', self.Reserved1, 'uint8', false, errs, need_convert)

    TReserved1:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TReserved1.proto_property, errs, need_convert)
    return self
end

function TReserved1:unpack(_)
    return self.Reserved1
end

MSystemsPCIeTopoInfo.Reserved1 = TReserved1

---@class MSystemsPCIeTopoInfo.BDFNo
---@field BDFNo integer
local TBDFNo = {}
TBDFNo.__index = TBDFNo
TBDFNo.group = {}

local function TBDFNo_from_obj(obj)
    return setmetatable(obj, TBDFNo)
end

function TBDFNo.new(BDFNo)
    return TBDFNo_from_obj({BDFNo = BDFNo or 0})
end
---@param obj MSystemsPCIeTopoInfo.BDFNo
function TBDFNo:init_from_obj(obj)
    self.BDFNo = obj.BDFNo or 0
end

function TBDFNo:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TBDFNo.group)
end

TBDFNo.from_obj = TBDFNo_from_obj

TBDFNo.proto_property = {'BDFNo'}

TBDFNo.default = {0}

TBDFNo.struct = {{name = 'BDFNo', is_array = false, struct = nil}}

function TBDFNo:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'BDFNo', self.BDFNo, 'uint8', false, errs, need_convert)

    TBDFNo:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TBDFNo.proto_property, errs, need_convert)
    return self
end

function TBDFNo:unpack(_)
    return self.BDFNo
end

MSystemsPCIeTopoInfo.BDFNo = TBDFNo

---@class MSystemsPCIeTopoInfo.SubBus
---@field SubBus integer
local TSubBus = {}
TSubBus.__index = TSubBus
TSubBus.group = {}

local function TSubBus_from_obj(obj)
    return setmetatable(obj, TSubBus)
end

function TSubBus.new(SubBus)
    return TSubBus_from_obj({SubBus = SubBus or 0})
end
---@param obj MSystemsPCIeTopoInfo.SubBus
function TSubBus:init_from_obj(obj)
    self.SubBus = obj.SubBus or 0
end

function TSubBus:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSubBus.group)
end

TSubBus.from_obj = TSubBus_from_obj

TSubBus.proto_property = {'SubBus'}

TSubBus.default = {0}

TSubBus.struct = {{name = 'SubBus', is_array = false, struct = nil}}

function TSubBus:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'SubBus', self.SubBus, 'uint8', false, errs, need_convert)

    TSubBus:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSubBus.proto_property, errs, need_convert)
    return self
end

function TSubBus:unpack(_)
    return self.SubBus
end

MSystemsPCIeTopoInfo.SubBus = TSubBus

---@class MSystemsPCIeTopoInfo.SecBus
---@field SecBus integer
local TSecBus = {}
TSecBus.__index = TSecBus
TSecBus.group = {}

local function TSecBus_from_obj(obj)
    return setmetatable(obj, TSecBus)
end

function TSecBus.new(SecBus)
    return TSecBus_from_obj({SecBus = SecBus or 0})
end
---@param obj MSystemsPCIeTopoInfo.SecBus
function TSecBus:init_from_obj(obj)
    self.SecBus = obj.SecBus or 0
end

function TSecBus:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSecBus.group)
end

TSecBus.from_obj = TSecBus_from_obj

TSecBus.proto_property = {'SecBus'}

TSecBus.default = {0}

TSecBus.struct = {{name = 'SecBus', is_array = false, struct = nil}}

function TSecBus:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'SecBus', self.SecBus, 'uint8', false, errs, need_convert)

    TSecBus:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSecBus.proto_property, errs, need_convert)
    return self
end

function TSecBus:unpack(_)
    return self.SecBus
end

MSystemsPCIeTopoInfo.SecBus = TSecBus

---@class MSystemsPCIeTopoInfo.DeviceId
---@field DeviceId integer
local TDeviceId = {}
TDeviceId.__index = TDeviceId
TDeviceId.group = {}

local function TDeviceId_from_obj(obj)
    return setmetatable(obj, TDeviceId)
end

function TDeviceId.new(DeviceId)
    return TDeviceId_from_obj({DeviceId = DeviceId or 0})
end
---@param obj MSystemsPCIeTopoInfo.DeviceId
function TDeviceId:init_from_obj(obj)
    self.DeviceId = obj.DeviceId or 0
end

function TDeviceId:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TDeviceId.group)
end

TDeviceId.from_obj = TDeviceId_from_obj

TDeviceId.proto_property = {'DeviceId'}

TDeviceId.default = {0}

TDeviceId.struct = {{name = 'DeviceId', is_array = false, struct = nil}}

function TDeviceId:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'DeviceId', self.DeviceId, 'uint16', false, errs, need_convert)

    TDeviceId:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TDeviceId.proto_property, errs, need_convert)
    return self
end

function TDeviceId:unpack(_)
    return self.DeviceId
end

MSystemsPCIeTopoInfo.DeviceId = TDeviceId

---@class MSystemsPCIeTopoInfo.VendorId
---@field VendorId integer
local TVendorId = {}
TVendorId.__index = TVendorId
TVendorId.group = {}

local function TVendorId_from_obj(obj)
    return setmetatable(obj, TVendorId)
end

function TVendorId.new(VendorId)
    return TVendorId_from_obj({VendorId = VendorId or 0})
end
---@param obj MSystemsPCIeTopoInfo.VendorId
function TVendorId:init_from_obj(obj)
    self.VendorId = obj.VendorId or 0
end

function TVendorId:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TVendorId.group)
end

TVendorId.from_obj = TVendorId_from_obj

TVendorId.proto_property = {'VendorId'}

TVendorId.default = {0}

TVendorId.struct = {{name = 'VendorId', is_array = false, struct = nil}}

function TVendorId:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'VendorId', self.VendorId, 'uint16', false, errs, need_convert)

    TVendorId:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TVendorId.proto_property, errs, need_convert)
    return self
end

function TVendorId:unpack(_)
    return self.VendorId
end

MSystemsPCIeTopoInfo.VendorId = TVendorId

---@class MSystemsPCIeTopoInfo.Slot
---@field Slot integer
local TSlot = {}
TSlot.__index = TSlot
TSlot.group = {}

local function TSlot_from_obj(obj)
    return setmetatable(obj, TSlot)
end

function TSlot.new(Slot)
    return TSlot_from_obj({Slot = Slot or 0})
end
---@param obj MSystemsPCIeTopoInfo.Slot
function TSlot:init_from_obj(obj)
    self.Slot = obj.Slot or 0
end

function TSlot:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSlot.group)
end

TSlot.from_obj = TSlot_from_obj

TSlot.proto_property = {'Slot'}

TSlot.default = {0}

TSlot.struct = {{name = 'Slot', is_array = false, struct = nil}}

function TSlot:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Slot', self.Slot, 'uint8', false, errs, need_convert)

    TSlot:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSlot.proto_property, errs, need_convert)
    return self
end

function TSlot:unpack(_)
    return self.Slot
end

MSystemsPCIeTopoInfo.Slot = TSlot

---@class MSystemsPCIeTopoInfo.ComponentType
---@field ComponentType integer
local TComponentType = {}
TComponentType.__index = TComponentType
TComponentType.group = {}

local function TComponentType_from_obj(obj)
    return setmetatable(obj, TComponentType)
end

function TComponentType.new(ComponentType)
    return TComponentType_from_obj({ComponentType = ComponentType or 0})
end
---@param obj MSystemsPCIeTopoInfo.ComponentType
function TComponentType:init_from_obj(obj)
    self.ComponentType = obj.ComponentType or 0
end

function TComponentType:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TComponentType.group)
end

TComponentType.from_obj = TComponentType_from_obj

TComponentType.proto_property = {'ComponentType'}

TComponentType.default = {0}

TComponentType.struct = {{name = 'ComponentType', is_array = false, struct = nil}}

function TComponentType:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'ComponentType', self.ComponentType, 'uint8', false, errs, need_convert)

    TComponentType:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TComponentType.proto_property, errs, need_convert)
    return self
end

function TComponentType:unpack(_)
    return self.ComponentType
end

MSystemsPCIeTopoInfo.ComponentType = TComponentType

---@class MSystemsPCIeTopoInfo.GroupId
---@field GroupId integer
local TGroupId = {}
TGroupId.__index = TGroupId
TGroupId.group = {}

local function TGroupId_from_obj(obj)
    return setmetatable(obj, TGroupId)
end

function TGroupId.new(GroupId)
    return TGroupId_from_obj({GroupId = GroupId or 0})
end
---@param obj MSystemsPCIeTopoInfo.GroupId
function TGroupId:init_from_obj(obj)
    self.GroupId = obj.GroupId or 0
end

function TGroupId:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGroupId.group)
end

TGroupId.from_obj = TGroupId_from_obj

TGroupId.proto_property = {'GroupId'}

TGroupId.default = {0}

TGroupId.struct = {{name = 'GroupId', is_array = false, struct = nil}}

function TGroupId:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'GroupId', self.GroupId, 'uint8', false, errs, need_convert)

    TGroupId:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGroupId.proto_property, errs, need_convert)
    return self
end

function TGroupId:unpack(_)
    return self.GroupId
end

MSystemsPCIeTopoInfo.GroupId = TGroupId

---@class MSystemsPCIeTopoInfo.Function
---@field Function integer
local TFunction = {}
TFunction.__index = TFunction
TFunction.group = {}

local function TFunction_from_obj(obj)
    return setmetatable(obj, TFunction)
end

function TFunction.new(Function)
    return TFunction_from_obj({Function = Function or 0})
end
---@param obj MSystemsPCIeTopoInfo.Function
function TFunction:init_from_obj(obj)
    self.Function = obj.Function or 0
end

function TFunction:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TFunction.group)
end

TFunction.from_obj = TFunction_from_obj

TFunction.proto_property = {'Function'}

TFunction.default = {0}

TFunction.struct = {{name = 'Function', is_array = false, struct = nil}}

function TFunction:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'Function', self.Function, 'uint8', false, errs, need_convert)

    TFunction:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TFunction.proto_property, errs, need_convert)
    return self
end

function TFunction:unpack(_)
    return self.Function
end

MSystemsPCIeTopoInfo.Function = TFunction

---@class MSystemsPCIeTopoInfo.Device
---@field Device integer
local TDevice = {}
TDevice.__index = TDevice
TDevice.group = {}

local function TDevice_from_obj(obj)
    return setmetatable(obj, TDevice)
end

function TDevice.new(Device)
    return TDevice_from_obj({Device = Device or 0})
end
---@param obj MSystemsPCIeTopoInfo.Device
function TDevice:init_from_obj(obj)
    self.Device = obj.Device or 0
end

function TDevice:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TDevice.group)
end

TDevice.from_obj = TDevice_from_obj

TDevice.proto_property = {'Device'}

TDevice.default = {0}

TDevice.struct = {{name = 'Device', is_array = false, struct = nil}}

function TDevice:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'Device', self.Device, 'uint8', false, errs, need_convert)

    TDevice:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TDevice.proto_property, errs, need_convert)
    return self
end

function TDevice:unpack(_)
    return self.Device
end

MSystemsPCIeTopoInfo.Device = TDevice

---@class MSystemsPCIeTopoInfo.Bus
---@field Bus integer
local TBus = {}
TBus.__index = TBus
TBus.group = {}

local function TBus_from_obj(obj)
    return setmetatable(obj, TBus)
end

function TBus.new(Bus)
    return TBus_from_obj({Bus = Bus or 0})
end
---@param obj MSystemsPCIeTopoInfo.Bus
function TBus:init_from_obj(obj)
    self.Bus = obj.Bus or 0
end

function TBus:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TBus.group)
end

TBus.from_obj = TBus_from_obj

TBus.proto_property = {'Bus'}

TBus.default = {0}

TBus.struct = {{name = 'Bus', is_array = false, struct = nil}}

function TBus:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'Bus', self.Bus, 'uint8', false, errs, need_convert)

    TBus:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TBus.proto_property, errs, need_convert)
    return self
end

function TBus:unpack(_)
    return self.Bus
end

MSystemsPCIeTopoInfo.Bus = TBus

---@class MSystemsPCIeTopoInfo.Socket
---@field Socket integer
local TSocket = {}
TSocket.__index = TSocket
TSocket.group = {}

local function TSocket_from_obj(obj)
    return setmetatable(obj, TSocket)
end

function TSocket.new(Socket)
    return TSocket_from_obj({Socket = Socket or 0})
end
---@param obj MSystemsPCIeTopoInfo.Socket
function TSocket:init_from_obj(obj)
    self.Socket = obj.Socket or 0
end

function TSocket:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSocket.group)
end

TSocket.from_obj = TSocket_from_obj

TSocket.proto_property = {'Socket'}

TSocket.default = {0}

TSocket.struct = {{name = 'Socket', is_array = false, struct = nil}}

function TSocket:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'Socket', self.Socket, 'uint8', false, errs, need_convert)

    TSocket:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSocket.proto_property, errs, need_convert)
    return self
end

function TSocket:unpack(_)
    return self.Socket
end

MSystemsPCIeTopoInfo.Socket = TSocket

---@class MSystemsPCIeTopoInfo.Segment
---@field Segment integer
local TSegment = {}
TSegment.__index = TSegment
TSegment.group = {}

local function TSegment_from_obj(obj)
    return setmetatable(obj, TSegment)
end

function TSegment.new(Segment)
    return TSegment_from_obj({Segment = Segment or 0})
end
---@param obj MSystemsPCIeTopoInfo.Segment
function TSegment:init_from_obj(obj)
    self.Segment = obj.Segment or 0
end

function TSegment:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSegment.group)
end

TSegment.from_obj = TSegment_from_obj

TSegment.proto_property = {'Segment'}

TSegment.default = {0}

TSegment.struct = {{name = 'Segment', is_array = false, struct = nil}}

function TSegment:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'Segment', self.Segment, 'uint8', false, errs, need_convert)

    TSegment:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSegment.proto_property, errs, need_convert)
    return self
end

function TSegment:unpack(_)
    return self.Segment
end

MSystemsPCIeTopoInfo.Segment = TSegment

---@class MSystemsPCIeTopoInfo.LocalSystemId
---@field LocalSystemId integer
local TLocalSystemId = {}
TLocalSystemId.__index = TLocalSystemId
TLocalSystemId.group = {}

local function TLocalSystemId_from_obj(obj)
    return setmetatable(obj, TLocalSystemId)
end

function TLocalSystemId.new(LocalSystemId)
    return TLocalSystemId_from_obj({LocalSystemId = LocalSystemId or 0})
end
---@param obj MSystemsPCIeTopoInfo.LocalSystemId
function TLocalSystemId:init_from_obj(obj)
    self.LocalSystemId = obj.LocalSystemId or 0
end

function TLocalSystemId:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TLocalSystemId.group)
end

TLocalSystemId.from_obj = TLocalSystemId_from_obj

TLocalSystemId.proto_property = {'LocalSystemId'}

TLocalSystemId.default = {0}

TLocalSystemId.struct = {{name = 'LocalSystemId', is_array = false, struct = nil}}

function TLocalSystemId:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'LocalSystemId', self.LocalSystemId, 'uint8', false, errs, need_convert)

    TLocalSystemId:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TLocalSystemId.proto_property, errs, need_convert)
    return self
end

function TLocalSystemId:unpack(_)
    return self.LocalSystemId
end

MSystemsPCIeTopoInfo.LocalSystemId = TLocalSystemId

---@class MSystemsPCIeTopoInfo.GlobalSystemId
---@field GlobalSystemId integer
local TGlobalSystemId = {}
TGlobalSystemId.__index = TGlobalSystemId
TGlobalSystemId.group = {}

local function TGlobalSystemId_from_obj(obj)
    return setmetatable(obj, TGlobalSystemId)
end

function TGlobalSystemId.new(GlobalSystemId)
    return TGlobalSystemId_from_obj({GlobalSystemId = GlobalSystemId or 0})
end
---@param obj MSystemsPCIeTopoInfo.GlobalSystemId
function TGlobalSystemId:init_from_obj(obj)
    self.GlobalSystemId = obj.GlobalSystemId or 0
end

function TGlobalSystemId:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGlobalSystemId.group)
end

TGlobalSystemId.from_obj = TGlobalSystemId_from_obj

TGlobalSystemId.proto_property = {'GlobalSystemId'}

TGlobalSystemId.default = {0}

TGlobalSystemId.struct = {{name = 'GlobalSystemId', is_array = false, struct = nil}}

function TGlobalSystemId:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Required(prefix .. 'GlobalSystemId', self.GlobalSystemId, 'uint8', false, errs, need_convert)

    TGlobalSystemId:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGlobalSystemId.proto_property, errs, need_convert)
    return self
end

function TGlobalSystemId:unpack(_)
    return self.GlobalSystemId
end

MSystemsPCIeTopoInfo.GlobalSystemId = TGlobalSystemId

return MSystemsPCIeTopoInfo
