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
|
@@ -0,0 +1,1533 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import builtins
|
|
7
|
+
import collections.abc
|
|
8
|
+
import google.protobuf.descriptor
|
|
9
|
+
import google.protobuf.internal.containers
|
|
10
|
+
import google.protobuf.internal.enum_type_wrapper
|
|
11
|
+
import google.protobuf.message
|
|
12
|
+
import google.protobuf.struct_pb2
|
|
13
|
+
import sys
|
|
14
|
+
import typing
|
|
15
|
+
|
|
16
|
+
if sys.version_info >= (3, 10):
|
|
17
|
+
import typing as typing_extensions
|
|
18
|
+
else:
|
|
19
|
+
import typing_extensions
|
|
20
|
+
|
|
21
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
22
|
+
|
|
23
|
+
class _Scheme:
|
|
24
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
25
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
26
|
+
|
|
27
|
+
class _SchemeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Scheme.ValueType], builtins.type):
|
|
28
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
29
|
+
UNKNOWN: _Scheme.ValueType # 0
|
|
30
|
+
HTTP: _Scheme.ValueType # 1
|
|
31
|
+
HTTPS: _Scheme.ValueType # 2
|
|
32
|
+
WS: _Scheme.ValueType # 3
|
|
33
|
+
WSS: _Scheme.ValueType # 4
|
|
34
|
+
|
|
35
|
+
class Scheme(_Scheme, metaclass=_SchemeEnumTypeWrapper):
|
|
36
|
+
"""Scheme describes the schemes supported by the OpenAPI Swagger
|
|
37
|
+
and Operation objects.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
UNKNOWN: Scheme.ValueType # 0
|
|
41
|
+
HTTP: Scheme.ValueType # 1
|
|
42
|
+
HTTPS: Scheme.ValueType # 2
|
|
43
|
+
WS: Scheme.ValueType # 3
|
|
44
|
+
WSS: Scheme.ValueType # 4
|
|
45
|
+
global___Scheme = Scheme
|
|
46
|
+
|
|
47
|
+
@typing.final
|
|
48
|
+
class Swagger(google.protobuf.message.Message):
|
|
49
|
+
"""`Swagger` is a representation of OpenAPI v2 specification's Swagger object.
|
|
50
|
+
|
|
51
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
|
|
52
|
+
|
|
53
|
+
Example:
|
|
54
|
+
|
|
55
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
56
|
+
info: {
|
|
57
|
+
title: "Echo API";
|
|
58
|
+
version: "1.0";
|
|
59
|
+
description: "";
|
|
60
|
+
contact: {
|
|
61
|
+
name: "gRPC-Gateway project";
|
|
62
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
63
|
+
email: "none@example.com";
|
|
64
|
+
};
|
|
65
|
+
license: {
|
|
66
|
+
name: "BSD 3-Clause License";
|
|
67
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
schemes: HTTPS;
|
|
71
|
+
consumes: "application/json";
|
|
72
|
+
produces: "application/json";
|
|
73
|
+
};
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
77
|
+
|
|
78
|
+
@typing.final
|
|
79
|
+
class ResponsesEntry(google.protobuf.message.Message):
|
|
80
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
81
|
+
|
|
82
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
83
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
84
|
+
key: builtins.str
|
|
85
|
+
@property
|
|
86
|
+
def value(self) -> global___Response: ...
|
|
87
|
+
def __init__(
|
|
88
|
+
self,
|
|
89
|
+
*,
|
|
90
|
+
key: builtins.str = ...,
|
|
91
|
+
value: global___Response | None = ...,
|
|
92
|
+
) -> None: ...
|
|
93
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
94
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
95
|
+
|
|
96
|
+
@typing.final
|
|
97
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
98
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
99
|
+
|
|
100
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
101
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
102
|
+
key: builtins.str
|
|
103
|
+
@property
|
|
104
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
105
|
+
def __init__(
|
|
106
|
+
self,
|
|
107
|
+
*,
|
|
108
|
+
key: builtins.str = ...,
|
|
109
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
110
|
+
) -> None: ...
|
|
111
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
112
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
113
|
+
|
|
114
|
+
SWAGGER_FIELD_NUMBER: builtins.int
|
|
115
|
+
INFO_FIELD_NUMBER: builtins.int
|
|
116
|
+
HOST_FIELD_NUMBER: builtins.int
|
|
117
|
+
BASE_PATH_FIELD_NUMBER: builtins.int
|
|
118
|
+
SCHEMES_FIELD_NUMBER: builtins.int
|
|
119
|
+
CONSUMES_FIELD_NUMBER: builtins.int
|
|
120
|
+
PRODUCES_FIELD_NUMBER: builtins.int
|
|
121
|
+
RESPONSES_FIELD_NUMBER: builtins.int
|
|
122
|
+
SECURITY_DEFINITIONS_FIELD_NUMBER: builtins.int
|
|
123
|
+
SECURITY_FIELD_NUMBER: builtins.int
|
|
124
|
+
TAGS_FIELD_NUMBER: builtins.int
|
|
125
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
126
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
127
|
+
swagger: builtins.str
|
|
128
|
+
"""Specifies the OpenAPI Specification version being used. It can be
|
|
129
|
+
used by the OpenAPI UI and other clients to interpret the API listing. The
|
|
130
|
+
value MUST be "2.0".
|
|
131
|
+
"""
|
|
132
|
+
host: builtins.str
|
|
133
|
+
"""The host (name or ip) serving the API. This MUST be the host only and does
|
|
134
|
+
not include the scheme nor sub-paths. It MAY include a port. If the host is
|
|
135
|
+
not included, the host serving the documentation is to be used (including
|
|
136
|
+
the port). The host does not support path templating.
|
|
137
|
+
"""
|
|
138
|
+
base_path: builtins.str
|
|
139
|
+
"""The base path on which the API is served, which is relative to the host. If
|
|
140
|
+
it is not included, the API is served directly under the host. The value
|
|
141
|
+
MUST start with a leading slash (/). The basePath does not support path
|
|
142
|
+
templating.
|
|
143
|
+
Note that using `base_path` does not change the endpoint paths that are
|
|
144
|
+
generated in the resulting OpenAPI file. If you wish to use `base_path`
|
|
145
|
+
with relatively generated OpenAPI paths, the `base_path` prefix must be
|
|
146
|
+
manually removed from your `google.api.http` paths and your code changed to
|
|
147
|
+
serve the API from the `base_path`.
|
|
148
|
+
"""
|
|
149
|
+
@property
|
|
150
|
+
def info(self) -> global___Info:
|
|
151
|
+
"""Provides metadata about the API. The metadata can be used by the
|
|
152
|
+
clients if needed.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
@property
|
|
156
|
+
def schemes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Scheme.ValueType]:
|
|
157
|
+
"""The transfer protocol of the API. Values MUST be from the list: "http",
|
|
158
|
+
"https", "ws", "wss". If the schemes is not included, the default scheme to
|
|
159
|
+
be used is the one used to access the OpenAPI definition itself.
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def consumes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
164
|
+
"""A list of MIME types the APIs can consume. This is global to all APIs but
|
|
165
|
+
can be overridden on specific API calls. Value MUST be as described under
|
|
166
|
+
Mime Types.
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def produces(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
171
|
+
"""A list of MIME types the APIs can produce. This is global to all APIs but
|
|
172
|
+
can be overridden on specific API calls. Value MUST be as described under
|
|
173
|
+
Mime Types.
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def responses(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Response]:
|
|
178
|
+
"""An object to hold responses that can be used across operations. This
|
|
179
|
+
property does not define global responses for all operations.
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
@property
|
|
183
|
+
def security_definitions(self) -> global___SecurityDefinitions:
|
|
184
|
+
"""Security scheme definitions that can be used across the specification."""
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def security(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SecurityRequirement]:
|
|
188
|
+
"""A declaration of which security schemes are applied for the API as a whole.
|
|
189
|
+
The list of values describes alternative security schemes that can be used
|
|
190
|
+
(that is, there is a logical OR between the security requirements).
|
|
191
|
+
Individual operations can override this definition.
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def tags(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Tag]:
|
|
196
|
+
"""A list of tags for API documentation control. Tags can be used for logical
|
|
197
|
+
grouping of operations by resources or any other qualifier.
|
|
198
|
+
"""
|
|
199
|
+
|
|
200
|
+
@property
|
|
201
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
202
|
+
"""Additional external documentation."""
|
|
203
|
+
|
|
204
|
+
@property
|
|
205
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
206
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
207
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
208
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
209
|
+
"""
|
|
210
|
+
|
|
211
|
+
def __init__(
|
|
212
|
+
self,
|
|
213
|
+
*,
|
|
214
|
+
swagger: builtins.str = ...,
|
|
215
|
+
info: global___Info | None = ...,
|
|
216
|
+
host: builtins.str = ...,
|
|
217
|
+
base_path: builtins.str = ...,
|
|
218
|
+
schemes: collections.abc.Iterable[global___Scheme.ValueType] | None = ...,
|
|
219
|
+
consumes: collections.abc.Iterable[builtins.str] | None = ...,
|
|
220
|
+
produces: collections.abc.Iterable[builtins.str] | None = ...,
|
|
221
|
+
responses: collections.abc.Mapping[builtins.str, global___Response] | None = ...,
|
|
222
|
+
security_definitions: global___SecurityDefinitions | None = ...,
|
|
223
|
+
security: collections.abc.Iterable[global___SecurityRequirement] | None = ...,
|
|
224
|
+
tags: collections.abc.Iterable[global___Tag] | None = ...,
|
|
225
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
226
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
227
|
+
) -> None: ...
|
|
228
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs", "info", b"info", "security_definitions", b"security_definitions"]) -> builtins.bool: ...
|
|
229
|
+
def ClearField(self, field_name: typing.Literal["base_path", b"base_path", "consumes", b"consumes", "extensions", b"extensions", "external_docs", b"external_docs", "host", b"host", "info", b"info", "produces", b"produces", "responses", b"responses", "schemes", b"schemes", "security", b"security", "security_definitions", b"security_definitions", "swagger", b"swagger", "tags", b"tags"]) -> None: ...
|
|
230
|
+
|
|
231
|
+
global___Swagger = Swagger
|
|
232
|
+
|
|
233
|
+
@typing.final
|
|
234
|
+
class Operation(google.protobuf.message.Message):
|
|
235
|
+
"""`Operation` is a representation of OpenAPI v2 specification's Operation object.
|
|
236
|
+
|
|
237
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
|
|
238
|
+
|
|
239
|
+
Example:
|
|
240
|
+
|
|
241
|
+
service EchoService {
|
|
242
|
+
rpc Echo(SimpleMessage) returns (SimpleMessage) {
|
|
243
|
+
option (google.api.http) = {
|
|
244
|
+
get: "/v1/example/echo/{id}"
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
248
|
+
summary: "Get a message.";
|
|
249
|
+
operation_id: "getMessage";
|
|
250
|
+
tags: "echo";
|
|
251
|
+
responses: {
|
|
252
|
+
key: "200"
|
|
253
|
+
value: {
|
|
254
|
+
description: "OK";
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
"""
|
|
261
|
+
|
|
262
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
263
|
+
|
|
264
|
+
@typing.final
|
|
265
|
+
class ResponsesEntry(google.protobuf.message.Message):
|
|
266
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
267
|
+
|
|
268
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
269
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
270
|
+
key: builtins.str
|
|
271
|
+
@property
|
|
272
|
+
def value(self) -> global___Response: ...
|
|
273
|
+
def __init__(
|
|
274
|
+
self,
|
|
275
|
+
*,
|
|
276
|
+
key: builtins.str = ...,
|
|
277
|
+
value: global___Response | None = ...,
|
|
278
|
+
) -> None: ...
|
|
279
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
280
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
281
|
+
|
|
282
|
+
@typing.final
|
|
283
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
284
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
285
|
+
|
|
286
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
287
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
288
|
+
key: builtins.str
|
|
289
|
+
@property
|
|
290
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
291
|
+
def __init__(
|
|
292
|
+
self,
|
|
293
|
+
*,
|
|
294
|
+
key: builtins.str = ...,
|
|
295
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
296
|
+
) -> None: ...
|
|
297
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
298
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
299
|
+
|
|
300
|
+
TAGS_FIELD_NUMBER: builtins.int
|
|
301
|
+
SUMMARY_FIELD_NUMBER: builtins.int
|
|
302
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
303
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
304
|
+
OPERATION_ID_FIELD_NUMBER: builtins.int
|
|
305
|
+
CONSUMES_FIELD_NUMBER: builtins.int
|
|
306
|
+
PRODUCES_FIELD_NUMBER: builtins.int
|
|
307
|
+
RESPONSES_FIELD_NUMBER: builtins.int
|
|
308
|
+
SCHEMES_FIELD_NUMBER: builtins.int
|
|
309
|
+
DEPRECATED_FIELD_NUMBER: builtins.int
|
|
310
|
+
SECURITY_FIELD_NUMBER: builtins.int
|
|
311
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
312
|
+
PARAMETERS_FIELD_NUMBER: builtins.int
|
|
313
|
+
summary: builtins.str
|
|
314
|
+
"""A short summary of what the operation does. For maximum readability in the
|
|
315
|
+
swagger-ui, this field SHOULD be less than 120 characters.
|
|
316
|
+
"""
|
|
317
|
+
description: builtins.str
|
|
318
|
+
"""A verbose explanation of the operation behavior. GFM syntax can be used for
|
|
319
|
+
rich text representation.
|
|
320
|
+
"""
|
|
321
|
+
operation_id: builtins.str
|
|
322
|
+
"""Unique string used to identify the operation. The id MUST be unique among
|
|
323
|
+
all operations described in the API. Tools and libraries MAY use the
|
|
324
|
+
operationId to uniquely identify an operation, therefore, it is recommended
|
|
325
|
+
to follow common programming naming conventions.
|
|
326
|
+
"""
|
|
327
|
+
deprecated: builtins.bool
|
|
328
|
+
"""Declares this operation to be deprecated. Usage of the declared operation
|
|
329
|
+
should be refrained. Default value is false.
|
|
330
|
+
"""
|
|
331
|
+
@property
|
|
332
|
+
def tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
333
|
+
"""A list of tags for API documentation control. Tags can be used for logical
|
|
334
|
+
grouping of operations by resources or any other qualifier.
|
|
335
|
+
"""
|
|
336
|
+
|
|
337
|
+
@property
|
|
338
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
339
|
+
"""Additional external documentation for this operation."""
|
|
340
|
+
|
|
341
|
+
@property
|
|
342
|
+
def consumes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
343
|
+
"""A list of MIME types the operation can consume. This overrides the consumes
|
|
344
|
+
definition at the OpenAPI Object. An empty value MAY be used to clear the
|
|
345
|
+
global definition. Value MUST be as described under Mime Types.
|
|
346
|
+
"""
|
|
347
|
+
|
|
348
|
+
@property
|
|
349
|
+
def produces(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
350
|
+
"""A list of MIME types the operation can produce. This overrides the produces
|
|
351
|
+
definition at the OpenAPI Object. An empty value MAY be used to clear the
|
|
352
|
+
global definition. Value MUST be as described under Mime Types.
|
|
353
|
+
"""
|
|
354
|
+
|
|
355
|
+
@property
|
|
356
|
+
def responses(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Response]:
|
|
357
|
+
"""The list of possible responses as they are returned from executing this
|
|
358
|
+
operation.
|
|
359
|
+
"""
|
|
360
|
+
|
|
361
|
+
@property
|
|
362
|
+
def schemes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Scheme.ValueType]:
|
|
363
|
+
"""The transfer protocol for the operation. Values MUST be from the list:
|
|
364
|
+
"http", "https", "ws", "wss". The value overrides the OpenAPI Object
|
|
365
|
+
schemes definition.
|
|
366
|
+
"""
|
|
367
|
+
|
|
368
|
+
@property
|
|
369
|
+
def security(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SecurityRequirement]:
|
|
370
|
+
"""A declaration of which security schemes are applied for this operation. The
|
|
371
|
+
list of values describes alternative security schemes that can be used
|
|
372
|
+
(that is, there is a logical OR between the security requirements). This
|
|
373
|
+
definition overrides any declared top-level security. To remove a top-level
|
|
374
|
+
security declaration, an empty array can be used.
|
|
375
|
+
"""
|
|
376
|
+
|
|
377
|
+
@property
|
|
378
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
379
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
380
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
381
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
382
|
+
"""
|
|
383
|
+
|
|
384
|
+
@property
|
|
385
|
+
def parameters(self) -> global___Parameters:
|
|
386
|
+
"""Custom parameters such as HTTP request headers.
|
|
387
|
+
See: https://swagger.io/docs/specification/2-0/describing-parameters/
|
|
388
|
+
and https://swagger.io/specification/v2/#parameter-object.
|
|
389
|
+
"""
|
|
390
|
+
|
|
391
|
+
def __init__(
|
|
392
|
+
self,
|
|
393
|
+
*,
|
|
394
|
+
tags: collections.abc.Iterable[builtins.str] | None = ...,
|
|
395
|
+
summary: builtins.str = ...,
|
|
396
|
+
description: builtins.str = ...,
|
|
397
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
398
|
+
operation_id: builtins.str = ...,
|
|
399
|
+
consumes: collections.abc.Iterable[builtins.str] | None = ...,
|
|
400
|
+
produces: collections.abc.Iterable[builtins.str] | None = ...,
|
|
401
|
+
responses: collections.abc.Mapping[builtins.str, global___Response] | None = ...,
|
|
402
|
+
schemes: collections.abc.Iterable[global___Scheme.ValueType] | None = ...,
|
|
403
|
+
deprecated: builtins.bool = ...,
|
|
404
|
+
security: collections.abc.Iterable[global___SecurityRequirement] | None = ...,
|
|
405
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
406
|
+
parameters: global___Parameters | None = ...,
|
|
407
|
+
) -> None: ...
|
|
408
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs", "parameters", b"parameters"]) -> builtins.bool: ...
|
|
409
|
+
def ClearField(self, field_name: typing.Literal["consumes", b"consumes", "deprecated", b"deprecated", "description", b"description", "extensions", b"extensions", "external_docs", b"external_docs", "operation_id", b"operation_id", "parameters", b"parameters", "produces", b"produces", "responses", b"responses", "schemes", b"schemes", "security", b"security", "summary", b"summary", "tags", b"tags"]) -> None: ...
|
|
410
|
+
|
|
411
|
+
global___Operation = Operation
|
|
412
|
+
|
|
413
|
+
@typing.final
|
|
414
|
+
class Parameters(google.protobuf.message.Message):
|
|
415
|
+
"""`Parameters` is a representation of OpenAPI v2 specification's parameters object.
|
|
416
|
+
Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
|
|
417
|
+
allow header parameters to be set here since we do not want users specifying custom non-header
|
|
418
|
+
parameters beyond those inferred from the Protobuf schema.
|
|
419
|
+
See: https://swagger.io/specification/v2/#parameter-object
|
|
420
|
+
"""
|
|
421
|
+
|
|
422
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
423
|
+
|
|
424
|
+
HEADERS_FIELD_NUMBER: builtins.int
|
|
425
|
+
@property
|
|
426
|
+
def headers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___HeaderParameter]:
|
|
427
|
+
"""`Headers` is one or more HTTP header parameter.
|
|
428
|
+
See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
|
|
429
|
+
"""
|
|
430
|
+
|
|
431
|
+
def __init__(
|
|
432
|
+
self,
|
|
433
|
+
*,
|
|
434
|
+
headers: collections.abc.Iterable[global___HeaderParameter] | None = ...,
|
|
435
|
+
) -> None: ...
|
|
436
|
+
def ClearField(self, field_name: typing.Literal["headers", b"headers"]) -> None: ...
|
|
437
|
+
|
|
438
|
+
global___Parameters = Parameters
|
|
439
|
+
|
|
440
|
+
@typing.final
|
|
441
|
+
class HeaderParameter(google.protobuf.message.Message):
|
|
442
|
+
"""`HeaderParameter` a HTTP header parameter.
|
|
443
|
+
See: https://swagger.io/specification/v2/#parameter-object
|
|
444
|
+
"""
|
|
445
|
+
|
|
446
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
447
|
+
|
|
448
|
+
class _Type:
|
|
449
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
450
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
451
|
+
|
|
452
|
+
class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[HeaderParameter._Type.ValueType], builtins.type):
|
|
453
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
454
|
+
UNKNOWN: HeaderParameter._Type.ValueType # 0
|
|
455
|
+
STRING: HeaderParameter._Type.ValueType # 1
|
|
456
|
+
NUMBER: HeaderParameter._Type.ValueType # 2
|
|
457
|
+
INTEGER: HeaderParameter._Type.ValueType # 3
|
|
458
|
+
BOOLEAN: HeaderParameter._Type.ValueType # 4
|
|
459
|
+
|
|
460
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper):
|
|
461
|
+
"""`Type` is a supported HTTP header type.
|
|
462
|
+
See https://swagger.io/specification/v2/#parameterType.
|
|
463
|
+
"""
|
|
464
|
+
|
|
465
|
+
UNKNOWN: HeaderParameter.Type.ValueType # 0
|
|
466
|
+
STRING: HeaderParameter.Type.ValueType # 1
|
|
467
|
+
NUMBER: HeaderParameter.Type.ValueType # 2
|
|
468
|
+
INTEGER: HeaderParameter.Type.ValueType # 3
|
|
469
|
+
BOOLEAN: HeaderParameter.Type.ValueType # 4
|
|
470
|
+
|
|
471
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
472
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
473
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
474
|
+
FORMAT_FIELD_NUMBER: builtins.int
|
|
475
|
+
REQUIRED_FIELD_NUMBER: builtins.int
|
|
476
|
+
name: builtins.str
|
|
477
|
+
"""`Name` is the header name."""
|
|
478
|
+
description: builtins.str
|
|
479
|
+
"""`Description` is a short description of the header."""
|
|
480
|
+
type: global___HeaderParameter.Type.ValueType
|
|
481
|
+
"""`Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
|
|
482
|
+
See: https://swagger.io/specification/v2/#parameterType.
|
|
483
|
+
"""
|
|
484
|
+
format: builtins.str
|
|
485
|
+
"""`Format` The extending format for the previously mentioned type."""
|
|
486
|
+
required: builtins.bool
|
|
487
|
+
"""`Required` indicates if the header is optional"""
|
|
488
|
+
def __init__(
|
|
489
|
+
self,
|
|
490
|
+
*,
|
|
491
|
+
name: builtins.str = ...,
|
|
492
|
+
description: builtins.str = ...,
|
|
493
|
+
type: global___HeaderParameter.Type.ValueType = ...,
|
|
494
|
+
format: builtins.str = ...,
|
|
495
|
+
required: builtins.bool = ...,
|
|
496
|
+
) -> None: ...
|
|
497
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "format", b"format", "name", b"name", "required", b"required", "type", b"type"]) -> None: ...
|
|
498
|
+
|
|
499
|
+
global___HeaderParameter = HeaderParameter
|
|
500
|
+
|
|
501
|
+
@typing.final
|
|
502
|
+
class Header(google.protobuf.message.Message):
|
|
503
|
+
"""`Header` is a representation of OpenAPI v2 specification's Header object.
|
|
504
|
+
|
|
505
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
|
|
506
|
+
"""
|
|
507
|
+
|
|
508
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
509
|
+
|
|
510
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
511
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
512
|
+
FORMAT_FIELD_NUMBER: builtins.int
|
|
513
|
+
DEFAULT_FIELD_NUMBER: builtins.int
|
|
514
|
+
PATTERN_FIELD_NUMBER: builtins.int
|
|
515
|
+
description: builtins.str
|
|
516
|
+
"""`Description` is a short description of the header."""
|
|
517
|
+
type: builtins.str
|
|
518
|
+
"""The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported."""
|
|
519
|
+
format: builtins.str
|
|
520
|
+
"""`Format` The extending format for the previously mentioned type."""
|
|
521
|
+
default: builtins.str
|
|
522
|
+
"""`Default` Declares the value of the header that the server will use if none is provided.
|
|
523
|
+
See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
|
|
524
|
+
Unlike JSON Schema this value MUST conform to the defined type for the header.
|
|
525
|
+
"""
|
|
526
|
+
pattern: builtins.str
|
|
527
|
+
"""'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3."""
|
|
528
|
+
def __init__(
|
|
529
|
+
self,
|
|
530
|
+
*,
|
|
531
|
+
description: builtins.str = ...,
|
|
532
|
+
type: builtins.str = ...,
|
|
533
|
+
format: builtins.str = ...,
|
|
534
|
+
default: builtins.str = ...,
|
|
535
|
+
pattern: builtins.str = ...,
|
|
536
|
+
) -> None: ...
|
|
537
|
+
def ClearField(self, field_name: typing.Literal["default", b"default", "description", b"description", "format", b"format", "pattern", b"pattern", "type", b"type"]) -> None: ...
|
|
538
|
+
|
|
539
|
+
global___Header = Header
|
|
540
|
+
|
|
541
|
+
@typing.final
|
|
542
|
+
class Response(google.protobuf.message.Message):
|
|
543
|
+
"""`Response` is a representation of OpenAPI v2 specification's Response object.
|
|
544
|
+
|
|
545
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
|
|
546
|
+
"""
|
|
547
|
+
|
|
548
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
549
|
+
|
|
550
|
+
@typing.final
|
|
551
|
+
class HeadersEntry(google.protobuf.message.Message):
|
|
552
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
553
|
+
|
|
554
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
555
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
556
|
+
key: builtins.str
|
|
557
|
+
@property
|
|
558
|
+
def value(self) -> global___Header: ...
|
|
559
|
+
def __init__(
|
|
560
|
+
self,
|
|
561
|
+
*,
|
|
562
|
+
key: builtins.str = ...,
|
|
563
|
+
value: global___Header | None = ...,
|
|
564
|
+
) -> None: ...
|
|
565
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
566
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
567
|
+
|
|
568
|
+
@typing.final
|
|
569
|
+
class ExamplesEntry(google.protobuf.message.Message):
|
|
570
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
571
|
+
|
|
572
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
573
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
574
|
+
key: builtins.str
|
|
575
|
+
value: builtins.str
|
|
576
|
+
def __init__(
|
|
577
|
+
self,
|
|
578
|
+
*,
|
|
579
|
+
key: builtins.str = ...,
|
|
580
|
+
value: builtins.str = ...,
|
|
581
|
+
) -> None: ...
|
|
582
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
583
|
+
|
|
584
|
+
@typing.final
|
|
585
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
586
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
587
|
+
|
|
588
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
589
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
590
|
+
key: builtins.str
|
|
591
|
+
@property
|
|
592
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
593
|
+
def __init__(
|
|
594
|
+
self,
|
|
595
|
+
*,
|
|
596
|
+
key: builtins.str = ...,
|
|
597
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
598
|
+
) -> None: ...
|
|
599
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
600
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
601
|
+
|
|
602
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
603
|
+
SCHEMA_FIELD_NUMBER: builtins.int
|
|
604
|
+
HEADERS_FIELD_NUMBER: builtins.int
|
|
605
|
+
EXAMPLES_FIELD_NUMBER: builtins.int
|
|
606
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
607
|
+
description: builtins.str
|
|
608
|
+
"""`Description` is a short description of the response.
|
|
609
|
+
GFM syntax can be used for rich text representation.
|
|
610
|
+
"""
|
|
611
|
+
@property
|
|
612
|
+
def schema(self) -> global___Schema:
|
|
613
|
+
"""`Schema` optionally defines the structure of the response.
|
|
614
|
+
If `Schema` is not provided, it means there is no content to the response.
|
|
615
|
+
"""
|
|
616
|
+
|
|
617
|
+
@property
|
|
618
|
+
def headers(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Header]:
|
|
619
|
+
"""`Headers` A list of headers that are sent with the response.
|
|
620
|
+
`Header` name is expected to be a string in the canonical format of the MIME header key
|
|
621
|
+
See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
|
|
622
|
+
"""
|
|
623
|
+
|
|
624
|
+
@property
|
|
625
|
+
def examples(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
|
|
626
|
+
"""`Examples` gives per-mimetype response examples.
|
|
627
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
|
|
628
|
+
"""
|
|
629
|
+
|
|
630
|
+
@property
|
|
631
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
632
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
633
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
634
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
635
|
+
"""
|
|
636
|
+
|
|
637
|
+
def __init__(
|
|
638
|
+
self,
|
|
639
|
+
*,
|
|
640
|
+
description: builtins.str = ...,
|
|
641
|
+
schema: global___Schema | None = ...,
|
|
642
|
+
headers: collections.abc.Mapping[builtins.str, global___Header] | None = ...,
|
|
643
|
+
examples: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
|
|
644
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
645
|
+
) -> None: ...
|
|
646
|
+
def HasField(self, field_name: typing.Literal["schema", b"schema"]) -> builtins.bool: ...
|
|
647
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "examples", b"examples", "extensions", b"extensions", "headers", b"headers", "schema", b"schema"]) -> None: ...
|
|
648
|
+
|
|
649
|
+
global___Response = Response
|
|
650
|
+
|
|
651
|
+
@typing.final
|
|
652
|
+
class Info(google.protobuf.message.Message):
|
|
653
|
+
"""`Info` is a representation of OpenAPI v2 specification's Info object.
|
|
654
|
+
|
|
655
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
|
|
656
|
+
|
|
657
|
+
Example:
|
|
658
|
+
|
|
659
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
660
|
+
info: {
|
|
661
|
+
title: "Echo API";
|
|
662
|
+
version: "1.0";
|
|
663
|
+
description: "";
|
|
664
|
+
contact: {
|
|
665
|
+
name: "gRPC-Gateway project";
|
|
666
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
667
|
+
email: "none@example.com";
|
|
668
|
+
};
|
|
669
|
+
license: {
|
|
670
|
+
name: "BSD 3-Clause License";
|
|
671
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
...
|
|
675
|
+
};
|
|
676
|
+
"""
|
|
677
|
+
|
|
678
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
679
|
+
|
|
680
|
+
@typing.final
|
|
681
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
682
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
683
|
+
|
|
684
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
685
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
686
|
+
key: builtins.str
|
|
687
|
+
@property
|
|
688
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
689
|
+
def __init__(
|
|
690
|
+
self,
|
|
691
|
+
*,
|
|
692
|
+
key: builtins.str = ...,
|
|
693
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
694
|
+
) -> None: ...
|
|
695
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
696
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
697
|
+
|
|
698
|
+
TITLE_FIELD_NUMBER: builtins.int
|
|
699
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
700
|
+
TERMS_OF_SERVICE_FIELD_NUMBER: builtins.int
|
|
701
|
+
CONTACT_FIELD_NUMBER: builtins.int
|
|
702
|
+
LICENSE_FIELD_NUMBER: builtins.int
|
|
703
|
+
VERSION_FIELD_NUMBER: builtins.int
|
|
704
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
705
|
+
title: builtins.str
|
|
706
|
+
"""The title of the application."""
|
|
707
|
+
description: builtins.str
|
|
708
|
+
"""A short description of the application. GFM syntax can be used for rich
|
|
709
|
+
text representation.
|
|
710
|
+
"""
|
|
711
|
+
terms_of_service: builtins.str
|
|
712
|
+
"""The Terms of Service for the API."""
|
|
713
|
+
version: builtins.str
|
|
714
|
+
"""Provides the version of the application API (not to be confused
|
|
715
|
+
with the specification version).
|
|
716
|
+
"""
|
|
717
|
+
@property
|
|
718
|
+
def contact(self) -> global___Contact:
|
|
719
|
+
"""The contact information for the exposed API."""
|
|
720
|
+
|
|
721
|
+
@property
|
|
722
|
+
def license(self) -> global___License:
|
|
723
|
+
"""The license information for the exposed API."""
|
|
724
|
+
|
|
725
|
+
@property
|
|
726
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
727
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
728
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
729
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
730
|
+
"""
|
|
731
|
+
|
|
732
|
+
def __init__(
|
|
733
|
+
self,
|
|
734
|
+
*,
|
|
735
|
+
title: builtins.str = ...,
|
|
736
|
+
description: builtins.str = ...,
|
|
737
|
+
terms_of_service: builtins.str = ...,
|
|
738
|
+
contact: global___Contact | None = ...,
|
|
739
|
+
license: global___License | None = ...,
|
|
740
|
+
version: builtins.str = ...,
|
|
741
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
742
|
+
) -> None: ...
|
|
743
|
+
def HasField(self, field_name: typing.Literal["contact", b"contact", "license", b"license"]) -> builtins.bool: ...
|
|
744
|
+
def ClearField(self, field_name: typing.Literal["contact", b"contact", "description", b"description", "extensions", b"extensions", "license", b"license", "terms_of_service", b"terms_of_service", "title", b"title", "version", b"version"]) -> None: ...
|
|
745
|
+
|
|
746
|
+
global___Info = Info
|
|
747
|
+
|
|
748
|
+
@typing.final
|
|
749
|
+
class Contact(google.protobuf.message.Message):
|
|
750
|
+
"""`Contact` is a representation of OpenAPI v2 specification's Contact object.
|
|
751
|
+
|
|
752
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
|
|
753
|
+
|
|
754
|
+
Example:
|
|
755
|
+
|
|
756
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
757
|
+
info: {
|
|
758
|
+
...
|
|
759
|
+
contact: {
|
|
760
|
+
name: "gRPC-Gateway project";
|
|
761
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
762
|
+
email: "none@example.com";
|
|
763
|
+
};
|
|
764
|
+
...
|
|
765
|
+
};
|
|
766
|
+
...
|
|
767
|
+
};
|
|
768
|
+
"""
|
|
769
|
+
|
|
770
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
771
|
+
|
|
772
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
773
|
+
URL_FIELD_NUMBER: builtins.int
|
|
774
|
+
EMAIL_FIELD_NUMBER: builtins.int
|
|
775
|
+
name: builtins.str
|
|
776
|
+
"""The identifying name of the contact person/organization."""
|
|
777
|
+
url: builtins.str
|
|
778
|
+
"""The URL pointing to the contact information. MUST be in the format of a
|
|
779
|
+
URL.
|
|
780
|
+
"""
|
|
781
|
+
email: builtins.str
|
|
782
|
+
"""The email address of the contact person/organization. MUST be in the format
|
|
783
|
+
of an email address.
|
|
784
|
+
"""
|
|
785
|
+
def __init__(
|
|
786
|
+
self,
|
|
787
|
+
*,
|
|
788
|
+
name: builtins.str = ...,
|
|
789
|
+
url: builtins.str = ...,
|
|
790
|
+
email: builtins.str = ...,
|
|
791
|
+
) -> None: ...
|
|
792
|
+
def ClearField(self, field_name: typing.Literal["email", b"email", "name", b"name", "url", b"url"]) -> None: ...
|
|
793
|
+
|
|
794
|
+
global___Contact = Contact
|
|
795
|
+
|
|
796
|
+
@typing.final
|
|
797
|
+
class License(google.protobuf.message.Message):
|
|
798
|
+
"""`License` is a representation of OpenAPI v2 specification's License object.
|
|
799
|
+
|
|
800
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
|
|
801
|
+
|
|
802
|
+
Example:
|
|
803
|
+
|
|
804
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
805
|
+
info: {
|
|
806
|
+
...
|
|
807
|
+
license: {
|
|
808
|
+
name: "BSD 3-Clause License";
|
|
809
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
|
|
810
|
+
};
|
|
811
|
+
...
|
|
812
|
+
};
|
|
813
|
+
...
|
|
814
|
+
};
|
|
815
|
+
"""
|
|
816
|
+
|
|
817
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
818
|
+
|
|
819
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
820
|
+
URL_FIELD_NUMBER: builtins.int
|
|
821
|
+
name: builtins.str
|
|
822
|
+
"""The license name used for the API."""
|
|
823
|
+
url: builtins.str
|
|
824
|
+
"""A URL to the license used for the API. MUST be in the format of a URL."""
|
|
825
|
+
def __init__(
|
|
826
|
+
self,
|
|
827
|
+
*,
|
|
828
|
+
name: builtins.str = ...,
|
|
829
|
+
url: builtins.str = ...,
|
|
830
|
+
) -> None: ...
|
|
831
|
+
def ClearField(self, field_name: typing.Literal["name", b"name", "url", b"url"]) -> None: ...
|
|
832
|
+
|
|
833
|
+
global___License = License
|
|
834
|
+
|
|
835
|
+
@typing.final
|
|
836
|
+
class ExternalDocumentation(google.protobuf.message.Message):
|
|
837
|
+
"""`ExternalDocumentation` is a representation of OpenAPI v2 specification's
|
|
838
|
+
ExternalDocumentation object.
|
|
839
|
+
|
|
840
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
|
|
841
|
+
|
|
842
|
+
Example:
|
|
843
|
+
|
|
844
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
845
|
+
...
|
|
846
|
+
external_docs: {
|
|
847
|
+
description: "More about gRPC-Gateway";
|
|
848
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
849
|
+
}
|
|
850
|
+
...
|
|
851
|
+
};
|
|
852
|
+
"""
|
|
853
|
+
|
|
854
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
855
|
+
|
|
856
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
857
|
+
URL_FIELD_NUMBER: builtins.int
|
|
858
|
+
description: builtins.str
|
|
859
|
+
"""A short description of the target documentation. GFM syntax can be used for
|
|
860
|
+
rich text representation.
|
|
861
|
+
"""
|
|
862
|
+
url: builtins.str
|
|
863
|
+
"""The URL for the target documentation. Value MUST be in the format
|
|
864
|
+
of a URL.
|
|
865
|
+
"""
|
|
866
|
+
def __init__(
|
|
867
|
+
self,
|
|
868
|
+
*,
|
|
869
|
+
description: builtins.str = ...,
|
|
870
|
+
url: builtins.str = ...,
|
|
871
|
+
) -> None: ...
|
|
872
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "url", b"url"]) -> None: ...
|
|
873
|
+
|
|
874
|
+
global___ExternalDocumentation = ExternalDocumentation
|
|
875
|
+
|
|
876
|
+
@typing.final
|
|
877
|
+
class Schema(google.protobuf.message.Message):
|
|
878
|
+
"""`Schema` is a representation of OpenAPI v2 specification's Schema object.
|
|
879
|
+
|
|
880
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
|
|
881
|
+
"""
|
|
882
|
+
|
|
883
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
884
|
+
|
|
885
|
+
JSON_SCHEMA_FIELD_NUMBER: builtins.int
|
|
886
|
+
DISCRIMINATOR_FIELD_NUMBER: builtins.int
|
|
887
|
+
READ_ONLY_FIELD_NUMBER: builtins.int
|
|
888
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
889
|
+
EXAMPLE_FIELD_NUMBER: builtins.int
|
|
890
|
+
discriminator: builtins.str
|
|
891
|
+
"""Adds support for polymorphism. The discriminator is the schema property
|
|
892
|
+
name that is used to differentiate between other schema that inherit this
|
|
893
|
+
schema. The property name used MUST be defined at this schema and it MUST
|
|
894
|
+
be in the required property list. When used, the value MUST be the name of
|
|
895
|
+
this schema or any schema that inherits it.
|
|
896
|
+
"""
|
|
897
|
+
read_only: builtins.bool
|
|
898
|
+
"""Relevant only for Schema "properties" definitions. Declares the property as
|
|
899
|
+
"read only". This means that it MAY be sent as part of a response but MUST
|
|
900
|
+
NOT be sent as part of the request. Properties marked as readOnly being
|
|
901
|
+
true SHOULD NOT be in the required list of the defined schema. Default
|
|
902
|
+
value is false.
|
|
903
|
+
"""
|
|
904
|
+
example: builtins.str
|
|
905
|
+
"""A free-form property to include an example of an instance for this schema in JSON.
|
|
906
|
+
This is copied verbatim to the output.
|
|
907
|
+
"""
|
|
908
|
+
@property
|
|
909
|
+
def json_schema(self) -> global___JSONSchema: ...
|
|
910
|
+
@property
|
|
911
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
912
|
+
"""Additional external documentation for this schema."""
|
|
913
|
+
|
|
914
|
+
def __init__(
|
|
915
|
+
self,
|
|
916
|
+
*,
|
|
917
|
+
json_schema: global___JSONSchema | None = ...,
|
|
918
|
+
discriminator: builtins.str = ...,
|
|
919
|
+
read_only: builtins.bool = ...,
|
|
920
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
921
|
+
example: builtins.str = ...,
|
|
922
|
+
) -> None: ...
|
|
923
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs", "json_schema", b"json_schema"]) -> builtins.bool: ...
|
|
924
|
+
def ClearField(self, field_name: typing.Literal["discriminator", b"discriminator", "example", b"example", "external_docs", b"external_docs", "json_schema", b"json_schema", "read_only", b"read_only"]) -> None: ...
|
|
925
|
+
|
|
926
|
+
global___Schema = Schema
|
|
927
|
+
|
|
928
|
+
@typing.final
|
|
929
|
+
class JSONSchema(google.protobuf.message.Message):
|
|
930
|
+
"""`JSONSchema` represents properties from JSON Schema taken, and as used, in
|
|
931
|
+
the OpenAPI v2 spec.
|
|
932
|
+
|
|
933
|
+
This includes changes made by OpenAPI v2.
|
|
934
|
+
|
|
935
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
|
|
936
|
+
|
|
937
|
+
See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
|
|
938
|
+
https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
|
|
939
|
+
|
|
940
|
+
Example:
|
|
941
|
+
|
|
942
|
+
message SimpleMessage {
|
|
943
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
944
|
+
json_schema: {
|
|
945
|
+
title: "SimpleMessage"
|
|
946
|
+
description: "A simple message."
|
|
947
|
+
required: ["id"]
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
// Id represents the message identifier.
|
|
952
|
+
string id = 1; [
|
|
953
|
+
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
954
|
+
description: "The unique identifier of the simple message."
|
|
955
|
+
}];
|
|
956
|
+
}
|
|
957
|
+
"""
|
|
958
|
+
|
|
959
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
960
|
+
|
|
961
|
+
class _JSONSchemaSimpleTypes:
|
|
962
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
963
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
964
|
+
|
|
965
|
+
class _JSONSchemaSimpleTypesEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[JSONSchema._JSONSchemaSimpleTypes.ValueType], builtins.type):
|
|
966
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
967
|
+
UNKNOWN: JSONSchema._JSONSchemaSimpleTypes.ValueType # 0
|
|
968
|
+
ARRAY: JSONSchema._JSONSchemaSimpleTypes.ValueType # 1
|
|
969
|
+
BOOLEAN: JSONSchema._JSONSchemaSimpleTypes.ValueType # 2
|
|
970
|
+
INTEGER: JSONSchema._JSONSchemaSimpleTypes.ValueType # 3
|
|
971
|
+
NULL: JSONSchema._JSONSchemaSimpleTypes.ValueType # 4
|
|
972
|
+
NUMBER: JSONSchema._JSONSchemaSimpleTypes.ValueType # 5
|
|
973
|
+
OBJECT: JSONSchema._JSONSchemaSimpleTypes.ValueType # 6
|
|
974
|
+
STRING: JSONSchema._JSONSchemaSimpleTypes.ValueType # 7
|
|
975
|
+
|
|
976
|
+
class JSONSchemaSimpleTypes(_JSONSchemaSimpleTypes, metaclass=_JSONSchemaSimpleTypesEnumTypeWrapper): ...
|
|
977
|
+
UNKNOWN: JSONSchema.JSONSchemaSimpleTypes.ValueType # 0
|
|
978
|
+
ARRAY: JSONSchema.JSONSchemaSimpleTypes.ValueType # 1
|
|
979
|
+
BOOLEAN: JSONSchema.JSONSchemaSimpleTypes.ValueType # 2
|
|
980
|
+
INTEGER: JSONSchema.JSONSchemaSimpleTypes.ValueType # 3
|
|
981
|
+
NULL: JSONSchema.JSONSchemaSimpleTypes.ValueType # 4
|
|
982
|
+
NUMBER: JSONSchema.JSONSchemaSimpleTypes.ValueType # 5
|
|
983
|
+
OBJECT: JSONSchema.JSONSchemaSimpleTypes.ValueType # 6
|
|
984
|
+
STRING: JSONSchema.JSONSchemaSimpleTypes.ValueType # 7
|
|
985
|
+
|
|
986
|
+
@typing.final
|
|
987
|
+
class FieldConfiguration(google.protobuf.message.Message):
|
|
988
|
+
"""'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
|
|
989
|
+
These properties are not defined by OpenAPIv2, but they are used to control the generation.
|
|
990
|
+
"""
|
|
991
|
+
|
|
992
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
993
|
+
|
|
994
|
+
PATH_PARAM_NAME_FIELD_NUMBER: builtins.int
|
|
995
|
+
path_param_name: builtins.str
|
|
996
|
+
"""Alternative parameter name when used as path parameter. If set, this will
|
|
997
|
+
be used as the complete parameter name when this field is used as a path
|
|
998
|
+
parameter. Use this to avoid having auto generated path parameter names
|
|
999
|
+
for overlapping paths.
|
|
1000
|
+
"""
|
|
1001
|
+
def __init__(
|
|
1002
|
+
self,
|
|
1003
|
+
*,
|
|
1004
|
+
path_param_name: builtins.str = ...,
|
|
1005
|
+
) -> None: ...
|
|
1006
|
+
def ClearField(self, field_name: typing.Literal["path_param_name", b"path_param_name"]) -> None: ...
|
|
1007
|
+
|
|
1008
|
+
@typing.final
|
|
1009
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
1010
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1011
|
+
|
|
1012
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1013
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1014
|
+
key: builtins.str
|
|
1015
|
+
@property
|
|
1016
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
1017
|
+
def __init__(
|
|
1018
|
+
self,
|
|
1019
|
+
*,
|
|
1020
|
+
key: builtins.str = ...,
|
|
1021
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
1022
|
+
) -> None: ...
|
|
1023
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1024
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1025
|
+
|
|
1026
|
+
REF_FIELD_NUMBER: builtins.int
|
|
1027
|
+
TITLE_FIELD_NUMBER: builtins.int
|
|
1028
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
1029
|
+
DEFAULT_FIELD_NUMBER: builtins.int
|
|
1030
|
+
READ_ONLY_FIELD_NUMBER: builtins.int
|
|
1031
|
+
EXAMPLE_FIELD_NUMBER: builtins.int
|
|
1032
|
+
MULTIPLE_OF_FIELD_NUMBER: builtins.int
|
|
1033
|
+
MAXIMUM_FIELD_NUMBER: builtins.int
|
|
1034
|
+
EXCLUSIVE_MAXIMUM_FIELD_NUMBER: builtins.int
|
|
1035
|
+
MINIMUM_FIELD_NUMBER: builtins.int
|
|
1036
|
+
EXCLUSIVE_MINIMUM_FIELD_NUMBER: builtins.int
|
|
1037
|
+
MAX_LENGTH_FIELD_NUMBER: builtins.int
|
|
1038
|
+
MIN_LENGTH_FIELD_NUMBER: builtins.int
|
|
1039
|
+
PATTERN_FIELD_NUMBER: builtins.int
|
|
1040
|
+
MAX_ITEMS_FIELD_NUMBER: builtins.int
|
|
1041
|
+
MIN_ITEMS_FIELD_NUMBER: builtins.int
|
|
1042
|
+
UNIQUE_ITEMS_FIELD_NUMBER: builtins.int
|
|
1043
|
+
MAX_PROPERTIES_FIELD_NUMBER: builtins.int
|
|
1044
|
+
MIN_PROPERTIES_FIELD_NUMBER: builtins.int
|
|
1045
|
+
REQUIRED_FIELD_NUMBER: builtins.int
|
|
1046
|
+
ARRAY_FIELD_NUMBER: builtins.int
|
|
1047
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
1048
|
+
FORMAT_FIELD_NUMBER: builtins.int
|
|
1049
|
+
ENUM_FIELD_NUMBER: builtins.int
|
|
1050
|
+
FIELD_CONFIGURATION_FIELD_NUMBER: builtins.int
|
|
1051
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
1052
|
+
ref: builtins.str
|
|
1053
|
+
"""Ref is used to define an external reference to include in the message.
|
|
1054
|
+
This could be a fully qualified proto message reference, and that type must
|
|
1055
|
+
be imported into the protofile. If no message is identified, the Ref will
|
|
1056
|
+
be used verbatim in the output.
|
|
1057
|
+
For example:
|
|
1058
|
+
`ref: ".google.protobuf.Timestamp"`.
|
|
1059
|
+
"""
|
|
1060
|
+
title: builtins.str
|
|
1061
|
+
"""The title of the schema."""
|
|
1062
|
+
description: builtins.str
|
|
1063
|
+
"""A short description of the schema."""
|
|
1064
|
+
default: builtins.str
|
|
1065
|
+
read_only: builtins.bool
|
|
1066
|
+
example: builtins.str
|
|
1067
|
+
"""A free-form property to include a JSON example of this field. This is copied
|
|
1068
|
+
verbatim to the output swagger.json. Quotes must be escaped.
|
|
1069
|
+
This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
|
|
1070
|
+
"""
|
|
1071
|
+
multiple_of: builtins.float
|
|
1072
|
+
maximum: builtins.float
|
|
1073
|
+
"""Maximum represents an inclusive upper limit for a numeric instance. The
|
|
1074
|
+
value of MUST be a number,
|
|
1075
|
+
"""
|
|
1076
|
+
exclusive_maximum: builtins.bool
|
|
1077
|
+
minimum: builtins.float
|
|
1078
|
+
"""minimum represents an inclusive lower limit for a numeric instance. The
|
|
1079
|
+
value of MUST be a number,
|
|
1080
|
+
"""
|
|
1081
|
+
exclusive_minimum: builtins.bool
|
|
1082
|
+
max_length: builtins.int
|
|
1083
|
+
min_length: builtins.int
|
|
1084
|
+
pattern: builtins.str
|
|
1085
|
+
max_items: builtins.int
|
|
1086
|
+
min_items: builtins.int
|
|
1087
|
+
unique_items: builtins.bool
|
|
1088
|
+
max_properties: builtins.int
|
|
1089
|
+
min_properties: builtins.int
|
|
1090
|
+
format: builtins.str
|
|
1091
|
+
"""`Format`"""
|
|
1092
|
+
@property
|
|
1093
|
+
def required(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
1094
|
+
@property
|
|
1095
|
+
def array(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
1096
|
+
"""Items in 'array' must be unique."""
|
|
1097
|
+
|
|
1098
|
+
@property
|
|
1099
|
+
def type(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___JSONSchema.JSONSchemaSimpleTypes.ValueType]: ...
|
|
1100
|
+
@property
|
|
1101
|
+
def enum(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
1102
|
+
"""Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1"""
|
|
1103
|
+
|
|
1104
|
+
@property
|
|
1105
|
+
def field_configuration(self) -> global___JSONSchema.FieldConfiguration:
|
|
1106
|
+
"""Additional field level properties used when generating the OpenAPI v2 file."""
|
|
1107
|
+
|
|
1108
|
+
@property
|
|
1109
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
1110
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
1111
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
1112
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
1113
|
+
"""
|
|
1114
|
+
|
|
1115
|
+
def __init__(
|
|
1116
|
+
self,
|
|
1117
|
+
*,
|
|
1118
|
+
ref: builtins.str = ...,
|
|
1119
|
+
title: builtins.str = ...,
|
|
1120
|
+
description: builtins.str = ...,
|
|
1121
|
+
default: builtins.str = ...,
|
|
1122
|
+
read_only: builtins.bool = ...,
|
|
1123
|
+
example: builtins.str = ...,
|
|
1124
|
+
multiple_of: builtins.float = ...,
|
|
1125
|
+
maximum: builtins.float = ...,
|
|
1126
|
+
exclusive_maximum: builtins.bool = ...,
|
|
1127
|
+
minimum: builtins.float = ...,
|
|
1128
|
+
exclusive_minimum: builtins.bool = ...,
|
|
1129
|
+
max_length: builtins.int = ...,
|
|
1130
|
+
min_length: builtins.int = ...,
|
|
1131
|
+
pattern: builtins.str = ...,
|
|
1132
|
+
max_items: builtins.int = ...,
|
|
1133
|
+
min_items: builtins.int = ...,
|
|
1134
|
+
unique_items: builtins.bool = ...,
|
|
1135
|
+
max_properties: builtins.int = ...,
|
|
1136
|
+
min_properties: builtins.int = ...,
|
|
1137
|
+
required: collections.abc.Iterable[builtins.str] | None = ...,
|
|
1138
|
+
array: collections.abc.Iterable[builtins.str] | None = ...,
|
|
1139
|
+
type: collections.abc.Iterable[global___JSONSchema.JSONSchemaSimpleTypes.ValueType] | None = ...,
|
|
1140
|
+
format: builtins.str = ...,
|
|
1141
|
+
enum: collections.abc.Iterable[builtins.str] | None = ...,
|
|
1142
|
+
field_configuration: global___JSONSchema.FieldConfiguration | None = ...,
|
|
1143
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
1144
|
+
) -> None: ...
|
|
1145
|
+
def HasField(self, field_name: typing.Literal["field_configuration", b"field_configuration"]) -> builtins.bool: ...
|
|
1146
|
+
def ClearField(self, field_name: typing.Literal["array", b"array", "default", b"default", "description", b"description", "enum", b"enum", "example", b"example", "exclusive_maximum", b"exclusive_maximum", "exclusive_minimum", b"exclusive_minimum", "extensions", b"extensions", "field_configuration", b"field_configuration", "format", b"format", "max_items", b"max_items", "max_length", b"max_length", "max_properties", b"max_properties", "maximum", b"maximum", "min_items", b"min_items", "min_length", b"min_length", "min_properties", b"min_properties", "minimum", b"minimum", "multiple_of", b"multiple_of", "pattern", b"pattern", "read_only", b"read_only", "ref", b"ref", "required", b"required", "title", b"title", "type", b"type", "unique_items", b"unique_items"]) -> None: ...
|
|
1147
|
+
|
|
1148
|
+
global___JSONSchema = JSONSchema
|
|
1149
|
+
|
|
1150
|
+
@typing.final
|
|
1151
|
+
class Tag(google.protobuf.message.Message):
|
|
1152
|
+
"""`Tag` is a representation of OpenAPI v2 specification's Tag object.
|
|
1153
|
+
|
|
1154
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
|
|
1155
|
+
"""
|
|
1156
|
+
|
|
1157
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1158
|
+
|
|
1159
|
+
@typing.final
|
|
1160
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
1161
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1162
|
+
|
|
1163
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1164
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1165
|
+
key: builtins.str
|
|
1166
|
+
@property
|
|
1167
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
1168
|
+
def __init__(
|
|
1169
|
+
self,
|
|
1170
|
+
*,
|
|
1171
|
+
key: builtins.str = ...,
|
|
1172
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
1173
|
+
) -> None: ...
|
|
1174
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1175
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1176
|
+
|
|
1177
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
1178
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
1179
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
1180
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
1181
|
+
name: builtins.str
|
|
1182
|
+
"""The name of the tag. Use it to allow override of the name of a
|
|
1183
|
+
global Tag object, then use that name to reference the tag throughout the
|
|
1184
|
+
OpenAPI file.
|
|
1185
|
+
"""
|
|
1186
|
+
description: builtins.str
|
|
1187
|
+
"""A short description for the tag. GFM syntax can be used for rich text
|
|
1188
|
+
representation.
|
|
1189
|
+
"""
|
|
1190
|
+
@property
|
|
1191
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
1192
|
+
"""Additional external documentation for this tag."""
|
|
1193
|
+
|
|
1194
|
+
@property
|
|
1195
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
1196
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
1197
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
1198
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
1199
|
+
"""
|
|
1200
|
+
|
|
1201
|
+
def __init__(
|
|
1202
|
+
self,
|
|
1203
|
+
*,
|
|
1204
|
+
name: builtins.str = ...,
|
|
1205
|
+
description: builtins.str = ...,
|
|
1206
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
1207
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
1208
|
+
) -> None: ...
|
|
1209
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs"]) -> builtins.bool: ...
|
|
1210
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "extensions", b"extensions", "external_docs", b"external_docs", "name", b"name"]) -> None: ...
|
|
1211
|
+
|
|
1212
|
+
global___Tag = Tag
|
|
1213
|
+
|
|
1214
|
+
@typing.final
|
|
1215
|
+
class SecurityDefinitions(google.protobuf.message.Message):
|
|
1216
|
+
"""`SecurityDefinitions` is a representation of OpenAPI v2 specification's
|
|
1217
|
+
Security Definitions object.
|
|
1218
|
+
|
|
1219
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
|
|
1220
|
+
|
|
1221
|
+
A declaration of the security schemes available to be used in the
|
|
1222
|
+
specification. This does not enforce the security schemes on the operations
|
|
1223
|
+
and only serves to provide the relevant details for each scheme.
|
|
1224
|
+
"""
|
|
1225
|
+
|
|
1226
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1227
|
+
|
|
1228
|
+
@typing.final
|
|
1229
|
+
class SecurityEntry(google.protobuf.message.Message):
|
|
1230
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1231
|
+
|
|
1232
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1233
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1234
|
+
key: builtins.str
|
|
1235
|
+
@property
|
|
1236
|
+
def value(self) -> global___SecurityScheme: ...
|
|
1237
|
+
def __init__(
|
|
1238
|
+
self,
|
|
1239
|
+
*,
|
|
1240
|
+
key: builtins.str = ...,
|
|
1241
|
+
value: global___SecurityScheme | None = ...,
|
|
1242
|
+
) -> None: ...
|
|
1243
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1244
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1245
|
+
|
|
1246
|
+
SECURITY_FIELD_NUMBER: builtins.int
|
|
1247
|
+
@property
|
|
1248
|
+
def security(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___SecurityScheme]:
|
|
1249
|
+
"""A single security scheme definition, mapping a "name" to the scheme it
|
|
1250
|
+
defines.
|
|
1251
|
+
"""
|
|
1252
|
+
|
|
1253
|
+
def __init__(
|
|
1254
|
+
self,
|
|
1255
|
+
*,
|
|
1256
|
+
security: collections.abc.Mapping[builtins.str, global___SecurityScheme] | None = ...,
|
|
1257
|
+
) -> None: ...
|
|
1258
|
+
def ClearField(self, field_name: typing.Literal["security", b"security"]) -> None: ...
|
|
1259
|
+
|
|
1260
|
+
global___SecurityDefinitions = SecurityDefinitions
|
|
1261
|
+
|
|
1262
|
+
@typing.final
|
|
1263
|
+
class SecurityScheme(google.protobuf.message.Message):
|
|
1264
|
+
"""`SecurityScheme` is a representation of OpenAPI v2 specification's
|
|
1265
|
+
Security Scheme object.
|
|
1266
|
+
|
|
1267
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
|
|
1268
|
+
|
|
1269
|
+
Allows the definition of a security scheme that can be used by the
|
|
1270
|
+
operations. Supported schemes are basic authentication, an API key (either as
|
|
1271
|
+
a header or as a query parameter) and OAuth2's common flows (implicit,
|
|
1272
|
+
password, application and access code).
|
|
1273
|
+
"""
|
|
1274
|
+
|
|
1275
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1276
|
+
|
|
1277
|
+
class _Type:
|
|
1278
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
1279
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
1280
|
+
|
|
1281
|
+
class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SecurityScheme._Type.ValueType], builtins.type):
|
|
1282
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1283
|
+
TYPE_INVALID: SecurityScheme._Type.ValueType # 0
|
|
1284
|
+
TYPE_BASIC: SecurityScheme._Type.ValueType # 1
|
|
1285
|
+
TYPE_API_KEY: SecurityScheme._Type.ValueType # 2
|
|
1286
|
+
TYPE_OAUTH2: SecurityScheme._Type.ValueType # 3
|
|
1287
|
+
|
|
1288
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper):
|
|
1289
|
+
"""The type of the security scheme. Valid values are "basic",
|
|
1290
|
+
"apiKey" or "oauth2".
|
|
1291
|
+
"""
|
|
1292
|
+
|
|
1293
|
+
TYPE_INVALID: SecurityScheme.Type.ValueType # 0
|
|
1294
|
+
TYPE_BASIC: SecurityScheme.Type.ValueType # 1
|
|
1295
|
+
TYPE_API_KEY: SecurityScheme.Type.ValueType # 2
|
|
1296
|
+
TYPE_OAUTH2: SecurityScheme.Type.ValueType # 3
|
|
1297
|
+
|
|
1298
|
+
class _In:
|
|
1299
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
1300
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
1301
|
+
|
|
1302
|
+
class _InEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SecurityScheme._In.ValueType], builtins.type):
|
|
1303
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1304
|
+
IN_INVALID: SecurityScheme._In.ValueType # 0
|
|
1305
|
+
IN_QUERY: SecurityScheme._In.ValueType # 1
|
|
1306
|
+
IN_HEADER: SecurityScheme._In.ValueType # 2
|
|
1307
|
+
|
|
1308
|
+
class In(_In, metaclass=_InEnumTypeWrapper):
|
|
1309
|
+
"""The location of the API key. Valid values are "query" or "header"."""
|
|
1310
|
+
|
|
1311
|
+
IN_INVALID: SecurityScheme.In.ValueType # 0
|
|
1312
|
+
IN_QUERY: SecurityScheme.In.ValueType # 1
|
|
1313
|
+
IN_HEADER: SecurityScheme.In.ValueType # 2
|
|
1314
|
+
|
|
1315
|
+
class _Flow:
|
|
1316
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
1317
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
1318
|
+
|
|
1319
|
+
class _FlowEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SecurityScheme._Flow.ValueType], builtins.type):
|
|
1320
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1321
|
+
FLOW_INVALID: SecurityScheme._Flow.ValueType # 0
|
|
1322
|
+
FLOW_IMPLICIT: SecurityScheme._Flow.ValueType # 1
|
|
1323
|
+
FLOW_PASSWORD: SecurityScheme._Flow.ValueType # 2
|
|
1324
|
+
FLOW_APPLICATION: SecurityScheme._Flow.ValueType # 3
|
|
1325
|
+
FLOW_ACCESS_CODE: SecurityScheme._Flow.ValueType # 4
|
|
1326
|
+
|
|
1327
|
+
class Flow(_Flow, metaclass=_FlowEnumTypeWrapper):
|
|
1328
|
+
"""The flow used by the OAuth2 security scheme. Valid values are
|
|
1329
|
+
"implicit", "password", "application" or "accessCode".
|
|
1330
|
+
"""
|
|
1331
|
+
|
|
1332
|
+
FLOW_INVALID: SecurityScheme.Flow.ValueType # 0
|
|
1333
|
+
FLOW_IMPLICIT: SecurityScheme.Flow.ValueType # 1
|
|
1334
|
+
FLOW_PASSWORD: SecurityScheme.Flow.ValueType # 2
|
|
1335
|
+
FLOW_APPLICATION: SecurityScheme.Flow.ValueType # 3
|
|
1336
|
+
FLOW_ACCESS_CODE: SecurityScheme.Flow.ValueType # 4
|
|
1337
|
+
|
|
1338
|
+
@typing.final
|
|
1339
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
1340
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1341
|
+
|
|
1342
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1343
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1344
|
+
key: builtins.str
|
|
1345
|
+
@property
|
|
1346
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
1347
|
+
def __init__(
|
|
1348
|
+
self,
|
|
1349
|
+
*,
|
|
1350
|
+
key: builtins.str = ...,
|
|
1351
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
1352
|
+
) -> None: ...
|
|
1353
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1354
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1355
|
+
|
|
1356
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
1357
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
1358
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
1359
|
+
IN_FIELD_NUMBER: builtins.int
|
|
1360
|
+
FLOW_FIELD_NUMBER: builtins.int
|
|
1361
|
+
AUTHORIZATION_URL_FIELD_NUMBER: builtins.int
|
|
1362
|
+
TOKEN_URL_FIELD_NUMBER: builtins.int
|
|
1363
|
+
SCOPES_FIELD_NUMBER: builtins.int
|
|
1364
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
1365
|
+
type: global___SecurityScheme.Type.ValueType
|
|
1366
|
+
"""The type of the security scheme. Valid values are "basic",
|
|
1367
|
+
"apiKey" or "oauth2".
|
|
1368
|
+
"""
|
|
1369
|
+
description: builtins.str
|
|
1370
|
+
"""A short description for security scheme."""
|
|
1371
|
+
name: builtins.str
|
|
1372
|
+
"""The name of the header or query parameter to be used.
|
|
1373
|
+
Valid for apiKey.
|
|
1374
|
+
"""
|
|
1375
|
+
flow: global___SecurityScheme.Flow.ValueType
|
|
1376
|
+
"""The flow used by the OAuth2 security scheme. Valid values are
|
|
1377
|
+
"implicit", "password", "application" or "accessCode".
|
|
1378
|
+
Valid for oauth2.
|
|
1379
|
+
"""
|
|
1380
|
+
authorization_url: builtins.str
|
|
1381
|
+
"""The authorization URL to be used for this flow. This SHOULD be in
|
|
1382
|
+
the form of a URL.
|
|
1383
|
+
Valid for oauth2/implicit and oauth2/accessCode.
|
|
1384
|
+
"""
|
|
1385
|
+
token_url: builtins.str
|
|
1386
|
+
"""The token URL to be used for this flow. This SHOULD be in the
|
|
1387
|
+
form of a URL.
|
|
1388
|
+
Valid for oauth2/password, oauth2/application and oauth2/accessCode.
|
|
1389
|
+
"""
|
|
1390
|
+
@property
|
|
1391
|
+
def scopes(self) -> global___Scopes:
|
|
1392
|
+
"""The available scopes for the OAuth2 security scheme.
|
|
1393
|
+
Valid for oauth2.
|
|
1394
|
+
"""
|
|
1395
|
+
|
|
1396
|
+
@property
|
|
1397
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]:
|
|
1398
|
+
"""Custom properties that start with "x-" such as "x-foo" used to describe
|
|
1399
|
+
extra functionality that is not covered by the standard OpenAPI Specification.
|
|
1400
|
+
See: https://swagger.io/docs/specification/2-0/swagger-extensions/
|
|
1401
|
+
"""
|
|
1402
|
+
|
|
1403
|
+
def __init__(
|
|
1404
|
+
self,
|
|
1405
|
+
*,
|
|
1406
|
+
type: global___SecurityScheme.Type.ValueType = ...,
|
|
1407
|
+
description: builtins.str = ...,
|
|
1408
|
+
name: builtins.str = ...,
|
|
1409
|
+
flow: global___SecurityScheme.Flow.ValueType = ...,
|
|
1410
|
+
authorization_url: builtins.str = ...,
|
|
1411
|
+
token_url: builtins.str = ...,
|
|
1412
|
+
scopes: global___Scopes | None = ...,
|
|
1413
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
1414
|
+
) -> None: ...
|
|
1415
|
+
def HasField(self, field_name: typing.Literal["scopes", b"scopes"]) -> builtins.bool: ...
|
|
1416
|
+
def ClearField(self, field_name: typing.Literal["authorization_url", b"authorization_url", "description", b"description", "extensions", b"extensions", "flow", b"flow", "in", b"in", "name", b"name", "scopes", b"scopes", "token_url", b"token_url", "type", b"type"]) -> None: ...
|
|
1417
|
+
|
|
1418
|
+
global___SecurityScheme = SecurityScheme
|
|
1419
|
+
|
|
1420
|
+
@typing.final
|
|
1421
|
+
class SecurityRequirement(google.protobuf.message.Message):
|
|
1422
|
+
"""`SecurityRequirement` is a representation of OpenAPI v2 specification's
|
|
1423
|
+
Security Requirement object.
|
|
1424
|
+
|
|
1425
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
|
|
1426
|
+
|
|
1427
|
+
Lists the required security schemes to execute this operation. The object can
|
|
1428
|
+
have multiple security schemes declared in it which are all required (that
|
|
1429
|
+
is, there is a logical AND between the schemes).
|
|
1430
|
+
|
|
1431
|
+
The name used for each property MUST correspond to a security scheme
|
|
1432
|
+
declared in the Security Definitions.
|
|
1433
|
+
"""
|
|
1434
|
+
|
|
1435
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1436
|
+
|
|
1437
|
+
@typing.final
|
|
1438
|
+
class SecurityRequirementValue(google.protobuf.message.Message):
|
|
1439
|
+
"""If the security scheme is of type "oauth2", then the value is a list of
|
|
1440
|
+
scope names required for the execution. For other security scheme types,
|
|
1441
|
+
the array MUST be empty.
|
|
1442
|
+
"""
|
|
1443
|
+
|
|
1444
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1445
|
+
|
|
1446
|
+
SCOPE_FIELD_NUMBER: builtins.int
|
|
1447
|
+
@property
|
|
1448
|
+
def scope(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
1449
|
+
def __init__(
|
|
1450
|
+
self,
|
|
1451
|
+
*,
|
|
1452
|
+
scope: collections.abc.Iterable[builtins.str] | None = ...,
|
|
1453
|
+
) -> None: ...
|
|
1454
|
+
def ClearField(self, field_name: typing.Literal["scope", b"scope"]) -> None: ...
|
|
1455
|
+
|
|
1456
|
+
@typing.final
|
|
1457
|
+
class SecurityRequirementEntry(google.protobuf.message.Message):
|
|
1458
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1459
|
+
|
|
1460
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1461
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1462
|
+
key: builtins.str
|
|
1463
|
+
@property
|
|
1464
|
+
def value(self) -> global___SecurityRequirement.SecurityRequirementValue: ...
|
|
1465
|
+
def __init__(
|
|
1466
|
+
self,
|
|
1467
|
+
*,
|
|
1468
|
+
key: builtins.str = ...,
|
|
1469
|
+
value: global___SecurityRequirement.SecurityRequirementValue | None = ...,
|
|
1470
|
+
) -> None: ...
|
|
1471
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1472
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1473
|
+
|
|
1474
|
+
SECURITY_REQUIREMENT_FIELD_NUMBER: builtins.int
|
|
1475
|
+
@property
|
|
1476
|
+
def security_requirement(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___SecurityRequirement.SecurityRequirementValue]:
|
|
1477
|
+
"""Each name must correspond to a security scheme which is declared in
|
|
1478
|
+
the Security Definitions. If the security scheme is of type "oauth2",
|
|
1479
|
+
then the value is a list of scope names required for the execution.
|
|
1480
|
+
For other security scheme types, the array MUST be empty.
|
|
1481
|
+
"""
|
|
1482
|
+
|
|
1483
|
+
def __init__(
|
|
1484
|
+
self,
|
|
1485
|
+
*,
|
|
1486
|
+
security_requirement: collections.abc.Mapping[builtins.str, global___SecurityRequirement.SecurityRequirementValue] | None = ...,
|
|
1487
|
+
) -> None: ...
|
|
1488
|
+
def ClearField(self, field_name: typing.Literal["security_requirement", b"security_requirement"]) -> None: ...
|
|
1489
|
+
|
|
1490
|
+
global___SecurityRequirement = SecurityRequirement
|
|
1491
|
+
|
|
1492
|
+
@typing.final
|
|
1493
|
+
class Scopes(google.protobuf.message.Message):
|
|
1494
|
+
"""`Scopes` is a representation of OpenAPI v2 specification's Scopes object.
|
|
1495
|
+
|
|
1496
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
|
|
1497
|
+
|
|
1498
|
+
Lists the available scopes for an OAuth2 security scheme.
|
|
1499
|
+
"""
|
|
1500
|
+
|
|
1501
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1502
|
+
|
|
1503
|
+
@typing.final
|
|
1504
|
+
class ScopeEntry(google.protobuf.message.Message):
|
|
1505
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1506
|
+
|
|
1507
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1508
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1509
|
+
key: builtins.str
|
|
1510
|
+
value: builtins.str
|
|
1511
|
+
def __init__(
|
|
1512
|
+
self,
|
|
1513
|
+
*,
|
|
1514
|
+
key: builtins.str = ...,
|
|
1515
|
+
value: builtins.str = ...,
|
|
1516
|
+
) -> None: ...
|
|
1517
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1518
|
+
|
|
1519
|
+
SCOPE_FIELD_NUMBER: builtins.int
|
|
1520
|
+
@property
|
|
1521
|
+
def scope(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
|
|
1522
|
+
"""Maps between a name of a scope to a short description of it (as the value
|
|
1523
|
+
of the property).
|
|
1524
|
+
"""
|
|
1525
|
+
|
|
1526
|
+
def __init__(
|
|
1527
|
+
self,
|
|
1528
|
+
*,
|
|
1529
|
+
scope: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
|
|
1530
|
+
) -> None: ...
|
|
1531
|
+
def ClearField(self, field_name: typing.Literal["scope", b"scope"]) -> None: ...
|
|
1532
|
+
|
|
1533
|
+
global___Scopes = Scopes
|