Skip to content

Commit

Permalink
Automated Protos Update (viamrobotics#576)
Browse files Browse the repository at this point in the history
Co-authored-by: viambot <[email protected]>
  • Loading branch information
github-actions[bot] and viambot authored Apr 9, 2024
1 parent e0cee7d commit 313ca7d
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 7 deletions.
14 changes: 12 additions & 2 deletions src/viam/gen/app/v1/end_user_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ async def IsLegalAccepted(self, stream: 'grpclib.server.Stream[app.v1.end_user_p
async def AcceptLegal(self, stream: 'grpclib.server.Stream[app.v1.end_user_pb2.AcceptLegalRequest, app.v1.end_user_pb2.AcceptLegalResponse]') -> None:
pass

@abc.abstractmethod
async def RegisterAuthApplication(self, stream: 'grpclib.server.Stream[app.v1.end_user_pb2.RegisterAuthApplicationRequest, app.v1.end_user_pb2.RegisterAuthApplicationResponse]') -> None:
pass

@abc.abstractmethod
async def UpdateAuthApplication(self, stream: 'grpclib.server.Stream[app.v1.end_user_pb2.UpdateAuthApplicationRequest, app.v1.end_user_pb2.UpdateAuthApplicationResponse]') -> None:
pass

def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
return {'/viam.app.v1.EndUserService/IsLegalAccepted': grpclib.const.Handler(self.IsLegalAccepted, grpclib.const.Cardinality.UNARY_UNARY, app.v1.end_user_pb2.IsLegalAcceptedRequest, app.v1.end_user_pb2.IsLegalAcceptedResponse), '/viam.app.v1.EndUserService/AcceptLegal': grpclib.const.Handler(self.AcceptLegal, grpclib.const.Cardinality.UNARY_UNARY, app.v1.end_user_pb2.AcceptLegalRequest, app.v1.end_user_pb2.AcceptLegalResponse)}
return {'/viam.app.v1.EndUserService/IsLegalAccepted': grpclib.const.Handler(self.IsLegalAccepted, grpclib.const.Cardinality.UNARY_UNARY, app.v1.end_user_pb2.IsLegalAcceptedRequest, app.v1.end_user_pb2.IsLegalAcceptedResponse), '/viam.app.v1.EndUserService/AcceptLegal': grpclib.const.Handler(self.AcceptLegal, grpclib.const.Cardinality.UNARY_UNARY, app.v1.end_user_pb2.AcceptLegalRequest, app.v1.end_user_pb2.AcceptLegalResponse), '/viam.app.v1.EndUserService/RegisterAuthApplication': grpclib.const.Handler(self.RegisterAuthApplication, grpclib.const.Cardinality.UNARY_UNARY, app.v1.end_user_pb2.RegisterAuthApplicationRequest, app.v1.end_user_pb2.RegisterAuthApplicationResponse), '/viam.app.v1.EndUserService/UpdateAuthApplication': grpclib.const.Handler(self.UpdateAuthApplication, grpclib.const.Cardinality.UNARY_UNARY, app.v1.end_user_pb2.UpdateAuthApplicationRequest, app.v1.end_user_pb2.UpdateAuthApplicationResponse)}

class EndUserServiceStub:

def __init__(self, channel: grpclib.client.Channel) -> None:
self.IsLegalAccepted = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.v1.EndUserService/IsLegalAccepted', app.v1.end_user_pb2.IsLegalAcceptedRequest, app.v1.end_user_pb2.IsLegalAcceptedResponse)
self.AcceptLegal = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.v1.EndUserService/AcceptLegal', app.v1.end_user_pb2.AcceptLegalRequest, app.v1.end_user_pb2.AcceptLegalResponse)
self.AcceptLegal = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.v1.EndUserService/AcceptLegal', app.v1.end_user_pb2.AcceptLegalRequest, app.v1.end_user_pb2.AcceptLegalResponse)
self.RegisterAuthApplication = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.v1.EndUserService/RegisterAuthApplication', app.v1.end_user_pb2.RegisterAuthApplicationRequest, app.v1.end_user_pb2.RegisterAuthApplicationResponse)
self.UpdateAuthApplication = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.v1.EndUserService/UpdateAuthApplication', app.v1.end_user_pb2.UpdateAuthApplicationRequest, app.v1.end_user_pb2.UpdateAuthApplicationResponse)
14 changes: 11 additions & 3 deletions src/viam/gen/app/v1/end_user_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15app/v1/end_user.proto\x12\x0bviam.app.v1"\x18\n\x16IsLegalAcceptedRequest"@\n\x17IsLegalAcceptedResponse\x12%\n\x0eaccepted_legal\x18\x01 \x01(\x08R\racceptedLegal"\x14\n\x12AcceptLegalRequest"\x15\n\x13AcceptLegalResponse2\xc0\x01\n\x0eEndUserService\x12\\\n\x0fIsLegalAccepted\x12#.viam.app.v1.IsLegalAcceptedRequest\x1a$.viam.app.v1.IsLegalAcceptedResponse\x12P\n\x0bAcceptLegal\x12\x1f.viam.app.v1.AcceptLegalRequest\x1a .viam.app.v1.AcceptLegalResponseB\x18Z\x16go.viam.com/api/app/v1b\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15app/v1/end_user.proto\x12\x0bviam.app.v1"\x18\n\x16IsLegalAcceptedRequest"@\n\x17IsLegalAcceptedResponse\x12%\n\x0eaccepted_legal\x18\x01 \x01(\x08R\racceptedLegal"\x14\n\x12AcceptLegalRequest"\x15\n\x13AcceptLegalResponse"\xc7\x01\n\x1eRegisterAuthApplicationRequest\x12)\n\x10application_name\x18\x01 \x01(\tR\x0fapplicationName\x12\x15\n\x06org_id\x18\x02 \x01(\tR\x05orgId\x12\x1f\n\x0borigin_uris\x18\x03 \x03(\tR\noriginUris\x12#\n\rredirect_uris\x18\x04 \x03(\tR\x0credirectUris\x12\x1d\n\nlogout_uri\x18\x05 \x01(\tR\tlogoutUri"\x8b\x01\n\x1fRegisterAuthApplicationResponse\x12%\n\x0eapplication_id\x18\x01 \x01(\tR\rapplicationId\x12)\n\x10application_name\x18\x02 \x01(\tR\x0fapplicationName\x12\x16\n\x06secret\x18\x03 \x01(\tR\x06secret"\xec\x01\n\x1cUpdateAuthApplicationRequest\x12\x15\n\x06org_id\x18\x01 \x01(\tR\x05orgId\x12%\n\x0eapplication_id\x18\x02 \x01(\tR\rapplicationId\x12)\n\x10application_name\x18\x03 \x01(\tR\x0fapplicationName\x12\x1f\n\x0borigin_uris\x18\x04 \x03(\tR\noriginUris\x12#\n\rredirect_uris\x18\x05 \x03(\tR\x0credirectUris\x12\x1d\n\nlogout_uri\x18\x06 \x01(\tR\tlogoutUri"q\n\x1dUpdateAuthApplicationResponse\x12%\n\x0eapplication_id\x18\x01 \x01(\tR\rapplicationId\x12)\n\x10application_name\x18\x02 \x01(\tR\x0fapplicationName2\xa6\x03\n\x0eEndUserService\x12\\\n\x0fIsLegalAccepted\x12#.viam.app.v1.IsLegalAcceptedRequest\x1a$.viam.app.v1.IsLegalAcceptedResponse\x12P\n\x0bAcceptLegal\x12\x1f.viam.app.v1.AcceptLegalRequest\x1a .viam.app.v1.AcceptLegalResponse\x12t\n\x17RegisterAuthApplication\x12+.viam.app.v1.RegisterAuthApplicationRequest\x1a,.viam.app.v1.RegisterAuthApplicationResponse\x12n\n\x15UpdateAuthApplication\x12).viam.app.v1.UpdateAuthApplicationRequest\x1a*.viam.app.v1.UpdateAuthApplicationResponseB\x18Z\x16go.viam.com/api/app/v1b\x06proto3')
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'app.v1.end_user_pb2', globals())
if _descriptor._USE_C_DESCRIPTORS == False:
Expand All @@ -18,5 +18,13 @@
_ACCEPTLEGALREQUEST._serialized_end = 150
_ACCEPTLEGALRESPONSE._serialized_start = 152
_ACCEPTLEGALRESPONSE._serialized_end = 173
_ENDUSERSERVICE._serialized_start = 176
_ENDUSERSERVICE._serialized_end = 368
_REGISTERAUTHAPPLICATIONREQUEST._serialized_start = 176
_REGISTERAUTHAPPLICATIONREQUEST._serialized_end = 375
_REGISTERAUTHAPPLICATIONRESPONSE._serialized_start = 378
_REGISTERAUTHAPPLICATIONRESPONSE._serialized_end = 517
_UPDATEAUTHAPPLICATIONREQUEST._serialized_start = 520
_UPDATEAUTHAPPLICATIONREQUEST._serialized_end = 756
_UPDATEAUTHAPPLICATIONRESPONSE._serialized_start = 758
_UPDATEAUTHAPPLICATIONRESPONSE._serialized_end = 871
_ENDUSERSERVICE._serialized_start = 874
_ENDUSERSERVICE._serialized_end = 1296
92 changes: 91 additions & 1 deletion src/viam/gen/app/v1/end_user_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import sys
if sys.version_info >= (3, 8):
Expand Down Expand Up @@ -48,4 +50,92 @@ class AcceptLegalResponse(google.protobuf.message.Message):

def __init__(self) -> None:
...
global___AcceptLegalResponse = AcceptLegalResponse
global___AcceptLegalResponse = AcceptLegalResponse

@typing_extensions.final
class RegisterAuthApplicationRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
APPLICATION_NAME_FIELD_NUMBER: builtins.int
ORG_ID_FIELD_NUMBER: builtins.int
ORIGIN_URIS_FIELD_NUMBER: builtins.int
REDIRECT_URIS_FIELD_NUMBER: builtins.int
LOGOUT_URI_FIELD_NUMBER: builtins.int
application_name: builtins.str
org_id: builtins.str

@property
def origin_uris(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
...

@property
def redirect_uris(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
...
logout_uri: builtins.str

def __init__(self, *, application_name: builtins.str=..., org_id: builtins.str=..., origin_uris: collections.abc.Iterable[builtins.str] | None=..., redirect_uris: collections.abc.Iterable[builtins.str] | None=..., logout_uri: builtins.str=...) -> None:
...

def ClearField(self, field_name: typing_extensions.Literal['application_name', b'application_name', 'logout_uri', b'logout_uri', 'org_id', b'org_id', 'origin_uris', b'origin_uris', 'redirect_uris', b'redirect_uris']) -> None:
...
global___RegisterAuthApplicationRequest = RegisterAuthApplicationRequest

@typing_extensions.final
class RegisterAuthApplicationResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
APPLICATION_ID_FIELD_NUMBER: builtins.int
APPLICATION_NAME_FIELD_NUMBER: builtins.int
SECRET_FIELD_NUMBER: builtins.int
application_id: builtins.str
application_name: builtins.str
secret: builtins.str

def __init__(self, *, application_id: builtins.str=..., application_name: builtins.str=..., secret: builtins.str=...) -> None:
...

def ClearField(self, field_name: typing_extensions.Literal['application_id', b'application_id', 'application_name', b'application_name', 'secret', b'secret']) -> None:
...
global___RegisterAuthApplicationResponse = RegisterAuthApplicationResponse

@typing_extensions.final
class UpdateAuthApplicationRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ORG_ID_FIELD_NUMBER: builtins.int
APPLICATION_ID_FIELD_NUMBER: builtins.int
APPLICATION_NAME_FIELD_NUMBER: builtins.int
ORIGIN_URIS_FIELD_NUMBER: builtins.int
REDIRECT_URIS_FIELD_NUMBER: builtins.int
LOGOUT_URI_FIELD_NUMBER: builtins.int
org_id: builtins.str
application_id: builtins.str
application_name: builtins.str

@property
def origin_uris(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
...

@property
def redirect_uris(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
...
logout_uri: builtins.str

def __init__(self, *, org_id: builtins.str=..., application_id: builtins.str=..., application_name: builtins.str=..., origin_uris: collections.abc.Iterable[builtins.str] | None=..., redirect_uris: collections.abc.Iterable[builtins.str] | None=..., logout_uri: builtins.str=...) -> None:
...

def ClearField(self, field_name: typing_extensions.Literal['application_id', b'application_id', 'application_name', b'application_name', 'logout_uri', b'logout_uri', 'org_id', b'org_id', 'origin_uris', b'origin_uris', 'redirect_uris', b'redirect_uris']) -> None:
...
global___UpdateAuthApplicationRequest = UpdateAuthApplicationRequest

@typing_extensions.final
class UpdateAuthApplicationResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
APPLICATION_ID_FIELD_NUMBER: builtins.int
APPLICATION_NAME_FIELD_NUMBER: builtins.int
application_id: builtins.str
application_name: builtins.str

def __init__(self, *, application_id: builtins.str=..., application_name: builtins.str=...) -> None:
...

def ClearField(self, field_name: typing_extensions.Literal['application_id', b'application_id', 'application_name', b'application_name']) -> None:
...
global___UpdateAuthApplicationResponse = UpdateAuthApplicationResponse
15 changes: 14 additions & 1 deletion src/viam/proto/app/end_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
Do not edit manually!
"""
from ...gen.app.v1.end_user_grpc import EndUserServiceBase, EndUserServiceStub
from ...gen.app.v1.end_user_pb2 import AcceptLegalRequest, AcceptLegalResponse, IsLegalAcceptedRequest, IsLegalAcceptedResponse
from ...gen.app.v1.end_user_pb2 import (
AcceptLegalRequest,
AcceptLegalResponse,
IsLegalAcceptedRequest,
IsLegalAcceptedResponse,
RegisterAuthApplicationRequest,
RegisterAuthApplicationResponse,
UpdateAuthApplicationRequest,
UpdateAuthApplicationResponse,
)

__all__ = [
"EndUserServiceBase",
Expand All @@ -12,4 +21,8 @@
"AcceptLegalResponse",
"IsLegalAcceptedRequest",
"IsLegalAcceptedResponse",
"RegisterAuthApplicationRequest",
"RegisterAuthApplicationResponse",
"UpdateAuthApplicationRequest",
"UpdateAuthApplicationResponse",
]

0 comments on commit 313ca7d

Please sign in to comment.