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

A Cloud SQL instance resource.

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

## 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#instance`. |
| `↳ state` | `int` The current serving state of the Cloud SQL instance. |
| `↳ database_version` | `int` The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. |
| `↳ settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Settings` The user settings. |
| `↳ etag` | `string` This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead. |
| `↳ failover_replica` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance.SqlFailoverReplica` The name and status of the failover replica. |
| `↳ master_instance_name` | `string` The name of the instance which will act as primary in the replication setup. |
| `↳ replica_names` | `string[]` The replicas of the instance. |
| `↳ max_disk_size` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int64Value` The maximum disk size of the instance in bytes. |
| `↳ current_disk_size` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int64Value` The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details. |
| `↳ ip_addresses` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.IpMapping>` The assigned IP addresses for the instance. |
| `↳ server_ca_cert` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SslCert` SSL configuration. |
| `↳ instance_type` | `int` The instance type. |
| `↳ project` | `string` The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| `↳ ipv6_address` | `string` The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
| `↳ service_account_email_address` | `string` The service account email address assigned to the instance.\\This property is read-only. |
| `↳ on_premises_configuration` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.OnPremisesConfiguration` Configuration specific to on-premises instances. |
| `↳ replica_configuration` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ReplicaConfiguration` Configuration specific to failover replicas and read replicas. |
| `↳ backend_type` | `int` The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `↳ self_link` | `string` The URI of this resource. |
| `↳ suspension_reason` | `int[]` If the instance state is SUSPENDED, the reason for the suspension. |
| `↳ connection_name` | `string` Connection name of the Cloud SQL instance used in connection strings. |
| `↳ name` | `string` Name of the Cloud SQL instance. This does not include the project ID. |
| `↳ region` | `string` The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`. |
| `↳ gce_zone` | `string` The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance. |
| `↳ secondary_gce_zone` | `string` The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. |
| `↳ disk_encryption_configuration` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DiskEncryptionConfiguration` Disk encryption configuration specific to an instance. |
| `↳ disk_encryption_status` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DiskEncryptionStatus` Disk encryption status specific to an instance. |
| `↳ root_password` | `string` Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances. |
| `↳ scheduled_maintenance` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance.SqlScheduledMaintenance` The start time of any upcoming scheduled maintenance for this instance. |
| `↳ satisfies_pzs` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` This status indicates whether the instance satisfies PZS. The status is reserved for future use. |
| `↳ database_installed_version` | `string` Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`. |
| `↳ out_of_disk_report` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance.SqlOutOfDiskReport` This field represents the report generated by the proactive database wellness job for OutOfDisk issues. \* \* Writers: \* \* the proactive database wellness job for OOD. \* \* Readers: \* \* the proactive database wellness job |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. |
| `↳ available_maintenance_versions` | `string[]` Output only. List all maintenance versions applicable on the instance |
| `↳ maintenance_version` | `string` The current software version on the instance. |
| `↳ upgradable_database_versions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.AvailableDatabaseVersion>` Output only. All database versions that are available for upgrade. |
| `↳ sql_network_architecture` | `int` |
| `↳ psc_service_attachment_link` | `string` Output only. The link to service attachment of PSC instance. |
| `↳ dns_name` | `string` Output only. The dns name of the instance. |
| `↳ primary_dns_name` | `string` Output only. DEPRECATED: please use write_endpoint instead. |
| `↳ write_endpoint` | `string` Output only. The dns name of the primary instance in a replication group. |
| `↳ replication_cluster` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ReplicationCluster` Optional. A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL. |
| `↳ gemini_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.GeminiInstanceConfig` Gemini instance configuration. |
| `↳ satisfies_pzi` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` Output only. This status indicates whether the instance satisfies PZI. The status is reserved for future use. |
| `↳ switch_transaction_logs_to_cloud_storage_enabled` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage. |
| `↳ include_replicas_for_major_version_upgrade` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated. |
| `↳ tags` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"<tag-key-namespaced-name>" : "<tag-value-short-name>"`. For example, a single resource can have the following tags: `"123/environment": "production", "123/costCenter": "marketing",` For more information on tag creation and management, see <https://cloud.google.com/resource-manager/docs/tags/tags-overview>. |
| `↳ node_count` | `int` The number of read pool nodes in a read pool. |
| `↳ nodes` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance.PoolNodeConfig>` Output only. Entries containing information about each read pool node of the read pool. |
| `↳ dns_names` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DnsNameMapping>` Output only. The list of DNS names used by this instance. |

### getKind

This is always `sql#instance`.

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

### setKind

This is always `sql#instance`.

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

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

### getState

The current serving state of the Cloud SQL instance.

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

### setState

The current serving state of the Cloud SQL instance.

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

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

### getDatabaseVersion

The database engine type and version. The `databaseVersion` field cannot
be changed after instance creation.

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

### setDatabaseVersion

The database engine type and version. The `databaseVersion` field cannot
be changed after instance creation.

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

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

### getSettings

The user settings.

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

### hasSettings

### clearSettings

### setSettings

The user settings.

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

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

### getEtag

This field is deprecated and will be removed from a future version of the
API. Use the `settings.settingsVersion` field instead.

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

### setEtag

This field is deprecated and will be removed from a future version of the
API. Use the `settings.settingsVersion` field instead.

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

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

### getFailoverReplica

The name and status of the failover replica.

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

### hasFailoverReplica

### clearFailoverReplica

### setFailoverReplica

The name and status of the failover replica.

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

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

### getMasterInstanceName

The name of the instance which will act as primary in the replication
setup.

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

### setMasterInstanceName

The name of the instance which will act as primary in the replication
setup.

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

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

### getReplicaNames

The replicas of the instance.

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

### setReplicaNames

The replicas of the instance.

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

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

### getMaxDiskSize

The maximum disk size of the instance in bytes.

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

### hasMaxDiskSize

### clearMaxDiskSize

### getMaxDiskSizeUnwrapped

Returns the unboxed value from `getMaxDiskSize()`

The maximum disk size of the instance in bytes.

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

### setMaxDiskSize

The maximum disk size of the instance in bytes.

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

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

### setMaxDiskSizeUnwrapped

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

The maximum disk size of the instance in bytes.

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

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

### getCurrentDiskSize

The current disk usage of the instance in bytes. This property has been
deprecated. Use the
"cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
Monitoring API instead. Please see [this
announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
for details.

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

### hasCurrentDiskSize

### clearCurrentDiskSize

### getCurrentDiskSizeUnwrapped

Returns the unboxed value from `getCurrentDiskSize()`

The current disk usage of the instance in bytes. This property has been
deprecated. Use the
"cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
Monitoring API instead. Please see [this
announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
for details.

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

### setCurrentDiskSize

The current disk usage of the instance in bytes. This property has been
deprecated. Use the
"cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
Monitoring API instead. Please see [this
announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
for details.

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

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

### setCurrentDiskSizeUnwrapped

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

The current disk usage of the instance in bytes. This property has been
deprecated. Use the
"cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
Monitoring API instead. Please see [this
announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
for details.

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

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

### getIpAddresses

The assigned IP addresses for the instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.IpMapping>` |   |

### setIpAddresses

The assigned IP addresses for the instance.

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

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

### getServerCaCert

SSL configuration.

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

### hasServerCaCert

### clearServerCaCert

### setServerCaCert

SSL configuration.

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

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

### getInstanceType

The instance type.

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

### setInstanceType

The instance type.

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

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

### getProject

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

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

### setProject

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

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

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

### getIpv6Address

The IPv6 address assigned to the instance.

(Deprecated) This property was applicable only
to First Generation instances.

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

### setIpv6Address

The IPv6 address assigned to the instance.

(Deprecated) This property was applicable only
to First Generation instances.

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

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

### getServiceAccountEmailAddress

The service account email address assigned to the instance.\\This
property is read-only.

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

### setServiceAccountEmailAddress

The service account email address assigned to the instance.\\This
property is read-only.

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

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

### getOnPremisesConfiguration

Configuration specific to on-premises instances.

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

### hasOnPremisesConfiguration

### clearOnPremisesConfiguration

### setOnPremisesConfiguration

Configuration specific to on-premises instances.

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

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

### getReplicaConfiguration

Configuration specific to failover replicas and read replicas.

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

### hasReplicaConfiguration

### clearReplicaConfiguration

### setReplicaConfiguration

Configuration specific to failover replicas and read replicas.

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

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

### getBackendType

The backend type.

`SECOND_GEN`: Cloud SQL database instance.
`EXTERNAL`: A database server that is not managed by Google.
This property is read-only; use the `tier` property in the `settings`
object to determine the database type.

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

### setBackendType

The backend type.

`SECOND_GEN`: Cloud SQL database instance.
`EXTERNAL`: A database server that is not managed by Google.
This property is read-only; use the `tier` property in the `settings`
object to determine the database type.

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

| **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` |   |

### getSuspensionReason

If the instance state is SUSPENDED, the reason for the suspension.

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

### setSuspensionReason

If the instance state is SUSPENDED, the reason for the suspension.

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

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

### getConnectionName

Connection name of the Cloud SQL instance used in connection strings.

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

### setConnectionName

Connection name of the Cloud SQL instance used in connection strings.

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

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

### getName

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

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

### setName

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

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

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

### getRegion

The geographical region of the Cloud SQL instance.

It can be one of the
[regions](https://cloud.google.com/sql/docs/mysql/locations#location-r)
where Cloud SQL operates:
For example, `asia-east1`, `europe-west1`, and `us-central1`.
The default value is `us-central1`.

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

### setRegion

The geographical region of the Cloud SQL instance.

It can be one of the
[regions](https://cloud.google.com/sql/docs/mysql/locations#location-r)
where Cloud SQL operates:
For example, `asia-east1`, `europe-west1`, and `us-central1`.
The default value is `us-central1`.

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

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

### getGceZone

The Compute Engine zone that the instance is currently serving from. This
value could be different from the zone that was specified when the instance
was created if the instance has failed over to its secondary zone. WARNING:
Changing this might restart the instance.

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

### setGceZone

The Compute Engine zone that the instance is currently serving from. This
value could be different from the zone that was specified when the instance
was created if the instance has failed over to its secondary zone. WARNING:
Changing this might restart the instance.

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

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

### getSecondaryGceZone

The Compute Engine zone that the failover instance is currently serving
from for a regional instance. This value could be different
from the zone that was specified when the instance
was created if the instance has failed over to its secondary/failover zone.

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

### setSecondaryGceZone

The Compute Engine zone that the failover instance is currently serving
from for a regional instance. This value could be different
from the zone that was specified when the instance
was created if the instance has failed over to its secondary/failover zone.

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

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

### getDiskEncryptionConfiguration

Disk encryption configuration specific to an instance.

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

### hasDiskEncryptionConfiguration

### clearDiskEncryptionConfiguration

### setDiskEncryptionConfiguration

Disk encryption configuration specific to an instance.

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

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

### getDiskEncryptionStatus

Disk encryption status specific to an instance.

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

### hasDiskEncryptionStatus

### clearDiskEncryptionStatus

### setDiskEncryptionStatus

Disk encryption status specific to an instance.

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

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

### getRootPassword

Initial root password. Use only on creation. You must set root passwords
before you can connect to PostgreSQL instances.

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

### setRootPassword

Initial root password. Use only on creation. You must set root passwords
before you can connect to PostgreSQL instances.

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

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

### getScheduledMaintenance

The start time of any upcoming scheduled maintenance for this instance.

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

### hasScheduledMaintenance

### clearScheduledMaintenance

### setScheduledMaintenance

The start time of any upcoming scheduled maintenance for this instance.

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

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

### getSatisfiesPzs

This status indicates whether the instance satisfies PZS.

The status is reserved for future use.

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

### hasSatisfiesPzs

### clearSatisfiesPzs

### getSatisfiesPzsUnwrapped

Returns the unboxed value from `getSatisfiesPzs()`

This status indicates whether the instance satisfies PZS.
The status is reserved for future use.

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

### setSatisfiesPzs

This status indicates whether the instance satisfies PZS.

The status is reserved for future use.

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

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

### setSatisfiesPzsUnwrapped

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

This status indicates whether the instance satisfies PZS.
The status is reserved for future use.

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

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

### getDatabaseInstalledVersion

Output only. Stores the current database version running on the instance
including minor version such as `MYSQL_8_0_18`.

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

### setDatabaseInstalledVersion

Output only. Stores the current database version running on the instance
including minor version such as `MYSQL_8_0_18`.

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

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

### getOutOfDiskReport

This field represents the report generated by the proactive database
wellness job for OutOfDisk issues.

- Writers:
  - the proactive database wellness job for OOD.
- Readers:
  - the proactive database wellness job

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

### hasOutOfDiskReport

### clearOutOfDiskReport

### setOutOfDiskReport

This field represents the report generated by the proactive database
wellness job for OutOfDisk issues.

- Writers:
  - the proactive database wellness job for OOD.
- Readers:
  - the proactive database wellness job

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

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

### getCreateTime

Output only. The time when the instance was created in
[RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
`2012-11-15T16:19:00.094Z`.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the instance was created in
[RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example
`2012-11-15T16:19:00.094Z`.

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

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

### getAvailableMaintenanceVersions

Output only. List all maintenance versions applicable on the instance

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

### setAvailableMaintenanceVersions

Output only. List all maintenance versions applicable on the instance

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

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

### getMaintenanceVersion

The current software version on the instance.

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

### setMaintenanceVersion

The current software version on the instance.

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

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

### getUpgradableDatabaseVersions

Output only. All database versions that are available for upgrade.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.AvailableDatabaseVersion>` |   |

### setUpgradableDatabaseVersions

Output only. All database versions that are available for upgrade.

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

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

### getSqlNetworkArchitecture

Generated from protobuf field `optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasSqlNetworkArchitecture

### clearSqlNetworkArchitecture

### setSqlNetworkArchitecture

Generated from protobuf field `optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47;`

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

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

### getPscServiceAttachmentLink

Output only. The link to service attachment of PSC instance.

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

### hasPscServiceAttachmentLink

### clearPscServiceAttachmentLink

### setPscServiceAttachmentLink

Output only. The link to service attachment of PSC instance.

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

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

### getDnsName

Output only. The dns name of the instance.

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

### hasDnsName

### clearDnsName

### setDnsName

Output only. The dns name of the instance.

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

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

### getPrimaryDnsName

Output only. DEPRECATED: please use write_endpoint instead.

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

### hasPrimaryDnsName

### clearPrimaryDnsName

### setPrimaryDnsName

Output only. DEPRECATED: please use write_endpoint instead.

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

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

### getWriteEndpoint

Output only. The dns name of the primary instance in a replication group.

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

### hasWriteEndpoint

### clearWriteEndpoint

### setWriteEndpoint

Output only. The dns name of the primary instance in a replication group.

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

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

### getReplicationCluster

Optional. A primary instance and disaster recovery (DR) replica pair.

A DR replica is a cross-region replica that you designate
for failover in the event that the primary instance
experiences regional failure.
Applicable to MySQL and PostgreSQL.

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

### hasReplicationCluster

### clearReplicationCluster

### setReplicationCluster

Optional. A primary instance and disaster recovery (DR) replica pair.

A DR replica is a cross-region replica that you designate
for failover in the event that the primary instance
experiences regional failure.
Applicable to MySQL and PostgreSQL.

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

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

### getGeminiConfig

Gemini instance configuration.

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

### hasGeminiConfig

### clearGeminiConfig

### setGeminiConfig

Gemini instance configuration.

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

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

### getSatisfiesPzi

Output only. This status indicates whether the instance satisfies PZI.

The status is reserved for future use.

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

### hasSatisfiesPzi

### clearSatisfiesPzi

### getSatisfiesPziUnwrapped

Returns the unboxed value from `getSatisfiesPzi()`

Output only. This status indicates whether the instance satisfies PZI.
The status is reserved for future use.

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

### setSatisfiesPzi

Output only. This status indicates whether the instance satisfies PZI.

The status is reserved for future use.

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

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

### setSatisfiesPziUnwrapped

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

Output only. This status indicates whether the instance satisfies PZI.
The status is reserved for future use.

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

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

### getSwitchTransactionLogsToCloudStorageEnabled

Input only. Whether Cloud SQL is enabled to switch storing point-in-time
recovery log files from a data disk to Cloud Storage.

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

### hasSwitchTransactionLogsToCloudStorageEnabled

### clearSwitchTransactionLogsToCloudStorageEnabled

### getSwitchTransactionLogsToCloudStorageEnabledUnwrapped

Returns the unboxed value from `getSwitchTransactionLogsToCloudStorageEnabled()`

Input only. Whether Cloud SQL is enabled to switch storing point-in-time
recovery log files from a data disk to Cloud Storage.

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

### setSwitchTransactionLogsToCloudStorageEnabled

Input only. Whether Cloud SQL is enabled to switch storing point-in-time
recovery log files from a data disk to Cloud Storage.

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

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

### setSwitchTransactionLogsToCloudStorageEnabledUnwrapped

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

Input only. Whether Cloud SQL is enabled to switch storing point-in-time
recovery log files from a data disk to Cloud Storage.

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

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

### getIncludeReplicasForMajorVersionUpgrade

Input only. Determines whether an in-place major version upgrade of
replicas happens when an in-place major version upgrade of a primary
instance is initiated.

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

### hasIncludeReplicasForMajorVersionUpgrade

### clearIncludeReplicasForMajorVersionUpgrade

### getIncludeReplicasForMajorVersionUpgradeUnwrapped

Returns the unboxed value from `getIncludeReplicasForMajorVersionUpgrade()`

Input only. Determines whether an in-place major version upgrade of
replicas happens when an in-place major version upgrade of a primary
instance is initiated.

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

### setIncludeReplicasForMajorVersionUpgrade

Input only. Determines whether an in-place major version upgrade of
replicas happens when an in-place major version upgrade of a primary
instance is initiated.

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

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

### setIncludeReplicasForMajorVersionUpgradeUnwrapped

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

Input only. Determines whether an in-place major version upgrade of
replicas happens when an in-place major version upgrade of a primary
instance is initiated.

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

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

### getTags

Optional. Input only. Immutable. Tag keys and tag values that are bound to
this instance. You must represent each item in the map as:
`"<tag-key-namespaced-name>" : "<tag-value-short-name>"`.

For example, a single resource can have the following tags:

      "123/environment": "production",
      "123/costCenter": "marketing",

For more information on tag creation and management, see
<https://cloud.google.com/resource-manager/docs/tags/tags-overview>.

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

### setTags

Optional. Input only. Immutable. Tag keys and tag values that are bound to
this instance. You must represent each item in the map as:
`"<tag-key-namespaced-name>" : "<tag-value-short-name>"`.

For example, a single resource can have the following tags:

      "123/environment": "production",
      "123/costCenter": "marketing",

For more information on tag creation and management, see
<https://cloud.google.com/resource-manager/docs/tags/tags-overview>.

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

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

### getNodeCount

The number of read pool nodes in a read pool.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasNodeCount

### clearNodeCount

### setNodeCount

The number of read pool nodes in a read pool.

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

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

### getNodes

Output only. Entries containing information about each read pool node of
the read pool.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance.PoolNodeConfig>` |   |

### setNodes

Output only. Entries containing information about each read pool node of
the read pool.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance.PoolNodeConfig>` |

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

### getDnsNames

Output only. The list of DNS names used by this instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DnsNameMapping>` |   |

### setDnsNames

Output only. The list of DNS names used by this instance.

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

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