1.7.1 (latest) 1.7.0 1.6.3 1.5.0 1.4.1 1.3.0 1.2.0 1.1.3 1.0.0 0.10.3 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.3 Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client class ImportClusterRequest.

Import cluster request.

Generated from protobuf message `google.cloud.alloydb.v1.ImportClusterRequest`

## Namespace

Google \\ Cloud \\ AlloyDb \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ sql_import_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-alloydb/latest/V1.ImportClusterRequest.SqlImportOptions` Options for importing data in SQL format. |
| `↳ csv_import_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-alloydb/latest/V1.ImportClusterRequest.CsvImportOptions` Options for importing data in CSV format. |
| `↳ name` | `string` Required. The resource name of the cluster. |
| `↳ gcs_uri` | `string` Required. The path to the file in Google Cloud Storage where the source file for import will be stored. The URI is in the form `gs://bucketName/fileName`. |
| `↳ database` | `string` Optional. Name of the database to which the import will be done. For import from SQL file, this is required only if the file does not specify a database. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference. |
| `↳ user` | `string` Optional. Database user to be used for importing the data. Note - Value provided should be the same as expected from `SELECT current_user;` and NOT as a resource reference. |

### getSqlImportOptions

Options for importing data in SQL format.

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

### hasSqlImportOptions

### setSqlImportOptions

Options for importing data in SQL format.

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

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

### getCsvImportOptions

Options for importing data in CSV format.

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

### hasCsvImportOptions

### setCsvImportOptions

Options for importing data in CSV format.

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

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

### getName

Required. The resource name of the cluster.

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

### setName

Required. The resource name of the cluster.

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

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

### getGcsUri

Required. The path to the file in Google Cloud Storage where the source
file for import will be stored. The URI is in the form
`gs://bucketName/fileName`.

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

### setGcsUri

Required. The path to the file in Google Cloud Storage where the source
file for import will be stored. The URI is in the form
`gs://bucketName/fileName`.

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

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

### getDatabase

Optional. Name of the database to which the import will be done.

For import from SQL file, this is required only if the file does not
specify a database.
Note - Value provided should be the same as expected from `SELECT
current_database();` and NOT as a resource reference.

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

### setDatabase

Optional. Name of the database to which the import will be done.

For import from SQL file, this is required only if the file does not
specify a database.
Note - Value provided should be the same as expected from `SELECT
current_database();` and NOT as a resource reference.

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

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

### getUser

Optional. Database user to be used for importing the data.

Note - Value provided should be the same as expected from
`SELECT current_user;` and NOT as a resource reference.

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

### setUser

Optional. Database user to be used for importing the data.

Note - Value provided should be the same as expected from
`SELECT current_user;` and NOT as a resource reference.

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

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

### getImportOptions

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The resource name of the cluster. Please see AlloyDBAdminClient::clusterName() for help formatting this field. |
| `gcsUri` | `string` Required. The path to the file in Google Cloud Storage where the source file for import will be stored. The URI is in the form `gs://bucketName/fileName`. |
| `database` | `string` Optional. Name of the database to which the import will be done. For import from SQL file, this is required only if the file does not specify a database. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference. |
| `user` | `string` Optional. Database user to be used for importing the data. Note - Value provided should be the same as expected from `SELECT current_user;` and NOT as a resource reference. |

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