class Google::Cloud::Storage::Service

def compose_file bucket_name,

destination bucket/object.
# Copy a file from source bucket/object to a
def compose_file bucket_name,
                 source_files,
                 destination_path,
                 destination_gapi,
                 acl: nil,
                 key: nil,
                 if_source_generation_match: nil,
                 if_generation_match: nil,
                 if_metageneration_match: nil,
                 user_project: nil,
                 options: {}
  source_objects = compose_file_source_objects source_files, if_source_generation_match
  compose_req = Google::Apis::StorageV1::ComposeRequest.new source_objects: source_objects,
                                                            destination: destination_gapi
  if options[:retries].nil?
    is_idempotent = retry? if_generation_match: if_generation_match
    options = is_idempotent ? key_options(key) : key_options(key).merge(retries: 0)
  else
    options = key_options.merge options
  end
  execute do
    service.compose_object bucket_name,
                           destination_path,
                           compose_req,
                           destination_predefined_acl: acl,
                           if_generation_match: if_generation_match,
                           if_metageneration_match: if_metageneration_match,
                           user_project: user_project(user_project),
                           options: options
  end
end