Class ReferenceImage (3.10.0)

public final class ReferenceImage extends GeneratedMessageV3 implements ReferenceImageOrBuilder

A ReferenceImage represents a product image and its associated metadata, such as bounding boxes.

Protobuf type google.cloud.vision.v1p3beta1.ReferenceImage

Static Fields

BOUNDING_POLYS_FIELD_NUMBER

public static final int BOUNDING_POLYS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

URI_FIELD_NUMBER

public static final int URI_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ReferenceImage getDefaultInstance()
Returns
TypeDescription
ReferenceImage

getDescriptor()

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

newBuilder()

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

newBuilder(ReferenceImage prototype)

public static ReferenceImage.Builder newBuilder(ReferenceImage prototype)
Parameter
NameDescription
prototypeReferenceImage
Returns
TypeDescription
ReferenceImage.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getBoundingPolys(int index)

public BoundingPoly getBoundingPolys(int index)

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
BoundingPoly

getBoundingPolysCount()

public int getBoundingPolysCount()

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getBoundingPolysList()

public List<BoundingPoly> getBoundingPolysList()

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<BoundingPoly>

getBoundingPolysOrBuilder(int index)

public BoundingPolyOrBuilder getBoundingPolysOrBuilder(int index)

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
BoundingPolyOrBuilder

getBoundingPolysOrBuilderList()

public List<? extends BoundingPolyOrBuilder> getBoundingPolysOrBuilderList()

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<? extends com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>

getDefaultInstanceForType()

public ReferenceImage getDefaultInstanceForType()
Returns
TypeDescription
ReferenceImage

getName()

public String getName()

The resource name of the reference image. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID. This field is ignored when creating a reference image.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the reference image. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID. This field is ignored when creating a reference image.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUri()

public String getUri()

Required. The Google Cloud Storage URI of the reference image. The URI must start with gs://.

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Required. The Google Cloud Storage URI of the reference image. The URI must start with gs://.

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for uri.

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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