# Google Cloud Vector Search V1 Client - Class CreateDataObjectRequest (0.4.0)

0.4.0 (latest) 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vector Search V1 Client class CreateDataObjectRequest.

Request message for
[DataObjectService.CreateDataObject](https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.Client.DataObjectServiceClient#_Google_Cloud_VectorSearch_V1_Client_DataObjectServiceClient__createDataObject__).

Generated from protobuf message `google.cloud.vectorsearch.v1.CreateDataObjectRequest`

## Namespace

Google \\ Cloud \\ VectorSearch \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The resource name of the Collection to create the DataObject in. Format: `projects/{project}/locations/{location}/collections/{collection}` |
| `↳ data_object_id` | `string` Required. The id of the dataObject to create. The id must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Specifically, it must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |
| `↳ data_object` | `https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.DataObject` Required. The DataObject to create. |

### getParent

Required. The resource name of the Collection to create the DataObject in.

Format: `projects/{project}/locations/{location}/collections/{collection}`

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

### setParent

Required. The resource name of the Collection to create the DataObject in.

Format: `projects/{project}/locations/{location}/collections/{collection}`

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

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

### getDataObjectId

Required. The id of the dataObject to create.

The id must be 1-63 characters long, and comply with
[RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
Specifically, it must be 1-63 characters long and match the regular
expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.

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

### setDataObjectId

Required. The id of the dataObject to create.

The id must be 1-63 characters long, and comply with
[RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
Specifically, it must be 1-63 characters long and match the regular
expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.

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

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

### getDataObject

Required. The DataObject to create.

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

### hasDataObject

### clearDataObject

### setDataObject

Required. The DataObject to create.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The resource name of the Collection to create the DataObject in. Format: `projects/{project}/locations/{location}/collections/{collection}` Please see DataObjectServiceClient::collectionName() for help formatting this field. |
| `dataObject` | `https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.DataObject` Required. The DataObject to create. |
| `dataObjectId` | `string` Required. The id of the dataObject to create. The id must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Specifically, it must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. |

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