Update CodeGeneratorResponse (#4680)

Add Feature enum and supported_features.
These are related to the optional proto3 fields introduced in 3.12.0,
see https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0 and
214c77e1b7/src/google/protobuf/compiler/plugin.proto (L112)
This commit is contained in:
henribru
2020-11-01 22:09:49 +01:00
committed by GitHub
parent 079584a020
commit fd6bb39f55

View File

@@ -2,6 +2,7 @@ from typing import Iterable, Optional, Text
from google.protobuf.descriptor_pb2 import FileDescriptorProto
from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper
from google.protobuf.message import Message
class Version(Message):
@@ -36,6 +37,13 @@ class CodeGeneratorResponse(Message):
def __init__(
self, name: Optional[Text] = ..., insertion_point: Optional[Text] = ..., content: Optional[Text] = ...
) -> None: ...
class _Feature(EnumTypeWrapper):
FEATURE_NONE: int
FEATURE_PROTO_3_OPTIONAL: int
Feature: CodeGeneratorResponse._Feature
FEATURE_NONE: int
FEATURE_PROTO_3_OPTIONAL: int
supported_features: int
error: Text
@property
def file(self) -> RepeatedCompositeFieldContainer[CodeGeneratorResponse.File]: ...