|
54 | 54 | GetFragmentResponse,
|
55 | 55 | GetLocationRequest,
|
56 | 56 | GetLocationResponse,
|
| 57 | + GetLocationMetadataRequest, |
| 58 | + GetLocationMetadataResponse, |
57 | 59 | GetModuleRequest,
|
58 | 60 | GetModuleResponse,
|
59 | 61 | GetOrganizationNamespaceAvailabilityRequest,
|
60 | 62 | GetOrganizationNamespaceAvailabilityResponse,
|
61 | 63 | GetOrganizationRequest,
|
62 | 64 | GetOrganizationResponse,
|
| 65 | + GetOrganizationMetadataRequest, |
| 66 | + GetOrganizationMetadataResponse, |
63 | 67 | GetOrganizationsWithAccessToLocationRequest,
|
64 | 68 | GetOrganizationsWithAccessToLocationResponse,
|
65 | 69 | GetRegistryItemRequest,
|
|
70 | 74 | GetRobotPartHistoryResponse,
|
71 | 75 | GetRobotPartLogsRequest,
|
72 | 76 | GetRobotPartLogsResponse,
|
| 77 | + GetRobotPartMetadataRequest, |
| 78 | + GetRobotPartMetadataResponse, |
73 | 79 | GetRobotPartRequest,
|
74 | 80 | GetRobotPartResponse,
|
75 | 81 | GetRobotPartsRequest,
|
76 | 82 | GetRobotPartsResponse,
|
77 | 83 | GetRobotRequest,
|
78 | 84 | GetRobotResponse,
|
| 85 | + GetRobotMetadataRequest, |
| 86 | + GetRobotMetadataResponse, |
79 | 87 | GetRoverRentalRobotsRequest,
|
80 | 88 | GetRoverRentalRobotsResponse,
|
81 | 89 | GetUserIDByEmailRequest,
|
|
134 | 142 | UnshareLocationRequest,
|
135 | 143 | UpdateFragmentRequest,
|
136 | 144 | UpdateFragmentResponse,
|
| 145 | + UpdateLocationMetadataRequest, |
| 146 | + UpdateLocationMetadataResponse, |
137 | 147 | UpdateLocationRequest,
|
138 | 148 | UpdateLocationResponse,
|
139 | 149 | UpdateModuleRequest,
|
140 | 150 | UpdateModuleResponse,
|
141 | 151 | UpdateOrganizationInviteAuthorizationsRequest,
|
142 | 152 | UpdateOrganizationInviteAuthorizationsResponse,
|
| 153 | + UpdateOrganizationMetadataRequest, |
| 154 | + UpdateOrganizationMetadataResponse, |
143 | 155 | UpdateOrganizationRequest,
|
144 | 156 | UpdateOrganizationResponse,
|
145 | 157 | UpdateRegistryItemRequest,
|
| 158 | + UpdateRobotMetadataRequest, |
| 159 | + UpdateRobotMetadataResponse, |
| 160 | + UpdateRobotPartMetadataRequest, |
| 161 | + UpdateRobotPartMetadataResponse, |
146 | 162 | UpdateRobotPartRequest,
|
147 | 163 | UpdateRobotPartResponse,
|
148 | 164 | UpdateRobotRequest,
|
@@ -2523,3 +2539,135 @@ async def rotate_key(self, id: str) -> Tuple[str, str]:
|
2523 | 2539 | request = RotateKeyRequest(id=id)
|
2524 | 2540 | response: RotateKeyResponse = await self._app_client.RotateKey(request, metadata=self._metadata)
|
2525 | 2541 | return response.key, response.id
|
| 2542 | + |
| 2543 | + async def get_organization_metadata(self, org_id: str) -> Mapping[str, Any]: |
| 2544 | + """Get an organization's user-defined metadata. |
| 2545 | +
|
| 2546 | + :: |
| 2547 | +
|
| 2548 | + metadata = await cloud.get_organization_metadata(org_id="<YOUR-ORG-ID>") |
| 2549 | +
|
| 2550 | + Args: |
| 2551 | + org_id (str): The ID of the organization with which the user-defined metadata is associated. |
| 2552 | + You can obtain your organization ID from the Viam app's organization settings page. |
| 2553 | +
|
| 2554 | + Returns: |
| 2555 | + Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary |
| 2556 | + """ |
| 2557 | + request = GetOrganizationMetadataRequest(organization_id=org_id) |
| 2558 | + response: GetOrganizationMetadataResponse = await self._app_client.GetOrganizationMetadata(request) |
| 2559 | + return struct_to_dict(response.data) |
| 2560 | + |
| 2561 | + async def update_organization_metadata(self, org_id: str, metadata: Mapping[str, Any]) -> None: |
| 2562 | + """Update an organization's user-defined metadata. |
| 2563 | +
|
| 2564 | + :: |
| 2565 | +
|
| 2566 | + await cloud.update_organization_metadata(org_id="<YOUR-ORG-ID>", metadata=) |
| 2567 | +
|
| 2568 | + Args: |
| 2569 | + organization_id (str): The ID of the organization with which to associate the user-defined metadata. |
| 2570 | + You can obtain your organization ID from the Viam app's organization settings page. |
| 2571 | + metadata (Mapping[str, Any]): The user-defined metadata to upload as a Python dictionary. |
| 2572 | + """ |
| 2573 | + request = UpdateOrganizationMetadataRequest(organization_id=org_id, data=dict_to_struct(metadata)) |
| 2574 | + _: UpdateOrganizationMetadataResponse = await self._app_client.UpdateOrganizationMetadata(request) |
| 2575 | + |
| 2576 | + async def get_location_metadata(self, location_id: str) -> Mapping[str, Any]: |
| 2577 | + """Get a location's user-defined metadata. |
| 2578 | +
|
| 2579 | + :: |
| 2580 | +
|
| 2581 | + metadata = await cloud.get_location_metadata(location_id="<YOUR-LOCATION-ID>") |
| 2582 | +
|
| 2583 | + Args: |
| 2584 | + location_id (str): The ID of the location with which the user-defined metadata is associated. |
| 2585 | + You can obtain your location ID from the Viam app's locations page. |
| 2586 | +
|
| 2587 | + Returns: |
| 2588 | + Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary. |
| 2589 | + """ |
| 2590 | + request = GetLocationMetadataRequest(location_id=location_id) |
| 2591 | + response: GetLocationMetadataResponse = await self._app_client.GetLocationMetadata(request) |
| 2592 | + return struct_to_dict(response.data) |
| 2593 | + |
| 2594 | + async def update_location_metadata(self, location_id: str, metadata: Mapping[str, Any]) -> None: |
| 2595 | + """Update a location's user-defined metadata. |
| 2596 | +
|
| 2597 | + :: |
| 2598 | +
|
| 2599 | + await cloud.update_location_metadata(location_id="<YOUR-LOCATION-ID>", metadata=) |
| 2600 | +
|
| 2601 | + Args: |
| 2602 | + location_id (str): The ID of the location with which to associate the user-defined metadata. |
| 2603 | + You can obtain your location ID from the Viam app's locations page. |
| 2604 | + metadata (Mapping[str, Any]): The user-defined metadata converted from JSON to a Python dictionary. |
| 2605 | + """ |
| 2606 | + request = UpdateLocationMetadataRequest(location_id=location_id, data=dict_to_struct(metadata)) |
| 2607 | + _: UpdateLocationMetadataResponse = await self._app_client.UpdateLocationMetadata(request) |
| 2608 | + |
| 2609 | + async def get_robot_metadata(self, robot_id: str) -> Mapping[str, Any]: |
| 2610 | + """Get a robot's user-defined metadata. |
| 2611 | +
|
| 2612 | + :: |
| 2613 | +
|
| 2614 | + metadata = await cloud.get_robot_metadata(robot_id="<YOUR-ROBOT-ID>") |
| 2615 | +
|
| 2616 | + Args: |
| 2617 | + robot_id (str): The ID of the robot with which the user-defined metadata is associated. |
| 2618 | + You can obtain your robot ID from the Viam app's machine page. |
| 2619 | +
|
| 2620 | + Returns: |
| 2621 | + Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary. |
| 2622 | + """ |
| 2623 | + request = GetRobotMetadataRequest(id=robot_id) |
| 2624 | + response: GetRobotMetadataResponse = await self._app_client.GetRobotMetadata(request) |
| 2625 | + return struct_to_dict(response.data) |
| 2626 | + |
| 2627 | + async def update_robot_metadata(self, robot_id: str, metadata: Mapping[str, Any]) -> None: |
| 2628 | + """Update a robot's user-defined metadata. |
| 2629 | +
|
| 2630 | + :: |
| 2631 | +
|
| 2632 | + await cloud.update_robot_metadata(robot_id="<YOUR-ROBOT-ID>", metadata=) |
| 2633 | +
|
| 2634 | + Args: |
| 2635 | + robot_id (str): The ID of the robot with which to associate the user-defined metadata. |
| 2636 | + You can obtain your robot ID from the Viam app's machine page. |
| 2637 | + metadata (Mapping[str, Any]): The user-defined metadata converted from JSON to a Python dictionary. |
| 2638 | + """ |
| 2639 | + request = UpdateRobotMetadataRequest(id=robot_id, data=dict_to_struct(metadata)) |
| 2640 | + _: UpdateRobotMetadataResponse = await self._app_client.UpdateRobotMetadata(request) |
| 2641 | + |
| 2642 | + async def get_robot_part_metadata(self, robot_part_id: str) -> Mapping[str, Any]: |
| 2643 | + """Get a robot part's user-defined metadata. |
| 2644 | +
|
| 2645 | + :: |
| 2646 | +
|
| 2647 | + metadata = await cloud.get_robot_part_metadata(robot_part_id="<YOUR-ROBOT-PART-ID>") |
| 2648 | +
|
| 2649 | + Args: |
| 2650 | + robot_part_id (str): The ID of the robot part with which the user-defined metadata is associated. |
| 2651 | + You can obtain your robot part ID from the Viam app's machine page. |
| 2652 | +
|
| 2653 | + Returns: |
| 2654 | + Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary. |
| 2655 | + """ |
| 2656 | + request = GetRobotPartMetadataRequest(id=robot_part_id) |
| 2657 | + response: GetRobotPartMetadataResponse = await self._app_client.GetRobotPartMetadata(request) |
| 2658 | + return struct_to_dict(response.data) |
| 2659 | + |
| 2660 | + async def update_robot_part_metadata(self, robot_part_id: str, metadata: Mapping[str, Any]) -> None: |
| 2661 | + """Update a robot part's user-defined metadata. |
| 2662 | +
|
| 2663 | + :: |
| 2664 | +
|
| 2665 | + await cloud.update_robot_part_metadata(robot_part_id="<YOUR-ROBOT-PART-ID>", metadata=) |
| 2666 | +
|
| 2667 | + Args: |
| 2668 | + robot_id (str): The ID of the robot part with which to associate the user-defined metadata. |
| 2669 | + You can obtain your robot part ID from the Viam app's machine page. |
| 2670 | + metadata (Mapping[str, Any]): The user-defined metadata converted from JSON to a Python dictionary. |
| 2671 | + """ |
| 2672 | + request = UpdateRobotPartMetadataRequest(id=robot_part_id, data=dict_to_struct(metadata)) |
| 2673 | + _: UpdateRobotPartMetadataResponse = await self._app_client.UpdateRobotPartMetadata(request) |
0 commit comments