public static final class CollectionItem.Builder extends GeneratedMessage.Builder<CollectionItem.Builder> implements CollectionItemOrBuilderA 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CollectionItem.BuilderImplements
CollectionItemOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
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 |
|
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. |
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. |
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. |
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 |
|
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 GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CollectionItem.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CollectionItem.Builder |
|
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 |
StringThe 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 |
ByteStringThe bytes for collection to set. |
| Returns | |
|---|---|
| Type | Description |
CollectionItem.Builder |
This builder for chaining. |
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 |
StringThe 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 |
ByteStringThe bytes for itemResource to set. |
| Returns | |
|---|---|
| Type | Description |
CollectionItem.Builder |
This builder for chaining. |
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.TypeThe 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 |
intThe enum numeric value on the wire for type to set. |
| Returns | |
|---|---|
| Type | Description |
CollectionItem.Builder |
This builder for chaining. |