kaltura-client 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/README +21 -0
  3. data/Rakefile +19 -0
  4. data/agpl.txt +674 -0
  5. data/kaltura.yml +7 -0
  6. data/lib/kaltura.rb +31 -0
  7. data/lib/kaltura_client.rb +15649 -0
  8. data/lib/kaltura_client_base.rb +432 -0
  9. data/lib/kaltura_plugins/kaltura_abc_screeners_watermark_access_control_client_plugin.rb +37 -0
  10. data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +110 -0
  11. data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +239 -0
  12. data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +61 -0
  13. data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +227 -0
  14. data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +349 -0
  15. data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +116 -0
  16. data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +55 -0
  17. data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +58 -0
  18. data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +40 -0
  19. data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +406 -0
  20. data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +138 -0
  21. data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +99 -0
  22. data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +1725 -0
  23. data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +312 -0
  24. data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +522 -0
  25. data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +401 -0
  26. data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +827 -0
  27. data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +39 -0
  28. data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +273 -0
  29. data/lib/kaltura_plugins/kaltura_event_cue_point_client_plugin.rb +67 -0
  30. data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +415 -0
  31. data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +203 -0
  32. data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +157 -0
  33. data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +309 -0
  34. data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +72 -0
  35. data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +82 -0
  36. data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +785 -0
  37. data/lib/kaltura_plugins/kaltura_multi_centers_client_plugin.rb +45 -0
  38. data/lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb +347 -0
  39. data/lib/kaltura_plugins/kaltura_scheduled_task_client_plugin.rb +347 -0
  40. data/lib/kaltura_plugins/kaltura_scheduled_task_event_notification_client_plugin.rb +45 -0
  41. data/lib/kaltura_plugins/kaltura_scheduled_task_metadata_client_plugin.rb +51 -0
  42. data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +231 -0
  43. data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +145 -0
  44. data/lib/kaltura_plugins/kaltura_thumb_cue_point_client_plugin.rb +105 -0
  45. data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +238 -0
  46. data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +40 -0
  47. data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +263 -0
  48. data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +111 -0
  49. data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +195 -0
  50. data/test/access_control_service_test.rb +75 -0
  51. data/test/base_entry_service_test.rb +267 -0
  52. data/test/configuration_test.rb +178 -0
  53. data/test/cue_point_service_test.rb +67 -0
  54. data/test/data_service_test.rb +76 -0
  55. data/test/document_service_test.rb +41 -0
  56. data/test/media/test.mov +0 -0
  57. data/test/media/test.pdf +0 -0
  58. data/test/media/test.png +0 -0
  59. data/test/media/test.swf +0 -0
  60. data/test/media/test.wmv +0 -0
  61. data/test/media_service_test.rb +294 -0
  62. data/test/metadata_profile_service_test.rb +63 -0
  63. data/test/test_helper.rb +59 -0
  64. metadata +132 -0
@@ -0,0 +1,45 @@
1
+ # ===================================================================================================
2
+ # _ __ _ _
3
+ # | |/ /__ _| | |_ _ _ _ _ __ _
4
+ # | ' </ _` | | _| || | '_/ _` |
5
+ # |_|\_\__,_|_|\__|\_,_|_| \__,_|
6
+ #
7
+ # This file is part of the Kaltura Collaborative Media Suite which allows users
8
+ # to do with audio, video, and animation what Wiki platfroms allow them to do with
9
+ # text.
10
+ #
11
+ # Copyright (C) 2006-2011 Kaltura Inc.
12
+ #
13
+ # This program is free software: you can redistribute it and/or modify
14
+ # it under the terms of the GNU Affero General Public License as
15
+ # published by the Free Software Foundation, either version 3 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # This program is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ # GNU Affero General Public License for more details.
22
+ #
23
+ # You should have received a copy of the GNU Affero General Public License
24
+ # along with this program. If not, see <http:#www.gnu.org/licenses/>.
25
+ #
26
+ # @ignore
27
+ # ===================================================================================================
28
+ require 'kaltura_client.rb'
29
+
30
+ module Kaltura
31
+
32
+ class KalturaFileSyncImportJobData < KalturaJobData
33
+ attr_accessor :source_url
34
+ attr_accessor :filesync_id
35
+ attr_accessor :tmp_file_path
36
+ attr_accessor :dest_file_path
37
+ attr_accessor :file_size
38
+
39
+ def file_size=(val)
40
+ @file_size = val.to_i
41
+ end
42
+ end
43
+
44
+
45
+ end
@@ -0,0 +1,347 @@
1
+ # ===================================================================================================
2
+ # _ __ _ _
3
+ # | |/ /__ _| | |_ _ _ _ _ __ _
4
+ # | ' </ _` | | _| || | '_/ _` |
5
+ # |_|\_\__,_|_|\__|\_,_|_| \__,_|
6
+ #
7
+ # This file is part of the Kaltura Collaborative Media Suite which allows users
8
+ # to do with audio, video, and animation what Wiki platfroms allow them to do with
9
+ # text.
10
+ #
11
+ # Copyright (C) 2006-2011 Kaltura Inc.
12
+ #
13
+ # This program is free software: you can redistribute it and/or modify
14
+ # it under the terms of the GNU Affero General Public License as
15
+ # published by the Free Software Foundation, either version 3 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # This program is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ # GNU Affero General Public License for more details.
22
+ #
23
+ # You should have received a copy of the GNU Affero General Public License
24
+ # along with this program. If not, see <http:#www.gnu.org/licenses/>.
25
+ #
26
+ # @ignore
27
+ # ===================================================================================================
28
+ require 'kaltura_client.rb'
29
+ require File.dirname(__FILE__) + '/kaltura_drm_client_plugin.rb'
30
+
31
+ module Kaltura
32
+
33
+ class KalturaPlayReadyAnalogVideoOPL
34
+ MIN_100 = 100
35
+ MIN_150 = 150
36
+ MIN_200 = 200
37
+ end
38
+
39
+ class KalturaPlayReadyCompressedDigitalVideoOPL
40
+ MIN_400 = 400
41
+ MIN_500 = 500
42
+ end
43
+
44
+ class KalturaPlayReadyDigitalAudioOPL
45
+ MIN_100 = 100
46
+ MIN_150 = 150
47
+ MIN_200 = 200
48
+ MIN_250 = 250
49
+ MIN_300 = 300
50
+ end
51
+
52
+ class KalturaPlayReadyLicenseRemovalPolicy
53
+ FIXED_FROM_EXPIRATION = 1
54
+ ENTRY_SCHEDULING_END = 2
55
+ NONE = 3
56
+ end
57
+
58
+ class KalturaPlayReadyMinimumLicenseSecurityLevel
59
+ NON_COMMERCIAL_QUALITY = 150
60
+ COMMERCIAL_QUALITY = 2000
61
+ end
62
+
63
+ class KalturaPlayReadyUncompressedDigitalVideoOPL
64
+ MIN_100 = 100
65
+ MIN_250 = 250
66
+ MIN_270 = 270
67
+ MIN_300 = 300
68
+ end
69
+
70
+ class KalturaPlayReadyAnalogVideoOPId
71
+ EXPLICIT_ANALOG_TV = "2098DE8D-7DDD-4BAB-96C6-32EBB6FABEA3"
72
+ BEST_EFFORT_EXPLICIT_ANALOG_TV = "225CD36F-F132-49EF-BA8C-C91EA28E4369"
73
+ IMAGE_CONSTRAINT_VIDEO = "811C5110-46C8-4C6E-8163-C0482A15D47E"
74
+ AGC_AND_COLOR_STRIPE = "C3FD11C6-F8B7-4D20-B008-1DB17D61F2DA"
75
+ IMAGE_CONSTRAINT_MONITOR = "D783A191-E083-4BAF-B2DA-E69F910B3772"
76
+ end
77
+
78
+ class KalturaPlayReadyCopyEnablerType
79
+ CSS = "3CAF2814-A7AB-467C-B4DF-54ACC56C66DC"
80
+ PRINTER = "3CF2E054-F4D5-46cd-85A6-FCD152AD5FBE"
81
+ DEVICE = "6848955D-516B-4EB0-90E8-8F6D5A77B85F"
82
+ CLIPBOARD = "6E76C588-C3A9-47ea-A875-546D5209FF38"
83
+ SDC = "79F78A0D-0B69-401e-8A90-8BEF30BCE192"
84
+ SDC_PREVIEW = "81BD9AD4-A720-4ea1-B510-5D4E6FFB6A4D"
85
+ AACS = "C3CF56E0-7FF2-4491-809F-53E21D3ABF07"
86
+ HELIX = "CCB0B4E3-8B46-409e-A998-82556E3F5AF4"
87
+ CPRM = "CDD801AD-A577-48DB-950E-46D5F1592FAE"
88
+ PC = "CE480EDE-516B-40B3-90E1-D6CFC47630C5"
89
+ SDC_LIMITED = "E6785609-64CC-4bfa-B82D-6B619733B746"
90
+ ORANGE_BOOK_CD = "EC930B7D-1F2D-4682-A38B-8AB977721D0D"
91
+ end
92
+
93
+ class KalturaPlayReadyDigitalAudioOPId
94
+ SCMS = "6D5CFA59-C250-4426-930E-FAC72C8FCFA6"
95
+ end
96
+
97
+ class KalturaPlayReadyPlayEnablerType
98
+ HELIX = "002F9772-38A0-43E5-9F79-0F6361DCC62A"
99
+ HDCP_WIVU = "1B4542E3-B5CF-4C99-B3BA-829AF46C92F8"
100
+ AIRPLAY = "5ABF0F0D-DC29-4B82-9982-FD8E57525BFC"
101
+ UNKNOWN = "786627D8-C2A6-44BE-8F88-08AE255B01A"
102
+ HDCP_MIRACAST = "A340C256-0941-4D4C-AD1D-0B6735C0CB24"
103
+ UNKNOWN_520 = "B621D91F-EDCC-4035-8D4B-DC71760D43E9"
104
+ DTCP = "D685030B-0F4F-43A6-BBAD-356F1EA0049A"
105
+ end
106
+
107
+ class KalturaPlayReadyPolicyOrderBy
108
+ end
109
+
110
+ class KalturaPlayReadyProfileOrderBy
111
+ ID_ASC = "+id"
112
+ NAME_ASC = "+name"
113
+ ID_DESC = "-id"
114
+ NAME_DESC = "-name"
115
+ end
116
+
117
+ class KalturaPlayReadyAnalogVideoOPIdHolder < KalturaObjectBase
118
+ # The type of the play enabler
119
+ #
120
+ attr_accessor :type
121
+
122
+ end
123
+
124
+ class KalturaPlayReadyContentKey < KalturaObjectBase
125
+ # Guid - key id of the specific content
126
+ #
127
+ attr_accessor :key_id
128
+ # License content key 64 bit encoded
129
+ #
130
+ attr_accessor :content_key
131
+
132
+ end
133
+
134
+ class KalturaPlayReadyCopyEnablerHolder < KalturaObjectBase
135
+ # The type of the copy enabler
136
+ #
137
+ attr_accessor :type
138
+
139
+ end
140
+
141
+ class KalturaPlayReadyDigitalAudioOPIdHolder < KalturaObjectBase
142
+ # The type of the play enabler
143
+ #
144
+ attr_accessor :type
145
+
146
+ end
147
+
148
+ class KalturaPlayReadyRight < KalturaObjectBase
149
+
150
+ end
151
+
152
+ class KalturaPlayReadyPolicy < KalturaDrmPolicy
153
+ attr_accessor :grace_period
154
+ attr_accessor :license_removal_policy
155
+ attr_accessor :license_removal_duration
156
+ attr_accessor :min_security_level
157
+ attr_accessor :rights
158
+
159
+ def grace_period=(val)
160
+ @grace_period = val.to_i
161
+ end
162
+ def license_removal_policy=(val)
163
+ @license_removal_policy = val.to_i
164
+ end
165
+ def license_removal_duration=(val)
166
+ @license_removal_duration = val.to_i
167
+ end
168
+ def min_security_level=(val)
169
+ @min_security_level = val.to_i
170
+ end
171
+ end
172
+
173
+ class KalturaPlayReadyLicenseDetails < KalturaObjectBase
174
+ # PlayReady policy object
175
+ #
176
+ attr_accessor :policy
177
+ # License begin date
178
+ #
179
+ attr_accessor :begin_date
180
+ # License expiration date
181
+ #
182
+ attr_accessor :expiration_date
183
+ # License removal date
184
+ #
185
+ attr_accessor :removal_date
186
+
187
+ def begin_date=(val)
188
+ @begin_date = val.to_i
189
+ end
190
+ def expiration_date=(val)
191
+ @expiration_date = val.to_i
192
+ end
193
+ def removal_date=(val)
194
+ @removal_date = val.to_i
195
+ end
196
+ end
197
+
198
+ class KalturaPlayReadyPlayEnablerHolder < KalturaObjectBase
199
+ # The type of the play enabler
200
+ #
201
+ attr_accessor :type
202
+
203
+ end
204
+
205
+ class KalturaAccessControlPlayReadyPolicyAction < KalturaRuleAction
206
+ # Play ready policy id
207
+ #
208
+ attr_accessor :policy_id
209
+
210
+ def policy_id=(val)
211
+ @policy_id = val.to_i
212
+ end
213
+ end
214
+
215
+ class KalturaPlayReadyCopyRight < KalturaPlayReadyRight
216
+ attr_accessor :copy_count
217
+ attr_accessor :copy_enablers
218
+
219
+ def copy_count=(val)
220
+ @copy_count = val.to_i
221
+ end
222
+ end
223
+
224
+ class KalturaPlayReadyPlayRight < KalturaPlayReadyRight
225
+ attr_accessor :analog_video_opl
226
+ attr_accessor :analog_video_output_protection_list
227
+ attr_accessor :compressed_digital_audio_opl
228
+ attr_accessor :compressed_digital_video_opl
229
+ attr_accessor :digital_audio_output_protection_list
230
+ attr_accessor :uncompressed_digital_audio_opl
231
+ attr_accessor :uncompressed_digital_video_opl
232
+ attr_accessor :first_play_expiration
233
+ attr_accessor :play_enablers
234
+
235
+ def analog_video_opl=(val)
236
+ @analog_video_opl = val.to_i
237
+ end
238
+ def compressed_digital_audio_opl=(val)
239
+ @compressed_digital_audio_opl = val.to_i
240
+ end
241
+ def compressed_digital_video_opl=(val)
242
+ @compressed_digital_video_opl = val.to_i
243
+ end
244
+ def uncompressed_digital_audio_opl=(val)
245
+ @uncompressed_digital_audio_opl = val.to_i
246
+ end
247
+ def uncompressed_digital_video_opl=(val)
248
+ @uncompressed_digital_video_opl = val.to_i
249
+ end
250
+ def first_play_expiration=(val)
251
+ @first_play_expiration = val.to_i
252
+ end
253
+ end
254
+
255
+ class KalturaPlayReadyProfile < KalturaDrmProfile
256
+ attr_accessor :key_seed
257
+
258
+ end
259
+
260
+ class KalturaPlayReadyPolicyBaseFilter < KalturaDrmPolicyFilter
261
+
262
+ end
263
+
264
+ class KalturaPlayReadyProfileBaseFilter < KalturaDrmProfileFilter
265
+
266
+ end
267
+
268
+ class KalturaPlayReadyPolicyFilter < KalturaPlayReadyPolicyBaseFilter
269
+
270
+ end
271
+
272
+ class KalturaPlayReadyProfileFilter < KalturaPlayReadyProfileBaseFilter
273
+
274
+ end
275
+
276
+
277
+ class KalturaPlayReadyDrmService < KalturaServiceBase
278
+ def initialize(client)
279
+ super(client)
280
+ end
281
+
282
+ # Generate key id and content key for PlayReady encryption
283
+ #
284
+ def generate_key()
285
+ kparams = {}
286
+ client.queue_service_action_call('playready_playreadydrm', 'generateKey', kparams);
287
+ if (client.is_multirequest)
288
+ return nil;
289
+ end
290
+ return client.do_queue();
291
+ end
292
+
293
+ # Get content keys for input key ids
294
+ #
295
+ def get_content_keys(key_ids)
296
+ kparams = {}
297
+ # - comma separated key id's
298
+ client.add_param(kparams, 'keyIds', key_ids);
299
+ client.queue_service_action_call('playready_playreadydrm', 'getContentKeys', kparams);
300
+ if (client.is_multirequest)
301
+ return nil;
302
+ end
303
+ return client.do_queue();
304
+ end
305
+
306
+ # Get content key and key id for the given entry
307
+ #
308
+ def get_entry_content_key(entry_id, create_if_missing=false)
309
+ kparams = {}
310
+ client.add_param(kparams, 'entryId', entry_id);
311
+ client.add_param(kparams, 'createIfMissing', create_if_missing);
312
+ client.queue_service_action_call('playready_playreadydrm', 'getEntryContentKey', kparams);
313
+ if (client.is_multirequest)
314
+ return nil;
315
+ end
316
+ return client.do_queue();
317
+ end
318
+
319
+ # Get Play Ready policy and dates for license creation
320
+ #
321
+ def get_license_details(key_id, device_id, device_type, entry_id=KalturaNotImplemented, referrer=KalturaNotImplemented)
322
+ kparams = {}
323
+ client.add_param(kparams, 'keyId', key_id);
324
+ client.add_param(kparams, 'deviceId', device_id);
325
+ client.add_param(kparams, 'deviceType', device_type);
326
+ client.add_param(kparams, 'entryId', entry_id);
327
+ # 64base encoded
328
+ client.add_param(kparams, 'referrer', referrer);
329
+ client.queue_service_action_call('playready_playreadydrm', 'getLicenseDetails', kparams);
330
+ if (client.is_multirequest)
331
+ return nil;
332
+ end
333
+ return client.do_queue();
334
+ end
335
+ end
336
+
337
+ class KalturaClient < KalturaClientBase
338
+ attr_reader :play_ready_drm_service
339
+ def play_ready_drm_service
340
+ if (@play_ready_drm_service == nil)
341
+ @play_ready_drm_service = KalturaPlayReadyDrmService.new(self)
342
+ end
343
+ return @play_ready_drm_service
344
+ end
345
+ end
346
+
347
+ end
@@ -0,0 +1,347 @@
1
+ # ===================================================================================================
2
+ # _ __ _ _
3
+ # | |/ /__ _| | |_ _ _ _ _ __ _
4
+ # | ' </ _` | | _| || | '_/ _` |
5
+ # |_|\_\__,_|_|\__|\_,_|_| \__,_|
6
+ #
7
+ # This file is part of the Kaltura Collaborative Media Suite which allows users
8
+ # to do with audio, video, and animation what Wiki platfroms allow them to do with
9
+ # text.
10
+ #
11
+ # Copyright (C) 2006-2011 Kaltura Inc.
12
+ #
13
+ # This program is free software: you can redistribute it and/or modify
14
+ # it under the terms of the GNU Affero General Public License as
15
+ # published by the Free Software Foundation, either version 3 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # This program is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ # GNU Affero General Public License for more details.
22
+ #
23
+ # You should have received a copy of the GNU Affero General Public License
24
+ # along with this program. If not, see <http:#www.gnu.org/licenses/>.
25
+ #
26
+ # @ignore
27
+ # ===================================================================================================
28
+ require 'kaltura_client.rb'
29
+
30
+ module Kaltura
31
+
32
+ class KalturaDeleteFlavorsLogicType
33
+ KEEP_LIST_DELETE_OTHERS = 1
34
+ DELETE_LIST = 2
35
+ DELETE_KEEP_SMALLEST = 3
36
+ end
37
+
38
+ class KalturaScheduledTaskAddOrRemoveType
39
+ ADD = 1
40
+ REMOVE = 2
41
+ end
42
+
43
+ class KalturaScheduledTaskProfileStatus
44
+ DISABLED = 1
45
+ ACTIVE = 2
46
+ DELETED = 3
47
+ SUSPENDED = 4
48
+ DRY_RUN_ONLY = 5
49
+ end
50
+
51
+ class KalturaObjectFilterEngineType
52
+ ENTRY = "1"
53
+ end
54
+
55
+ class KalturaObjectTaskType
56
+ DISPATCH_EVENT_NOTIFICATION = "scheduledTaskEventNotification.DispatchEventNotification"
57
+ EXECUTE_METADATA_XSLT = "scheduledTaskMetadata.ExecuteMetadataXslt"
58
+ DELETE_ENTRY = "1"
59
+ MODIFY_CATEGORIES = "2"
60
+ DELETE_ENTRY_FLAVORS = "3"
61
+ CONVERT_ENTRY_FLAVORS = "4"
62
+ DELETE_LOCAL_CONTENT = "5"
63
+ end
64
+
65
+ class KalturaScheduledTaskProfileOrderBy
66
+ CREATED_AT_ASC = "+createdAt"
67
+ ID_ASC = "+id"
68
+ LAST_EXECUTION_STARTED_AT_ASC = "+lastExecutionStartedAt"
69
+ UPDATED_AT_ASC = "+updatedAt"
70
+ CREATED_AT_DESC = "-createdAt"
71
+ ID_DESC = "-id"
72
+ LAST_EXECUTION_STARTED_AT_DESC = "-lastExecutionStartedAt"
73
+ UPDATED_AT_DESC = "-updatedAt"
74
+ end
75
+
76
+ class KalturaObjectTask < KalturaObjectBase
77
+ attr_accessor :type
78
+
79
+ end
80
+
81
+ class KalturaScheduledTaskProfile < KalturaObjectBase
82
+ attr_accessor :id
83
+ attr_accessor :partner_id
84
+ attr_accessor :name
85
+ attr_accessor :system_name
86
+ attr_accessor :description
87
+ attr_accessor :status
88
+ # The type of engine to use to list objects using the given "objectFilter"
89
+ #
90
+ attr_accessor :object_filter_engine_type
91
+ # A filter object (inherits KalturaFilter) that is used to list objects for scheduled tasks
92
+ #
93
+ attr_accessor :object_filter
94
+ # A list of tasks to execute on the founded objects
95
+ #
96
+ attr_accessor :object_tasks
97
+ attr_accessor :created_at
98
+ attr_accessor :updated_at
99
+ attr_accessor :last_execution_started_at
100
+ # The maximum number of result count allowed to be processed by this profile per execution
101
+ #
102
+ attr_accessor :max_total_count_allowed
103
+
104
+ def id=(val)
105
+ @id = val.to_i
106
+ end
107
+ def partner_id=(val)
108
+ @partner_id = val.to_i
109
+ end
110
+ def status=(val)
111
+ @status = val.to_i
112
+ end
113
+ def created_at=(val)
114
+ @created_at = val.to_i
115
+ end
116
+ def updated_at=(val)
117
+ @updated_at = val.to_i
118
+ end
119
+ def last_execution_started_at=(val)
120
+ @last_execution_started_at = val.to_i
121
+ end
122
+ def max_total_count_allowed=(val)
123
+ @max_total_count_allowed = val.to_i
124
+ end
125
+ end
126
+
127
+ class KalturaScheduledTaskProfileListResponse < KalturaObjectBase
128
+ attr_accessor :objects
129
+ attr_accessor :total_count
130
+
131
+ def total_count=(val)
132
+ @total_count = val.to_i
133
+ end
134
+ end
135
+
136
+ class KalturaConvertEntryFlavorsObjectTask < KalturaObjectTask
137
+ # Comma separated list of flavor param ids to convert
138
+ #
139
+ attr_accessor :flavor_params_ids
140
+ # Should reconvert when flavor already exists?
141
+ #
142
+ attr_accessor :reconvert
143
+
144
+ def reconvert=(val)
145
+ @reconvert = to_b(val)
146
+ end
147
+ end
148
+
149
+ class KalturaDeleteEntryFlavorsObjectTask < KalturaObjectTask
150
+ # The logic to use to choose the flavors for deletion
151
+ #
152
+ attr_accessor :delete_type
153
+ # Comma separated list of flavor param ids to delete or keep
154
+ #
155
+ attr_accessor :flavor_params_ids
156
+
157
+ def delete_type=(val)
158
+ @delete_type = val.to_i
159
+ end
160
+ end
161
+
162
+ class KalturaDeleteEntryObjectTask < KalturaObjectTask
163
+
164
+ end
165
+
166
+ class KalturaDeleteLocalContentObjectTask < KalturaObjectTask
167
+
168
+ end
169
+
170
+ class KalturaModifyCategoriesObjectTask < KalturaObjectTask
171
+ # Should the object task add or remove categories?
172
+ #
173
+ attr_accessor :add_remove_type
174
+ # The list of category ids to add or remove
175
+ #
176
+ attr_accessor :category_ids
177
+
178
+ def add_remove_type=(val)
179
+ @add_remove_type = val.to_i
180
+ end
181
+ end
182
+
183
+ class KalturaScheduledTaskJobData < KalturaJobData
184
+ attr_accessor :max_results
185
+ attr_accessor :results_file_path
186
+ attr_accessor :reference_time
187
+
188
+ def max_results=(val)
189
+ @max_results = val.to_i
190
+ end
191
+ def reference_time=(val)
192
+ @reference_time = val.to_i
193
+ end
194
+ end
195
+
196
+ class KalturaScheduledTaskProfileBaseFilter < KalturaFilter
197
+ attr_accessor :id_equal
198
+ attr_accessor :id_in
199
+ attr_accessor :partner_id_equal
200
+ attr_accessor :partner_id_in
201
+ attr_accessor :system_name_equal
202
+ attr_accessor :system_name_in
203
+ attr_accessor :status_equal
204
+ attr_accessor :status_in
205
+ attr_accessor :created_at_greater_than_or_equal
206
+ attr_accessor :created_at_less_than_or_equal
207
+ attr_accessor :updated_at_greater_than_or_equal
208
+ attr_accessor :updated_at_less_than_or_equal
209
+ attr_accessor :last_execution_started_at_greater_than_or_equal
210
+ attr_accessor :last_execution_started_at_less_than_or_equal
211
+
212
+ def id_equal=(val)
213
+ @id_equal = val.to_i
214
+ end
215
+ def partner_id_equal=(val)
216
+ @partner_id_equal = val.to_i
217
+ end
218
+ def status_equal=(val)
219
+ @status_equal = val.to_i
220
+ end
221
+ def created_at_greater_than_or_equal=(val)
222
+ @created_at_greater_than_or_equal = val.to_i
223
+ end
224
+ def created_at_less_than_or_equal=(val)
225
+ @created_at_less_than_or_equal = val.to_i
226
+ end
227
+ def updated_at_greater_than_or_equal=(val)
228
+ @updated_at_greater_than_or_equal = val.to_i
229
+ end
230
+ def updated_at_less_than_or_equal=(val)
231
+ @updated_at_less_than_or_equal = val.to_i
232
+ end
233
+ def last_execution_started_at_greater_than_or_equal=(val)
234
+ @last_execution_started_at_greater_than_or_equal = val.to_i
235
+ end
236
+ def last_execution_started_at_less_than_or_equal=(val)
237
+ @last_execution_started_at_less_than_or_equal = val.to_i
238
+ end
239
+ end
240
+
241
+ class KalturaScheduledTaskProfileFilter < KalturaScheduledTaskProfileBaseFilter
242
+
243
+ end
244
+
245
+
246
+ # Schedule task service lets you create and manage scheduled task profiles
247
+ #
248
+ class KalturaScheduledTaskProfileService < KalturaServiceBase
249
+ def initialize(client)
250
+ super(client)
251
+ end
252
+
253
+ # Add a new scheduled task profile
254
+ #
255
+ def add(scheduled_task_profile)
256
+ kparams = {}
257
+ client.add_param(kparams, 'scheduledTaskProfile', scheduled_task_profile);
258
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'add', kparams);
259
+ if (client.is_multirequest)
260
+ return nil;
261
+ end
262
+ return client.do_queue();
263
+ end
264
+
265
+ # Retrieve a scheduled task profile by id
266
+ #
267
+ def get(id)
268
+ kparams = {}
269
+ client.add_param(kparams, 'id', id);
270
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'get', kparams);
271
+ if (client.is_multirequest)
272
+ return nil;
273
+ end
274
+ return client.do_queue();
275
+ end
276
+
277
+ # Update an existing scheduled task profile
278
+ #
279
+ def update(id, scheduled_task_profile)
280
+ kparams = {}
281
+ client.add_param(kparams, 'id', id);
282
+ client.add_param(kparams, 'scheduledTaskProfile', scheduled_task_profile);
283
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'update', kparams);
284
+ if (client.is_multirequest)
285
+ return nil;
286
+ end
287
+ return client.do_queue();
288
+ end
289
+
290
+ # Delete a scheduled task profile
291
+ #
292
+ def delete(id)
293
+ kparams = {}
294
+ client.add_param(kparams, 'id', id);
295
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'delete', kparams);
296
+ if (client.is_multirequest)
297
+ return nil;
298
+ end
299
+ return client.do_queue();
300
+ end
301
+
302
+ # List scheduled task profiles
303
+ #
304
+ def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
305
+ kparams = {}
306
+ client.add_param(kparams, 'filter', filter);
307
+ client.add_param(kparams, 'pager', pager);
308
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'list', kparams);
309
+ if (client.is_multirequest)
310
+ return nil;
311
+ end
312
+ return client.do_queue();
313
+ end
314
+
315
+ def request_dry_run(scheduled_task_profile_id, max_results=500)
316
+ kparams = {}
317
+ client.add_param(kparams, 'scheduledTaskProfileId', scheduled_task_profile_id);
318
+ client.add_param(kparams, 'maxResults', max_results);
319
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'requestDryRun', kparams);
320
+ if (client.is_multirequest)
321
+ return nil;
322
+ end
323
+ return client.do_queue();
324
+ end
325
+
326
+ def get_dry_run_results(request_id)
327
+ kparams = {}
328
+ client.add_param(kparams, 'requestId', request_id);
329
+ client.queue_service_action_call('scheduledtask_scheduledtaskprofile', 'getDryRunResults', kparams);
330
+ if (client.is_multirequest)
331
+ return nil;
332
+ end
333
+ return client.do_queue();
334
+ end
335
+ end
336
+
337
+ class KalturaClient < KalturaClientBase
338
+ attr_reader :scheduled_task_profile_service
339
+ def scheduled_task_profile_service
340
+ if (@scheduled_task_profile_service == nil)
341
+ @scheduled_task_profile_service = KalturaScheduledTaskProfileService.new(self)
342
+ end
343
+ return @scheduled_task_profile_service
344
+ end
345
+ end
346
+
347
+ end