Package com.google.cloud.visionai.v1
Class SearchHypernym.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchHypernym.Builder>
com.google.cloud.visionai.v1.SearchHypernym.Builder
- All Implemented Interfaces:
SearchHypernymOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SearchHypernym
public static final class SearchHypernym.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SearchHypernym.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllHyponyms(Iterable<String> values) Optional.addHyponyms(String value) Optional.addHyponymsBytes(com.google.protobuf.ByteString value) Optional.build()clear()Optional.Optional.Resource name of the SearchHypernym.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.getHyponyms(int index) Optional.com.google.protobuf.ByteStringgetHyponymsBytes(int index) Optional.intOptional.com.google.protobuf.ProtocolStringListOptional.getName()Resource name of the SearchHypernym.com.google.protobuf.ByteStringResource name of the SearchHypernym.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(SearchHypernym other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setHypernym(String value) Optional.setHypernymBytes(com.google.protobuf.ByteString value) Optional.setHyponyms(int index, String value) Optional.Resource name of the SearchHypernym.setNameBytes(com.google.protobuf.ByteString value) Resource name of the SearchHypernym.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<SearchHypernym.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<SearchHypernym.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<SearchHypernym.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<SearchHypernym.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SearchHypernym.Builder>
-
mergeFrom
public SearchHypernym.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<SearchHypernym.Builder>- Throws:
IOException
-
getName
Resource name of the SearchHypernym. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`string name = 1;- Specified by:
getNamein interfaceSearchHypernymOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Resource name of the SearchHypernym. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`string name = 1;- Specified by:
getNameBytesin interfaceSearchHypernymOrBuilder- Returns:
- The bytes for name.
-
setName
Resource name of the SearchHypernym. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Resource name of the SearchHypernym. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
Resource name of the SearchHypernym. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getHypernym
Optional. The hypernym.
string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getHypernymin interfaceSearchHypernymOrBuilder- Returns:
- The hypernym.
-
getHypernymBytes
public com.google.protobuf.ByteString getHypernymBytes()Optional. The hypernym.
string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getHypernymBytesin interfaceSearchHypernymOrBuilder- Returns:
- The bytes for hypernym.
-
setHypernym
Optional. The hypernym.
string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The hypernym to set.- Returns:
- This builder for chaining.
-
clearHypernym
Optional. The hypernym.
string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setHypernymBytes
Optional. The hypernym.
string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for hypernym to set.- Returns:
- This builder for chaining.
-
getHyponymsList
public com.google.protobuf.ProtocolStringList getHyponymsList()Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getHyponymsListin interfaceSearchHypernymOrBuilder- Returns:
- A list containing the hyponyms.
-
getHyponymsCount
public int getHyponymsCount()Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getHyponymsCountin interfaceSearchHypernymOrBuilder- Returns:
- The count of hyponyms.
-
getHyponyms
Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getHyponymsin interfaceSearchHypernymOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The hyponyms at the given index.
-
getHyponymsBytes
public com.google.protobuf.ByteString getHyponymsBytes(int index) Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getHyponymsBytesin interfaceSearchHypernymOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the hyponyms at the given index.
-
setHyponyms
Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
index- The index to set the value at.value- The hyponyms to set.- Returns:
- This builder for chaining.
-
addHyponyms
Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The hyponyms to add.- Returns:
- This builder for chaining.
-
addAllHyponyms
Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
values- The hyponyms to add.- Returns:
- This builder for chaining.
-
clearHyponyms
Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
addHyponymsBytes
Optional. Hyponyms that the hypernym is mapped to.
repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes of the hyponyms to add.- Returns:
- This builder for chaining.
-