@@ -1513,4 +1513,97 @@ public CompletableFuture<SearchForFacetValuesResponse> searchForFacetValuesAsync
15131513 throws AlgoliaRuntimeException {
15141514 return this .searchForFacetValuesAsync (compositionID , facetName , null , null );
15151515 }
1516+
1517+ /**
1518+ * Updates the \"sortingStrategy\" field of an existing composition. This endpoint allows you to
1519+ * create a new sorting strategy mapping or replace the currently configured one. The provided
1520+ * sorting indices MUST be associated indices or replicas of the main targeted index. WARNING:
1521+ * This endpoint cannot validate if the sort index is related to the composition's main index.
1522+ * Validation will fail at runtime if the index you updated is not related! The update is applied
1523+ * to the specified composition within the current Algolia application and returns a taskID that
1524+ * can be used to track the operation’s completion.
1525+ *
1526+ * @param compositionID Unique Composition ObjectID. (required)
1527+ * @param requestBody (required)
1528+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
1529+ * the transporter requestOptions.
1530+ * @throws AlgoliaRuntimeException If it fails to process the API call
1531+ */
1532+ public TaskIDResponse updateSortingStrategyComposition (
1533+ @ Nonnull String compositionID ,
1534+ @ Nonnull Map <String , String > requestBody ,
1535+ @ Nullable RequestOptions requestOptions
1536+ ) throws AlgoliaRuntimeException {
1537+ return LaunderThrowable .await (updateSortingStrategyCompositionAsync (compositionID , requestBody , requestOptions ));
1538+ }
1539+
1540+ /**
1541+ * Updates the \"sortingStrategy\" field of an existing composition. This endpoint allows you to
1542+ * create a new sorting strategy mapping or replace the currently configured one. The provided
1543+ * sorting indices MUST be associated indices or replicas of the main targeted index. WARNING:
1544+ * This endpoint cannot validate if the sort index is related to the composition's main index.
1545+ * Validation will fail at runtime if the index you updated is not related! The update is applied
1546+ * to the specified composition within the current Algolia application and returns a taskID that
1547+ * can be used to track the operation’s completion.
1548+ *
1549+ * @param compositionID Unique Composition ObjectID. (required)
1550+ * @param requestBody (required)
1551+ * @throws AlgoliaRuntimeException If it fails to process the API call
1552+ */
1553+ public TaskIDResponse updateSortingStrategyComposition (@ Nonnull String compositionID , @ Nonnull Map <String , String > requestBody )
1554+ throws AlgoliaRuntimeException {
1555+ return this .updateSortingStrategyComposition (compositionID , requestBody , null );
1556+ }
1557+
1558+ /**
1559+ * (asynchronously) Updates the \"sortingStrategy\" field of an existing composition. This
1560+ * endpoint allows you to create a new sorting strategy mapping or replace the currently
1561+ * configured one. The provided sorting indices MUST be associated indices or replicas of the main
1562+ * targeted index. WARNING: This endpoint cannot validate if the sort index is related to the
1563+ * composition's main index. Validation will fail at runtime if the index you updated is not
1564+ * related! The update is applied to the specified composition within the current Algolia
1565+ * application and returns a taskID that can be used to track the operation’s completion.
1566+ *
1567+ * @param compositionID Unique Composition ObjectID. (required)
1568+ * @param requestBody (required)
1569+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
1570+ * the transporter requestOptions.
1571+ * @throws AlgoliaRuntimeException If it fails to process the API call
1572+ */
1573+ public CompletableFuture <TaskIDResponse > updateSortingStrategyCompositionAsync (
1574+ @ Nonnull String compositionID ,
1575+ @ Nonnull Map <String , String > requestBody ,
1576+ @ Nullable RequestOptions requestOptions
1577+ ) throws AlgoliaRuntimeException {
1578+ Parameters .requireNonNull (compositionID , "Parameter `compositionID` is required when calling `updateSortingStrategyComposition`." );
1579+
1580+ Parameters .requireNonNull (requestBody , "Parameter `requestBody` is required when calling `updateSortingStrategyComposition`." );
1581+
1582+ HttpRequest request = HttpRequest .builder ()
1583+ .setPath ("/1/compositions/{compositionID}/sortingStrategy" , compositionID )
1584+ .setMethod ("POST" )
1585+ .setBody (requestBody )
1586+ .build ();
1587+ return executeAsync (request , requestOptions , new TypeReference <TaskIDResponse >() {});
1588+ }
1589+
1590+ /**
1591+ * (asynchronously) Updates the \"sortingStrategy\" field of an existing composition. This
1592+ * endpoint allows you to create a new sorting strategy mapping or replace the currently
1593+ * configured one. The provided sorting indices MUST be associated indices or replicas of the main
1594+ * targeted index. WARNING: This endpoint cannot validate if the sort index is related to the
1595+ * composition's main index. Validation will fail at runtime if the index you updated is not
1596+ * related! The update is applied to the specified composition within the current Algolia
1597+ * application and returns a taskID that can be used to track the operation’s completion.
1598+ *
1599+ * @param compositionID Unique Composition ObjectID. (required)
1600+ * @param requestBody (required)
1601+ * @throws AlgoliaRuntimeException If it fails to process the API call
1602+ */
1603+ public CompletableFuture <TaskIDResponse > updateSortingStrategyCompositionAsync (
1604+ @ Nonnull String compositionID ,
1605+ @ Nonnull Map <String , String > requestBody
1606+ ) throws AlgoliaRuntimeException {
1607+ return this .updateSortingStrategyCompositionAsync (compositionID , requestBody , null );
1608+ }
15161609}
0 commit comments