Class: Kaltura::KalturaVirusScanProfileService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb

Overview

Virus scan profile service

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaVirusScanProfileService

Returns a new instance of KalturaVirusScanProfileService.



284
285
286
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 284

def initialize(client)
	super(client)
end

Instance Method Details

#add(virus_scan_profile) ⇒ KalturaVirusScanProfile

Allows you to add an virus scan profile object and virus scan profile content associated with Kaltura object



290
291
292
293
294
295
296
297
298
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 290

def add(virus_scan_profile)
	kparams = {}
	client.add_param(kparams, 'virusScanProfile', virus_scan_profile)
	client.queue_service_action_call('virusscan_virusscanprofile', 'add', 'KalturaVirusScanProfile', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(virus_scan_profile_id) ⇒ KalturaVirusScanProfile

Mark the virus scan profile as deleted



302
303
304
305
306
307
308
309
310
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 302

def delete(virus_scan_profile_id)
	kparams = {}
	client.add_param(kparams, 'virusScanProfileId', virus_scan_profile_id)
	client.queue_service_action_call('virusscan_virusscanprofile', 'delete', 'KalturaVirusScanProfile', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(virus_scan_profile_id) ⇒ KalturaVirusScanProfile

Retrieve an virus scan profile object by id



314
315
316
317
318
319
320
321
322
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 314

def get(virus_scan_profile_id)
	kparams = {}
	client.add_param(kparams, 'virusScanProfileId', virus_scan_profile_id)
	client.queue_service_action_call('virusscan_virusscanprofile', 'get', 'KalturaVirusScanProfile', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaVirusScanProfileListResponse

List virus scan profile objects by filter and pager



326
327
328
329
330
331
332
333
334
335
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 326

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('virusscan_virusscanprofile', 'list', 'KalturaVirusScanProfileListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#scan(flavor_asset_id, virus_scan_profile_id = KalturaNotImplemented) ⇒ int

Scan flavor asset according to virus scan profile

Returns:

  • (int)


339
340
341
342
343
344
345
346
347
348
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 339

def scan(flavor_asset_id, virus_scan_profile_id=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'flavorAssetId', flavor_asset_id)
	client.add_param(kparams, 'virusScanProfileId', virus_scan_profile_id)
	client.queue_service_action_call('virusscan_virusscanprofile', 'scan', 'int', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(virus_scan_profile_id, virus_scan_profile) ⇒ KalturaVirusScanProfile

Update existing virus scan profile, it is possible to update the virus scan profile id too



352
353
354
355
356
357
358
359
360
361
# File 'lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb', line 352

def update(virus_scan_profile_id, virus_scan_profile)
	kparams = {}
	client.add_param(kparams, 'virusScanProfileId', virus_scan_profile_id)
	client.add_param(kparams, 'virusScanProfile', virus_scan_profile)
	client.queue_service_action_call('virusscan_virusscanprofile', 'update', 'KalturaVirusScanProfile', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end