@@ -540,22 +540,19 @@ async def main():
540540 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/>`_.
541541 """
542542
543- def __init__ (self , channel : Channel , metadata : Mapping [str , str ], location_id : Optional [ str ] = None ):
543+ def __init__ (self , channel : Channel , metadata : Mapping [str , str ]):
544544 """Create an `AppClient` that maintains a connection to app.
545545
546546 Args:
547547 channel (grpclib.client.Channel): connection to app.
548548 metadata (Mapping[str, str]): Required authorization token to send requests to app.
549- location_id (Optional[str]): Default location ID.
550549 """
551550 self ._metadata = metadata
552551 self ._app_client = AppServiceStub (channel )
553- self ._location_id = location_id
554552 self ._channel = channel
555553
556554 _app_client : AppServiceStub
557555 _metadata : Mapping [str , str ]
558- _location_id : Optional [str ]
559556 _channel : Channel
560557 _organization_id : Optional [str ] = None
561558
@@ -1016,7 +1013,7 @@ async def get_location(self, location_id: Optional[str] = None) -> Location:
10161013
10171014 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#getlocation>`_.
10181015 """
1019- request = GetLocationRequest (location_id = location_id if location_id else self . _location_id if self . _location_id else "" )
1016+ request = GetLocationRequest (location_id = location_id if location_id else "" )
10201017 response : GetLocationResponse = await self ._app_client .GetLocation (request , metadata = self ._metadata )
10211018 return response .location
10221019
@@ -1155,7 +1152,7 @@ async def location_auth(self, location_id: Optional[str] = None) -> LocationAuth
11551152
11561153 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#locationauth>`_.
11571154 """
1158- request = LocationAuthRequest (location_id = location_id if location_id else self . _location_id if self . _location_id else "" )
1155+ request = LocationAuthRequest (location_id = location_id if location_id else "" )
11591156 response : LocationAuthResponse = await self ._app_client .LocationAuth (request , metadata = self ._metadata )
11601157 return response .auth
11611158
@@ -1179,7 +1176,7 @@ async def create_location_secret(self, location_id: Optional[str] = None) -> Loc
11791176
11801177 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#createlocationsecret>`_.
11811178 """
1182- request = CreateLocationSecretRequest (location_id = location_id if location_id else self . _location_id if self . _location_id else "" )
1179+ request = CreateLocationSecretRequest (location_id = location_id if location_id else "" )
11831180 response : CreateLocationSecretResponse = await self ._app_client .CreateLocationSecret (request , metadata = self ._metadata )
11841181 return response .auth
11851182
@@ -1204,7 +1201,7 @@ async def delete_location_secret(self, secret_id: str, location_id: Optional[str
12041201 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#deletelocationsecret>`_.
12051202 """
12061203 request = DeleteLocationSecretRequest (
1207- location_id = location_id if location_id else self . _location_id if self . _location_id else "" , secret_id = secret_id
1204+ location_id = location_id if location_id else "" , secret_id = secret_id
12081205 )
12091206 await self ._app_client .DeleteLocationSecret (request , metadata = self ._metadata )
12101207
@@ -1653,7 +1650,7 @@ async def list_robots(self, location_id: Optional[str] = None) -> List[Robot]:
16531650
16541651 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#listrobots>`_.
16551652 """
1656- request = ListRobotsRequest (location_id = location_id if location_id else self . _location_id if self . _location_id else "" )
1653+ request = ListRobotsRequest (location_id = location_id if location_id else "" )
16571654 response : ListRobotsResponse = await self ._app_client .ListRobots (request , metadata = self ._metadata )
16581655 return list (response .robots )
16591656
@@ -1677,7 +1674,7 @@ async def new_robot(self, name: str, location_id: Optional[str] = None) -> str:
16771674
16781675 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#newrobot>`_.
16791676 """
1680- request = NewRobotRequest (location = location_id if location_id else self . _location_id if self . _location_id else "" , name = name )
1677+ request = NewRobotRequest (location = location_id if location_id else "" , name = name )
16811678 response : NewRobotResponse = await self ._app_client .NewRobot (request , metadata = self ._metadata )
16821679 return response .id
16831680
@@ -1708,7 +1705,7 @@ async def update_robot(self, robot_id: str, name: str, location_id: Optional[str
17081705 For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#updaterobot>`_.
17091706 """
17101707 request = UpdateRobotRequest (
1711- id = robot_id , name = name , location = location_id if location_id else self . _location_id if self . _location_id else ""
1708+ id = robot_id , name = name , location = location_id if location_id else ""
17121709 )
17131710 response : UpdateRobotResponse = await self ._app_client .UpdateRobot (request , metadata = self ._metadata )
17141711 return response .robot
0 commit comments