{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "Describes a receiver",
    "properties": {
        "activation": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "additionalProperties": false,
            "description": "Parameters concerned with activation of the transport parameters",
            "properties": {
                "activation_time": {
                    "anyOf": [
                        {
                            "pattern": "^[0-9]+:[0-9]+$",
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter."
                },
                "mode": {
                    "anyOf": [
                        {
                            "enum": [
                                "activate_immediate",
                                "activate_scheduled_absolute",
                                "activate_scheduled_relative"
                            ],
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests."
                },
                "requested_time": {
                    "anyOf": [
                        {
                            "pattern": "^[0-9]+:[0-9]+$",
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request."
                }
            },
            "required": [
                "mode",
                "requested_time",
                "activation_time"
            ],
            "type": "object"
        },
        "master_enable": {
            "description": "Master on/off control for receiver",
            "type": "boolean"
        },
        "sender_id": {
            "description": "ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender.",
            "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",
                "null"
            ]
        },
        "transport_file": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "additionalProperties": false,
            "description": "Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type.",
            "properties": {
                "data": {
                    "description": "Content of the transport file",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "type": {
                    "description": "IANA assigned media type for file (e.g application/sdp)",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "data",
                "type"
            ],
            "title": "Transport file",
            "type": "object"
        },
        "transport_params": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}).",
            "items": {
                "description": "Transport-specific parameters for a transport",
                "patternProperties": {
                    "^[a-zA-Z0-9_]+$": {
                        "type": [
                            "string",
                            "boolean",
                            "null",
                            "number"
                        ]
                    }
                },
                "type": "object"
            },
            "title": "Receiver Transport Parameters",
            "type": "array"
        }
    },
    "required": [
        "sender_id",
        "master_enable",
        "activation",
        "transport_file",
        "transport_params"
    ],
    "title": "Receiver resource",
    "type": "object"
}
