public static final class ReferenceImage.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder> implements ReferenceImageOrBuilder
A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.Protobuf type
google.cloud.vision.v1.ReferenceImage| Modifier and Type | Method and Description |
|---|---|
ReferenceImage.Builder |
addAllBoundingPolys(Iterable<? extends BoundingPoly> values)
Optional.
|
ReferenceImage.Builder |
addBoundingPolys(BoundingPoly.Builder builderForValue)
Optional.
|
ReferenceImage.Builder |
addBoundingPolys(BoundingPoly value)
Optional.
|
ReferenceImage.Builder |
addBoundingPolys(int index,
BoundingPoly.Builder builderForValue)
Optional.
|
ReferenceImage.Builder |
addBoundingPolys(int index,
BoundingPoly value)
Optional.
|
BoundingPoly.Builder |
addBoundingPolysBuilder()
Optional.
|
BoundingPoly.Builder |
addBoundingPolysBuilder(int index)
Optional.
|
ReferenceImage.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ReferenceImage |
build() |
ReferenceImage |
buildPartial() |
ReferenceImage.Builder |
clear() |
ReferenceImage.Builder |
clearBoundingPolys()
Optional.
|
ReferenceImage.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
ReferenceImage.Builder |
clearName()
The resource name of the reference image.
|
ReferenceImage.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
ReferenceImage.Builder |
clearUri()
Required.
|
ReferenceImage.Builder |
clone() |
BoundingPoly |
getBoundingPolys(int index)
Optional.
|
BoundingPoly.Builder |
getBoundingPolysBuilder(int index)
Optional.
|
List<BoundingPoly.Builder> |
getBoundingPolysBuilderList()
Optional.
|
int |
getBoundingPolysCount()
Optional.
|
List<BoundingPoly> |
getBoundingPolysList()
Optional.
|
BoundingPolyOrBuilder |
getBoundingPolysOrBuilder(int index)
Optional.
|
List<? extends BoundingPolyOrBuilder> |
getBoundingPolysOrBuilderList()
Optional.
|
ReferenceImage |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getName()
The resource name of the reference image.
|
com.google.protobuf.ByteString |
getNameBytes()
The resource name of the reference image.
|
String |
getUri()
Required.
|
com.google.protobuf.ByteString |
getUriBytes()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ReferenceImage.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
ReferenceImage.Builder |
mergeFrom(com.google.protobuf.Message other) |
ReferenceImage.Builder |
mergeFrom(ReferenceImage other) |
ReferenceImage.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
ReferenceImage.Builder |
removeBoundingPolys(int index)
Optional.
|
ReferenceImage.Builder |
setBoundingPolys(int index,
BoundingPoly.Builder builderForValue)
Optional.
|
ReferenceImage.Builder |
setBoundingPolys(int index,
BoundingPoly value)
Optional.
|
ReferenceImage.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ReferenceImage.Builder |
setName(String value)
The resource name of the reference image.
|
ReferenceImage.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The resource name of the reference image.
|
ReferenceImage.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
ReferenceImage.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
ReferenceImage.Builder |
setUri(String value)
Required.
|
ReferenceImage.Builder |
setUriBytes(com.google.protobuf.ByteString value)
Required.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic ReferenceImage build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic ReferenceImage buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic ReferenceImage.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ReferenceImage.Builder>public ReferenceImage.Builder mergeFrom(ReferenceImage other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public ReferenceImage.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ReferenceImage.Builder>IOExceptionpublic 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;getName in interface ReferenceImageOrBuilderpublic com.google.protobuf.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;getNameBytes in interface ReferenceImageOrBuilderpublic ReferenceImage.Builder setName(String value)
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;value - The name to set.public ReferenceImage.Builder clearName()
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;public ReferenceImage.Builder setNameBytes(com.google.protobuf.ByteString value)
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;value - The bytes for name to set.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];getUri in interface ReferenceImageOrBuilderpublic com.google.protobuf.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];getUriBytes in interface ReferenceImageOrBuilderpublic ReferenceImage.Builder setUri(String value)
Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.
string uri = 2 [(.google.api.field_behavior) = REQUIRED];value - The uri to set.public ReferenceImage.Builder clearUri()
Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.
string uri = 2 [(.google.api.field_behavior) = REQUIRED];public ReferenceImage.Builder setUriBytes(com.google.protobuf.ByteString value)
Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.
string uri = 2 [(.google.api.field_behavior) = REQUIRED];value - The bytes for uri to set.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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
getBoundingPolysList in interface ReferenceImageOrBuilderpublic 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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
getBoundingPolysCount in interface ReferenceImageOrBuilderpublic 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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
getBoundingPolys in interface ReferenceImageOrBuilderpublic ReferenceImage.Builder setBoundingPolys(int index, BoundingPoly value)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder setBoundingPolys(int index, BoundingPoly.Builder builderForValue)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder addBoundingPolys(BoundingPoly value)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder addBoundingPolys(int index, BoundingPoly value)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder addBoundingPolys(BoundingPoly.Builder builderForValue)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder addBoundingPolys(int index, BoundingPoly.Builder builderForValue)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder addAllBoundingPolys(Iterable<? extends BoundingPoly> values)
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder clearBoundingPolys()
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public ReferenceImage.Builder removeBoundingPolys(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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public BoundingPoly.Builder getBoundingPolysBuilder(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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
getBoundingPolysOrBuilder in interface ReferenceImageOrBuilderpublic 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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
getBoundingPolysOrBuilderList in interface ReferenceImageOrBuilderpublic BoundingPoly.Builder addBoundingPolysBuilder()
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public BoundingPoly.Builder addBoundingPolysBuilder(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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public List<BoundingPoly.Builder> getBoundingPolysBuilderList()
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.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
public final ReferenceImage.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>public final ReferenceImage.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ReferenceImage.Builder>Copyright © 2023 Google LLC. All rights reserved.