Class AdvancedCompleteQueryRequest (0.90.0)

public final class AdvancedCompleteQueryRequest extends GeneratedMessage implements AdvancedCompleteQueryRequestOrBuilder

Request message for CompletionService.AdvancedCompleteQuery method. .

Protobuf type google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > AdvancedCompleteQueryRequest

Static Fields

BOOST_SPEC_FIELD_NUMBER

public static final int BOOST_SPEC_FIELD_NUMBER
Field Value
Type Description
int

COMPLETION_CONFIG_FIELD_NUMBER

public static final int COMPLETION_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

EXPERIMENT_IDS_FIELD_NUMBER

public static final int EXPERIMENT_IDS_FIELD_NUMBER
Field Value
Type Description
int

INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER

public static final int INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

QUERY_MODEL_FIELD_NUMBER

public static final int QUERY_MODEL_FIELD_NUMBER
Field Value
Type Description
int

SUGGESTION_TYPES_FIELD_NUMBER

public static final int SUGGESTION_TYPES_FIELD_NUMBER
Field Value
Type Description
int

SUGGESTION_TYPE_SPECS_FIELD_NUMBER

public static final int SUGGESTION_TYPE_SPECS_FIELD_NUMBER
Field Value
Type Description
int

USER_INFO_FIELD_NUMBER

public static final int USER_INFO_FIELD_NUMBER
Field Value
Type Description
int

USER_PSEUDO_ID_FIELD_NUMBER

public static final int USER_PSEUDO_ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AdvancedCompleteQueryRequest getDefaultInstance()
Returns
Type Description
AdvancedCompleteQueryRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AdvancedCompleteQueryRequest.Builder newBuilder()
Returns
Type Description
AdvancedCompleteQueryRequest.Builder

newBuilder(AdvancedCompleteQueryRequest prototype)

public static AdvancedCompleteQueryRequest.Builder newBuilder(AdvancedCompleteQueryRequest prototype)
Parameter
Name Description
prototype AdvancedCompleteQueryRequest
Returns
Type Description
AdvancedCompleteQueryRequest.Builder

parseDelimitedFrom(InputStream input)

public static AdvancedCompleteQueryRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AdvancedCompleteQueryRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AdvancedCompleteQueryRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AdvancedCompleteQueryRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AdvancedCompleteQueryRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AdvancedCompleteQueryRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AdvancedCompleteQueryRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AdvancedCompleteQueryRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AdvancedCompleteQueryRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AdvancedCompleteQueryRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AdvancedCompleteQueryRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AdvancedCompleteQueryRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdvancedCompleteQueryRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AdvancedCompleteQueryRequest> parser()
Returns
Type Description
Parser<AdvancedCompleteQueryRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBoostSpec()

public AdvancedCompleteQueryRequest.BoostSpec getBoostSpec()

Optional. Specification to boost suggestions matching the condition.

.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpec

The boostSpec.

getBoostSpecOrBuilder()

public AdvancedCompleteQueryRequest.BoostSpecOrBuilder getBoostSpecOrBuilder()

Optional. Specification to boost suggestions matching the condition.

.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdvancedCompleteQueryRequest.BoostSpecOrBuilder

getCompletionConfig()

public String getCompletionConfig()

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.

string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The completionConfig.

getCompletionConfigBytes()

public ByteString getCompletionConfigBytes()

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.

string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for completionConfig.

getDefaultInstanceForType()

public AdvancedCompleteQueryRequest getDefaultInstanceForType()
Returns
Type Description
AdvancedCompleteQueryRequest

getExperimentIds(int index)

public String getExperimentIds(int index)

Optional. Experiment ids for this request.

repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The experimentIds at the given index.

getExperimentIdsBytes(int index)

public ByteString getExperimentIdsBytes(int index)

Optional. Experiment ids for this request.

repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the experimentIds at the given index.

getExperimentIdsCount()

public int getExperimentIdsCount()

Optional. Experiment ids for this request.

repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of experimentIds.

getExperimentIdsList()

public ProtocolStringList getExperimentIdsList()

Optional. Experiment ids for this request.

repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the experimentIds.

getIncludeTailSuggestions()

public boolean getIncludeTailSuggestions()

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.

bool include_tail_suggestions = 5;

Returns
Type Description
boolean

The includeTailSuggestions.

getParserForType()

public Parser<AdvancedCompleteQueryRequest> getParserForType()
Returns
Type Description
Parser<AdvancedCompleteQueryRequest>
Overrides

getQuery()

public String getQuery()

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.

string query = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

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.

string query = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for query.

getQueryModel()

public String getQueryModel()

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.

string query_model = 3;

Returns
Type Description
String

The queryModel.

getQueryModelBytes()

public ByteString getQueryModelBytes()

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.

string query_model = 3;

Returns
Type Description
ByteString

The bytes for queryModel.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSuggestionTypeSpecs(int index)

public AdvancedCompleteQueryRequest.SuggestionTypeSpec getSuggestionTypeSpecs(int index)

Optional. Specification of each suggestion type.

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdvancedCompleteQueryRequest.SuggestionTypeSpec

getSuggestionTypeSpecsCount()

public int getSuggestionTypeSpecsCount()

Optional. Specification of each suggestion type.

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getSuggestionTypeSpecsList()

public List<AdvancedCompleteQueryRequest.SuggestionTypeSpec> getSuggestionTypeSpecsList()

Optional. Specification of each suggestion type.

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<SuggestionTypeSpec>

getSuggestionTypeSpecsOrBuilder(int index)

public AdvancedCompleteQueryRequest.SuggestionTypeSpecOrBuilder getSuggestionTypeSpecsOrBuilder(int index)

Optional. Specification of each suggestion type.

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdvancedCompleteQueryRequest.SuggestionTypeSpecOrBuilder

getSuggestionTypeSpecsOrBuilderList()

public List<? extends AdvancedCompleteQueryRequest.SuggestionTypeSpecOrBuilder> getSuggestionTypeSpecsOrBuilderList()

Optional. Specification of each suggestion type.

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpecOrBuilder>

getSuggestionTypes(int index)

public AdvancedCompleteQueryRequest.SuggestionType getSuggestionTypes(int index)

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

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
AdvancedCompleteQueryRequest.SuggestionType

The suggestionTypes at the given index.

getSuggestionTypesCount()

public int getSuggestionTypesCount()

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

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of suggestionTypes.

getSuggestionTypesList()

public List<AdvancedCompleteQueryRequest.SuggestionType> getSuggestionTypesList()

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

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<SuggestionType>

A list containing the suggestionTypes.

getSuggestionTypesValue(int index)

public int getSuggestionTypesValue(int index)

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

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of suggestionTypes at the given index.

getSuggestionTypesValueList()

public List<Integer> getSuggestionTypesValueList()

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

repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for suggestionTypes.

getUserInfo()

public UserInfo getUserInfo()

Optional. Information about the end user.

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

.google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
UserInfo

The userInfo.

getUserInfoOrBuilder()

public UserInfoOrBuilder getUserInfoOrBuilder()

Optional. Information about the end user.

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

.google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
UserInfoOrBuilder

getUserPseudoId()

public String getUserPseudoId()

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

string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The userPseudoId.

getUserPseudoIdBytes()

public ByteString getUserPseudoIdBytes()

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

string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for userPseudoId.

hasBoostSpec()

public boolean hasBoostSpec()

Optional. Specification to boost suggestions matching the condition.

.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the boostSpec field is set.

hasUserInfo()

public boolean hasUserInfo()

Optional. Information about the end user.

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

.google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the userInfo field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AdvancedCompleteQueryRequest.Builder newBuilderForType()
Returns
Type Description
AdvancedCompleteQueryRequest.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected AdvancedCompleteQueryRequest.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AdvancedCompleteQueryRequest.Builder
Overrides

toBuilder()

public AdvancedCompleteQueryRequest.Builder toBuilder()
Returns
Type Description
AdvancedCompleteQueryRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException