1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.contentwarehouse.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/contentwarehouse/v1/rule_engine.proto"; 22 23option csharp_namespace = "Google.Cloud.ContentWarehouse.V1"; 24option go_package = "cloud.google.com/go/contentwarehouse/apiv1/contentwarehousepb;contentwarehousepb"; 25option java_multiple_files = true; 26option java_outer_classname = "RuleSetServiceRequestProto"; 27option java_package = "com.google.cloud.contentwarehouse.v1"; 28option php_namespace = "Google\\Cloud\\ContentWarehouse\\V1"; 29option ruby_package = "Google::Cloud::ContentWarehouse::V1"; 30 31// Request message for RuleSetService.CreateRuleSet. 32message CreateRuleSetRequest { 33 // Required. The parent name. 34 // Format: projects/{project_number}/locations/{location}. 35 string parent = 1 [ 36 (google.api.field_behavior) = REQUIRED, 37 (google.api.resource_reference) = { 38 type: "contentwarehouse.googleapis.com/Location" 39 } 40 ]; 41 42 // Required. The rule set to create. 43 RuleSet rule_set = 2 [(google.api.field_behavior) = REQUIRED]; 44} 45 46// Request message for RuleSetService.GetRuleSet. 47message GetRuleSetRequest { 48 // Required. The name of the rule set to retrieve. 49 // Format: 50 // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. 51 string name = 1 [ 52 (google.api.field_behavior) = REQUIRED, 53 (google.api.resource_reference) = { 54 type: "contentwarehouse.googleapis.com/RuleSet" 55 } 56 ]; 57} 58 59// Request message for RuleSetService.UpdateRuleSet. 60message UpdateRuleSetRequest { 61 // Required. The name of the rule set to update. 62 // Format: 63 // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. 64 string name = 1 [ 65 (google.api.field_behavior) = REQUIRED, 66 (google.api.resource_reference) = { 67 type: "contentwarehouse.googleapis.com/RuleSet" 68 } 69 ]; 70 71 // Required. The rule set to update. 72 RuleSet rule_set = 2 [(google.api.field_behavior) = REQUIRED]; 73} 74 75// Request message for RuleSetService.DeleteRuleSet. 76message DeleteRuleSetRequest { 77 // Required. The name of the rule set to delete. 78 // Format: 79 // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. 80 string name = 1 [ 81 (google.api.field_behavior) = REQUIRED, 82 (google.api.resource_reference) = { 83 type: "contentwarehouse.googleapis.com/RuleSet" 84 } 85 ]; 86} 87 88// Request message for RuleSetService.ListRuleSets. 89message ListRuleSetsRequest { 90 // Required. The parent, which owns this collection of document. 91 // Format: projects/{project_number}/locations/{location}. 92 string parent = 1 [ 93 (google.api.field_behavior) = REQUIRED, 94 (google.api.resource_reference) = { 95 type: "contentwarehouse.googleapis.com/Location" 96 } 97 ]; 98 99 // The maximum number of rule sets to return. The service may return 100 // fewer than this value. 101 // If unspecified, at most 50 rule sets will be returned. 102 // The maximum value is 1000; values above 1000 will be coerced to 1000. 103 int32 page_size = 2; 104 105 // A page token, received from a previous `ListRuleSets` call. 106 // Provide this to retrieve the subsequent page. 107 // 108 // When paginating, all other parameters provided to `ListRuleSets` 109 // must match the call that provided the page token. 110 string page_token = 3; 111} 112 113// Response message for RuleSetService.ListRuleSets. 114message ListRuleSetsResponse { 115 // The rule sets from the specified parent. 116 repeated RuleSet rule_sets = 1; 117 118 // A token, which can be sent as `page_token` to retrieve the next page. 119 // If this field is omitted, there are no subsequent pages. 120 string next_page_token = 2; 121} 122