Class: Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb

Overview

Request message for CompletionService.AdvancedCompleteQuery method. .

Defined Under Namespace

Modules: SuggestionType Classes: BoostSpec, SuggestionTypeSpec

Instance Attribute Summary collapse

Instance Attribute Details

#boost_spec::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec

Returns Optional. Specification to boost suggestions matching the condition.

Returns:



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#completion_config::String

Returns Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig projects/*/locations/global/collections/default_collection/engines/*/completionConfig.

Returns:

  • (::String)

    Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig projects/*/locations/global/collections/default_collection/engines/*/completionConfig.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#experiment_ids::Array<::String>

Returns Optional. Experiment ids for this request.

Returns:

  • (::Array<::String>)

    Optional. Experiment ids for this request.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#include_tail_suggestions::Boolean

Returns Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.

Returns:

  • (::Boolean)

    Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#query::String

Returns Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.

The query can not be empty for most of the suggestion types. If it is empty, an INVALID_ARGUMENT error is returned. The exception is when the suggestion_types contains only the type RECENT_SEARCH, the query can be an empty string. The is called "zero prefix" feature, which returns user's recently searched queries given the empty query.

Returns:

  • (::String)

    Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.

    The query can not be empty for most of the suggestion types. If it is empty, an INVALID_ARGUMENT error is returned. The exception is when the suggestion_types contains only the type RECENT_SEARCH, the query can be an empty string. The is called "zero prefix" feature, which returns user's recently searched queries given the empty query.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#query_model::String

Returns Specifies the autocomplete query model, which only applies to the QUERY SuggestionType. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values:

  • document - Using suggestions generated from user-imported documents.
  • search-history - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API.
  • user-event - Using suggestions generated from user-imported search events.
  • document-completable - Using suggestions taken directly from user-imported document fields marked as completable.

Default values:

  • document is the default model for regular dataStores.
  • search-history is the default model for site search dataStores.

Returns:

  • (::String)

    Specifies the autocomplete query model, which only applies to the QUERY SuggestionType. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values:

    • document - Using suggestions generated from user-imported documents.
    • search-history - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API.
    • user-event - Using suggestions generated from user-imported search events.
    • document-completable - Using suggestions taken directly from user-imported document fields marked as completable.

    Default values:

    • document is the default model for regular dataStores.
    • search-history is the default model for site search dataStores.


197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#suggestion_type_specs::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionTypeSpec>

Returns Optional. Specification of each suggestion type.

Returns:



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#suggestion_types::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType>

Returns Optional. Suggestion types to return. If empty or unspecified, query suggestions are returned. Only one suggestion type is supported at the moment.

Returns:



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#user_info::Google::Cloud::DiscoveryEngine::V1beta::UserInfo

Returns Optional. Information about the end user.

This should be the same identifier information as UserEvent.user_info and SearchRequest.user_info.

Returns:



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#user_pseudo_id::String

Returns Optional. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

This field should NOT have a fixed value such as unknown_visitor.

This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id.

The field must be a UTF-8 encoded string with a length limit of 128.

Returns:

  • (::String)

    Optional. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

    This field should NOT have a fixed value such as unknown_visitor.

    This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id.

    The field must be a UTF-8 encoded string with a length limit of 128



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 197

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condition of the
  # suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifications, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Specification of each suggestion type.
  # @!attribute [rw] suggestion_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType]
  #     Optional. Suggestion type.
  # @!attribute [rw] max_suggestions
  #   @return [::Integer]
  #     Optional. Maximum number of suggestions to return for each suggestion
  #     type.
  class SuggestionTypeSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end