{
    "additionalProperties": false,
    "description": "Schema for a local or remote push notification",
    "properties": {
        "action": {
            "description": "The action associated with the notification.",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "attachments": {
            "description": "Attachments added to the notification (they can be part of the 'data' field).",
            "items": {
                "additionalProperties": false,
                "description": "Attachment.",
                "properties": {
                    "identifier": {
                        "description": "The identifier of the attachment.",
                        "maxLength": 1024,
                        "type": "string"
                    },
                    "type": {
                        "description": "The type of attachment.",
                        "maxLength": 1024,
                        "type": "string"
                    },
                    "url": {
                        "_format": "uri",
                        "description": "The url of the attachment.",
                        "maxLength": 1024,
                        "type": "string"
                    }
                },
                "required": [
                    "identifier",
                    "url",
                    "type"
                ],
                "type": "object"
            },
            "type": [
                "array",
                "null"
            ]
        },
        "body": {
            "description": "The notification's body.",
            "maxLength": 4096,
            "type": "string"
        },
        "bodyLocArgs": {
            "description": "Variable string values to be used in place of the format specifiers in bodyLocArgs to use to localize the body text to the user's current localization.",
            "items": {
                "description": "Item of bodyLocArgs.",
                "maxLength": 1024,
                "type": [
                    "string",
                    "null"
                ]
            },
            "minItems": 1,
            "type": [
                "array",
                "null"
            ]
        },
        "bodyLocKey": {
            "description": "The key to the body string in the app's string resources to use to localize the body text to the user's current localization.",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "category": {
            "description": "The category associated to the notification.",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "contentAvailable": {
            "description": "Indicates whether the application is notified of the delivery of the notification. When true the app is woken up (iOS only).",
            "type": [
                "boolean",
                "null"
            ]
        },
        "group": {
            "description": "The group which this notification is part of.",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "icon": {
            "description": "The icon associated to the notification (Android only).",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "notificationCount": {
            "description": "The number of items this notification represents. It's the badge number on iOS.",
            "maximum": 10000,
            "minimum": 0,
            "type": [
                "integer",
                "null"
            ]
        },
        "notificationTimestamp": {
            "_format": "date-time",
            "description": "The time when the event of the notification occurred.",
            "type": [
                "string",
                "null"
            ]
        },
        "sound": {
            "description": "The sound played when the device receives the notification.",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "subtitle": {
            "description": "The notification's subtitle (iOS only).",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "tag": {
            "description": "An identifier similar to 'group' but usable for different purposes (Android only).",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "threadIdentifier": {
            "description": "An identifier similar to 'group' but usable for different purposes (iOS only).",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "title": {
            "description": "The notification's title.",
            "maxLength": 1024,
            "type": "string"
        },
        "titleLocArgs": {
            "description": "Variable string values to be used in place of the format specifiers in titleLocArgs to use to localize the title text to the user's current localization.",
            "items": {
                "description": "Item of titleLocArgs.",
                "maxLength": 1024,
                "type": [
                    "string",
                    "null"
                ]
            },
            "minItems": 1,
            "type": [
                "array",
                "null"
            ]
        },
        "titleLocKey": {
            "description": "The key to the title string in the app's string resources to use to localize the title text to the user's current localization.",
            "maxLength": 1024,
            "type": [
                "string",
                "null"
            ]
        },
        "trigger": {
            "description": "The trigger that raised the notification message.",
            "enum": [
                "push",
                "location",
                "calendar",
                "timeInterval",
                "other"
            ],
            "type": "string"
        }
    },
    "required": [
        "title",
        "body",
        "trigger"
    ],
    "self": {
        "format": "jsonschema",
        "name": "message_notification",
        "vendor": "com.snowplowanalytics.mobile",
        "version": "1-0-0"
    },
    "type": "object"
}