"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var access_control_element_exports = {};
__export(access_control_element_exports, {
  AccessControl: () => AccessControl
});
module.exports = __toCommonJS(access_control_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const AccessControl = (0, import_elements.ClusterElement)(
  { name: "AccessControl", id: 31, classification: "node" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "EXTS", conformance: "O", constraint: "0", title: "Extension" }),
    (0, import_elements.FieldElement)({ name: "MNGD", conformance: "desc", constraint: "1", title: "ManagedDevice" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "Acl", id: 0, type: "list", access: "RW F A", conformance: "M", constraint: "desc" },
    (0, import_elements.FieldElement)({ name: "entry", type: "AccessControlEntryStruct" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "Extension", id: 1, type: "list", access: "RW F A", conformance: "EXTS", constraint: "desc" },
    (0, import_elements.FieldElement)({ name: "entry", type: "AccessControlExtensionStruct" })
  ),
  (0, import_elements.AttributeElement)({
    name: "SubjectsPerAccessControlEntry",
    id: 2,
    type: "uint16",
    access: "R V",
    conformance: "M",
    constraint: "min 4",
    default: 4,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "TargetsPerAccessControlEntry",
    id: 3,
    type: "uint16",
    access: "R V",
    conformance: "M",
    constraint: "min 3",
    default: 3,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "AccessControlEntriesPerFabric",
    id: 4,
    type: "uint16",
    access: "R V",
    conformance: "M",
    constraint: "min 4",
    default: 4,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "CommissioningArl",
      id: 5,
      type: "list",
      access: "R V",
      conformance: "MNGD",
      constraint: "desc",
      default: [],
      quality: "F"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "CommissioningAccessRestrictionEntryStruct" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "Arl", id: 6, type: "list", access: "R F V", conformance: "MNGD", constraint: "desc", default: [] },
    (0, import_elements.FieldElement)({ name: "entry", type: "AccessRestrictionEntryStruct" })
  ),
  (0, import_elements.EventElement)(
    { name: "AccessControlEntryChanged", id: 0, access: "S A", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({
      name: "AdminNodeId",
      id: 1,
      type: "node-id",
      access: "S",
      conformance: "M",
      constraint: "desc",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({
      name: "AdminPasscodeId",
      id: 2,
      type: "uint16",
      access: "S",
      conformance: "M",
      constraint: "desc",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "ChangeType", id: 3, type: "ChangeTypeEnum", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LatestValue", id: 4, type: "AccessControlEntryStruct", access: "S", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.EventElement)(
    { name: "AccessControlExtensionChanged", id: 1, access: "S A", conformance: "EXTS", priority: "info" },
    (0, import_elements.FieldElement)({
      name: "AdminNodeId",
      id: 1,
      type: "node-id",
      access: "S",
      conformance: "M",
      constraint: "desc",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({
      name: "AdminPasscodeId",
      id: 2,
      type: "uint16",
      access: "S",
      conformance: "M",
      constraint: "desc",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "ChangeType", id: 3, type: "ChangeTypeEnum", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({
      name: "LatestValue",
      id: 4,
      type: "AccessControlExtensionStruct",
      access: "S",
      conformance: "M",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.EventElement)(
    { name: "FabricRestrictionReviewUpdate", id: 2, access: "S A", conformance: "MNGD", priority: "info" },
    (0, import_elements.FieldElement)({ name: "Token", id: 0, type: "uint64", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Instruction", id: 1, type: "string", access: "S", conformance: "O", constraint: "max 512" }),
    (0, import_elements.FieldElement)({ name: "ArlRequestFlowUrl", id: 2, type: "string", access: "S", conformance: "O", constraint: "max 256" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ReviewFabricRestrictions",
      id: 0,
      access: "F A",
      conformance: "MNGD",
      direction: "request",
      response: "ReviewFabricRestrictionsResponse"
    },
    (0, import_elements.FieldElement)(
      { name: "Arl", id: 0, type: "list", conformance: "M", constraint: "desc" },
      (0, import_elements.FieldElement)({ name: "entry", type: "CommissioningAccessRestrictionEntryStruct" })
    )
  ),
  (0, import_elements.CommandElement)(
    { name: "ReviewFabricRestrictionsResponse", id: 1, conformance: "MNGD", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Token", id: 0, type: "uint64", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ChangeTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Changed", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Added", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Removed", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessControlEntryPrivilegeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "View", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ProxyView", id: 2, conformance: "D" }),
    (0, import_elements.FieldElement)({ name: "Operate", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Manage", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Administer", id: 5, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessRestrictionTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "AttributeAccessForbidden", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "AttributeWriteForbidden", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "CommandForbidden", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EventForbidden", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessControlEntryAuthModeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Pase", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Case", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Group", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessControlTargetStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Cluster", id: 0, type: "cluster-id", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Endpoint", id: 1, type: "endpoint-no", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "DeviceType", id: 2, type: "devtype-id", conformance: "M", quality: "X" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessControlEntryStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Privilege", id: 1, type: "AccessControlEntryPrivilegeEnum", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "AuthMode", id: 2, type: "AccessControlEntryAuthModeEnum", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)(
      {
        name: "Subjects",
        id: 3,
        type: "list",
        access: "S",
        conformance: "M",
        constraint: "max subjectsPerAccessControlEntry",
        quality: "X"
      },
      (0, import_elements.FieldElement)({ name: "entry", type: "subject-id" })
    ),
    (0, import_elements.FieldElement)(
      {
        name: "Targets",
        id: 4,
        type: "list",
        access: "S",
        conformance: "M",
        constraint: "max targetsPerAccessControlEntry",
        quality: "X"
      },
      (0, import_elements.FieldElement)({ name: "entry", type: "AccessControlTargetStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessControlExtensionStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Data", id: 1, type: "octstr", access: "S", conformance: "M", constraint: "max 128" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessRestrictionStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Type", id: 0, type: "AccessRestrictionTypeEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Id", id: 1, type: "uint32", conformance: "M", quality: "X" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AccessRestrictionEntryStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Endpoint", id: 0, type: "endpoint-no", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Cluster", id: 1, type: "cluster-id", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "Restrictions", id: 2, type: "list", access: "S", conformance: "M", constraint: "min 1" },
      (0, import_elements.FieldElement)({ name: "entry", type: "AccessRestrictionStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CommissioningAccessRestrictionEntryStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Endpoint", id: 0, type: "endpoint-no", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Cluster", id: 1, type: "cluster-id", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "Restrictions", id: 2, type: "list", conformance: "M", constraint: "min 1" },
      (0, import_elements.FieldElement)({ name: "entry", type: "AccessRestrictionStruct" })
    )
  )
);
import_MatterDefinition.MatterDefinition.children.push(AccessControl);
//# sourceMappingURL=access-control.element.js.map
