B `j@sGdddZdS)cseZdZfddZeedddZeedddZeed d d Z ed d dZ eedddZ ed ddZ ed ddZ eedddZeeedddZeedddZed ddZeed d!d"Zeed d#d$Zed d%d&Zeedd'd(Zeedd)d*Zeedd+d,Zeedd-d.Zeedd/d0Zeedd1d2Zeedd3d4Zeedd5d6Zed7d8d9ZdEeed<d=d>ZdFeed<d?d@ZdGeed<dAdBZ dHeed<dCdDZ!Z"S)IAsyncSMcst||_dS)N)super__init___session)selfsession) __class__o/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/aio/api/sm.pyrs zAsyncSM.__init__) networkIdidscsPt}dgdd}d|d}dgfdd|D}|j|||Id HS) a  **Bypass activation lock attempt** https://developer.cisco.com/meraki/api/#!create-network-sm-bypass-activation-lock-attempt - networkId (string) - ids (array): The ids of the devices to attempt activation lock bypass. SM*createNetworkSmBypassActivationLockAttempt)tags operationz /networks/z /sm/bypassActivationLockAttemptsr cs&i|]\}}|kr||qSr)strip).0kv) body_paramsrr szFAsyncSM.createNetworkSmBypassActivationLockAttempt..N)localsitemsrpost)rr r kwargsmetadataresourcepayloadr)rr r s  z2AsyncSM.createNetworkSmBypassActivationLockAttempt)r attemptIdcs0dgdd}d|d|}|j||IdHS)z **Bypass activation lock attempt status** https://developer.cisco.com/meraki/api/#!get-network-sm-bypass-activation-lock-attempt - networkId (string) - attemptId (string) r 'getNetworkSmBypassActivationLockAttempt)rrz /networks/z!/sm/bypassActivationLockAttempts/N)rget)rr rrrrrr rs z/AsyncSM.getNetworkSmBypassActivationLockAttempt)r deviceFieldscs\|tdgdd}d|d}dddd gfd d |D}|j|||Id HS) a **Modify the fields of a device** https://developer.cisco.com/meraki/api/#!update-network-sm-device-fields - networkId (string) - deviceFields (object): The new fields of the device. Each field of this object is optional. - wifiMac (string): The wifiMac of the device to be modified. - id (string): The id of the device to be modified. - serial (string): The serial of the device to be modified. r updateNetworkSmDeviceFields)rrz /networks/z/sm/device/fieldswifiMacidserialr cs&i|]\}}|kr||qSr)r)rrr)rrr rBsz7AsyncSM.updateNetworkSmDeviceFields..N)updaterrrput)rr r rrrrr)rr r!-s   z#AsyncSM.updateNetworkSmDeviceFields)r cs\|tdgdd}d|d}dddd gfd d |D}|j|||Id HS) a **Wipe a device** https://developer.cisco.com/meraki/api/#!wipe-network-sm-device - networkId (string) - wifiMac (string): The wifiMac of the device to be wiped. - id (string): The id of the device to be wiped. - serial (string): The serial of the device to be wiped. - pin (integer): The pin number (a six digit value) for wiping a macOS device. Required only for macOS devices. r wipeNetworkSmDevice)rrz /networks/z/sm/device/wiper"r#r$pincs&i|]\}}|kr||qSr)r)rrr)rrr r[sz/AsyncSM.wipeNetworkSmDevice..N)r%rrrr&)rr rrrrr)rr r'Fs   zAsyncSM.wipeNetworkSmDevice)r deviceIdcs2dgdd}d|d|d}|j||IdHS)z **Refresh the details of a device** https://developer.cisco.com/meraki/api/#!refresh-network-sm-device-details - networkId (string) - deviceId (string) r refreshNetworkSmDeviceDetails)rrz /networks/z /sm/device/z/refreshDetailsN)rr)rr r)rrrrr r*_s z%AsyncSM.refreshNetworkSmDeviceDetailscsb|tdgdd}d|d}dddd d d d gfd d|D}|j|||IdHS)a **List the devices enrolled in an SM network with various specified fields and filters** https://developer.cisco.com/meraki/api/#!get-network-sm-devices - networkId (string) - fields (string): Additional fields that will be displayed for each device. Multiple fields can be passed in as comma separated values. The default fields are: id, name, tags, ssid, wifiMac, osName, systemModel, uuid, and serialNumber. The additional fields are: ip, systemType, availableDeviceCapacity, kioskAppName, biosVersion, lastConnected, missingAppsCount, userSuppliedAddress, location, lastUser, ownerEmail, ownerUsername, publicIp, phoneNumber, diskInfoJson, deviceCapacity, isManaged, hadMdm, isSupervised, meid, imei, iccid, simCarrierNetwork, cellularDataUsed, isHotspotEnabled, createdAt, batteryEstCharge, quarantined, avName, avRunning, asName, fwName, isRooted, loginRequired, screenLockEnabled, screenLockDelay, autoLoginDisabled, autoTags, hasMdm, hasDesktopAgent, diskEncryptionEnabled, hardwareEncryptionCaps, passCodeLock, usesHardwareKeystore, and androidSecurityPatchVersion. - wifiMacs (string): Filter devices by wifi mac(s). Multiple wifi macs can be passed in as comma separated values. - serials (string): Filter devices by serial(s). Multiple serials can be passed in as comma separated values. - ids (string): Filter devices by id(s). Multiple ids can be passed in as comma separated values. - scope (string): Specify a scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags as comma separated values. - batchSize (integer): Number of devices to return, 1000 is the default as well as the max. - batchToken (string): If the network has more devices than the batch size, a batch token will be returned as a part of the device list. To see the remainder of the devices, pass in the batchToken as a parameter in the next request. Requests made with the batchToken do not require additional parameters as the batchToken includes the parameters passed in with the original request. Additional parameters passed in with the batchToken will be ignored. r getNetworkSmDevices)rrz /networks/z /sm/devicesfieldswifiMacsserialsr scopeZ batchSizeZ batchTokencs&i|]\}}|kr||qSr)r)rrr) query_paramsrr rsz/AsyncSM.getNetworkSmDevices..N)r%rrrr)rr rrrparamsr)r0r r+ps  zAsyncSM.getNetworkSmDevicescs\|tdgdd}d|d}dddd gfd d |D}|j|||Id HS) a **Force check-in a set of devices** https://developer.cisco.com/meraki/api/#!checkin-network-sm-devices - networkId (string) - wifiMacs (string): The wifiMacs of the devices to be checked-in. - ids (string): The ids of the devices to be checked-in. - serials (string): The serials of the devices to be checked-in. - scope (string): The scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags of the devices to be checked-in. r checkinNetworkSmDevices)rrz /networks/z/sm/devices/checkinr-r r.r/cs&i|]\}}|kr||qSr)r)rrr)rrr rsz3AsyncSM.checkinNetworkSmDevices..N)r%rrrr&)rr rrrrr)rr r2s   zAsyncSM.checkinNetworkSmDevices)r newNetworkcs^|tdgdd}d|d}dddd d gfd d |D}|j|||Id HS)aV **Move a set of devices to a new network** https://developer.cisco.com/meraki/api/#!move-network-sm-devices - networkId (string) - newNetwork (string): The new network to which the devices will be moved. - wifiMacs (string): The wifiMacs of the devices to be moved. - ids (string): The ids of the devices to be moved. - serials (string): The serials of the devices to be moved. - scope (string): The scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags of the devices to be moved. r moveNetworkSmDevices)rrz /networks/z/sm/devices/mover-r r.r/r3cs&i|]\}}|kr||qSr)r)rrr)rrr rsz0AsyncSM.moveNetworkSmDevices..N)r%rrrr&)rr r3rrrrr)rr r4s  zAsyncSM.moveNetworkSmDevices)r r updateActioncs`|tdgdd}d|d}dddd d d gfd d |D}|j|||IdHS)a **Add, delete, or update the tags of a set of devices** https://developer.cisco.com/meraki/api/#!update-network-sm-devices-tags - networkId (string) - tags (string): The tags to be added, deleted, or updated. - updateAction (string): One of add, delete, or update. Only devices that have been modified will be returned. - wifiMacs (string): The wifiMacs of the devices to be modified. - ids (string): The ids of the devices to be modified. - serials (string): The serials of the devices to be modified. - scope (string): The scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags of the devices to be modified. r updateNetworkSmDevicesTags)rrz /networks/z/sm/devices/tagsr-r r.r/rr5cs&i|]\}}|kr||qSr)r)rrr)rrr rsz6AsyncSM.updateNetworkSmDevicesTags..N)r%rrrr&)rr rr5rrrrr)rr r6s  z"AsyncSM.updateNetworkSmDevicesTagscs2dgdd}d|d|d}|j||IdHS)z **Unenroll a device** https://developer.cisco.com/meraki/api/#!unenroll-network-sm-device - networkId (string) - deviceId (string) r unenrollNetworkSmDevice)rrz /networks/z /sm/devices/z /unenrollN)rr)rr r)rrrrr r7s zAsyncSM.unenrollNetworkSmDevicecs,dgdd}d|d}|j||IdHS)z **List all the profiles in the network** https://developer.cisco.com/meraki/api/#!get-network-sm-profiles - networkId (string) r getNetworkSmProfiles)rrz /networks/z /sm/profilesN)rr)rr rrrrr r8s  zAsyncSM.getNetworkSmProfiles)r userIdcs2dgdd}d|d|d}|j||IdHS)z **Get the profiles associated with a user** https://developer.cisco.com/meraki/api/#!get-network-sm-user-device-profiles - networkId (string) - userId (string) r getNetworkSmUserDeviceProfiles)rrz /networks/z /sm/user/z/deviceProfilesN)rr)rr r9rrrrr r:s z&AsyncSM.getNetworkSmUserDeviceProfilescs2dgdd}d|d|d}|j||IdHS)z **Get a list of softwares associated with a user** https://developer.cisco.com/meraki/api/#!get-network-sm-user-softwares - networkId (string) - userId (string) r getNetworkSmUserSoftwares)rrz /networks/z /sm/user/z /softwaresN)rr)rr r9rrrrr r;s z!AsyncSM.getNetworkSmUserSoftwarescs\|tdgdd}d|d}dddd gfd d |D}|j|||Id HS) a **List the owners in an SM network with various specified fields and filters** https://developer.cisco.com/meraki/api/#!get-network-sm-users - networkId (string) - ids (string): Filter users by id(s). Multiple ids can be passed in as comma separated values. - usernames (string): Filter users by username(s). Multiple usernames can be passed in as comma separated values. - emails (string): Filter users by email(s). Multiple emails can be passed in as comma separated values. - scope (string): Specifiy a scope (one of all, none, withAny, withAll, withoutAny, withoutAll) and a set of tags as comma separated values. r getNetworkSmUsers)rrz /networks/z /sm/usersr Z usernamesZemailsr/cs&i|]\}}|kr||qSr)r)rrr)r0rr r;sz-AsyncSM.getNetworkSmUsers..N)r%rrrr)rr rrrr1r)r0r r<&s   zAsyncSM.getNetworkSmUserscs2dgdd}d|d|d}|j||IdHS)a **Return the client's daily cellular data usage history. Usage data is in kilobytes.** https://developer.cisco.com/meraki/api/#!get-network-sm-cellular-usage-history - networkId (string) - deviceId (string) r getNetworkSmCellularUsageHistory)rrz /networks/z/sm/z/cellularUsageHistoryN)rr)rr r)rrrrr r=?s z(AsyncSM.getNetworkSmCellularUsageHistorycs2dgdd}d|d|d}|j||IdHS)z **List the certs on a device** https://developer.cisco.com/meraki/api/#!get-network-sm-certs - networkId (string) - deviceId (string) r getNetworkSmCerts)rrz /networks/z/sm/z/certsN)rr)rr r)rrrrr r>Ps zAsyncSM.getNetworkSmCertscs2dgdd}d|d|d}|j||IdHS)z **Get the profiles associated with a device** https://developer.cisco.com/meraki/api/#!get-network-sm-device-profiles - networkId (string) - deviceId (string) r getNetworkSmDeviceProfiles)rrz /networks/z/sm/z/deviceProfilesN)rr)rr r)rrrrr r?as z"AsyncSM.getNetworkSmDeviceProfilescs2dgdd}d|d|d}|j||IdHS)z **List the network adapters of a device** https://developer.cisco.com/meraki/api/#!get-network-sm-network-adapters - networkId (string) - deviceId (string) r getNetworkSmNetworkAdapters)rrz /networks/z/sm/z/networkAdaptersN)rr)rr r)rrrrr r@rs z#AsyncSM.getNetworkSmNetworkAdapterscs2dgdd}d|d|d}|j||IdHS)z **List the restrictions on a device** https://developer.cisco.com/meraki/api/#!get-network-sm-restrictions - networkId (string) - deviceId (string) r getNetworkSmRestrictions)rrz /networks/z/sm/z /restrictionsN)rr)rr r)rrrrr rAs z AsyncSM.getNetworkSmRestrictionscs2dgdd}d|d|d}|j||IdHS)z **List the security centers on a device** https://developer.cisco.com/meraki/api/#!get-network-sm-security-centers - networkId (string) - deviceId (string) r getNetworkSmSecurityCenters)rrz /networks/z/sm/z/securityCentersN)rr)rr r)rrrrr rBs z#AsyncSM.getNetworkSmSecurityCenterscs2dgdd}d|d|d}|j||IdHS)z **Get a list of softwares associated with a device** https://developer.cisco.com/meraki/api/#!get-network-sm-softwares - networkId (string) - deviceId (string) r getNetworkSmSoftwares)rrz /networks/z/sm/z /softwaresN)rr)rr r)rrrrr rCs zAsyncSM.getNetworkSmSoftwarescs2dgdd}d|d|d}|j||IdHS)z **List the saved SSID names on a device** https://developer.cisco.com/meraki/api/#!get-network-sm-wlan-lists - networkId (string) - deviceId (string) r getNetworkSmWlanLists)rrz /networks/z/sm/z /wlanListsN)rr)rr r)rrrrr rDs zAsyncSM.getNetworkSmWlanLists) network_idcs^|tdgdd}d|d}dddd d gfd d |D}|j|||Id HS)ao **Lock a set of devices** https://developer.cisco.com/meraki/api/#!lock-network-sm-devices - network_id (string) - wifiMacs (string): The wifiMacs of the devices to be locked. - ids (string): The ids of the devices to be locked. - serials (string): The serials of the devices to be locked. - scope (string): The scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags of the devices to be wiped. - pin (integer): The pin number for locking macOS devices (a six digit number). Required only for macOS devices. r lockNetworkSmDevices)rrz /networks/z/sm/devices/lockr-r r.r/r(cs&i|]\}}|kr||qSr)r)rrr)rrr rsz0AsyncSM.lockNetworkSmDevices..N)r%rrrr&)rrErrrrr)rr rFs  zAsyncSM.lockNetworkSmDevicesnext)rEr#c sd|tdgdd}d|d|d}ddd gfd d |D}|j|||||Id HS) a **Returns historical connectivity data (whether a device is regularly checking in to Dashboard).** https://developer.cisco.com/meraki/api/#!get-network-sm-connectivity - network_id (string) - id (string) - total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. r getNetworkSmConnectivity)rrz /networks/z/sm/z /connectivityperPage startingAfter endingBeforecs&i|]\}}|kr||qSr)r)rrr)r0rr rsz4AsyncSM.getNetworkSmConnectivity..N)r%rrr get_pages) rrEr# total_pages directionrrrr1r)r0r rIs  z AsyncSM.getNetworkSmConnectivityc sd|tdgdd}d|d|d}ddd gfd d |D}|j|||||Id HS) a **Return historical records of various Systems Manager network connection details for desktop devices.** https://developer.cisco.com/meraki/api/#!get-network-sm-desktop-logs - network_id (string) - id (string) - total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. r getNetworkSmDesktopLogs)rrz /networks/z/sm/z /desktopLogsrJrKrLcs&i|]\}}|kr||qSr)r)rrr)r0rr rsz3AsyncSM.getNetworkSmDesktopLogs..N)r%rrrrM) rrEr#rNrOrrrr1r)r0r rPs  zAsyncSM.getNetworkSmDesktopLogsc sd|tdgdd}d|d|d}ddd gfd d |D}|j|||||Id HS) a ** Return historical records of commands sent to Systems Manager devices.

Note that this will include the name of the Dashboard user who initiated the command if it was generated by a Dashboard admin rather than the automatic behavior of the system; you may wish to filter this out of any reports.

** https://developer.cisco.com/meraki/api/#!get-network-sm-device-command-logs - network_id (string) - id (string) - total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. r getNetworkSmDeviceCommandLogs)rrz /networks/z/sm/z/deviceCommandLogsrJrKrLcs&i|]\}}|kr||qSr)r)rrr)r0rr r4sz9AsyncSM.getNetworkSmDeviceCommandLogs..N)r%rrrrM) rrEr#rNrOrrrr1r)r0r rQs  z%AsyncSM.getNetworkSmDeviceCommandLogsc sd|tdgdd}d|d|d}ddd gfd d |D}|j|||||Id HS) a **Return historical records of various Systems Manager client metrics for desktop devices.** https://developer.cisco.com/meraki/api/#!get-network-sm-performance-history - network_id (string) - id (string) - total_pages (integer or string): total number of pages to retrieve, -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. r getNetworkSmPerformanceHistory)rrz /networks/z/sm/z/performanceHistoryrJrKrLcs&i|]\}}|kr||qSr)r)rrr)r0rr rPsz:AsyncSM.getNetworkSmPerformanceHistory..N)r%rrrrM) rrEr#rNrOrrrr1r)r0r rR9s  z&AsyncSM.getNetworkSmPerformanceHistory)rGrH)rGrH)rGrH)rGrH)#__name__ __module__ __qualname__rstrlistr rdictr!r'r*r+r2r4r6r7r8r:r;r<r=r>r?r@rArBrCrDrFrIrPrQrR __classcell__rr)rr rs8 % rN)rrrrr