{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-mediaconnect/json-schema/amazon-mediaconnect-describe-flow-source-metadata-response-schema.json",
  "title": "DescribeFlowSourceMetadataResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-mediaconnect-operations-api-openapi.yml#/components/schemas/DescribeFlowSourceMetadataResponse",
  "type": "object",
  "properties": {
    "FlowArn": {
      "type": "string",
      "description": "The ARN of the flow that DescribeFlowSourceMetadata was performed on."
    },
    "Messages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MessageDetail"
      },
      "description": "Provides a status code and message regarding issues found with the flow source metadata."
    },
    "Timestamp": {
      "type": "string",
      "description": "The timestamp of the most recent change in metadata for this flow’s source."
    },
    "TransportMediaInfo": {
      "$ref": "#/$defs/TransportMediaInfo"
    },
    "NdiInfo": {
      "$ref": "#/$defs/NdiSourceMetadataInfo"
    }
  },
  "$defs": {
    "ColorInformation": {
      "type": "object",
      "properties": {
        "Colorimetry": {
          "type": "string",
          "enum": [
            "BT709",
            "BT470M",
            "BT470BG",
            "BT601",
            "SMPTE240M",
            "GENERIC_FILM",
            "BT2020",
            "SMPTE428",
            "SMPTE431",
            "SMPTE432"
          ],
          "description": "The color primaries that the video stream uses (for example, BT709 or BT2020)."
        },
        "TransferCharacteristics": {
          "type": "string",
          "enum": [
            "BT709",
            "BT470M",
            "BT470BG",
            "BT601",
            "SMPTE240M",
            "LINEAR",
            "LOG100",
            "LOG316",
            "IEC61966_2_4",
            "BT1361_ECG",
            "IEC61966_2_1",
            "BT2020_10",
            "BT2020_12",
            "BT2100_PQ",
            "SMPTE428",
            "BT2100_HLG"
          ],
          "description": "The transfer characteristics that the video stream uses (for example, BT601, BT709, BT2100_PQ, or BT2100_HLG)."
        },
        "MatrixCoefficients": {
          "type": "string",
          "enum": [
            "IDENTITY",
            "BT709",
            "FCC",
            "BT470BG",
            "BT601",
            "SMPTE240M",
            "YCGCO",
            "BT2020_NCL",
            "BT2020_CL",
            "SMPTE2085",
            "CHROMATICITY_DERIVED_NCL",
            "CHROMATICITY_DERIVED_CL",
            "BT2100_ICTCP",
            "IPT_C2"
          ],
          "description": "The YCbCr matrix coefficients that the video stream uses (for example, BT709 or BT2020_NCL)."
        }
      }
    },
    "FrameResolution": {
      "type": "object",
      "properties": {
        "FrameHeight": {
          "type": "integer",
          "description": "The number of pixels in the height of the video frame."
        },
        "FrameWidth": {
          "type": "integer",
          "description": "The number of pixels in the width of the video frame."
        }
      },
      "required": [
        "FrameHeight",
        "FrameWidth"
      ]
    },
    "MessageDetail": {
      "type": "object",
      "properties": {
        "Code": {
          "type": "string",
          "description": "The error code."
        },
        "Message": {
          "type": "string",
          "description": "The specific error message that MediaConnect returns to help you understand the reason that the request did not succeed."
        },
        "ResourceName": {
          "type": "string",
          "description": "The name of the resource."
        }
      },
      "required": [
        "Code",
        "Message"
      ]
    },
    "NdiMediaInfo": {
      "type": "object",
      "properties": {
        "Streams": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NdiMediaStreamInfo"
          },
          "description": "A list of the individual media streams that make up the NDI source. This includes details about each stream's codec, resolution, frame rate, audio channels, and other parameters."
        }
      },
      "required": [
        "Streams"
      ]
    },
    "NdiMediaStreamInfo": {
      "type": "object",
      "properties": {
        "StreamType": {
          "type": "string",
          "description": "The type of media stream (for example, Video or Audio)."
        },
        "Codec": {
          "type": "string",
          "description": "The codec used for the media stream. For NDI sources, use speed-hq."
        },
        "StreamId": {
          "type": "integer",
          "description": "A unique identifier for the media stream."
        },
        "ScanMode": {
          "type": "string",
          "enum": [
            "progressive",
            "interlace",
            "progressive-segmented-frame"
          ],
          "description": "The method used to display video frames. Used when the streamType is Video."
        },
        "Color": {
          "$ref": "#/$defs/ColorInformation"
        },
        "FrameResolution": {
          "$ref": "#/$defs/FrameResolution"
        },
        "FrameRate": {
          "type": "string",
          "description": "The number of video frames displayed per second. Used when the streamType is Video."
        },
        "Channels": {
          "type": "integer",
          "description": "The number of audio channels in the stream. Used when the streamType is Audio."
        },
        "SampleRate": {
          "type": "integer",
          "description": "The number of audio samples captured per second, measured in kilohertz (kHz). Used when the streamType is Audio."
        }
      },
      "required": [
        "StreamType",
        "Codec",
        "StreamId"
      ]
    },
    "NdiSourceInfo": {
      "type": "object",
      "properties": {
        "SourceName": {
          "type": "string",
          "description": "The name of the upstream NDI sender."
        }
      },
      "required": [
        "SourceName"
      ]
    },
    "NdiSourceMetadataInfo": {
      "type": "object",
      "properties": {
        "ActiveSource": {
          "$ref": "#/$defs/NdiSourceInfo"
        },
        "DiscoveredSources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NdiSourceInfo"
          },
          "description": "A list of the available upstream NDI senders aggregated from all of your configured discovery servers."
        },
        "MediaInfo": {
          "$ref": "#/$defs/NdiMediaInfo"
        },
        "Messages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageDetail"
          },
          "description": "Any status messages or error codes related to the NDI source and its metadata."
        }
      },
      "required": [
        "DiscoveredSources",
        "MediaInfo",
        "Messages"
      ]
    },
    "TransportMediaInfo": {
      "type": "object",
      "properties": {
        "Programs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransportStreamProgram"
          },
          "description": "The list of transport stream programs in the current flow's source."
        },
        "TsId": {
          "type": "integer",
          "description": "The transport stream ID (TSID) of the source, from the Program Association Table (PAT)."
        }
      },
      "required": [
        "Programs"
      ]
    },
    "TransportStream": {
      "type": "object",
      "properties": {
        "Channels": {
          "type": "integer",
          "description": "The number of channels in the audio stream."
        },
        "Codec": {
          "type": "string",
          "description": "The codec used by the stream."
        },
        "Color": {
          "$ref": "#/$defs/ColorInformation"
        },
        "FrameRate": {
          "type": "string",
          "description": "The frame rate used by the video stream."
        },
        "FrameResolution": {
          "$ref": "#/$defs/FrameResolution"
        },
        "Pid": {
          "type": "integer",
          "description": "The Packet ID (PID) as it is reported in the Program Map Table."
        },
        "SampleRate": {
          "type": "integer",
          "description": "The sample rate used by the audio stream."
        },
        "SampleSize": {
          "type": "integer",
          "description": "The sample bit size used by the audio stream."
        },
        "StreamType": {
          "type": "string",
          "description": "The Stream Type as it is reported in the Program Map Table."
        }
      },
      "required": [
        "Pid",
        "StreamType"
      ]
    },
    "TransportStreamProgram": {
      "type": "object",
      "properties": {
        "PcrPid": {
          "type": "integer",
          "description": "The Program Clock Reference (PCR) Packet ID (PID) as it is reported in the Program Association Table."
        },
        "ProgramName": {
          "type": "string",
          "description": "The program name as it is reported in the Program Association Table."
        },
        "ProgramNumber": {
          "type": "integer",
          "description": "The program number as it is reported in the Program Association Table."
        },
        "ProgramPid": {
          "type": "integer",
          "description": "The program Packet ID (PID) as it is reported in the Program Association Table."
        },
        "Streams": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransportStream"
          },
          "description": "The list of elementary transport streams in the program. The list includes video, audio, and data streams."
        }
      },
      "required": [
        "PcrPid",
        "ProgramNumber",
        "ProgramPid",
        "Streams"
      ]
    }
  }
}