Class Rule.TwowaySynonymsAction (2.17.0)

public static final class Rule.TwowaySynonymsAction extends GeneratedMessageV3 implements Rule.TwowaySynonymsActionOrBuilder

Creates a set of terms that will be treated as synonyms of each other. Example: synonyms of "sneakers" and "shoes":

  • "sneakers" will use a synonym of "shoes".
  • "shoes" will use a synonym of "sneakers".

Protobuf type google.cloud.retail.v2.Rule.TwowaySynonymsAction

Static Fields

SYNONYMS_FIELD_NUMBER

public static final int SYNONYMS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Rule.TwowaySynonymsAction getDefaultInstance()
Returns
TypeDescription
Rule.TwowaySynonymsAction

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Rule.TwowaySynonymsAction.Builder newBuilder()
Returns
TypeDescription
Rule.TwowaySynonymsAction.Builder

newBuilder(Rule.TwowaySynonymsAction prototype)

public static Rule.TwowaySynonymsAction.Builder newBuilder(Rule.TwowaySynonymsAction prototype)
Parameter
NameDescription
prototypeRule.TwowaySynonymsAction
Returns
TypeDescription
Rule.TwowaySynonymsAction.Builder

parseDelimitedFrom(InputStream input)

public static Rule.TwowaySynonymsAction parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Rule.TwowaySynonymsAction parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Rule.TwowaySynonymsAction parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Rule.TwowaySynonymsAction parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Rule.TwowaySynonymsAction parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Rule.TwowaySynonymsAction parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Rule.TwowaySynonymsAction parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Rule.TwowaySynonymsAction parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Rule.TwowaySynonymsAction parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Rule.TwowaySynonymsAction parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Rule.TwowaySynonymsAction parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Rule.TwowaySynonymsAction parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule.TwowaySynonymsAction
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Rule.TwowaySynonymsAction> parser()
Returns
TypeDescription
Parser<TwowaySynonymsAction>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Rule.TwowaySynonymsAction getDefaultInstanceForType()
Returns
TypeDescription
Rule.TwowaySynonymsAction

getParserForType()

public Parser<Rule.TwowaySynonymsAction> getParserForType()
Returns
TypeDescription
Parser<TwowaySynonymsAction>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSynonyms(int index)

public String getSynonyms(int index)

Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.

repeated string synonyms = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The synonyms at the given index.

getSynonymsBytes(int index)

public ByteString getSynonymsBytes(int index)

Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.

repeated string synonyms = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the synonyms at the given index.

getSynonymsCount()

public int getSynonymsCount()

Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.

repeated string synonyms = 1;

Returns
TypeDescription
int

The count of synonyms.

getSynonymsList()

public ProtocolStringList getSynonymsList()

Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.

repeated string synonyms = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the synonyms.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Rule.TwowaySynonymsAction.Builder newBuilderForType()
Returns
TypeDescription
Rule.TwowaySynonymsAction.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Rule.TwowaySynonymsAction.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Rule.TwowaySynonymsAction.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Rule.TwowaySynonymsAction.Builder toBuilder()
Returns
TypeDescription
Rule.TwowaySynonymsAction.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException