Class: Google::Apis::StoragetransferV1::TransferSpec

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

Configuration for running a transfer.

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) ⇒ TransferSpec

Returns a new instance of TransferSpec.



176
177
178
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 176

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

Instance Attribute Details

#aws_s3_data_sourceGoogle::Apis::StoragetransferV1::AwsS3Data

An AwsS3Data can be a data source, but not a data sink. In an AwsS3Data, an object's name is the S3 object's key name. Corresponds to the JSON property awsS3DataSource



134
135
136
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 134

def aws_s3_data_source
  @aws_s3_data_source
end

#gcs_data_sinkGoogle::Apis::StoragetransferV1::GcsData

In a GcsData, an object's name is the Google Cloud Storage object's name and its lastModificationTime refers to the object's updated time, which changes when the content or the metadata of the object is updated. Corresponds to the JSON property gcsDataSink



163
164
165
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 163

def gcs_data_sink
  @gcs_data_sink
end

#gcs_data_sourceGoogle::Apis::StoragetransferV1::GcsData

In a GcsData, an object's name is the Google Cloud Storage object's name and its lastModificationTime refers to the object's updated time, which changes when the content or the metadata of the object is updated. Corresponds to the JSON property gcsDataSource



128
129
130
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 128

def gcs_data_source
  @gcs_data_source
end

#http_data_sourceGoogle::Apis::StoragetransferV1::HttpData

An HttpData specifies a list of objects on the web to be transferred over HTTP. The information of the objects to be transferred is contained in a file referenced by a URL. The first line in the file must be "TsvHttpData-1.0", which specifies the format of the file. Subsequent lines specify the information of the list of objects, one object per list entry. Each entry has the following tab-delimited fields: * HTTP URL * Length * MD5 - This field is a base64-encoded MD5 hash of the object An HTTP URL that points to the object to be transferred. It must be a valid URL with URL scheme HTTP or HTTPS. When an object with URL http(s)://hostname:port/ is transferred to the data sink, the name of the object at the data sink is /. Length and MD5 provide the size and the base64-encoded MD5 hash of the object. If Length does not match the actual length of the object fetched, the object will not be transferred. If MD5 does not match the MD5 computed from the transferred bytes, the object transfer will fail. lastModificationTime is not available in HttpData objects. The objects that the URL list points to must allow public access. Storage Transfer Service obeys robots.txt rules and requires the HTTP server to support Range requests and to return a Content-Length header in each response. Corresponds to the JSON property httpDataSource



156
157
158
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 156

def http_data_source
  @http_data_source
end

#object_conditionsGoogle::Apis::StoragetransferV1::ObjectConditions

Conditions that determine which objects will be transferred. Corresponds to the JSON property objectConditions



168
169
170
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 168

def object_conditions
  @object_conditions
end

#transfer_optionsGoogle::Apis::StoragetransferV1::TransferOptions

TransferOptions uses three boolean parameters to define the actions to be performed on objects in a transfer. Corresponds to the JSON property transferOptions



174
175
176
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 174

def transfer_options
  @transfer_options
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



181
182
183
184
185
186
187
188
# File 'generated/google/apis/storagetransfer_v1/classes.rb', line 181

def update!(**args)
  @gcs_data_source = args[:gcs_data_source] if args.key?(:gcs_data_source)
  @aws_s3_data_source = args[:aws_s3_data_source] if args.key?(:aws_s3_data_source)
  @http_data_source = args[:http_data_source] if args.key?(:http_data_source)
  @gcs_data_sink = args[:gcs_data_sink] if args.key?(:gcs_data_sink)
  @object_conditions = args[:object_conditions] if args.key?(:object_conditions)
  @transfer_options = args[:transfer_options] if args.key?(:transfer_options)
end