# Google Cloud Net App V1 Client - Class Replication (1.12.0)

1.12.0 (latest) 1.11.0 1.10.2 1.9.0 1.8.1 1.7.0 1.6.1 1.4.0 1.3.1 1.2.1 1.1.1 1.0.1 0.3.1 0.2.6 0.1.1 Reference documentation and code samples for the Google Cloud Net App V1 Client class Replication.

Replication is a nested resource under Volume, that describes a
cross-region replication relationship between 2 volumes in different
regions.

Generated from protobuf message `google.cloud.netapp.v1.Replication`

## Namespace

Google \\ Cloud \\ NetApp \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the Replication. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. |
| `↳ state` | `int` Output only. State of the replication. |
| `↳ state_details` | `string` Output only. State details of the replication. |
| `↳ role` | `int` Output only. Indicates whether this points to source or destination. |
| `↳ replication_schedule` | `int` Required. Indicates the schedule for replication. |
| `↳ mirror_state` | `int` Output only. Indicates the state of mirroring. |
| `↳ healthy` | `bool` Output only. Condition of the relationship. Can be one of the following: - true: The replication relationship is healthy. It has not missed the most recent scheduled transfer. - false: The replication relationship is not healthy. It has missed the most recent scheduled transfer. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Replication create time. |
| `↳ destination_volume` | `string` Output only. Full name of destination volume resource. Example : "projects/{project}/locations/{location}/volumes/{volume_id}" |
| `↳ transfer_stats` | `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.TransferStats` Output only. Replication transfer statistics. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Resource labels to represent user provided metadata. |
| `↳ description` | `string` A description about this replication relationship. |
| `↳ destination_volume_parameters` | `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.DestinationVolumeParameters` Required. Input only. Destination volume parameters |
| `↳ source_volume` | `string` Output only. Full name of source volume resource. Example : "projects/{project}/locations/{location}/volumes/{volume_id}" |
| `↳ hybrid_peering_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.HybridPeeringDetails` Output only. Hybrid peering details. |
| `↳ cluster_location` | `string` Optional. Location of the user cluster. |
| `↳ hybrid_replication_type` | `int` Output only. Type of the hybrid replication. |
| `↳ hybrid_replication_user_commands` | `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.UserCommands` Output only. Copy pastable snapmirror commands to be executed on onprem cluster by the customer. |

### getName

Identifier. The resource name of the Replication.

Format:
`projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.

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

### setName

Identifier. The resource name of the Replication.

Format:
`projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.

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

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

### getState

Output only. State of the replication.

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

### setState

Output only. State of the replication.

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

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

### getStateDetails

Output only. State details of the replication.

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

### setStateDetails

Output only. State details of the replication.

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

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

### getRole

Output only. Indicates whether this points to source or destination.

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

### setRole

Output only. Indicates whether this points to source or destination.

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

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

### getReplicationSchedule

Required. Indicates the schedule for replication.

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

### setReplicationSchedule

Required. Indicates the schedule for replication.

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

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

### getMirrorState

Output only. Indicates the state of mirroring.

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

### setMirrorState

Output only. Indicates the state of mirroring.

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

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

### getHealthy

Output only. Condition of the relationship. Can be one of the following:

- true: The replication relationship is healthy. It has not missed the most
  recent scheduled transfer.

- false: The replication relationship is not healthy. It has missed the
  most recent scheduled transfer.

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

### hasHealthy

### clearHealthy

### setHealthy

Output only. Condition of the relationship. Can be one of the following:

- true: The replication relationship is healthy. It has not missed the most
  recent scheduled transfer.

- false: The replication relationship is not healthy. It has missed the
  most recent scheduled transfer.

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

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

### getCreateTime

Output only. Replication create time.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Replication create time.

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

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

### getDestinationVolume

Output only. Full name of destination volume resource.

Example : "projects/{project}/locations/{location}/volumes/{volume_id}"

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

### setDestinationVolume

Output only. Full name of destination volume resource.

Example : "projects/{project}/locations/{location}/volumes/{volume_id}"

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

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

### getTransferStats

Output only. Replication transfer statistics.

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

### hasTransferStats

### clearTransferStats

### setTransferStats

Output only. Replication transfer statistics.

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

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

### getLabels

Resource labels to represent user provided metadata.

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

### setLabels

Resource labels to represent user provided metadata.

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

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

### getDescription

A description about this replication relationship.

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

### hasDescription

### clearDescription

### setDescription

A description about this replication relationship.

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

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

### getDestinationVolumeParameters

Required. Input only. Destination volume parameters

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

### hasDestinationVolumeParameters

### clearDestinationVolumeParameters

### setDestinationVolumeParameters

Required. Input only. Destination volume parameters

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

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

### getSourceVolume

Output only. Full name of source volume resource.

Example : "projects/{project}/locations/{location}/volumes/{volume_id}"

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

### setSourceVolume

Output only. Full name of source volume resource.

Example : "projects/{project}/locations/{location}/volumes/{volume_id}"

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

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

### getHybridPeeringDetails

Output only. Hybrid peering details.

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

### hasHybridPeeringDetails

### clearHybridPeeringDetails

### setHybridPeeringDetails

Output only. Hybrid peering details.

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

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

### getClusterLocation

Optional. Location of the user cluster.

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

### setClusterLocation

Optional. Location of the user cluster.

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

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

### getHybridReplicationType

Output only. Type of the hybrid replication.

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

### setHybridReplicationType

Output only. Type of the hybrid replication.

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

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

### getHybridReplicationUserCommands

Output only. Copy pastable snapmirror commands to be executed on onprem
cluster by the customer.

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

### hasHybridReplicationUserCommands

### clearHybridReplicationUserCommands

### setHybridReplicationUserCommands

Output only. Copy pastable snapmirror commands to be executed on onprem
cluster by the customer.

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

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