"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 ota_software_update_provider_element_exports = {};
__export(ota_software_update_provider_element_exports, {
  OtaSoftwareUpdateProvider: () => OtaSoftwareUpdateProvider
});
module.exports = __toCommonJS(ota_software_update_provider_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 OtaSoftwareUpdateProvider = (0, import_elements.ClusterElement)(
  { name: "OtaSoftwareUpdateProvider", id: 41, classification: "node" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  (0, import_elements.CommandElement)(
    {
      name: "QueryImage",
      id: 0,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "QueryImageResponse"
    },
    (0, import_elements.FieldElement)({ name: "VendorId", id: 0, type: "vendor-id", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ProductId", id: 1, type: "uint16", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "SoftwareVersion", id: 2, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "ProtocolsSupported", id: 3, type: "list", conformance: "M", constraint: "max 8" },
      (0, import_elements.FieldElement)({ name: "entry", type: "DownloadProtocolEnum" })
    ),
    (0, import_elements.FieldElement)({ name: "HardwareVersion", id: 4, type: "uint16", conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "Location", id: 5, type: "string", conformance: "O", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "RequestorCanConsent", id: 6, type: "bool", conformance: "O", default: false }),
    (0, import_elements.FieldElement)({ name: "MetadataForProvider", id: 7, type: "octstr", conformance: "O", constraint: "max 512" })
  ),
  (0, import_elements.CommandElement)(
    { name: "QueryImageResponse", id: 1, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Status", id: 0, type: "StatusEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DelayedActionTime", id: 1, type: "uint32", conformance: "Status == Busy" }),
    (0, import_elements.FieldElement)({ name: "ImageUri", id: 2, type: "string", conformance: "Status == UpdateAvailable", constraint: "max 256" }),
    (0, import_elements.FieldElement)({ name: "SoftwareVersion", id: 3, type: "uint32", conformance: "Status == UpdateAvailable" }),
    (0, import_elements.FieldElement)({
      name: "SoftwareVersionString",
      id: 4,
      type: "string",
      conformance: "Status == UpdateAvailable",
      constraint: "1 to 64"
    }),
    (0, import_elements.FieldElement)({
      name: "UpdateToken",
      id: 5,
      type: "octstr",
      conformance: "Status == UpdateAvailable",
      constraint: "8 to 32"
    }),
    (0, import_elements.FieldElement)({ name: "UserConsentNeeded", id: 6, type: "bool", conformance: "O", default: false }),
    (0, import_elements.FieldElement)({ name: "MetadataForRequestor", id: 7, type: "octstr", conformance: "O", constraint: "max 512" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ApplyUpdateRequest",
      id: 2,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "ApplyUpdateResponse"
    },
    (0, import_elements.FieldElement)({ name: "UpdateToken", id: 0, type: "octstr", conformance: "M", constraint: "8 to 32" }),
    (0, import_elements.FieldElement)({ name: "NewVersion", id: 1, type: "uint32", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "ApplyUpdateResponse", id: 3, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Action", id: 0, type: "ApplyUpdateActionEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DelayedActionTime", id: 1, type: "uint32", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "NotifyUpdateApplied",
      id: 4,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "UpdateToken", id: 0, type: "octstr", conformance: "M", constraint: "8 to 32" }),
    (0, import_elements.FieldElement)({ name: "SoftwareVersion", id: 1, type: "uint32", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "StatusEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "UpdateAvailable", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Busy", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NotAvailable", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DownloadProtocolNotSupported", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ApplyUpdateActionEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Proceed", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "AwaitNextAction", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Discontinue", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DownloadProtocolEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "BdxSynchronous", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "BdxAsynchronous", id: 1, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "Https", id: 2, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "VendorSpecific", id: 3, conformance: "O" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(OtaSoftwareUpdateProvider);
//# sourceMappingURL=ota-software-update-provider.element.js.map
