algolia 3.4.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +0 -7
  5. data/lib/algolia/api/analytics_client.rb +32 -88
  6. data/lib/algolia/api/ingestion_client.rb +2 -170
  7. data/lib/algolia/api/insights_client.rb +0 -22
  8. data/lib/algolia/api/monitoring_client.rb +11 -11
  9. data/lib/algolia/api/search_client.rb +19 -74
  10. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  11. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  12. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  13. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  14. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  15. data/lib/algolia/models/abtesting/variant.rb +0 -18
  16. data/lib/algolia/models/analytics/click_position.rb +0 -32
  17. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  18. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  19. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  20. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  21. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  23. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  24. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  25. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  26. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  27. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  28. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  29. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  30. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  31. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  32. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  33. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  34. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  35. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  36. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  37. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  38. data/lib/algolia/models/ingestion/event.rb +0 -14
  39. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  40. data/lib/algolia/models/ingestion/run.rb +0 -18
  41. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  42. data/lib/algolia/models/ingestion/task.rb +0 -18
  43. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  44. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  45. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  46. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  47. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  48. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  49. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  50. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  51. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  52. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  53. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  54. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  55. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  56. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  57. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  58. data/lib/algolia/models/insights/insights_events.rb +0 -18
  59. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  60. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  61. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  62. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  63. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  64. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  65. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  66. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  67. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  68. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  69. data/lib/algolia/models/recommend/banner.rb +218 -0
  70. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_response.rb → recommend/banner_image.rb} +31 -38
  71. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_with_index.rb → recommend/banner_image_url.rb} +23 -23
  72. data/lib/algolia/models/{query-suggestions/get_config_status200_response.rb → recommend/banner_link.rb} +13 -53
  73. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  74. data/lib/algolia/models/recommend/condition.rb +0 -15
  75. data/lib/algolia/models/recommend/consequence.rb +0 -28
  76. data/lib/algolia/models/recommend/fallback_params.rb +8 -100
  77. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  78. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  79. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  80. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  81. data/lib/algolia/models/recommend/recommend_hit.rb +0 -18
  82. data/lib/algolia/models/recommend/recommend_search_params.rb +8 -100
  83. data/lib/algolia/models/recommend/recommendations_results.rb +0 -61
  84. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  85. data/lib/algolia/models/recommend/related_query.rb +0 -36
  86. data/lib/algolia/models/recommend/rendering_content.rb +14 -5
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -50
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -18
  90. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
  91. data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
  92. data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
  93. data/lib/algolia/models/recommend/widgets.rb +212 -0
  94. data/lib/algolia/models/search/api_key.rb +1 -1
  95. data/lib/algolia/models/search/banner.rb +218 -0
  96. data/lib/algolia/models/{query-suggestions/get_log_file200_response.rb → search/banner_image.rb} +21 -61
  97. data/lib/algolia/models/search/banner_image_url.rb +212 -0
  98. data/lib/algolia/models/search/banner_link.rb +212 -0
  99. data/lib/algolia/models/search/browse_params_object.rb +4 -132
  100. data/lib/algolia/models/search/browse_response.rb +0 -61
  101. data/lib/algolia/models/search/condition.rb +0 -15
  102. data/lib/algolia/models/search/consequence.rb +0 -28
  103. data/lib/algolia/models/search/consequence_params.rb +4 -132
  104. data/lib/algolia/models/search/delete_by_params.rb +1 -1
  105. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  106. data/lib/algolia/models/search/index_settings.rb +7 -85
  107. data/lib/algolia/models/search/log.rb +0 -34
  108. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  109. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  110. data/lib/algolia/models/search/ranking_info.rb +0 -112
  111. data/lib/algolia/models/search/rendering_content.rb +14 -5
  112. data/lib/algolia/models/search/rule.rb +0 -18
  113. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  114. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -14
  115. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  116. data/lib/algolia/models/search/search_for_facets.rb +4 -132
  117. data/lib/algolia/models/search/search_for_hits.rb +4 -132
  118. data/lib/algolia/models/search/search_params_object.rb +4 -132
  119. data/lib/algolia/models/search/search_response.rb +0 -61
  120. data/lib/algolia/models/search/search_rules_params.rb +0 -32
  121. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  122. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  123. data/lib/algolia/models/search/search_user_ids_response.rb +0 -32
  124. data/lib/algolia/models/search/settings_response.rb +7 -85
  125. data/lib/algolia/models/search/typo_tolerance.rb +1 -1
  126. data/lib/algolia/models/search/user_hit.rb +0 -15
  127. data/lib/algolia/models/search/user_id.rb +0 -15
  128. data/lib/algolia/models/search/widgets.rb +212 -0
  129. data/lib/algolia/version.rb +1 -1
  130. metadata +12 -9
  131. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  132. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  133. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
@@ -129,111 +129,6 @@ module Algolia
129
129
  end
130
130
  end
131
131
 
132
- # Custom attribute writer method with validation
133
- # @param [Object] event_name Value to be assigned
134
- def event_name=(event_name)
135
- if event_name.nil?
136
- raise ArgumentError, "event_name cannot be nil"
137
- end
138
-
139
- if event_name.to_s.length > 64
140
- raise(
141
- ArgumentError,
142
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
143
- )
144
- end
145
-
146
- if event_name.to_s.length < 1
147
- raise(
148
- ArgumentError,
149
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
150
- )
151
- end
152
-
153
- pattern = /[\x20-\x7E]{1,64}/
154
- if event_name !~ pattern
155
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
156
- end
157
-
158
- @event_name = event_name
159
- end
160
-
161
- # Custom attribute writer method with validation
162
- # @param [Object] object_ids Value to be assigned
163
- def object_ids=(object_ids)
164
- if object_ids.nil?
165
- raise ArgumentError, "object_ids cannot be nil"
166
- end
167
-
168
- if object_ids.length > 20
169
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
170
- end
171
-
172
- if object_ids.length < 1
173
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
174
- end
175
-
176
- @object_ids = object_ids
177
- end
178
-
179
- # Custom attribute writer method with validation
180
- # @param [Object] user_token Value to be assigned
181
- def user_token=(user_token)
182
- if user_token.nil?
183
- raise ArgumentError, "user_token cannot be nil"
184
- end
185
-
186
- if user_token.to_s.length > 129
187
- raise(
188
- ArgumentError,
189
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
190
- )
191
- end
192
-
193
- if user_token.to_s.length < 1
194
- raise(
195
- ArgumentError,
196
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
197
- )
198
- end
199
-
200
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
201
- if user_token !~ pattern
202
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
203
- end
204
-
205
- @user_token = user_token
206
- end
207
-
208
- # Custom attribute writer method with validation
209
- # @param [Object] authenticated_user_token Value to be assigned
210
- def authenticated_user_token=(authenticated_user_token)
211
- if authenticated_user_token.nil?
212
- raise ArgumentError, "authenticated_user_token cannot be nil"
213
- end
214
-
215
- if authenticated_user_token.to_s.length > 129
216
- raise(
217
- ArgumentError,
218
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
219
- )
220
- end
221
-
222
- if authenticated_user_token.to_s.length < 1
223
- raise(
224
- ArgumentError,
225
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
226
- )
227
- end
228
-
229
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
230
- if authenticated_user_token !~ pattern
231
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
232
- end
233
-
234
- @authenticated_user_token = authenticated_user_token
235
- end
236
-
237
132
  # Checks equality by comparing each attribute.
238
133
  # @param [Object] Object to be compared
239
134
  def ==(other)
@@ -140,137 +140,6 @@ module Algolia
140
140
  end
141
141
  end
142
142
 
143
- # Custom attribute writer method with validation
144
- # @param [Object] event_name Value to be assigned
145
- def event_name=(event_name)
146
- if event_name.nil?
147
- raise ArgumentError, "event_name cannot be nil"
148
- end
149
-
150
- if event_name.to_s.length > 64
151
- raise(
152
- ArgumentError,
153
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
154
- )
155
- end
156
-
157
- if event_name.to_s.length < 1
158
- raise(
159
- ArgumentError,
160
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
161
- )
162
- end
163
-
164
- pattern = /[\x20-\x7E]{1,64}/
165
- if event_name !~ pattern
166
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
167
- end
168
-
169
- @event_name = event_name
170
- end
171
-
172
- # Custom attribute writer method with validation
173
- # @param [Object] object_ids Value to be assigned
174
- def object_ids=(object_ids)
175
- if object_ids.nil?
176
- raise ArgumentError, "object_ids cannot be nil"
177
- end
178
-
179
- if object_ids.length > 20
180
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
181
- end
182
-
183
- if object_ids.length < 1
184
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
185
- end
186
-
187
- @object_ids = object_ids
188
- end
189
-
190
- # Custom attribute writer method with validation
191
- # @param [Object] query_id Value to be assigned
192
- def query_id=(query_id)
193
- if query_id.nil?
194
- raise ArgumentError, "query_id cannot be nil"
195
- end
196
-
197
- if query_id.to_s.length > 32
198
- raise(
199
- ArgumentError,
200
- "invalid value for \"query_id\", the character length must be smaller than or equal to 32."
201
- )
202
- end
203
-
204
- if query_id.to_s.length < 32
205
- raise ArgumentError, "invalid value for \"query_id\", the character length must be great than or equal to 32."
206
- end
207
-
208
- pattern = /[0-9a-f]{32}/
209
- if query_id !~ pattern
210
- raise ArgumentError, "invalid value for \"query_id\", must conform to the pattern #{pattern}."
211
- end
212
-
213
- @query_id = query_id
214
- end
215
-
216
- # Custom attribute writer method with validation
217
- # @param [Object] user_token Value to be assigned
218
- def user_token=(user_token)
219
- if user_token.nil?
220
- raise ArgumentError, "user_token cannot be nil"
221
- end
222
-
223
- if user_token.to_s.length > 129
224
- raise(
225
- ArgumentError,
226
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
227
- )
228
- end
229
-
230
- if user_token.to_s.length < 1
231
- raise(
232
- ArgumentError,
233
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
234
- )
235
- end
236
-
237
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
238
- if user_token !~ pattern
239
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
240
- end
241
-
242
- @user_token = user_token
243
- end
244
-
245
- # Custom attribute writer method with validation
246
- # @param [Object] authenticated_user_token Value to be assigned
247
- def authenticated_user_token=(authenticated_user_token)
248
- if authenticated_user_token.nil?
249
- raise ArgumentError, "authenticated_user_token cannot be nil"
250
- end
251
-
252
- if authenticated_user_token.to_s.length > 129
253
- raise(
254
- ArgumentError,
255
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
256
- )
257
- end
258
-
259
- if authenticated_user_token.to_s.length < 1
260
- raise(
261
- ArgumentError,
262
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
263
- )
264
- end
265
-
266
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
267
- if authenticated_user_token !~ pattern
268
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
269
- end
270
-
271
- @authenticated_user_token = authenticated_user_token
272
- end
273
-
274
143
  # Checks equality by comparing each attribute.
275
144
  # @param [Object] Object to be compared
276
145
  def ==(other)
@@ -67,24 +67,6 @@ module Algolia
67
67
  end
68
68
  end
69
69
 
70
- # Custom attribute writer method with validation
71
- # @param [Object] events Value to be assigned
72
- def events=(events)
73
- if events.nil?
74
- raise ArgumentError, "events cannot be nil"
75
- end
76
-
77
- if events.length > 1000
78
- raise ArgumentError, "invalid value for \"events\", number of items must be less than or equal to 1000."
79
- end
80
-
81
- if events.length < 1
82
- raise ArgumentError, "invalid value for \"events\", number of items must be greater than or equal to 1."
83
- end
84
-
85
- @events = events
86
- end
87
-
88
70
  # Checks equality by comparing each attribute.
89
71
  # @param [Object] Object to be compared
90
72
  def ==(other)
@@ -88,32 +88,6 @@ module Algolia
88
88
  end
89
89
  end
90
90
 
91
- # Custom attribute writer method with validation
92
- # @param [Object] query_id Value to be assigned
93
- def query_id=(query_id)
94
- if query_id.nil?
95
- raise ArgumentError, "query_id cannot be nil"
96
- end
97
-
98
- if query_id.to_s.length > 32
99
- raise(
100
- ArgumentError,
101
- "invalid value for \"query_id\", the character length must be smaller than or equal to 32."
102
- )
103
- end
104
-
105
- if query_id.to_s.length < 32
106
- raise ArgumentError, "invalid value for \"query_id\", the character length must be great than or equal to 32."
107
- end
108
-
109
- pattern = /[0-9a-f]{32}/
110
- if query_id !~ pattern
111
- raise ArgumentError, "invalid value for \"query_id\", must conform to the pattern #{pattern}."
112
- end
113
-
114
- @query_id = query_id
115
- end
116
-
117
91
  # Checks equality by comparing each attribute.
118
92
  # @param [Object] Object to be compared
119
93
  def ==(other)
@@ -167,129 +167,6 @@ module Algolia
167
167
  end
168
168
  end
169
169
 
170
- # Custom attribute writer method with validation
171
- # @param [Object] event_name Value to be assigned
172
- def event_name=(event_name)
173
- if event_name.nil?
174
- raise ArgumentError, "event_name cannot be nil"
175
- end
176
-
177
- if event_name.to_s.length > 64
178
- raise(
179
- ArgumentError,
180
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
181
- )
182
- end
183
-
184
- if event_name.to_s.length < 1
185
- raise(
186
- ArgumentError,
187
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
188
- )
189
- end
190
-
191
- pattern = /[\x20-\x7E]{1,64}/
192
- if event_name !~ pattern
193
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
194
- end
195
-
196
- @event_name = event_name
197
- end
198
-
199
- # Custom attribute writer method with validation
200
- # @param [Object] object_ids Value to be assigned
201
- def object_ids=(object_ids)
202
- if object_ids.nil?
203
- raise ArgumentError, "object_ids cannot be nil"
204
- end
205
-
206
- if object_ids.length > 20
207
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
208
- end
209
-
210
- if object_ids.length < 1
211
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
212
- end
213
-
214
- @object_ids = object_ids
215
- end
216
-
217
- # Custom attribute writer method with validation
218
- # @param [Object] user_token Value to be assigned
219
- def user_token=(user_token)
220
- if user_token.nil?
221
- raise ArgumentError, "user_token cannot be nil"
222
- end
223
-
224
- if user_token.to_s.length > 129
225
- raise(
226
- ArgumentError,
227
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
228
- )
229
- end
230
-
231
- if user_token.to_s.length < 1
232
- raise(
233
- ArgumentError,
234
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
235
- )
236
- end
237
-
238
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
239
- if user_token !~ pattern
240
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
241
- end
242
-
243
- @user_token = user_token
244
- end
245
-
246
- # Custom attribute writer method with validation
247
- # @param [Object] authenticated_user_token Value to be assigned
248
- def authenticated_user_token=(authenticated_user_token)
249
- if authenticated_user_token.nil?
250
- raise ArgumentError, "authenticated_user_token cannot be nil"
251
- end
252
-
253
- if authenticated_user_token.to_s.length > 129
254
- raise(
255
- ArgumentError,
256
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
257
- )
258
- end
259
-
260
- if authenticated_user_token.to_s.length < 1
261
- raise(
262
- ArgumentError,
263
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
264
- )
265
- end
266
-
267
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
268
- if authenticated_user_token !~ pattern
269
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
270
- end
271
-
272
- @authenticated_user_token = authenticated_user_token
273
- end
274
-
275
- # Custom attribute writer method with validation
276
- # @param [Object] object_data Value to be assigned
277
- def object_data=(object_data)
278
- if object_data.nil?
279
- raise ArgumentError, "object_data cannot be nil"
280
- end
281
-
282
- if object_data.length > 20
283
- raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
284
- end
285
-
286
- if object_data.length < 1
287
- raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
288
- end
289
-
290
- @object_data = object_data
291
- end
292
-
293
170
  # Checks equality by comparing each attribute.
294
171
  # @param [Object] Object to be compared
295
172
  def ==(other)
@@ -169,129 +169,6 @@ module Algolia
169
169
  end
170
170
  end
171
171
 
172
- # Custom attribute writer method with validation
173
- # @param [Object] event_name Value to be assigned
174
- def event_name=(event_name)
175
- if event_name.nil?
176
- raise ArgumentError, "event_name cannot be nil"
177
- end
178
-
179
- if event_name.to_s.length > 64
180
- raise(
181
- ArgumentError,
182
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
183
- )
184
- end
185
-
186
- if event_name.to_s.length < 1
187
- raise(
188
- ArgumentError,
189
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
190
- )
191
- end
192
-
193
- pattern = /[\x20-\x7E]{1,64}/
194
- if event_name !~ pattern
195
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
196
- end
197
-
198
- @event_name = event_name
199
- end
200
-
201
- # Custom attribute writer method with validation
202
- # @param [Object] object_ids Value to be assigned
203
- def object_ids=(object_ids)
204
- if object_ids.nil?
205
- raise ArgumentError, "object_ids cannot be nil"
206
- end
207
-
208
- if object_ids.length > 20
209
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
210
- end
211
-
212
- if object_ids.length < 1
213
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
214
- end
215
-
216
- @object_ids = object_ids
217
- end
218
-
219
- # Custom attribute writer method with validation
220
- # @param [Object] user_token Value to be assigned
221
- def user_token=(user_token)
222
- if user_token.nil?
223
- raise ArgumentError, "user_token cannot be nil"
224
- end
225
-
226
- if user_token.to_s.length > 129
227
- raise(
228
- ArgumentError,
229
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
230
- )
231
- end
232
-
233
- if user_token.to_s.length < 1
234
- raise(
235
- ArgumentError,
236
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
237
- )
238
- end
239
-
240
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
241
- if user_token !~ pattern
242
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
243
- end
244
-
245
- @user_token = user_token
246
- end
247
-
248
- # Custom attribute writer method with validation
249
- # @param [Object] authenticated_user_token Value to be assigned
250
- def authenticated_user_token=(authenticated_user_token)
251
- if authenticated_user_token.nil?
252
- raise ArgumentError, "authenticated_user_token cannot be nil"
253
- end
254
-
255
- if authenticated_user_token.to_s.length > 129
256
- raise(
257
- ArgumentError,
258
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
259
- )
260
- end
261
-
262
- if authenticated_user_token.to_s.length < 1
263
- raise(
264
- ArgumentError,
265
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
266
- )
267
- end
268
-
269
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
270
- if authenticated_user_token !~ pattern
271
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
272
- end
273
-
274
- @authenticated_user_token = authenticated_user_token
275
- end
276
-
277
- # Custom attribute writer method with validation
278
- # @param [Object] object_data Value to be assigned
279
- def object_data=(object_data)
280
- if object_data.nil?
281
- raise ArgumentError, "object_data cannot be nil"
282
- end
283
-
284
- if object_data.length > 20
285
- raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
286
- end
287
-
288
- if object_data.length < 1
289
- raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
290
- end
291
-
292
- @object_data = object_data
293
- end
294
-
295
172
  # Checks equality by comparing each attribute.
296
173
  # @param [Object] Object to be compared
297
174
  def ==(other)
@@ -129,111 +129,6 @@ module Algolia
129
129
  end
130
130
  end
131
131
 
132
- # Custom attribute writer method with validation
133
- # @param [Object] event_name Value to be assigned
134
- def event_name=(event_name)
135
- if event_name.nil?
136
- raise ArgumentError, "event_name cannot be nil"
137
- end
138
-
139
- if event_name.to_s.length > 64
140
- raise(
141
- ArgumentError,
142
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
143
- )
144
- end
145
-
146
- if event_name.to_s.length < 1
147
- raise(
148
- ArgumentError,
149
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
150
- )
151
- end
152
-
153
- pattern = /[\x20-\x7E]{1,64}/
154
- if event_name !~ pattern
155
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
156
- end
157
-
158
- @event_name = event_name
159
- end
160
-
161
- # Custom attribute writer method with validation
162
- # @param [Object] filters Value to be assigned
163
- def filters=(filters)
164
- if filters.nil?
165
- raise ArgumentError, "filters cannot be nil"
166
- end
167
-
168
- if filters.length > 20
169
- raise ArgumentError, "invalid value for \"filters\", number of items must be less than or equal to 20."
170
- end
171
-
172
- if filters.length < 1
173
- raise ArgumentError, "invalid value for \"filters\", number of items must be greater than or equal to 1."
174
- end
175
-
176
- @filters = filters
177
- end
178
-
179
- # Custom attribute writer method with validation
180
- # @param [Object] user_token Value to be assigned
181
- def user_token=(user_token)
182
- if user_token.nil?
183
- raise ArgumentError, "user_token cannot be nil"
184
- end
185
-
186
- if user_token.to_s.length > 129
187
- raise(
188
- ArgumentError,
189
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
190
- )
191
- end
192
-
193
- if user_token.to_s.length < 1
194
- raise(
195
- ArgumentError,
196
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
197
- )
198
- end
199
-
200
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
201
- if user_token !~ pattern
202
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
203
- end
204
-
205
- @user_token = user_token
206
- end
207
-
208
- # Custom attribute writer method with validation
209
- # @param [Object] authenticated_user_token Value to be assigned
210
- def authenticated_user_token=(authenticated_user_token)
211
- if authenticated_user_token.nil?
212
- raise ArgumentError, "authenticated_user_token cannot be nil"
213
- end
214
-
215
- if authenticated_user_token.to_s.length > 129
216
- raise(
217
- ArgumentError,
218
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
219
- )
220
- end
221
-
222
- if authenticated_user_token.to_s.length < 1
223
- raise(
224
- ArgumentError,
225
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
226
- )
227
- end
228
-
229
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
230
- if authenticated_user_token !~ pattern
231
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
232
- end
233
-
234
- @authenticated_user_token = authenticated_user_token
235
- end
236
-
237
132
  # Checks equality by comparing each attribute.
238
133
  # @param [Object] Object to be compared
239
134
  def ==(other)