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

Database instance clone context.

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

## 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#cloneContext`. |
| `↳ pitr_timestamp_ms` | `int|string` Reserved for future use. |
| `↳ destination_instance_name` | `string` Required. Name of the Cloud SQL instance to be created as a clone. |
| `↳ bin_log_coordinates` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.BinLogCoordinates` Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates. |
| `↳ point_in_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Timestamp, if specified, identifies the time to which the source instance is cloned. |
| `↳ allocated_ip_range` | `string` The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/[-a-z0-9]*[a-z0-9])?. Reserved for future use. |
| `↳ database_names` | `string[]` (SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty. |
| `↳ preferred_zone` | `string` Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types. |
| `↳ preferred_secondary_zone` | `string` Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field. This field applies to all DB types. |
| `↳ source_instance_deletion_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp. |
| `↳ destination_project` | `string` Optional. The project ID of the destination project where the cloned instance will be created. To perform a cross-project clone, this field is required. If not specified, the clone is created in the same project as the source instance. |
| `↳ destination_network` | `string` Optional. The fully qualified URI of the VPC network to which the cloned instance will be connected via Private Services Access for private IP. For example:`projects/my-network-project/global/networks/my-network`. This field is only required for cross-project cloning. |

### getKind

This is always `sql#cloneContext`.

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

### setKind

This is always `sql#cloneContext`.

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

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

### getPitrTimestampMs

Reserved for future use.

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

### setPitrTimestampMs

Reserved for future use.

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

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

### getDestinationInstanceName

Required. Name of the Cloud SQL instance to be created as a clone.

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

### setDestinationInstanceName

Required. Name of the Cloud SQL instance to be created as a clone.

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

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

### getBinLogCoordinates

Binary log coordinates, if specified, identify the position up to which the
source instance is cloned. If not specified, the source instance is
cloned up to the most recent binary log coordinates.

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

### hasBinLogCoordinates

### clearBinLogCoordinates

### setBinLogCoordinates

Binary log coordinates, if specified, identify the position up to which the
source instance is cloned. If not specified, the source instance is
cloned up to the most recent binary log coordinates.

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

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

### getPointInTime

Timestamp, if specified, identifies the time to which the source instance
is cloned.

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

### hasPointInTime

### clearPointInTime

### setPointInTime

Timestamp, if specified, identifies the time to which the source instance
is cloned.

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

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

### getAllocatedIpRange

The name of the allocated ip range for the private ip Cloud SQL instance.

For example: "google-managed-services-default". If set, the cloned instance
ip will be created in the allocated range. The range name must comply with
[RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name
must be 1-63 characters long and match the regular expression
[a-z](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/[-a-z0-9]*[a-z0-9])?.
Reserved for future use.

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

### setAllocatedIpRange

The name of the allocated ip range for the private ip Cloud SQL instance.

For example: "google-managed-services-default". If set, the cloned instance
ip will be created in the allocated range. The range name must comply with
[RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name
must be 1-63 characters long and match the regular expression
[a-z](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/[-a-z0-9]*[a-z0-9])?.
Reserved for future use.

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

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

### getDatabaseNames

(SQL Server only) Clone only the specified databases from the source
instance. Clone all databases if empty.

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

### setDatabaseNames

(SQL Server only) Clone only the specified databases from the source
instance. Clone all databases if empty.

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

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

### getPreferredZone

Optional. Copy clone and point-in-time recovery clone of an instance to the
specified zone. If no zone is specified, clone to the same primary zone as
the source instance. This field applies to all DB types.

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

### hasPreferredZone

### clearPreferredZone

### setPreferredZone

Optional. Copy clone and point-in-time recovery clone of an instance to the
specified zone. If no zone is specified, clone to the same primary zone as
the source instance. This field applies to all DB types.

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

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

### getPreferredSecondaryZone

Optional. Copy clone and point-in-time recovery clone of a regional
instance in the specified zones. If not specified, clone to the same
secondary zone as the source instance. This value cannot be the same as the
preferred_zone field. This field applies to all DB types.

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

### hasPreferredSecondaryZone

### clearPreferredSecondaryZone

### setPreferredSecondaryZone

Optional. Copy clone and point-in-time recovery clone of a regional
instance in the specified zones. If not specified, clone to the same
secondary zone as the source instance. This value cannot be the same as the
preferred_zone field. This field applies to all DB types.

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

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

### getSourceInstanceDeletionTime

The timestamp used to identify the time when the source instance is
deleted. If this instance is deleted, then you must set the timestamp.

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

### hasSourceInstanceDeletionTime

### clearSourceInstanceDeletionTime

### setSourceInstanceDeletionTime

The timestamp used to identify the time when the source instance is
deleted. If this instance is deleted, then you must set the timestamp.

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

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

### getDestinationProject

Optional. The project ID of the destination project where the cloned
instance will be created. To perform a cross-project clone, this field is
required. If not specified, the clone is created in the same project
as the source instance.

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

### hasDestinationProject

### clearDestinationProject

### setDestinationProject

Optional. The project ID of the destination project where the cloned
instance will be created. To perform a cross-project clone, this field is
required. If not specified, the clone is created in the same project
as the source instance.

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

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

### getDestinationNetwork

Optional. The fully qualified URI of the VPC network to which the cloned
instance will be connected via Private Services Access for private IP. For
example:`projects/my-network-project/global/networks/my-network`. This
field is only required for cross-project cloning.

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

### hasDestinationNetwork

### clearDestinationNetwork

### setDestinationNetwork

Optional. The fully qualified URI of the VPC network to which the cloned
instance will be connected via Private Services Access for private IP. For
example:`projects/my-network-project/global/networks/my-network`. This
field is only required for cross-project cloning.

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

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