Class: VectorAmp::GoogleDriveSource
- Defined in:
- lib/vector_amp/source.rb
Overview
Google Drive ingestion source.
Constant Summary
Constants inherited from Source
Source::SUPPORTED_SOURCE_TYPES
Instance Attribute Summary
Attributes inherited from Source
#config, #description, #id, #metadata, #name, #source_type
Instance Method Summary collapse
Methods inherited from Source
#[], from_api, #inspect, normalize_hash, #to_create_body, #to_h
Constructor Details
#initialize(name: nil, folder_ids: nil, file_ids: nil, auth_mode: nil, service_account_json: nil, oauth_credentials: nil, connection_id: nil, description: nil, metadata: nil, id: nil, **config) ⇒ GoogleDriveSource
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/vector_amp/source.rb', line 256 def initialize(name: nil, folder_ids: nil, file_ids: nil, auth_mode: nil, service_account_json: nil, oauth_credentials: nil, connection_id: nil, description: nil, metadata: nil, id: nil, **config) if Array(folder_ids).empty? && Array(file_ids).empty? raise ArgumentError, "folder_ids or file_ids is required" end super( id: id, source_type: "gdrive", name: name || SourceNames.google_drive(folder_ids: folder_ids, file_ids: file_ids), description: description, metadata: , config: Utils.compact_hash(config.merge( folder_ids: folder_ids, file_ids: file_ids, auth_mode: auth_mode, service_account_json: service_account_json, oauth_credentials: oauth_credentials, connection_id: connection_id )) ) end |