Class CollectionItem.Builder (0.9.0)

public static final class CollectionItem.Builder extends GeneratedMessageV3.Builder<CollectionItem.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CollectionItem.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CollectionItem.Builder
Overrides

build()

public CollectionItem build()
Returns
Type Description
CollectionItem

buildPartial()

public CollectionItem buildPartial()
Returns
Type Description
CollectionItem

clear()

public CollectionItem.Builder clear()
Returns
Type Description
CollectionItem.Builder
Overrides

clearCollection()

public CollectionItem.Builder clearCollection()

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
CollectionItem.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CollectionItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CollectionItem.Builder
Overrides

clearItemResource()

public CollectionItem.Builder clearItemResource()

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
CollectionItem.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CollectionItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CollectionItem.Builder
Overrides

clearType()

public CollectionItem.Builder clearType()

Required. The type of item.

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

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

clone()

public CollectionItem.Builder clone()
Returns
Type Description
CollectionItem.Builder
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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CollectionItem other)

public CollectionItem.Builder mergeFrom(CollectionItem other)
Parameter
Name Description
other CollectionItem
Returns
Type Description
CollectionItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CollectionItem.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CollectionItem.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CollectionItem.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CollectionItem.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CollectionItem.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CollectionItem.Builder
Overrides

setCollection(String value)

public CollectionItem.Builder setCollection(String value)

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) = { ... }

Parameter
Name Description
value String

The collection to set.

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

setCollectionBytes(ByteString value)

public CollectionItem.Builder setCollectionBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for collection to set.

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CollectionItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CollectionItem.Builder
Overrides

setItemResource(String value)

public CollectionItem.Builder setItemResource(String value)

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];

Parameter
Name Description
value String

The itemResource to set.

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

setItemResourceBytes(ByteString value)

public CollectionItem.Builder setItemResourceBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for itemResource to set.

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

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

public CollectionItem.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CollectionItem.Builder
Overrides

setType(CollectionItem.Type value)

public CollectionItem.Builder setType(CollectionItem.Type value)

Required. The type of item.

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

Parameter
Name Description
value CollectionItem.Type

The type to set.

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

setTypeValue(int value)

public CollectionItem.Builder setTypeValue(int value)

Required. The type of item.

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

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
CollectionItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CollectionItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CollectionItem.Builder
Overrides