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.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()
Returns
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>
|
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SynonymSet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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;
Parameter
Returns
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;
Parameter
Returns
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;
Parameters
Returns
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;
Parameters
Returns
addSynonymsBuilder()
public SynonymSet.Synonym.Builder addSynonymsBuilder()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns
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
Returns
build()
public SynonymSet build()
Returns
buildPartial()
public SynonymSet buildPartial()
Returns
clear()
public SynonymSet.Builder clear()
Returns
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;
Returns
clearField(Descriptors.FieldDescriptor field)
public SynonymSet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public SynonymSet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearSynonyms()
public SynonymSet.Builder clearSynonyms()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns
clone()
public SynonymSet.Builder clone()
Returns
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
getDefaultInstanceForType()
public SynonymSet getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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
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
Returns
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
Returns
getSynonymsBuilderList()
public List<SynonymSet.Synonym.Builder> getSynonymsBuilderList()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns
getSynonymsCount()
public int getSynonymsCount()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns
getSynonymsList()
public List<SynonymSet.Synonym> getSynonymsList()
List of Synonyms for the context.
repeated .google.cloud.contentwarehouse.v1.SynonymSet.Synonym synonyms = 3;
Returns
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
Returns
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()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(SynonymSet other)
public SynonymSet.Builder mergeFrom(SynonymSet other)
Parameter
Returns
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SynonymSet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public SynonymSet.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SynonymSet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
Returns
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.
|
Returns
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.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public SynonymSet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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.
|
Returns
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.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SynonymSet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
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;
Parameters
Returns
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;
Parameters
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final SynonymSet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides