B `R@sGdddeZdS)csdeZdZfddZedddZedddZeddd Zedd d Zeed d dZ Z S)MVSensecstt|||_dS)N)superr__init___session)selfsession) __class__q/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/api/mv_sense.pyrszMVSense.__init__)serialcCs&dgdd}d|d}|j||S)z **Returns live state from camera of analytics zones** https://developer.cisco.com/meraki/api/#!get-device-camera-analytics-live - serial (string) zMV SensegetDeviceCameraAnalyticsLive)tags operationz /devices/z/camera/analytics/live)rget)rr metadataresourcerrr r s  z$MVSense.getDeviceCameraAnalyticsLivec s|td|kr@ddg}|d|ks@td|dd|dgdd}d |d }d d d dgfdd|D}|j|||S)aC **Returns an overview of aggregate analytics data for a timespan** https://developer.cisco.com/meraki/api/#!get-device-camera-analytics-overview - serial (string) - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 365 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 7 days. The default is 1 hour. - objectType (string): [optional] The object type for which analytics will be retrieved. The default object type is person. The available types are [person, vehicle]. objectTypepersonvehiclez"objectType" cannot be "z", & must be set to one of: zMV Sense getDeviceCameraAnalyticsOverview)r r z /devices/z/camera/analytics/overviewt0t1timespancs&i|]\}}|kr||qSr)strip).0kv) query_paramsrr /sz.)updatelocalsAssertionErroritemsrr)rr kwargsoptionsrrparamsr)rr rs $  z(MVSense.getDeviceCameraAnalyticsOverviewc s|td|kr@ddg}|d|ks@td|dd|dgdd}d |d }dgfd d |D}|j|||S) aj **Returns most recent record for analytics zones** https://developer.cisco.com/meraki/api/#!get-device-camera-analytics-recent - serial (string) - objectType (string): [optional] The object type for which analytics will be retrieved. The default object type is person. The available types are [person, vehicle]. rrrz"objectType" cannot be "z", & must be set to one of: zMV SensegetDeviceCameraAnalyticsRecent)r r z /devices/z/camera/analytics/recentcs&i|]\}}|kr||qSr)r)rrr)rrr rIsz:MVSense.getDeviceCameraAnalyticsRecent..)rrr r!rr)rr r"r#rrr$r)rr r%3s $ z&MVSense.getDeviceCameraAnalyticsRecentcCs&dgdd}d|d}|j||S)z **Returns all configured analytic zones for this camera** https://developer.cisco.com/meraki/api/#!get-device-camera-analytics-zones - serial (string) zMV SensegetDeviceCameraAnalyticsZones)r r z /devices/z/camera/analytics/zones)rr)rr rrrrr r&Ms  z%MVSense.getDeviceCameraAnalyticsZones)r zoneIdc s|td|kr@ddg}|d|ks@td|dd|dgdd}d |d |d }d d dddgfdd|D}|j|||S)a **Return historical records for analytic zones** https://developer.cisco.com/meraki/api/#!get-device-camera-analytics-zone-history - serial (string) - zoneId (string) - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 365 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 hours after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 14 hours. The default is 1 hour. - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 60. The default is 60. - objectType (string): [optional] The object type for which analytics will be retrieved. The default object type is person. The available types are [person, vehicle]. rrrz"objectType" cannot be "z", & must be set to one of: zMV Sense#getDeviceCameraAnalyticsZoneHistory)r r z /devices/z/camera/analytics/zones/z/historyrrr resolutioncs&i|]\}}|kr||qSr)r)rrr)rrr rxsz?MVSense.getDeviceCameraAnalyticsZoneHistory..)rrr r!rr)rr r'r"r#rrr$r)rr r(]s $z+MVSense.getDeviceCameraAnalyticsZoneHistory) __name__ __module__ __qualname__rstrr rr%r&r( __classcell__rr)rr rs  rN)objectrrrrr