diff --git a/protos/buf.lock b/protos/buf.lock index 2282a530..6bd8f15b 100644 --- a/protos/buf.lock +++ b/protos/buf.lock @@ -4,8 +4,8 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 8bc2c51e08c447cd8886cdea48a73e14 - digest: shake256:a969155953a5cedc5b2df5b42c368f2bc66ff8ce1804bc96e0f14ff2ee8a893687963058909df844d1643cdbc98ff099d2daa6bc9f9f5b8886c49afdc60e19af + commit: e7f8d366f5264595bcc4cd4139af9973 + digest: shake256:e5e5f1c12f82e028ea696faa43b4f9dc6258a6d1226282962a8c8b282e10946281d815884f574bd279ebd9cd7588629beb3db17b892af6c33b56f92f8f67f509 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway diff --git a/protos/sift/annotations/v1/annotations.proto b/protos/sift/annotations/v1/annotations.proto index 4e6cfe23..6c45416c 100644 --- a/protos/sift/annotations/v1/annotations.proto +++ b/protos/sift/annotations/v1/annotations.proto @@ -186,6 +186,7 @@ message DeleteAnnotationRequest { message DeleteAnnotationResponse {} message BatchDeleteAnnotationsRequest { + // Limit of 1000 annotations per batch repeated string annotation_ids = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -217,10 +218,13 @@ message ListAnnotationsRequest { // A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. // Available fields to filter by are `annotation_id`, `start_time`, `end_time`, // `created_date`, `modified_date`, `run_id`, `name`, `description`, `state`, `created_by_user_id`, `created_by_rule_condition_version_id`, - // and `annotation_type`. + // `annotation_type`, `tag_name`, and `assignee`. // For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). // For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#annotation). Optional. string filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // This field is only required if your user belongs to multiple organizations. + string organization_id = 4 [(google.api.field_behavior) = OPTIONAL]; } // The result of a call to `AnnotationService_ListAnnotations`. diff --git a/protos/sift/assets/v1/assets.proto b/protos/sift/assets/v1/assets.proto index 51614c4d..3a4c1370 100644 --- a/protos/sift/assets/v1/assets.proto +++ b/protos/sift/assets/v1/assets.proto @@ -69,6 +69,8 @@ message Asset { string created_by_user_id = 6 [(google.api.field_behavior) = REQUIRED]; google.protobuf.Timestamp modified_date = 7 [(google.api.field_behavior) = REQUIRED]; string modified_by_user_id = 8 [(google.api.field_behavior) = REQUIRED]; + + // The names of the tags to associate with this asset. repeated string tags = 9 [(google.api.field_behavior) = REQUIRED]; } diff --git a/protos/sift/calculated_channels/v1/calculated_channels.proto b/protos/sift/calculated_channels/v1/calculated_channels.proto index e03a85ad..c3938355 100644 --- a/protos/sift/calculated_channels/v1/calculated_channels.proto +++ b/protos/sift/calculated_channels/v1/calculated_channels.proto @@ -74,6 +74,7 @@ message ExpressionIdentifier { string description = 2 [(google.api.field_behavior) = REQUIRED]; ExpressionIdentifierType type = 3 [(google.api.field_behavior) = REQUIRED]; string display_name = 4 [(google.api.field_behavior) = REQUIRED]; + ExpressionIdentifierLibrary library = 5 [(google.api.field_behavior) = REQUIRED]; } enum ExpressionIdentifierType { @@ -82,6 +83,16 @@ enum ExpressionIdentifierType { EXPRESSION_IDENTIFIER_TYPE_CHANNEL = 2; } +enum ExpressionIdentifierLibrary { + EXPRESSION_IDENTIFIER_LIBRARY_UNSPECIFIED = 0; + EXPRESSION_IDENTIFIER_LIBRARY_MATH = 1; + EXPRESSION_IDENTIFIER_LIBRARY_STRING = 2; + EXPRESSION_IDENTIFIER_LIBRARY_LIST = 3; + EXPRESSION_IDENTIFIER_LIBRARY_ITER = 4; + EXPRESSION_IDENTIFIER_LIBRARY_STATEFUL = 5; + EXPRESSION_IDENTIFIER_LIBRARY_SUMMARY = 6; +} + enum ExpressionMode { EXPRESSION_MODE_UNSPECIFIED = 0 [deprecated = true]; EXPRESSION_MODE_RULES = 1; diff --git a/protos/sift/channel_schemas/v1/channel_schemas.proto b/protos/sift/channel_schemas/v1/channel_schemas.proto index 7ca88b6d..69f01939 100644 --- a/protos/sift/channel_schemas/v1/channel_schemas.proto +++ b/protos/sift/channel_schemas/v1/channel_schemas.proto @@ -63,6 +63,7 @@ message CreateChannelSchemaResponse {} // The request for a call to `ChannelSchemaService_BatchCreateChannelSchemas`. message BatchCreateChannelSchemasRequest { + // Limit of 1000 channels schemas per batch repeated CreateChannelSchemaRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; // The asset to which the channel schemas belong (case-insensitive). // If this field, and any of the child requests specify an asset, the assets must match. diff --git a/protos/sift/channels/v2/channels.proto b/protos/sift/channels/v2/channels.proto index 2ef49582..ff47c9bf 100644 --- a/protos/sift/channels/v2/channels.proto +++ b/protos/sift/channels/v2/channels.proto @@ -73,8 +73,8 @@ message GetChannelResponse { // The request for a call to `ChannelService_ListChannels` to retrieve channels. message ListChannelsRequest { // The maximum number of channels to return. The service may return fewer than this value. - // If unspecified, at most 50 channels will be returned. The maximum value is 1000; values above - // 1000 will be coerced to 1000. Optional. + // If unspecified, at most 50 channels will be returned. The maximum value is 10,000; values above + // 10,000 will be coerced to 10,000. Optional. uint32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // A page token, received from a previous `ListChannels` call. @@ -88,6 +88,9 @@ message ListChannelsRequest { // For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). // For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#channel). Optional. string filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // This field is only required if your user belongs to multiple organizations. + string organization_id = 4 [(google.api.field_behavior) = OPTIONAL]; } // The result of a call to `ChannelService_ListChannels`. diff --git a/protos/sift/common/type/v1/resource_identifier.proto b/protos/sift/common/type/v1/resource_identifier.proto new file mode 100644 index 00000000..81c52df0 --- /dev/null +++ b/protos/sift/common/type/v1/resource_identifier.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package sift.common.type.v1; + +import "google/api/field_behavior.proto"; + + + +message ResourceIdentifier { + oneof identifier { + string id = 1; + string client_key = 2; + } +} + +message NamedResource { + oneof resource { + string id = 1; + string name = 2; + } +} + +message ResourceIdentifiers { + oneof identifiers { + Ids ids = 1; + ClientKeys client_keys = 2; + } +} + +message NamedResources { + oneof resources { + Ids ids = 1; + Names names = 2; + } +} + +message Ids { + repeated string ids = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message ClientKeys { + repeated string client_keys = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message Names { + repeated string names = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/protos/sift/notifications/v1/notifications.proto b/protos/sift/notifications/v1/notifications.proto index de76acbe..d6ba4cfd 100644 --- a/protos/sift/notifications/v1/notifications.proto +++ b/protos/sift/notifications/v1/notifications.proto @@ -60,6 +60,7 @@ enum NotificationKind { NOTIFICATION_KIND_MENTIONED_IN_ANNOTATION_COMMENT = 3; NOTIFICATION_KIND_CONDITION_TRIGGERED = 4; NOTIFICATION_KIND_ANNOTATION_STATE_CHANGED = 5; + NOTIFICATION_KIND_REPORT_READY = 6; } // The request for a call to `NotificationService_ListNotifications` to retrieve notifications. diff --git a/protos/sift/report_templates/v1/report_templates.proto b/protos/sift/report_templates/v1/report_templates.proto index 54f9f1a8..2481ba17 100644 --- a/protos/sift/report_templates/v1/report_templates.proto +++ b/protos/sift/report_templates/v1/report_templates.proto @@ -4,6 +4,7 @@ package sift.report_templates.v1; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; @@ -32,10 +33,31 @@ service ReportTemplateService { body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "InsertReportTemplate", + summary: "CreateReportTemplate", description: "Create a report template." }; } + + // List report templates. + rpc ListReportTemplates(ListReportTemplatesRequest) returns (ListReportTemplatesResponse) { + option (google.api.http) = {get: "/api/v1/report-templates"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "ListReportTemplates" + description: "List report templates." + }; + } + + // Updates an existing report template using the list of fields specified in `update_mask`. + rpc UpdateReportTemplate(UpdateReportTemplateRequest) returns (UpdateReportTemplateResponse) { + option (google.api.http) = { + patch: "/api/v1/report-templates" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "UpdateReportTemplate" + description: "Updates an existing report template using the list of fields specified in `update_mask`." + }; + } } message ReportTemplate { @@ -57,6 +79,7 @@ message ReportTemplateRule { string rule_id = 1 [(google.api.field_behavior) = REQUIRED]; string rule_version_id = 2 [(google.api.field_behavior) = REQUIRED]; uint32 rule_version_number = 3 [(google.api.field_behavior) = REQUIRED]; + string client_key = 4 [(google.api.field_behavior) = OPTIONAL]; } message ReportTemplateTag { @@ -85,7 +108,7 @@ message CreateReportTemplateRequest { optional string description = 3 [(google.api.field_behavior) = OPTIONAL]; repeated string tag_names = 4 [(google.api.field_behavior) = REQUIRED]; // `organization_id` is only required if your user belongs to multiple organizations - string organization_id = 6 [(google.api.field_behavior) = REQUIRED]; + string organization_id = 6 [(google.api.field_behavior) = OPTIONAL]; oneof rule_identifiers { CreateReportTemplateRequestRuleIds rule_ids = 7 [(google.api.field_behavior) = OPTIONAL]; CreateReportTemplateRequestClientKeys rule_client_keys = 8 [(google.api.field_behavior) = OPTIONAL]; @@ -104,3 +127,51 @@ message CreateReportTemplateRequestClientKeys { message CreateReportTemplateResponse { ReportTemplate report_template = 1 [(google.api.field_behavior) = REQUIRED]; } + +// The request for a call to `ReportTemplateService_ListReportTemplates` to retrieve report templates. +message ListReportTemplatesRequest { + // The maximum number of report templates to return. The service may return fewer than this value. + // If unspecified, at most 50 report templates will be returned. The maximum value is 1000; values above + // 1000 will be coerced to 1000. Optional. + uint32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // A page token, received from a previous `ListReportTemplates` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListReportTemplates` must match + // the call that provided the page token. Optional. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. + // Available fields to filter by are `report_template_id`, `client_key`, and `name`. + // For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). + // For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#report_templates). Optional. + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // This field is only required if your user belongs to multiple organizations. + string organization_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // If `true` then archived report templates will be included in the query. Defaults to `false`. + bool include_archived = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of a call to `ReportTemplateService_ListReportTemplatesResponse`. +message ListReportTemplatesResponse { + repeated ReportTemplate report_templates = 1; + string next_page_token = 2; +} + +// The request for a call to `ReportTemplateService_UpdateReportTemplate` to update a report template. When updating +// tags or rules, the update will perform a full replace. Additionally, when updating rules, only the rule ID or the rule client key +// is required, but it is okay to provide both. If some rules contain only client keys and others only rule IDs, they will be consolidated. +message UpdateReportTemplateRequest { + // The report template to update. + ReportTemplate report_template = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. The fields available to be updated are `name`, `archived_date`, `description`, `tags`, and `rules`. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response of a call to `ReportTemplateService_UpdateReportTemplate`. +message UpdateReportTemplateResponse { + ReportTemplate report_template = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/protos/sift/reports/v1/reports.proto b/protos/sift/reports/v1/reports.proto new file mode 100644 index 00000000..61a083a8 --- /dev/null +++ b/protos/sift/reports/v1/reports.proto @@ -0,0 +1,225 @@ +syntax = "proto3"; + +package sift.reports.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: {title: "Report service"} +}; + +service ReportService { + // Retrieve a report. + rpc GetReport(GetReportRequest) returns (GetReportResponse) { + option (google.api.http) = {get: "/api/v1/reports/{report_id}"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "GetReport", + description: "Retrieve a report." + }; + } + + // Create a report. + rpc CreateReport(CreateReportRequest) returns (CreateReportResponse) { + option (google.api.http) = { + post: "/api/v1/reports" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "CreateReport", + description: "Create a report." + }; + } + + // List reports. + rpc ListReports(ListReportsRequest) returns (ListReportsResponse) { + option (google.api.http) = {get: "/api/v1/reports"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "ListReports" + description: "List reports." + }; + } + + // Rerunning a report will create a new report with the same rule versions and run as the original report and run the + // evaluation again using the most up-to-date set of data. + rpc RerunReport(RerunReportRequest) returns (RerunReportResponse) { + option (google.api.http) = {post: "/api/v1/reports/{report_id}:rerun"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "RerunReport", + description: "Rerunning a report will create a new report with the same rule versions and run as the original report and run the evaluation again using the most up-to-date set of data." + }; + } + + // Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been + // calculated up to the point of cancellation will be saved. + rpc CancelReport(CancelReportRequest) returns (CancelReportResponse) { + option (google.api.http) = {post: "/api/v1/reports/{report_id}:cancel"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "CancelReport", + description: "Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been calculated up to the point of cancellation will be saved." + }; + } +} + +message Report { + string report_id = 1 [(google.api.field_behavior) = REQUIRED]; + string report_template_id = 2 [(google.api.field_behavior) = OPTIONAL]; + string run_id = 3 [(google.api.field_behavior) = REQUIRED]; + string organization_id = 4 [(google.api.field_behavior) = REQUIRED]; + string name = 5 [(google.api.field_behavior) = REQUIRED]; + optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; + string created_by_user_id = 7 [(google.api.field_behavior) = REQUIRED]; + string modified_by_user_id = 8 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp created_date = 9 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp modified_date = 10 [(google.api.field_behavior) = REQUIRED]; + repeated ReportRuleSummary summaries = 11 [(google.api.field_behavior) = REQUIRED]; + repeated ReportTag tags = 12 [(google.api.field_behavior) = REQUIRED]; + optional string rerun_from_report_id = 13 [(google.api.field_behavior) = OPTIONAL]; +} + +message ReportRuleSummary { + string rule_id = 1 [(google.api.field_behavior) = REQUIRED]; + string rule_client_key = 2 [(google.api.field_behavior) = OPTIONAL]; + string rule_version_id = 3 [(google.api.field_behavior) = REQUIRED]; + uint32 rule_version_number = 4 [(google.api.field_behavior) = REQUIRED]; + string report_rule_version_id = 5 [(google.api.field_behavior) = REQUIRED]; + uint32 num_open = 6 [(google.api.field_behavior) = REQUIRED]; + uint32 num_failed = 7 [(google.api.field_behavior) = REQUIRED]; + uint32 num_passed = 8 [(google.api.field_behavior) = REQUIRED]; + ReportRuleStatus status = 9 [(google.api.field_behavior) = REQUIRED]; + ReportRuleStatusDetails status_details = 10 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp created_date = 11 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp modified_date = 12 [(google.api.field_behavior) = REQUIRED]; +} + +message ReportTag { + string tag_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +enum ReportRuleStatus { + REPORT_RULE_STATUS_UNSPECIFIED = 0; + REPORT_RULE_STATUS_CREATED = 1; + REPORT_RULE_STATUS_LIVE = 2; + REPORT_RULE_STATUS_FINISHED = 3; + REPORT_RULE_STATUS_FAILED = 4; + REPORT_RULE_STATUS_CANCELED = 5; +} + +message ReportRuleStatusDetails { + oneof details { + ReportRuleStatusDetailsCreated created = 1; + ReportRuleStatusDetailsLive live = 2; + ReportRuleStatusDetailsFinished finished = 3; + ReportRuleStatusDetailsFailed failed = 4; + } +} + +message ReportRuleStatusDetailsCreated {} +message ReportRuleStatusDetailsLive {} +message ReportRuleStatusDetailsFinished {} +message ReportRuleStatusDetailsFailed { + string error_message = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The request of a call to `ReportService_CreateReport` to create a report. A report can be created either via a report template +// or an arbitrary report can be constructed depending on the variant of the `request` field. +message CreateReportRequest { + oneof request { + CreateReportFromReportTemplateRequest report_from_report_template_request = 1 [(google.api.field_behavior) = OPTIONAL]; + CreateReportFromRulesRequest report_from_rules_request = 2 [(google.api.field_behavior) = OPTIONAL]; + } + string organization_id = 3 [(google.api.field_behavior) = REQUIRED]; + string run_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Override the name of the report. If not provided, the name will be generated based on the report template or run. + optional string name = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// The response of a call to `ReportService_CreateReport` to create a report. +message CreateReportResponse { + Report report = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Used to create a report from a report template. +message CreateReportFromReportTemplateRequest { + string report_template_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Used to construct an arbitrary report for an arbitrary set of rules. Rules can be specified either by rule ID +// or client key based on the variant used in the `rule_identifiers` field. +message CreateReportFromRulesRequest { + string name = 1 [(google.api.field_behavior) = REQUIRED]; + optional string description = 2 [(google.api.field_behavior) = REQUIRED]; + repeated string tag_names = 3 [(google.api.field_behavior) = REQUIRED]; + oneof rule_identifiers { + CreateReportRequestRuleIds rule_ids = 4 [(google.api.field_behavior) = OPTIONAL]; + CreateReportRequestClientKeys rule_client_keys = 5 [(google.api.field_behavior) = OPTIONAL]; + } +} + +message CreateReportRequestRuleIds { + repeated string rule_ids = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message CreateReportRequestClientKeys { + repeated string rule_client_keys = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for a call to `ReportService_GetReport` to retrieve a report template. +message GetReportRequest { + string report_id = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request of a call to `ReportService_GetReport` to retrieve a report template. +message GetReportResponse { + Report report = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for a call to `ReportService_ListReports` to retrieve report. +message ListReportsRequest { + // The maximum number of reports to return. The service may return fewer than this value. + // If unspecified, at most 50 reports will be returned. The maximum value is 1000; values above + // 1000 will be coerced to 1000. Optional. + uint32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // A page token, received from a previous `ListReports` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListReports` must match + // the call that provided the page token. Optional. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. + // Available fields to filter by are `report_id`, `report_template_id`, `tag_name`, `name`, and `run_id`. + // For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). + // For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#reports). Optional. + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // This field is only required if your user belongs to multiple organizations. + string organization_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of a call to `ReportService_ListReportsResponse`. +message ListReportsResponse { + repeated Report reports = 1; + string next_page_token = 2; +} + +message RerunReportRequest { + string report_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message RerunReportResponse { + string job_id = 1 [(google.api.field_behavior) = REQUIRED]; + string report_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message CancelReportRequest { + string report_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message CancelReportResponse { + // no response fields +} diff --git a/protos/sift/rule_evaluation/v1/rule_evaluation.proto b/protos/sift/rule_evaluation/v1/rule_evaluation.proto new file mode 100644 index 00000000..96571de0 --- /dev/null +++ b/protos/sift/rule_evaluation/v1/rule_evaluation.proto @@ -0,0 +1,127 @@ +syntax = "proto3"; + +package sift.rule_evaluation.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "sift/common/type/v1/resource_identifier.proto"; +import "sift/rules/v1/rules.proto"; + + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: {title: "Rule Evaluation Service"} +}; + +service RuleEvaluationService { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = { + description: "Service to evaluate rules." + external_docs: { + url: "https://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421102"; + description: "Read more about what rules are."; + } + }; + + // 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. + rpc EvaluateRules(EvaluateRulesRequest) returns (EvaluateRulesResponse) { + option (google.api.http) = { + post: "/api/v1/rules/evaluate-rules" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "EvaluateRules" + description: "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." + }; + } + + // Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated. + rpc EvaluateRulesPreview(EvaluateRulesPreviewRequest) returns (EvaluateRulesPreviewResponse) { + option (google.api.http) = { + post: "/api/v1/rules/evaluate-rules:preview" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "EvaluateRulesPreview" + description: "Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated." + }; + } +} + +message EvaluateRulesRequest { + oneof time { + sift.common.type.v1.ResourceIdentifier run = 1; + AssetsTimeRange assets = 2; + } + oneof mode { + EvaluateRulesFromCurrentRuleVersions rules = 3; + EvaluateRulesFromRuleVersions rule_versions = 4; + EvaluateRulesFromReportTemplate report_template = 5; + } + EvaluateRulesAnnotationOptions annotation_options = 6; + + // Only required if your user belongs to multiple organizations + string organization_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // If this request creates a report, this field will be used as the report name. + optional string report_name = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +message AssetsTimeRange { + sift.common.type.v1.NamedResources assets = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = REQUIRED]; +} + +message EvaluateRulesFromCurrentRuleVersions { + sift.common.type.v1.ResourceIdentifiers rules = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message EvaluateRulesFromReportTemplate { + sift.common.type.v1.ResourceIdentifier report_template = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message EvaluateRulesFromRuleVersions { + repeated string rule_version_ids = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message EvaluateRulesAnnotationOptions { + sift.common.type.v1.NamedResources tags = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message EvaluateRulesResponse { + int32 created_annotation_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // A report will be generated if rules were evaluated against a run. + optional string report_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // This will be set if the job has an extended run time and is being processed asynchronously. + optional string job_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +message EvaluateRulesPreviewRequest { + oneof time { + sift.common.type.v1.ResourceIdentifier run = 1; + + // Previewing rules against assets is not yet supported + // AssetsTimeRange assets = 2; + } + oneof mode { + EvaluateRulesFromCurrentRuleVersions rules = 3; + EvaluateRulesFromRuleVersions rule_versions = 4; + EvaluateRulesFromReportTemplate report_template = 5; + EvaluateRulesFromRuleConfigs rule_configs = 6; + } + + // Only required if your user belongs to multiple organizations + string organization_id = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +message EvaluateRulesFromRuleConfigs { + repeated sift.rules.v1.UpdateRuleRequest configs = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message EvaluateRulesPreviewResponse { + int32 created_annotation_count = 1 [(google.api.field_behavior) = REQUIRED]; + repeated sift.rules.v1.DryRunAnnotation dry_run_annotations = 2; +} diff --git a/protos/sift/rules/v1/rules.proto b/protos/sift/rules/v1/rules.proto index 93105029..5726966e 100644 --- a/protos/sift/rules/v1/rules.proto +++ b/protos/sift/rules/v1/rules.proto @@ -86,6 +86,18 @@ service RuleService { }; } + // Updates existing rules or creates rules that do not exist. + rpc BatchUpdateRules(BatchUpdateRulesRequest) returns (BatchUpdateRulesResponse) { + option (google.api.http) = { + put: "/api/v1/rules:batchUpdate" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "BatchUpdateRules" + description: "Updates existing rules or creates rules that do not exist." + }; + } + // Deletes a rule rpc DeleteRule(DeleteRuleRequest) returns (DeleteRuleResponse) { option (google.api.http) = { @@ -98,8 +110,9 @@ service RuleService { }; } - // Evaluates the provided rules and generate annotations based on the result. + // Deprecated - use RuleEvaluationService instead. rpc EvaluateRules(EvaluateRulesRequest) returns (EvaluateRulesResponse) { + option deprecated = true; option (google.api.http) = { post: "/api/v1/rules/evaluate" body: "*" @@ -201,7 +214,10 @@ message Rule { // 5 is reserved from old "current_status" column directly on rule reserved 5; string rule_id = 1 [(google.api.field_behavior) = REQUIRED]; - string asset_id = 2 [(google.api.field_behavior) = REQUIRED]; + string asset_id = 2 [ + (google.api.field_behavior) = REQUIRED, + deprecated = true + ]; string name = 3 [(google.api.field_behavior) = REQUIRED]; string description = 4 [(google.api.field_behavior) = REQUIRED]; bool is_enabled = 6 [(google.api.field_behavior) = REQUIRED]; @@ -215,6 +231,8 @@ message Rule { // client_key is a client provided identifier for the rule. It is immutable after rule creation. string client_key = 14 [(google.api.field_behavior) = OPTIONAL]; + + RuleAssetConfiguration asset_configuration = 15 [(google.api.field_behavior) = REQUIRED]; } message RuleCondition { // 4 is reserved from old "status" column that lived directly on rule condition @@ -243,6 +261,7 @@ message RuleAction { message RuleAssetConfiguration { repeated string asset_ids = 1; + repeated string tag_ids = 2; } message SearchRulesRequest { @@ -302,12 +321,18 @@ message UpdateRuleRequest { optional string rule_id = 1; string name = 2 [(google.api.field_behavior) = REQUIRED]; string description = 3 [(google.api.field_behavior) = REQUIRED]; - string asset_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Deprecated - use asset_configuration instead. + string asset_id = 4 [ + (google.api.field_behavior) = OPTIONAL, + deprecated = true + ]; bool is_enabled = 5 [(google.api.field_behavior) = REQUIRED]; repeated UpdateConditionRequest conditions = 6 [(google.api.field_behavior) = REQUIRED]; string organization_id = 7; string version_notes = 8; optional string client_key = 9; + RuleAssetConfiguration asset_configuration = 10; } message UpdateConditionRequest { // 2 is reserved from old status update support on rule condition directly @@ -329,6 +354,15 @@ enum ActionKind { message UpdateRuleResponse { string rule_id = 1 [(google.api.field_behavior) = REQUIRED]; } +message BatchUpdateRulesRequest { + // rules are limited 1000 rules at a time + repeated UpdateRuleRequest rules = 1 [(google.api.field_behavior) = REQUIRED]; +} +message BatchUpdateRulesResponse { + bool success = 1 [(google.api.field_behavior) = REQUIRED]; + int32 rules_created_count = 2 [(google.api.field_behavior) = REQUIRED]; + int32 rules_updated_count = 3 [(google.api.field_behavior) = REQUIRED]; +} // DeleteRuleRequest is used to delete a rule by rule_id or client_key. If both are provided, only rule_id will be used. message DeleteRuleRequest { @@ -509,7 +543,9 @@ message AnnotationActionConfiguration { optional string assigned_to_user_id = 3; } +// Deprecated - use RuleEvaluationService instead. message EvaluateRulesRequest { + option deprecated = true; repeated string rule_ids = 1 [(google.api.field_behavior) = REQUIRED]; EvaluatedAnnotationOptions annotation_options = 2; oneof time { @@ -526,16 +562,21 @@ message TimeRangeQuery { google.protobuf.Timestamp end_time = 2; } +// Deprecated - use RuleEvaluationService instead. message EvaluateRulesResponse { + option deprecated = true; int32 created_annotation_count = 1; // If dry_run is true, this will be populated with the annotations that would be created repeated DryRunAnnotation dry_run_annotations = 2; + // job_id and report_id will be set if the job has an extended run time and is being processed asynchronously. + optional string job_id = 3; + optional string report_id = 4; } message DryRunAnnotation { string condition_id = 1; string name = 2; - google.protobuf.Timestamp start_time = 3; - google.protobuf.Timestamp end_time = 4; + google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp end_time = 4 [(google.api.field_behavior) = REQUIRED]; string condition_version_id = 5; } diff --git a/protos/sift/saved_searches/v1/saved_searches.proto b/protos/sift/saved_searches/v1/saved_searches.proto index 8cf9e7c9..72dc3129 100644 --- a/protos/sift/saved_searches/v1/saved_searches.proto +++ b/protos/sift/saved_searches/v1/saved_searches.proto @@ -99,6 +99,7 @@ message SavedSearchProperties { repeated SavedSearchFilterItem tag_items = 7 [(google.api.field_behavior) = OPTIONAL]; repeated SavedSearchFilterItem annotation_items = 8 [(google.api.field_behavior) = OPTIONAL]; repeated SavedSearchFilterItem run_items = 9 [(google.api.field_behavior) = OPTIONAL]; + repeated SavedSearchFilterItem report_template_items = 10 [(google.api.field_behavior) = OPTIONAL]; } message SavedSearchFilterItem { @@ -168,6 +169,7 @@ message DeleteSavedSearchResponse {} // The request for a call to `SavedSearchService_BatchDeleteSavedSearches` to delete saved searches. message BatchDeleteSavedSearchesRequest { + // Limit of 1000 searches per batch repeated string saved_search_ids = 1; } diff --git a/python/lib/sift/annotations/v1/annotations_pb2.py b/python/lib/sift/annotations/v1/annotations_pb2.py index c4fff3fe..77bf72c4 100644 --- a/python/lib/sift/annotations/v1/annotations_pb2.py +++ b/python/lib/sift/annotations/v1/annotations_pb2.py @@ -19,7 +19,7 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%sift/annotations/v1/annotations.proto\x12\x13sift.annotations.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xcc\x08\n\nAnnotation\x12(\n\rannotation_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x61nnotationId\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12>\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12:\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x07\x65ndTime\x12\x30\n\x12\x63reated_by_user_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x1f\n\x06run_id\x18\n \x01(\tB\x03\xe0\x41\x01H\x00R\x05runId\x88\x01\x01\x12\x44\n\x05state\x18\x0b \x01(\x0e\x32$.sift.annotations.v1.AnnotationStateB\x03\xe0\x41\x01H\x01R\x05state\x88\x01\x01\x12,\n\x0forganization_id\x18\x0c \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x32\n\x13\x61ssigned_to_user_id\x18\r \x01(\tB\x03\xe0\x41\x01R\x10\x61ssignedToUserId\x12Q\n\x0f\x61nnotation_type\x18\x0e \x01(\x0e\x32#.sift.annotations.v1.AnnotationTypeB\x03\xe0\x41\x02R\x0e\x61nnotationType\x12\x17\n\x04tags\x18\x0f \x03(\tB\x03\xe0\x41\x02R\x04tags\x12-\n\rlegend_config\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x02R\x0clegendConfig\x88\x01\x01\x12?\n\x17\x63reated_by_condition_id\x18\x11 \x01(\tB\x03\xe0\x41\x01H\x03R\x14\x63reatedByConditionId\x88\x01\x01\x12W\n$created_by_rule_condition_version_id\x18\x12 \x01(\tB\x03\xe0\x41\x01H\x04R\x1f\x63reatedByRuleConditionVersionId\x88\x01\x01\x42\t\n\x07_run_idB\x08\n\x06_stateB\x10\n\x0e_legend_configB\x1a\n\x18_created_by_condition_idB\'\n%_created_by_rule_condition_version_id\"E\n\x1f\x41nnotationLinkedChannelsChannel\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\"x\n\'AnnotationLinkedChannelsBitFieldElement\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\x12)\n\x0e\x62it_field_name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0c\x62itFieldName\"\xdf\x01\n\x17\x41nnotationLinkedChannel\x12P\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\x34.sift.annotations.v1.AnnotationLinkedChannelsChannelH\x00R\x07\x63hannel\x12j\n\x11\x62it_field_element\x18\x02 \x01(\x0b\x32<.sift.annotations.v1.AnnotationLinkedChannelsBitFieldElementH\x00R\x0f\x62itFieldElementB\x06\n\x04type\"\xcf\x07\n\x17\x43reateAnnotationRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01R\x0b\x64\x65scription\x12>\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12:\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x07\x65ndTime\x12\x1b\n\x06\x61ssets\x18\x05 \x03(\tB\x03\xe0\x41\x01R\x06\x61ssets\x12Z\n\x0flinked_channels\x18\x06 \x03(\x0b\x32,.sift.annotations.v1.AnnotationLinkedChannelB\x03\xe0\x41\x01R\x0elinkedChannels\x12\x17\n\x04tags\x18\x07 \x03(\tB\x03\xe0\x41\x01R\x04tags\x12\x1f\n\x06run_id\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x00R\x05runId\x88\x01\x01\x12\x33\n\x11\x61ssign_to_user_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x01R\x0e\x61ssignToUserId\x88\x01\x01\x12,\n\x0forganization_id\x18\n \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\x12\x44\n\x05state\x18\x0b \x01(\x0e\x32$.sift.annotations.v1.AnnotationStateB\x03\xe0\x41\x01H\x02R\x05state\x88\x01\x01\x12Q\n\x0f\x61nnotation_type\x18\x0c \x01(\x0e\x32#.sift.annotations.v1.AnnotationTypeB\x03\xe0\x41\x01R\x0e\x61nnotationType\x12?\n\x17\x63reated_by_condition_id\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x03R\x14\x63reatedByConditionId\x88\x01\x01\x12-\n\rlegend_config\x18\r \x01(\tB\x03\xe0\x41\x01H\x04R\x0clegendConfig\x88\x01\x01\x12W\n$created_by_rule_condition_version_id\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x05R\x1f\x63reatedByRuleConditionVersionId\x88\x01\x01\x42\t\n\x07_run_idB\x14\n\x12_assign_to_user_idB\x08\n\x06_stateB\x1a\n\x18_created_by_condition_idB\x10\n\x0e_legend_configB\'\n%_created_by_rule_condition_version_id\"`\n\x18\x43reateAnnotationResponse\x12\x44\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationB\x03\xe0\x41\x02R\nannotation\"C\n\x17\x44\x65leteAnnotationRequest\x12(\n\rannotation_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x61nnotationId\"\x1a\n\x18\x44\x65leteAnnotationResponse\"K\n\x1d\x42\x61tchDeleteAnnotationsRequest\x12*\n\x0e\x61nnotation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\rannotationIds\" \n\x1e\x42\x61tchDeleteAnnotationsResponse\"@\n\x14GetAnnotationRequest\x12(\n\rannotation_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x61nnotationId\"]\n\x15GetAnnotationResponse\x12\x44\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationB\x03\xe0\x41\x02R\nannotation\"{\n\x16ListAnnotationsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\"\x84\x01\n\x17ListAnnotationsResponse\x12\x41\n\x0b\x61nnotations\x18\x01 \x03(\x0b\x32\x1f.sift.annotations.v1.AnnotationR\x0b\x61nnotations\x12&\n\x0fnext_page_token\x18\x05 \x01(\tR\rnextPageToken\"\xa1\x01\n\x17UpdateAnnotationRequest\x12\x44\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationB\x03\xe0\x41\x02R\nannotation\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"[\n\x18UpdateAnnotationResponse\x12?\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationR\nannotation*\x8b\x01\n\x0f\x41nnotationState\x12 \n\x1c\x41NNOTATION_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41NNOTATION_STATE_OPEN\x10\x01\x12\x1c\n\x18\x41NNOTATION_STATE_FLAGGED\x10\x02\x12\x1d\n\x19\x41NNOTATION_STATE_RESOLVED\x10\x03*m\n\x0e\x41nnotationType\x12\x1f\n\x1b\x41NNOTATION_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41NNOTATION_TYPE_DATA_REVIEW\x10\x01\x12\x19\n\x15\x41NNOTATION_TYPE_PHASE\x10\x02\x32\xcf\x0b\n\x11\x41nnotationService\x12\xbc\x01\n\x10\x43reateAnnotation\x12,.sift.annotations.v1.CreateAnnotationRequest\x1a-.sift.annotations.v1.CreateAnnotationResponse\"K\x92\x41*\x12\x10\x43reateAnnotation\x1a\x16\x43reates an annotation.\x82\xd3\xe4\x93\x02\x18\"\x13/api/v1/annotations:\x01*\x12\xc9\x01\n\x10\x44\x65leteAnnotation\x12,.sift.annotations.v1.DeleteAnnotationRequest\x1a-.sift.annotations.v1.DeleteAnnotationResponse\"X\x92\x41*\x12\x10\x44\x65leteAnnotation\x1a\x16\x44\x65letes an annotation.\x82\xd3\xe4\x93\x02%*#/api/v1/annotations/{annotation_id}\x12\xe3\x01\n\x16\x42\x61tchDeleteAnnotations\x12\x32.sift.annotations.v1.BatchDeleteAnnotationsRequest\x1a\x33.sift.annotations.v1.BatchDeleteAnnotationsResponse\"`\x92\x41\x33\x12\x15\x42\x61tchDeleteAnnotation\x1a\x1a\x42\x61tch deletes annotations.\x82\xd3\xe4\x93\x02$\"\x1f/api/v1/annotations:batchDelete:\x01*\x12\xcd\x01\n\x0fListAnnotations\x12+.sift.annotations.v1.ListAnnotationsRequest\x1a,.sift.annotations.v1.ListAnnotationsResponse\"_\x92\x41\x41\x12\x0eListAnnotation\x1a/Retrieves annotations using an optional filter.\x82\xd3\xe4\x93\x02\x15\x12\x13/api/v1/annotations\x12\xbe\x01\n\rGetAnnotation\x12).sift.annotations.v1.GetAnnotationRequest\x1a*.sift.annotations.v1.GetAnnotationResponse\"V\x92\x41(\x12\rGetAnnotation\x1a\x17Retrieves an annotation\x82\xd3\xe4\x93\x02%\x12#/api/v1/annotations/{annotation_id}\x12\x80\x02\n\x10UpdateAnnotation\x12,.sift.annotations.v1.UpdateAnnotationRequest\x1a-.sift.annotations.v1.UpdateAnnotationResponse\"\x8e\x01\x92\x41m\x12\x10UpdateAnnotation\x1aYUpdates an existing annotation using using the list of fields specified in `update_mask`.\x82\xd3\xe4\x93\x02\x18\x32\x13/api/v1/annotations:\x01*\x1a\xb4\x01\x92\x41\xb0\x01\x12\x36Service to programmatically interact with annotations.\x1av\n\x1cRead more about annotations.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265486685B\xb2\x01\n\x17\x63om.sift.annotations.v1B\x10\x41nnotationsProtoP\x01\xa2\x02\x03SAX\xaa\x02\x13Sift.Annotations.V1\xca\x02\x13Sift\\Annotations\\V1\xe2\x02\x1fSift\\Annotations\\V1\\GPBMetadata\xea\x02\x15Sift::Annotations::V1\x92\x41\x16\x12\x14\n\x12\x41nnotation Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%sift/annotations/v1/annotations.proto\x12\x13sift.annotations.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xcc\x08\n\nAnnotation\x12(\n\rannotation_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x61nnotationId\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12>\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12:\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x07\x65ndTime\x12\x30\n\x12\x63reated_by_user_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x1f\n\x06run_id\x18\n \x01(\tB\x03\xe0\x41\x01H\x00R\x05runId\x88\x01\x01\x12\x44\n\x05state\x18\x0b \x01(\x0e\x32$.sift.annotations.v1.AnnotationStateB\x03\xe0\x41\x01H\x01R\x05state\x88\x01\x01\x12,\n\x0forganization_id\x18\x0c \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x32\n\x13\x61ssigned_to_user_id\x18\r \x01(\tB\x03\xe0\x41\x01R\x10\x61ssignedToUserId\x12Q\n\x0f\x61nnotation_type\x18\x0e \x01(\x0e\x32#.sift.annotations.v1.AnnotationTypeB\x03\xe0\x41\x02R\x0e\x61nnotationType\x12\x17\n\x04tags\x18\x0f \x03(\tB\x03\xe0\x41\x02R\x04tags\x12-\n\rlegend_config\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x02R\x0clegendConfig\x88\x01\x01\x12?\n\x17\x63reated_by_condition_id\x18\x11 \x01(\tB\x03\xe0\x41\x01H\x03R\x14\x63reatedByConditionId\x88\x01\x01\x12W\n$created_by_rule_condition_version_id\x18\x12 \x01(\tB\x03\xe0\x41\x01H\x04R\x1f\x63reatedByRuleConditionVersionId\x88\x01\x01\x42\t\n\x07_run_idB\x08\n\x06_stateB\x10\n\x0e_legend_configB\x1a\n\x18_created_by_condition_idB\'\n%_created_by_rule_condition_version_id\"E\n\x1f\x41nnotationLinkedChannelsChannel\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\"x\n\'AnnotationLinkedChannelsBitFieldElement\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\x12)\n\x0e\x62it_field_name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0c\x62itFieldName\"\xdf\x01\n\x17\x41nnotationLinkedChannel\x12P\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\x34.sift.annotations.v1.AnnotationLinkedChannelsChannelH\x00R\x07\x63hannel\x12j\n\x11\x62it_field_element\x18\x02 \x01(\x0b\x32<.sift.annotations.v1.AnnotationLinkedChannelsBitFieldElementH\x00R\x0f\x62itFieldElementB\x06\n\x04type\"\xcf\x07\n\x17\x43reateAnnotationRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01R\x0b\x64\x65scription\x12>\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12:\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x07\x65ndTime\x12\x1b\n\x06\x61ssets\x18\x05 \x03(\tB\x03\xe0\x41\x01R\x06\x61ssets\x12Z\n\x0flinked_channels\x18\x06 \x03(\x0b\x32,.sift.annotations.v1.AnnotationLinkedChannelB\x03\xe0\x41\x01R\x0elinkedChannels\x12\x17\n\x04tags\x18\x07 \x03(\tB\x03\xe0\x41\x01R\x04tags\x12\x1f\n\x06run_id\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x00R\x05runId\x88\x01\x01\x12\x33\n\x11\x61ssign_to_user_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x01R\x0e\x61ssignToUserId\x88\x01\x01\x12,\n\x0forganization_id\x18\n \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\x12\x44\n\x05state\x18\x0b \x01(\x0e\x32$.sift.annotations.v1.AnnotationStateB\x03\xe0\x41\x01H\x02R\x05state\x88\x01\x01\x12Q\n\x0f\x61nnotation_type\x18\x0c \x01(\x0e\x32#.sift.annotations.v1.AnnotationTypeB\x03\xe0\x41\x01R\x0e\x61nnotationType\x12?\n\x17\x63reated_by_condition_id\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x03R\x14\x63reatedByConditionId\x88\x01\x01\x12-\n\rlegend_config\x18\r \x01(\tB\x03\xe0\x41\x01H\x04R\x0clegendConfig\x88\x01\x01\x12W\n$created_by_rule_condition_version_id\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x05R\x1f\x63reatedByRuleConditionVersionId\x88\x01\x01\x42\t\n\x07_run_idB\x14\n\x12_assign_to_user_idB\x08\n\x06_stateB\x1a\n\x18_created_by_condition_idB\x10\n\x0e_legend_configB\'\n%_created_by_rule_condition_version_id\"`\n\x18\x43reateAnnotationResponse\x12\x44\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationB\x03\xe0\x41\x02R\nannotation\"C\n\x17\x44\x65leteAnnotationRequest\x12(\n\rannotation_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x61nnotationId\"\x1a\n\x18\x44\x65leteAnnotationResponse\"K\n\x1d\x42\x61tchDeleteAnnotationsRequest\x12*\n\x0e\x61nnotation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\rannotationIds\" \n\x1e\x42\x61tchDeleteAnnotationsResponse\"@\n\x14GetAnnotationRequest\x12(\n\rannotation_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x61nnotationId\"]\n\x15GetAnnotationResponse\x12\x44\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationB\x03\xe0\x41\x02R\nannotation\"\xa9\x01\n\x16ListAnnotationsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"\x84\x01\n\x17ListAnnotationsResponse\x12\x41\n\x0b\x61nnotations\x18\x01 \x03(\x0b\x32\x1f.sift.annotations.v1.AnnotationR\x0b\x61nnotations\x12&\n\x0fnext_page_token\x18\x05 \x01(\tR\rnextPageToken\"\xa1\x01\n\x17UpdateAnnotationRequest\x12\x44\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationB\x03\xe0\x41\x02R\nannotation\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"[\n\x18UpdateAnnotationResponse\x12?\n\nannotation\x18\x01 \x01(\x0b\x32\x1f.sift.annotations.v1.AnnotationR\nannotation*\x8b\x01\n\x0f\x41nnotationState\x12 \n\x1c\x41NNOTATION_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41NNOTATION_STATE_OPEN\x10\x01\x12\x1c\n\x18\x41NNOTATION_STATE_FLAGGED\x10\x02\x12\x1d\n\x19\x41NNOTATION_STATE_RESOLVED\x10\x03*m\n\x0e\x41nnotationType\x12\x1f\n\x1b\x41NNOTATION_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41NNOTATION_TYPE_DATA_REVIEW\x10\x01\x12\x19\n\x15\x41NNOTATION_TYPE_PHASE\x10\x02\x32\xcf\x0b\n\x11\x41nnotationService\x12\xbc\x01\n\x10\x43reateAnnotation\x12,.sift.annotations.v1.CreateAnnotationRequest\x1a-.sift.annotations.v1.CreateAnnotationResponse\"K\x92\x41*\x12\x10\x43reateAnnotation\x1a\x16\x43reates an annotation.\x82\xd3\xe4\x93\x02\x18\"\x13/api/v1/annotations:\x01*\x12\xc9\x01\n\x10\x44\x65leteAnnotation\x12,.sift.annotations.v1.DeleteAnnotationRequest\x1a-.sift.annotations.v1.DeleteAnnotationResponse\"X\x92\x41*\x12\x10\x44\x65leteAnnotation\x1a\x16\x44\x65letes an annotation.\x82\xd3\xe4\x93\x02%*#/api/v1/annotations/{annotation_id}\x12\xe3\x01\n\x16\x42\x61tchDeleteAnnotations\x12\x32.sift.annotations.v1.BatchDeleteAnnotationsRequest\x1a\x33.sift.annotations.v1.BatchDeleteAnnotationsResponse\"`\x92\x41\x33\x12\x15\x42\x61tchDeleteAnnotation\x1a\x1a\x42\x61tch deletes annotations.\x82\xd3\xe4\x93\x02$\"\x1f/api/v1/annotations:batchDelete:\x01*\x12\xcd\x01\n\x0fListAnnotations\x12+.sift.annotations.v1.ListAnnotationsRequest\x1a,.sift.annotations.v1.ListAnnotationsResponse\"_\x92\x41\x41\x12\x0eListAnnotation\x1a/Retrieves annotations using an optional filter.\x82\xd3\xe4\x93\x02\x15\x12\x13/api/v1/annotations\x12\xbe\x01\n\rGetAnnotation\x12).sift.annotations.v1.GetAnnotationRequest\x1a*.sift.annotations.v1.GetAnnotationResponse\"V\x92\x41(\x12\rGetAnnotation\x1a\x17Retrieves an annotation\x82\xd3\xe4\x93\x02%\x12#/api/v1/annotations/{annotation_id}\x12\x80\x02\n\x10UpdateAnnotation\x12,.sift.annotations.v1.UpdateAnnotationRequest\x1a-.sift.annotations.v1.UpdateAnnotationResponse\"\x8e\x01\x92\x41m\x12\x10UpdateAnnotation\x1aYUpdates an existing annotation using using the list of fields specified in `update_mask`.\x82\xd3\xe4\x93\x02\x18\x32\x13/api/v1/annotations:\x01*\x1a\xb4\x01\x92\x41\xb0\x01\x12\x36Service to programmatically interact with annotations.\x1av\n\x1cRead more about annotations.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265486685B\xb2\x01\n\x17\x63om.sift.annotations.v1B\x10\x41nnotationsProtoP\x01\xa2\x02\x03SAX\xaa\x02\x13Sift.Annotations.V1\xca\x02\x13Sift\\Annotations\\V1\xe2\x02\x1fSift\\Annotations\\V1\\GPBMetadata\xea\x02\x15Sift::Annotations::V1\x92\x41\x16\x12\x14\n\x12\x41nnotation Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -115,6 +115,8 @@ _globals['_LISTANNOTATIONSREQUEST'].fields_by_name['page_token']._serialized_options = b'\340A\001' _globals['_LISTANNOTATIONSREQUEST'].fields_by_name['filter']._loaded_options = None _globals['_LISTANNOTATIONSREQUEST'].fields_by_name['filter']._serialized_options = b'\340A\001' + _globals['_LISTANNOTATIONSREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_LISTANNOTATIONSREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' _globals['_UPDATEANNOTATIONREQUEST'].fields_by_name['annotation']._loaded_options = None _globals['_UPDATEANNOTATIONREQUEST'].fields_by_name['annotation']._serialized_options = b'\340A\002' _globals['_UPDATEANNOTATIONREQUEST'].fields_by_name['update_mask']._loaded_options = None @@ -133,10 +135,10 @@ _globals['_ANNOTATIONSERVICE'].methods_by_name['GetAnnotation']._serialized_options = b'\222A(\022\rGetAnnotation\032\027Retrieves an annotation\202\323\344\223\002%\022#/api/v1/annotations/{annotation_id}' _globals['_ANNOTATIONSERVICE'].methods_by_name['UpdateAnnotation']._loaded_options = None _globals['_ANNOTATIONSERVICE'].methods_by_name['UpdateAnnotation']._serialized_options = b'\222Am\022\020UpdateAnnotation\032YUpdates an existing annotation using using the list of fields specified in `update_mask`.\202\323\344\223\002\0302\023/api/v1/annotations:\001*' - _globals['_ANNOTATIONSTATE']._serialized_start=3725 - _globals['_ANNOTATIONSTATE']._serialized_end=3864 - _globals['_ANNOTATIONTYPE']._serialized_start=3866 - _globals['_ANNOTATIONTYPE']._serialized_end=3975 + _globals['_ANNOTATIONSTATE']._serialized_start=3772 + _globals['_ANNOTATIONSTATE']._serialized_end=3911 + _globals['_ANNOTATIONTYPE']._serialized_start=3913 + _globals['_ANNOTATIONTYPE']._serialized_end=4022 _globals['_ANNOTATION']._serialized_start=241 _globals['_ANNOTATION']._serialized_end=1341 _globals['_ANNOTATIONLINKEDCHANNELSCHANNEL']._serialized_start=1343 @@ -161,14 +163,14 @@ _globals['_GETANNOTATIONREQUEST']._serialized_end=3110 _globals['_GETANNOTATIONRESPONSE']._serialized_start=3112 _globals['_GETANNOTATIONRESPONSE']._serialized_end=3205 - _globals['_LISTANNOTATIONSREQUEST']._serialized_start=3207 - _globals['_LISTANNOTATIONSREQUEST']._serialized_end=3330 - _globals['_LISTANNOTATIONSRESPONSE']._serialized_start=3333 - _globals['_LISTANNOTATIONSRESPONSE']._serialized_end=3465 - _globals['_UPDATEANNOTATIONREQUEST']._serialized_start=3468 - _globals['_UPDATEANNOTATIONREQUEST']._serialized_end=3629 - _globals['_UPDATEANNOTATIONRESPONSE']._serialized_start=3631 - _globals['_UPDATEANNOTATIONRESPONSE']._serialized_end=3722 - _globals['_ANNOTATIONSERVICE']._serialized_start=3978 - _globals['_ANNOTATIONSERVICE']._serialized_end=5465 + _globals['_LISTANNOTATIONSREQUEST']._serialized_start=3208 + _globals['_LISTANNOTATIONSREQUEST']._serialized_end=3377 + _globals['_LISTANNOTATIONSRESPONSE']._serialized_start=3380 + _globals['_LISTANNOTATIONSRESPONSE']._serialized_end=3512 + _globals['_UPDATEANNOTATIONREQUEST']._serialized_start=3515 + _globals['_UPDATEANNOTATIONREQUEST']._serialized_end=3676 + _globals['_UPDATEANNOTATIONRESPONSE']._serialized_start=3678 + _globals['_UPDATEANNOTATIONRESPONSE']._serialized_end=3769 + _globals['_ANNOTATIONSERVICE']._serialized_start=4025 + _globals['_ANNOTATIONSERVICE']._serialized_end=5512 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/annotations/v1/annotations_pb2.pyi b/python/lib/sift/annotations/v1/annotations_pb2.pyi index b57146b5..f2e61da2 100644 --- a/python/lib/sift/annotations/v1/annotations_pb2.pyi +++ b/python/lib/sift/annotations/v1/annotations_pb2.pyi @@ -351,7 +351,9 @@ class BatchDeleteAnnotationsRequest(google.protobuf.message.Message): ANNOTATION_IDS_FIELD_NUMBER: builtins.int @property - def annotation_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def annotation_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Limit of 1000 annotations per batch""" + def __init__( self, *, @@ -416,6 +418,7 @@ class ListAnnotationsRequest(google.protobuf.message.Message): PAGE_SIZE_FIELD_NUMBER: builtins.int PAGE_TOKEN_FIELD_NUMBER: builtins.int FILTER_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int page_size: builtins.int """The maximum number of annotations to return. The service may return fewer than this value. If unspecified, at most 50 annotations will be returned. The maximum value is 1000; values above @@ -431,18 +434,21 @@ class ListAnnotationsRequest(google.protobuf.message.Message): """A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. Available fields to filter by are `annotation_id`, `start_time`, `end_time`, `created_date`, `modified_date`, `run_id`, `name`, `description`, `state`, `created_by_user_id`, `created_by_rule_condition_version_id`, - and `annotation_type`. + `annotation_type`, `tag_name`, and `assignee`. For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#annotation). Optional. """ + organization_id: builtins.str + """This field is only required if your user belongs to multiple organizations.""" def __init__( self, *, page_size: builtins.int = ..., page_token: builtins.str = ..., filter: builtins.str = ..., + organization_id: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["filter", b"filter", "page_size", b"page_size", "page_token", b"page_token"]) -> None: ... + def ClearField(self, field_name: typing.Literal["filter", b"filter", "organization_id", b"organization_id", "page_size", b"page_size", "page_token", b"page_token"]) -> None: ... global___ListAnnotationsRequest = ListAnnotationsRequest diff --git a/python/lib/sift/assets/v1/assets_pb2.pyi b/python/lib/sift/assets/v1/assets_pb2.pyi index bba629ff..c7be5f3e 100644 --- a/python/lib/sift/assets/v1/assets_pb2.pyi +++ b/python/lib/sift/assets/v1/assets_pb2.pyi @@ -36,7 +36,9 @@ class Asset(google.protobuf.message.Message): @property def modified_date(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property - def tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """The names of the tags to associate with this asset.""" + def __init__( self, *, diff --git a/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.py b/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.py index 81cc295e..dee3a1b3 100644 --- a/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.py +++ b/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.py @@ -18,7 +18,7 @@ from sift.common.type.v1 import channel_data_type_pb2 as sift_dot_common_dot_type_dot_v1_dot_channel__data__type__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5sift/calculated_channels/v1/calculated_channels.proto\x12\x1bsift.calculated_channels.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a+sift/common/type/v1/channel_data_type.proto\"r\n\x1a\x45xpressionChannelReference\x12\x30\n\x11\x63hannel_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10\x63hannelReference\x12\"\n\nchannel_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\tchannelId\"\xf5\x02\n\x11\x45xpressionRequest\x12x\n\x12\x63hannel_references\x18\x01 \x03(\x0b\x32\x45.sift.calculated_channels.v1.ExpressionRequest.ChannelReferencesEntryB\x02\x18\x01R\x11\x63hannelReferences\x12#\n\nexpression\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nexpression\x12{\n\x1d\x65xpression_channel_references\x18\x03 \x03(\x0b\x32\x37.sift.calculated_channels.v1.ExpressionChannelReferenceR\x1b\x65xpressionChannelReferences\x1a\x44\n\x16\x43hannelReferencesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xa4\x01\n ListExpressionIdentifiersRequest\x12\x1b\n\tpage_size\x18\x01 \x01(\rR\x08pageSize\x12\x1d\n\npage_token\x18\x02 \x01(\tR\tpageToken\x12\x44\n\x04mode\x18\x03 \x01(\x0e\x32+.sift.calculated_channels.v1.ExpressionModeB\x03\xe0\x41\x02R\x04mode\"}\n!ListExpressionIdentifiersResponse\x12X\n\x0bidentifiers\x18\x01 \x03(\x0b\x32\x31.sift.calculated_channels.v1.ExpressionIdentifierB\x03\xe0\x41\x02R\x0bidentifiers\"\xce\x01\n\x14\x45xpressionIdentifier\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12N\n\x04type\x18\x03 \x01(\x0e\x32\x35.sift.calculated_channels.v1.ExpressionIdentifierTypeB\x03\xe0\x41\x02R\x04type\x12&\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x0b\x64isplayName\"\xb6\x01\n\x19ValidateExpressionRequest\x12S\n\nexpression\x18\x01 \x01(\x0b\x32..sift.calculated_channels.v1.ExpressionRequestB\x03\xe0\x41\x02R\nexpression\x12\x44\n\x04mode\x18\x02 \x01(\x0e\x32+.sift.calculated_channels.v1.ExpressionModeB\x03\xe0\x41\x02R\x04mode\"\xd8\x01\n\x1aValidateExpressionResponse\x12T\n\x05\x65rror\x18\x01 \x01(\x0b\x32<.sift.calculated_channels.v1.ErrorValidatingExpressionResultH\x00R\x05\x65rror\x12Z\n\x07success\x18\x02 \x01(\x0b\x32>.sift.calculated_channels.v1.SuccessValidatingExpressionResultH\x00R\x07successB\x08\n\x06result\"K\n\x1f\x45rrorValidatingExpressionResult\x12(\n\rerror_message\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x65rrorMessage\"k\n!SuccessValidatingExpressionResult\x12\x46\n\tdata_type\x18\x01 \x01(\x0e\x32$.sift.common.type.v1.ChannelDataTypeB\x03\xe0\x41\x02R\x08\x64\x61taType*\x9b\x01\n\x18\x45xpressionIdentifierType\x12.\n&EXPRESSION_IDENTIFIER_TYPE_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\'\n#EXPRESSION_IDENTIFIER_TYPE_FUNCTION\x10\x01\x12&\n\"EXPRESSION_IDENTIFIER_TYPE_CHANNEL\x10\x02*\x94\x01\n\x0e\x45xpressionMode\x12#\n\x1b\x45XPRESSION_MODE_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\x19\n\x15\x45XPRESSION_MODE_RULES\x10\x01\x12\'\n#EXPRESSION_MODE_CALCULATED_CHANNELS\x10\x02\x12\x19\n\x15\x45XPRESSION_MODE_RULER\x10\x03\x32\xf1\x06\n\x19\x43\x61lculatedChannelsService\x12\xd9\x02\n\x19ListExpressionIdentifiers\x12=.sift.calculated_channels.v1.ListExpressionIdentifiersRequest\x1a>.sift.calculated_channels.v1.ListExpressionIdentifiersResponse\"\xbc\x01\x92\x41\x7f\x12\x19ListExpressionIdentifiers\x1a\x62Retrieves a list of valid identifiers that can be used as part of a calculated channel expression.\x82\xd3\xe4\x93\x02\x34\x12\x32/api/v1/calculated-channels:expression-identifiers\x12\xb0\x02\n\x12ValidateExpression\x12\x36.sift.calculated_channels.v1.ValidateExpressionRequest\x1a\x37.sift.calculated_channels.v1.ValidateExpressionResponse\"\xa8\x01\x92\x41k\x12\x12ValidateExpression\x1aUUsed to validate whether or not an expression used for a calculated channel is valid.\x82\xd3\xe4\x93\x02\x34\"//api/v1/calculated-channels:validate-expression:\x01*\x1a\xc4\x01\x92\x41\xc0\x01\x12>Service to programmatically interact with calculated channels.\x1a~\n$Read more about calculated channels.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421153B\xe6\x01\n\x1f\x63om.sift.calculated_channels.v1B\x17\x43\x61lculatedChannelsProtoP\x01\xa2\x02\x03SCX\xaa\x02\x1aSift.CalculatedChannels.V1\xca\x02\x1aSift\\CalculatedChannels\\V1\xe2\x02&Sift\\CalculatedChannels\\V1\\GPBMetadata\xea\x02\x1cSift::CalculatedChannels::V1\x92\x41\x1f\x12\x1d\n\x1b\x43\x61lculated Channels Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5sift/calculated_channels/v1/calculated_channels.proto\x12\x1bsift.calculated_channels.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a+sift/common/type/v1/channel_data_type.proto\"r\n\x1a\x45xpressionChannelReference\x12\x30\n\x11\x63hannel_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10\x63hannelReference\x12\"\n\nchannel_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\tchannelId\"\xf5\x02\n\x11\x45xpressionRequest\x12x\n\x12\x63hannel_references\x18\x01 \x03(\x0b\x32\x45.sift.calculated_channels.v1.ExpressionRequest.ChannelReferencesEntryB\x02\x18\x01R\x11\x63hannelReferences\x12#\n\nexpression\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nexpression\x12{\n\x1d\x65xpression_channel_references\x18\x03 \x03(\x0b\x32\x37.sift.calculated_channels.v1.ExpressionChannelReferenceR\x1b\x65xpressionChannelReferences\x1a\x44\n\x16\x43hannelReferencesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xa4\x01\n ListExpressionIdentifiersRequest\x12\x1b\n\tpage_size\x18\x01 \x01(\rR\x08pageSize\x12\x1d\n\npage_token\x18\x02 \x01(\tR\tpageToken\x12\x44\n\x04mode\x18\x03 \x01(\x0e\x32+.sift.calculated_channels.v1.ExpressionModeB\x03\xe0\x41\x02R\x04mode\"}\n!ListExpressionIdentifiersResponse\x12X\n\x0bidentifiers\x18\x01 \x03(\x0b\x32\x31.sift.calculated_channels.v1.ExpressionIdentifierB\x03\xe0\x41\x02R\x0bidentifiers\"\xa7\x02\n\x14\x45xpressionIdentifier\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12N\n\x04type\x18\x03 \x01(\x0e\x32\x35.sift.calculated_channels.v1.ExpressionIdentifierTypeB\x03\xe0\x41\x02R\x04type\x12&\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x0b\x64isplayName\x12W\n\x07library\x18\x05 \x01(\x0e\x32\x38.sift.calculated_channels.v1.ExpressionIdentifierLibraryB\x03\xe0\x41\x02R\x07library\"\xb6\x01\n\x19ValidateExpressionRequest\x12S\n\nexpression\x18\x01 \x01(\x0b\x32..sift.calculated_channels.v1.ExpressionRequestB\x03\xe0\x41\x02R\nexpression\x12\x44\n\x04mode\x18\x02 \x01(\x0e\x32+.sift.calculated_channels.v1.ExpressionModeB\x03\xe0\x41\x02R\x04mode\"\xd8\x01\n\x1aValidateExpressionResponse\x12T\n\x05\x65rror\x18\x01 \x01(\x0b\x32<.sift.calculated_channels.v1.ErrorValidatingExpressionResultH\x00R\x05\x65rror\x12Z\n\x07success\x18\x02 \x01(\x0b\x32>.sift.calculated_channels.v1.SuccessValidatingExpressionResultH\x00R\x07successB\x08\n\x06result\"K\n\x1f\x45rrorValidatingExpressionResult\x12(\n\rerror_message\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x65rrorMessage\"k\n!SuccessValidatingExpressionResult\x12\x46\n\tdata_type\x18\x01 \x01(\x0e\x32$.sift.common.type.v1.ChannelDataTypeB\x03\xe0\x41\x02R\x08\x64\x61taType*\x9b\x01\n\x18\x45xpressionIdentifierType\x12.\n&EXPRESSION_IDENTIFIER_TYPE_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\'\n#EXPRESSION_IDENTIFIER_TYPE_FUNCTION\x10\x01\x12&\n\"EXPRESSION_IDENTIFIER_TYPE_CHANNEL\x10\x02*\xc5\x02\n\x1b\x45xpressionIdentifierLibrary\x12-\n)EXPRESSION_IDENTIFIER_LIBRARY_UNSPECIFIED\x10\x00\x12&\n\"EXPRESSION_IDENTIFIER_LIBRARY_MATH\x10\x01\x12(\n$EXPRESSION_IDENTIFIER_LIBRARY_STRING\x10\x02\x12&\n\"EXPRESSION_IDENTIFIER_LIBRARY_LIST\x10\x03\x12&\n\"EXPRESSION_IDENTIFIER_LIBRARY_ITER\x10\x04\x12*\n&EXPRESSION_IDENTIFIER_LIBRARY_STATEFUL\x10\x05\x12)\n%EXPRESSION_IDENTIFIER_LIBRARY_SUMMARY\x10\x06*\x94\x01\n\x0e\x45xpressionMode\x12#\n\x1b\x45XPRESSION_MODE_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\x19\n\x15\x45XPRESSION_MODE_RULES\x10\x01\x12\'\n#EXPRESSION_MODE_CALCULATED_CHANNELS\x10\x02\x12\x19\n\x15\x45XPRESSION_MODE_RULER\x10\x03\x32\xf1\x06\n\x19\x43\x61lculatedChannelsService\x12\xd9\x02\n\x19ListExpressionIdentifiers\x12=.sift.calculated_channels.v1.ListExpressionIdentifiersRequest\x1a>.sift.calculated_channels.v1.ListExpressionIdentifiersResponse\"\xbc\x01\x92\x41\x7f\x12\x19ListExpressionIdentifiers\x1a\x62Retrieves a list of valid identifiers that can be used as part of a calculated channel expression.\x82\xd3\xe4\x93\x02\x34\x12\x32/api/v1/calculated-channels:expression-identifiers\x12\xb0\x02\n\x12ValidateExpression\x12\x36.sift.calculated_channels.v1.ValidateExpressionRequest\x1a\x37.sift.calculated_channels.v1.ValidateExpressionResponse\"\xa8\x01\x92\x41k\x12\x12ValidateExpression\x1aUUsed to validate whether or not an expression used for a calculated channel is valid.\x82\xd3\xe4\x93\x02\x34\"//api/v1/calculated-channels:validate-expression:\x01*\x1a\xc4\x01\x92\x41\xc0\x01\x12>Service to programmatically interact with calculated channels.\x1a~\n$Read more about calculated channels.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421153B\xe6\x01\n\x1f\x63om.sift.calculated_channels.v1B\x17\x43\x61lculatedChannelsProtoP\x01\xa2\x02\x03SCX\xaa\x02\x1aSift.CalculatedChannels.V1\xca\x02\x1aSift\\CalculatedChannels\\V1\xe2\x02&Sift\\CalculatedChannels\\V1\\GPBMetadata\xea\x02\x1cSift::CalculatedChannels::V1\x92\x41\x1f\x12\x1d\n\x1b\x43\x61lculated Channels Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -52,6 +52,8 @@ _globals['_EXPRESSIONIDENTIFIER'].fields_by_name['type']._serialized_options = b'\340A\002' _globals['_EXPRESSIONIDENTIFIER'].fields_by_name['display_name']._loaded_options = None _globals['_EXPRESSIONIDENTIFIER'].fields_by_name['display_name']._serialized_options = b'\340A\002' + _globals['_EXPRESSIONIDENTIFIER'].fields_by_name['library']._loaded_options = None + _globals['_EXPRESSIONIDENTIFIER'].fields_by_name['library']._serialized_options = b'\340A\002' _globals['_VALIDATEEXPRESSIONREQUEST'].fields_by_name['expression']._loaded_options = None _globals['_VALIDATEEXPRESSIONREQUEST'].fields_by_name['expression']._serialized_options = b'\340A\002' _globals['_VALIDATEEXPRESSIONREQUEST'].fields_by_name['mode']._loaded_options = None @@ -66,10 +68,12 @@ _globals['_CALCULATEDCHANNELSSERVICE'].methods_by_name['ListExpressionIdentifiers']._serialized_options = b'\222A\177\022\031ListExpressionIdentifiers\032bRetrieves a list of valid identifiers that can be used as part of a calculated channel expression.\202\323\344\223\0024\0222/api/v1/calculated-channels:expression-identifiers' _globals['_CALCULATEDCHANNELSSERVICE'].methods_by_name['ValidateExpression']._loaded_options = None _globals['_CALCULATEDCHANNELSSERVICE'].methods_by_name['ValidateExpression']._serialized_options = b'\222Ak\022\022ValidateExpression\032UUsed to validate whether or not an expression used for a calculated channel is valid.\202\323\344\223\0024\"//api/v1/calculated-channels:validate-expression:\001*' - _globals['_EXPRESSIONIDENTIFIERTYPE']._serialized_start=1828 - _globals['_EXPRESSIONIDENTIFIERTYPE']._serialized_end=1983 - _globals['_EXPRESSIONMODE']._serialized_start=1986 - _globals['_EXPRESSIONMODE']._serialized_end=2134 + _globals['_EXPRESSIONIDENTIFIERTYPE']._serialized_start=1917 + _globals['_EXPRESSIONIDENTIFIERTYPE']._serialized_end=2072 + _globals['_EXPRESSIONIDENTIFIERLIBRARY']._serialized_start=2075 + _globals['_EXPRESSIONIDENTIFIERLIBRARY']._serialized_end=2400 + _globals['_EXPRESSIONMODE']._serialized_start=2403 + _globals['_EXPRESSIONMODE']._serialized_end=2551 _globals['_EXPRESSIONCHANNELREFERENCE']._serialized_start=242 _globals['_EXPRESSIONCHANNELREFERENCE']._serialized_end=356 _globals['_EXPRESSIONREQUEST']._serialized_start=359 @@ -81,15 +85,15 @@ _globals['_LISTEXPRESSIONIDENTIFIERSRESPONSE']._serialized_start=901 _globals['_LISTEXPRESSIONIDENTIFIERSRESPONSE']._serialized_end=1026 _globals['_EXPRESSIONIDENTIFIER']._serialized_start=1029 - _globals['_EXPRESSIONIDENTIFIER']._serialized_end=1235 - _globals['_VALIDATEEXPRESSIONREQUEST']._serialized_start=1238 - _globals['_VALIDATEEXPRESSIONREQUEST']._serialized_end=1420 - _globals['_VALIDATEEXPRESSIONRESPONSE']._serialized_start=1423 - _globals['_VALIDATEEXPRESSIONRESPONSE']._serialized_end=1639 - _globals['_ERRORVALIDATINGEXPRESSIONRESULT']._serialized_start=1641 - _globals['_ERRORVALIDATINGEXPRESSIONRESULT']._serialized_end=1716 - _globals['_SUCCESSVALIDATINGEXPRESSIONRESULT']._serialized_start=1718 - _globals['_SUCCESSVALIDATINGEXPRESSIONRESULT']._serialized_end=1825 - _globals['_CALCULATEDCHANNELSSERVICE']._serialized_start=2137 - _globals['_CALCULATEDCHANNELSSERVICE']._serialized_end=3018 + _globals['_EXPRESSIONIDENTIFIER']._serialized_end=1324 + _globals['_VALIDATEEXPRESSIONREQUEST']._serialized_start=1327 + _globals['_VALIDATEEXPRESSIONREQUEST']._serialized_end=1509 + _globals['_VALIDATEEXPRESSIONRESPONSE']._serialized_start=1512 + _globals['_VALIDATEEXPRESSIONRESPONSE']._serialized_end=1728 + _globals['_ERRORVALIDATINGEXPRESSIONRESULT']._serialized_start=1730 + _globals['_ERRORVALIDATINGEXPRESSIONRESULT']._serialized_end=1805 + _globals['_SUCCESSVALIDATINGEXPRESSIONRESULT']._serialized_start=1807 + _globals['_SUCCESSVALIDATINGEXPRESSIONRESULT']._serialized_end=1914 + _globals['_CALCULATEDCHANNELSSERVICE']._serialized_start=2554 + _globals['_CALCULATEDCHANNELSSERVICE']._serialized_end=3435 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.pyi b/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.pyi index 961891ca..fa27f902 100644 --- a/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.pyi +++ b/python/lib/sift/calculated_channels/v1/calculated_channels_pb2.pyi @@ -37,6 +37,31 @@ EXPRESSION_IDENTIFIER_TYPE_FUNCTION: ExpressionIdentifierType.ValueType # 1 EXPRESSION_IDENTIFIER_TYPE_CHANNEL: ExpressionIdentifierType.ValueType # 2 global___ExpressionIdentifierType = ExpressionIdentifierType +class _ExpressionIdentifierLibrary: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ExpressionIdentifierLibraryEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ExpressionIdentifierLibrary.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + EXPRESSION_IDENTIFIER_LIBRARY_UNSPECIFIED: _ExpressionIdentifierLibrary.ValueType # 0 + EXPRESSION_IDENTIFIER_LIBRARY_MATH: _ExpressionIdentifierLibrary.ValueType # 1 + EXPRESSION_IDENTIFIER_LIBRARY_STRING: _ExpressionIdentifierLibrary.ValueType # 2 + EXPRESSION_IDENTIFIER_LIBRARY_LIST: _ExpressionIdentifierLibrary.ValueType # 3 + EXPRESSION_IDENTIFIER_LIBRARY_ITER: _ExpressionIdentifierLibrary.ValueType # 4 + EXPRESSION_IDENTIFIER_LIBRARY_STATEFUL: _ExpressionIdentifierLibrary.ValueType # 5 + EXPRESSION_IDENTIFIER_LIBRARY_SUMMARY: _ExpressionIdentifierLibrary.ValueType # 6 + +class ExpressionIdentifierLibrary(_ExpressionIdentifierLibrary, metaclass=_ExpressionIdentifierLibraryEnumTypeWrapper): ... + +EXPRESSION_IDENTIFIER_LIBRARY_UNSPECIFIED: ExpressionIdentifierLibrary.ValueType # 0 +EXPRESSION_IDENTIFIER_LIBRARY_MATH: ExpressionIdentifierLibrary.ValueType # 1 +EXPRESSION_IDENTIFIER_LIBRARY_STRING: ExpressionIdentifierLibrary.ValueType # 2 +EXPRESSION_IDENTIFIER_LIBRARY_LIST: ExpressionIdentifierLibrary.ValueType # 3 +EXPRESSION_IDENTIFIER_LIBRARY_ITER: ExpressionIdentifierLibrary.ValueType # 4 +EXPRESSION_IDENTIFIER_LIBRARY_STATEFUL: ExpressionIdentifierLibrary.ValueType # 5 +EXPRESSION_IDENTIFIER_LIBRARY_SUMMARY: ExpressionIdentifierLibrary.ValueType # 6 +global___ExpressionIdentifierLibrary = ExpressionIdentifierLibrary + class _ExpressionMode: ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType @@ -163,10 +188,12 @@ class ExpressionIdentifier(google.protobuf.message.Message): DESCRIPTION_FIELD_NUMBER: builtins.int TYPE_FIELD_NUMBER: builtins.int DISPLAY_NAME_FIELD_NUMBER: builtins.int + LIBRARY_FIELD_NUMBER: builtins.int name: builtins.str description: builtins.str type: global___ExpressionIdentifierType.ValueType display_name: builtins.str + library: global___ExpressionIdentifierLibrary.ValueType def __init__( self, *, @@ -174,8 +201,9 @@ class ExpressionIdentifier(google.protobuf.message.Message): description: builtins.str = ..., type: global___ExpressionIdentifierType.ValueType = ..., display_name: builtins.str = ..., + library: global___ExpressionIdentifierLibrary.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["description", b"description", "display_name", b"display_name", "name", b"name", "type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["description", b"description", "display_name", b"display_name", "library", b"library", "name", b"name", "type", b"type"]) -> None: ... global___ExpressionIdentifier = ExpressionIdentifier diff --git a/python/lib/sift/channel_schemas/v1/channel_schemas_pb2.pyi b/python/lib/sift/channel_schemas/v1/channel_schemas_pb2.pyi index 015e2559..350c5164 100644 --- a/python/lib/sift/channel_schemas/v1/channel_schemas_pb2.pyi +++ b/python/lib/sift/channel_schemas/v1/channel_schemas_pb2.pyi @@ -90,7 +90,9 @@ class BatchCreateChannelSchemasRequest(google.protobuf.message.Message): This field is optional if the caller belongs to a single organization. """ @property - def requests(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CreateChannelSchemaRequest]: ... + def requests(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CreateChannelSchemaRequest]: + """Limit of 1000 channels schemas per batch""" + def __init__( self, *, diff --git a/python/lib/sift/channels/v2/channels_pb2.py b/python/lib/sift/channels/v2/channels_pb2.py index d4e148c8..a66ef691 100644 --- a/python/lib/sift/channels/v2/channels_pb2.py +++ b/python/lib/sift/channels/v2/channels_pb2.py @@ -21,7 +21,7 @@ from sift.common.type.v1 import channel_enum_type_pb2 as sift_dot_common_dot_type_dot_v1_dot_channel__enum__type__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fsift/channels/v2/channels.proto\x12\x10sift.channels.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x33sift/common/type/v1/channel_bit_field_element.proto\x1a+sift/common/type/v1/channel_data_type.proto\x1a+sift/common/type/v1/channel_enum_type.proto\"\xd4\x05\n\x07\x43hannel\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\x12!\n\tcomponent\x18\x03 \x01(\tB\x03\xe0\x41\x02R\tcomponent\x12\x1e\n\x08\x61sset_id\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12%\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12\x1c\n\x07unit_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x06unitId\x12\x42\n\x0c\x63reated_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\t \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\n \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12,\n\x0forganization_id\x18\x0b \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x46\n\tdata_type\x18\x0c \x01(\x0e\x32$.sift.common.type.v1.ChannelDataTypeB\x03\xe0\x41\x02R\x08\x64\x61taType\x12\x43\n\nenum_types\x18\r \x03(\x0b\x32$.sift.common.type.v1.ChannelEnumTypeR\tenumTypes\x12Y\n\x12\x62it_field_elements\x18\x0e \x03(\x0b\x32+.sift.common.type.v1.ChannelBitFieldElementR\x10\x62itFieldElements\"7\n\x11GetChannelRequest\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\"N\n\x12GetChannelResponse\x12\x38\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\x19.sift.channels.v2.ChannelB\x03\xe0\x41\x02R\x07\x63hannel\"x\n\x13ListChannelsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\"u\n\x14ListChannelsResponse\x12\x35\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x19.sift.channels.v2.ChannelR\x08\x63hannels\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken2\xbc\x04\n\x0e\x43hannelService\x12\xa2\x01\n\nGetChannel\x12#.sift.channels.v2.GetChannelRequest\x1a$.sift.channels.v2.GetChannelResponse\"I\x92\x41!\x12\nGetChannel\x1a\x13Retrieve a channel.\x82\xd3\xe4\x93\x02\x1f\x12\x1d/api/v2/channels/{channel_id}\x12\xb5\x01\n\x0cListChannels\x12%.sift.channels.v2.ListChannelsRequest\x1a&.sift.channels.v2.ListChannelsResponse\"V\x92\x41;\x12\x0cListChannels\x1a+Retrieve channels using an optional filter.\x82\xd3\xe4\x93\x02\x12\x12\x10/api/v2/channels\x1a\xcc\x01\x92\x41\xc8\x01\x12HService to programmatically interact with [channels](/glossary#channel).\x1a|\n\"Read more about what channels are.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265453943B\x9d\x01\n\x14\x63om.sift.channels.v2B\rChannelsProtoP\x01\xa2\x02\x03SCX\xaa\x02\x10Sift.Channels.V2\xca\x02\x10Sift\\Channels\\V2\xe2\x02\x1cSift\\Channels\\V2\\GPBMetadata\xea\x02\x12Sift::Channels::V2\x92\x41\x13\x12\x11\n\x0f\x43hannel serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fsift/channels/v2/channels.proto\x12\x10sift.channels.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x33sift/common/type/v1/channel_bit_field_element.proto\x1a+sift/common/type/v1/channel_data_type.proto\x1a+sift/common/type/v1/channel_enum_type.proto\"\xd4\x05\n\x07\x43hannel\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\x12!\n\tcomponent\x18\x03 \x01(\tB\x03\xe0\x41\x02R\tcomponent\x12\x1e\n\x08\x61sset_id\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12%\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12\x1c\n\x07unit_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x06unitId\x12\x42\n\x0c\x63reated_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\t \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\n \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12,\n\x0forganization_id\x18\x0b \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x46\n\tdata_type\x18\x0c \x01(\x0e\x32$.sift.common.type.v1.ChannelDataTypeB\x03\xe0\x41\x02R\x08\x64\x61taType\x12\x43\n\nenum_types\x18\r \x03(\x0b\x32$.sift.common.type.v1.ChannelEnumTypeR\tenumTypes\x12Y\n\x12\x62it_field_elements\x18\x0e \x03(\x0b\x32+.sift.common.type.v1.ChannelBitFieldElementR\x10\x62itFieldElements\"7\n\x11GetChannelRequest\x12\"\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tchannelId\"N\n\x12GetChannelResponse\x12\x38\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\x19.sift.channels.v2.ChannelB\x03\xe0\x41\x02R\x07\x63hannel\"\xa6\x01\n\x13ListChannelsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"u\n\x14ListChannelsResponse\x12\x35\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x19.sift.channels.v2.ChannelR\x08\x63hannels\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken2\xbc\x04\n\x0e\x43hannelService\x12\xa2\x01\n\nGetChannel\x12#.sift.channels.v2.GetChannelRequest\x1a$.sift.channels.v2.GetChannelResponse\"I\x92\x41!\x12\nGetChannel\x1a\x13Retrieve a channel.\x82\xd3\xe4\x93\x02\x1f\x12\x1d/api/v2/channels/{channel_id}\x12\xb5\x01\n\x0cListChannels\x12%.sift.channels.v2.ListChannelsRequest\x1a&.sift.channels.v2.ListChannelsResponse\"V\x92\x41;\x12\x0cListChannels\x1a+Retrieve channels using an optional filter.\x82\xd3\xe4\x93\x02\x12\x12\x10/api/v2/channels\x1a\xcc\x01\x92\x41\xc8\x01\x12HService to programmatically interact with [channels](/glossary#channel).\x1a|\n\"Read more about what channels are.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265453943B\x9d\x01\n\x14\x63om.sift.channels.v2B\rChannelsProtoP\x01\xa2\x02\x03SCX\xaa\x02\x10Sift.Channels.V2\xca\x02\x10Sift\\Channels\\V2\xe2\x02\x1cSift\\Channels\\V2\\GPBMetadata\xea\x02\x12Sift::Channels::V2\x92\x41\x13\x12\x11\n\x0f\x43hannel serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -63,6 +63,8 @@ _globals['_LISTCHANNELSREQUEST'].fields_by_name['page_token']._serialized_options = b'\340A\001' _globals['_LISTCHANNELSREQUEST'].fields_by_name['filter']._loaded_options = None _globals['_LISTCHANNELSREQUEST'].fields_by_name['filter']._serialized_options = b'\340A\001' + _globals['_LISTCHANNELSREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_LISTCHANNELSREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' _globals['_CHANNELSERVICE']._loaded_options = None _globals['_CHANNELSERVICE']._serialized_options = b'\222A\310\001\022HService to programmatically interact with [channels](/glossary#channel).\032|\n\"Read more about what channels are.\022Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265453943' _globals['_CHANNELSERVICE'].methods_by_name['GetChannel']._loaded_options = None @@ -75,10 +77,10 @@ _globals['_GETCHANNELREQUEST']._serialized_end=1122 _globals['_GETCHANNELRESPONSE']._serialized_start=1124 _globals['_GETCHANNELRESPONSE']._serialized_end=1202 - _globals['_LISTCHANNELSREQUEST']._serialized_start=1204 - _globals['_LISTCHANNELSREQUEST']._serialized_end=1324 - _globals['_LISTCHANNELSRESPONSE']._serialized_start=1326 - _globals['_LISTCHANNELSRESPONSE']._serialized_end=1443 - _globals['_CHANNELSERVICE']._serialized_start=1446 - _globals['_CHANNELSERVICE']._serialized_end=2018 + _globals['_LISTCHANNELSREQUEST']._serialized_start=1205 + _globals['_LISTCHANNELSREQUEST']._serialized_end=1371 + _globals['_LISTCHANNELSRESPONSE']._serialized_start=1373 + _globals['_LISTCHANNELSRESPONSE']._serialized_end=1490 + _globals['_CHANNELSERVICE']._serialized_start=1493 + _globals['_CHANNELSERVICE']._serialized_end=2065 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/channels/v2/channels_pb2.pyi b/python/lib/sift/channels/v2/channels_pb2.pyi index 1e367c57..be227a35 100644 --- a/python/lib/sift/channels/v2/channels_pb2.pyi +++ b/python/lib/sift/channels/v2/channels_pb2.pyi @@ -120,10 +120,11 @@ class ListChannelsRequest(google.protobuf.message.Message): PAGE_SIZE_FIELD_NUMBER: builtins.int PAGE_TOKEN_FIELD_NUMBER: builtins.int FILTER_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int page_size: builtins.int """The maximum number of channels to return. The service may return fewer than this value. - If unspecified, at most 50 channels will be returned. The maximum value is 1000; values above - 1000 will be coerced to 1000. Optional. + If unspecified, at most 50 channels will be returned. The maximum value is 10,000; values above + 10,000 will be coerced to 10,000. Optional. """ page_token: builtins.str """A page token, received from a previous `ListChannels` call. @@ -137,14 +138,17 @@ class ListChannelsRequest(google.protobuf.message.Message): For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#channel). Optional. """ + organization_id: builtins.str + """This field is only required if your user belongs to multiple organizations.""" def __init__( self, *, page_size: builtins.int = ..., page_token: builtins.str = ..., filter: builtins.str = ..., + organization_id: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["filter", b"filter", "page_size", b"page_size", "page_token", b"page_token"]) -> None: ... + def ClearField(self, field_name: typing.Literal["filter", b"filter", "organization_id", b"organization_id", "page_size", b"page_size", "page_token", b"page_token"]) -> None: ... global___ListChannelsRequest = ListChannelsRequest diff --git a/python/lib/sift/common/type/v1/resource_identifier_pb2.py b/python/lib/sift/common/type/v1/resource_identifier_pb2.py new file mode 100644 index 00000000..d7302e10 --- /dev/null +++ b/python/lib/sift/common/type/v1/resource_identifier_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: sift/common/type/v1/resource_identifier.proto +# Protobuf Python Version: 5.26.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-sift/common/type/v1/resource_identifier.proto\x12\x13sift.common.type.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceIdentifier\x12\x10\n\x02id\x18\x01 \x01(\tH\x00R\x02id\x12\x1f\n\nclient_key\x18\x02 \x01(\tH\x00R\tclientKeyB\x0c\n\nidentifier\"C\n\rNamedResource\x12\x10\n\x02id\x18\x01 \x01(\tH\x00R\x02id\x12\x14\n\x04name\x18\x02 \x01(\tH\x00R\x04nameB\n\n\x08resource\"\x96\x01\n\x13ResourceIdentifiers\x12,\n\x03ids\x18\x01 \x01(\x0b\x32\x18.sift.common.type.v1.IdsH\x00R\x03ids\x12\x42\n\x0b\x63lient_keys\x18\x02 \x01(\x0b\x32\x1f.sift.common.type.v1.ClientKeysH\x00R\nclientKeysB\r\n\x0bidentifiers\"\x7f\n\x0eNamedResources\x12,\n\x03ids\x18\x01 \x01(\x0b\x32\x18.sift.common.type.v1.IdsH\x00R\x03ids\x12\x32\n\x05names\x18\x02 \x01(\x0b\x32\x1a.sift.common.type.v1.NamesH\x00R\x05namesB\x0b\n\tresources\"\x1c\n\x03Ids\x12\x15\n\x03ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x03ids\"2\n\nClientKeys\x12$\n\x0b\x63lient_keys\x18\x01 \x03(\tB\x03\xe0\x41\x02R\nclientKeys\"\"\n\x05Names\x12\x19\n\x05names\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x05namesB\xa1\x01\n\x17\x63om.sift.common.type.v1B\x17ResourceIdentifierProtoP\x01\xa2\x02\x03SCT\xaa\x02\x13Sift.Common.Type.V1\xca\x02\x13Sift\\Common\\Type\\V1\xe2\x02\x1fSift\\Common\\Type\\V1\\GPBMetadata\xea\x02\x16Sift::Common::Type::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sift.common.type.v1.resource_identifier_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\027com.sift.common.type.v1B\027ResourceIdentifierProtoP\001\242\002\003SCT\252\002\023Sift.Common.Type.V1\312\002\023Sift\\Common\\Type\\V1\342\002\037Sift\\Common\\Type\\V1\\GPBMetadata\352\002\026Sift::Common::Type::V1' + _globals['_IDS'].fields_by_name['ids']._loaded_options = None + _globals['_IDS'].fields_by_name['ids']._serialized_options = b'\340A\002' + _globals['_CLIENTKEYS'].fields_by_name['client_keys']._loaded_options = None + _globals['_CLIENTKEYS'].fields_by_name['client_keys']._serialized_options = b'\340A\002' + _globals['_NAMES'].fields_by_name['names']._loaded_options = None + _globals['_NAMES'].fields_by_name['names']._serialized_options = b'\340A\002' + _globals['_RESOURCEIDENTIFIER']._serialized_start=103 + _globals['_RESOURCEIDENTIFIER']._serialized_end=188 + _globals['_NAMEDRESOURCE']._serialized_start=190 + _globals['_NAMEDRESOURCE']._serialized_end=257 + _globals['_RESOURCEIDENTIFIERS']._serialized_start=260 + _globals['_RESOURCEIDENTIFIERS']._serialized_end=410 + _globals['_NAMEDRESOURCES']._serialized_start=412 + _globals['_NAMEDRESOURCES']._serialized_end=539 + _globals['_IDS']._serialized_start=541 + _globals['_IDS']._serialized_end=569 + _globals['_CLIENTKEYS']._serialized_start=571 + _globals['_CLIENTKEYS']._serialized_end=621 + _globals['_NAMES']._serialized_start=623 + _globals['_NAMES']._serialized_end=657 +# @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/common/type/v1/resource_identifier_pb2.pyi b/python/lib/sift/common/type/v1/resource_identifier_pb2.pyi new file mode 100644 index 00000000..22cc9efe --- /dev/null +++ b/python/lib/sift/common/type/v1/resource_identifier_pb2.pyi @@ -0,0 +1,145 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message +import typing + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class ResourceIdentifier(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + CLIENT_KEY_FIELD_NUMBER: builtins.int + id: builtins.str + client_key: builtins.str + def __init__( + self, + *, + id: builtins.str = ..., + client_key: builtins.str = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["client_key", b"client_key", "id", b"id", "identifier", b"identifier"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["client_key", b"client_key", "id", b"id", "identifier", b"identifier"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["identifier", b"identifier"]) -> typing.Literal["id", "client_key"] | None: ... + +global___ResourceIdentifier = ResourceIdentifier + +@typing.final +class NamedResource(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + id: builtins.str + name: builtins.str + def __init__( + self, + *, + id: builtins.str = ..., + name: builtins.str = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["id", b"id", "name", b"name", "resource", b"resource"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["id", b"id", "name", b"name", "resource", b"resource"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["resource", b"resource"]) -> typing.Literal["id", "name"] | None: ... + +global___NamedResource = NamedResource + +@typing.final +class ResourceIdentifiers(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDS_FIELD_NUMBER: builtins.int + CLIENT_KEYS_FIELD_NUMBER: builtins.int + @property + def ids(self) -> global___Ids: ... + @property + def client_keys(self) -> global___ClientKeys: ... + def __init__( + self, + *, + ids: global___Ids | None = ..., + client_keys: global___ClientKeys | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["client_keys", b"client_keys", "identifiers", b"identifiers", "ids", b"ids"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["client_keys", b"client_keys", "identifiers", b"identifiers", "ids", b"ids"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["identifiers", b"identifiers"]) -> typing.Literal["ids", "client_keys"] | None: ... + +global___ResourceIdentifiers = ResourceIdentifiers + +@typing.final +class NamedResources(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDS_FIELD_NUMBER: builtins.int + NAMES_FIELD_NUMBER: builtins.int + @property + def ids(self) -> global___Ids: ... + @property + def names(self) -> global___Names: ... + def __init__( + self, + *, + ids: global___Ids | None = ..., + names: global___Names | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["ids", b"ids", "names", b"names", "resources", b"resources"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["ids", b"ids", "names", b"names", "resources", b"resources"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["resources", b"resources"]) -> typing.Literal["ids", "names"] | None: ... + +global___NamedResources = NamedResources + +@typing.final +class Ids(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDS_FIELD_NUMBER: builtins.int + @property + def ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + ids: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["ids", b"ids"]) -> None: ... + +global___Ids = Ids + +@typing.final +class ClientKeys(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CLIENT_KEYS_FIELD_NUMBER: builtins.int + @property + def client_keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + client_keys: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["client_keys", b"client_keys"]) -> None: ... + +global___ClientKeys = ClientKeys + +@typing.final +class Names(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMES_FIELD_NUMBER: builtins.int + @property + def names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + names: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["names", b"names"]) -> None: ... + +global___Names = Names diff --git a/python/lib/sift/common/type/v1/resource_identifier_pb2_grpc.py b/python/lib/sift/common/type/v1/resource_identifier_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/python/lib/sift/common/type/v1/resource_identifier_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/python/lib/sift/common/type/v1/resource_identifier_pb2_grpc.pyi b/python/lib/sift/common/type/v1/resource_identifier_pb2_grpc.pyi new file mode 100644 index 00000000..a6a9cff9 --- /dev/null +++ b/python/lib/sift/common/type/v1/resource_identifier_pb2_grpc.pyi @@ -0,0 +1,17 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/python/lib/sift/notifications/v1/notifications_pb2.py b/python/lib/sift/notifications/v1/notifications_pb2.py index dd473d7c..1516e2fb 100644 --- a/python/lib/sift/notifications/v1/notifications_pb2.py +++ b/python/lib/sift/notifications/v1/notifications_pb2.py @@ -19,7 +19,7 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)sift/notifications/v1/notifications.proto\x12\x15sift.notifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xad\x04\n\x0cNotification\x12\'\n\x0fnotification_id\x18\x01 \x01(\tR\x0enotificationId\x12=\n\x0c\x63reated_date\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0b\x63reatedDate\x12?\n\rmodified_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0cmodifiedDate\x12+\n\x12\x63reated_by_user_id\x18\x04 \x01(\tR\x0f\x63reatedByUserId\x12-\n\x13modified_by_user_id\x18\x05 \x01(\tR\x10modifiedByUserId\x12\'\n\x0forganization_id\x18\x06 \x01(\tR\x0eorganizationId\x12*\n\x11recipient_user_id\x18\x07 \x01(\tR\x0frecipientUserId\x12\x17\n\x07is_read\x18\x08 \x01(\x08R\x06isRead\x12\x1b\n\tfull_link\x18\t \x01(\tR\x08\x66ullLink\x12T\n\x11notification_type\x18\n \x01(\x0e\x32\'.sift.notifications.v1.NotificationKindR\x10notificationType\x12\x1a\n\x08\x63ontents\x18\x0b \x01(\tR\x08\x63ontents\x12\x1b\n\tentity_id\x18\x0c \x01(\tR\x08\x65ntityId\"}\n\x18ListNotificationsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\"\x8e\x01\n\x19ListNotificationsResponse\x12I\n\rnotifications\x18\x01 \x03(\x0b\x32#.sift.notifications.v1.NotificationR\rnotifications\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"t\n\x1f\x42\x61tchUpdateNotificationsRequest\x12Q\n\x08requests\x18\x01 \x03(\x0b\x32\x30.sift.notifications.v1.UpdateNotificationRequestB\x03\xe0\x41\x02R\x08requests\"\xab\x01\n\x19UpdateNotificationRequest\x12L\n\x0cnotification\x18\x01 \x01(\x0b\x32#.sift.notifications.v1.NotificationB\x03\xe0\x41\x02R\x0cnotification\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"m\n BatchUpdateNotificationsResponse\x12I\n\rnotifications\x18\x01 \x03(\x0b\x32#.sift.notifications.v1.NotificationR\rnotifications*\x8e\x02\n\x10NotificationKind\x12!\n\x1dNOTIFICATION_KIND_UNSPECIFIED\x10\x00\x12\x1a\n\x16NOTIFICATION_KIND_TEXT\x10\x01\x12)\n%NOTIFICATION_KIND_ANNOTATION_ASSIGNED\x10\x02\x12\x35\n1NOTIFICATION_KIND_MENTIONED_IN_ANNOTATION_COMMENT\x10\x03\x12)\n%NOTIFICATION_KIND_CONDITION_TRIGGERED\x10\x04\x12.\n*NOTIFICATION_KIND_ANNOTATION_STATE_CHANGED\x10\x05\x32\x85\x05\n\x13NotificationService\x12\xde\x01\n\x11ListNotifications\x12/.sift.notifications.v1.ListNotificationsRequest\x1a\x30.sift.notifications.v1.ListNotificationsResponse\"f\x92\x41\x46\x12\x11ListNotifications\x1a\x31Retrieves notifications using an optional filter.\x82\xd3\xe4\x93\x02\x17\x12\x15/api/v1/notifications\x12\xc6\x02\n\x18\x42\x61tchUpdateNotifications\x12\x36.sift.notifications.v1.BatchUpdateNotificationsRequest\x1a\x37.sift.notifications.v1.BatchUpdateNotificationsResponse\"\xb8\x01\x92\x41\x88\x01\x12\x18\x42\x61tchUpdateNotifications\x1alBatch updates a list of notifications using the list of fields specified in their respective `update_mask`s.\x82\xd3\xe4\x93\x02&\"!/api/v1/notifications:batchUpdate:\x01*\x1a\x44\x92\x41\x41\x12?Service to programmatically interact with in-app notifications.B\xc0\x01\n\x19\x63om.sift.notifications.v1B\x12NotificationsProtoP\x01\xa2\x02\x03SNX\xaa\x02\x15Sift.Notifications.V1\xca\x02\x15Sift\\Notifications\\V1\xe2\x02!Sift\\Notifications\\V1\\GPBMetadata\xea\x02\x17Sift::Notifications::V1\x92\x41\x18\x12\x16\n\x14Notification Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)sift/notifications/v1/notifications.proto\x12\x15sift.notifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xad\x04\n\x0cNotification\x12\'\n\x0fnotification_id\x18\x01 \x01(\tR\x0enotificationId\x12=\n\x0c\x63reated_date\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0b\x63reatedDate\x12?\n\rmodified_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0cmodifiedDate\x12+\n\x12\x63reated_by_user_id\x18\x04 \x01(\tR\x0f\x63reatedByUserId\x12-\n\x13modified_by_user_id\x18\x05 \x01(\tR\x10modifiedByUserId\x12\'\n\x0forganization_id\x18\x06 \x01(\tR\x0eorganizationId\x12*\n\x11recipient_user_id\x18\x07 \x01(\tR\x0frecipientUserId\x12\x17\n\x07is_read\x18\x08 \x01(\x08R\x06isRead\x12\x1b\n\tfull_link\x18\t \x01(\tR\x08\x66ullLink\x12T\n\x11notification_type\x18\n \x01(\x0e\x32\'.sift.notifications.v1.NotificationKindR\x10notificationType\x12\x1a\n\x08\x63ontents\x18\x0b \x01(\tR\x08\x63ontents\x12\x1b\n\tentity_id\x18\x0c \x01(\tR\x08\x65ntityId\"}\n\x18ListNotificationsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\"\x8e\x01\n\x19ListNotificationsResponse\x12I\n\rnotifications\x18\x01 \x03(\x0b\x32#.sift.notifications.v1.NotificationR\rnotifications\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"t\n\x1f\x42\x61tchUpdateNotificationsRequest\x12Q\n\x08requests\x18\x01 \x03(\x0b\x32\x30.sift.notifications.v1.UpdateNotificationRequestB\x03\xe0\x41\x02R\x08requests\"\xab\x01\n\x19UpdateNotificationRequest\x12L\n\x0cnotification\x18\x01 \x01(\x0b\x32#.sift.notifications.v1.NotificationB\x03\xe0\x41\x02R\x0cnotification\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"m\n BatchUpdateNotificationsResponse\x12I\n\rnotifications\x18\x01 \x03(\x0b\x32#.sift.notifications.v1.NotificationR\rnotifications*\xb2\x02\n\x10NotificationKind\x12!\n\x1dNOTIFICATION_KIND_UNSPECIFIED\x10\x00\x12\x1a\n\x16NOTIFICATION_KIND_TEXT\x10\x01\x12)\n%NOTIFICATION_KIND_ANNOTATION_ASSIGNED\x10\x02\x12\x35\n1NOTIFICATION_KIND_MENTIONED_IN_ANNOTATION_COMMENT\x10\x03\x12)\n%NOTIFICATION_KIND_CONDITION_TRIGGERED\x10\x04\x12.\n*NOTIFICATION_KIND_ANNOTATION_STATE_CHANGED\x10\x05\x12\"\n\x1eNOTIFICATION_KIND_REPORT_READY\x10\x06\x32\x85\x05\n\x13NotificationService\x12\xde\x01\n\x11ListNotifications\x12/.sift.notifications.v1.ListNotificationsRequest\x1a\x30.sift.notifications.v1.ListNotificationsResponse\"f\x92\x41\x46\x12\x11ListNotifications\x1a\x31Retrieves notifications using an optional filter.\x82\xd3\xe4\x93\x02\x17\x12\x15/api/v1/notifications\x12\xc6\x02\n\x18\x42\x61tchUpdateNotifications\x12\x36.sift.notifications.v1.BatchUpdateNotificationsRequest\x1a\x37.sift.notifications.v1.BatchUpdateNotificationsResponse\"\xb8\x01\x92\x41\x88\x01\x12\x18\x42\x61tchUpdateNotifications\x1alBatch updates a list of notifications using the list of fields specified in their respective `update_mask`s.\x82\xd3\xe4\x93\x02&\"!/api/v1/notifications:batchUpdate:\x01*\x1a\x44\x92\x41\x41\x12?Service to programmatically interact with in-app notifications.B\xc0\x01\n\x19\x63om.sift.notifications.v1B\x12NotificationsProtoP\x01\xa2\x02\x03SNX\xaa\x02\x15Sift.Notifications.V1\xca\x02\x15Sift\\Notifications\\V1\xe2\x02!Sift\\Notifications\\V1\\GPBMetadata\xea\x02\x17Sift::Notifications::V1\x92\x41\x18\x12\x16\n\x14Notification Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -46,7 +46,7 @@ _globals['_NOTIFICATIONSERVICE'].methods_by_name['BatchUpdateNotifications']._loaded_options = None _globals['_NOTIFICATIONSERVICE'].methods_by_name['BatchUpdateNotifications']._serialized_options = b'\222A\210\001\022\030BatchUpdateNotifications\032lBatch updates a list of notifications using the list of fields specified in their respective `update_mask`s.\202\323\344\223\002&\"!/api/v1/notifications:batchUpdate:\001*' _globals['_NOTIFICATIONKIND']._serialized_start=1482 - _globals['_NOTIFICATIONKIND']._serialized_end=1752 + _globals['_NOTIFICATIONKIND']._serialized_end=1788 _globals['_NOTIFICATION']._serialized_start=247 _globals['_NOTIFICATION']._serialized_end=804 _globals['_LISTNOTIFICATIONSREQUEST']._serialized_start=806 @@ -59,6 +59,6 @@ _globals['_UPDATENOTIFICATIONREQUEST']._serialized_end=1368 _globals['_BATCHUPDATENOTIFICATIONSRESPONSE']._serialized_start=1370 _globals['_BATCHUPDATENOTIFICATIONSRESPONSE']._serialized_end=1479 - _globals['_NOTIFICATIONSERVICE']._serialized_start=1755 - _globals['_NOTIFICATIONSERVICE']._serialized_end=2400 + _globals['_NOTIFICATIONSERVICE']._serialized_start=1791 + _globals['_NOTIFICATIONSERVICE']._serialized_end=2436 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/notifications/v1/notifications_pb2.pyi b/python/lib/sift/notifications/v1/notifications_pb2.pyi index 76da823d..cb81b8af 100644 --- a/python/lib/sift/notifications/v1/notifications_pb2.pyi +++ b/python/lib/sift/notifications/v1/notifications_pb2.pyi @@ -33,6 +33,7 @@ class _NotificationKindEnumTypeWrapper(google.protobuf.internal.enum_type_wrappe NOTIFICATION_KIND_MENTIONED_IN_ANNOTATION_COMMENT: _NotificationKind.ValueType # 3 NOTIFICATION_KIND_CONDITION_TRIGGERED: _NotificationKind.ValueType # 4 NOTIFICATION_KIND_ANNOTATION_STATE_CHANGED: _NotificationKind.ValueType # 5 + NOTIFICATION_KIND_REPORT_READY: _NotificationKind.ValueType # 6 class NotificationKind(_NotificationKind, metaclass=_NotificationKindEnumTypeWrapper): ... @@ -42,6 +43,7 @@ NOTIFICATION_KIND_ANNOTATION_ASSIGNED: NotificationKind.ValueType # 2 NOTIFICATION_KIND_MENTIONED_IN_ANNOTATION_COMMENT: NotificationKind.ValueType # 3 NOTIFICATION_KIND_CONDITION_TRIGGERED: NotificationKind.ValueType # 4 NOTIFICATION_KIND_ANNOTATION_STATE_CHANGED: NotificationKind.ValueType # 5 +NOTIFICATION_KIND_REPORT_READY: NotificationKind.ValueType # 6 global___NotificationKind = NotificationKind @typing.final diff --git a/python/lib/sift/report_templates/v1/report_templates_pb2.py b/python/lib/sift/report_templates/v1/report_templates_pb2.py index dd6a3fa1..3691696a 100644 --- a/python/lib/sift/report_templates/v1/report_templates_pb2.py +++ b/python/lib/sift/report_templates/v1/report_templates_pb2.py @@ -14,11 +14,12 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/sift/report_templates/v1/report_templates.proto\x12\x18sift.report_templates.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xda\x05\n\x0eReportTemplate\x12\x31\n\x12report_template_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10reportTemplateId\x12,\n\x0forganization_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\'\n\nclient_key\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00R\tclientKey\x88\x01\x01\x12\x17\n\x04name\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x04name\x12*\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01R\x0b\x64\x65scription\x88\x01\x01\x12I\n\rarchived_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02R\x0c\x61rchivedDate\x88\x01\x01\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12G\n\x05rules\x18\x0b \x03(\x0b\x32,.sift.report_templates.v1.ReportTemplateRuleB\x03\xe0\x41\x02R\x05rules\x12\x44\n\x04tags\x18\x0c \x03(\x0b\x32+.sift.report_templates.v1.ReportTemplateTagB\x03\xe0\x41\x02R\x04tagsB\r\n\x0b_client_keyB\x0e\n\x0c_descriptionB\x10\n\x0e_archived_date\"\x94\x01\n\x12ReportTemplateRule\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12+\n\x0frule_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\x12\x33\n\x13rule_version_number\x18\x03 \x01(\rB\x03\xe0\x41\x02R\x11ruleVersionNumber\"3\n\x11ReportTemplateTag\x12\x1e\n\x08tag_name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07tagName\"\x9f\x01\n\x18GetReportTemplateRequest\x12\x31\n\x12report_template_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x10reportTemplateId\x12\"\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tclientKey\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"s\n\x19GetReportTemplateResponse\x12V\n\x0freport_template\x18\x01 \x01(\x0b\x32(.sift.report_templates.v1.ReportTemplateB\x03\xe0\x41\x02R\x0ereportTemplate\"\xe0\x03\n\x1b\x43reateReportTemplateRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12\'\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01R\tclientKey\x88\x01\x01\x12*\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x0b\x64\x65scription\x88\x01\x01\x12 \n\ttag_names\x18\x04 \x03(\tB\x03\xe0\x41\x02R\x08tagNames\x12,\n\x0forganization_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12^\n\x08rule_ids\x18\x07 \x01(\x0b\x32<.sift.report_templates.v1.CreateReportTemplateRequestRuleIdsB\x03\xe0\x41\x01H\x00R\x07ruleIds\x12p\n\x10rule_client_keys\x18\x08 \x01(\x0b\x32?.sift.report_templates.v1.CreateReportTemplateRequestClientKeysB\x03\xe0\x41\x01H\x00R\x0eruleClientKeysB\x12\n\x10rule_identifiersB\r\n\x0b_client_keyB\x0e\n\x0c_description\"D\n\"CreateReportTemplateRequestRuleIds\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x07ruleIds\"V\n%CreateReportTemplateRequestClientKeys\x12-\n\x10rule_client_keys\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x0eruleClientKeys\"v\n\x1c\x43reateReportTemplateResponse\x12V\n\x0freport_template\x18\x01 \x01(\x0b\x32(.sift.report_templates.v1.ReportTemplateB\x03\xe0\x41\x02R\x0ereportTemplate2\xa7\x04\n\x15ReportTemplateService\x12\xac\x02\n\x11GetReportTemplate\x12\x32.sift.report_templates.v1.GetReportTemplateRequest\x1a\x33.sift.report_templates.v1.GetReportTemplateResponse\"\xad\x01\x92\x41\x30\x12\x11GetReportTemplate\x1a\x1bRetrieve a report template.\x82\xd3\xe4\x93\x02t\x12-/api/v1/report-templates/{report_template_id}ZC\x12\x41/v1/organizations/{organization_id}/report_templates/{client_key}\x12\xde\x01\n\x14\x43reateReportTemplate\x12\x35.sift.report_templates.v1.CreateReportTemplateRequest\x1a\x36.sift.report_templates.v1.CreateReportTemplateResponse\"W\x92\x41\x31\x12\x14InsertReportTemplate\x1a\x19\x43reate a report template.\x82\xd3\xe4\x93\x02\x1d\"\x18/api/v1/report-templates:\x01*B\xcf\x01\n\x1c\x63om.sift.report_templates.v1B\x14ReportTemplatesProtoP\x01\xa2\x02\x03SRX\xaa\x02\x17Sift.ReportTemplates.V1\xca\x02\x17Sift\\ReportTemplates\\V1\xe2\x02#Sift\\ReportTemplates\\V1\\GPBMetadata\xea\x02\x19Sift::ReportTemplates::V1\x92\x41\x1a\x12\x18\n\x16ReportTemplate serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/sift/report_templates/v1/report_templates.proto\x12\x18sift.report_templates.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xda\x05\n\x0eReportTemplate\x12\x31\n\x12report_template_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10reportTemplateId\x12,\n\x0forganization_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\'\n\nclient_key\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00R\tclientKey\x88\x01\x01\x12\x17\n\x04name\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x04name\x12*\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01R\x0b\x64\x65scription\x88\x01\x01\x12I\n\rarchived_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02R\x0c\x61rchivedDate\x88\x01\x01\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12G\n\x05rules\x18\x0b \x03(\x0b\x32,.sift.report_templates.v1.ReportTemplateRuleB\x03\xe0\x41\x02R\x05rules\x12\x44\n\x04tags\x18\x0c \x03(\x0b\x32+.sift.report_templates.v1.ReportTemplateTagB\x03\xe0\x41\x02R\x04tagsB\r\n\x0b_client_keyB\x0e\n\x0c_descriptionB\x10\n\x0e_archived_date\"\xb8\x01\n\x12ReportTemplateRule\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12+\n\x0frule_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\x12\x33\n\x13rule_version_number\x18\x03 \x01(\rB\x03\xe0\x41\x02R\x11ruleVersionNumber\x12\"\n\nclient_key\x18\x04 \x01(\tB\x03\xe0\x41\x01R\tclientKey\"3\n\x11ReportTemplateTag\x12\x1e\n\x08tag_name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07tagName\"\x9f\x01\n\x18GetReportTemplateRequest\x12\x31\n\x12report_template_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x10reportTemplateId\x12\"\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tclientKey\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"s\n\x19GetReportTemplateResponse\x12V\n\x0freport_template\x18\x01 \x01(\x0b\x32(.sift.report_templates.v1.ReportTemplateB\x03\xe0\x41\x02R\x0ereportTemplate\"\xe0\x03\n\x1b\x43reateReportTemplateRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12\'\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01R\tclientKey\x88\x01\x01\x12*\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x0b\x64\x65scription\x88\x01\x01\x12 \n\ttag_names\x18\x04 \x03(\tB\x03\xe0\x41\x02R\x08tagNames\x12,\n\x0forganization_id\x18\x06 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\x12^\n\x08rule_ids\x18\x07 \x01(\x0b\x32<.sift.report_templates.v1.CreateReportTemplateRequestRuleIdsB\x03\xe0\x41\x01H\x00R\x07ruleIds\x12p\n\x10rule_client_keys\x18\x08 \x01(\x0b\x32?.sift.report_templates.v1.CreateReportTemplateRequestClientKeysB\x03\xe0\x41\x01H\x00R\x0eruleClientKeysB\x12\n\x10rule_identifiersB\r\n\x0b_client_keyB\x0e\n\x0c_description\"D\n\"CreateReportTemplateRequestRuleIds\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x07ruleIds\"V\n%CreateReportTemplateRequestClientKeys\x12-\n\x10rule_client_keys\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x0eruleClientKeys\"v\n\x1c\x43reateReportTemplateResponse\x12V\n\x0freport_template\x18\x01 \x01(\x0b\x32(.sift.report_templates.v1.ReportTemplateB\x03\xe0\x41\x02R\x0ereportTemplate\"\xdd\x01\n\x1aListReportTemplatesRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\x12.\n\x10include_archived\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01R\x0fincludeArchived\"\x9a\x01\n\x1bListReportTemplatesResponse\x12S\n\x10report_templates\x18\x01 \x03(\x0b\x32(.sift.report_templates.v1.ReportTemplateR\x0freportTemplates\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xb7\x01\n\x1bUpdateReportTemplateRequest\x12V\n\x0freport_template\x18\x01 \x01(\x0b\x32(.sift.report_templates.v1.ReportTemplateB\x03\xe0\x41\x02R\x0ereportTemplate\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"v\n\x1cUpdateReportTemplateResponse\x12V\n\x0freport_template\x18\x01 \x01(\x0b\x32(.sift.report_templates.v1.ReportTemplateB\x03\xe0\x41\x02R\x0ereportTemplate2\x9f\x08\n\x15ReportTemplateService\x12\xac\x02\n\x11GetReportTemplate\x12\x32.sift.report_templates.v1.GetReportTemplateRequest\x1a\x33.sift.report_templates.v1.GetReportTemplateResponse\"\xad\x01\x92\x41\x30\x12\x11GetReportTemplate\x1a\x1bRetrieve a report template.\x82\xd3\xe4\x93\x02t\x12-/api/v1/report-templates/{report_template_id}ZC\x12\x41/v1/organizations/{organization_id}/report_templates/{client_key}\x12\xde\x01\n\x14\x43reateReportTemplate\x12\x35.sift.report_templates.v1.CreateReportTemplateRequest\x1a\x36.sift.report_templates.v1.CreateReportTemplateResponse\"W\x92\x41\x31\x12\x14\x43reateReportTemplate\x1a\x19\x43reate a report template.\x82\xd3\xe4\x93\x02\x1d\"\x18/api/v1/report-templates:\x01*\x12\xd4\x01\n\x13ListReportTemplates\x12\x34.sift.report_templates.v1.ListReportTemplatesRequest\x1a\x35.sift.report_templates.v1.ListReportTemplatesResponse\"P\x92\x41-\x12\x13ListReportTemplates\x1a\x16List report templates.\x82\xd3\xe4\x93\x02\x1a\x12\x18/api/v1/report-templates\x12\x9e\x02\n\x14UpdateReportTemplate\x12\x35.sift.report_templates.v1.UpdateReportTemplateRequest\x1a\x36.sift.report_templates.v1.UpdateReportTemplateResponse\"\x96\x01\x92\x41p\x12\x14UpdateReportTemplate\x1aXUpdates an existing report template using the list of fields specified in `update_mask`.\x82\xd3\xe4\x93\x02\x1d\x32\x18/api/v1/report-templates:\x01*B\xcf\x01\n\x1c\x63om.sift.report_templates.v1B\x14ReportTemplatesProtoP\x01\xa2\x02\x03SRX\xaa\x02\x17Sift.ReportTemplates.V1\xca\x02\x17Sift\\ReportTemplates\\V1\xe2\x02#Sift\\ReportTemplates\\V1\\GPBMetadata\xea\x02\x19Sift::ReportTemplates::V1\x92\x41\x1a\x12\x18\n\x16ReportTemplate serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -56,6 +57,8 @@ _globals['_REPORTTEMPLATERULE'].fields_by_name['rule_version_id']._serialized_options = b'\340A\002' _globals['_REPORTTEMPLATERULE'].fields_by_name['rule_version_number']._loaded_options = None _globals['_REPORTTEMPLATERULE'].fields_by_name['rule_version_number']._serialized_options = b'\340A\002' + _globals['_REPORTTEMPLATERULE'].fields_by_name['client_key']._loaded_options = None + _globals['_REPORTTEMPLATERULE'].fields_by_name['client_key']._serialized_options = b'\340A\001' _globals['_REPORTTEMPLATETAG'].fields_by_name['tag_name']._loaded_options = None _globals['_REPORTTEMPLATETAG'].fields_by_name['tag_name']._serialized_options = b'\340A\002' _globals['_GETREPORTTEMPLATEREQUEST'].fields_by_name['report_template_id']._loaded_options = None @@ -75,7 +78,7 @@ _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['tag_names']._loaded_options = None _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['tag_names']._serialized_options = b'\340A\002' _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['organization_id']._loaded_options = None - _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['rule_ids']._loaded_options = None _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['rule_ids']._serialized_options = b'\340A\001' _globals['_CREATEREPORTTEMPLATEREQUEST'].fields_by_name['rule_client_keys']._loaded_options = None @@ -86,28 +89,56 @@ _globals['_CREATEREPORTTEMPLATEREQUESTCLIENTKEYS'].fields_by_name['rule_client_keys']._serialized_options = b'\340A\002' _globals['_CREATEREPORTTEMPLATERESPONSE'].fields_by_name['report_template']._loaded_options = None _globals['_CREATEREPORTTEMPLATERESPONSE'].fields_by_name['report_template']._serialized_options = b'\340A\002' + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['page_size']._loaded_options = None + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['page_size']._serialized_options = b'\340A\001' + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['page_token']._loaded_options = None + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['page_token']._serialized_options = b'\340A\001' + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['filter']._loaded_options = None + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['filter']._serialized_options = b'\340A\001' + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['include_archived']._loaded_options = None + _globals['_LISTREPORTTEMPLATESREQUEST'].fields_by_name['include_archived']._serialized_options = b'\340A\001' + _globals['_UPDATEREPORTTEMPLATEREQUEST'].fields_by_name['report_template']._loaded_options = None + _globals['_UPDATEREPORTTEMPLATEREQUEST'].fields_by_name['report_template']._serialized_options = b'\340A\002' + _globals['_UPDATEREPORTTEMPLATEREQUEST'].fields_by_name['update_mask']._loaded_options = None + _globals['_UPDATEREPORTTEMPLATEREQUEST'].fields_by_name['update_mask']._serialized_options = b'\340A\002' + _globals['_UPDATEREPORTTEMPLATERESPONSE'].fields_by_name['report_template']._loaded_options = None + _globals['_UPDATEREPORTTEMPLATERESPONSE'].fields_by_name['report_template']._serialized_options = b'\340A\002' _globals['_REPORTTEMPLATESERVICE'].methods_by_name['GetReportTemplate']._loaded_options = None _globals['_REPORTTEMPLATESERVICE'].methods_by_name['GetReportTemplate']._serialized_options = b'\222A0\022\021GetReportTemplate\032\033Retrieve a report template.\202\323\344\223\002t\022-/api/v1/report-templates/{report_template_id}ZC\022A/v1/organizations/{organization_id}/report_templates/{client_key}' _globals['_REPORTTEMPLATESERVICE'].methods_by_name['CreateReportTemplate']._loaded_options = None - _globals['_REPORTTEMPLATESERVICE'].methods_by_name['CreateReportTemplate']._serialized_options = b'\222A1\022\024InsertReportTemplate\032\031Create a report template.\202\323\344\223\002\035\"\030/api/v1/report-templates:\001*' - _globals['_REPORTTEMPLATE']._serialized_start=222 - _globals['_REPORTTEMPLATE']._serialized_end=952 - _globals['_REPORTTEMPLATERULE']._serialized_start=955 - _globals['_REPORTTEMPLATERULE']._serialized_end=1103 - _globals['_REPORTTEMPLATETAG']._serialized_start=1105 - _globals['_REPORTTEMPLATETAG']._serialized_end=1156 - _globals['_GETREPORTTEMPLATEREQUEST']._serialized_start=1159 - _globals['_GETREPORTTEMPLATEREQUEST']._serialized_end=1318 - _globals['_GETREPORTTEMPLATERESPONSE']._serialized_start=1320 - _globals['_GETREPORTTEMPLATERESPONSE']._serialized_end=1435 - _globals['_CREATEREPORTTEMPLATEREQUEST']._serialized_start=1438 - _globals['_CREATEREPORTTEMPLATEREQUEST']._serialized_end=1918 - _globals['_CREATEREPORTTEMPLATEREQUESTRULEIDS']._serialized_start=1920 - _globals['_CREATEREPORTTEMPLATEREQUESTRULEIDS']._serialized_end=1988 - _globals['_CREATEREPORTTEMPLATEREQUESTCLIENTKEYS']._serialized_start=1990 - _globals['_CREATEREPORTTEMPLATEREQUESTCLIENTKEYS']._serialized_end=2076 - _globals['_CREATEREPORTTEMPLATERESPONSE']._serialized_start=2078 - _globals['_CREATEREPORTTEMPLATERESPONSE']._serialized_end=2196 - _globals['_REPORTTEMPLATESERVICE']._serialized_start=2199 - _globals['_REPORTTEMPLATESERVICE']._serialized_end=2750 + _globals['_REPORTTEMPLATESERVICE'].methods_by_name['CreateReportTemplate']._serialized_options = b'\222A1\022\024CreateReportTemplate\032\031Create a report template.\202\323\344\223\002\035\"\030/api/v1/report-templates:\001*' + _globals['_REPORTTEMPLATESERVICE'].methods_by_name['ListReportTemplates']._loaded_options = None + _globals['_REPORTTEMPLATESERVICE'].methods_by_name['ListReportTemplates']._serialized_options = b'\222A-\022\023ListReportTemplates\032\026List report templates.\202\323\344\223\002\032\022\030/api/v1/report-templates' + _globals['_REPORTTEMPLATESERVICE'].methods_by_name['UpdateReportTemplate']._loaded_options = None + _globals['_REPORTTEMPLATESERVICE'].methods_by_name['UpdateReportTemplate']._serialized_options = b'\222Ap\022\024UpdateReportTemplate\032XUpdates an existing report template using the list of fields specified in `update_mask`.\202\323\344\223\002\0352\030/api/v1/report-templates:\001*' + _globals['_REPORTTEMPLATE']._serialized_start=256 + _globals['_REPORTTEMPLATE']._serialized_end=986 + _globals['_REPORTTEMPLATERULE']._serialized_start=989 + _globals['_REPORTTEMPLATERULE']._serialized_end=1173 + _globals['_REPORTTEMPLATETAG']._serialized_start=1175 + _globals['_REPORTTEMPLATETAG']._serialized_end=1226 + _globals['_GETREPORTTEMPLATEREQUEST']._serialized_start=1229 + _globals['_GETREPORTTEMPLATEREQUEST']._serialized_end=1388 + _globals['_GETREPORTTEMPLATERESPONSE']._serialized_start=1390 + _globals['_GETREPORTTEMPLATERESPONSE']._serialized_end=1505 + _globals['_CREATEREPORTTEMPLATEREQUEST']._serialized_start=1508 + _globals['_CREATEREPORTTEMPLATEREQUEST']._serialized_end=1988 + _globals['_CREATEREPORTTEMPLATEREQUESTRULEIDS']._serialized_start=1990 + _globals['_CREATEREPORTTEMPLATEREQUESTRULEIDS']._serialized_end=2058 + _globals['_CREATEREPORTTEMPLATEREQUESTCLIENTKEYS']._serialized_start=2060 + _globals['_CREATEREPORTTEMPLATEREQUESTCLIENTKEYS']._serialized_end=2146 + _globals['_CREATEREPORTTEMPLATERESPONSE']._serialized_start=2148 + _globals['_CREATEREPORTTEMPLATERESPONSE']._serialized_end=2266 + _globals['_LISTREPORTTEMPLATESREQUEST']._serialized_start=2269 + _globals['_LISTREPORTTEMPLATESREQUEST']._serialized_end=2490 + _globals['_LISTREPORTTEMPLATESRESPONSE']._serialized_start=2493 + _globals['_LISTREPORTTEMPLATESRESPONSE']._serialized_end=2647 + _globals['_UPDATEREPORTTEMPLATEREQUEST']._serialized_start=2650 + _globals['_UPDATEREPORTTEMPLATEREQUEST']._serialized_end=2833 + _globals['_UPDATEREPORTTEMPLATERESPONSE']._serialized_start=2835 + _globals['_UPDATEREPORTTEMPLATERESPONSE']._serialized_end=2953 + _globals['_REPORTTEMPLATESERVICE']._serialized_start=2956 + _globals['_REPORTTEMPLATESERVICE']._serialized_end=4011 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/report_templates/v1/report_templates_pb2.pyi b/python/lib/sift/report_templates/v1/report_templates_pb2.pyi index 9c622c4e..85c4fa36 100644 --- a/python/lib/sift/report_templates/v1/report_templates_pb2.pyi +++ b/python/lib/sift/report_templates/v1/report_templates_pb2.pyi @@ -6,6 +6,7 @@ isort:skip_file import builtins import collections.abc import google.protobuf.descriptor +import google.protobuf.field_mask_pb2 import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.timestamp_pb2 @@ -80,17 +81,20 @@ class ReportTemplateRule(google.protobuf.message.Message): RULE_ID_FIELD_NUMBER: builtins.int RULE_VERSION_ID_FIELD_NUMBER: builtins.int RULE_VERSION_NUMBER_FIELD_NUMBER: builtins.int + CLIENT_KEY_FIELD_NUMBER: builtins.int rule_id: builtins.str rule_version_id: builtins.str rule_version_number: builtins.int + client_key: builtins.str def __init__( self, *, rule_id: builtins.str = ..., rule_version_id: builtins.str = ..., rule_version_number: builtins.int = ..., + client_key: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["rule_id", b"rule_id", "rule_version_id", b"rule_version_id", "rule_version_number", b"rule_version_number"]) -> None: ... + def ClearField(self, field_name: typing.Literal["client_key", b"client_key", "rule_id", b"rule_id", "rule_version_id", b"rule_version_id", "rule_version_number", b"rule_version_number"]) -> None: ... global___ReportTemplateRule = ReportTemplateRule @@ -251,3 +255,118 @@ class CreateReportTemplateResponse(google.protobuf.message.Message): def ClearField(self, field_name: typing.Literal["report_template", b"report_template"]) -> None: ... global___CreateReportTemplateResponse = CreateReportTemplateResponse + +@typing.final +class ListReportTemplatesRequest(google.protobuf.message.Message): + """The request for a call to `ReportTemplateService_ListReportTemplates` to retrieve report templates.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + FILTER_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int + INCLUDE_ARCHIVED_FIELD_NUMBER: builtins.int + page_size: builtins.int + """The maximum number of report templates to return. The service may return fewer than this value. + If unspecified, at most 50 report templates will be returned. The maximum value is 1000; values above + 1000 will be coerced to 1000. Optional. + """ + page_token: builtins.str + """A page token, received from a previous `ListReportTemplates` call. + Provide this to retrieve the subsequent page. + When paginating, all other parameters provided to `ListReportTemplates` must match + the call that provided the page token. Optional. + """ + filter: builtins.str + """A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. + Available fields to filter by are `report_template_id`, `client_key`, and `name`. + For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). + For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#report_templates). Optional. + """ + organization_id: builtins.str + """This field is only required if your user belongs to multiple organizations.""" + include_archived: builtins.bool + """If `true` then archived report templates will be included in the query. Defaults to `false`.""" + def __init__( + self, + *, + page_size: builtins.int = ..., + page_token: builtins.str = ..., + filter: builtins.str = ..., + organization_id: builtins.str = ..., + include_archived: builtins.bool = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["filter", b"filter", "include_archived", b"include_archived", "organization_id", b"organization_id", "page_size", b"page_size", "page_token", b"page_token"]) -> None: ... + +global___ListReportTemplatesRequest = ListReportTemplatesRequest + +@typing.final +class ListReportTemplatesResponse(google.protobuf.message.Message): + """The response of a call to `ReportTemplateService_ListReportTemplatesResponse`.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_TEMPLATES_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + @property + def report_templates(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ReportTemplate]: ... + def __init__( + self, + *, + report_templates: collections.abc.Iterable[global___ReportTemplate] | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["next_page_token", b"next_page_token", "report_templates", b"report_templates"]) -> None: ... + +global___ListReportTemplatesResponse = ListReportTemplatesResponse + +@typing.final +class UpdateReportTemplateRequest(google.protobuf.message.Message): + """The request for a call to `ReportTemplateService_UpdateReportTemplate` to update a report template. When updating + tags or rules, the update will perform a full replace. Additionally, when updating rules, only the rule ID or the rule client key + is required, but it is okay to provide both. If some rules contain only client keys and others only rule IDs, they will be consolidated. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_TEMPLATE_FIELD_NUMBER: builtins.int + UPDATE_MASK_FIELD_NUMBER: builtins.int + @property + def report_template(self) -> global___ReportTemplate: + """The report template to update.""" + + @property + def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: + """The list of fields to be updated. The fields available to be updated are `name`, `archived_date`, `description`, `tags`, and `rules`.""" + + def __init__( + self, + *, + report_template: global___ReportTemplate | None = ..., + update_mask: google.protobuf.field_mask_pb2.FieldMask | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["report_template", b"report_template", "update_mask", b"update_mask"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["report_template", b"report_template", "update_mask", b"update_mask"]) -> None: ... + +global___UpdateReportTemplateRequest = UpdateReportTemplateRequest + +@typing.final +class UpdateReportTemplateResponse(google.protobuf.message.Message): + """The response of a call to `ReportTemplateService_UpdateReportTemplate`.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_TEMPLATE_FIELD_NUMBER: builtins.int + @property + def report_template(self) -> global___ReportTemplate: ... + def __init__( + self, + *, + report_template: global___ReportTemplate | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["report_template", b"report_template"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["report_template", b"report_template"]) -> None: ... + +global___UpdateReportTemplateResponse = UpdateReportTemplateResponse diff --git a/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.py b/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.py index ab619522..b10ccf2d 100644 --- a/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.py +++ b/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.py @@ -24,6 +24,16 @@ def __init__(self, channel): request_serializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.CreateReportTemplateRequest.SerializeToString, response_deserializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.CreateReportTemplateResponse.FromString, ) + self.ListReportTemplates = channel.unary_unary( + '/sift.report_templates.v1.ReportTemplateService/ListReportTemplates', + request_serializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.ListReportTemplatesRequest.SerializeToString, + response_deserializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.ListReportTemplatesResponse.FromString, + ) + self.UpdateReportTemplate = channel.unary_unary( + '/sift.report_templates.v1.ReportTemplateService/UpdateReportTemplate', + request_serializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.UpdateReportTemplateRequest.SerializeToString, + response_deserializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.UpdateReportTemplateResponse.FromString, + ) class ReportTemplateServiceServicer(object): @@ -43,6 +53,20 @@ def CreateReportTemplate(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ListReportTemplates(self, request, context): + """List report templates. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateReportTemplate(self, request, context): + """Updates an existing report template using the list of fields specified in `update_mask`. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ReportTemplateServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -56,6 +80,16 @@ def add_ReportTemplateServiceServicer_to_server(servicer, server): request_deserializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.CreateReportTemplateRequest.FromString, response_serializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.CreateReportTemplateResponse.SerializeToString, ), + 'ListReportTemplates': grpc.unary_unary_rpc_method_handler( + servicer.ListReportTemplates, + request_deserializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.ListReportTemplatesRequest.FromString, + response_serializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.ListReportTemplatesResponse.SerializeToString, + ), + 'UpdateReportTemplate': grpc.unary_unary_rpc_method_handler( + servicer.UpdateReportTemplate, + request_deserializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.UpdateReportTemplateRequest.FromString, + response_serializer=sift_dot_report__templates_dot_v1_dot_report__templates__pb2.UpdateReportTemplateResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'sift.report_templates.v1.ReportTemplateService', rpc_method_handlers) @@ -99,3 +133,37 @@ def CreateReportTemplate(request, sift_dot_report__templates_dot_v1_dot_report__templates__pb2.CreateReportTemplateResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListReportTemplates(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.report_templates.v1.ReportTemplateService/ListReportTemplates', + sift_dot_report__templates_dot_v1_dot_report__templates__pb2.ListReportTemplatesRequest.SerializeToString, + sift_dot_report__templates_dot_v1_dot_report__templates__pb2.ListReportTemplatesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateReportTemplate(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.report_templates.v1.ReportTemplateService/UpdateReportTemplate', + sift_dot_report__templates_dot_v1_dot_report__templates__pb2.UpdateReportTemplateRequest.SerializeToString, + sift_dot_report__templates_dot_v1_dot_report__templates__pb2.UpdateReportTemplateResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.pyi b/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.pyi index 45ea1add..c6d9cee5 100644 --- a/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.pyi +++ b/python/lib/sift/report_templates/v1/report_templates_pb2_grpc.pyi @@ -31,6 +31,18 @@ class ReportTemplateServiceStub: ] """Create a report template.""" + ListReportTemplates: grpc.UnaryUnaryMultiCallable[ + sift.report_templates.v1.report_templates_pb2.ListReportTemplatesRequest, + sift.report_templates.v1.report_templates_pb2.ListReportTemplatesResponse, + ] + """List report templates.""" + + UpdateReportTemplate: grpc.UnaryUnaryMultiCallable[ + sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateRequest, + sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateResponse, + ] + """Updates an existing report template using the list of fields specified in `update_mask`.""" + class ReportTemplateServiceAsyncStub: GetReportTemplate: grpc.aio.UnaryUnaryMultiCallable[ sift.report_templates.v1.report_templates_pb2.GetReportTemplateRequest, @@ -44,6 +56,18 @@ class ReportTemplateServiceAsyncStub: ] """Create a report template.""" + ListReportTemplates: grpc.aio.UnaryUnaryMultiCallable[ + sift.report_templates.v1.report_templates_pb2.ListReportTemplatesRequest, + sift.report_templates.v1.report_templates_pb2.ListReportTemplatesResponse, + ] + """List report templates.""" + + UpdateReportTemplate: grpc.aio.UnaryUnaryMultiCallable[ + sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateRequest, + sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateResponse, + ] + """Updates an existing report template using the list of fields specified in `update_mask`.""" + class ReportTemplateServiceServicer(metaclass=abc.ABCMeta): @abc.abstractmethod def GetReportTemplate( @@ -61,4 +85,20 @@ class ReportTemplateServiceServicer(metaclass=abc.ABCMeta): ) -> typing.Union[sift.report_templates.v1.report_templates_pb2.CreateReportTemplateResponse, collections.abc.Awaitable[sift.report_templates.v1.report_templates_pb2.CreateReportTemplateResponse]]: """Create a report template.""" + @abc.abstractmethod + def ListReportTemplates( + self, + request: sift.report_templates.v1.report_templates_pb2.ListReportTemplatesRequest, + context: _ServicerContext, + ) -> typing.Union[sift.report_templates.v1.report_templates_pb2.ListReportTemplatesResponse, collections.abc.Awaitable[sift.report_templates.v1.report_templates_pb2.ListReportTemplatesResponse]]: + """List report templates.""" + + @abc.abstractmethod + def UpdateReportTemplate( + self, + request: sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateRequest, + context: _ServicerContext, + ) -> typing.Union[sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateResponse, collections.abc.Awaitable[sift.report_templates.v1.report_templates_pb2.UpdateReportTemplateResponse]]: + """Updates an existing report template using the list of fields specified in `update_mask`.""" + def add_ReportTemplateServiceServicer_to_server(servicer: ReportTemplateServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ... diff --git a/python/lib/sift/reports/__init__.py b/python/lib/sift/reports/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/lib/sift/reports/v1/__init__.py b/python/lib/sift/reports/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/lib/sift/reports/v1/reports_pb2.py b/python/lib/sift/reports/v1/reports_pb2.py new file mode 100644 index 00000000..203683e7 --- /dev/null +++ b/python/lib/sift/reports/v1/reports_pb2.py @@ -0,0 +1,189 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: sift/reports/v1/reports.proto +# Protobuf Python Version: 5.26.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dsift/reports/v1/reports.proto\x12\x0fsift.reports.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xbc\x05\n\x06Report\x12 \n\treport_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x08reportId\x12\x31\n\x12report_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x01R\x10reportTemplateId\x12\x1a\n\x06run_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x05runId\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x17\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x04name\x12*\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00R\x0b\x64\x65scription\x88\x01\x01\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x45\n\tsummaries\x18\x0b \x03(\x0b\x32\".sift.reports.v1.ReportRuleSummaryB\x03\xe0\x41\x02R\tsummaries\x12\x33\n\x04tags\x18\x0c \x03(\x0b\x32\x1a.sift.reports.v1.ReportTagB\x03\xe0\x41\x02R\x04tags\x12\x39\n\x14rerun_from_report_id\x18\r \x01(\tB\x03\xe0\x41\x01H\x01R\x11rerunFromReportId\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x17\n\x15_rerun_from_report_id\"\x82\x05\n\x11ReportRuleSummary\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12+\n\x0frule_client_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\rruleClientKey\x12+\n\x0frule_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\x12\x33\n\x13rule_version_number\x18\x04 \x01(\rB\x03\xe0\x41\x02R\x11ruleVersionNumber\x12\x38\n\x16report_rule_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x13reportRuleVersionId\x12\x1e\n\x08num_open\x18\x06 \x01(\rB\x03\xe0\x41\x02R\x07numOpen\x12\"\n\nnum_failed\x18\x07 \x01(\rB\x03\xe0\x41\x02R\tnumFailed\x12\"\n\nnum_passed\x18\x08 \x01(\rB\x03\xe0\x41\x02R\tnumPassed\x12>\n\x06status\x18\t \x01(\x0e\x32!.sift.reports.v1.ReportRuleStatusB\x03\xe0\x41\x02R\x06status\x12T\n\x0estatus_details\x18\n \x01(\x0b\x32(.sift.reports.v1.ReportRuleStatusDetailsB\x03\xe0\x41\x02R\rstatusDetails\x12\x42\n\x0c\x63reated_date\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\"+\n\tReportTag\x12\x1e\n\x08tag_name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07tagName\"\xcf\x02\n\x17ReportRuleStatusDetails\x12K\n\x07\x63reated\x18\x01 \x01(\x0b\x32/.sift.reports.v1.ReportRuleStatusDetailsCreatedH\x00R\x07\x63reated\x12\x42\n\x04live\x18\x02 \x01(\x0b\x32,.sift.reports.v1.ReportRuleStatusDetailsLiveH\x00R\x04live\x12N\n\x08\x66inished\x18\x03 \x01(\x0b\x32\x30.sift.reports.v1.ReportRuleStatusDetailsFinishedH\x00R\x08\x66inished\x12H\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32..sift.reports.v1.ReportRuleStatusDetailsFailedH\x00R\x06\x66\x61iledB\t\n\x07\x64\x65tails\" \n\x1eReportRuleStatusDetailsCreated\"\x1d\n\x1bReportRuleStatusDetailsLive\"!\n\x1fReportRuleStatusDetailsFinished\"I\n\x1dReportRuleStatusDetailsFailed\x12(\n\rerror_message\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0c\x65rrorMessage\"\x90\x03\n\x13\x43reateReportRequest\x12\x8b\x01\n#report_from_report_template_request\x18\x01 \x01(\x0b\x32\x36.sift.reports.v1.CreateReportFromReportTemplateRequestB\x03\xe0\x41\x01H\x00R\x1freportFromReportTemplateRequest\x12o\n\x19report_from_rules_request\x18\x02 \x01(\x0b\x32-.sift.reports.v1.CreateReportFromRulesRequestB\x03\xe0\x41\x01H\x00R\x16reportFromRulesRequest\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x1a\n\x06run_id\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x05runId\x12\x1c\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x01R\x04name\x88\x01\x01\x42\t\n\x07requestB\x07\n\x05_name\"L\n\x14\x43reateReportResponse\x12\x34\n\x06report\x18\x01 \x01(\x0b\x32\x17.sift.reports.v1.ReportB\x03\xe0\x41\x02R\x06report\"Z\n%CreateReportFromReportTemplateRequest\x12\x31\n\x12report_template_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10reportTemplateId\"\xd9\x02\n\x1c\x43reateReportFromRulesRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12*\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01R\x0b\x64\x65scription\x88\x01\x01\x12 \n\ttag_names\x18\x03 \x03(\tB\x03\xe0\x41\x02R\x08tagNames\x12M\n\x08rule_ids\x18\x04 \x01(\x0b\x32+.sift.reports.v1.CreateReportRequestRuleIdsB\x03\xe0\x41\x01H\x00R\x07ruleIds\x12_\n\x10rule_client_keys\x18\x05 \x01(\x0b\x32..sift.reports.v1.CreateReportRequestClientKeysB\x03\xe0\x41\x01H\x00R\x0eruleClientKeysB\x12\n\x10rule_identifiersB\x0e\n\x0c_description\"<\n\x1a\x43reateReportRequestRuleIds\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x07ruleIds\"N\n\x1d\x43reateReportRequestClientKeys\x12-\n\x10rule_client_keys\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x0eruleClientKeys\"4\n\x10GetReportRequest\x12 \n\treport_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x08reportId\"I\n\x11GetReportResponse\x12\x34\n\x06report\x18\x01 \x01(\x0b\x32\x17.sift.reports.v1.ReportB\x03\xe0\x41\x02R\x06report\"\xa5\x01\n\x12ListReportsRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"p\n\x13ListReportsResponse\x12\x31\n\x07reports\x18\x01 \x03(\x0b\x32\x17.sift.reports.v1.ReportR\x07reports\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"6\n\x12RerunReportRequest\x12 \n\treport_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x08reportId\"S\n\x13RerunReportResponse\x12\x1a\n\x06job_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x05jobId\x12 \n\treport_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x08reportId\"7\n\x13\x43\x61ncelReportRequest\x12 \n\treport_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x08reportId\"\x16\n\x14\x43\x61ncelReportResponse*\xd4\x01\n\x10ReportRuleStatus\x12\"\n\x1eREPORT_RULE_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n\x1aREPORT_RULE_STATUS_CREATED\x10\x01\x12\x1b\n\x17REPORT_RULE_STATUS_LIVE\x10\x02\x12\x1f\n\x1bREPORT_RULE_STATUS_FINISHED\x10\x03\x12\x1d\n\x19REPORT_RULE_STATUS_FAILED\x10\x04\x12\x1f\n\x1bREPORT_RULE_STATUS_CANCELED\x10\x05\x32\xe7\x08\n\rReportService\x12\x99\x01\n\tGetReport\x12!.sift.reports.v1.GetReportRequest\x1a\".sift.reports.v1.GetReportResponse\"E\x92\x41\x1f\x12\tGetReport\x1a\x12Retrieve a report.\x82\xd3\xe4\x93\x02\x1d\x12\x1b/api/v1/reports/{report_id}\x12\x9a\x01\n\x0c\x43reateReport\x12$.sift.reports.v1.CreateReportRequest\x1a%.sift.reports.v1.CreateReportResponse\"=\x92\x41 \x12\x0c\x43reateReport\x1a\x10\x43reate a report.\x82\xd3\xe4\x93\x02\x14\"\x0f/api/v1/reports:\x01*\x12\x90\x01\n\x0bListReports\x12#.sift.reports.v1.ListReportsRequest\x1a$.sift.reports.v1.ListReportsResponse\"6\x92\x41\x1c\x12\x0bListReports\x1a\rList reports.\x82\xd3\xe4\x93\x02\x11\x12\x0f/api/v1/reports\x12\xc2\x02\n\x0bRerunReport\x12#.sift.reports.v1.RerunReportRequest\x1a$.sift.reports.v1.RerunReportResponse\"\xe7\x01\x92\x41\xba\x01\x12\x0bRerunReport\x1a\xaa\x01Rerunning a report will create a new report with the same rule versions and run as the original report and run the evaluation again using the most up-to-date set of data.\x82\xd3\xe4\x93\x02#\"!/api/v1/reports/{report_id}:rerun\x12\xc4\x02\n\x0c\x43\x61ncelReport\x12$.sift.reports.v1.CancelReportRequest\x1a%.sift.reports.v1.CancelReportResponse\"\xe6\x01\x92\x41\xb8\x01\x12\x0c\x43\x61ncelReport\x1a\xa7\x01\x43\x61nceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been calculated up to the point of cancellation will be saved.\x82\xd3\xe4\x93\x02$\"\"/api/v1/reports/{report_id}:cancelB\x96\x01\n\x13\x63om.sift.reports.v1B\x0cReportsProtoP\x01\xa2\x02\x03SRX\xaa\x02\x0fSift.Reports.V1\xca\x02\x0fSift\\Reports\\V1\xe2\x02\x1bSift\\Reports\\V1\\GPBMetadata\xea\x02\x11Sift::Reports::V1\x92\x41\x12\x12\x10\n\x0eReport serviceb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sift.reports.v1.reports_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\023com.sift.reports.v1B\014ReportsProtoP\001\242\002\003SRX\252\002\017Sift.Reports.V1\312\002\017Sift\\Reports\\V1\342\002\033Sift\\Reports\\V1\\GPBMetadata\352\002\021Sift::Reports::V1\222A\022\022\020\n\016Report service' + _globals['_REPORT'].fields_by_name['report_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['report_id']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['report_template_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['report_template_id']._serialized_options = b'\340A\001' + _globals['_REPORT'].fields_by_name['run_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['run_id']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['organization_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['organization_id']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['name']._loaded_options = None + _globals['_REPORT'].fields_by_name['name']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['description']._loaded_options = None + _globals['_REPORT'].fields_by_name['description']._serialized_options = b'\340A\001' + _globals['_REPORT'].fields_by_name['created_by_user_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['created_by_user_id']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['modified_by_user_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['modified_by_user_id']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['created_date']._loaded_options = None + _globals['_REPORT'].fields_by_name['created_date']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['modified_date']._loaded_options = None + _globals['_REPORT'].fields_by_name['modified_date']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['summaries']._loaded_options = None + _globals['_REPORT'].fields_by_name['summaries']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['tags']._loaded_options = None + _globals['_REPORT'].fields_by_name['tags']._serialized_options = b'\340A\002' + _globals['_REPORT'].fields_by_name['rerun_from_report_id']._loaded_options = None + _globals['_REPORT'].fields_by_name['rerun_from_report_id']._serialized_options = b'\340A\001' + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_id']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_id']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_client_key']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_client_key']._serialized_options = b'\340A\001' + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_version_id']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_version_id']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_version_number']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['rule_version_number']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['report_rule_version_id']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['report_rule_version_id']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['num_open']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['num_open']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['num_failed']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['num_failed']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['num_passed']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['num_passed']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['status']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['status']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['status_details']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['status_details']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['created_date']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['created_date']._serialized_options = b'\340A\002' + _globals['_REPORTRULESUMMARY'].fields_by_name['modified_date']._loaded_options = None + _globals['_REPORTRULESUMMARY'].fields_by_name['modified_date']._serialized_options = b'\340A\002' + _globals['_REPORTTAG'].fields_by_name['tag_name']._loaded_options = None + _globals['_REPORTTAG'].fields_by_name['tag_name']._serialized_options = b'\340A\002' + _globals['_REPORTRULESTATUSDETAILSFAILED'].fields_by_name['error_message']._loaded_options = None + _globals['_REPORTRULESTATUSDETAILSFAILED'].fields_by_name['error_message']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTREQUEST'].fields_by_name['report_from_report_template_request']._loaded_options = None + _globals['_CREATEREPORTREQUEST'].fields_by_name['report_from_report_template_request']._serialized_options = b'\340A\001' + _globals['_CREATEREPORTREQUEST'].fields_by_name['report_from_rules_request']._loaded_options = None + _globals['_CREATEREPORTREQUEST'].fields_by_name['report_from_rules_request']._serialized_options = b'\340A\001' + _globals['_CREATEREPORTREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_CREATEREPORTREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTREQUEST'].fields_by_name['run_id']._loaded_options = None + _globals['_CREATEREPORTREQUEST'].fields_by_name['run_id']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTREQUEST'].fields_by_name['name']._loaded_options = None + _globals['_CREATEREPORTREQUEST'].fields_by_name['name']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTRESPONSE'].fields_by_name['report']._loaded_options = None + _globals['_CREATEREPORTRESPONSE'].fields_by_name['report']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTFROMREPORTTEMPLATEREQUEST'].fields_by_name['report_template_id']._loaded_options = None + _globals['_CREATEREPORTFROMREPORTTEMPLATEREQUEST'].fields_by_name['report_template_id']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['name']._loaded_options = None + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['name']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['description']._loaded_options = None + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['description']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['tag_names']._loaded_options = None + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['tag_names']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['rule_ids']._loaded_options = None + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['rule_ids']._serialized_options = b'\340A\001' + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['rule_client_keys']._loaded_options = None + _globals['_CREATEREPORTFROMRULESREQUEST'].fields_by_name['rule_client_keys']._serialized_options = b'\340A\001' + _globals['_CREATEREPORTREQUESTRULEIDS'].fields_by_name['rule_ids']._loaded_options = None + _globals['_CREATEREPORTREQUESTRULEIDS'].fields_by_name['rule_ids']._serialized_options = b'\340A\002' + _globals['_CREATEREPORTREQUESTCLIENTKEYS'].fields_by_name['rule_client_keys']._loaded_options = None + _globals['_CREATEREPORTREQUESTCLIENTKEYS'].fields_by_name['rule_client_keys']._serialized_options = b'\340A\002' + _globals['_GETREPORTREQUEST'].fields_by_name['report_id']._loaded_options = None + _globals['_GETREPORTREQUEST'].fields_by_name['report_id']._serialized_options = b'\340A\001' + _globals['_GETREPORTRESPONSE'].fields_by_name['report']._loaded_options = None + _globals['_GETREPORTRESPONSE'].fields_by_name['report']._serialized_options = b'\340A\002' + _globals['_LISTREPORTSREQUEST'].fields_by_name['page_size']._loaded_options = None + _globals['_LISTREPORTSREQUEST'].fields_by_name['page_size']._serialized_options = b'\340A\001' + _globals['_LISTREPORTSREQUEST'].fields_by_name['page_token']._loaded_options = None + _globals['_LISTREPORTSREQUEST'].fields_by_name['page_token']._serialized_options = b'\340A\001' + _globals['_LISTREPORTSREQUEST'].fields_by_name['filter']._loaded_options = None + _globals['_LISTREPORTSREQUEST'].fields_by_name['filter']._serialized_options = b'\340A\001' + _globals['_LISTREPORTSREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_LISTREPORTSREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' + _globals['_RERUNREPORTREQUEST'].fields_by_name['report_id']._loaded_options = None + _globals['_RERUNREPORTREQUEST'].fields_by_name['report_id']._serialized_options = b'\340A\002' + _globals['_RERUNREPORTRESPONSE'].fields_by_name['job_id']._loaded_options = None + _globals['_RERUNREPORTRESPONSE'].fields_by_name['job_id']._serialized_options = b'\340A\002' + _globals['_RERUNREPORTRESPONSE'].fields_by_name['report_id']._loaded_options = None + _globals['_RERUNREPORTRESPONSE'].fields_by_name['report_id']._serialized_options = b'\340A\002' + _globals['_CANCELREPORTREQUEST'].fields_by_name['report_id']._loaded_options = None + _globals['_CANCELREPORTREQUEST'].fields_by_name['report_id']._serialized_options = b'\340A\002' + _globals['_REPORTSERVICE'].methods_by_name['GetReport']._loaded_options = None + _globals['_REPORTSERVICE'].methods_by_name['GetReport']._serialized_options = b'\222A\037\022\tGetReport\032\022Retrieve a report.\202\323\344\223\002\035\022\033/api/v1/reports/{report_id}' + _globals['_REPORTSERVICE'].methods_by_name['CreateReport']._loaded_options = None + _globals['_REPORTSERVICE'].methods_by_name['CreateReport']._serialized_options = b'\222A \022\014CreateReport\032\020Create a report.\202\323\344\223\002\024\"\017/api/v1/reports:\001*' + _globals['_REPORTSERVICE'].methods_by_name['ListReports']._loaded_options = None + _globals['_REPORTSERVICE'].methods_by_name['ListReports']._serialized_options = b'\222A\034\022\013ListReports\032\rList reports.\202\323\344\223\002\021\022\017/api/v1/reports' + _globals['_REPORTSERVICE'].methods_by_name['RerunReport']._loaded_options = None + _globals['_REPORTSERVICE'].methods_by_name['RerunReport']._serialized_options = b'\222A\272\001\022\013RerunReport\032\252\001Rerunning a report will create a new report with the same rule versions and run as the original report and run the evaluation again using the most up-to-date set of data.\202\323\344\223\002#\"!/api/v1/reports/{report_id}:rerun' + _globals['_REPORTSERVICE'].methods_by_name['CancelReport']._loaded_options = None + _globals['_REPORTSERVICE'].methods_by_name['CancelReport']._serialized_options = b'\222A\270\001\022\014CancelReport\032\247\001Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been calculated up to the point of cancellation will be saved.\202\323\344\223\002$\"\"/api/v1/reports/{report_id}:cancel' + _globals['_REPORTRULESTATUS']._serialized_start=3797 + _globals['_REPORTRULESTATUS']._serialized_end=4009 + _globals['_REPORT']._serialized_start=195 + _globals['_REPORT']._serialized_end=895 + _globals['_REPORTRULESUMMARY']._serialized_start=898 + _globals['_REPORTRULESUMMARY']._serialized_end=1540 + _globals['_REPORTTAG']._serialized_start=1542 + _globals['_REPORTTAG']._serialized_end=1585 + _globals['_REPORTRULESTATUSDETAILS']._serialized_start=1588 + _globals['_REPORTRULESTATUSDETAILS']._serialized_end=1923 + _globals['_REPORTRULESTATUSDETAILSCREATED']._serialized_start=1925 + _globals['_REPORTRULESTATUSDETAILSCREATED']._serialized_end=1957 + _globals['_REPORTRULESTATUSDETAILSLIVE']._serialized_start=1959 + _globals['_REPORTRULESTATUSDETAILSLIVE']._serialized_end=1988 + _globals['_REPORTRULESTATUSDETAILSFINISHED']._serialized_start=1990 + _globals['_REPORTRULESTATUSDETAILSFINISHED']._serialized_end=2023 + _globals['_REPORTRULESTATUSDETAILSFAILED']._serialized_start=2025 + _globals['_REPORTRULESTATUSDETAILSFAILED']._serialized_end=2098 + _globals['_CREATEREPORTREQUEST']._serialized_start=2101 + _globals['_CREATEREPORTREQUEST']._serialized_end=2501 + _globals['_CREATEREPORTRESPONSE']._serialized_start=2503 + _globals['_CREATEREPORTRESPONSE']._serialized_end=2579 + _globals['_CREATEREPORTFROMREPORTTEMPLATEREQUEST']._serialized_start=2581 + _globals['_CREATEREPORTFROMREPORTTEMPLATEREQUEST']._serialized_end=2671 + _globals['_CREATEREPORTFROMRULESREQUEST']._serialized_start=2674 + _globals['_CREATEREPORTFROMRULESREQUEST']._serialized_end=3019 + _globals['_CREATEREPORTREQUESTRULEIDS']._serialized_start=3021 + _globals['_CREATEREPORTREQUESTRULEIDS']._serialized_end=3081 + _globals['_CREATEREPORTREQUESTCLIENTKEYS']._serialized_start=3083 + _globals['_CREATEREPORTREQUESTCLIENTKEYS']._serialized_end=3161 + _globals['_GETREPORTREQUEST']._serialized_start=3163 + _globals['_GETREPORTREQUEST']._serialized_end=3215 + _globals['_GETREPORTRESPONSE']._serialized_start=3217 + _globals['_GETREPORTRESPONSE']._serialized_end=3290 + _globals['_LISTREPORTSREQUEST']._serialized_start=3293 + _globals['_LISTREPORTSREQUEST']._serialized_end=3458 + _globals['_LISTREPORTSRESPONSE']._serialized_start=3460 + _globals['_LISTREPORTSRESPONSE']._serialized_end=3572 + _globals['_RERUNREPORTREQUEST']._serialized_start=3574 + _globals['_RERUNREPORTREQUEST']._serialized_end=3628 + _globals['_RERUNREPORTRESPONSE']._serialized_start=3630 + _globals['_RERUNREPORTRESPONSE']._serialized_end=3713 + _globals['_CANCELREPORTREQUEST']._serialized_start=3715 + _globals['_CANCELREPORTREQUEST']._serialized_end=3770 + _globals['_CANCELREPORTRESPONSE']._serialized_start=3772 + _globals['_CANCELREPORTRESPONSE']._serialized_end=3794 + _globals['_REPORTSERVICE']._serialized_start=4012 + _globals['_REPORTSERVICE']._serialized_end=5139 +# @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/reports/v1/reports_pb2.pyi b/python/lib/sift/reports/v1/reports_pb2.pyi new file mode 100644 index 00000000..1ff35069 --- /dev/null +++ b/python/lib/sift/reports/v1/reports_pb2.pyi @@ -0,0 +1,550 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import google.protobuf.timestamp_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _ReportRuleStatus: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ReportRuleStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ReportRuleStatus.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + REPORT_RULE_STATUS_UNSPECIFIED: _ReportRuleStatus.ValueType # 0 + REPORT_RULE_STATUS_CREATED: _ReportRuleStatus.ValueType # 1 + REPORT_RULE_STATUS_LIVE: _ReportRuleStatus.ValueType # 2 + REPORT_RULE_STATUS_FINISHED: _ReportRuleStatus.ValueType # 3 + REPORT_RULE_STATUS_FAILED: _ReportRuleStatus.ValueType # 4 + REPORT_RULE_STATUS_CANCELED: _ReportRuleStatus.ValueType # 5 + +class ReportRuleStatus(_ReportRuleStatus, metaclass=_ReportRuleStatusEnumTypeWrapper): ... + +REPORT_RULE_STATUS_UNSPECIFIED: ReportRuleStatus.ValueType # 0 +REPORT_RULE_STATUS_CREATED: ReportRuleStatus.ValueType # 1 +REPORT_RULE_STATUS_LIVE: ReportRuleStatus.ValueType # 2 +REPORT_RULE_STATUS_FINISHED: ReportRuleStatus.ValueType # 3 +REPORT_RULE_STATUS_FAILED: ReportRuleStatus.ValueType # 4 +REPORT_RULE_STATUS_CANCELED: ReportRuleStatus.ValueType # 5 +global___ReportRuleStatus = ReportRuleStatus + +@typing.final +class Report(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_ID_FIELD_NUMBER: builtins.int + REPORT_TEMPLATE_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + CREATED_BY_USER_ID_FIELD_NUMBER: builtins.int + MODIFIED_BY_USER_ID_FIELD_NUMBER: builtins.int + CREATED_DATE_FIELD_NUMBER: builtins.int + MODIFIED_DATE_FIELD_NUMBER: builtins.int + SUMMARIES_FIELD_NUMBER: builtins.int + TAGS_FIELD_NUMBER: builtins.int + RERUN_FROM_REPORT_ID_FIELD_NUMBER: builtins.int + report_id: builtins.str + report_template_id: builtins.str + run_id: builtins.str + organization_id: builtins.str + name: builtins.str + description: builtins.str + created_by_user_id: builtins.str + modified_by_user_id: builtins.str + rerun_from_report_id: builtins.str + @property + def created_date(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def modified_date(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def summaries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ReportRuleSummary]: ... + @property + def tags(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ReportTag]: ... + def __init__( + self, + *, + report_id: builtins.str = ..., + report_template_id: builtins.str = ..., + run_id: builtins.str = ..., + organization_id: builtins.str = ..., + name: builtins.str = ..., + description: builtins.str | None = ..., + created_by_user_id: builtins.str = ..., + modified_by_user_id: builtins.str = ..., + created_date: google.protobuf.timestamp_pb2.Timestamp | None = ..., + modified_date: google.protobuf.timestamp_pb2.Timestamp | None = ..., + summaries: collections.abc.Iterable[global___ReportRuleSummary] | None = ..., + tags: collections.abc.Iterable[global___ReportTag] | None = ..., + rerun_from_report_id: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_description", b"_description", "_rerun_from_report_id", b"_rerun_from_report_id", "created_date", b"created_date", "description", b"description", "modified_date", b"modified_date", "rerun_from_report_id", b"rerun_from_report_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_description", b"_description", "_rerun_from_report_id", b"_rerun_from_report_id", "created_by_user_id", b"created_by_user_id", "created_date", b"created_date", "description", b"description", "modified_by_user_id", b"modified_by_user_id", "modified_date", b"modified_date", "name", b"name", "organization_id", b"organization_id", "report_id", b"report_id", "report_template_id", b"report_template_id", "rerun_from_report_id", b"rerun_from_report_id", "run_id", b"run_id", "summaries", b"summaries", "tags", b"tags"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_rerun_from_report_id", b"_rerun_from_report_id"]) -> typing.Literal["rerun_from_report_id"] | None: ... + +global___Report = Report + +@typing.final +class ReportRuleSummary(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RULE_ID_FIELD_NUMBER: builtins.int + RULE_CLIENT_KEY_FIELD_NUMBER: builtins.int + RULE_VERSION_ID_FIELD_NUMBER: builtins.int + RULE_VERSION_NUMBER_FIELD_NUMBER: builtins.int + REPORT_RULE_VERSION_ID_FIELD_NUMBER: builtins.int + NUM_OPEN_FIELD_NUMBER: builtins.int + NUM_FAILED_FIELD_NUMBER: builtins.int + NUM_PASSED_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + STATUS_DETAILS_FIELD_NUMBER: builtins.int + CREATED_DATE_FIELD_NUMBER: builtins.int + MODIFIED_DATE_FIELD_NUMBER: builtins.int + rule_id: builtins.str + rule_client_key: builtins.str + rule_version_id: builtins.str + rule_version_number: builtins.int + report_rule_version_id: builtins.str + num_open: builtins.int + num_failed: builtins.int + num_passed: builtins.int + status: global___ReportRuleStatus.ValueType + @property + def status_details(self) -> global___ReportRuleStatusDetails: ... + @property + def created_date(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def modified_date(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + rule_id: builtins.str = ..., + rule_client_key: builtins.str = ..., + rule_version_id: builtins.str = ..., + rule_version_number: builtins.int = ..., + report_rule_version_id: builtins.str = ..., + num_open: builtins.int = ..., + num_failed: builtins.int = ..., + num_passed: builtins.int = ..., + status: global___ReportRuleStatus.ValueType = ..., + status_details: global___ReportRuleStatusDetails | None = ..., + created_date: google.protobuf.timestamp_pb2.Timestamp | None = ..., + modified_date: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["created_date", b"created_date", "modified_date", b"modified_date", "status_details", b"status_details"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["created_date", b"created_date", "modified_date", b"modified_date", "num_failed", b"num_failed", "num_open", b"num_open", "num_passed", b"num_passed", "report_rule_version_id", b"report_rule_version_id", "rule_client_key", b"rule_client_key", "rule_id", b"rule_id", "rule_version_id", b"rule_version_id", "rule_version_number", b"rule_version_number", "status", b"status", "status_details", b"status_details"]) -> None: ... + +global___ReportRuleSummary = ReportRuleSummary + +@typing.final +class ReportTag(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TAG_NAME_FIELD_NUMBER: builtins.int + tag_name: builtins.str + def __init__( + self, + *, + tag_name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["tag_name", b"tag_name"]) -> None: ... + +global___ReportTag = ReportTag + +@typing.final +class ReportRuleStatusDetails(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CREATED_FIELD_NUMBER: builtins.int + LIVE_FIELD_NUMBER: builtins.int + FINISHED_FIELD_NUMBER: builtins.int + FAILED_FIELD_NUMBER: builtins.int + @property + def created(self) -> global___ReportRuleStatusDetailsCreated: ... + @property + def live(self) -> global___ReportRuleStatusDetailsLive: ... + @property + def finished(self) -> global___ReportRuleStatusDetailsFinished: ... + @property + def failed(self) -> global___ReportRuleStatusDetailsFailed: ... + def __init__( + self, + *, + created: global___ReportRuleStatusDetailsCreated | None = ..., + live: global___ReportRuleStatusDetailsLive | None = ..., + finished: global___ReportRuleStatusDetailsFinished | None = ..., + failed: global___ReportRuleStatusDetailsFailed | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["created", b"created", "details", b"details", "failed", b"failed", "finished", b"finished", "live", b"live"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["created", b"created", "details", b"details", "failed", b"failed", "finished", b"finished", "live", b"live"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["details", b"details"]) -> typing.Literal["created", "live", "finished", "failed"] | None: ... + +global___ReportRuleStatusDetails = ReportRuleStatusDetails + +@typing.final +class ReportRuleStatusDetailsCreated(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ReportRuleStatusDetailsCreated = ReportRuleStatusDetailsCreated + +@typing.final +class ReportRuleStatusDetailsLive(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ReportRuleStatusDetailsLive = ReportRuleStatusDetailsLive + +@typing.final +class ReportRuleStatusDetailsFinished(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ReportRuleStatusDetailsFinished = ReportRuleStatusDetailsFinished + +@typing.final +class ReportRuleStatusDetailsFailed(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ERROR_MESSAGE_FIELD_NUMBER: builtins.int + error_message: builtins.str + def __init__( + self, + *, + error_message: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["error_message", b"error_message"]) -> None: ... + +global___ReportRuleStatusDetailsFailed = ReportRuleStatusDetailsFailed + +@typing.final +class CreateReportRequest(google.protobuf.message.Message): + """The request of a call to `ReportService_CreateReport` to create a report. A report can be created either via a report template + or an arbitrary report can be constructed depending on the variant of the `request` field. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_FROM_REPORT_TEMPLATE_REQUEST_FIELD_NUMBER: builtins.int + REPORT_FROM_RULES_REQUEST_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + organization_id: builtins.str + run_id: builtins.str + name: builtins.str + """Override the name of the report. If not provided, the name will be generated based on the report template or run.""" + @property + def report_from_report_template_request(self) -> global___CreateReportFromReportTemplateRequest: ... + @property + def report_from_rules_request(self) -> global___CreateReportFromRulesRequest: ... + def __init__( + self, + *, + report_from_report_template_request: global___CreateReportFromReportTemplateRequest | None = ..., + report_from_rules_request: global___CreateReportFromRulesRequest | None = ..., + organization_id: builtins.str = ..., + run_id: builtins.str = ..., + name: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_name", b"_name", "name", b"name", "report_from_report_template_request", b"report_from_report_template_request", "report_from_rules_request", b"report_from_rules_request", "request", b"request"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_name", b"_name", "name", b"name", "organization_id", b"organization_id", "report_from_report_template_request", b"report_from_report_template_request", "report_from_rules_request", b"report_from_rules_request", "request", b"request", "run_id", b"run_id"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_name", b"_name"]) -> typing.Literal["name"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["request", b"request"]) -> typing.Literal["report_from_report_template_request", "report_from_rules_request"] | None: ... + +global___CreateReportRequest = CreateReportRequest + +@typing.final +class CreateReportResponse(google.protobuf.message.Message): + """The response of a call to `ReportService_CreateReport` to create a report.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_FIELD_NUMBER: builtins.int + @property + def report(self) -> global___Report: ... + def __init__( + self, + *, + report: global___Report | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["report", b"report"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["report", b"report"]) -> None: ... + +global___CreateReportResponse = CreateReportResponse + +@typing.final +class CreateReportFromReportTemplateRequest(google.protobuf.message.Message): + """Used to create a report from a report template.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_TEMPLATE_ID_FIELD_NUMBER: builtins.int + report_template_id: builtins.str + def __init__( + self, + *, + report_template_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["report_template_id", b"report_template_id"]) -> None: ... + +global___CreateReportFromReportTemplateRequest = CreateReportFromReportTemplateRequest + +@typing.final +class CreateReportFromRulesRequest(google.protobuf.message.Message): + """Used to construct an arbitrary report for an arbitrary set of rules. Rules can be specified either by rule ID + or client key based on the variant used in the `rule_identifiers` field. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + TAG_NAMES_FIELD_NUMBER: builtins.int + RULE_IDS_FIELD_NUMBER: builtins.int + RULE_CLIENT_KEYS_FIELD_NUMBER: builtins.int + name: builtins.str + description: builtins.str + @property + def tag_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + @property + def rule_ids(self) -> global___CreateReportRequestRuleIds: ... + @property + def rule_client_keys(self) -> global___CreateReportRequestClientKeys: ... + def __init__( + self, + *, + name: builtins.str = ..., + description: builtins.str | None = ..., + tag_names: collections.abc.Iterable[builtins.str] | None = ..., + rule_ids: global___CreateReportRequestRuleIds | None = ..., + rule_client_keys: global___CreateReportRequestClientKeys | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_description", b"_description", "description", b"description", "rule_client_keys", b"rule_client_keys", "rule_identifiers", b"rule_identifiers", "rule_ids", b"rule_ids"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_description", b"_description", "description", b"description", "name", b"name", "rule_client_keys", b"rule_client_keys", "rule_identifiers", b"rule_identifiers", "rule_ids", b"rule_ids", "tag_names", b"tag_names"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["rule_identifiers", b"rule_identifiers"]) -> typing.Literal["rule_ids", "rule_client_keys"] | None: ... + +global___CreateReportFromRulesRequest = CreateReportFromRulesRequest + +@typing.final +class CreateReportRequestRuleIds(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RULE_IDS_FIELD_NUMBER: builtins.int + @property + def rule_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + rule_ids: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["rule_ids", b"rule_ids"]) -> None: ... + +global___CreateReportRequestRuleIds = CreateReportRequestRuleIds + +@typing.final +class CreateReportRequestClientKeys(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RULE_CLIENT_KEYS_FIELD_NUMBER: builtins.int + @property + def rule_client_keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + rule_client_keys: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["rule_client_keys", b"rule_client_keys"]) -> None: ... + +global___CreateReportRequestClientKeys = CreateReportRequestClientKeys + +@typing.final +class GetReportRequest(google.protobuf.message.Message): + """The request for a call to `ReportService_GetReport` to retrieve a report template.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_ID_FIELD_NUMBER: builtins.int + report_id: builtins.str + def __init__( + self, + *, + report_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["report_id", b"report_id"]) -> None: ... + +global___GetReportRequest = GetReportRequest + +@typing.final +class GetReportResponse(google.protobuf.message.Message): + """The request of a call to `ReportService_GetReport` to retrieve a report template.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_FIELD_NUMBER: builtins.int + @property + def report(self) -> global___Report: ... + def __init__( + self, + *, + report: global___Report | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["report", b"report"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["report", b"report"]) -> None: ... + +global___GetReportResponse = GetReportResponse + +@typing.final +class ListReportsRequest(google.protobuf.message.Message): + """The request for a call to `ReportService_ListReports` to retrieve report.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + FILTER_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int + page_size: builtins.int + """The maximum number of reports to return. The service may return fewer than this value. + If unspecified, at most 50 reports will be returned. The maximum value is 1000; values above + 1000 will be coerced to 1000. Optional. + """ + page_token: builtins.str + """A page token, received from a previous `ListReports` call. + Provide this to retrieve the subsequent page. + When paginating, all other parameters provided to `ListReports` must match + the call that provided the page token. Optional. + """ + filter: builtins.str + """A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. + Available fields to filter by are `report_id`, `report_template_id`, `tag_name`, `name`, and `run_id`. + For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). + For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#reports). Optional. + """ + organization_id: builtins.str + """This field is only required if your user belongs to multiple organizations.""" + def __init__( + self, + *, + page_size: builtins.int = ..., + page_token: builtins.str = ..., + filter: builtins.str = ..., + organization_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["filter", b"filter", "organization_id", b"organization_id", "page_size", b"page_size", "page_token", b"page_token"]) -> None: ... + +global___ListReportsRequest = ListReportsRequest + +@typing.final +class ListReportsResponse(google.protobuf.message.Message): + """The response of a call to `ReportService_ListReportsResponse`.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORTS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + @property + def reports(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Report]: ... + def __init__( + self, + *, + reports: collections.abc.Iterable[global___Report] | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["next_page_token", b"next_page_token", "reports", b"reports"]) -> None: ... + +global___ListReportsResponse = ListReportsResponse + +@typing.final +class RerunReportRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_ID_FIELD_NUMBER: builtins.int + report_id: builtins.str + def __init__( + self, + *, + report_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["report_id", b"report_id"]) -> None: ... + +global___RerunReportRequest = RerunReportRequest + +@typing.final +class RerunReportResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: builtins.int + REPORT_ID_FIELD_NUMBER: builtins.int + job_id: builtins.str + report_id: builtins.str + def __init__( + self, + *, + job_id: builtins.str = ..., + report_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["job_id", b"job_id", "report_id", b"report_id"]) -> None: ... + +global___RerunReportResponse = RerunReportResponse + +@typing.final +class CancelReportRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_ID_FIELD_NUMBER: builtins.int + report_id: builtins.str + def __init__( + self, + *, + report_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["report_id", b"report_id"]) -> None: ... + +global___CancelReportRequest = CancelReportRequest + +@typing.final +class CancelReportResponse(google.protobuf.message.Message): + """no response fields""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___CancelReportResponse = CancelReportResponse diff --git a/python/lib/sift/reports/v1/reports_pb2_grpc.py b/python/lib/sift/reports/v1/reports_pb2_grpc.py new file mode 100644 index 00000000..29999ad9 --- /dev/null +++ b/python/lib/sift/reports/v1/reports_pb2_grpc.py @@ -0,0 +1,205 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from sift.reports.v1 import reports_pb2 as sift_dot_reports_dot_v1_dot_reports__pb2 + + +class ReportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetReport = channel.unary_unary( + '/sift.reports.v1.ReportService/GetReport', + request_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.GetReportRequest.SerializeToString, + response_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.GetReportResponse.FromString, + ) + self.CreateReport = channel.unary_unary( + '/sift.reports.v1.ReportService/CreateReport', + request_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.CreateReportRequest.SerializeToString, + response_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.CreateReportResponse.FromString, + ) + self.ListReports = channel.unary_unary( + '/sift.reports.v1.ReportService/ListReports', + request_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.ListReportsRequest.SerializeToString, + response_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.ListReportsResponse.FromString, + ) + self.RerunReport = channel.unary_unary( + '/sift.reports.v1.ReportService/RerunReport', + request_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.RerunReportRequest.SerializeToString, + response_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.RerunReportResponse.FromString, + ) + self.CancelReport = channel.unary_unary( + '/sift.reports.v1.ReportService/CancelReport', + request_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.CancelReportRequest.SerializeToString, + response_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.CancelReportResponse.FromString, + ) + + +class ReportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetReport(self, request, context): + """Retrieve a report. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateReport(self, request, context): + """Create a report. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListReports(self, request, context): + """List reports. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RerunReport(self, request, context): + """Rerunning a report will create a new report with the same rule versions and run as the original report and run the + evaluation again using the most up-to-date set of data. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelReport(self, request, context): + """Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been + calculated up to the point of cancellation will be saved. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ReportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetReport': grpc.unary_unary_rpc_method_handler( + servicer.GetReport, + request_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.GetReportRequest.FromString, + response_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.GetReportResponse.SerializeToString, + ), + 'CreateReport': grpc.unary_unary_rpc_method_handler( + servicer.CreateReport, + request_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.CreateReportRequest.FromString, + response_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.CreateReportResponse.SerializeToString, + ), + 'ListReports': grpc.unary_unary_rpc_method_handler( + servicer.ListReports, + request_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.ListReportsRequest.FromString, + response_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.ListReportsResponse.SerializeToString, + ), + 'RerunReport': grpc.unary_unary_rpc_method_handler( + servicer.RerunReport, + request_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.RerunReportRequest.FromString, + response_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.RerunReportResponse.SerializeToString, + ), + 'CancelReport': grpc.unary_unary_rpc_method_handler( + servicer.CancelReport, + request_deserializer=sift_dot_reports_dot_v1_dot_reports__pb2.CancelReportRequest.FromString, + response_serializer=sift_dot_reports_dot_v1_dot_reports__pb2.CancelReportResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'sift.reports.v1.ReportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ReportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetReport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.reports.v1.ReportService/GetReport', + sift_dot_reports_dot_v1_dot_reports__pb2.GetReportRequest.SerializeToString, + sift_dot_reports_dot_v1_dot_reports__pb2.GetReportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateReport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.reports.v1.ReportService/CreateReport', + sift_dot_reports_dot_v1_dot_reports__pb2.CreateReportRequest.SerializeToString, + sift_dot_reports_dot_v1_dot_reports__pb2.CreateReportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListReports(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.reports.v1.ReportService/ListReports', + sift_dot_reports_dot_v1_dot_reports__pb2.ListReportsRequest.SerializeToString, + sift_dot_reports_dot_v1_dot_reports__pb2.ListReportsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RerunReport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.reports.v1.ReportService/RerunReport', + sift_dot_reports_dot_v1_dot_reports__pb2.RerunReportRequest.SerializeToString, + sift_dot_reports_dot_v1_dot_reports__pb2.RerunReportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CancelReport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.reports.v1.ReportService/CancelReport', + sift_dot_reports_dot_v1_dot_reports__pb2.CancelReportRequest.SerializeToString, + sift_dot_reports_dot_v1_dot_reports__pb2.CancelReportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/lib/sift/reports/v1/reports_pb2_grpc.pyi b/python/lib/sift/reports/v1/reports_pb2_grpc.pyi new file mode 100644 index 00000000..8c0786d1 --- /dev/null +++ b/python/lib/sift/reports/v1/reports_pb2_grpc.pyi @@ -0,0 +1,136 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import abc +import collections.abc +import grpc +import grpc.aio +import sift.reports.v1.reports_pb2 +import typing + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... + +class ReportServiceStub: + def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ... + GetReport: grpc.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.GetReportRequest, + sift.reports.v1.reports_pb2.GetReportResponse, + ] + """Retrieve a report.""" + + CreateReport: grpc.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.CreateReportRequest, + sift.reports.v1.reports_pb2.CreateReportResponse, + ] + """Create a report.""" + + ListReports: grpc.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.ListReportsRequest, + sift.reports.v1.reports_pb2.ListReportsResponse, + ] + """List reports.""" + + RerunReport: grpc.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.RerunReportRequest, + sift.reports.v1.reports_pb2.RerunReportResponse, + ] + """Rerunning a report will create a new report with the same rule versions and run as the original report and run the + evaluation again using the most up-to-date set of data. + """ + + CancelReport: grpc.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.CancelReportRequest, + sift.reports.v1.reports_pb2.CancelReportResponse, + ] + """Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been + calculated up to the point of cancellation will be saved. + """ + +class ReportServiceAsyncStub: + GetReport: grpc.aio.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.GetReportRequest, + sift.reports.v1.reports_pb2.GetReportResponse, + ] + """Retrieve a report.""" + + CreateReport: grpc.aio.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.CreateReportRequest, + sift.reports.v1.reports_pb2.CreateReportResponse, + ] + """Create a report.""" + + ListReports: grpc.aio.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.ListReportsRequest, + sift.reports.v1.reports_pb2.ListReportsResponse, + ] + """List reports.""" + + RerunReport: grpc.aio.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.RerunReportRequest, + sift.reports.v1.reports_pb2.RerunReportResponse, + ] + """Rerunning a report will create a new report with the same rule versions and run as the original report and run the + evaluation again using the most up-to-date set of data. + """ + + CancelReport: grpc.aio.UnaryUnaryMultiCallable[ + sift.reports.v1.reports_pb2.CancelReportRequest, + sift.reports.v1.reports_pb2.CancelReportResponse, + ] + """Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been + calculated up to the point of cancellation will be saved. + """ + +class ReportServiceServicer(metaclass=abc.ABCMeta): + @abc.abstractmethod + def GetReport( + self, + request: sift.reports.v1.reports_pb2.GetReportRequest, + context: _ServicerContext, + ) -> typing.Union[sift.reports.v1.reports_pb2.GetReportResponse, collections.abc.Awaitable[sift.reports.v1.reports_pb2.GetReportResponse]]: + """Retrieve a report.""" + + @abc.abstractmethod + def CreateReport( + self, + request: sift.reports.v1.reports_pb2.CreateReportRequest, + context: _ServicerContext, + ) -> typing.Union[sift.reports.v1.reports_pb2.CreateReportResponse, collections.abc.Awaitable[sift.reports.v1.reports_pb2.CreateReportResponse]]: + """Create a report.""" + + @abc.abstractmethod + def ListReports( + self, + request: sift.reports.v1.reports_pb2.ListReportsRequest, + context: _ServicerContext, + ) -> typing.Union[sift.reports.v1.reports_pb2.ListReportsResponse, collections.abc.Awaitable[sift.reports.v1.reports_pb2.ListReportsResponse]]: + """List reports.""" + + @abc.abstractmethod + def RerunReport( + self, + request: sift.reports.v1.reports_pb2.RerunReportRequest, + context: _ServicerContext, + ) -> typing.Union[sift.reports.v1.reports_pb2.RerunReportResponse, collections.abc.Awaitable[sift.reports.v1.reports_pb2.RerunReportResponse]]: + """Rerunning a report will create a new report with the same rule versions and run as the original report and run the + evaluation again using the most up-to-date set of data. + """ + + @abc.abstractmethod + def CancelReport( + self, + request: sift.reports.v1.reports_pb2.CancelReportRequest, + context: _ServicerContext, + ) -> typing.Union[sift.reports.v1.reports_pb2.CancelReportResponse, collections.abc.Awaitable[sift.reports.v1.reports_pb2.CancelReportResponse]]: + """Canceling a report will stop the evaluation of the report and mark it as canceled. Any results that have been + calculated up to the point of cancellation will be saved. + """ + +def add_ReportServiceServicer_to_server(servicer: ReportServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ... diff --git a/python/lib/sift/rule_evaluation/__init__.py b/python/lib/sift/rule_evaluation/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/lib/sift/rule_evaluation/v1/__init__.py b/python/lib/sift/rule_evaluation/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2.py b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2.py new file mode 100644 index 00000000..0a5b1db5 --- /dev/null +++ b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: sift/rule_evaluation/v1/rule_evaluation.proto +# Protobuf Python Version: 5.26.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 +from sift.common.type.v1 import resource_identifier_pb2 as sift_dot_common_dot_type_dot_v1_dot_resource__identifier__pb2 +from sift.rules.v1 import rules_pb2 as sift_dot_rules_dot_v1_dot_rules__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-sift/rule_evaluation/v1/rule_evaluation.proto\x12\x17sift.rule_evaluation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a-sift/common/type/v1/resource_identifier.proto\x1a\x19sift/rules/v1/rules.proto\"\x93\x05\n\x14\x45valuateRulesRequest\x12;\n\x03run\x18\x01 \x01(\x0b\x32\'.sift.common.type.v1.ResourceIdentifierH\x00R\x03run\x12\x42\n\x06\x61ssets\x18\x02 \x01(\x0b\x32(.sift.rule_evaluation.v1.AssetsTimeRangeH\x00R\x06\x61ssets\x12U\n\x05rules\x18\x03 \x01(\x0b\x32=.sift.rule_evaluation.v1.EvaluateRulesFromCurrentRuleVersionsH\x01R\x05rules\x12]\n\rrule_versions\x18\x04 \x01(\x0b\x32\x36.sift.rule_evaluation.v1.EvaluateRulesFromRuleVersionsH\x01R\x0cruleVersions\x12\x63\n\x0freport_template\x18\x05 \x01(\x0b\x32\x38.sift.rule_evaluation.v1.EvaluateRulesFromReportTemplateH\x01R\x0ereportTemplate\x12\x66\n\x12\x61nnotation_options\x18\x06 \x01(\x0b\x32\x37.sift.rule_evaluation.v1.EvaluateRulesAnnotationOptionsR\x11\x61nnotationOptions\x12,\n\x0forganization_id\x18\x07 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\x12)\n\x0breport_name\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x02R\nreportName\x88\x01\x01\x42\x06\n\x04timeB\x06\n\x04modeB\x0e\n\x0c_report_name\"\xcf\x01\n\x0f\x41ssetsTimeRange\x12@\n\x06\x61ssets\x18\x01 \x01(\x0b\x32#.sift.common.type.v1.NamedResourcesB\x03\xe0\x41\x02R\x06\x61ssets\x12>\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12:\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x07\x65ndTime\"k\n$EvaluateRulesFromCurrentRuleVersions\x12\x43\n\x05rules\x18\x01 \x01(\x0b\x32(.sift.common.type.v1.ResourceIdentifiersB\x03\xe0\x41\x02R\x05rules\"x\n\x1f\x45valuateRulesFromReportTemplate\x12U\n\x0freport_template\x18\x01 \x01(\x0b\x32\'.sift.common.type.v1.ResourceIdentifierB\x03\xe0\x41\x02R\x0ereportTemplate\"N\n\x1d\x45valuateRulesFromRuleVersions\x12-\n\x10rule_version_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x0eruleVersionIds\"^\n\x1e\x45valuateRulesAnnotationOptions\x12<\n\x04tags\x18\x01 \x01(\x0b\x32#.sift.common.type.v1.NamedResourcesB\x03\xe0\x41\x02R\x04tags\"\xb7\x01\n\x15\x45valuateRulesResponse\x12=\n\x18\x63reated_annotation_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02R\x16\x63reatedAnnotationCount\x12%\n\treport_id\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00R\x08reportId\x88\x01\x01\x12\x1f\n\x06job_id\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x01R\x05jobId\x88\x01\x01\x42\x0c\n\n_report_idB\t\n\x07_job_id\"\x8f\x04\n\x1b\x45valuateRulesPreviewRequest\x12;\n\x03run\x18\x01 \x01(\x0b\x32\'.sift.common.type.v1.ResourceIdentifierH\x00R\x03run\x12U\n\x05rules\x18\x03 \x01(\x0b\x32=.sift.rule_evaluation.v1.EvaluateRulesFromCurrentRuleVersionsH\x01R\x05rules\x12]\n\rrule_versions\x18\x04 \x01(\x0b\x32\x36.sift.rule_evaluation.v1.EvaluateRulesFromRuleVersionsH\x01R\x0cruleVersions\x12\x63\n\x0freport_template\x18\x05 \x01(\x0b\x32\x38.sift.rule_evaluation.v1.EvaluateRulesFromReportTemplateH\x01R\x0ereportTemplate\x12Z\n\x0crule_configs\x18\x06 \x01(\x0b\x32\x35.sift.rule_evaluation.v1.EvaluateRulesFromRuleConfigsH\x01R\x0bruleConfigs\x12,\n\x0forganization_id\x18\x07 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationIdB\x06\n\x04timeB\x06\n\x04mode\"_\n\x1c\x45valuateRulesFromRuleConfigs\x12?\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32 .sift.rules.v1.UpdateRuleRequestB\x03\xe0\x41\x02R\x07\x63onfigs\"\xae\x01\n\x1c\x45valuateRulesPreviewResponse\x12=\n\x18\x63reated_annotation_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02R\x16\x63reatedAnnotationCount\x12O\n\x13\x64ry_run_annotations\x18\x02 \x03(\x0b\x32\x1f.sift.rules.v1.DryRunAnnotationR\x11\x64ryRunAnnotations2\xd8\x06\n\x15RuleEvaluationService\x12\xc3\x02\n\rEvaluateRules\x12-.sift.rule_evaluation.v1.EvaluateRulesRequest\x1a..sift.rule_evaluation.v1.EvaluateRulesResponse\"\xd2\x01\x92\x41\xa7\x01\x12\rEvaluateRules\x1a\x95\x01\x45valuate 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.\x82\xd3\xe4\x93\x02!\"\x1c/api/v1/rules/evaluate-rules:\x01*\x12\xda\x02\n\x14\x45valuateRulesPreview\x12\x34.sift.rule_evaluation.v1.EvaluateRulesPreviewRequest\x1a\x35.sift.rule_evaluation.v1.EvaluateRulesPreviewResponse\"\xd4\x01\x92\x41\xa1\x01\x12\x14\x45valuateRulesPreview\x1a\x88\x01Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.\x82\xd3\xe4\x93\x02)\"$/api/v1/rules/evaluate-rules:preview:\x01*\x1a\x9b\x01\x92\x41\x97\x01\x12\x1aService to evaluate rules.\x1ay\n\x1fRead more about what rules are.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421102B\xca\x01\n\x1b\x63om.sift.rule_evaluation.v1B\x13RuleEvaluationProtoP\x01\xa2\x02\x03SRX\xaa\x02\x16Sift.RuleEvaluation.V1\xca\x02\x16Sift\\RuleEvaluation\\V1\xe2\x02\"Sift\\RuleEvaluation\\V1\\GPBMetadata\xea\x02\x18Sift::RuleEvaluation::V1\x92\x41\x1b\x12\x19\n\x17Rule Evaluation Serviceb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sift.rule_evaluation.v1.rule_evaluation_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\033com.sift.rule_evaluation.v1B\023RuleEvaluationProtoP\001\242\002\003SRX\252\002\026Sift.RuleEvaluation.V1\312\002\026Sift\\RuleEvaluation\\V1\342\002\"Sift\\RuleEvaluation\\V1\\GPBMetadata\352\002\030Sift::RuleEvaluation::V1\222A\033\022\031\n\027Rule Evaluation Service' + _globals['_EVALUATERULESREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_EVALUATERULESREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' + _globals['_EVALUATERULESREQUEST'].fields_by_name['report_name']._loaded_options = None + _globals['_EVALUATERULESREQUEST'].fields_by_name['report_name']._serialized_options = b'\340A\001' + _globals['_ASSETSTIMERANGE'].fields_by_name['assets']._loaded_options = None + _globals['_ASSETSTIMERANGE'].fields_by_name['assets']._serialized_options = b'\340A\002' + _globals['_ASSETSTIMERANGE'].fields_by_name['start_time']._loaded_options = None + _globals['_ASSETSTIMERANGE'].fields_by_name['start_time']._serialized_options = b'\340A\002' + _globals['_ASSETSTIMERANGE'].fields_by_name['end_time']._loaded_options = None + _globals['_ASSETSTIMERANGE'].fields_by_name['end_time']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESFROMCURRENTRULEVERSIONS'].fields_by_name['rules']._loaded_options = None + _globals['_EVALUATERULESFROMCURRENTRULEVERSIONS'].fields_by_name['rules']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESFROMREPORTTEMPLATE'].fields_by_name['report_template']._loaded_options = None + _globals['_EVALUATERULESFROMREPORTTEMPLATE'].fields_by_name['report_template']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESFROMRULEVERSIONS'].fields_by_name['rule_version_ids']._loaded_options = None + _globals['_EVALUATERULESFROMRULEVERSIONS'].fields_by_name['rule_version_ids']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESANNOTATIONOPTIONS'].fields_by_name['tags']._loaded_options = None + _globals['_EVALUATERULESANNOTATIONOPTIONS'].fields_by_name['tags']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESRESPONSE'].fields_by_name['created_annotation_count']._loaded_options = None + _globals['_EVALUATERULESRESPONSE'].fields_by_name['created_annotation_count']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESRESPONSE'].fields_by_name['report_id']._loaded_options = None + _globals['_EVALUATERULESRESPONSE'].fields_by_name['report_id']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESRESPONSE'].fields_by_name['job_id']._loaded_options = None + _globals['_EVALUATERULESRESPONSE'].fields_by_name['job_id']._serialized_options = b'\340A\001' + _globals['_EVALUATERULESPREVIEWREQUEST'].fields_by_name['organization_id']._loaded_options = None + _globals['_EVALUATERULESPREVIEWREQUEST'].fields_by_name['organization_id']._serialized_options = b'\340A\001' + _globals['_EVALUATERULESFROMRULECONFIGS'].fields_by_name['configs']._loaded_options = None + _globals['_EVALUATERULESFROMRULECONFIGS'].fields_by_name['configs']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESPREVIEWRESPONSE'].fields_by_name['created_annotation_count']._loaded_options = None + _globals['_EVALUATERULESPREVIEWRESPONSE'].fields_by_name['created_annotation_count']._serialized_options = b'\340A\002' + _globals['_RULEEVALUATIONSERVICE']._loaded_options = None + _globals['_RULEEVALUATIONSERVICE']._serialized_options = b'\222A\227\001\022\032Service to evaluate rules.\032y\n\037Read more about what rules are.\022Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421102' + _globals['_RULEEVALUATIONSERVICE'].methods_by_name['EvaluateRules']._loaded_options = None + _globals['_RULEEVALUATIONSERVICE'].methods_by_name['EvaluateRules']._serialized_options = b'\222A\247\001\022\rEvaluateRules\032\225\001Evaluate 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.\202\323\344\223\002!\"\034/api/v1/rules/evaluate-rules:\001*' + _globals['_RULEEVALUATIONSERVICE'].methods_by_name['EvaluateRulesPreview']._loaded_options = None + _globals['_RULEEVALUATIONSERVICE'].methods_by_name['EvaluateRulesPreview']._serialized_options = b'\222A\241\001\022\024EvaluateRulesPreview\032\210\001Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.\202\323\344\223\002)\"$/api/v1/rules/evaluate-rules:preview:\001*' + _globals['_EVALUATERULESREQUEST']._serialized_start=293 + _globals['_EVALUATERULESREQUEST']._serialized_end=952 + _globals['_ASSETSTIMERANGE']._serialized_start=955 + _globals['_ASSETSTIMERANGE']._serialized_end=1162 + _globals['_EVALUATERULESFROMCURRENTRULEVERSIONS']._serialized_start=1164 + _globals['_EVALUATERULESFROMCURRENTRULEVERSIONS']._serialized_end=1271 + _globals['_EVALUATERULESFROMREPORTTEMPLATE']._serialized_start=1273 + _globals['_EVALUATERULESFROMREPORTTEMPLATE']._serialized_end=1393 + _globals['_EVALUATERULESFROMRULEVERSIONS']._serialized_start=1395 + _globals['_EVALUATERULESFROMRULEVERSIONS']._serialized_end=1473 + _globals['_EVALUATERULESANNOTATIONOPTIONS']._serialized_start=1475 + _globals['_EVALUATERULESANNOTATIONOPTIONS']._serialized_end=1569 + _globals['_EVALUATERULESRESPONSE']._serialized_start=1572 + _globals['_EVALUATERULESRESPONSE']._serialized_end=1755 + _globals['_EVALUATERULESPREVIEWREQUEST']._serialized_start=1758 + _globals['_EVALUATERULESPREVIEWREQUEST']._serialized_end=2285 + _globals['_EVALUATERULESFROMRULECONFIGS']._serialized_start=2287 + _globals['_EVALUATERULESFROMRULECONFIGS']._serialized_end=2382 + _globals['_EVALUATERULESPREVIEWRESPONSE']._serialized_start=2385 + _globals['_EVALUATERULESPREVIEWRESPONSE']._serialized_end=2559 + _globals['_RULEEVALUATIONSERVICE']._serialized_start=2562 + _globals['_RULEEVALUATIONSERVICE']._serialized_end=3418 +# @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2.pyi b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2.pyi new file mode 100644 index 00000000..52290cec --- /dev/null +++ b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2.pyi @@ -0,0 +1,263 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message +import google.protobuf.timestamp_pb2 +import sift.common.type.v1.resource_identifier_pb2 +import sift.rules.v1.rules_pb2 +import typing + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class EvaluateRulesRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_FIELD_NUMBER: builtins.int + ASSETS_FIELD_NUMBER: builtins.int + RULES_FIELD_NUMBER: builtins.int + RULE_VERSIONS_FIELD_NUMBER: builtins.int + REPORT_TEMPLATE_FIELD_NUMBER: builtins.int + ANNOTATION_OPTIONS_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int + REPORT_NAME_FIELD_NUMBER: builtins.int + organization_id: builtins.str + """Only required if your user belongs to multiple organizations""" + report_name: builtins.str + """If this request creates a report, this field will be used as the report name.""" + @property + def run(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier: ... + @property + def assets(self) -> global___AssetsTimeRange: ... + @property + def rules(self) -> global___EvaluateRulesFromCurrentRuleVersions: ... + @property + def rule_versions(self) -> global___EvaluateRulesFromRuleVersions: ... + @property + def report_template(self) -> global___EvaluateRulesFromReportTemplate: ... + @property + def annotation_options(self) -> global___EvaluateRulesAnnotationOptions: ... + def __init__( + self, + *, + run: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier | None = ..., + assets: global___AssetsTimeRange | None = ..., + rules: global___EvaluateRulesFromCurrentRuleVersions | None = ..., + rule_versions: global___EvaluateRulesFromRuleVersions | None = ..., + report_template: global___EvaluateRulesFromReportTemplate | None = ..., + annotation_options: global___EvaluateRulesAnnotationOptions | None = ..., + organization_id: builtins.str = ..., + report_name: builtins.str | None = ..., + ) -> None: ... + 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: ... + 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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_report_name", b"_report_name"]) -> typing.Literal["report_name"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["mode", b"mode"]) -> typing.Literal["rules", "rule_versions", "report_template"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["time", b"time"]) -> typing.Literal["run", "assets"] | None: ... + +global___EvaluateRulesRequest = EvaluateRulesRequest + +@typing.final +class AssetsTimeRange(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASSETS_FIELD_NUMBER: builtins.int + START_TIME_FIELD_NUMBER: builtins.int + END_TIME_FIELD_NUMBER: builtins.int + @property + def assets(self) -> sift.common.type.v1.resource_identifier_pb2.NamedResources: ... + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + assets: sift.common.type.v1.resource_identifier_pb2.NamedResources | None = ..., + start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + end_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["assets", b"assets", "end_time", b"end_time", "start_time", b"start_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["assets", b"assets", "end_time", b"end_time", "start_time", b"start_time"]) -> None: ... + +global___AssetsTimeRange = AssetsTimeRange + +@typing.final +class EvaluateRulesFromCurrentRuleVersions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RULES_FIELD_NUMBER: builtins.int + @property + def rules(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifiers: ... + def __init__( + self, + *, + rules: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifiers | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["rules", b"rules"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["rules", b"rules"]) -> None: ... + +global___EvaluateRulesFromCurrentRuleVersions = EvaluateRulesFromCurrentRuleVersions + +@typing.final +class EvaluateRulesFromReportTemplate(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPORT_TEMPLATE_FIELD_NUMBER: builtins.int + @property + def report_template(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier: ... + def __init__( + self, + *, + report_template: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["report_template", b"report_template"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["report_template", b"report_template"]) -> None: ... + +global___EvaluateRulesFromReportTemplate = EvaluateRulesFromReportTemplate + +@typing.final +class EvaluateRulesFromRuleVersions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RULE_VERSION_IDS_FIELD_NUMBER: builtins.int + @property + def rule_version_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + rule_version_ids: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["rule_version_ids", b"rule_version_ids"]) -> None: ... + +global___EvaluateRulesFromRuleVersions = EvaluateRulesFromRuleVersions + +@typing.final +class EvaluateRulesAnnotationOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TAGS_FIELD_NUMBER: builtins.int + @property + def tags(self) -> sift.common.type.v1.resource_identifier_pb2.NamedResources: ... + def __init__( + self, + *, + tags: sift.common.type.v1.resource_identifier_pb2.NamedResources | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["tags", b"tags"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["tags", b"tags"]) -> None: ... + +global___EvaluateRulesAnnotationOptions = EvaluateRulesAnnotationOptions + +@typing.final +class EvaluateRulesResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CREATED_ANNOTATION_COUNT_FIELD_NUMBER: builtins.int + REPORT_ID_FIELD_NUMBER: builtins.int + JOB_ID_FIELD_NUMBER: builtins.int + created_annotation_count: builtins.int + report_id: builtins.str + """A report will be generated if rules were evaluated against a run.""" + job_id: builtins.str + """This will be set if the job has an extended run time and is being processed asynchronously.""" + def __init__( + self, + *, + created_annotation_count: builtins.int = ..., + report_id: builtins.str | None = ..., + job_id: builtins.str | None = ..., + ) -> None: ... + 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: ... + 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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_job_id", b"_job_id"]) -> typing.Literal["job_id"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_report_id", b"_report_id"]) -> typing.Literal["report_id"] | None: ... + +global___EvaluateRulesResponse = EvaluateRulesResponse + +@typing.final +class EvaluateRulesPreviewRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_FIELD_NUMBER: builtins.int + RULES_FIELD_NUMBER: builtins.int + RULE_VERSIONS_FIELD_NUMBER: builtins.int + REPORT_TEMPLATE_FIELD_NUMBER: builtins.int + RULE_CONFIGS_FIELD_NUMBER: builtins.int + ORGANIZATION_ID_FIELD_NUMBER: builtins.int + organization_id: builtins.str + """Only required if your user belongs to multiple organizations""" + @property + def run(self) -> sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier: ... + @property + def rules(self) -> global___EvaluateRulesFromCurrentRuleVersions: ... + @property + def rule_versions(self) -> global___EvaluateRulesFromRuleVersions: ... + @property + def report_template(self) -> global___EvaluateRulesFromReportTemplate: ... + @property + def rule_configs(self) -> global___EvaluateRulesFromRuleConfigs: ... + def __init__( + self, + *, + run: sift.common.type.v1.resource_identifier_pb2.ResourceIdentifier | None = ..., + rules: global___EvaluateRulesFromCurrentRuleVersions | None = ..., + rule_versions: global___EvaluateRulesFromRuleVersions | None = ..., + report_template: global___EvaluateRulesFromReportTemplate | None = ..., + rule_configs: global___EvaluateRulesFromRuleConfigs | None = ..., + organization_id: builtins.str = ..., + ) -> None: ... + 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: ... + 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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["mode", b"mode"]) -> typing.Literal["rules", "rule_versions", "report_template", "rule_configs"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["time", b"time"]) -> typing.Literal["run"] | None: ... + +global___EvaluateRulesPreviewRequest = EvaluateRulesPreviewRequest + +@typing.final +class EvaluateRulesFromRuleConfigs(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CONFIGS_FIELD_NUMBER: builtins.int + @property + def configs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[sift.rules.v1.rules_pb2.UpdateRuleRequest]: ... + def __init__( + self, + *, + configs: collections.abc.Iterable[sift.rules.v1.rules_pb2.UpdateRuleRequest] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["configs", b"configs"]) -> None: ... + +global___EvaluateRulesFromRuleConfigs = EvaluateRulesFromRuleConfigs + +@typing.final +class EvaluateRulesPreviewResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CREATED_ANNOTATION_COUNT_FIELD_NUMBER: builtins.int + DRY_RUN_ANNOTATIONS_FIELD_NUMBER: builtins.int + created_annotation_count: builtins.int + @property + def dry_run_annotations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[sift.rules.v1.rules_pb2.DryRunAnnotation]: ... + def __init__( + self, + *, + created_annotation_count: builtins.int = ..., + dry_run_annotations: collections.abc.Iterable[sift.rules.v1.rules_pb2.DryRunAnnotation] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["created_annotation_count", b"created_annotation_count", "dry_run_annotations", b"dry_run_annotations"]) -> None: ... + +global___EvaluateRulesPreviewResponse = EvaluateRulesPreviewResponse diff --git a/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.py b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.py new file mode 100644 index 00000000..bd4d3028 --- /dev/null +++ b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.py @@ -0,0 +1,101 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from sift.rule_evaluation.v1 import rule_evaluation_pb2 as sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2 + + +class RuleEvaluationServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.EvaluateRules = channel.unary_unary( + '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRules', + request_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesRequest.SerializeToString, + response_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesResponse.FromString, + ) + self.EvaluateRulesPreview = channel.unary_unary( + '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRulesPreview', + request_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewRequest.SerializeToString, + response_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewResponse.FromString, + ) + + +class RuleEvaluationServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def EvaluateRules(self, request, context): + """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. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def EvaluateRulesPreview(self, request, context): + """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RuleEvaluationServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'EvaluateRules': grpc.unary_unary_rpc_method_handler( + servicer.EvaluateRules, + request_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesRequest.FromString, + response_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesResponse.SerializeToString, + ), + 'EvaluateRulesPreview': grpc.unary_unary_rpc_method_handler( + servicer.EvaluateRulesPreview, + request_deserializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewRequest.FromString, + response_serializer=sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'sift.rule_evaluation.v1.RuleEvaluationService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RuleEvaluationService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def EvaluateRules(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRules', + sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesRequest.SerializeToString, + sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def EvaluateRulesPreview(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.rule_evaluation.v1.RuleEvaluationService/EvaluateRulesPreview', + sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewRequest.SerializeToString, + sift_dot_rule__evaluation_dot_v1_dot_rule__evaluation__pb2.EvaluateRulesPreviewResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.pyi b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.pyi new file mode 100644 index 00000000..f47be819 --- /dev/null +++ b/python/lib/sift/rule_evaluation/v1/rule_evaluation_pb2_grpc.pyi @@ -0,0 +1,64 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import abc +import collections.abc +import grpc +import grpc.aio +import sift.rule_evaluation.v1.rule_evaluation_pb2 +import typing + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... + +class RuleEvaluationServiceStub: + def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ... + EvaluateRules: grpc.UnaryUnaryMultiCallable[ + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesRequest, + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse, + ] + """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.""" + + EvaluateRulesPreview: grpc.UnaryUnaryMultiCallable[ + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewRequest, + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse, + ] + """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.""" + +class RuleEvaluationServiceAsyncStub: + EvaluateRules: grpc.aio.UnaryUnaryMultiCallable[ + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesRequest, + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse, + ] + """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.""" + + EvaluateRulesPreview: grpc.aio.UnaryUnaryMultiCallable[ + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewRequest, + sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse, + ] + """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.""" + +class RuleEvaluationServiceServicer(metaclass=abc.ABCMeta): + @abc.abstractmethod + def EvaluateRules( + self, + request: sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesRequest, + context: _ServicerContext, + ) -> typing.Union[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse, collections.abc.Awaitable[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesResponse]]: + """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.""" + + @abc.abstractmethod + def EvaluateRulesPreview( + self, + request: sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewRequest, + context: _ServicerContext, + ) -> typing.Union[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse, collections.abc.Awaitable[sift.rule_evaluation.v1.rule_evaluation_pb2.EvaluateRulesPreviewResponse]]: + """Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.""" + +def add_RuleEvaluationServiceServicer_to_server(servicer: RuleEvaluationServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ... diff --git a/python/lib/sift/rules/v1/rules_pb2.py b/python/lib/sift/rules/v1/rules_pb2.py index 2e5aa335..d0422efb 100644 --- a/python/lib/sift/rules/v1/rules_pb2.py +++ b/python/lib/sift/rules/v1/rules_pb2.py @@ -19,7 +19,7 @@ from sift.annotations.v1 import annotations_pb2 as sift_dot_annotations_dot_v1_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19sift/rules/v1/rules.proto\x12\rsift.rules.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a%sift/annotations/v1/annotations.proto\"\xf7\x04\n\x04Rule\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12\x1e\n\x08\x61sset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12\x17\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12\"\n\nis_enabled\x18\x06 \x01(\x08\x42\x03\xe0\x41\x02R\tisEnabled\x12\x42\n\x0c\x63reated_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\t \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\n \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12,\n\x0forganization_id\x18\x0b \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x41\n\nconditions\x18\x0c \x03(\x0b\x32\x1c.sift.rules.v1.RuleConditionB\x03\xe0\x41\x02R\nconditions\x12\x42\n\x0crule_version\x18\r \x01(\x0b\x32\x1a.sift.rules.v1.RuleVersionB\x03\xe0\x41\x02R\x0bruleVersion\x12\"\n\nclient_key\x18\x0e \x01(\tB\x03\xe0\x41\x01R\tclientKeyJ\x04\x08\x05\x10\x06\"\x9b\x04\n\rRuleCondition\x12/\n\x11rule_condition_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0fruleConditionId\x12\x1c\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12K\n\nexpression\x18\x03 \x01(\x0b\x32&.sift.rules.v1.RuleConditionExpressionB\x03\xe0\x41\x02R\nexpression\x12\x42\n\x0c\x63reated_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x38\n\x07\x61\x63tions\x18\t \x03(\x0b\x32\x19.sift.rules.v1.RuleActionB\x03\xe0\x41\x02R\x07\x61\x63tions\x12>\n\x19rule_condition_version_id\x18\n \x01(\tB\x03\xe0\x41\x02R\x16ruleConditionVersionIdJ\x04\x08\x04\x10\x05\"\xa6\x04\n\nRuleAction\x12)\n\x0erule_action_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0cruleActionId\x12/\n\x11rule_condition_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0fruleConditionId\x12?\n\x0b\x61\x63tion_type\x18\x03 \x01(\x0e\x32\x19.sift.rules.v1.ActionKindB\x03\xe0\x41\x02R\nactionType\x12Q\n\rconfiguration\x18\x04 \x01(\x0b\x32&.sift.rules.v1.RuleActionConfigurationB\x03\xe0\x41\x02R\rconfiguration\x12\x42\n\x0c\x63reated_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x38\n\x16rule_action_version_id\x18\t \x01(\tB\x03\xe0\x41\x02R\x13ruleActionVersionId\"5\n\x16RuleAssetConfiguration\x12\x1b\n\tasset_ids\x18\x01 \x03(\tR\x08\x61ssetIds\"\xd9\x02\n\x12SearchRulesRequest\x12\x19\n\x05limit\x18\x01 \x01(\rH\x00R\x05limit\x88\x01\x01\x12\x16\n\x06offset\x18\x02 \x01(\rR\x06offset\x12\x35\n\x05order\x18\x03 \x01(\x0e\x32\x1a.sift.rules.v1.SearchOrderH\x01R\x05order\x88\x01\x01\x12!\n\x0cname_matches\x18\x04 \x01(\tR\x0bnameMatches\x12%\n\x0e\x63\x61se_sensitive\x18\x05 \x01(\x08R\rcaseSensitive\x12\x16\n\x06regexp\x18\x06 \x01(\x08R\x06regexp\x12\x1e\n\x08order_by\x18\x07 \x01(\tH\x02R\x07orderBy\x88\x01\x01\x12\x19\n\x08rule_ids\x18\x08 \x03(\tR\x07ruleIds\x12\x1b\n\tasset_ids\x18\t \x03(\tR\x08\x61ssetIdsB\x08\n\x06_limitB\x08\n\x06_orderB\x0b\n\t_order_by\"`\n\x13SearchRulesResponse\x12\x19\n\x05\x63ount\x18\x01 \x01(\rB\x03\xe0\x41\x02R\x05\x63ount\x12.\n\x05rules\x18\x02 \x03(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x05rules\"R\n\x0eGetRuleRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x06ruleId\x12\"\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tclientKey\"?\n\x0fGetRuleResponse\x12,\n\x04rule\x18\x01 \x01(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x04rule\"\\\n\x14\x42\x61tchGetRulesRequest\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01R\x07ruleIds\x12$\n\x0b\x63lient_keys\x18\x02 \x03(\tB\x03\xe0\x41\x01R\nclientKeys\"G\n\x15\x42\x61tchGetRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x05rules\"R\n\x11\x43reateRuleRequest\x12=\n\x06update\x18\x01 \x01(\x0b\x32 .sift.rules.v1.UpdateRuleRequestB\x03\xe0\x41\x02R\x06update\"2\n\x12\x43reateRuleResponse\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\"\x8e\x03\n\x11UpdateRuleRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tH\x00R\x06ruleId\x88\x01\x01\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12\x1e\n\x08\x61sset_id\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12\"\n\nis_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x02R\tisEnabled\x12J\n\nconditions\x18\x06 \x03(\x0b\x32%.sift.rules.v1.UpdateConditionRequestB\x03\xe0\x41\x02R\nconditions\x12\'\n\x0forganization_id\x18\x07 \x01(\tR\x0eorganizationId\x12#\n\rversion_notes\x18\x08 \x01(\tR\x0cversionNotes\x12\"\n\nclient_key\x18\t \x01(\tH\x01R\tclientKey\x88\x01\x01\x42\n\n\x08_rule_idB\r\n\x0b_client_key\"\xf5\x01\n\x16UpdateConditionRequest\x12/\n\x11rule_condition_id\x18\x01 \x01(\tH\x00R\x0fruleConditionId\x88\x01\x01\x12K\n\nexpression\x18\x03 \x01(\x0b\x32&.sift.rules.v1.RuleConditionExpressionB\x03\xe0\x41\x02R\nexpression\x12\x41\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\".sift.rules.v1.UpdateActionRequestB\x03\xe0\x41\x02R\x07\x61\x63tionsB\x14\n\x12_rule_condition_idJ\x04\x08\x02\x10\x03\"\xe7\x01\n\x13UpdateActionRequest\x12)\n\x0erule_action_id\x18\x01 \x01(\tH\x00R\x0cruleActionId\x88\x01\x01\x12?\n\x0b\x61\x63tion_type\x18\x02 \x01(\x0e\x32\x19.sift.rules.v1.ActionKindB\x03\xe0\x41\x02R\nactionType\x12Q\n\rconfiguration\x18\x03 \x01(\x0b\x32&.sift.rules.v1.RuleActionConfigurationB\x03\xe0\x41\x02R\rconfigurationB\x11\n\x0f_rule_action_id\"2\n\x12UpdateRuleResponse\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\"U\n\x11\x44\x65leteRuleRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x06ruleId\x12\"\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tclientKey\"\x14\n\x12\x44\x65leteRuleResponse\"C\n\x1dViewHumanFriendlyRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId:\x02\x18\x01\"H\n\x1eViewHumanFriendlyRulesResponse\x12\"\n\nrules_json\x18\x01 \x01(\tB\x03\xe0\x41\x02R\trulesJson:\x02\x18\x01\"\x97\x01\n\x1fUpdateHumanFriendlyRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12\"\n\nrules_json\x18\x02 \x01(\tB\x03\xe0\x41\x02R\trulesJson\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId:\x02\x18\x01\"\x8c\x01\n UpdateHumanFriendlyRulesResponse\x12\x1d\n\x07success\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02R\x07success\x12$\n\x0brules_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\nrulesCount\x12\x1f\n\x08messages\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x08messages:\x02\x18\x01\"6\n\x14ViewJsonRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\";\n\x15ViewJsonRulesResponse\x12\"\n\nrules_json\x18\x01 \x01(\tB\x03\xe0\x41\x02R\trulesJson\"\x84\x01\n\x10JsonRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12\"\n\nrules_json\x18\x02 \x01(\tB\x03\xe0\x41\x02R\trulesJson\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\"\xc1\x02\n\x11JsonRulesResponse\x12\x1d\n\x07success\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02R\x07success\x12/\n\x11total_rules_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\x0ftotalRulesCount\x12\x33\n\x13rules_created_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesCreatedCount\x12\x33\n\x13rules_updated_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesUpdatedCount\x12\x33\n\x13rules_deleted_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesDeletedCount\x12*\n\x0e\x65rror_messages\x18\x06 \x01(\tH\x00R\rerrorMessages\x88\x01\x01\x42\x11\n\x0f_error_messages\"Z\n\x18ValidateJsonRulesRequest\x12>\n\x07request\x18\x01 \x01(\x0b\x32\x1f.sift.rules.v1.JsonRulesRequestB\x03\xe0\x41\x02R\x07request\"^\n\x19ValidateJsonRulesResponse\x12\x41\n\x08response\x18\x01 \x01(\x0b\x32 .sift.rules.v1.JsonRulesResponseB\x03\xe0\x41\x02R\x08response\"X\n\x16UpdateJsonRulesRequest\x12>\n\x07request\x18\x01 \x01(\x0b\x32\x1f.sift.rules.v1.JsonRulesRequestB\x03\xe0\x41\x02R\x07request\"\\\n\x17UpdateJsonRulesResponse\x12\x41\n\x08response\x18\x01 \x01(\x0b\x32 .sift.rules.v1.JsonRulesResponseB\x03\xe0\x41\x02R\x08response\"\x95\x01\n\x17ListRuleVersionsRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12 \n\tpage_size\x18\x02 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x16\n\x06\x66ilter\x18\x04 \x01(\tR\x06\x66ilter\"\xd6\x02\n\x0bRuleVersion\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12+\n\x0frule_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\x12\x1d\n\x07version\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x07version\x12\x42\n\x0c\x63reated_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x30\n\x12\x63reated_by_user_id\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12(\n\rversion_notes\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x0cversionNotes\x12=\n\x18generated_change_message\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x16generatedChangeMessage\"\x88\x01\n\x18ListRuleVersionsResponse\x12\x44\n\rrule_versions\x18\x01 \x03(\x0b\x32\x1a.sift.rules.v1.RuleVersionB\x03\xe0\x41\x02R\x0cruleVersions\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"D\n\x15GetRuleVersionRequest\x12+\n\x0frule_version_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\"F\n\x16GetRuleVersionResponse\x12,\n\x04rule\x18\x01 \x01(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x04rule\"L\n\x1b\x42\x61tchGetRuleVersionsRequest\x12-\n\x10rule_version_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x0eruleVersionIds\"N\n\x1c\x42\x61tchGetRuleVersionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x05rules\"\xf4\x01\n\x17RuleConditionExpression\x12r\n\x19single_channel_comparison\x18\x01 \x01(\x0b\x32\x30.sift.rules.v1.SingleChannelComparisonExpressionB\x02\x18\x01H\x00R\x17singleChannelComparison\x12W\n\x12\x63\x61lculated_channel\x18\x02 \x01(\x0b\x32&.sift.rules.v1.CalculatedChannelConfigH\x00R\x11\x63\x61lculatedChannelB\x0c\n\nexpression\"\xcb\x02\n!SingleChannelComparisonExpression\x12\x30\n\x11\x63hannel_component\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10\x63hannelComponent\x12&\n\x0c\x63hannel_name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0b\x63hannelName\x12G\n\ncomparator\x18\x03 \x01(\x0e\x32\".sift.rules.v1.ConditionComparatorB\x03\xe0\x41\x02R\ncomparator\x12\x18\n\x06\x64ouble\x18\x04 \x01(\x01H\x00R\x06\x64ouble\x12\x18\n\x06string\x18\x05 \x01(\tH\x00R\x06string\x12\x42\n\nlast_value\x18\x06 \x01(\x0b\x32!.sift.rules.v1.LastValueThresholdH\x00R\tlastValueB\x0b\n\tthreshold\"\x14\n\x12LastValueThreshold\"\x98\x02\n\x17\x43\x61lculatedChannelConfig\x12q\n\x12\x63hannel_references\x18\x01 \x03(\x0b\x32=.sift.rules.v1.CalculatedChannelConfig.ChannelReferencesEntryB\x03\xe0\x41\x02R\x11\x63hannelReferences\x12#\n\nexpression\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nexpression\x1a\x65\n\x16\x43hannelReferencesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32\x1f.sift.rules.v1.ChannelReferenceR\x05value:\x02\x38\x01\"N\n\x10\x43hannelReference\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12!\n\tcomponent\x18\x02 \x01(\tB\x03\xe0\x41\x02R\tcomponent\"\xd0\x01\n\x17RuleActionConfiguration\x12T\n\x0cnotification\x18\x01 \x01(\x0b\x32..sift.rules.v1.NotificationActionConfigurationH\x00R\x0cnotification\x12N\n\nannotation\x18\x02 \x01(\x0b\x32,.sift.rules.v1.AnnotationActionConfigurationH\x00R\nannotationB\x0f\n\rconfiguration\"T\n\x1fNotificationActionConfiguration\x12\x31\n\x12recipient_user_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x10recipientUserIds\"\xd7\x01\n\x1d\x41nnotationActionConfiguration\x12\x1c\n\x07tag_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x06tagIds\x12L\n\x0f\x61nnotation_type\x18\x02 \x01(\x0e\x32#.sift.annotations.v1.AnnotationTypeR\x0e\x61nnotationType\x12\x32\n\x13\x61ssigned_to_user_id\x18\x03 \x01(\tH\x00R\x10\x61ssignedToUserId\x88\x01\x01\x42\x16\n\x14_assigned_to_user_id\"\x8a\x02\n\x14\x45valuateRulesRequest\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x07ruleIds\x12X\n\x12\x61nnotation_options\x18\x02 \x01(\x0b\x32).sift.rules.v1.EvaluatedAnnotationOptionsR\x11\x61nnotationOptions\x12\x17\n\x06run_id\x18\x03 \x01(\tH\x00R\x05runId\x12>\n\ntime_range\x18\x04 \x01(\x0b\x32\x1d.sift.rules.v1.TimeRangeQueryH\x00R\ttimeRange\x12\x17\n\x07\x64ry_run\x18\x05 \x01(\x08R\x06\x64ryRunB\x06\n\x04time\"5\n\x1a\x45valuatedAnnotationOptions\x12\x17\n\x07tag_ids\x18\x01 \x03(\tR\x06tagIds\"\x82\x01\n\x0eTimeRangeQuery\x12\x39\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\"\xa2\x01\n\x15\x45valuateRulesResponse\x12\x38\n\x18\x63reated_annotation_count\x18\x01 \x01(\x05R\x16\x63reatedAnnotationCount\x12O\n\x13\x64ry_run_annotations\x18\x02 \x03(\x0b\x32\x1f.sift.rules.v1.DryRunAnnotationR\x11\x64ryRunAnnotations\"\xed\x01\n\x10\x44ryRunAnnotation\x12!\n\x0c\x63ondition_id\x18\x01 \x01(\tR\x0b\x63onditionId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x39\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12\x30\n\x14\x63ondition_version_id\x18\x05 \x01(\tR\x12\x63onditionVersionId*\\\n\x0bSearchOrder\x12 \n\x18SEARCH_ORDER_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\x14\n\x10SEARCH_ORDER_ASC\x10\x01\x12\x15\n\x11SEARCH_ORDER_DESC\x10\x02*O\n\nActionKind\x12\x1f\n\x17\x41\x43TION_KIND_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\x10\n\x0cNOTIFICATION\x10\x01\x12\x0e\n\nANNOTATION\x10\x02*\xad\x01\n\x13\x43onditionComparator\x12(\n CONDITION_COMPARATOR_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\r\n\tLESS_THAN\x10\x01\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\t\n\x05\x45QUAL\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x32\xae\x19\n\x0bRuleService\x12\xb9\x01\n\x0bSearchRules\x12!.sift.rules.v1.SearchRulesRequest\x1a\".sift.rules.v1.SearchRulesResponse\"c\x92\x41\x41\x12\x0bSearchRules\x1a\x32Queries rules based on provided search parameters.\x82\xd3\xe4\x93\x02\x19\"\x14/api/v1/rules/search:\x01*\x12\x94\x01\n\x07GetRule\x12\x1d.sift.rules.v1.GetRuleRequest\x1a\x1e.sift.rules.v1.GetRuleResponse\"J\x92\x41\x32\x12\x07GetRule\x1a\'Retrieves the latest version of a rule.\x82\xd3\xe4\x93\x02\x0f\x12\r/api/v1/rules\x12\xaa\x01\n\rBatchGetRules\x12#.sift.rules.v1.BatchGetRulesRequest\x1a$.sift.rules.v1.BatchGetRulesResponse\"N\x92\x41*\x12\rBatchGetRules\x1a\x19Retrieves multiple rules.\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v1/rules:batchGet:\x01*\x12\x8b\x01\n\nCreateRule\x12 .sift.rules.v1.CreateRuleRequest\x1a!.sift.rules.v1.CreateRuleResponse\"8\x92\x41\x1d\x12\nCreateRule\x1a\x0f\x43reates a rule.\x82\xd3\xe4\x93\x02\x12\"\r/api/v1/rules:\x01*\x12\x95\x01\n\nUpdateRule\x12 .sift.rules.v1.UpdateRuleRequest\x1a!.sift.rules.v1.UpdateRuleResponse\"B\x92\x41\'\x12\nUpdateRule\x1a\x19Updates an existing rule.\x82\xd3\xe4\x93\x02\x12\x1a\r/api/v1/rules:\x01*\x12\x92\x01\n\nDeleteRule\x12 .sift.rules.v1.DeleteRuleRequest\x1a!.sift.rules.v1.DeleteRuleResponse\"?\x92\x41\x1d\x12\nDeleteRule\x1a\x0f\x44\x65letes a rule.\x82\xd3\xe4\x93\x02\x19\"\x14/api/v1/rules/delete:\x01*\x12\xdb\x01\n\rEvaluateRules\x12#.sift.rules.v1.EvaluateRulesRequest\x1a$.sift.rules.v1.EvaluateRulesResponse\"\x7f\x92\x41[\x12\rEvaluateRules\x1aJEvaluates the provided rules and generate annotations based on the result.\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v1/rules/evaluate:\x01*\x12\x84\x02\n\x16ViewHumanFriendlyRules\x12,.sift.rules.v1.ViewHumanFriendlyRulesRequest\x1a-.sift.rules.v1.ViewHumanFriendlyRulesResponse\"\x8c\x01\x88\x02\x01\x92\x41_\x12\x16ViewHumanFriendlyRules\x1a\x45Retrieve a JSON object containing all of the rules for a given asset.\x82\xd3\xe4\x93\x02!\x12\x1f/api/v1/rules:viewHumanFriendly\x12\xd3\x01\n\rViewJsonRules\x12#.sift.rules.v1.ViewJsonRulesRequest\x1a$.sift.rules.v1.ViewJsonRulesResponse\"w\x92\x41V\x12\rViewJsonRules\x1a\x45Retrieve a JSON object containing all of the rules for a given asset.\x82\xd3\xe4\x93\x02\x18\x12\x16/api/v1/rules:viewJson\x12\x94\x02\n\x18UpdateHumanFriendlyRules\x12..sift.rules.v1.UpdateHumanFriendlyRulesRequest\x1a/.sift.rules.v1.UpdateHumanFriendlyRulesResponse\"\x96\x01\x88\x02\x01\x92\x41\x64\x12\x18UpdateHumanFriendlyRules\x1aHBatch update rules given the `rules_json` which is a JSON list of rules.\x82\xd3\xe4\x93\x02&\"!/api/v1/rules:updateHumanFriendly:\x01*\x12\xfd\x01\n\x11ValidateJsonRules\x12\'.sift.rules.v1.ValidateJsonRulesRequest\x1a(.sift.rules.v1.ValidateJsonRulesResponse\"\x94\x01\x92\x41l\x12\x11ValidateJsonRules\x1aWValidate a batch update for rules given the `rules_json` which is a JSON list of rules.\x82\xd3\xe4\x93\x02\x1f\"\x1a/api/v1/rules:validateJson:\x01*\x12\xe4\x01\n\x0fUpdateJsonRules\x12%.sift.rules.v1.UpdateJsonRulesRequest\x1a&.sift.rules.v1.UpdateJsonRulesResponse\"\x81\x01\x92\x41[\x12\x0fUpdateJsonRules\x1aHBatch update rules given the `rules_json` which is a JSON list of rules.\x82\xd3\xe4\x93\x02\x1d\"\x18/api/v1/rules:updateJson:\x01*\x12\xd9\x01\n\x10ListRuleVersions\x12&.sift.rules.v1.ListRuleVersionsRequest\x1a\'.sift.rules.v1.ListRuleVersionsResponse\"t\x92\x41I\x12\x10ListRuleVersions\x1a\x35Retrieves a list of rule versions for the given rule.\x82\xd3\xe4\x93\x02\"\x12 /api/v1/rules/{rule_id}/versions\x12\xb8\x01\n\x0eGetRuleVersion\x12$.sift.rules.v1.GetRuleVersionRequest\x1a%.sift.rules.v1.GetRuleVersionResponse\"Y\x92\x41\x39\x12\x0eGetRuleVersion\x1a\'Retrieves a specific version of a rule.\x82\xd3\xe4\x93\x02\x17\x12\x15/api/v1/rules:version\x12\xdf\x01\n\x14\x42\x61tchGetRuleVersions\x12*.sift.rules.v1.BatchGetRuleVersionsRequest\x1a+.sift.rules.v1.BatchGetRuleVersionsResponse\"n\x92\x41\x42\x12\x14\x42\x61tchGetRuleVersions\x1a*Retrieves multiple rules by rule versions.\x82\xd3\xe4\x93\x02#\"\x1e/api/v1/rules:batchGetVersions:\x01*\x1a\xb1\x01\x92\x41\xad\x01\x12\x30Service to programmatically interact with rules.\x1ay\n\x1fRead more about what rules are.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421102B\x88\x01\n\x11\x63om.sift.rules.v1B\nRulesProtoP\x01\xa2\x02\x03SRX\xaa\x02\rSift.Rules.V1\xca\x02\rSift\\Rules\\V1\xe2\x02\x19Sift\\Rules\\V1\\GPBMetadata\xea\x02\x0fSift::Rules::V1\x92\x41\x10\x12\x0e\n\x0cRule Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19sift/rules/v1/rules.proto\x12\rsift.rules.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a%sift/annotations/v1/annotations.proto\"\xd6\x05\n\x04Rule\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12 \n\x08\x61sset_id\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02R\x07\x61ssetId\x12\x17\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12\"\n\nis_enabled\x18\x06 \x01(\x08\x42\x03\xe0\x41\x02R\tisEnabled\x12\x42\n\x0c\x63reated_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\t \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\n \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12,\n\x0forganization_id\x18\x0b \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x41\n\nconditions\x18\x0c \x03(\x0b\x32\x1c.sift.rules.v1.RuleConditionB\x03\xe0\x41\x02R\nconditions\x12\x42\n\x0crule_version\x18\r \x01(\x0b\x32\x1a.sift.rules.v1.RuleVersionB\x03\xe0\x41\x02R\x0bruleVersion\x12\"\n\nclient_key\x18\x0e \x01(\tB\x03\xe0\x41\x01R\tclientKey\x12[\n\x13\x61sset_configuration\x18\x0f \x01(\x0b\x32%.sift.rules.v1.RuleAssetConfigurationB\x03\xe0\x41\x02R\x12\x61ssetConfigurationJ\x04\x08\x05\x10\x06\"\x9b\x04\n\rRuleCondition\x12/\n\x11rule_condition_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0fruleConditionId\x12\x1c\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12K\n\nexpression\x18\x03 \x01(\x0b\x32&.sift.rules.v1.RuleConditionExpressionB\x03\xe0\x41\x02R\nexpression\x12\x42\n\x0c\x63reated_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x38\n\x07\x61\x63tions\x18\t \x03(\x0b\x32\x19.sift.rules.v1.RuleActionB\x03\xe0\x41\x02R\x07\x61\x63tions\x12>\n\x19rule_condition_version_id\x18\n \x01(\tB\x03\xe0\x41\x02R\x16ruleConditionVersionIdJ\x04\x08\x04\x10\x05\"\xa6\x04\n\nRuleAction\x12)\n\x0erule_action_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0cruleActionId\x12/\n\x11rule_condition_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0fruleConditionId\x12?\n\x0b\x61\x63tion_type\x18\x03 \x01(\x0e\x32\x19.sift.rules.v1.ActionKindB\x03\xe0\x41\x02R\nactionType\x12Q\n\rconfiguration\x18\x04 \x01(\x0b\x32&.sift.rules.v1.RuleActionConfigurationB\x03\xe0\x41\x02R\rconfiguration\x12\x42\n\x0c\x63reated_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\x12\x30\n\x12\x63reated_by_user_id\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x38\n\x16rule_action_version_id\x18\t \x01(\tB\x03\xe0\x41\x02R\x13ruleActionVersionId\"N\n\x16RuleAssetConfiguration\x12\x1b\n\tasset_ids\x18\x01 \x03(\tR\x08\x61ssetIds\x12\x17\n\x07tag_ids\x18\x02 \x03(\tR\x06tagIds\"\xd9\x02\n\x12SearchRulesRequest\x12\x19\n\x05limit\x18\x01 \x01(\rH\x00R\x05limit\x88\x01\x01\x12\x16\n\x06offset\x18\x02 \x01(\rR\x06offset\x12\x35\n\x05order\x18\x03 \x01(\x0e\x32\x1a.sift.rules.v1.SearchOrderH\x01R\x05order\x88\x01\x01\x12!\n\x0cname_matches\x18\x04 \x01(\tR\x0bnameMatches\x12%\n\x0e\x63\x61se_sensitive\x18\x05 \x01(\x08R\rcaseSensitive\x12\x16\n\x06regexp\x18\x06 \x01(\x08R\x06regexp\x12\x1e\n\x08order_by\x18\x07 \x01(\tH\x02R\x07orderBy\x88\x01\x01\x12\x19\n\x08rule_ids\x18\x08 \x03(\tR\x07ruleIds\x12\x1b\n\tasset_ids\x18\t \x03(\tR\x08\x61ssetIdsB\x08\n\x06_limitB\x08\n\x06_orderB\x0b\n\t_order_by\"`\n\x13SearchRulesResponse\x12\x19\n\x05\x63ount\x18\x01 \x01(\rB\x03\xe0\x41\x02R\x05\x63ount\x12.\n\x05rules\x18\x02 \x03(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x05rules\"R\n\x0eGetRuleRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x06ruleId\x12\"\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tclientKey\"?\n\x0fGetRuleResponse\x12,\n\x04rule\x18\x01 \x01(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x04rule\"\\\n\x14\x42\x61tchGetRulesRequest\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01R\x07ruleIds\x12$\n\x0b\x63lient_keys\x18\x02 \x03(\tB\x03\xe0\x41\x01R\nclientKeys\"G\n\x15\x42\x61tchGetRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x05rules\"R\n\x11\x43reateRuleRequest\x12=\n\x06update\x18\x01 \x01(\x0b\x32 .sift.rules.v1.UpdateRuleRequestB\x03\xe0\x41\x02R\x06update\"2\n\x12\x43reateRuleResponse\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\"\xe8\x03\n\x11UpdateRuleRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tH\x00R\x06ruleId\x88\x01\x01\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0b\x64\x65scription\x12 \n\x08\x61sset_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01R\x07\x61ssetId\x12\"\n\nis_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x02R\tisEnabled\x12J\n\nconditions\x18\x06 \x03(\x0b\x32%.sift.rules.v1.UpdateConditionRequestB\x03\xe0\x41\x02R\nconditions\x12\'\n\x0forganization_id\x18\x07 \x01(\tR\x0eorganizationId\x12#\n\rversion_notes\x18\x08 \x01(\tR\x0cversionNotes\x12\"\n\nclient_key\x18\t \x01(\tH\x01R\tclientKey\x88\x01\x01\x12V\n\x13\x61sset_configuration\x18\n \x01(\x0b\x32%.sift.rules.v1.RuleAssetConfigurationR\x12\x61ssetConfigurationB\n\n\x08_rule_idB\r\n\x0b_client_key\"\xf5\x01\n\x16UpdateConditionRequest\x12/\n\x11rule_condition_id\x18\x01 \x01(\tH\x00R\x0fruleConditionId\x88\x01\x01\x12K\n\nexpression\x18\x03 \x01(\x0b\x32&.sift.rules.v1.RuleConditionExpressionB\x03\xe0\x41\x02R\nexpression\x12\x41\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\".sift.rules.v1.UpdateActionRequestB\x03\xe0\x41\x02R\x07\x61\x63tionsB\x14\n\x12_rule_condition_idJ\x04\x08\x02\x10\x03\"\xe7\x01\n\x13UpdateActionRequest\x12)\n\x0erule_action_id\x18\x01 \x01(\tH\x00R\x0cruleActionId\x88\x01\x01\x12?\n\x0b\x61\x63tion_type\x18\x02 \x01(\x0e\x32\x19.sift.rules.v1.ActionKindB\x03\xe0\x41\x02R\nactionType\x12Q\n\rconfiguration\x18\x03 \x01(\x0b\x32&.sift.rules.v1.RuleActionConfigurationB\x03\xe0\x41\x02R\rconfigurationB\x11\n\x0f_rule_action_id\"2\n\x12UpdateRuleResponse\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\"V\n\x17\x42\x61tchUpdateRulesRequest\x12;\n\x05rules\x18\x01 \x03(\x0b\x32 .sift.rules.v1.UpdateRuleRequestB\x03\xe0\x41\x02R\x05rules\"\xa3\x01\n\x18\x42\x61tchUpdateRulesResponse\x12\x1d\n\x07success\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02R\x07success\x12\x33\n\x13rules_created_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesCreatedCount\x12\x33\n\x13rules_updated_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesUpdatedCount\"U\n\x11\x44\x65leteRuleRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x01R\x06ruleId\x12\"\n\nclient_key\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tclientKey\"\x14\n\x12\x44\x65leteRuleResponse\"C\n\x1dViewHumanFriendlyRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId:\x02\x18\x01\"H\n\x1eViewHumanFriendlyRulesResponse\x12\"\n\nrules_json\x18\x01 \x01(\tB\x03\xe0\x41\x02R\trulesJson:\x02\x18\x01\"\x97\x01\n\x1fUpdateHumanFriendlyRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12\"\n\nrules_json\x18\x02 \x01(\tB\x03\xe0\x41\x02R\trulesJson\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId:\x02\x18\x01\"\x8c\x01\n UpdateHumanFriendlyRulesResponse\x12\x1d\n\x07success\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02R\x07success\x12$\n\x0brules_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\nrulesCount\x12\x1f\n\x08messages\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x08messages:\x02\x18\x01\"6\n\x14ViewJsonRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\";\n\x15ViewJsonRulesResponse\x12\"\n\nrules_json\x18\x01 \x01(\tB\x03\xe0\x41\x02R\trulesJson\"\x84\x01\n\x10JsonRulesRequest\x12\x1e\n\x08\x61sset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x07\x61ssetId\x12\"\n\nrules_json\x18\x02 \x01(\tB\x03\xe0\x41\x02R\trulesJson\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\"\xc1\x02\n\x11JsonRulesResponse\x12\x1d\n\x07success\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02R\x07success\x12/\n\x11total_rules_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\x0ftotalRulesCount\x12\x33\n\x13rules_created_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesCreatedCount\x12\x33\n\x13rules_updated_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesUpdatedCount\x12\x33\n\x13rules_deleted_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02R\x11rulesDeletedCount\x12*\n\x0e\x65rror_messages\x18\x06 \x01(\tH\x00R\rerrorMessages\x88\x01\x01\x42\x11\n\x0f_error_messages\"Z\n\x18ValidateJsonRulesRequest\x12>\n\x07request\x18\x01 \x01(\x0b\x32\x1f.sift.rules.v1.JsonRulesRequestB\x03\xe0\x41\x02R\x07request\"^\n\x19ValidateJsonRulesResponse\x12\x41\n\x08response\x18\x01 \x01(\x0b\x32 .sift.rules.v1.JsonRulesResponseB\x03\xe0\x41\x02R\x08response\"X\n\x16UpdateJsonRulesRequest\x12>\n\x07request\x18\x01 \x01(\x0b\x32\x1f.sift.rules.v1.JsonRulesRequestB\x03\xe0\x41\x02R\x07request\"\\\n\x17UpdateJsonRulesResponse\x12\x41\n\x08response\x18\x01 \x01(\x0b\x32 .sift.rules.v1.JsonRulesResponseB\x03\xe0\x41\x02R\x08response\"\x95\x01\n\x17ListRuleVersionsRequest\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12 \n\tpage_size\x18\x02 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x16\n\x06\x66ilter\x18\x04 \x01(\tR\x06\x66ilter\"\xd6\x02\n\x0bRuleVersion\x12\x1c\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06ruleId\x12+\n\x0frule_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\x12\x1d\n\x07version\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x07version\x12\x42\n\x0c\x63reated_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x30\n\x12\x63reated_by_user_id\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12(\n\rversion_notes\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x0cversionNotes\x12=\n\x18generated_change_message\x18\x07 \x01(\tB\x03\xe0\x41\x02R\x16generatedChangeMessage\"\x88\x01\n\x18ListRuleVersionsResponse\x12\x44\n\rrule_versions\x18\x01 \x03(\x0b\x32\x1a.sift.rules.v1.RuleVersionB\x03\xe0\x41\x02R\x0cruleVersions\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"D\n\x15GetRuleVersionRequest\x12+\n\x0frule_version_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rruleVersionId\"F\n\x16GetRuleVersionResponse\x12,\n\x04rule\x18\x01 \x01(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x04rule\"L\n\x1b\x42\x61tchGetRuleVersionsRequest\x12-\n\x10rule_version_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x0eruleVersionIds\"N\n\x1c\x42\x61tchGetRuleVersionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x13.sift.rules.v1.RuleB\x03\xe0\x41\x02R\x05rules\"\xf4\x01\n\x17RuleConditionExpression\x12r\n\x19single_channel_comparison\x18\x01 \x01(\x0b\x32\x30.sift.rules.v1.SingleChannelComparisonExpressionB\x02\x18\x01H\x00R\x17singleChannelComparison\x12W\n\x12\x63\x61lculated_channel\x18\x02 \x01(\x0b\x32&.sift.rules.v1.CalculatedChannelConfigH\x00R\x11\x63\x61lculatedChannelB\x0c\n\nexpression\"\xcb\x02\n!SingleChannelComparisonExpression\x12\x30\n\x11\x63hannel_component\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x10\x63hannelComponent\x12&\n\x0c\x63hannel_name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0b\x63hannelName\x12G\n\ncomparator\x18\x03 \x01(\x0e\x32\".sift.rules.v1.ConditionComparatorB\x03\xe0\x41\x02R\ncomparator\x12\x18\n\x06\x64ouble\x18\x04 \x01(\x01H\x00R\x06\x64ouble\x12\x18\n\x06string\x18\x05 \x01(\tH\x00R\x06string\x12\x42\n\nlast_value\x18\x06 \x01(\x0b\x32!.sift.rules.v1.LastValueThresholdH\x00R\tlastValueB\x0b\n\tthreshold\"\x14\n\x12LastValueThreshold\"\x98\x02\n\x17\x43\x61lculatedChannelConfig\x12q\n\x12\x63hannel_references\x18\x01 \x03(\x0b\x32=.sift.rules.v1.CalculatedChannelConfig.ChannelReferencesEntryB\x03\xe0\x41\x02R\x11\x63hannelReferences\x12#\n\nexpression\x18\x02 \x01(\tB\x03\xe0\x41\x02R\nexpression\x1a\x65\n\x16\x43hannelReferencesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32\x1f.sift.rules.v1.ChannelReferenceR\x05value:\x02\x38\x01\"N\n\x10\x43hannelReference\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12!\n\tcomponent\x18\x02 \x01(\tB\x03\xe0\x41\x02R\tcomponent\"\xd0\x01\n\x17RuleActionConfiguration\x12T\n\x0cnotification\x18\x01 \x01(\x0b\x32..sift.rules.v1.NotificationActionConfigurationH\x00R\x0cnotification\x12N\n\nannotation\x18\x02 \x01(\x0b\x32,.sift.rules.v1.AnnotationActionConfigurationH\x00R\nannotationB\x0f\n\rconfiguration\"T\n\x1fNotificationActionConfiguration\x12\x31\n\x12recipient_user_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x10recipientUserIds\"\xd7\x01\n\x1d\x41nnotationActionConfiguration\x12\x1c\n\x07tag_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x06tagIds\x12L\n\x0f\x61nnotation_type\x18\x02 \x01(\x0e\x32#.sift.annotations.v1.AnnotationTypeR\x0e\x61nnotationType\x12\x32\n\x13\x61ssigned_to_user_id\x18\x03 \x01(\tH\x00R\x10\x61ssignedToUserId\x88\x01\x01\x42\x16\n\x14_assigned_to_user_id\"\x8e\x02\n\x14\x45valuateRulesRequest\x12\x1e\n\x08rule_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02R\x07ruleIds\x12X\n\x12\x61nnotation_options\x18\x02 \x01(\x0b\x32).sift.rules.v1.EvaluatedAnnotationOptionsR\x11\x61nnotationOptions\x12\x17\n\x06run_id\x18\x03 \x01(\tH\x00R\x05runId\x12>\n\ntime_range\x18\x04 \x01(\x0b\x32\x1d.sift.rules.v1.TimeRangeQueryH\x00R\ttimeRange\x12\x17\n\x07\x64ry_run\x18\x05 \x01(\x08R\x06\x64ryRun:\x02\x18\x01\x42\x06\n\x04time\"5\n\x1a\x45valuatedAnnotationOptions\x12\x17\n\x07tag_ids\x18\x01 \x03(\tR\x06tagIds\"\x82\x01\n\x0eTimeRangeQuery\x12\x39\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\"\xfd\x01\n\x15\x45valuateRulesResponse\x12\x38\n\x18\x63reated_annotation_count\x18\x01 \x01(\x05R\x16\x63reatedAnnotationCount\x12O\n\x13\x64ry_run_annotations\x18\x02 \x03(\x0b\x32\x1f.sift.rules.v1.DryRunAnnotationR\x11\x64ryRunAnnotations\x12\x1a\n\x06job_id\x18\x03 \x01(\tH\x00R\x05jobId\x88\x01\x01\x12 \n\treport_id\x18\x04 \x01(\tH\x01R\x08reportId\x88\x01\x01:\x02\x18\x01\x42\t\n\x07_job_idB\x0c\n\n_report_id\"\xf7\x01\n\x10\x44ryRunAnnotation\x12!\n\x0c\x63ondition_id\x18\x01 \x01(\tR\x0b\x63onditionId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12>\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\tstartTime\x12:\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x07\x65ndTime\x12\x30\n\x14\x63ondition_version_id\x18\x05 \x01(\tR\x12\x63onditionVersionId*\\\n\x0bSearchOrder\x12 \n\x18SEARCH_ORDER_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\x14\n\x10SEARCH_ORDER_ASC\x10\x01\x12\x15\n\x11SEARCH_ORDER_DESC\x10\x02*O\n\nActionKind\x12\x1f\n\x17\x41\x43TION_KIND_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\x10\n\x0cNOTIFICATION\x10\x01\x12\x0e\n\nANNOTATION\x10\x02*\xad\x01\n\x13\x43onditionComparator\x12(\n CONDITION_COMPARATOR_UNSPECIFIED\x10\x00\x1a\x02\x08\x01\x12\r\n\tLESS_THAN\x10\x01\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\t\n\x05\x45QUAL\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x32\x8f\x1b\n\x0bRuleService\x12\xb9\x01\n\x0bSearchRules\x12!.sift.rules.v1.SearchRulesRequest\x1a\".sift.rules.v1.SearchRulesResponse\"c\x92\x41\x41\x12\x0bSearchRules\x1a\x32Queries rules based on provided search parameters.\x82\xd3\xe4\x93\x02\x19\"\x14/api/v1/rules/search:\x01*\x12\x94\x01\n\x07GetRule\x12\x1d.sift.rules.v1.GetRuleRequest\x1a\x1e.sift.rules.v1.GetRuleResponse\"J\x92\x41\x32\x12\x07GetRule\x1a\'Retrieves the latest version of a rule.\x82\xd3\xe4\x93\x02\x0f\x12\r/api/v1/rules\x12\xaa\x01\n\rBatchGetRules\x12#.sift.rules.v1.BatchGetRulesRequest\x1a$.sift.rules.v1.BatchGetRulesResponse\"N\x92\x41*\x12\rBatchGetRules\x1a\x19Retrieves multiple rules.\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v1/rules:batchGet:\x01*\x12\x8b\x01\n\nCreateRule\x12 .sift.rules.v1.CreateRuleRequest\x1a!.sift.rules.v1.CreateRuleResponse\"8\x92\x41\x1d\x12\nCreateRule\x1a\x0f\x43reates a rule.\x82\xd3\xe4\x93\x02\x12\"\r/api/v1/rules:\x01*\x12\x95\x01\n\nUpdateRule\x12 .sift.rules.v1.UpdateRuleRequest\x1a!.sift.rules.v1.UpdateRuleResponse\"B\x92\x41\'\x12\nUpdateRule\x1a\x19Updates an existing rule.\x82\xd3\xe4\x93\x02\x12\x1a\r/api/v1/rules:\x01*\x12\xda\x01\n\x10\x42\x61tchUpdateRules\x12&.sift.rules.v1.BatchUpdateRulesRequest\x1a\'.sift.rules.v1.BatchUpdateRulesResponse\"u\x92\x41N\x12\x10\x42\x61tchUpdateRules\x1a:Updates existing rules or creates rules that do not exist.\x82\xd3\xe4\x93\x02\x1e\x1a\x19/api/v1/rules:batchUpdate:\x01*\x12\x92\x01\n\nDeleteRule\x12 .sift.rules.v1.DeleteRuleRequest\x1a!.sift.rules.v1.DeleteRuleResponse\"?\x92\x41\x1d\x12\nDeleteRule\x1a\x0f\x44\x65letes a rule.\x82\xd3\xe4\x93\x02\x19\"\x14/api/v1/rules/delete:\x01*\x12\xdf\x01\n\rEvaluateRules\x12#.sift.rules.v1.EvaluateRulesRequest\x1a$.sift.rules.v1.EvaluateRulesResponse\"\x82\x01\x88\x02\x01\x92\x41[\x12\rEvaluateRules\x1aJEvaluates the provided rules and generate annotations based on the result.\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v1/rules/evaluate:\x01*\x12\x84\x02\n\x16ViewHumanFriendlyRules\x12,.sift.rules.v1.ViewHumanFriendlyRulesRequest\x1a-.sift.rules.v1.ViewHumanFriendlyRulesResponse\"\x8c\x01\x88\x02\x01\x92\x41_\x12\x16ViewHumanFriendlyRules\x1a\x45Retrieve a JSON object containing all of the rules for a given asset.\x82\xd3\xe4\x93\x02!\x12\x1f/api/v1/rules:viewHumanFriendly\x12\xd3\x01\n\rViewJsonRules\x12#.sift.rules.v1.ViewJsonRulesRequest\x1a$.sift.rules.v1.ViewJsonRulesResponse\"w\x92\x41V\x12\rViewJsonRules\x1a\x45Retrieve a JSON object containing all of the rules for a given asset.\x82\xd3\xe4\x93\x02\x18\x12\x16/api/v1/rules:viewJson\x12\x94\x02\n\x18UpdateHumanFriendlyRules\x12..sift.rules.v1.UpdateHumanFriendlyRulesRequest\x1a/.sift.rules.v1.UpdateHumanFriendlyRulesResponse\"\x96\x01\x88\x02\x01\x92\x41\x64\x12\x18UpdateHumanFriendlyRules\x1aHBatch update rules given the `rules_json` which is a JSON list of rules.\x82\xd3\xe4\x93\x02&\"!/api/v1/rules:updateHumanFriendly:\x01*\x12\xfd\x01\n\x11ValidateJsonRules\x12\'.sift.rules.v1.ValidateJsonRulesRequest\x1a(.sift.rules.v1.ValidateJsonRulesResponse\"\x94\x01\x92\x41l\x12\x11ValidateJsonRules\x1aWValidate a batch update for rules given the `rules_json` which is a JSON list of rules.\x82\xd3\xe4\x93\x02\x1f\"\x1a/api/v1/rules:validateJson:\x01*\x12\xe4\x01\n\x0fUpdateJsonRules\x12%.sift.rules.v1.UpdateJsonRulesRequest\x1a&.sift.rules.v1.UpdateJsonRulesResponse\"\x81\x01\x92\x41[\x12\x0fUpdateJsonRules\x1aHBatch update rules given the `rules_json` which is a JSON list of rules.\x82\xd3\xe4\x93\x02\x1d\"\x18/api/v1/rules:updateJson:\x01*\x12\xd9\x01\n\x10ListRuleVersions\x12&.sift.rules.v1.ListRuleVersionsRequest\x1a\'.sift.rules.v1.ListRuleVersionsResponse\"t\x92\x41I\x12\x10ListRuleVersions\x1a\x35Retrieves a list of rule versions for the given rule.\x82\xd3\xe4\x93\x02\"\x12 /api/v1/rules/{rule_id}/versions\x12\xb8\x01\n\x0eGetRuleVersion\x12$.sift.rules.v1.GetRuleVersionRequest\x1a%.sift.rules.v1.GetRuleVersionResponse\"Y\x92\x41\x39\x12\x0eGetRuleVersion\x1a\'Retrieves a specific version of a rule.\x82\xd3\xe4\x93\x02\x17\x12\x15/api/v1/rules:version\x12\xdf\x01\n\x14\x42\x61tchGetRuleVersions\x12*.sift.rules.v1.BatchGetRuleVersionsRequest\x1a+.sift.rules.v1.BatchGetRuleVersionsResponse\"n\x92\x41\x42\x12\x14\x42\x61tchGetRuleVersions\x1a*Retrieves multiple rules by rule versions.\x82\xd3\xe4\x93\x02#\"\x1e/api/v1/rules:batchGetVersions:\x01*\x1a\xb1\x01\x92\x41\xad\x01\x12\x30Service to programmatically interact with rules.\x1ay\n\x1fRead more about what rules are.\x12Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421102B\x88\x01\n\x11\x63om.sift.rules.v1B\nRulesProtoP\x01\xa2\x02\x03SRX\xaa\x02\rSift.Rules.V1\xca\x02\rSift\\Rules\\V1\xe2\x02\x19Sift\\Rules\\V1\\GPBMetadata\xea\x02\x0fSift::Rules::V1\x92\x41\x10\x12\x0e\n\x0cRule Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -36,7 +36,7 @@ _globals['_RULE'].fields_by_name['rule_id']._loaded_options = None _globals['_RULE'].fields_by_name['rule_id']._serialized_options = b'\340A\002' _globals['_RULE'].fields_by_name['asset_id']._loaded_options = None - _globals['_RULE'].fields_by_name['asset_id']._serialized_options = b'\340A\002' + _globals['_RULE'].fields_by_name['asset_id']._serialized_options = b'\030\001\340A\002' _globals['_RULE'].fields_by_name['name']._loaded_options = None _globals['_RULE'].fields_by_name['name']._serialized_options = b'\340A\002' _globals['_RULE'].fields_by_name['description']._loaded_options = None @@ -59,6 +59,8 @@ _globals['_RULE'].fields_by_name['rule_version']._serialized_options = b'\340A\002' _globals['_RULE'].fields_by_name['client_key']._loaded_options = None _globals['_RULE'].fields_by_name['client_key']._serialized_options = b'\340A\001' + _globals['_RULE'].fields_by_name['asset_configuration']._loaded_options = None + _globals['_RULE'].fields_by_name['asset_configuration']._serialized_options = b'\340A\002' _globals['_RULECONDITION'].fields_by_name['rule_condition_id']._loaded_options = None _globals['_RULECONDITION'].fields_by_name['rule_condition_id']._serialized_options = b'\340A\002' _globals['_RULECONDITION'].fields_by_name['rule_id']._loaded_options = None @@ -120,7 +122,7 @@ _globals['_UPDATERULEREQUEST'].fields_by_name['description']._loaded_options = None _globals['_UPDATERULEREQUEST'].fields_by_name['description']._serialized_options = b'\340A\002' _globals['_UPDATERULEREQUEST'].fields_by_name['asset_id']._loaded_options = None - _globals['_UPDATERULEREQUEST'].fields_by_name['asset_id']._serialized_options = b'\340A\002' + _globals['_UPDATERULEREQUEST'].fields_by_name['asset_id']._serialized_options = b'\030\001\340A\001' _globals['_UPDATERULEREQUEST'].fields_by_name['is_enabled']._loaded_options = None _globals['_UPDATERULEREQUEST'].fields_by_name['is_enabled']._serialized_options = b'\340A\002' _globals['_UPDATERULEREQUEST'].fields_by_name['conditions']._loaded_options = None @@ -135,6 +137,14 @@ _globals['_UPDATEACTIONREQUEST'].fields_by_name['configuration']._serialized_options = b'\340A\002' _globals['_UPDATERULERESPONSE'].fields_by_name['rule_id']._loaded_options = None _globals['_UPDATERULERESPONSE'].fields_by_name['rule_id']._serialized_options = b'\340A\002' + _globals['_BATCHUPDATERULESREQUEST'].fields_by_name['rules']._loaded_options = None + _globals['_BATCHUPDATERULESREQUEST'].fields_by_name['rules']._serialized_options = b'\340A\002' + _globals['_BATCHUPDATERULESRESPONSE'].fields_by_name['success']._loaded_options = None + _globals['_BATCHUPDATERULESRESPONSE'].fields_by_name['success']._serialized_options = b'\340A\002' + _globals['_BATCHUPDATERULESRESPONSE'].fields_by_name['rules_created_count']._loaded_options = None + _globals['_BATCHUPDATERULESRESPONSE'].fields_by_name['rules_created_count']._serialized_options = b'\340A\002' + _globals['_BATCHUPDATERULESRESPONSE'].fields_by_name['rules_updated_count']._loaded_options = None + _globals['_BATCHUPDATERULESRESPONSE'].fields_by_name['rules_updated_count']._serialized_options = b'\340A\002' _globals['_DELETERULEREQUEST'].fields_by_name['rule_id']._loaded_options = None _globals['_DELETERULEREQUEST'].fields_by_name['rule_id']._serialized_options = b'\340A\001' _globals['_DELETERULEREQUEST'].fields_by_name['client_key']._loaded_options = None @@ -245,6 +255,14 @@ _globals['_ANNOTATIONACTIONCONFIGURATION'].fields_by_name['tag_ids']._serialized_options = b'\340A\002' _globals['_EVALUATERULESREQUEST'].fields_by_name['rule_ids']._loaded_options = None _globals['_EVALUATERULESREQUEST'].fields_by_name['rule_ids']._serialized_options = b'\340A\002' + _globals['_EVALUATERULESREQUEST']._loaded_options = None + _globals['_EVALUATERULESREQUEST']._serialized_options = b'\030\001' + _globals['_EVALUATERULESRESPONSE']._loaded_options = None + _globals['_EVALUATERULESRESPONSE']._serialized_options = b'\030\001' + _globals['_DRYRUNANNOTATION'].fields_by_name['start_time']._loaded_options = None + _globals['_DRYRUNANNOTATION'].fields_by_name['start_time']._serialized_options = b'\340A\002' + _globals['_DRYRUNANNOTATION'].fields_by_name['end_time']._loaded_options = None + _globals['_DRYRUNANNOTATION'].fields_by_name['end_time']._serialized_options = b'\340A\002' _globals['_RULESERVICE']._loaded_options = None _globals['_RULESERVICE']._serialized_options = b'\222A\255\001\0220Service to programmatically interact with rules.\032y\n\037Read more about what rules are.\022Vhttps://customer.support.siftstack.com/servicedesk/customer/portal/2/article/265421102' _globals['_RULESERVICE'].methods_by_name['SearchRules']._loaded_options = None @@ -257,10 +275,12 @@ _globals['_RULESERVICE'].methods_by_name['CreateRule']._serialized_options = b'\222A\035\022\nCreateRule\032\017Creates a rule.\202\323\344\223\002\022\"\r/api/v1/rules:\001*' _globals['_RULESERVICE'].methods_by_name['UpdateRule']._loaded_options = None _globals['_RULESERVICE'].methods_by_name['UpdateRule']._serialized_options = b'\222A\'\022\nUpdateRule\032\031Updates an existing rule.\202\323\344\223\002\022\032\r/api/v1/rules:\001*' + _globals['_RULESERVICE'].methods_by_name['BatchUpdateRules']._loaded_options = None + _globals['_RULESERVICE'].methods_by_name['BatchUpdateRules']._serialized_options = b'\222AN\022\020BatchUpdateRules\032:Updates existing rules or creates rules that do not exist.\202\323\344\223\002\036\032\031/api/v1/rules:batchUpdate:\001*' _globals['_RULESERVICE'].methods_by_name['DeleteRule']._loaded_options = None _globals['_RULESERVICE'].methods_by_name['DeleteRule']._serialized_options = b'\222A\035\022\nDeleteRule\032\017Deletes a rule.\202\323\344\223\002\031\"\024/api/v1/rules/delete:\001*' _globals['_RULESERVICE'].methods_by_name['EvaluateRules']._loaded_options = None - _globals['_RULESERVICE'].methods_by_name['EvaluateRules']._serialized_options = b'\222A[\022\rEvaluateRules\032JEvaluates the provided rules and generate annotations based on the result.\202\323\344\223\002\033\"\026/api/v1/rules/evaluate:\001*' + _globals['_RULESERVICE'].methods_by_name['EvaluateRules']._serialized_options = b'\210\002\001\222A[\022\rEvaluateRules\032JEvaluates the provided rules and generate annotations based on the result.\202\323\344\223\002\033\"\026/api/v1/rules/evaluate:\001*' _globals['_RULESERVICE'].methods_by_name['ViewHumanFriendlyRules']._loaded_options = None _globals['_RULESERVICE'].methods_by_name['ViewHumanFriendlyRules']._serialized_options = b'\210\002\001\222A_\022\026ViewHumanFriendlyRules\032ERetrieve a JSON object containing all of the rules for a given asset.\202\323\344\223\002!\022\037/api/v1/rules:viewHumanFriendly' _globals['_RULESERVICE'].methods_by_name['ViewJsonRules']._loaded_options = None @@ -277,114 +297,118 @@ _globals['_RULESERVICE'].methods_by_name['GetRuleVersion']._serialized_options = b'\222A9\022\016GetRuleVersion\032\'Retrieves a specific version of a rule.\202\323\344\223\002\027\022\025/api/v1/rules:version' _globals['_RULESERVICE'].methods_by_name['BatchGetRuleVersions']._loaded_options = None _globals['_RULESERVICE'].methods_by_name['BatchGetRuleVersions']._serialized_options = b'\222AB\022\024BatchGetRuleVersions\032*Retrieves multiple rules by rule versions.\202\323\344\223\002#\"\036/api/v1/rules:batchGetVersions:\001*' - _globals['_SEARCHORDER']._serialized_start=8620 - _globals['_SEARCHORDER']._serialized_end=8712 - _globals['_ACTIONKIND']._serialized_start=8714 - _globals['_ACTIONKIND']._serialized_end=8793 - _globals['_CONDITIONCOMPARATOR']._serialized_start=8796 - _globals['_CONDITIONCOMPARATOR']._serialized_end=8969 + _globals['_SEARCHORDER']._serialized_start=9189 + _globals['_SEARCHORDER']._serialized_end=9281 + _globals['_ACTIONKIND']._serialized_start=9283 + _globals['_ACTIONKIND']._serialized_end=9362 + _globals['_CONDITIONCOMPARATOR']._serialized_start=9365 + _globals['_CONDITIONCOMPARATOR']._serialized_end=9538 _globals['_RULE']._serialized_start=228 - _globals['_RULE']._serialized_end=859 - _globals['_RULECONDITION']._serialized_start=862 - _globals['_RULECONDITION']._serialized_end=1401 - _globals['_RULEACTION']._serialized_start=1404 - _globals['_RULEACTION']._serialized_end=1954 - _globals['_RULEASSETCONFIGURATION']._serialized_start=1956 - _globals['_RULEASSETCONFIGURATION']._serialized_end=2009 - _globals['_SEARCHRULESREQUEST']._serialized_start=2012 - _globals['_SEARCHRULESREQUEST']._serialized_end=2357 - _globals['_SEARCHRULESRESPONSE']._serialized_start=2359 - _globals['_SEARCHRULESRESPONSE']._serialized_end=2455 - _globals['_GETRULEREQUEST']._serialized_start=2457 - _globals['_GETRULEREQUEST']._serialized_end=2539 - _globals['_GETRULERESPONSE']._serialized_start=2541 - _globals['_GETRULERESPONSE']._serialized_end=2604 - _globals['_BATCHGETRULESREQUEST']._serialized_start=2606 - _globals['_BATCHGETRULESREQUEST']._serialized_end=2698 - _globals['_BATCHGETRULESRESPONSE']._serialized_start=2700 - _globals['_BATCHGETRULESRESPONSE']._serialized_end=2771 - _globals['_CREATERULEREQUEST']._serialized_start=2773 - _globals['_CREATERULEREQUEST']._serialized_end=2855 - _globals['_CREATERULERESPONSE']._serialized_start=2857 - _globals['_CREATERULERESPONSE']._serialized_end=2907 - _globals['_UPDATERULEREQUEST']._serialized_start=2910 - _globals['_UPDATERULEREQUEST']._serialized_end=3308 - _globals['_UPDATECONDITIONREQUEST']._serialized_start=3311 - _globals['_UPDATECONDITIONREQUEST']._serialized_end=3556 - _globals['_UPDATEACTIONREQUEST']._serialized_start=3559 - _globals['_UPDATEACTIONREQUEST']._serialized_end=3790 - _globals['_UPDATERULERESPONSE']._serialized_start=3792 - _globals['_UPDATERULERESPONSE']._serialized_end=3842 - _globals['_DELETERULEREQUEST']._serialized_start=3844 - _globals['_DELETERULEREQUEST']._serialized_end=3929 - _globals['_DELETERULERESPONSE']._serialized_start=3931 - _globals['_DELETERULERESPONSE']._serialized_end=3951 - _globals['_VIEWHUMANFRIENDLYRULESREQUEST']._serialized_start=3953 - _globals['_VIEWHUMANFRIENDLYRULESREQUEST']._serialized_end=4020 - _globals['_VIEWHUMANFRIENDLYRULESRESPONSE']._serialized_start=4022 - _globals['_VIEWHUMANFRIENDLYRULESRESPONSE']._serialized_end=4094 - _globals['_UPDATEHUMANFRIENDLYRULESREQUEST']._serialized_start=4097 - _globals['_UPDATEHUMANFRIENDLYRULESREQUEST']._serialized_end=4248 - _globals['_UPDATEHUMANFRIENDLYRULESRESPONSE']._serialized_start=4251 - _globals['_UPDATEHUMANFRIENDLYRULESRESPONSE']._serialized_end=4391 - _globals['_VIEWJSONRULESREQUEST']._serialized_start=4393 - _globals['_VIEWJSONRULESREQUEST']._serialized_end=4447 - _globals['_VIEWJSONRULESRESPONSE']._serialized_start=4449 - _globals['_VIEWJSONRULESRESPONSE']._serialized_end=4508 - _globals['_JSONRULESREQUEST']._serialized_start=4511 - _globals['_JSONRULESREQUEST']._serialized_end=4643 - _globals['_JSONRULESRESPONSE']._serialized_start=4646 - _globals['_JSONRULESRESPONSE']._serialized_end=4967 - _globals['_VALIDATEJSONRULESREQUEST']._serialized_start=4969 - _globals['_VALIDATEJSONRULESREQUEST']._serialized_end=5059 - _globals['_VALIDATEJSONRULESRESPONSE']._serialized_start=5061 - _globals['_VALIDATEJSONRULESRESPONSE']._serialized_end=5155 - _globals['_UPDATEJSONRULESREQUEST']._serialized_start=5157 - _globals['_UPDATEJSONRULESREQUEST']._serialized_end=5245 - _globals['_UPDATEJSONRULESRESPONSE']._serialized_start=5247 - _globals['_UPDATEJSONRULESRESPONSE']._serialized_end=5339 - _globals['_LISTRULEVERSIONSREQUEST']._serialized_start=5342 - _globals['_LISTRULEVERSIONSREQUEST']._serialized_end=5491 - _globals['_RULEVERSION']._serialized_start=5494 - _globals['_RULEVERSION']._serialized_end=5836 - _globals['_LISTRULEVERSIONSRESPONSE']._serialized_start=5839 - _globals['_LISTRULEVERSIONSRESPONSE']._serialized_end=5975 - _globals['_GETRULEVERSIONREQUEST']._serialized_start=5977 - _globals['_GETRULEVERSIONREQUEST']._serialized_end=6045 - _globals['_GETRULEVERSIONRESPONSE']._serialized_start=6047 - _globals['_GETRULEVERSIONRESPONSE']._serialized_end=6117 - _globals['_BATCHGETRULEVERSIONSREQUEST']._serialized_start=6119 - _globals['_BATCHGETRULEVERSIONSREQUEST']._serialized_end=6195 - _globals['_BATCHGETRULEVERSIONSRESPONSE']._serialized_start=6197 - _globals['_BATCHGETRULEVERSIONSRESPONSE']._serialized_end=6275 - _globals['_RULECONDITIONEXPRESSION']._serialized_start=6278 - _globals['_RULECONDITIONEXPRESSION']._serialized_end=6522 - _globals['_SINGLECHANNELCOMPARISONEXPRESSION']._serialized_start=6525 - _globals['_SINGLECHANNELCOMPARISONEXPRESSION']._serialized_end=6856 - _globals['_LASTVALUETHRESHOLD']._serialized_start=6858 - _globals['_LASTVALUETHRESHOLD']._serialized_end=6878 - _globals['_CALCULATEDCHANNELCONFIG']._serialized_start=6881 - _globals['_CALCULATEDCHANNELCONFIG']._serialized_end=7161 - _globals['_CALCULATEDCHANNELCONFIG_CHANNELREFERENCESENTRY']._serialized_start=7060 - _globals['_CALCULATEDCHANNELCONFIG_CHANNELREFERENCESENTRY']._serialized_end=7161 - _globals['_CHANNELREFERENCE']._serialized_start=7163 - _globals['_CHANNELREFERENCE']._serialized_end=7241 - _globals['_RULEACTIONCONFIGURATION']._serialized_start=7244 - _globals['_RULEACTIONCONFIGURATION']._serialized_end=7452 - _globals['_NOTIFICATIONACTIONCONFIGURATION']._serialized_start=7454 - _globals['_NOTIFICATIONACTIONCONFIGURATION']._serialized_end=7538 - _globals['_ANNOTATIONACTIONCONFIGURATION']._serialized_start=7541 - _globals['_ANNOTATIONACTIONCONFIGURATION']._serialized_end=7756 - _globals['_EVALUATERULESREQUEST']._serialized_start=7759 - _globals['_EVALUATERULESREQUEST']._serialized_end=8025 - _globals['_EVALUATEDANNOTATIONOPTIONS']._serialized_start=8027 - _globals['_EVALUATEDANNOTATIONOPTIONS']._serialized_end=8080 - _globals['_TIMERANGEQUERY']._serialized_start=8083 - _globals['_TIMERANGEQUERY']._serialized_end=8213 - _globals['_EVALUATERULESRESPONSE']._serialized_start=8216 - _globals['_EVALUATERULESRESPONSE']._serialized_end=8378 - _globals['_DRYRUNANNOTATION']._serialized_start=8381 - _globals['_DRYRUNANNOTATION']._serialized_end=8618 - _globals['_RULESERVICE']._serialized_start=8972 - _globals['_RULESERVICE']._serialized_end=12218 + _globals['_RULE']._serialized_end=954 + _globals['_RULECONDITION']._serialized_start=957 + _globals['_RULECONDITION']._serialized_end=1496 + _globals['_RULEACTION']._serialized_start=1499 + _globals['_RULEACTION']._serialized_end=2049 + _globals['_RULEASSETCONFIGURATION']._serialized_start=2051 + _globals['_RULEASSETCONFIGURATION']._serialized_end=2129 + _globals['_SEARCHRULESREQUEST']._serialized_start=2132 + _globals['_SEARCHRULESREQUEST']._serialized_end=2477 + _globals['_SEARCHRULESRESPONSE']._serialized_start=2479 + _globals['_SEARCHRULESRESPONSE']._serialized_end=2575 + _globals['_GETRULEREQUEST']._serialized_start=2577 + _globals['_GETRULEREQUEST']._serialized_end=2659 + _globals['_GETRULERESPONSE']._serialized_start=2661 + _globals['_GETRULERESPONSE']._serialized_end=2724 + _globals['_BATCHGETRULESREQUEST']._serialized_start=2726 + _globals['_BATCHGETRULESREQUEST']._serialized_end=2818 + _globals['_BATCHGETRULESRESPONSE']._serialized_start=2820 + _globals['_BATCHGETRULESRESPONSE']._serialized_end=2891 + _globals['_CREATERULEREQUEST']._serialized_start=2893 + _globals['_CREATERULEREQUEST']._serialized_end=2975 + _globals['_CREATERULERESPONSE']._serialized_start=2977 + _globals['_CREATERULERESPONSE']._serialized_end=3027 + _globals['_UPDATERULEREQUEST']._serialized_start=3030 + _globals['_UPDATERULEREQUEST']._serialized_end=3518 + _globals['_UPDATECONDITIONREQUEST']._serialized_start=3521 + _globals['_UPDATECONDITIONREQUEST']._serialized_end=3766 + _globals['_UPDATEACTIONREQUEST']._serialized_start=3769 + _globals['_UPDATEACTIONREQUEST']._serialized_end=4000 + _globals['_UPDATERULERESPONSE']._serialized_start=4002 + _globals['_UPDATERULERESPONSE']._serialized_end=4052 + _globals['_BATCHUPDATERULESREQUEST']._serialized_start=4054 + _globals['_BATCHUPDATERULESREQUEST']._serialized_end=4140 + _globals['_BATCHUPDATERULESRESPONSE']._serialized_start=4143 + _globals['_BATCHUPDATERULESRESPONSE']._serialized_end=4306 + _globals['_DELETERULEREQUEST']._serialized_start=4308 + _globals['_DELETERULEREQUEST']._serialized_end=4393 + _globals['_DELETERULERESPONSE']._serialized_start=4395 + _globals['_DELETERULERESPONSE']._serialized_end=4415 + _globals['_VIEWHUMANFRIENDLYRULESREQUEST']._serialized_start=4417 + _globals['_VIEWHUMANFRIENDLYRULESREQUEST']._serialized_end=4484 + _globals['_VIEWHUMANFRIENDLYRULESRESPONSE']._serialized_start=4486 + _globals['_VIEWHUMANFRIENDLYRULESRESPONSE']._serialized_end=4558 + _globals['_UPDATEHUMANFRIENDLYRULESREQUEST']._serialized_start=4561 + _globals['_UPDATEHUMANFRIENDLYRULESREQUEST']._serialized_end=4712 + _globals['_UPDATEHUMANFRIENDLYRULESRESPONSE']._serialized_start=4715 + _globals['_UPDATEHUMANFRIENDLYRULESRESPONSE']._serialized_end=4855 + _globals['_VIEWJSONRULESREQUEST']._serialized_start=4857 + _globals['_VIEWJSONRULESREQUEST']._serialized_end=4911 + _globals['_VIEWJSONRULESRESPONSE']._serialized_start=4913 + _globals['_VIEWJSONRULESRESPONSE']._serialized_end=4972 + _globals['_JSONRULESREQUEST']._serialized_start=4975 + _globals['_JSONRULESREQUEST']._serialized_end=5107 + _globals['_JSONRULESRESPONSE']._serialized_start=5110 + _globals['_JSONRULESRESPONSE']._serialized_end=5431 + _globals['_VALIDATEJSONRULESREQUEST']._serialized_start=5433 + _globals['_VALIDATEJSONRULESREQUEST']._serialized_end=5523 + _globals['_VALIDATEJSONRULESRESPONSE']._serialized_start=5525 + _globals['_VALIDATEJSONRULESRESPONSE']._serialized_end=5619 + _globals['_UPDATEJSONRULESREQUEST']._serialized_start=5621 + _globals['_UPDATEJSONRULESREQUEST']._serialized_end=5709 + _globals['_UPDATEJSONRULESRESPONSE']._serialized_start=5711 + _globals['_UPDATEJSONRULESRESPONSE']._serialized_end=5803 + _globals['_LISTRULEVERSIONSREQUEST']._serialized_start=5806 + _globals['_LISTRULEVERSIONSREQUEST']._serialized_end=5955 + _globals['_RULEVERSION']._serialized_start=5958 + _globals['_RULEVERSION']._serialized_end=6300 + _globals['_LISTRULEVERSIONSRESPONSE']._serialized_start=6303 + _globals['_LISTRULEVERSIONSRESPONSE']._serialized_end=6439 + _globals['_GETRULEVERSIONREQUEST']._serialized_start=6441 + _globals['_GETRULEVERSIONREQUEST']._serialized_end=6509 + _globals['_GETRULEVERSIONRESPONSE']._serialized_start=6511 + _globals['_GETRULEVERSIONRESPONSE']._serialized_end=6581 + _globals['_BATCHGETRULEVERSIONSREQUEST']._serialized_start=6583 + _globals['_BATCHGETRULEVERSIONSREQUEST']._serialized_end=6659 + _globals['_BATCHGETRULEVERSIONSRESPONSE']._serialized_start=6661 + _globals['_BATCHGETRULEVERSIONSRESPONSE']._serialized_end=6739 + _globals['_RULECONDITIONEXPRESSION']._serialized_start=6742 + _globals['_RULECONDITIONEXPRESSION']._serialized_end=6986 + _globals['_SINGLECHANNELCOMPARISONEXPRESSION']._serialized_start=6989 + _globals['_SINGLECHANNELCOMPARISONEXPRESSION']._serialized_end=7320 + _globals['_LASTVALUETHRESHOLD']._serialized_start=7322 + _globals['_LASTVALUETHRESHOLD']._serialized_end=7342 + _globals['_CALCULATEDCHANNELCONFIG']._serialized_start=7345 + _globals['_CALCULATEDCHANNELCONFIG']._serialized_end=7625 + _globals['_CALCULATEDCHANNELCONFIG_CHANNELREFERENCESENTRY']._serialized_start=7524 + _globals['_CALCULATEDCHANNELCONFIG_CHANNELREFERENCESENTRY']._serialized_end=7625 + _globals['_CHANNELREFERENCE']._serialized_start=7627 + _globals['_CHANNELREFERENCE']._serialized_end=7705 + _globals['_RULEACTIONCONFIGURATION']._serialized_start=7708 + _globals['_RULEACTIONCONFIGURATION']._serialized_end=7916 + _globals['_NOTIFICATIONACTIONCONFIGURATION']._serialized_start=7918 + _globals['_NOTIFICATIONACTIONCONFIGURATION']._serialized_end=8002 + _globals['_ANNOTATIONACTIONCONFIGURATION']._serialized_start=8005 + _globals['_ANNOTATIONACTIONCONFIGURATION']._serialized_end=8220 + _globals['_EVALUATERULESREQUEST']._serialized_start=8223 + _globals['_EVALUATERULESREQUEST']._serialized_end=8493 + _globals['_EVALUATEDANNOTATIONOPTIONS']._serialized_start=8495 + _globals['_EVALUATEDANNOTATIONOPTIONS']._serialized_end=8548 + _globals['_TIMERANGEQUERY']._serialized_start=8551 + _globals['_TIMERANGEQUERY']._serialized_end=8681 + _globals['_EVALUATERULESRESPONSE']._serialized_start=8684 + _globals['_EVALUATERULESRESPONSE']._serialized_end=8937 + _globals['_DRYRUNANNOTATION']._serialized_start=8940 + _globals['_DRYRUNANNOTATION']._serialized_end=9187 + _globals['_RULESERVICE']._serialized_start=9541 + _globals['_RULESERVICE']._serialized_end=13012 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/rules/v1/rules_pb2.pyi b/python/lib/sift/rules/v1/rules_pb2.pyi index b291797d..aec24a42 100644 --- a/python/lib/sift/rules/v1/rules_pb2.pyi +++ b/python/lib/sift/rules/v1/rules_pb2.pyi @@ -104,6 +104,7 @@ class Rule(google.protobuf.message.Message): CONDITIONS_FIELD_NUMBER: builtins.int RULE_VERSION_FIELD_NUMBER: builtins.int CLIENT_KEY_FIELD_NUMBER: builtins.int + ASSET_CONFIGURATION_FIELD_NUMBER: builtins.int rule_id: builtins.str asset_id: builtins.str name: builtins.str @@ -122,6 +123,8 @@ class Rule(google.protobuf.message.Message): def conditions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RuleCondition]: ... @property def rule_version(self) -> global___RuleVersion: ... + @property + def asset_configuration(self) -> global___RuleAssetConfiguration: ... def __init__( self, *, @@ -138,9 +141,10 @@ class Rule(google.protobuf.message.Message): conditions: collections.abc.Iterable[global___RuleCondition] | None = ..., rule_version: global___RuleVersion | None = ..., client_key: builtins.str = ..., + asset_configuration: global___RuleAssetConfiguration | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["created_date", b"created_date", "modified_date", b"modified_date", "rule_version", b"rule_version"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["asset_id", b"asset_id", "client_key", b"client_key", "conditions", b"conditions", "created_by_user_id", b"created_by_user_id", "created_date", b"created_date", "description", b"description", "is_enabled", b"is_enabled", "modified_by_user_id", b"modified_by_user_id", "modified_date", b"modified_date", "name", b"name", "organization_id", b"organization_id", "rule_id", b"rule_id", "rule_version", b"rule_version"]) -> None: ... + def HasField(self, field_name: typing.Literal["asset_configuration", b"asset_configuration", "created_date", b"created_date", "modified_date", b"modified_date", "rule_version", b"rule_version"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["asset_configuration", b"asset_configuration", "asset_id", b"asset_id", "client_key", b"client_key", "conditions", b"conditions", "created_by_user_id", b"created_by_user_id", "created_date", b"created_date", "description", b"description", "is_enabled", b"is_enabled", "modified_by_user_id", b"modified_by_user_id", "modified_date", b"modified_date", "name", b"name", "organization_id", b"organization_id", "rule_id", b"rule_id", "rule_version", b"rule_version"]) -> None: ... global___Rule = Rule @@ -236,14 +240,18 @@ class RuleAssetConfiguration(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ASSET_IDS_FIELD_NUMBER: builtins.int + TAG_IDS_FIELD_NUMBER: builtins.int @property def asset_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + @property + def tag_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... def __init__( self, *, asset_ids: collections.abc.Iterable[builtins.str] | None = ..., + tag_ids: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["asset_ids", b"asset_ids"]) -> None: ... + def ClearField(self, field_name: typing.Literal["asset_ids", b"asset_ids", "tag_ids", b"tag_ids"]) -> None: ... global___RuleAssetConfiguration = RuleAssetConfiguration @@ -445,16 +453,20 @@ class UpdateRuleRequest(google.protobuf.message.Message): ORGANIZATION_ID_FIELD_NUMBER: builtins.int VERSION_NOTES_FIELD_NUMBER: builtins.int CLIENT_KEY_FIELD_NUMBER: builtins.int + ASSET_CONFIGURATION_FIELD_NUMBER: builtins.int rule_id: builtins.str name: builtins.str description: builtins.str asset_id: builtins.str + """Deprecated - use asset_configuration instead.""" is_enabled: builtins.bool organization_id: builtins.str version_notes: builtins.str client_key: builtins.str @property def conditions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UpdateConditionRequest]: ... + @property + def asset_configuration(self) -> global___RuleAssetConfiguration: ... def __init__( self, *, @@ -467,9 +479,10 @@ class UpdateRuleRequest(google.protobuf.message.Message): organization_id: builtins.str = ..., version_notes: builtins.str = ..., client_key: builtins.str | None = ..., + asset_configuration: global___RuleAssetConfiguration | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["_client_key", b"_client_key", "_rule_id", b"_rule_id", "client_key", b"client_key", "rule_id", b"rule_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_client_key", b"_client_key", "_rule_id", b"_rule_id", "asset_id", b"asset_id", "client_key", b"client_key", "conditions", b"conditions", "description", b"description", "is_enabled", b"is_enabled", "name", b"name", "organization_id", b"organization_id", "rule_id", b"rule_id", "version_notes", b"version_notes"]) -> None: ... + def HasField(self, field_name: typing.Literal["_client_key", b"_client_key", "_rule_id", b"_rule_id", "asset_configuration", b"asset_configuration", "client_key", b"client_key", "rule_id", b"rule_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_client_key", b"_client_key", "_rule_id", b"_rule_id", "asset_configuration", b"asset_configuration", "asset_id", b"asset_id", "client_key", b"client_key", "conditions", b"conditions", "description", b"description", "is_enabled", b"is_enabled", "name", b"name", "organization_id", b"organization_id", "rule_id", b"rule_id", "version_notes", b"version_notes"]) -> None: ... @typing.overload def WhichOneof(self, oneof_group: typing.Literal["_client_key", b"_client_key"]) -> typing.Literal["client_key"] | None: ... @typing.overload @@ -541,6 +554,45 @@ class UpdateRuleResponse(google.protobuf.message.Message): global___UpdateRuleResponse = UpdateRuleResponse +@typing.final +class BatchUpdateRulesRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RULES_FIELD_NUMBER: builtins.int + @property + def rules(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UpdateRuleRequest]: + """rules are limited 1000 rules at a time""" + + def __init__( + self, + *, + rules: collections.abc.Iterable[global___UpdateRuleRequest] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["rules", b"rules"]) -> None: ... + +global___BatchUpdateRulesRequest = BatchUpdateRulesRequest + +@typing.final +class BatchUpdateRulesResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SUCCESS_FIELD_NUMBER: builtins.int + RULES_CREATED_COUNT_FIELD_NUMBER: builtins.int + RULES_UPDATED_COUNT_FIELD_NUMBER: builtins.int + success: builtins.bool + rules_created_count: builtins.int + rules_updated_count: builtins.int + def __init__( + self, + *, + success: builtins.bool = ..., + rules_created_count: builtins.int = ..., + rules_updated_count: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["rules_created_count", b"rules_created_count", "rules_updated_count", b"rules_updated_count", "success", b"success"]) -> None: ... + +global___BatchUpdateRulesResponse = BatchUpdateRulesResponse + @typing.final class DeleteRuleRequest(google.protobuf.message.Message): """DeleteRuleRequest is used to delete a rule by rule_id or client_key. If both are provided, only rule_id will be used.""" @@ -1144,6 +1196,8 @@ global___AnnotationActionConfiguration = AnnotationActionConfiguration @typing.final class EvaluateRulesRequest(google.protobuf.message.Message): + """Deprecated - use RuleEvaluationService instead.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor RULE_IDS_FIELD_NUMBER: builtins.int @@ -1213,11 +1267,18 @@ global___TimeRangeQuery = TimeRangeQuery @typing.final class EvaluateRulesResponse(google.protobuf.message.Message): + """Deprecated - use RuleEvaluationService instead.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor CREATED_ANNOTATION_COUNT_FIELD_NUMBER: builtins.int DRY_RUN_ANNOTATIONS_FIELD_NUMBER: builtins.int + JOB_ID_FIELD_NUMBER: builtins.int + REPORT_ID_FIELD_NUMBER: builtins.int created_annotation_count: builtins.int + job_id: builtins.str + """job_id and report_id will be set if the job has an extended run time and is being processed asynchronously.""" + report_id: builtins.str @property def dry_run_annotations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DryRunAnnotation]: """If dry_run is true, this will be populated with the annotations that would be created""" @@ -1227,8 +1288,15 @@ class EvaluateRulesResponse(google.protobuf.message.Message): *, created_annotation_count: builtins.int = ..., dry_run_annotations: collections.abc.Iterable[global___DryRunAnnotation] | None = ..., + job_id: builtins.str | None = ..., + report_id: builtins.str | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["created_annotation_count", b"created_annotation_count", "dry_run_annotations", b"dry_run_annotations"]) -> None: ... + 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: ... + def ClearField(self, field_name: typing.Literal["_job_id", b"_job_id", "_report_id", b"_report_id", "created_annotation_count", b"created_annotation_count", "dry_run_annotations", b"dry_run_annotations", "job_id", b"job_id", "report_id", b"report_id"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_job_id", b"_job_id"]) -> typing.Literal["job_id"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_report_id", b"_report_id"]) -> typing.Literal["report_id"] | None: ... global___EvaluateRulesResponse = EvaluateRulesResponse diff --git a/python/lib/sift/rules/v1/rules_pb2_grpc.py b/python/lib/sift/rules/v1/rules_pb2_grpc.py index 130b8077..7486db0d 100644 --- a/python/lib/sift/rules/v1/rules_pb2_grpc.py +++ b/python/lib/sift/rules/v1/rules_pb2_grpc.py @@ -39,6 +39,11 @@ def __init__(self, channel): request_serializer=sift_dot_rules_dot_v1_dot_rules__pb2.UpdateRuleRequest.SerializeToString, response_deserializer=sift_dot_rules_dot_v1_dot_rules__pb2.UpdateRuleResponse.FromString, ) + self.BatchUpdateRules = channel.unary_unary( + '/sift.rules.v1.RuleService/BatchUpdateRules', + request_serializer=sift_dot_rules_dot_v1_dot_rules__pb2.BatchUpdateRulesRequest.SerializeToString, + response_deserializer=sift_dot_rules_dot_v1_dot_rules__pb2.BatchUpdateRulesResponse.FromString, + ) self.DeleteRule = channel.unary_unary( '/sift.rules.v1.RuleService/DeleteRule', request_serializer=sift_dot_rules_dot_v1_dot_rules__pb2.DeleteRuleRequest.SerializeToString, @@ -129,6 +134,13 @@ def UpdateRule(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def BatchUpdateRules(self, request, context): + """Updates existing rules or creates rules that do not exist. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def DeleteRule(self, request, context): """Deletes a rule """ @@ -137,7 +149,7 @@ def DeleteRule(self, request, context): raise NotImplementedError('Method not implemented!') def EvaluateRules(self, request, context): - """Evaluates the provided rules and generate annotations based on the result. + """Deprecated - use RuleEvaluationService instead. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -227,6 +239,11 @@ def add_RuleServiceServicer_to_server(servicer, server): request_deserializer=sift_dot_rules_dot_v1_dot_rules__pb2.UpdateRuleRequest.FromString, response_serializer=sift_dot_rules_dot_v1_dot_rules__pb2.UpdateRuleResponse.SerializeToString, ), + 'BatchUpdateRules': grpc.unary_unary_rpc_method_handler( + servicer.BatchUpdateRules, + request_deserializer=sift_dot_rules_dot_v1_dot_rules__pb2.BatchUpdateRulesRequest.FromString, + response_serializer=sift_dot_rules_dot_v1_dot_rules__pb2.BatchUpdateRulesResponse.SerializeToString, + ), 'DeleteRule': grpc.unary_unary_rpc_method_handler( servicer.DeleteRule, request_deserializer=sift_dot_rules_dot_v1_dot_rules__pb2.DeleteRuleRequest.FromString, @@ -372,6 +389,23 @@ def UpdateRule(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def BatchUpdateRules(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/sift.rules.v1.RuleService/BatchUpdateRules', + sift_dot_rules_dot_v1_dot_rules__pb2.BatchUpdateRulesRequest.SerializeToString, + sift_dot_rules_dot_v1_dot_rules__pb2.BatchUpdateRulesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def DeleteRule(request, target, diff --git a/python/lib/sift/rules/v1/rules_pb2_grpc.pyi b/python/lib/sift/rules/v1/rules_pb2_grpc.pyi index 4dfb24fe..c91041b0 100644 --- a/python/lib/sift/rules/v1/rules_pb2_grpc.pyi +++ b/python/lib/sift/rules/v1/rules_pb2_grpc.pyi @@ -56,6 +56,12 @@ class RuleServiceStub: ] """Updates an existing rule.""" + BatchUpdateRules: grpc.UnaryUnaryMultiCallable[ + sift.rules.v1.rules_pb2.BatchUpdateRulesRequest, + sift.rules.v1.rules_pb2.BatchUpdateRulesResponse, + ] + """Updates existing rules or creates rules that do not exist.""" + DeleteRule: grpc.UnaryUnaryMultiCallable[ sift.rules.v1.rules_pb2.DeleteRuleRequest, sift.rules.v1.rules_pb2.DeleteRuleResponse, @@ -66,7 +72,7 @@ class RuleServiceStub: sift.rules.v1.rules_pb2.EvaluateRulesRequest, sift.rules.v1.rules_pb2.EvaluateRulesResponse, ] - """Evaluates the provided rules and generate annotations based on the result.""" + """Deprecated - use RuleEvaluationService instead.""" ViewHumanFriendlyRules: grpc.UnaryUnaryMultiCallable[ sift.rules.v1.rules_pb2.ViewHumanFriendlyRulesRequest, @@ -147,6 +153,12 @@ class RuleServiceAsyncStub: ] """Updates an existing rule.""" + BatchUpdateRules: grpc.aio.UnaryUnaryMultiCallable[ + sift.rules.v1.rules_pb2.BatchUpdateRulesRequest, + sift.rules.v1.rules_pb2.BatchUpdateRulesResponse, + ] + """Updates existing rules or creates rules that do not exist.""" + DeleteRule: grpc.aio.UnaryUnaryMultiCallable[ sift.rules.v1.rules_pb2.DeleteRuleRequest, sift.rules.v1.rules_pb2.DeleteRuleResponse, @@ -157,7 +169,7 @@ class RuleServiceAsyncStub: sift.rules.v1.rules_pb2.EvaluateRulesRequest, sift.rules.v1.rules_pb2.EvaluateRulesResponse, ] - """Evaluates the provided rules and generate annotations based on the result.""" + """Deprecated - use RuleEvaluationService instead.""" ViewHumanFriendlyRules: grpc.aio.UnaryUnaryMultiCallable[ sift.rules.v1.rules_pb2.ViewHumanFriendlyRulesRequest, @@ -248,6 +260,14 @@ class RuleServiceServicer(metaclass=abc.ABCMeta): ) -> typing.Union[sift.rules.v1.rules_pb2.UpdateRuleResponse, collections.abc.Awaitable[sift.rules.v1.rules_pb2.UpdateRuleResponse]]: """Updates an existing rule.""" + @abc.abstractmethod + def BatchUpdateRules( + self, + request: sift.rules.v1.rules_pb2.BatchUpdateRulesRequest, + context: _ServicerContext, + ) -> typing.Union[sift.rules.v1.rules_pb2.BatchUpdateRulesResponse, collections.abc.Awaitable[sift.rules.v1.rules_pb2.BatchUpdateRulesResponse]]: + """Updates existing rules or creates rules that do not exist.""" + @abc.abstractmethod def DeleteRule( self, @@ -262,7 +282,7 @@ class RuleServiceServicer(metaclass=abc.ABCMeta): request: sift.rules.v1.rules_pb2.EvaluateRulesRequest, context: _ServicerContext, ) -> typing.Union[sift.rules.v1.rules_pb2.EvaluateRulesResponse, collections.abc.Awaitable[sift.rules.v1.rules_pb2.EvaluateRulesResponse]]: - """Evaluates the provided rules and generate annotations based on the result.""" + """Deprecated - use RuleEvaluationService instead.""" @abc.abstractmethod def ViewHumanFriendlyRules( diff --git a/python/lib/sift/saved_searches/v1/saved_searches_pb2.py b/python/lib/sift/saved_searches/v1/saved_searches_pb2.py index f158890a..af7bdae7 100644 --- a/python/lib/sift/saved_searches/v1/saved_searches_pb2.py +++ b/python/lib/sift/saved_searches/v1/saved_searches_pb2.py @@ -19,7 +19,7 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+sift/saved_searches/v1/saved_searches.proto\x12\x16sift.saved_searches.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xc5\x03\n\x0bSavedSearch\x12+\n\x0fsaved_search_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rsavedSearchId\x12,\n\x0forganization_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x17\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x04name\x12R\n\nproperties\x18\x04 \x01(\x0b\x32-.sift.saved_searches.v1.SavedSearchPropertiesB\x03\xe0\x41\x02R\nproperties\x12\x30\n\x12\x63reated_by_user_id\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\"\xdd\x05\n\x15SavedSearchProperties\x12(\n\roverview_mode\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0coverviewMode\x12)\n\x0bsearch_term\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00R\nsearchTerm\x88\x01\x01\x12J\n\x0e\x66rom_date_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x01R\x0c\x66romDateTime\x88\x01\x01\x12\x46\n\x0cto_date_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02R\ntoDateTime\x88\x01\x01\x12S\n\x0b\x61sset_items\x18\x05 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\nassetItems\x12Q\n\nuser_items\x18\x06 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\tuserItems\x12O\n\ttag_items\x18\x07 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x08tagItems\x12]\n\x10\x61nnotation_items\x18\x08 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x0f\x61nnotationItems\x12O\n\trun_items\x18\t \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x08runItemsB\x0e\n\x0c_search_termB\x11\n\x0f_from_date_timeB\x0f\n\r_to_date_time\"E\n\x15SavedSearchFilterItem\x12\x13\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x02id\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\"D\n\x15GetSavedSearchRequest\x12+\n\x0fsaved_search_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rsavedSearchId\"e\n\x16GetSavedSearchResponse\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch\"\xab\x01\n\x18ListSavedSearchesRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"\x8f\x01\n\x19ListSavedSearchesResponse\x12J\n\x0esaved_searches\x18\x01 \x03(\x0b\x32#.sift.saved_searches.v1.SavedSearchR\rsavedSearches\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xb5\x01\n\x18\x43reateSavedSearchRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12R\n\nproperties\x18\x02 \x01(\x0b\x32-.sift.saved_searches.v1.SavedSearchPropertiesB\x03\xe0\x41\x02R\nproperties\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"h\n\x19\x43reateSavedSearchResponse\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch\"G\n\x18\x44\x65leteSavedSearchRequest\x12+\n\x0fsaved_search_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rsavedSearchId\"\x1b\n\x19\x44\x65leteSavedSearchResponse\"K\n\x1f\x42\x61tchDeleteSavedSearchesRequest\x12(\n\x10saved_search_ids\x18\x01 \x03(\tR\x0esavedSearchIds\"\"\n BatchDeleteSavedSearchesResponse\"\xa9\x01\n\x18UpdateSavedSearchRequest\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"h\n\x19UpdateSavedSearchResponse\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch2\xdf\n\n\x12SavedSearchService\x12\xce\x01\n\x0eGetSavedSearch\x12-.sift.saved_searches.v1.GetSavedSearchRequest\x1a..sift.saved_searches.v1.GetSavedSearchResponse\"]\x92\x41*\x12\x0eGetSavedSearch\x1a\x18Retrieve a saved search.\x82\xd3\xe4\x93\x02*\x12(/api/v1/saved_searches/{saved_search_id}\x12\xc9\x01\n\x11\x43reateSavedSearch\x12\x30.sift.saved_searches.v1.CreateSavedSearchRequest\x1a\x31.sift.saved_searches.v1.CreateSavedSearchResponse\"O\x92\x41+\x12\x11\x43reateSavedSearch\x1a\x16\x43reate a saved search.\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v1/saved_searches:\x01*\x12\xc4\x01\n\x11ListSavedSearches\x12\x30.sift.saved_searches.v1.ListSavedSearchesRequest\x1a\x31.sift.saved_searches.v1.ListSavedSearchesResponse\"J\x92\x41)\x12\x11ListSavedSearches\x1a\x14List saved searches.\x82\xd3\xe4\x93\x02\x18\x12\x16/api/v1/saved_searches\x12\x8f\x02\n\x11UpdateSavedSearch\x12\x30.sift.saved_searches.v1.UpdateSavedSearchRequest\x1a\x31.sift.saved_searches.v1.UpdateSavedSearchResponse\"\x94\x01\x92\x41p\x12\x11UpdateSavedSearch\x1a[Updates an existing saved search using using the list of fields specified in `update_mask`.\x82\xd3\xe4\x93\x02\x1b\x32\x16/api/v1/saved_searches:\x01*\x12\xd8\x01\n\x11\x44\x65leteSavedSearch\x12\x30.sift.saved_searches.v1.DeleteSavedSearchRequest\x1a\x31.sift.saved_searches.v1.DeleteSavedSearchResponse\"^\x92\x41+\x12\x11\x44\x65leteSavedSearch\x1a\x16\x44\x65lete a saved search.\x82\xd3\xe4\x93\x02**(/api/v1/saved_searches/{saved_search_id}\x12\xf7\x01\n\x18\x42\x61tchDeleteSavedSearches\x12\x37.sift.saved_searches.v1.BatchDeleteSavedSearchesRequest\x1a\x38.sift.saved_searches.v1.BatchDeleteSavedSearchesResponse\"h\x92\x41\x38\x12\x18\x42\x61tchDeleteSavedSearches\x1a\x1c\x42\x61tch delete saved searches.\x82\xd3\xe4\x93\x02\'\"\"/api/v1/saved_searches:batchDelete:\x01*B\xc0\x01\n\x1a\x63om.sift.saved_searches.v1B\x12SavedSearchesProtoP\x01\xa2\x02\x03SSX\xaa\x02\x15Sift.SavedSearches.V1\xca\x02\x15Sift\\SavedSearches\\V1\xe2\x02!Sift\\SavedSearches\\V1\\GPBMetadata\xea\x02\x17Sift::SavedSearches::V1\x92\x41\x17\x12\x15\n\x13SavedSearch serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+sift/saved_searches/v1/saved_searches.proto\x12\x16sift.saved_searches.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xc5\x03\n\x0bSavedSearch\x12+\n\x0fsaved_search_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rsavedSearchId\x12,\n\x0forganization_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x0eorganizationId\x12\x17\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x04name\x12R\n\nproperties\x18\x04 \x01(\x0b\x32-.sift.saved_searches.v1.SavedSearchPropertiesB\x03\xe0\x41\x02R\nproperties\x12\x30\n\x12\x63reated_by_user_id\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x0f\x63reatedByUserId\x12\x32\n\x13modified_by_user_id\x18\x06 \x01(\tB\x03\xe0\x41\x02R\x10modifiedByUserId\x12\x42\n\x0c\x63reated_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0b\x63reatedDate\x12\x44\n\rmodified_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02R\x0cmodifiedDate\"\xc5\x06\n\x15SavedSearchProperties\x12(\n\roverview_mode\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0coverviewMode\x12)\n\x0bsearch_term\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00R\nsearchTerm\x88\x01\x01\x12J\n\x0e\x66rom_date_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x01R\x0c\x66romDateTime\x88\x01\x01\x12\x46\n\x0cto_date_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02R\ntoDateTime\x88\x01\x01\x12S\n\x0b\x61sset_items\x18\x05 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\nassetItems\x12Q\n\nuser_items\x18\x06 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\tuserItems\x12O\n\ttag_items\x18\x07 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x08tagItems\x12]\n\x10\x61nnotation_items\x18\x08 \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x0f\x61nnotationItems\x12O\n\trun_items\x18\t \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x08runItems\x12\x66\n\x15report_template_items\x18\n \x03(\x0b\x32-.sift.saved_searches.v1.SavedSearchFilterItemB\x03\xe0\x41\x01R\x13reportTemplateItemsB\x0e\n\x0c_search_termB\x11\n\x0f_from_date_timeB\x0f\n\r_to_date_time\"E\n\x15SavedSearchFilterItem\x12\x13\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x02id\x12\x17\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x04name\"D\n\x15GetSavedSearchRequest\x12+\n\x0fsaved_search_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rsavedSearchId\"e\n\x16GetSavedSearchResponse\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch\"\xab\x01\n\x18ListSavedSearchesRequest\x12 \n\tpage_size\x18\x01 \x01(\rB\x03\xe0\x41\x01R\x08pageSize\x12\"\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01R\tpageToken\x12\x1b\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x06\x66ilter\x12,\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"\x8f\x01\n\x19ListSavedSearchesResponse\x12J\n\x0esaved_searches\x18\x01 \x03(\x0b\x32#.sift.saved_searches.v1.SavedSearchR\rsavedSearches\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xb5\x01\n\x18\x43reateSavedSearchRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12R\n\nproperties\x18\x02 \x01(\x0b\x32-.sift.saved_searches.v1.SavedSearchPropertiesB\x03\xe0\x41\x02R\nproperties\x12,\n\x0forganization_id\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x0eorganizationId\"h\n\x19\x43reateSavedSearchResponse\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch\"G\n\x18\x44\x65leteSavedSearchRequest\x12+\n\x0fsaved_search_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\rsavedSearchId\"\x1b\n\x19\x44\x65leteSavedSearchResponse\"K\n\x1f\x42\x61tchDeleteSavedSearchesRequest\x12(\n\x10saved_search_ids\x18\x01 \x03(\tR\x0esavedSearchIds\"\"\n BatchDeleteSavedSearchesResponse\"\xa9\x01\n\x18UpdateSavedSearchRequest\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch\x12@\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02R\nupdateMask\"h\n\x19UpdateSavedSearchResponse\x12K\n\x0csaved_search\x18\x01 \x01(\x0b\x32#.sift.saved_searches.v1.SavedSearchB\x03\xe0\x41\x02R\x0bsavedSearch2\xdf\n\n\x12SavedSearchService\x12\xce\x01\n\x0eGetSavedSearch\x12-.sift.saved_searches.v1.GetSavedSearchRequest\x1a..sift.saved_searches.v1.GetSavedSearchResponse\"]\x92\x41*\x12\x0eGetSavedSearch\x1a\x18Retrieve a saved search.\x82\xd3\xe4\x93\x02*\x12(/api/v1/saved_searches/{saved_search_id}\x12\xc9\x01\n\x11\x43reateSavedSearch\x12\x30.sift.saved_searches.v1.CreateSavedSearchRequest\x1a\x31.sift.saved_searches.v1.CreateSavedSearchResponse\"O\x92\x41+\x12\x11\x43reateSavedSearch\x1a\x16\x43reate a saved search.\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v1/saved_searches:\x01*\x12\xc4\x01\n\x11ListSavedSearches\x12\x30.sift.saved_searches.v1.ListSavedSearchesRequest\x1a\x31.sift.saved_searches.v1.ListSavedSearchesResponse\"J\x92\x41)\x12\x11ListSavedSearches\x1a\x14List saved searches.\x82\xd3\xe4\x93\x02\x18\x12\x16/api/v1/saved_searches\x12\x8f\x02\n\x11UpdateSavedSearch\x12\x30.sift.saved_searches.v1.UpdateSavedSearchRequest\x1a\x31.sift.saved_searches.v1.UpdateSavedSearchResponse\"\x94\x01\x92\x41p\x12\x11UpdateSavedSearch\x1a[Updates an existing saved search using using the list of fields specified in `update_mask`.\x82\xd3\xe4\x93\x02\x1b\x32\x16/api/v1/saved_searches:\x01*\x12\xd8\x01\n\x11\x44\x65leteSavedSearch\x12\x30.sift.saved_searches.v1.DeleteSavedSearchRequest\x1a\x31.sift.saved_searches.v1.DeleteSavedSearchResponse\"^\x92\x41+\x12\x11\x44\x65leteSavedSearch\x1a\x16\x44\x65lete a saved search.\x82\xd3\xe4\x93\x02**(/api/v1/saved_searches/{saved_search_id}\x12\xf7\x01\n\x18\x42\x61tchDeleteSavedSearches\x12\x37.sift.saved_searches.v1.BatchDeleteSavedSearchesRequest\x1a\x38.sift.saved_searches.v1.BatchDeleteSavedSearchesResponse\"h\x92\x41\x38\x12\x18\x42\x61tchDeleteSavedSearches\x1a\x1c\x42\x61tch delete saved searches.\x82\xd3\xe4\x93\x02\'\"\"/api/v1/saved_searches:batchDelete:\x01*B\xc0\x01\n\x1a\x63om.sift.saved_searches.v1B\x12SavedSearchesProtoP\x01\xa2\x02\x03SSX\xaa\x02\x15Sift.SavedSearches.V1\xca\x02\x15Sift\\SavedSearches\\V1\xe2\x02!Sift\\SavedSearches\\V1\\GPBMetadata\xea\x02\x17Sift::SavedSearches::V1\x92\x41\x17\x12\x15\n\x13SavedSearch serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -61,6 +61,8 @@ _globals['_SAVEDSEARCHPROPERTIES'].fields_by_name['annotation_items']._serialized_options = b'\340A\001' _globals['_SAVEDSEARCHPROPERTIES'].fields_by_name['run_items']._loaded_options = None _globals['_SAVEDSEARCHPROPERTIES'].fields_by_name['run_items']._serialized_options = b'\340A\001' + _globals['_SAVEDSEARCHPROPERTIES'].fields_by_name['report_template_items']._loaded_options = None + _globals['_SAVEDSEARCHPROPERTIES'].fields_by_name['report_template_items']._serialized_options = b'\340A\001' _globals['_SAVEDSEARCHFILTERITEM'].fields_by_name['id']._loaded_options = None _globals['_SAVEDSEARCHFILTERITEM'].fields_by_name['id']._serialized_options = b'\340A\002' _globals['_SAVEDSEARCHFILTERITEM'].fields_by_name['name']._loaded_options = None @@ -108,33 +110,33 @@ _globals['_SAVEDSEARCH']._serialized_start=250 _globals['_SAVEDSEARCH']._serialized_end=703 _globals['_SAVEDSEARCHPROPERTIES']._serialized_start=706 - _globals['_SAVEDSEARCHPROPERTIES']._serialized_end=1439 - _globals['_SAVEDSEARCHFILTERITEM']._serialized_start=1441 - _globals['_SAVEDSEARCHFILTERITEM']._serialized_end=1510 - _globals['_GETSAVEDSEARCHREQUEST']._serialized_start=1512 - _globals['_GETSAVEDSEARCHREQUEST']._serialized_end=1580 - _globals['_GETSAVEDSEARCHRESPONSE']._serialized_start=1582 - _globals['_GETSAVEDSEARCHRESPONSE']._serialized_end=1683 - _globals['_LISTSAVEDSEARCHESREQUEST']._serialized_start=1686 - _globals['_LISTSAVEDSEARCHESREQUEST']._serialized_end=1857 - _globals['_LISTSAVEDSEARCHESRESPONSE']._serialized_start=1860 - _globals['_LISTSAVEDSEARCHESRESPONSE']._serialized_end=2003 - _globals['_CREATESAVEDSEARCHREQUEST']._serialized_start=2006 - _globals['_CREATESAVEDSEARCHREQUEST']._serialized_end=2187 - _globals['_CREATESAVEDSEARCHRESPONSE']._serialized_start=2189 - _globals['_CREATESAVEDSEARCHRESPONSE']._serialized_end=2293 - _globals['_DELETESAVEDSEARCHREQUEST']._serialized_start=2295 - _globals['_DELETESAVEDSEARCHREQUEST']._serialized_end=2366 - _globals['_DELETESAVEDSEARCHRESPONSE']._serialized_start=2368 - _globals['_DELETESAVEDSEARCHRESPONSE']._serialized_end=2395 - _globals['_BATCHDELETESAVEDSEARCHESREQUEST']._serialized_start=2397 - _globals['_BATCHDELETESAVEDSEARCHESREQUEST']._serialized_end=2472 - _globals['_BATCHDELETESAVEDSEARCHESRESPONSE']._serialized_start=2474 - _globals['_BATCHDELETESAVEDSEARCHESRESPONSE']._serialized_end=2508 - _globals['_UPDATESAVEDSEARCHREQUEST']._serialized_start=2511 - _globals['_UPDATESAVEDSEARCHREQUEST']._serialized_end=2680 - _globals['_UPDATESAVEDSEARCHRESPONSE']._serialized_start=2682 - _globals['_UPDATESAVEDSEARCHRESPONSE']._serialized_end=2786 - _globals['_SAVEDSEARCHSERVICE']._serialized_start=2789 - _globals['_SAVEDSEARCHSERVICE']._serialized_end=4164 + _globals['_SAVEDSEARCHPROPERTIES']._serialized_end=1543 + _globals['_SAVEDSEARCHFILTERITEM']._serialized_start=1545 + _globals['_SAVEDSEARCHFILTERITEM']._serialized_end=1614 + _globals['_GETSAVEDSEARCHREQUEST']._serialized_start=1616 + _globals['_GETSAVEDSEARCHREQUEST']._serialized_end=1684 + _globals['_GETSAVEDSEARCHRESPONSE']._serialized_start=1686 + _globals['_GETSAVEDSEARCHRESPONSE']._serialized_end=1787 + _globals['_LISTSAVEDSEARCHESREQUEST']._serialized_start=1790 + _globals['_LISTSAVEDSEARCHESREQUEST']._serialized_end=1961 + _globals['_LISTSAVEDSEARCHESRESPONSE']._serialized_start=1964 + _globals['_LISTSAVEDSEARCHESRESPONSE']._serialized_end=2107 + _globals['_CREATESAVEDSEARCHREQUEST']._serialized_start=2110 + _globals['_CREATESAVEDSEARCHREQUEST']._serialized_end=2291 + _globals['_CREATESAVEDSEARCHRESPONSE']._serialized_start=2293 + _globals['_CREATESAVEDSEARCHRESPONSE']._serialized_end=2397 + _globals['_DELETESAVEDSEARCHREQUEST']._serialized_start=2399 + _globals['_DELETESAVEDSEARCHREQUEST']._serialized_end=2470 + _globals['_DELETESAVEDSEARCHRESPONSE']._serialized_start=2472 + _globals['_DELETESAVEDSEARCHRESPONSE']._serialized_end=2499 + _globals['_BATCHDELETESAVEDSEARCHESREQUEST']._serialized_start=2501 + _globals['_BATCHDELETESAVEDSEARCHESREQUEST']._serialized_end=2576 + _globals['_BATCHDELETESAVEDSEARCHESRESPONSE']._serialized_start=2578 + _globals['_BATCHDELETESAVEDSEARCHESRESPONSE']._serialized_end=2612 + _globals['_UPDATESAVEDSEARCHREQUEST']._serialized_start=2615 + _globals['_UPDATESAVEDSEARCHREQUEST']._serialized_end=2784 + _globals['_UPDATESAVEDSEARCHRESPONSE']._serialized_start=2786 + _globals['_UPDATESAVEDSEARCHRESPONSE']._serialized_end=2890 + _globals['_SAVEDSEARCHSERVICE']._serialized_start=2893 + _globals['_SAVEDSEARCHSERVICE']._serialized_end=4268 # @@protoc_insertion_point(module_scope) diff --git a/python/lib/sift/saved_searches/v1/saved_searches_pb2.pyi b/python/lib/sift/saved_searches/v1/saved_searches_pb2.pyi index 06e299bd..dd0ec3bf 100644 --- a/python/lib/sift/saved_searches/v1/saved_searches_pb2.pyi +++ b/python/lib/sift/saved_searches/v1/saved_searches_pb2.pyi @@ -67,6 +67,7 @@ class SavedSearchProperties(google.protobuf.message.Message): TAG_ITEMS_FIELD_NUMBER: builtins.int ANNOTATION_ITEMS_FIELD_NUMBER: builtins.int RUN_ITEMS_FIELD_NUMBER: builtins.int + REPORT_TEMPLATE_ITEMS_FIELD_NUMBER: builtins.int overview_mode: builtins.str search_term: builtins.str @property @@ -83,6 +84,8 @@ class SavedSearchProperties(google.protobuf.message.Message): def annotation_items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SavedSearchFilterItem]: ... @property def run_items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SavedSearchFilterItem]: ... + @property + def report_template_items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SavedSearchFilterItem]: ... def __init__( self, *, @@ -95,9 +98,10 @@ class SavedSearchProperties(google.protobuf.message.Message): tag_items: collections.abc.Iterable[global___SavedSearchFilterItem] | None = ..., annotation_items: collections.abc.Iterable[global___SavedSearchFilterItem] | None = ..., run_items: collections.abc.Iterable[global___SavedSearchFilterItem] | None = ..., + report_template_items: collections.abc.Iterable[global___SavedSearchFilterItem] | None = ..., ) -> None: ... def HasField(self, field_name: typing.Literal["_from_date_time", b"_from_date_time", "_search_term", b"_search_term", "_to_date_time", b"_to_date_time", "from_date_time", b"from_date_time", "search_term", b"search_term", "to_date_time", b"to_date_time"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_from_date_time", b"_from_date_time", "_search_term", b"_search_term", "_to_date_time", b"_to_date_time", "annotation_items", b"annotation_items", "asset_items", b"asset_items", "from_date_time", b"from_date_time", "overview_mode", b"overview_mode", "run_items", b"run_items", "search_term", b"search_term", "tag_items", b"tag_items", "to_date_time", b"to_date_time", "user_items", b"user_items"]) -> None: ... + def ClearField(self, field_name: typing.Literal["_from_date_time", b"_from_date_time", "_search_term", b"_search_term", "_to_date_time", b"_to_date_time", "annotation_items", b"annotation_items", "asset_items", b"asset_items", "from_date_time", b"from_date_time", "overview_mode", b"overview_mode", "report_template_items", b"report_template_items", "run_items", b"run_items", "search_term", b"search_term", "tag_items", b"tag_items", "to_date_time", b"to_date_time", "user_items", b"user_items"]) -> None: ... @typing.overload def WhichOneof(self, oneof_group: typing.Literal["_from_date_time", b"_from_date_time"]) -> typing.Literal["from_date_time"] | None: ... @typing.overload @@ -305,7 +309,9 @@ class BatchDeleteSavedSearchesRequest(google.protobuf.message.Message): SAVED_SEARCH_IDS_FIELD_NUMBER: builtins.int @property - def saved_search_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def saved_search_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Limit of 1000 searches per batch""" + def __init__( self, *,