google-cloud-discovery_engine-v1beta 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +14 -0
  3. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +14 -0
  4. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +14 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +14 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/client.rb +824 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/operations.rb +809 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb +250 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/client.rb +770 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/operations.rb +1106 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/service_stub.rb +306 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest.rb +54 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service.rb +57 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +14 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +3 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb +1035 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/credentials.rb +47 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/operations.rb +809 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/paths.rb +73 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/client.rb +967 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/operations.rb +1106 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/service_stub.rb +426 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest.rb +54 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service.rb +57 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/client.rb +911 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/credentials.rb +47 -0
  28. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/paths.rb +69 -0
  29. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/rest/client.rb +850 -0
  30. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/rest/service_stub.rb +366 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/rest.rb +53 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service.rb +56 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +14 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +10 -4
  35. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +10 -4
  36. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +14 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +14 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +14 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  40. data/lib/google/cloud/discovery_engine/v1beta.rb +3 -0
  41. data/lib/google/cloud/discoveryengine/v1beta/chunk_pb.rb +50 -0
  42. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
  43. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +1 -1
  44. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +4 -1
  45. data/lib/google/cloud/discoveryengine/v1beta/evaluation_pb.rb +56 -0
  46. data/lib/google/cloud/discoveryengine/v1beta/evaluation_service_pb.rb +59 -0
  47. data/lib/google/cloud/discoveryengine/v1beta/evaluation_service_services_pb.rb +57 -0
  48. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +7 -1
  49. data/lib/google/cloud/discoveryengine/v1beta/sample_query_pb.rb +49 -0
  50. data/lib/google/cloud/discoveryengine/v1beta/sample_query_service_pb.rb +59 -0
  51. data/lib/google/cloud/discoveryengine/v1beta/sample_query_service_services_pb.rb +63 -0
  52. data/lib/google/cloud/discoveryengine/v1beta/sample_query_set_pb.rb +47 -0
  53. data/lib/google/cloud/discoveryengine/v1beta/sample_query_set_service_pb.rb +57 -0
  54. data/lib/google/cloud/discoveryengine/v1beta/sample_query_set_service_services_pb.rb +59 -0
  55. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +5 -1
  56. data/proto_docs/google/api/client.rb +14 -10
  57. data/proto_docs/google/api/resource.rb +7 -2
  58. data/proto_docs/google/cloud/discoveryengine/v1beta/chunk.rb +119 -0
  59. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +10 -2
  60. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +1 -1
  61. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +43 -2
  62. data/proto_docs/google/cloud/discoveryengine/v1beta/evaluation.rb +223 -0
  63. data/proto_docs/google/cloud/discoveryengine/v1beta/evaluation_service.rb +194 -0
  64. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +85 -0
  65. data/proto_docs/google/cloud/discoveryengine/v1beta/sample_query.rb +82 -0
  66. data/proto_docs/google/cloud/discoveryengine/v1beta/sample_query_service.rb +179 -0
  67. data/proto_docs/google/cloud/discoveryengine/v1beta/sample_query_set.rb +57 -0
  68. data/proto_docs/google/cloud/discoveryengine/v1beta/sample_query_set_service.rb +186 -0
  69. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +69 -8
  70. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +11 -5
  71. metadata +44 -2
@@ -0,0 +1,223 @@
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
+ # An evaluation is a single execution (or run) of an evaluation process. It
25
+ # encapsulates the state of the evaluation and the resulting data.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Identifier. The full resource name of the
29
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}, in the format
30
+ # of `projects/{project}/locations/{location}/evaluations/{evaluation}`.
31
+ #
32
+ # This field must be a UTF-8 encoded string with a length limit of 1024
33
+ # characters.
34
+ # @!attribute [rw] evaluation_spec
35
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Evaluation::EvaluationSpec]
36
+ # Required. The specification of the evaluation.
37
+ # @!attribute [r] quality_metrics
38
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics]
39
+ # Output only. The metrics produced by the evaluation, averaged across all
40
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s in the
41
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet SampleQuerySet}.
42
+ #
43
+ # Only populated when the evaluation's state is SUCCEEDED.
44
+ # @!attribute [r] state
45
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Evaluation::State]
46
+ # Output only. The state of the evaluation.
47
+ # @!attribute [r] error
48
+ # @return [::Google::Rpc::Status]
49
+ # Output only. The error that occurred during evaluation. Only populated when
50
+ # the evaluation's state is FAILED.
51
+ # @!attribute [r] create_time
52
+ # @return [::Google::Protobuf::Timestamp]
53
+ # Output only. Timestamp the
54
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation} was created
55
+ # at.
56
+ # @!attribute [r] end_time
57
+ # @return [::Google::Protobuf::Timestamp]
58
+ # Output only. Timestamp the
59
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation} was completed
60
+ # at.
61
+ # @!attribute [r] error_samples
62
+ # @return [::Array<::Google::Rpc::Status>]
63
+ # Output only. A sample of errors encountered while processing the request.
64
+ class Evaluation
65
+ include ::Google::Protobuf::MessageExts
66
+ extend ::Google::Protobuf::MessageExts::ClassMethods
67
+
68
+ # Describes the specification of the evaluation.
69
+ # @!attribute [rw] search_request
70
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest]
71
+ # Required. The search request that is used to perform the evaluation.
72
+ #
73
+ # Only the following fields within SearchRequest are supported; if any
74
+ # other fields are provided, an UNSUPPORTED error will be returned:
75
+ #
76
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#serving_config SearchRequest.serving_config}
77
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#branch SearchRequest.branch}
78
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#canonical_filter SearchRequest.canonical_filter}
79
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query_expansion_spec SearchRequest.query_expansion_spec}
80
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#spell_correction_spec SearchRequest.spell_correction_spec}
81
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#content_search_spec SearchRequest.content_search_spec}
82
+ # * {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#user_pseudo_id SearchRequest.user_pseudo_id}
83
+ # @!attribute [rw] query_set_spec
84
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Evaluation::EvaluationSpec::QuerySetSpec]
85
+ # Required. The specification of the query set.
86
+ class EvaluationSpec
87
+ include ::Google::Protobuf::MessageExts
88
+ extend ::Google::Protobuf::MessageExts::ClassMethods
89
+
90
+ # Describes the specification of the query set.
91
+ # @!attribute [rw] sample_query_set
92
+ # @return [::String]
93
+ # Required. The full resource name of the
94
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet SampleQuerySet}
95
+ # used for the evaluation, in the format of
96
+ # `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
97
+ class QuerySetSpec
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+ end
102
+
103
+ # Describes the state of an evaluation.
104
+ module State
105
+ # The evaluation is unspecified.
106
+ STATE_UNSPECIFIED = 0
107
+
108
+ # The service is preparing to run the evaluation.
109
+ PENDING = 1
110
+
111
+ # The evaluation is in progress.
112
+ RUNNING = 2
113
+
114
+ # The evaluation completed successfully.
115
+ SUCCEEDED = 3
116
+
117
+ # The evaluation failed.
118
+ FAILED = 4
119
+ end
120
+ end
121
+
122
+ # Describes the metrics produced by the evaluation.
123
+ # @!attribute [rw] doc_recall
124
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics::TopkMetrics]
125
+ # Recall per document, at various top-k cutoff levels.
126
+ #
127
+ # Recall is the fraction of relevant documents retrieved out of all
128
+ # relevant documents.
129
+ #
130
+ # Example (top-5):
131
+ # * For a single
132
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}, If 3 out
133
+ # of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6
134
+ # @!attribute [rw] doc_precision
135
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics::TopkMetrics]
136
+ # Precision per document, at various top-k cutoff levels.
137
+ #
138
+ # Precision is the fraction of retrieved documents that are relevant.
139
+ #
140
+ # Example (top-5):
141
+ # * For a single
142
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}, If 4 out
143
+ # of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 =
144
+ # 0.8
145
+ # @!attribute [rw] doc_ndcg
146
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics::TopkMetrics]
147
+ # Normalized discounted cumulative gain (NDCG) per document, at various top-k
148
+ # cutoff levels.
149
+ #
150
+ # NDCG measures the ranking quality, giving higher relevance to top
151
+ # results.
152
+ #
153
+ # Example (top-3):
154
+ # Suppose {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}
155
+ # with three retrieved documents (D1, D2, D3) and binary relevance
156
+ # judgements (1 for relevant, 0 for not relevant):
157
+ #
158
+ # Retrieved: [D3 (0), D1 (1), D2 (1)]
159
+ # Ideal: [D1 (1), D2 (1), D3 (0)]
160
+ #
161
+ # Calculate NDCG@3 for each
162
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}:
163
+ # * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13
164
+ # * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63
165
+ # * NDCG@3: 1.13/1.63 = 0.693
166
+ # @!attribute [rw] page_recall
167
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics::TopkMetrics]
168
+ # Recall per page, at various top-k cutoff levels.
169
+ #
170
+ # Recall is the fraction of relevant pages retrieved out of all relevant
171
+ # pages.
172
+ #
173
+ # Example (top-5):
174
+ # * For a single
175
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}, if 3 out
176
+ # of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6
177
+ # @!attribute [rw] page_ndcg
178
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics::TopkMetrics]
179
+ # Normalized discounted cumulative gain (NDCG) per page, at various top-k
180
+ # cutoff levels.
181
+ #
182
+ # NDCG measures the ranking quality, giving higher relevance to top
183
+ # results.
184
+ #
185
+ # Example (top-3):
186
+ # Suppose {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}
187
+ # with three retrieved pages (P1, P2, P3) and binary relevance judgements (1
188
+ # for relevant, 0 for not relevant):
189
+ #
190
+ # Retrieved: [P3 (0), P1 (1), P2 (1)]
191
+ # Ideal: [P1 (1), P2 (1), P3 (0)]
192
+ #
193
+ # Calculate NDCG@3 for
194
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}:
195
+ # * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13
196
+ # * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63
197
+ # * NDCG@3: 1.13/1.63 = 0.693
198
+ class QualityMetrics
199
+ include ::Google::Protobuf::MessageExts
200
+ extend ::Google::Protobuf::MessageExts::ClassMethods
201
+
202
+ # Stores the metric values at specific top-k levels.
203
+ # @!attribute [rw] top_1
204
+ # @return [::Float]
205
+ # The top-1 value.
206
+ # @!attribute [rw] top_3
207
+ # @return [::Float]
208
+ # The top-3 value.
209
+ # @!attribute [rw] top_5
210
+ # @return [::Float]
211
+ # The top-5 value.
212
+ # @!attribute [rw] top_10
213
+ # @return [::Float]
214
+ # The top-10 value.
215
+ class TopkMetrics
216
+ include ::Google::Protobuf::MessageExts
217
+ extend ::Google::Protobuf::MessageExts::ClassMethods
218
+ end
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end
@@ -0,0 +1,194 @@
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
+ # Request message for
25
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#get_evaluation EvaluationService.GetEvaluation}
26
+ # method.
27
+ # @!attribute [rw] name
28
+ # @return [::String]
29
+ # Required. Full resource name of
30
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}, such as
31
+ # `projects/{project}/locations/{location}/evaluations/{evaluation}`.
32
+ #
33
+ # If the caller does not have permission to access the
34
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}, regardless of
35
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
36
+ #
37
+ # If the requested
38
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation} does not
39
+ # exist, a NOT_FOUND error is returned.
40
+ class GetEvaluationRequest
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+ end
44
+
45
+ # Request message for
46
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}
47
+ # method.
48
+ # @!attribute [rw] parent
49
+ # @return [::String]
50
+ # Required. The parent location resource name, such as
51
+ # `projects/{project}/locations/{location}`.
52
+ #
53
+ # If the caller does not have permission to list
54
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}s under this
55
+ # location, regardless of whether or not this location exists, a
56
+ # `PERMISSION_DENIED` error is returned.
57
+ # @!attribute [rw] page_size
58
+ # @return [::Integer]
59
+ # Maximum number of
60
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}s to return. If
61
+ # unspecified, defaults to 100. The maximum allowed value is 1000. Values
62
+ # above 1000 will be coerced to 1000.
63
+ #
64
+ # If this field is negative, an `INVALID_ARGUMENT` error is returned.
65
+ # @!attribute [rw] page_token
66
+ # @return [::String]
67
+ # A page token
68
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListEvaluationsResponse#next_page_token ListEvaluationsResponse.next_page_token},
69
+ # received from a previous
70
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}
71
+ # call. Provide this to retrieve the subsequent page.
72
+ #
73
+ # When paginating, all other parameters provided to
74
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}
75
+ # must match the call that provided the page token. Otherwise, an
76
+ # `INVALID_ARGUMENT` error is returned.
77
+ class ListEvaluationsRequest
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
81
+
82
+ # Response message for
83
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}
84
+ # method.
85
+ # @!attribute [rw] evaluations
86
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Evaluation>]
87
+ # The {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}s.
88
+ # @!attribute [rw] next_page_token
89
+ # @return [::String]
90
+ # A token that can be sent as
91
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListEvaluationsRequest#page_token ListEvaluationsRequest.page_token}
92
+ # to retrieve the next page. If this field is omitted, there are no
93
+ # subsequent pages.
94
+ class ListEvaluationsResponse
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+ end
98
+
99
+ # Request message for
100
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#create_evaluation EvaluationService.CreateEvaluation}
101
+ # method.
102
+ # @!attribute [rw] parent
103
+ # @return [::String]
104
+ # Required. The parent resource name, such as
105
+ # `projects/{project}/locations/{location}`.
106
+ # @!attribute [rw] evaluation
107
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Evaluation]
108
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Evaluation Evaluation}
109
+ # to create.
110
+ class CreateEvaluationRequest
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+
115
+ # Metadata for
116
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#create_evaluation EvaluationService.CreateEvaluation}
117
+ # method.
118
+ class CreateEvaluationMetadata
119
+ include ::Google::Protobuf::MessageExts
120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
121
+ end
122
+
123
+ # Request message for
124
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}
125
+ # method.
126
+ # @!attribute [rw] evaluation
127
+ # @return [::String]
128
+ # Required. The evaluation resource name, such as
129
+ # `projects/{project}/locations/{location}/evaluations/{evaluation}`.
130
+ #
131
+ # If the caller does not have permission to list [EvaluationResult][]
132
+ # under this evaluation, regardless of whether or not this evaluation
133
+ # set exists, a `PERMISSION_DENIED` error is returned.
134
+ # @!attribute [rw] page_size
135
+ # @return [::Integer]
136
+ # Maximum number of [EvaluationResult][] to return. If unspecified,
137
+ # defaults to 100. The maximum allowed value is 1000. Values above 1000 will
138
+ # be coerced to 1000.
139
+ #
140
+ # If this field is negative, an `INVALID_ARGUMENT` error is returned.
141
+ # @!attribute [rw] page_token
142
+ # @return [::String]
143
+ # A page token
144
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListEvaluationResultsResponse#next_page_token ListEvaluationResultsResponse.next_page_token},
145
+ # received from a previous
146
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}
147
+ # call. Provide this to retrieve the subsequent page.
148
+ #
149
+ # When paginating, all other parameters provided to
150
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}
151
+ # must match the call that provided the page token. Otherwise, an
152
+ # `INVALID_ARGUMENT` error is returned.
153
+ class ListEvaluationResultsRequest
154
+ include ::Google::Protobuf::MessageExts
155
+ extend ::Google::Protobuf::MessageExts::ClassMethods
156
+ end
157
+
158
+ # Response message for
159
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}
160
+ # method.
161
+ # @!attribute [rw] evaluation_results
162
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::ListEvaluationResultsResponse::EvaluationResult>]
163
+ # The
164
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListEvaluationResultsResponse::EvaluationResult EvaluationResult}s.
165
+ # @!attribute [rw] next_page_token
166
+ # @return [::String]
167
+ # A token that can be sent as
168
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListEvaluationResultsRequest#page_token ListEvaluationResultsRequest.page_token}
169
+ # to retrieve the next page. If this field is omitted, there are no
170
+ # subsequent pages.
171
+ class ListEvaluationResultsResponse
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+
175
+ # Represents the results of an evaluation for a single
176
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}.
177
+ # @!attribute [r] sample_query
178
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery]
179
+ # Output only. The
180
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery} that was
181
+ # evaluated.
182
+ # @!attribute [r] quality_metrics
183
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::QualityMetrics]
184
+ # Output only. The metrics produced by the evaluation, for a given
185
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}.
186
+ class EvaluationResult
187
+ include ::Google::Protobuf::MessageExts
188
+ extend ::Google::Protobuf::MessageExts::ClassMethods
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end
194
+ end
@@ -690,6 +690,91 @@ module Google
690
690
  include ::Google::Protobuf::MessageExts
691
691
  extend ::Google::Protobuf::MessageExts::ClassMethods
692
692
  end
693
+
694
+ # Request message for
695
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQueryService::Client#import_sample_queries SampleQueryService.ImportSampleQueries}
696
+ # method.
697
+ # @!attribute [rw] inline_source
698
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportSampleQueriesRequest::InlineSource]
699
+ # The Inline source for sample query entries.
700
+ # @!attribute [rw] gcs_source
701
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource]
702
+ # Cloud Storage location for the input content.
703
+ # @!attribute [rw] bigquery_source
704
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource]
705
+ # BigQuery input source.
706
+ # @!attribute [rw] parent
707
+ # @return [::String]
708
+ # Required. The parent sample query set resource name, such as
709
+ # `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
710
+ #
711
+ # If the caller does not have permission to list
712
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s under this
713
+ # sample query set, regardless of whether or not this sample query set
714
+ # exists, a `PERMISSION_DENIED` error is returned.
715
+ # @!attribute [rw] error_config
716
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
717
+ # The desired location of errors incurred during the Import.
718
+ class ImportSampleQueriesRequest
719
+ include ::Google::Protobuf::MessageExts
720
+ extend ::Google::Protobuf::MessageExts::ClassMethods
721
+
722
+ # The inline source for
723
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s.
724
+ # @!attribute [rw] sample_queries
725
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery>]
726
+ # Required. A list of
727
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s to
728
+ # import. Max of 1000 items.
729
+ class InlineSource
730
+ include ::Google::Protobuf::MessageExts
731
+ extend ::Google::Protobuf::MessageExts::ClassMethods
732
+ end
733
+ end
734
+
735
+ # Response of the
736
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQueryService::Client#import_sample_queries SampleQueryService.ImportSampleQueries}
737
+ # method. If the long running operation is done, this message is returned by
738
+ # the google.longrunning.Operations.response field if the operation is
739
+ # successful.
740
+ # @!attribute [rw] error_samples
741
+ # @return [::Array<::Google::Rpc::Status>]
742
+ # A sample of errors encountered while processing the request.
743
+ # @!attribute [rw] error_config
744
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
745
+ # The desired location of errors incurred during the Import.
746
+ class ImportSampleQueriesResponse
747
+ include ::Google::Protobuf::MessageExts
748
+ extend ::Google::Protobuf::MessageExts::ClassMethods
749
+ end
750
+
751
+ # Metadata related to the progress of the ImportSampleQueries
752
+ # operation. This will be returned by the google.longrunning.Operation.metadata
753
+ # field.
754
+ # @!attribute [rw] create_time
755
+ # @return [::Google::Protobuf::Timestamp]
756
+ # ImportSampleQueries operation create time.
757
+ # @!attribute [rw] update_time
758
+ # @return [::Google::Protobuf::Timestamp]
759
+ # ImportSampleQueries operation last update time. If the operation is done,
760
+ # this is also the finish time.
761
+ # @!attribute [rw] success_count
762
+ # @return [::Integer]
763
+ # Count of {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s
764
+ # successfully imported.
765
+ # @!attribute [rw] failure_count
766
+ # @return [::Integer]
767
+ # Count of {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s
768
+ # that failed to be imported.
769
+ # @!attribute [rw] total_count
770
+ # @return [::Integer]
771
+ # Total count of
772
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery}s that were
773
+ # processed.
774
+ class ImportSampleQueriesMetadata
775
+ include ::Google::Protobuf::MessageExts
776
+ extend ::Google::Protobuf::MessageExts::ClassMethods
777
+ end
693
778
  end
694
779
  end
695
780
  end
@@ -0,0 +1,82 @@
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
+ # Sample Query captures metadata to be used for evaluation.
25
+ # @!attribute [rw] query_entry
26
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery::QueryEntry]
27
+ # The query entry.
28
+ # @!attribute [rw] name
29
+ # @return [::String]
30
+ # Identifier. The full resource name of the sample query, in the format of
31
+ # `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`.
32
+ #
33
+ # This field must be a UTF-8 encoded string with a length limit of 1024
34
+ # characters.
35
+ # @!attribute [r] create_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # Output only. Timestamp the
38
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery SampleQuery} was created
39
+ # at.
40
+ class SampleQuery
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+
44
+ # Query Entry captures metadata to be used for search evaluation.
45
+ # @!attribute [rw] query
46
+ # @return [::String]
47
+ # Required. The query.
48
+ # @!attribute [rw] targets
49
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuery::QueryEntry::Target>]
50
+ # List of targets for the query.
51
+ class QueryEntry
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+
55
+ # Defines the parameters of the query's expected outcome.
56
+ # @!attribute [rw] uri
57
+ # @return [::String]
58
+ # Expected uri of the target.
59
+ #
60
+ # This field must be a UTF-8 encoded string with a length limit of 2048
61
+ # characters.
62
+ #
63
+ # Example of valid uris: `https://example.com/abc`,
64
+ # `gcs://example/example.pdf`.
65
+ # @!attribute [rw] page_numbers
66
+ # @return [::Array<::Integer>]
67
+ # Expected page numbers of the target.
68
+ #
69
+ # Each page number must be non negative.
70
+ # @!attribute [rw] score
71
+ # @return [::Float]
72
+ # Relevance score of the target.
73
+ class Target
74
+ include ::Google::Protobuf::MessageExts
75
+ extend ::Google::Protobuf::MessageExts::ClassMethods
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end