Google Cloud Storage Transfer V1 Client - Class TransferJob (1.0.6)

Reference documentation and code samples for the Google Cloud Storage Transfer V1 Client class TransferJob.

This resource represents the configuration of a transfer job that runs periodically.

Generated from protobuf message google.storagetransfer.v1.TransferJob

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

A unique name (within the transfer project) assigned when the job is created. If this field is empty in a CreateTransferJobRequest, Storage Transfer Service assigns a unique name. Otherwise, the specified name is used as the unique name for this job. If the specified name is in use by a job, the creation request fails with an ALREADY_EXISTS error. This name must start with "transferJobs/" prefix and end with a letter or a number, and should be no more than 128 characters. For transfers involving PosixFilesystem, this name must start with transferJobs/OPI specifically. For all other transfer types, this name must not start with transferJobs/OPI. Non-PosixFilesystem example: "transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$" PosixFilesystem example: "transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$" Applications must not rely on the enforcement of naming requirements involving OPI. Invalid job names fail with an INVALID_ARGUMENT error.

↳ description string

A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.

↳ project_id string

The ID of the Google Cloud project that owns the job.

↳ transfer_spec Google\Cloud\StorageTransfer\V1\TransferSpec

Transfer specification.

↳ notification_config Google\Cloud\StorageTransfer\V1\NotificationConfig

Notification configuration. This is not supported for transfers involving PosixFilesystem.

↳ logging_config Google\Cloud\StorageTransfer\V1\LoggingConfig

Logging configuration.

↳ schedule Google\Cloud\StorageTransfer\V1\Schedule

Specifies schedule for the transfer job. This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule.

↳ status int

Status of the job. This value MUST be specified for CreateTransferJobRequests. Note: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.

↳ creation_time Google\Protobuf\Timestamp

Output only. The time that the transfer job was created.

↳ last_modification_time Google\Protobuf\Timestamp

Output only. The time that the transfer job was last modified.

↳ deletion_time Google\Protobuf\Timestamp

Output only. The time that the transfer job was deleted.

↳ latest_operation_name string

The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.

getName

A unique name (within the transfer project) assigned when the job is created. If this field is empty in a CreateTransferJobRequest, Storage Transfer Service assigns a unique name. Otherwise, the specified name is used as the unique name for this job.

If the specified name is in use by a job, the creation request fails with an ALREADY_EXISTS error. This name must start with "transferJobs/" prefix and end with a letter or a number, and should be no more than 128 characters. For transfers involving PosixFilesystem, this name must start with transferJobs/OPI specifically. For all other transfer types, this name must not start with transferJobs/OPI. Non-PosixFilesystem example: "transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$" PosixFilesystem example: "transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$" Applications must not rely on the enforcement of naming requirements involving OPI. Invalid job names fail with an INVALID_ARGUMENT error.

Returns
TypeDescription
string

setName

A unique name (within the transfer project) assigned when the job is created. If this field is empty in a CreateTransferJobRequest, Storage Transfer Service assigns a unique name. Otherwise, the specified name is used as the unique name for this job.

If the specified name is in use by a job, the creation request fails with an ALREADY_EXISTS error. This name must start with "transferJobs/" prefix and end with a letter or a number, and should be no more than 128 characters. For transfers involving PosixFilesystem, this name must start with transferJobs/OPI specifically. For all other transfer types, this name must not start with transferJobs/OPI. Non-PosixFilesystem example: "transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$" PosixFilesystem example: "transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$" Applications must not rely on the enforcement of naming requirements involving OPI. Invalid job names fail with an INVALID_ARGUMENT error.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.

Returns
TypeDescription
string

setDescription

A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProjectId

The ID of the Google Cloud project that owns the job.

Returns
TypeDescription
string

setProjectId

The ID of the Google Cloud project that owns the job.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTransferSpec

Transfer specification.

Returns
TypeDescription
Google\Cloud\StorageTransfer\V1\TransferSpec|null

hasTransferSpec

clearTransferSpec

setTransferSpec

Transfer specification.

Parameter
NameDescription
var Google\Cloud\StorageTransfer\V1\TransferSpec
Returns
TypeDescription
$this

getNotificationConfig

Notification configuration. This is not supported for transfers involving PosixFilesystem.

Returns
TypeDescription
Google\Cloud\StorageTransfer\V1\NotificationConfig|null

hasNotificationConfig

clearNotificationConfig

setNotificationConfig

Notification configuration. This is not supported for transfers involving PosixFilesystem.

Parameter
NameDescription
var Google\Cloud\StorageTransfer\V1\NotificationConfig
Returns
TypeDescription
$this

getLoggingConfig

Logging configuration.

Returns
TypeDescription
Google\Cloud\StorageTransfer\V1\LoggingConfig|null

hasLoggingConfig

clearLoggingConfig

setLoggingConfig

Logging configuration.

Parameter
NameDescription
var Google\Cloud\StorageTransfer\V1\LoggingConfig
Returns
TypeDescription
$this

getSchedule

Specifies schedule for the transfer job.

This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule.

Returns
TypeDescription
Google\Cloud\StorageTransfer\V1\Schedule|null

hasSchedule

clearSchedule

setSchedule

Specifies schedule for the transfer job.

This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule.

Parameter
NameDescription
var Google\Cloud\StorageTransfer\V1\Schedule
Returns
TypeDescription
$this

getStatus

Status of the job. This value MUST be specified for CreateTransferJobRequests.

Note: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.

Returns
TypeDescription
int

setStatus

Status of the job. This value MUST be specified for CreateTransferJobRequests.

Note: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getCreationTime

Output only. The time that the transfer job was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreationTime

clearCreationTime

setCreationTime

Output only. The time that the transfer job was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLastModificationTime

Output only. The time that the transfer job was last modified.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasLastModificationTime

clearLastModificationTime

setLastModificationTime

Output only. The time that the transfer job was last modified.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDeletionTime

Output only. The time that the transfer job was deleted.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasDeletionTime

clearDeletionTime

setDeletionTime

Output only. The time that the transfer job was deleted.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLatestOperationName

The name of the most recently started TransferOperation of this JobConfig.

Present if a TransferOperation has been created for this JobConfig.

Returns
TypeDescription
string

setLatestOperationName

The name of the most recently started TransferOperation of this JobConfig.

Present if a TransferOperation has been created for this JobConfig.

Parameter
NameDescription
var string
Returns
TypeDescription
$this