google-cloud-discovery_engine-v1beta 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -6
  6. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +15 -7
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -6
  21. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +71 -37
  22. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +13 -5
  23. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +71 -37
  25. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -6
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +312 -5
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +291 -5
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -6
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +1092 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -6
  62. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +26 -14
  63. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +26 -14
  64. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +104 -2
  65. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +13 -5
  66. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +97 -2
  67. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -6
  68. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +59 -0
  69. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +9 -3
  70. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +9 -3
  71. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +13 -5
  73. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +27 -12
  74. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -6
  75. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -6
  76. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +13 -5
  77. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +21 -0
  78. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -6
  79. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -6
  80. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
  81. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  82. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +69 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  85. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +55 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +57 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/control_service_services_pb.rb +69 -0
  88. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  89. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  90. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  93. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
  95. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  97. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  98. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  99. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  100. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  101. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +49 -0
  102. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +50 -0
  103. data/lib/google/cloud/discoveryengine/v1beta/project_service_services_pb.rb +51 -0
  104. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  105. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
  107. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +5 -1
  108. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +2 -0
  109. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  110. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  112. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  113. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
  114. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +362 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +25 -1
  116. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +209 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +126 -0
  118. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -2
  119. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +491 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +75 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +2 -2
  122. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +4 -5
  123. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +9 -6
  124. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +144 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +79 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +312 -26
  129. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +106 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +57 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +127 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +20 -19
  133. data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +181 -43
  135. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +47 -1
  136. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +88 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +3 -0
  138. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +25 -4
  139. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +13 -1
  140. metadata +56 -2
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for making recommendations.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
36
39
 
@@ -205,7 +208,7 @@ module Google
205
208
  # `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
206
209
  #
207
210
  # One default serving config is created along with your recommendation engine
208
- # creation. The engine ID will be used as the ID of the default serving
211
+ # creation. The engine ID is used as the ID of the default serving
209
212
  # config. For example, for Engine
210
213
  # `projects/*/locations/global/collections/*/engines/my-engine`, you can use
211
214
  # `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
@@ -231,9 +234,9 @@ module Google
231
234
  # unset.
232
235
  # @param page_size [::Integer]
233
236
  # Maximum number of results to return. Set this property
234
- # to the number of recommendation results needed. If zero, the service will
235
- # choose a reasonable default. The maximum allowed value is 100. Values
236
- # above 100 will be coerced to 100.
237
+ # to the number of recommendation results needed. If zero, the service
238
+ # chooses a reasonable default. The maximum allowed value is 100. Values
239
+ # above 100 are set to 100.
237
240
  # @param filter [::String]
238
241
  # Filter for restricting recommendation results with a length limit of 5,000
239
242
  # characters. Currently, only filter expressions on the `filter_tags`
@@ -253,18 +256,18 @@ module Google
253
256
  # * (available: true) AND
254
257
  # (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
255
258
  #
256
- # If your filter blocks all results, the API will return generic
259
+ # If your filter blocks all results, the API returns generic
257
260
  # (unfiltered) popular Documents. If you only want results strictly matching
258
- # the filters, set `strictFiltering` to True in
261
+ # the filters, set `strictFiltering` to `true` in
259
262
  # {::Google::Cloud::DiscoveryEngine::V1beta::RecommendRequest#params RecommendRequest.params}
260
263
  # to receive empty results instead.
261
264
  #
262
- # Note that the API will never return
265
+ # Note that the API never returns
263
266
  # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s with
264
- # `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
267
+ # `storageStatus` as `EXPIRED` or `DELETED` regardless of filter choices.
265
268
  # @param validate_only [::Boolean]
266
- # Use validate only mode for this recommendation query. If set to true, a
267
- # fake model will be used that returns arbitrary Document IDs.
269
+ # Use validate only mode for this recommendation query. If set to `true`, a
270
+ # fake model is used that returns arbitrary Document IDs.
268
271
  # Note that the validate only mode should only be used for testing the API,
269
272
  # or if the model is not ready.
270
273
  # @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
@@ -272,16 +275,17 @@ module Google
272
275
  #
273
276
  # Allowed values:
274
277
  #
275
- # * `returnDocument`: Boolean. If set to true, the associated Document
276
- # object will be returned in
278
+ # * `returnDocument`: Boolean. If set to `true`, the associated Document
279
+ # object is returned in
277
280
  # {::Google::Cloud::DiscoveryEngine::V1beta::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
278
- # * `returnScore`: Boolean. If set to true, the recommendation 'score'
279
- # corresponding to each returned Document will be set in
281
+ # * `returnScore`: Boolean. If set to true, the recommendation score
282
+ # corresponding to each returned Document is set in
280
283
  # {::Google::Cloud::DiscoveryEngine::V1beta::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
281
- # The given 'score' indicates the probability of a Document conversion
282
- # given the user's context and history.
283
- # * `strictFiltering`: Boolean. True by default. If set to false, the service
284
- # will return generic (unfiltered) popular Documents instead of empty if
284
+ # The given score indicates the probability of a Document conversion given
285
+ # the user's context and history.
286
+ # * `strictFiltering`: Boolean. True by default. If set to `false`, the
287
+ # service
288
+ # returns generic (unfiltered) popular Documents instead of empty if
285
289
  # your filter blocks all recommendation results.
286
290
  # * `diversityLevel`: String. Default empty. If set to be non-empty, then
287
291
  # it needs to be one of:
@@ -348,10 +352,11 @@ module Google
348
352
  # Customize the options with defaults
349
353
  metadata = @config.rpcs.recommend.metadata.to_h
350
354
 
351
- # Set x-goog-api-client and x-goog-user-project headers
355
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
352
356
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
353
357
  lib_name: @config.lib_name, lib_version: @config.lib_version,
354
358
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
359
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
355
360
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
356
361
 
357
362
  header_params = {}
@@ -24,6 +24,51 @@ module Google
24
24
  module RecommendationService
25
25
  # Path helper methods for the RecommendationService API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified DataStore resource string.
29
+ #
30
+ # @overload data_store_path(project:, location:, data_store:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/dataStores/{data_store}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param data_store [String]
38
+ #
39
+ # @overload data_store_path(project:, location:, collection:, data_store:)
40
+ # The resource will be in the following format:
41
+ #
42
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
43
+ #
44
+ # @param project [String]
45
+ # @param location [String]
46
+ # @param collection [String]
47
+ # @param data_store [String]
48
+ #
49
+ # @return [::String]
50
+ def data_store_path **args
51
+ resources = {
52
+ "data_store:location:project" => (proc do |project:, location:, data_store:|
53
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
54
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
55
+
56
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}"
57
+ end),
58
+ "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
59
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
60
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
61
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
62
+
63
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}"
64
+ end)
65
+ }
66
+
67
+ resource = resources[args.keys.sort.join(":")]
68
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
69
+ resource.call(**args)
70
+ end
71
+
27
72
  ##
28
73
  # Create a fully-qualified Document resource string.
29
74
  #
@@ -77,6 +122,27 @@ module Google
77
122
  resource.call(**args)
78
123
  end
79
124
 
125
+ ##
126
+ # Create a fully-qualified Engine resource string.
127
+ #
128
+ # The resource will be in the following format:
129
+ #
130
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
131
+ #
132
+ # @param project [String]
133
+ # @param location [String]
134
+ # @param collection [String]
135
+ # @param engine [String]
136
+ #
137
+ # @return [::String]
138
+ def engine_path project:, location:, collection:, engine:
139
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
140
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
141
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
142
+
143
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
144
+ end
145
+
80
146
  ##
81
147
  # Create a fully-qualified ServingConfig resource string.
82
148
  #
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for making recommendations.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
38
41
 
@@ -198,7 +201,7 @@ module Google
198
201
  # `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
199
202
  #
200
203
  # One default serving config is created along with your recommendation engine
201
- # creation. The engine ID will be used as the ID of the default serving
204
+ # creation. The engine ID is used as the ID of the default serving
202
205
  # config. For example, for Engine
203
206
  # `projects/*/locations/global/collections/*/engines/my-engine`, you can use
204
207
  # `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
@@ -224,9 +227,9 @@ module Google
224
227
  # unset.
225
228
  # @param page_size [::Integer]
226
229
  # Maximum number of results to return. Set this property
227
- # to the number of recommendation results needed. If zero, the service will
228
- # choose a reasonable default. The maximum allowed value is 100. Values
229
- # above 100 will be coerced to 100.
230
+ # to the number of recommendation results needed. If zero, the service
231
+ # chooses a reasonable default. The maximum allowed value is 100. Values
232
+ # above 100 are set to 100.
230
233
  # @param filter [::String]
231
234
  # Filter for restricting recommendation results with a length limit of 5,000
232
235
  # characters. Currently, only filter expressions on the `filter_tags`
@@ -246,18 +249,18 @@ module Google
246
249
  # * (available: true) AND
247
250
  # (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
248
251
  #
249
- # If your filter blocks all results, the API will return generic
252
+ # If your filter blocks all results, the API returns generic
250
253
  # (unfiltered) popular Documents. If you only want results strictly matching
251
- # the filters, set `strictFiltering` to True in
254
+ # the filters, set `strictFiltering` to `true` in
252
255
  # {::Google::Cloud::DiscoveryEngine::V1beta::RecommendRequest#params RecommendRequest.params}
253
256
  # to receive empty results instead.
254
257
  #
255
- # Note that the API will never return
258
+ # Note that the API never returns
256
259
  # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s with
257
- # `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
260
+ # `storageStatus` as `EXPIRED` or `DELETED` regardless of filter choices.
258
261
  # @param validate_only [::Boolean]
259
- # Use validate only mode for this recommendation query. If set to true, a
260
- # fake model will be used that returns arbitrary Document IDs.
262
+ # Use validate only mode for this recommendation query. If set to `true`, a
263
+ # fake model is used that returns arbitrary Document IDs.
261
264
  # Note that the validate only mode should only be used for testing the API,
262
265
  # or if the model is not ready.
263
266
  # @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
@@ -265,16 +268,17 @@ module Google
265
268
  #
266
269
  # Allowed values:
267
270
  #
268
- # * `returnDocument`: Boolean. If set to true, the associated Document
269
- # object will be returned in
271
+ # * `returnDocument`: Boolean. If set to `true`, the associated Document
272
+ # object is returned in
270
273
  # {::Google::Cloud::DiscoveryEngine::V1beta::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
271
- # * `returnScore`: Boolean. If set to true, the recommendation 'score'
272
- # corresponding to each returned Document will be set in
274
+ # * `returnScore`: Boolean. If set to true, the recommendation score
275
+ # corresponding to each returned Document is set in
273
276
  # {::Google::Cloud::DiscoveryEngine::V1beta::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
274
- # The given 'score' indicates the probability of a Document conversion
275
- # given the user's context and history.
276
- # * `strictFiltering`: Boolean. True by default. If set to false, the service
277
- # will return generic (unfiltered) popular Documents instead of empty if
277
+ # The given score indicates the probability of a Document conversion given
278
+ # the user's context and history.
279
+ # * `strictFiltering`: Boolean. True by default. If set to `false`, the
280
+ # service
281
+ # returns generic (unfiltered) popular Documents instead of empty if
278
282
  # your filter blocks all recommendation results.
279
283
  # * `diversityLevel`: String. Default empty. If set to be non-empty, then
280
284
  # it needs to be one of:
@@ -340,12 +344,13 @@ module Google
340
344
  # Customize the options with defaults
341
345
  call_metadata = @config.rpcs.recommend.metadata.to_h
342
346
 
343
- # Set x-goog-api-client and x-goog-user-project headers
347
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
344
348
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
345
349
  lib_name: @config.lib_name, lib_version: @config.lib_version,
346
350
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
347
351
  transports_version_send: [:rest]
348
352
 
353
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
349
354
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
350
355
 
351
356
  options.apply_defaults timeout: @config.rpcs.recommend.timeout,
@@ -17,11 +17,15 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/discovery_engine/v1beta/completion_service/rest"
20
+ require "google/cloud/discovery_engine/v1beta/control_service/rest"
20
21
  require "google/cloud/discovery_engine/v1beta/search_service/rest"
21
22
  require "google/cloud/discovery_engine/v1beta/conversational_search_service/rest"
22
23
  require "google/cloud/discovery_engine/v1beta/data_store_service/rest"
23
24
  require "google/cloud/discovery_engine/v1beta/document_service/rest"
24
25
  require "google/cloud/discovery_engine/v1beta/engine_service/rest"
26
+ require "google/cloud/discovery_engine/v1beta/grounded_generation_service/rest"
27
+ require "google/cloud/discovery_engine/v1beta/project_service/rest"
28
+ require "google/cloud/discovery_engine/v1beta/rank_service/rest"
25
29
  require "google/cloud/discovery_engine/v1beta/recommendation_service/rest"
26
30
  require "google/cloud/discovery_engine/v1beta/schema_service/rest"
27
31
  require "google/cloud/discovery_engine/v1beta/search_tuning_service/rest"
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for managing {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
36
39
 
@@ -250,10 +253,11 @@ module Google
250
253
  # Customize the options with defaults
251
254
  metadata = @config.rpcs.get_schema.metadata.to_h
252
255
 
253
- # Set x-goog-api-client and x-goog-user-project headers
256
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
254
257
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
255
258
  lib_name: @config.lib_name, lib_version: @config.lib_version,
256
259
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
260
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
257
261
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
258
262
 
259
263
  header_params = {}
@@ -306,9 +310,9 @@ module Google
306
310
  # to return. The service may return fewer than this value.
307
311
  #
308
312
  # If unspecified, at most 100
309
- # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s will be returned.
313
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s are returned.
310
314
  #
311
- # The maximum value is 1000; values above 1000 will be coerced to 1000.
315
+ # The maximum value is 1000; values above 1000 are set to 1000.
312
316
  # @param page_token [::String]
313
317
  # A page token, received from a previous
314
318
  # {::Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Client#list_schemas SchemaService.ListSchemas}
@@ -356,10 +360,11 @@ module Google
356
360
  # Customize the options with defaults
357
361
  metadata = @config.rpcs.list_schemas.metadata.to_h
358
362
 
359
- # Set x-goog-api-client and x-goog-user-project headers
363
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
360
364
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
361
365
  lib_name: @config.lib_name, lib_version: @config.lib_version,
362
366
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
367
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
363
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
364
369
 
365
370
  header_params = {}
@@ -413,7 +418,7 @@ module Google
413
418
  # create.
414
419
  # @param schema_id [::String]
415
420
  # Required. The ID to use for the
416
- # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}, which will become the
421
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}, which becomes the
417
422
  # final component of the
418
423
  # {::Google::Cloud::DiscoveryEngine::V1beta::Schema#name Schema.name}.
419
424
  #
@@ -462,10 +467,11 @@ module Google
462
467
  # Customize the options with defaults
463
468
  metadata = @config.rpcs.create_schema.metadata.to_h
464
469
 
465
- # Set x-goog-api-client and x-goog-user-project headers
470
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
466
471
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
467
472
  lib_name: @config.lib_name, lib_version: @config.lib_version,
468
473
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
474
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
469
475
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
470
476
 
471
477
  header_params = {}
@@ -517,8 +523,8 @@ module Google
517
523
  # @param allow_missing [::Boolean]
518
524
  # If set to true, and the
519
525
  # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} is not found, a new
520
- # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} will be created. In
521
- # this situation, `update_mask` is ignored.
526
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} is created. In this
527
+ # situation, `update_mask` is ignored.
522
528
  #
523
529
  # @yield [response, operation] Access the result along with the RPC operation
524
530
  # @yieldparam response [::Gapic::Operation]
@@ -561,10 +567,11 @@ module Google
561
567
  # Customize the options with defaults
562
568
  metadata = @config.rpcs.update_schema.metadata.to_h
563
569
 
564
- # Set x-goog-api-client and x-goog-user-project headers
570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
565
571
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
566
572
  lib_name: @config.lib_name, lib_version: @config.lib_version,
567
573
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
574
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
568
575
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
569
576
 
570
577
  header_params = {}
@@ -655,10 +662,11 @@ module Google
655
662
  # Customize the options with defaults
656
663
  metadata = @config.rpcs.delete_schema.metadata.to_h
657
664
 
658
- # Set x-goog-api-client and x-goog-user-project headers
665
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
659
666
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
660
667
  lib_name: @config.lib_name, lib_version: @config.lib_version,
661
668
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
669
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
662
670
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
663
671
 
664
672
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module SchemaService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
31
34
 
@@ -191,10 +194,11 @@ module Google
191
194
  # Customize the options with defaults
192
195
  metadata = @config.rpcs.list_operations.metadata.to_h
193
196
 
194
- # Set x-goog-api-client and x-goog-user-project headers
197
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
195
198
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
199
  lib_name: @config.lib_name, lib_version: @config.lib_version,
197
200
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
201
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
198
202
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
203
 
200
204
  header_params = {}
@@ -287,10 +291,11 @@ module Google
287
291
  # Customize the options with defaults
288
292
  metadata = @config.rpcs.get_operation.metadata.to_h
289
293
 
290
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
291
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
297
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
300
 
296
301
  header_params = {}
@@ -376,10 +381,11 @@ module Google
376
381
  # Customize the options with defaults
377
382
  metadata = @config.rpcs.delete_operation.metadata.to_h
378
383
 
379
- # Set x-goog-api-client and x-goog-user-project headers
384
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
380
385
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
386
  lib_name: @config.lib_name, lib_version: @config.lib_version,
382
387
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
388
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
383
389
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
390
 
385
391
  header_params = {}
@@ -470,10 +476,11 @@ module Google
470
476
  # Customize the options with defaults
471
477
  metadata = @config.rpcs.cancel_operation.metadata.to_h
472
478
 
473
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
474
480
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
482
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
483
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
485
 
479
486
  header_params = {}
@@ -574,10 +581,11 @@ module Google
574
581
  # Customize the options with defaults
575
582
  metadata = @config.rpcs.wait_operation.metadata.to_h
576
583
 
577
- # Set x-goog-api-client and x-goog-user-project headers
584
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
578
585
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
579
586
  lib_name: @config.lib_name, lib_version: @config.lib_version,
580
587
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
588
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
590
 
583
591
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for managing {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
38
41
 
@@ -242,12 +245,13 @@ module Google
242
245
  # Customize the options with defaults
243
246
  call_metadata = @config.rpcs.get_schema.metadata.to_h
244
247
 
245
- # Set x-goog-api-client and x-goog-user-project headers
248
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
246
249
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
247
250
  lib_name: @config.lib_name, lib_version: @config.lib_version,
248
251
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
249
252
  transports_version_send: [:rest]
250
253
 
254
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
251
255
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
252
256
 
253
257
  options.apply_defaults timeout: @config.rpcs.get_schema.timeout,
@@ -292,9 +296,9 @@ module Google
292
296
  # to return. The service may return fewer than this value.
293
297
  #
294
298
  # If unspecified, at most 100
295
- # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s will be returned.
299
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s are returned.
296
300
  #
297
- # The maximum value is 1000; values above 1000 will be coerced to 1000.
301
+ # The maximum value is 1000; values above 1000 are set to 1000.
298
302
  # @param page_token [::String]
299
303
  # A page token, received from a previous
300
304
  # {::Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::Client#list_schemas SchemaService.ListSchemas}
@@ -341,12 +345,13 @@ module Google
341
345
  # Customize the options with defaults
342
346
  call_metadata = @config.rpcs.list_schemas.metadata.to_h
343
347
 
344
- # Set x-goog-api-client and x-goog-user-project headers
348
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
345
349
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
346
350
  lib_name: @config.lib_name, lib_version: @config.lib_version,
347
351
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
348
352
  transports_version_send: [:rest]
349
353
 
354
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
350
355
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
351
356
 
352
357
  options.apply_defaults timeout: @config.rpcs.list_schemas.timeout,
@@ -392,7 +397,7 @@ module Google
392
397
  # create.
393
398
  # @param schema_id [::String]
394
399
  # Required. The ID to use for the
395
- # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}, which will become the
400
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}, which becomes the
396
401
  # final component of the
397
402
  # {::Google::Cloud::DiscoveryEngine::V1beta::Schema#name Schema.name}.
398
403
  #
@@ -440,12 +445,13 @@ module Google
440
445
  # Customize the options with defaults
441
446
  call_metadata = @config.rpcs.create_schema.metadata.to_h
442
447
 
443
- # Set x-goog-api-client and x-goog-user-project headers
448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
444
449
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
445
450
  lib_name: @config.lib_name, lib_version: @config.lib_version,
446
451
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
447
452
  transports_version_send: [:rest]
448
453
 
454
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
449
455
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
450
456
 
451
457
  options.apply_defaults timeout: @config.rpcs.create_schema.timeout,
@@ -489,8 +495,8 @@ module Google
489
495
  # @param allow_missing [::Boolean]
490
496
  # If set to true, and the
491
497
  # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} is not found, a new
492
- # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} will be created. In
493
- # this situation, `update_mask` is ignored.
498
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} is created. In this
499
+ # situation, `update_mask` is ignored.
494
500
  # @yield [result, operation] Access the result along with the TransportOperation object
495
501
  # @yieldparam result [::Gapic::Operation]
496
502
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -532,12 +538,13 @@ module Google
532
538
  # Customize the options with defaults
533
539
  call_metadata = @config.rpcs.update_schema.metadata.to_h
534
540
 
535
- # Set x-goog-api-client and x-goog-user-project headers
541
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
536
542
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
537
543
  lib_name: @config.lib_name, lib_version: @config.lib_version,
538
544
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
539
545
  transports_version_send: [:rest]
540
546
 
547
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
541
548
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
542
549
 
543
550
  options.apply_defaults timeout: @config.rpcs.update_schema.timeout,
@@ -619,12 +626,13 @@ module Google
619
626
  # Customize the options with defaults
620
627
  call_metadata = @config.rpcs.delete_schema.metadata.to_h
621
628
 
622
- # Set x-goog-api-client and x-goog-user-project headers
629
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
623
630
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
624
631
  lib_name: @config.lib_name, lib_version: @config.lib_version,
625
632
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
626
633
  transports_version_send: [:rest]
627
634
 
635
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
628
636
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
629
637
 
630
638
  options.apply_defaults timeout: @config.rpcs.delete_schema.timeout,