# Google Cloud Vision Ai V1 Client - Class CreateAssetRequest (0.3.0)

0.3.0 (latest) 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class CreateAssetRequest.

Request message for CreateAssetRequest.

Generated from protobuf message `google.cloud.visionai.v1.CreateAssetRequest`

## Namespace

Google \\ Cloud \\ VisionAI \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource where this asset will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` |
| `↳ asset` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Asset` Required. The asset to create. |
| `↳ asset_id` | `string` Optional. The ID to use for the asset, which will become the final component of the asset's resource name if user choose to specify. Otherwise, asset id will be generated by system. This value should be up to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be a letter or a number. |

### getParent

Required. The parent resource where this asset will be created.

Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Required. The parent resource where this asset will be created.

Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAsset

Required. The asset to create.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Asset|null` |   |

### hasAsset

### clearAsset

### setAsset

Required. The asset to create.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Asset` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAssetId

Optional. The ID to use for the asset, which will become the final
component of the asset's resource name if user choose to specify.

Otherwise, asset id will be generated by system.
This value should be up to 63 characters, and valid characters
are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be
a letter or a number.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasAssetId

### clearAssetId

### setAssetId

Optional. The ID to use for the asset, which will become the final
component of the asset's resource name if user choose to specify.

Otherwise, asset id will be generated by system.
This value should be up to 63 characters, and valid characters
are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be
a letter or a number.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent resource where this asset will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` Please see WarehouseClient::corpusName() for help formatting this field. |
| `asset` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Asset` Required. The asset to create. |
| `assetId` | `string` Optional. The ID to use for the asset, which will become the final component of the asset's resource name if user choose to specify. Otherwise, asset id will be generated by system. This value should be up to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be a letter or a number. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.CreateAssetRequest` |   |