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.
Files changed (291) hide show
  1. google/__init__.py +1 -0
  2. google/api/__init__.py +0 -0
  3. google/api/annotations_pb2.py +27 -0
  4. google/api/annotations_pb2.pyi +29 -0
  5. google/api/annotations_pb2_grpc.py +4 -0
  6. google/api/annotations_pb2_grpc.pyi +30 -0
  7. google/api/field_behavior_pb2.py +30 -0
  8. google/api/field_behavior_pb2.pyi +175 -0
  9. google/api/field_behavior_pb2_grpc.py +4 -0
  10. google/api/field_behavior_pb2_grpc.pyi +30 -0
  11. google/api/http_pb2.py +31 -0
  12. google/api/http_pb2.pyi +433 -0
  13. google/api/http_pb2_grpc.py +4 -0
  14. google/api/http_pb2_grpc.pyi +30 -0
  15. protoc_gen_openapiv2/__init__.py +0 -0
  16. protoc_gen_openapiv2/options/__init__.py +0 -0
  17. protoc_gen_openapiv2/options/annotations_pb2.py +27 -0
  18. protoc_gen_openapiv2/options/annotations_pb2.pyi +48 -0
  19. protoc_gen_openapiv2/options/annotations_pb2_grpc.py +4 -0
  20. protoc_gen_openapiv2/options/annotations_pb2_grpc.pyi +17 -0
  21. protoc_gen_openapiv2/options/openapiv2_pb2.py +132 -0
  22. protoc_gen_openapiv2/options/openapiv2_pb2.pyi +1533 -0
  23. protoc_gen_openapiv2/options/openapiv2_pb2_grpc.py +4 -0
  24. protoc_gen_openapiv2/options/openapiv2_pb2_grpc.pyi +17 -0
  25. sift/__init__.py +0 -0
  26. sift/annotation_logs/__init__.py +0 -0
  27. sift/annotation_logs/v1/__init__.py +0 -0
  28. sift/annotation_logs/v1/annotation_logs_pb2.py +115 -0
  29. sift/annotation_logs/v1/annotation_logs_pb2.pyi +370 -0
  30. sift/annotation_logs/v1/annotation_logs_pb2_grpc.py +135 -0
  31. sift/annotation_logs/v1/annotation_logs_pb2_grpc.pyi +84 -0
  32. sift/annotations/__init__.py +0 -0
  33. sift/annotations/v1/__init__.py +0 -0
  34. sift/annotations/v1/annotations_pb2.py +180 -0
  35. sift/annotations/v1/annotations_pb2.pyi +539 -0
  36. sift/annotations/v1/annotations_pb2_grpc.py +237 -0
  37. sift/annotations/v1/annotations_pb2_grpc.pyi +144 -0
  38. sift/assets/__init__.py +0 -0
  39. sift/assets/v1/__init__.py +0 -0
  40. sift/assets/v1/assets_pb2.py +90 -0
  41. sift/assets/v1/assets_pb2.pyi +235 -0
  42. sift/assets/v1/assets_pb2_grpc.py +168 -0
  43. sift/assets/v1/assets_pb2_grpc.pyi +101 -0
  44. sift/calculated_channels/__init__.py +0 -0
  45. sift/calculated_channels/v1/__init__.py +0 -0
  46. sift/calculated_channels/v1/calculated_channels_pb2.py +99 -0
  47. sift/calculated_channels/v1/calculated_channels_pb2.pyi +280 -0
  48. sift/calculated_channels/v1/calculated_channels_pb2_grpc.py +101 -0
  49. sift/calculated_channels/v1/calculated_channels_pb2_grpc.pyi +64 -0
  50. sift/campaigns/__init__.py +0 -0
  51. sift/campaigns/v1/__init__.py +0 -0
  52. sift/campaigns/v1/campaigns_pb2.py +144 -0
  53. sift/campaigns/v1/campaigns_pb2.pyi +383 -0
  54. sift/campaigns/v1/campaigns_pb2_grpc.py +169 -0
  55. sift/campaigns/v1/campaigns_pb2_grpc.pyi +104 -0
  56. sift/channel_schemas/__init__.py +0 -0
  57. sift/channel_schemas/v1/__init__.py +0 -0
  58. sift/channel_schemas/v1/channel_schemas_pb2.py +69 -0
  59. sift/channel_schemas/v1/channel_schemas_pb2.pyi +117 -0
  60. sift/channel_schemas/v1/channel_schemas_pb2_grpc.py +101 -0
  61. sift/channel_schemas/v1/channel_schemas_pb2_grpc.pyi +64 -0
  62. sift/channels/__init__.py +0 -0
  63. sift/channels/v2/__init__.py +0 -0
  64. sift/channels/v2/channels_pb2.py +88 -0
  65. sift/channels/v2/channels_pb2.pyi +183 -0
  66. sift/channels/v2/channels_pb2_grpc.py +101 -0
  67. sift/channels/v2/channels_pb2_grpc.pyi +64 -0
  68. sift/common/__init__.py +0 -0
  69. sift/common/type/__init__.py +0 -0
  70. sift/common/type/v1/__init__.py +0 -0
  71. sift/common/type/v1/channel_bit_field_element_pb2.py +34 -0
  72. sift/common/type/v1/channel_bit_field_element_pb2.pyi +33 -0
  73. sift/common/type/v1/channel_bit_field_element_pb2_grpc.py +4 -0
  74. sift/common/type/v1/channel_bit_field_element_pb2_grpc.pyi +17 -0
  75. sift/common/type/v1/channel_data_type_pb2.py +29 -0
  76. sift/common/type/v1/channel_data_type_pb2.pyi +50 -0
  77. sift/common/type/v1/channel_data_type_pb2_grpc.py +4 -0
  78. sift/common/type/v1/channel_data_type_pb2_grpc.pyi +17 -0
  79. sift/common/type/v1/channel_enum_type_pb2.py +32 -0
  80. sift/common/type/v1/channel_enum_type_pb2.pyi +29 -0
  81. sift/common/type/v1/channel_enum_type_pb2_grpc.py +4 -0
  82. sift/common/type/v1/channel_enum_type_pb2_grpc.pyi +17 -0
  83. sift/common/type/v1/organization_pb2.py +27 -0
  84. sift/common/type/v1/organization_pb2.pyi +29 -0
  85. sift/common/type/v1/organization_pb2_grpc.py +4 -0
  86. sift/common/type/v1/organization_pb2_grpc.pyi +17 -0
  87. sift/common/type/v1/resource_identifier_pb2.py +46 -0
  88. sift/common/type/v1/resource_identifier_pb2.pyi +145 -0
  89. sift/common/type/v1/resource_identifier_pb2_grpc.py +4 -0
  90. sift/common/type/v1/resource_identifier_pb2_grpc.pyi +17 -0
  91. sift/common/type/v1/user_pb2.py +33 -0
  92. sift/common/type/v1/user_pb2.pyi +36 -0
  93. sift/common/type/v1/user_pb2_grpc.py +4 -0
  94. sift/common/type/v1/user_pb2_grpc.pyi +17 -0
  95. sift/data/__init__.py +0 -0
  96. sift/data/v1/__init__.py +0 -0
  97. sift/data/v1/data_pb2.py +212 -0
  98. sift/data/v1/data_pb2.pyi +745 -0
  99. sift/data/v1/data_pb2_grpc.py +67 -0
  100. sift/data/v1/data_pb2_grpc.pyi +44 -0
  101. sift/ingest/__init__.py +0 -0
  102. sift/ingest/v1/__init__.py +0 -0
  103. sift/ingest/v1/ingest_pb2.py +35 -0
  104. sift/ingest/v1/ingest_pb2.pyi +118 -0
  105. sift/ingest/v1/ingest_pb2_grpc.py +66 -0
  106. sift/ingest/v1/ingest_pb2_grpc.pyi +41 -0
  107. sift/ingestion_configs/__init__.py +0 -0
  108. sift/ingestion_configs/v1/__init__.py +0 -0
  109. sift/ingestion_configs/v1/ingestion_configs_pb2.py +115 -0
  110. sift/ingestion_configs/v1/ingestion_configs_pb2.pyi +332 -0
  111. sift/ingestion_configs/v1/ingestion_configs_pb2_grpc.py +203 -0
  112. sift/ingestion_configs/v1/ingestion_configs_pb2_grpc.pyi +124 -0
  113. sift/notifications/__init__.py +0 -0
  114. sift/notifications/v1/__init__.py +0 -0
  115. sift/notifications/v1/notifications_pb2.py +64 -0
  116. sift/notifications/v1/notifications_pb2.pyi +225 -0
  117. sift/notifications/v1/notifications_pb2_grpc.py +101 -0
  118. sift/notifications/v1/notifications_pb2_grpc.pyi +64 -0
  119. sift/ping/__init__.py +0 -0
  120. sift/ping/v1/__init__.py +0 -0
  121. sift/ping/v1/ping_pb2.py +38 -0
  122. sift/ping/v1/ping_pb2.pyi +36 -0
  123. sift/ping/v1/ping_pb2_grpc.py +66 -0
  124. sift/ping/v1/ping_pb2_grpc.pyi +41 -0
  125. sift/remote_files/__init__.py +0 -0
  126. sift/remote_files/v1/__init__.py +0 -0
  127. sift/remote_files/v1/remote_files_pb2.py +174 -0
  128. sift/remote_files/v1/remote_files_pb2.pyi +472 -0
  129. sift/remote_files/v1/remote_files_pb2_grpc.py +271 -0
  130. sift/remote_files/v1/remote_files_pb2_grpc.pyi +164 -0
  131. sift/report_templates/__init__.py +0 -0
  132. sift/report_templates/v1/__init__.py +0 -0
  133. sift/report_templates/v1/report_templates_pb2.py +146 -0
  134. sift/report_templates/v1/report_templates_pb2.pyi +381 -0
  135. sift/report_templates/v1/report_templates_pb2_grpc.py +169 -0
  136. sift/report_templates/v1/report_templates_pb2_grpc.pyi +104 -0
  137. sift/reports/__init__.py +0 -0
  138. sift/reports/v1/__init__.py +0 -0
  139. sift/reports/v1/reports_pb2.py +193 -0
  140. sift/reports/v1/reports_pb2.pyi +562 -0
  141. sift/reports/v1/reports_pb2_grpc.py +205 -0
  142. sift/reports/v1/reports_pb2_grpc.pyi +136 -0
  143. sift/rule_evaluation/__init__.py +0 -0
  144. sift/rule_evaluation/v1/__init__.py +0 -0
  145. sift/rule_evaluation/v1/rule_evaluation_pb2.py +89 -0
  146. sift/rule_evaluation/v1/rule_evaluation_pb2.pyi +263 -0
  147. sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.py +101 -0
  148. sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.pyi +64 -0
  149. sift/rules/__init__.py +0 -0
  150. sift/rules/v1/__init__.py +0 -0
  151. sift/rules/v1/rules_pb2.py +420 -0
  152. sift/rules/v1/rules_pb2.pyi +1355 -0
  153. sift/rules/v1/rules_pb2_grpc.py +577 -0
  154. sift/rules/v1/rules_pb2_grpc.pyi +351 -0
  155. sift/runs/__init__.py +0 -0
  156. sift/runs/v2/__init__.py +0 -0
  157. sift/runs/v2/runs_pb2.py +150 -0
  158. sift/runs/v2/runs_pb2.pyi +413 -0
  159. sift/runs/v2/runs_pb2_grpc.py +271 -0
  160. sift/runs/v2/runs_pb2_grpc.pyi +164 -0
  161. sift/saved_searches/__init__.py +0 -0
  162. sift/saved_searches/v1/__init__.py +0 -0
  163. sift/saved_searches/v1/saved_searches_pb2.py +144 -0
  164. sift/saved_searches/v1/saved_searches_pb2.pyi +385 -0
  165. sift/saved_searches/v1/saved_searches_pb2_grpc.py +237 -0
  166. sift/saved_searches/v1/saved_searches_pb2_grpc.pyi +144 -0
  167. sift/tags/__init__.py +0 -0
  168. sift/tags/v1/__init__.py +0 -0
  169. sift/tags/v1/tags_pb2.py +49 -0
  170. sift/tags/v1/tags_pb2.pyi +71 -0
  171. sift/tags/v1/tags_pb2_grpc.py +4 -0
  172. sift/tags/v1/tags_pb2_grpc.pyi +17 -0
  173. sift/users/__init__.py +0 -0
  174. sift/users/v2/__init__.py +0 -0
  175. sift/users/v2/users_pb2.py +61 -0
  176. sift/users/v2/users_pb2.pyi +142 -0
  177. sift/users/v2/users_pb2_grpc.py +135 -0
  178. sift/users/v2/users_pb2_grpc.pyi +84 -0
  179. sift/views/__init__.py +0 -0
  180. sift/views/v1/__init__.py +0 -0
  181. sift/views/v1/views_pb2.py +130 -0
  182. sift/views/v1/views_pb2.pyi +466 -0
  183. sift/views/v1/views_pb2_grpc.py +305 -0
  184. sift/views/v1/views_pb2_grpc.pyi +184 -0
  185. sift_grafana/py.typed +0 -0
  186. sift_grafana/sift_query_model.py +64 -0
  187. sift_py/__init__.py +923 -0
  188. sift_py/_internal/__init__.py +5 -0
  189. sift_py/_internal/cel.py +18 -0
  190. sift_py/_internal/channel.py +42 -0
  191. sift_py/_internal/convert/__init__.py +3 -0
  192. sift_py/_internal/convert/json.py +24 -0
  193. sift_py/_internal/convert/protobuf.py +34 -0
  194. sift_py/_internal/convert/timestamp.py +9 -0
  195. sift_py/_internal/test_util/__init__.py +0 -0
  196. sift_py/_internal/test_util/channel.py +136 -0
  197. sift_py/_internal/test_util/fn.py +14 -0
  198. sift_py/_internal/test_util/server_interceptor.py +62 -0
  199. sift_py/_internal/time.py +48 -0
  200. sift_py/_internal/user.py +39 -0
  201. sift_py/data/__init__.py +171 -0
  202. sift_py/data/_channel.py +38 -0
  203. sift_py/data/_deserialize.py +208 -0
  204. sift_py/data/_deserialize_test.py +134 -0
  205. sift_py/data/_service_test.py +276 -0
  206. sift_py/data/_validate.py +10 -0
  207. sift_py/data/error.py +5 -0
  208. sift_py/data/query.py +299 -0
  209. sift_py/data/service.py +497 -0
  210. sift_py/data_import/__init__.py +130 -0
  211. sift_py/data_import/_config.py +167 -0
  212. sift_py/data_import/_config_test.py +166 -0
  213. sift_py/data_import/_csv_test.py +395 -0
  214. sift_py/data_import/_status_test.py +176 -0
  215. sift_py/data_import/_tdms_test.py +238 -0
  216. sift_py/data_import/ch10.py +157 -0
  217. sift_py/data_import/config.py +19 -0
  218. sift_py/data_import/csv.py +259 -0
  219. sift_py/data_import/status.py +113 -0
  220. sift_py/data_import/tdms.py +206 -0
  221. sift_py/data_import/tempfile.py +30 -0
  222. sift_py/data_import/time_format.py +39 -0
  223. sift_py/error.py +11 -0
  224. sift_py/file_attachment/__init__.py +88 -0
  225. sift_py/file_attachment/_internal/__init__.py +0 -0
  226. sift_py/file_attachment/_internal/download.py +13 -0
  227. sift_py/file_attachment/_internal/upload.py +100 -0
  228. sift_py/file_attachment/_service_test.py +161 -0
  229. sift_py/file_attachment/entity.py +30 -0
  230. sift_py/file_attachment/metadata.py +107 -0
  231. sift_py/file_attachment/service.py +142 -0
  232. sift_py/grpc/__init__.py +15 -0
  233. sift_py/grpc/_async_interceptors/__init__.py +0 -0
  234. sift_py/grpc/_async_interceptors/base.py +72 -0
  235. sift_py/grpc/_async_interceptors/metadata.py +36 -0
  236. sift_py/grpc/_interceptors/__init__.py +0 -0
  237. sift_py/grpc/_interceptors/base.py +61 -0
  238. sift_py/grpc/_interceptors/context.py +25 -0
  239. sift_py/grpc/_interceptors/metadata.py +33 -0
  240. sift_py/grpc/_retry.py +70 -0
  241. sift_py/grpc/keepalive.py +34 -0
  242. sift_py/grpc/transport.py +250 -0
  243. sift_py/grpc/transport_test.py +170 -0
  244. sift_py/ingestion/__init__.py +6 -0
  245. sift_py/ingestion/_internal/__init__.py +6 -0
  246. sift_py/ingestion/_internal/channel.py +12 -0
  247. sift_py/ingestion/_internal/error.py +10 -0
  248. sift_py/ingestion/_internal/ingest.py +350 -0
  249. sift_py/ingestion/_internal/ingest_test.py +357 -0
  250. sift_py/ingestion/_internal/ingestion_config.py +130 -0
  251. sift_py/ingestion/_internal/run.py +46 -0
  252. sift_py/ingestion/_service_test.py +478 -0
  253. sift_py/ingestion/buffer.py +189 -0
  254. sift_py/ingestion/channel.py +422 -0
  255. sift_py/ingestion/config/__init__.py +3 -0
  256. sift_py/ingestion/config/telemetry.py +281 -0
  257. sift_py/ingestion/config/telemetry_test.py +405 -0
  258. sift_py/ingestion/config/yaml/__init__.py +0 -0
  259. sift_py/ingestion/config/yaml/error.py +44 -0
  260. sift_py/ingestion/config/yaml/load.py +126 -0
  261. sift_py/ingestion/config/yaml/spec.py +58 -0
  262. sift_py/ingestion/config/yaml/test_load.py +25 -0
  263. sift_py/ingestion/flow.py +73 -0
  264. sift_py/ingestion/manager.py +99 -0
  265. sift_py/ingestion/rule/__init__.py +4 -0
  266. sift_py/ingestion/rule/config.py +11 -0
  267. sift_py/ingestion/service.py +237 -0
  268. sift_py/py.typed +0 -0
  269. sift_py/report_templates/__init__.py +0 -0
  270. sift_py/report_templates/_config_test.py +34 -0
  271. sift_py/report_templates/_service_test.py +94 -0
  272. sift_py/report_templates/config.py +36 -0
  273. sift_py/report_templates/service.py +171 -0
  274. sift_py/rest.py +29 -0
  275. sift_py/rule/__init__.py +0 -0
  276. sift_py/rule/_config_test.py +109 -0
  277. sift_py/rule/_service_test.py +168 -0
  278. sift_py/rule/config.py +229 -0
  279. sift_py/rule/service.py +484 -0
  280. sift_py/yaml/__init__.py +0 -0
  281. sift_py/yaml/_channel_test.py +169 -0
  282. sift_py/yaml/_rule_test.py +207 -0
  283. sift_py/yaml/channel.py +224 -0
  284. sift_py/yaml/report_templates.py +73 -0
  285. sift_py/yaml/rule.py +321 -0
  286. sift_py/yaml/utils.py +15 -0
  287. sift_stack_py-0.3.2.dist-info/LICENSE +7 -0
  288. sift_stack_py-0.3.2.dist-info/METADATA +109 -0
  289. sift_stack_py-0.3.2.dist-info/RECORD +291 -0
  290. sift_stack_py-0.3.2.dist-info/WHEEL +5 -0
  291. sift_stack_py-0.3.2.dist-info/top_level.txt +5 -0
@@ -0,0 +1,263 @@
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.message
11
+ import google.protobuf.timestamp_pb2
12
+ import sift.common.type.v1.resource_identifier_pb2
13
+ import sift.rules.v1.rules_pb2
14
+ import typing
15
+
16
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
17
+
18
+ @typing.final
19
+ class EvaluateRulesRequest(google.protobuf.message.Message):
20
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
21
+
22
+ RUN_FIELD_NUMBER: builtins.int
23
+ ASSETS_FIELD_NUMBER: builtins.int
24
+ RULES_FIELD_NUMBER: builtins.int
25
+ RULE_VERSIONS_FIELD_NUMBER: builtins.int
26
+ REPORT_TEMPLATE_FIELD_NUMBER: builtins.int
27
+ ANNOTATION_OPTIONS_FIELD_NUMBER: builtins.int
28
+ ORGANIZATION_ID_FIELD_NUMBER: builtins.int
29
+ REPORT_NAME_FIELD_NUMBER: builtins.int
30
+ organization_id: builtins.str
31
+ """Only required if your user belongs to multiple organizations"""
32
+ report_name: builtins.str
33
+ """If this request creates a report, this field will be used as the report name."""
34
+ @property
35
+ def run(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier: ...
36
+ @property
37
+ def assets(self) -> global___AssetsTimeRange: ...
38
+ @property
39
+ def rules(self) -> global___EvaluateRulesFromCurrentRuleVersions: ...
40
+ @property
41
+ def rule_versions(self) -> global___EvaluateRulesFromRuleVersions: ...
42
+ @property
43
+ def report_template(self) -> global___EvaluateRulesFromReportTemplate: ...
44
+ @property
45
+ def annotation_options(self) -> global___EvaluateRulesAnnotationOptions: ...
46
+ def __init__(
47
+ self,
48
+ *,
49
+ run: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier | None = ...,
50
+ assets: global___AssetsTimeRange | None = ...,
51
+ rules: global___EvaluateRulesFromCurrentRuleVersions | None = ...,
52
+ rule_versions: global___EvaluateRulesFromRuleVersions | None = ...,
53
+ report_template: global___EvaluateRulesFromReportTemplate | None = ...,
54
+ annotation_options: global___EvaluateRulesAnnotationOptions | None = ...,
55
+ organization_id: builtins.str = ...,
56
+ report_name: builtins.str | None = ...,
57
+ ) -> None: ...
58
+ def HasField(self, field_name: typing.Literal["_report_name", b"_report_name", "annotation_options", b"annotation_options", "assets", b"assets", "mode", b"mode", "report_name", b"report_name", "report_template", b"report_template", "rule_versions", b"rule_versions", "rules", b"rules", "run", b"run", "time", b"time"]) -> builtins.bool: ...
59
+ def ClearField(self, field_name: typing.Literal["_report_name", b"_report_name", "annotation_options", b"annotation_options", "assets", b"assets", "mode", b"mode", "organization_id", b"organization_id", "report_name", b"report_name", "report_template", b"report_template", "rule_versions", b"rule_versions", "rules", b"rules", "run", b"run", "time", b"time"]) -> None: ...
60
+ @typing.overload
61
+ def WhichOneof(self, oneof_group: typing.Literal["_report_name", b"_report_name"]) -> typing.Literal["report_name"] | None: ...
62
+ @typing.overload
63
+ def WhichOneof(self, oneof_group: typing.Literal["mode", b"mode"]) -> typing.Literal["rules", "rule_versions", "report_template"] | None: ...
64
+ @typing.overload
65
+ def WhichOneof(self, oneof_group: typing.Literal["time", b"time"]) -> typing.Literal["run", "assets"] | None: ...
66
+
67
+ global___EvaluateRulesRequest = EvaluateRulesRequest
68
+
69
+ @typing.final
70
+ class AssetsTimeRange(google.protobuf.message.Message):
71
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
72
+
73
+ ASSETS_FIELD_NUMBER: builtins.int
74
+ START_TIME_FIELD_NUMBER: builtins.int
75
+ END_TIME_FIELD_NUMBER: builtins.int
76
+ @property
77
+ def assets(self) -> sift.common.type.v1.resource_identifier_pb2.NamedResources: ...
78
+ @property
79
+ def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
80
+ @property
81
+ def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
82
+ def __init__(
83
+ self,
84
+ *,
85
+ assets: sift.common.type.v1.resource_identifier_pb2.NamedResources | None = ...,
86
+ start_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
87
+ end_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
88
+ ) -> None: ...
89
+ def HasField(self, field_name: typing.Literal["assets", b"assets", "end_time", b"end_time", "start_time", b"start_time"]) -> builtins.bool: ...
90
+ def ClearField(self, field_name: typing.Literal["assets", b"assets", "end_time", b"end_time", "start_time", b"start_time"]) -> None: ...
91
+
92
+ global___AssetsTimeRange = AssetsTimeRange
93
+
94
+ @typing.final
95
+ class EvaluateRulesFromCurrentRuleVersions(google.protobuf.message.Message):
96
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
97
+
98
+ RULES_FIELD_NUMBER: builtins.int
99
+ @property
100
+ def rules(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifiers: ...
101
+ def __init__(
102
+ self,
103
+ *,
104
+ rules: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifiers | None = ...,
105
+ ) -> None: ...
106
+ def HasField(self, field_name: typing.Literal["rules", b"rules"]) -> builtins.bool: ...
107
+ def ClearField(self, field_name: typing.Literal["rules", b"rules"]) -> None: ...
108
+
109
+ global___EvaluateRulesFromCurrentRuleVersions = EvaluateRulesFromCurrentRuleVersions
110
+
111
+ @typing.final
112
+ class EvaluateRulesFromReportTemplate(google.protobuf.message.Message):
113
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
114
+
115
+ REPORT_TEMPLATE_FIELD_NUMBER: builtins.int
116
+ @property
117
+ def report_template(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier: ...
118
+ def __init__(
119
+ self,
120
+ *,
121
+ report_template: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier | None = ...,
122
+ ) -> None: ...
123
+ def HasField(self, field_name: typing.Literal["report_template", b"report_template"]) -> builtins.bool: ...
124
+ def ClearField(self, field_name: typing.Literal["report_template", b"report_template"]) -> None: ...
125
+
126
+ global___EvaluateRulesFromReportTemplate = EvaluateRulesFromReportTemplate
127
+
128
+ @typing.final
129
+ class EvaluateRulesFromRuleVersions(google.protobuf.message.Message):
130
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
131
+
132
+ RULE_VERSION_IDS_FIELD_NUMBER: builtins.int
133
+ @property
134
+ def rule_version_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
135
+ def __init__(
136
+ self,
137
+ *,
138
+ rule_version_ids: collections.abc.Iterable[builtins.str] | None = ...,
139
+ ) -> None: ...
140
+ def ClearField(self, field_name: typing.Literal["rule_version_ids", b"rule_version_ids"]) -> None: ...
141
+
142
+ global___EvaluateRulesFromRuleVersions = EvaluateRulesFromRuleVersions
143
+
144
+ @typing.final
145
+ class EvaluateRulesAnnotationOptions(google.protobuf.message.Message):
146
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
147
+
148
+ TAGS_FIELD_NUMBER: builtins.int
149
+ @property
150
+ def tags(self) -> sift.common.type.v1.resource_identifier_pb2.NamedResources: ...
151
+ def __init__(
152
+ self,
153
+ *,
154
+ tags: sift.common.type.v1.resource_identifier_pb2.NamedResources | None = ...,
155
+ ) -> None: ...
156
+ def HasField(self, field_name: typing.Literal["tags", b"tags"]) -> builtins.bool: ...
157
+ def ClearField(self, field_name: typing.Literal["tags", b"tags"]) -> None: ...
158
+
159
+ global___EvaluateRulesAnnotationOptions = EvaluateRulesAnnotationOptions
160
+
161
+ @typing.final
162
+ class EvaluateRulesResponse(google.protobuf.message.Message):
163
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
164
+
165
+ CREATED_ANNOTATION_COUNT_FIELD_NUMBER: builtins.int
166
+ REPORT_ID_FIELD_NUMBER: builtins.int
167
+ JOB_ID_FIELD_NUMBER: builtins.int
168
+ created_annotation_count: builtins.int
169
+ report_id: builtins.str
170
+ """A report will be generated if rules were evaluated against a run."""
171
+ job_id: builtins.str
172
+ """This will be set if the job has an extended run time and is being processed asynchronously."""
173
+ def __init__(
174
+ self,
175
+ *,
176
+ created_annotation_count: builtins.int = ...,
177
+ report_id: builtins.str | None = ...,
178
+ job_id: builtins.str | None = ...,
179
+ ) -> None: ...
180
+ def HasField(self, field_name: typing.Literal["_job_id", b"_job_id", "_report_id", b"_report_id", "job_id", b"job_id", "report_id", b"report_id"]) -> builtins.bool: ...
181
+ def ClearField(self, field_name: typing.Literal["_job_id", b"_job_id", "_report_id", b"_report_id", "created_annotation_count", b"created_annotation_count", "job_id", b"job_id", "report_id", b"report_id"]) -> None: ...
182
+ @typing.overload
183
+ def WhichOneof(self, oneof_group: typing.Literal["_job_id", b"_job_id"]) -> typing.Literal["job_id"] | None: ...
184
+ @typing.overload
185
+ def WhichOneof(self, oneof_group: typing.Literal["_report_id", b"_report_id"]) -> typing.Literal["report_id"] | None: ...
186
+
187
+ global___EvaluateRulesResponse = EvaluateRulesResponse
188
+
189
+ @typing.final
190
+ class EvaluateRulesPreviewRequest(google.protobuf.message.Message):
191
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
192
+
193
+ RUN_FIELD_NUMBER: builtins.int
194
+ RULES_FIELD_NUMBER: builtins.int
195
+ RULE_VERSIONS_FIELD_NUMBER: builtins.int
196
+ REPORT_TEMPLATE_FIELD_NUMBER: builtins.int
197
+ RULE_CONFIGS_FIELD_NUMBER: builtins.int
198
+ ORGANIZATION_ID_FIELD_NUMBER: builtins.int
199
+ organization_id: builtins.str
200
+ """Only required if your user belongs to multiple organizations"""
201
+ @property
202
+ def run(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier: ...
203
+ @property
204
+ def rules(self) -> global___EvaluateRulesFromCurrentRuleVersions: ...
205
+ @property
206
+ def rule_versions(self) -> global___EvaluateRulesFromRuleVersions: ...
207
+ @property
208
+ def report_template(self) -> global___EvaluateRulesFromReportTemplate: ...
209
+ @property
210
+ def rule_configs(self) -> global___EvaluateRulesFromRuleConfigs: ...
211
+ def __init__(
212
+ self,
213
+ *,
214
+ run: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier | None = ...,
215
+ rules: global___EvaluateRulesFromCurrentRuleVersions | None = ...,
216
+ rule_versions: global___EvaluateRulesFromRuleVersions | None = ...,
217
+ report_template: global___EvaluateRulesFromReportTemplate | None = ...,
218
+ rule_configs: global___EvaluateRulesFromRuleConfigs | None = ...,
219
+ organization_id: builtins.str = ...,
220
+ ) -> None: ...
221
+ def HasField(self, field_name: typing.Literal["mode", b"mode", "report_template", b"report_template", "rule_configs", b"rule_configs", "rule_versions", b"rule_versions", "rules", b"rules", "run", b"run", "time", b"time"]) -> builtins.bool: ...
222
+ def ClearField(self, field_name: typing.Literal["mode", b"mode", "organization_id", b"organization_id", "report_template", b"report_template", "rule_configs", b"rule_configs", "rule_versions", b"rule_versions", "rules", b"rules", "run", b"run", "time", b"time"]) -> None: ...
223
+ @typing.overload
224
+ def WhichOneof(self, oneof_group: typing.Literal["mode", b"mode"]) -> typing.Literal["rules", "rule_versions", "report_template", "rule_configs"] | None: ...
225
+ @typing.overload
226
+ def WhichOneof(self, oneof_group: typing.Literal["time", b"time"]) -> typing.Literal["run"] | None: ...
227
+
228
+ global___EvaluateRulesPreviewRequest = EvaluateRulesPreviewRequest
229
+
230
+ @typing.final
231
+ class EvaluateRulesFromRuleConfigs(google.protobuf.message.Message):
232
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
233
+
234
+ CONFIGS_FIELD_NUMBER: builtins.int
235
+ @property
236
+ def configs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[sift.rules.v1.rules_pb2.UpdateRuleRequest]: ...
237
+ def __init__(
238
+ self,
239
+ *,
240
+ configs: collections.abc.Iterable[sift.rules.v1.rules_pb2.UpdateRuleRequest] | None = ...,
241
+ ) -> None: ...
242
+ def ClearField(self, field_name: typing.Literal["configs", b"configs"]) -> None: ...
243
+
244
+ global___EvaluateRulesFromRuleConfigs = EvaluateRulesFromRuleConfigs
245
+
246
+ @typing.final
247
+ class EvaluateRulesPreviewResponse(google.protobuf.message.Message):
248
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
249
+
250
+ CREATED_ANNOTATION_COUNT_FIELD_NUMBER: builtins.int
251
+ DRY_RUN_ANNOTATIONS_FIELD_NUMBER: builtins.int
252
+ created_annotation_count: builtins.int
253
+ @property
254
+ def dry_run_annotations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[sift.rules.v1.rules_pb2.DryRunAnnotation]: ...
255
+ def __init__(
256
+ self,
257
+ *,
258
+ created_annotation_count: builtins.int = ...,
259
+ dry_run_annotations: collections.abc.Iterable[sift.rules.v1.rules_pb2.DryRunAnnotation] | None = ...,
260
+ ) -> None: ...
261
+ def ClearField(self, field_name: typing.Literal["created_annotation_count", b"created_annotation_count", "dry_run_annotations", b"dry_run_annotations"]) -> None: ...
262
+
263
+ global___EvaluateRulesPreviewResponse = EvaluateRulesPreviewResponse
@@ -0,0 +1,101 @@
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.rule_evaluation.v1 import rule_evaluation_pb2 as sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2
6
+
7
+
8
+ class RuleEvaluationServiceStub(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.EvaluateRules = channel.unary_unary(
18
+ '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRules',
19
+ request_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesRequest.SerializeToString,
20
+ response_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesResponse.FromString,
21
+ )
22
+ self.EvaluateRulesPreview = channel.unary_unary(
23
+ '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRulesPreview',
24
+ request_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewRequest.SerializeToString,
25
+ response_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewResponse.FromString,
26
+ )
27
+
28
+
29
+ class RuleEvaluationServiceServicer(object):
30
+ """Missing associated documentation comment in .proto file."""
31
+
32
+ def EvaluateRules(self, request, context):
33
+ """Evaluate rules from a designated source against a run or asset and return the total amount of annotations created and the ID of the generated report.
34
+ """
35
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
36
+ context.set_details('Method not implemented!')
37
+ raise NotImplementedError('Method not implemented!')
38
+
39
+ def EvaluateRulesPreview(self, request, context):
40
+ """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.
41
+ """
42
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
43
+ context.set_details('Method not implemented!')
44
+ raise NotImplementedError('Method not implemented!')
45
+
46
+
47
+ def add_RuleEvaluationServiceServicer_to_server(servicer, server):
48
+ rpc_method_handlers = {
49
+ 'EvaluateRules': grpc.unary_unary_rpc_method_handler(
50
+ servicer.EvaluateRules,
51
+ request_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesRequest.FromString,
52
+ response_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesResponse.SerializeToString,
53
+ ),
54
+ 'EvaluateRulesPreview': grpc.unary_unary_rpc_method_handler(
55
+ servicer.EvaluateRulesPreview,
56
+ request_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewRequest.FromString,
57
+ response_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewResponse.SerializeToString,
58
+ ),
59
+ }
60
+ generic_handler = grpc.method_handlers_generic_handler(
61
+ 'sift.rule_evaluation.v1.RuleEvaluationService', rpc_method_handlers)
62
+ server.add_generic_rpc_handlers((generic_handler,))
63
+
64
+
65
+ # This class is part of an EXPERIMENTAL API.
66
+ class RuleEvaluationService(object):
67
+ """Missing associated documentation comment in .proto file."""
68
+
69
+ @staticmethod
70
+ def EvaluateRules(request,
71
+ target,
72
+ options=(),
73
+ channel_credentials=None,
74
+ call_credentials=None,
75
+ insecure=False,
76
+ compression=None,
77
+ wait_for_ready=None,
78
+ timeout=None,
79
+ metadata=None):
80
+ return grpc.experimental.unary_unary(request, target, '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRules',
81
+ sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesRequest.SerializeToString,
82
+ sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesResponse.FromString,
83
+ options, channel_credentials,
84
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
85
+
86
+ @staticmethod
87
+ def EvaluateRulesPreview(request,
88
+ target,
89
+ options=(),
90
+ channel_credentials=None,
91
+ call_credentials=None,
92
+ insecure=False,
93
+ compression=None,
94
+ wait_for_ready=None,
95
+ timeout=None,
96
+ metadata=None):
97
+ return grpc.experimental.unary_unary(request, target, '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRulesPreview',
98
+ sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewRequest.SerializeToString,
99
+ sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewResponse.FromString,
100
+ options, channel_credentials,
101
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -0,0 +1,64 @@
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.rule_evaluation.v1.rule_evaluation_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 RuleEvaluationServiceStub:
21
+ def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
22
+ EvaluateRules: grpc.UnaryUnaryMultiCallable[
23
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesRequest,
24
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse,
25
+ ]
26
+ """Evaluate rules from a designated source against a run or asset and return the total amount of annotations created and the ID of the generated report."""
27
+
28
+ EvaluateRulesPreview: grpc.UnaryUnaryMultiCallable[
29
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewRequest,
30
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse,
31
+ ]
32
+ """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated."""
33
+
34
+ class RuleEvaluationServiceAsyncStub:
35
+ EvaluateRules: grpc.aio.UnaryUnaryMultiCallable[
36
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesRequest,
37
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse,
38
+ ]
39
+ """Evaluate rules from a designated source against a run or asset and return the total amount of annotations created and the ID of the generated report."""
40
+
41
+ EvaluateRulesPreview: grpc.aio.UnaryUnaryMultiCallable[
42
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewRequest,
43
+ sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse,
44
+ ]
45
+ """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated."""
46
+
47
+ class RuleEvaluationServiceServicer(metaclass=abc.ABCMeta):
48
+ @abc.abstractmethod
49
+ def EvaluateRules(
50
+ self,
51
+ request: sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesRequest,
52
+ context: _ServicerContext,
53
+ ) -> typing.Union[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse, collections.abc.Awaitable[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse]]:
54
+ """Evaluate rules from a designated source against a run or asset and return the total amount of annotations created and the ID of the generated report."""
55
+
56
+ @abc.abstractmethod
57
+ def EvaluateRulesPreview(
58
+ self,
59
+ request: sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewRequest,
60
+ context: _ServicerContext,
61
+ ) -> typing.Union[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse, collections.abc.Awaitable[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse]]:
62
+ """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated."""
63
+
64
+ def add_RuleEvaluationServiceServicer_to_server(servicer: RuleEvaluationServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
sift/rules/__init__.py ADDED
File without changes
File without changes