# Google Cloud Sql Admin V1 Client - Class ExportContext (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExportContext.

Database instance export context.

Generated from protobuf message `google.cloud.sql.v1.ExportContext`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ uri` | `string` The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed. |
| `↳ databases` | `string[]` Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`. |
| `↳ kind` | `string` This is always `sql#exportContext`. |
| `↳ sql_export_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlExportOptions` Options for exporting data as SQL statements. |
| `↳ csv_export_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlCsvExportOptions` Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only. |
| `↳ file_type` | `int` The file type for the specified uri. |
| `↳ offload` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` Whether to perform a serverless export. |
| `↳ bak_export_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlBakExportOptions` Options for exporting data as BAK files. |
| `↳ tde_export_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlTdeExportOptions` Optional. Export parameters specific to SQL Server TDE certificates |

### getUri

The path to the file in Google Cloud Storage where the export will be
stored. The URI is in the form `gs://bucketName/fileName`. If the file
already exists, the request succeeds, but the operation fails. If
`fileType` is `SQL` and the filename ends with .gz,
the contents are compressed.

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

### setUri

The path to the file in Google Cloud Storage where the export will be
stored. The URI is in the form `gs://bucketName/fileName`. If the file
already exists, the request succeeds, but the operation fails. If
`fileType` is `SQL` and the filename ends with .gz,
the contents are compressed.

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

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

### getDatabases

Databases to be exported.   
`MySQL instances:` If
`fileType` is `SQL` and no database is specified, all
databases are exported, except for the `mysql` system database.

If `fileType` is `CSV`, you can specify one database,
either by using this property or by using the
`csvExportOptions.selectQuery` property, which takes precedence
over this property.   
`PostgreSQL instances:` If you don't specify a
database by name, all user databases in the instance are exported.
This excludes system databases and Cloud SQL databases used to manage
internal operations. Exporting all user databases is only available for
directory-formatted parallel export. If `fileType` is `CSV`,
this database must match the one specified in the
`csvExportOptions.selectQuery` property.   
`SQL Server
instances:` You must specify one database to be exported, and the
`fileType` must be `BAK`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDatabases

Databases to be exported.   
`MySQL instances:` If
`fileType` is `SQL` and no database is specified, all
databases are exported, except for the `mysql` system database.

If `fileType` is `CSV`, you can specify one database,
either by using this property or by using the
`csvExportOptions.selectQuery` property, which takes precedence
over this property.   
`PostgreSQL instances:` If you don't specify a
database by name, all user databases in the instance are exported.
This excludes system databases and Cloud SQL databases used to manage
internal operations. Exporting all user databases is only available for
directory-formatted parallel export. If `fileType` is `CSV`,
this database must match the one specified in the
`csvExportOptions.selectQuery` property.   
`SQL Server
instances:` You must specify one database to be exported, and the
`fileType` must be `BAK`.

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

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

### getKind

This is always `sql#exportContext`.

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

### setKind

This is always `sql#exportContext`.

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

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

### getSqlExportOptions

Options for exporting data as SQL statements.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlExportOptions|null` |   |

### hasSqlExportOptions

### clearSqlExportOptions

### setSqlExportOptions

Options for exporting data as SQL statements.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlExportOptions` |

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

### getCsvExportOptions

Options for exporting data as CSV. `MySQL` and `PostgreSQL`
instances only.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlCsvExportOptions|null` |   |

### hasCsvExportOptions

### clearCsvExportOptions

### setCsvExportOptions

Options for exporting data as CSV. `MySQL` and `PostgreSQL`
instances only.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlCsvExportOptions` |

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

### getFileType

The file type for the specified uri.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SqlFileType](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SqlFileType). |

### setFileType

The file type for the specified uri.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SqlFileType](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SqlFileType). |

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

### getOffload

Whether to perform a serverless export.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue|null` |   |

### hasOffload

### clearOffload

### getOffloadUnwrapped

Returns the unboxed value from `getOffload()`

Whether to perform a serverless export.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool|null` |   |

### setOffload

Whether to perform a serverless export.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` |

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

### setOffloadUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\BoolValue object.

Whether to perform a serverless export.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool|null` |

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

### getBakExportOptions

Options for exporting data as BAK files.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlBakExportOptions|null` |   |

### hasBakExportOptions

### clearBakExportOptions

### setBakExportOptions

Options for exporting data as BAK files.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlBakExportOptions` |

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

### getTdeExportOptions

Optional. Export parameters specific to SQL Server TDE certificates

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlTdeExportOptions|null` |   |

### hasTdeExportOptions

### clearTdeExportOptions

### setTdeExportOptions

Optional. Export parameters specific to SQL Server TDE certificates

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext.SqlTdeExportOptions` |

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