123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- syntax = "proto3";
- package google.cloud.contentwarehouse.v1;
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/iam/v1/policy.proto";
- option go_package = "google.golang.org/genproto/googleapis/cloud/contentwarehouse/v1;contentwarehouse";
- option java_multiple_files = true;
- option java_outer_classname = "RuleEngineProto";
- option java_package = "com.google.cloud.contentwarehouse.v1";
- message RuleSet {
- option (google.api.resource) = {
- type: "contentwarehouse.googleapis.com/RuleSet"
- pattern: "projects/{project}/locations/{location}/ruleSets/{rule_set}"
- };
-
-
-
-
-
- string name = 6;
-
- string description = 1;
-
- string source = 2;
-
- repeated Rule rules = 3;
- }
- message Rule {
- enum TriggerType {
- UNKNOWN = 0;
-
- ON_CREATE = 1;
-
- ON_UPDATE = 4;
- }
-
- string description = 1;
-
-
- string rule_id = 2;
-
- TriggerType trigger_type = 3;
-
-
-
-
- string condition = 4;
-
- repeated Action actions = 5;
- }
- message Action {
-
- string action_id = 1;
- oneof action {
-
- AccessControlAction access_control = 2;
-
- DataValidationAction data_validation = 3;
-
- DataUpdateAction data_update = 4;
-
- AddToFolderAction add_to_folder = 5;
-
- PublishAction publish_to_pub_sub = 6;
-
- RemoveFromFolderAction remove_from_folder_action = 9;
-
- DeleteDocumentAction delete_document_action = 10;
- }
- }
- message AccessControlAction {
-
- enum OperationType {
- UNKNOWN = 0;
-
- ADD_POLICY_BINDING = 1;
-
- REMOVE_POLICY_BINDING = 2;
-
- REPLACE_POLICY_BINDING = 3;
- }
-
- OperationType operation_type = 1;
-
-
-
- google.iam.v1.Policy policy = 2;
- }
- message DataValidationAction {
-
-
-
- map<string, string> conditions = 1;
- }
- message DataUpdateAction {
-
-
-
-
-
- map<string, string> entries = 1;
- }
- message AddToFolderAction {
-
-
-
- repeated string folders = 1 [(google.api.resource_reference) = {
- type: "contentwarehouse.googleapis.com/Document"
- }];
- }
- message RemoveFromFolderAction {
-
- string condition = 1;
-
-
-
- string folder = 2 [(google.api.resource_reference) = {
- type: "contentwarehouse.googleapis.com/Document"
- }];
- }
- message PublishAction {
-
-
- string topic_id = 1;
-
- repeated string messages = 2;
- }
- message DeleteDocumentAction {
-
-
- bool enable_hard_delete = 1;
- }
- message RuleEngineOutput {
-
- string document_name = 3;
-
- RuleEvaluatorOutput rule_evaluator_output = 1;
-
-
- ActionExecutorOutput action_executor_output = 2;
- }
- message RuleEvaluatorOutput {
-
- repeated Rule triggered_rules = 1;
-
- repeated Rule matched_rules = 2;
-
-
- repeated InvalidRule invalid_rules = 3;
- }
- message InvalidRule {
-
- Rule rule = 1;
-
- string error = 2;
- }
- message ActionExecutorOutput {
-
- repeated RuleActionsPair rule_actions_pairs = 1;
- }
- message RuleActionsPair {
-
- Rule rule = 1;
-
- repeated ActionOutput action_outputs = 2;
- }
- message ActionOutput {
-
- enum State {
- UNKNOWN = 0;
-
- ACTION_SUCCEEDED = 1;
-
- ACTION_FAILED = 2;
-
- ACTION_TIMED_OUT = 3;
-
- ACTION_PENDING = 4;
- }
-
- string action_id = 1;
-
- State action_state = 2;
-
- string output_message = 3;
- }
|