algolia 3.38.0 → 3.39.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,10 +123,18 @@ module Algolia
123
123
  if @api_client.config.client_side_validation && index_name.nil?
124
124
  raise ArgumentError, "Parameter `index_name` is required when calling `add_or_update_object`."
125
125
  end
126
+ # verify the required parameter 'index_name' is not empty
127
+ if @api_client.config.client_side_validation && index_name.empty?
128
+ raise ArgumentError, "Parameter `index_name` is required when calling `add_or_update_object`."
129
+ end
126
130
  # verify the required parameter 'algolia_object_id' is set
127
131
  if @api_client.config.client_side_validation && algolia_object_id.nil?
128
132
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `add_or_update_object`."
129
133
  end
134
+ # verify the required parameter 'algolia_object_id' is not empty
135
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
136
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `add_or_update_object`."
137
+ end
130
138
  # verify the required parameter 'body' is set
131
139
  if @api_client.config.client_side_validation && body.nil?
132
140
  raise ArgumentError, "Parameter `body` is required when calling `add_or_update_object`."
@@ -229,6 +237,10 @@ module Algolia
229
237
  if @api_client.config.client_side_validation && x_algolia_user_id.nil?
230
238
  raise ArgumentError, "Parameter `x_algolia_user_id` is required when calling `assign_user_id`."
231
239
  end
240
+ # verify the required parameter 'x_algolia_user_id' is not empty
241
+ if @api_client.config.client_side_validation && x_algolia_user_id.empty?
242
+ raise ArgumentError, "Parameter `x_algolia_user_id` is required when calling `assign_user_id`."
243
+ end
232
244
  # verify the required parameter 'assign_user_id_params' is set
233
245
  if @api_client.config.client_side_validation && assign_user_id_params.nil?
234
246
  raise ArgumentError, "Parameter `assign_user_id_params` is required when calling `assign_user_id`."
@@ -280,6 +292,10 @@ module Algolia
280
292
  if @api_client.config.client_side_validation && index_name.nil?
281
293
  raise ArgumentError, "Parameter `index_name` is required when calling `batch`."
282
294
  end
295
+ # verify the required parameter 'index_name' is not empty
296
+ if @api_client.config.client_side_validation && index_name.empty?
297
+ raise ArgumentError, "Parameter `index_name` is required when calling `batch`."
298
+ end
283
299
  # verify the required parameter 'batch_write_params' is set
284
300
  if @api_client.config.client_side_validation && batch_write_params.nil?
285
301
  raise ArgumentError, "Parameter `batch_write_params` is required when calling `batch`."
@@ -331,6 +347,10 @@ module Algolia
331
347
  if @api_client.config.client_side_validation && x_algolia_user_id.nil?
332
348
  raise ArgumentError, "Parameter `x_algolia_user_id` is required when calling `batch_assign_user_ids`."
333
349
  end
350
+ # verify the required parameter 'x_algolia_user_id' is not empty
351
+ if @api_client.config.client_side_validation && x_algolia_user_id.empty?
352
+ raise ArgumentError, "Parameter `x_algolia_user_id` is required when calling `batch_assign_user_ids`."
353
+ end
334
354
  # verify the required parameter 'batch_assign_user_ids_params' is set
335
355
  if @api_client.config.client_side_validation && batch_assign_user_ids_params.nil?
336
356
  raise(
@@ -445,6 +465,10 @@ module Algolia
445
465
  if @api_client.config.client_side_validation && index_name.nil?
446
466
  raise ArgumentError, "Parameter `index_name` is required when calling `browse`."
447
467
  end
468
+ # verify the required parameter 'index_name' is not empty
469
+ if @api_client.config.client_side_validation && index_name.empty?
470
+ raise ArgumentError, "Parameter `index_name` is required when calling `browse`."
471
+ end
448
472
 
449
473
  path = "/1/indexes/{indexName}/browse".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
450
474
  query_params = {}
@@ -490,6 +514,10 @@ module Algolia
490
514
  if @api_client.config.client_side_validation && index_name.nil?
491
515
  raise ArgumentError, "Parameter `index_name` is required when calling `clear_objects`."
492
516
  end
517
+ # verify the required parameter 'index_name' is not empty
518
+ if @api_client.config.client_side_validation && index_name.empty?
519
+ raise ArgumentError, "Parameter `index_name` is required when calling `clear_objects`."
520
+ end
493
521
 
494
522
  path = "/1/indexes/{indexName}/clear".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
495
523
  query_params = {}
@@ -535,6 +563,10 @@ module Algolia
535
563
  if @api_client.config.client_side_validation && index_name.nil?
536
564
  raise ArgumentError, "Parameter `index_name` is required when calling `clear_rules`."
537
565
  end
566
+ # verify the required parameter 'index_name' is not empty
567
+ if @api_client.config.client_side_validation && index_name.empty?
568
+ raise ArgumentError, "Parameter `index_name` is required when calling `clear_rules`."
569
+ end
538
570
 
539
571
  path = "/1/indexes/{indexName}/rules/clear".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
540
572
  query_params = {}
@@ -582,6 +614,10 @@ module Algolia
582
614
  if @api_client.config.client_side_validation && index_name.nil?
583
615
  raise ArgumentError, "Parameter `index_name` is required when calling `clear_synonyms`."
584
616
  end
617
+ # verify the required parameter 'index_name' is not empty
618
+ if @api_client.config.client_side_validation && index_name.empty?
619
+ raise ArgumentError, "Parameter `index_name` is required when calling `clear_synonyms`."
620
+ end
585
621
 
586
622
  path = "/1/indexes/{indexName}/synonyms/clear".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
587
623
  query_params = {}
@@ -627,6 +663,10 @@ module Algolia
627
663
  if @api_client.config.client_side_validation && path.nil?
628
664
  raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
629
665
  end
666
+ # verify the required parameter 'path' is not empty
667
+ if @api_client.config.client_side_validation && path.empty?
668
+ raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
669
+ end
630
670
 
631
671
  path = "/{path}".sub("{" + "path" + "}", path.to_s)
632
672
  query_params = {}
@@ -670,6 +710,10 @@ module Algolia
670
710
  if @api_client.config.client_side_validation && path.nil?
671
711
  raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
672
712
  end
713
+ # verify the required parameter 'path' is not empty
714
+ if @api_client.config.client_side_validation && path.empty?
715
+ raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
716
+ end
673
717
 
674
718
  path = "/{path}".sub("{" + "path" + "}", path.to_s)
675
719
  query_params = {}
@@ -714,6 +758,10 @@ module Algolia
714
758
  if @api_client.config.client_side_validation && path.nil?
715
759
  raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
716
760
  end
761
+ # verify the required parameter 'path' is not empty
762
+ if @api_client.config.client_side_validation && path.empty?
763
+ raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
764
+ end
717
765
 
718
766
  path = "/{path}".sub("{" + "path" + "}", path.to_s)
719
767
  query_params = {}
@@ -759,6 +807,10 @@ module Algolia
759
807
  if @api_client.config.client_side_validation && path.nil?
760
808
  raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
761
809
  end
810
+ # verify the required parameter 'path' is not empty
811
+ if @api_client.config.client_side_validation && path.empty?
812
+ raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
813
+ end
762
814
 
763
815
  path = "/{path}".sub("{" + "path" + "}", path.to_s)
764
816
  query_params = {}
@@ -804,6 +856,10 @@ module Algolia
804
856
  if @api_client.config.client_side_validation && key.nil?
805
857
  raise ArgumentError, "Parameter `key` is required when calling `delete_api_key`."
806
858
  end
859
+ # verify the required parameter 'key' is not empty
860
+ if @api_client.config.client_side_validation && key.empty?
861
+ raise ArgumentError, "Parameter `key` is required when calling `delete_api_key`."
862
+ end
807
863
 
808
864
  path = "/1/keys/{key}".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
809
865
  query_params = {}
@@ -849,6 +905,10 @@ module Algolia
849
905
  if @api_client.config.client_side_validation && index_name.nil?
850
906
  raise ArgumentError, "Parameter `index_name` is required when calling `delete_by`."
851
907
  end
908
+ # verify the required parameter 'index_name' is not empty
909
+ if @api_client.config.client_side_validation && index_name.empty?
910
+ raise ArgumentError, "Parameter `index_name` is required when calling `delete_by`."
911
+ end
852
912
  # verify the required parameter 'delete_by_params' is set
853
913
  if @api_client.config.client_side_validation && delete_by_params.nil?
854
914
  raise ArgumentError, "Parameter `delete_by_params` is required when calling `delete_by`."
@@ -898,6 +958,10 @@ module Algolia
898
958
  if @api_client.config.client_side_validation && index_name.nil?
899
959
  raise ArgumentError, "Parameter `index_name` is required when calling `delete_index`."
900
960
  end
961
+ # verify the required parameter 'index_name' is not empty
962
+ if @api_client.config.client_side_validation && index_name.empty?
963
+ raise ArgumentError, "Parameter `index_name` is required when calling `delete_index`."
964
+ end
901
965
 
902
966
  path = "/1/indexes/{indexName}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
903
967
  query_params = {}
@@ -943,10 +1007,18 @@ module Algolia
943
1007
  if @api_client.config.client_side_validation && index_name.nil?
944
1008
  raise ArgumentError, "Parameter `index_name` is required when calling `delete_object`."
945
1009
  end
1010
+ # verify the required parameter 'index_name' is not empty
1011
+ if @api_client.config.client_side_validation && index_name.empty?
1012
+ raise ArgumentError, "Parameter `index_name` is required when calling `delete_object`."
1013
+ end
946
1014
  # verify the required parameter 'algolia_object_id' is set
947
1015
  if @api_client.config.client_side_validation && algolia_object_id.nil?
948
1016
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `delete_object`."
949
1017
  end
1018
+ # verify the required parameter 'algolia_object_id' is not empty
1019
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
1020
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `delete_object`."
1021
+ end
950
1022
 
951
1023
  path = "/1/indexes/{indexName}/{objectID}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s)).sub(
952
1024
  "{" + "objectID" + "}",
@@ -997,10 +1069,18 @@ module Algolia
997
1069
  if @api_client.config.client_side_validation && index_name.nil?
998
1070
  raise ArgumentError, "Parameter `index_name` is required when calling `delete_rule`."
999
1071
  end
1072
+ # verify the required parameter 'index_name' is not empty
1073
+ if @api_client.config.client_side_validation && index_name.empty?
1074
+ raise ArgumentError, "Parameter `index_name` is required when calling `delete_rule`."
1075
+ end
1000
1076
  # verify the required parameter 'algolia_object_id' is set
1001
1077
  if @api_client.config.client_side_validation && algolia_object_id.nil?
1002
1078
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `delete_rule`."
1003
1079
  end
1080
+ # verify the required parameter 'algolia_object_id' is not empty
1081
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
1082
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `delete_rule`."
1083
+ end
1004
1084
 
1005
1085
  path = "/1/indexes/{indexName}/rules/{objectID}"
1006
1086
  .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
@@ -1050,6 +1130,10 @@ module Algolia
1050
1130
  if @api_client.config.client_side_validation && source.nil?
1051
1131
  raise ArgumentError, "Parameter `source` is required when calling `delete_source`."
1052
1132
  end
1133
+ # verify the required parameter 'source' is not empty
1134
+ if @api_client.config.client_side_validation && source.empty?
1135
+ raise ArgumentError, "Parameter `source` is required when calling `delete_source`."
1136
+ end
1053
1137
 
1054
1138
  path = "/1/security/sources/{source}".sub("{" + "source" + "}", Transport.encode_uri(source.to_s))
1055
1139
  query_params = {}
@@ -1096,10 +1180,18 @@ module Algolia
1096
1180
  if @api_client.config.client_side_validation && index_name.nil?
1097
1181
  raise ArgumentError, "Parameter `index_name` is required when calling `delete_synonym`."
1098
1182
  end
1183
+ # verify the required parameter 'index_name' is not empty
1184
+ if @api_client.config.client_side_validation && index_name.empty?
1185
+ raise ArgumentError, "Parameter `index_name` is required when calling `delete_synonym`."
1186
+ end
1099
1187
  # verify the required parameter 'algolia_object_id' is set
1100
1188
  if @api_client.config.client_side_validation && algolia_object_id.nil?
1101
1189
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `delete_synonym`."
1102
1190
  end
1191
+ # verify the required parameter 'algolia_object_id' is not empty
1192
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
1193
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `delete_synonym`."
1194
+ end
1103
1195
 
1104
1196
  path = "/1/indexes/{indexName}/synonyms/{objectID}"
1105
1197
  .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
@@ -1149,6 +1241,10 @@ module Algolia
1149
1241
  if @api_client.config.client_side_validation && key.nil?
1150
1242
  raise ArgumentError, "Parameter `key` is required when calling `get_api_key`."
1151
1243
  end
1244
+ # verify the required parameter 'key' is not empty
1245
+ if @api_client.config.client_side_validation && key.empty?
1246
+ raise ArgumentError, "Parameter `key` is required when calling `get_api_key`."
1247
+ end
1152
1248
 
1153
1249
  path = "/1/keys/{key}".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
1154
1250
  query_params = {}
@@ -1365,10 +1461,18 @@ module Algolia
1365
1461
  if @api_client.config.client_side_validation && index_name.nil?
1366
1462
  raise ArgumentError, "Parameter `index_name` is required when calling `get_object`."
1367
1463
  end
1464
+ # verify the required parameter 'index_name' is not empty
1465
+ if @api_client.config.client_side_validation && index_name.empty?
1466
+ raise ArgumentError, "Parameter `index_name` is required when calling `get_object`."
1467
+ end
1368
1468
  # verify the required parameter 'algolia_object_id' is set
1369
1469
  if @api_client.config.client_side_validation && algolia_object_id.nil?
1370
1470
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `get_object`."
1371
1471
  end
1472
+ # verify the required parameter 'algolia_object_id' is not empty
1473
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
1474
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `get_object`."
1475
+ end
1372
1476
 
1373
1477
  path = "/1/indexes/{indexName}/{objectID}".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s)).sub(
1374
1478
  "{" + "objectID" + "}",
@@ -1467,10 +1571,18 @@ module Algolia
1467
1571
  if @api_client.config.client_side_validation && index_name.nil?
1468
1572
  raise ArgumentError, "Parameter `index_name` is required when calling `get_rule`."
1469
1573
  end
1574
+ # verify the required parameter 'index_name' is not empty
1575
+ if @api_client.config.client_side_validation && index_name.empty?
1576
+ raise ArgumentError, "Parameter `index_name` is required when calling `get_rule`."
1577
+ end
1470
1578
  # verify the required parameter 'algolia_object_id' is set
1471
1579
  if @api_client.config.client_side_validation && algolia_object_id.nil?
1472
1580
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `get_rule`."
1473
1581
  end
1582
+ # verify the required parameter 'algolia_object_id' is not empty
1583
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
1584
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `get_rule`."
1585
+ end
1474
1586
 
1475
1587
  path = "/1/indexes/{indexName}/rules/{objectID}"
1476
1588
  .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
@@ -1519,6 +1631,10 @@ module Algolia
1519
1631
  if @api_client.config.client_side_validation && index_name.nil?
1520
1632
  raise ArgumentError, "Parameter `index_name` is required when calling `get_settings`."
1521
1633
  end
1634
+ # verify the required parameter 'index_name' is not empty
1635
+ if @api_client.config.client_side_validation && index_name.empty?
1636
+ raise ArgumentError, "Parameter `index_name` is required when calling `get_settings`."
1637
+ end
1522
1638
 
1523
1639
  path = "/1/indexes/{indexName}/settings".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
1524
1640
  query_params = {}
@@ -1603,10 +1719,18 @@ module Algolia
1603
1719
  if @api_client.config.client_side_validation && index_name.nil?
1604
1720
  raise ArgumentError, "Parameter `index_name` is required when calling `get_synonym`."
1605
1721
  end
1722
+ # verify the required parameter 'index_name' is not empty
1723
+ if @api_client.config.client_side_validation && index_name.empty?
1724
+ raise ArgumentError, "Parameter `index_name` is required when calling `get_synonym`."
1725
+ end
1606
1726
  # verify the required parameter 'algolia_object_id' is set
1607
1727
  if @api_client.config.client_side_validation && algolia_object_id.nil?
1608
1728
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `get_synonym`."
1609
1729
  end
1730
+ # verify the required parameter 'algolia_object_id' is not empty
1731
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
1732
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `get_synonym`."
1733
+ end
1610
1734
 
1611
1735
  path = "/1/indexes/{indexName}/synonyms/{objectID}"
1612
1736
  .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
@@ -1655,6 +1779,10 @@ module Algolia
1655
1779
  if @api_client.config.client_side_validation && index_name.nil?
1656
1780
  raise ArgumentError, "Parameter `index_name` is required when calling `get_task`."
1657
1781
  end
1782
+ # verify the required parameter 'index_name' is not empty
1783
+ if @api_client.config.client_side_validation && index_name.empty?
1784
+ raise ArgumentError, "Parameter `index_name` is required when calling `get_task`."
1785
+ end
1658
1786
  # verify the required parameter 'task_id' is set
1659
1787
  if @api_client.config.client_side_validation && task_id.nil?
1660
1788
  raise ArgumentError, "Parameter `task_id` is required when calling `get_task`."
@@ -1745,6 +1873,10 @@ module Algolia
1745
1873
  if @api_client.config.client_side_validation && user_id.nil?
1746
1874
  raise ArgumentError, "Parameter `user_id` is required when calling `get_user_id`."
1747
1875
  end
1876
+ # verify the required parameter 'user_id' is not empty
1877
+ if @api_client.config.client_side_validation && user_id.empty?
1878
+ raise ArgumentError, "Parameter `user_id` is required when calling `get_user_id`."
1879
+ end
1748
1880
 
1749
1881
  path = "/1/clusters/mapping/{userID}".sub("{" + "userID" + "}", Transport.encode_uri(user_id.to_s))
1750
1882
  query_params = {}
@@ -2040,6 +2172,10 @@ module Algolia
2040
2172
  if @api_client.config.client_side_validation && index_name.nil?
2041
2173
  raise ArgumentError, "Parameter `index_name` is required when calling `operation_index`."
2042
2174
  end
2175
+ # verify the required parameter 'index_name' is not empty
2176
+ if @api_client.config.client_side_validation && index_name.empty?
2177
+ raise ArgumentError, "Parameter `index_name` is required when calling `operation_index`."
2178
+ end
2043
2179
  # verify the required parameter 'operation_index_params' is set
2044
2180
  if @api_client.config.client_side_validation && operation_index_params.nil?
2045
2181
  raise ArgumentError, "Parameter `operation_index_params` is required when calling `operation_index`."
@@ -2098,10 +2234,18 @@ module Algolia
2098
2234
  if @api_client.config.client_side_validation && index_name.nil?
2099
2235
  raise ArgumentError, "Parameter `index_name` is required when calling `partial_update_object`."
2100
2236
  end
2237
+ # verify the required parameter 'index_name' is not empty
2238
+ if @api_client.config.client_side_validation && index_name.empty?
2239
+ raise ArgumentError, "Parameter `index_name` is required when calling `partial_update_object`."
2240
+ end
2101
2241
  # verify the required parameter 'algolia_object_id' is set
2102
2242
  if @api_client.config.client_side_validation && algolia_object_id.nil?
2103
2243
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `partial_update_object`."
2104
2244
  end
2245
+ # verify the required parameter 'algolia_object_id' is not empty
2246
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
2247
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `partial_update_object`."
2248
+ end
2105
2249
  # verify the required parameter 'attributes_to_update' is set
2106
2250
  if @api_client.config.client_side_validation && attributes_to_update.nil?
2107
2251
  raise ArgumentError, "Parameter `attributes_to_update` is required when calling `partial_update_object`."
@@ -2172,6 +2316,10 @@ module Algolia
2172
2316
  if @api_client.config.client_side_validation && user_id.nil?
2173
2317
  raise ArgumentError, "Parameter `user_id` is required when calling `remove_user_id`."
2174
2318
  end
2319
+ # verify the required parameter 'user_id' is not empty
2320
+ if @api_client.config.client_side_validation && user_id.empty?
2321
+ raise ArgumentError, "Parameter `user_id` is required when calling `remove_user_id`."
2322
+ end
2175
2323
 
2176
2324
  path = "/1/clusters/mapping/{userID}".sub("{" + "userID" + "}", Transport.encode_uri(user_id.to_s))
2177
2325
  query_params = {}
@@ -2260,6 +2408,10 @@ module Algolia
2260
2408
  if @api_client.config.client_side_validation && key.nil?
2261
2409
  raise ArgumentError, "Parameter `key` is required when calling `restore_api_key`."
2262
2410
  end
2411
+ # verify the required parameter 'key' is not empty
2412
+ if @api_client.config.client_side_validation && key.empty?
2413
+ raise ArgumentError, "Parameter `key` is required when calling `restore_api_key`."
2414
+ end
2263
2415
 
2264
2416
  path = "/1/keys/{key}/restore".sub("{" + "key" + "}", Transport.encode_uri(key.to_s))
2265
2417
  query_params = {}
@@ -2305,6 +2457,10 @@ module Algolia
2305
2457
  if @api_client.config.client_side_validation && index_name.nil?
2306
2458
  raise ArgumentError, "Parameter `index_name` is required when calling `save_object`."
2307
2459
  end
2460
+ # verify the required parameter 'index_name' is not empty
2461
+ if @api_client.config.client_side_validation && index_name.empty?
2462
+ raise ArgumentError, "Parameter `index_name` is required when calling `save_object`."
2463
+ end
2308
2464
  # verify the required parameter 'body' is set
2309
2465
  if @api_client.config.client_side_validation && body.nil?
2310
2466
  raise ArgumentError, "Parameter `body` is required when calling `save_object`."
@@ -2357,10 +2513,18 @@ module Algolia
2357
2513
  if @api_client.config.client_side_validation && index_name.nil?
2358
2514
  raise ArgumentError, "Parameter `index_name` is required when calling `save_rule`."
2359
2515
  end
2516
+ # verify the required parameter 'index_name' is not empty
2517
+ if @api_client.config.client_side_validation && index_name.empty?
2518
+ raise ArgumentError, "Parameter `index_name` is required when calling `save_rule`."
2519
+ end
2360
2520
  # verify the required parameter 'algolia_object_id' is set
2361
2521
  if @api_client.config.client_side_validation && algolia_object_id.nil?
2362
2522
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `save_rule`."
2363
2523
  end
2524
+ # verify the required parameter 'algolia_object_id' is not empty
2525
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
2526
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `save_rule`."
2527
+ end
2364
2528
  # verify the required parameter 'rule' is set
2365
2529
  if @api_client.config.client_side_validation && rule.nil?
2366
2530
  raise ArgumentError, "Parameter `rule` is required when calling `save_rule`."
@@ -2424,6 +2588,10 @@ module Algolia
2424
2588
  if @api_client.config.client_side_validation && index_name.nil?
2425
2589
  raise ArgumentError, "Parameter `index_name` is required when calling `save_rules`."
2426
2590
  end
2591
+ # verify the required parameter 'index_name' is not empty
2592
+ if @api_client.config.client_side_validation && index_name.empty?
2593
+ raise ArgumentError, "Parameter `index_name` is required when calling `save_rules`."
2594
+ end
2427
2595
  # verify the required parameter 'rules' is set
2428
2596
  if @api_client.config.client_side_validation && rules.nil?
2429
2597
  raise ArgumentError, "Parameter `rules` is required when calling `save_rules`."
@@ -2492,10 +2660,18 @@ module Algolia
2492
2660
  if @api_client.config.client_side_validation && index_name.nil?
2493
2661
  raise ArgumentError, "Parameter `index_name` is required when calling `save_synonym`."
2494
2662
  end
2663
+ # verify the required parameter 'index_name' is not empty
2664
+ if @api_client.config.client_side_validation && index_name.empty?
2665
+ raise ArgumentError, "Parameter `index_name` is required when calling `save_synonym`."
2666
+ end
2495
2667
  # verify the required parameter 'algolia_object_id' is set
2496
2668
  if @api_client.config.client_side_validation && algolia_object_id.nil?
2497
2669
  raise ArgumentError, "Parameter `algolia_object_id` is required when calling `save_synonym`."
2498
2670
  end
2671
+ # verify the required parameter 'algolia_object_id' is not empty
2672
+ if @api_client.config.client_side_validation && algolia_object_id.empty?
2673
+ raise ArgumentError, "Parameter `algolia_object_id` is required when calling `save_synonym`."
2674
+ end
2499
2675
  # verify the required parameter 'synonym_hit' is set
2500
2676
  if @api_client.config.client_side_validation && synonym_hit.nil?
2501
2677
  raise ArgumentError, "Parameter `synonym_hit` is required when calling `save_synonym`."
@@ -2565,6 +2741,10 @@ module Algolia
2565
2741
  if @api_client.config.client_side_validation && index_name.nil?
2566
2742
  raise ArgumentError, "Parameter `index_name` is required when calling `save_synonyms`."
2567
2743
  end
2744
+ # verify the required parameter 'index_name' is not empty
2745
+ if @api_client.config.client_side_validation && index_name.empty?
2746
+ raise ArgumentError, "Parameter `index_name` is required when calling `save_synonyms`."
2747
+ end
2568
2748
  # verify the required parameter 'synonym_hit' is set
2569
2749
  if @api_client.config.client_side_validation && synonym_hit.nil?
2570
2750
  raise ArgumentError, "Parameter `synonym_hit` is required when calling `save_synonyms`."
@@ -2618,11 +2798,11 @@ module Algolia
2618
2798
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2619
2799
  end
2620
2800
 
2621
- # Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.
2801
+ # Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
2622
2802
  #
2623
2803
  # Required API Key ACLs:
2624
2804
  # - search
2625
- # @param search_method_params [SearchMethodParams] Muli-search request body. Results are returned in the same order as the requests. (required)
2805
+ # @param search_method_params [SearchMethodParams] Multi-query search request body. Results are returned in the same order as the requests. (required)
2626
2806
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2627
2807
  # @return [Http::Response] the response
2628
2808
  def search_with_http_info(search_method_params, request_options = {})
@@ -2650,11 +2830,11 @@ module Algolia
2650
2830
  @api_client.call_api(:POST, path, new_options)
2651
2831
  end
2652
2832
 
2653
- # Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.
2833
+ # Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
2654
2834
  #
2655
2835
  # Required API Key ACLs:
2656
2836
  # - search
2657
- # @param search_method_params [SearchMethodParams] Muli-search request body. Results are returned in the same order as the requests. (required)
2837
+ # @param search_method_params [SearchMethodParams] Multi-query search request body. Results are returned in the same order as the requests. (required)
2658
2838
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2659
2839
  # @return [SearchResponses]
2660
2840
  def search(search_method_params, request_options = {})
@@ -2748,10 +2928,18 @@ module Algolia
2748
2928
  if @api_client.config.client_side_validation && index_name.nil?
2749
2929
  raise ArgumentError, "Parameter `index_name` is required when calling `search_for_facet_values`."
2750
2930
  end
2931
+ # verify the required parameter 'index_name' is not empty
2932
+ if @api_client.config.client_side_validation && index_name.empty?
2933
+ raise ArgumentError, "Parameter `index_name` is required when calling `search_for_facet_values`."
2934
+ end
2751
2935
  # verify the required parameter 'facet_name' is set
2752
2936
  if @api_client.config.client_side_validation && facet_name.nil?
2753
2937
  raise ArgumentError, "Parameter `facet_name` is required when calling `search_for_facet_values`."
2754
2938
  end
2939
+ # verify the required parameter 'facet_name' is not empty
2940
+ if @api_client.config.client_side_validation && facet_name.empty?
2941
+ raise ArgumentError, "Parameter `facet_name` is required when calling `search_for_facet_values`."
2942
+ end
2755
2943
 
2756
2944
  path = "/1/indexes/{indexName}/facets/{facetName}/query"
2757
2945
  .sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
@@ -2809,6 +2997,10 @@ module Algolia
2809
2997
  if @api_client.config.client_side_validation && index_name.nil?
2810
2998
  raise ArgumentError, "Parameter `index_name` is required when calling `search_rules`."
2811
2999
  end
3000
+ # verify the required parameter 'index_name' is not empty
3001
+ if @api_client.config.client_side_validation && index_name.empty?
3002
+ raise ArgumentError, "Parameter `index_name` is required when calling `search_rules`."
3003
+ end
2812
3004
 
2813
3005
  path = "/1/indexes/{indexName}/rules/search".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2814
3006
  query_params = {}
@@ -2855,6 +3047,10 @@ module Algolia
2855
3047
  if @api_client.config.client_side_validation && index_name.nil?
2856
3048
  raise ArgumentError, "Parameter `index_name` is required when calling `search_single_index`."
2857
3049
  end
3050
+ # verify the required parameter 'index_name' is not empty
3051
+ if @api_client.config.client_side_validation && index_name.empty?
3052
+ raise ArgumentError, "Parameter `index_name` is required when calling `search_single_index`."
3053
+ end
2858
3054
 
2859
3055
  path = "/1/indexes/{indexName}/query".sub("{" + "indexName" + "}", Transport.encode_uri(index_name.to_s))
2860
3056
  query_params = {}
@@ -2901,6 +3097,10 @@ module Algolia
2901
3097
  if @api_client.config.client_side_validation && index_name.nil?
2902
3098
  raise ArgumentError, "Parameter `index_name` is required when calling `search_synonyms`."
2903
3099
  end
3100
+ # verify the required parameter 'index_name' is not empty
3101
+ if @api_client.config.client_side_validation && index_name.empty?
3102
+ raise ArgumentError, "Parameter `index_name` is required when calling `search_synonyms`."
3103
+ end
2904
3104
 
2905
3105
  path = "/1/indexes/{indexName}/synonyms/search".sub(
2906
3106
  "{" + "indexName" + "}",
@@ -3043,6 +3243,10 @@ module Algolia
3043
3243
  if @api_client.config.client_side_validation && index_name.nil?
3044
3244
  raise ArgumentError, "Parameter `index_name` is required when calling `set_settings`."
3045
3245
  end
3246
+ # verify the required parameter 'index_name' is not empty
3247
+ if @api_client.config.client_side_validation && index_name.empty?
3248
+ raise ArgumentError, "Parameter `index_name` is required when calling `set_settings`."
3249
+ end
3046
3250
  # verify the required parameter 'index_settings' is set
3047
3251
  if @api_client.config.client_side_validation && index_settings.nil?
3048
3252
  raise ArgumentError, "Parameter `index_settings` is required when calling `set_settings`."
@@ -3095,6 +3299,10 @@ module Algolia
3095
3299
  if @api_client.config.client_side_validation && key.nil?
3096
3300
  raise ArgumentError, "Parameter `key` is required when calling `update_api_key`."
3097
3301
  end
3302
+ # verify the required parameter 'key' is not empty
3303
+ if @api_client.config.client_side_validation && key.empty?
3304
+ raise ArgumentError, "Parameter `key` is required when calling `update_api_key`."
3305
+ end
3098
3306
  # verify the required parameter 'api_key' is set
3099
3307
  if @api_client.config.client_side_validation && api_key.nil?
3100
3308
  raise ArgumentError, "Parameter `api_key` is required when calling `update_api_key`."
@@ -7,6 +7,7 @@ require "time"
7
7
 
8
8
  module Algolia
9
9
  module Composition
10
+ # Contains a list of objects to inject from an external source.
10
11
  class ExternalInjectedItem
11
12
  attr_accessor :items
12
13
 
@@ -8,7 +8,7 @@ require "time"
8
8
  module Algolia
9
9
  module Composition
10
10
  class ExternalInjection
11
- # An objectID injected into an external source.
11
+ # An objectID injected from an external source and also present in the targeted index.
12
12
  attr_accessor :algolia_object_id
13
13
 
14
14
  # User-defined key-values that will be added to the injected item in the response. This is identical to Hits metadata defined in Composition or Composition Rule, with the benefit of being set at runtime.
@@ -53,7 +53,7 @@ module Algolia
53
53
  # Number of hits per page.
54
54
  attr_accessor :hits_per_page
55
55
 
56
- # A list of extenrally injected objectID groups into from an external source.
56
+ # An object containing keys corresponding to the `key`s from an injection's `injectedItems` and values containing a list of hits to inject.
57
57
  attr_accessor :injected_items
58
58
 
59
59
  attr_accessor :inside_bounding_box
@@ -10,17 +10,22 @@ module Algolia
10
10
  class RequestBody
11
11
  attr_accessor :params
12
12
 
13
+ # A list of Feed IDs that specifies the order in which to order the results in the response. The IDs should be a subset of those in the `feeds` object of the targeted `multifeed` Composition / Composition Rule, and only those specified will be processed. The value overrides the value in the defined behavior, and when unspecified, the value defined in the behavior is used. When neither value is present, all feeds are processed.
14
+ attr_accessor :feeds_order
15
+
13
16
  # Attribute mapping from ruby-style variable name to JSON key.
14
17
  def self.attribute_map
15
18
  {
16
- :params => :params
19
+ :params => :params,
20
+ :feeds_order => :feedsOrder
17
21
  }
18
22
  end
19
23
 
20
24
  # Attribute type mapping.
21
25
  def self.types_mapping
22
26
  {
23
- :params => :"Params"
27
+ :params => :"Params",
28
+ :feeds_order => :"Array<String>"
24
29
  }
25
30
  end
26
31
 
@@ -57,6 +62,12 @@ module Algolia
57
62
  if attributes.key?(:params)
58
63
  self.params = attributes[:params]
59
64
  end
65
+
66
+ if attributes.key?(:feeds_order)
67
+ if (value = attributes[:feeds_order]).is_a?(Array)
68
+ self.feeds_order = value
69
+ end
70
+ end
60
71
  end
61
72
 
62
73
  # Checks equality by comparing each attribute.
@@ -64,7 +75,8 @@ module Algolia
64
75
  def ==(other)
65
76
  return true if self.equal?(other)
66
77
  self.class == other.class &&
67
- params == other.params
78
+ params == other.params &&
79
+ feeds_order == other.feeds_order
68
80
  end
69
81
 
70
82
  # @see the `==` method
@@ -76,7 +88,7 @@ module Algolia
76
88
  # Calculates hash code according to all attributes.
77
89
  # @return [Integer] Hash code
78
90
  def hash
79
- [params].hash
91
+ [params, feeds_order].hash
80
92
  end
81
93
 
82
94
  # Builds the object from hash