# Storage Transfer Service V1 API - Class Google::Cloud::StorageTransfer::V1::TransferJob (v1.11.0)

1.11.0 (latest) 1.10.0 1.9.0 1.8.1 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.10.0 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.2 Reference documentation and code samples for the Storage Transfer Service V1 API class Google::Cloud::StorageTransfer::V1::TransferJob.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #creation_time

    def creation_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time that the transfer job was created.

### #deletion_time

    def deletion_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time that the transfer job was deleted.

### #description

    def description() -> ::String

**Returns**

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

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.
**Returns**

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

### #event_stream

    def event_stream() -> ::Google::Cloud::StorageTransfer::V1::EventStream

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::EventStream](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-EventStream)) --- Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored.

### #event_stream=

    def event_stream=(value) -> ::Google::Cloud::StorageTransfer::V1::EventStream

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::EventStream](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-EventStream)) --- Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::EventStream](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-EventStream)) --- Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored.

### #last_modification_time

    def last_modification_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time that the transfer job was last modified.

### #latest_operation_name

    def latest_operation_name() -> ::String

**Returns**

- (::String) --- The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.

### #latest_operation_name=

    def latest_operation_name=(value) -> ::String

**Parameter**

- **value** (::String) --- The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.
**Returns**

- (::String) --- The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.

### #logging_config

    def logging_config() -> ::Google::Cloud::StorageTransfer::V1::LoggingConfig

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::LoggingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-LoggingConfig)) --- Logging configuration.

### #logging_config=

    def logging_config=(value) -> ::Google::Cloud::StorageTransfer::V1::LoggingConfig

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::LoggingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-LoggingConfig)) --- Logging configuration.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::LoggingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-LoggingConfig)) --- Logging configuration.

### #name

    def name() -> ::String

**Returns**

- (::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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__ALREADY_EXISTS "Google::Rpc::Code::ALREADY_EXISTS (constant)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT "Google::Rpc::Code::INVALID_ARGUMENT (constant)") error.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__ALREADY_EXISTS "Google::Rpc::Code::ALREADY_EXISTS (constant)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT "Google::Rpc::Code::INVALID_ARGUMENT (constant)") error.
**Returns**

- (::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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__ALREADY_EXISTS "Google::Rpc::Code::ALREADY_EXISTS (constant)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT "Google::Rpc::Code::INVALID_ARGUMENT (constant)") error.

### #notification_config

    def notification_config() -> ::Google::Cloud::StorageTransfer::V1::NotificationConfig

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::NotificationConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig)) --- Notification configuration.

### #notification_config=

    def notification_config=(value) -> ::Google::Cloud::StorageTransfer::V1::NotificationConfig

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::NotificationConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig)) --- Notification configuration.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::NotificationConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig)) --- Notification configuration.

### #project_id

    def project_id() -> ::String

**Returns**

- (::String) --- The ID of the Google Cloud project that owns the job.

### #project_id=

    def project_id=(value) -> ::String

**Parameter**

- **value** (::String) --- The ID of the Google Cloud project that owns the job.
**Returns**

- (::String) --- The ID of the Google Cloud project that owns the job.

### #replication_spec

    def replication_spec() -> ::Google::Cloud::StorageTransfer::V1::ReplicationSpec

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::ReplicationSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-ReplicationSpec)) --- Replication specification.

### #replication_spec=

    def replication_spec=(value) -> ::Google::Cloud::StorageTransfer::V1::ReplicationSpec

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::ReplicationSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-ReplicationSpec)) --- Replication specification.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::ReplicationSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-ReplicationSpec)) --- Replication specification.

### #schedule

    def schedule() -> ::Google::Cloud::StorageTransfer::V1::Schedule

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::Schedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/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.

### #schedule=

    def schedule=(value) -> ::Google::Cloud::StorageTransfer::V1::Schedule

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::Schedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/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.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::Schedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/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.

### #service_account

    def service_account() -> ::String

**Returns**

- (::String) --- Optional. The user-managed service account to which to delegate service agent permissions. You can grant Cloud Storage bucket permissions to this service account instead of to the Transfer Service service agent.

  Format is
  `projects/-/serviceAccounts/ACCOUNT_EMAIL_OR_UNIQUEID`

  Either the service account email
  (`SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`) or the unique
  ID (`123456789012345678901`) are accepted in the string. The `-`
  wildcard character is required; replacing it with a project ID is invalid.

  See
  https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions
  for required permissions.

### #service_account=

    def service_account=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. The user-managed service account to which to delegate service agent permissions. You can grant Cloud Storage bucket permissions to this service account instead of to the Transfer Service service agent.


  Format is
  `projects/-/serviceAccounts/ACCOUNT_EMAIL_OR_UNIQUEID`

  Either the service account email
  (`SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`) or the unique
  ID (`123456789012345678901`) are accepted in the string. The `-`
  wildcard character is required; replacing it with a project ID is invalid.

  See
  https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions
  for required permissions.
**Returns**

- (::String) --- Optional. The user-managed service account to which to delegate service agent permissions. You can grant Cloud Storage bucket permissions to this service account instead of to the Transfer Service service agent.

  Format is
  `projects/-/serviceAccounts/ACCOUNT_EMAIL_OR_UNIQUEID`

  Either the service account email
  (`SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`) or the unique
  ID (`123456789012345678901`) are accepted in the string. The `-`
  wildcard character is required; replacing it with a project ID is invalid.

  See
  https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions
  for required permissions.

### #status

    def status() -> ::Google::Cloud::StorageTransfer::V1::TransferJob::Status

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::TransferJob::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status)) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status#Google__Cloud__StorageTransfer__V1__TransferJob__Status__ENABLED "Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED (constant)") to
  [DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status#Google__Cloud__StorageTransfer__V1__TransferJob__Status__DISABLED "Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED (constant)"), and an
  operation spawned by the transfer is running, the status change would not
  affect the current operation.

### #status=

    def status=(value) -> ::Google::Cloud::StorageTransfer::V1::TransferJob::Status

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::TransferJob::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status)) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status#Google__Cloud__StorageTransfer__V1__TransferJob__Status__ENABLED "Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED (constant)") to
  [DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status#Google__Cloud__StorageTransfer__V1__TransferJob__Status__DISABLED "Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED (constant)"), and an
  operation spawned by the transfer is running, the status change would not
  affect the current operation.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::TransferJob::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status)) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status#Google__Cloud__StorageTransfer__V1__TransferJob__Status__ENABLED "Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED (constant)") to
  [DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferJob-Status#Google__Cloud__StorageTransfer__V1__TransferJob__Status__DISABLED "Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED (constant)"), and an
  operation spawned by the transfer is running, the status change would not
  affect the current operation.

### #transfer_spec

    def transfer_spec() -> ::Google::Cloud::StorageTransfer::V1::TransferSpec

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::TransferSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferSpec)) --- Transfer specification.

### #transfer_spec=

    def transfer_spec=(value) -> ::Google::Cloud::StorageTransfer::V1::TransferSpec

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::TransferSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferSpec)) --- Transfer specification.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::TransferSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferSpec)) --- Transfer specification.