/**
 * @license
 * Copyright 2022-2025 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 Channel = Cluster(
  { name: "Channel", id: 1284, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "CL", constraint: "0", title: "ChannelList" }),
    Field({ name: "LI", constraint: "1", title: "LineupInfo" }),
    Field({ name: "EG", constraint: "2", title: "ElectronicGuide" }),
    Field({ name: "RP", constraint: "3", title: "RecordProgram" })
  ),
  Attribute(
    { name: "ChannelList", id: 0, type: "list", access: "R V", conformance: "CL", default: [] },
    Field({ name: "entry", type: "ChannelInfoStruct" })
  ),
  Attribute({
    name: "Lineup",
    id: 1,
    type: "LineupInfoStruct",
    access: "R V",
    conformance: "LI",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  Attribute({
    name: "CurrentChannel",
    id: 2,
    type: "ChannelInfoStruct",
    access: "R V",
    conformance: "O",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  Command(
    {
      name: "ChangeChannel",
      id: 0,
      access: "O",
      conformance: "CL | LI",
      direction: "request",
      response: "ChangeChannelResponse"
    },
    Field({ name: "Match", id: 0, type: "string", conformance: "M" })
  ),
  Command(
    { name: "ChangeChannelResponse", id: 1, conformance: "CL | LI", direction: "response" },
    Field({ name: "Status", id: 0, type: "StatusEnum", conformance: "M", constraint: "desc" }),
    Field({ name: "Data", id: 1, type: "string", conformance: "O", constraint: "any" })
  ),
  Command(
    {
      name: "ChangeChannelByNumber",
      id: 2,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({ name: "MajorNumber", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "MinorNumber", id: 1, type: "uint16", conformance: "M" })
  ),
  Command(
    { name: "SkipChannel", id: 3, access: "O", conformance: "M", direction: "request", response: "status" },
    Field({ name: "Count", id: 0, type: "int16", conformance: "M" })
  ),
  Command(
    {
      name: "GetProgramGuide",
      id: 4,
      access: "O",
      conformance: "EG",
      direction: "request",
      response: "ProgramGuideResponse"
    },
    Field({ name: "StartTime", id: 0, type: "epoch-s", conformance: "M" }),
    Field({ name: "EndTime", id: 1, type: "epoch-s", conformance: "M" }),
    Field(
      { name: "ChannelList", id: 2, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ChannelInfoStruct" })
    ),
    Field({ name: "PageToken", id: 3, type: "PageTokenStruct", conformance: "O", default: null, quality: "X" }),
    Field({ name: "RecordingFlag", id: 5, type: "RecordingFlagBitmap", conformance: "O", default: null, quality: "X" }),
    Field(
      { name: "ExternalIdList", id: 6, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ContentLauncher.AdditionalInfoStruct" })
    ),
    Field({ name: "Data", id: 7, type: "octstr", conformance: "O", constraint: "max 8092" })
  ),
  Command(
    { name: "ProgramGuideResponse", id: 5, conformance: "EG", direction: "response" },
    Field({ name: "Paging", id: 0, type: "ChannelPagingStruct", conformance: "M" }),
    Field(
      { name: "ProgramList", id: 1, type: "list", conformance: "M", default: [] },
      Field({ name: "entry", type: "ProgramStruct" })
    )
  ),
  Command(
    {
      name: "RecordProgram",
      id: 6,
      access: "O",
      conformance: "RP & EG",
      direction: "request",
      response: "status"
    },
    Field({ name: "ProgramIdentifier", id: 0, type: "string", conformance: "M", constraint: "max 255" }),
    Field({ name: "ShouldRecordSeries", id: 1, type: "bool", conformance: "M" }),
    Field(
      { name: "ExternalIdList", id: 2, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ContentLauncher.AdditionalInfoStruct" })
    ),
    Field({ name: "Data", id: 3, type: "octstr", conformance: "O", constraint: "max 8092" })
  ),
  Command(
    {
      name: "CancelRecordProgram",
      id: 7,
      access: "O",
      conformance: "RP & EG",
      direction: "request",
      response: "status"
    },
    Field({ name: "ProgramIdentifier", id: 0, type: "string", conformance: "M", constraint: "max 255" }),
    Field({ name: "ShouldRecordSeries", id: 1, type: "bool", conformance: "M" }),
    Field(
      { name: "ExternalIdList", id: 2, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ContentLauncher.AdditionalInfoStruct" })
    ),
    Field({ name: "Data", id: 3, type: "octstr", conformance: "O", constraint: "max 8092" })
  ),
  Datatype(
    { name: "RecordingFlagBitmap", type: "map8" },
    Field({ name: "Scheduled", constraint: "0" }),
    Field({ name: "RecordSeries", constraint: "1" }),
    Field({ name: "Recorded", constraint: "2" })
  ),
  Datatype({ name: "LineupInfoTypeEnum", type: "enum8" }, Field({ name: "Mso", id: 0, conformance: "M" })),
  Datatype(
    { name: "StatusEnum", type: "enum8" },
    Field({ name: "Success", id: 0, conformance: "M" }),
    Field({ name: "MultipleMatches", id: 1, conformance: "M" }),
    Field({ name: "NoMatches", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "ChannelTypeEnum", type: "enum8" },
    Field({ name: "Satellite", id: 0, conformance: "M" }),
    Field({ name: "Cable", id: 1, conformance: "M" }),
    Field({ name: "Terrestrial", id: 2, conformance: "M" }),
    Field({ name: "Ott", id: 3, conformance: "M" })
  ),
  Datatype(
    { name: "ChannelInfoStruct", type: "struct" },
    Field({ name: "MajorNumber", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "MinorNumber", id: 1, type: "uint16", conformance: "M" }),
    Field({ name: "Name", id: 2, type: "string", conformance: "O" }),
    Field({ name: "CallSign", id: 3, type: "string", conformance: "O" }),
    Field({ name: "AffiliateCallSign", id: 4, type: "string", conformance: "O" }),
    Field({ name: "Identifier", id: 5, type: "string", conformance: "O" }),
    Field({ name: "Type", id: 6, type: "ChannelTypeEnum", conformance: "O" })
  ),
  Datatype(
    { name: "LineupInfoStruct", type: "struct" },
    Field({ name: "OperatorName", id: 0, type: "string", conformance: "M" }),
    Field({ name: "LineupName", id: 1, type: "string", conformance: "O" }),
    Field({ name: "PostalCode", id: 2, type: "string", conformance: "O" }),
    Field({ name: "LineupInfoType", id: 3, type: "LineupInfoTypeEnum", conformance: "M", constraint: "desc" })
  ),
  Datatype(
    { name: "ProgramStruct", type: "struct" },
    Field({ name: "Identifier", id: 0, type: "string", conformance: "M", constraint: "max 255" }),
    Field({ name: "Channel", id: 1, type: "ChannelInfoStruct", conformance: "M" }),
    Field({ name: "StartTime", id: 2, type: "epoch-s", conformance: "M" }),
    Field({ name: "EndTime", id: 3, type: "epoch-s", conformance: "M" }),
    Field({ name: "Title", id: 4, type: "string", conformance: "M", constraint: "max 255" }),
    Field({ name: "Subtitle", id: 5, type: "string", conformance: "O", constraint: "max 255" }),
    Field({ name: "Description", id: 6, type: "string", conformance: "O", constraint: "max 8192" }),
    Field(
      {
        name: "AudioLanguages",
        id: 7,
        type: "list",
        conformance: "O",
        constraint: "max 10[max 50]",
        default: []
      },
      Field({ name: "entry", type: "string" })
    ),
    Field(
      { name: "Ratings", id: 8, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "string" })
    ),
    Field({ name: "ThumbnailUrl", id: 9, type: "string", conformance: "O", constraint: "max 8192" }),
    Field({ name: "PosterArtUrl", id: 10, type: "string", conformance: "O", constraint: "max 8192" }),
    Field({ name: "DvbiUrl", id: 11, type: "string", conformance: "O", constraint: "max 8192" }),
    Field({ name: "ReleaseDate", id: 12, type: "string", conformance: "O", constraint: "max 30" }),
    Field({ name: "ParentalGuidanceText", id: 13, type: "string", conformance: "O", constraint: "max 255" }),
    Field({ name: "RecordingFlag", id: 14, type: "RecordingFlagBitmap", conformance: "RP" }),
    Field({ name: "SeriesInfo", id: 15, type: "SeriesInfoStruct", conformance: "O", default: null, quality: "X" }),
    Field(
      { name: "CategoryList", id: 16, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ProgramCategoryStruct" })
    ),
    Field(
      { name: "CastList", id: 17, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ProgramCastStruct" })
    ),
    Field(
      { name: "ExternalIdList", id: 18, type: "list", conformance: "O", constraint: "max 255", default: [] },
      Field({ name: "entry", type: "ContentLauncher.AdditionalInfoStruct" })
    )
  ),
  Datatype(
    { name: "ProgramCategoryStruct", type: "struct" },
    Field({ name: "Category", id: 0, type: "string", conformance: "M", constraint: "max 256" }),
    Field({ name: "SubCategory", id: 1, type: "string", conformance: "O", constraint: "max 256" })
  ),
  Datatype(
    { name: "SeriesInfoStruct", type: "struct" },
    Field({ name: "Season", id: 0, type: "string", conformance: "M", constraint: "max 256" }),
    Field({ name: "Episode", id: 1, type: "string", conformance: "M", constraint: "max 256" })
  ),
  Datatype(
    { name: "ProgramCastStruct", type: "struct" },
    Field({ name: "Name", id: 0, type: "string", conformance: "M", constraint: "max 256" }),
    Field({ name: "Role", id: 1, type: "string", conformance: "M", constraint: "max 256" })
  ),
  Datatype(
    { name: "PageTokenStruct", type: "struct" },
    Field({ name: "Limit", id: 0, type: "uint16", conformance: "O", default: 0 }),
    Field({ name: "After", id: 1, type: "string", conformance: "O", constraint: "max 8192" }),
    Field({ name: "Before", id: 2, type: "string", conformance: "O", constraint: "max 8192" })
  ),
  Datatype(
    { name: "ChannelPagingStruct", type: "struct" },
    Field({ name: "PreviousToken", id: 0, type: "PageTokenStruct", conformance: "O", default: null, quality: "X" }),
    Field({ name: "NextToken", id: 1, type: "PageTokenStruct", conformance: "O", default: null, quality: "X" })
  )
);
MatterDefinition.children.push(Channel);
export {
  Channel
};
//# sourceMappingURL=channel.element.js.map
