{
    "type": "object",
    "properties": {
        "id": {
            "type": "string"
        },
        "historyId": {
            "type": "string"
        },
        "messages": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "threadId": {
                        "type": "string"
                    },
                    "snippet": {
                        "type": "string"
                    },
                    "payload": {
                        "type": "object",
                        "properties": {
                            "mimeType": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "mimeType"
                        ]
                    },
                    "sizeEstimate": {
                        "type": "integer"
                    },
                    "historyId": {
                        "type": "string"
                    },
                    "internalDate": {
                        "type": "string"
                    },
                    "labels": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "name"
                            ]
                        }
                    },
                    "From": {
                        "type": "string"
                    },
                    "To": {
                        "type": "string"
                    },
                    "Subject": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "threadId",
                    "snippet",
                    "payload",
                    "sizeEstimate",
                    "historyId",
                    "internalDate",
                    "labels",
                    "From"
                ]
            }
        }
    },
    "version": 1
}
