{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "A list of network flows.",
    "items": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Describes a simple network flow core schema.",
        "properties": {
            "bandwidth": {
                "description": "Average bandwidth requirement for the flow, formatted as a number followed by kbit/s, Mbit/s, Gbit/s. NB: Values should be formatted with no fraction component if possible, using the largest unit that allows that.",
                "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?[kMG]bit\\/s$",
                "type": "string"
            },
            "dscp": {
                "default": "CS0",
                "description": "Optional with default. DSCP based QoS metrics number, default is CS0, best effort.",
                "enum": [
                    "CS0",
                    "CS1",
                    "CS2",
                    "CS3",
                    "CS4",
                    "CS5",
                    "CS6",
                    "CS7",
                    "AF11",
                    "AF12",
                    "AF13",
                    "AF21",
                    "AF22",
                    "AF23",
                    "AF31",
                    "AF32",
                    "AF33",
                    "AF41",
                    "AF42",
                    "AF43",
                    "EF"
                ],
                "type": "string"
            },
            "forward_flow": {
                "default": true,
                "description": "Optional with default. Flag for forwarding the flow. If false, the network should not set up the flow. Only when this flag is changed to true should the flow be sent to all receivers.",
                "type": "boolean"
            },
            "id": {
                "description": "Globally unique identifier for the network flow",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                "type": "string"
            },
            "label": {
                "description": "Optional. Freeform string label for the network flow",
                "type": "string"
            },
            "multicast_address": {
                "anyOf": [
                    {
                        "format": "ipv4"
                    },
                    {
                        "format": "ipv6"
                    },
                    {
                        "type": "null"
                    }
                ],
                "description": "Multicast group address is an IP address, the IPv4 range is 224.1.1.1 to 239.255.255.255. Provisioned for IPv6 but implementation may depend or may not exist. A null value and null type option is added for future use of this schema for unicast flow",
                "type": [
                    "string",
                    "null"
                ]
            },
            "profile": {
                "default": "constant-rate",
                "description": "Optional with default. The transmission profile of the flow.",
                "enum": [
                    "constant-rate",
                    "SMPTE-2110-21-narrow",
                    "SMPTE-2110-21-wide",
                    "unknown"
                ],
                "type": "string"
            },
            "receiver_endpoint_ids": {
                "description": "List of receiver endpoint IDs.",
                "items": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                    "type": "string"
                },
                "minItems": 0,
                "type": "array",
                "uniqueItems": true
            },
            "sender_endpoint_id": {
                "description": "Sender Endpoint ID",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                "type": "string"
            }
        },
        "required": [
            "id",
            "multicast_address",
            "sender_endpoint_id",
            "receiver_endpoint_ids",
            "bandwidth"
        ],
        "title": "Network flow with minimal attributes",
        "type": "object"
    },
    "minItems": 0,
    "title": "List of network flows.",
    "type": "array",
    "uniqueItems": true
}
