# Google Cloud Storage Transfer V1 Client - Class TransferSpec (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 TransferSpec.

Configuration for running a transfer.

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

## Namespace

Google \\ Cloud \\ StorageTransfer \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ gcs_data_sink` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.GcsData` A Cloud Storage data sink. |
| `↳ posix_data_sink` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.PosixFilesystem` A POSIX Filesystem data sink. |
| `↳ gcs_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.GcsData` A Cloud Storage data source. |
| `↳ aws_s3_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.AwsS3Data` An AWS S3 data source. |
| `↳ http_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.HttpData` An HTTP URL data source. |
| `↳ posix_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.PosixFilesystem` A POSIX Filesystem data source. |
| `↳ azure_blob_storage_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.AzureBlobStorageData` An Azure Blob Storage data source. |
| `↳ aws_s3_compatible_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.AwsS3CompatibleData` An AWS S3 compatible data source. |
| `↳ hdfs_data_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.HdfsData` An HDFS cluster data source. |
| `↳ gcs_intermediate_data_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.GcsData` For transfers between file systems, specifies a Cloud Storage bucket to be used as an intermediate location through which to transfer data. See [Transfer data between file systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for more information. |
| `↳ object_conditions` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.ObjectConditions` Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' "last modification time" do not exclude objects in a data sink. |
| `↳ transfer_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOptions` If the option [delete_objects_unique_in_sink](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOptions#_Google_Cloud_StorageTransfer_V1_TransferOptions__getDeleteObjectsUniqueInSink__) is `true` and time-based object conditions such as 'last modification time' are 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. |
| `↳ transfer_manifest` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferManifest` A manifest file provides a list of objects to be transferred from the data source. This field points to the location of the manifest file. Otherwise, the entire source bucket is used. ObjectConditions still apply. |
| `↳ source_agent_pool_name` | `string` Specifies the agent pool name associated with the posix data source. When unspecified, the default name is used. |
| `↳ sink_agent_pool_name` | `string` Specifies the agent pool name associated with the posix data sink. When unspecified, the default name is used. |

### getGcsDataSink

A Cloud Storage data sink.

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

### hasGcsDataSink

### setGcsDataSink

A Cloud Storage data sink.

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

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

### getPosixDataSink

A POSIX Filesystem data sink.

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

### hasPosixDataSink

### setPosixDataSink

A POSIX Filesystem data sink.

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

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

### getGcsDataSource

A Cloud Storage data source.

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

### hasGcsDataSource

### setGcsDataSource

A Cloud Storage data source.

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

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

### getAwsS3DataSource

An AWS S3 data source.

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

### hasAwsS3DataSource

### setAwsS3DataSource

An AWS S3 data source.

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

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

### getHttpDataSource

An HTTP URL data source.

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

### hasHttpDataSource

### setHttpDataSource

An HTTP URL data source.

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

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

### getPosixDataSource

A POSIX Filesystem data source.

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

### hasPosixDataSource

### setPosixDataSource

A POSIX Filesystem data source.

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

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

### getAzureBlobStorageDataSource

An Azure Blob Storage data source.

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

### hasAzureBlobStorageDataSource

### setAzureBlobStorageDataSource

An Azure Blob Storage data source.

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

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

### getAwsS3CompatibleDataSource

An AWS S3 compatible data source.

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

### hasAwsS3CompatibleDataSource

### setAwsS3CompatibleDataSource

An AWS S3 compatible data source.

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

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

### getHdfsDataSource

An HDFS cluster data source.

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

### hasHdfsDataSource

### setHdfsDataSource

An HDFS cluster data source.

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

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

### getGcsIntermediateDataLocation

For transfers between file systems, specifies a Cloud Storage bucket
to be used as an intermediate location through which to transfer data.

See [Transfer data between file
systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for
more information.

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

### hasGcsIntermediateDataLocation

### setGcsIntermediateDataLocation

For transfers between file systems, specifies a Cloud Storage bucket
to be used as an intermediate location through which to transfer data.

See [Transfer data between file
systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for
more information.

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

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

### getObjectConditions

Only objects that satisfy these object conditions are included in the set
of data source and data sink objects. Object conditions based on
objects' "last modification time" do not exclude objects in a data sink.

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

### hasObjectConditions

### clearObjectConditions

### setObjectConditions

Only objects that satisfy these object conditions are included in the set
of data source and data sink objects. Object conditions based on
objects' "last modification time" do not exclude objects in a data sink.

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

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

### getTransferOptions

If the option
[delete_objects_unique_in_sink](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOptions#_Google_Cloud_StorageTransfer_V1_TransferOptions__getDeleteObjectsUniqueInSink__)
is `true` and time-based object conditions such as 'last modification time'
are 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

If the option
[delete_objects_unique_in_sink](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOptions#_Google_Cloud_StorageTransfer_V1_TransferOptions__getDeleteObjectsUniqueInSink__)
is `true` and time-based object conditions such as 'last modification time'
are 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` |   |

### getTransferManifest

A manifest file provides a list of objects to be transferred from the data
source. This field points to the location of the manifest file.

Otherwise, the entire source bucket is used. ObjectConditions still apply.

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

### hasTransferManifest

### clearTransferManifest

### setTransferManifest

A manifest file provides a list of objects to be transferred from the data
source. This field points to the location of the manifest file.

Otherwise, the entire source bucket is used. ObjectConditions still apply.

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

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

### getSourceAgentPoolName

Specifies the agent pool name associated with the posix data source. When
unspecified, the default name is used.

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

### setSourceAgentPoolName

Specifies the agent pool name associated with the posix data source. When
unspecified, the default name is used.

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

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

### getSinkAgentPoolName

Specifies the agent pool name associated with the posix data sink. When
unspecified, the default name is used.

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

### setSinkAgentPoolName

Specifies the agent pool name associated with the posix data sink. When
unspecified, the default name is used.

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

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

### getDataSink

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

### getDataSource

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

### getIntermediateDataLocation

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