@google-cloud/discoveryengine 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +33 -4
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +337 -0
  4. package/build/protos/google/cloud/discoveryengine/v1/common.proto +34 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/completion.proto +1 -1
  6. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +1 -1
  7. package/build/protos/google/cloud/discoveryengine/v1/control.proto +214 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/control_service.proto +236 -0
  9. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +3 -3
  10. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +570 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +5 -1
  12. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +3 -3
  13. package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +92 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +7 -7
  16. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +5 -5
  17. package/build/protos/google/cloud/discoveryengine/v1/engine_service.proto +1 -1
  18. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +149 -0
  19. package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +58 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +5 -5
  21. package/build/protos/google/cloud/discoveryengine/v1/project.proto +103 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/project_service.proto +90 -0
  23. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +1 -1
  24. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +131 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +21 -20
  26. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  27. package/build/protos/google/cloud/discoveryengine/v1/schema_service.proto +6 -6
  28. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +24 -19
  29. package/build/protos/google/cloud/discoveryengine/v1/session.proto +97 -0
  30. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +4 -1
  31. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +1 -1
  32. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +29 -4
  33. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +19 -3
  34. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +1 -1
  35. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +1 -1
  36. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +10 -1
  37. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +8 -1
  38. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +1 -1
  39. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +17 -1
  40. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +1 -1
  41. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +1 -1
  42. package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +217 -0
  43. package/build/protos/google/cloud/discoveryengine/v1alpha/control_service.proto +236 -0
  44. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +3 -3
  45. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +20 -4
  46. package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +87 -0
  47. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +1 -1
  48. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +3 -3
  49. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +1 -1
  50. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +2 -1
  51. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +13 -10
  52. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +5 -5
  53. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +1 -1
  54. package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +1 -1
  55. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +31 -2
  56. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +4 -1
  57. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +5 -5
  58. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +2 -1
  59. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +3 -1
  60. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +1 -1
  61. package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +20 -1
  62. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +21 -20
  63. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +38 -3
  64. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +7 -7
  65. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +29 -32
  66. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +40 -1
  67. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +1 -1
  68. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +1 -1
  69. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +4 -1
  70. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +4 -1
  71. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +1 -1
  72. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +30 -4
  73. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +19 -3
  74. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +11 -2
  75. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +17 -1
  76. package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +1 -1
  77. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +1 -1
  78. package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +216 -0
  79. package/build/protos/google/cloud/discoveryengine/v1beta/control_service.proto +236 -0
  80. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +3 -3
  81. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +20 -4
  82. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +87 -0
  83. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +1 -1
  84. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +3 -3
  85. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
  86. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +2 -1
  87. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +8 -9
  88. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +5 -5
  89. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +1 -1
  90. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +31 -2
  91. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +4 -1
  92. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +5 -5
  93. package/build/protos/google/cloud/discoveryengine/v1beta/project.proto +103 -0
  94. package/build/protos/google/cloud/discoveryengine/v1beta/project_service.proto +90 -0
  95. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +1 -1
  96. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +20 -1
  97. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +21 -20
  98. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  99. package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +6 -6
  100. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +31 -25
  101. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +40 -1
  102. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +1 -1
  103. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +1 -1
  104. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +5 -2
  105. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +4 -1
  106. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +1 -1
  107. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +29 -4
  108. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +19 -3
  109. package/build/protos/protos.d.ts +52350 -38733
  110. package/build/protos/protos.js +136479 -103212
  111. package/build/protos/protos.json +9460 -5916
  112. package/build/src/index.d.ts +13 -1
  113. package/build/src/index.js +13 -1
  114. package/build/src/v1/completion_service_client.d.ts +549 -0
  115. package/build/src/v1/completion_service_client.js +771 -0
  116. package/build/src/v1/control_service_client.d.ts +1623 -0
  117. package/build/src/v1/control_service_client.js +2218 -0
  118. package/build/src/v1/control_service_client_config.json +63 -0
  119. package/build/src/v1/conversational_search_service_client.d.ts +893 -0
  120. package/build/src/v1/conversational_search_service_client.js +1040 -14
  121. package/build/src/v1/conversational_search_service_client_config.json +35 -0
  122. package/build/src/v1/data_store_service_client.d.ts +555 -6
  123. package/build/src/v1/data_store_service_client.js +775 -4
  124. package/build/src/v1/document_service_client.d.ts +557 -8
  125. package/build/src/v1/document_service_client.js +773 -2
  126. package/build/src/v1/engine_service_client.d.ts +549 -0
  127. package/build/src/v1/engine_service_client.js +771 -0
  128. package/build/src/v1/grounded_generation_service_client.d.ts +1439 -0
  129. package/build/src/v1/grounded_generation_service_client.js +2036 -0
  130. package/build/src/v1/grounded_generation_service_client_config.json +43 -0
  131. package/build/src/v1/index.d.ts +4 -0
  132. package/build/src/v1/index.js +9 -1
  133. package/build/src/v1/project_service_client.d.ts +1533 -0
  134. package/build/src/v1/project_service_client.js +2255 -0
  135. package/build/src/v1/project_service_client_config.json +43 -0
  136. package/build/src/v1/rank_service_client.d.ts +1449 -0
  137. package/build/src/v1/rank_service_client.js +2037 -0
  138. package/build/src/v1/rank_service_client_config.json +43 -0
  139. package/build/src/v1/recommendation_service_client.d.ts +568 -18
  140. package/build/src/v1/recommendation_service_client.js +756 -0
  141. package/build/src/v1/schema_service_client.d.ts +558 -9
  142. package/build/src/v1/schema_service_client.js +775 -4
  143. package/build/src/v1/search_service_client.d.ts +579 -21
  144. package/build/src/v1/search_service_client.js +776 -14
  145. package/build/src/v1/site_search_engine_service_client.d.ts +549 -0
  146. package/build/src/v1/site_search_engine_service_client.js +771 -0
  147. package/build/src/v1/user_event_service_client.d.ts +562 -2
  148. package/build/src/v1/user_event_service_client.js +771 -0
  149. package/build/src/v1alpha/acl_config_service_client.d.ts +237 -0
  150. package/build/src/v1alpha/acl_config_service_client.js +326 -0
  151. package/build/src/v1alpha/chunk_service_client.d.ts +237 -0
  152. package/build/src/v1alpha/chunk_service_client.js +326 -0
  153. package/build/src/v1alpha/completion_service_client.d.ts +237 -0
  154. package/build/src/v1alpha/completion_service_client.js +340 -0
  155. package/build/src/v1alpha/control_service_client.d.ts +2013 -0
  156. package/build/src/v1alpha/control_service_client.js +2757 -0
  157. package/build/src/v1alpha/control_service_client_config.json +63 -0
  158. package/build/src/v1alpha/conversational_search_service_client.d.ts +239 -2
  159. package/build/src/v1alpha/conversational_search_service_client.js +326 -0
  160. package/build/src/v1alpha/data_store_service_client.d.ts +243 -6
  161. package/build/src/v1alpha/data_store_service_client.js +344 -4
  162. package/build/src/v1alpha/document_service_client.d.ts +246 -9
  163. package/build/src/v1alpha/document_service_client.js +342 -2
  164. package/build/src/v1alpha/engine_service_client.d.ts +237 -0
  165. package/build/src/v1alpha/engine_service_client.js +340 -0
  166. package/build/src/v1alpha/estimate_billing_service_client.d.ts +237 -0
  167. package/build/src/v1alpha/estimate_billing_service_client.js +340 -0
  168. package/build/src/v1alpha/grounded_generation_service_client.d.ts +256 -1
  169. package/build/src/v1alpha/grounded_generation_service_client.js +326 -0
  170. package/build/src/v1alpha/index.d.ts +1 -0
  171. package/build/src/v1alpha/index.js +3 -1
  172. package/build/src/v1alpha/project_service_client.d.ts +239 -0
  173. package/build/src/v1alpha/project_service_client.js +340 -0
  174. package/build/src/v1alpha/project_service_client_config.json +21 -6
  175. package/build/src/v1alpha/rank_service_client.d.ts +255 -0
  176. package/build/src/v1alpha/rank_service_client.js +326 -0
  177. package/build/src/v1alpha/recommendation_service_client.d.ts +256 -18
  178. package/build/src/v1alpha/recommendation_service_client.js +326 -0
  179. package/build/src/v1alpha/schema_service_client.d.ts +247 -10
  180. package/build/src/v1alpha/schema_service_client.js +344 -4
  181. package/build/src/v1alpha/search_service_client.d.ts +267 -21
  182. package/build/src/v1alpha/search_service_client.js +346 -14
  183. package/build/src/v1alpha/search_tuning_service_client.d.ts +265 -0
  184. package/build/src/v1alpha/search_tuning_service_client.js +365 -1
  185. package/build/src/v1alpha/search_tuning_service_client_config.json +4 -0
  186. package/build/src/v1alpha/serving_config_service_client.d.ts +237 -0
  187. package/build/src/v1alpha/serving_config_service_client.js +326 -0
  188. package/build/src/v1alpha/site_search_engine_service_client.d.ts +237 -0
  189. package/build/src/v1alpha/site_search_engine_service_client.js +340 -0
  190. package/build/src/v1alpha/user_event_service_client.d.ts +250 -2
  191. package/build/src/v1alpha/user_event_service_client.js +340 -0
  192. package/build/src/v1beta/completion_service_client.d.ts +252 -0
  193. package/build/src/v1beta/completion_service_client.js +359 -0
  194. package/build/src/v1beta/control_service_client.d.ts +1860 -0
  195. package/build/src/v1beta/control_service_client.js +2545 -0
  196. package/build/src/v1beta/control_service_client_config.json +63 -0
  197. package/build/src/v1beta/conversational_search_service_client.d.ts +254 -2
  198. package/build/src/v1beta/conversational_search_service_client.js +348 -0
  199. package/build/src/v1beta/data_store_service_client.d.ts +258 -6
  200. package/build/src/v1beta/data_store_service_client.js +363 -4
  201. package/build/src/v1beta/document_service_client.d.ts +261 -10
  202. package/build/src/v1beta/document_service_client.js +361 -2
  203. package/build/src/v1beta/engine_service_client.d.ts +252 -0
  204. package/build/src/v1beta/engine_service_client.js +359 -0
  205. package/build/src/v1beta/grounded_generation_service_client.d.ts +271 -1
  206. package/build/src/v1beta/grounded_generation_service_client.js +348 -0
  207. package/build/src/v1beta/index.d.ts +2 -0
  208. package/build/src/v1beta/index.js +5 -1
  209. package/build/src/v1beta/project_service_client.d.ts +1770 -0
  210. package/build/src/v1beta/project_service_client.js +2576 -0
  211. package/build/src/v1beta/project_service_client_config.json +43 -0
  212. package/build/src/v1beta/rank_service_client.d.ts +270 -0
  213. package/build/src/v1beta/rank_service_client.js +348 -0
  214. package/build/src/v1beta/recommendation_service_client.d.ts +271 -18
  215. package/build/src/v1beta/recommendation_service_client.js +348 -0
  216. package/build/src/v1beta/schema_service_client.d.ts +261 -9
  217. package/build/src/v1beta/schema_service_client.js +363 -4
  218. package/build/src/v1beta/search_service_client.d.ts +282 -21
  219. package/build/src/v1beta/search_service_client.js +368 -14
  220. package/build/src/v1beta/search_tuning_service_client.d.ts +280 -0
  221. package/build/src/v1beta/search_tuning_service_client.js +384 -1
  222. package/build/src/v1beta/search_tuning_service_client_config.json +4 -0
  223. package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
  224. package/build/src/v1beta/serving_config_service_client.js +326 -0
  225. package/build/src/v1beta/site_search_engine_service_client.d.ts +252 -0
  226. package/build/src/v1beta/site_search_engine_service_client.js +359 -0
  227. package/build/src/v1beta/user_event_service_client.d.ts +265 -2
  228. package/build/src/v1beta/user_event_service_client.js +359 -0
  229. package/package.json +2 -2
@@ -0,0 +1,214 @@
1
+ // Copyright 2024 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
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/cloud/discoveryengine/v1/common.proto";
22
+ import "google/protobuf/timestamp.proto";
23
+
24
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
25
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
26
+ option java_multiple_files = true;
27
+ option java_outer_classname = "ControlProto";
28
+ option java_package = "com.google.cloud.discoveryengine.v1";
29
+ option objc_class_prefix = "DISCOVERYENGINE";
30
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
31
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
32
+
33
+ // Defines circumstances to be checked before allowing a behavior
34
+ message Condition {
35
+ // Matcher for search request query
36
+ message QueryTerm {
37
+ // The specific query value to match against
38
+ //
39
+ // Must be lowercase, must be UTF-8.
40
+ // Can have at most 3 space separated terms if full_match is true.
41
+ // Cannot be an empty string.
42
+ // Maximum length of 5000 characters.
43
+ string value = 1;
44
+
45
+ // Whether the search query needs to exactly match the query term.
46
+ bool full_match = 2;
47
+ }
48
+
49
+ // Used for time-dependent conditions.
50
+ message TimeRange {
51
+ // Start of time range.
52
+ //
53
+ // Range is inclusive.
54
+ google.protobuf.Timestamp start_time = 1;
55
+
56
+ // End of time range.
57
+ //
58
+ // Range is inclusive.
59
+ // Must be in the future.
60
+ google.protobuf.Timestamp end_time = 2;
61
+ }
62
+
63
+ // Search only
64
+ // A list of terms to match the query on.
65
+ //
66
+ // Maximum of 10 query terms.
67
+ repeated QueryTerm query_terms = 2;
68
+
69
+ // Range of time(s) specifying when condition is active.
70
+ //
71
+ // Maximum of 10 time ranges.
72
+ repeated TimeRange active_time_range = 3;
73
+ }
74
+
75
+ // Defines a conditioned behavior to employ during serving.
76
+ // Must be attached to a [ServingConfig][] to be considered at serving time.
77
+ // Permitted actions dependent on `SolutionType`.
78
+ message Control {
79
+ option (google.api.resource) = {
80
+ type: "discoveryengine.googleapis.com/Control"
81
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}"
82
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}"
83
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}"
84
+ };
85
+
86
+ // Adjusts order of products in returned list.
87
+ message BoostAction {
88
+ // Required. Strength of the boost, which should be in [-1, 1]. Negative
89
+ // boost means demotion. Default is 0.0 (No-op).
90
+ float boost = 1 [(google.api.field_behavior) = REQUIRED];
91
+
92
+ // Required. Specifies which products to apply the boost to.
93
+ //
94
+ // If no filter is provided all products will be boosted (No-op).
95
+ // Syntax documentation:
96
+ // https://cloud.google.com/retail/docs/filter-and-order
97
+ // Maximum length is 5000 characters.
98
+ // Otherwise an INVALID ARGUMENT error is thrown.
99
+ string filter = 2 [(google.api.field_behavior) = REQUIRED];
100
+
101
+ // Required. Specifies which data store's documents can be boosted by this
102
+ // control. Full data store name e.g.
103
+ // projects/123/locations/global/collections/default_collection/dataStores/default_data_store
104
+ string data_store = 3 [
105
+ (google.api.field_behavior) = REQUIRED,
106
+ (google.api.resource_reference) = {
107
+ type: "discoveryengine.googleapis.com/DataStore"
108
+ }
109
+ ];
110
+ }
111
+
112
+ // Specified which products may be included in results.
113
+ // Uses same filter as boost.
114
+ message FilterAction {
115
+ // Required. A filter to apply on the matching condition results.
116
+ //
117
+ // Required
118
+ // Syntax documentation:
119
+ // https://cloud.google.com/retail/docs/filter-and-order
120
+ // Maximum length is 5000 characters. Otherwise an INVALID
121
+ // ARGUMENT error is thrown.
122
+ string filter = 1 [(google.api.field_behavior) = REQUIRED];
123
+
124
+ // Required. Specifies which data store's documents can be filtered by this
125
+ // control. Full data store name e.g.
126
+ // projects/123/locations/global/collections/default_collection/dataStores/default_data_store
127
+ string data_store = 2 [
128
+ (google.api.field_behavior) = REQUIRED,
129
+ (google.api.resource_reference) = {
130
+ type: "discoveryengine.googleapis.com/DataStore"
131
+ }
132
+ ];
133
+ }
134
+
135
+ // Redirects a shopper to the provided URI.
136
+ message RedirectAction {
137
+ // Required. The URI to which the shopper will be redirected.
138
+ //
139
+ // Required.
140
+ // URI must have length equal or less than 2000 characters.
141
+ // Otherwise an INVALID ARGUMENT error is thrown.
142
+ string redirect_uri = 1 [(google.api.field_behavior) = REQUIRED];
143
+ }
144
+
145
+ // Creates a set of terms that will act as synonyms of one another.
146
+ //
147
+ // Example: "happy" will also be considered as "glad", "glad" will also be
148
+ // considered as "happy".
149
+ message SynonymsAction {
150
+ // Defines a set of synonyms.
151
+ // Can specify up to 100 synonyms.
152
+ // Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
153
+ // thrown.
154
+ repeated string synonyms = 1;
155
+ }
156
+
157
+ // Actions are restricted by Vertical and Solution
158
+ //
159
+ // Required.
160
+ oneof action {
161
+ // Defines a boost-type control
162
+ BoostAction boost_action = 6;
163
+
164
+ // Defines a filter-type control
165
+ // Currently not supported by Recommendation
166
+ FilterAction filter_action = 7;
167
+
168
+ // Defines a redirect-type control.
169
+ RedirectAction redirect_action = 9;
170
+
171
+ // Treats a group of terms as synonyms of one another.
172
+ SynonymsAction synonyms_action = 10;
173
+ }
174
+
175
+ // Immutable. Fully qualified name
176
+ // `projects/*/locations/global/dataStore/*/controls/*`
177
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
178
+
179
+ // Required. Human readable name. The identifier used in UI views.
180
+ //
181
+ // Must be UTF-8 encoded string. Length limit is 128 characters.
182
+ // Otherwise an INVALID ARGUMENT error is thrown.
183
+ string display_name = 2 [(google.api.field_behavior) = REQUIRED];
184
+
185
+ // Output only. List of all [ServingConfig][] ids this control is attached to.
186
+ // May take up to 10 minutes to update after changes.
187
+ repeated string associated_serving_config_ids = 3
188
+ [(google.api.field_behavior) = OUTPUT_ONLY];
189
+
190
+ // Required. Immutable. What solution the control belongs to.
191
+ //
192
+ // Must be compatible with vertical of resource.
193
+ // Otherwise an INVALID ARGUMENT error is thrown.
194
+ SolutionType solution_type = 4 [
195
+ (google.api.field_behavior) = REQUIRED,
196
+ (google.api.field_behavior) = IMMUTABLE
197
+ ];
198
+
199
+ // Specifies the use case for the control.
200
+ // Affects what condition fields can be set.
201
+ // Only applies to
202
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
203
+ // Currently only allow one use case per control.
204
+ // Must be set when solution_type is
205
+ // [SolutionType.SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
206
+ repeated SearchUseCase use_cases = 8;
207
+
208
+ // Determines when the associated action will trigger.
209
+ //
210
+ // Omit to always apply the action.
211
+ // Currently only a single condition may be specified.
212
+ // Otherwise an INVALID ARGUMENT error is thrown.
213
+ repeated Condition conditions = 5;
214
+ }
@@ -0,0 +1,236 @@
1
+ // Copyright 2024 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
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1/control.proto";
24
+ import "google/protobuf/empty.proto";
25
+ import "google/protobuf/field_mask.proto";
26
+
27
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
28
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "ControlServiceProto";
31
+ option java_package = "com.google.cloud.discoveryengine.v1";
32
+ option objc_class_prefix = "DISCOVERYENGINE";
33
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
34
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
35
+
36
+ // Service for performing CRUD operations on Controls.
37
+ // Controls allow for custom logic to be implemented in the serving path.
38
+ // Controls need to be attached to a Serving Config to be considered during a
39
+ // request.
40
+ service ControlService {
41
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
42
+ option (google.api.oauth_scopes) =
43
+ "https://www.googleapis.com/auth/cloud-platform";
44
+
45
+ // Creates a Control.
46
+ //
47
+ // By default 1000 controls are allowed for a data store.
48
+ // A request can be submitted to adjust this limit.
49
+ // If the [Control][google.cloud.discoveryengine.v1.Control] to create already
50
+ // exists, an ALREADY_EXISTS error is returned.
51
+ rpc CreateControl(CreateControlRequest) returns (Control) {
52
+ option (google.api.http) = {
53
+ post: "/v1/{parent=projects/*/locations/*/dataStores/*}/controls"
54
+ body: "control"
55
+ additional_bindings {
56
+ post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/controls"
57
+ body: "control"
58
+ }
59
+ additional_bindings {
60
+ post: "/v1/{parent=projects/*/locations/*/collections/*/engines/*}/controls"
61
+ body: "control"
62
+ }
63
+ };
64
+ option (google.api.method_signature) = "parent,control,control_id";
65
+ }
66
+
67
+ // Deletes a Control.
68
+ //
69
+ // If the [Control][google.cloud.discoveryengine.v1.Control] to delete does
70
+ // not exist, a NOT_FOUND error is returned.
71
+ rpc DeleteControl(DeleteControlRequest) returns (google.protobuf.Empty) {
72
+ option (google.api.http) = {
73
+ delete: "/v1/{name=projects/*/locations/*/dataStores/*/controls/*}"
74
+ additional_bindings {
75
+ delete: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/controls/*}"
76
+ }
77
+ additional_bindings {
78
+ delete: "/v1/{name=projects/*/locations/*/collections/*/engines/*/controls/*}"
79
+ }
80
+ };
81
+ option (google.api.method_signature) = "name";
82
+ }
83
+
84
+ // Updates a Control.
85
+ //
86
+ // [Control][google.cloud.discoveryengine.v1.Control] action type cannot be
87
+ // changed. If the [Control][google.cloud.discoveryengine.v1.Control] to
88
+ // update does not exist, a NOT_FOUND error is returned.
89
+ rpc UpdateControl(UpdateControlRequest) returns (Control) {
90
+ option (google.api.http) = {
91
+ patch: "/v1/{control.name=projects/*/locations/*/dataStores/*/controls/*}"
92
+ body: "control"
93
+ additional_bindings {
94
+ patch: "/v1/{control.name=projects/*/locations/*/collections/*/dataStores/*/controls/*}"
95
+ body: "control"
96
+ }
97
+ additional_bindings {
98
+ patch: "/v1/{control.name=projects/*/locations/*/collections/*/engines/*/controls/*}"
99
+ body: "control"
100
+ }
101
+ };
102
+ option (google.api.method_signature) = "control,update_mask";
103
+ }
104
+
105
+ // Gets a Control.
106
+ rpc GetControl(GetControlRequest) returns (Control) {
107
+ option (google.api.http) = {
108
+ get: "/v1/{name=projects/*/locations/*/dataStores/*/controls/*}"
109
+ additional_bindings {
110
+ get: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/controls/*}"
111
+ }
112
+ additional_bindings {
113
+ get: "/v1/{name=projects/*/locations/*/collections/*/engines/*/controls/*}"
114
+ }
115
+ };
116
+ option (google.api.method_signature) = "name";
117
+ }
118
+
119
+ // Lists all Controls by their parent
120
+ // [DataStore][google.cloud.discoveryengine.v1.DataStore].
121
+ rpc ListControls(ListControlsRequest) returns (ListControlsResponse) {
122
+ option (google.api.http) = {
123
+ get: "/v1/{parent=projects/*/locations/*/dataStores/*}/controls"
124
+ additional_bindings {
125
+ get: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/controls"
126
+ }
127
+ additional_bindings {
128
+ get: "/v1/{parent=projects/*/locations/*/collections/*/engines/*}/controls"
129
+ }
130
+ };
131
+ option (google.api.method_signature) = "parent";
132
+ }
133
+ }
134
+
135
+ // Request for CreateControl method.
136
+ message CreateControlRequest {
137
+ // Required. Full resource name of parent data store. Format:
138
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
139
+ // or
140
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
141
+ string parent = 1 [
142
+ (google.api.field_behavior) = REQUIRED,
143
+ (google.api.resource_reference) = {
144
+ child_type: "discoveryengine.googleapis.com/Control"
145
+ }
146
+ ];
147
+
148
+ // Required. The Control to create.
149
+ Control control = 2 [(google.api.field_behavior) = REQUIRED];
150
+
151
+ // Required. The ID to use for the Control, which will become the final
152
+ // component of the Control's resource name.
153
+ //
154
+ // This value must be within 1-63 characters.
155
+ // Valid characters are /[a-z][0-9]-_/.
156
+ string control_id = 3 [(google.api.field_behavior) = REQUIRED];
157
+ }
158
+
159
+ // Request for UpdateControl method.
160
+ message UpdateControlRequest {
161
+ // Required. The Control to update.
162
+ Control control = 1 [(google.api.field_behavior) = REQUIRED];
163
+
164
+ // Optional. Indicates which fields in the provided
165
+ // [Control][google.cloud.discoveryengine.v1.Control] to update. The following
166
+ // are NOT supported:
167
+ //
168
+ // * [Control.name][google.cloud.discoveryengine.v1.Control.name]
169
+ // * [Control.solution_type][google.cloud.discoveryengine.v1.Control.solution_type]
170
+ //
171
+ // If not set or empty, all supported fields are updated.
172
+ google.protobuf.FieldMask update_mask = 2
173
+ [(google.api.field_behavior) = OPTIONAL];
174
+ }
175
+
176
+ // Request for DeleteControl method.
177
+ message DeleteControlRequest {
178
+ // Required. The resource name of the Control to delete. Format:
179
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
180
+ string name = 1 [
181
+ (google.api.field_behavior) = REQUIRED,
182
+ (google.api.resource_reference) = {
183
+ type: "discoveryengine.googleapis.com/Control"
184
+ }
185
+ ];
186
+ }
187
+
188
+ // Request for GetControl method.
189
+ message GetControlRequest {
190
+ // Required. The resource name of the Control to get. Format:
191
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
192
+ string name = 1 [
193
+ (google.api.field_behavior) = REQUIRED,
194
+ (google.api.resource_reference) = {
195
+ type: "discoveryengine.googleapis.com/Control"
196
+ }
197
+ ];
198
+ }
199
+
200
+ // Request for ListControls method.
201
+ message ListControlsRequest {
202
+ // Required. The data store resource name. Format:
203
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
204
+ // or
205
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
206
+ string parent = 1 [
207
+ (google.api.field_behavior) = REQUIRED,
208
+ (google.api.resource_reference) = {
209
+ child_type: "discoveryengine.googleapis.com/Control"
210
+ }
211
+ ];
212
+
213
+ // Optional. Maximum number of results to return. If unspecified, defaults
214
+ // to 50. Max allowed value is 1000.
215
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
216
+
217
+ // Optional. A page token, received from a previous `ListControls` call.
218
+ // Provide this to retrieve the subsequent page.
219
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
220
+
221
+ // Optional. A filter to apply on the list results. Supported features:
222
+ //
223
+ // * List all the products under the parent branch if
224
+ // [filter][google.cloud.discoveryengine.v1.ListControlsRequest.filter] is
225
+ // unset. Currently this field is unsupported.
226
+ string filter = 4 [(google.api.field_behavior) = OPTIONAL];
227
+ }
228
+
229
+ // Response for ListControls method.
230
+ message ListControlsResponse {
231
+ // All the Controls for a given data store.
232
+ repeated Control controls = 1;
233
+
234
+ // Pagination token, if not returned indicates the last page.
235
+ string next_page_token = 2;
236
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -52,9 +52,9 @@ message Conversation {
52
52
  }
53
53
 
54
54
  // Immutable. Fully qualified name
55
- // `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
55
+ // `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*`
56
56
  // or
57
- // `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.
57
+ // `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.
58
58
  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
59
59
 
60
60
  // The state of the Conversation.