diff --git a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java index ca9b57d680eb..1be9b97a0de1 100644 --- a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java +++ b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java @@ -359,63 +359,43 @@ public Mono createOrUpdateIndexer(Indexer indexer) { * Creates a new Azure Search indexer or updates an indexer if it already exists. * * @param indexer The definition of the indexer to create or update. - * @param requestOptions additional parameters for the operation. - * Contains the tracking ID sent with the request to help with debugging * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging * @return a response containing the created Indexer. */ public Mono createOrUpdateIndexer(Indexer indexer, - RequestOptions requestOptions, - AccessCondition accessCondition) { - return createOrUpdateIndexerWithResponse( - indexer, - requestOptions, - accessCondition) + AccessCondition accessCondition, + RequestOptions requestOptions) { + return this.createOrUpdateIndexerWithResponse(indexer, accessCondition, requestOptions) .map(Response::getValue); } /** * Creates a new Azure Search indexer or updates an indexer if it already exists. * - * @param indexer The definition of the indexer to create or update. - * @param requestOptions additional parameters for the operation. - * Contains the tracking ID sent with the request to help with debugging + * @param indexer the definition of the indexer to create or update * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or * doesn't match specified values + * @param requestOptions additional parameters for the operation + * Contains the tracking ID sent with the request to help with debugging * @return a response containing the created Indexer. */ public Mono> createOrUpdateIndexerWithResponse(Indexer indexer, - RequestOptions requestOptions, - AccessCondition accessCondition) { - return withContext(context -> createOrUpdateIndexerWithResponse( - indexer, - requestOptions, - accessCondition, - context)); + AccessCondition accessCondition, + RequestOptions requestOptions) { + return withContext(context -> this.createOrUpdateIndexerWithResponse(indexer, + accessCondition, requestOptions, context)); } - /** - * Creates a new Azure Search indexer or updates an indexer if it already exists. - * - * @param indexer The definition of the indexer to create or update. - * @param requestOptions additional parameters for the operation. - * Contains the tracking ID sent with the request to help with debugging - * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or - * doesn't match specified values - * @param context Context - * @return A response object containing the Indexer. - */ Mono> createOrUpdateIndexerWithResponse(Indexer indexer, - RequestOptions requestOptions, AccessCondition accessCondition, + RequestOptions requestOptions, Context context) { - return restClient.indexers().createOrUpdateWithRestResponseAsync( - indexer.getName(), - indexer, - requestOptions, - accessCondition, - context) + return restClient + .indexers() + .createOrUpdateWithRestResponseAsync(indexer.getName(), indexer, requestOptions, accessCondition, context) .map(Function.identity()); } @@ -442,7 +422,7 @@ public Mono> getIndexerWithResponse() { */ public PagedFlux listIndexers() { return new PagedFlux<>( - () -> listIndexersWithResponse(null, null), + () -> this.listIndexersWithResponse(null, null), nextLink -> Mono.empty()); } @@ -457,23 +437,7 @@ public PagedFlux listIndexers() { */ public PagedFlux listIndexers(String select, RequestOptions requestOptions) { return new PagedFlux<>( - () -> listIndexersWithResponse(select, requestOptions), - nextLink -> Mono.empty()); - } - - /** - * Lists all indexers available for an Azure Search service. - * - * @param select Selects which top-level properties of the indexers to retrieve. - * Specified as a comma-separated list of JSON property names, or '*' for all properties. - * The default is all properties. - * @param requestOptions Additional parameters for the operation. - * @param context The context to associate with this operation. - * @return a response containing all Indexers from the Search service. - */ - PagedFlux listIndexers(String select, RequestOptions requestOptions, Context context) { - return new PagedFlux<>( - () -> listIndexersWithResponse(select, requestOptions, context), + () -> this.listIndexersWithResponse(select, requestOptions), nextLink -> Mono.empty()); } @@ -487,19 +451,9 @@ PagedFlux listIndexers(String select, RequestOptions requestOptions, Co * @return a response containing all Indexers from the Search service. */ public Mono> listIndexersWithResponse(String select, RequestOptions requestOptions) { - return withContext(context -> listIndexersWithResponse(select, requestOptions, context)); + return withContext(context -> this.listIndexersWithResponse(select, requestOptions, context)); } - /** - * Lists all indexers available for an Azure Search service. - * - * @param select Selects which top-level properties of the indexers to retrieve. - * Specified as a comma-separated list of JSON property names, or '*' for all properties. - * The default is all properties. - * @param requestOptions Additional parameters for the operation. - * @param context The context to associate with this operation. - * @return a response containing all Indexers from the Search service. - */ Mono> listIndexersWithResponse(String select, RequestOptions requestOptions, Context context) { @@ -568,7 +522,7 @@ public Mono>> runIndexerWithResponse() { * @return the Indexer execution information. * @throws NotImplementedException not implemented */ - public Mono deleteIndexerStatus() { + public Mono getIndexerStatus() { throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); } @@ -576,7 +530,7 @@ public Mono deleteIndexerStatus() { * @return a response containing the Indexer execution information. * @throws NotImplementedException not implemented */ - public Mono> deleteIndexerStatusWithResponse() { + public Mono> getIndexerStatusWithResponse() { throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); } diff --git a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java index c3a83617b11c..0a17ab114be5 100644 --- a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java +++ b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java @@ -267,42 +267,34 @@ public Indexer createOrUpdateIndexer(Indexer indexer) { * Creates a new Azure Search indexer or updates an indexer if it already exists. * * @param indexer The definition of the indexer to create or update. - * @param requestOptions additional parameters for the operation. - * Contains the tracking ID sent with the request to help with debugging * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging * @return a response containing the created Indexer. */ public Indexer createOrUpdateIndexer(Indexer indexer, - RequestOptions requestOptions, - AccessCondition accessCondition) { - return asyncClient.createOrUpdateIndexer( - indexer, - requestOptions, - accessCondition).block(); + AccessCondition accessCondition, + RequestOptions requestOptions) { + return asyncClient.createOrUpdateIndexer(indexer, accessCondition, requestOptions).block(); } /** * Creates a new Azure Search indexer or updates an indexer if it already exists. * * @param indexer The definition of the indexer to create or update. - * @param requestOptions additional parameters for the operation. - * Contains the tracking ID sent with the request to help with debugging * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging * @param context Context * @return A response object containing the Indexer. */ public Response createOrUpdateIndexerWithResponse(Indexer indexer, - RequestOptions requestOptions, AccessCondition accessCondition, + RequestOptions requestOptions, Context context) { - return asyncClient.createOrUpdateIndexerWithResponse( - indexer, - requestOptions, - accessCondition, - context) - .block(); + return asyncClient.createOrUpdateIndexerWithResponse(indexer, accessCondition, requestOptions, context).block(); } /** @@ -319,11 +311,10 @@ public PagedIterable listIndexers() { * Specified as a comma-separated list of JSON property names, or '*' for all properties. * The default is all properties. * @param requestOptions Additional parameters for the operation. - * @param context The context to associate with this operation. * @return all Indexers from the Search service. */ - public PagedIterable listIndexers(String select, RequestOptions requestOptions, Context context) { - return new PagedIterable<>(asyncClient.listIndexers(select, requestOptions, context)); + public PagedIterable listIndexers(String select, RequestOptions requestOptions) { + return new PagedIterable<>(asyncClient.listIndexers(select, requestOptions)); } /** @@ -407,7 +398,7 @@ public Response> runIndexerWithResponse() { * @return the Indexer execution information. * @throws NotImplementedException not implemented */ - public IndexerExecutionInfo deleteIndexerStatus() { + public IndexerExecutionInfo getIndexerStatus() { throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); } @@ -415,7 +406,7 @@ public IndexerExecutionInfo deleteIndexerStatus() { * @return a response containing the Indexer execution information. * @throws NotImplementedException not implemented */ - public Response deleteIndexerStatusWithResponse() { + public Response getIndexerStatusWithResponse() { throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); }