# Google Cloud Sql Admin V1 Client - Class Database (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 Database.

Represents a SQL database on the Cloud SQL instance.

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

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ kind` | `string` This is always `sql#database`. |
| `↳ charset` | `string` The Cloud SQL charset value. |
| `↳ collation` | `string` The Cloud SQL collation value. |
| `↳ etag` | `string` This field is deprecated and will be removed from a future version of the API. |
| `↳ name` | `string` The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| `↳ instance` | `string` The name of the Cloud SQL instance. This does not include the project ID. |
| `↳ self_link` | `string` The URI of this resource. |
| `↳ project` | `string` The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| `↳ sqlserver_database_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SqlServerDatabaseDetails` |

### getKind

This is always `sql#database`.

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

### setKind

This is always `sql#database`.

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

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

### getCharset

The Cloud SQL charset value.

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

### setCharset

The Cloud SQL charset value.

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

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

### getCollation

The Cloud SQL collation value.

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

### setCollation

The Cloud SQL collation value.

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

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

### getEtag

This field is deprecated and will be removed from a future version of the
API.

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

### setEtag

This field is deprecated and will be removed from a future version of the
API.

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

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

### getName

The name of the database in the Cloud SQL instance. This does not include
the project ID or instance name.

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

### setName

The name of the database in the Cloud SQL instance. This does not include
the project ID or instance name.

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

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

### getInstance

The name of the Cloud SQL instance. This does not include the project ID.

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

### setInstance

The name of the Cloud SQL instance. This does not include the project ID.

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

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

### getSelfLink

The URI of this resource.

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

### setSelfLink

The URI of this resource.

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

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

### getProject

The project ID of the project containing the Cloud SQL database. The Google
apps domain is prefixed if applicable.

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

### setProject

The project ID of the project containing the Cloud SQL database. The Google
apps domain is prefixed if applicable.

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

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

### getSqlserverDatabaseDetails

Generated from protobuf field `.google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9;`

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

### hasSqlserverDatabaseDetails

### setSqlserverDatabaseDetails

Generated from protobuf field `.google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9;`

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

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

### getDatabaseDetails

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