Google Cloud Sql Admin V1 Client - Class ExportContext (0.12.0)

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
NameDescription
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 array

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: You must specify one database to be exported. 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 Google\Cloud\Sql\V1\ExportContext\SqlExportOptions

Options for exporting data as SQL statements.

↳ csv_export_options Google\Cloud\Sql\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 Google\Protobuf\BoolValue

Option for export offload.

↳ bak_export_options Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions

Options for exporting data as BAK files.

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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$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: You must specify one database to be exported. 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
TypeDescription
Google\Protobuf\Internal\RepeatedField

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: You must specify one database to be exported. 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
NameDescription
var string[]
Returns
TypeDescription
$this

getKind

This is always sql#exportContext.

Returns
TypeDescription
string

setKind

This is always sql#exportContext.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSqlExportOptions

Options for exporting data as SQL statements.

Returns
TypeDescription
Google\Cloud\Sql\V1\ExportContext\SqlExportOptions|null

hasSqlExportOptions

clearSqlExportOptions

setSqlExportOptions

Options for exporting data as SQL statements.

Parameter
NameDescription
var Google\Cloud\Sql\V1\ExportContext\SqlExportOptions
Returns
TypeDescription
$this

getCsvExportOptions

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

Returns
TypeDescription
Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions|null

hasCsvExportOptions

clearCsvExportOptions

setCsvExportOptions

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

Parameter
NameDescription
var Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions
Returns
TypeDescription
$this

getFileType

The file type for the specified uri.

Returns
TypeDescription
int

setFileType

The file type for the specified uri.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getOffload

Option for export offload.

Returns
TypeDescription
Google\Protobuf\BoolValue|null

hasOffload

clearOffload

getOffloadValue

Returns the unboxed value from getOffload()

Option for export offload.

Returns
TypeDescription
bool|null

setOffload

Option for export offload.

Parameter
NameDescription
var Google\Protobuf\BoolValue
Returns
TypeDescription
$this

setOffloadValue

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

Option for export offload.

Parameter
NameDescription
var bool|null
Returns
TypeDescription
$this

getBakExportOptions

Options for exporting data as BAK files.

Returns
TypeDescription
Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions|null

hasBakExportOptions

clearBakExportOptions

setBakExportOptions

Options for exporting data as BAK files.

Parameter
NameDescription
var Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions
Returns
TypeDescription
$this