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

The context to perform a point-in-time recovery of an instance managed by
Backup and Disaster Recovery (DR) Service.

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

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ datasource` | `string` The Backup and Disaster Recovery (DR) Service Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}. |
| `↳ point_in_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Required. The date and time to which you want to restore the instance. |
| `↳ target_instance` | `string` Target instance name. |
| `↳ private_network` | `string` Optional. The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. |
| `↳ allocated_ip_range` | `string` Optional. The name of the allocated IP range for the internal IP Cloud SQL instance. For example: "google-managed-services-default". If you set this, then Cloud SQL creates the IP address for the cloned instance in the allocated range. This range must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035) standards. 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. |
| `↳ preferred_zone` | `string` Optional. Point-in-time recovery of an instance to the specified zone. If no zone is specified, then clone to the same primary zone as the source instance. |
| `↳ preferred_secondary_zone` | `string` Optional. Point-in-time recovery 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. |
| `↳ target_instance_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DatabaseInstance` Optional. Specifies the instance settings that will be overridden from the source instance. This field is only applicable for cross project PITRs. |
| `↳ target_instance_clear_settings_field_names` | `string[]` Optional. Specifies the instance settings that will be cleared from the source instance. This field is only applicable for cross project PITRs. |
| `↳ region` | `string` Optional. The region of the target instance where the datasource will be restored. For example: "us-central1". |

### getDatasource

The Backup and Disaster Recovery (DR) Service Datasource URI.

Format:
projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.

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

### hasDatasource

### clearDatasource

### setDatasource

The Backup and Disaster Recovery (DR) Service Datasource URI.

Format:
projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.

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

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

### getPointInTime

Required. The date and time to which you want to restore the instance.

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

### hasPointInTime

### clearPointInTime

### setPointInTime

Required. The date and time to which you want to restore the instance.

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

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

### getTargetInstance

Target instance name.

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

### hasTargetInstance

### clearTargetInstance

### setTargetInstance

Target instance name.

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

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

### getPrivateNetwork

Optional. The resource link for the VPC network from which the Cloud SQL
instance is accessible for private IP. For example,
`/projects/myProject/global/networks/default`.

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

### hasPrivateNetwork

### clearPrivateNetwork

### setPrivateNetwork

Optional. The resource link for the VPC network from which the Cloud SQL
instance is accessible for private IP. For example,
`/projects/myProject/global/networks/default`.

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

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

### getAllocatedIpRange

Optional. The name of the allocated IP range for the internal IP Cloud SQL
instance. For example: "google-managed-services-default". If you set this,
then Cloud SQL creates the IP address for the cloned instance in the
allocated range. This range must comply with [RFC
1035](https://tools.ietf.org/html/rfc1035) standards. 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` |   |

### hasAllocatedIpRange

### clearAllocatedIpRange

### setAllocatedIpRange

Optional. The name of the allocated IP range for the internal IP Cloud SQL
instance. For example: "google-managed-services-default". If you set this,
then Cloud SQL creates the IP address for the cloned instance in the
allocated range. This range must comply with [RFC
1035](https://tools.ietf.org/html/rfc1035) standards. 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` |   |

### getPreferredZone

Optional. Point-in-time recovery of an instance to the specified zone. If
no zone is specified, then clone to the same primary zone as the source
instance.

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

### hasPreferredZone

### clearPreferredZone

### setPreferredZone

Optional. Point-in-time recovery of an instance to the specified zone. If
no zone is specified, then clone to the same primary zone as the source
instance.

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

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

### getPreferredSecondaryZone

Optional. Point-in-time recovery 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.

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

### hasPreferredSecondaryZone

### clearPreferredSecondaryZone

### setPreferredSecondaryZone

Optional. Point-in-time recovery 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.

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

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

### getTargetInstanceSettings

Optional. Specifies the instance settings that will be overridden from the
source instance. This field is only applicable for cross project PITRs.

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

### hasTargetInstanceSettings

### clearTargetInstanceSettings

### setTargetInstanceSettings

Optional. Specifies the instance settings that will be overridden from the
source instance. This field is only applicable for cross project PITRs.

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

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

### getTargetInstanceClearSettingsFieldNames

Optional. Specifies the instance settings that will be cleared from the
source instance. This field is only applicable for cross project PITRs.

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

### setTargetInstanceClearSettingsFieldNames

Optional. Specifies the instance settings that will be cleared from the
source instance. This field is only applicable for cross project PITRs.

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

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

### getRegion

Optional. The region of the target instance where the datasource will be
restored. For example: "us-central1".

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

### hasRegion

### clearRegion

### setRegion

Optional. The region of the target instance where the datasource will be
restored. For example: "us-central1".

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

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