ruleset_service_request.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.contentwarehouse.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/contentwarehouse/v1/rule_engine.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/contentwarehouse/v1;contentwarehouse";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "RuleSetServiceRequestProto";
  22. option java_package = "com.google.cloud.contentwarehouse.v1";
  23. // Request message for RuleSetService.CreateRuleSet.
  24. message CreateRuleSetRequest {
  25. // Required. The parent name.
  26. // Format: projects/{project_number}/locations/{location}.
  27. string parent = 1 [
  28. (google.api.field_behavior) = REQUIRED,
  29. (google.api.resource_reference) = {
  30. type: "contentwarehouse.googleapis.com/Location"
  31. }
  32. ];
  33. // Required. The rule set to create.
  34. RuleSet rule_set = 2 [(google.api.field_behavior) = REQUIRED];
  35. }
  36. // Request message for RuleSetService.GetRuleSet.
  37. message GetRuleSetRequest {
  38. // Required. The name of the rule set to retrieve.
  39. // Format:
  40. // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
  41. string name = 1 [
  42. (google.api.field_behavior) = REQUIRED,
  43. (google.api.resource_reference) = {
  44. type: "contentwarehouse.googleapis.com/RuleSet"
  45. }
  46. ];
  47. }
  48. // Request message for RuleSetService.UpdateRuleSet.
  49. message UpdateRuleSetRequest {
  50. // Required. The name of the rule set to update.
  51. // Format:
  52. // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
  53. string name = 1 [
  54. (google.api.field_behavior) = REQUIRED,
  55. (google.api.resource_reference) = {
  56. type: "contentwarehouse.googleapis.com/RuleSet"
  57. }
  58. ];
  59. // Required. The rule set to update.
  60. RuleSet rule_set = 2 [(google.api.field_behavior) = REQUIRED];
  61. }
  62. // Request message for RuleSetService.DeleteRuleSet.
  63. message DeleteRuleSetRequest {
  64. // Required. The name of the rule set to delete.
  65. // Format:
  66. // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
  67. string name = 1 [
  68. (google.api.field_behavior) = REQUIRED,
  69. (google.api.resource_reference) = {
  70. type: "contentwarehouse.googleapis.com/RuleSet"
  71. }
  72. ];
  73. }
  74. // Request message for RuleSetService.ListRuleSets.
  75. message ListRuleSetsRequest {
  76. // Required. The parent, which owns this collection of document.
  77. // Format: projects/{project_number}/locations/{location}.
  78. string parent = 1 [
  79. (google.api.field_behavior) = REQUIRED,
  80. (google.api.resource_reference) = {
  81. type: "contentwarehouse.googleapis.com/Location"
  82. }
  83. ];
  84. // The maximum number of rule sets to return. The service may return
  85. // fewer than this value.
  86. // If unspecified, at most 50 rule sets will be returned.
  87. // The maximum value is 1000; values above 1000 will be coerced to 1000.
  88. int32 page_size = 2;
  89. // A page token, received from a previous `ListRuleSets` call.
  90. // Provide this to retrieve the subsequent page.
  91. //
  92. // When paginating, all other parameters provided to `ListRuleSets`
  93. // must match the call that provided the page token.
  94. string page_token = 3;
  95. }
  96. // Response message for RuleSetService.ListRuleSets.
  97. message ListRuleSetsResponse {
  98. // The rule sets from the specified parent.
  99. repeated RuleSet rule_sets = 1;
  100. // A token, which can be sent as `page_token` to retrieve the next page.
  101. // If this field is omitted, there are no subsequent pages.
  102. string next_page_token = 2;
  103. }