{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"anyOf": [
		{
			"type": "object",
			"properties": {
				"ok": {
					"type": "boolean",
					"const": true
				},
				"schemaVersion": {
					"type": "number",
					"const": 1
				},
				"command": {
					"type": "string",
					"const": "snapshot"
				},
				"device": {
					"type": "object",
					"properties": {
						"udid": {
							"type": "string"
						},
						"platform": {
							"type": "string",
							"enum": [
								"ios",
								"android"
							]
						},
						"name": {
							"type": "string"
						}
					},
					"required": [
						"udid",
						"platform"
					],
					"additionalProperties": false
				},
				"generation": {
					"type": "number"
				},
				"durationMs": {
					"type": "number"
				},
				"attachedTo": {
					"type": "string"
				},
				"result": {
					"type": "object",
					"properties": {
						"backend": {
							"type": "string",
							"enum": [
								"axbridge",
								"ax",
								"uiautomator"
							]
						},
						"screen": {
							"type": "object",
							"properties": {
								"width": {
									"type": "number"
								},
								"height": {
									"type": "number"
								},
								"scale": {
									"type": "number"
								},
								"rotation": {
									"type": "number"
								}
							},
							"required": [
								"width",
								"height",
								"scale"
							],
							"additionalProperties": false
						},
						"truncated": {
							"type": "boolean"
						},
						"hash": {
							"type": "string"
						},
						"generation": {
							"type": "number"
						},
						"elements": {
							"type": "array",
							"items": {
								"type": "object",
								"properties": {
									"ref": {
										"type": "string"
									},
									"role": {
										"type": "string"
									},
									"name": {
										"type": "string"
									},
									"id": {
										"type": "string"
									},
									"value": {
										"type": "string"
									},
									"placeholder": {
										"type": "string"
									},
									"enabled": {
										"type": "boolean"
									},
									"hittable": {
										"type": "boolean"
									},
									"selected": {
										"type": "boolean"
									},
									"checked": {
										"type": "boolean"
									},
									"frame": {
										"type": "object",
										"properties": {
											"x": {
												"type": "number"
											},
											"y": {
												"type": "number"
											},
											"width": {
												"type": "number"
											},
											"height": {
												"type": "number"
											}
										},
										"required": [
											"x",
											"y",
											"width",
											"height"
										],
										"additionalProperties": false
									},
									"a11y": {
										"type": "object",
										"properties": {
											"hint": {
												"type": "string"
											},
											"actions": {
												"readOnly": true,
												"type": "array",
												"items": {
													"type": "string"
												}
											},
											"focusable": {
												"type": "boolean"
											},
											"important": {
												"type": "boolean"
											},
											"a11yFocused": {
												"type": "boolean"
											},
											"liveRegion": {
												"type": "string",
												"enum": [
													"polite",
													"assertive"
												]
											},
											"order": {
												"type": "number"
											},
											"traversal": {
												"type": "number"
											}
										},
										"additionalProperties": false
									},
									"noId": {
										"type": "boolean",
										"const": true
									},
									"keys": {
										"type": "number"
									}
								},
								"required": [
									"role",
									"enabled",
									"frame"
								],
								"additionalProperties": false
							}
						},
						"total": {
							"type": "number"
						},
						"shown": {
							"type": "number"
						},
						"omitted": {
							"type": "number"
						},
						"settle": {
							"anyOf": [
								{
									"type": "object",
									"properties": {
										"quiet": {
											"type": "boolean"
										},
										"waitedMs": {
											"type": "number"
										}
									},
									"required": [
										"quiet",
										"waitedMs"
									],
									"additionalProperties": false
								},
								{
									"type": "null"
								}
							]
						},
						"diff": {
							"anyOf": [
								{
									"type": "object",
									"properties": {
										"added": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"kind": {
														"type": "string",
														"enum": [
															"+",
															"-"
														]
													},
													"line": {
														"type": "string"
													},
													"ref": {
														"type": "string"
													}
												},
												"required": [
													"kind",
													"line"
												],
												"additionalProperties": false
											}
										},
										"removed": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"kind": {
														"type": "string",
														"enum": [
															"+",
															"-"
														]
													},
													"line": {
														"type": "string"
													},
													"ref": {
														"type": "string"
													}
												},
												"required": [
													"kind",
													"line"
												],
												"additionalProperties": false
											}
										},
										"unchanged": {
											"type": "number"
										},
										"against": {
											"type": "number"
										}
									},
									"required": [
										"added",
										"removed",
										"unchanged",
										"against"
									],
									"additionalProperties": false
								},
								{
									"type": "null"
								}
							]
						}
					},
					"required": [
						"backend",
						"screen",
						"truncated",
						"hash",
						"generation",
						"elements",
						"total",
						"shown",
						"omitted",
						"settle",
						"diff"
					],
					"additionalProperties": false
				},
				"warnings": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"ok",
				"schemaVersion",
				"command",
				"device",
				"durationMs",
				"result"
			],
			"additionalProperties": false
		},
		{
			"type": "object",
			"properties": {
				"ok": {
					"type": "boolean",
					"const": false
				},
				"schemaVersion": {
					"type": "number",
					"const": 1
				},
				"command": {
					"type": "string"
				},
				"device": {
					"type": "object",
					"properties": {
						"udid": {
							"type": "string"
						},
						"platform": {
							"type": "string",
							"enum": [
								"ios",
								"android"
							]
						},
						"name": {
							"type": "string"
						}
					},
					"required": [
						"udid",
						"platform"
					],
					"additionalProperties": false
				},
				"error": {
					"type": "object",
					"properties": {
						"code": {
							"type": "string",
							"enum": [
								"usage",
								"failed",
								"wait_target_absent",
								"wait_target_hidden",
								"wait_target_present",
								"wait_text_absent",
								"wait_not_stable",
								"target_not_found",
								"no_alert",
								"device_foreign",
								"device_busy",
								"device_unauthorized",
								"device_offline",
								"device_locked",
								"device_not_leased",
								"no_device_leased",
								"ambiguous_device",
								"lease_not_found",
								"engine_unavailable",
								"devtools_unavailable",
								"stale_ref",
								"no_recording",
								"recording_active",
								"target_exists",
								"empty_recording",
								"verify_failed",
								"helper_missing",
								"use_failed",
								"verify_unavailable",
								"interrupted",
								"device_unknown",
								"session_active",
								"session_not_found",
								"app_not_found",
								"unsupported",
								"not_profileable",
								"tool_missing",
								"NO_DEVICE",
								"QUEUE_TIMEOUT",
								"NO_CAPACITY",
								"REQUESTER_LIMIT",
								"RUNTIME_MISSING",
								"HEALTH_FAILED",
								"LEASE_LOST"
							]
						},
						"message": {
							"type": "string"
						},
						"hint": {
							"type": "string"
						},
						"details": {
							"type": "object",
							"propertyNames": {
								"type": "string"
							},
							"additionalProperties": {}
						}
					},
					"required": [
						"code",
						"message"
					],
					"additionalProperties": false
				}
			},
			"required": [
				"ok",
				"schemaVersion",
				"command",
				"error"
			],
			"additionalProperties": false
		}
	],
	"$id": "https://warden.co.nz/schemas/warden.ui.snapshot/1.json",
	"title": "warden.ui.snapshot"
}
