# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2023 Raritan Inc. All rights reserved.
#
# This is an auto-generated file.

#
# Section generated by IdlC from "AssetStripConfig.idl"
#

import raritan.rpc
from raritan.rpc import Interface, Structure, ValueObject, Enumeration, typecheck, DecodeException
import raritan.rpc.assetmgrmodel

import raritan.rpc.event


# interface
class AssetStripConfig(Interface):
    idlType = "assetmgrmodel.AssetStripConfig:1.0.1"

    # enumeration
    class ScanMode(Enumeration):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.ScanMode:1.0.0"
        values = ["SCANMODE_DISABLED", "SCANMODE_BOTH"]

    ScanMode.SCANMODE_DISABLED = ScanMode(0)
    ScanMode.SCANMODE_BOTH = ScanMode(1)

    # enumeration
    class NumberingMode(Enumeration):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.NumberingMode:1.0.0"
        values = ["TOP_DOWN", "BOTTOM_UP"]

    NumberingMode.TOP_DOWN = NumberingMode(0)
    NumberingMode.BOTTOM_UP = NumberingMode(1)

    # enumeration
    class Orientation(Enumeration):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.Orientation:1.0.0"
        values = ["TOP_CONNECTOR", "BOTTOM_CONNECTOR"]

    Orientation.TOP_CONNECTOR = Orientation(0)
    Orientation.BOTTOM_CONNECTOR = Orientation(1)

    # enumeration
    class LEDOperationMode(Enumeration):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.LEDOperationMode:1.0.0"
        values = ["LED_OPERATION_MANUAL", "LED_OPERATION_AUTO"]

    LEDOperationMode.LED_OPERATION_MANUAL = LEDOperationMode(0)
    LEDOperationMode.LED_OPERATION_AUTO = LEDOperationMode(1)

    # enumeration
    class LEDMode(Enumeration):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.LEDMode:1.0.0"
        values = ["LED_MODE_ON", "LED_MODE_OFF", "LED_MODE_BLINK_FAST", "LED_MODE_BLINK_SLOW"]

    LEDMode.LED_MODE_ON = LEDMode(0)
    LEDMode.LED_MODE_OFF = LEDMode(1)
    LEDMode.LED_MODE_BLINK_FAST = LEDMode(2)
    LEDMode.LED_MODE_BLINK_SLOW = LEDMode(3)

    # structure
    class LEDColor(Structure):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.LEDColor:1.0.0"
        elements = ["r", "g", "b"]

        def __init__(self, r, g, b):
            typecheck.is_int(r, AssertionError)
            typecheck.is_int(g, AssertionError)
            typecheck.is_int(b, AssertionError)

            self.r = r
            self.g = g
            self.b = b

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                r = json['r'],
                g = json['g'],
                b = json['b'],
            )
            return obj

        def encode(self):
            json = {}
            json['r'] = self.r
            json['g'] = self.g
            json['b'] = self.b
            return json

    # structure
    class StripSettings(Structure):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.StripSettings:1.0.0"
        elements = ["rackUnitCount", "name", "scanMode", "defaultColorConnected", "defaultColorDisconnected", "numberingMode", "numberingOffset", "orientation"]

        def __init__(self, rackUnitCount, name, scanMode, defaultColorConnected, defaultColorDisconnected, numberingMode, numberingOffset, orientation):
            typecheck.is_int(rackUnitCount, AssertionError)
            typecheck.is_string(name, AssertionError)
            typecheck.is_enum(scanMode, raritan.rpc.assetmgrmodel.AssetStripConfig.ScanMode, AssertionError)
            typecheck.is_struct(defaultColorConnected, raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor, AssertionError)
            typecheck.is_struct(defaultColorDisconnected, raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor, AssertionError)
            typecheck.is_enum(numberingMode, raritan.rpc.assetmgrmodel.AssetStripConfig.NumberingMode, AssertionError)
            typecheck.is_int(numberingOffset, AssertionError)
            typecheck.is_enum(orientation, raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation, AssertionError)

            self.rackUnitCount = rackUnitCount
            self.name = name
            self.scanMode = scanMode
            self.defaultColorConnected = defaultColorConnected
            self.defaultColorDisconnected = defaultColorDisconnected
            self.numberingMode = numberingMode
            self.numberingOffset = numberingOffset
            self.orientation = orientation

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                rackUnitCount = json['rackUnitCount'],
                name = json['name'],
                scanMode = raritan.rpc.assetmgrmodel.AssetStripConfig.ScanMode.decode(json['scanMode']),
                defaultColorConnected = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor.decode(json['defaultColorConnected'], agent),
                defaultColorDisconnected = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor.decode(json['defaultColorDisconnected'], agent),
                numberingMode = raritan.rpc.assetmgrmodel.AssetStripConfig.NumberingMode.decode(json['numberingMode']),
                numberingOffset = json['numberingOffset'],
                orientation = raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation.decode(json['orientation']),
            )
            return obj

        def encode(self):
            json = {}
            json['rackUnitCount'] = self.rackUnitCount
            json['name'] = self.name
            json['scanMode'] = raritan.rpc.assetmgrmodel.AssetStripConfig.ScanMode.encode(self.scanMode)
            json['defaultColorConnected'] = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor.encode(self.defaultColorConnected)
            json['defaultColorDisconnected'] = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor.encode(self.defaultColorDisconnected)
            json['numberingMode'] = raritan.rpc.assetmgrmodel.AssetStripConfig.NumberingMode.encode(self.numberingMode)
            json['numberingOffset'] = self.numberingOffset
            json['orientation'] = raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation.encode(self.orientation)
            return json

    # structure
    class RackUnitSettings(Structure):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.RackUnitSettings:1.0.0"
        elements = ["opmode", "mode", "color", "name"]

        def __init__(self, opmode, mode, color, name):
            typecheck.is_enum(opmode, raritan.rpc.assetmgrmodel.AssetStripConfig.LEDOperationMode, AssertionError)
            typecheck.is_enum(mode, raritan.rpc.assetmgrmodel.AssetStripConfig.LEDMode, AssertionError)
            typecheck.is_struct(color, raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor, AssertionError)
            typecheck.is_string(name, AssertionError)

            self.opmode = opmode
            self.mode = mode
            self.color = color
            self.name = name

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                opmode = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDOperationMode.decode(json['opmode']),
                mode = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDMode.decode(json['mode']),
                color = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor.decode(json['color'], agent),
                name = json['name'],
            )
            return obj

        def encode(self):
            json = {}
            json['opmode'] = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDOperationMode.encode(self.opmode)
            json['mode'] = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDMode.encode(self.mode)
            json['color'] = raritan.rpc.assetmgrmodel.AssetStripConfig.LEDColor.encode(self.color)
            json['name'] = self.name
            return json

    # value object
    class StripSettingsChangedEvent(raritan.rpc.event.UserEvent):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.StripSettingsChangedEvent:1.0.0"

        def __init__(self, oldSettings, newSettings, actUserName, actIpAddr, source):
            super(raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettingsChangedEvent, self).__init__(actUserName, actIpAddr, source)
            typecheck.is_struct(oldSettings, raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings, AssertionError)
            typecheck.is_struct(newSettings, raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings, AssertionError)

            self.oldSettings = oldSettings
            self.newSettings = newSettings

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettingsChangedEvent, self).encode()
            json['oldSettings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings.encode(self.oldSettings)
            json['newSettings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings.encode(self.newSettings)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                oldSettings = raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings.decode(json['oldSettings'], agent),
                newSettings = raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings.decode(json['newSettings'], agent),
                # for event.UserEvent
                actUserName = json['actUserName'],
                actIpAddr = json['actIpAddr'],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["oldSettings", "newSettings"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettingsChangedEvent, self).listElements()
            return elements

    # value object
    class RackUnitSettingsChangedEvent(raritan.rpc.event.UserEvent):
        idlType = "assetmgrmodel.AssetStripConfig_1_0_1.RackUnitSettingsChangedEvent:1.0.0"

        def __init__(self, rackUnitNumber, oldSettings, newSettings, actUserName, actIpAddr, source):
            super(raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettingsChangedEvent, self).__init__(actUserName, actIpAddr, source)
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_struct(oldSettings, raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings, AssertionError)
            typecheck.is_struct(newSettings, raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings, AssertionError)

            self.rackUnitNumber = rackUnitNumber
            self.oldSettings = oldSettings
            self.newSettings = newSettings

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettingsChangedEvent, self).encode()
            json['rackUnitNumber'] = self.rackUnitNumber
            json['oldSettings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.encode(self.oldSettings)
            json['newSettings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.encode(self.newSettings)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                rackUnitNumber = json['rackUnitNumber'],
                oldSettings = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.decode(json['oldSettings'], agent),
                newSettings = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.decode(json['newSettings'], agent),
                # for event.UserEvent
                actUserName = json['actUserName'],
                actIpAddr = json['actIpAddr'],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["rackUnitNumber", "oldSettings", "newSettings"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettingsChangedEvent, self).listElements()
            return elements

    class _getStripSettings(Interface.Method):
        name = 'getStripSettings'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings.decode(rsp['_ret_'], agent)
            typecheck.is_struct(_ret_, raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings, DecodeException)
            return _ret_

    class _setStripSettings(Interface.Method):
        name = 'setStripSettings'

        @staticmethod
        def encode(settings):
            typecheck.is_struct(settings, raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings, AssertionError)
            args = {}
            args['settings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.StripSettings.encode(settings)
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            typecheck.is_int(_ret_, DecodeException)
            return _ret_

    class _getRackUnitSettings(Interface.Method):
        name = 'getRackUnitSettings'

        @staticmethod
        def encode(rackUnitNumber):
            typecheck.is_int(rackUnitNumber, AssertionError)
            args = {}
            args['rackUnitNumber'] = rackUnitNumber
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            settings = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.decode(rsp['settings'], agent)
            typecheck.is_int(_ret_, DecodeException)
            typecheck.is_struct(settings, raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings, DecodeException)
            return (_ret_, settings)

    class _getAllRackUnitSettings(Interface.Method):
        name = 'getAllRackUnitSettings'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = [raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.decode(x0, agent) for x0 in rsp['_ret_']]
            for x0 in _ret_:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings, DecodeException)
            return _ret_

    class _setRackUnitSettings(Interface.Method):
        name = 'setRackUnitSettings'

        @staticmethod
        def encode(rackUnitNumber, settings):
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_struct(settings, raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings, AssertionError)
            args = {}
            args['rackUnitNumber'] = rackUnitNumber
            args['settings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.encode(settings)
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            typecheck.is_int(_ret_, DecodeException)
            return _ret_

    class _setMultipleRackUnitSettings(Interface.Method):
        name = 'setMultipleRackUnitSettings'

        @staticmethod
        def encode(settings):
            args = {}
            args['settings'] = [dict(
                key = k,
                value = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.encode(v))
                for k, v in settings.items()]
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            typecheck.is_int(_ret_, DecodeException)
            return _ret_
    def __init__(self, target, agent):
        super(AssetStripConfig, self).__init__(target, agent)
        self.getStripSettings = AssetStripConfig._getStripSettings(self)
        self.setStripSettings = AssetStripConfig._setStripSettings(self)
        self.getRackUnitSettings = AssetStripConfig._getRackUnitSettings(self)
        self.getAllRackUnitSettings = AssetStripConfig._getAllRackUnitSettings(self)
        self.setRackUnitSettings = AssetStripConfig._setRackUnitSettings(self)
        self.setMultipleRackUnitSettings = AssetStripConfig._setMultipleRackUnitSettings(self)

#
# Section generated by IdlC from "AssetStrip.idl"
#

import raritan.rpc
from raritan.rpc import Interface, Structure, ValueObject, Enumeration, typecheck, DecodeException
import raritan.rpc.assetmgrmodel

import raritan.rpc.event

import raritan.rpc.idl


# interface
class AssetStrip(Interface):
    idlType = "assetmgrmodel.AssetStrip:2.0.5"

    NO_ERROR = 0

    ERR_INVALID_PARAM = 1

    ERR_NO_SUCH_OBJECT = 2

    ERR_NOT_SUPPORTED = 3

    ERR_OPERATION_FAILED = 4

    MAIN_STRIP_COLUMN = 0

    # enumeration
    class State(Enumeration):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.State:1.0.0"
        values = ["DISCONNECTED", "FIRMWARE_UPDATE", "UNSUPPORTED", "AVAILABLE"]

    State.DISCONNECTED = State(0)
    State.FIRMWARE_UPDATE = State(1)
    State.UNSUPPORTED = State(2)
    State.AVAILABLE = State(3)

    # enumeration
    class StripType(Enumeration):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.StripType:1.0.0"
        values = ["SIMPLE", "COMPOSITE"]

    StripType.SIMPLE = StripType(0)
    StripType.COMPOSITE = StripType(1)

    # enumeration
    class TagType(Enumeration):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.TagType:1.0.0"
        values = ["SINGLE", "EXTENSION", "NONE"]

    TagType.SINGLE = TagType(0)
    TagType.EXTENSION = TagType(1)
    TagType.NONE = TagType(2)

    # enumeration
    class CascadeState(Enumeration):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.CascadeState:1.0.0"
        values = ["CASCADE_ACTIVE", "CASCADE_FIRMWARE_UPDATE"]

    CascadeState.CASCADE_ACTIVE = CascadeState(0)
    CascadeState.CASCADE_FIRMWARE_UPDATE = CascadeState(1)

    # structure
    class DeviceInfo(Structure):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.DeviceInfo:1.0.0"
        elements = ["deviceId", "hardwareId", "protocolVersion", "bootVersion", "appVersion", "orientationSensAvailable", "isCascadable", "rackUnitCountConfigurable"]

        def __init__(self, deviceId, hardwareId, protocolVersion, bootVersion, appVersion, orientationSensAvailable, isCascadable, rackUnitCountConfigurable):
            typecheck.is_int(deviceId, AssertionError)
            typecheck.is_int(hardwareId, AssertionError)
            typecheck.is_int(protocolVersion, AssertionError)
            typecheck.is_int(bootVersion, AssertionError)
            typecheck.is_int(appVersion, AssertionError)
            typecheck.is_bool(orientationSensAvailable, AssertionError)
            typecheck.is_bool(isCascadable, AssertionError)
            typecheck.is_bool(rackUnitCountConfigurable, AssertionError)

            self.deviceId = deviceId
            self.hardwareId = hardwareId
            self.protocolVersion = protocolVersion
            self.bootVersion = bootVersion
            self.appVersion = appVersion
            self.orientationSensAvailable = orientationSensAvailable
            self.isCascadable = isCascadable
            self.rackUnitCountConfigurable = rackUnitCountConfigurable

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                deviceId = json['deviceId'],
                hardwareId = json['hardwareId'],
                protocolVersion = json['protocolVersion'],
                bootVersion = json['bootVersion'],
                appVersion = json['appVersion'],
                orientationSensAvailable = json['orientationSensAvailable'],
                isCascadable = json['isCascadable'],
                rackUnitCountConfigurable = json['rackUnitCountConfigurable'],
            )
            return obj

        def encode(self):
            json = {}
            json['deviceId'] = self.deviceId
            json['hardwareId'] = self.hardwareId
            json['protocolVersion'] = self.protocolVersion
            json['bootVersion'] = self.bootVersion
            json['appVersion'] = self.appVersion
            json['orientationSensAvailable'] = self.orientationSensAvailable
            json['isCascadable'] = self.isCascadable
            json['rackUnitCountConfigurable'] = self.rackUnitCountConfigurable
            return json

    # structure
    class StripInfo(Structure):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.StripInfo:1.0.0"
        elements = ["maxMainTagCount", "maxBladeTagCount", "mainTagCount", "bladeTagCount", "bladeOverflow", "rackUnitCount", "componentCount", "cascadeState"]

        def __init__(self, maxMainTagCount, maxBladeTagCount, mainTagCount, bladeTagCount, bladeOverflow, rackUnitCount, componentCount, cascadeState):
            typecheck.is_int(maxMainTagCount, AssertionError)
            typecheck.is_int(maxBladeTagCount, AssertionError)
            typecheck.is_int(mainTagCount, AssertionError)
            typecheck.is_int(bladeTagCount, AssertionError)
            typecheck.is_bool(bladeOverflow, AssertionError)
            typecheck.is_int(rackUnitCount, AssertionError)
            typecheck.is_int(componentCount, AssertionError)
            typecheck.is_enum(cascadeState, raritan.rpc.assetmgrmodel.AssetStrip.CascadeState, AssertionError)

            self.maxMainTagCount = maxMainTagCount
            self.maxBladeTagCount = maxBladeTagCount
            self.mainTagCount = mainTagCount
            self.bladeTagCount = bladeTagCount
            self.bladeOverflow = bladeOverflow
            self.rackUnitCount = rackUnitCount
            self.componentCount = componentCount
            self.cascadeState = cascadeState

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                maxMainTagCount = json['maxMainTagCount'],
                maxBladeTagCount = json['maxBladeTagCount'],
                mainTagCount = json['mainTagCount'],
                bladeTagCount = json['bladeTagCount'],
                bladeOverflow = json['bladeOverflow'],
                rackUnitCount = json['rackUnitCount'],
                componentCount = json['componentCount'],
                cascadeState = raritan.rpc.assetmgrmodel.AssetStrip.CascadeState.decode(json['cascadeState']),
            )
            return obj

        def encode(self):
            json = {}
            json['maxMainTagCount'] = self.maxMainTagCount
            json['maxBladeTagCount'] = self.maxBladeTagCount
            json['mainTagCount'] = self.mainTagCount
            json['bladeTagCount'] = self.bladeTagCount
            json['bladeOverflow'] = self.bladeOverflow
            json['rackUnitCount'] = self.rackUnitCount
            json['componentCount'] = self.componentCount
            json['cascadeState'] = raritan.rpc.assetmgrmodel.AssetStrip.CascadeState.encode(self.cascadeState)
            return json

    # structure
    class TagInfo(Structure):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.TagInfo:1.0.0"
        elements = ["rackUnitNumber", "slotNumber", "familyDesc", "rawId", "programmable"]

        def __init__(self, rackUnitNumber, slotNumber, familyDesc, rawId, programmable):
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_int(slotNumber, AssertionError)
            typecheck.is_string(familyDesc, AssertionError)
            typecheck.is_string(rawId, AssertionError)
            typecheck.is_bool(programmable, AssertionError)

            self.rackUnitNumber = rackUnitNumber
            self.slotNumber = slotNumber
            self.familyDesc = familyDesc
            self.rawId = rawId
            self.programmable = programmable

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                rackUnitNumber = json['rackUnitNumber'],
                slotNumber = json['slotNumber'],
                familyDesc = json['familyDesc'],
                rawId = json['rawId'],
                programmable = json['programmable'],
            )
            return obj

        def encode(self):
            json = {}
            json['rackUnitNumber'] = self.rackUnitNumber
            json['slotNumber'] = self.slotNumber
            json['familyDesc'] = self.familyDesc
            json['rawId'] = self.rawId
            json['programmable'] = self.programmable
            return json

    # structure
    class RackUnitInfo(Structure):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.RackUnitInfo:1.0.0"
        elements = ["rackUnitNumber", "rackUnitPosition", "type", "size", "settings", "assetStripCascadePosition", "rackUnitRelativePosition", "assetStripNumberOfRackUnits"]

        def __init__(self, rackUnitNumber, rackUnitPosition, type, size, settings, assetStripCascadePosition, rackUnitRelativePosition, assetStripNumberOfRackUnits):
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_int(rackUnitPosition, AssertionError)
            typecheck.is_enum(type, raritan.rpc.assetmgrmodel.AssetStrip.TagType, AssertionError)
            typecheck.is_int(size, AssertionError)
            typecheck.is_struct(settings, raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings, AssertionError)
            typecheck.is_int(assetStripCascadePosition, AssertionError)
            typecheck.is_int(rackUnitRelativePosition, AssertionError)
            typecheck.is_int(assetStripNumberOfRackUnits, AssertionError)

            self.rackUnitNumber = rackUnitNumber
            self.rackUnitPosition = rackUnitPosition
            self.type = type
            self.size = size
            self.settings = settings
            self.assetStripCascadePosition = assetStripCascadePosition
            self.rackUnitRelativePosition = rackUnitRelativePosition
            self.assetStripNumberOfRackUnits = assetStripNumberOfRackUnits

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                rackUnitNumber = json['rackUnitNumber'],
                rackUnitPosition = json['rackUnitPosition'],
                type = raritan.rpc.assetmgrmodel.AssetStrip.TagType.decode(json['type']),
                size = json['size'],
                settings = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.decode(json['settings'], agent),
                assetStripCascadePosition = json['assetStripCascadePosition'],
                rackUnitRelativePosition = json['rackUnitRelativePosition'],
                assetStripNumberOfRackUnits = json['assetStripNumberOfRackUnits'],
            )
            return obj

        def encode(self):
            json = {}
            json['rackUnitNumber'] = self.rackUnitNumber
            json['rackUnitPosition'] = self.rackUnitPosition
            json['type'] = raritan.rpc.assetmgrmodel.AssetStrip.TagType.encode(self.type)
            json['size'] = self.size
            json['settings'] = raritan.rpc.assetmgrmodel.AssetStripConfig.RackUnitSettings.encode(self.settings)
            json['assetStripCascadePosition'] = self.assetStripCascadePosition
            json['rackUnitRelativePosition'] = self.rackUnitRelativePosition
            json['assetStripNumberOfRackUnits'] = self.assetStripNumberOfRackUnits
            return json

    # value object
    class StripInfoChangedEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.StripInfoChangedEvent:1.0.0"

        def __init__(self, oldInfo, newInfo, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.StripInfoChangedEvent, self).__init__(source)
            typecheck.is_struct(oldInfo, raritan.rpc.assetmgrmodel.AssetStrip.StripInfo, AssertionError)
            typecheck.is_struct(newInfo, raritan.rpc.assetmgrmodel.AssetStrip.StripInfo, AssertionError)

            self.oldInfo = oldInfo
            self.newInfo = newInfo

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.StripInfoChangedEvent, self).encode()
            json['oldInfo'] = raritan.rpc.assetmgrmodel.AssetStrip.StripInfo.encode(self.oldInfo)
            json['newInfo'] = raritan.rpc.assetmgrmodel.AssetStrip.StripInfo.encode(self.newInfo)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                oldInfo = raritan.rpc.assetmgrmodel.AssetStrip.StripInfo.decode(json['oldInfo'], agent),
                newInfo = raritan.rpc.assetmgrmodel.AssetStrip.StripInfo.decode(json['newInfo'], agent),
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["oldInfo", "newInfo"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.StripInfoChangedEvent, self).listElements()
            return elements

    # value object
    class StateChangedEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.StateChangedEvent:1.0.0"

        def __init__(self, oldState, newState, deviceInfo, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.StateChangedEvent, self).__init__(source)
            typecheck.is_enum(oldState, raritan.rpc.assetmgrmodel.AssetStrip.State, AssertionError)
            typecheck.is_enum(newState, raritan.rpc.assetmgrmodel.AssetStrip.State, AssertionError)
            typecheck.is_struct(deviceInfo, raritan.rpc.assetmgrmodel.AssetStrip.DeviceInfo, AssertionError)

            self.oldState = oldState
            self.newState = newState
            self.deviceInfo = deviceInfo

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.StateChangedEvent, self).encode()
            json['oldState'] = raritan.rpc.assetmgrmodel.AssetStrip.State.encode(self.oldState)
            json['newState'] = raritan.rpc.assetmgrmodel.AssetStrip.State.encode(self.newState)
            json['deviceInfo'] = raritan.rpc.assetmgrmodel.AssetStrip.DeviceInfo.encode(self.deviceInfo)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                oldState = raritan.rpc.assetmgrmodel.AssetStrip.State.decode(json['oldState']),
                newState = raritan.rpc.assetmgrmodel.AssetStrip.State.decode(json['newState']),
                deviceInfo = raritan.rpc.assetmgrmodel.AssetStrip.DeviceInfo.decode(json['deviceInfo'], agent),
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["oldState", "newState", "deviceInfo"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.StateChangedEvent, self).listElements()
            return elements

    # value object
    class RackUnitChangedEvent(raritan.rpc.event.UserEvent):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.RackUnitChangedEvent:1.0.0"

        def __init__(self, rackUnitNumber, rackUnit, actUserName, actIpAddr, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.RackUnitChangedEvent, self).__init__(actUserName, actIpAddr, source)
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_struct(rackUnit, raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo, AssertionError)

            self.rackUnitNumber = rackUnitNumber
            self.rackUnit = rackUnit

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.RackUnitChangedEvent, self).encode()
            json['rackUnitNumber'] = self.rackUnitNumber
            json['rackUnit'] = raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo.encode(self.rackUnit)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                rackUnitNumber = json['rackUnitNumber'],
                rackUnit = raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo.decode(json['rackUnit'], agent),
                # for event.UserEvent
                actUserName = json['actUserName'],
                actIpAddr = json['actIpAddr'],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["rackUnitNumber", "rackUnit"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.RackUnitChangedEvent, self).listElements()
            return elements

    # structure
    class TagChangeInfo(Structure):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.TagChangeInfo:1.0.0"
        elements = ["tag", "info", "parentBladeTagId", "slotPosition"]

        def __init__(self, tag, info, parentBladeTagId, slotPosition):
            typecheck.is_struct(tag, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, AssertionError)
            typecheck.is_struct(info, raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo, AssertionError)
            typecheck.is_string(parentBladeTagId, AssertionError)
            typecheck.is_int(slotPosition, AssertionError)

            self.tag = tag
            self.info = info
            self.parentBladeTagId = parentBladeTagId
            self.slotPosition = slotPosition

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                tag = raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(json['tag'], agent),
                info = raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo.decode(json['info'], agent),
                parentBladeTagId = json['parentBladeTagId'],
                slotPosition = json['slotPosition'],
            )
            return obj

        def encode(self):
            json = {}
            json['tag'] = raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.encode(self.tag)
            json['info'] = raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo.encode(self.info)
            json['parentBladeTagId'] = self.parentBladeTagId
            json['slotPosition'] = self.slotPosition
            return json

    # value object
    class TagEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.TagEvent:1.0.0"

        def __init__(self, tags, allTags, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.TagEvent, self).__init__(source)
            for x0 in tags:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.TagChangeInfo, AssertionError)
            for x0 in allTags:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, AssertionError)

            self.tags = tags
            self.allTags = allTags

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.TagEvent, self).encode()
            json['tags'] = [raritan.rpc.assetmgrmodel.AssetStrip.TagChangeInfo.encode(x0) for x0 in self.tags]
            json['allTags'] = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.encode(x0) for x0 in self.allTags]
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                tags = [raritan.rpc.assetmgrmodel.AssetStrip.TagChangeInfo.decode(x0, agent) for x0 in json['tags']],
                allTags = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(x0, agent) for x0 in json['allTags']],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["tags", "allTags"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.TagEvent, self).listElements()
            return elements

    # value object
    class TagAddedEvent(TagEvent):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.TagAddedEvent:1.0.0"

        def __init__(self, tags, allTags, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.TagAddedEvent, self).__init__(tags, allTags, source)

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.TagAddedEvent, self).encode()
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                # for assetmgrmodel.AssetStrip_2_0_5.TagEvent
                tags = [raritan.rpc.assetmgrmodel.AssetStrip.TagChangeInfo.decode(x0, agent) for x0 in json['tags']],
                allTags = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(x0, agent) for x0 in json['allTags']],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = []
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.TagAddedEvent, self).listElements()
            return elements

    # value object
    class TagRemovedEvent(TagEvent):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.TagRemovedEvent:1.0.0"

        def __init__(self, tags, allTags, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.TagRemovedEvent, self).__init__(tags, allTags, source)

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.TagRemovedEvent, self).encode()
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                # for assetmgrmodel.AssetStrip_2_0_5.TagEvent
                tags = [raritan.rpc.assetmgrmodel.AssetStrip.TagChangeInfo.decode(x0, agent) for x0 in json['tags']],
                allTags = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(x0, agent) for x0 in json['allTags']],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = []
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.TagRemovedEvent, self).listElements()
            return elements

    # enumeration
    class FirmwareUpdateState(Enumeration):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.FirmwareUpdateState:1.0.0"
        values = ["UPDATE_STARTED", "UPDATE_SUCCESSFUL", "UPDATE_FAILED"]

    FirmwareUpdateState.UPDATE_STARTED = FirmwareUpdateState(0)
    FirmwareUpdateState.UPDATE_SUCCESSFUL = FirmwareUpdateState(1)
    FirmwareUpdateState.UPDATE_FAILED = FirmwareUpdateState(2)

    # value object
    class FirmwareUpdateStateChangedEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.FirmwareUpdateStateChangedEvent:1.0.0"

        def __init__(self, state, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateStateChangedEvent, self).__init__(source)
            typecheck.is_enum(state, raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateState, AssertionError)

            self.state = state

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateStateChangedEvent, self).encode()
            json['state'] = raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateState.encode(self.state)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                state = raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateState.decode(json['state']),
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["state"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateStateChangedEvent, self).listElements()
            return elements

    # value object
    class BladeOverflowChangedEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.BladeOverflowChangedEvent:1.0.0"

        def __init__(self, overflow, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.BladeOverflowChangedEvent, self).__init__(source)
            typecheck.is_bool(overflow, AssertionError)

            self.overflow = overflow

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.BladeOverflowChangedEvent, self).encode()
            json['overflow'] = self.overflow
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                overflow = json['overflow'],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["overflow"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.BladeOverflowChangedEvent, self).listElements()
            return elements

    # value object
    class OrientationChangedEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.OrientationChangedEvent:1.0.0"

        def __init__(self, oldOrientation, newOrientation, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.OrientationChangedEvent, self).__init__(source)
            typecheck.is_enum(oldOrientation, raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation, AssertionError)
            typecheck.is_enum(newOrientation, raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation, AssertionError)

            self.oldOrientation = oldOrientation
            self.newOrientation = newOrientation

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.OrientationChangedEvent, self).encode()
            json['oldOrientation'] = raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation.encode(self.oldOrientation)
            json['newOrientation'] = raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation.encode(self.newOrientation)
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                oldOrientation = raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation.decode(json['oldOrientation']),
                newOrientation = raritan.rpc.assetmgrmodel.AssetStripConfig.Orientation.decode(json['newOrientation']),
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["oldOrientation", "newOrientation"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.OrientationChangedEvent, self).listElements()
            return elements

    # value object
    class CompositionChangedEvent(raritan.rpc.idl.Event):
        idlType = "assetmgrmodel.AssetStrip_2_0_5.CompositionChangedEvent:1.0.0"

        def __init__(self, oldComponentCount, newComponentCount, source):
            super(raritan.rpc.assetmgrmodel.AssetStrip.CompositionChangedEvent, self).__init__(source)
            typecheck.is_int(oldComponentCount, AssertionError)
            typecheck.is_int(newComponentCount, AssertionError)

            self.oldComponentCount = oldComponentCount
            self.newComponentCount = newComponentCount

        def encode(self):
            json = super(raritan.rpc.assetmgrmodel.AssetStrip.CompositionChangedEvent, self).encode()
            json['oldComponentCount'] = self.oldComponentCount
            json['newComponentCount'] = self.newComponentCount
            return json

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                oldComponentCount = json['oldComponentCount'],
                newComponentCount = json['newComponentCount'],
                # for idl.Event
                source = Interface.decode(json['source'], agent),
            )
            return obj

        def listElements(self):
            elements = ["oldComponentCount", "newComponentCount"]
            elements = elements + super(raritan.rpc.assetmgrmodel.AssetStrip.CompositionChangedEvent, self).listElements()
            return elements

    class _getState(Interface.Method):
        name = 'getState'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = raritan.rpc.assetmgrmodel.AssetStrip.State.decode(rsp['_ret_'])
            typecheck.is_enum(_ret_, raritan.rpc.assetmgrmodel.AssetStrip.State, DecodeException)
            return _ret_

    class _getDeviceInfo(Interface.Method):
        name = 'getDeviceInfo'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = raritan.rpc.assetmgrmodel.AssetStrip.DeviceInfo.decode(rsp['_ret_'], agent)
            typecheck.is_struct(_ret_, raritan.rpc.assetmgrmodel.AssetStrip.DeviceInfo, DecodeException)
            return _ret_

    class _getStripInfo(Interface.Method):
        name = 'getStripInfo'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = raritan.rpc.assetmgrmodel.AssetStrip.StripInfo.decode(rsp['_ret_'], agent)
            typecheck.is_struct(_ret_, raritan.rpc.assetmgrmodel.AssetStrip.StripInfo, DecodeException)
            return _ret_

    class _getRackUnitInfo(Interface.Method):
        name = 'getRackUnitInfo'

        @staticmethod
        def encode(rackUnitNumber):
            typecheck.is_int(rackUnitNumber, AssertionError)
            args = {}
            args['rackUnitNumber'] = rackUnitNumber
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            info = raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo.decode(rsp['info'], agent)
            typecheck.is_int(_ret_, DecodeException)
            typecheck.is_struct(info, raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo, DecodeException)
            return (_ret_, info)

    class _getAllRackUnitInfos(Interface.Method):
        name = 'getAllRackUnitInfos'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = [raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo.decode(x0, agent) for x0 in rsp['_ret_']]
            for x0 in _ret_:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.RackUnitInfo, DecodeException)
            return _ret_

    class _getTag(Interface.Method):
        name = 'getTag'

        @staticmethod
        def encode(rackUnitNumber, slotNumber):
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_int(slotNumber, AssertionError)
            args = {}
            args['rackUnitNumber'] = rackUnitNumber
            args['slotNumber'] = slotNumber
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            tagInfo = raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(rsp['tagInfo'], agent)
            typecheck.is_int(_ret_, DecodeException)
            typecheck.is_struct(tagInfo, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, DecodeException)
            return (_ret_, tagInfo)

    class _getAllTags(Interface.Method):
        name = 'getAllTags'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(x0, agent) for x0 in rsp['_ret_']]
            for x0 in _ret_:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, DecodeException)
            return _ret_

    class _getMainTags(Interface.Method):
        name = 'getMainTags'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(x0, agent) for x0 in rsp['_ret_']]
            for x0 in _ret_:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, DecodeException)
            return _ret_

    class _getExtensionTags(Interface.Method):
        name = 'getExtensionTags'

        @staticmethod
        def encode(rackUnitNumber):
            typecheck.is_int(rackUnitNumber, AssertionError)
            args = {}
            args['rackUnitNumber'] = rackUnitNumber
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            tags = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.decode(x0, agent) for x0 in rsp['tags']]
            typecheck.is_int(_ret_, DecodeException)
            for x0 in tags:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, DecodeException)
            return (_ret_, tags)

    class _triggerPowercycle(Interface.Method):
        name = 'triggerPowercycle'

        @staticmethod
        def encode(hard):
            typecheck.is_bool(hard, AssertionError)
            args = {}
            args['hard'] = hard
            return args

        @staticmethod
        def decode(rsp, agent):
            return None

    class _programTagIDs(Interface.Method):
        name = 'programTagIDs'

        @staticmethod
        def encode(tagInfos):
            for x0 in tagInfos:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStrip.TagInfo, AssertionError)
            args = {}
            args['tagInfos'] = [raritan.rpc.assetmgrmodel.AssetStrip.TagInfo.encode(x0) for x0 in tagInfos]
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            typecheck.is_int(_ret_, DecodeException)
            return _ret_

    class _getFirmwareUpdateState(Interface.Method):
        name = 'getFirmwareUpdateState'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateState.decode(rsp['_ret_'])
            typecheck.is_enum(_ret_, raritan.rpc.assetmgrmodel.AssetStrip.FirmwareUpdateState, DecodeException)
            return _ret_
    def __init__(self, target, agent):
        super(AssetStrip, self).__init__(target, agent)
        self.getState = AssetStrip._getState(self)
        self.getDeviceInfo = AssetStrip._getDeviceInfo(self)
        self.getStripInfo = AssetStrip._getStripInfo(self)
        self.getRackUnitInfo = AssetStrip._getRackUnitInfo(self)
        self.getAllRackUnitInfos = AssetStrip._getAllRackUnitInfos(self)
        self.getTag = AssetStrip._getTag(self)
        self.getAllTags = AssetStrip._getAllTags(self)
        self.getMainTags = AssetStrip._getMainTags(self)
        self.getExtensionTags = AssetStrip._getExtensionTags(self)
        self.triggerPowercycle = AssetStrip._triggerPowercycle(self)
        self.programTagIDs = AssetStrip._programTagIDs(self)
        self.getFirmwareUpdateState = AssetStrip._getFirmwareUpdateState(self)

#
# Section generated by IdlC from "AssetStripLogger.idl"
#

import raritan.rpc
from raritan.rpc import Interface, Structure, ValueObject, Enumeration, typecheck, DecodeException
import raritan.rpc.assetmgrmodel


# interface
class AssetStripLogger(Interface):
    idlType = "assetmgrmodel.AssetStripLogger:1.0.6"

    NO_ERROR = 0

    ERR_INVALID_PARAM = 1

    # structure
    class Info(Structure):
        idlType = "assetmgrmodel.AssetStripLogger_1_0_6.Info:1.0.0"
        elements = ["capacity", "oldestRecord", "newestRecord", "totalEventCount"]

        def __init__(self, capacity, oldestRecord, newestRecord, totalEventCount):
            typecheck.is_int(capacity, AssertionError)
            typecheck.is_int(oldestRecord, AssertionError)
            typecheck.is_int(newestRecord, AssertionError)
            typecheck.is_int(totalEventCount, AssertionError)

            self.capacity = capacity
            self.oldestRecord = oldestRecord
            self.newestRecord = newestRecord
            self.totalEventCount = totalEventCount

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                capacity = json['capacity'],
                oldestRecord = json['oldestRecord'],
                newestRecord = json['newestRecord'],
                totalEventCount = json['totalEventCount'],
            )
            return obj

        def encode(self):
            json = {}
            json['capacity'] = self.capacity
            json['oldestRecord'] = self.oldestRecord
            json['newestRecord'] = self.newestRecord
            json['totalEventCount'] = self.totalEventCount
            return json

    # enumeration
    class RecordType(Enumeration):
        idlType = "assetmgrmodel.AssetStripLogger_1_0_6.RecordType:1.0.0"
        values = ["EMPTY", "ASSET_TAG_CONNECTED", "ASSET_TAG_DISCONNECTED", "ASSET_STRIP_STATE_CHANGED"]

    RecordType.EMPTY = RecordType(0)
    RecordType.ASSET_TAG_CONNECTED = RecordType(1)
    RecordType.ASSET_TAG_DISCONNECTED = RecordType(2)
    RecordType.ASSET_STRIP_STATE_CHANGED = RecordType(3)

    # structure
    class Record(Structure):
        idlType = "assetmgrmodel.AssetStripLogger_1_0_6.Record:1.0.0"
        elements = ["timestamp", "type", "assetStripNumber", "rackUnitNumber", "rackUnitPosition", "slotNumber", "tagId", "parentBladeId", "state"]

        def __init__(self, timestamp, type, assetStripNumber, rackUnitNumber, rackUnitPosition, slotNumber, tagId, parentBladeId, state):
            typecheck.is_time(timestamp, AssertionError)
            typecheck.is_enum(type, raritan.rpc.assetmgrmodel.AssetStripLogger.RecordType, AssertionError)
            typecheck.is_int(assetStripNumber, AssertionError)
            typecheck.is_int(rackUnitNumber, AssertionError)
            typecheck.is_int(rackUnitPosition, AssertionError)
            typecheck.is_int(slotNumber, AssertionError)
            typecheck.is_string(tagId, AssertionError)
            typecheck.is_string(parentBladeId, AssertionError)
            typecheck.is_enum(state, raritan.rpc.assetmgrmodel.AssetStrip.State, AssertionError)

            self.timestamp = timestamp
            self.type = type
            self.assetStripNumber = assetStripNumber
            self.rackUnitNumber = rackUnitNumber
            self.rackUnitPosition = rackUnitPosition
            self.slotNumber = slotNumber
            self.tagId = tagId
            self.parentBladeId = parentBladeId
            self.state = state

        @classmethod
        def decode(cls, json, agent):
            obj = cls(
                timestamp = raritan.rpc.Time.decode(json['timestamp']),
                type = raritan.rpc.assetmgrmodel.AssetStripLogger.RecordType.decode(json['type']),
                assetStripNumber = json['assetStripNumber'],
                rackUnitNumber = json['rackUnitNumber'],
                rackUnitPosition = json['rackUnitPosition'],
                slotNumber = json['slotNumber'],
                tagId = json['tagId'],
                parentBladeId = json['parentBladeId'],
                state = raritan.rpc.assetmgrmodel.AssetStrip.State.decode(json['state']),
            )
            return obj

        def encode(self):
            json = {}
            json['timestamp'] = raritan.rpc.Time.encode(self.timestamp)
            json['type'] = raritan.rpc.assetmgrmodel.AssetStripLogger.RecordType.encode(self.type)
            json['assetStripNumber'] = self.assetStripNumber
            json['rackUnitNumber'] = self.rackUnitNumber
            json['rackUnitPosition'] = self.rackUnitPosition
            json['slotNumber'] = self.slotNumber
            json['tagId'] = self.tagId
            json['parentBladeId'] = self.parentBladeId
            json['state'] = raritan.rpc.assetmgrmodel.AssetStrip.State.encode(self.state)
            return json

    class _getInfo(Interface.Method):
        name = 'getInfo'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = raritan.rpc.assetmgrmodel.AssetStripLogger.Info.decode(rsp['_ret_'], agent)
            typecheck.is_struct(_ret_, raritan.rpc.assetmgrmodel.AssetStripLogger.Info, DecodeException)
            return _ret_

    class _getRecords(Interface.Method):
        name = 'getRecords'

        @staticmethod
        def encode(id, count):
            typecheck.is_int(id, AssertionError)
            typecheck.is_int(count, AssertionError)
            args = {}
            args['id'] = id
            args['count'] = count
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            records = [raritan.rpc.assetmgrmodel.AssetStripLogger.Record.decode(x0, agent) for x0 in rsp['records']]
            typecheck.is_int(_ret_, DecodeException)
            for x0 in records:
                typecheck.is_struct(x0, raritan.rpc.assetmgrmodel.AssetStripLogger.Record, DecodeException)
            return (_ret_, records)
    def __init__(self, target, agent):
        super(AssetStripLogger, self).__init__(target, agent)
        self.getInfo = AssetStripLogger._getInfo(self)
        self.getRecords = AssetStripLogger._getRecords(self)
