Skip to content

Commit a68b433

Browse files
authored
[WORKFLOW] Updating protos from viamrobotics/api, commit: 33b13b4a3e4762e20c3d9caf6db4efdd1652869b
1 parent 096a508 commit a68b433

File tree

12 files changed

+182
-117
lines changed

12 files changed

+182
-117
lines changed

src/viam/components/switch/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
__all__ = ["Switch"]
99

10-
Registry.register_api(
11-
ResourceRegistration(
12-
Switch, SwitchRPCService, lambda name, channel: SwitchClient(name, channel)
13-
)
14-
)
10+
Registry.register_api(ResourceRegistration(Switch, SwitchRPCService, lambda name, channel: SwitchClient(name, channel)))

src/viam/components/switch/client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
from grpclib.client import Channel
44

5-
from viam.proto.common import (
6-
DoCommandRequest,
7-
DoCommandResponse,
8-
)
9-
from viam.proto.component.switch import SwitchServiceStub
105
from viam.gen.component.switch.v1.switch_pb2 import (
6+
GetNumberOfPositionsRequest,
7+
GetNumberOfPositionsResponse,
118
GetPositionRequest,
129
GetPositionResponse,
1310
SetPositionRequest,
14-
GetNumberOfPositionsRequest,
15-
GetNumberOfPositionsResponse,
1611
)
12+
from viam.proto.common import (
13+
DoCommandRequest,
14+
DoCommandResponse,
15+
)
16+
from viam.proto.component.switch import SwitchServiceStub
1717
from viam.resource.rpc_client_base import ReconfigurableResourceRPCClientBase
1818
from viam.utils import (
1919
ValueTypes,

src/viam/components/switch/service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
from grpclib.server import Stream
22

3-
from viam.proto.common import (
4-
DoCommandRequest,
5-
DoCommandResponse,
6-
)
73
from viam.gen.component.switch.v1.switch_pb2 import (
4+
GetNumberOfPositionsRequest,
5+
GetNumberOfPositionsResponse,
86
GetPositionRequest,
97
GetPositionResponse,
108
SetPositionRequest,
119
SetPositionResponse,
12-
GetNumberOfPositionsRequest,
13-
GetNumberOfPositionsResponse,
10+
)
11+
from viam.proto.common import (
12+
DoCommandRequest,
13+
DoCommandResponse,
1414
)
1515
from viam.proto.component.switch import SwitchServiceBase
1616
from viam.resource.rpc_service_base import ResourceRPCServiceBase

src/viam/components/switch/switch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import abc
22
from typing import Any, Final, Mapping, Optional
33

4-
from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT
54
from viam.components.component_base import ComponentBase
5+
from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT
66

77

88
class Switch(ComponentBase):

src/viam/gen/app/v1/app_grpc.py

Lines changed: 10 additions & 2 deletions
Large diffs are not rendered by default.

src/viam/gen/app/v1/app_pb2.py

Lines changed: 63 additions & 59 deletions
Large diffs are not rendered by default.

src/viam/gen/app/v1/app_pb2.pyi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,6 +4550,34 @@ class CreateKeyFromExistingKeyAuthorizationsResponse(google.protobuf.message.Mes
45504550
...
45514551
global___CreateKeyFromExistingKeyAuthorizationsResponse = CreateKeyFromExistingKeyAuthorizationsResponse
45524552

4553+
@typing.final
4554+
class GetAppContentRequest(google.protobuf.message.Message):
4555+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
4556+
PUBLIC_NAMESPACE_FIELD_NUMBER: builtins.int
4557+
NAME_FIELD_NUMBER: builtins.int
4558+
public_namespace: builtins.str
4559+
name: builtins.str
4560+
4561+
def __init__(self, *, public_namespace: builtins.str=..., name: builtins.str=...) -> None:
4562+
...
4563+
4564+
def ClearField(self, field_name: typing.Literal['name', b'name', 'public_namespace', b'public_namespace']) -> None:
4565+
...
4566+
global___GetAppContentRequest = GetAppContentRequest
4567+
4568+
@typing.final
4569+
class GetAppContentResponse(google.protobuf.message.Message):
4570+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
4571+
URL_FIELD_NUMBER: builtins.int
4572+
url: builtins.str
4573+
4574+
def __init__(self, *, url: builtins.str=...) -> None:
4575+
...
4576+
4577+
def ClearField(self, field_name: typing.Literal['url', b'url']) -> None:
4578+
...
4579+
global___GetAppContentResponse = GetAppContentResponse
4580+
45534581
@typing.final
45544582
class OrganizationSetLogoRequest(google.protobuf.message.Message):
45554583
DESCRIPTOR: google.protobuf.descriptor.Descriptor

src/viam/gen/service/vision/v1/vision_pb2.py

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

src/viam/gen/service/vision/v1/vision_pb2.pyi

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class Detection(google.protobuf.message.Message):
113113
Y_MAX_FIELD_NUMBER: builtins.int
114114
CONFIDENCE_FIELD_NUMBER: builtins.int
115115
CLASS_NAME_FIELD_NUMBER: builtins.int
116+
X_MIN_NORMALIZED_FIELD_NUMBER: builtins.int
117+
Y_MIN_NORMALIZED_FIELD_NUMBER: builtins.int
118+
X_MAX_NORMALIZED_FIELD_NUMBER: builtins.int
119+
Y_MAX_NORMALIZED_FIELD_NUMBER: builtins.int
116120
x_min: builtins.int
117121
'the four corners of the box'
118122
y_min: builtins.int
@@ -122,31 +126,52 @@ class Detection(google.protobuf.message.Message):
122126
'the confidence of the detection'
123127
class_name: builtins.str
124128
'label associated with the detected object'
129+
x_min_normalized: builtins.float
130+
'the four corners of the box, in proportion to the respective image dimension'
131+
y_min_normalized: builtins.float
132+
x_max_normalized: builtins.float
133+
y_max_normalized: builtins.float
125134

126-
def __init__(self, *, x_min: builtins.int | None=..., y_min: builtins.int | None=..., x_max: builtins.int | None=..., y_max: builtins.int | None=..., confidence: builtins.float=..., class_name: builtins.str=...) -> None:
135+
def __init__(self, *, x_min: builtins.int | None=..., y_min: builtins.int | None=..., x_max: builtins.int | None=..., y_max: builtins.int | None=..., confidence: builtins.float=..., class_name: builtins.str=..., x_min_normalized: builtins.float | None=..., y_min_normalized: builtins.float | None=..., x_max_normalized: builtins.float | None=..., y_max_normalized: builtins.float | None=...) -> None:
127136
...
128137

129-
def HasField(self, field_name: typing.Literal['_x_max', b'_x_max', '_x_min', b'_x_min', '_y_max', b'_y_max', '_y_min', b'_y_min', 'x_max', b'x_max', 'x_min', b'x_min', 'y_max', b'y_max', 'y_min', b'y_min']) -> builtins.bool:
138+
def HasField(self, field_name: typing.Literal['_x_max', b'_x_max', '_x_max_normalized', b'_x_max_normalized', '_x_min', b'_x_min', '_x_min_normalized', b'_x_min_normalized', '_y_max', b'_y_max', '_y_max_normalized', b'_y_max_normalized', '_y_min', b'_y_min', '_y_min_normalized', b'_y_min_normalized', 'x_max', b'x_max', 'x_max_normalized', b'x_max_normalized', 'x_min', b'x_min', 'x_min_normalized', b'x_min_normalized', 'y_max', b'y_max', 'y_max_normalized', b'y_max_normalized', 'y_min', b'y_min', 'y_min_normalized', b'y_min_normalized']) -> builtins.bool:
130139
...
131140

132-
def ClearField(self, field_name: typing.Literal['_x_max', b'_x_max', '_x_min', b'_x_min', '_y_max', b'_y_max', '_y_min', b'_y_min', 'class_name', b'class_name', 'confidence', b'confidence', 'x_max', b'x_max', 'x_min', b'x_min', 'y_max', b'y_max', 'y_min', b'y_min']) -> None:
141+
def ClearField(self, field_name: typing.Literal['_x_max', b'_x_max', '_x_max_normalized', b'_x_max_normalized', '_x_min', b'_x_min', '_x_min_normalized', b'_x_min_normalized', '_y_max', b'_y_max', '_y_max_normalized', b'_y_max_normalized', '_y_min', b'_y_min', '_y_min_normalized', b'_y_min_normalized', 'class_name', b'class_name', 'confidence', b'confidence', 'x_max', b'x_max', 'x_max_normalized', b'x_max_normalized', 'x_min', b'x_min', 'x_min_normalized', b'x_min_normalized', 'y_max', b'y_max', 'y_max_normalized', b'y_max_normalized', 'y_min', b'y_min', 'y_min_normalized', b'y_min_normalized']) -> None:
133142
...
134143

135144
@typing.overload
136145
def WhichOneof(self, oneof_group: typing.Literal['_x_max', b'_x_max']) -> typing.Literal['x_max'] | None:
137146
...
138147

148+
@typing.overload
149+
def WhichOneof(self, oneof_group: typing.Literal['_x_max_normalized', b'_x_max_normalized']) -> typing.Literal['x_max_normalized'] | None:
150+
...
151+
139152
@typing.overload
140153
def WhichOneof(self, oneof_group: typing.Literal['_x_min', b'_x_min']) -> typing.Literal['x_min'] | None:
141154
...
142155

156+
@typing.overload
157+
def WhichOneof(self, oneof_group: typing.Literal['_x_min_normalized', b'_x_min_normalized']) -> typing.Literal['x_min_normalized'] | None:
158+
...
159+
143160
@typing.overload
144161
def WhichOneof(self, oneof_group: typing.Literal['_y_max', b'_y_max']) -> typing.Literal['y_max'] | None:
145162
...
146163

164+
@typing.overload
165+
def WhichOneof(self, oneof_group: typing.Literal['_y_max_normalized', b'_y_max_normalized']) -> typing.Literal['y_max_normalized'] | None:
166+
...
167+
147168
@typing.overload
148169
def WhichOneof(self, oneof_group: typing.Literal['_y_min', b'_y_min']) -> typing.Literal['y_min'] | None:
149170
...
171+
172+
@typing.overload
173+
def WhichOneof(self, oneof_group: typing.Literal['_y_min_normalized', b'_y_min_normalized']) -> typing.Literal['y_min_normalized'] | None:
174+
...
150175
global___Detection = Detection
151176

152177
@typing.final

src/viam/proto/app/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
FragmentTag,
8888
FragmentUsage,
8989
FragmentVisibility,
90+
GetAppContentRequest,
91+
GetAppContentResponse,
9092
GetBillingServiceConfigRequest,
9193
GetBillingServiceConfigResponse,
9294
GetFragmentHistoryRequest,
@@ -345,6 +347,8 @@
345347
"FragmentTag",
346348
"FragmentUsage",
347349
"FragmentVisibility",
350+
"GetAppContentRequest",
351+
"GetAppContentResponse",
348352
"GetBillingServiceConfigRequest",
349353
"GetBillingServiceConfigResponse",
350354
"GetFragmentHistoryRequest",

0 commit comments

Comments
 (0)