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,305 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from sift.views.v1 import views_pb2 as sift_dot_views_dot_v1_dot_views__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ViewServiceStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.GetView = channel.unary_unary(
|
|
18
|
+
'/sift.views.v1.ViewService/GetView',
|
|
19
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.GetViewRequest.SerializeToString,
|
|
20
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.GetViewResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
self.CreateView = channel.unary_unary(
|
|
23
|
+
'/sift.views.v1.ViewService/CreateView',
|
|
24
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.CreateViewRequest.SerializeToString,
|
|
25
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.CreateViewResponse.FromString,
|
|
26
|
+
)
|
|
27
|
+
self.UpdateView = channel.unary_unary(
|
|
28
|
+
'/sift.views.v1.ViewService/UpdateView',
|
|
29
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.UpdateViewRequest.SerializeToString,
|
|
30
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.UpdateViewResponse.FromString,
|
|
31
|
+
)
|
|
32
|
+
self.ListViews = channel.unary_unary(
|
|
33
|
+
'/sift.views.v1.ViewService/ListViews',
|
|
34
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.ListViewsRequest.SerializeToString,
|
|
35
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.ListViewsResponse.FromString,
|
|
36
|
+
)
|
|
37
|
+
self.ListApplicableViews = channel.unary_unary(
|
|
38
|
+
'/sift.views.v1.ViewService/ListApplicableViews',
|
|
39
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.ListApplicableViewsRequest.SerializeToString,
|
|
40
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.ListApplicableViewsResponse.FromString,
|
|
41
|
+
)
|
|
42
|
+
self.DeleteView = channel.unary_unary(
|
|
43
|
+
'/sift.views.v1.ViewService/DeleteView',
|
|
44
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.DeleteViewRequest.SerializeToString,
|
|
45
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.DeleteViewResponse.FromString,
|
|
46
|
+
)
|
|
47
|
+
self.PinView = channel.unary_unary(
|
|
48
|
+
'/sift.views.v1.ViewService/PinView',
|
|
49
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.PinViewRequest.SerializeToString,
|
|
50
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.PinViewResponse.FromString,
|
|
51
|
+
)
|
|
52
|
+
self.UnpinView = channel.unary_unary(
|
|
53
|
+
'/sift.views.v1.ViewService/UnpinView',
|
|
54
|
+
request_serializer=sift_dot_views_dot_v1_dot_views__pb2.UnpinViewRequest.SerializeToString,
|
|
55
|
+
response_deserializer=sift_dot_views_dot_v1_dot_views__pb2.UnpinViewResponse.FromString,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class ViewServiceServicer(object):
|
|
60
|
+
"""Missing associated documentation comment in .proto file."""
|
|
61
|
+
|
|
62
|
+
def GetView(self, request, context):
|
|
63
|
+
"""Retrieves a view.
|
|
64
|
+
"""
|
|
65
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
66
|
+
context.set_details('Method not implemented!')
|
|
67
|
+
raise NotImplementedError('Method not implemented!')
|
|
68
|
+
|
|
69
|
+
def CreateView(self, request, context):
|
|
70
|
+
"""Creates a view.
|
|
71
|
+
"""
|
|
72
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
73
|
+
context.set_details('Method not implemented!')
|
|
74
|
+
raise NotImplementedError('Method not implemented!')
|
|
75
|
+
|
|
76
|
+
def UpdateView(self, request, context):
|
|
77
|
+
"""Updates an existing view using using the list of fields specified in `update_mask`.
|
|
78
|
+
"""
|
|
79
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
80
|
+
context.set_details('Method not implemented!')
|
|
81
|
+
raise NotImplementedError('Method not implemented!')
|
|
82
|
+
|
|
83
|
+
def ListViews(self, request, context):
|
|
84
|
+
"""Retrieves views using an optional filter.
|
|
85
|
+
"""
|
|
86
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
87
|
+
context.set_details('Method not implemented!')
|
|
88
|
+
raise NotImplementedError('Method not implemented!')
|
|
89
|
+
|
|
90
|
+
def ListApplicableViews(self, request, context):
|
|
91
|
+
"""Lists views that apply to assets/runs.
|
|
92
|
+
"""
|
|
93
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
94
|
+
context.set_details('Method not implemented!')
|
|
95
|
+
raise NotImplementedError('Method not implemented!')
|
|
96
|
+
|
|
97
|
+
def DeleteView(self, request, context):
|
|
98
|
+
"""Deletes a view.
|
|
99
|
+
"""
|
|
100
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
101
|
+
context.set_details('Method not implemented!')
|
|
102
|
+
raise NotImplementedError('Method not implemented!')
|
|
103
|
+
|
|
104
|
+
def PinView(self, request, context):
|
|
105
|
+
"""Pins a view.
|
|
106
|
+
"""
|
|
107
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
108
|
+
context.set_details('Method not implemented!')
|
|
109
|
+
raise NotImplementedError('Method not implemented!')
|
|
110
|
+
|
|
111
|
+
def UnpinView(self, request, context):
|
|
112
|
+
"""Unpins a view.
|
|
113
|
+
"""
|
|
114
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
115
|
+
context.set_details('Method not implemented!')
|
|
116
|
+
raise NotImplementedError('Method not implemented!')
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def add_ViewServiceServicer_to_server(servicer, server):
|
|
120
|
+
rpc_method_handlers = {
|
|
121
|
+
'GetView': grpc.unary_unary_rpc_method_handler(
|
|
122
|
+
servicer.GetView,
|
|
123
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.GetViewRequest.FromString,
|
|
124
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.GetViewResponse.SerializeToString,
|
|
125
|
+
),
|
|
126
|
+
'CreateView': grpc.unary_unary_rpc_method_handler(
|
|
127
|
+
servicer.CreateView,
|
|
128
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.CreateViewRequest.FromString,
|
|
129
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.CreateViewResponse.SerializeToString,
|
|
130
|
+
),
|
|
131
|
+
'UpdateView': grpc.unary_unary_rpc_method_handler(
|
|
132
|
+
servicer.UpdateView,
|
|
133
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.UpdateViewRequest.FromString,
|
|
134
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.UpdateViewResponse.SerializeToString,
|
|
135
|
+
),
|
|
136
|
+
'ListViews': grpc.unary_unary_rpc_method_handler(
|
|
137
|
+
servicer.ListViews,
|
|
138
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.ListViewsRequest.FromString,
|
|
139
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.ListViewsResponse.SerializeToString,
|
|
140
|
+
),
|
|
141
|
+
'ListApplicableViews': grpc.unary_unary_rpc_method_handler(
|
|
142
|
+
servicer.ListApplicableViews,
|
|
143
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.ListApplicableViewsRequest.FromString,
|
|
144
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.ListApplicableViewsResponse.SerializeToString,
|
|
145
|
+
),
|
|
146
|
+
'DeleteView': grpc.unary_unary_rpc_method_handler(
|
|
147
|
+
servicer.DeleteView,
|
|
148
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.DeleteViewRequest.FromString,
|
|
149
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.DeleteViewResponse.SerializeToString,
|
|
150
|
+
),
|
|
151
|
+
'PinView': grpc.unary_unary_rpc_method_handler(
|
|
152
|
+
servicer.PinView,
|
|
153
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.PinViewRequest.FromString,
|
|
154
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.PinViewResponse.SerializeToString,
|
|
155
|
+
),
|
|
156
|
+
'UnpinView': grpc.unary_unary_rpc_method_handler(
|
|
157
|
+
servicer.UnpinView,
|
|
158
|
+
request_deserializer=sift_dot_views_dot_v1_dot_views__pb2.UnpinViewRequest.FromString,
|
|
159
|
+
response_serializer=sift_dot_views_dot_v1_dot_views__pb2.UnpinViewResponse.SerializeToString,
|
|
160
|
+
),
|
|
161
|
+
}
|
|
162
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
163
|
+
'sift.views.v1.ViewService', rpc_method_handlers)
|
|
164
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
# This class is part of an EXPERIMENTAL API.
|
|
168
|
+
class ViewService(object):
|
|
169
|
+
"""Missing associated documentation comment in .proto file."""
|
|
170
|
+
|
|
171
|
+
@staticmethod
|
|
172
|
+
def GetView(request,
|
|
173
|
+
target,
|
|
174
|
+
options=(),
|
|
175
|
+
channel_credentials=None,
|
|
176
|
+
call_credentials=None,
|
|
177
|
+
insecure=False,
|
|
178
|
+
compression=None,
|
|
179
|
+
wait_for_ready=None,
|
|
180
|
+
timeout=None,
|
|
181
|
+
metadata=None):
|
|
182
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/GetView',
|
|
183
|
+
sift_dot_views_dot_v1_dot_views__pb2.GetViewRequest.SerializeToString,
|
|
184
|
+
sift_dot_views_dot_v1_dot_views__pb2.GetViewResponse.FromString,
|
|
185
|
+
options, channel_credentials,
|
|
186
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
187
|
+
|
|
188
|
+
@staticmethod
|
|
189
|
+
def CreateView(request,
|
|
190
|
+
target,
|
|
191
|
+
options=(),
|
|
192
|
+
channel_credentials=None,
|
|
193
|
+
call_credentials=None,
|
|
194
|
+
insecure=False,
|
|
195
|
+
compression=None,
|
|
196
|
+
wait_for_ready=None,
|
|
197
|
+
timeout=None,
|
|
198
|
+
metadata=None):
|
|
199
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/CreateView',
|
|
200
|
+
sift_dot_views_dot_v1_dot_views__pb2.CreateViewRequest.SerializeToString,
|
|
201
|
+
sift_dot_views_dot_v1_dot_views__pb2.CreateViewResponse.FromString,
|
|
202
|
+
options, channel_credentials,
|
|
203
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
204
|
+
|
|
205
|
+
@staticmethod
|
|
206
|
+
def UpdateView(request,
|
|
207
|
+
target,
|
|
208
|
+
options=(),
|
|
209
|
+
channel_credentials=None,
|
|
210
|
+
call_credentials=None,
|
|
211
|
+
insecure=False,
|
|
212
|
+
compression=None,
|
|
213
|
+
wait_for_ready=None,
|
|
214
|
+
timeout=None,
|
|
215
|
+
metadata=None):
|
|
216
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/UpdateView',
|
|
217
|
+
sift_dot_views_dot_v1_dot_views__pb2.UpdateViewRequest.SerializeToString,
|
|
218
|
+
sift_dot_views_dot_v1_dot_views__pb2.UpdateViewResponse.FromString,
|
|
219
|
+
options, channel_credentials,
|
|
220
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
221
|
+
|
|
222
|
+
@staticmethod
|
|
223
|
+
def ListViews(request,
|
|
224
|
+
target,
|
|
225
|
+
options=(),
|
|
226
|
+
channel_credentials=None,
|
|
227
|
+
call_credentials=None,
|
|
228
|
+
insecure=False,
|
|
229
|
+
compression=None,
|
|
230
|
+
wait_for_ready=None,
|
|
231
|
+
timeout=None,
|
|
232
|
+
metadata=None):
|
|
233
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/ListViews',
|
|
234
|
+
sift_dot_views_dot_v1_dot_views__pb2.ListViewsRequest.SerializeToString,
|
|
235
|
+
sift_dot_views_dot_v1_dot_views__pb2.ListViewsResponse.FromString,
|
|
236
|
+
options, channel_credentials,
|
|
237
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
238
|
+
|
|
239
|
+
@staticmethod
|
|
240
|
+
def ListApplicableViews(request,
|
|
241
|
+
target,
|
|
242
|
+
options=(),
|
|
243
|
+
channel_credentials=None,
|
|
244
|
+
call_credentials=None,
|
|
245
|
+
insecure=False,
|
|
246
|
+
compression=None,
|
|
247
|
+
wait_for_ready=None,
|
|
248
|
+
timeout=None,
|
|
249
|
+
metadata=None):
|
|
250
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/ListApplicableViews',
|
|
251
|
+
sift_dot_views_dot_v1_dot_views__pb2.ListApplicableViewsRequest.SerializeToString,
|
|
252
|
+
sift_dot_views_dot_v1_dot_views__pb2.ListApplicableViewsResponse.FromString,
|
|
253
|
+
options, channel_credentials,
|
|
254
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
255
|
+
|
|
256
|
+
@staticmethod
|
|
257
|
+
def DeleteView(request,
|
|
258
|
+
target,
|
|
259
|
+
options=(),
|
|
260
|
+
channel_credentials=None,
|
|
261
|
+
call_credentials=None,
|
|
262
|
+
insecure=False,
|
|
263
|
+
compression=None,
|
|
264
|
+
wait_for_ready=None,
|
|
265
|
+
timeout=None,
|
|
266
|
+
metadata=None):
|
|
267
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/DeleteView',
|
|
268
|
+
sift_dot_views_dot_v1_dot_views__pb2.DeleteViewRequest.SerializeToString,
|
|
269
|
+
sift_dot_views_dot_v1_dot_views__pb2.DeleteViewResponse.FromString,
|
|
270
|
+
options, channel_credentials,
|
|
271
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
272
|
+
|
|
273
|
+
@staticmethod
|
|
274
|
+
def PinView(request,
|
|
275
|
+
target,
|
|
276
|
+
options=(),
|
|
277
|
+
channel_credentials=None,
|
|
278
|
+
call_credentials=None,
|
|
279
|
+
insecure=False,
|
|
280
|
+
compression=None,
|
|
281
|
+
wait_for_ready=None,
|
|
282
|
+
timeout=None,
|
|
283
|
+
metadata=None):
|
|
284
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/PinView',
|
|
285
|
+
sift_dot_views_dot_v1_dot_views__pb2.PinViewRequest.SerializeToString,
|
|
286
|
+
sift_dot_views_dot_v1_dot_views__pb2.PinViewResponse.FromString,
|
|
287
|
+
options, channel_credentials,
|
|
288
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
289
|
+
|
|
290
|
+
@staticmethod
|
|
291
|
+
def UnpinView(request,
|
|
292
|
+
target,
|
|
293
|
+
options=(),
|
|
294
|
+
channel_credentials=None,
|
|
295
|
+
call_credentials=None,
|
|
296
|
+
insecure=False,
|
|
297
|
+
compression=None,
|
|
298
|
+
wait_for_ready=None,
|
|
299
|
+
timeout=None,
|
|
300
|
+
metadata=None):
|
|
301
|
+
return grpc.experimental.unary_unary(request, target, '/sift.views.v1.ViewService/UnpinView',
|
|
302
|
+
sift_dot_views_dot_v1_dot_views__pb2.UnpinViewRequest.SerializeToString,
|
|
303
|
+
sift_dot_views_dot_v1_dot_views__pb2.UnpinViewResponse.FromString,
|
|
304
|
+
options, channel_credentials,
|
|
305
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,184 @@
|
|
|
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 sift.views.v1.views_pb2
|
|
11
|
+
import typing
|
|
12
|
+
|
|
13
|
+
_T = typing.TypeVar("_T")
|
|
14
|
+
|
|
15
|
+
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
|
|
16
|
+
|
|
17
|
+
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
class ViewServiceStub:
|
|
21
|
+
def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
|
|
22
|
+
GetView: grpc.UnaryUnaryMultiCallable[
|
|
23
|
+
sift.views.v1.views_pb2.GetViewRequest,
|
|
24
|
+
sift.views.v1.views_pb2.GetViewResponse,
|
|
25
|
+
]
|
|
26
|
+
"""Retrieves a view."""
|
|
27
|
+
|
|
28
|
+
CreateView: grpc.UnaryUnaryMultiCallable[
|
|
29
|
+
sift.views.v1.views_pb2.CreateViewRequest,
|
|
30
|
+
sift.views.v1.views_pb2.CreateViewResponse,
|
|
31
|
+
]
|
|
32
|
+
"""Creates a view."""
|
|
33
|
+
|
|
34
|
+
UpdateView: grpc.UnaryUnaryMultiCallable[
|
|
35
|
+
sift.views.v1.views_pb2.UpdateViewRequest,
|
|
36
|
+
sift.views.v1.views_pb2.UpdateViewResponse,
|
|
37
|
+
]
|
|
38
|
+
"""Updates an existing view using using the list of fields specified in `update_mask`."""
|
|
39
|
+
|
|
40
|
+
ListViews: grpc.UnaryUnaryMultiCallable[
|
|
41
|
+
sift.views.v1.views_pb2.ListViewsRequest,
|
|
42
|
+
sift.views.v1.views_pb2.ListViewsResponse,
|
|
43
|
+
]
|
|
44
|
+
"""Retrieves views using an optional filter."""
|
|
45
|
+
|
|
46
|
+
ListApplicableViews: grpc.UnaryUnaryMultiCallable[
|
|
47
|
+
sift.views.v1.views_pb2.ListApplicableViewsRequest,
|
|
48
|
+
sift.views.v1.views_pb2.ListApplicableViewsResponse,
|
|
49
|
+
]
|
|
50
|
+
"""Lists views that apply to assets/runs."""
|
|
51
|
+
|
|
52
|
+
DeleteView: grpc.UnaryUnaryMultiCallable[
|
|
53
|
+
sift.views.v1.views_pb2.DeleteViewRequest,
|
|
54
|
+
sift.views.v1.views_pb2.DeleteViewResponse,
|
|
55
|
+
]
|
|
56
|
+
"""Deletes a view."""
|
|
57
|
+
|
|
58
|
+
PinView: grpc.UnaryUnaryMultiCallable[
|
|
59
|
+
sift.views.v1.views_pb2.PinViewRequest,
|
|
60
|
+
sift.views.v1.views_pb2.PinViewResponse,
|
|
61
|
+
]
|
|
62
|
+
"""Pins a view."""
|
|
63
|
+
|
|
64
|
+
UnpinView: grpc.UnaryUnaryMultiCallable[
|
|
65
|
+
sift.views.v1.views_pb2.UnpinViewRequest,
|
|
66
|
+
sift.views.v1.views_pb2.UnpinViewResponse,
|
|
67
|
+
]
|
|
68
|
+
"""Unpins a view."""
|
|
69
|
+
|
|
70
|
+
class ViewServiceAsyncStub:
|
|
71
|
+
GetView: grpc.aio.UnaryUnaryMultiCallable[
|
|
72
|
+
sift.views.v1.views_pb2.GetViewRequest,
|
|
73
|
+
sift.views.v1.views_pb2.GetViewResponse,
|
|
74
|
+
]
|
|
75
|
+
"""Retrieves a view."""
|
|
76
|
+
|
|
77
|
+
CreateView: grpc.aio.UnaryUnaryMultiCallable[
|
|
78
|
+
sift.views.v1.views_pb2.CreateViewRequest,
|
|
79
|
+
sift.views.v1.views_pb2.CreateViewResponse,
|
|
80
|
+
]
|
|
81
|
+
"""Creates a view."""
|
|
82
|
+
|
|
83
|
+
UpdateView: grpc.aio.UnaryUnaryMultiCallable[
|
|
84
|
+
sift.views.v1.views_pb2.UpdateViewRequest,
|
|
85
|
+
sift.views.v1.views_pb2.UpdateViewResponse,
|
|
86
|
+
]
|
|
87
|
+
"""Updates an existing view using using the list of fields specified in `update_mask`."""
|
|
88
|
+
|
|
89
|
+
ListViews: grpc.aio.UnaryUnaryMultiCallable[
|
|
90
|
+
sift.views.v1.views_pb2.ListViewsRequest,
|
|
91
|
+
sift.views.v1.views_pb2.ListViewsResponse,
|
|
92
|
+
]
|
|
93
|
+
"""Retrieves views using an optional filter."""
|
|
94
|
+
|
|
95
|
+
ListApplicableViews: grpc.aio.UnaryUnaryMultiCallable[
|
|
96
|
+
sift.views.v1.views_pb2.ListApplicableViewsRequest,
|
|
97
|
+
sift.views.v1.views_pb2.ListApplicableViewsResponse,
|
|
98
|
+
]
|
|
99
|
+
"""Lists views that apply to assets/runs."""
|
|
100
|
+
|
|
101
|
+
DeleteView: grpc.aio.UnaryUnaryMultiCallable[
|
|
102
|
+
sift.views.v1.views_pb2.DeleteViewRequest,
|
|
103
|
+
sift.views.v1.views_pb2.DeleteViewResponse,
|
|
104
|
+
]
|
|
105
|
+
"""Deletes a view."""
|
|
106
|
+
|
|
107
|
+
PinView: grpc.aio.UnaryUnaryMultiCallable[
|
|
108
|
+
sift.views.v1.views_pb2.PinViewRequest,
|
|
109
|
+
sift.views.v1.views_pb2.PinViewResponse,
|
|
110
|
+
]
|
|
111
|
+
"""Pins a view."""
|
|
112
|
+
|
|
113
|
+
UnpinView: grpc.aio.UnaryUnaryMultiCallable[
|
|
114
|
+
sift.views.v1.views_pb2.UnpinViewRequest,
|
|
115
|
+
sift.views.v1.views_pb2.UnpinViewResponse,
|
|
116
|
+
]
|
|
117
|
+
"""Unpins a view."""
|
|
118
|
+
|
|
119
|
+
class ViewServiceServicer(metaclass=abc.ABCMeta):
|
|
120
|
+
@abc.abstractmethod
|
|
121
|
+
def GetView(
|
|
122
|
+
self,
|
|
123
|
+
request: sift.views.v1.views_pb2.GetViewRequest,
|
|
124
|
+
context: _ServicerContext,
|
|
125
|
+
) -> typing.Union[sift.views.v1.views_pb2.GetViewResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.GetViewResponse]]:
|
|
126
|
+
"""Retrieves a view."""
|
|
127
|
+
|
|
128
|
+
@abc.abstractmethod
|
|
129
|
+
def CreateView(
|
|
130
|
+
self,
|
|
131
|
+
request: sift.views.v1.views_pb2.CreateViewRequest,
|
|
132
|
+
context: _ServicerContext,
|
|
133
|
+
) -> typing.Union[sift.views.v1.views_pb2.CreateViewResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.CreateViewResponse]]:
|
|
134
|
+
"""Creates a view."""
|
|
135
|
+
|
|
136
|
+
@abc.abstractmethod
|
|
137
|
+
def UpdateView(
|
|
138
|
+
self,
|
|
139
|
+
request: sift.views.v1.views_pb2.UpdateViewRequest,
|
|
140
|
+
context: _ServicerContext,
|
|
141
|
+
) -> typing.Union[sift.views.v1.views_pb2.UpdateViewResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.UpdateViewResponse]]:
|
|
142
|
+
"""Updates an existing view using using the list of fields specified in `update_mask`."""
|
|
143
|
+
|
|
144
|
+
@abc.abstractmethod
|
|
145
|
+
def ListViews(
|
|
146
|
+
self,
|
|
147
|
+
request: sift.views.v1.views_pb2.ListViewsRequest,
|
|
148
|
+
context: _ServicerContext,
|
|
149
|
+
) -> typing.Union[sift.views.v1.views_pb2.ListViewsResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.ListViewsResponse]]:
|
|
150
|
+
"""Retrieves views using an optional filter."""
|
|
151
|
+
|
|
152
|
+
@abc.abstractmethod
|
|
153
|
+
def ListApplicableViews(
|
|
154
|
+
self,
|
|
155
|
+
request: sift.views.v1.views_pb2.ListApplicableViewsRequest,
|
|
156
|
+
context: _ServicerContext,
|
|
157
|
+
) -> typing.Union[sift.views.v1.views_pb2.ListApplicableViewsResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.ListApplicableViewsResponse]]:
|
|
158
|
+
"""Lists views that apply to assets/runs."""
|
|
159
|
+
|
|
160
|
+
@abc.abstractmethod
|
|
161
|
+
def DeleteView(
|
|
162
|
+
self,
|
|
163
|
+
request: sift.views.v1.views_pb2.DeleteViewRequest,
|
|
164
|
+
context: _ServicerContext,
|
|
165
|
+
) -> typing.Union[sift.views.v1.views_pb2.DeleteViewResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.DeleteViewResponse]]:
|
|
166
|
+
"""Deletes a view."""
|
|
167
|
+
|
|
168
|
+
@abc.abstractmethod
|
|
169
|
+
def PinView(
|
|
170
|
+
self,
|
|
171
|
+
request: sift.views.v1.views_pb2.PinViewRequest,
|
|
172
|
+
context: _ServicerContext,
|
|
173
|
+
) -> typing.Union[sift.views.v1.views_pb2.PinViewResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.PinViewResponse]]:
|
|
174
|
+
"""Pins a view."""
|
|
175
|
+
|
|
176
|
+
@abc.abstractmethod
|
|
177
|
+
def UnpinView(
|
|
178
|
+
self,
|
|
179
|
+
request: sift.views.v1.views_pb2.UnpinViewRequest,
|
|
180
|
+
context: _ServicerContext,
|
|
181
|
+
) -> typing.Union[sift.views.v1.views_pb2.UnpinViewResponse, collections.abc.Awaitable[sift.views.v1.views_pb2.UnpinViewResponse]]:
|
|
182
|
+
"""Unpins a view."""
|
|
183
|
+
|
|
184
|
+
def add_ViewServiceServicer_to_server(servicer: ViewServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
|
sift_grafana/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field, model_validator
|
|
4
|
+
from typing_extensions import Self
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
These are the models that are used to validate the input data for the Sift Grafana Plugin queries
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Channel(BaseModel):
|
|
12
|
+
channelId: Optional[str] = None # noqa: N815
|
|
13
|
+
channelIdentifier: Optional[str] = None # noqa: N815
|
|
14
|
+
|
|
15
|
+
@model_validator(mode="after")
|
|
16
|
+
def check_passwords_match(self) -> Self:
|
|
17
|
+
channel_id = self.channelId
|
|
18
|
+
channel_identifier = self.channelIdentifier
|
|
19
|
+
if channel_id is None and channel_identifier is None:
|
|
20
|
+
raise ValueError("channelId or channelIdentifier must be provided")
|
|
21
|
+
return self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Asset(BaseModel):
|
|
25
|
+
assetId: Optional[str] = None # noqa: N815
|
|
26
|
+
assetName: Optional[str] = None # noqa: N815
|
|
27
|
+
|
|
28
|
+
@model_validator(mode="after")
|
|
29
|
+
def check_passwords_match(self) -> Self:
|
|
30
|
+
asset_id = self.assetId
|
|
31
|
+
asset_name = self.assetName
|
|
32
|
+
if asset_id is None and asset_name is None:
|
|
33
|
+
raise ValueError("assetId or assetName must be provided")
|
|
34
|
+
return self
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ChannelReference(Channel):
|
|
38
|
+
# Enforce format "${number}"
|
|
39
|
+
channelReference: str = Field(..., pattern=r"^\$\d+$") # noqa: N815
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class AssetChannelQuery(Asset, Channel):
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class CalculatedChannelQuery(BaseModel):
|
|
47
|
+
name: str
|
|
48
|
+
asset: Asset
|
|
49
|
+
channelReferences: List[ChannelReference] # noqa: N815
|
|
50
|
+
expression: str
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class SiftQuery(BaseModel):
|
|
54
|
+
queries: List[AssetChannelQuery]
|
|
55
|
+
calculatedChannelQuery: Optional[CalculatedChannelQuery] = None # noqa: N815
|
|
56
|
+
groupByRun: bool # noqa: N815
|
|
57
|
+
|
|
58
|
+
@model_validator(mode="after")
|
|
59
|
+
def check_passwords_match(self) -> Self:
|
|
60
|
+
queries = self.queries
|
|
61
|
+
calculated_channel_query = self.calculatedChannelQuery
|
|
62
|
+
if len(queries) > 0 and calculated_channel_query is not None:
|
|
63
|
+
raise ValueError("queries and calculatedChannelQuery cannot both be provided")
|
|
64
|
+
return self
|