@google-cloud/discoveryengine 1.6.0 → 1.7.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 (142) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +24 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +13 -1
  4. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +5 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +17 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/document.proto +9 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +2 -2
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +284 -22
  10. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +3 -0
  11. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +228 -0
  12. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +125 -21
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +16 -11
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +328 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +41 -1
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +21 -1
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +19 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +64 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +2 -2
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +120 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +55 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +283 -24
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +102 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +171 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +21 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +158 -24
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +9 -3
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +2 -1
  31. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +94 -0
  32. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +1 -1
  33. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +328 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +30 -1
  35. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +559 -0
  36. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +3 -6
  37. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +6 -0
  38. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +2 -2
  39. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +93 -0
  40. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +120 -0
  41. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +55 -0
  42. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +283 -24
  43. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +115 -0
  44. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +142 -22
  45. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +7 -1
  46. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +94 -0
  47. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +1 -1
  48. package/build/protos/protos.d.ts +44799 -26093
  49. package/build/protos/protos.js +120465 -74222
  50. package/build/protos/protos.json +8911 -4556
  51. package/build/src/index.d.ts +4 -1
  52. package/build/src/index.js +4 -1
  53. package/build/src/v1/conversational_search_service_client.d.ts +4 -0
  54. package/build/src/v1/document_service_client.d.ts +47 -19
  55. package/build/src/v1/index.d.ts +1 -0
  56. package/build/src/v1/index.js +3 -1
  57. package/build/src/v1/recommendation_service_client.d.ts +1087 -0
  58. package/build/src/v1/recommendation_service_client.js +1432 -0
  59. package/build/src/v1/recommendation_service_client_config.json +43 -0
  60. package/build/src/v1/search_service_client.d.ts +27 -9
  61. package/build/src/v1/search_service_client.js +18 -6
  62. package/build/src/v1/search_service_client_config.json +5 -5
  63. package/build/src/v1alpha/acl_config_service_client.d.ts +330 -0
  64. package/build/src/v1alpha/acl_config_service_client.js +454 -0
  65. package/build/src/v1alpha/chunk_service_client.d.ts +330 -0
  66. package/build/src/v1alpha/chunk_service_client.js +454 -0
  67. package/build/src/v1alpha/completion_service_client.d.ts +330 -0
  68. package/build/src/v1alpha/completion_service_client.js +457 -0
  69. package/build/src/v1alpha/conversational_search_service_client.d.ts +674 -0
  70. package/build/src/v1alpha/conversational_search_service_client.js +724 -0
  71. package/build/src/v1alpha/conversational_search_service_client_config.json +35 -0
  72. package/build/src/v1alpha/data_store_service_client.d.ts +330 -0
  73. package/build/src/v1alpha/data_store_service_client.js +457 -0
  74. package/build/src/v1alpha/document_service_client.d.ts +410 -21
  75. package/build/src/v1alpha/document_service_client.js +479 -0
  76. package/build/src/v1alpha/document_service_client_config.json +5 -0
  77. package/build/src/v1alpha/engine_service_client.d.ts +330 -0
  78. package/build/src/v1alpha/engine_service_client.js +457 -0
  79. package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
  80. package/build/src/v1alpha/estimate_billing_service_client.js +457 -0
  81. package/build/src/v1alpha/grounded_generation_service_client.d.ts +1574 -0
  82. package/build/src/v1alpha/grounded_generation_service_client.js +2248 -0
  83. package/build/src/v1alpha/grounded_generation_service_client_config.json +43 -0
  84. package/build/src/v1alpha/index.d.ts +3 -1
  85. package/build/src/v1alpha/index.js +7 -3
  86. package/build/src/v1alpha/project_service_client.d.ts +1756 -0
  87. package/build/src/v1alpha/project_service_client.js +2500 -0
  88. package/build/src/v1alpha/project_service_client_config.json +38 -0
  89. package/build/src/v1alpha/rank_service_client.d.ts +330 -0
  90. package/build/src/v1alpha/rank_service_client.js +454 -0
  91. package/build/src/v1alpha/rank_service_client_config.json +15 -2
  92. package/build/src/v1alpha/recommendation_service_client.d.ts +330 -0
  93. package/build/src/v1alpha/recommendation_service_client.js +454 -0
  94. package/build/src/v1alpha/schema_service_client.d.ts +330 -0
  95. package/build/src/v1alpha/schema_service_client.js +457 -0
  96. package/build/src/v1alpha/search_service_client.d.ts +360 -15
  97. package/build/src/v1alpha/search_service_client.js +474 -10
  98. package/build/src/v1alpha/search_service_client_config.json +5 -5
  99. package/build/src/v1alpha/search_tuning_service_client.d.ts +330 -0
  100. package/build/src/v1alpha/search_tuning_service_client.js +457 -0
  101. package/build/src/v1alpha/serving_config_service_client.d.ts +317 -1
  102. package/build/src/v1alpha/serving_config_service_client.js +434 -1
  103. package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
  104. package/build/src/v1alpha/site_search_engine_service_client.js +457 -0
  105. package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
  106. package/build/src/v1alpha/user_event_service_client.js +457 -0
  107. package/build/src/v1beta/completion_service_client.d.ts +315 -0
  108. package/build/src/v1beta/completion_service_client.js +432 -0
  109. package/build/src/v1beta/conversational_search_service_client.d.ts +659 -0
  110. package/build/src/v1beta/conversational_search_service_client.js +702 -0
  111. package/build/src/v1beta/conversational_search_service_client_config.json +35 -0
  112. package/build/src/v1beta/data_store_service_client.d.ts +315 -0
  113. package/build/src/v1beta/data_store_service_client.js +432 -0
  114. package/build/src/v1beta/document_service_client.d.ts +361 -21
  115. package/build/src/v1beta/document_service_client.js +432 -0
  116. package/build/src/v1beta/engine_service_client.d.ts +410 -0
  117. package/build/src/v1beta/engine_service_client.js +518 -0
  118. package/build/src/v1beta/engine_service_client_config.json +12 -0
  119. package/build/src/v1beta/grounded_generation_service_client.d.ts +1406 -0
  120. package/build/src/v1beta/grounded_generation_service_client.js +2014 -0
  121. package/build/src/v1beta/grounded_generation_service_client_config.json +43 -0
  122. package/build/src/v1beta/index.d.ts +2 -0
  123. package/build/src/v1beta/index.js +5 -1
  124. package/build/src/v1beta/rank_service_client.d.ts +1416 -0
  125. package/build/src/v1beta/rank_service_client.js +2015 -0
  126. package/build/src/v1beta/rank_service_client_config.json +43 -0
  127. package/build/src/v1beta/recommendation_service_client.d.ts +315 -0
  128. package/build/src/v1beta/recommendation_service_client.js +432 -0
  129. package/build/src/v1beta/schema_service_client.d.ts +315 -0
  130. package/build/src/v1beta/schema_service_client.js +432 -0
  131. package/build/src/v1beta/search_service_client.d.ts +342 -12
  132. package/build/src/v1beta/search_service_client.js +450 -8
  133. package/build/src/v1beta/search_service_client_config.json +5 -5
  134. package/build/src/v1beta/search_tuning_service_client.d.ts +315 -0
  135. package/build/src/v1beta/search_tuning_service_client.js +432 -0
  136. package/build/src/v1beta/serving_config_service_client.d.ts +315 -0
  137. package/build/src/v1beta/serving_config_service_client.js +432 -0
  138. package/build/src/v1beta/site_search_engine_service_client.d.ts +315 -0
  139. package/build/src/v1beta/site_search_engine_service_client.js +432 -0
  140. package/build/src/v1beta/user_event_service_client.d.ts +315 -0
  141. package/build/src/v1beta/user_event_service_client.js +432 -0
  142. package/package.json +1 -1
@@ -158,6 +158,19 @@ service DocumentService {
158
158
  metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata"
159
159
  };
160
160
  }
161
+
162
+ // Gets the parsed layout information for a
163
+ // [Document][google.cloud.discoveryengine.v1alpha.Document].
164
+ rpc GetProcessedDocument(GetProcessedDocumentRequest)
165
+ returns (ProcessedDocument) {
166
+ option (google.api.http) = {
167
+ get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:getProcessedDocument"
168
+ additional_bindings {
169
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:getProcessedDocument"
170
+ }
171
+ };
172
+ option (google.api.method_signature) = "name";
173
+ }
161
174
  }
162
175
 
163
176
  // Request message for
@@ -322,3 +335,54 @@ message DeleteDocumentRequest {
322
335
  }
323
336
  ];
324
337
  }
338
+
339
+ // Request message for
340
+ // [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
341
+ // method.
342
+ message GetProcessedDocumentRequest {
343
+ // The type of processing to return in the response.
344
+ enum ProcessedDocumentType {
345
+ // Default value.
346
+ PROCESSED_DOCUMENT_TYPE_UNSPECIFIED = 0;
347
+
348
+ // Available for all data store parsing configs.
349
+ PARSED_DOCUMENT = 1;
350
+
351
+ // Only available if ChunkingConfig is enabeld on the data store.
352
+ CHUNKED_DOCUMENT = 2;
353
+ }
354
+
355
+ // The format of the returned processed document. If unspecified, defaults to
356
+ // JSON.
357
+ enum ProcessedDocumentFormat {
358
+ // Default value.
359
+ PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED = 0;
360
+
361
+ // output format will be a JSON string representation of processed document.
362
+ JSON = 1;
363
+ }
364
+
365
+ // Required. Full resource name of
366
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], such as
367
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
368
+ //
369
+ // If the caller does not have permission to access the
370
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
371
+ // whether or not it exists, a `PERMISSION_DENIED` error is returned.
372
+ //
373
+ // If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
374
+ // does not exist, a `NOT_FOUND` error is returned.
375
+ string name = 1 [
376
+ (google.api.field_behavior) = REQUIRED,
377
+ (google.api.resource_reference) = {
378
+ type: "discoveryengine.googleapis.com/Document"
379
+ }
380
+ ];
381
+
382
+ // Required. What type of processing to return.
383
+ ProcessedDocumentType processed_document_type = 2
384
+ [(google.api.field_behavior) = REQUIRED];
385
+
386
+ // What format output should be. If unspecified, defaults to JSON.
387
+ ProcessedDocumentFormat processed_document_format = 3;
388
+ }
@@ -43,7 +43,7 @@ message Engine {
43
43
  // The search feature tier of this engine.
44
44
  //
45
45
  // Different tiers might have different
46
- // pricing. To learn more, please check the pricing documentation.
46
+ // pricing. To learn more, check the pricing documentation.
47
47
  //
48
48
  // Defaults to
49
49
  // [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1alpha.SearchTier.SEARCH_TIER_STANDARD]
@@ -185,7 +185,7 @@ message Engine {
185
185
  // [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
186
186
  // or
187
187
  // [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
188
- // API after engine creation. Please use
188
+ // API after engine creation. Use
189
189
  // [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1alpha.Engine.ChatEngineMetadata.dialogflow_agent]
190
190
  // for actual agent association after Engine is created.
191
191
  string dialogflow_agent_to_link = 2;
@@ -0,0 +1,120 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
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/v1alpha/grounding.proto";
24
+
25
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
26
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
27
+ option java_multiple_files = true;
28
+ option java_outer_classname = "GroundedGenerationServiceProto";
29
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
30
+ option objc_class_prefix = "DISCOVERYENGINE";
31
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
32
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
33
+
34
+ // Service for grounded generation.
35
+ service GroundedGenerationService {
36
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
37
+ option (google.api.oauth_scopes) =
38
+ "https://www.googleapis.com/auth/cloud-platform";
39
+
40
+ // Performs a grounding check.
41
+ rpc CheckGrounding(CheckGroundingRequest) returns (CheckGroundingResponse) {
42
+ option (google.api.http) = {
43
+ post: "/v1alpha/{grounding_config=projects/*/locations/*/groundingConfigs/*}:check"
44
+ body: "*"
45
+ };
46
+ }
47
+ }
48
+
49
+ // Specification for the grounding check.
50
+ message CheckGroundingSpec {
51
+ // The threshold (in [0,1]) used for determining whether a fact must be
52
+ // cited for a claim in the answer candidate. Choosing a higher threshold
53
+ // will lead to fewer but very strong citations, while choosing a lower
54
+ // threshold may lead to more but somewhat weaker citations. If unset, the
55
+ // threshold will default to 0.6.
56
+ optional double citation_threshold = 1;
57
+ }
58
+
59
+ // Request message for
60
+ // [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding]
61
+ // method.
62
+ message CheckGroundingRequest {
63
+ // Required. The resource name of the grounding config, such as
64
+ // `projects/*/locations/global/groundingConfigs/default_grounding_config`.
65
+ string grounding_config = 1 [
66
+ (google.api.field_behavior) = REQUIRED,
67
+ (google.api.resource_reference) = {
68
+ type: "discoveryengine.googleapis.com/GroundingConfig"
69
+ }
70
+ ];
71
+
72
+ // Answer candidate to check.
73
+ string answer_candidate = 2;
74
+
75
+ // List of facts for the grounding check.
76
+ // We support up to 200 facts.
77
+ repeated GroundingFact facts = 3;
78
+
79
+ // Configuration of the grounding check.
80
+ CheckGroundingSpec grounding_spec = 4;
81
+ }
82
+
83
+ // Response message for the
84
+ // [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding]
85
+ // method.
86
+ message CheckGroundingResponse {
87
+ // Text and citation info for a claim in the answer candidate.
88
+ message Claim {
89
+ // Position indicating the start of the claim in the answer candidate,
90
+ // measured in bytes.
91
+ optional int32 start_pos = 1;
92
+
93
+ // Position indicating the end of the claim in the answer candidate,
94
+ // exclusive.
95
+ optional int32 end_pos = 2;
96
+
97
+ // Text for the claim in the answer candidate. Always provided regardless of
98
+ // whether citations or anti-citations are found.
99
+ string claim_text = 3;
100
+
101
+ // A list of indices (into 'cited_chunks') specifying the citations
102
+ // associated with the claim. For instance [1,3,4] means that
103
+ // cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
104
+ // supporting for the claim. A citation to a fact indicates that the claim
105
+ // is supported by the fact.
106
+ repeated int32 citation_indices = 4;
107
+ }
108
+
109
+ // The support score for the input answer candidate.
110
+ // Higher the score, higher is the fraction of claims that are supported by
111
+ // the provided facts. This is always set when a response is returned.
112
+ optional float support_score = 1;
113
+
114
+ // List of facts cited across all claims in the answer candidate.
115
+ // These are derived from the facts supplied in the request.
116
+ repeated FactChunk cited_chunks = 3;
117
+
118
+ // Claim texts and citation info across all claims in the answer candidate.
119
+ repeated Claim claims = 4;
120
+ }
@@ -0,0 +1,55 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+
22
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
23
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "GroundingProto";
26
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
27
+ option objc_class_prefix = "DISCOVERYENGINE";
28
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
29
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
30
+
31
+ // Grounding Fact.
32
+ message GroundingFact {
33
+ // Text content of the fact. Can be at most 10K characters long.
34
+ string fact_text = 1;
35
+
36
+ // Attributes associated with the fact.
37
+ // Common attributes include `source` (indicating where the fact was sourced
38
+ // from), `author` (indicating the author of the fact), and so on.
39
+ map<string, string> attributes = 2;
40
+ }
41
+
42
+ // Fact Chunk.
43
+ message FactChunk {
44
+ // Text content of the fact chunk. Can be at most 10K characters long.
45
+ string chunk_text = 1;
46
+
47
+ // Source from which this fact chunk was retrieved. If it was retrieved
48
+ // from the GroundingFacts provided in the request then this field will
49
+ // contain the index of the specific fact from which this chunk was
50
+ // retrieved.
51
+ string source = 2;
52
+
53
+ // More fine-grained information for the source reference.
54
+ map<string, string> source_metadata = 3;
55
+ }
@@ -21,6 +21,7 @@ import "google/api/resource.proto";
21
21
  import "google/cloud/discoveryengine/v1alpha/completion.proto";
22
22
  import "google/cloud/discoveryengine/v1alpha/document.proto";
23
23
  import "google/cloud/discoveryengine/v1alpha/user_event.proto";
24
+ import "google/protobuf/field_mask.proto";
24
25
  import "google/protobuf/timestamp.proto";
25
26
  import "google/rpc/status.proto";
26
27
  import "google/type/date.proto";
@@ -60,11 +61,11 @@ message GcsSource {
60
61
  // bits of SHA256(URI) encoded as a hex string.
61
62
  // * `custom`: One custom data JSON per row in arbitrary format that conforms
62
63
  // to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
63
- // the data store. This can only be used by Gen App Builder.
64
+ // the data store. This can only be used by the GENERIC Data Store vertical.
64
65
  // * `csv`: A CSV file with header conforming to the defined
65
66
  // [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
66
67
  // data store. Each entry after the header is imported as a Document.
67
- // This can only be used by Gen App Builder.
68
+ // This can only be used by the GENERIC Data Store vertical.
68
69
  //
69
70
  // Supported values for user even imports:
70
71
  //
@@ -119,10 +120,237 @@ message BigQuerySource {
119
120
  // [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
120
121
  // * `custom`: One custom data per row in arbitrary format that conforms to
121
122
  // the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
122
- // data store. This can only be used by Gen App Builder.
123
+ // data store. This can only be used by the GENERIC Data Store vertical.
123
124
  string data_schema = 6;
124
125
  }
125
126
 
127
+ // The Spanner source for importing data
128
+ message SpannerSource {
129
+ // The project ID that the Spanner source is in with a length limit of 128
130
+ // characters. If not specified, inherits the project ID from the parent
131
+ // request.
132
+ string project_id = 1;
133
+
134
+ // Required. The instance ID of the source Spanner table.
135
+ string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
136
+
137
+ // Required. The database ID of the source Spanner table.
138
+ string database_id = 3 [(google.api.field_behavior) = REQUIRED];
139
+
140
+ // Required. The table name of the Spanner database that needs to be imported.
141
+ string table_id = 4 [(google.api.field_behavior) = REQUIRED];
142
+
143
+ // Whether to apply data boost on Spanner export. Enabling this option will
144
+ // incur additional cost. More info can be found
145
+ // [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
146
+ bool enable_data_boost = 5;
147
+ }
148
+
149
+ // The Bigtable Options object that contains information to support
150
+ // the import.
151
+ message BigtableOptions {
152
+ // The column family of the Bigtable.
153
+ message BigtableColumnFamily {
154
+ // The field name to use for this column family in the document. The
155
+ // name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
156
+ // it is parsed from the family name with best effort. However, due to
157
+ // different naming patterns, field name collisions could happen, where
158
+ // parsing behavior is undefined.
159
+ string field_name = 1;
160
+
161
+ // The encoding mode of the values when the type is not STRING.
162
+ // Acceptable encoding values are:
163
+ //
164
+ // * `TEXT`: indicates values are alphanumeric text strings.
165
+ // * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
166
+ // family of functions. This can be overridden for a specific column
167
+ // by listing that column in `columns` and specifying an encoding for it.
168
+ Encoding encoding = 2;
169
+
170
+ // The type of values in this column family.
171
+ // The values are expected to be encoded using `HBase Bytes.toBytes`
172
+ // function when the encoding value is set to `BINARY`.
173
+ Type type = 3;
174
+
175
+ // The list of objects that contains column level information for each
176
+ // column. If a column is not present in this list it will be ignored.
177
+ repeated BigtableColumn columns = 4;
178
+ }
179
+
180
+ // The column of the Bigtable.
181
+ message BigtableColumn {
182
+ // Required. Qualifier of the column. If it cannot be decoded with utf-8,
183
+ // use a base-64 encoded string instead.
184
+ bytes qualifier = 1 [(google.api.field_behavior) = REQUIRED];
185
+
186
+ // The field name to use for this column in the document. The name has to
187
+ // match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
188
+ // If not set, it is parsed from the qualifier bytes with best effort.
189
+ // However, due to different naming patterns, field name collisions could
190
+ // happen, where parsing behavior is undefined.
191
+ string field_name = 2;
192
+
193
+ // The encoding mode of the values when the type is not `STRING`.
194
+ // Acceptable encoding values are:
195
+ //
196
+ // * `TEXT`: indicates values are alphanumeric text strings.
197
+ // * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
198
+ // family of functions. This can be overridden for a specific column
199
+ // by listing that column in `columns` and specifying an encoding for it.
200
+ Encoding encoding = 3;
201
+
202
+ // The type of values in this column family.
203
+ // The values are expected to be encoded using `HBase Bytes.toBytes`
204
+ // function when the encoding value is set to `BINARY`.
205
+ Type type = 4;
206
+ }
207
+
208
+ // The type of values in a Bigtable column or column family.
209
+ // The values are expected to be encoded using
210
+ // [HBase
211
+ // Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
212
+ // function when the encoding value is set to `BINARY`.
213
+ enum Type {
214
+ // The type is unspecified.
215
+ TYPE_UNSPECIFIED = 0;
216
+
217
+ // String type.
218
+ STRING = 1;
219
+
220
+ // Numerical type.
221
+ NUMBER = 2;
222
+
223
+ // Integer type.
224
+ INTEGER = 3;
225
+
226
+ // Variable length integer type.
227
+ VAR_INTEGER = 4;
228
+
229
+ // BigDecimal type.
230
+ BIG_NUMERIC = 5;
231
+
232
+ // Boolean type.
233
+ BOOLEAN = 6;
234
+
235
+ // JSON type.
236
+ JSON = 7;
237
+ }
238
+
239
+ // The encoding mode of a Bigtable column or column family.
240
+ enum Encoding {
241
+ // The encoding is unspecified.
242
+ ENCODING_UNSPECIFIED = 0;
243
+
244
+ // Text encoding.
245
+ TEXT = 1;
246
+
247
+ // Binary encoding.
248
+ BINARY = 2;
249
+ }
250
+
251
+ // The field name used for saving row key value in the document. The name has
252
+ // to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
253
+ string key_field_name = 1;
254
+
255
+ // The mapping from family names to an object that contains column families
256
+ // level information for the given column family. If a family is not present
257
+ // in this map it will be ignored.
258
+ map<string, BigtableColumnFamily> families = 2;
259
+ }
260
+
261
+ // The Cloud Bigtable source for importing data.
262
+ message BigtableSource {
263
+ // The project ID that the Bigtable source is in with a length limit of 128
264
+ // characters. If not specified, inherits the project ID from the parent
265
+ // request.
266
+ string project_id = 1;
267
+
268
+ // Required. The instance ID of the Cloud Bigtable that needs to be imported.
269
+ string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
270
+
271
+ // Required. The table ID of the Cloud Bigtable that needs to be imported.
272
+ string table_id = 3 [(google.api.field_behavior) = REQUIRED];
273
+
274
+ // Required. Bigtable options that contains information needed when parsing
275
+ // data into typed structures. For example, column type annotations.
276
+ BigtableOptions bigtable_options = 4 [(google.api.field_behavior) = REQUIRED];
277
+ }
278
+
279
+ // Cloud FhirStore source import data from.
280
+ message FhirStoreSource {
281
+ // Required. The full resource name of the FHIR store to import data from, in
282
+ // the format of
283
+ // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
284
+ string fhir_store = 1 [
285
+ (google.api.field_behavior) = REQUIRED,
286
+ (google.api.resource_reference) = {
287
+ type: "healthcare.googleapis.com/FhirStore"
288
+ }
289
+ ];
290
+
291
+ // Intermediate Cloud Storage directory used for the import with a length
292
+ // limit of 2,000 characters. Can be specified if one wants to have the
293
+ // FhirStore export to a specific Cloud Storage directory.
294
+ string gcs_staging_dir = 2;
295
+ }
296
+
297
+ // Cloud SQL source import data from.
298
+ message CloudSqlSource {
299
+ // The project ID that the Cloud SQL source is in with a length limit of 128
300
+ // characters. If not specified, inherits the project ID from the parent
301
+ // request.
302
+ string project_id = 1;
303
+
304
+ // Required. The Cloud SQL instance to copy the data from with a length limit
305
+ // of 256 characters.
306
+ string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
307
+
308
+ // Required. The Cloud SQL database to copy the data from with a length limit
309
+ // of 256 characters.
310
+ string database_id = 3 [(google.api.field_behavior) = REQUIRED];
311
+
312
+ // Required. The Cloud SQL table to copy the data from with a length limit of
313
+ // 256 characters.
314
+ string table_id = 4 [(google.api.field_behavior) = REQUIRED];
315
+
316
+ // Intermediate Cloud Storage directory used for the import with a length
317
+ // limit of 2,000 characters. Can be specified if one wants to have the
318
+ // Cloud SQL export to a specific Cloud Storage directory.
319
+ //
320
+ // Ensure that the Cloud SQL service account has the necessary Cloud
321
+ // Storage Admin permissions to access the specified Cloud Storage directory.
322
+ string gcs_staging_dir = 5;
323
+
324
+ // Option for serverless export. Enabling this option will incur additional
325
+ // cost. More info can be found
326
+ // [here](https://cloud.google.com/sql/pricing#serverless).
327
+ bool offload = 6;
328
+ }
329
+
330
+ // Firestore source import data from.
331
+ message FirestoreSource {
332
+ // The project ID that the Cloud SQL source is in with a length limit of 128
333
+ // characters. If not specified, inherits the project ID from the parent
334
+ // request.
335
+ string project_id = 1;
336
+
337
+ // Required. The Firestore database to copy the data from with a length limit
338
+ // of 256 characters.
339
+ string database_id = 2 [(google.api.field_behavior) = REQUIRED];
340
+
341
+ // Required. The Firestore collection to copy the data from with a length
342
+ // limit of 1,500 characters.
343
+ string collection_id = 3 [(google.api.field_behavior) = REQUIRED];
344
+
345
+ // Intermediate Cloud Storage directory used for the import with a length
346
+ // limit of 2,000 characters. Can be specified if one wants to have the
347
+ // Firestore export to a specific Cloud Storage directory.
348
+ //
349
+ // Ensure that the Firestore service account has the necessary Cloud
350
+ // Storage Admin permissions to access the specified Cloud Storage directory.
351
+ string gcs_staging_dir = 4;
352
+ }
353
+
126
354
  // Configuration of destination for Import related errors.
127
355
  message ImportErrorConfig {
128
356
  // Required. Errors destination.
@@ -220,6 +448,9 @@ message ImportDocumentsMetadata {
220
448
 
221
449
  // Count of entries that encountered errors while processing.
222
450
  int64 failure_count = 4;
451
+
452
+ // Total count of entries that were processed.
453
+ int64 total_count = 5;
223
454
  }
224
455
 
225
456
  // Request message for Import methods.
@@ -256,6 +487,21 @@ message ImportDocumentsRequest {
256
487
 
257
488
  // BigQuery input source.
258
489
  BigQuerySource bigquery_source = 4;
490
+
491
+ // FhirStore input source.
492
+ FhirStoreSource fhir_store_source = 10;
493
+
494
+ // Spanner input source.
495
+ SpannerSource spanner_source = 11;
496
+
497
+ // Cloud SQL input source.
498
+ CloudSqlSource cloud_sql_source = 12;
499
+
500
+ // Firestore input source.
501
+ FirestoreSource firestore_source = 13;
502
+
503
+ // Cloud Bigtable input source.
504
+ BigtableSource bigtable_source = 15;
259
505
  }
260
506
 
261
507
  // Required. The parent branch resource name, such as
@@ -276,6 +522,10 @@ message ImportDocumentsRequest {
276
522
  // [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
277
523
  ReconciliationMode reconciliation_mode = 6;
278
524
 
525
+ // Indicates which fields in the provided imported documents to update. If
526
+ // not set, the default is to update all fields.
527
+ google.protobuf.FieldMask update_mask = 7;
528
+
279
529
  // Whether to automatically generate IDs for the documents if absent.
280
530
  //
281
531
  // If set to `true`,
@@ -289,45 +539,54 @@ message ImportDocumentsRequest {
289
539
  // [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
290
540
  // otherwise, documents without IDs fail to be imported.
291
541
  //
292
- // Only set this field when using
293
- // [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
294
- // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
295
- // when
542
+ // Supported data sources:
543
+ //
544
+ // * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
296
545
  // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
297
- // or
546
+ // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
547
+ // * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
298
548
  // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
299
- // is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
549
+ // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
550
+ // * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
551
+ // * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
552
+ // * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
553
+ // * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
300
554
  bool auto_generate_ids = 8;
301
555
 
302
- // The field in the Cloud Storage and BigQuery sources that indicates the
303
- // unique IDs of the documents.
556
+ // The field indicates the ID field or column to be used as unique IDs of
557
+ // the documents.
304
558
  //
305
559
  // For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
306
560
  // key of the JSON field. For instance, `my_id` for JSON `{"my_id":
307
- // "some_uuid"}`. For
308
- // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
309
- // the column name of the BigQuery table where the unique ids are stored.
561
+ // "some_uuid"}`. For others, it may be the column name of the table where the
562
+ // unique ids are stored.
310
563
  //
311
- // The values of the JSON field or the BigQuery column are used as the
564
+ // The values of the JSON field or the table column are used as the
312
565
  // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
313
- // field or the BigQuery column must be of string type, and the values must be
566
+ // field or the table column must be of string type, and the values must be
314
567
  // set as valid strings conform to
315
568
  // [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
316
569
  // Otherwise, documents without valid IDs fail to be imported.
317
570
  //
318
- // Only set this field when using
319
- // [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
320
- // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
321
- // when
322
- // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
323
- // or
324
- // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
325
- // is `custom`. And only set this field when
571
+ // Only set this field when
326
572
  // [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
327
573
  // is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
328
574
  //
329
575
  // If it is unset, a default value `_id` is used when importing from the
330
576
  // allowed data sources.
577
+ //
578
+ // Supported data sources:
579
+ //
580
+ // * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
581
+ // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
582
+ // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
583
+ // * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
584
+ // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
585
+ // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
586
+ // * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
587
+ // * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
588
+ // * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
589
+ // * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
331
590
  string id_field = 9;
332
591
  }
333
592