diff options
author | Raoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk> | 2019-06-19 17:10:40 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-08 10:40:28 +0000 |
commit | 6b6e04ddb1c03f683e3e5591f057207d1303e6b6 (patch) | |
tree | 85f433362aa73ceeb62e07eb060af52a2407219b | |
parent | c20eac1e7ac80e1dc36b23b04affacfbe2cca338 (diff) | |
download | buildstream-6b6e04ddb1c03f683e3e5591f057207d1303e6b6.tar.gz |
protos: Update generated grpc files
Part of #1038
-rw-r--r-- | src/buildstream/_protos/buildstream/v2/source_pb2.py | 214 | ||||
-rw-r--r-- | src/buildstream/_protos/buildstream/v2/source_pb2_grpc.py | 70 |
2 files changed, 284 insertions, 0 deletions
diff --git a/src/buildstream/_protos/buildstream/v2/source_pb2.py b/src/buildstream/_protos/buildstream/v2/source_pb2.py new file mode 100644 index 000000000..c91dee0e9 --- /dev/null +++ b/src/buildstream/_protos/buildstream/v2/source_pb2.py @@ -0,0 +1,214 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: buildstream/v2/source.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2 +from buildstream._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='buildstream/v2/source.proto', + package='buildstream.v2', + syntax='proto3', + serialized_options=None, + serialized_pb=_b('\n\x1b\x62uildstream/v2/source.proto\x12\x0e\x62uildstream.v2\x1a\x36\x62uild/bazel/remote/execution/v2/remote_execution.proto\x1a\x1cgoogle/api/annotations.proto\"Q\n\x06Source\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x36\n\x05\x66iles\x18\x02 \x01(\x0b\x32\'.build.bazel.remote.execution.v2.Digest\"<\n\x10GetSourceRequest\x12\x15\n\rinstance_name\x18\x01 \x01(\t\x12\x11\n\tcache_key\x18\x02 \x01(\t\"g\n\x13UpdateSourceRequest\x12\x15\n\rinstance_name\x18\x01 \x01(\t\x12\x11\n\tcache_key\x18\x02 \x01(\t\x12&\n\x06source\x18\x03 \x01(\x0b\x32\x16.buildstream.v2.Source2\xa7\x01\n\rSourceService\x12G\n\tGetSource\x12 .buildstream.v2.GetSourceRequest\x1a\x16.buildstream.v2.Source\"\x00\x12M\n\x0cUpdateSource\x12#.buildstream.v2.UpdateSourceRequest\x1a\x16.buildstream.v2.Source\"\x00\x62\x06proto3') + , + dependencies=[build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) + + + + +_SOURCE = _descriptor.Descriptor( + name='Source', + full_name='buildstream.v2.Source', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='version', full_name='buildstream.v2.Source.version', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='files', full_name='buildstream.v2.Source.files', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=133, + serialized_end=214, +) + + +_GETSOURCEREQUEST = _descriptor.Descriptor( + name='GetSourceRequest', + full_name='buildstream.v2.GetSourceRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='instance_name', full_name='buildstream.v2.GetSourceRequest.instance_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='cache_key', full_name='buildstream.v2.GetSourceRequest.cache_key', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=216, + serialized_end=276, +) + + +_UPDATESOURCEREQUEST = _descriptor.Descriptor( + name='UpdateSourceRequest', + full_name='buildstream.v2.UpdateSourceRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='instance_name', full_name='buildstream.v2.UpdateSourceRequest.instance_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='cache_key', full_name='buildstream.v2.UpdateSourceRequest.cache_key', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='source', full_name='buildstream.v2.UpdateSourceRequest.source', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=278, + serialized_end=381, +) + +_SOURCE.fields_by_name['files'].message_type = build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2._DIGEST +_UPDATESOURCEREQUEST.fields_by_name['source'].message_type = _SOURCE +DESCRIPTOR.message_types_by_name['Source'] = _SOURCE +DESCRIPTOR.message_types_by_name['GetSourceRequest'] = _GETSOURCEREQUEST +DESCRIPTOR.message_types_by_name['UpdateSourceRequest'] = _UPDATESOURCEREQUEST +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Source = _reflection.GeneratedProtocolMessageType('Source', (_message.Message,), dict( + DESCRIPTOR = _SOURCE, + __module__ = 'buildstream.v2.source_pb2' + # @@protoc_insertion_point(class_scope:buildstream.v2.Source) + )) +_sym_db.RegisterMessage(Source) + +GetSourceRequest = _reflection.GeneratedProtocolMessageType('GetSourceRequest', (_message.Message,), dict( + DESCRIPTOR = _GETSOURCEREQUEST, + __module__ = 'buildstream.v2.source_pb2' + # @@protoc_insertion_point(class_scope:buildstream.v2.GetSourceRequest) + )) +_sym_db.RegisterMessage(GetSourceRequest) + +UpdateSourceRequest = _reflection.GeneratedProtocolMessageType('UpdateSourceRequest', (_message.Message,), dict( + DESCRIPTOR = _UPDATESOURCEREQUEST, + __module__ = 'buildstream.v2.source_pb2' + # @@protoc_insertion_point(class_scope:buildstream.v2.UpdateSourceRequest) + )) +_sym_db.RegisterMessage(UpdateSourceRequest) + + + +_SOURCESERVICE = _descriptor.ServiceDescriptor( + name='SourceService', + full_name='buildstream.v2.SourceService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + serialized_start=384, + serialized_end=551, + methods=[ + _descriptor.MethodDescriptor( + name='GetSource', + full_name='buildstream.v2.SourceService.GetSource', + index=0, + containing_service=None, + input_type=_GETSOURCEREQUEST, + output_type=_SOURCE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name='UpdateSource', + full_name='buildstream.v2.SourceService.UpdateSource', + index=1, + containing_service=None, + input_type=_UPDATESOURCEREQUEST, + output_type=_SOURCE, + serialized_options=None, + ), +]) +_sym_db.RegisterServiceDescriptor(_SOURCESERVICE) + +DESCRIPTOR.services_by_name['SourceService'] = _SOURCESERVICE + +# @@protoc_insertion_point(module_scope) diff --git a/src/buildstream/_protos/buildstream/v2/source_pb2_grpc.py b/src/buildstream/_protos/buildstream/v2/source_pb2_grpc.py new file mode 100644 index 000000000..ecf734afb --- /dev/null +++ b/src/buildstream/_protos/buildstream/v2/source_pb2_grpc.py @@ -0,0 +1,70 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +from buildstream._protos.buildstream.v2 import source_pb2 as buildstream_dot_v2_dot_source__pb2 + + +class SourceServiceStub(object): + # missing associated documentation comment in .proto file + pass + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetSource = channel.unary_unary( + '/buildstream.v2.SourceService/GetSource', + request_serializer=buildstream_dot_v2_dot_source__pb2.GetSourceRequest.SerializeToString, + response_deserializer=buildstream_dot_v2_dot_source__pb2.Source.FromString, + ) + self.UpdateSource = channel.unary_unary( + '/buildstream.v2.SourceService/UpdateSource', + request_serializer=buildstream_dot_v2_dot_source__pb2.UpdateSourceRequest.SerializeToString, + response_deserializer=buildstream_dot_v2_dot_source__pb2.Source.FromString, + ) + + +class SourceServiceServicer(object): + # missing associated documentation comment in .proto file + pass + + def GetSource(self, request, context): + """Retrieve a source message given a reference name from the service + + Errors: + * `NOT_FOUND`: The requested reference is not in the cache. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateSource(self, request, context): + """Sets a source message on the service + + Errors: + * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the + entry to the cache. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SourceServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetSource': grpc.unary_unary_rpc_method_handler( + servicer.GetSource, + request_deserializer=buildstream_dot_v2_dot_source__pb2.GetSourceRequest.FromString, + response_serializer=buildstream_dot_v2_dot_source__pb2.Source.SerializeToString, + ), + 'UpdateSource': grpc.unary_unary_rpc_method_handler( + servicer.UpdateSource, + request_deserializer=buildstream_dot_v2_dot_source__pb2.UpdateSourceRequest.FromString, + response_serializer=buildstream_dot_v2_dot_source__pb2.Source.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'buildstream.v2.SourceService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) |