Class SearchHypernym (0.5.0)

public final class SearchHypernym extends GeneratedMessageV3 implements SearchHypernymOrBuilder

Search resource: SearchHypernym. For example, { hypernym: "vehicle" hyponyms: ["sedan", "truck"] } This means in SMART_SEARCH mode, searching for "vehicle" will also return results with "sedan" or "truck" as annotations.

Protobuf type google.cloud.visionai.v1.SearchHypernym

Static Fields

HYPERNYM_FIELD_NUMBER

public static final int HYPERNYM_FIELD_NUMBER
Field Value
Type Description
int

HYPONYMS_FIELD_NUMBER

public static final int HYPONYMS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SearchHypernym getDefaultInstance()
Returns
Type Description
SearchHypernym

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static SearchHypernym.Builder newBuilder()
Returns
Type Description
SearchHypernym.Builder

newBuilder(SearchHypernym prototype)

public static SearchHypernym.Builder newBuilder(SearchHypernym prototype)
Parameter
Name Description
prototype SearchHypernym
Returns
Type Description
SearchHypernym.Builder

parseDelimitedFrom(InputStream input)

public static SearchHypernym parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SearchHypernym
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchHypernym parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchHypernym
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static SearchHypernym parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
SearchHypernym
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SearchHypernym parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchHypernym
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SearchHypernym parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
SearchHypernym
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SearchHypernym parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchHypernym
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SearchHypernym parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SearchHypernym
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchHypernym parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchHypernym
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static SearchHypernym parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SearchHypernym
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchHypernym parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchHypernym
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static SearchHypernym parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SearchHypernym
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SearchHypernym parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchHypernym
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<SearchHypernym> parser()
Returns
Type Description
Parser<SearchHypernym>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public SearchHypernym getDefaultInstanceForType()
Returns
Type Description
SearchHypernym

getHypernym()

public String getHypernym()

Optional. The hypernym.

string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The hypernym.

getHypernymBytes()

public ByteString getHypernymBytes()

Optional. The hypernym.

string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for hypernym.

getHyponyms(int index)

public String getHyponyms(int index)

Optional. Hyponyms that the hypernym is mapped to.

repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The hyponyms at the given index.

getHyponymsBytes(int index)

public ByteString getHyponymsBytes(int index)

Optional. Hyponyms that the hypernym is mapped to.

repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the hyponyms at the given index.

getHyponymsCount()

public int getHyponymsCount()

Optional. Hyponyms that the hypernym is mapped to.

repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of hyponyms.

getHyponymsList()

public ProtocolStringList getHyponymsList()

Optional. Hyponyms that the hypernym is mapped to.

repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the hyponyms.

getName()

public String getName()

Resource name of the SearchHypernym. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name of the SearchHypernym. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<SearchHypernym> getParserForType()
Returns
Type Description
Parser<SearchHypernym>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public SearchHypernym.Builder newBuilderForType()
Returns
Type Description
SearchHypernym.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SearchHypernym.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SearchHypernym.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public SearchHypernym.Builder toBuilder()
Returns
Type Description
SearchHypernym.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException