public static final class CompleteQueryResponse.CompletionResult.Builder extends GeneratedMessageV3.Builder<CompleteQueryResponse.CompletionResult.Builder> implements CompleteQueryResponse.CompletionResultOrBuilder
Resource that represents completion results.
Protobuf type google.cloud.retail.v2.CompleteQueryResponse.CompletionResult
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CompleteQueryResponse.CompletionResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public CompleteQueryResponse.CompletionResult build()
Returns
buildPartial()
public CompleteQueryResponse.CompletionResult buildPartial()
Returns
clear()
public CompleteQueryResponse.CompletionResult.Builder clear()
Returns
Overrides
clearAttributes()
public CompleteQueryResponse.CompletionResult.Builder clearAttributes()
Returns
clearField(Descriptors.FieldDescriptor field)
public CompleteQueryResponse.CompletionResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CompleteQueryResponse.CompletionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearSuggestion()
public CompleteQueryResponse.CompletionResult.Builder clearSuggestion()
The suggestion for the query.
string suggestion = 1;
Returns
clone()
public CompleteQueryResponse.CompletionResult.Builder clone()
Returns
Overrides
containsAttributes(String key)
public boolean containsAttributes(String key)
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameter
Returns
getAttributes()
public Map<String,CustomAttribute> getAttributes()
Returns
getAttributesCount()
public int getAttributesCount()
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Returns
getAttributesMap()
public Map<String,CustomAttribute> getAttributesMap()
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Returns
getAttributesOrDefault(String key, CustomAttribute defaultValue)
public CustomAttribute getAttributesOrDefault(String key, CustomAttribute defaultValue)
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameters
Returns
getAttributesOrThrow(String key)
public CustomAttribute getAttributesOrThrow(String key)
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameter
Returns
getDefaultInstanceForType()
public CompleteQueryResponse.CompletionResult getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMutableAttributes()
public Map<String,CustomAttribute> getMutableAttributes()
Use alternate mutation accessors instead.
Returns
getSuggestion()
public String getSuggestion()
The suggestion for the query.
string suggestion = 1;
Returns
Type | Description |
String | The suggestion.
|
getSuggestionBytes()
public ByteString getSuggestionBytes()
The suggestion for the query.
string suggestion = 1;
Returns
Type | Description |
ByteString | The bytes for suggestion.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(CompleteQueryResponse.CompletionResult other)
public CompleteQueryResponse.CompletionResult.Builder mergeFrom(CompleteQueryResponse.CompletionResult other)
Parameter
Returns
public CompleteQueryResponse.CompletionResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CompleteQueryResponse.CompletionResult.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CompleteQueryResponse.CompletionResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllAttributes(Map<String,CustomAttribute> values)
public CompleteQueryResponse.CompletionResult.Builder putAllAttributes(Map<String,CustomAttribute> values)
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameter
Returns
putAttributes(String key, CustomAttribute value)
public CompleteQueryResponse.CompletionResult.Builder putAttributes(String key, CustomAttribute value)
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameters
Returns
removeAttributes(String key)
public CompleteQueryResponse.CompletionResult.Builder removeAttributes(String key)
Custom attributes for the suggestion term.
- For "user-data", the attributes are additional custom attributes
ingested through BigQuery.
- For "cloud-retail", the attributes are product attributes generated
by Cloud Retail.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public CompleteQueryResponse.CompletionResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CompleteQueryResponse.CompletionResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setSuggestion(String value)
public CompleteQueryResponse.CompletionResult.Builder setSuggestion(String value)
The suggestion for the query.
string suggestion = 1;
Parameter
Name | Description |
value | String
The suggestion to set.
|
Returns
setSuggestionBytes(ByteString value)
public CompleteQueryResponse.CompletionResult.Builder setSuggestionBytes(ByteString value)
The suggestion for the query.
string suggestion = 1;
Parameter
Name | Description |
value | ByteString
The bytes for suggestion to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final CompleteQueryResponse.CompletionResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides