Skip to content

Commit a9f046c

Browse files
feat(specs): add subscriptionAction to ingestion specs (generated)
algolia/api-clients-automation#4587 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 0dbafaa commit a9f046c

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

lib/algolia/models/ingestion/task.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class Task
3636

3737
attr_accessor :action
3838

39+
attr_accessor :subscription_action
40+
3941
# Date of the last cursor in RFC 3339 format.
4042
attr_accessor :cursor
4143

@@ -62,6 +64,7 @@ def self.attribute_map
6264
:enabled => :enabled,
6365
:failure_threshold => :failureThreshold,
6466
:action => :action,
67+
:subscription_action => :subscriptionAction,
6568
:cursor => :cursor,
6669
:notifications => :notifications,
6770
:policies => :policies,
@@ -83,6 +86,7 @@ def self.types_mapping
8386
:enabled => :"Boolean",
8487
:failure_threshold => :"Integer",
8588
:action => :"ActionType",
89+
:subscription_action => :"ActionType",
8690
:cursor => :"String",
8791
:notifications => :"Notifications",
8892
:policies => :"Policies",
@@ -166,6 +170,10 @@ def initialize(attributes = {})
166170
self.action = attributes[:action]
167171
end
168172

173+
if attributes.key?(:subscription_action)
174+
self.subscription_action = attributes[:subscription_action]
175+
end
176+
169177
if attributes.key?(:cursor)
170178
self.cursor = attributes[:cursor]
171179
end
@@ -204,6 +212,7 @@ def ==(other)
204212
enabled == other.enabled &&
205213
failure_threshold == other.failure_threshold &&
206214
action == other.action &&
215+
subscription_action == other.subscription_action &&
207216
cursor == other.cursor &&
208217
notifications == other.notifications &&
209218
policies == other.policies &&
@@ -231,6 +240,7 @@ def hash
231240
enabled,
232241
failure_threshold,
233242
action,
243+
subscription_action,
234244
cursor,
235245
notifications,
236246
policies,

lib/algolia/models/ingestion/task_create.rb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class TaskCreate
1717

1818
attr_accessor :action
1919

20+
attr_accessor :subscription_action
21+
2022
# Cron expression for the task's schedule.
2123
attr_accessor :cron
2224

@@ -41,6 +43,7 @@ def self.attribute_map
4143
:source_id => :sourceID,
4244
:destination_id => :destinationID,
4345
:action => :action,
46+
:subscription_action => :subscriptionAction,
4447
:cron => :cron,
4548
:enabled => :enabled,
4649
:failure_threshold => :failureThreshold,
@@ -57,6 +60,7 @@ def self.types_mapping
5760
:source_id => :"String",
5861
:destination_id => :"String",
5962
:action => :"ActionType",
63+
:subscription_action => :"ActionType",
6064
:cron => :"String",
6165
:enabled => :"Boolean",
6266
:failure_threshold => :"Integer",
@@ -115,6 +119,10 @@ def initialize(attributes = {})
115119
self.action = nil
116120
end
117121

122+
if attributes.key?(:subscription_action)
123+
self.subscription_action = attributes[:subscription_action]
124+
end
125+
118126
if attributes.key?(:cron)
119127
self.cron = attributes[:cron]
120128
end
@@ -152,6 +160,7 @@ def ==(other)
152160
source_id == other.source_id &&
153161
destination_id == other.destination_id &&
154162
action == other.action &&
163+
subscription_action == other.subscription_action &&
155164
cron == other.cron &&
156165
enabled == other.enabled &&
157166
failure_threshold == other.failure_threshold &&
@@ -170,7 +179,19 @@ def eql?(other)
170179
# Calculates hash code according to all attributes.
171180
# @return [Integer] Hash code
172181
def hash
173-
[source_id, destination_id, action, cron, enabled, failure_threshold, input, cursor, notifications, policies].hash
182+
[
183+
source_id,
184+
destination_id,
185+
action,
186+
subscription_action,
187+
cron,
188+
enabled,
189+
failure_threshold,
190+
input,
191+
cursor,
192+
notifications,
193+
policies
194+
].hash
174195
end
175196

176197
# Builds the object from hash

lib/algolia/models/ingestion/task_update.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class TaskUpdate
2020
# Whether the task is enabled.
2121
attr_accessor :enabled
2222

23+
attr_accessor :subscription_action
24+
2325
# Maximum accepted percentage of failures for a task run to finish successfully.
2426
attr_accessor :failure_threshold
2527

@@ -34,6 +36,7 @@ def self.attribute_map
3436
:cron => :cron,
3537
:input => :input,
3638
:enabled => :enabled,
39+
:subscription_action => :subscriptionAction,
3740
:failure_threshold => :failureThreshold,
3841
:notifications => :notifications,
3942
:policies => :policies
@@ -47,6 +50,7 @@ def self.types_mapping
4750
:cron => :"String",
4851
:input => :"TaskInput",
4952
:enabled => :"Boolean",
53+
:subscription_action => :"ActionType",
5054
:failure_threshold => :"Integer",
5155
:notifications => :"Notifications",
5256
:policies => :"Policies"
@@ -99,6 +103,10 @@ def initialize(attributes = {})
99103
self.enabled = attributes[:enabled]
100104
end
101105

106+
if attributes.key?(:subscription_action)
107+
self.subscription_action = attributes[:subscription_action]
108+
end
109+
102110
if attributes.key?(:failure_threshold)
103111
self.failure_threshold = attributes[:failure_threshold]
104112
end
@@ -121,6 +129,7 @@ def ==(other)
121129
cron == other.cron &&
122130
input == other.input &&
123131
enabled == other.enabled &&
132+
subscription_action == other.subscription_action &&
124133
failure_threshold == other.failure_threshold &&
125134
notifications == other.notifications &&
126135
policies == other.policies
@@ -135,7 +144,7 @@ def eql?(other)
135144
# Calculates hash code according to all attributes.
136145
# @return [Integer] Hash code
137146
def hash
138-
[destination_id, cron, input, enabled, failure_threshold, notifications, policies].hash
147+
[destination_id, cron, input, enabled, subscription_action, failure_threshold, notifications, policies].hash
139148
end
140149

141150
# Builds the object from hash

0 commit comments

Comments
 (0)