{
    "additionalProperties": false,
    "description": "Schema for Iglu related errors which could be during validation or schema lookup",
    "properties": {
        "errors": {
            "description": "List of errors taken during a validation or schema lookup with Iglu",
            "items": {
                "additionalProperties": false,
                "properties": {
                    "error": {
                        "anyOf": [
                            {
                                "additionalProperties": false,
                                "description": "Problem during schema resolution, missing schema or internal error",
                                "properties": {
                                    "error": {
                                        "enum": [
                                            "ResolutionError"
                                        ]
                                    },
                                    "lookupHistory": {
                                        "description": "Set of all traversed repositories with their failures",
                                        "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                                "attempts": {
                                                    "description": "Number of attempts this repository has been queried",
                                                    "minimum": 0,
                                                    "type": "integer"
                                                },
                                                "errors": {
                                                    "items": {
                                                        "properties": {
                                                            "error": {
                                                                "enum": [
                                                                    "ClientFailure",
                                                                    "RepoFailure",
                                                                    "NotFound"
                                                                ]
                                                            },
                                                            "message": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "error"
                                                        ]
                                                    },
                                                    "type": "array"
                                                },
                                                "lastAttempt": {
                                                    "_format": "date-time",
                                                    "type": "string"
                                                },
                                                "repository": {
                                                    "description": "Repository name from resolver config",
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "repository",
                                                "errors",
                                                "attempts",
                                                "lastAttempt"
                                            ],
                                            "type": "object"
                                        },
                                        "minItems": 1,
                                        "type": "array"
                                    }
                                },
                                "required": [
                                    "error",
                                    "lookupHistory"
                                ]
                            },
                            {
                                "description": "Data is invalid against its schema",
                                "properties": {
                                    "dataReports": {
                                        "items": {
                                            "additionalProperties": false,
                                            "description": "List of reports",
                                            "properties": {
                                                "keyword": {
                                                    "description": "JSON Schema keyword caused this report",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "message": {
                                                    "description": "Human-readable error message",
                                                    "type": "string"
                                                },
                                                "path": {
                                                    "description": "JSON Path to problematic property in instance",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "targets": {
                                                    "description": "List of properties affected in instance",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "type": "array"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "path",
                                                "keyword",
                                                "targets"
                                            ],
                                            "type": "object"
                                        },
                                        "minItems": 1,
                                        "type": "array"
                                    },
                                    "error": {
                                        "enum": [
                                            "ValidationError"
                                        ]
                                    }
                                }
                            }
                        ]
                    },
                    "schema": {
                        "description": "Key of the schema which is tried to be fetched",
                        "pattern": "^iglu:[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/[1-9]+-[0-9]+-[0-9]+$",
                        "type": "string"
                    }
                },
                "required": [
                    "schema",
                    "error"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "event": {
            "additionalProperties": false,
            "description": "The enriched event that resulted in a storage loader failure",
            "properties": {
                "app_id": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "base_currency": {
                    "maxLength": 3,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_colordepth": {
                    "maxLength": 12,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_cookies": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_family": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_features_director": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_flash": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_gears": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_java": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_pdf": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_quicktime": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_realplayer": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_silverlight": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_features_windowsmedia": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "br_lang": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_name": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_renderengine": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_type": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_version": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "br_viewheight": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "br_viewwidth": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "collector_tstamp": {
                    "_format": "date-time",
                    "type": "string"
                },
                "contexts": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "derived_contexts": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "derived_tstamp": {
                    "_format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "doc_charset": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "doc_height": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "doc_width": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "domain_sessionid": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "domain_sessionidx": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "domain_userid": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "dvce_created_tstamp": {
                    "_format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "dvce_ismobile": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "dvce_screenheight": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "dvce_screenwidth": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "dvce_sent_tstamp": {
                    "_format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "dvce_type": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "etl_tags": {
                    "maxLength": 500,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "etl_tstamp": {
                    "_format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "event": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "event_fingerprint": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "event_format": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "event_id": {
                    "maxLength": 36,
                    "type": "string"
                },
                "event_name": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "event_vendor": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "event_version": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "geo_city": {
                    "maxLength": 75,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "geo_country": {
                    "maxLength": 2,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "geo_latitude": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "geo_longitude": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "geo_region": {
                    "maxLength": 3,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "geo_region_name": {
                    "maxLength": 100,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "geo_timezone": {
                    "maxLength": 64,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "geo_zipcode": {
                    "maxLength": 15,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ip_domain": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ip_isp": {
                    "maxLength": 100,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ip_netspeed": {
                    "maxLength": 100,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ip_organization": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_campaign": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_clickid": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_content": {
                    "maxLength": 500,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_medium": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_network": {
                    "maxLength": 64,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_source": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "mkt_term": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "name_tracker": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "network_userid": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "os_family": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "os_manufacturer": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "os_name": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "os_timezone": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_referrer": {
                    "maxLength": 4096,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_title": {
                    "maxLength": 2000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_url": {
                    "maxLength": 4096,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_urlfragment": {
                    "maxLength": 3000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_urlhost": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_urlpath": {
                    "maxLength": 3000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_urlport": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "page_urlquery": {
                    "maxLength": 6000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "page_urlscheme": {
                    "maxLength": 16,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "platform": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "pp_xoffset_max": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "pp_xoffset_min": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "pp_yoffset_max": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "pp_yoffset_min": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "refr_domain_userid": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_dvce_tstamp": {
                    "_format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_medium": {
                    "maxLength": 25,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_source": {
                    "maxLength": 50,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_term": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_urlfragment": {
                    "maxLength": 3000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_urlhost": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_urlpath": {
                    "maxLength": 6000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_urlport": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "refr_urlquery": {
                    "maxLength": 6000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refr_urlscheme": {
                    "maxLength": 16,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "se_action": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "se_category": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "se_label": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "se_property": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "se_value": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "ti_category": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ti_currency": {
                    "maxLength": 3,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ti_name": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ti_orderid": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ti_price": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "ti_price_base": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "ti_quantity": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "ti_sku": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_affiliation": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_city": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_country": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_currency": {
                    "maxLength": 3,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_orderid": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_shipping": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "tr_shipping_base": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "tr_state": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "tr_tax": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "tr_tax_base": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "tr_total": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "tr_total_base": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "true_tstamp": {
                    "_format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "txn_id": {
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "unstruct_event": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "user_fingerprint": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "user_id": {
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "user_ipaddress": {
                    "maxLength": 128,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "useragent": {
                    "maxLength": 1000,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "v_collector": {
                    "maxLength": 100,
                    "type": "string"
                },
                "v_etl": {
                    "maxLength": 100,
                    "type": "string"
                },
                "v_tracker": {
                    "maxLength": 100,
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "type": "object"
        },
        "processor": {
            "additionalProperties": false,
            "description": "Information about the piece of software responsible for the creation of enrichment failures",
            "properties": {
                "artifact": {
                    "description": "Artifact responsible for the creation of enrichment failures",
                    "maxLength": 512,
                    "type": "string"
                },
                "version": {
                    "description": "Version of the artifact responsible for the creation of enrichment failures",
                    "maxLength": 32,
                    "pattern": "^(\\d+\\.\\d+\\.\\d+.*)$",
                    "type": "string"
                }
            },
            "required": [
                "artifact",
                "version"
            ],
            "type": "object"
        }
    },
    "required": [
        "errors",
        "event"
    ],
    "self": {
        "format": "jsonschema",
        "name": "loader_iglu_error",
        "vendor": "com.snowplowanalytics.snowplow.badrows",
        "version": "1-0-0"
    },
    "type": "object"
}