{
	"$schema":"http://json-schema.org/draft-04/schema#",
	"title":"UserLogin",
	"type":"object",
	"additionalProperties":false,
	"description":"Analytics-v3 .. User Login object",
	"properties":{
		"log_context":{
			"$ref":"/resources/schema/analytics/client/v3/LogContext.json",
			"description":"Required Log Context Reference"
		},
		"event_name":{
			"type": "string",
			"enum": ["USER_LOGIN"]		
		},
		"schema_definition":{
			"type": "string",
			"enum": ["UserLogin"]
		},
		"credential_type":{
			"$ref":"/resources/schema/analytics/client/v3/CredentialType.json",
			"description":"Required .. Type of login credentials."
		},
		"credential_key":{
			"type":"string",
			"description":"Required .. Email or credential key for the user."
		},
		"first_name":{
			"type":"string",
			"description":"First Name."
		},
		"last_name":{
			"type":"string",
			"description":"Last Name."
		},
		"login_event":{
			"$ref":"/resources/schema/analytics/client/v3/LoginEventType.json",
			"description":"Required .. Purpose for entering credentials."
		},
		"existing_user_id":{
			"type":"string",
			"description":"Any user id associated with the same user with different credential type."
		},
		"status":{
			"$ref":"/resources/schema/analytics/client/v3/StatusType.json",
			"description":"Whether successfully logged in or not"
		},
		"caused_by":{
			"type":"string",
			"description":"If status is FAIL, then the reason for failure."
		}
		
	},
	"required":[
		"log_context",
		"event_name",
		"schema_definition",
		"caused_by",
		"status",
		"credential_type",
		"credential_key",
		"login_event",
		"existing_user_id"
	]
}