@@ -11,37 +11,37 @@ import google.protobuf.message
11
11
import typing
12
12
import typing_extensions
13
13
14
- DESCRIPTOR : google .protobuf .descriptor .FileDescriptor = ...
14
+ DESCRIPTOR : google .protobuf .descriptor .FileDescriptor
15
15
16
16
class Version (google .protobuf .message .Message ):
17
17
"""The version number of protocol compiler."""
18
- DESCRIPTOR : google .protobuf .descriptor .Descriptor = ...
18
+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
19
19
MAJOR_FIELD_NUMBER : builtins .int
20
20
MINOR_FIELD_NUMBER : builtins .int
21
21
PATCH_FIELD_NUMBER : builtins .int
22
22
SUFFIX_FIELD_NUMBER : builtins .int
23
- major : builtins .int = ...
24
- minor : builtins .int = ...
25
- patch : builtins .int = ...
26
- suffix : typing .Text = ...
23
+ major : builtins .int
24
+ minor : builtins .int
25
+ patch : builtins .int
26
+ suffix : typing .Text
27
27
"""A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
28
28
be empty for mainline stable releases.
29
29
"""
30
30
31
31
def __init__ (self ,
32
32
* ,
33
- major : typing .Optional [builtins .int ] = ...,
34
- minor : typing .Optional [builtins .int ] = ...,
35
- patch : typing .Optional [builtins .int ] = ...,
36
- suffix : typing .Optional [typing .Text ] = ...,
33
+ major : typing .Optional [builtins .int ] = ...,
34
+ minor : typing .Optional [builtins .int ] = ...,
35
+ patch : typing .Optional [builtins .int ] = ...,
36
+ suffix : typing .Optional [typing .Text ] = ...,
37
37
) -> None : ...
38
38
def HasField (self , field_name : typing_extensions .Literal ["major" ,b"major" ,"minor" ,b"minor" ,"patch" ,b"patch" ,"suffix" ,b"suffix" ]) -> builtins .bool : ...
39
39
def ClearField (self , field_name : typing_extensions .Literal ["major" ,b"major" ,"minor" ,b"minor" ,"patch" ,b"patch" ,"suffix" ,b"suffix" ]) -> None : ...
40
40
global___Version = Version
41
41
42
42
class CodeGeneratorRequest (google .protobuf .message .Message ):
43
43
"""An encoded CodeGeneratorRequest is written to the plugin's stdin."""
44
- DESCRIPTOR : google .protobuf .descriptor .Descriptor = ...
44
+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
45
45
FILE_TO_GENERATE_FIELD_NUMBER : builtins .int
46
46
PARAMETER_FIELD_NUMBER : builtins .int
47
47
PROTO_FILE_FIELD_NUMBER : builtins .int
@@ -53,7 +53,7 @@ class CodeGeneratorRequest(google.protobuf.message.Message):
53
53
descriptor will be included in proto_file, below.
54
54
"""
55
55
pass
56
- parameter : typing .Text = ...
56
+ parameter : typing .Text
57
57
"""The generator parameter passed on the command-line."""
58
58
59
59
@property
@@ -80,39 +80,40 @@ class CodeGeneratorRequest(google.protobuf.message.Message):
80
80
pass
81
81
def __init__ (self ,
82
82
* ,
83
- file_to_generate : typing .Optional [typing .Iterable [typing .Text ]] = ...,
84
- parameter : typing .Optional [typing .Text ] = ...,
85
- proto_file : typing .Optional [typing .Iterable [google .protobuf .descriptor_pb2 .FileDescriptorProto ]] = ...,
86
- compiler_version : typing .Optional [global___Version ] = ...,
83
+ file_to_generate : typing .Optional [typing .Iterable [typing .Text ]] = ...,
84
+ parameter : typing .Optional [typing .Text ] = ...,
85
+ proto_file : typing .Optional [typing .Iterable [google .protobuf .descriptor_pb2 .FileDescriptorProto ]] = ...,
86
+ compiler_version : typing .Optional [global___Version ] = ...,
87
87
) -> None : ...
88
88
def HasField (self , field_name : typing_extensions .Literal ["compiler_version" ,b"compiler_version" ,"parameter" ,b"parameter" ]) -> builtins .bool : ...
89
89
def ClearField (self , field_name : typing_extensions .Literal ["compiler_version" ,b"compiler_version" ,"file_to_generate" ,b"file_to_generate" ,"parameter" ,b"parameter" ,"proto_file" ,b"proto_file" ]) -> None : ...
90
90
global___CodeGeneratorRequest = CodeGeneratorRequest
91
91
92
92
class CodeGeneratorResponse (google .protobuf .message .Message ):
93
93
"""The plugin writes an encoded CodeGeneratorResponse to stdout."""
94
- DESCRIPTOR : google .protobuf .descriptor .Descriptor = ...
94
+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
95
+ class _Feature :
96
+ ValueType = typing .NewType ('ValueType' , builtins .int )
97
+ V : typing_extensions .TypeAlias = ValueType
98
+ class _FeatureEnumTypeWrapper (google .protobuf .internal .enum_type_wrapper ._EnumTypeWrapper [CodeGeneratorResponse ._Feature .ValueType ], builtins .type ):
99
+ DESCRIPTOR : google .protobuf .descriptor .EnumDescriptor
100
+ FEATURE_NONE : CodeGeneratorResponse ._Feature .ValueType # 0
101
+ FEATURE_PROTO3_OPTIONAL : CodeGeneratorResponse ._Feature .ValueType # 1
95
102
class Feature (_Feature , metaclass = _FeatureEnumTypeWrapper ):
96
103
"""Sync with code_generator.h."""
97
104
pass
98
- class _Feature :
99
- V = typing .NewType ('V' , builtins .int )
100
- class _FeatureEnumTypeWrapper (google .protobuf .internal .enum_type_wrapper ._EnumTypeWrapper [_Feature .V ], builtins .type ):
101
- DESCRIPTOR : google .protobuf .descriptor .EnumDescriptor = ...
102
- FEATURE_NONE = CodeGeneratorResponse .Feature .V (0 )
103
- FEATURE_PROTO3_OPTIONAL = CodeGeneratorResponse .Feature .V (1 )
104
105
105
- FEATURE_NONE = CodeGeneratorResponse .Feature .V ( 0 )
106
- FEATURE_PROTO3_OPTIONAL = CodeGeneratorResponse .Feature .V ( 1 )
106
+ FEATURE_NONE : CodeGeneratorResponse .Feature .ValueType # 0
107
+ FEATURE_PROTO3_OPTIONAL : CodeGeneratorResponse .Feature .ValueType # 1
107
108
108
109
class File (google .protobuf .message .Message ):
109
110
"""Represents a single generated file."""
110
- DESCRIPTOR : google .protobuf .descriptor .Descriptor = ...
111
+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
111
112
NAME_FIELD_NUMBER : builtins .int
112
113
INSERTION_POINT_FIELD_NUMBER : builtins .int
113
114
CONTENT_FIELD_NUMBER : builtins .int
114
115
GENERATED_CODE_INFO_FIELD_NUMBER : builtins .int
115
- name : typing .Text = ...
116
+ name : typing .Text
116
117
"""The file name, relative to the output directory. The name must not
117
118
contain "." or ".." components and must be relative, not be absolute (so,
118
119
the file cannot lie outside the output directory). "/" must be used as
@@ -126,7 +127,7 @@ class CodeGeneratorResponse(google.protobuf.message.Message):
126
127
CodeGeneratorResponse before writing files to disk.
127
128
"""
128
129
129
- insertion_point : typing .Text = ...
130
+ insertion_point : typing .Text
130
131
"""If non-empty, indicates that the named file should already exist, and the
131
132
content here is to be inserted into that file at a defined insertion
132
133
point. This feature allows a code generator to extend the output
@@ -166,7 +167,7 @@ class CodeGeneratorResponse(google.protobuf.message.Message):
166
167
If |insertion_point| is present, |name| must also be present.
167
168
"""
168
169
169
- content : typing .Text = ...
170
+ content : typing .Text
170
171
"""The file contents."""
171
172
172
173
@property
@@ -178,18 +179,18 @@ class CodeGeneratorResponse(google.protobuf.message.Message):
178
179
pass
179
180
def __init__ (self ,
180
181
* ,
181
- name : typing .Optional [typing .Text ] = ...,
182
- insertion_point : typing .Optional [typing .Text ] = ...,
183
- content : typing .Optional [typing .Text ] = ...,
184
- generated_code_info : typing .Optional [google .protobuf .descriptor_pb2 .GeneratedCodeInfo ] = ...,
182
+ name : typing .Optional [typing .Text ] = ...,
183
+ insertion_point : typing .Optional [typing .Text ] = ...,
184
+ content : typing .Optional [typing .Text ] = ...,
185
+ generated_code_info : typing .Optional [google .protobuf .descriptor_pb2 .GeneratedCodeInfo ] = ...,
185
186
) -> None : ...
186
187
def HasField (self , field_name : typing_extensions .Literal ["content" ,b"content" ,"generated_code_info" ,b"generated_code_info" ,"insertion_point" ,b"insertion_point" ,"name" ,b"name" ]) -> builtins .bool : ...
187
188
def ClearField (self , field_name : typing_extensions .Literal ["content" ,b"content" ,"generated_code_info" ,b"generated_code_info" ,"insertion_point" ,b"insertion_point" ,"name" ,b"name" ]) -> None : ...
188
189
189
190
ERROR_FIELD_NUMBER : builtins .int
190
191
SUPPORTED_FEATURES_FIELD_NUMBER : builtins .int
191
192
FILE_FIELD_NUMBER : builtins .int
192
- error : typing .Text = ...
193
+ error : typing .Text
193
194
"""Error message. If non-empty, code generation failed. The plugin process
194
195
should exit with status code zero even if it reports an error in this way.
195
196
@@ -200,7 +201,7 @@ class CodeGeneratorResponse(google.protobuf.message.Message):
200
201
exiting with a non-zero status code.
201
202
"""
202
203
203
- supported_features : builtins .int = ...
204
+ supported_features : builtins .int
204
205
"""A bitmask of supported features that the code generator supports.
205
206
This is a bitwise "or" of values from the Feature enum.
206
207
"""
@@ -209,9 +210,9 @@ class CodeGeneratorResponse(google.protobuf.message.Message):
209
210
def file (self ) -> google .protobuf .internal .containers .RepeatedCompositeFieldContainer [global___CodeGeneratorResponse .File ]: ...
210
211
def __init__ (self ,
211
212
* ,
212
- error : typing .Optional [typing .Text ] = ...,
213
- supported_features : typing .Optional [builtins .int ] = ...,
214
- file : typing .Optional [typing .Iterable [global___CodeGeneratorResponse .File ]] = ...,
213
+ error : typing .Optional [typing .Text ] = ...,
214
+ supported_features : typing .Optional [builtins .int ] = ...,
215
+ file : typing .Optional [typing .Iterable [global___CodeGeneratorResponse .File ]] = ...,
215
216
) -> None : ...
216
217
def HasField (self , field_name : typing_extensions .Literal ["error" ,b"error" ,"supported_features" ,b"supported_features" ]) -> builtins .bool : ...
217
218
def ClearField (self , field_name : typing_extensions .Literal ["error" ,b"error" ,"file" ,b"file" ,"supported_features" ,b"supported_features" ]) -> None : ...
0 commit comments