Package com.google.cloud.retail.v2alpha
Class Rule.OnewaySynonymsAction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Rule.OnewaySynonymsAction.Builder>
com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder
- All Implemented Interfaces:
Rule.OnewaySynonymsActionOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Rule.OnewaySynonymsAction
public static final class Rule.OnewaySynonymsAction.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Rule.OnewaySynonymsAction.Builder>
implements Rule.OnewaySynonymsActionOrBuilder
Maps a set of terms to a set of synonyms. Set of synonyms will be treated as synonyms of each query term only. `query_terms` will not be treated as synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "shoes" will not use a synonym of "sneakers".Protobuf type
google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction-
Method Summary
Modifier and TypeMethodDescriptionaddAllOnewayTerms(Iterable<String> values) Will be [deprecated = true] post migration;addAllQueryTerms(Iterable<String> values) Terms from the search query.addAllSynonyms(Iterable<String> values) Defines a set of synonyms.addOnewayTerms(String value) Will be [deprecated = true] post migration;addOnewayTermsBytes(com.google.protobuf.ByteString value) Will be [deprecated = true] post migration;addQueryTerms(String value) Terms from the search query.addQueryTermsBytes(com.google.protobuf.ByteString value) Terms from the search query.addSynonyms(String value) Defines a set of synonyms.addSynonymsBytes(com.google.protobuf.ByteString value) Defines a set of synonyms.build()clear()Will be [deprecated = true] post migration;Terms from the search query.Defines a set of synonyms.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetOnewayTerms(int index) Will be [deprecated = true] post migration;com.google.protobuf.ByteStringgetOnewayTermsBytes(int index) Will be [deprecated = true] post migration;intWill be [deprecated = true] post migration;com.google.protobuf.ProtocolStringListWill be [deprecated = true] post migration;getQueryTerms(int index) Terms from the search query.com.google.protobuf.ByteStringgetQueryTermsBytes(int index) Terms from the search query.intTerms from the search query.com.google.protobuf.ProtocolStringListTerms from the search query.getSynonyms(int index) Defines a set of synonyms.com.google.protobuf.ByteStringgetSynonymsBytes(int index) Defines a set of synonyms.intDefines a set of synonyms.com.google.protobuf.ProtocolStringListDefines a set of synonyms.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setOnewayTerms(int index, String value) Will be [deprecated = true] post migration;setQueryTerms(int index, String value) Terms from the search query.setSynonyms(int index, String value) Defines a set of synonyms.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Rule.OnewaySynonymsAction.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Rule.OnewaySynonymsAction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Rule.OnewaySynonymsAction.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Rule.OnewaySynonymsAction.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Rule.OnewaySynonymsAction.Builder>
-
mergeFrom
public Rule.OnewaySynonymsAction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Rule.OnewaySynonymsAction.Builder>- Throws:
IOException
-
getQueryTermsList
public com.google.protobuf.ProtocolStringList getQueryTermsList()Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Specified by:
getQueryTermsListin interfaceRule.OnewaySynonymsActionOrBuilder- Returns:
- A list containing the queryTerms.
-
getQueryTermsCount
public int getQueryTermsCount()Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Specified by:
getQueryTermsCountin interfaceRule.OnewaySynonymsActionOrBuilder- Returns:
- The count of queryTerms.
-
getQueryTerms
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Specified by:
getQueryTermsin interfaceRule.OnewaySynonymsActionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The queryTerms at the given index.
-
getQueryTermsBytes
public com.google.protobuf.ByteString getQueryTermsBytes(int index) Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Specified by:
getQueryTermsBytesin interfaceRule.OnewaySynonymsActionOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the queryTerms at the given index.
-
setQueryTerms
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Parameters:
index- The index to set the value at.value- The queryTerms to set.- Returns:
- This builder for chaining.
-
addQueryTerms
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Parameters:
value- The queryTerms to add.- Returns:
- This builder for chaining.
-
addAllQueryTerms
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Parameters:
values- The queryTerms to add.- Returns:
- This builder for chaining.
-
clearQueryTerms
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Returns:
- This builder for chaining.
-
addQueryTermsBytes
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
repeated string query_terms = 3;- Parameters:
value- The bytes of the queryTerms to add.- Returns:
- This builder for chaining.
-
getSynonymsList
public com.google.protobuf.ProtocolStringList getSynonymsList()Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Specified by:
getSynonymsListin interfaceRule.OnewaySynonymsActionOrBuilder- Returns:
- A list containing the synonyms.
-
getSynonymsCount
public int getSynonymsCount()Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Specified by:
getSynonymsCountin interfaceRule.OnewaySynonymsActionOrBuilder- Returns:
- The count of synonyms.
-
getSynonyms
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Specified by:
getSynonymsin interfaceRule.OnewaySynonymsActionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The synonyms at the given index.
-
getSynonymsBytes
public com.google.protobuf.ByteString getSynonymsBytes(int index) Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Specified by:
getSynonymsBytesin interfaceRule.OnewaySynonymsActionOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the synonyms at the given index.
-
setSynonyms
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Parameters:
index- The index to set the value at.value- The synonyms to set.- Returns:
- This builder for chaining.
-
addSynonyms
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Parameters:
value- The synonyms to add.- Returns:
- This builder for chaining.
-
addAllSynonyms
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Parameters:
values- The synonyms to add.- Returns:
- This builder for chaining.
-
clearSynonyms
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Returns:
- This builder for chaining.
-
addSynonymsBytes
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
repeated string synonyms = 4;- Parameters:
value- The bytes of the synonyms to add.- Returns:
- This builder for chaining.
-
getOnewayTermsList
public com.google.protobuf.ProtocolStringList getOnewayTermsList()Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Specified by:
getOnewayTermsListin interfaceRule.OnewaySynonymsActionOrBuilder- Returns:
- A list containing the onewayTerms.
-
getOnewayTermsCount
public int getOnewayTermsCount()Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Specified by:
getOnewayTermsCountin interfaceRule.OnewaySynonymsActionOrBuilder- Returns:
- The count of onewayTerms.
-
getOnewayTerms
Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Specified by:
getOnewayTermsin interfaceRule.OnewaySynonymsActionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The onewayTerms at the given index.
-
getOnewayTermsBytes
public com.google.protobuf.ByteString getOnewayTermsBytes(int index) Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Specified by:
getOnewayTermsBytesin interfaceRule.OnewaySynonymsActionOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the onewayTerms at the given index.
-
setOnewayTerms
Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Parameters:
index- The index to set the value at.value- The onewayTerms to set.- Returns:
- This builder for chaining.
-
addOnewayTerms
Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Parameters:
value- The onewayTerms to add.- Returns:
- This builder for chaining.
-
addAllOnewayTerms
Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Parameters:
values- The onewayTerms to add.- Returns:
- This builder for chaining.
-
clearOnewayTerms
Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Returns:
- This builder for chaining.
-
addOnewayTermsBytes
Will be [deprecated = true] post migration;
repeated string oneway_terms = 2;- Parameters:
value- The bytes of the onewayTerms to add.- Returns:
- This builder for chaining.
-