massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2and3 / google / protobuf / descriptor.pyi
1 from typing import Any\r
2 \r
3 from .message import Message\r
4 \r
5 class Error(Exception): ...\r
6 class TypeTransformationError(Error): ...\r
7 \r
8 class DescriptorMetaclass(type):\r
9     def __instancecheck__(cls, obj): ...\r
10 \r
11 class DescriptorBase:\r
12     __metaclass__ = DescriptorMetaclass\r
13     has_options = ...  # type: Any\r
14     def __init__(self, options, options_class_name) -> None: ...\r
15     def GetOptions(self): ...\r
16 \r
17 class _NestedDescriptorBase(DescriptorBase):\r
18     name = ...  # type: Any\r
19     full_name = ...  # type: Any\r
20     file = ...  # type: Any\r
21     containing_type = ...  # type: Any\r
22     def __init__(self, options, options_class_name, name, full_name, file, containing_type, serialized_start=..., serialized_end=...) -> None: ...\r
23     def GetTopLevelContainingType(self): ...\r
24     def CopyToProto(self, proto): ...\r
25 \r
26 class Descriptor(_NestedDescriptorBase):\r
27     def __new__(cls, name, full_name, filename, containing_type, fields, nested_types, enum_types, extensions, options=..., is_extendable=..., extension_ranges=..., oneofs=..., file=..., serialized_start=..., serialized_end=..., syntax=...): ...\r
28     fields = ...  # type: Any\r
29     fields_by_number = ...  # type: Any\r
30     fields_by_name = ...  # type: Any\r
31     nested_types = ...  # type: Any\r
32     nested_types_by_name = ...  # type: Any\r
33     enum_types = ...  # type: Any\r
34     enum_types_by_name = ...  # type: Any\r
35     enum_values_by_name = ...  # type: Any\r
36     extensions = ...  # type: Any\r
37     extensions_by_name = ...  # type: Any\r
38     is_extendable = ...  # type: Any\r
39     extension_ranges = ...  # type: Any\r
40     oneofs = ...  # type: Any\r
41     oneofs_by_name = ...  # type: Any\r
42     syntax = ...  # type: Any\r
43     def __init__(self, name, full_name, filename, containing_type, fields, nested_types, enum_types, extensions, options=..., is_extendable=..., extension_ranges=..., oneofs=..., file=..., serialized_start=..., serialized_end=..., syntax=...) -> None: ...\r
44     def EnumValueName(self, enum, value): ...\r
45     def CopyToProto(self, proto): ...\r
46 \r
47 class FieldDescriptor(DescriptorBase):\r
48     TYPE_DOUBLE = ...  # type: Any\r
49     TYPE_FLOAT = ...  # type: Any\r
50     TYPE_INT64 = ...  # type: Any\r
51     TYPE_UINT64 = ...  # type: Any\r
52     TYPE_INT32 = ...  # type: Any\r
53     TYPE_FIXED64 = ...  # type: Any\r
54     TYPE_FIXED32 = ...  # type: Any\r
55     TYPE_BOOL = ...  # type: Any\r
56     TYPE_STRING = ...  # type: Any\r
57     TYPE_GROUP = ...  # type: Any\r
58     TYPE_MESSAGE = ...  # type: Any\r
59     TYPE_BYTES = ...  # type: Any\r
60     TYPE_UINT32 = ...  # type: Any\r
61     TYPE_ENUM = ...  # type: Any\r
62     TYPE_SFIXED32 = ...  # type: Any\r
63     TYPE_SFIXED64 = ...  # type: Any\r
64     TYPE_SINT32 = ...  # type: Any\r
65     TYPE_SINT64 = ...  # type: Any\r
66     MAX_TYPE = ...  # type: Any\r
67     CPPTYPE_INT32 = ...  # type: Any\r
68     CPPTYPE_INT64 = ...  # type: Any\r
69     CPPTYPE_UINT32 = ...  # type: Any\r
70     CPPTYPE_UINT64 = ...  # type: Any\r
71     CPPTYPE_DOUBLE = ...  # type: Any\r
72     CPPTYPE_FLOAT = ...  # type: Any\r
73     CPPTYPE_BOOL = ...  # type: Any\r
74     CPPTYPE_ENUM = ...  # type: Any\r
75     CPPTYPE_STRING = ...  # type: Any\r
76     CPPTYPE_MESSAGE = ...  # type: Any\r
77     MAX_CPPTYPE = ...  # type: Any\r
78     LABEL_OPTIONAL = ...  # type: Any\r
79     LABEL_REQUIRED = ...  # type: Any\r
80     LABEL_REPEATED = ...  # type: Any\r
81     MAX_LABEL = ...  # type: Any\r
82     MAX_FIELD_NUMBER = ...  # type: Any\r
83     FIRST_RESERVED_FIELD_NUMBER = ...  # type: Any\r
84     LAST_RESERVED_FIELD_NUMBER = ...  # type: Any\r
85     def __new__(cls, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=..., file=..., has_default_value=..., containing_oneof=...): ...\r
86     name = ...  # type: Any\r
87     full_name = ...  # type: Any\r
88     index = ...  # type: Any\r
89     number = ...  # type: Any\r
90     type = ...  # type: Any\r
91     cpp_type = ...  # type: Any\r
92     label = ...  # type: Any\r
93     has_default_value = ...  # type: Any\r
94     default_value = ...  # type: Any\r
95     containing_type = ...  # type: Any\r
96     message_type = ...  # type: Any\r
97     enum_type = ...  # type: Any\r
98     is_extension = ...  # type: Any\r
99     extension_scope = ...  # type: Any\r
100     containing_oneof = ...  # type: Any\r
101     def __init__(self, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=..., file=..., has_default_value=..., containing_oneof=...) -> None: ...\r
102     @staticmethod\r
103     def ProtoTypeToCppProtoType(proto_type): ...\r
104 \r
105 class EnumDescriptor(_NestedDescriptorBase):\r
106     def __new__(cls, name, full_name, filename, values, containing_type=..., options=..., file=..., serialized_start=..., serialized_end=...): ...\r
107     values = ...  # type: Any\r
108     values_by_name = ...  # type: Any\r
109     values_by_number = ...  # type: Any\r
110     def __init__(self, name, full_name, filename, values, containing_type=..., options=..., file=..., serialized_start=..., serialized_end=...) -> None: ...\r
111     def CopyToProto(self, proto): ...\r
112 \r
113 class EnumValueDescriptor(DescriptorBase):\r
114     def __new__(cls, name, index, number, type=..., options=...): ...\r
115     name = ...  # type: Any\r
116     index = ...  # type: Any\r
117     number = ...  # type: Any\r
118     type = ...  # type: Any\r
119     def __init__(self, name, index, number, type=..., options=...) -> None: ...\r
120 \r
121 class OneofDescriptor:\r
122     def __new__(cls, name, full_name, index, containing_type, fields): ...\r
123     name = ...  # type: Any\r
124     full_name = ...  # type: Any\r
125     index = ...  # type: Any\r
126     containing_type = ...  # type: Any\r
127     fields = ...  # type: Any\r
128     def __init__(self, name, full_name, index, containing_type, fields) -> None: ...\r
129 \r
130 class ServiceDescriptor(_NestedDescriptorBase):\r
131     index = ...  # type: Any\r
132     methods = ...  # type: Any\r
133     def __init__(self, name, full_name, index, methods, options=..., file=..., serialized_start=..., serialized_end=...) -> None: ...\r
134     def FindMethodByName(self, name): ...\r
135     def CopyToProto(self, proto): ...\r
136 \r
137 class MethodDescriptor(DescriptorBase):\r
138     name = ...  # type: Any\r
139     full_name = ...  # type: Any\r
140     index = ...  # type: Any\r
141     containing_service = ...  # type: Any\r
142     input_type = ...  # type: Any\r
143     output_type = ...  # type: Any\r
144     def __init__(self, name, full_name, index, containing_service, input_type, output_type, options=...) -> None: ...\r
145 \r
146 class FileDescriptor(DescriptorBase):\r
147     def __new__(cls, name, package, options=..., serialized_pb=..., dependencies=..., syntax=...): ...\r
148     _options = ...  # type: Any\r
149     message_types_by_name = ...  # type: Any\r
150     name = ...  # type: Any\r
151     package = ...  # type: Any\r
152     syntax = ...  # type: Any\r
153     serialized_pb = ...  # type: Any\r
154     enum_types_by_name = ...  # type: Any\r
155     extensions_by_name = ...  # type: Any\r
156     dependencies = ...  # type: Any\r
157     def __init__(self, name, package, options=..., serialized_pb=..., dependencies=..., syntax=...) -> None: ...\r
158     def CopyToProto(self, proto): ...\r
159 \r
160 def MakeDescriptor(desc_proto, package=..., build_file_if_cpp=..., syntax=...): ...\r
161 def _ParseOptions(message: Message, string: bytes) -> Message: ...\r