Class: Google::Apis::StoragetransferV1::TransferOptions

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

Overview

TransferOptions define the actions to be performed on objects in a transfer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TransferOptions

Returns a new instance of TransferOptions.



1474
1475
1476
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1474

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

Instance Attribute Details

#delete_objects_from_source_after_transferBoolean Also known as: delete_objects_from_source_after_transfer?

Whether objects should be deleted from the source after they are transferred to the sink. Note: This option and delete_objects_unique_in_sink are mutually exclusive. Corresponds to the JSON property deleteObjectsFromSourceAfterTransfer

Returns:

  • (Boolean)


1448
1449
1450
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1448

def delete_objects_from_source_after_transfer
  @delete_objects_from_source_after_transfer
end

#delete_objects_unique_in_sinkBoolean Also known as: delete_objects_unique_in_sink?

Whether objects that exist only in the sink should be deleted. Note: This option and delete_objects_from_source_after_transfer are mutually exclusive. Corresponds to the JSON property deleteObjectsUniqueInSink

Returns:

  • (Boolean)


1455
1456
1457
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1455

def delete_objects_unique_in_sink
  @delete_objects_unique_in_sink
end

#metadata_optionsGoogle::Apis::StoragetransferV1::MetadataOptions

Specifies the metadata options for running a transfer. These options only apply to transfers involving a POSIX filesystem and are ignored for other transfers. Corresponds to the JSON property metadataOptions



1463
1464
1465
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1463

def 
  @metadata_options
end

#overwrite_objects_already_existing_in_sinkBoolean Also known as: overwrite_objects_already_existing_in_sink?

When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are ovewritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object. Corresponds to the JSON property overwriteObjectsAlreadyExistingInSink

Returns:

  • (Boolean)


1471
1472
1473
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1471

def overwrite_objects_already_existing_in_sink
  @overwrite_objects_already_existing_in_sink
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1479
1480
1481
1482
1483
1484
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1479

def update!(**args)
  @delete_objects_from_source_after_transfer = args[:delete_objects_from_source_after_transfer] if args.key?(:delete_objects_from_source_after_transfer)
  @delete_objects_unique_in_sink = args[:delete_objects_unique_in_sink] if args.key?(:delete_objects_unique_in_sink)
  @metadata_options = args[:metadata_options] if args.key?(:metadata_options)
  @overwrite_objects_already_existing_in_sink = args[:overwrite_objects_already_existing_in_sink] if args.key?(:overwrite_objects_already_existing_in_sink)
end