B `@sGdddeZdS)csleZdZfddZedddZeeedddZeed d d Zeed d d Zeed ddZ Z S) Floorplanscstt|||_dS)N)superZ FloorPlans__init___session)selfsession) __class__s/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/api/floorplans.pyrszFloorplans.__init__) networkIdcCs&dgdd}d|d}|j||S)z **List the floor plans that belong to your network** https://developer.cisco.com/meraki/api/#!get-network-floor-plans - networkId (string) z Floor plansgetNetworkFloorPlans)tags operationz /networks/z /floorPlans)rget)rr metadataresourcerrr r s  zFloorplans.getNetworkFloorPlans)r name imageContentsc s\|tdgdd}d|d}dddd d d d gfd d|D}|j|||S)a **Upload a floor plan** https://developer.cisco.com/meraki/api/#!create-network-floor-plan - networkId (string) - name (string): The name of your floor plan. - imageContents (string): The file contents (a base 64 encoded string) of your image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in. - center (object): The longitude and latitude of the center of your floor plan. The 'center' or two adjacent corners (e.g. 'topLeftCorner' and 'bottomLeftCorner') must be specified. If 'center' is specified, the floor plan is placed over that point with no rotation. If two adjacent corners are specified, the floor plan is rotated to line up with the two specified points. The aspect ratio of the floor plan's image is preserved regardless of which corners/center are specified. (This means if that more than two corners are specified, only two corners may be used to preserve the floor plan's aspect ratio.). No two points can have the same latitude, longitude pair. - bottomLeftCorner (object): The longitude and latitude of the bottom left corner of your floor plan. - bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan. - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. z Floor planscreateNetworkFloorPlan)r r z /networks/z /floorPlansrcenterbottomLeftCornerbottomRightCorner topLeftCornertopRightCornerrcs&i|]\}}|kr||qSr)strip).0kv) body_paramsrr .sz5Floorplans.createNetworkFloorPlan..)updatelocalsitemsrpost)rr rrkwargsrrpayloadr)rr rs  z!Floorplans.createNetworkFloorPlan)r floorPlanIdcCs*dgdd}d|d|}|j||S)z **Find a floor plan by ID** https://developer.cisco.com/meraki/api/#!get-network-floor-plan - networkId (string) - floorPlanId (string) z Floor plansgetNetworkFloorPlan)r r z /networks/z /floorPlans/)rr)rr r%rrrrr r&2s zFloorplans.getNetworkFloorPlanc s`|tdgdd}d|d|}dddd d d d gfd d|D}|j|||S)am **Update a floor plan's geolocation and other meta data** https://developer.cisco.com/meraki/api/#!update-network-floor-plan - networkId (string) - floorPlanId (string) - name (string): The name of your floor plan. - center (object): The longitude and latitude of the center of your floor plan. If you want to change the geolocation data of your floor plan, either the 'center' or two adjacent corners (e.g. 'topLeftCorner' and 'bottomLeftCorner') must be specified. If 'center' is specified, the floor plan is placed over that point with no rotation. If two adjacent corners are specified, the floor plan is rotated to line up with the two specified points. The aspect ratio of the floor plan's image is preserved regardless of which corners/center are specified. (This means if that more than two corners are specified, only two corners may be used to preserve the floor plan's aspect ratio.). No two points can have the same latitude, longitude pair. - bottomLeftCorner (object): The longitude and latitude of the bottom left corner of your floor plan. - bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan. - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - imageContents (string): The file contents (a base 64 encoded string) of your new image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in. If you upload a new image, and you do NOT specify any new geolocation fields ('center, 'topLeftCorner', etc), the floor plan will be recentered with no rotation in order to maintain the aspect ratio of your new image. z Floor plansupdateNetworkFloorPlan)r r z /networks/z /floorPlans/rrrrrrrcs&i|]\}}|kr||qSr)r)rrr)rrr r\sz5Floorplans.updateNetworkFloorPlan..)rr r!rput)rr r%r#rrr$r)rr r'Cs z!Floorplans.updateNetworkFloorPlancCs*dgdd}d|d|}|j||S)z **Destroy a floor plan** https://developer.cisco.com/meraki/api/#!delete-network-floor-plan - networkId (string) - floorPlanId (string) z Floor plansdeleteNetworkFloorPlan)r r z /networks/z /floorPlans/)rdelete)rr r%rrrrr r)`s z!Floorplans.deleteNetworkFloorPlan) __name__ __module__ __qualname__rstrr rr&r'r) __classcell__rr)rr rs  rN)objectrrrrr