{ "$schema": "http://json-schema.org/schema#", "$schemaVersion": "0.0.1", "modelTags": "OCF", "$id": "https://smart-data-models.github.io/dataModel.OCF/TimePeriod/schema.json", "title": "Smart Data models - TimePeriod schema derived from the open connectivity foundation repository https://github.com/openconnectivityfoundation/IoTDataModels", "description": "This Resource describes the time period over which any additionally provided information is derived or bounded.The Property 'startTime' and 'stopTime' are RFC3339 encoded strings. The Property 'startTime' must be present.The interval is the interval of the time period in minutes, if present this value must be no less than 0 minute.The intervalsecond is the interval of the time period in seconds, if present this value must be numerical zero or greater.The repeat is the number of the time period's iteration, which means how many times to repeat the time period. The Property 'repeat' accepts only negative one, numerical zero, and positive number. When this value is numerical zero, the time period will be repeated infinitely until a client makes it stop by inputting negative one for the value.The Property 'stoptime' and 'interval' are mutually exclusive; both Properties cannot be present in a Resource instance.The Property 'intervalsecond' cannot be presented with the Property 'stopTime'. In case of both the Property 'interval' and 'intervalsecond' are presented together, the total time interval is the sum of 'interval' and 'intervalsecond'.The Property 'triggertiming' describes a specific time to execute an action. This property must have one of the values among 'startTime', 'stopTime', and 'totalInterval'. The totalInterval means the sum of the Property 'interval' and 'intervalsecond'. If one of the properties does not exist, the value of the unexpressed property is taken as a numerical zero.The Property 'state' describes a state of time interval. This property must have one of the values among 'preInterval', 'inInterval', and 'postInterval'.The Resource defines a time period for information retrieval, action or other behaviour.", "type": "object", "allOf": [ { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" }, { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" }, { "properties": { "rt": { "description": "Property. The Resource Type", "items": { "enum": [ "oic.r.time.period" ], "maxLength": 64, "type": "string" }, "minItems": 1, "uniqueItems": true, "readOnly": true, "type": "array" }, "interval": { "description": "Property. The time interval in minutes after the 'startTime', if present the Property 'stopTime' cannot be present", "type": "integer", "minimum": 0 }, "intervalsecond": { "description": "Property. The time interval in seconds after the 'startTime', if present the Property 'stopTime' cannot be present", "type": "integer", "minimum": 0 }, "stopTime": { "description": "Property. The stop time for the time period, if present the Property 'interval' or 'intervalsecond' cannot be present", "type": "string", "format": "date-time" }, "startTime": { "description": "Property. The start time for the time period", "type": "string", "format": "date-time" }, "repeat": { "description": "Property. The number of times to repeat the time period", "type": "integer", "minimum": -1 }, "triggertiming": { "description": "Property. The desired timing to trigger an action execution", "type": "string", "enum": [ "startTime", "stopTime", "totalInterval" ] }, "state": { "description": "Property. The current state of the time interval", "type": "string", "readOnly": true, "enum": [ "preInterval", "inInterval", "postInterval" ] }, "n": { "type": "string", "maxLength": 64, "readOnly": true, "description": "Property. Friendly name of the Resource" }, "if": { "description": "Property. The OCF Interface set supported by this Resource", "items": { "enum": [ "oic.if.a", "oic.if.baseline" ], "type": "string" }, "minItems": 2, "uniqueItems": true, "readOnly": true, "type": "array" }, "type": { "type": "string", "enum": [ "TimePeriod" ], "description": "Property. NGSI entity type. It has to be TimePeriod" } } } ], "license": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md", "derivedFrom": "https://raw.githubusercontent.com/openconnectivityfoundation/IoTDataModels/master/TimePeriodResURI.swagger.json", "required": [ "startTime", "id", "type" ] }