"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 ScenesManagement_exports = {};
__export(ScenesManagement_exports, {
  ScenesManagement: () => ScenesManagement
});
module.exports = __toCommonJS(ScenesManagement_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const ScenesManagement = (0, import_elements.ClusterElement)({
  name: "ScenesManagement",
  id: 98,
  classification: "application",
  pics: "S",
  details: "The Scenes Management cluster provides attributes and commands for setting up and recalling scenes. Each scene corresponds to a set of stored values of specified attributes for one or more clusters on the same end point as the Scenes Management cluster.\nIn most cases scenes are associated with a particular group identifier. Scenes may also exist without a group, in which case the value 0 replaces the group identifier. Note that extra care is required in these cases to avoid a scene identifier collision, and that commands related to scenes without a group may only be unicast, i.e., they may not be multicast or broadcast.\nNOTE Support for Scenes Management cluster is provisional.",
  xref: { document: "cluster", section: "1.4" },
  children: [
    (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
    (0, import_elements.AttributeElement)({
      name: "FeatureMap",
      id: 65532,
      type: "FeatureMap",
      xref: { document: "cluster", section: "1.4.4" },
      children: [(0, import_elements.FieldElement)({
        name: "SN",
        conformance: "O",
        constraint: "0",
        description: "SceneNames",
        details: "This feature indicates the ability to store a name for a scene when a scene is added.",
        xref: { document: "cluster", section: "1.4.4.1" }
      })]
    }),
    (0, import_elements.AttributeElement)({
      name: "LastConfiguredBy",
      id: 0,
      type: "node-id",
      access: "R V",
      conformance: "O",
      default: null,
      quality: "X",
      details: "Indicates the Node ID of the node that last configured the Scene Table.\nThe null value indicates that the server has not been configured, or that the identifier of the node that last configured the Scenes Management cluster is not known.\nThe Node ID is scoped to the accessing fabric.",
      xref: { document: "cluster", section: "1.4.8.1" }
    }),
    (0, import_elements.AttributeElement)({
      name: "SceneTableSize",
      id: 1,
      type: "uint16",
      access: "R V",
      conformance: "M",
      constraint: "desc",
      default: 16,
      quality: "F",
      details: "Indicates the number of entries in the Scene Table on this endpoint. This is the total across all fabrics; note that a single fabric cannot use all those entries (see Handling of fabric- scoping). The minimum size of this table, (i.e., the minimum number of scenes to support across all fabrics per endpoint) shall be 16, unless a device type in which this cluster is used, defines a larger value in the device type definition.",
      xref: { document: "cluster", section: "1.4.8.2" }
    }),
    (0, import_elements.AttributeElement)({
      name: "FabricSceneInfo",
      id: 2,
      type: "list",
      access: "R F V",
      conformance: "M",
      constraint: "desc",
      details: "Indicates a list of fabric scoped information about scenes on this endpoint.\nThe number of list entries for this attribute shall NOT exceed the number of supported fabrics by the device.",
      xref: { document: "cluster", section: "1.4.8.3" },
      children: [(0, import_elements.FieldElement)({ name: "entry", type: "SceneInfoStruct" })]
    }),
    (0, import_elements.CommandElement)({
      name: "AddScene",
      id: 0,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "AddSceneResponse",
      details: "It is not mandatory for an extension field set to be included in the command for every cluster on that endpoint that has a defined extension field set. Extension field sets may be omitted, including the case of no extension field sets at all.",
      xref: { document: "cluster", section: "1.4.9.2" },
      children: [
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 0,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the group identifier in the Group Table.",
          xref: { document: "cluster", section: "1.4.9.2.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 1,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the scene identifier in the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.2.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "TransitionTime",
          id: 2,
          type: "uint32",
          conformance: "M",
          constraint: "max 60000000",
          details: "This field shall indicate the transition time of the scene, measured in milliseconds.",
          xref: { document: "cluster", section: "1.4.9.2.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneName",
          id: 3,
          type: "string",
          conformance: "M",
          constraint: "max 16",
          details: "This field shall indicate the name of the scene.",
          xref: { document: "cluster", section: "1.4.9.2.4" }
        }),
        (0, import_elements.FieldElement)({
          name: "ExtensionFieldSetStructs",
          id: 4,
          type: "list",
          conformance: "M",
          constraint: "desc",
          details: "This field shall contains the list of extension fields.",
          xref: { document: "cluster", section: "1.4.9.2.5" },
          children: [(0, import_elements.FieldElement)({ name: "entry", type: "ExtensionFieldSetStruct" })]
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "AddSceneResponse",
      id: 0,
      conformance: "M",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.3" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for AddScene command.",
          xref: { document: "cluster", section: "1.4.9.3.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "The GroupID field shall be set to the corresponding field of the received AddScene command.",
          xref: { document: "cluster", section: "1.4.9.3.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 2,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "The SceneID field shall be set to the corresponding field of the received AddScene command.",
          xref: { document: "cluster", section: "1.4.9.3.3" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "ViewScene",
      id: 1,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "ViewSceneResponse",
      xref: { document: "cluster", section: "1.4.9.4" },
      children: [
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 0,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the group identifier in the Group Table.",
          xref: { document: "cluster", section: "1.4.9.4.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 1,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the scene identifier in the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.4.2" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "ViewSceneResponse",
      id: 1,
      conformance: "M",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.5" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for ViewScene command.",
          xref: { document: "cluster", section: "1.4.9.5.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "The GroupID field shall be set to the corresponding field of the received ViewScene command.",
          xref: { document: "cluster", section: "1.4.9.5.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 2,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "The SceneID field shall be set to the corresponding field of the received ViewScene command.",
          xref: { document: "cluster", section: "1.4.9.5.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "TransitionTime",
          id: 3,
          type: "uint32",
          conformance: "desc",
          constraint: "max 60000000",
          details: "If the status is SUCCESS, this field shall be copied from the corresponding field in the Scene Table entry, otherwise it shall be omitted.",
          xref: { document: "cluster", section: "1.4.9.5.4" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneName",
          id: 4,
          type: "string",
          conformance: "desc",
          constraint: "max 16",
          details: "If the status is SUCCESS, this field shall be copied from the corresponding field in the Scene Table entry, otherwise it shall be omitted.",
          xref: { document: "cluster", section: "1.4.9.5.5" }
        }),
        (0, import_elements.FieldElement)({
          name: "ExtensionFieldSetStructs",
          id: 5,
          type: "list",
          conformance: "desc",
          details: "If the status is SUCCESS, this field shall be copied from the corresponding field in the Scene Table entry, otherwise it shall be omitted.",
          xref: { document: "cluster", section: "1.4.9.5.6" },
          children: [(0, import_elements.FieldElement)({ name: "entry", type: "ExtensionFieldSetStruct" })]
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "RemoveScene",
      id: 2,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "RemoveSceneResponse",
      xref: { document: "cluster", section: "1.4.9.6" },
      children: [
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 0,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the group identifier in the Group Table.",
          xref: { document: "cluster", section: "1.4.9.6.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 1,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the scene identifier in the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.6.2" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "RemoveSceneResponse",
      id: 2,
      conformance: "M",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.7" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for RemoveScene command.",
          xref: { document: "cluster", section: "1.4.9.7.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "The GroupID field shall be set to the corresponding field of the received RemoveScene command.",
          xref: { document: "cluster", section: "1.4.9.7.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 2,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "The SceneID field shall be set to the corresponding field of the received RemoveScene command.",
          xref: { document: "cluster", section: "1.4.9.7.3" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "RemoveAllScenes",
      id: 3,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "RemoveAllScenesResponse",
      xref: { document: "cluster", section: "1.4.9.8" },
      children: [(0, import_elements.FieldElement)({
        name: "GroupId",
        id: 0,
        type: "group-id",
        conformance: "M",
        details: "This field shall indicate the group identifier in the Group Table.",
        xref: { document: "cluster", section: "1.4.9.8.1" }
      })]
    }),
    (0, import_elements.CommandElement)({
      name: "RemoveAllScenesResponse",
      id: 3,
      conformance: "M",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.9" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for RemoveAllScenes command.",
          xref: { document: "cluster", section: "1.4.9.9.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "The GroupID field shall be set to the corresponding field of the received RemoveAllScenes command.",
          xref: { document: "cluster", section: "1.4.9.9.2" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "StoreScene",
      id: 4,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "StoreSceneResponse",
      xref: { document: "cluster", section: "1.4.9.10" },
      children: [
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 0,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the group identifier in the Group Table.",
          xref: { document: "cluster", section: "1.4.9.10.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 1,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the scene identifier in the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.10.2" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "StoreSceneResponse",
      id: 4,
      conformance: "M",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.11" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for StoreScene command.",
          xref: { document: "cluster", section: "1.4.9.11.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "The GroupID field shall be set to the corresponding field of the received StoreScene command.",
          xref: { document: "cluster", section: "1.4.9.11.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 2,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "The SceneID field shall be set to the corresponding field of the received StoreScene command.",
          xref: { document: "cluster", section: "1.4.9.11.3" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "RecallScene",
      id: 5,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "status",
      xref: { document: "cluster", section: "1.4.9.12" },
      children: [
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 0,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the group identifier in the Group Table.",
          xref: { document: "cluster", section: "1.4.9.12.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 1,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the scene identifier in the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.12.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "TransitionTime",
          id: 2,
          type: "uint32",
          conformance: "O",
          constraint: "max 60000000",
          quality: "X",
          details: "This field shall indicate the transition time of the scene, measured in milliseconds.",
          xref: { document: "cluster", section: "1.4.9.12.3" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "GetSceneMembership",
      id: 6,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "GetSceneMembershipResponse",
      details: "This command can be used to get the used scene identifiers within a certain group, for the endpoint that implements this cluster.",
      xref: { document: "cluster", section: "1.4.9.13" },
      children: [(0, import_elements.FieldElement)({
        name: "GroupId",
        id: 0,
        type: "group-id",
        conformance: "M",
        details: "This field shall indicate the group identifier in the Group Table.",
        xref: { document: "cluster", section: "1.4.9.13.1" }
      })]
    }),
    (0, import_elements.CommandElement)({
      name: "GetSceneMembershipResponse",
      id: 6,
      conformance: "M",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.14" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for GetSceneMembership command.",
          xref: { document: "cluster", section: "1.4.9.14.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "Capacity",
          id: 1,
          type: "uint8",
          conformance: "M",
          quality: "X",
          details: "This field shall contain the remaining capacity of the Scene Table of the server (for all groups for the accessing fabric). The following values apply:\n  \u2022 0 - No further scenes may be added.\n  \u2022 0 < Capacity < 0xFE - Capacity holds the number of scenes that may be added.\n  \u2022 0xFE - At least 1 further scene may be added (exact number is unknown).\n  \u2022 null - It is unknown if any further scenes may be added.",
          xref: { document: "cluster", section: "1.4.9.14.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupId",
          id: 2,
          type: "group-id",
          conformance: "M",
          details: "This field shall be set to the corresponding field of the received GetSceneMembership command.",
          xref: { document: "cluster", section: "1.4.9.14.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneList",
          id: 3,
          type: "list",
          conformance: "Status == Success",
          details: "If the status is not SUCCESS then this field shall be omitted, else this field shall contain the identifiers of all the scenes in the Scene Table with the corresponding Group ID.",
          xref: { document: "cluster", section: "1.4.9.14.4" },
          children: [(0, import_elements.FieldElement)({ name: "entry", type: "uint8" })]
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "CopyScene",
      id: 64,
      access: "F M",
      conformance: "O",
      direction: "request",
      response: "CopySceneResponse",
      details: "This command allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair.",
      xref: { document: "cluster", section: "1.4.9.15" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Mode",
          id: 0,
          type: "CopyModeBitmap",
          conformance: "M",
          constraint: "desc",
          details: "This field shall contain the information of how the scene copy is to proceed.\nThe CopyAllScenes bit of the Mode indicates whether all scenes are to be copied. If this value is set to 1, all scenes are to be copied and the SceneIdentifierFrom and SceneIdentifierTo fields shall be ignored. Otherwise this bit is set to 0.",
          xref: { document: "cluster", section: "1.4.9.15.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupIdentifierFrom",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the identifier of the group from which the scene is to be copied. Together with the SceneIdentifierFrom field, this field uniquely identifies the scene to copy from the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.15.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneIdentifierFrom",
          id: 2,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the identifier of the scene from which the scene is to be copied. Together with the GroupIdentifierFrom field, this field uniquely identifies the scene to copy from the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.15.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupIdentifierTo",
          id: 3,
          type: "group-id",
          conformance: "M",
          details: "This field shall indicate the identifier of the group to which the scene is to be copied. Together with the SceneIdentifierTo field, this field uniquely identifies the scene to copy to the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.15.4" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneIdentifierTo",
          id: 4,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall indicate the identifier of the scene to which the scene is to be copied. Together with the GroupIdentifierTo field, this field uniquely identifies the scene to copy to the Scene Table.",
          xref: { document: "cluster", section: "1.4.9.15.5" }
        })
      ]
    }),
    (0, import_elements.CommandElement)({
      name: "CopySceneResponse",
      id: 64,
      conformance: "CopyScene",
      direction: "response",
      xref: { document: "cluster", section: "1.4.9.16" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Status",
          id: 0,
          type: "status",
          conformance: "M",
          constraint: "desc",
          details: "This field shall be set according to the Effect on Receipt section for the CopyScene command.",
          xref: { document: "cluster", section: "1.4.9.16.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "GroupIdentifierFrom",
          id: 1,
          type: "group-id",
          conformance: "M",
          details: "This field shall be set to the same values as in the corresponding fields of the received CopyScene command.",
          xref: { document: "cluster", section: "1.4.9.16.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneIdentifierFrom",
          id: 2,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field shall be set to the same values as in the corresponding fields of the received CopyScene\ncommand.",
          xref: { document: "cluster", section: "1.4.9.16.3" }
        })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "CopyModeBitmap",
      type: "map8",
      xref: { document: "cluster", section: "1.4.7.1" },
      children: [
        (0, import_elements.FieldElement)({ name: "CopyAllScenes", constraint: "0", description: "Copy all scenes in the scene table" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "SceneInfoStruct",
      type: "struct",
      xref: { document: "cluster", section: "1.4.7.2" },
      children: [
        (0, import_elements.FieldElement)({
          name: "SceneCount",
          id: 0,
          type: "uint8",
          access: "F",
          conformance: "M",
          default: 0,
          details: "This field shall indicate the number of scenes currently used in the server\u2019s Scene Table on the endpoint where the Scenes Management cluster appears.\nThis only includes the count for the associated fabric.",
          xref: { document: "cluster", section: "1.4.7.2.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "CurrentScene",
          id: 1,
          type: "uint8",
          access: "S",
          conformance: "M",
          constraint: "desc",
          default: 255,
          details: "This field shall indicate the scene identifier of the scene last invoked on the associated fabric. If no scene has been invoked, the value of this field shall be 0xFF, the undefined scene identifier.",
          xref: { document: "cluster", section: "1.4.7.2.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "CurrentGroup",
          id: 2,
          type: "group-id",
          access: "S",
          conformance: "M",
          default: 0,
          details: "This field shall indicate the group identifier of the scene last invoked on the associated fabric, or 0 if the scene last invoked is not associated with a group.",
          xref: { document: "cluster", section: "1.4.7.2.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneValid",
          id: 3,
          type: "bool",
          access: "S",
          conformance: "M",
          default: false,
          details: 'This field shall indicate whether the state of the server corresponds to that associated with the CurrentScene and CurrentGroup fields of the SceneInfoStruct they belong to. TRUE indicates that these fields are valid, FALSE indicates that they are not valid.\nThis field shall be set to False for all other fabrics when an attribute with the Scenes ("S") designation in the Quality column of another cluster present on the same endpoint is modified or when the current scene is modified by a fabric through the RecallScene or StoreScene commands, regardless of the fabric-scoped access quality of the command.\nIn the event where the SceneValid field is set to False for a fabric, the CurrentScene and CurrentGroup fields shall be the last invoked scene and group for that fabric. In the event where no scene was previously invoked for that fabric, the CurrentScene and CurrentGroup fields shall be their default values.',
          xref: { document: "cluster", section: "1.4.7.2.4" }
        }),
        (0, import_elements.FieldElement)({
          name: "RemainingCapacity",
          id: 4,
          type: "uint8",
          access: "F",
          conformance: "M",
          constraint: "max 253",
          details: "This field shall indicate the remaining capacity of the Scene Table on this endpoint for the accessing fabric. Note that this value may change between reads, even if no entries are added or deleted on the accessing fabric, due to other clients associated with other fabrics adding or deleting entries that impact the resource usage on the device.",
          xref: { document: "cluster", section: "1.4.7.2.5" }
        }),
        (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "AttributeValuePairStruct",
      type: "struct",
      details: "This data type indicates a combination of an identifier and the value of an attribute.",
      xref: { document: "cluster", section: "1.4.7.3" },
      children: [
        (0, import_elements.FieldElement)({
          name: "AttributeId",
          id: 0,
          type: "attrib-id",
          conformance: "M",
          details: 'This field shall be present for all instances in a given ExtensionFieldSetStruct.\nThe data type of AttributeValue shall be the data type of the attribute indicated by AttributeID.\nThe AttributeID field shall NOT refer to an attribute without the Scenes ("S") designation in the Quality column of the cluster specification.\n  1.4.7.3.2. ValueUnsigned8, ValueSigned8, ValueUnsigned16, ValueSigned16, ValueUnsigned32,              ValueSigned32, ValueUnsigned64, ValueSigned64 Fields\nThese fields shall indicate the attribute value as part of an extension field set, associated with a given AttributeID under an ExtensionFieldSetStruct\u2019s ClusterID. The proper field shall be present that maps to the data type of the attribute indicated.\n  \u2022 Data types bool, map8, and uint8 shall map to ValueUnsigned8.\n  \u2022 Data types int8 shall map to ValueSigned8.\n  \u2022 Data types map16 and uint16 shall map to ValueUnsigned16.\n  \u2022 Data types int16 shall map to ValueSigned16.\n  \u2022 Data types map32, uint24, and uint32 shall map to ValueUnsigned32.\n  \u2022 Data types int24 and int32 shall map to ValueSigned32.\n  \u2022 Data types map64, uint48, uint56 and uint64 shall map to ValueUnsigned64.\n  \u2022 Data types int48, int56 and int64 shall map to ValueSigned64.\n  \u2022 For nullable attributes, any value that is not a valid numeric value for the attribute\u2019s type     after accounting for range reductions due to being nullable and constraints shall be considered     to have the null value for the type.\n  \u2022 For non-nullable attributes, any value that is not a valid numeric value for the attribute\u2019s     type after accounting for constraints shall be considered to have the maximum legal value in     the attribute\u2019s constrained range.\nExamples of processing are:\n  \u2022 ColorControl cluster CurrentX (AttributeID 0x0003) has a type of uint16 and is not nullable.\n    \u25E6 AttributeValue of 0xAB12 would be used as-is, as it is in range.\n    \u25E6 AttributeValue of 0xAA0011 is outside of the range of uint16, and would be saturated to the       maximum of the attribute\u2019s constraint range: 0xFEFF.\n  \u2022 LevelControl cluster CurrentLevel (AttributeID 0x0000) has a type of uint8 and is nullable.\n    \u25E6 AttributeValue of 0xA1 would be used as-is, as it is in range.\n    \u25E6 AttributeValue of 0xBB12 is outside the range of nullable uint8, and would be considered as       the null value.',
          xref: { document: "cluster", section: "1.4.7.3.1" }
        }),
        (0, import_elements.FieldElement)({ name: "ValueUnsigned8", id: 1, type: "uint8", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueSigned8", id: 2, type: "int8", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueUnsigned16", id: 3, type: "uint16", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueSigned16", id: 4, type: "int16", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueUnsigned32", id: 5, type: "uint32", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueSigned32", id: 6, type: "int32", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueUnsigned64", id: 7, type: "uint64", conformance: "O.a" }),
        (0, import_elements.FieldElement)({ name: "ValueSigned64", id: 8, type: "int64", conformance: "O.a" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "ExtensionFieldSetStruct",
      type: "struct",
      details: "This data type indicates for a given cluster a set of attributes and their values.",
      xref: { document: "cluster", section: "1.4.7.4" },
      children: [
        (0, import_elements.FieldElement)({
          name: "ClusterId",
          id: 0,
          type: "cluster-id",
          conformance: "M",
          details: "This field shall indicate the cluster-id of the cluster whose attributes are in the AttributeValueList field.",
          xref: { document: "cluster", section: "1.4.7.4.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "AttributeValueList",
          id: 1,
          type: "list",
          conformance: "M",
          constraint: "desc",
          details: 'This field shall indicate a set of attributes and their values which are stored as part of a scene.\nAttributes which do not have the Scenes ("S") designation in the Quality column of their cluster specification shall NOT be used in the AttributeValueList field.',
          xref: { document: "cluster", section: "1.4.7.4.2" },
          children: [(0, import_elements.FieldElement)({ name: "entry", type: "AttributeValuePairStruct" })]
        })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "Logical Scene Table",
      type: "struct",
      details: "The Scene Table is used to store information for each scene capable of being invoked on the server. Each scene is defined for a particular group. The Scene Table is defined here as a conceptual illustration to assist in understanding the underlying data to be stored when scenes are defined. Though the Scene Table is defined here using the data model architecture rules and format, the design is not normative.\nThe Scene table is logically a list of fabric-scoped structs. The logical fields of each Scene Table entry struct are illustrated below. An ExtensionFieldSetStruct may be present for each Scenes-supporting cluster implemented on the same endpoint.",
      xref: { document: "cluster", section: "1.4.7.5" },
      children: [
        (0, import_elements.FieldElement)({
          name: "SceneGroupId",
          id: 0,
          type: "group-id",
          conformance: "M",
          details: "This field is the group identifier for which this scene applies, or 0 if the scene is not associated with a group.",
          xref: { document: "cluster", section: "1.4.7.5.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneId",
          id: 1,
          type: "uint8",
          conformance: "M",
          constraint: "max 254",
          details: "This field is unique within this group, which is used to identify this scene.",
          xref: { document: "cluster", section: "1.4.7.5.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneName",
          id: 2,
          type: "string",
          conformance: "SN",
          constraint: "max 16",
          details: "The field is the name of the scene.\nIf scene names are not supported, any commands that write a scene name shall simply discard the name, and any command that returns a scene name shall return an empty string.",
          xref: { document: "cluster", section: "1.4.7.5.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "SceneTransitionTime",
          id: 3,
          type: "uint32",
          conformance: "M",
          constraint: "max 60000000",
          default: 0,
          details: "This field is the amount of time, in milliseconds, it will take for a cluster to change from its current state to the requested state.",
          xref: { document: "cluster", section: "1.4.7.5.4" }
        }),
        (0, import_elements.FieldElement)({
          name: "ExtensionFields",
          id: 4,
          type: "list",
          conformance: "M",
          default: [],
          details: 'See the Scene Table Extensions subsections of individual clusters. A Scene Table Extension shall only use attributes with the Scene quality. Each ExtensionFieldSetStruct holds a set of values of these attributes for a cluster implemented on the same endpoint where the Scene ("S") designation appears in the quality column. A scene is the aggregate of all such fields across all clusters on the endpoint.',
          xref: { document: "cluster", section: "1.4.7.5.5" },
          children: [(0, import_elements.FieldElement)({ name: "entry", type: "ExtensionFieldSetStruct" })]
        })
      ]
    })
  ]
});
import_MatterDefinition.MatterDefinition.children.push(ScenesManagement);
//# sourceMappingURL=ScenesManagement.js.map
