/**
 * @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,
  EventElement as Event,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const PushAvStreamTransport = Cluster(
  { name: "PushAvStreamTransport", id: 1365, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "PERZONESENS", conformance: "O", constraint: "0", title: "PerZoneSensitivity" }),
    Field({ name: "METADATA", conformance: "P, O", constraint: "1", title: "Metadata" })
  ),
  Attribute(
    {
      name: "SupportedFormats",
      id: 0,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "min 1",
      quality: "F"
    },
    Field({ name: "entry", type: "SupportedFormatStruct" })
  ),
  Attribute(
    {
      name: "CurrentConnections",
      id: 1,
      type: "list",
      access: "R S V",
      conformance: "M",
      constraint: "desc",
      quality: "N"
    },
    Field({ name: "entry", type: "TransportConfigurationStruct" })
  ),
  Event(
    { name: "PushTransportBegin", id: 0, access: "V", conformance: "M", priority: "info" },
    Field({
      name: "ConnectionId",
      id: 0,
      type: "PushTransportConnectionID",
      conformance: "M",
      constraint: "0 to 65534"
    }),
    Field({ name: "TriggerType", id: 1, type: "TransportTriggerTypeEnum", conformance: "M" }),
    Field({
      name: "ActivationReason",
      id: 2,
      type: "TriggerActivationReasonEnum",
      conformance: "TriggerType == Command"
    }),
    Field({ name: "ContainerType", id: 3, type: "ContainerFormatEnum", conformance: "Rev >= v2" }),
    Field({ name: "CmafSessionNumber", id: 4, type: "uint64", conformance: "ContainerType == CMAF" })
  ),
  Event(
    { name: "PushTransportEnd", id: 1, access: "V", conformance: "M", priority: "info" },
    Field({
      name: "ConnectionId",
      id: 0,
      type: "PushTransportConnectionID",
      conformance: "M",
      constraint: "0 to 65534"
    }),
    Field({ name: "ContainerType", id: 1, type: "ContainerFormatEnum", conformance: "Rev >= v2" }),
    Field({ name: "CmafSessionNumber", id: 2, type: "uint64", conformance: "ContainerType == CMAF" })
  ),
  Command(
    {
      name: "AllocatePushTransport",
      id: 0,
      access: "F M",
      conformance: "M",
      direction: "request",
      quality: "L",
      response: "AllocatePushTransportResponse"
    },
    Field({ name: "TransportOptions", id: 0, type: "TransportOptionsStruct", conformance: "M" })
  ),
  Command(
    { name: "AllocatePushTransportResponse", id: 1, conformance: "M", direction: "response", quality: "L" },
    Field({ name: "TransportConfiguration", id: 0, type: "TransportConfigurationStruct", conformance: "M" })
  ),
  Command(
    {
      name: "DeallocatePushTransport",
      id: 2,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({
      name: "ConnectionId",
      id: 0,
      type: "PushTransportConnectionID",
      conformance: "M",
      constraint: "0 to 65534"
    })
  ),
  Command(
    {
      name: "ModifyPushTransport",
      id: 3,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({
      name: "ConnectionId",
      id: 0,
      type: "PushTransportConnectionID",
      conformance: "M",
      constraint: "0 to 65534"
    }),
    Field({ name: "TransportOptions", id: 1, type: "TransportOptionsStruct", conformance: "M" })
  ),
  Command(
    {
      name: "SetTransportStatus",
      id: 4,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({ name: "ConnectionId", id: 0, type: "PushTransportConnectionID", conformance: "M", quality: "X" }),
    Field({ name: "TransportStatus", id: 1, type: "TransportStatusEnum", conformance: "M" })
  ),
  Command(
    {
      name: "ManuallyTriggerTransport",
      id: 5,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({
      name: "ConnectionId",
      id: 0,
      type: "PushTransportConnectionID",
      conformance: "M",
      constraint: "0 to 65534"
    }),
    Field({ name: "ActivationReason", id: 1, type: "TriggerActivationReasonEnum", conformance: "M" }),
    Field({ name: "TimeControl", id: 2, type: "TransportMotionTriggerTimeControlStruct", conformance: "O" }),
    Field({ name: "UserDefined", id: 3, type: "octstr", conformance: "[METADATA]", constraint: "max 256" })
  ),
  Command(
    {
      name: "FindTransport",
      id: 6,
      access: "F O",
      conformance: "M",
      direction: "request",
      quality: "L",
      response: "FindTransportResponse"
    },
    Field({ name: "ConnectionId", id: 0, type: "PushTransportConnectionID", conformance: "M", quality: "X" })
  ),
  Command(
    { name: "FindTransportResponse", id: 7, conformance: "M", direction: "response", quality: "L" },
    Field(
      { name: "TransportConfigurations", id: 0, type: "list", conformance: "M" },
      Field({ name: "entry", type: "TransportConfigurationStruct" })
    )
  ),
  Datatype(
    { name: "TransportTriggerTypeEnum", type: "enum8" },
    Field({ name: "Command", id: 0, conformance: "M" }),
    Field({ name: "Motion", id: 1, conformance: "M" }),
    Field({ name: "Continuous", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "TransportStatusEnum", type: "enum8" },
    Field({ name: "Active", id: 0, conformance: "M" }),
    Field({ name: "Inactive", id: 1, conformance: "M" })
  ),
  Datatype({ name: "ContainerFormatEnum", type: "enum8" }, Field({ name: "Cmaf", id: 0, conformance: "M" })),
  Datatype({ name: "IngestMethodsEnum", type: "enum8" }, Field({ name: "CmafIngest", id: 0, conformance: "M" })),
  Datatype(
    { name: "TriggerActivationReasonEnum", type: "enum8" },
    Field({ name: "UserInitiated", id: 0, conformance: "M" }),
    Field({ name: "Automation", id: 1, conformance: "M" }),
    Field({ name: "Emergency", id: 2, conformance: "M" }),
    Field({ name: "DoorbellPressed", id: 3, conformance: "Rev >= v2" })
  ),
  Datatype(
    { name: "SupportedFormatStruct", type: "struct" },
    Field({ name: "ContainerFormat", id: 0, type: "ContainerFormatEnum", conformance: "M" }),
    Field({ name: "IngestMethod", id: 1, type: "IngestMethodsEnum", conformance: "M" })
  ),
  Datatype(
    { name: "CMAFInterfaceEnum", type: "enum8" },
    Field({ name: "Interface1", id: 0, conformance: "M" }),
    Field({ name: "Interface2Dash", id: 1, conformance: "P, M" }),
    Field({ name: "Interface2Hls", id: 2, conformance: "P, M" })
  ),
  Datatype(
    { name: "VideoStreamStruct", type: "struct" },
    Field({ name: "VideoStreamName", id: 0, type: "string", conformance: "M", constraint: "1 to 16" }),
    Field({ name: "VideoStreamId", id: 1, type: "CameraAvStreamManagement.VideoStreamID", conformance: "M" })
  ),
  Datatype(
    { name: "AudioStreamStruct", type: "struct" },
    Field({ name: "AudioStreamName", id: 0, type: "string", conformance: "M", constraint: "1 to 16" }),
    Field({ name: "AudioStreamId", id: 1, type: "CameraAvStreamManagement.AudioStreamID", conformance: "M" })
  ),
  Datatype(
    { name: "CMAFContainerOptionsStruct", type: "struct" },
    Field({ name: "CmafInterface", id: 0, type: "CMAFInterfaceEnum", conformance: "M" }),
    Field({ name: "SegmentDuration", id: 1, type: "uint16", conformance: "M", constraint: "500 to 65500" }),
    Field({ name: "ChunkDuration", id: 2, type: "uint16", conformance: "M", constraint: "0 to segmentDuration / 2" }),
    Field({ name: "SessionGroup", id: 3, type: "uint8", conformance: "O, D" }),
    Field({ name: "TrackName", id: 4, type: "string", conformance: "O, D", constraint: "1 to 16" }),
    Field({ name: "CencKey", id: 5, type: "octstr", conformance: "P, O", constraint: "16" }),
    Field({ name: "CencKeyId", id: 6, type: "octstr", conformance: "P, CENCKey", constraint: "16" }),
    Field({ name: "MetadataEnabled", id: 7, type: "bool", conformance: "[METADATA]" })
  ),
  Datatype(
    { name: "ContainerOptionsStruct", type: "struct" },
    Field({ name: "ContainerType", id: 0, type: "ContainerFormatEnum", conformance: "M" }),
    Field({
      name: "CmafContainerOptions",
      id: 1,
      type: "CMAFContainerOptionsStruct",
      conformance: "ContainerType == CMAF"
    })
  ),
  Datatype(
    { name: "TransportZoneOptionsStruct", type: "struct" },
    Field({ name: "Zone", id: 0, type: "ZoneManagement.ZoneID", conformance: "M", quality: "X" }),
    Field({ name: "Sensitivity", id: 1, type: "uint8", conformance: "PERZONESENS", constraint: "1 to 10" })
  ),
  Datatype(
    { name: "TransportTriggerOptionsStruct", type: "struct" },
    Field({ name: "TriggerType", id: 0, type: "TransportTriggerTypeEnum", conformance: "M" }),
    Field(
      { name: "MotionZones", id: 1, type: "list", conformance: "TriggerType == Motion", quality: "X" },
      Field({ name: "entry", type: "TransportZoneOptionsStruct" })
    ),
    Field({
      name: "MotionSensitivity",
      id: 2,
      type: "uint8",
      conformance: "TriggerType == Motion & !PERZONESENS",
      constraint: "1 to 10",
      quality: "X"
    }),
    Field({
      name: "MotionTimeControl",
      id: 3,
      type: "TransportMotionTriggerTimeControlStruct",
      conformance: "TriggerType == Motion"
    }),
    Field({
      name: "MaxPreRollLen",
      id: 4,
      type: "uint16",
      conformance: "TriggerType == Command | TriggerType == Motion"
    })
  ),
  Datatype(
    { name: "TransportMotionTriggerTimeControlStruct", type: "struct" },
    Field({ name: "InitialDuration", id: 0, type: "uint16", conformance: "M", constraint: "min 1" }),
    Field({ name: "AugmentationDuration", id: 1, type: "uint16", conformance: "M" }),
    Field({ name: "MaxDuration", id: 2, type: "elapsed-s", conformance: "M", constraint: "min initialDuration" }),
    Field({ name: "BlindDuration", id: 3, type: "uint16", conformance: "M" })
  ),
  Datatype(
    { name: "TransportOptionsStruct", type: "struct" },
    Field({ name: "StreamUsage", id: 0, type: "StreamUsageEnum", conformance: "M" }),
    Field({
      name: "VideoStreamId",
      id: 1,
      type: "CameraAvStreamManagement.VideoStreamID",
      conformance: "O, D",
      quality: "X"
    }),
    Field({
      name: "AudioStreamId",
      id: 2,
      type: "CameraAvStreamManagement.AudioStreamID",
      conformance: "O, D",
      quality: "X"
    }),
    Field({
      name: "TlsEndpointId",
      id: 3,
      type: "TlsClientManagement.TLSEndpointID",
      conformance: "M",
      constraint: "0 to 65534"
    }),
    Field({ name: "Url", id: 4, type: "string", conformance: "M", constraint: "13 to 2000" }),
    Field({ name: "TriggerOptions", id: 5, type: "TransportTriggerOptionsStruct", conformance: "M" }),
    Field({ name: "IngestMethod", id: 6, type: "IngestMethodsEnum", conformance: "M" }),
    Field({ name: "ContainerOptions", id: 7, type: "ContainerOptionsStruct", conformance: "M" }),
    Field({ name: "ExpiryTime", id: 8, type: "epoch-s", conformance: "O" }),
    Field(
      { name: "VideoStreams", id: 9, type: "list", conformance: "O, [Rev >= v2].a+", constraint: "1 to 16" },
      Field({ name: "entry", type: "VideoStreamStruct" })
    ),
    Field(
      { name: "AudioStreams", id: 10, type: "list", conformance: "O, [Rev >= v2].a+", constraint: "1 to 16" },
      Field({ name: "entry", type: "AudioStreamStruct" })
    )
  ),
  Datatype(
    { name: "TransportConfigurationStruct", type: "struct" },
    Field({
      name: "ConnectionId",
      id: 0,
      type: "PushTransportConnectionID",
      access: "F",
      conformance: "M",
      constraint: "0 to 65534"
    }),
    Field({ name: "TransportStatus", id: 1, type: "TransportStatusEnum", access: "F", conformance: "M" }),
    Field({ name: "TransportOptions", id: 2, type: "TransportOptionsStruct", access: "F", conformance: "O" }),
    Field({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  Datatype({ name: "PushTransportConnectionID", type: "uint16" }),
  Datatype(
    { name: "StatusCodeEnum", type: "enum8" },
    Field({ name: "InvalidTlsEndpoint", id: 2, conformance: "M" }),
    Field({ name: "InvalidStream", id: 3, conformance: "M" }),
    Field({ name: "InvalidUrl", id: 4, conformance: "M" }),
    Field({ name: "InvalidZone", id: 5, conformance: "M" }),
    Field({ name: "InvalidCombination", id: 6, conformance: "M" }),
    Field({ name: "InvalidTriggerType", id: 7, conformance: "M" }),
    Field({ name: "InvalidTransportStatus", id: 8, conformance: "M" }),
    Field({ name: "InvalidOptions", id: 9, conformance: "M" }),
    Field({ name: "InvalidStreamUsage", id: 10, conformance: "M" }),
    Field({ name: "InvalidTime", id: 11, conformance: "M" }),
    Field({ name: "InvalidPreRollLength", id: 12, conformance: "Rev >= v2" }),
    Field({ name: "DuplicateStreamValues", id: 13, conformance: "Rev >= v2" })
  )
);
MatterDefinition.children.push(PushAvStreamTransport);
export {
  PushAvStreamTransport
};
//# sourceMappingURL=push-av-stream-transport.element.js.map
