// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

struct ModeTagStruct {
    optional vendor_id mfgCode = 0;
    enum16 value = 1;
}

struct ModeOptionStruct {
    char_string<64> label = 0;
    int8u mode = 1;
    ModeTagStruct modeTags[] = 2;
}

struct ApplicationStruct {
    int16u catalogVendorID = 0;
    char_string applicationID = 1;
}

struct ErrorStateStruct {
    enum8 errorStateID = 0;
    optional char_string<64> errorStateLabel = 1;
    optional char_string<64> errorStateDetails = 2;
}

struct LabelStruct {
    char_string<16> label = 0;
    char_string<16> value = 1;
}

struct OperationalStateStruct {
    enum8 operationalStateID = 0;
    optional char_string<64> operationalStateLabel = 1;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
server cluster Identify = 3 {
  enum EffectIdentifierEnum : ENUM8 {
    kBlink = 0;
    kBreathe = 1;
    kOkay = 2;
    kChannelChange = 11;
    kFinishEffect = 254;
    kStopEffect = 255;
  }

  enum EffectVariantEnum : ENUM8 {
    kDefault = 0;
  }

  enum IdentifyTypeEnum : ENUM8 {
    kNone = 0;
    kLightOutput = 1;
    kVisibleIndicator = 2;
    kAudibleBeep = 3;
    kDisplay = 4;
    kActuator = 5;
  }

  attribute int16u identifyTime = 0;
  readonly attribute IdentifyTypeEnum identifyType = 1;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct IdentifyRequest {
    INT16U identifyTime = 0;
  }

  request struct TriggerEffectRequest {
    EffectIdentifierEnum effectIdentifier = 0;
    EffectVariantEnum effectVariant = 1;
  }

  command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0;
  command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64;
}

/** Attributes and commands for group configuration and manipulation. */
server cluster Groups = 4 {
  bitmap Feature : BITMAP32 {
    kGroupNames = 0x1;
  }

  bitmap NameSupportBitmap : BITMAP8 {
    kGroupNames = 0x80;
  }

  readonly attribute NameSupportBitmap nameSupport = 0;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct AddGroupRequest {
    group_id groupID = 0;
    CHAR_STRING groupName = 1;
  }

  request struct ViewGroupRequest {
    group_id groupID = 0;
  }

  request struct GetGroupMembershipRequest {
    group_id groupList[] = 0;
  }

  request struct RemoveGroupRequest {
    group_id groupID = 0;
  }

  request struct AddGroupIfIdentifyingRequest {
    group_id groupID = 0;
    CHAR_STRING groupName = 1;
  }

  response struct AddGroupResponse = 0 {
    ENUM8 status = 0;
    group_id groupID = 1;
  }

  response struct ViewGroupResponse = 1 {
    ENUM8 status = 0;
    group_id groupID = 1;
    CHAR_STRING groupName = 2;
  }

  response struct GetGroupMembershipResponse = 2 {
    nullable INT8U capacity = 0;
    group_id groupList[] = 1;
  }

  response struct RemoveGroupResponse = 3 {
    ENUM8 status = 0;
    group_id groupID = 1;
  }

  fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0;
  fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1;
  fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2;
  fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3;
  fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4;
  fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
}

/** Attributes and commands for scene configuration and manipulation. */
server cluster Scenes = 5 {
  bitmap Feature : BITMAP32 {
    kSceneNames = 0x1;
    kExplicit = 0x2;
    kTableSize = 0x4;
    kFabricScenes = 0x8;
  }

  bitmap ScenesCopyMode : BITMAP8 {
    kCopyAllScenes = 0x1;
  }

  struct AttributeValuePair {
    attrib_id attributeID = 0;
    int32u attributeValue = 1;
  }

  struct ExtensionFieldSet {
    cluster_id clusterID = 0;
    AttributeValuePair attributeValueList[] = 1;
  }

  readonly attribute int8u sceneCount = 0;
  readonly attribute int8u currentScene = 1;
  readonly attribute group_id currentGroup = 2;
  readonly attribute boolean sceneValid = 3;
  readonly attribute bitmap8 nameSupport = 4;
  readonly attribute nullable node_id lastConfiguredBy = 5;
  readonly attribute int16u sceneTableSize = 6;
  readonly attribute int8u remainingCapacity = 7;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct AddSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
    INT16U transitionTime = 2;
    CHAR_STRING sceneName = 3;
    ExtensionFieldSet extensionFieldSets[] = 4;
  }

  request struct ViewSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
  }

  request struct RemoveSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
  }

  request struct RemoveAllScenesRequest {
    group_id groupID = 0;
  }

  request struct StoreSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
  }

  request struct RecallSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
    optional nullable INT16U transitionTime = 2;
  }

  request struct GetSceneMembershipRequest {
    group_id groupID = 0;
  }

  request struct EnhancedAddSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
    INT16U transitionTime = 2;
    CHAR_STRING sceneName = 3;
    ExtensionFieldSet extensionFieldSets[] = 4;
  }

  request struct EnhancedViewSceneRequest {
    group_id groupID = 0;
    INT8U sceneID = 1;
  }

  request struct CopySceneRequest {
    ScenesCopyMode mode = 0;
    group_id groupIdentifierFrom = 1;
    INT8U sceneIdentifierFrom = 2;
    group_id groupIdentifierTo = 3;
    INT8U sceneIdentifierTo = 4;
  }

  response struct AddSceneResponse = 0 {
    status status = 0;
    group_id groupID = 1;
    INT8U sceneID = 2;
  }

  response struct ViewSceneResponse = 1 {
    status status = 0;
    group_id groupID = 1;
    INT8U sceneID = 2;
    optional INT16U transitionTime = 3;
    optional CHAR_STRING sceneName = 4;
    optional ExtensionFieldSet extensionFieldSets[] = 5;
  }

  response struct RemoveSceneResponse = 2 {
    status status = 0;
    group_id groupID = 1;
    INT8U sceneID = 2;
  }

  response struct RemoveAllScenesResponse = 3 {
    status status = 0;
    group_id groupID = 1;
  }

  response struct StoreSceneResponse = 4 {
    status status = 0;
    group_id groupID = 1;
    INT8U sceneID = 2;
  }

  response struct GetSceneMembershipResponse = 6 {
    status status = 0;
    nullable INT8U capacity = 1;
    group_id groupID = 2;
    optional INT8U sceneList[] = 3;
  }

  fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0;
  fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1;
  fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2;
  fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3;
  fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4;
  fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5;
  fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
  fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64;
  fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65;
  fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66;
}

/** Attributes and commands for switching devices between 'On' and 'Off' states. */
server cluster OnOff = 6 {
  enum OnOffDelayedAllOffEffectVariant : ENUM8 {
    kFadeToOffIn0p8Seconds = 0;
    kNoFade = 1;
    k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2;
  }

  enum OnOffDyingLightEffectVariant : ENUM8 {
    k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0;
  }

  enum OnOffEffectIdentifier : ENUM8 {
    kDelayedAllOff = 0;
    kDyingLight = 1;
  }

  enum OnOffStartUpOnOff : ENUM8 {
    kOff = 0;
    kOn = 1;
    kTogglePreviousOnOff = 2;
  }

  bitmap Feature : BITMAP32 {
    kLighting = 0x1;
    kDeadFront = 0x2;
  }

  bitmap OnOffControl : BITMAP8 {
    kAcceptOnlyWhenOn = 0x1;
  }

  readonly attribute boolean onOff = 0;
  readonly attribute boolean globalSceneControl = 16384;
  attribute int16u onTime = 16385;
  attribute int16u offWaitTime = 16386;
  attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct OffWithEffectRequest {
    OnOffEffectIdentifier effectIdentifier = 0;
    int8u effectVariant = 1;
  }

  request struct OnWithTimedOffRequest {
    OnOffControl onOffControl = 0;
    int16u onTime = 1;
    int16u offWaitTime = 2;
  }

  command Off(): DefaultSuccess = 0;
  command On(): DefaultSuccess = 1;
  command Toggle(): DefaultSuccess = 2;
  command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64;
  command OnWithRecallGlobalScene(): DefaultSuccess = 65;
  command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66;
}

/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
server cluster LevelControl = 8 {
  enum MoveMode : ENUM8 {
    kUp = 0;
    kDown = 1;
  }

  enum StepMode : ENUM8 {
    kUp = 0;
    kDown = 1;
  }

  bitmap Feature : BITMAP32 {
    kOnOff = 0x1;
    kLighting = 0x2;
    kFrequency = 0x4;
  }

  bitmap LevelControlOptions : BITMAP8 {
    kExecuteIfOff = 0x1;
    kCoupleColorTempToLevel = 0x2;
  }

  readonly attribute nullable int8u currentLevel = 0;
  readonly attribute int16u remainingTime = 1;
  readonly attribute int8u minLevel = 2;
  readonly attribute int8u maxLevel = 3;
  readonly attribute int16u currentFrequency = 4;
  readonly attribute int16u minFrequency = 5;
  readonly attribute int16u maxFrequency = 6;
  attribute LevelControlOptions options = 15;
  attribute int16u onOffTransitionTime = 16;
  attribute nullable int8u onLevel = 17;
  attribute nullable int16u onTransitionTime = 18;
  attribute nullable int16u offTransitionTime = 19;
  attribute nullable int8u defaultMoveRate = 20;
  attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct MoveToLevelRequest {
    INT8U level = 0;
    nullable INT16U transitionTime = 1;
    LevelControlOptions optionsMask = 2;
    LevelControlOptions optionsOverride = 3;
  }

  request struct MoveRequest {
    MoveMode moveMode = 0;
    nullable INT8U rate = 1;
    LevelControlOptions optionsMask = 2;
    LevelControlOptions optionsOverride = 3;
  }

  request struct StepRequest {
    StepMode stepMode = 0;
    INT8U stepSize = 1;
    nullable INT16U transitionTime = 2;
    LevelControlOptions optionsMask = 3;
    LevelControlOptions optionsOverride = 4;
  }

  request struct StopRequest {
    LevelControlOptions optionsMask = 0;
    LevelControlOptions optionsOverride = 1;
  }

  request struct MoveToLevelWithOnOffRequest {
    INT8U level = 0;
    nullable INT16U transitionTime = 1;
    LevelControlOptions optionsMask = 2;
    LevelControlOptions optionsOverride = 3;
  }

  request struct MoveWithOnOffRequest {
    MoveMode moveMode = 0;
    nullable INT8U rate = 1;
    LevelControlOptions optionsMask = 2;
    LevelControlOptions optionsOverride = 3;
  }

  request struct StepWithOnOffRequest {
    StepMode stepMode = 0;
    INT8U stepSize = 1;
    nullable INT16U transitionTime = 2;
    LevelControlOptions optionsMask = 3;
    LevelControlOptions optionsOverride = 4;
  }

  request struct StopWithOnOffRequest {
    LevelControlOptions optionsMask = 0;
    LevelControlOptions optionsOverride = 1;
  }

  command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0;
  command Move(MoveRequest): DefaultSuccess = 1;
  command Step(StepRequest): DefaultSuccess = 2;
  command Stop(StopRequest): DefaultSuccess = 3;
  command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4;
  command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5;
  command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6;
  command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7;
}

/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */
server cluster Descriptor = 29 {
  bitmap Feature : BITMAP32 {
    kTagList = 0x1;
  }

  struct DeviceTypeStruct {
    devtype_id deviceType = 0;
    int16u revision = 1;
  }

  struct SemanticTagStruct {
    nullable vendor_id mfgCode = 0;
    enum8 namespaceID = 1;
    enum8 tag = 2;
    optional nullable char_string label = 3;
  }

  readonly attribute DeviceTypeStruct deviceTypeList[] = 0;
  readonly attribute CLUSTER_ID serverList[] = 1;
  readonly attribute CLUSTER_ID clientList[] = 2;
  readonly attribute ENDPOINT_NO partsList[] = 3;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** The Access Control Cluster exposes a data model view of a
      Node's Access Control List (ACL), which codifies the rules used to manage
      and enforce Access Control for the Node's endpoints and their associated
      cluster instances. */
server cluster AccessControl = 31 {
  enum AccessControlEntryAuthModeEnum : ENUM8 {
    kPASE = 1;
    kCASE = 2;
    kGroup = 3;
  }

  enum AccessControlEntryPrivilegeEnum : ENUM8 {
    kView = 1;
    kProxyView = 2;
    kOperate = 3;
    kManage = 4;
    kAdminister = 5;
  }

  enum ChangeTypeEnum : ENUM8 {
    kChanged = 0;
    kAdded = 1;
    kRemoved = 2;
  }

  struct AccessControlTargetStruct {
    nullable cluster_id cluster = 0;
    nullable endpoint_no endpoint = 1;
    nullable devtype_id deviceType = 2;
  }

  fabric_scoped struct AccessControlEntryStruct {
    fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1;
    fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2;
    nullable fabric_sensitive int64u subjects[] = 3;
    nullable fabric_sensitive AccessControlTargetStruct targets[] = 4;
    fabric_idx fabricIndex = 254;
  }

  fabric_scoped struct AccessControlExtensionStruct {
    fabric_sensitive octet_string<128> data = 1;
    fabric_idx fabricIndex = 254;
  }

  fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 {
    nullable node_id adminNodeID = 1;
    nullable INT16U adminPasscodeID = 2;
    ChangeTypeEnum changeType = 3;
    nullable AccessControlEntryStruct latestValue = 4;
    fabric_idx fabricIndex = 254;
  }

  fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 {
    nullable node_id adminNodeID = 1;
    nullable INT16U adminPasscodeID = 2;
    ChangeTypeEnum changeType = 3;
    nullable AccessControlExtensionStruct latestValue = 4;
    fabric_idx fabricIndex = 254;
  }

  attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
  attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1;
  readonly attribute int16u subjectsPerAccessControlEntry = 2;
  readonly attribute int16u targetsPerAccessControlEntry = 3;
  readonly attribute int16u accessControlEntriesPerFabric = 4;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** This cluster provides attributes and events for determining basic information about Nodes, which supports both
      Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number,
      which apply to the whole Node. Also allows setting user device information such as location. */
server cluster BasicInformation = 40 {
  enum ColorEnum : ENUM8 {
    kBlack = 0;
    kNavy = 1;
    kGreen = 2;
    kTeal = 3;
    kMaroon = 4;
    kPurple = 5;
    kOlive = 6;
    kGray = 7;
    kBlue = 8;
    kLime = 9;
    kAqua = 10;
    kRed = 11;
    kFuchsia = 12;
    kYellow = 13;
    kWhite = 14;
    kNickel = 15;
    kChrome = 16;
    kBrass = 17;
    kCopper = 18;
    kSilver = 19;
    kGold = 20;
  }

  enum ProductFinishEnum : ENUM8 {
    kOther = 0;
    kMatte = 1;
    kSatin = 2;
    kPolished = 3;
    kRugged = 4;
    kFabric = 5;
  }

  struct CapabilityMinimaStruct {
    int16u caseSessionsPerFabric = 0;
    int16u subscriptionsPerFabric = 1;
  }

  struct ProductAppearanceStruct {
    ProductFinishEnum finish = 0;
    nullable ColorEnum primaryColor = 1;
  }

  critical event StartUp = 0 {
    INT32U softwareVersion = 0;
  }

  critical event ShutDown = 1 {
  }

  info event Leave = 2 {
    fabric_idx fabricIndex = 0;
  }

  info event ReachableChanged = 3 {
    boolean reachableNewValue = 0;
  }

  readonly attribute int16u dataModelRevision = 0;
  readonly attribute char_string<32> vendorName = 1;
  readonly attribute vendor_id vendorID = 2;
  readonly attribute char_string<32> productName = 3;
  readonly attribute int16u productID = 4;
  attribute access(write: manage) char_string<32> nodeLabel = 5;
  attribute access(write: administer) char_string<2> location = 6;
  readonly attribute int16u hardwareVersion = 7;
  readonly attribute char_string<64> hardwareVersionString = 8;
  readonly attribute int32u softwareVersion = 9;
  readonly attribute char_string<64> softwareVersionString = 10;
  readonly attribute char_string<16> manufacturingDate = 11;
  readonly attribute char_string<32> partNumber = 12;
  readonly attribute long_char_string<256> productURL = 13;
  readonly attribute char_string<64> productLabel = 14;
  readonly attribute char_string<32> serialNumber = 15;
  attribute access(write: manage) boolean localConfigDisabled = 16;
  readonly attribute char_string<32> uniqueID = 18;
  readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** Provides an interface for providing OTA software updates */
client cluster OtaSoftwareUpdateProvider = 41 {
  enum OTAApplyUpdateAction : ENUM8 {
    kProceed = 0;
    kAwaitNextAction = 1;
    kDiscontinue = 2;
  }

  enum OTADownloadProtocol : ENUM8 {
    kBDXSynchronous = 0;
    kBDXAsynchronous = 1;
    kHTTPS = 2;
    kVendorSpecific = 3;
  }

  enum OTAQueryStatus : ENUM8 {
    kUpdateAvailable = 0;
    kBusy = 1;
    kNotAvailable = 2;
    kDownloadProtocolNotSupported = 3;
  }

  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct QueryImageRequest {
    vendor_id vendorID = 0;
    INT16U productID = 1;
    INT32U softwareVersion = 2;
    OTADownloadProtocol protocolsSupported[] = 3;
    optional INT16U hardwareVersion = 4;
    optional CHAR_STRING<2> location = 5;
    optional BOOLEAN requestorCanConsent = 6;
    optional OCTET_STRING<512> metadataForProvider = 7;
  }

  response struct QueryImageResponse = 1 {
    OTAQueryStatus status = 0;
    optional INT32U delayedActionTime = 1;
    optional CHAR_STRING<256> imageURI = 2;
    optional INT32U softwareVersion = 3;
    optional CHAR_STRING<64> softwareVersionString = 4;
    optional OCTET_STRING<32> updateToken = 5;
    optional BOOLEAN userConsentNeeded = 6;
    optional OCTET_STRING<512> metadataForRequestor = 7;
  }

  request struct ApplyUpdateRequestRequest {
    OCTET_STRING<32> updateToken = 0;
    INT32U newVersion = 1;
  }

  response struct ApplyUpdateResponse = 3 {
    OTAApplyUpdateAction action = 0;
    INT32U delayedActionTime = 1;
  }

  request struct NotifyUpdateAppliedRequest {
    OCTET_STRING<32> updateToken = 0;
    INT32U softwareVersion = 1;
  }

  /** Determine availability of a new Software Image */
  command QueryImage(QueryImageRequest): QueryImageResponse = 0;
  /** Determine next action to take for a downloaded Software Image */
  command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2;
  /** Notify OTA Provider that an update was applied */
  command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4;
}

/** Provides an interface for downloading and applying OTA software updates */
server cluster OtaSoftwareUpdateRequestor = 42 {
  enum OTAAnnouncementReason : ENUM8 {
    kSimpleAnnouncement = 0;
    kUpdateAvailable = 1;
    kUrgentUpdateAvailable = 2;
  }

  enum OTAChangeReasonEnum : ENUM8 {
    kUnknown = 0;
    kSuccess = 1;
    kFailure = 2;
    kTimeOut = 3;
    kDelayByProvider = 4;
  }

  enum OTAUpdateStateEnum : ENUM8 {
    kUnknown = 0;
    kIdle = 1;
    kQuerying = 2;
    kDelayedOnQuery = 3;
    kDownloading = 4;
    kApplying = 5;
    kDelayedOnApply = 6;
    kRollingBack = 7;
    kDelayedOnUserConsent = 8;
  }

  fabric_scoped struct ProviderLocation {
    node_id providerNodeID = 1;
    endpoint_no endpoint = 2;
    fabric_idx fabricIndex = 254;
  }

  info event StateTransition = 0 {
    OTAUpdateStateEnum previousState = 0;
    OTAUpdateStateEnum newState = 1;
    OTAChangeReasonEnum reason = 2;
    nullable INT32U targetSoftwareVersion = 3;
  }

  critical event VersionApplied = 1 {
    INT32U softwareVersion = 0;
    INT16U productID = 1;
  }

  info event DownloadError = 2 {
    INT32U softwareVersion = 0;
    INT64U bytesDownloaded = 1;
    nullable INT8U progressPercent = 2;
    nullable INT64S platformCode = 3;
  }

  attribute ProviderLocation defaultOTAProviders[] = 0;
  readonly attribute boolean updatePossible = 1;
  readonly attribute OTAUpdateStateEnum updateState = 2;
  readonly attribute nullable int8u updateStateProgress = 3;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct AnnounceOTAProviderRequest {
    node_id providerNodeID = 0;
    vendor_id vendorID = 1;
    OTAAnnouncementReason announcementReason = 2;
    optional OCTET_STRING<512> metadataForNode = 3;
    endpoint_no endpoint = 4;
  }

  command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0;
}

/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
      may have differing common languages, units of measurements, and numerical formatting
      standards. As such, Nodes that visually or audibly convey information need a mechanism by which
      they can be configured to use a user’s preferred language, units, etc */
server cluster LocalizationConfiguration = 43 {
  attribute char_string<35> activeLocale = 0;
  readonly attribute CHAR_STRING supportedLocales[] = 1;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
      may have differing preferences for how dates and times are conveyed. As such, Nodes that visually
      or audibly convey time information need a mechanism by which they can be configured to use a
      user’s preferred format. */
server cluster TimeFormatLocalization = 44 {
  enum CalendarTypeEnum : ENUM8 {
    kBuddhist = 0;
    kChinese = 1;
    kCoptic = 2;
    kEthiopian = 3;
    kGregorian = 4;
    kHebrew = 5;
    kIndian = 6;
    kIslamic = 7;
    kJapanese = 8;
    kKorean = 9;
    kPersian = 10;
    kTaiwanese = 11;
  }

  enum HourFormatEnum : ENUM8 {
    k12hr = 0;
    k24hr = 1;
  }

  attribute HourFormatEnum hourFormat = 0;
  attribute CalendarTypeEnum activeCalendarType = 1;
  readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** This cluster is used to manage global aspects of the Commissioning flow. */
server cluster GeneralCommissioning = 48 {
  enum CommissioningErrorEnum : ENUM8 {
    kOK = 0;
    kValueOutsideRange = 1;
    kInvalidAuthentication = 2;
    kNoFailSafe = 3;
    kBusyWithOtherAdmin = 4;
  }

  enum RegulatoryLocationTypeEnum : ENUM8 {
    kIndoor = 0;
    kOutdoor = 1;
    kIndoorOutdoor = 2;
  }

  struct BasicCommissioningInfo {
    int16u failSafeExpiryLengthSeconds = 0;
    int16u maxCumulativeFailsafeSeconds = 1;
  }

  attribute access(write: administer) int64u breadcrumb = 0;
  readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
  readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
  readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
  readonly attribute boolean supportsConcurrentConnection = 4;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct ArmFailSafeRequest {
    INT16U expiryLengthSeconds = 0;
    INT64U breadcrumb = 1;
  }

  request struct SetRegulatoryConfigRequest {
    RegulatoryLocationTypeEnum newRegulatoryConfig = 0;
    CHAR_STRING countryCode = 1;
    INT64U breadcrumb = 2;
  }

  response struct ArmFailSafeResponse = 1 {
    CommissioningErrorEnum errorCode = 0;
    CHAR_STRING debugText = 1;
  }

  response struct SetRegulatoryConfigResponse = 3 {
    CommissioningErrorEnum errorCode = 0;
    CHAR_STRING debugText = 1;
  }

  response struct CommissioningCompleteResponse = 5 {
    CommissioningErrorEnum errorCode = 0;
    CHAR_STRING debugText = 1;
  }

  command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
  command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
  fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
server cluster NetworkCommissioning = 49 {
  enum NetworkCommissioningStatusEnum : ENUM8 {
    kSuccess = 0;
    kOutOfRange = 1;
    kBoundsExceeded = 2;
    kNetworkIDNotFound = 3;
    kDuplicateNetworkID = 4;
    kNetworkNotFound = 5;
    kRegulatoryError = 6;
    kAuthFailure = 7;
    kUnsupportedSecurity = 8;
    kOtherConnectionFailure = 9;
    kIPV6Failed = 10;
    kIPBindFailed = 11;
    kUnknownError = 12;
  }

  enum WiFiBandEnum : ENUM8 {
    k2G4 = 0;
    k3G65 = 1;
    k5G = 2;
    k6G = 3;
    k60G = 4;
    k1G = 5;
  }

  bitmap Feature : BITMAP32 {
    kWiFiNetworkInterface = 0x1;
    kThreadNetworkInterface = 0x2;
    kEthernetNetworkInterface = 0x4;
  }

  bitmap WiFiSecurityBitmap : BITMAP8 {
    kUnencrypted = 0x1;
    kWEP = 0x2;
    kWPAPersonal = 0x4;
    kWPA2Personal = 0x8;
    kWPA3Personal = 0x10;
  }

  struct NetworkInfoStruct {
    octet_string<32> networkID = 0;
    boolean connected = 1;
  }

  struct ThreadInterfaceScanResultStruct {
    int16u panId = 0;
    int64u extendedPanId = 1;
    char_string<16> networkName = 2;
    int16u channel = 3;
    int8u version = 4;
    octet_string<8> extendedAddress = 5;
    int8s rssi = 6;
    int8u lqi = 7;
  }

  struct WiFiInterfaceScanResultStruct {
    WiFiSecurityBitmap security = 0;
    octet_string<32> ssid = 1;
    octet_string<6> bssid = 2;
    int16u channel = 3;
    WiFiBandEnum wiFiBand = 4;
    int8s rssi = 5;
  }

  readonly attribute access(read: administer) int8u maxNetworks = 0;
  readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1;
  readonly attribute int8u scanMaxTimeSeconds = 2;
  readonly attribute int8u connectMaxTimeSeconds = 3;
  attribute access(write: administer) boolean interfaceEnabled = 4;
  readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5;
  readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6;
  readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct ScanNetworksRequest {
    optional nullable OCTET_STRING<32> ssid = 0;
    optional INT64U breadcrumb = 1;
  }

  request struct AddOrUpdateWiFiNetworkRequest {
    OCTET_STRING<32> ssid = 0;
    OCTET_STRING<64> credentials = 1;
    optional INT64U breadcrumb = 2;
  }

  request struct AddOrUpdateThreadNetworkRequest {
    OCTET_STRING<254> operationalDataset = 0;
    optional INT64U breadcrumb = 1;
  }

  request struct RemoveNetworkRequest {
    OCTET_STRING<32> networkID = 0;
    optional INT64U breadcrumb = 1;
  }

  request struct ConnectNetworkRequest {
    OCTET_STRING<32> networkID = 0;
    optional INT64U breadcrumb = 1;
  }

  request struct ReorderNetworkRequest {
    OCTET_STRING<32> networkID = 0;
    INT8U networkIndex = 1;
    optional INT64U breadcrumb = 2;
  }

  response struct ScanNetworksResponse = 1 {
    NetworkCommissioningStatusEnum networkingStatus = 0;
    optional CHAR_STRING debugText = 1;
    optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2;
    optional ThreadInterfaceScanResultStruct threadScanResults[] = 3;
  }

  response struct NetworkConfigResponse = 5 {
    NetworkCommissioningStatusEnum networkingStatus = 0;
    optional CHAR_STRING<512> debugText = 1;
    optional INT8U networkIndex = 2;
  }

  response struct ConnectNetworkResponse = 7 {
    NetworkCommissioningStatusEnum networkingStatus = 0;
    optional CHAR_STRING debugText = 1;
    nullable INT32S errorValue = 2;
  }

  command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0;
  command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2;
  command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3;
  command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4;
  command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6;
  command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8;
}

/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */
server cluster DiagnosticLogs = 50 {
  enum IntentEnum : ENUM8 {
    kEndUserSupport = 0;
    kNetworkDiag = 1;
    kCrashLogs = 2;
  }

  enum StatusEnum : ENUM8 {
    kSuccess = 0;
    kExhausted = 1;
    kNoLogs = 2;
    kBusy = 3;
    kDenied = 4;
  }

  enum TransferProtocolEnum : ENUM8 {
    kResponsePayload = 0;
    kBDX = 1;
  }

  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct RetrieveLogsRequestRequest {
    IntentEnum intent = 0;
    TransferProtocolEnum requestedProtocol = 1;
    optional CHAR_STRING<32> transferFileDesignator = 2;
  }

  command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0;
}

/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
server cluster GeneralDiagnostics = 51 {
  enum BootReasonEnum : ENUM8 {
    kUnspecified = 0;
    kPowerOnReboot = 1;
    kBrownOutReset = 2;
    kSoftwareWatchdogReset = 3;
    kHardwareWatchdogReset = 4;
    kSoftwareUpdateCompleted = 5;
    kSoftwareReset = 6;
  }

  enum HardwareFaultEnum : ENUM8 {
    kUnspecified = 0;
    kRadio = 1;
    kSensor = 2;
    kResettableOverTemp = 3;
    kNonResettableOverTemp = 4;
    kPowerSource = 5;
    kVisualDisplayFault = 6;
    kAudioOutputFault = 7;
    kUserInterfaceFault = 8;
    kNonVolatileMemoryError = 9;
    kTamperDetected = 10;
  }

  enum InterfaceTypeEnum : ENUM8 {
    kUnspecified = 0;
    kWiFi = 1;
    kEthernet = 2;
    kCellular = 3;
    kThread = 4;
  }

  enum NetworkFaultEnum : ENUM8 {
    kUnspecified = 0;
    kHardwareFailure = 1;
    kNetworkJammed = 2;
    kConnectionFailed = 3;
  }

  enum RadioFaultEnum : ENUM8 {
    kUnspecified = 0;
    kWiFiFault = 1;
    kCellularFault = 2;
    kThreadFault = 3;
    kNFCFault = 4;
    kBLEFault = 5;
    kEthernetFault = 6;
  }

  struct NetworkInterface {
    char_string<32> name = 0;
    boolean isOperational = 1;
    nullable boolean offPremiseServicesReachableIPv4 = 2;
    nullable boolean offPremiseServicesReachableIPv6 = 3;
    octet_string<8> hardwareAddress = 4;
    octet_string IPv4Addresses[] = 5;
    octet_string IPv6Addresses[] = 6;
    InterfaceTypeEnum type = 7;
  }

  critical event HardwareFaultChange = 0 {
    HardwareFaultEnum current[] = 0;
    HardwareFaultEnum previous[] = 1;
  }

  critical event RadioFaultChange = 1 {
    RadioFaultEnum current[] = 0;
    RadioFaultEnum previous[] = 1;
  }

  critical event NetworkFaultChange = 2 {
    NetworkFaultEnum current[] = 0;
    NetworkFaultEnum previous[] = 1;
  }

  critical event BootReason = 3 {
    BootReasonEnum bootReason = 0;
  }

  readonly attribute NetworkInterface networkInterfaces[] = 0;
  readonly attribute int16u rebootCount = 1;
  readonly attribute int64u upTime = 2;
  readonly attribute int32u totalOperationalHours = 3;
  readonly attribute BootReasonEnum bootReason = 4;
  readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5;
  readonly attribute RadioFaultEnum activeRadioFaults[] = 6;
  readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7;
  readonly attribute boolean testEventTriggersEnabled = 8;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct TestEventTriggerRequest {
    OCTET_STRING<16> enableKey = 0;
    INT64U eventTrigger = 1;
  }

  command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
}

/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
server cluster SoftwareDiagnostics = 52 {
  bitmap Feature : BITMAP32 {
    kWaterMarks = 0x1;
  }

  struct ThreadMetricsStruct {
    int64u id = 0;
    optional char_string<8> name = 1;
    optional int32u stackFreeCurrent = 2;
    optional int32u stackFreeMinimum = 3;
    optional int32u stackSize = 4;
  }

  info event SoftwareFault = 0 {
    INT64U id = 0;
    optional CHAR_STRING name = 1;
    optional OCTET_STRING faultRecording = 2;
  }

  readonly attribute ThreadMetricsStruct threadMetrics[] = 0;
  readonly attribute int64u currentHeapFree = 1;
  readonly attribute int64u currentHeapUsed = 2;
  readonly attribute int64u currentHeapHighWatermark = 3;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  command ResetWatermarks(): DefaultSuccess = 0;
}

/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */
server cluster ThreadNetworkDiagnostics = 53 {
  enum ConnectionStatusEnum : ENUM8 {
    kConnected = 0;
    kNotConnected = 1;
  }

  enum NetworkFaultEnum : ENUM8 {
    kUnspecified = 0;
    kLinkDown = 1;
    kHardwareFailure = 2;
    kNetworkJammed = 3;
  }

  enum RoutingRoleEnum : ENUM8 {
    kUnspecified = 0;
    kUnassigned = 1;
    kSleepyEndDevice = 2;
    kEndDevice = 3;
    kREED = 4;
    kRouter = 5;
    kLeader = 6;
  }

  bitmap Feature : BITMAP32 {
    kPacketCounts = 0x1;
    kErrorCounts = 0x2;
    kMLECounts = 0x4;
    kMACCounts = 0x8;
  }

  struct NeighborTableStruct {
    int64u extAddress = 0;
    int32u age = 1;
    int16u rloc16 = 2;
    int32u linkFrameCounter = 3;
    int32u mleFrameCounter = 4;
    int8u lqi = 5;
    nullable int8s averageRssi = 6;
    nullable int8s lastRssi = 7;
    int8u frameErrorRate = 8;
    int8u messageErrorRate = 9;
    boolean rxOnWhenIdle = 10;
    boolean fullThreadDevice = 11;
    boolean fullNetworkData = 12;
    boolean isChild = 13;
  }

  struct OperationalDatasetComponents {
    boolean activeTimestampPresent = 0;
    boolean pendingTimestampPresent = 1;
    boolean masterKeyPresent = 2;
    boolean networkNamePresent = 3;
    boolean extendedPanIdPresent = 4;
    boolean meshLocalPrefixPresent = 5;
    boolean delayPresent = 6;
    boolean panIdPresent = 7;
    boolean channelPresent = 8;
    boolean pskcPresent = 9;
    boolean securityPolicyPresent = 10;
    boolean channelMaskPresent = 11;
  }

  struct RouteTableStruct {
    int64u extAddress = 0;
    int16u rloc16 = 1;
    int8u routerId = 2;
    int8u nextHop = 3;
    int8u pathCost = 4;
    int8u LQIIn = 5;
    int8u LQIOut = 6;
    int8u age = 7;
    boolean allocated = 8;
    boolean linkEstablished = 9;
  }

  struct SecurityPolicy {
    int16u rotationTime = 0;
    int16u flags = 1;
  }

  info event ConnectionStatus = 0 {
    ConnectionStatusEnum connectionStatus = 0;
  }

  info event NetworkFaultChange = 1 {
    NetworkFaultEnum current[] = 0;
    NetworkFaultEnum previous[] = 1;
  }

  readonly attribute nullable int16u channel = 0;
  readonly attribute nullable RoutingRoleEnum routingRole = 1;
  readonly attribute nullable char_string<16> networkName = 2;
  readonly attribute nullable int16u panId = 3;
  readonly attribute nullable int64u extendedPanId = 4;
  readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
  readonly attribute int64u overrunCount = 6;
  readonly attribute NeighborTableStruct neighborTable[] = 7;
  readonly attribute RouteTableStruct routeTable[] = 8;
  readonly attribute nullable int32u partitionId = 9;
  readonly attribute nullable int8u weighting = 10;
  readonly attribute nullable int8u dataVersion = 11;
  readonly attribute nullable int8u stableDataVersion = 12;
  readonly attribute nullable int8u leaderRouterId = 13;
  readonly attribute int16u detachedRoleCount = 14;
  readonly attribute int16u childRoleCount = 15;
  readonly attribute int16u routerRoleCount = 16;
  readonly attribute int16u leaderRoleCount = 17;
  readonly attribute int16u attachAttemptCount = 18;
  readonly attribute int16u partitionIdChangeCount = 19;
  readonly attribute int16u betterPartitionAttachAttemptCount = 20;
  readonly attribute int16u parentChangeCount = 21;
  readonly attribute int32u txTotalCount = 22;
  readonly attribute int32u txUnicastCount = 23;
  readonly attribute int32u txBroadcastCount = 24;
  readonly attribute int32u txAckRequestedCount = 25;
  readonly attribute int32u txAckedCount = 26;
  readonly attribute int32u txNoAckRequestedCount = 27;
  readonly attribute int32u txDataCount = 28;
  readonly attribute int32u txDataPollCount = 29;
  readonly attribute int32u txBeaconCount = 30;
  readonly attribute int32u txBeaconRequestCount = 31;
  readonly attribute int32u txOtherCount = 32;
  readonly attribute int32u txRetryCount = 33;
  readonly attribute int32u txDirectMaxRetryExpiryCount = 34;
  readonly attribute int32u txIndirectMaxRetryExpiryCount = 35;
  readonly attribute int32u txErrCcaCount = 36;
  readonly attribute int32u txErrAbortCount = 37;
  readonly attribute int32u txErrBusyChannelCount = 38;
  readonly attribute int32u rxTotalCount = 39;
  readonly attribute int32u rxUnicastCount = 40;
  readonly attribute int32u rxBroadcastCount = 41;
  readonly attribute int32u rxDataCount = 42;
  readonly attribute int32u rxDataPollCount = 43;
  readonly attribute int32u rxBeaconCount = 44;
  readonly attribute int32u rxBeaconRequestCount = 45;
  readonly attribute int32u rxOtherCount = 46;
  readonly attribute int32u rxAddressFilteredCount = 47;
  readonly attribute int32u rxDestAddrFilteredCount = 48;
  readonly attribute int32u rxDuplicatedCount = 49;
  readonly attribute int32u rxErrNoFrameCount = 50;
  readonly attribute int32u rxErrUnknownNeighborCount = 51;
  readonly attribute int32u rxErrInvalidSrcAddrCount = 52;
  readonly attribute int32u rxErrSecCount = 53;
  readonly attribute int32u rxErrFcsCount = 54;
  readonly attribute int32u rxErrOtherCount = 55;
  readonly attribute nullable int64u activeTimestamp = 56;
  readonly attribute nullable int64u pendingTimestamp = 57;
  readonly attribute nullable int32u delay = 58;
  readonly attribute nullable SecurityPolicy securityPolicy = 59;
  readonly attribute nullable octet_string<4> channelPage0Mask = 60;
  readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
  readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  command ResetCounts(): DefaultSuccess = 0;
}

/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
server cluster WiFiNetworkDiagnostics = 54 {
  enum AssociationFailureCauseEnum : ENUM8 {
    kUnknown = 0;
    kAssociationFailed = 1;
    kAuthenticationFailed = 2;
    kSsidNotFound = 3;
  }

  enum ConnectionStatusEnum : ENUM8 {
    kConnected = 0;
    kNotConnected = 1;
  }

  enum SecurityTypeEnum : ENUM8 {
    kUnspecified = 0;
    kNone = 1;
    kWEP = 2;
    kWPA = 3;
    kWPA2 = 4;
    kWPA3 = 5;
  }

  enum WiFiVersionEnum : ENUM8 {
    kA = 0;
    kB = 1;
    kG = 2;
    kN = 3;
    kAc = 4;
    kAx = 5;
    kAh = 6;
  }

  bitmap Feature : BITMAP32 {
    kPacketCounts = 0x1;
    kErrorCounts = 0x2;
  }

  info event Disconnection = 0 {
    INT16U reasonCode = 0;
  }

  info event AssociationFailure = 1 {
    AssociationFailureCauseEnum associationFailure = 0;
    INT16U status = 1;
  }

  info event ConnectionStatus = 2 {
    ConnectionStatusEnum connectionStatus = 0;
  }

  readonly attribute nullable octet_string<6> bssid = 0;
  readonly attribute nullable SecurityTypeEnum securityType = 1;
  readonly attribute nullable WiFiVersionEnum wiFiVersion = 2;
  readonly attribute nullable int16u channelNumber = 3;
  readonly attribute nullable int8s rssi = 4;
  readonly attribute nullable int32u beaconLostCount = 5;
  readonly attribute nullable int32u beaconRxCount = 6;
  readonly attribute nullable int32u packetMulticastRxCount = 7;
  readonly attribute nullable int32u packetMulticastTxCount = 8;
  readonly attribute nullable int32u packetUnicastRxCount = 9;
  readonly attribute nullable int32u packetUnicastTxCount = 10;
  readonly attribute nullable int64u currentMaxRate = 11;
  readonly attribute nullable int64u overrunCount = 12;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  command ResetCounts(): DefaultSuccess = 0;
}

/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
server cluster EthernetNetworkDiagnostics = 55 {
  enum PHYRateEnum : ENUM8 {
    kRate10M = 0;
    kRate100M = 1;
    kRate1G = 2;
    kRate25G = 3;
    kRate5G = 4;
    kRate10G = 5;
    kRate40G = 6;
    kRate100G = 7;
    kRate200G = 8;
    kRate400G = 9;
  }

  bitmap Feature : BITMAP32 {
    kPacketCounts = 0x1;
    kErrorCounts = 0x2;
  }

  readonly attribute nullable PHYRateEnum PHYRate = 0;
  readonly attribute nullable boolean fullDuplex = 1;
  readonly attribute int64u packetRxCount = 2;
  readonly attribute int64u packetTxCount = 3;
  readonly attribute int64u txErrCount = 4;
  readonly attribute int64u collisionCount = 5;
  readonly attribute int64u overrunCount = 6;
  readonly attribute nullable boolean carrierDetect = 7;
  readonly attribute int64u timeSinceReset = 8;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  command ResetCounts(): DefaultSuccess = 0;
}

/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags.
Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */
server cluster Switch = 59 {
  bitmap Feature : BITMAP32 {
    kLatchingSwitch = 0x1;
    kMomentarySwitch = 0x2;
    kMomentarySwitchRelease = 0x4;
    kMomentarySwitchLongPress = 0x8;
    kMomentarySwitchMultiPress = 0x10;
  }

  info event SwitchLatched = 0 {
    INT8U newPosition = 0;
  }

  info event InitialPress = 1 {
    INT8U newPosition = 0;
  }

  info event LongPress = 2 {
    INT8U newPosition = 0;
  }

  info event ShortRelease = 3 {
    INT8U previousPosition = 0;
  }

  info event LongRelease = 4 {
    INT8U previousPosition = 0;
  }

  info event MultiPressOngoing = 5 {
    INT8U newPosition = 0;
    INT8U currentNumberOfPressesCounted = 1;
  }

  info event MultiPressComplete = 6 {
    INT8U previousPosition = 0;
    INT8U totalNumberOfPressesCounted = 1;
  }

  readonly attribute int8u numberOfPositions = 0;
  readonly attribute int8u currentPosition = 1;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
server cluster AdministratorCommissioning = 60 {
  enum CommissioningWindowStatusEnum : ENUM8 {
    kWindowNotOpen = 0;
    kEnhancedWindowOpen = 1;
    kBasicWindowOpen = 2;
  }

  enum StatusCode : ENUM8 {
    kBusy = 2;
    kPAKEParameterError = 3;
    kWindowNotOpen = 4;
  }

  readonly attribute CommissioningWindowStatusEnum windowStatus = 0;
  readonly attribute nullable fabric_idx adminFabricIndex = 1;
  readonly attribute nullable int16u adminVendorId = 2;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct OpenCommissioningWindowRequest {
    INT16U commissioningTimeout = 0;
    OCTET_STRING PAKEPasscodeVerifier = 1;
    INT16U discriminator = 2;
    INT32U iterations = 3;
    OCTET_STRING salt = 4;
  }

  request struct OpenBasicCommissioningWindowRequest {
    INT16U commissioningTimeout = 0;
  }

  timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0;
  timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1;
  timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2;
}

/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */
server cluster OperationalCredentials = 62 {
  enum CertificateChainTypeEnum : ENUM8 {
    kDACCertificate = 1;
    kPAICertificate = 2;
  }

  enum NodeOperationalCertStatusEnum : ENUM8 {
    kOK = 0;
    kInvalidPublicKey = 1;
    kInvalidNodeOpId = 2;
    kInvalidNOC = 3;
    kMissingCsr = 4;
    kTableFull = 5;
    kInvalidAdminSubject = 6;
    kFabricConflict = 9;
    kLabelConflict = 10;
    kInvalidFabricIndex = 11;
  }

  fabric_scoped struct FabricDescriptorStruct {
    octet_string<65> rootPublicKey = 1;
    vendor_id vendorID = 2;
    fabric_id fabricID = 3;
    node_id nodeID = 4;
    char_string<32> label = 5;
    fabric_idx fabricIndex = 254;
  }

  fabric_scoped struct NOCStruct {
    fabric_sensitive octet_string noc = 1;
    nullable fabric_sensitive octet_string icac = 2;
    fabric_idx fabricIndex = 254;
  }

  readonly attribute access(read: administer) NOCStruct NOCs[] = 0;
  readonly attribute FabricDescriptorStruct fabrics[] = 1;
  readonly attribute int8u supportedFabrics = 2;
  readonly attribute int8u commissionedFabrics = 3;
  readonly attribute OCTET_STRING trustedRootCertificates[] = 4;
  readonly attribute int8u currentFabricIndex = 5;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct AttestationRequestRequest {
    OCTET_STRING attestationNonce = 0;
  }

  request struct CertificateChainRequestRequest {
    CertificateChainTypeEnum certificateType = 0;
  }

  request struct CSRRequestRequest {
    OCTET_STRING CSRNonce = 0;
    optional boolean isForUpdateNOC = 1;
  }

  request struct AddNOCRequest {
    OCTET_STRING NOCValue = 0;
    optional OCTET_STRING ICACValue = 1;
    OCTET_STRING IPKValue = 2;
    Int64u caseAdminSubject = 3;
    VENDOR_ID adminVendorId = 4;
  }

  request struct UpdateNOCRequest {
    OCTET_STRING NOCValue = 0;
    optional OCTET_STRING ICACValue = 1;
  }

  request struct UpdateFabricLabelRequest {
    CHAR_STRING<32> label = 0;
  }

  request struct RemoveFabricRequest {
    fabric_idx fabricIndex = 0;
  }

  request struct AddTrustedRootCertificateRequest {
    OCTET_STRING rootCACertificate = 0;
  }

  response struct AttestationResponse = 1 {
    OCTET_STRING attestationElements = 0;
    OCTET_STRING attestationSignature = 1;
  }

  response struct CertificateChainResponse = 3 {
    OCTET_STRING certificate = 0;
  }

  response struct CSRResponse = 5 {
    OCTET_STRING NOCSRElements = 0;
    OCTET_STRING attestationSignature = 1;
  }

  response struct NOCResponse = 8 {
    NodeOperationalCertStatusEnum statusCode = 0;
    optional fabric_idx fabricIndex = 1;
    optional CHAR_STRING debugText = 2;
  }

  command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
  command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
  command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
  command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
  fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
  fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
  command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
  command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
}

/** The Group Key Management Cluster is the mechanism by which group keys are managed. */
server cluster GroupKeyManagement = 63 {
  enum GroupKeySecurityPolicyEnum : ENUM8 {
    kTrustFirst = 0;
    kCacheAndSync = 1;
  }

  bitmap Feature : BITMAP32 {
    kCacheAndSync = 0x1;
  }

  fabric_scoped struct GroupInfoMapStruct {
    group_id groupId = 1;
    endpoint_no endpoints[] = 2;
    optional char_string<16> groupName = 3;
    fabric_idx fabricIndex = 254;
  }

  fabric_scoped struct GroupKeyMapStruct {
    group_id groupId = 1;
    int16u groupKeySetID = 2;
    fabric_idx fabricIndex = 254;
  }

  struct GroupKeySetStruct {
    int16u groupKeySetID = 0;
    GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1;
    nullable octet_string<16> epochKey0 = 2;
    nullable epoch_us epochStartTime0 = 3;
    nullable octet_string<16> epochKey1 = 4;
    nullable epoch_us epochStartTime1 = 5;
    nullable octet_string<16> epochKey2 = 6;
    nullable epoch_us epochStartTime2 = 7;
  }

  attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0;
  readonly attribute GroupInfoMapStruct groupTable[] = 1;
  readonly attribute int16u maxGroupsPerFabric = 2;
  readonly attribute int16u maxGroupKeysPerFabric = 3;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct KeySetWriteRequest {
    GroupKeySetStruct groupKeySet = 0;
  }

  request struct KeySetReadRequest {
    INT16U groupKeySetID = 0;
  }

  request struct KeySetRemoveRequest {
    INT16U groupKeySetID = 0;
  }

  response struct KeySetReadResponse = 2 {
    GroupKeySetStruct groupKeySet = 0;
  }

  response struct KeySetReadAllIndicesResponse = 5 {
    INT16U groupKeySetIDs[] = 0;
  }

  fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
  fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
  fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
  fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
}

/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only
labels. */
server cluster FixedLabel = 64 {
  struct LabelStruct {
    char_string<16> label = 0;
    char_string<16> value = 1;
  }

  readonly attribute LabelStruct labelList[] = 0;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */
server cluster UserLabel = 65 {
  struct LabelStruct {
    char_string<16> label = 0;
    char_string<16> value = 1;
  }

  attribute access(write: manage) LabelStruct labelList[] = 0;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
server cluster ColorControl = 768 {
  enum ColorLoopAction : ENUM8 {
    kDeactivate = 0;
    kActivateFromColorLoopStartEnhancedHue = 1;
    kActivateFromEnhancedCurrentHue = 2;
  }

  enum ColorLoopDirection : ENUM8 {
    kDecrementHue = 0;
    kIncrementHue = 1;
  }

  enum ColorMode : ENUM8 {
    kCurrentHueAndCurrentSaturation = 0;
    kCurrentXAndCurrentY = 1;
    kColorTemperature = 2;
  }

  enum HueDirection : ENUM8 {
    kShortestDistance = 0;
    kLongestDistance = 1;
    kUp = 2;
    kDown = 3;
  }

  enum HueMoveMode : ENUM8 {
    kStop = 0;
    kUp = 1;
    kDown = 3;
  }

  enum HueStepMode : ENUM8 {
    kUp = 1;
    kDown = 3;
  }

  enum SaturationMoveMode : ENUM8 {
    kStop = 0;
    kUp = 1;
    kDown = 3;
  }

  enum SaturationStepMode : ENUM8 {
    kUp = 1;
    kDown = 3;
  }

  bitmap ColorCapabilities : BITMAP16 {
    kHueSaturationSupported = 0x1;
    kEnhancedHueSupported = 0x2;
    kColorLoopSupported = 0x4;
    kXYAttributesSupported = 0x8;
    kColorTemperatureSupported = 0x10;
  }

  bitmap ColorLoopUpdateFlags : BITMAP8 {
    kUpdateAction = 0x1;
    kUpdateDirection = 0x2;
    kUpdateTime = 0x4;
    kUpdateStartHue = 0x8;
  }

  bitmap Feature : BITMAP32 {
    kHueAndSaturation = 0x1;
    kEnhancedHue = 0x2;
    kColorLoop = 0x4;
    kXY = 0x8;
    kColorTemperature = 0x10;
  }

  readonly attribute int8u currentHue = 0;
  readonly attribute int8u currentSaturation = 1;
  readonly attribute int16u remainingTime = 2;
  readonly attribute int16u currentX = 3;
  readonly attribute int16u currentY = 4;
  readonly attribute int16u colorTemperatureMireds = 7;
  readonly attribute enum8 colorMode = 8;
  attribute bitmap8 options = 15;
  readonly attribute nullable int8u numberOfPrimaries = 16;
  readonly attribute int16u enhancedCurrentHue = 16384;
  readonly attribute enum8 enhancedColorMode = 16385;
  readonly attribute int8u colorLoopActive = 16386;
  readonly attribute int8u colorLoopDirection = 16387;
  readonly attribute int16u colorLoopTime = 16388;
  readonly attribute int16u colorLoopStartEnhancedHue = 16389;
  readonly attribute int16u colorLoopStoredEnhancedHue = 16390;
  readonly attribute bitmap16 colorCapabilities = 16394;
  readonly attribute int16u colorTempPhysicalMinMireds = 16395;
  readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
  readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
  attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;

  request struct MoveToHueRequest {
    INT8U hue = 0;
    HueDirection direction = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct MoveHueRequest {
    HueMoveMode moveMode = 0;
    INT8U rate = 1;
    BITMAP8 optionsMask = 2;
    BITMAP8 optionsOverride = 3;
  }

  request struct StepHueRequest {
    HueStepMode stepMode = 0;
    INT8U stepSize = 1;
    INT8U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct MoveToSaturationRequest {
    INT8U saturation = 0;
    INT16U transitionTime = 1;
    BITMAP8 optionsMask = 2;
    BITMAP8 optionsOverride = 3;
  }

  request struct MoveSaturationRequest {
    SaturationMoveMode moveMode = 0;
    INT8U rate = 1;
    BITMAP8 optionsMask = 2;
    BITMAP8 optionsOverride = 3;
  }

  request struct StepSaturationRequest {
    SaturationStepMode stepMode = 0;
    INT8U stepSize = 1;
    INT8U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct MoveToHueAndSaturationRequest {
    INT8U hue = 0;
    INT8U saturation = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct MoveToColorRequest {
    INT16U colorX = 0;
    INT16U colorY = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct MoveColorRequest {
    INT16S rateX = 0;
    INT16S rateY = 1;
    BITMAP8 optionsMask = 2;
    BITMAP8 optionsOverride = 3;
  }

  request struct StepColorRequest {
    INT16S stepX = 0;
    INT16S stepY = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct MoveToColorTemperatureRequest {
    INT16U colorTemperatureMireds = 0;
    INT16U transitionTime = 1;
    BITMAP8 optionsMask = 2;
    BITMAP8 optionsOverride = 3;
  }

  request struct EnhancedMoveToHueRequest {
    INT16U enhancedHue = 0;
    HueDirection direction = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct EnhancedMoveHueRequest {
    HueMoveMode moveMode = 0;
    INT16U rate = 1;
    BITMAP8 optionsMask = 2;
    BITMAP8 optionsOverride = 3;
  }

  request struct EnhancedStepHueRequest {
    HueStepMode stepMode = 0;
    INT16U stepSize = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct EnhancedMoveToHueAndSaturationRequest {
    INT16U enhancedHue = 0;
    INT8U saturation = 1;
    INT16U transitionTime = 2;
    BITMAP8 optionsMask = 3;
    BITMAP8 optionsOverride = 4;
  }

  request struct ColorLoopSetRequest {
    ColorLoopUpdateFlags updateFlags = 0;
    ColorLoopAction action = 1;
    ColorLoopDirection direction = 2;
    INT16U time = 3;
    INT16U startHue = 4;
    BITMAP8 optionsMask = 5;
    BITMAP8 optionsOverride = 6;
  }

  request struct StopMoveStepRequest {
    BITMAP8 optionsMask = 0;
    BITMAP8 optionsOverride = 1;
  }

  request struct MoveColorTemperatureRequest {
    HueMoveMode moveMode = 0;
    INT16U rate = 1;
    INT16U colorTemperatureMinimumMireds = 2;
    INT16U colorTemperatureMaximumMireds = 3;
    BITMAP8 optionsMask = 4;
    BITMAP8 optionsOverride = 5;
  }

  request struct StepColorTemperatureRequest {
    HueStepMode stepMode = 0;
    INT16U stepSize = 1;
    INT16U transitionTime = 2;
    INT16U colorTemperatureMinimumMireds = 3;
    INT16U colorTemperatureMaximumMireds = 4;
    BITMAP8 optionsMask = 5;
    BITMAP8 optionsOverride = 6;
  }

  command MoveToHue(MoveToHueRequest): DefaultSuccess = 0;
  command MoveHue(MoveHueRequest): DefaultSuccess = 1;
  command StepHue(StepHueRequest): DefaultSuccess = 2;
  command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3;
  command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4;
  command StepSaturation(StepSaturationRequest): DefaultSuccess = 5;
  command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6;
  command MoveToColor(MoveToColorRequest): DefaultSuccess = 7;
  command MoveColor(MoveColorRequest): DefaultSuccess = 8;
  command StepColor(StepColorRequest): DefaultSuccess = 9;
  command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10;
  command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64;
  command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65;
  command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66;
  command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67;
  command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68;
  command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71;
  command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75;
  command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76;
}

/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
server cluster OccupancySensing = 1030 {
  enum OccupancySensorTypeEnum : ENUM8 {
    kPIR = 0;
    kUltrasonic = 1;
    kPIRAndUltrasonic = 2;
    kPhysicalContact = 3;
  }

  bitmap OccupancyBitmap : BITMAP8 {
    kOccupied = 0x1;
  }

  bitmap OccupancySensorTypeBitmap : BITMAP8 {
    kPIR = 0x1;
    kUltrasonic = 0x2;
    kPhysicalContact = 0x4;
  }

  readonly attribute OccupancyBitmap occupancy = 0;
  readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
  readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
  readonly attribute command_id generatedCommandList[] = 65528;
  readonly attribute command_id acceptedCommandList[] = 65529;
  readonly attribute event_id eventList[] = 65530;
  readonly attribute attrib_id attributeList[] = 65531;
  readonly attribute bitmap32 featureMap = 65532;
  readonly attribute int16u clusterRevision = 65533;
}

endpoint 0 {
  device type ma_rootdevice = 22, version 1;

  binding cluster OtaSoftwareUpdateProvider;

  server cluster Descriptor {
    callback attribute deviceTypeList;
    callback attribute serverList;
    callback attribute clientList;
    callback attribute partsList;
    ram      attribute featureMap default = 0;
    callback attribute clusterRevision default = 1;
  }

  server cluster AccessControl {
    emits event AccessControlEntryChanged;
    emits event AccessControlExtensionChanged;
    callback attribute acl;
    callback attribute extension;
    callback attribute subjectsPerAccessControlEntry default = 4;
    callback attribute targetsPerAccessControlEntry default = 3;
    callback attribute accessControlEntriesPerFabric default = 4;
    callback attribute attributeList;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster BasicInformation {
    emits event StartUp;
    emits event ShutDown;
    emits event Leave;
    callback attribute dataModelRevision default = 10;
    callback attribute vendorName;
    callback attribute vendorID;
    callback attribute productName;
    callback attribute productID;
    persist  attribute nodeLabel;
    callback attribute location default = "XX";
    callback attribute hardwareVersion default = 0;
    callback attribute hardwareVersionString;
    callback attribute softwareVersion default = 0;
    callback attribute softwareVersionString;
    callback attribute manufacturingDate default = "20210614123456ZZ";
    callback attribute partNumber;
    callback attribute productURL;
    callback attribute productLabel;
    callback attribute serialNumber;
    persist  attribute localConfigDisabled default = 0;
    callback attribute uniqueID;
    callback attribute capabilityMinima;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster OtaSoftwareUpdateRequestor {
    emits event StateTransition;
    emits event VersionApplied;
    emits event DownloadError;
    callback attribute defaultOTAProviders default = 0;
    ram      attribute updatePossible default = 1;
    ram      attribute updateState default = 0;
    ram      attribute updateStateProgress default = 0;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster LocalizationConfiguration {
    persist  attribute activeLocale default = "en-US";
    callback attribute supportedLocales;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster TimeFormatLocalization {
    persist  attribute hourFormat default = 0;
    persist  attribute activeCalendarType default = 0;
    callback attribute supportedCalendarTypes;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster GeneralCommissioning {
    ram      attribute breadcrumb default = 0x0000000000000000;
    callback attribute basicCommissioningInfo;
    callback attribute regulatoryConfig default = 0;
    callback attribute locationCapability default = 0;
    callback attribute supportsConcurrentConnection default = 1;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster NetworkCommissioning {
    ram      attribute maxNetworks;
    callback attribute networks;
    ram      attribute scanMaxTimeSeconds;
    ram      attribute connectMaxTimeSeconds;
    ram      attribute interfaceEnabled;
    ram      attribute lastNetworkingStatus;
    ram      attribute lastNetworkID;
    ram      attribute lastConnectErrorValue;
    ram      attribute featureMap default = 2;
    ram      attribute clusterRevision default = 1;
  }

  server cluster DiagnosticLogs {
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster GeneralDiagnostics {
    emits event HardwareFaultChange;
    emits event RadioFaultChange;
    emits event NetworkFaultChange;
    emits event BootReason;
    callback attribute networkInterfaces;
    callback attribute rebootCount default = 0x0000;
    callback attribute upTime default = 0x0000000000000000;
    callback attribute totalOperationalHours default = 0x00000000;
    callback attribute bootReason;
    callback attribute activeHardwareFaults;
    callback attribute activeRadioFaults;
    callback attribute activeNetworkFaults;
    callback attribute testEventTriggersEnabled default = false;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster SoftwareDiagnostics {
    callback attribute threadMetrics;
    callback attribute currentHeapFree default = 0x0000000000000000;
    callback attribute currentHeapUsed default = 0x0000000000000000;
    callback attribute currentHeapHighWatermark default = 0x0000000000000000;
    ram      attribute featureMap default = 1;
    ram      attribute clusterRevision default = 1;
  }

  server cluster ThreadNetworkDiagnostics {
    callback attribute channel;
    callback attribute routingRole;
    callback attribute networkName default = "0";
    callback attribute panId default = 0x0000;
    callback attribute extendedPanId default = 0x0000000000000000;
    callback attribute meshLocalPrefix;
    callback attribute overrunCount default = 0x0000000000000000;
    callback attribute neighborTable;
    callback attribute routeTable;
    callback attribute partitionId;
    callback attribute weighting;
    callback attribute dataVersion;
    callback attribute stableDataVersion;
    callback attribute leaderRouterId;
    callback attribute detachedRoleCount default = 0x0000;
    callback attribute childRoleCount default = 0x0000;
    callback attribute routerRoleCount default = 0x0000;
    callback attribute leaderRoleCount default = 0x0000;
    callback attribute attachAttemptCount default = 0x0000;
    callback attribute partitionIdChangeCount default = 0x0000;
    callback attribute betterPartitionAttachAttemptCount default = 0x0000;
    callback attribute parentChangeCount default = 0x0000;
    callback attribute txTotalCount default = 0x0000;
    callback attribute txUnicastCount default = 0x0000;
    callback attribute txBroadcastCount default = 0x0000;
    callback attribute txAckRequestedCount default = 0x0000;
    callback attribute txAckedCount default = 0x0000;
    callback attribute txNoAckRequestedCount default = 0x0000;
    callback attribute txDataCount default = 0x0000;
    callback attribute txDataPollCount default = 0x0000;
    callback attribute txBeaconCount default = 0x0000;
    callback attribute txBeaconRequestCount default = 0x0000;
    callback attribute txOtherCount default = 0x0000;
    callback attribute txRetryCount default = 0x0000;
    callback attribute txDirectMaxRetryExpiryCount default = 0x0000;
    callback attribute txIndirectMaxRetryExpiryCount default = 0x0000;
    callback attribute txErrCcaCount default = 0x0000;
    callback attribute txErrAbortCount default = 0x0000;
    callback attribute txErrBusyChannelCount default = 0x0000;
    callback attribute rxTotalCount default = 0x0000;
    callback attribute rxUnicastCount default = 0x0000;
    callback attribute rxBroadcastCount default = 0x0000;
    callback attribute rxDataCount default = 0x0000;
    callback attribute rxDataPollCount default = 0x0000;
    callback attribute rxBeaconCount default = 0x0000;
    callback attribute rxBeaconRequestCount default = 0x0000;
    callback attribute rxOtherCount default = 0x0000;
    callback attribute rxAddressFilteredCount default = 0x0000;
    callback attribute rxDestAddrFilteredCount default = 0x0000;
    callback attribute rxDuplicatedCount default = 0x0000;
    callback attribute rxErrNoFrameCount default = 0x0000;
    callback attribute rxErrUnknownNeighborCount default = 0x0000;
    callback attribute rxErrInvalidSrcAddrCount default = 0x0000;
    callback attribute rxErrSecCount default = 0x0000;
    callback attribute rxErrFcsCount default = 0x0000;
    callback attribute rxErrOtherCount default = 0x0000;
    callback attribute activeTimestamp default = 0x0000000000000000;
    callback attribute pendingTimestamp default = 0x0000000000000000;
    callback attribute delay default = 0x0000;
    callback attribute securityPolicy;
    callback attribute channelPage0Mask default = "0x0000";
    callback attribute operationalDatasetComponents;
    callback attribute activeNetworkFaultsList;
    ram      attribute featureMap default = 0x000F;
    ram      attribute clusterRevision default = 1;
  }

  server cluster WiFiNetworkDiagnostics {
    emits event Disconnection;
    emits event AssociationFailure;
    emits event ConnectionStatus;
    callback attribute bssid;
    callback attribute securityType;
    callback attribute wiFiVersion;
    callback attribute channelNumber default = 0x0000;
    callback attribute rssi default = 0x00;
    callback attribute beaconLostCount default = 0x00000000;
    callback attribute beaconRxCount default = 0x00000000;
    callback attribute packetMulticastRxCount default = 0x00000000;
    callback attribute packetMulticastTxCount default = 0x00000000;
    callback attribute packetUnicastRxCount default = 0x00000000;
    callback attribute packetUnicastTxCount default = 0x00000000;
    callback attribute currentMaxRate default = 0x0000000000000000;
    callback attribute overrunCount default = 0x0000000000000000;
    ram      attribute featureMap default = 3;
    ram      attribute clusterRevision default = 1;
  }

  server cluster EthernetNetworkDiagnostics {
    callback attribute PHYRate;
    callback attribute fullDuplex default = 0x00;
    callback attribute packetRxCount default = 0x0000000000000000;
    callback attribute packetTxCount default = 0x0000000000000000;
    callback attribute txErrCount default = 0x0000000000000000;
    callback attribute collisionCount default = 0x0000000000000000;
    callback attribute overrunCount default = 0x0000000000000000;
    callback attribute carrierDetect default = 0x00;
    callback attribute timeSinceReset default = 0x0000000000000000;
    ram      attribute featureMap default = 3;
    ram      attribute clusterRevision default = 1;
  }

  server cluster Switch {
    emits event SwitchLatched;
    ram      attribute numberOfPositions default = 2;
    ram      attribute currentPosition;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster AdministratorCommissioning {
    callback attribute windowStatus default = 0;
    callback attribute adminFabricIndex default = 1;
    callback attribute adminVendorId default = 0;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster OperationalCredentials {
    callback attribute NOCs;
    callback attribute fabrics;
    callback attribute supportedFabrics;
    callback attribute commissionedFabrics;
    callback attribute trustedRootCertificates;
    callback attribute currentFabricIndex;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster GroupKeyManagement {
    callback attribute groupKeyMap;
    callback attribute groupTable;
    callback attribute maxGroupsPerFabric;
    callback attribute maxGroupKeysPerFabric;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster FixedLabel {
    callback attribute labelList;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }

  server cluster UserLabel {
    callback attribute labelList;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 1;
  }
}
endpoint 1 {
  device type ma_dimmablelight = 257, version 1;


  server cluster Identify {
    ram      attribute identifyTime default = 0x0000;
    ram      attribute identifyType default = 0x0;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 4;
  }

  server cluster Groups {
    ram      attribute nameSupport;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 4;
  }

  server cluster Scenes {
    callback attribute sceneCount default = 0x00;
    ram      attribute currentScene default = 0x00;
    ram      attribute currentGroup default = 0x0000;
    ram      attribute sceneValid default = 0x00;
    ram      attribute nameSupport default = 0x80;
    ram      attribute lastConfiguredBy;
    ram      attribute sceneTableSize;
    callback attribute remainingCapacity;
    callback attribute generatedCommandList;
    callback attribute acceptedCommandList;
    callback attribute attributeList;
    ram      attribute featureMap default = 1;
    ram      attribute clusterRevision default = 5;
  }

  server cluster OnOff {
    persist  attribute onOff default = 0x00;
    ram      attribute globalSceneControl default = 0x01;
    ram      attribute onTime default = 0x0000;
    ram      attribute offWaitTime default = 0x0000;
    persist  attribute startUpOnOff default = 0xFF;
    ram      attribute featureMap default = 1;
    ram      attribute clusterRevision default = 5;
  }

  server cluster LevelControl {
    persist  attribute currentLevel default = 0x01;
    ram      attribute remainingTime default = 0x0000;
    ram      attribute minLevel default = 0x01;
    ram      attribute maxLevel default = 0xFE;
    ram      attribute currentFrequency default = 0x0000;
    ram      attribute minFrequency default = 0x0000;
    ram      attribute maxFrequency default = 0x0000;
    ram      attribute options default = 0x00;
    ram      attribute onOffTransitionTime default = 0x0000;
    ram      attribute onLevel default = 0xFF;
    ram      attribute onTransitionTime;
    ram      attribute offTransitionTime;
    ram      attribute defaultMoveRate default = 50;
    persist  attribute startUpCurrentLevel default = 255;
    ram      attribute featureMap default = 3;
    ram      attribute clusterRevision default = 5;
  }

  server cluster Descriptor {
    callback attribute deviceTypeList;
    callback attribute serverList;
    callback attribute clientList;
    callback attribute partsList;
    ram      attribute featureMap default = 0;
    callback attribute clusterRevision default = 1;
  }

  server cluster ColorControl {
    persist  attribute currentHue default = 0x00;
    persist  attribute currentSaturation default = 0x00;
    ram      attribute remainingTime default = 0x0000;
    persist  attribute currentX default = 0x616B;
    persist  attribute currentY default = 0x607D;
    persist  attribute colorTemperatureMireds default = 0x00FA;
    persist  attribute colorMode default = 0x01;
    ram      attribute options default = 0x00;
    ram      attribute numberOfPrimaries;
    persist  attribute enhancedCurrentHue default = 0x0000;
    persist  attribute enhancedColorMode default = 0x01;
    persist  attribute colorLoopActive default = 0x00;
    persist  attribute colorLoopDirection default = 0x00;
    persist  attribute colorLoopTime default = 0x0019;
    ram      attribute colorLoopStartEnhancedHue default = 0x2300;
    ram      attribute colorLoopStoredEnhancedHue default = 0x0000;
    ram      attribute colorCapabilities default = 0x1F;
    ram      attribute colorTempPhysicalMinMireds default = 0x0000;
    ram      attribute colorTempPhysicalMaxMireds default = 0xFEFF;
    ram      attribute coupleColorTempToLevelMinMireds;
    persist  attribute startUpColorTemperatureMireds;
    ram      attribute featureMap default = 0x1F;
    ram      attribute clusterRevision default = 6;
  }

  server cluster OccupancySensing {
    ram      attribute occupancy;
    ram      attribute occupancySensorType;
    ram      attribute occupancySensorTypeBitmap;
    ram      attribute featureMap default = 0;
    ram      attribute clusterRevision default = 3;
  }
}


