# Google Cloud Storage Transfer V1 Client - Class ReplicationSpec (2.4.0)

2.4.0 (latest) 2.3.2 2.2.1 2.1.1 2.0.2 1.5.0 1.4.5 1.3.1 1.2.0 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Storage Transfer V1 Client class ReplicationSpec.

Specifies the configuration for a cross-bucket replication job. Cross-bucket
replication copies new or updated objects from a source Cloud Storage bucket
to a destination Cloud Storage bucket. Existing objects in the source bucket
are not copied by a new cross-bucket replication job.

Generated from protobuf message `google.storagetransfer.v1.ReplicationSpec`

## Namespace

Google \\ Cloud \\ StorageTransfer \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ gcs_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.GcsData` The Cloud Storage bucket from which to replicate objects. |
| `↳ gcs_data_sink` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.GcsData` The Cloud Storage bucket to which to replicate objects. |
| `↳ object_conditions` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.ObjectConditions` Object conditions that determine which objects are transferred. For replication jobs, only `include_prefixes` and `exclude_prefixes` are supported. |
| `↳ transfer_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOptions` Specifies the metadata options to be applied during replication. Delete options are not supported. If a delete option is specified, the request fails with an [INVALID_ARGUMENT](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__INVALID_ARGUMENT) error. |

### getGcsDataSource

The Cloud Storage bucket from which to replicate objects.

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

### hasGcsDataSource

### setGcsDataSource

The Cloud Storage bucket from which to replicate objects.

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

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

### getGcsDataSink

The Cloud Storage bucket to which to replicate objects.

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

### hasGcsDataSink

### setGcsDataSink

The Cloud Storage bucket to which to replicate objects.

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

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

### getObjectConditions

Object conditions that determine which objects are transferred. For
replication jobs, only `include_prefixes` and `exclude_prefixes` are
supported.

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

### hasObjectConditions

### clearObjectConditions

### setObjectConditions

Object conditions that determine which objects are transferred. For
replication jobs, only `include_prefixes` and `exclude_prefixes` are
supported.

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

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

### getTransferOptions

Specifies the metadata options to be applied during replication.

Delete options are not supported. If a delete option is specified, the
request fails with an [INVALID_ARGUMENT](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__INVALID_ARGUMENT)
error.

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

### hasTransferOptions

### clearTransferOptions

### setTransferOptions

Specifies the metadata options to be applied during replication.

Delete options are not supported. If a delete option is specified, the
request fails with an [INVALID_ARGUMENT](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__INVALID_ARGUMENT)
error.

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

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

### getDataSource

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

### getDataSink

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