Class EntityAnnotation.Builder (3.2.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1p4beta1.LocationInfo>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1p4beta1.Property>
Returns
TypeDescription
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
NameDescription
valueLocationInfo
Returns
TypeDescription
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
NameDescription
builderForValueLocationInfo.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueLocationInfo
Returns
TypeDescription
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
NameDescription
indexint
builderForValueLocationInfo.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueProperty
Returns
TypeDescription
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
NameDescription
builderForValueProperty.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueProperty
Returns
TypeDescription
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
NameDescription
indexint
builderForValueProperty.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Property.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EntityAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EntityAnnotation.Builder
Overrides

build()

public EntityAnnotation build()
Returns
TypeDescription
EntityAnnotation

buildPartial()

public EntityAnnotation buildPartial()
Returns
TypeDescription
EntityAnnotation

clear()

public EntityAnnotation.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
EntityAnnotation.Builder

This builder for chaining.

clearDescription()

public EntityAnnotation.Builder clearDescription()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
TypeDescription
EntityAnnotation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public EntityAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
EntityAnnotation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public EntityAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
EntityAnnotation.Builder

clearScore()

public EntityAnnotation.Builder clearScore()

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

float score = 4;

Returns
TypeDescription
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
TypeDescription
EntityAnnotation.Builder

This builder for chaining.

clone()

public EntityAnnotation.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
float

The confidence.

getDefaultInstanceForType()

public EntityAnnotation getDefaultInstanceForType()
Returns
TypeDescription
EntityAnnotation

getDescription()

public String getDescription()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLocale()

public String getLocale()

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

string locale = 2;

Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.vision.v1p4beta1.PropertyOrBuilder>

getScore()

public float getScore()

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

float score = 4;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the boundingPoly field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueBoundingPoly
Returns
TypeDescription
EntityAnnotation.Builder

mergeFrom(EntityAnnotation other)

public EntityAnnotation.Builder mergeFrom(EntityAnnotation other)
Parameter
NameDescription
otherEntityAnnotation
Returns
TypeDescription
EntityAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EntityAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public EntityAnnotation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EntityAnnotation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EntityAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueBoundingPoly
Returns
TypeDescription
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
NameDescription
builderForValueBoundingPoly.Builder
Returns
TypeDescription
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
NameDescription
valuefloat

The confidence to set.

Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
EntityAnnotation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public EntityAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The locale to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for locale to set.

Returns
TypeDescription
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
NameDescription
indexint
valueLocationInfo
Returns
TypeDescription
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
NameDescription
indexint
builderForValueLocationInfo.Builder
Returns
TypeDescription
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
NameDescription
valueString

The mid to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for mid to set.

Returns
TypeDescription
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
NameDescription
indexint
valueProperty
Returns
TypeDescription
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
NameDescription
indexint
builderForValueProperty.Builder
Returns
TypeDescription
EntityAnnotation.Builder

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

public EntityAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EntityAnnotation.Builder
Overrides

setScore(float value)

public EntityAnnotation.Builder setScore(float value)

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

float score = 4;

Parameter
NameDescription
valuefloat

The score to set.

Returns
TypeDescription
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
NameDescription
valuefloat

The topicality to set.

Returns
TypeDescription
EntityAnnotation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final EntityAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EntityAnnotation.Builder
Overrides