Class CollectionItem (0.4.0)

public final class CollectionItem extends GeneratedMessageV3 implements CollectionItemOrBuilder

A CollectionItem is an item in a collection. Each item is a reference to the original resource in a collection.

Protobuf type google.cloud.visionai.v1.CollectionItem

Static Fields

COLLECTION_FIELD_NUMBER

public static final int COLLECTION_FIELD_NUMBER
Field Value
Type Description
int

ITEM_RESOURCE_FIELD_NUMBER

public static final int ITEM_RESOURCE_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CollectionItem getDefaultInstance()
Returns
Type Description
CollectionItem

getDescriptor()

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

newBuilder()

public static CollectionItem.Builder newBuilder()
Returns
Type Description
CollectionItem.Builder

newBuilder(CollectionItem prototype)

public static CollectionItem.Builder newBuilder(CollectionItem prototype)
Parameter
Name Description
prototype CollectionItem
Returns
Type Description
CollectionItem.Builder

parseDelimitedFrom(InputStream input)

public static CollectionItem parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CollectionItem
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CollectionItem parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CollectionItem parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CollectionItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CollectionItem parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CollectionItem parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CollectionItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CollectionItem parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CollectionItem parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CollectionItem
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CollectionItem parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CollectionItem parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CollectionItem
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CollectionItem parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CollectionItem parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CollectionItem
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CollectionItem parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CollectionItem> parser()
Returns
Type Description
Parser<CollectionItem>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCollection()

public String getCollection()

Required. The collection name that this item belongs to. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The collection.

getCollectionBytes()

public ByteString getCollectionBytes()

Required. The collection name that this item belongs to. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for collection.

getDefaultInstanceForType()

public CollectionItem getDefaultInstanceForType()
Returns
Type Description
CollectionItem

getItemResource()

public String getItemResource()

Required. The name of the CollectionItem. Its format depends on the type above. For ASSET: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

string item_resource = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The itemResource.

getItemResourceBytes()

public ByteString getItemResourceBytes()

Required. The name of the CollectionItem. Its format depends on the type above. For ASSET: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

string item_resource = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for itemResource.

getParserForType()

public Parser<CollectionItem> getParserForType()
Returns
Type Description
Parser<CollectionItem>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getType()

public CollectionItem.Type getType()

Required. The type of item.

.google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CollectionItem.Type

The type.

getTypeValue()

public int getTypeValue()

Required. The type of item.

.google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for type.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CollectionItem.Builder newBuilderForType()
Returns
Type Description
CollectionItem.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CollectionItem.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CollectionItem.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CollectionItem.Builder toBuilder()
Returns
Type Description
CollectionItem.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException