sift-stack-py 0.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/__init__.py +1 -0
- google/api/__init__.py +0 -0
- google/api/annotations_pb2.py +27 -0
- google/api/annotations_pb2.pyi +29 -0
- google/api/annotations_pb2_grpc.py +4 -0
- google/api/annotations_pb2_grpc.pyi +30 -0
- google/api/field_behavior_pb2.py +30 -0
- google/api/field_behavior_pb2.pyi +175 -0
- google/api/field_behavior_pb2_grpc.py +4 -0
- google/api/field_behavior_pb2_grpc.pyi +30 -0
- google/api/http_pb2.py +31 -0
- google/api/http_pb2.pyi +433 -0
- google/api/http_pb2_grpc.py +4 -0
- google/api/http_pb2_grpc.pyi +30 -0
- protoc_gen_openapiv2/__init__.py +0 -0
- protoc_gen_openapiv2/options/__init__.py +0 -0
- protoc_gen_openapiv2/options/annotations_pb2.py +27 -0
- protoc_gen_openapiv2/options/annotations_pb2.pyi +48 -0
- protoc_gen_openapiv2/options/annotations_pb2_grpc.py +4 -0
- protoc_gen_openapiv2/options/annotations_pb2_grpc.pyi +17 -0
- protoc_gen_openapiv2/options/openapiv2_pb2.py +132 -0
- protoc_gen_openapiv2/options/openapiv2_pb2.pyi +1533 -0
- protoc_gen_openapiv2/options/openapiv2_pb2_grpc.py +4 -0
- protoc_gen_openapiv2/options/openapiv2_pb2_grpc.pyi +17 -0
- sift/__init__.py +0 -0
- sift/annotation_logs/__init__.py +0 -0
- sift/annotation_logs/v1/__init__.py +0 -0
- sift/annotation_logs/v1/annotation_logs_pb2.py +115 -0
- sift/annotation_logs/v1/annotation_logs_pb2.pyi +370 -0
- sift/annotation_logs/v1/annotation_logs_pb2_grpc.py +135 -0
- sift/annotation_logs/v1/annotation_logs_pb2_grpc.pyi +84 -0
- sift/annotations/__init__.py +0 -0
- sift/annotations/v1/__init__.py +0 -0
- sift/annotations/v1/annotations_pb2.py +180 -0
- sift/annotations/v1/annotations_pb2.pyi +539 -0
- sift/annotations/v1/annotations_pb2_grpc.py +237 -0
- sift/annotations/v1/annotations_pb2_grpc.pyi +144 -0
- sift/assets/__init__.py +0 -0
- sift/assets/v1/__init__.py +0 -0
- sift/assets/v1/assets_pb2.py +90 -0
- sift/assets/v1/assets_pb2.pyi +235 -0
- sift/assets/v1/assets_pb2_grpc.py +168 -0
- sift/assets/v1/assets_pb2_grpc.pyi +101 -0
- sift/calculated_channels/__init__.py +0 -0
- sift/calculated_channels/v1/__init__.py +0 -0
- sift/calculated_channels/v1/calculated_channels_pb2.py +99 -0
- sift/calculated_channels/v1/calculated_channels_pb2.pyi +280 -0
- sift/calculated_channels/v1/calculated_channels_pb2_grpc.py +101 -0
- sift/calculated_channels/v1/calculated_channels_pb2_grpc.pyi +64 -0
- sift/campaigns/__init__.py +0 -0
- sift/campaigns/v1/__init__.py +0 -0
- sift/campaigns/v1/campaigns_pb2.py +144 -0
- sift/campaigns/v1/campaigns_pb2.pyi +383 -0
- sift/campaigns/v1/campaigns_pb2_grpc.py +169 -0
- sift/campaigns/v1/campaigns_pb2_grpc.pyi +104 -0
- sift/channel_schemas/__init__.py +0 -0
- sift/channel_schemas/v1/__init__.py +0 -0
- sift/channel_schemas/v1/channel_schemas_pb2.py +69 -0
- sift/channel_schemas/v1/channel_schemas_pb2.pyi +117 -0
- sift/channel_schemas/v1/channel_schemas_pb2_grpc.py +101 -0
- sift/channel_schemas/v1/channel_schemas_pb2_grpc.pyi +64 -0
- sift/channels/__init__.py +0 -0
- sift/channels/v2/__init__.py +0 -0
- sift/channels/v2/channels_pb2.py +88 -0
- sift/channels/v2/channels_pb2.pyi +183 -0
- sift/channels/v2/channels_pb2_grpc.py +101 -0
- sift/channels/v2/channels_pb2_grpc.pyi +64 -0
- sift/common/__init__.py +0 -0
- sift/common/type/__init__.py +0 -0
- sift/common/type/v1/__init__.py +0 -0
- sift/common/type/v1/channel_bit_field_element_pb2.py +34 -0
- sift/common/type/v1/channel_bit_field_element_pb2.pyi +33 -0
- sift/common/type/v1/channel_bit_field_element_pb2_grpc.py +4 -0
- sift/common/type/v1/channel_bit_field_element_pb2_grpc.pyi +17 -0
- sift/common/type/v1/channel_data_type_pb2.py +29 -0
- sift/common/type/v1/channel_data_type_pb2.pyi +50 -0
- sift/common/type/v1/channel_data_type_pb2_grpc.py +4 -0
- sift/common/type/v1/channel_data_type_pb2_grpc.pyi +17 -0
- sift/common/type/v1/channel_enum_type_pb2.py +32 -0
- sift/common/type/v1/channel_enum_type_pb2.pyi +29 -0
- sift/common/type/v1/channel_enum_type_pb2_grpc.py +4 -0
- sift/common/type/v1/channel_enum_type_pb2_grpc.pyi +17 -0
- sift/common/type/v1/organization_pb2.py +27 -0
- sift/common/type/v1/organization_pb2.pyi +29 -0
- sift/common/type/v1/organization_pb2_grpc.py +4 -0
- sift/common/type/v1/organization_pb2_grpc.pyi +17 -0
- sift/common/type/v1/resource_identifier_pb2.py +46 -0
- sift/common/type/v1/resource_identifier_pb2.pyi +145 -0
- sift/common/type/v1/resource_identifier_pb2_grpc.py +4 -0
- sift/common/type/v1/resource_identifier_pb2_grpc.pyi +17 -0
- sift/common/type/v1/user_pb2.py +33 -0
- sift/common/type/v1/user_pb2.pyi +36 -0
- sift/common/type/v1/user_pb2_grpc.py +4 -0
- sift/common/type/v1/user_pb2_grpc.pyi +17 -0
- sift/data/__init__.py +0 -0
- sift/data/v1/__init__.py +0 -0
- sift/data/v1/data_pb2.py +212 -0
- sift/data/v1/data_pb2.pyi +745 -0
- sift/data/v1/data_pb2_grpc.py +67 -0
- sift/data/v1/data_pb2_grpc.pyi +44 -0
- sift/ingest/__init__.py +0 -0
- sift/ingest/v1/__init__.py +0 -0
- sift/ingest/v1/ingest_pb2.py +35 -0
- sift/ingest/v1/ingest_pb2.pyi +118 -0
- sift/ingest/v1/ingest_pb2_grpc.py +66 -0
- sift/ingest/v1/ingest_pb2_grpc.pyi +41 -0
- sift/ingestion_configs/__init__.py +0 -0
- sift/ingestion_configs/v1/__init__.py +0 -0
- sift/ingestion_configs/v1/ingestion_configs_pb2.py +115 -0
- sift/ingestion_configs/v1/ingestion_configs_pb2.pyi +332 -0
- sift/ingestion_configs/v1/ingestion_configs_pb2_grpc.py +203 -0
- sift/ingestion_configs/v1/ingestion_configs_pb2_grpc.pyi +124 -0
- sift/notifications/__init__.py +0 -0
- sift/notifications/v1/__init__.py +0 -0
- sift/notifications/v1/notifications_pb2.py +64 -0
- sift/notifications/v1/notifications_pb2.pyi +225 -0
- sift/notifications/v1/notifications_pb2_grpc.py +101 -0
- sift/notifications/v1/notifications_pb2_grpc.pyi +64 -0
- sift/ping/__init__.py +0 -0
- sift/ping/v1/__init__.py +0 -0
- sift/ping/v1/ping_pb2.py +38 -0
- sift/ping/v1/ping_pb2.pyi +36 -0
- sift/ping/v1/ping_pb2_grpc.py +66 -0
- sift/ping/v1/ping_pb2_grpc.pyi +41 -0
- sift/remote_files/__init__.py +0 -0
- sift/remote_files/v1/__init__.py +0 -0
- sift/remote_files/v1/remote_files_pb2.py +174 -0
- sift/remote_files/v1/remote_files_pb2.pyi +472 -0
- sift/remote_files/v1/remote_files_pb2_grpc.py +271 -0
- sift/remote_files/v1/remote_files_pb2_grpc.pyi +164 -0
- sift/report_templates/__init__.py +0 -0
- sift/report_templates/v1/__init__.py +0 -0
- sift/report_templates/v1/report_templates_pb2.py +146 -0
- sift/report_templates/v1/report_templates_pb2.pyi +381 -0
- sift/report_templates/v1/report_templates_pb2_grpc.py +169 -0
- sift/report_templates/v1/report_templates_pb2_grpc.pyi +104 -0
- sift/reports/__init__.py +0 -0
- sift/reports/v1/__init__.py +0 -0
- sift/reports/v1/reports_pb2.py +193 -0
- sift/reports/v1/reports_pb2.pyi +562 -0
- sift/reports/v1/reports_pb2_grpc.py +205 -0
- sift/reports/v1/reports_pb2_grpc.pyi +136 -0
- sift/rule_evaluation/__init__.py +0 -0
- sift/rule_evaluation/v1/__init__.py +0 -0
- sift/rule_evaluation/v1/rule_evaluation_pb2.py +89 -0
- sift/rule_evaluation/v1/rule_evaluation_pb2.pyi +263 -0
- sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.py +101 -0
- sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.pyi +64 -0
- sift/rules/__init__.py +0 -0
- sift/rules/v1/__init__.py +0 -0
- sift/rules/v1/rules_pb2.py +420 -0
- sift/rules/v1/rules_pb2.pyi +1355 -0
- sift/rules/v1/rules_pb2_grpc.py +577 -0
- sift/rules/v1/rules_pb2_grpc.pyi +351 -0
- sift/runs/__init__.py +0 -0
- sift/runs/v2/__init__.py +0 -0
- sift/runs/v2/runs_pb2.py +150 -0
- sift/runs/v2/runs_pb2.pyi +413 -0
- sift/runs/v2/runs_pb2_grpc.py +271 -0
- sift/runs/v2/runs_pb2_grpc.pyi +164 -0
- sift/saved_searches/__init__.py +0 -0
- sift/saved_searches/v1/__init__.py +0 -0
- sift/saved_searches/v1/saved_searches_pb2.py +144 -0
- sift/saved_searches/v1/saved_searches_pb2.pyi +385 -0
- sift/saved_searches/v1/saved_searches_pb2_grpc.py +237 -0
- sift/saved_searches/v1/saved_searches_pb2_grpc.pyi +144 -0
- sift/tags/__init__.py +0 -0
- sift/tags/v1/__init__.py +0 -0
- sift/tags/v1/tags_pb2.py +49 -0
- sift/tags/v1/tags_pb2.pyi +71 -0
- sift/tags/v1/tags_pb2_grpc.py +4 -0
- sift/tags/v1/tags_pb2_grpc.pyi +17 -0
- sift/users/__init__.py +0 -0
- sift/users/v2/__init__.py +0 -0
- sift/users/v2/users_pb2.py +61 -0
- sift/users/v2/users_pb2.pyi +142 -0
- sift/users/v2/users_pb2_grpc.py +135 -0
- sift/users/v2/users_pb2_grpc.pyi +84 -0
- sift/views/__init__.py +0 -0
- sift/views/v1/__init__.py +0 -0
- sift/views/v1/views_pb2.py +130 -0
- sift/views/v1/views_pb2.pyi +466 -0
- sift/views/v1/views_pb2_grpc.py +305 -0
- sift/views/v1/views_pb2_grpc.pyi +184 -0
- sift_grafana/py.typed +0 -0
- sift_grafana/sift_query_model.py +64 -0
- sift_py/__init__.py +923 -0
- sift_py/_internal/__init__.py +5 -0
- sift_py/_internal/cel.py +18 -0
- sift_py/_internal/channel.py +42 -0
- sift_py/_internal/convert/__init__.py +3 -0
- sift_py/_internal/convert/json.py +24 -0
- sift_py/_internal/convert/protobuf.py +34 -0
- sift_py/_internal/convert/timestamp.py +9 -0
- sift_py/_internal/test_util/__init__.py +0 -0
- sift_py/_internal/test_util/channel.py +136 -0
- sift_py/_internal/test_util/fn.py +14 -0
- sift_py/_internal/test_util/server_interceptor.py +62 -0
- sift_py/_internal/time.py +48 -0
- sift_py/_internal/user.py +39 -0
- sift_py/data/__init__.py +171 -0
- sift_py/data/_channel.py +38 -0
- sift_py/data/_deserialize.py +208 -0
- sift_py/data/_deserialize_test.py +134 -0
- sift_py/data/_service_test.py +276 -0
- sift_py/data/_validate.py +10 -0
- sift_py/data/error.py +5 -0
- sift_py/data/query.py +299 -0
- sift_py/data/service.py +497 -0
- sift_py/data_import/__init__.py +130 -0
- sift_py/data_import/_config.py +167 -0
- sift_py/data_import/_config_test.py +166 -0
- sift_py/data_import/_csv_test.py +395 -0
- sift_py/data_import/_status_test.py +176 -0
- sift_py/data_import/_tdms_test.py +238 -0
- sift_py/data_import/ch10.py +157 -0
- sift_py/data_import/config.py +19 -0
- sift_py/data_import/csv.py +259 -0
- sift_py/data_import/status.py +113 -0
- sift_py/data_import/tdms.py +206 -0
- sift_py/data_import/tempfile.py +30 -0
- sift_py/data_import/time_format.py +39 -0
- sift_py/error.py +11 -0
- sift_py/file_attachment/__init__.py +88 -0
- sift_py/file_attachment/_internal/__init__.py +0 -0
- sift_py/file_attachment/_internal/download.py +13 -0
- sift_py/file_attachment/_internal/upload.py +100 -0
- sift_py/file_attachment/_service_test.py +161 -0
- sift_py/file_attachment/entity.py +30 -0
- sift_py/file_attachment/metadata.py +107 -0
- sift_py/file_attachment/service.py +142 -0
- sift_py/grpc/__init__.py +15 -0
- sift_py/grpc/_async_interceptors/__init__.py +0 -0
- sift_py/grpc/_async_interceptors/base.py +72 -0
- sift_py/grpc/_async_interceptors/metadata.py +36 -0
- sift_py/grpc/_interceptors/__init__.py +0 -0
- sift_py/grpc/_interceptors/base.py +61 -0
- sift_py/grpc/_interceptors/context.py +25 -0
- sift_py/grpc/_interceptors/metadata.py +33 -0
- sift_py/grpc/_retry.py +70 -0
- sift_py/grpc/keepalive.py +34 -0
- sift_py/grpc/transport.py +250 -0
- sift_py/grpc/transport_test.py +170 -0
- sift_py/ingestion/__init__.py +6 -0
- sift_py/ingestion/_internal/__init__.py +6 -0
- sift_py/ingestion/_internal/channel.py +12 -0
- sift_py/ingestion/_internal/error.py +10 -0
- sift_py/ingestion/_internal/ingest.py +350 -0
- sift_py/ingestion/_internal/ingest_test.py +357 -0
- sift_py/ingestion/_internal/ingestion_config.py +130 -0
- sift_py/ingestion/_internal/run.py +46 -0
- sift_py/ingestion/_service_test.py +478 -0
- sift_py/ingestion/buffer.py +189 -0
- sift_py/ingestion/channel.py +422 -0
- sift_py/ingestion/config/__init__.py +3 -0
- sift_py/ingestion/config/telemetry.py +281 -0
- sift_py/ingestion/config/telemetry_test.py +405 -0
- sift_py/ingestion/config/yaml/__init__.py +0 -0
- sift_py/ingestion/config/yaml/error.py +44 -0
- sift_py/ingestion/config/yaml/load.py +126 -0
- sift_py/ingestion/config/yaml/spec.py +58 -0
- sift_py/ingestion/config/yaml/test_load.py +25 -0
- sift_py/ingestion/flow.py +73 -0
- sift_py/ingestion/manager.py +99 -0
- sift_py/ingestion/rule/__init__.py +4 -0
- sift_py/ingestion/rule/config.py +11 -0
- sift_py/ingestion/service.py +237 -0
- sift_py/py.typed +0 -0
- sift_py/report_templates/__init__.py +0 -0
- sift_py/report_templates/_config_test.py +34 -0
- sift_py/report_templates/_service_test.py +94 -0
- sift_py/report_templates/config.py +36 -0
- sift_py/report_templates/service.py +171 -0
- sift_py/rest.py +29 -0
- sift_py/rule/__init__.py +0 -0
- sift_py/rule/_config_test.py +109 -0
- sift_py/rule/_service_test.py +168 -0
- sift_py/rule/config.py +229 -0
- sift_py/rule/service.py +484 -0
- sift_py/yaml/__init__.py +0 -0
- sift_py/yaml/_channel_test.py +169 -0
- sift_py/yaml/_rule_test.py +207 -0
- sift_py/yaml/channel.py +224 -0
- sift_py/yaml/report_templates.py +73 -0
- sift_py/yaml/rule.py +321 -0
- sift_py/yaml/utils.py +15 -0
- sift_stack_py-0.3.2.dist-info/LICENSE +7 -0
- sift_stack_py-0.3.2.dist-info/METADATA +109 -0
- sift_stack_py-0.3.2.dist-info/RECORD +291 -0
- sift_stack_py-0.3.2.dist-info/WHEEL +5 -0
- sift_stack_py-0.3.2.dist-info/top_level.txt +5 -0
google/api/http_pb2.pyi
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
Copyright 2024 Google LLC
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License.
|
|
8
|
+
You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import builtins
|
|
20
|
+
import collections.abc
|
|
21
|
+
import google.protobuf.descriptor
|
|
22
|
+
import google.protobuf.internal.containers
|
|
23
|
+
import google.protobuf.message
|
|
24
|
+
import typing
|
|
25
|
+
|
|
26
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
27
|
+
|
|
28
|
+
@typing.final
|
|
29
|
+
class Http(google.protobuf.message.Message):
|
|
30
|
+
"""Defines the HTTP configuration for an API service. It contains a list of
|
|
31
|
+
[HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
|
|
32
|
+
to one or more HTTP REST API methods.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
36
|
+
|
|
37
|
+
RULES_FIELD_NUMBER: builtins.int
|
|
38
|
+
FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER: builtins.int
|
|
39
|
+
fully_decode_reserved_expansion: builtins.bool
|
|
40
|
+
"""When set to true, URL path parameters will be fully URI-decoded except in
|
|
41
|
+
cases of single segment matches in reserved expansion, where "%2F" will be
|
|
42
|
+
left encoded.
|
|
43
|
+
|
|
44
|
+
The default behavior is to not decode RFC 6570 reserved characters in multi
|
|
45
|
+
segment matches.
|
|
46
|
+
"""
|
|
47
|
+
@property
|
|
48
|
+
def rules(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___HttpRule]:
|
|
49
|
+
"""A list of HTTP configuration rules that apply to individual API methods.
|
|
50
|
+
|
|
51
|
+
**NOTE:** All service configuration rules follow "last one wins" order.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
def __init__(
|
|
55
|
+
self,
|
|
56
|
+
*,
|
|
57
|
+
rules: collections.abc.Iterable[global___HttpRule] | None = ...,
|
|
58
|
+
fully_decode_reserved_expansion: builtins.bool = ...,
|
|
59
|
+
) -> None: ...
|
|
60
|
+
def ClearField(self, field_name: typing.Literal["fully_decode_reserved_expansion", b"fully_decode_reserved_expansion", "rules", b"rules"]) -> None: ...
|
|
61
|
+
|
|
62
|
+
global___Http = Http
|
|
63
|
+
|
|
64
|
+
@typing.final
|
|
65
|
+
class HttpRule(google.protobuf.message.Message):
|
|
66
|
+
"""gRPC Transcoding
|
|
67
|
+
|
|
68
|
+
gRPC Transcoding is a feature for mapping between a gRPC method and one or
|
|
69
|
+
more HTTP REST endpoints. It allows developers to build a single API service
|
|
70
|
+
that supports both gRPC APIs and REST APIs. Many systems, including [Google
|
|
71
|
+
APIs](https://github.com/googleapis/googleapis),
|
|
72
|
+
[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
|
|
73
|
+
Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
|
|
74
|
+
and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
|
|
75
|
+
and use it for large scale production services.
|
|
76
|
+
|
|
77
|
+
`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
|
|
78
|
+
how different portions of the gRPC request message are mapped to the URL
|
|
79
|
+
path, URL query parameters, and HTTP request body. It also controls how the
|
|
80
|
+
gRPC response message is mapped to the HTTP response body. `HttpRule` is
|
|
81
|
+
typically specified as an `google.api.http` annotation on the gRPC method.
|
|
82
|
+
|
|
83
|
+
Each mapping specifies a URL path template and an HTTP method. The path
|
|
84
|
+
template may refer to one or more fields in the gRPC request message, as long
|
|
85
|
+
as each field is a non-repeated field with a primitive (non-message) type.
|
|
86
|
+
The path template controls how fields of the request message are mapped to
|
|
87
|
+
the URL path.
|
|
88
|
+
|
|
89
|
+
Example:
|
|
90
|
+
|
|
91
|
+
service Messaging {
|
|
92
|
+
rpc GetMessage(GetMessageRequest) returns (Message) {
|
|
93
|
+
option (google.api.http) = {
|
|
94
|
+
get: "/v1/{name=messages/*}"
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
message GetMessageRequest {
|
|
99
|
+
string name = 1; // Mapped to URL path.
|
|
100
|
+
}
|
|
101
|
+
message Message {
|
|
102
|
+
string text = 1; // The resource content.
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
This enables an HTTP REST to gRPC mapping as below:
|
|
106
|
+
|
|
107
|
+
- HTTP: `GET /v1/messages/123456`
|
|
108
|
+
- gRPC: `GetMessage(name: "messages/123456")`
|
|
109
|
+
|
|
110
|
+
Any fields in the request message which are not bound by the path template
|
|
111
|
+
automatically become HTTP query parameters if there is no HTTP request body.
|
|
112
|
+
For example:
|
|
113
|
+
|
|
114
|
+
service Messaging {
|
|
115
|
+
rpc GetMessage(GetMessageRequest) returns (Message) {
|
|
116
|
+
option (google.api.http) = {
|
|
117
|
+
get:"/v1/messages/{message_id}"
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
message GetMessageRequest {
|
|
122
|
+
message SubMessage {
|
|
123
|
+
string subfield = 1;
|
|
124
|
+
}
|
|
125
|
+
string message_id = 1; // Mapped to URL path.
|
|
126
|
+
int64 revision = 2; // Mapped to URL query parameter `revision`.
|
|
127
|
+
SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
This enables a HTTP JSON to RPC mapping as below:
|
|
131
|
+
|
|
132
|
+
- HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
|
|
133
|
+
- gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
|
|
134
|
+
SubMessage(subfield: "foo"))`
|
|
135
|
+
|
|
136
|
+
Note that fields which are mapped to URL query parameters must have a
|
|
137
|
+
primitive type or a repeated primitive type or a non-repeated message type.
|
|
138
|
+
In the case of a repeated type, the parameter can be repeated in the URL
|
|
139
|
+
as `...?param=A¶m=B`. In the case of a message type, each field of the
|
|
140
|
+
message is mapped to a separate parameter, such as
|
|
141
|
+
`...?foo.a=A&foo.b=B&foo.c=C`.
|
|
142
|
+
|
|
143
|
+
For HTTP methods that allow a request body, the `body` field
|
|
144
|
+
specifies the mapping. Consider a REST update method on the
|
|
145
|
+
message resource collection:
|
|
146
|
+
|
|
147
|
+
service Messaging {
|
|
148
|
+
rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
|
|
149
|
+
option (google.api.http) = {
|
|
150
|
+
patch: "/v1/messages/{message_id}"
|
|
151
|
+
body: "message"
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
message UpdateMessageRequest {
|
|
156
|
+
string message_id = 1; // mapped to the URL
|
|
157
|
+
Message message = 2; // mapped to the body
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
The following HTTP JSON to RPC mapping is enabled, where the
|
|
161
|
+
representation of the JSON in the request body is determined by
|
|
162
|
+
protos JSON encoding:
|
|
163
|
+
|
|
164
|
+
- HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
|
|
165
|
+
- gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
|
|
166
|
+
|
|
167
|
+
The special name `*` can be used in the body mapping to define that
|
|
168
|
+
every field not bound by the path template should be mapped to the
|
|
169
|
+
request body. This enables the following alternative definition of
|
|
170
|
+
the update method:
|
|
171
|
+
|
|
172
|
+
service Messaging {
|
|
173
|
+
rpc UpdateMessage(Message) returns (Message) {
|
|
174
|
+
option (google.api.http) = {
|
|
175
|
+
patch: "/v1/messages/{message_id}"
|
|
176
|
+
body: "*"
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
message Message {
|
|
181
|
+
string message_id = 1;
|
|
182
|
+
string text = 2;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
The following HTTP JSON to RPC mapping is enabled:
|
|
187
|
+
|
|
188
|
+
- HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
|
|
189
|
+
- gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
|
|
190
|
+
|
|
191
|
+
Note that when using `*` in the body mapping, it is not possible to
|
|
192
|
+
have HTTP parameters, as all fields not bound by the path end in
|
|
193
|
+
the body. This makes this option more rarely used in practice when
|
|
194
|
+
defining REST APIs. The common usage of `*` is in custom methods
|
|
195
|
+
which don't use the URL at all for transferring data.
|
|
196
|
+
|
|
197
|
+
It is possible to define multiple HTTP methods for one RPC by using
|
|
198
|
+
the `additional_bindings` option. Example:
|
|
199
|
+
|
|
200
|
+
service Messaging {
|
|
201
|
+
rpc GetMessage(GetMessageRequest) returns (Message) {
|
|
202
|
+
option (google.api.http) = {
|
|
203
|
+
get: "/v1/messages/{message_id}"
|
|
204
|
+
additional_bindings {
|
|
205
|
+
get: "/v1/users/{user_id}/messages/{message_id}"
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
message GetMessageRequest {
|
|
211
|
+
string message_id = 1;
|
|
212
|
+
string user_id = 2;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
This enables the following two alternative HTTP JSON to RPC mappings:
|
|
216
|
+
|
|
217
|
+
- HTTP: `GET /v1/messages/123456`
|
|
218
|
+
- gRPC: `GetMessage(message_id: "123456")`
|
|
219
|
+
|
|
220
|
+
- HTTP: `GET /v1/users/me/messages/123456`
|
|
221
|
+
- gRPC: `GetMessage(user_id: "me" message_id: "123456")`
|
|
222
|
+
|
|
223
|
+
Rules for HTTP mapping
|
|
224
|
+
|
|
225
|
+
1. Leaf request fields (recursive expansion nested messages in the request
|
|
226
|
+
message) are classified into three categories:
|
|
227
|
+
- Fields referred by the path template. They are passed via the URL path.
|
|
228
|
+
- Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
|
|
229
|
+
are passed via the HTTP
|
|
230
|
+
request body.
|
|
231
|
+
- All other fields are passed via the URL query parameters, and the
|
|
232
|
+
parameter name is the field path in the request message. A repeated
|
|
233
|
+
field can be represented as multiple query parameters under the same
|
|
234
|
+
name.
|
|
235
|
+
2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
|
|
236
|
+
query parameter, all fields
|
|
237
|
+
are passed via URL path and HTTP request body.
|
|
238
|
+
3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
|
|
239
|
+
request body, all
|
|
240
|
+
fields are passed via URL path and URL query parameters.
|
|
241
|
+
|
|
242
|
+
Path template syntax
|
|
243
|
+
|
|
244
|
+
Template = "/" Segments [ Verb ] ;
|
|
245
|
+
Segments = Segment { "/" Segment } ;
|
|
246
|
+
Segment = "*" | "**" | LITERAL | Variable ;
|
|
247
|
+
Variable = "{" FieldPath [ "=" Segments ] "}" ;
|
|
248
|
+
FieldPath = IDENT { "." IDENT } ;
|
|
249
|
+
Verb = ":" LITERAL ;
|
|
250
|
+
|
|
251
|
+
The syntax `*` matches a single URL path segment. The syntax `**` matches
|
|
252
|
+
zero or more URL path segments, which must be the last part of the URL path
|
|
253
|
+
except the `Verb`.
|
|
254
|
+
|
|
255
|
+
The syntax `Variable` matches part of the URL path as specified by its
|
|
256
|
+
template. A variable template must not contain other variables. If a variable
|
|
257
|
+
matches a single path segment, its template may be omitted, e.g. `{var}`
|
|
258
|
+
is equivalent to `{var=*}`.
|
|
259
|
+
|
|
260
|
+
The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
|
|
261
|
+
contains any reserved character, such characters should be percent-encoded
|
|
262
|
+
before the matching.
|
|
263
|
+
|
|
264
|
+
If a variable contains exactly one path segment, such as `"{var}"` or
|
|
265
|
+
`"{var=*}"`, when such a variable is expanded into a URL path on the client
|
|
266
|
+
side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
|
|
267
|
+
server side does the reverse decoding. Such variables show up in the
|
|
268
|
+
[Discovery
|
|
269
|
+
Document](https://developers.google.com/discovery/v1/reference/apis) as
|
|
270
|
+
`{var}`.
|
|
271
|
+
|
|
272
|
+
If a variable contains multiple path segments, such as `"{var=foo/*}"`
|
|
273
|
+
or `"{var=**}"`, when such a variable is expanded into a URL path on the
|
|
274
|
+
client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
|
|
275
|
+
The server side does the reverse decoding, except "%2F" and "%2f" are left
|
|
276
|
+
unchanged. Such variables show up in the
|
|
277
|
+
[Discovery
|
|
278
|
+
Document](https://developers.google.com/discovery/v1/reference/apis) as
|
|
279
|
+
`{+var}`.
|
|
280
|
+
|
|
281
|
+
Using gRPC API Service Configuration
|
|
282
|
+
|
|
283
|
+
gRPC API Service Configuration (service config) is a configuration language
|
|
284
|
+
for configuring a gRPC service to become a user-facing product. The
|
|
285
|
+
service config is simply the YAML representation of the `google.api.Service`
|
|
286
|
+
proto message.
|
|
287
|
+
|
|
288
|
+
As an alternative to annotating your proto file, you can configure gRPC
|
|
289
|
+
transcoding in your service config YAML files. You do this by specifying a
|
|
290
|
+
`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
|
|
291
|
+
effect as the proto annotation. This can be particularly useful if you
|
|
292
|
+
have a proto that is reused in multiple services. Note that any transcoding
|
|
293
|
+
specified in the service config will override any matching transcoding
|
|
294
|
+
configuration in the proto.
|
|
295
|
+
|
|
296
|
+
The following example selects a gRPC method and applies an `HttpRule` to it:
|
|
297
|
+
|
|
298
|
+
http:
|
|
299
|
+
rules:
|
|
300
|
+
- selector: example.v1.Messaging.GetMessage
|
|
301
|
+
get: /v1/messages/{message_id}/{sub.subfield}
|
|
302
|
+
|
|
303
|
+
Special notes
|
|
304
|
+
|
|
305
|
+
When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
|
|
306
|
+
proto to JSON conversion must follow the [proto3
|
|
307
|
+
specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
|
|
308
|
+
|
|
309
|
+
While the single segment variable follows the semantics of
|
|
310
|
+
[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
|
|
311
|
+
Expansion, the multi segment variable **does not** follow RFC 6570 Section
|
|
312
|
+
3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
|
|
313
|
+
does not expand special characters like `?` and `#`, which would lead
|
|
314
|
+
to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
|
|
315
|
+
for multi segment variables.
|
|
316
|
+
|
|
317
|
+
The path variables **must not** refer to any repeated or mapped field,
|
|
318
|
+
because client libraries are not capable of handling such variable expansion.
|
|
319
|
+
|
|
320
|
+
The path variables **must not** capture the leading "/" character. The reason
|
|
321
|
+
is that the most common use case "{var}" does not capture the leading "/"
|
|
322
|
+
character. For consistency, all path variables must share the same behavior.
|
|
323
|
+
|
|
324
|
+
Repeated message fields must not be mapped to URL query parameters, because
|
|
325
|
+
no client library can support such complicated mapping.
|
|
326
|
+
|
|
327
|
+
If an API needs to use a JSON array for request or response body, it can map
|
|
328
|
+
the request or response body to a repeated field. However, some gRPC
|
|
329
|
+
Transcoding implementations may not support this feature.
|
|
330
|
+
"""
|
|
331
|
+
|
|
332
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
333
|
+
|
|
334
|
+
SELECTOR_FIELD_NUMBER: builtins.int
|
|
335
|
+
GET_FIELD_NUMBER: builtins.int
|
|
336
|
+
PUT_FIELD_NUMBER: builtins.int
|
|
337
|
+
POST_FIELD_NUMBER: builtins.int
|
|
338
|
+
DELETE_FIELD_NUMBER: builtins.int
|
|
339
|
+
PATCH_FIELD_NUMBER: builtins.int
|
|
340
|
+
CUSTOM_FIELD_NUMBER: builtins.int
|
|
341
|
+
BODY_FIELD_NUMBER: builtins.int
|
|
342
|
+
RESPONSE_BODY_FIELD_NUMBER: builtins.int
|
|
343
|
+
ADDITIONAL_BINDINGS_FIELD_NUMBER: builtins.int
|
|
344
|
+
selector: builtins.str
|
|
345
|
+
"""Selects a method to which this rule applies.
|
|
346
|
+
|
|
347
|
+
Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
|
348
|
+
details.
|
|
349
|
+
"""
|
|
350
|
+
get: builtins.str
|
|
351
|
+
"""Maps to HTTP GET. Used for listing and getting information about
|
|
352
|
+
resources.
|
|
353
|
+
"""
|
|
354
|
+
put: builtins.str
|
|
355
|
+
"""Maps to HTTP PUT. Used for replacing a resource."""
|
|
356
|
+
post: builtins.str
|
|
357
|
+
"""Maps to HTTP POST. Used for creating a resource or performing an action."""
|
|
358
|
+
delete: builtins.str
|
|
359
|
+
"""Maps to HTTP DELETE. Used for deleting a resource."""
|
|
360
|
+
patch: builtins.str
|
|
361
|
+
"""Maps to HTTP PATCH. Used for updating a resource."""
|
|
362
|
+
body: builtins.str
|
|
363
|
+
"""The name of the request field whose value is mapped to the HTTP request
|
|
364
|
+
body, or `*` for mapping all request fields not captured by the path
|
|
365
|
+
pattern to the HTTP body, or omitted for not having any HTTP request body.
|
|
366
|
+
|
|
367
|
+
NOTE: the referred field must be present at the top-level of the request
|
|
368
|
+
message type.
|
|
369
|
+
"""
|
|
370
|
+
response_body: builtins.str
|
|
371
|
+
"""Optional. The name of the response field whose value is mapped to the HTTP
|
|
372
|
+
response body. When omitted, the entire response message will be used
|
|
373
|
+
as the HTTP response body.
|
|
374
|
+
|
|
375
|
+
NOTE: The referred field must be present at the top-level of the response
|
|
376
|
+
message type.
|
|
377
|
+
"""
|
|
378
|
+
@property
|
|
379
|
+
def custom(self) -> global___CustomHttpPattern:
|
|
380
|
+
"""The custom pattern is used for specifying an HTTP method that is not
|
|
381
|
+
included in the `pattern` field, such as HEAD, or "*" to leave the
|
|
382
|
+
HTTP method unspecified for this rule. The wild-card rule is useful
|
|
383
|
+
for services that provide content to Web (HTML) clients.
|
|
384
|
+
"""
|
|
385
|
+
|
|
386
|
+
@property
|
|
387
|
+
def additional_bindings(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___HttpRule]:
|
|
388
|
+
"""Additional HTTP bindings for the selector. Nested bindings must
|
|
389
|
+
not contain an `additional_bindings` field themselves (that is,
|
|
390
|
+
the nesting may only be one level deep).
|
|
391
|
+
"""
|
|
392
|
+
|
|
393
|
+
def __init__(
|
|
394
|
+
self,
|
|
395
|
+
*,
|
|
396
|
+
selector: builtins.str = ...,
|
|
397
|
+
get: builtins.str = ...,
|
|
398
|
+
put: builtins.str = ...,
|
|
399
|
+
post: builtins.str = ...,
|
|
400
|
+
delete: builtins.str = ...,
|
|
401
|
+
patch: builtins.str = ...,
|
|
402
|
+
custom: global___CustomHttpPattern | None = ...,
|
|
403
|
+
body: builtins.str = ...,
|
|
404
|
+
response_body: builtins.str = ...,
|
|
405
|
+
additional_bindings: collections.abc.Iterable[global___HttpRule] | None = ...,
|
|
406
|
+
) -> None: ...
|
|
407
|
+
def HasField(self, field_name: typing.Literal["custom", b"custom", "delete", b"delete", "get", b"get", "patch", b"patch", "pattern", b"pattern", "post", b"post", "put", b"put"]) -> builtins.bool: ...
|
|
408
|
+
def ClearField(self, field_name: typing.Literal["additional_bindings", b"additional_bindings", "body", b"body", "custom", b"custom", "delete", b"delete", "get", b"get", "patch", b"patch", "pattern", b"pattern", "post", b"post", "put", b"put", "response_body", b"response_body", "selector", b"selector"]) -> None: ...
|
|
409
|
+
def WhichOneof(self, oneof_group: typing.Literal["pattern", b"pattern"]) -> typing.Literal["get", "put", "post", "delete", "patch", "custom"] | None: ...
|
|
410
|
+
|
|
411
|
+
global___HttpRule = HttpRule
|
|
412
|
+
|
|
413
|
+
@typing.final
|
|
414
|
+
class CustomHttpPattern(google.protobuf.message.Message):
|
|
415
|
+
"""A custom pattern is used for defining custom HTTP verb."""
|
|
416
|
+
|
|
417
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
418
|
+
|
|
419
|
+
KIND_FIELD_NUMBER: builtins.int
|
|
420
|
+
PATH_FIELD_NUMBER: builtins.int
|
|
421
|
+
kind: builtins.str
|
|
422
|
+
"""The name of this custom HTTP verb."""
|
|
423
|
+
path: builtins.str
|
|
424
|
+
"""The path matched by this custom verb."""
|
|
425
|
+
def __init__(
|
|
426
|
+
self,
|
|
427
|
+
*,
|
|
428
|
+
kind: builtins.str = ...,
|
|
429
|
+
path: builtins.str = ...,
|
|
430
|
+
) -> None: ...
|
|
431
|
+
def ClearField(self, field_name: typing.Literal["kind", b"kind", "path", b"path"]) -> None: ...
|
|
432
|
+
|
|
433
|
+
global___CustomHttpPattern = CustomHttpPattern
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
Copyright 2024 Google LLC
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License.
|
|
8
|
+
You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import abc
|
|
20
|
+
import collections.abc
|
|
21
|
+
import grpc
|
|
22
|
+
import grpc.aio
|
|
23
|
+
import typing
|
|
24
|
+
|
|
25
|
+
_T = typing.TypeVar("_T")
|
|
26
|
+
|
|
27
|
+
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
|
|
28
|
+
|
|
29
|
+
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
|
|
30
|
+
...
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: protoc-gen-openapiv2/options/annotations.proto
|
|
4
|
+
# Protobuf Python Version: 5.26.1
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
|
|
16
|
+
from protoc_gen_openapiv2.options import openapiv2_pb2 as protoc__gen__openapiv2_dot_options_dot_openapiv2__pb2
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.protoc-gen-openapiv2/options/annotations.proto\x12)grpc.gateway.protoc_gen_openapiv2.options\x1a google/protobuf/descriptor.proto\x1a,protoc-gen-openapiv2/options/openapiv2.proto:~\n\x11openapiv2_swagger\x12\x1c.google.protobuf.FileOptions\x18\x92\x08 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.SwaggerR\x10openapiv2Swagger:\x86\x01\n\x13openapiv2_operation\x12\x1e.google.protobuf.MethodOptions\x18\x92\x08 \x01(\x0b\x32\x34.grpc.gateway.protoc_gen_openapiv2.options.OperationR\x12openapiv2Operation:~\n\x10openapiv2_schema\x12\x1f.google.protobuf.MessageOptions\x18\x92\x08 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.SchemaR\x0fopenapiv2Schema:u\n\ropenapiv2_tag\x12\x1f.google.protobuf.ServiceOptions\x18\x92\x08 \x01(\x0b\x32..grpc.gateway.protoc_gen_openapiv2.options.TagR\x0copenapiv2Tag:~\n\x0fopenapiv2_field\x12\x1d.google.protobuf.FieldOptions\x18\x92\x08 \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaR\x0eopenapiv2FieldB\xc9\x02\n-com.grpc.gateway.protoc_gen_openapiv2.optionsB\x10\x41nnotationsProtoP\x01ZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options\xa2\x02\x04GGPO\xaa\x02\'Grpc.Gateway.ProtocGenOpenapiv2.Options\xca\x02\'Grpc\\Gateway\\ProtocGenOpenapiv2\\Options\xe2\x02\x33Grpc\\Gateway\\ProtocGenOpenapiv2\\Options\\GPBMetadata\xea\x02*Grpc::Gateway::ProtocGenOpenapiv2::Optionsb\x06proto3')
|
|
20
|
+
|
|
21
|
+
_globals = globals()
|
|
22
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
23
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protoc_gen_openapiv2.options.annotations_pb2', _globals)
|
|
24
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
25
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
26
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n-com.grpc.gateway.protoc_gen_openapiv2.optionsB\020AnnotationsProtoP\001ZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options\242\002\004GGPO\252\002\'Grpc.Gateway.ProtocGenOpenapiv2.Options\312\002\'Grpc\\Gateway\\ProtocGenOpenapiv2\\Options\342\0023Grpc\\Gateway\\ProtocGenOpenapiv2\\Options\\GPBMetadata\352\002*Grpc::Gateway::ProtocGenOpenapiv2::Options'
|
|
27
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import builtins
|
|
7
|
+
import google.protobuf.descriptor
|
|
8
|
+
import google.protobuf.descriptor_pb2
|
|
9
|
+
import google.protobuf.internal.extension_dict
|
|
10
|
+
import protoc_gen_openapiv2.options.openapiv2_pb2
|
|
11
|
+
|
|
12
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
13
|
+
|
|
14
|
+
OPENAPIV2_SWAGGER_FIELD_NUMBER: builtins.int
|
|
15
|
+
OPENAPIV2_OPERATION_FIELD_NUMBER: builtins.int
|
|
16
|
+
OPENAPIV2_SCHEMA_FIELD_NUMBER: builtins.int
|
|
17
|
+
OPENAPIV2_TAG_FIELD_NUMBER: builtins.int
|
|
18
|
+
OPENAPIV2_FIELD_FIELD_NUMBER: builtins.int
|
|
19
|
+
openapiv2_swagger: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FileOptions, protoc_gen_openapiv2.options.openapiv2_pb2.Swagger]
|
|
20
|
+
"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
|
21
|
+
|
|
22
|
+
All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
|
23
|
+
different descriptor messages.
|
|
24
|
+
"""
|
|
25
|
+
openapiv2_operation: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.MethodOptions, protoc_gen_openapiv2.options.openapiv2_pb2.Operation]
|
|
26
|
+
"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
|
27
|
+
|
|
28
|
+
All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
|
29
|
+
different descriptor messages.
|
|
30
|
+
"""
|
|
31
|
+
openapiv2_schema: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.MessageOptions, protoc_gen_openapiv2.options.openapiv2_pb2.Schema]
|
|
32
|
+
"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
|
33
|
+
|
|
34
|
+
All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
|
35
|
+
different descriptor messages.
|
|
36
|
+
"""
|
|
37
|
+
openapiv2_tag: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.ServiceOptions, protoc_gen_openapiv2.options.openapiv2_pb2.Tag]
|
|
38
|
+
"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
|
39
|
+
|
|
40
|
+
All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
|
41
|
+
different descriptor messages.
|
|
42
|
+
"""
|
|
43
|
+
openapiv2_field: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FieldOptions, protoc_gen_openapiv2.options.openapiv2_pb2.JSONSchema]
|
|
44
|
+
"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
|
45
|
+
|
|
46
|
+
All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
|
47
|
+
different descriptor messages.
|
|
48
|
+
"""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import abc
|
|
7
|
+
import collections.abc
|
|
8
|
+
import grpc
|
|
9
|
+
import grpc.aio
|
|
10
|
+
import typing
|
|
11
|
+
|
|
12
|
+
_T = typing.TypeVar("_T")
|
|
13
|
+
|
|
14
|
+
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
|
|
15
|
+
|
|
16
|
+
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
|
|
17
|
+
...
|