Skip to content

Commit

Permalink
updated stan files to support newer version of protobuf
Browse files Browse the repository at this point in the history
Signed-off-by: Cagri Yonca <cagri@ibm.com>
  • Loading branch information
CagriYonca committed Nov 5, 2024
1 parent 0aa4862 commit 078e464
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 284 deletions.
195 changes: 24 additions & 171 deletions tests/apps/grpc_server/stan_pb2.py
Original file line number Diff line number Diff line change
@@ -1,187 +1,40 @@
# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2019

# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: stan.proto
# Protobuf Python Version: 5.27.2
"""Generated protocol buffer code."""

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 descriptor_pool as _descriptor_pool
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from google.protobuf.internal import builder as _builder


DESCRIPTOR = _descriptor.FileDescriptor(
name='stan.proto',
package='stan',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\nstan.proto\x12\x04stan\"#\n\x0fQuestionRequest\x12\x10\n\x08question\x18\x01 \x01(\t\"8\n\x10QuestionResponse\x12\x0e\n\x06\x61nswer\x18\x01 \x01(\t\x12\x14\n\x0cwas_answered\x18\x02 \x01(\x08\x32\xe3\x03\n\x04Stan\x12I\n\x16OneQuestionOneResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse\"\x00\x12M\n\x18ManyQuestionsOneResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse\"\x00(\x01\x12M\n\x18OneQuestionManyResponses\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse\"\x00\x30\x01\x12P\n\x19ManyQuestionsManyReponses\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse\"\x00(\x01\x30\x01\x12N\n\x1bOneQuestionOneErrorResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse\"\x00\x12P\n\x1dOneErroredQuestionOneResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse\"\x00\x62\x06proto3')
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC, 5, 27, 2, "", "stan.proto"
)
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()



_QUESTIONREQUEST = _descriptor.Descriptor(
name='QuestionRequest',
full_name='stan.QuestionRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='question', full_name='stan.QuestionRequest.question', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=20,
serialized_end=55,
)


_QUESTIONRESPONSE = _descriptor.Descriptor(
name='QuestionResponse',
full_name='stan.QuestionResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='answer', full_name='stan.QuestionResponse.answer', 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='was_answered', full_name='stan.QuestionResponse.was_answered', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
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=57,
serialized_end=113,
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\nstan.proto\x12\x04stan"#\n\x0fQuestionRequest\x12\x10\n\x08question\x18\x01 \x01(\t"8\n\x10QuestionResponse\x12\x0e\n\x06\x61nswer\x18\x01 \x01(\t\x12\x14\n\x0cwas_answered\x18\x02 \x01(\x08\x32\xe3\x03\n\x04Stan\x12I\n\x16OneQuestionOneResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse"\x00\x12M\n\x18ManyQuestionsOneResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse"\x00(\x01\x12M\n\x18OneQuestionManyResponses\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse"\x00\x30\x01\x12P\n\x19ManyQuestionsManyReponses\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse"\x00(\x01\x30\x01\x12N\n\x1bOneQuestionOneErrorResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse"\x00\x12P\n\x1dOneErroredQuestionOneResponse\x12\x15.stan.QuestionRequest\x1a\x16.stan.QuestionResponse"\x00\x62\x06proto3'
)

DESCRIPTOR.message_types_by_name['QuestionRequest'] = _QUESTIONREQUEST
DESCRIPTOR.message_types_by_name['QuestionResponse'] = _QUESTIONRESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

QuestionRequest = _reflection.GeneratedProtocolMessageType('QuestionRequest', (_message.Message,), dict(
DESCRIPTOR = _QUESTIONREQUEST,
__module__ = 'stan_pb2'
# @@protoc_insertion_point(class_scope:stan.QuestionRequest)
))
_sym_db.RegisterMessage(QuestionRequest)

QuestionResponse = _reflection.GeneratedProtocolMessageType('QuestionResponse', (_message.Message,), dict(
DESCRIPTOR = _QUESTIONRESPONSE,
__module__ = 'stan_pb2'
# @@protoc_insertion_point(class_scope:stan.QuestionResponse)
))
_sym_db.RegisterMessage(QuestionResponse)



_STAN = _descriptor.ServiceDescriptor(
name='Stan',
full_name='stan.Stan',
file=DESCRIPTOR,
index=0,
serialized_options=None,
serialized_start=116,
serialized_end=599,
methods=[
_descriptor.MethodDescriptor(
name='OneQuestionOneResponse',
full_name='stan.Stan.OneQuestionOneResponse',
index=0,
containing_service=None,
input_type=_QUESTIONREQUEST,
output_type=_QUESTIONRESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='ManyQuestionsOneResponse',
full_name='stan.Stan.ManyQuestionsOneResponse',
index=1,
containing_service=None,
input_type=_QUESTIONREQUEST,
output_type=_QUESTIONRESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='OneQuestionManyResponses',
full_name='stan.Stan.OneQuestionManyResponses',
index=2,
containing_service=None,
input_type=_QUESTIONREQUEST,
output_type=_QUESTIONRESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='ManyQuestionsManyReponses',
full_name='stan.Stan.ManyQuestionsManyReponses',
index=3,
containing_service=None,
input_type=_QUESTIONREQUEST,
output_type=_QUESTIONRESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='OneQuestionOneErrorResponse',
full_name='stan.Stan.OneQuestionOneErrorResponse',
index=4,
containing_service=None,
input_type=_QUESTIONREQUEST,
output_type=_QUESTIONRESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='OneErroredQuestionOneResponse',
full_name='stan.Stan.OneErroredQuestionOneResponse',
index=5,
containing_service=None,
input_type=_QUESTIONREQUEST,
output_type=_QUESTIONRESPONSE,
serialized_options=None,
),
])
_sym_db.RegisterServiceDescriptor(_STAN)

DESCRIPTOR.services_by_name['Stan'] = _STAN

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "stan_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_QUESTIONREQUEST"]._serialized_start = 20
_globals["_QUESTIONREQUEST"]._serialized_end = 55
_globals["_QUESTIONRESPONSE"]._serialized_start = 57
_globals["_QUESTIONRESPONSE"]._serialized_end = 113
_globals["_STAN"]._serialized_start = 116
_globals["_STAN"]._serialized_end = 599
# @@protoc_insertion_point(module_scope)
Loading

0 comments on commit 078e464

Please sign in to comment.