google-cloud-discovery_engine-v1beta 0.9.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +747 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  4. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +698 -1
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +94 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +48 -23
  8. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +48 -23
  10. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +296 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +275 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +449 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +416 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +459 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +426 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +3 -0
  28. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +14 -7
  29. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +45 -0
  30. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +14 -7
  31. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +469 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +801 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/paths.rb +78 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +436 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +1077 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +129 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest.rb +53 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service.rb +56 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +5 -4
  41. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/paths.rb +21 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +5 -4
  43. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb +2 -1
  44. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service.rb +2 -1
  45. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  46. data/lib/google/cloud/discovery_engine/v1beta.rb +3 -0
  47. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +67 -0
  48. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
  49. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  50. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  51. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +5 -1
  52. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +3 -1
  53. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +48 -0
  54. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  55. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  56. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  57. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  58. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  59. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  60. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  61. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +1 -1
  62. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  63. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  64. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +8 -1
  65. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +57 -0
  66. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +45 -0
  67. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +1 -1
  68. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +2 -1
  69. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  70. data/proto_docs/google/api/client.rb +4 -0
  71. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +354 -0
  72. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -1
  73. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +480 -0
  74. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +20 -0
  75. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +7 -0
  76. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +101 -0
  77. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +4 -0
  78. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +2 -2
  79. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  80. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +106 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +76 -0
  82. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +310 -24
  83. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +3 -0
  84. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +99 -0
  85. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +171 -26
  86. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +141 -0
  87. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +4 -3
  88. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +3 -3
  89. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +85 -0
  90. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +1 -1
  91. metadata +42 -2
@@ -108,7 +108,7 @@ module Google
108
108
  # The search feature tier of this engine.
109
109
  #
110
110
  # Different tiers might have different
111
- # pricing. To learn more, please check the pricing documentation.
111
+ # pricing. To learn more, check the pricing documentation.
112
112
  #
113
113
  # Defaults to
114
114
  # {::Google::Cloud::DiscoveryEngine::V1beta::SearchTier::SEARCH_TIER_STANDARD SearchTier.SEARCH_TIER_STANDARD}
@@ -147,7 +147,7 @@ module Google
147
147
  # {::Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client#get_engine EngineService.GetEngine}
148
148
  # or
149
149
  # {::Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client#list_engines EngineService.ListEngines}
150
- # API after engine creation. Please use
150
+ # API after engine creation. Use
151
151
  # {::Google::Cloud::DiscoveryEngine::V1beta::Engine::ChatEngineMetadata#dialogflow_agent ChatEngineMetadata.dialogflow_agent}
152
152
  # for actual agent association after Engine is created.
153
153
  class ChatEngineConfig
@@ -173,6 +173,57 @@ module Google
173
173
  include ::Google::Protobuf::MessageExts
174
174
  extend ::Google::Protobuf::MessageExts::ClassMethods
175
175
  end
176
+
177
+ # Request for pausing training of an engine.
178
+ # @!attribute [rw] name
179
+ # @return [::String]
180
+ # Required. The name of the engine to pause.
181
+ # Format:
182
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
183
+ class PauseEngineRequest
184
+ include ::Google::Protobuf::MessageExts
185
+ extend ::Google::Protobuf::MessageExts::ClassMethods
186
+ end
187
+
188
+ # Request for resuming training of an engine.
189
+ # @!attribute [rw] name
190
+ # @return [::String]
191
+ # Required. The name of the engine to resume.
192
+ # Format:
193
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
194
+ class ResumeEngineRequest
195
+ include ::Google::Protobuf::MessageExts
196
+ extend ::Google::Protobuf::MessageExts::ClassMethods
197
+ end
198
+
199
+ # Request to manually start a tuning process now (instead of waiting for
200
+ # the periodically scheduled tuning to happen).
201
+ # @!attribute [rw] name
202
+ # @return [::String]
203
+ # Required. The resource name of the engine to tune.
204
+ # Format:
205
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
206
+ class TuneEngineRequest
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+ end
210
+
211
+ # Metadata associated with a tune operation.
212
+ # @!attribute [rw] engine
213
+ # @return [::String]
214
+ # Required. The resource name of the engine that this tune applies to.
215
+ # Format:
216
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
217
+ class TuneEngineMetadata
218
+ include ::Google::Protobuf::MessageExts
219
+ extend ::Google::Protobuf::MessageExts::ClassMethods
220
+ end
221
+
222
+ # Response associated with a tune operation.
223
+ class TuneEngineResponse
224
+ include ::Google::Protobuf::MessageExts
225
+ extend ::Google::Protobuf::MessageExts::ClassMethods
226
+ end
176
227
  end
177
228
  end
178
229
  end
@@ -0,0 +1,106 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1beta
24
+ # Specification for the grounding check.
25
+ # @!attribute [rw] citation_threshold
26
+ # @return [::Float]
27
+ # The threshold (in [0,1]) used for determining whether a fact must be
28
+ # cited for a claim in the answer candidate. Choosing a higher threshold
29
+ # will lead to fewer but very strong citations, while choosing a lower
30
+ # threshold may lead to more but somewhat weaker citations. If unset, the
31
+ # threshold will default to 0.6.
32
+ class CheckGroundingSpec
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+
37
+ # Request message for
38
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
39
+ # method.
40
+ # @!attribute [rw] grounding_config
41
+ # @return [::String]
42
+ # Required. The resource name of the grounding config, such as
43
+ # `projects/*/locations/global/groundingConfigs/default_grounding_config`.
44
+ # @!attribute [rw] answer_candidate
45
+ # @return [::String]
46
+ # Answer candidate to check.
47
+ # @!attribute [rw] facts
48
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::GroundingFact>]
49
+ # List of facts for the grounding check.
50
+ # We support up to 200 facts.
51
+ # @!attribute [rw] grounding_spec
52
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingSpec]
53
+ # Configuration of the grounding check.
54
+ class CheckGroundingRequest
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+ end
58
+
59
+ # Response message for the
60
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
61
+ # method.
62
+ # @!attribute [rw] support_score
63
+ # @return [::Float]
64
+ # The support score for the input answer candidate.
65
+ # Higher the score, higher is the fraction of claims that are supported by
66
+ # the provided facts. This is always set when a response is returned.
67
+ # @!attribute [rw] cited_chunks
68
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::FactChunk>]
69
+ # List of facts cited across all claims in the answer candidate.
70
+ # These are derived from the facts supplied in the request.
71
+ # @!attribute [rw] claims
72
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim>]
73
+ # Claim texts and citation info across all claims in the answer candidate.
74
+ class CheckGroundingResponse
75
+ include ::Google::Protobuf::MessageExts
76
+ extend ::Google::Protobuf::MessageExts::ClassMethods
77
+
78
+ # Text and citation info for a claim in the answer candidate.
79
+ # @!attribute [rw] start_pos
80
+ # @return [::Integer]
81
+ # Position indicating the start of the claim in the answer candidate,
82
+ # measured in bytes.
83
+ # @!attribute [rw] end_pos
84
+ # @return [::Integer]
85
+ # Position indicating the end of the claim in the answer candidate,
86
+ # exclusive.
87
+ # @!attribute [rw] claim_text
88
+ # @return [::String]
89
+ # Text for the claim in the answer candidate. Always provided regardless of
90
+ # whether citations or anti-citations are found.
91
+ # @!attribute [rw] citation_indices
92
+ # @return [::Array<::Integer>]
93
+ # A list of indices (into 'cited_chunks') specifying the citations
94
+ # associated with the claim. For instance [1,3,4] means that
95
+ # cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
96
+ # supporting for the claim. A citation to a fact indicates that the claim
97
+ # is supported by the fact.
98
+ class Claim
99
+ include ::Google::Protobuf::MessageExts
100
+ extend ::Google::Protobuf::MessageExts::ClassMethods
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1beta
24
+ # Grounding Fact.
25
+ # @!attribute [rw] fact_text
26
+ # @return [::String]
27
+ # Text content of the fact. Can be at most 10K characters long.
28
+ # @!attribute [rw] attributes
29
+ # @return [::Google::Protobuf::Map{::String => ::String}]
30
+ # Attributes associated with the fact.
31
+ # Common attributes include `source` (indicating where the fact was sourced
32
+ # from), `author` (indicating the author of the fact), and so on.
33
+ class GroundingFact
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # @!attribute [rw] key
38
+ # @return [::String]
39
+ # @!attribute [rw] value
40
+ # @return [::String]
41
+ class AttributesEntry
42
+ include ::Google::Protobuf::MessageExts
43
+ extend ::Google::Protobuf::MessageExts::ClassMethods
44
+ end
45
+ end
46
+
47
+ # Fact Chunk.
48
+ # @!attribute [rw] chunk_text
49
+ # @return [::String]
50
+ # Text content of the fact chunk. Can be at most 10K characters long.
51
+ # @!attribute [rw] source
52
+ # @return [::String]
53
+ # Source from which this fact chunk was retrieved. If it was retrieved
54
+ # from the GroundingFacts provided in the request then this field will
55
+ # contain the index of the specific fact from which this chunk was
56
+ # retrieved.
57
+ # @!attribute [rw] source_metadata
58
+ # @return [::Google::Protobuf::Map{::String => ::String}]
59
+ # More fine-grained information for the source reference.
60
+ class FactChunk
61
+ include ::Google::Protobuf::MessageExts
62
+ extend ::Google::Protobuf::MessageExts::ClassMethods
63
+
64
+ # @!attribute [rw] key
65
+ # @return [::String]
66
+ # @!attribute [rw] value
67
+ # @return [::String]
68
+ class SourceMetadataEntry
69
+ include ::Google::Protobuf::MessageExts
70
+ extend ::Google::Protobuf::MessageExts::ClassMethods
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
@@ -48,11 +48,11 @@ module Google
48
48
  # bits of SHA256(URI) encoded as a hex string.
49
49
  # * `custom`: One custom data JSON per row in arbitrary format that conforms
50
50
  # to the defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of
51
- # the data store. This can only be used by Gen App Builder.
51
+ # the data store. This can only be used by the GENERIC Data Store vertical.
52
52
  # * `csv`: A CSV file with header conforming to the defined
53
53
  # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the
54
54
  # data store. Each entry after the header is imported as a Document.
55
- # This can only be used by Gen App Builder.
55
+ # This can only be used by the GENERIC Data Store vertical.
56
56
  #
57
57
  # Supported values for user even imports:
58
58
  #
@@ -105,12 +105,267 @@ module Google
105
105
  # {::Google::Cloud::DiscoveryEngine::V1beta::Document#struct_data Document.struct_data}.
106
106
  # * `custom`: One custom data per row in arbitrary format that conforms to
107
107
  # the defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the
108
- # data store. This can only be used by Gen App Builder.
108
+ # data store. This can only be used by the GENERIC Data Store vertical.
109
109
  class BigQuerySource
110
110
  include ::Google::Protobuf::MessageExts
111
111
  extend ::Google::Protobuf::MessageExts::ClassMethods
112
112
  end
113
113
 
114
+ # The Spanner source for importing data
115
+ # @!attribute [rw] project_id
116
+ # @return [::String]
117
+ # The project ID that the Spanner source is in with a length limit of 128
118
+ # characters. If not specified, inherits the project ID from the parent
119
+ # request.
120
+ # @!attribute [rw] instance_id
121
+ # @return [::String]
122
+ # Required. The instance ID of the source Spanner table.
123
+ # @!attribute [rw] database_id
124
+ # @return [::String]
125
+ # Required. The database ID of the source Spanner table.
126
+ # @!attribute [rw] table_id
127
+ # @return [::String]
128
+ # Required. The table name of the Spanner database that needs to be imported.
129
+ # @!attribute [rw] enable_data_boost
130
+ # @return [::Boolean]
131
+ # Whether to apply data boost on Spanner export. Enabling this option will
132
+ # incur additional cost. More info can be found
133
+ # [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
134
+ class SpannerSource
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+ end
138
+
139
+ # The Bigtable Options object that contains information to support
140
+ # the import.
141
+ # @!attribute [rw] key_field_name
142
+ # @return [::String]
143
+ # The field name used for saving row key value in the document. The name has
144
+ # to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
145
+ # @!attribute [rw] families
146
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::BigtableColumnFamily}]
147
+ # The mapping from family names to an object that contains column families
148
+ # level information for the given column family. If a family is not present
149
+ # in this map it will be ignored.
150
+ class BigtableOptions
151
+ include ::Google::Protobuf::MessageExts
152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
153
+
154
+ # The column family of the Bigtable.
155
+ # @!attribute [rw] field_name
156
+ # @return [::String]
157
+ # The field name to use for this column family in the document. The
158
+ # name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
159
+ # it is parsed from the family name with best effort. However, due to
160
+ # different naming patterns, field name collisions could happen, where
161
+ # parsing behavior is undefined.
162
+ # @!attribute [rw] encoding
163
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::Encoding]
164
+ # The encoding mode of the values when the type is not STRING.
165
+ # Acceptable encoding values are:
166
+ #
167
+ # * `TEXT`: indicates values are alphanumeric text strings.
168
+ # * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
169
+ # family of functions. This can be overridden for a specific column
170
+ # by listing that column in `columns` and specifying an encoding for it.
171
+ # @!attribute [rw] type
172
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::Type]
173
+ # The type of values in this column family.
174
+ # The values are expected to be encoded using `HBase Bytes.toBytes`
175
+ # function when the encoding value is set to `BINARY`.
176
+ # @!attribute [rw] columns
177
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::BigtableColumn>]
178
+ # The list of objects that contains column level information for each
179
+ # column. If a column is not present in this list it will be ignored.
180
+ class BigtableColumnFamily
181
+ include ::Google::Protobuf::MessageExts
182
+ extend ::Google::Protobuf::MessageExts::ClassMethods
183
+ end
184
+
185
+ # The column of the Bigtable.
186
+ # @!attribute [rw] qualifier
187
+ # @return [::String]
188
+ # Required. Qualifier of the column. If it cannot be decoded with utf-8,
189
+ # use a base-64 encoded string instead.
190
+ # @!attribute [rw] field_name
191
+ # @return [::String]
192
+ # The field name to use for this column in the document. The name has to
193
+ # match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
194
+ # If not set, it is parsed from the qualifier bytes with best effort.
195
+ # However, due to different naming patterns, field name collisions could
196
+ # happen, where parsing behavior is undefined.
197
+ # @!attribute [rw] encoding
198
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::Encoding]
199
+ # The encoding mode of the values when the type is not `STRING`.
200
+ # Acceptable encoding values are:
201
+ #
202
+ # * `TEXT`: indicates values are alphanumeric text strings.
203
+ # * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
204
+ # family of functions. This can be overridden for a specific column
205
+ # by listing that column in `columns` and specifying an encoding for it.
206
+ # @!attribute [rw] type
207
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::Type]
208
+ # The type of values in this column family.
209
+ # The values are expected to be encoded using `HBase Bytes.toBytes`
210
+ # function when the encoding value is set to `BINARY`.
211
+ class BigtableColumn
212
+ include ::Google::Protobuf::MessageExts
213
+ extend ::Google::Protobuf::MessageExts::ClassMethods
214
+ end
215
+
216
+ # @!attribute [rw] key
217
+ # @return [::String]
218
+ # @!attribute [rw] value
219
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions::BigtableColumnFamily]
220
+ class FamiliesEntry
221
+ include ::Google::Protobuf::MessageExts
222
+ extend ::Google::Protobuf::MessageExts::ClassMethods
223
+ end
224
+
225
+ # The type of values in a Bigtable column or column family.
226
+ # The values are expected to be encoded using
227
+ # [HBase
228
+ # Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
229
+ # function when the encoding value is set to `BINARY`.
230
+ module Type
231
+ # The type is unspecified.
232
+ TYPE_UNSPECIFIED = 0
233
+
234
+ # String type.
235
+ STRING = 1
236
+
237
+ # Numerical type.
238
+ NUMBER = 2
239
+
240
+ # Integer type.
241
+ INTEGER = 3
242
+
243
+ # Variable length integer type.
244
+ VAR_INTEGER = 4
245
+
246
+ # BigDecimal type.
247
+ BIG_NUMERIC = 5
248
+
249
+ # Boolean type.
250
+ BOOLEAN = 6
251
+
252
+ # JSON type.
253
+ JSON = 7
254
+ end
255
+
256
+ # The encoding mode of a Bigtable column or column family.
257
+ module Encoding
258
+ # The encoding is unspecified.
259
+ ENCODING_UNSPECIFIED = 0
260
+
261
+ # Text encoding.
262
+ TEXT = 1
263
+
264
+ # Binary encoding.
265
+ BINARY = 2
266
+ end
267
+ end
268
+
269
+ # The Cloud Bigtable source for importing data.
270
+ # @!attribute [rw] project_id
271
+ # @return [::String]
272
+ # The project ID that the Bigtable source is in with a length limit of 128
273
+ # characters. If not specified, inherits the project ID from the parent
274
+ # request.
275
+ # @!attribute [rw] instance_id
276
+ # @return [::String]
277
+ # Required. The instance ID of the Cloud Bigtable that needs to be imported.
278
+ # @!attribute [rw] table_id
279
+ # @return [::String]
280
+ # Required. The table ID of the Cloud Bigtable that needs to be imported.
281
+ # @!attribute [rw] bigtable_options
282
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableOptions]
283
+ # Required. Bigtable options that contains information needed when parsing
284
+ # data into typed structures. For example, column type annotations.
285
+ class BigtableSource
286
+ include ::Google::Protobuf::MessageExts
287
+ extend ::Google::Protobuf::MessageExts::ClassMethods
288
+ end
289
+
290
+ # Cloud FhirStore source import data from.
291
+ # @!attribute [rw] fhir_store
292
+ # @return [::String]
293
+ # Required. The full resource name of the FHIR store to import data from, in
294
+ # the format of
295
+ # `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
296
+ # @!attribute [rw] gcs_staging_dir
297
+ # @return [::String]
298
+ # Intermediate Cloud Storage directory used for the import with a length
299
+ # limit of 2,000 characters. Can be specified if one wants to have the
300
+ # FhirStore export to a specific Cloud Storage directory.
301
+ class FhirStoreSource
302
+ include ::Google::Protobuf::MessageExts
303
+ extend ::Google::Protobuf::MessageExts::ClassMethods
304
+ end
305
+
306
+ # Cloud SQL source import data from.
307
+ # @!attribute [rw] project_id
308
+ # @return [::String]
309
+ # The project ID that the Cloud SQL source is in with a length limit of 128
310
+ # characters. If not specified, inherits the project ID from the parent
311
+ # request.
312
+ # @!attribute [rw] instance_id
313
+ # @return [::String]
314
+ # Required. The Cloud SQL instance to copy the data from with a length limit
315
+ # of 256 characters.
316
+ # @!attribute [rw] database_id
317
+ # @return [::String]
318
+ # Required. The Cloud SQL database to copy the data from with a length limit
319
+ # of 256 characters.
320
+ # @!attribute [rw] table_id
321
+ # @return [::String]
322
+ # Required. The Cloud SQL table to copy the data from with a length limit of
323
+ # 256 characters.
324
+ # @!attribute [rw] gcs_staging_dir
325
+ # @return [::String]
326
+ # Intermediate Cloud Storage directory used for the import with a length
327
+ # limit of 2,000 characters. Can be specified if one wants to have the
328
+ # Cloud SQL export to a specific Cloud Storage directory.
329
+ #
330
+ # Ensure that the Cloud SQL service account has the necessary Cloud
331
+ # Storage Admin permissions to access the specified Cloud Storage directory.
332
+ # @!attribute [rw] offload
333
+ # @return [::Boolean]
334
+ # Option for serverless export. Enabling this option will incur additional
335
+ # cost. More info can be found
336
+ # [here](https://cloud.google.com/sql/pricing#serverless).
337
+ class CloudSqlSource
338
+ include ::Google::Protobuf::MessageExts
339
+ extend ::Google::Protobuf::MessageExts::ClassMethods
340
+ end
341
+
342
+ # Firestore source import data from.
343
+ # @!attribute [rw] project_id
344
+ # @return [::String]
345
+ # The project ID that the Cloud SQL source is in with a length limit of 128
346
+ # characters. If not specified, inherits the project ID from the parent
347
+ # request.
348
+ # @!attribute [rw] database_id
349
+ # @return [::String]
350
+ # Required. The Firestore database to copy the data from with a length limit
351
+ # of 256 characters.
352
+ # @!attribute [rw] collection_id
353
+ # @return [::String]
354
+ # Required. The Firestore collection to copy the data from with a length
355
+ # limit of 1,500 characters.
356
+ # @!attribute [rw] gcs_staging_dir
357
+ # @return [::String]
358
+ # Intermediate Cloud Storage directory used for the import with a length
359
+ # limit of 2,000 characters. Can be specified if one wants to have the
360
+ # Firestore export to a specific Cloud Storage directory.
361
+ #
362
+ # Ensure that the Firestore service account has the necessary Cloud
363
+ # Storage Admin permissions to access the specified Cloud Storage directory.
364
+ class FirestoreSource
365
+ include ::Google::Protobuf::MessageExts
366
+ extend ::Google::Protobuf::MessageExts::ClassMethods
367
+ end
368
+
114
369
  # Configuration of destination for Import related errors.
115
370
  # @!attribute [rw] gcs_prefix
116
371
  # @return [::String]
@@ -212,6 +467,9 @@ module Google
212
467
  # @!attribute [rw] failure_count
213
468
  # @return [::Integer]
214
469
  # Count of entries that encountered errors while processing.
470
+ # @!attribute [rw] total_count
471
+ # @return [::Integer]
472
+ # Total count of entries that were processed.
215
473
  class ImportDocumentsMetadata
216
474
  include ::Google::Protobuf::MessageExts
217
475
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -227,6 +485,21 @@ module Google
227
485
  # @!attribute [rw] bigquery_source
228
486
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource]
229
487
  # BigQuery input source.
488
+ # @!attribute [rw] fhir_store_source
489
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::FhirStoreSource]
490
+ # FhirStore input source.
491
+ # @!attribute [rw] spanner_source
492
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource]
493
+ # Spanner input source.
494
+ # @!attribute [rw] cloud_sql_source
495
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource]
496
+ # Cloud SQL input source.
497
+ # @!attribute [rw] firestore_source
498
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource]
499
+ # Firestore input source.
500
+ # @!attribute [rw] bigtable_source
501
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource]
502
+ # Cloud Bigtable input source.
230
503
  # @!attribute [rw] parent
231
504
  # @return [::String]
232
505
  # Required. The parent branch resource name, such as
@@ -240,6 +513,10 @@ module Google
240
513
  # The mode of reconciliation between existing documents and the documents to
241
514
  # be imported. Defaults to
242
515
  # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
516
+ # @!attribute [rw] update_mask
517
+ # @return [::Google::Protobuf::FieldMask]
518
+ # Indicates which fields in the provided imported documents to update. If
519
+ # not set, the default is to update all fields.
243
520
  # @!attribute [rw] auto_generate_ids
244
521
  # @return [::Boolean]
245
522
  # Whether to automatically generate IDs for the documents if absent.
@@ -255,45 +532,54 @@ module Google
255
532
  # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#id_field id_field},
256
533
  # otherwise, documents without IDs fail to be imported.
257
534
  #
258
- # Only set this field when using
259
- # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
260
- # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}, and
261
- # when
535
+ # Supported data sources:
536
+ #
537
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource}.
262
538
  # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
263
- # or
539
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
540
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}.
264
541
  # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
265
- # is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
542
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
543
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource SpannerSource}.
544
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource CloudSqlSource}.
545
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource FirestoreSource}.
546
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource BigtableSource}.
266
547
  # @!attribute [rw] id_field
267
548
  # @return [::String]
268
- # The field in the Cloud Storage and BigQuery sources that indicates the
269
- # unique IDs of the documents.
549
+ # The field indicates the ID field or column to be used as unique IDs of
550
+ # the documents.
270
551
  #
271
552
  # For {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} it is the
272
553
  # key of the JSON field. For instance, `my_id` for JSON `{"my_id":
273
- # "some_uuid"}`. For
274
- # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource} it is
275
- # the column name of the BigQuery table where the unique ids are stored.
554
+ # "some_uuid"}`. For others, it may be the column name of the table where the
555
+ # unique ids are stored.
276
556
  #
277
- # The values of the JSON field or the BigQuery column are used as the
557
+ # The values of the JSON field or the table column are used as the
278
558
  # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s. The JSON
279
- # field or the BigQuery column must be of string type, and the values must be
559
+ # field or the table column must be of string type, and the values must be
280
560
  # set as valid strings conform to
281
561
  # [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
282
562
  # Otherwise, documents without valid IDs fail to be imported.
283
563
  #
284
- # Only set this field when using
285
- # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
286
- # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}, and
287
- # when
288
- # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
289
- # or
290
- # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
291
- # is `custom`. And only set this field when
564
+ # Only set this field when
292
565
  # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#auto_generate_ids auto_generate_ids}
293
566
  # is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
294
567
  #
295
568
  # If it is unset, a default value `_id` is used when importing from the
296
569
  # allowed data sources.
570
+ #
571
+ # Supported data sources:
572
+ #
573
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource}.
574
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
575
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
576
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}.
577
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
578
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
579
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource SpannerSource}.
580
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource CloudSqlSource}.
581
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource FirestoreSource}.
582
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource BigtableSource}.
297
583
  class ImportDocumentsRequest
298
584
  include ::Google::Protobuf::MessageExts
299
585
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -74,6 +74,9 @@ module Google
74
74
  # @!attribute [rw] failure_count
75
75
  # @return [::Integer]
76
76
  # Count of entries that encountered errors while processing.
77
+ # @!attribute [rw] ignored_count
78
+ # @return [::Integer]
79
+ # Count of entries that were ignored as entries were not found.
77
80
  class PurgeDocumentsMetadata
78
81
  include ::Google::Protobuf::MessageExts
79
82
  extend ::Google::Protobuf::MessageExts::ClassMethods