public static final class SynonymSet.Builder extends GeneratedMessageV3.Builder<SynonymSet.Builder> implements SynonymSetOrBuilder
Represents a list of synonyms for a given context.
For example a context "sales" could contain:
Synonym 1: sale, invoice, bill, order
Synonym 2: money, credit, finance, payment
Synonym 3: shipping, freight, transport
Each SynonymSets should be disjoint
Protobuf type google.cloud.contentwarehouse.v1.SynonymSet
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addAllSynonyms(Iterable<? extends SynonymSet.Synonym> values)
public SynonymSet.Builder addAllSynonyms(Iterable<? extends SynonymSet.Synonym> values)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Parameter |
Name |
Description |
values |
Iterable<? extends com.google.cloud.contentwarehouse.v1.SynonymSet.Synonym>
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SynonymSet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
addSynonyms(SynonymSet.Synonym value)
public SynonymSet.Builder addSynonyms(SynonymSet.Synonym value)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
addSynonyms(SynonymSet.Synonym.Builder builderForValue)
public SynonymSet.Builder addSynonyms(SynonymSet.Synonym.Builder builderForValue)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
addSynonyms(int index, SynonymSet.Synonym value)
public SynonymSet.Builder addSynonyms(int index, SynonymSet.Synonym value)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
addSynonyms(int index, SynonymSet.Synonym.Builder builderForValue)
public SynonymSet.Builder addSynonyms(int index, SynonymSet.Synonym.Builder builderForValue)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
addSynonymsBuilder()
public SynonymSet.Synonym.Builder addSynonymsBuilder()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
addSynonymsBuilder(int index)
public SynonymSet.Synonym.Builder addSynonymsBuilder(int index)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Parameter |
Name |
Description |
index |
int
|
build()
public SynonymSet build()
buildPartial()
public SynonymSet buildPartial()
clear()
public SynonymSet.Builder clear()
Overrides
clearContext()
public SynonymSet.Builder clearContext()
This is a freeform field. Example contexts can be "sales," "engineering,"
"real estate," "accounting," etc.
The context can be supplied during search requests.
string context = 2;
clearField(Descriptors.FieldDescriptor field)
public SynonymSet.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearName()
public SynonymSet.Builder clearName()
The resource name of the SynonymSet
This is mandatory for google.api.resource.
Format:
projects/{project_number}/locations/{location}/synonymSets/{context}.
string name = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public SynonymSet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearSynonyms()
public SynonymSet.Builder clearSynonyms()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
clone()
public SynonymSet.Builder clone()
Overrides
getContext()
public String getContext()
This is a freeform field. Example contexts can be "sales," "engineering,"
"real estate," "accounting," etc.
The context can be supplied during search requests.
string context = 2;
Returns |
Type |
Description |
String |
The context.
|
getContextBytes()
public ByteString getContextBytes()
This is a freeform field. Example contexts can be "sales," "engineering,"
"real estate," "accounting," etc.
The context can be supplied during search requests.
string context = 2;
Returns |
Type |
Description |
ByteString |
The bytes for context.
|
getDefaultInstanceForType()
public SynonymSet getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getName()
The resource name of the SynonymSet
This is mandatory for google.api.resource.
Format:
projects/{project_number}/locations/{location}/synonymSets/{context}.
string name = 1;
Returns |
Type |
Description |
String |
The name.
|
getNameBytes()
public ByteString getNameBytes()
The resource name of the SynonymSet
This is mandatory for google.api.resource.
Format:
projects/{project_number}/locations/{location}/synonymSets/{context}.
string name = 1;
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getSynonyms(int index)
public SynonymSet.Synonym getSynonyms(int index)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Parameter |
Name |
Description |
index |
int
|
getSynonymsBuilder(int index)
public SynonymSet.Synonym.Builder getSynonymsBuilder(int index)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Parameter |
Name |
Description |
index |
int
|
getSynonymsBuilderList()
public List<SynonymSet.Synonym.Builder> getSynonymsBuilderList()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
getSynonymsCount()
public int getSynonymsCount()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns |
Type |
Description |
int |
|
getSynonymsList()
public List<SynonymSet.Synonym> getSynonymsList()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
getSynonymsOrBuilder(int index)
public SynonymSet.SynonymOrBuilder getSynonymsOrBuilder(int index)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Parameter |
Name |
Description |
index |
int
|
getSynonymsOrBuilderList()
public List<? extends SynonymSet.SynonymOrBuilder> getSynonymsOrBuilderList()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns |
Type |
Description |
List<? extends com.google.cloud.contentwarehouse.v1.SynonymSet.SynonymOrBuilder> |
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(SynonymSet other)
public SynonymSet.Builder mergeFrom(SynonymSet other)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SynonymSet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public SynonymSet.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SynonymSet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removeSynonyms(int index)
public SynonymSet.Builder removeSynonyms(int index)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Parameter |
Name |
Description |
index |
int
|
setContext(String value)
public SynonymSet.Builder setContext(String value)
This is a freeform field. Example contexts can be "sales," "engineering,"
"real estate," "accounting," etc.
The context can be supplied during search requests.
string context = 2;
Parameter |
Name |
Description |
value |
String
The context to set.
|
setContextBytes(ByteString value)
public SynonymSet.Builder setContextBytes(ByteString value)
This is a freeform field. Example contexts can be "sales," "engineering,"
"real estate," "accounting," etc.
The context can be supplied during search requests.
string context = 2;
Parameter |
Name |
Description |
value |
ByteString
The bytes for context to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public SynonymSet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setName(String value)
public SynonymSet.Builder setName(String value)
The resource name of the SynonymSet
This is mandatory for google.api.resource.
Format:
projects/{project_number}/locations/{location}/synonymSets/{context}.
string name = 1;
Parameter |
Name |
Description |
value |
String
The name to set.
|
setNameBytes(ByteString value)
public SynonymSet.Builder setNameBytes(ByteString value)
The resource name of the SynonymSet
This is mandatory for google.api.resource.
Format:
projects/{project_number}/locations/{location}/synonymSets/{context}.
string name = 1;
Parameter |
Name |
Description |
value |
ByteString
The bytes for name to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SynonymSet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setSynonyms(int index, SynonymSet.Synonym value)
public SynonymSet.Builder setSynonyms(int index, SynonymSet.Synonym value)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
setSynonyms(int index, SynonymSet.Synonym.Builder builderForValue)
public SynonymSet.Builder setSynonyms(int index, SynonymSet.Synonym.Builder builderForValue)
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
setUnknownFields(UnknownFieldSet unknownFields)
public final SynonymSet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides