Class: Google::Apis::StoragetransferV1::TransferJob

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/storagetransfer_v1/classes.rb,
generated/google/apis/storagetransfer_v1/representations.rb,
generated/google/apis/storagetransfer_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TransferJob

Returns a new instance of TransferJob.



830
831
832
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 830

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#creation_timeString

Output only. The time that the transfer job was created. Corresponds to the JSON property creationTime

Returns:

  • (String)


769
770
771
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 769

def creation_time
  @creation_time
end

#deletion_timeString

Output only. The time that the transfer job was deleted. Corresponds to the JSON property deletionTime

Returns:

  • (String)


774
775
776
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 774

def deletion_time
  @deletion_time
end

#descriptionString

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

Returns:

  • (String)


780
781
782
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 780

def description
  @description
end

#last_modification_timeString

Output only. The time that the transfer job was last modified. Corresponds to the JSON property lastModificationTime

Returns:

  • (String)


785
786
787
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 785

def last_modification_time
  @last_modification_time
end

#nameString

A unique name (within the transfer project) assigned when the job is created. If this field is left empty in a CreateTransferJobRequest, Storage Transfer Service will assign a unique name. Otherwise, the supplied name is used as the unique name for this job. This name must start with "transferJobs/" prefix and end with a letter or a number, and should be no more than 128 characters. Example of a valid format : "transferJobs/[A-Za-z0-9-._~]*[A-Za-z0-9]$" Note: If the supplied name is already in use, the creation request results in an ALREADY_EXISTS error and the transfer job will not be created. Invalid job names will return an INVALID_ARGUMENT error and the job will not be created. Corresponds to the JSON property name

Returns:

  • (String)


802
803
804
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 802

def name
  @name
end

#project_idString

The ID of the Google Cloud Platform Project that owns the job. Corresponds to the JSON property projectId

Returns:

  • (String)


807
808
809
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 807

def project_id
  @project_id
end

#scheduleGoogle::Apis::StoragetransferV1::Schedule

Transfers can be scheduled to recur or to run just once. Corresponds to the JSON property schedule



812
813
814
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 812

def schedule
  @schedule
end

#statusString

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. Corresponds to the JSON property status

Returns:

  • (String)


823
824
825
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 823

def status
  @status
end

#transfer_specGoogle::Apis::StoragetransferV1::TransferSpec

Configuration for running a transfer. Corresponds to the JSON property transferSpec



828
829
830
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 828

def transfer_spec
  @transfer_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



835
836
837
838
839
840
841
842
843
844
845
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 835

def update!(**args)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @deletion_time = args[:deletion_time] if args.key?(:deletion_time)
  @description = args[:description] if args.key?(:description)
  @last_modification_time = args[:last_modification_time] if args.key?(:last_modification_time)
  @name = args[:name] if args.key?(:name)
  @project_id = args[:project_id] if args.key?(:project_id)
  @schedule = args[:schedule] if args.key?(:schedule)
  @status = args[:status] if args.key?(:status)
  @transfer_spec = args[:transfer_spec] if args.key?(:transfer_spec)
end