lib/algolia/models/ingestion/task.rb in algolia-3.0.0.beta.10 vs lib/algolia/models/ingestion/task.rb in algolia-3.0.0.beta.11

- old
+ new

@@ -13,12 +13,19 @@ attr_accessor :source_id # Universally unique identifier (UUID) of a destination resource. attr_accessor :destination_id - attr_accessor :trigger + # Cron expression for the task's schedule. + attr_accessor :cron + # The last time the scheduled task ran in RFC 3339 format. + attr_accessor :last_run + + # The next scheduled run of the task in RFC 3339 format. + attr_accessor :next_run + attr_accessor :input # Whether the task is enabled. attr_accessor :enabled @@ -62,11 +69,13 @@ def self.attribute_map { :task_id => :taskID, :source_id => :sourceID, :destination_id => :destinationID, - :trigger => :trigger, + :cron => :cron, + :last_run => :lastRun, + :next_run => :nextRun, :input => :input, :enabled => :enabled, :failure_threshold => :failureThreshold, :action => :action, :cursor => :cursor, @@ -84,11 +93,13 @@ def self.types_mapping { :task_id => :"String", :source_id => :"String", :destination_id => :"String", - :trigger => :"Trigger", + :cron => :"String", + :last_run => :"String", + :next_run => :"String", :input => :"TaskInput", :enabled => :"Boolean", :failure_threshold => :"Integer", :action => :"ActionType", :cursor => :"String", @@ -140,16 +151,22 @@ self.destination_id = attributes[:destination_id] else self.destination_id = nil end - if attributes.key?(:trigger) - self.trigger = attributes[:trigger] - else - self.trigger = nil + if attributes.key?(:cron) + self.cron = attributes[:cron] end + if attributes.key?(:last_run) + self.last_run = attributes[:last_run] + end + + if attributes.key?(:next_run) + self.next_run = attributes[:next_run] + end + if attributes.key?(:input) self.input = attributes[:input] end if attributes.key?(:enabled) @@ -207,11 +224,13 @@ return true if self.equal?(other) self.class == other.class && task_id == other.task_id && source_id == other.source_id && destination_id == other.destination_id && - trigger == other.trigger && + cron == other.cron && + last_run == other.last_run && + next_run == other.next_run && input == other.input && enabled == other.enabled && failure_threshold == other.failure_threshold && action == other.action && cursor == other.cursor && @@ -230,10 +249,12 @@ def hash [ task_id, source_id, destination_id, - trigger, + cron, + last_run, + next_run, input, enabled, failure_threshold, action, cursor,