"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 operational_credentials_element_exports = {};
__export(operational_credentials_element_exports, {
  OperationalCredentials: () => OperationalCredentials
});
module.exports = __toCommonJS(operational_credentials_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 OperationalCredentials = (0, import_elements.ClusterElement)(
  { name: "OperationalCredentials", id: 62, classification: "node" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  (0, import_elements.AttributeElement)(
    {
      name: "Nocs",
      id: 0,
      type: "list",
      access: "R F A",
      conformance: "M",
      constraint: "max supportedFabrics",
      quality: "N C"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "NOCStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "Fabrics",
      id: 1,
      type: "list",
      access: "R F V",
      conformance: "M",
      constraint: "max supportedFabrics",
      quality: "N"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "FabricDescriptorStruct" })
  ),
  (0, import_elements.AttributeElement)({
    name: "SupportedFabrics",
    id: 2,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "5 to 254",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "CommissionedFabrics",
    id: 3,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "max supportedFabrics",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "TrustedRootCertificates",
      id: 4,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max supportedFabrics[max 400]",
      quality: "N C"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "octstr" })
  ),
  (0, import_elements.AttributeElement)({ name: "CurrentFabricIndex", id: 5, type: "fabric-idx", access: "R V", conformance: "M", default: 0 }),
  (0, import_elements.CommandElement)(
    {
      name: "AttestationRequest",
      id: 0,
      access: "A",
      conformance: "M",
      direction: "request",
      response: "AttestationResponse"
    },
    (0, import_elements.FieldElement)({ name: "AttestationNonce", id: 0, type: "octstr", conformance: "M", constraint: "32" })
  ),
  (0, import_elements.CommandElement)(
    { name: "AttestationResponse", id: 1, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "AttestationElements", id: 0, type: "octstr", conformance: "M", constraint: "max 900" }),
    (0, import_elements.FieldElement)({ name: "AttestationSignature", id: 1, type: "octstr", conformance: "M", constraint: "64" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "CertificateChainRequest",
      id: 2,
      access: "A",
      conformance: "M",
      direction: "request",
      response: "CertificateChainResponse"
    },
    (0, import_elements.FieldElement)({ name: "CertificateType", id: 0, type: "CertificateChainTypeEnum", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)(
    { name: "CertificateChainResponse", id: 3, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Certificate", id: 0, type: "octstr", conformance: "M", constraint: "max 600" })
  ),
  (0, import_elements.CommandElement)(
    { name: "CsrRequest", id: 4, access: "A", conformance: "M", direction: "request", response: "CsrResponse" },
    (0, import_elements.FieldElement)({ name: "CsrNonce", id: 0, type: "octstr", conformance: "M", constraint: "32" }),
    (0, import_elements.FieldElement)({ name: "IsForUpdateNoc", id: 1, type: "bool", conformance: "O", default: false })
  ),
  (0, import_elements.CommandElement)(
    { name: "CsrResponse", id: 5, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "NocsrElements", id: 0, type: "octstr", conformance: "M", constraint: "max 900" }),
    (0, import_elements.FieldElement)({ name: "AttestationSignature", id: 1, type: "octstr", conformance: "M", constraint: "64" })
  ),
  (0, import_elements.CommandElement)(
    { name: "AddNoc", id: 6, access: "A", conformance: "M", direction: "request", response: "NocResponse" },
    (0, import_elements.FieldElement)({ name: "NocValue", id: 0, type: "octstr", conformance: "M", constraint: "max 400" }),
    (0, import_elements.FieldElement)({ name: "IcacValue", id: 1, type: "octstr", conformance: "O", constraint: "max 400" }),
    (0, import_elements.FieldElement)({ name: "IpkValue", id: 2, type: "octstr", conformance: "M", constraint: "16" }),
    (0, import_elements.FieldElement)({ name: "CaseAdminSubject", id: 3, type: "subject-id", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "AdminVendorId", id: 4, type: "vendor-id", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "UpdateNoc", id: 7, access: "F A", conformance: "M", direction: "request", response: "NocResponse" },
    (0, import_elements.FieldElement)({ name: "NocValue", id: 0, type: "octstr", access: "F", conformance: "M", constraint: "max 400" }),
    (0, import_elements.FieldElement)({ name: "IcacValue", id: 1, type: "octstr", access: "F", conformance: "O", constraint: "max 400" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.CommandElement)(
    { name: "NocResponse", id: 8, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "StatusCode", id: 0, type: "NodeOperationalCertStatusEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({
      name: "FabricIndex",
      id: 1,
      type: "fabric-idx",
      conformance: "StatusCode == Ok, O",
      constraint: "1 to 254"
    }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 2, type: "string", conformance: "O", constraint: "max 128" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "UpdateFabricLabel",
      id: 9,
      access: "F A",
      conformance: "M",
      direction: "request",
      response: "NocResponse"
    },
    (0, import_elements.FieldElement)({ name: "Label", id: 0, type: "string", access: "F", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.CommandElement)(
    { name: "RemoveFabric", id: 10, access: "A", conformance: "M", direction: "request", response: "NocResponse" },
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 0, type: "fabric-idx", conformance: "M", constraint: "1 to 254" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "AddTrustedRootCertificate",
      id: 11,
      access: "A",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "RootCaCertificate", id: 0, type: "octstr", conformance: "M", constraint: "max 400" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "SetVidVerificationStatement",
      id: 12,
      access: "F A",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "VendorId", id: 0, type: "vendor-id", conformance: "O.a+" }),
    (0, import_elements.FieldElement)({ name: "VidVerificationStatement", id: 1, type: "octstr", conformance: "O.a+", constraint: "max 85" }),
    (0, import_elements.FieldElement)({ name: "Vvsc", id: 2, type: "octstr", conformance: "O.a+", constraint: "max 400" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "SignVidVerificationRequest",
      id: 13,
      access: "A",
      conformance: "M",
      direction: "request",
      response: "SignVidVerificationResponse"
    },
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 0, type: "fabric-idx", conformance: "M", constraint: "1 to 254" }),
    (0, import_elements.FieldElement)({ name: "ClientChallenge", id: 1, type: "octstr", conformance: "M", constraint: "32" })
  ),
  (0, import_elements.CommandElement)(
    { name: "SignVidVerificationResponse", id: 14, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 0, type: "fabric-idx", conformance: "M", constraint: "1 to 254" }),
    (0, import_elements.FieldElement)({ name: "FabricBindingVersion", id: 1, type: "uint8", conformance: "M", constraint: "1 to 255" }),
    (0, import_elements.FieldElement)({ name: "Signature", id: 2, type: "octstr", conformance: "M", constraint: "min 1" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CertificateChainTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "DacCertificate", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PaiCertificate", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "NodeOperationalCertStatusEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Ok", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidPublicKey", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidNodeOpId", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidNoc", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MissingCsr", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "TableFull", id: 5, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidAdminSubject", id: 6, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "FabricConflict", id: 9, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LabelConflict", id: 10, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidFabricIndex", id: 11, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "NOCStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Noc", id: 1, type: "octstr", access: "F", conformance: "M", constraint: "max 400" }),
    (0, import_elements.FieldElement)({ name: "Icac", id: 2, type: "octstr", access: "F", conformance: "M", constraint: "max 400", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Vvsc", id: 3, type: "octstr", access: "F", conformance: "desc", constraint: "max 400" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "FabricDescriptorStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "RootPublicKey", id: 1, type: "octstr", access: "F", conformance: "M", constraint: "65" }),
    (0, import_elements.FieldElement)({ name: "VendorId", id: 2, type: "vendor-id", access: "F", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "FabricId", id: 3, type: "fabric-id", access: "F", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NodeId", id: 4, type: "node-id", access: "F", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Label", id: 5, type: "string", access: "F", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "VidVerificationStatement", id: 6, type: "octstr", access: "F", conformance: "O", constraint: "85" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(OperationalCredentials);
//# sourceMappingURL=operational-credentials.element.js.map
