Class Feature (3.13.0)

public final class Feature extends GeneratedMessageV3 implements FeatureOrBuilder

The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple Feature objects can be specified in the features list.

Protobuf type google.cloud.vision.v1.Feature

Implements

FeatureOrBuilder

Static Fields

MAX_RESULTS_FIELD_NUMBER

public static final int MAX_RESULTS_FIELD_NUMBER
Field Value
TypeDescription
int

MODEL_FIELD_NUMBER

public static final int MODEL_FIELD_NUMBER
Field Value
TypeDescription
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Feature getDefaultInstance()
Returns
TypeDescription
Feature

getDescriptor()

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

newBuilder()

public static Feature.Builder newBuilder()
Returns
TypeDescription
Feature.Builder

newBuilder(Feature prototype)

public static Feature.Builder newBuilder(Feature prototype)
Parameter
NameDescription
prototypeFeature
Returns
TypeDescription
Feature.Builder

parseDelimitedFrom(InputStream input)

public static Feature parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Feature
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static Feature parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Feature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static Feature parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Feature
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static Feature parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Feature
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static Feature parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Feature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<Feature> parser()
Returns
TypeDescription
Parser<Feature>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public Feature getDefaultInstanceForType()
Returns
TypeDescription
Feature

getMaxResults()

public int getMaxResults()

Maximum number of results of this type. Does not apply to TEXT_DETECTION, DOCUMENT_TEXT_DETECTION, or CROP_HINTS.

int32 max_results = 2;

Returns
TypeDescription
int

The maxResults.

getModel()

public String getModel()

Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest". DOCUMENT_TEXT_DETECTION and TEXT_DETECTION also support "builtin/weekly" for the bleeding edge release updated weekly.

string model = 3;

Returns
TypeDescription
String

The model.

getModelBytes()

public ByteString getModelBytes()

Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest". DOCUMENT_TEXT_DETECTION and TEXT_DETECTION also support "builtin/weekly" for the bleeding edge release updated weekly.

string model = 3;

Returns
TypeDescription
ByteString

The bytes for model.

getParserForType()

public Parser<Feature> getParserForType()
Returns
TypeDescription
Parser<Feature>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getType()

public Feature.Type getType()

The feature type.

.google.cloud.vision.v1.Feature.Type type = 1;

Returns
TypeDescription
Feature.Type

The type.

getTypeValue()

public int getTypeValue()

The feature type.

.google.cloud.vision.v1.Feature.Type type = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for type.

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 Feature.Builder newBuilderForType()
Returns
TypeDescription
Feature.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public Feature.Builder toBuilder()
Returns
TypeDescription
Feature.Builder

writeTo(CodedOutputStream output)

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