Class: Files::AiTask

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/ai_task.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ AiTask

Returns a new instance of AiTask.



7
8
9
10
# File 'lib/files.com/models/ai_task.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/ai_task.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/ai_task.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



297
298
299
# File 'lib/files.com/models/ai_task.rb', line 297

def self.all(params = {}, options = {})
  list(params, options)
end

.create(params = {}, options = {}) ⇒ Object

Parameters:

description - string - AI Task description.
disabled - boolean - If true, this AI Task will not run.
holiday_region - string - Optional holiday region used by scheduled AI Tasks.
interval - string - If trigger is `daily`, this specifies how often to run the AI Task.
name (required) - string - AI Task name.
path - string - Path scope used for action-triggered AI Tasks.
permission_set - string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
prompt (required) - string - Prompt sent when this AI Task is invoked.
recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
schedule_time_zone - string - Time zone used by the AI Task schedule.
schedule_times_of_day - array(string) - Times of day in HH:MM format for scheduled AI Tasks.
source - string - Source glob used with `path` for action-triggered AI Tasks.
trigger - string - How this AI Task is triggered.
trigger_actions - array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
workspace_id - int64 - Workspace ID. `0` means the default workspace.


334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/files.com/models/ai_task.rb', line 334

def self.create(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: prompt must be an String") if params[:prompt] and !params[:prompt].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: source must be an String") if params[:source] and !params[:source].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params[:trigger_actions] and !params[:trigger_actions].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: name") unless params[:name]
  raise MissingParameterError.new("Parameter missing: prompt") unless params[:prompt]

  response, options = Api.send_request("/ai_tasks", :post, params, options)
  AiTask.new(response.data, options)
end

.delete(id, params = {}, options = {}) ⇒ Object



410
411
412
413
414
415
416
417
418
# File 'lib/files.com/models/ai_task.rb', line 410

def self.delete(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  Api.send_request("/ai_tasks/#{params[:id]}", :delete, params, options)
  nil
end

.destroy(id, params = {}, options = {}) ⇒ Object



420
421
422
423
# File 'lib/files.com/models/ai_task.rb', line 420

def self.destroy(id, params = {}, options = {})
  delete(id, params, options)
  nil
end

.find(id, params = {}, options = {}) ⇒ Object

Parameters:

id (required) - int64 - Ai Task ID.


303
304
305
306
307
308
309
310
311
# File 'lib/files.com/models/ai_task.rb', line 303

def self.find(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  response, options = Api.send_request("/ai_tasks/#{params[:id]}", :get, params, options)
  AiTask.new(response.data, options)
end

.get(id, params = {}, options = {}) ⇒ Object



313
314
315
# File 'lib/files.com/models/ai_task.rb', line 313

def self.get(id, params = {}, options = {})
  find(id, params, options)
end

.list(params = {}, options = {}) ⇒ Object

Parameters:

cursor - string - Used for pagination.  When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`.  Send one of those cursor value here to resume an existing list from the next available record.  Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page.  (Max: 10000, 1,000 or less is recommended).
sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `id`, `disabled` or `updated_at`.
filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `trigger` or `workspace_id`. Valid field combinations are `[ workspace_id, disabled ]`.


286
287
288
289
290
291
292
293
294
295
# File 'lib/files.com/models/ai_task.rb', line 286

def self.list(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)

  List.new(AiTask, params) do
    Api.send_request("/ai_tasks", :get, params, options)
  end
end

.manual_run(id, params = {}, options = {}) ⇒ Object

Manually Run AI Task



358
359
360
361
362
363
364
365
366
# File 'lib/files.com/models/ai_task.rb', line 358

def self.manual_run(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  Api.send_request("/ai_tasks/#{params[:id]}/manual_run", :post, params, options)
  nil
end

.update(id, params = {}, options = {}) ⇒ Object

Parameters:

description - string - AI Task description.
disabled - boolean - If true, this AI Task will not run.
holiday_region - string - Optional holiday region used by scheduled AI Tasks.
interval - string - If trigger is `daily`, this specifies how often to run the AI Task.
name - string - AI Task name.
path - string - Path scope used for action-triggered AI Tasks.
permission_set - string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
prompt - string - Prompt sent when this AI Task is invoked.
recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
schedule_time_zone - string - Time zone used by the AI Task schedule.
schedule_times_of_day - array(string) - Times of day in HH:MM format for scheduled AI Tasks.
source - string - Source glob used with `path` for action-triggered AI Tasks.
trigger - string - How this AI Task is triggered.
trigger_actions - array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
workspace_id - int64 - Workspace ID. `0` means the default workspace.


385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/files.com/models/ai_task.rb', line 385

def self.update(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: prompt must be an String") if params[:prompt] and !params[:prompt].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: source must be an String") if params[:source] and !params[:source].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params[:trigger_actions] and !params[:trigger_actions].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  response, options = Api.send_request("/ai_tasks/#{params[:id]}", :patch, params, options)
  AiTask.new(response.data, options)
end

Instance Method Details

#created_atObject

date-time - Creation time.



193
194
195
# File 'lib/files.com/models/ai_task.rb', line 193

def created_at
  @attributes[:created_at]
end

#delete(params = {}) ⇒ Object



255
256
257
258
259
260
261
262
263
# File 'lib/files.com/models/ai_task.rb', line 255

def delete(params = {})
  params ||= {}
  params[:id] = @attributes[:id]
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  Api.send_request("/ai_tasks/#{@attributes[:id]}", :delete, params, @options)
end

#descriptionObject

string - AI Task description.



40
41
42
# File 'lib/files.com/models/ai_task.rb', line 40

def description
  @attributes[:description]
end

#description=(value) ⇒ Object



44
45
46
# File 'lib/files.com/models/ai_task.rb', line 44

def description=(value)
  @attributes[:description] = value
end

#destroy(params = {}) ⇒ Object



265
266
267
268
# File 'lib/files.com/models/ai_task.rb', line 265

def destroy(params = {})
  delete(params)
  nil
end

#disabledObject

boolean - If true, this AI Task will not run.



85
86
87
# File 'lib/files.com/models/ai_task.rb', line 85

def disabled
  @attributes[:disabled]
end

#disabled=(value) ⇒ Object



89
90
91
# File 'lib/files.com/models/ai_task.rb', line 89

def disabled=(value)
  @attributes[:disabled] = value
end

#holiday_regionObject

string - Optional holiday region used by scheduled AI Tasks.



157
158
159
# File 'lib/files.com/models/ai_task.rb', line 157

def holiday_region
  @attributes[:holiday_region]
end

#holiday_region=(value) ⇒ Object



161
162
163
# File 'lib/files.com/models/ai_task.rb', line 161

def holiday_region=(value)
  @attributes[:holiday_region] = value
end

#human_readable_scheduleObject

string - Human-readable schedule description.



166
167
168
# File 'lib/files.com/models/ai_task.rb', line 166

def human_readable_schedule
  @attributes[:human_readable_schedule]
end

#human_readable_schedule=(value) ⇒ Object



170
171
172
# File 'lib/files.com/models/ai_task.rb', line 170

def human_readable_schedule=(value)
  @attributes[:human_readable_schedule] = value
end

#idObject

int64 - AI Task ID.



13
14
15
# File 'lib/files.com/models/ai_task.rb', line 13

def id
  @attributes[:id]
end

#id=(value) ⇒ Object



17
18
19
# File 'lib/files.com/models/ai_task.rb', line 17

def id=(value)
  @attributes[:id] = value
end

#intervalObject

string - If trigger is daily, this specifies how often to run the AI Task.



112
113
114
# File 'lib/files.com/models/ai_task.rb', line 112

def interval
  @attributes[:interval]
end

#interval=(value) ⇒ Object



116
117
118
# File 'lib/files.com/models/ai_task.rb', line 116

def interval=(value)
  @attributes[:interval] = value
end

#last_run_atObject

date-time - Most recent successful invocation time.



175
176
177
# File 'lib/files.com/models/ai_task.rb', line 175

def last_run_at
  @attributes[:last_run_at]
end

#last_run_at=(value) ⇒ Object



179
180
181
# File 'lib/files.com/models/ai_task.rb', line 179

def last_run_at=(value)
  @attributes[:last_run_at] = value
end

#manual_run(params = {}) ⇒ Object

Manually Run AI Task



203
204
205
206
207
208
209
210
211
# File 'lib/files.com/models/ai_task.rb', line 203

def manual_run(params = {})
  params ||= {}
  params[:id] = @attributes[:id]
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  Api.send_request("/ai_tasks/#{@attributes[:id]}/manual_run", :post, params, @options)
end

#master_admin_user_idObject

int64 - Master User ID used for AI Task invocations.



184
185
186
# File 'lib/files.com/models/ai_task.rb', line 184

def master_admin_user_id
  @attributes[:master_admin_user_id]
end

#master_admin_user_id=(value) ⇒ Object



188
189
190
# File 'lib/files.com/models/ai_task.rb', line 188

def master_admin_user_id=(value)
  @attributes[:master_admin_user_id] = value
end

#nameObject

string - AI Task name.



31
32
33
# File 'lib/files.com/models/ai_task.rb', line 31

def name
  @attributes[:name]
end

#name=(value) ⇒ Object



35
36
37
# File 'lib/files.com/models/ai_task.rb', line 35

def name=(value)
  @attributes[:name] = value
end

#pathObject

string - Path scope used for action-triggered AI Tasks. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.



67
68
69
# File 'lib/files.com/models/ai_task.rb', line 67

def path
  @attributes[:path]
end

#path=(value) ⇒ Object



71
72
73
# File 'lib/files.com/models/ai_task.rb', line 71

def path=(value)
  @attributes[:path] = value
end

#permission_setObject

string - Permissions used by the internal API key for this AI Task. Valid values are full and files_only.



58
59
60
# File 'lib/files.com/models/ai_task.rb', line 58

def permission_set
  @attributes[:permission_set]
end

#permission_set=(value) ⇒ Object



62
63
64
# File 'lib/files.com/models/ai_task.rb', line 62

def permission_set=(value)
  @attributes[:permission_set] = value
end

#promptObject

string - Prompt sent when this AI Task is invoked.



49
50
51
# File 'lib/files.com/models/ai_task.rb', line 49

def prompt
  @attributes[:prompt]
end

#prompt=(value) ⇒ Object



53
54
55
# File 'lib/files.com/models/ai_task.rb', line 53

def prompt=(value)
  @attributes[:prompt] = value
end

#recurring_dayObject

int64 - If trigger is daily, this selects the day number inside the chosen interval.



121
122
123
# File 'lib/files.com/models/ai_task.rb', line 121

def recurring_day
  @attributes[:recurring_day]
end

#recurring_day=(value) ⇒ Object



125
126
127
# File 'lib/files.com/models/ai_task.rb', line 125

def recurring_day=(value)
  @attributes[:recurring_day] = value
end

#saveObject



270
271
272
273
274
275
276
277
278
279
# File 'lib/files.com/models/ai_task.rb', line 270

def save
  if @attributes[:id]
    new_obj = update(@attributes)
  else
    new_obj = AiTask.create(@attributes, @options)
  end

  @attributes = new_obj.attributes
  true
end

#schedule_days_of_weekObject

array(int64) - If trigger is custom_schedule, the 0-based weekdays used by the schedule.



130
131
132
# File 'lib/files.com/models/ai_task.rb', line 130

def schedule_days_of_week
  @attributes[:schedule_days_of_week]
end

#schedule_days_of_week=(value) ⇒ Object



134
135
136
# File 'lib/files.com/models/ai_task.rb', line 134

def schedule_days_of_week=(value)
  @attributes[:schedule_days_of_week] = value
end

#schedule_time_zoneObject

string - Time zone used by the AI Task schedule.



148
149
150
# File 'lib/files.com/models/ai_task.rb', line 148

def schedule_time_zone
  @attributes[:schedule_time_zone]
end

#schedule_time_zone=(value) ⇒ Object



152
153
154
# File 'lib/files.com/models/ai_task.rb', line 152

def schedule_time_zone=(value)
  @attributes[:schedule_time_zone] = value
end

#schedule_times_of_dayObject

array(string) - Times of day in HH:MM format for scheduled AI Tasks.



139
140
141
# File 'lib/files.com/models/ai_task.rb', line 139

def schedule_times_of_day
  @attributes[:schedule_times_of_day]
end

#schedule_times_of_day=(value) ⇒ Object



143
144
145
# File 'lib/files.com/models/ai_task.rb', line 143

def schedule_times_of_day=(value)
  @attributes[:schedule_times_of_day] = value
end

#sourceObject

string - Source glob used with path for action-triggered AI Tasks.



76
77
78
# File 'lib/files.com/models/ai_task.rb', line 76

def source
  @attributes[:source]
end

#source=(value) ⇒ Object



80
81
82
# File 'lib/files.com/models/ai_task.rb', line 80

def source=(value)
  @attributes[:source] = value
end

#triggerObject

string - How this AI Task is triggered.



94
95
96
# File 'lib/files.com/models/ai_task.rb', line 94

def trigger
  @attributes[:trigger]
end

#trigger=(value) ⇒ Object



98
99
100
# File 'lib/files.com/models/ai_task.rb', line 98

def trigger=(value)
  @attributes[:trigger] = value
end

#trigger_actionsObject

array(string) - If trigger is action, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.



103
104
105
# File 'lib/files.com/models/ai_task.rb', line 103

def trigger_actions
  @attributes[:trigger_actions]
end

#trigger_actions=(value) ⇒ Object



107
108
109
# File 'lib/files.com/models/ai_task.rb', line 107

def trigger_actions=(value)
  @attributes[:trigger_actions] = value
end

#update(params = {}) ⇒ Object

Parameters:

description - string - AI Task description.
disabled - boolean - If true, this AI Task will not run.
holiday_region - string - Optional holiday region used by scheduled AI Tasks.
interval - string - If trigger is `daily`, this specifies how often to run the AI Task.
name - string - AI Task name.
path - string - Path scope used for action-triggered AI Tasks.
permission_set - string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
prompt - string - Prompt sent when this AI Task is invoked.
recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
schedule_time_zone - string - Time zone used by the AI Task schedule.
schedule_times_of_day - array(string) - Times of day in HH:MM format for scheduled AI Tasks.
source - string - Source glob used with `path` for action-triggered AI Tasks.
trigger - string - How this AI Task is triggered.
trigger_actions - array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
workspace_id - int64 - Workspace ID. `0` means the default workspace.


230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/files.com/models/ai_task.rb', line 230

def update(params = {})
  params ||= {}
  params[:id] = @attributes[:id]
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: prompt must be an String") if params[:prompt] and !params[:prompt].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: source must be an String") if params[:source] and !params[:source].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params[:trigger_actions] and !params[:trigger_actions].is_a?(Array)
  raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

  Api.send_request("/ai_tasks/#{@attributes[:id]}", :patch, params, @options)
end

#updated_atObject

date-time - Last update time.



198
199
200
# File 'lib/files.com/models/ai_task.rb', line 198

def updated_at
  @attributes[:updated_at]
end

#workspace_idObject

int64 - Workspace ID. 0 means the default workspace.



22
23
24
# File 'lib/files.com/models/ai_task.rb', line 22

def workspace_id
  @attributes[:workspace_id]
end

#workspace_id=(value) ⇒ Object



26
27
28
# File 'lib/files.com/models/ai_task.rb', line 26

def workspace_id=(value)
  @attributes[:workspace_id] = value
end