/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const JointFabricDatastore = Cluster(
  { name: "JointFabricDatastore", id: 1874, classification: "node" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute({ name: "AnchorRootCa", id: 0, type: "octstr", access: "R A", conformance: "P, M" }),
  Attribute({ name: "AnchorNodeId", id: 1, type: "node-id", access: "R A", conformance: "P, M" }),
  Attribute({ name: "AnchorVendorId", id: 2, type: "vendor-id", access: "R A", conformance: "P, M" }),
  Attribute({ name: "FriendlyName", id: 3, type: "string", access: "R A", conformance: "P, M", constraint: "max 32" }),
  Attribute(
    { name: "GroupKeySetList", id: 4, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreGroupKeySetStruct" })
  ),
  Attribute(
    { name: "GroupList", id: 5, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreGroupInformationEntryStruct" })
  ),
  Attribute(
    { name: "NodeList", id: 6, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreNodeInformationEntryStruct" })
  ),
  Attribute(
    { name: "AdminList", id: 7, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreAdministratorInformationEntryStruct" })
  ),
  Attribute({ name: "Status", id: 8, type: "DatastoreStatusEntryStruct", access: "R A", conformance: "P, M" }),
  Attribute(
    { name: "EndpointGroupIdList", id: 9, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreEndpointGroupIDEntryStruct" })
  ),
  Attribute(
    { name: "EndpointBindingList", id: 10, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreEndpointBindingEntryStruct" })
  ),
  Attribute(
    { name: "NodeKeySetList", id: 11, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreNodeKeySetEntryStruct" })
  ),
  Attribute(
    { name: "NodeAclList", id: 12, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreACLEntryStruct" })
  ),
  Attribute(
    { name: "NodeEndpointList", id: 13, type: "list", access: "R A", conformance: "P, M" },
    Field({ name: "entry", type: "DatastoreEndpointEntryStruct" })
  ),
  Command(
    { name: "AddKeySet", id: 0, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "GroupKeySet", id: 0, type: "DatastoreGroupKeySetStruct", conformance: "M" })
  ),
  Command(
    { name: "UpdateKeySet", id: 1, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "GroupKeySet", id: 0, type: "DatastoreGroupKeySetStruct", conformance: "M" })
  ),
  Command(
    { name: "RemoveKeySet", id: 2, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "GroupKeySetId", id: 0, type: "uint16", conformance: "M" })
  ),
  Command(
    { name: "AddGroup", id: 3, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "GroupId", id: 0, type: "group-id", conformance: "M" }),
    Field({ name: "FriendlyName", id: 1, type: "string", conformance: "M", constraint: "max 32" }),
    Field({ name: "GroupKeySetId", id: 2, type: "uint16", conformance: "M", constraint: "1 to 65534", quality: "X" }),
    Field({ name: "GroupCat", id: 3, type: "uint16", conformance: "M", constraint: "desc", quality: "X" }),
    Field({ name: "GroupCatVersion", id: 4, type: "uint16", conformance: "M", constraint: "1 to 65534", quality: "X" }),
    Field({ name: "GroupPermission", id: 5, type: "DatastoreAccessControlEntryPrivilegeEnum", conformance: "M" })
  ),
  Command(
    { name: "UpdateGroup", id: 4, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "GroupId", id: 0, type: "group-id", conformance: "M" }),
    Field({ name: "FriendlyName", id: 1, type: "string", conformance: "M", constraint: "max 32", quality: "X" }),
    Field({ name: "GroupKeySetId", id: 2, type: "uint16", conformance: "M", constraint: "1 to 65535", quality: "X" }),
    Field({ name: "GroupCat", id: 3, type: "uint16", conformance: "M", constraint: "desc", quality: "X" }),
    Field({ name: "GroupCatVersion", id: 4, type: "uint16", conformance: "M", constraint: "1 to 65535", quality: "X" }),
    Field({
      name: "GroupPermission",
      id: 5,
      type: "DatastoreAccessControlEntryPrivilegeEnum",
      conformance: "M",
      constraint: "x"
    })
  ),
  Command(
    { name: "RemoveGroup", id: 5, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "GroupId", id: 0, type: "group-id", conformance: "M" })
  ),
  Command(
    { name: "AddAdmin", id: 6, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 1, type: "node-id", conformance: "M" }),
    Field({ name: "FriendlyName", id: 2, type: "string", conformance: "M", constraint: "max 32" }),
    Field({ name: "VendorId", id: 3, type: "vendor-id", conformance: "M" }),
    Field({ name: "Icac", id: 4, type: "octstr", conformance: "M", constraint: "max 400" })
  ),
  Command(
    { name: "UpdateAdmin", id: 7, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M", quality: "X" }),
    Field({ name: "FriendlyName", id: 1, type: "string", conformance: "M", constraint: "max 32", quality: "X" }),
    Field({ name: "Icac", id: 2, type: "octstr", conformance: "M", constraint: "max 400", quality: "X" })
  ),
  Command(
    { name: "RemoveAdmin", id: 8, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" })
  ),
  Command(
    { name: "AddPendingNode", id: 9, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" }),
    Field({ name: "FriendlyName", id: 1, type: "string", conformance: "M", constraint: "max 32" })
  ),
  Command(
    { name: "RefreshNode", id: 10, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" })
  ),
  Command(
    { name: "UpdateNode", id: 11, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" }),
    Field({ name: "FriendlyName", id: 1, type: "string", conformance: "M", constraint: "max 32" })
  ),
  Command(
    { name: "RemoveNode", id: 12, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" })
  ),
  Command(
    {
      name: "UpdateEndpointForNode",
      id: 13,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "EndpointId", id: 0, type: "endpoint-no", conformance: "M" }),
    Field({ name: "NodeId", id: 1, type: "node-id", conformance: "M" }),
    Field({ name: "FriendlyName", id: 2, type: "string", conformance: "M", constraint: "max 32" })
  ),
  Command(
    {
      name: "AddGroupIdToEndpointForNode",
      id: 14,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" }),
    Field({ name: "EndpointId", id: 1, type: "endpoint-no", conformance: "M" }),
    Field({ name: "GroupId", id: 2, type: "group-id", conformance: "M" })
  ),
  Command(
    {
      name: "RemoveGroupIdFromEndpointForNode",
      id: 15,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" }),
    Field({ name: "EndpointId", id: 1, type: "endpoint-no", conformance: "M" }),
    Field({ name: "GroupId", id: 2, type: "group-id", conformance: "M" })
  ),
  Command(
    {
      name: "AddBindingToEndpointForNode",
      id: 16,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" }),
    Field({ name: "EndpointId", id: 1, type: "endpoint-no", conformance: "M" }),
    Field({ name: "Binding", id: 2, type: "DatastoreBindingTargetStruct", conformance: "M" })
  ),
  Command(
    {
      name: "RemoveBindingFromEndpointForNode",
      id: 17,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "ListId", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "EndpointId", id: 1, type: "endpoint-no", conformance: "M" }),
    Field({ name: "NodeId", id: 2, type: "node-id", conformance: "M" })
  ),
  Command(
    { name: "AddAclToNode", id: 18, access: "A", conformance: "P, M", direction: "request", response: "status" },
    Field({ name: "NodeId", id: 0, type: "node-id", conformance: "M" }),
    Field({ name: "AclEntry", id: 1, type: "DatastoreAccessControlEntryStruct", conformance: "M" })
  ),
  Command(
    {
      name: "RemoveAclFromNode",
      id: 19,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "ListId", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "NodeId", id: 1, type: "node-id", conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreStateEnum", type: "enum8" },
    Field({ name: "Pending", id: 0, conformance: "M" }),
    Field({ name: "Committed", id: 1, conformance: "M" }),
    Field({ name: "DeletePending", id: 2, conformance: "M" }),
    Field({ name: "CommitFailed", id: 3, conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreStatusEntryStruct", type: "struct" },
    Field({ name: "State", id: 0, type: "DatastoreStateEnum", access: "R V", conformance: "M", default: 0 }),
    Field({ name: "UpdateTimestamp", id: 1, type: "epoch-s", access: "R V", conformance: "M" }),
    Field({ name: "FailureCode", id: 2, type: "status", access: "R V", conformance: "M", default: 0 })
  ),
  Datatype(
    { name: "DatastoreNodeKeySetEntryStruct", type: "struct" },
    Field({ name: "NodeId", id: 0, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "GroupKeySetId", id: 1, type: "uint16", access: "R V", conformance: "M" }),
    Field({ name: "StatusEntry", id: 2, type: "DatastoreStatusEntryStruct", access: "R V", conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreAccessControlEntryPrivilegeEnum", type: "enum8" },
    Field({ name: "View", id: 1, conformance: "M" }),
    Field({ name: "ProxyView", id: 2, conformance: "D" }),
    Field({ name: "Operate", id: 3, conformance: "M" }),
    Field({ name: "Manage", id: 4, conformance: "M" }),
    Field({ name: "Administer", id: 5, conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreGroupInformationEntryStruct", type: "struct" },
    Field({ name: "GroupId", id: 0, type: "uint64", access: "R V", conformance: "M" }),
    Field({ name: "FriendlyName", id: 1, type: "string", access: "R V", conformance: "M", constraint: "max 32" }),
    Field({
      name: "GroupKeySetId",
      id: 2,
      type: "uint16",
      access: "R V",
      conformance: "M",
      constraint: "1 to 65534",
      quality: "X"
    }),
    Field({
      name: "GroupCat",
      id: 3,
      type: "uint16",
      access: "R V",
      conformance: "M",
      constraint: "desc",
      quality: "X"
    }),
    Field({
      name: "GroupCatVersion",
      id: 4,
      type: "uint16",
      access: "R V",
      conformance: "M",
      constraint: "1 to 65534",
      quality: "X"
    }),
    Field({
      name: "GroupPermission",
      id: 5,
      type: "DatastoreAccessControlEntryPrivilegeEnum",
      access: "R V",
      conformance: "M"
    })
  ),
  Datatype(
    { name: "DatastoreBindingTargetStruct", type: "struct" },
    Field({ name: "Node", id: 1, type: "node-id", conformance: "Endpoint" }),
    Field({ name: "Group", id: 2, type: "group-id", conformance: "!Endpoint", constraint: "min 1" }),
    Field({ name: "Endpoint", id: 3, type: "endpoint-no", conformance: "!Group" }),
    Field({ name: "Cluster", id: 4, type: "cluster-id", conformance: "O" })
  ),
  Datatype(
    { name: "DatastoreEndpointBindingEntryStruct", type: "struct" },
    Field({ name: "NodeId", id: 0, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "EndpointId", id: 1, type: "endpoint-no", access: "R V", conformance: "M" }),
    Field({ name: "ListId", id: 2, type: "uint16", access: "R V", conformance: "M" }),
    Field({
      name: "Binding",
      id: 3,
      type: "DatastoreBindingTargetStruct",
      access: "R V",
      conformance: "M",
      constraint: "desc"
    }),
    Field({ name: "StatusEntry", id: 4, type: "DatastoreStatusEntryStruct", access: "R V", conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreEndpointGroupIDEntryStruct", type: "struct" },
    Field({ name: "NodeId", id: 0, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "EndpointId", id: 1, type: "endpoint-no", access: "R V", conformance: "M" }),
    Field({ name: "GroupId", id: 2, type: "group-id", access: "R V", conformance: "M" }),
    Field({ name: "StatusEntry", id: 3, type: "DatastoreStatusEntryStruct", access: "R V", conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreEndpointEntryStruct", type: "struct" },
    Field({ name: "EndpointId", id: 0, type: "endpoint-no", access: "R V", conformance: "M" }),
    Field({ name: "NodeId", id: 1, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "FriendlyName", id: 2, type: "string", access: "R V", conformance: "M", constraint: "max 32" }),
    Field({ name: "StatusEntry", id: 3, type: "DatastoreStatusEntryStruct", access: "R V", conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreAccessControlEntryAuthModeEnum", type: "enum8" },
    Field({ name: "Pase", id: 1, conformance: "M" }),
    Field({ name: "Case", id: 2, conformance: "M" }),
    Field({ name: "Group", id: 3, conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreAccessControlTargetStruct", type: "struct" },
    Field({ name: "Cluster", id: 0, type: "cluster-id", conformance: "M", quality: "X" }),
    Field({ name: "Endpoint", id: 1, type: "endpoint-no", conformance: "M", quality: "X" }),
    Field({ name: "DeviceType", id: 2, type: "devtype-id", conformance: "M", quality: "X" })
  ),
  Datatype(
    { name: "DatastoreAccessControlEntryStruct", type: "struct" },
    Field({ name: "Privilege", id: 1, type: "DatastoreAccessControlEntryPrivilegeEnum", conformance: "M" }),
    Field({ name: "AuthMode", id: 2, type: "DatastoreAccessControlEntryAuthModeEnum", conformance: "M" }),
    Field(
      {
        name: "Subjects",
        id: 3,
        type: "list",
        conformance: "M",
        constraint: "max subjectsPerAccessControlEntry",
        quality: "X"
      },
      Field({ name: "entry", type: "subject-id" })
    ),
    Field(
      {
        name: "Targets",
        id: 4,
        type: "list",
        conformance: "M",
        constraint: "max targetsPerAccessControlEntry",
        quality: "X"
      },
      Field({ name: "entry", type: "DatastoreAccessControlTargetStruct" })
    )
  ),
  Datatype(
    { name: "DatastoreACLEntryStruct", type: "struct" },
    Field({ name: "NodeId", id: 0, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "ListId", id: 1, type: "uint16", access: "R V", conformance: "M" }),
    Field({ name: "AclEntry", id: 2, type: "DatastoreAccessControlEntryStruct", access: "R V", conformance: "M" }),
    Field({ name: "StatusEntry", id: 3, type: "DatastoreStatusEntryStruct", access: "R V", conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreNodeInformationEntryStruct", type: "struct" },
    Field({ name: "NodeId", id: 1, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "FriendlyName", id: 2, type: "string", access: "R V", conformance: "M", constraint: "max 32" }),
    Field({
      name: "CommissioningStatusEntry",
      id: 3,
      type: "DatastoreStatusEntryStruct",
      access: "R V",
      conformance: "M"
    })
  ),
  Datatype(
    { name: "DatastoreAdministratorInformationEntryStruct", type: "struct" },
    Field({ name: "NodeId", id: 1, type: "node-id", access: "R V", conformance: "M" }),
    Field({ name: "FriendlyName", id: 2, type: "string", access: "R V", conformance: "M", constraint: "max 32" }),
    Field({ name: "VendorId", id: 3, type: "vendor-id", access: "R V", conformance: "M" }),
    Field({ name: "Icac", id: 4, type: "octstr", access: "R V", conformance: "M", constraint: "max 400" })
  ),
  Datatype(
    { name: "DatastoreGroupKeySecurityPolicyEnum", type: "enum8" },
    Field({ name: "TrustFirst", id: 0, conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreGroupKeyMulticastPolicyEnum", type: "enum8" },
    Field({ name: "PerGroupId", id: 0, conformance: "M" }),
    Field({ name: "AllNodes", id: 1, conformance: "M" })
  ),
  Datatype(
    { name: "DatastoreGroupKeySetStruct", type: "struct" },
    Field({ name: "GroupKeySetId", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "GroupKeySecurityPolicy", id: 1, type: "DatastoreGroupKeySecurityPolicyEnum", conformance: "M" }),
    Field({ name: "EpochKey0", id: 2, type: "octstr", conformance: "M", constraint: "16", quality: "X" }),
    Field({ name: "EpochStartTime0", id: 3, type: "epoch-us", conformance: "M", quality: "X" }),
    Field({ name: "EpochKey1", id: 4, type: "octstr", conformance: "M", constraint: "16", quality: "X" }),
    Field({ name: "EpochStartTime1", id: 5, type: "epoch-us", conformance: "M", quality: "X" }),
    Field({ name: "EpochKey2", id: 6, type: "octstr", conformance: "M", constraint: "16", quality: "X" }),
    Field({ name: "EpochStartTime2", id: 7, type: "epoch-us", conformance: "M", quality: "X" }),
    Field({ name: "GroupKeyMulticastPolicy", id: 8, type: "DatastoreGroupKeyMulticastPolicyEnum", conformance: "P, M" })
  )
);
MatterDefinition.children.push(JointFabricDatastore);
export {
  JointFabricDatastore
};
//# sourceMappingURL=joint-fabric-datastore.element.js.map
