lib/algolia/models/ingestion/task_create.rb in algolia-3.0.0.beta.10 vs lib/algolia/models/ingestion/task_create.rb in algolia-3.0.0.beta.11
- old
+ new
@@ -11,14 +11,15 @@
attr_accessor :source_id
# Universally unique identifier (UUID) of a destination resource.
attr_accessor :destination_id
- attr_accessor :trigger
-
attr_accessor :action
+ # Cron expression for the task's schedule.
+ attr_accessor :cron
+
# Whether the task is enabled.
attr_accessor :enabled
# Maximum accepted percentage of failures for a task run to finish successfully.
attr_accessor :failure_threshold
@@ -53,12 +54,12 @@
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:source_id => :sourceID,
:destination_id => :destinationID,
- :trigger => :trigger,
:action => :action,
+ :cron => :cron,
:enabled => :enabled,
:failure_threshold => :failureThreshold,
:input => :input,
:cursor => :cursor
}
@@ -72,12 +73,12 @@
# Attribute type mapping.
def self.types_mapping
{
:source_id => :"String",
:destination_id => :"String",
- :trigger => :"TaskCreateTrigger",
:action => :"ActionType",
+ :cron => :"String",
:enabled => :"Boolean",
:failure_threshold => :"Integer",
:input => :"TaskInput",
:cursor => :"String"
}
@@ -123,22 +124,20 @@
self.destination_id = attributes[:destination_id]
else
self.destination_id = nil
end
- if attributes.key?(:trigger)
- self.trigger = attributes[:trigger]
- else
- self.trigger = nil
- end
-
if attributes.key?(:action)
self.action = attributes[:action]
else
self.action = nil
end
+ if attributes.key?(:cron)
+ self.cron = attributes[:cron]
+ end
+
if attributes.key?(:enabled)
self.enabled = attributes[:enabled]
end
if attributes.key?(:failure_threshold)
@@ -177,12 +176,12 @@
def ==(other)
return true if self.equal?(other)
self.class == other.class &&
source_id == other.source_id &&
destination_id == other.destination_id &&
- trigger == other.trigger &&
action == other.action &&
+ cron == other.cron &&
enabled == other.enabled &&
failure_threshold == other.failure_threshold &&
input == other.input &&
cursor == other.cursor
end
@@ -194,10 +193,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [source_id, destination_id, trigger, action, enabled, failure_threshold, input, cursor].hash
+ [source_id, destination_id, action, cron, enabled, failure_threshold, input, cursor].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself