@google-cloud/discoveryengine 1.8.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 (199) hide show
  1. package/CHANGELOG.md +8 -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 +33 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/control.proto +214 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/control_service.proto +236 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +2 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +569 -0
  9. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +4 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +2 -2
  11. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +92 -0
  12. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -6
  13. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +4 -4
  14. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +149 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +58 -0
  16. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +4 -4
  17. package/build/protos/google/cloud/discoveryengine/v1/project.proto +103 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/project_service.proto +90 -0
  19. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +131 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +20 -19
  21. package/build/protos/google/cloud/discoveryengine/v1/schema_service.proto +5 -5
  22. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +23 -18
  23. package/build/protos/google/cloud/discoveryengine/v1/session.proto +97 -0
  24. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +3 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +28 -3
  26. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +18 -2
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +9 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +7 -0
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +16 -0
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +217 -0
  31. package/build/protos/google/cloud/discoveryengine/v1alpha/control_service.proto +236 -0
  32. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +2 -2
  33. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +19 -3
  34. package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +87 -0
  35. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +2 -2
  36. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +1 -0
  37. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +12 -9
  38. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +4 -4
  39. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +30 -1
  40. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +3 -0
  41. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +4 -4
  42. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +1 -0
  43. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +2 -0
  44. package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +19 -0
  45. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +20 -19
  46. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +37 -2
  47. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +6 -6
  48. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +28 -31
  49. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +39 -0
  50. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +3 -0
  51. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +3 -0
  52. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +29 -3
  53. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +18 -2
  54. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +10 -1
  55. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +16 -0
  56. package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +216 -0
  57. package/build/protos/google/cloud/discoveryengine/v1beta/control_service.proto +236 -0
  58. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +2 -2
  59. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -3
  60. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +87 -0
  61. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +2 -2
  62. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +1 -0
  63. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +7 -8
  64. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +4 -4
  65. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +30 -1
  66. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +3 -0
  67. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +4 -4
  68. package/build/protos/google/cloud/discoveryengine/v1beta/project.proto +103 -0
  69. package/build/protos/google/cloud/discoveryengine/v1beta/project_service.proto +90 -0
  70. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +19 -0
  71. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +20 -19
  72. package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +5 -5
  73. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +30 -24
  74. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +39 -0
  75. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +4 -1
  76. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +3 -0
  77. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +28 -3
  78. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +18 -2
  79. package/build/protos/protos.d.ts +52350 -38733
  80. package/build/protos/protos.js +136479 -103212
  81. package/build/protos/protos.json +9460 -5916
  82. package/build/src/index.d.ts +13 -1
  83. package/build/src/index.js +13 -1
  84. package/build/src/v1/completion_service_client.d.ts +549 -0
  85. package/build/src/v1/completion_service_client.js +771 -0
  86. package/build/src/v1/control_service_client.d.ts +1623 -0
  87. package/build/src/v1/control_service_client.js +2218 -0
  88. package/build/src/v1/control_service_client_config.json +63 -0
  89. package/build/src/v1/conversational_search_service_client.d.ts +893 -0
  90. package/build/src/v1/conversational_search_service_client.js +1040 -14
  91. package/build/src/v1/conversational_search_service_client_config.json +35 -0
  92. package/build/src/v1/data_store_service_client.d.ts +555 -6
  93. package/build/src/v1/data_store_service_client.js +775 -4
  94. package/build/src/v1/document_service_client.d.ts +557 -8
  95. package/build/src/v1/document_service_client.js +773 -2
  96. package/build/src/v1/engine_service_client.d.ts +549 -0
  97. package/build/src/v1/engine_service_client.js +771 -0
  98. package/build/src/v1/grounded_generation_service_client.d.ts +1439 -0
  99. package/build/src/v1/grounded_generation_service_client.js +2036 -0
  100. package/build/src/v1/grounded_generation_service_client_config.json +43 -0
  101. package/build/src/v1/index.d.ts +4 -0
  102. package/build/src/v1/index.js +9 -1
  103. package/build/src/v1/project_service_client.d.ts +1533 -0
  104. package/build/src/v1/project_service_client.js +2255 -0
  105. package/build/src/v1/project_service_client_config.json +43 -0
  106. package/build/src/v1/rank_service_client.d.ts +1449 -0
  107. package/build/src/v1/rank_service_client.js +2037 -0
  108. package/build/src/v1/rank_service_client_config.json +43 -0
  109. package/build/src/v1/recommendation_service_client.d.ts +568 -18
  110. package/build/src/v1/recommendation_service_client.js +756 -0
  111. package/build/src/v1/schema_service_client.d.ts +558 -9
  112. package/build/src/v1/schema_service_client.js +775 -4
  113. package/build/src/v1/search_service_client.d.ts +579 -21
  114. package/build/src/v1/search_service_client.js +776 -14
  115. package/build/src/v1/site_search_engine_service_client.d.ts +549 -0
  116. package/build/src/v1/site_search_engine_service_client.js +771 -0
  117. package/build/src/v1/user_event_service_client.d.ts +562 -2
  118. package/build/src/v1/user_event_service_client.js +771 -0
  119. package/build/src/v1alpha/acl_config_service_client.d.ts +237 -0
  120. package/build/src/v1alpha/acl_config_service_client.js +326 -0
  121. package/build/src/v1alpha/chunk_service_client.d.ts +237 -0
  122. package/build/src/v1alpha/chunk_service_client.js +326 -0
  123. package/build/src/v1alpha/completion_service_client.d.ts +237 -0
  124. package/build/src/v1alpha/completion_service_client.js +340 -0
  125. package/build/src/v1alpha/control_service_client.d.ts +2013 -0
  126. package/build/src/v1alpha/control_service_client.js +2757 -0
  127. package/build/src/v1alpha/control_service_client_config.json +63 -0
  128. package/build/src/v1alpha/conversational_search_service_client.d.ts +239 -2
  129. package/build/src/v1alpha/conversational_search_service_client.js +326 -0
  130. package/build/src/v1alpha/data_store_service_client.d.ts +243 -6
  131. package/build/src/v1alpha/data_store_service_client.js +344 -4
  132. package/build/src/v1alpha/document_service_client.d.ts +246 -9
  133. package/build/src/v1alpha/document_service_client.js +342 -2
  134. package/build/src/v1alpha/engine_service_client.d.ts +237 -0
  135. package/build/src/v1alpha/engine_service_client.js +340 -0
  136. package/build/src/v1alpha/estimate_billing_service_client.d.ts +237 -0
  137. package/build/src/v1alpha/estimate_billing_service_client.js +340 -0
  138. package/build/src/v1alpha/grounded_generation_service_client.d.ts +256 -1
  139. package/build/src/v1alpha/grounded_generation_service_client.js +326 -0
  140. package/build/src/v1alpha/index.d.ts +1 -0
  141. package/build/src/v1alpha/index.js +3 -1
  142. package/build/src/v1alpha/project_service_client.d.ts +239 -0
  143. package/build/src/v1alpha/project_service_client.js +340 -0
  144. package/build/src/v1alpha/project_service_client_config.json +21 -6
  145. package/build/src/v1alpha/rank_service_client.d.ts +255 -0
  146. package/build/src/v1alpha/rank_service_client.js +326 -0
  147. package/build/src/v1alpha/recommendation_service_client.d.ts +256 -18
  148. package/build/src/v1alpha/recommendation_service_client.js +326 -0
  149. package/build/src/v1alpha/schema_service_client.d.ts +247 -10
  150. package/build/src/v1alpha/schema_service_client.js +344 -4
  151. package/build/src/v1alpha/search_service_client.d.ts +267 -21
  152. package/build/src/v1alpha/search_service_client.js +346 -14
  153. package/build/src/v1alpha/search_tuning_service_client.d.ts +265 -0
  154. package/build/src/v1alpha/search_tuning_service_client.js +365 -1
  155. package/build/src/v1alpha/search_tuning_service_client_config.json +4 -0
  156. package/build/src/v1alpha/serving_config_service_client.d.ts +237 -0
  157. package/build/src/v1alpha/serving_config_service_client.js +326 -0
  158. package/build/src/v1alpha/site_search_engine_service_client.d.ts +237 -0
  159. package/build/src/v1alpha/site_search_engine_service_client.js +340 -0
  160. package/build/src/v1alpha/user_event_service_client.d.ts +250 -2
  161. package/build/src/v1alpha/user_event_service_client.js +340 -0
  162. package/build/src/v1beta/completion_service_client.d.ts +252 -0
  163. package/build/src/v1beta/completion_service_client.js +359 -0
  164. package/build/src/v1beta/control_service_client.d.ts +1860 -0
  165. package/build/src/v1beta/control_service_client.js +2545 -0
  166. package/build/src/v1beta/control_service_client_config.json +63 -0
  167. package/build/src/v1beta/conversational_search_service_client.d.ts +254 -2
  168. package/build/src/v1beta/conversational_search_service_client.js +348 -0
  169. package/build/src/v1beta/data_store_service_client.d.ts +258 -6
  170. package/build/src/v1beta/data_store_service_client.js +363 -4
  171. package/build/src/v1beta/document_service_client.d.ts +261 -10
  172. package/build/src/v1beta/document_service_client.js +361 -2
  173. package/build/src/v1beta/engine_service_client.d.ts +252 -0
  174. package/build/src/v1beta/engine_service_client.js +359 -0
  175. package/build/src/v1beta/grounded_generation_service_client.d.ts +271 -1
  176. package/build/src/v1beta/grounded_generation_service_client.js +348 -0
  177. package/build/src/v1beta/index.d.ts +2 -0
  178. package/build/src/v1beta/index.js +5 -1
  179. package/build/src/v1beta/project_service_client.d.ts +1770 -0
  180. package/build/src/v1beta/project_service_client.js +2576 -0
  181. package/build/src/v1beta/project_service_client_config.json +43 -0
  182. package/build/src/v1beta/rank_service_client.d.ts +270 -0
  183. package/build/src/v1beta/rank_service_client.js +348 -0
  184. package/build/src/v1beta/recommendation_service_client.d.ts +271 -18
  185. package/build/src/v1beta/recommendation_service_client.js +348 -0
  186. package/build/src/v1beta/schema_service_client.d.ts +261 -9
  187. package/build/src/v1beta/schema_service_client.js +363 -4
  188. package/build/src/v1beta/search_service_client.d.ts +282 -21
  189. package/build/src/v1beta/search_service_client.js +368 -14
  190. package/build/src/v1beta/search_tuning_service_client.d.ts +280 -0
  191. package/build/src/v1beta/search_tuning_service_client.js +384 -1
  192. package/build/src/v1beta/search_tuning_service_client_config.json +4 -0
  193. package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
  194. package/build/src/v1beta/serving_config_service_client.js +326 -0
  195. package/build/src/v1beta/site_search_engine_service_client.d.ts +252 -0
  196. package/build/src/v1beta/site_search_engine_service_client.js +359 -0
  197. package/build/src/v1beta/user_event_service_client.d.ts +265 -2
  198. package/build/src/v1beta/user_event_service_client.js +359 -0
  199. package/package.json +2 -2
@@ -45,6 +45,9 @@ message Session {
45
45
  Query query = 1;
46
46
 
47
47
  // The resource name of the answer to the user query.
48
+ //
49
+ // Only set if the answer generation (/answer API call) happened in this
50
+ // turn.
48
51
  string answer = 2 [(google.api.resource_reference) = {
49
52
  type: "discoveryengine.googleapis.com/Answer"
50
53
  }];
@@ -129,6 +129,9 @@ message TargetSite {
129
129
  // Output only. This is system-generated based on the provided_uri_pattern.
130
130
  string generated_uri_pattern = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
131
131
 
132
+ // Output only. Root domain of the provided_uri_pattern.
133
+ string root_domain_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
134
+
132
135
  // Output only. Site ownership and validity verification status.
133
136
  SiteVerificationInfo site_verification_info = 7
134
137
  [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -32,7 +32,7 @@ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
32
32
  option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
33
33
 
34
34
  // UserEvent captures all metadata information Discovery Engine API needs to
35
- // know about how end users interact with customers' website.
35
+ // know about how end users interact with your website.
36
36
  message UserEvent {
37
37
  // Required. User event type. Allowed values are:
38
38
  //
@@ -74,6 +74,32 @@ message UserEvent {
74
74
  // for this field.
75
75
  string user_pseudo_id = 2 [(google.api.field_behavior) = REQUIRED];
76
76
 
77
+ // The [Engine][google.cloud.discoveryengine.v1alpha.Engine] resource name, in
78
+ // the form of
79
+ // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
80
+ //
81
+ // Optional. Only required for
82
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine] produced user events.
83
+ // For example, user events from blended search.
84
+ string engine = 19 [(google.api.resource_reference) = {
85
+ type: "discoveryengine.googleapis.com/Engine"
86
+ }];
87
+
88
+ // The [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] resource
89
+ // full name, of the form
90
+ // `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
91
+ //
92
+ // Optional. Only required for user events whose data store can't by
93
+ // determined by
94
+ // [UserEvent.engine][google.cloud.discoveryengine.v1alpha.UserEvent.engine]
95
+ // or
96
+ // [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents].
97
+ // If data store is set in the parent of write/import/collect user event
98
+ // requests, this field can be omitted.
99
+ string data_store = 20 [(google.api.resource_reference) = {
100
+ type: "discoveryengine.googleapis.com/DataStore"
101
+ }];
102
+
77
103
  // Only required for
78
104
  // [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
79
105
  // method. Timestamp of when the user event happened.
@@ -196,7 +222,7 @@ message UserEvent {
196
222
 
197
223
  // A list of identifiers for the independent experiment groups this user event
198
224
  // belongs to. This is used to distinguish between user events associated with
199
- // different experiment setups on the customer end.
225
+ // different experiment setups.
200
226
  repeated string tag_ids = 15;
201
227
 
202
228
  // The promotion IDs if this is an event associated with promotions.
@@ -420,7 +446,7 @@ message DocumentInfo {
420
446
 
421
447
  // Quantity of the Document associated with the user event. Defaults to 1.
422
448
  //
423
- // For example, this field will be 2 if two quantities of the same Document
449
+ // For example, this field is 2 if two quantities of the same Document
424
450
  // are involved in a `add-to-cart` event.
425
451
  //
426
452
  // Required for events of the following event types:
@@ -50,6 +50,10 @@ service UserEventService {
50
50
  post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write"
51
51
  body: "user_event"
52
52
  }
53
+ additional_bindings {
54
+ post: "/v1alpha/{parent=projects/*/locations/*}/userEvents:write"
55
+ body: "user_event"
56
+ }
53
57
  };
54
58
  }
55
59
 
@@ -87,7 +91,7 @@ service UserEventService {
87
91
  };
88
92
  }
89
93
 
90
- // Bulk import of User events. Request processing might be
94
+ // Bulk import of user events. Request processing might be
91
95
  // synchronous. Events that already exist are skipped.
92
96
  // Use this method for backfilling historical user events.
93
97
  //
@@ -113,8 +117,16 @@ service UserEventService {
113
117
 
114
118
  // Request message for WriteUserEvent method.
115
119
  message WriteUserEventRequest {
116
- // Required. The parent DataStore resource name, such as
120
+ // Required. The parent resource name.
121
+ // If the write user event action is applied in
122
+ // [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] level, the
123
+ // format is:
117
124
  // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
125
+ // If the write user event action is applied in [Location][] level, for
126
+ // example, the event with
127
+ // [Document][google.cloud.discoveryengine.v1alpha.Document] across multiple
128
+ // [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], the format is:
129
+ // `projects/{project}/locations/{location}`.
118
130
  string parent = 1 [
119
131
  (google.api.field_behavior) = REQUIRED,
120
132
  (google.api.resource_reference) = {
@@ -124,6 +136,10 @@ message WriteUserEventRequest {
124
136
 
125
137
  // Required. User event to write.
126
138
  optional UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
139
+
140
+ // If set to true, the user event is written asynchronously after
141
+ // validation, and the API responds without waiting for the write.
142
+ bool write_async = 3;
127
143
  }
128
144
 
129
145
  // Request message for CollectUserEvent method.
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta;
18
18
 
19
19
  import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
+ import "google/protobuf/struct.proto";
21
22
  import "google/protobuf/timestamp.proto";
22
23
 
23
24
  option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
@@ -83,6 +84,10 @@ message Answer {
83
84
 
84
85
  // List of cited chunk contents derived from document content.
85
86
  repeated ChunkContent chunk_contents = 4;
87
+
88
+ // The structured JSON metadata for the document.
89
+ // It is populated from the struct data from the Chunk in search result.
90
+ google.protobuf.Struct struct_data = 5;
86
91
  }
87
92
 
88
93
  // Chunk information.
@@ -102,6 +107,10 @@ message Answer {
102
107
 
103
108
  // Page identifier.
104
109
  string page_identifier = 4;
110
+
111
+ // The structured JSON metadata for the document.
112
+ // It is populated from the struct data from the Chunk in search result.
113
+ google.protobuf.Struct struct_data = 5;
105
114
  }
106
115
 
107
116
  // Chunk resource name.
@@ -290,7 +299,7 @@ message Answer {
290
299
  }
291
300
 
292
301
  // Immutable. Fully qualified name
293
- // `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
302
+ // `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
294
303
  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
295
304
 
296
305
  // The state of the answer generation.
@@ -94,6 +94,22 @@ enum SolutionType {
94
94
  SOLUTION_TYPE_GENERATIVE_CHAT = 4;
95
95
  }
96
96
 
97
+ // Defines a further subdivision of `SolutionType`.
98
+ // Specifically applies to
99
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
100
+ enum SearchUseCase {
101
+ // Value used when unset. Will not occur in CSS.
102
+ SEARCH_USE_CASE_UNSPECIFIED = 0;
103
+
104
+ // Search use case. Expects the traffic has a non-empty
105
+ // [query][google.cloud.discoveryengine.v1beta.SearchRequest.query].
106
+ SEARCH_USE_CASE_SEARCH = 1;
107
+
108
+ // Browse use case. Expects the traffic has an empty
109
+ // [query][google.cloud.discoveryengine.v1beta.SearchRequest.query].
110
+ SEARCH_USE_CASE_BROWSE = 2;
111
+ }
112
+
97
113
  // Tiers of search features. Different tiers might have different
98
114
  // pricing. To learn more, check the pricing documentation.
99
115
  enum SearchTier {
@@ -0,0 +1,216 @@
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.v1beta;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/cloud/discoveryengine/v1beta/common.proto";
22
+ import "google/protobuf/timestamp.proto";
23
+
24
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
25
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
26
+ option java_multiple_files = true;
27
+ option java_outer_classname = "ControlProto";
28
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
29
+ option objc_class_prefix = "DISCOVERYENGINE";
30
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
31
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
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
77
+ // [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] to be
78
+ // considered at serving time. Permitted actions dependent on `SolutionType`.
79
+ message Control {
80
+ option (google.api.resource) = {
81
+ type: "discoveryengine.googleapis.com/Control"
82
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}"
83
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}"
84
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}"
85
+ };
86
+
87
+ // Adjusts order of products in returned list.
88
+ message BoostAction {
89
+ // Required. Strength of the boost, which should be in [-1, 1]. Negative
90
+ // boost means demotion. Default is 0.0 (No-op).
91
+ float boost = 1 [(google.api.field_behavior) = REQUIRED];
92
+
93
+ // Required. Specifies which products to apply the boost to.
94
+ //
95
+ // If no filter is provided all products will be boosted (No-op).
96
+ // Syntax documentation:
97
+ // https://cloud.google.com/retail/docs/filter-and-order
98
+ // Maximum length is 5000 characters.
99
+ // Otherwise an INVALID ARGUMENT error is thrown.
100
+ string filter = 2 [(google.api.field_behavior) = REQUIRED];
101
+
102
+ // Required. Specifies which data store's documents can be boosted by this
103
+ // control. Full data store name e.g.
104
+ // projects/123/locations/global/collections/default_collection/dataStores/default_data_store
105
+ string data_store = 3 [
106
+ (google.api.field_behavior) = REQUIRED,
107
+ (google.api.resource_reference) = {
108
+ type: "discoveryengine.googleapis.com/DataStore"
109
+ }
110
+ ];
111
+ }
112
+
113
+ // Specified which products may be included in results.
114
+ // Uses same filter as boost.
115
+ message FilterAction {
116
+ // Required. A filter to apply on the matching condition results.
117
+ //
118
+ // Required
119
+ // Syntax documentation:
120
+ // https://cloud.google.com/retail/docs/filter-and-order
121
+ // Maximum length is 5000 characters. Otherwise an INVALID
122
+ // ARGUMENT error is thrown.
123
+ string filter = 1 [(google.api.field_behavior) = REQUIRED];
124
+
125
+ // Required. Specifies which data store's documents can be filtered by this
126
+ // control. Full data store name e.g.
127
+ // projects/123/locations/global/collections/default_collection/dataStores/default_data_store
128
+ string data_store = 2 [
129
+ (google.api.field_behavior) = REQUIRED,
130
+ (google.api.resource_reference) = {
131
+ type: "discoveryengine.googleapis.com/DataStore"
132
+ }
133
+ ];
134
+ }
135
+
136
+ // Redirects a shopper to the provided URI.
137
+ message RedirectAction {
138
+ // Required. The URI to which the shopper will be redirected.
139
+ //
140
+ // Required.
141
+ // URI must have length equal or less than 2000 characters.
142
+ // Otherwise an INVALID ARGUMENT error is thrown.
143
+ string redirect_uri = 1 [(google.api.field_behavior) = REQUIRED];
144
+ }
145
+
146
+ // Creates a set of terms that will act as synonyms of one another.
147
+ //
148
+ // Example: "happy" will also be considered as "glad", "glad" will also be
149
+ // considered as "happy".
150
+ message SynonymsAction {
151
+ // Defines a set of synonyms.
152
+ // Can specify up to 100 synonyms.
153
+ // Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
154
+ // thrown.
155
+ repeated string synonyms = 1;
156
+ }
157
+
158
+ // Actions are restricted by Vertical and Solution
159
+ //
160
+ // Required.
161
+ oneof action {
162
+ // Defines a boost-type control
163
+ BoostAction boost_action = 6;
164
+
165
+ // Defines a filter-type control
166
+ // Currently not supported by Recommendation
167
+ FilterAction filter_action = 7;
168
+
169
+ // Defines a redirect-type control.
170
+ RedirectAction redirect_action = 9;
171
+
172
+ // Treats a group of terms as synonyms of one another.
173
+ SynonymsAction synonyms_action = 10;
174
+ }
175
+
176
+ // Immutable. Fully qualified name
177
+ // `projects/*/locations/global/dataStore/*/controls/*`
178
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
179
+
180
+ // Required. Human readable name. The identifier used in UI views.
181
+ //
182
+ // Must be UTF-8 encoded string. Length limit is 128 characters.
183
+ // Otherwise an INVALID ARGUMENT error is thrown.
184
+ string display_name = 2 [(google.api.field_behavior) = REQUIRED];
185
+
186
+ // Output only. List of all
187
+ // [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] ids this
188
+ // control is attached to. May take up to 10 minutes to update after changes.
189
+ repeated string associated_serving_config_ids = 3
190
+ [(google.api.field_behavior) = OUTPUT_ONLY];
191
+
192
+ // Required. Immutable. What solution the control belongs to.
193
+ //
194
+ // Must be compatible with vertical of resource.
195
+ // Otherwise an INVALID ARGUMENT error is thrown.
196
+ SolutionType solution_type = 4 [
197
+ (google.api.field_behavior) = REQUIRED,
198
+ (google.api.field_behavior) = IMMUTABLE
199
+ ];
200
+
201
+ // Specifies the use case for the control.
202
+ // Affects what condition fields can be set.
203
+ // Only applies to
204
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
205
+ // Currently only allow one use case per control.
206
+ // Must be set when solution_type is
207
+ // [SolutionType.SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
208
+ repeated SearchUseCase use_cases = 8;
209
+
210
+ // Determines when the associated action will trigger.
211
+ //
212
+ // Omit to always apply the action.
213
+ // Currently only a single condition may be specified.
214
+ // Otherwise an INVALID ARGUMENT error is thrown.
215
+ repeated Condition conditions = 5;
216
+ }
@@ -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.v1beta;
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/v1beta/control.proto";
24
+ import "google/protobuf/empty.proto";
25
+ import "google/protobuf/field_mask.proto";
26
+
27
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
28
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "ControlServiceProto";
31
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
32
+ option objc_class_prefix = "DISCOVERYENGINE";
33
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
34
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
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.v1beta.Control] to create
50
+ // already exists, an ALREADY_EXISTS error is returned.
51
+ rpc CreateControl(CreateControlRequest) returns (Control) {
52
+ option (google.api.http) = {
53
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/controls"
54
+ body: "control"
55
+ additional_bindings {
56
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/controls"
57
+ body: "control"
58
+ }
59
+ additional_bindings {
60
+ post: "/v1beta/{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.v1beta.Control] to delete
70
+ // does not exist, a NOT_FOUND error is returned.
71
+ rpc DeleteControl(DeleteControlRequest) returns (google.protobuf.Empty) {
72
+ option (google.api.http) = {
73
+ delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/controls/*}"
74
+ additional_bindings {
75
+ delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/controls/*}"
76
+ }
77
+ additional_bindings {
78
+ delete: "/v1beta/{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.v1beta.Control] action type cannot
87
+ // be changed. If the [Control][google.cloud.discoveryengine.v1beta.Control]
88
+ // to update does not exist, a NOT_FOUND error is returned.
89
+ rpc UpdateControl(UpdateControlRequest) returns (Control) {
90
+ option (google.api.http) = {
91
+ patch: "/v1beta/{control.name=projects/*/locations/*/dataStores/*/controls/*}"
92
+ body: "control"
93
+ additional_bindings {
94
+ patch: "/v1beta/{control.name=projects/*/locations/*/collections/*/dataStores/*/controls/*}"
95
+ body: "control"
96
+ }
97
+ additional_bindings {
98
+ patch: "/v1beta/{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: "/v1beta/{name=projects/*/locations/*/dataStores/*/controls/*}"
109
+ additional_bindings {
110
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/controls/*}"
111
+ }
112
+ additional_bindings {
113
+ get: "/v1beta/{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.v1beta.DataStore].
121
+ rpc ListControls(ListControlsRequest) returns (ListControlsResponse) {
122
+ option (google.api.http) = {
123
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/controls"
124
+ additional_bindings {
125
+ get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/controls"
126
+ }
127
+ additional_bindings {
128
+ get: "/v1beta/{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.v1beta.Control] to update. The
166
+ // following are NOT supported:
167
+ //
168
+ // * [Control.name][google.cloud.discoveryengine.v1beta.Control.name]
169
+ // * [Control.solution_type][google.cloud.discoveryengine.v1beta.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.v1beta.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
+ }
@@ -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.