B `@sGdddeZdS)cseZdZfddZedddZedddZeddd Zeed d d Zeed d dZ edddZ edddZ Z S)PIIcstt|||_dS)N)superr__init___session)selfsession) __class__l/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/api/pii.pyrsz PII.__init__) networkIdc sZ|tdgdd}d|d}dddd d d gfd d |D}|j|||S)ah **List the keys required to access Personally Identifiable Information (PII) for a given identifier. Exactly one identifier will be accepted. If the organization contains org-wide Systems Manager users matching the key provided then there will be an entry with the key "0" containing the applicable keys.** https://developer.cisco.com/meraki/api/#!get-network-pii-pii-keys - networkId (string) - username (string): The username of a Systems Manager user - email (string): The email of a network user account or a Systems Manager device - mac (string): The MAC of a network client device or a Systems Manager device - serial (string): The serial of a Systems Manager device - imei (string): The IMEI of a Systems Manager device - bluetoothMac (string): The MAC of a Bluetooth client rgetNetworkPiiPiiKeys)tags operationz /networks/z /pii/piiKeysusernameemailmacserialimei bluetoothMaccs&i|]\}}|kr||qSr)strip).0kv) query_paramsrr sz,PII.getNetworkPiiPiiKeys..)updatelocalsitemsrget)rr kwargsmetadataresourceparamsr)rr r s  zPII.getNetworkPiiPiiKeyscCs&dgdd}d|d}|j||S)z **List the PII requests for this network or organization** https://developer.cisco.com/meraki/api/#!get-network-pii-requests - networkId (string) rgetNetworkPiiRequests)r r z /networks/z /pii/requests)rr)rr rr rrr r"!s  zPII.getNetworkPiiRequestsc s|td|kr@ddg}|d|ks@td|dd|dgdd}d |d }dd d d dddgfdd|D}|j|||S)a **Submit a new delete or restrict processing PII request** https://developer.cisco.com/meraki/api/#!create-network-pii-request - networkId (string) - type (string): One of "delete" or "restrict processing" - datasets (array): The datasets related to the provided key that should be deleted. Only applies to "delete" requests. The value "all" will be expanded to all datasets applicable to this type. The datasets by applicable to each type are: mac (usage, events, traffic), email (users, loginAttempts), username (users, loginAttempts), bluetoothMac (client, connectivity), smDeviceId (device), smUserId (user) - username (string): The username of a network log in. Only applies to "delete" requests. - email (string): The email of a network user account. Only applies to "delete" requests. - mac (string): The MAC of a network client device. Applies to both "restrict processing" and "delete" requests. - smDeviceId (string): The sm_device_id of a Systems Manager device. The only way to "restrict processing" or "delete" a Systems Manager device. Must include "device" in the dataset for a "delete" request to destroy the device. - smUserId (string): The sm_user_id of a Systems Manager user. The only way to "restrict processing" or "delete" a Systems Manager user. Must include "user" in the dataset for a "delete" request to destroy the user. typedeletezrestrict processingz"type" cannot be "z", & must be set to one of: rcreateNetworkPiiRequest)r r z /networks/z /pii/requestsZdatasetsrrrZ smDeviceIdZsmUserIdcs&i|]\}}|kr||qSr)r)rrr) body_paramsrr rMsz/PII.createNetworkPiiRequest..)rrAssertionErrorrrpost)rr roptionsrr payloadr)r&r r%1s $ zPII.createNetworkPiiRequest)r requestIdcCs*dgdd}d|d|}|j||S)z **Return a PII request** https://developer.cisco.com/meraki/api/#!get-network-pii-request - networkId (string) - requestId (string) rgetNetworkPiiRequest)r r z /networks/z/pii/requests/)rr)rr r+rr rrr r,Qs zPII.getNetworkPiiRequestcCs*dgdd}d|d|}|j||S)z **Delete a restrict processing PII request** https://developer.cisco.com/meraki/api/#!delete-network-pii-request - networkId (string) - requestId (string) rdeleteNetworkPiiRequest)r r z /networks/z/pii/requests/)rr$)rr r+rr rrr r-bs zPII.deleteNetworkPiiRequestc sZ|tdgdd}d|d}dddd d d gfd d |D}|j|||S)aQ **Given a piece of Personally Identifiable Information (PII), return the Systems Manager device ID(s) associated with that identifier. These device IDs can be used with the Systems Manager API endpoints to retrieve device details. Exactly one identifier will be accepted.** https://developer.cisco.com/meraki/api/#!get-network-pii-sm-devices-for-key - networkId (string) - username (string): The username of a Systems Manager user - email (string): The email of a network user account or a Systems Manager device - mac (string): The MAC of a network client device or a Systems Manager device - serial (string): The serial of a Systems Manager device - imei (string): The IMEI of a Systems Manager device - bluetoothMac (string): The MAC of a Bluetooth client rgetNetworkPiiSmDevicesForKey)r r z /networks/z/pii/smDevicesForKeyrrrrrrcs&i|]\}}|kr||qSr)r)rrr)rrr rsz4PII.getNetworkPiiSmDevicesForKey..)rrrrr)rr rrr r!r)rr r.ss  z PII.getNetworkPiiSmDevicesForKeyc sZ|tdgdd}d|d}dddd d d gfd d |D}|j|||S)aM **Given a piece of Personally Identifiable Information (PII), return the Systems Manager owner ID(s) associated with that identifier. These owner IDs can be used with the Systems Manager API endpoints to retrieve owner details. Exactly one identifier will be accepted.** https://developer.cisco.com/meraki/api/#!get-network-pii-sm-owners-for-key - networkId (string) - username (string): The username of a Systems Manager user - email (string): The email of a network user account or a Systems Manager device - mac (string): The MAC of a network client device or a Systems Manager device - serial (string): The serial of a Systems Manager device - imei (string): The IMEI of a Systems Manager device - bluetoothMac (string): The MAC of a Bluetooth client rgetNetworkPiiSmOwnersForKey)r r z /networks/z/pii/smOwnersForKeyrrrrrrcs&i|]\}}|kr||qSr)r)rrr)rrr rsz3PII.getNetworkPiiSmOwnersForKey..)rrrrr)rr rrr r!r)rr r/s  zPII.getNetworkPiiSmOwnersForKey) __name__ __module__ __qualname__rstrr r"r%r,r-r.r/ __classcell__rr)rr rs  rN)objectrrrrr