{
  "id":"https://schemaregistry.analysis.ext.hp.com/cdm/id/sw/sysInfoBase.schema.json",
  "version":"1.0.7",
  "gun": "com.hp.cdm.platform.software.domain.eventing.resource.eventDetail.type.systemInformation.version.1",
  "description": "CDM System information event",
  "required": [
    "id",
    "version",
    "sysUuid",
    "sysArchitecture",
    "sysBattery",
    "sysTouchEnabled",
    "sysManufacturer",
    "sysModelName",
    "sysCategory",
    "sysSKU",
    "osName",
    "osCountry",
    "osLanguage",
    "osArchitecture",
    "osVersion",
    "screenResolution"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uri",
      "description": "id of the schema to validate against"
    },
    "version": {
      "pattern": "[0-9]+\\.[0-9]+\\.[0-9]+$",
      "type": "string",
      "description": "version of originator detail schema",
      "example":"2.3.4"
    },
    "sysArchitecture": {
      "default": "unknown",
	  "oneOf":[
	  {"enum":["unknown","ARM","ARM64","MIPS","x86","x64"]},
	  {"pattern": "^other_[a-z]+$"}
	  ],
      "type": "string",
      "description": "Device architecture type"
    },
    "screenResolution": {
      "default": "unknown",
      "pattern": "^(unknown|[0-9]+x[0-9]+)$",
      "type": "string",
      "description": "OS - Screen resolution, not application resolution",
      "maxLength": 16
    },
    "osArchitecture": {
      "default": "unknown",
      "enum": [
        "unknown",
        "bit_32",
        "bit_64"
      ],
      "type": "string",
      "description": "OS - Architecture Bitness"
    },
    "osName": {
      "default": "unknown",
      "type": "string",
      "description": "The name of the OS as specific as possible",
      "example": "Android : 7.1.1 : N_MR1 : API=25",
      "maxLength": 64
    },
    "sysTouchEnabled": {
      "allOf":[
	  {"$ref": "#/definition/triState"},
      {"description": "System is touch enabled?"}
	  ]
    },
    "osVersion": {
      "default": "unknown",
      "pattern": "^(unknown|[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)$",
      "type": "string",
      "description": "OS - Version number 3-dots",
      "maxLength": 32
    },
    "sysManufacturer": {
      "default": "unknown",
      "type": "string",
      "description": "Device Manufacturer",
      "minLength": 1,
      "maxLength": 64
    },
    "sysSKU": {
      "default": "unknown",
      "type": "string",
      "description": "Device SKU",
      "minLength": 1,
      "maxLength": 32
    },
    "appId": {
      "default": "unknown",
      "pattern": "^(unknown|[a-zA-Z]+(_[a-zA-Z]+)?/[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)$",
      "type": "string",
      "description": "Application Identifier in the form of {AppName}/{AppVersion-3dot}\\n\n \\n\n See PDS-MQ-RecommendedConventions.txt for more information",
      "maxLength": 128
    },
    "osCountry": {
      "default": "unknown",
      "pattern": "^[A-Z]{2}$",
      "type": "string",
      "description": "OS - Country code in ISO 3166 format",
      "maxLength": 16
    },
    "osLanguage": {
      "default": "unknown",
      "pattern": "^[a-z]{2}(-[a-zA-Z]+)*$",
      "type": "string",
      "description": "OS - Microsoft language culture name in format derived from ISO 639",
      "maxLength": 16
    },
    "appDeployedUuid": {
      "default": "unknown",
      "pattern": "^(unknown|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})$",
      "type": "string",
      "description": "Random UUID generated at SW install time & persisted",
      "minLength": 36,
      "maxLength": 36
    },
    "sysBattery": {
      "allOf":[
	  {"$ref": "#/definition/triState"},
      {"description": "System is battery available?"}
	  ]
    },
    "appDeployedId": {
      "default": "unknown",
      "pattern": "^(unknown|[a-zA-Z]+(_[-_a-zA-Z0-9]+)?/[0-9]+([.][0-9]+)?)$",
      "type": "string",
      "description": "Application Deployment Identifier in the form of {AppDeploy}_{AppDeployCustom}/{AppDeployVersion-2dot}",
      "minLength": 36,
      "maxLength": 36
    },
    "appSessionUuid": {
      "default": "unknown",
      "pattern": "^(unknown|[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})$",
      "type": "string",
      "description": "Random UUID generated for each application session",
      "minLength": 36,
      "maxLength": 36
    },
    "sysUuid": {
      "default": "unknown",
      "pattern": "^(unknown|[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})$",
      "type": "string",
      "description": "Consistent UUID for system (best guess; OS dependent)",
      "minLength": 36,
      "maxLength": 36
    },
    "sysModelName": {
      "default": "unknown",
      "type": "string",
      "description": "Device Model Name",
      "minLength": 1,
      "maxLength": 64
    },
    "sysCategory": {
      "default": "unknown",
      "pattern": "^(desktop|phone|iot|game/console|team|tablet|player|tv|laptop|watch|simulator|car|other_[a-z0-9]+)$",
      "type": "string",
      "description": "Device Category",
      "maxLength": 64
    }
  },
  "definition": {
    "triState": {
      "default": "unknown",
      "enum": ["unknown","true","false"],
      "type": "string"
    }
  }
}
