synonymset_service_request.proto 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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/synonymset.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 = "SynonymSetServiceRequestProto";
  22. option java_package = "com.google.cloud.contentwarehouse.v1";
  23. // Request message for SynonymSetService.CreateSynonymSet.
  24. message CreateSynonymSetRequest {
  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 synonymSet to be created for a context
  34. SynonymSet synonym_set = 2 [(google.api.field_behavior) = REQUIRED];
  35. }
  36. // Request message for SynonymSetService.GetSynonymSet.
  37. // Will return synonymSet for a certain context.
  38. message GetSynonymSetRequest {
  39. // Required. The name of the synonymSet to retrieve
  40. // Format:
  41. // projects/{project_number}/locations/{location}/synonymSets/{context}.
  42. string name = 1 [
  43. (google.api.field_behavior) = REQUIRED,
  44. (google.api.resource_reference) = {
  45. type: "contentwarehouse.googleapis.com/SynonymSet"
  46. }
  47. ];
  48. }
  49. // Request message for SynonymSetService.ListSynonymSets.
  50. // Will return all synonymSets belonging to the customer project.
  51. message ListSynonymSetsRequest {
  52. // Required. The parent name.
  53. // Format: projects/{project_number}/locations/{location}.
  54. string parent = 1 [
  55. (google.api.field_behavior) = REQUIRED,
  56. (google.api.resource_reference) = {
  57. type: "contentwarehouse.googleapis.com/Location"
  58. }
  59. ];
  60. // The maximum number of synonymSets to return. The service may return
  61. // fewer than this value.
  62. // If unspecified, at most 50 rule sets will be returned.
  63. // The maximum value is 1000; values above 1000 will be coerced to 1000.
  64. int32 page_size = 2;
  65. // A page token, received from a previous `ListSynonymSets` call.
  66. // Provide this to retrieve the subsequent page.
  67. //
  68. // When paginating, all other parameters provided to `ListSynonymSets`
  69. // must match the call that provided the page token.
  70. string page_token = 3;
  71. }
  72. // Response message for SynonymSetService.ListSynonymSets.
  73. message ListSynonymSetsResponse {
  74. // The synonymSets from the specified parent.
  75. repeated SynonymSet synonym_sets = 1;
  76. // A page token, received from a previous `ListSynonymSets` call.
  77. // Provide this to retrieve the subsequent page.
  78. string next_page_token = 2;
  79. }
  80. // Request message for SynonymSetService.UpdateSynonymSet.
  81. // Removes the SynonymSet for the specified context and replaces
  82. // it with the SynonymSet in this request.
  83. message UpdateSynonymSetRequest {
  84. // Required. The name of the synonymSet to update
  85. // Format:
  86. // projects/{project_number}/locations/{location}/synonymSets/{context}.
  87. string name = 1 [
  88. (google.api.field_behavior) = REQUIRED,
  89. (google.api.resource_reference) = {
  90. type: "contentwarehouse.googleapis.com/SynonymSet"
  91. }
  92. ];
  93. // Required. The synonymSet to be updated for the customer
  94. SynonymSet synonym_set = 2 [(google.api.field_behavior) = REQUIRED];
  95. }
  96. // Request message for SynonymSetService.DeleteSynonymSet.
  97. message DeleteSynonymSetRequest {
  98. // Required. The name of the synonymSet to delete
  99. // Format:
  100. // projects/{project_number}/locations/{location}/synonymSets/{context}.
  101. string name = 1 [
  102. (google.api.field_behavior) = REQUIRED,
  103. (google.api.resource_reference) = {
  104. type: "contentwarehouse.googleapis.com/SynonymSet"
  105. }
  106. ];
  107. }