{
	"$schema":"https://json-schema.org/draft/2020-12/schema",
	"$id":"http://www.itu.int/schema/disposition-list",
	"description":"Structure definition of subscription list",	
	"type":"array",
	"items":{
		"$ref":"#/$defs/subscribe"
	},
	"$defs":{
		"subscribe":{
			"type":"object",
			"description":"Subscription object structure description",
			"properties" : {
				"SubscribeID":{
					"description":"Subscription ID, generated by DSS when desposing, cannot be empty when cascading call",
					"$ref":"/schema/components#/$defs/businessObjectId"
				},
				"Title":{
					"description":"The title of disposition, describing the theme and purpose of disposition",
					"type":"string"
				},
				"SubscribeDetail":{
					"description":"Subscription category, can be multiple, if multiple, usually they are separated by an English  half-width','. 1: Acquisition device catalog; 2: Acquisition device status; 3: Acquisition system catalog ; 4: Acquisition system status; 5: Video tollgate catalog; 6: Single bayonet record; 7: Lane catalog; 8: Single lane record; 9: Motor vehicle information; 10: Self-non-motor vehicle information; 11: File information; 12: Video slice; 13: Image; 14: Data classification label list",
	"enum":["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],
					"examples":"1,2"
				},				
				"ResourceClass":{
					"description":"Subscription resource category. 0: tollgate; 1: device; 2: acquisition  content; 3: case; 4: image library; 5: administrative division",
					"enum":[0,1,2,3,4,5]
				},
				"ResourceURI":{
					"description":"Subscription resource path, tollgate ID, device ID, acquisition content ID, case ID, target image library ID, area code 2/4/6 bits, etc., can be multiple, only one resource category at a time.",
					"type":"string"
				},
				"ApplicantName":{
					"description":"Applicant",
					"type":"string"
				},
				"ApplicantOrg":{
					"description":"Applicant unit",
					"type":"string"
				},
				"BeginTime":{
					"description":"Subscription start time",
					"type":"string",
					"format":"dateTime"
				},
				"EndTime":{
					"description":"Subscription end time",
					"type":"string",
					"format":"dateTime"
				},
				"ReceiveAddr":{
					"description":"Notification information receiving address, according to the address to decide whether to receive or forward",
					"$ref":"/schema/components#/$defs/urlPath"
				},
				"ReportInterval":{
					"description":"Report interval, in seconds, <=0 means no limit",
					"type":"integer"
				},
				"Reason":{
					"description":"Reason for subscription",
					"type":"string"
				},
				"OperateType":{
					"description":"Subscription type. 1: Subscription; 2: Cancel subscription",
					"enum":[1,2]
				},
				"SubscribeStatus":{
					"description":"Subscription status. 1: subscribing; 2: canceled subscription; 3: subscription expired; 4: not subscribed; 9: other",
					"enum":[1,2,3,4,9]
				},
				"SubscribeCancelOrg":{
					"description":"Unsubscribe unit name",
					"type":"string"
				},
				"SubscribeCancelPerson":{
					"description":"Subscription canceller",
					"type":"string"
				},
				"CancelTime":{
					"description":"Cancel subscription time",
					"type":"string",
					"format":"dateTime"
				},
				"CancelReason":{
					"description":"Reason for canceling subscription",
					"type":"string"
				},
				"ResultImageDeclare":{
					"description":"Return picture convention. 00: No picture; 01: Large image of the vehicle; 02: Small color image of the license plate; 03: Binary image of the license plate; 04: Car logo; 05: Violation composite image; 06: Passing vehicle composite image; 07: Vehicle close-up image;08: Non-motorized vehicle image; 100 :General picture",
	"enum":["00","01","02","03","04","05","06","07","08","09","10","100"]
				},
				"ResultFeatureDeclare":{
					"description":"feature vector declare. 0: No need to return feature vector; 1: Need to return feature vector ",
					"enum":[0,1]
				},
				"TabID":{
					"description":"Subscription category label identification",
					"$ref":"/schema/components#/$defs/basicObjectIdType"
				}
			},
			"required":["OperateType","ResultImageDeclare","ResultFeatureDeclare"],
			
			"allOf":[
			{
				"if":{
					"properties":{	"OperateType":0	}
				},
				"then":{
					"required":["Title","SubscribeDetail","ResourceClass","ResourceURI","ApplicantName","ApplicantOrg","BeginTime","EndTime"]
				}
			},
			{
				"if":{
					"properties":{	"OperateType":1	}
				},
				"then":{
					"required":["SubscribeID"]
				}
			}
			]
		}
	}
}
