# Vision AI V1 API - Class Google::Cloud::VisionAI::V1::CollectionItem (v1.5.0)

1.5.0 (latest) 1.4.1 1.3.1 1.2.0 1.1.1 1.0.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::CollectionItem.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #collection

    def collection() -> ::String

**Returns**

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

### #collection=

    def collection=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The collection name that this item belongs to. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
**Returns**

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

### #item_resource

    def item_resource() -> ::String

**Returns**

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

### #item_resource=

    def item_resource=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The name of the CollectionItem. Its format depends on the `type` above. For ASSET: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
**Returns**

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

### #type

    def type() -> ::Google::Cloud::VisionAI::V1::CollectionItem::Type

**Returns**

- ([::Google::Cloud::VisionAI::V1::CollectionItem::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-CollectionItem-Type)) --- Required. The type of item.

### #type=

    def type=(value) -> ::Google::Cloud::VisionAI::V1::CollectionItem::Type

**Parameter**

- **value** ([::Google::Cloud::VisionAI::V1::CollectionItem::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-CollectionItem-Type)) --- Required. The type of item.
**Returns**

- ([::Google::Cloud::VisionAI::V1::CollectionItem::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-CollectionItem-Type)) --- Required. The type of item.