Class EntityAnnotation.Builder (3.45.0)

public static final class EntityAnnotation.Builder extends GeneratedMessageV3.Builder<EntityAnnotation.Builder> implements EntityAnnotationOrBuilder

Set of detected entity features.

Protobuf type google.cloud.vision.v1p4beta1.EntityAnnotation

Static Methods

getDescriptor()

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

Methods

addAllLocations(Iterable<? extends LocationInfo> values)

public EntityAnnotation.Builder addAllLocations(Iterable<? extends LocationInfo> values)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
values Iterable<? extends com.google.cloud.vision.v1p4beta1.LocationInfo>
Returns
Type Description
EntityAnnotation.Builder

addAllProperties(Iterable<? extends Property> values)

public EntityAnnotation.Builder addAllProperties(Iterable<? extends Property> values)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
values Iterable<? extends com.google.cloud.vision.v1p4beta1.Property>
Returns
Type Description
EntityAnnotation.Builder

addLocations(LocationInfo value)

public EntityAnnotation.Builder addLocations(LocationInfo value)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
value LocationInfo
Returns
Type Description
EntityAnnotation.Builder

addLocations(LocationInfo.Builder builderForValue)

public EntityAnnotation.Builder addLocations(LocationInfo.Builder builderForValue)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
builderForValue LocationInfo.Builder
Returns
Type Description
EntityAnnotation.Builder

addLocations(int index, LocationInfo value)

public EntityAnnotation.Builder addLocations(int index, LocationInfo value)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameters
Name Description
index int
value LocationInfo
Returns
Type Description
EntityAnnotation.Builder

addLocations(int index, LocationInfo.Builder builderForValue)

public EntityAnnotation.Builder addLocations(int index, LocationInfo.Builder builderForValue)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameters
Name Description
index int
builderForValue LocationInfo.Builder
Returns
Type Description
EntityAnnotation.Builder

addLocationsBuilder()

public LocationInfo.Builder addLocationsBuilder()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Returns
Type Description
LocationInfo.Builder

addLocationsBuilder(int index)

public LocationInfo.Builder addLocationsBuilder(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
LocationInfo.Builder

addProperties(Property value)

public EntityAnnotation.Builder addProperties(Property value)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
value Property
Returns
Type Description
EntityAnnotation.Builder

addProperties(Property.Builder builderForValue)

public EntityAnnotation.Builder addProperties(Property.Builder builderForValue)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
builderForValue Property.Builder
Returns
Type Description
EntityAnnotation.Builder

addProperties(int index, Property value)

public EntityAnnotation.Builder addProperties(int index, Property value)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameters
Name Description
index int
value Property
Returns
Type Description
EntityAnnotation.Builder

addProperties(int index, Property.Builder builderForValue)

public EntityAnnotation.Builder addProperties(int index, Property.Builder builderForValue)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameters
Name Description
index int
builderForValue Property.Builder
Returns
Type Description
EntityAnnotation.Builder

addPropertiesBuilder()

public Property.Builder addPropertiesBuilder()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Returns
Type Description
Property.Builder

addPropertiesBuilder(int index)

public Property.Builder addPropertiesBuilder(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
Property.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EntityAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
EntityAnnotation.Builder
Overrides

build()

public EntityAnnotation build()
Returns
Type Description
EntityAnnotation

buildPartial()

public EntityAnnotation buildPartial()
Returns
Type Description
EntityAnnotation

clear()

public EntityAnnotation.Builder clear()
Returns
Type Description
EntityAnnotation.Builder
Overrides

clearBoundingPoly()

public EntityAnnotation.Builder clearBoundingPoly()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
EntityAnnotation.Builder

clearConfidence() (deprecated)

public EntityAnnotation.Builder clearConfidence()

Deprecated. google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478

Deprecated. Use score instead. The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

float confidence = 5 [deprecated = true];

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

clearDescription()

public EntityAnnotation.Builder clearDescription()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public EntityAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
EntityAnnotation.Builder
Overrides

clearLocale()

public EntityAnnotation.Builder clearLocale()

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

clearLocations()

public EntityAnnotation.Builder clearLocations()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Returns
Type Description
EntityAnnotation.Builder

clearMid()

public EntityAnnotation.Builder clearMid()

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public EntityAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
EntityAnnotation.Builder
Overrides

clearProperties()

public EntityAnnotation.Builder clearProperties()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Returns
Type Description
EntityAnnotation.Builder

clearScore()

public EntityAnnotation.Builder clearScore()

Overall score of the result. Range [0, 1].

float score = 4;

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

clearTopicality()

public EntityAnnotation.Builder clearTopicality()

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

float topicality = 6;

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

clone()

public EntityAnnotation.Builder clone()
Returns
Type Description
EntityAnnotation.Builder
Overrides

getBoundingPoly()

public BoundingPoly getBoundingPoly()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
BoundingPoly

The boundingPoly.

getBoundingPolyBuilder()

public BoundingPoly.Builder getBoundingPolyBuilder()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
BoundingPoly.Builder

getBoundingPolyOrBuilder()

public BoundingPolyOrBuilder getBoundingPolyOrBuilder()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
BoundingPolyOrBuilder

getConfidence() (deprecated)

public float getConfidence()

Deprecated. google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478

Deprecated. Use score instead. The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

float confidence = 5 [deprecated = true];

Returns
Type Description
float

The confidence.

getDefaultInstanceForType()

public EntityAnnotation getDefaultInstanceForType()
Returns
Type Description
EntityAnnotation

getDescription()

public String getDescription()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLocale()

public String getLocale()

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Returns
Type Description
String

The locale.

getLocaleBytes()

public ByteString getLocaleBytes()

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Returns
Type Description
ByteString

The bytes for locale.

getLocations(int index)

public LocationInfo getLocations(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
LocationInfo

getLocationsBuilder(int index)

public LocationInfo.Builder getLocationsBuilder(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
LocationInfo.Builder

getLocationsBuilderList()

public List<LocationInfo.Builder> getLocationsBuilderList()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Returns
Type Description
List<Builder>

getLocationsCount()

public int getLocationsCount()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Returns
Type Description
int

getLocationsList()

public List<LocationInfo> getLocationsList()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Returns
Type Description
List<LocationInfo>

getLocationsOrBuilder(int index)

public LocationInfoOrBuilder getLocationsOrBuilder(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
LocationInfoOrBuilder

getLocationsOrBuilderList()

public List<? extends LocationInfoOrBuilder> getLocationsOrBuilderList()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Returns
Type Description
List<? extends com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder>

getMid()

public String getMid()

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Returns
Type Description
String

The mid.

getMidBytes()

public ByteString getMidBytes()

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Returns
Type Description
ByteString

The bytes for mid.

getProperties(int index)

public Property getProperties(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
Property

getPropertiesBuilder(int index)

public Property.Builder getPropertiesBuilder(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
Property.Builder

getPropertiesBuilderList()

public List<Property.Builder> getPropertiesBuilderList()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Returns
Type Description
List<Builder>

getPropertiesCount()

public int getPropertiesCount()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Returns
Type Description
int

getPropertiesList()

public List<Property> getPropertiesList()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Returns
Type Description
List<Property>

getPropertiesOrBuilder(int index)

public PropertyOrBuilder getPropertiesOrBuilder(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
PropertyOrBuilder

getPropertiesOrBuilderList()

public List<? extends PropertyOrBuilder> getPropertiesOrBuilderList()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Returns
Type Description
List<? extends com.google.cloud.vision.v1p4beta1.PropertyOrBuilder>

getScore()

public float getScore()

Overall score of the result. Range [0, 1].

float score = 4;

Returns
Type Description
float

The score.

getTopicality()

public float getTopicality()

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

float topicality = 6;

Returns
Type Description
float

The topicality.

hasBoundingPoly()

public boolean hasBoundingPoly()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
boolean

Whether the boundingPoly field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBoundingPoly(BoundingPoly value)

public EntityAnnotation.Builder mergeBoundingPoly(BoundingPoly value)

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Parameter
Name Description
value BoundingPoly
Returns
Type Description
EntityAnnotation.Builder

mergeFrom(EntityAnnotation other)

public EntityAnnotation.Builder mergeFrom(EntityAnnotation other)
Parameter
Name Description
other EntityAnnotation
Returns
Type Description
EntityAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EntityAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public EntityAnnotation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
EntityAnnotation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EntityAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
EntityAnnotation.Builder
Overrides

removeLocations(int index)

public EntityAnnotation.Builder removeLocations(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
EntityAnnotation.Builder

removeProperties(int index)

public EntityAnnotation.Builder removeProperties(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
EntityAnnotation.Builder

setBoundingPoly(BoundingPoly value)

public EntityAnnotation.Builder setBoundingPoly(BoundingPoly value)

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Parameter
Name Description
value BoundingPoly
Returns
Type Description
EntityAnnotation.Builder

setBoundingPoly(BoundingPoly.Builder builderForValue)

public EntityAnnotation.Builder setBoundingPoly(BoundingPoly.Builder builderForValue)

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;

Parameter
Name Description
builderForValue BoundingPoly.Builder
Returns
Type Description
EntityAnnotation.Builder

setConfidence(float value) (deprecated)

public EntityAnnotation.Builder setConfidence(float value)

Deprecated. google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478

Deprecated. Use score instead. The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

float confidence = 5 [deprecated = true];

Parameter
Name Description
value float

The confidence to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setDescription(String value)

public EntityAnnotation.Builder setDescription(String value)

Entity textual description, expressed in its locale language.

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public EntityAnnotation.Builder setDescriptionBytes(ByteString value)

Entity textual description, expressed in its locale language.

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public EntityAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
EntityAnnotation.Builder
Overrides

setLocale(String value)

public EntityAnnotation.Builder setLocale(String value)

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Parameter
Name Description
value String

The locale to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setLocaleBytes(ByteString value)

public EntityAnnotation.Builder setLocaleBytes(ByteString value)

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Parameter
Name Description
value ByteString

The bytes for locale to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setLocations(int index, LocationInfo value)

public EntityAnnotation.Builder setLocations(int index, LocationInfo value)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameters
Name Description
index int
value LocationInfo
Returns
Type Description
EntityAnnotation.Builder

setLocations(int index, LocationInfo.Builder builderForValue)

public EntityAnnotation.Builder setLocations(int index, LocationInfo.Builder builderForValue)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;

Parameters
Name Description
index int
builderForValue LocationInfo.Builder
Returns
Type Description
EntityAnnotation.Builder

setMid(String value)

public EntityAnnotation.Builder setMid(String value)

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Parameter
Name Description
value String

The mid to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setMidBytes(ByteString value)

public EntityAnnotation.Builder setMidBytes(ByteString value)

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Parameter
Name Description
value ByteString

The bytes for mid to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setProperties(int index, Property value)

public EntityAnnotation.Builder setProperties(int index, Property value)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameters
Name Description
index int
value Property
Returns
Type Description
EntityAnnotation.Builder

setProperties(int index, Property.Builder builderForValue)

public EntityAnnotation.Builder setProperties(int index, Property.Builder builderForValue)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p4beta1.Property properties = 9;

Parameters
Name Description
index int
builderForValue Property.Builder
Returns
Type Description
EntityAnnotation.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public EntityAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
EntityAnnotation.Builder
Overrides

setScore(float value)

public EntityAnnotation.Builder setScore(float value)

Overall score of the result. Range [0, 1].

float score = 4;

Parameter
Name Description
value float

The score to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setTopicality(float value)

public EntityAnnotation.Builder setTopicality(float value)

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

float topicality = 6;

Parameter
Name Description
value float

The topicality to set.

Returns
Type Description
EntityAnnotation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final EntityAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
EntityAnnotation.Builder
Overrides