diff --git a/sdk/search/azure-search-documents/customizations/src/main/java/SearchCustomizations.java b/sdk/search/azure-search-documents/customizations/src/main/java/SearchCustomizations.java index 99725a34e11e..edf8076176da 100644 --- a/sdk/search/azure-search-documents/customizations/src/main/java/SearchCustomizations.java +++ b/sdk/search/azure-search-documents/customizations/src/main/java/SearchCustomizations.java @@ -14,6 +14,7 @@ import com.github.javaparser.ast.body.VariableDeclarator; import com.github.javaparser.ast.expr.StringLiteralExpr; import com.github.javaparser.ast.stmt.BlockStmt; +import com.github.javaparser.ast.type.Type; import org.slf4j.Logger; import java.util.Arrays; @@ -44,14 +45,14 @@ public void customize(LibraryCustomization libraryCustomization, Logger logger) removeGetApis(searchClient); removeGetApis(searchAsyncClient); - hideResponseBinaryDataApis(searchClient); - hideResponseBinaryDataApis(searchAsyncClient); - hideResponseBinaryDataApis(indexes.getClass("SearchIndexClient")); - hideResponseBinaryDataApis(indexes.getClass("SearchIndexAsyncClient")); - hideResponseBinaryDataApis(indexes.getClass("SearchIndexerClient")); - hideResponseBinaryDataApis(indexes.getClass("SearchIndexerAsyncClient")); - hideResponseBinaryDataApis(knowledge.getClass("KnowledgeBaseRetrievalClient")); - hideResponseBinaryDataApis(knowledge.getClass("KnowledgeBaseRetrievalAsyncClient")); + hideWithResponseBinaryDataApis(searchClient); + hideWithResponseBinaryDataApis(searchAsyncClient); + hideWithResponseBinaryDataApis(indexes.getClass("SearchIndexClient")); + hideWithResponseBinaryDataApis(indexes.getClass("SearchIndexAsyncClient")); + hideWithResponseBinaryDataApis(indexes.getClass("SearchIndexerClient")); + hideWithResponseBinaryDataApis(indexes.getClass("SearchIndexerAsyncClient")); + hideWithResponseBinaryDataApis(knowledge.getClass("KnowledgeBaseRetrievalClient")); + hideWithResponseBinaryDataApis(knowledge.getClass("KnowledgeBaseRetrievalAsyncClient")); } // Weird quirk in the Java generator where SearchOptions is inferred from the parameters of searchPost in TypeSpec, @@ -121,20 +122,29 @@ private static void includeOldApiVersions(ClassCustomization customization) { })); } - // At the time this was added, Java TypeSpec for Azure-type generation doesn't support returning Response, which - // we want, so hide all the Response APIs in the specified class and manually add Response APIs. - private static void hideResponseBinaryDataApis(ClassCustomization customization) { + // At the time this was added, Java TypeSpec for Azure-type generation doesn't use 'T' in WithResponse APIs, which + // we want, so hide all the WithResponse APIs using BinaryData in the specified class and manually add 'T' APIs. + private static void hideWithResponseBinaryDataApis(ClassCustomization customization) { customization.customizeAst(ast -> ast.getClassByName(customization.getClassName()) .ifPresent(clazz -> clazz.getMethods().forEach(method -> { - if (method.isPublic() - && method.isAnnotationPresent("Generated") - && method.getNameAsString().endsWith("WithResponse") - && method.getType().toString().contains("Response")) { + if (!method.isPublic() || !method.isAnnotationPresent("Generated")) { + // Method either isn't public or isn't Generated, skip deeper inspection. + return; + } + + if (hasBinaryDataInType(method.getType()) + || method.getParameters().stream().anyMatch(param -> hasBinaryDataInType(param.getType()))) { String methodName = method.getNameAsString(); - String newMethodName = "hiddenGenerated" + Character.toLowerCase(methodName.charAt(0)) + String newMethodName = "hiddenGenerated" + Character.toUpperCase(methodName.charAt(0)) + methodName.substring(1); method.setModifiers().setName(newMethodName); + String returnTypeName = method.getType().toString(); + if (returnTypeName.contains("PagedIterable")) { + // PagedIterable generation behaves differently and will break with the logic below. + return; + } + clazz.getMethodsByName(methodName.replace("WithResponse", "")).forEach(nonWithResponse -> { String body = nonWithResponse.getBody().map(BlockStmt::toString).get(); body = body.replace(methodName, newMethodName); @@ -144,6 +154,10 @@ private static void hideResponseBinaryDataApis(ClassCustomization customization) }))); } + private static boolean hasBinaryDataInType(Type type) { + return type.toString().contains("BinaryData"); + } + // Removes GET equivalents of POST APIs in SearchClient and SearchAsyncClient as we never plan to expose those. private static void removeGetApis(ClassCustomization customization) { List methodPrefixesToRemove = Arrays.asList("searchGet", "suggestGet", "autocompleteGet"); diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java index b10d2fe360d9..49c621fde869 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java @@ -161,9 +161,9 @@ Mono> indexWithResponse(BinaryData batch, RequestOptions re @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getDocumentCount() { - // Generated convenience method for hiddenGeneratedgetDocumentCountWithResponse + // Generated convenience method for hiddenGeneratedGetDocumentCountWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetDocumentCountWithResponse(requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetDocumentCountWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Long.class)); } @@ -259,7 +259,7 @@ public SearchPagedFlux search(SearchOptions options, RequestOptions requestOptio @ServiceMethod(returns = ReturnType.SINGLE) public Mono getDocument(String key, String querySourceAuthorization, Boolean enableElevatedRead, List selectedFields) { - // Generated convenience method for hiddenGeneratedgetDocumentWithResponse + // Generated convenience method for hiddenGeneratedGetDocumentWithResponse RequestOptions requestOptions = new RequestOptions(); if (querySourceAuthorization != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-query-source-authorization"), @@ -276,7 +276,7 @@ public Mono getDocument(String key, String querySourceAuthorizat .collect(Collectors.joining(",")), false); } - return hiddenGeneratedgetDocumentWithResponse(key, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetDocumentWithResponse(key, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LookupDocument.class)); } @@ -295,9 +295,9 @@ public Mono getDocument(String key, String querySourceAuthorizat @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getDocument(String key) { - // Generated convenience method for hiddenGeneratedgetDocumentWithResponse + // Generated convenience method for hiddenGeneratedGetDocumentWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetDocumentWithResponse(key, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetDocumentWithResponse(key, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LookupDocument.class)); } @@ -985,7 +985,7 @@ public Mono> getDocumentWithResponse(String key, Reques */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetDocumentCountWithResponse(RequestOptions requestOptions) { + Mono> hiddenGeneratedGetDocumentCountWithResponse(RequestOptions requestOptions) { return this.serviceClient.getDocumentCountWithResponseAsync(requestOptions); } @@ -1033,7 +1033,7 @@ Mono> hiddenGeneratedgetDocumentCountWithResponse(RequestOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetDocumentWithResponse(String key, RequestOptions requestOptions) { + Mono> hiddenGeneratedGetDocumentWithResponse(String key, RequestOptions requestOptions) { return this.serviceClient.getDocumentWithResponseAsync(key, requestOptions); } } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java index 67cbc8d510aa..d9577f9f6faa 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java @@ -161,9 +161,9 @@ Response indexWithResponse(BinaryData batch, RequestOptions requestO @Generated @ServiceMethod(returns = ReturnType.SINGLE) public long getDocumentCount() { - // Generated convenience method for hiddenGeneratedgetDocumentCountWithResponse + // Generated convenience method for hiddenGeneratedGetDocumentCountWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetDocumentCountWithResponse(requestOptions).getValue().toObject(Long.class); + return hiddenGeneratedGetDocumentCountWithResponse(requestOptions).getValue().toObject(Long.class); } /** @@ -263,7 +263,7 @@ public SearchPagedIterable search(SearchOptions options, RequestOptions requestO @ServiceMethod(returns = ReturnType.SINGLE) public LookupDocument getDocument(String key, String querySourceAuthorization, Boolean enableElevatedRead, List selectedFields) { - // Generated convenience method for hiddenGeneratedgetDocumentWithResponse + // Generated convenience method for hiddenGeneratedGetDocumentWithResponse RequestOptions requestOptions = new RequestOptions(); if (querySourceAuthorization != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-query-source-authorization"), @@ -280,7 +280,7 @@ public LookupDocument getDocument(String key, String querySourceAuthorization, B .collect(Collectors.joining(",")), false); } - return hiddenGeneratedgetDocumentWithResponse(key, requestOptions).getValue().toObject(LookupDocument.class); + return hiddenGeneratedGetDocumentWithResponse(key, requestOptions).getValue().toObject(LookupDocument.class); } /** @@ -298,9 +298,9 @@ public LookupDocument getDocument(String key, String querySourceAuthorization, B @Generated @ServiceMethod(returns = ReturnType.SINGLE) public LookupDocument getDocument(String key) { - // Generated convenience method for hiddenGeneratedgetDocumentWithResponse + // Generated convenience method for hiddenGeneratedGetDocumentWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetDocumentWithResponse(key, requestOptions).getValue().toObject(LookupDocument.class); + return hiddenGeneratedGetDocumentWithResponse(key, requestOptions).getValue().toObject(LookupDocument.class); } /** @@ -980,7 +980,7 @@ public Response getDocumentWithResponse(String key, RequestOptio */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetDocumentCountWithResponse(RequestOptions requestOptions) { + Response hiddenGeneratedGetDocumentCountWithResponse(RequestOptions requestOptions) { return this.serviceClient.getDocumentCountWithResponse(requestOptions); } @@ -1027,7 +1027,7 @@ Response hiddenGeneratedgetDocumentCountWithResponse(RequestOptions */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetDocumentWithResponse(String key, RequestOptions requestOptions) { + Response hiddenGeneratedGetDocumentWithResponse(String key, RequestOptions requestOptions) { return this.serviceClient.getDocumentWithResponse(key, requestOptions); } } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java index 275ed1bbf0ac..72534ea6b907 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java @@ -219,7 +219,7 @@ public SearchAsyncClient getSearchAsyncClient(String indexName) { * * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -244,9 +244,9 @@ public SearchAsyncClient getSearchAsyncClient(String indexName) {
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -354,7 +354,7 @@ public Mono> deleteSynonymMapWithResponse(String name, RequestOpt
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -421,7 +421,7 @@ Mono> getSynonymMapsWithResponse(RequestOptions requestOpti
      * 
      * You can add these to a request with {@link RequestOptions#addHeader}
      * 

Request Body Schema

- * + * *
      * {@code
      * {
@@ -596,9 +596,9 @@ Mono> getSynonymMapsWithResponse(RequestOptions requestOpti
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -858,207 +858,6 @@ public Mono> deleteIndexWithResponse(String name, RequestOptions
         return this.serviceClient.deleteIndexWithResponseAsync(name, requestOptions);
     }
 
-    /**
-     * Lists all indexes available for a search service.
-     * 

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
$selectList<String>NoSelects which top-level properties to retrieve. - * Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all - * properties. In the form of "," separated string.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     description: String (Optional)
-     *     fields (Required): [
-     *          (Required){
-     *             name: String (Required)
-     *             type: String(Edm.String/Edm.Int32/Edm.Int64/Edm.Double/Edm.Boolean/Edm.DateTimeOffset/Edm.GeographyPoint/Edm.ComplexType/Edm.Single/Edm.Half/Edm.Int16/Edm.SByte/Edm.Byte) (Required)
-     *             key: Boolean (Optional)
-     *             retrievable: Boolean (Optional)
-     *             stored: Boolean (Optional)
-     *             searchable: Boolean (Optional)
-     *             filterable: Boolean (Optional)
-     *             sortable: Boolean (Optional)
-     *             facetable: Boolean (Optional)
-     *             permissionFilter: String(userIds/groupIds/rbacScope) (Optional)
-     *             sensitivityLabel: Boolean (Optional)
-     *             analyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
-     *             searchAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
-     *             indexAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
-     *             normalizer: String(asciifolding/elision/lowercase/standard/uppercase) (Optional)
-     *             dimensions: Integer (Optional)
-     *             vectorSearchProfile: String (Optional)
-     *             vectorEncoding: String(packedBit) (Optional)
-     *             synonymMaps (Optional): [
-     *                 String (Optional)
-     *             ]
-     *             fields (Optional): [
-     *                 (recursive schema, see above)
-     *             ]
-     *         }
-     *     ]
-     *     scoringProfiles (Optional): [
-     *          (Optional){
-     *             name: String (Required)
-     *             text (Optional): {
-     *                 weights (Required): {
-     *                     String: double (Required)
-     *                 }
-     *             }
-     *             functions (Optional): [
-     *                  (Optional){
-     *                     type: String (Required)
-     *                     fieldName: String (Required)
-     *                     boost: double (Required)
-     *                     interpolation: String(linear/constant/quadratic/logarithmic) (Optional)
-     *                 }
-     *             ]
-     *             functionAggregation: String(sum/average/minimum/maximum/firstMatching/product) (Optional)
-     *         }
-     *     ]
-     *     defaultScoringProfile: String (Optional)
-     *     corsOptions (Optional): {
-     *         allowedOrigins (Required): [
-     *             String (Required)
-     *         ]
-     *         maxAgeInSeconds: Long (Optional)
-     *     }
-     *     suggesters (Optional): [
-     *          (Optional){
-     *             name: String (Required)
-     *             searchMode: String (Required)
-     *             sourceFields (Required): [
-     *                 String (Required)
-     *             ]
-     *         }
-     *     ]
-     *     analyzers (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     tokenizers (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     tokenFilters (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     charFilters (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     normalizers (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     encryptionKey (Optional): {
-     *         keyVaultKeyName: String (Required)
-     *         keyVaultKeyVersion: String (Optional)
-     *         keyVaultUri: String (Required)
-     *         accessCredentials (Optional): {
-     *             applicationId: String (Required)
-     *             applicationSecret: String (Optional)
-     *         }
-     *         identity (Optional): {
-     *             @odata.type: String (Required)
-     *         }
-     *     }
-     *     similarity (Optional): {
-     *         @odata.type: String (Required)
-     *     }
-     *     semantic (Optional): {
-     *         defaultConfiguration: String (Optional)
-     *         configurations (Optional): [
-     *              (Optional){
-     *                 name: String (Required)
-     *                 prioritizedFields (Required): {
-     *                     titleField (Optional): {
-     *                         fieldName: String (Required)
-     *                     }
-     *                     prioritizedContentFields (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                     prioritizedKeywordsFields (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 rankingOrder: String(BoostedRerankerScore/RerankerScore) (Optional)
-     *                 flightingOptIn: Boolean (Optional)
-     *             }
-     *         ]
-     *     }
-     *     vectorSearch (Optional): {
-     *         profiles (Optional): [
-     *              (Optional){
-     *                 name: String (Required)
-     *                 algorithm: String (Required)
-     *                 vectorizer: String (Optional)
-     *                 compression: String (Optional)
-     *             }
-     *         ]
-     *         algorithms (Optional): [
-     *              (Optional){
-     *                 kind: String(hnsw/exhaustiveKnn) (Required)
-     *                 name: String (Required)
-     *             }
-     *         ]
-     *         vectorizers (Optional): [
-     *              (Optional){
-     *                 kind: String(azureOpenAI/customWebApi/aiServicesVision/aml) (Required)
-     *                 name: String (Required)
-     *             }
-     *         ]
-     *         compressions (Optional): [
-     *              (Optional){
-     *                 kind: String(scalarQuantization/binaryQuantization) (Required)
-     *                 name: String (Required)
-     *                 rescoringOptions (Optional): {
-     *                     enableRescoring: Boolean (Optional)
-     *                     defaultOversampling: Double (Optional)
-     *                     rescoreStorageMethod: String(preserveOriginals/discardOriginals) (Optional)
-     *                 }
-     *                 truncationDimension: Integer (Optional)
-     *             }
-     *         ]
-     *     }
-     *     permissionFilterOption: String(enabled/disabled) (Optional)
-     *     purviewEnabled: Boolean (Optional)
-     *     @odata.etag: String (Optional)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return response from a List Indexes request as paginated response with {@link PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listIndexes(RequestOptions requestOptions) { - return this.serviceClient.listIndexesAsync(requestOptions); - } - /** * Creates a new search alias or updates an alias if it already exists. *

Header Parameters

@@ -1072,7 +871,7 @@ public PagedFlux listIndexes(RequestOptions requestOptions) { * * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -1084,9 +883,9 @@ public PagedFlux listIndexes(RequestOptions requestOptions) {
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -1172,35 +971,6 @@ public Mono> deleteAliasWithResponse(String name, RequestOptions
         return this.serviceClient.deleteAliasWithResponseAsync(name, requestOptions);
     }
 
-    /**
-     * Lists all aliases available for a search service.
-     * 

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     indexes (Required): [
-     *         String (Required)
-     *     ]
-     *     @odata.etag: String (Optional)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return response from a List Aliases request as paginated response with {@link PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAliases(RequestOptions requestOptions) { - return this.serviceClient.listAliasesAsync(requestOptions); - } - /** * Creates a new knowledge base or updates a knowledge base if it already exists. *

Header Parameters

@@ -1214,7 +984,7 @@ public PagedFlux listAliases(RequestOptions requestOptions) { * * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -1252,9 +1022,9 @@ public PagedFlux listAliases(RequestOptions requestOptions) {
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -1337,78 +1107,23 @@ public Mono> deleteKnowledgeBaseWithResponse(String name, Request
     }
 
     /**
-     * Lists all knowledge bases available for a search service.
-     * 

Response Body Schema

- * + * Creates a new knowledge source or updates an knowledge source if it already exists. + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-MatchStringNoDefines the If-Match condition. The operation will be + * performed only if the ETag on the server matches this value.
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * *
      * {@code
      * {
-     *     name: String (Required)
-     *     knowledgeSources (Required): [
-     *          (Required){
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     models (Optional): [
-     *          (Optional){
-     *             kind: String(azureOpenAI) (Required)
-     *         }
-     *     ]
-     *     retrievalReasoningEffort (Optional): {
-     *         kind: String(minimal/low/medium) (Required)
-     *     }
-     *     outputMode: String(extractiveData/answerSynthesis) (Optional)
-     *     @odata.etag: String (Optional)
-     *     encryptionKey (Optional): {
-     *         keyVaultKeyName: String (Required)
-     *         keyVaultKeyVersion: String (Optional)
-     *         keyVaultUri: String (Required)
-     *         accessCredentials (Optional): {
-     *             applicationId: String (Required)
-     *             applicationSecret: String (Optional)
-     *         }
-     *         identity (Optional): {
-     *             @odata.type: String (Required)
-     *         }
-     *     }
-     *     description: String (Optional)
-     *     retrievalInstructions: String (Optional)
-     *     answerInstructions: String (Optional)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return result from listing knowledge bases as paginated response with {@link PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listKnowledgeBases(RequestOptions requestOptions) { - return this.serviceClient.listKnowledgeBasesAsync(requestOptions); - } - - /** - * Creates a new knowledge source or updates an knowledge source if it already exists. - *

Header Parameters

- * - * - * - * - * - *
Header Parameters
NameTypeRequiredDescription
If-MatchStringNoDefines the If-Match condition. The operation will be - * performed only if the ETag on the server matches this value.
If-None-MatchStringNoDefines the If-None-Match condition. The operation will - * be performed only if the ETag on the server does not match this value.
- * You can add these to a request with {@link RequestOptions#addHeader} - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/web/remoteSharePoint) (Required)
+     *     kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/web/remoteSharePoint) (Required)
      *     name: String (Required)
      *     description: String (Optional)
      *     @odata.etag: String (Optional)
@@ -1427,9 +1142,9 @@ public PagedFlux listKnowledgeBases(RequestOptions requestOptions) {
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -1496,75 +1211,6 @@ public Mono> deleteKnowledgeSourceWithResponse(String name, Reque
         return this.serviceClient.deleteKnowledgeSourceWithResponseAsync(name, requestOptions);
     }
 
-    /**
-     * Lists all knowledge sources available for a search service.
-     * 

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/web/remoteSharePoint) (Required)
-     *     name: String (Required)
-     *     description: String (Optional)
-     *     @odata.etag: String (Optional)
-     *     encryptionKey (Optional): {
-     *         keyVaultKeyName: String (Required)
-     *         keyVaultKeyVersion: String (Optional)
-     *         keyVaultUri: String (Required)
-     *         accessCredentials (Optional): {
-     *             applicationId: String (Required)
-     *             applicationSecret: String (Optional)
-     *         }
-     *         identity (Optional): {
-     *             @odata.type: String (Required)
-     *         }
-     *     }
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return result from listing knowledge sources as paginated response with {@link PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listKnowledgeSources(RequestOptions requestOptions) { - return this.serviceClient.listKnowledgeSourcesAsync(requestOptions); - } - - /** - * Retrieves a summary of statistics for all indexes in the search service. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     documentCount: long (Required)
-     *     storageSize: long (Required)
-     *     vectorIndexSize: long (Required)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return response from a request to retrieve stats summary of all indexes as paginated response with - * {@link PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listIndexStatsSummary(RequestOptions requestOptions) { - return this.serviceClient.listIndexStatsSummaryAsync(requestOptions); - } - /** * Creates a new synonym map or updates a synonym map if it already exists. * @@ -1699,9 +1345,9 @@ public Mono deleteSynonymMap(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getSynonymMap(String name) { - // Generated convenience method for hiddenGeneratedgetSynonymMapWithResponse + // Generated convenience method for hiddenGeneratedGetSynonymMapWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetSynonymMapWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetSynonymMapWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SynonymMap.class)); } @@ -1842,9 +1488,9 @@ public Mono>> listSynonymMapNamesWithResponse() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSynonymMap(SynonymMap synonymMap) { - // Generated convenience method for hiddenGeneratedcreateSynonymMapWithResponse + // Generated convenience method for hiddenGeneratedCreateSynonymMapWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateSynonymMapWithResponse(BinaryData.fromObject(synonymMap), requestOptions) + return hiddenGeneratedCreateSynonymMapWithResponse(BinaryData.fromObject(synonymMap), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SynonymMap.class)); } @@ -1999,9 +1645,9 @@ public Mono deleteIndex(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getIndex(String name) { - // Generated convenience method for hiddenGeneratedgetIndexWithResponse + // Generated convenience method for hiddenGeneratedGetIndexWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetIndexWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndex.class)); } @@ -2021,7 +1667,7 @@ public Mono getIndex(String name) { @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listIndexes(List select) { - // Generated convenience method for listIndexes + // Generated convenience method for hiddenGeneratedListIndexes RequestOptions requestOptions = new RequestOptions(); if (select != null) { requestOptions.addQueryParam("$select", @@ -2030,7 +1676,7 @@ public PagedFlux listIndexes(List select) { .collect(Collectors.joining(",")), false); } - PagedFlux pagedFluxResponse = listIndexes(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListIndexes(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -2058,9 +1704,9 @@ public PagedFlux listIndexes(List select) { @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listIndexes() { - // Generated convenience method for listIndexes + // Generated convenience method for hiddenGeneratedListIndexes RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listIndexes(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListIndexes(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -2088,7 +1734,7 @@ public PagedFlux listIndexes() { @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listIndexNames() { RequestOptions requestOptions = new RequestOptions().addQueryParam("$select", "name"); - PagedFlux pagedFluxResponse = listIndexes(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListIndexes(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -2119,9 +1765,9 @@ public PagedFlux listIndexNames() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createIndex(SearchIndex index) { - // Generated convenience method for hiddenGeneratedcreateIndexWithResponse + // Generated convenience method for hiddenGeneratedCreateIndexWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateIndexWithResponse(BinaryData.fromObject(index), requestOptions) + return hiddenGeneratedCreateIndexWithResponse(BinaryData.fromObject(index), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndex.class)); } @@ -2141,9 +1787,9 @@ public Mono createIndex(SearchIndex index) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getIndexStatistics(String name) { - // Generated convenience method for hiddenGeneratedgetIndexStatisticsWithResponse + // Generated convenience method for hiddenGeneratedGetIndexStatisticsWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexStatisticsWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetIndexStatisticsWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(GetIndexStatisticsResult.class)); } @@ -2163,9 +1809,9 @@ public Mono getIndexStatistics(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono analyzeText(String name, AnalyzeTextOptions request) { - // Generated convenience method for hiddenGeneratedanalyzeTextWithResponse + // Generated convenience method for hiddenGeneratedAnalyzeTextWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedanalyzeTextWithResponse(name, BinaryData.fromObject(request), requestOptions) + return hiddenGeneratedAnalyzeTextWithResponse(name, BinaryData.fromObject(request), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AnalyzeResult.class)); } @@ -2310,9 +1956,9 @@ public Mono deleteAlias(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAlias(String name) { - // Generated convenience method for hiddenGeneratedgetAliasWithResponse + // Generated convenience method for hiddenGeneratedGetAliasWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetAliasWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetAliasWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchAlias.class)); } @@ -2329,9 +1975,9 @@ public Mono getAlias(String name) { @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAliases() { - // Generated convenience method for listAliases + // Generated convenience method for hiddenGeneratedListAliases RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listAliases(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListAliases(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -2362,9 +2008,9 @@ public PagedFlux listAliases() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAlias(SearchAlias alias) { - // Generated convenience method for hiddenGeneratedcreateAliasWithResponse + // Generated convenience method for hiddenGeneratedCreateAliasWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateAliasWithResponse(BinaryData.fromObject(alias), requestOptions) + return hiddenGeneratedCreateAliasWithResponse(BinaryData.fromObject(alias), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchAlias.class)); } @@ -2487,9 +2133,9 @@ public Mono deleteKnowledgeBase(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getKnowledgeBase(String name) { - // Generated convenience method for hiddenGeneratedgetKnowledgeBaseWithResponse + // Generated convenience method for hiddenGeneratedGetKnowledgeBaseWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetKnowledgeBaseWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetKnowledgeBaseWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeBase.class)); } @@ -2506,9 +2152,9 @@ public Mono getKnowledgeBase(String name) { @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listKnowledgeBases() { - // Generated convenience method for listKnowledgeBases + // Generated convenience method for hiddenGeneratedListKnowledgeBases RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listKnowledgeBases(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListKnowledgeBases(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -2538,9 +2184,9 @@ public PagedFlux listKnowledgeBases() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createKnowledgeBase(KnowledgeBase knowledgeBase) { - // Generated convenience method for hiddenGeneratedcreateKnowledgeBaseWithResponse + // Generated convenience method for hiddenGeneratedCreateKnowledgeBaseWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateKnowledgeBaseWithResponse(BinaryData.fromObject(knowledgeBase), requestOptions) + return hiddenGeneratedCreateKnowledgeBaseWithResponse(BinaryData.fromObject(knowledgeBase), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeBase.class)); } @@ -2680,9 +2326,9 @@ public Mono deleteKnowledgeSource(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getKnowledgeSource(String name) { - // Generated convenience method for hiddenGeneratedgetKnowledgeSourceWithResponse + // Generated convenience method for hiddenGeneratedGetKnowledgeSourceWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetKnowledgeSourceWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetKnowledgeSourceWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeSource.class)); } @@ -2699,9 +2345,9 @@ public Mono getKnowledgeSource(String name) { @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listKnowledgeSources() { - // Generated convenience method for listKnowledgeSources + // Generated convenience method for hiddenGeneratedListKnowledgeSources RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listKnowledgeSources(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListKnowledgeSources(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -2731,9 +2377,9 @@ public PagedFlux listKnowledgeSources() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createKnowledgeSource(KnowledgeSource knowledgeSource) { - // Generated convenience method for hiddenGeneratedcreateKnowledgeSourceWithResponse + // Generated convenience method for hiddenGeneratedCreateKnowledgeSourceWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateKnowledgeSourceWithResponse(BinaryData.fromObject(knowledgeSource), requestOptions) + return hiddenGeneratedCreateKnowledgeSourceWithResponse(BinaryData.fromObject(knowledgeSource), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeSource.class)); } @@ -2754,9 +2400,9 @@ public Mono createKnowledgeSource(KnowledgeSource knowledgeSour @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getKnowledgeSourceStatus(String name) { - // Generated convenience method for hiddenGeneratedgetKnowledgeSourceStatusWithResponse + // Generated convenience method for hiddenGeneratedGetKnowledgeSourceStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetKnowledgeSourceStatusWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetKnowledgeSourceStatusWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeSourceStatus.class)); } @@ -2773,9 +2419,9 @@ public Mono getKnowledgeSourceStatus(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getServiceStatistics() { - // Generated convenience method for hiddenGeneratedgetServiceStatisticsWithResponse + // Generated convenience method for hiddenGeneratedGetServiceStatisticsWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetServiceStatisticsWithResponse(requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetServiceStatisticsWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchServiceStatistics.class)); } @@ -2793,9 +2439,9 @@ public Mono getServiceStatistics() { @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listIndexStatsSummary() { - // Generated convenience method for listIndexStatsSummary + // Generated convenience method for hiddenGeneratedListIndexStatsSummary RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listIndexStatsSummary(requestOptions); + PagedFlux pagedFluxResponse = hiddenGeneratedListIndexStatsSummary(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) @@ -3067,10 +2713,156 @@ public Mono> getServiceStatisticsWithResponse( SearchServiceStatistics.class); } + /** + * Lists all indexes available for a search service. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
$selectList<String>NoSelects which top-level properties to retrieve. + * Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all + * properties. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a List Indexes request as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listIndexes(RequestOptions requestOptions) { + PagedFlux pagedFluxResponse = this.serviceClient.listIndexesAsync(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(SearchIndex.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Lists all aliases available for a search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a List Aliases request as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAliases(RequestOptions requestOptions) { + PagedFlux pagedFluxResponse = this.serviceClient.listAliasesAsync(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(SearchAlias.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Lists all knowledge bases available for a search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge bases as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listKnowledgeBases(RequestOptions requestOptions) { + PagedFlux pagedFluxResponse = this.serviceClient.listKnowledgeBasesAsync(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeBase.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Lists all knowledge sources available for a search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge sources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listKnowledgeSources(RequestOptions requestOptions) { + PagedFlux pagedFluxResponse = this.serviceClient.listKnowledgeSourcesAsync(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeSource.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieves a summary of statistics for all indexes in the search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a request to retrieve stats summary of all indexes as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listIndexStatsSummary(RequestOptions requestOptions) { + PagedFlux pagedFluxResponse = this.serviceClient.listIndexStatsSummaryAsync(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux + .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(IndexStatisticsSummary.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + /** * Retrieves a synonym map definition. *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3106,14 +2898,14 @@ public Mono> getServiceStatisticsWithResponse(
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetSynonymMapWithResponse(String name, RequestOptions requestOptions) {
+    Mono> hiddenGeneratedGetSynonymMapWithResponse(String name, RequestOptions requestOptions) {
         return this.serviceClient.getSynonymMapWithResponseAsync(name, requestOptions);
     }
 
     /**
      * Creates a new synonym map.
      * 

Request Body Schema

- * + * *
      * {@code
      * {
@@ -3138,9 +2930,9 @@ Mono> hiddenGeneratedgetSynonymMapWithResponse(String name,
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3166,25 +2958,228 @@ Mono> hiddenGeneratedgetSynonymMapWithResponse(String name,
      * }
      * 
* - * @param synonymMap The definition of the synonym map to create. + * @param synonymMap The definition of the synonym map to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return represents a synonym map definition along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> hiddenGeneratedCreateSynonymMapWithResponse(BinaryData synonymMap, + RequestOptions requestOptions) { + return this.serviceClient.createSynonymMapWithResponseAsync(synonymMap, requestOptions); + } + + /** + * Retrieves an index definition. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     description: String (Optional)
+     *     fields (Required): [
+     *          (Required){
+     *             name: String (Required)
+     *             type: String(Edm.String/Edm.Int32/Edm.Int64/Edm.Double/Edm.Boolean/Edm.DateTimeOffset/Edm.GeographyPoint/Edm.ComplexType/Edm.Single/Edm.Half/Edm.Int16/Edm.SByte/Edm.Byte) (Required)
+     *             key: Boolean (Optional)
+     *             retrievable: Boolean (Optional)
+     *             stored: Boolean (Optional)
+     *             searchable: Boolean (Optional)
+     *             filterable: Boolean (Optional)
+     *             sortable: Boolean (Optional)
+     *             facetable: Boolean (Optional)
+     *             permissionFilter: String(userIds/groupIds/rbacScope) (Optional)
+     *             sensitivityLabel: Boolean (Optional)
+     *             analyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
+     *             searchAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
+     *             indexAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
+     *             normalizer: String(asciifolding/elision/lowercase/standard/uppercase) (Optional)
+     *             dimensions: Integer (Optional)
+     *             vectorSearchProfile: String (Optional)
+     *             vectorEncoding: String(packedBit) (Optional)
+     *             synonymMaps (Optional): [
+     *                 String (Optional)
+     *             ]
+     *             fields (Optional): [
+     *                 (recursive schema, see above)
+     *             ]
+     *         }
+     *     ]
+     *     scoringProfiles (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             text (Optional): {
+     *                 weights (Required): {
+     *                     String: double (Required)
+     *                 }
+     *             }
+     *             functions (Optional): [
+     *                  (Optional){
+     *                     type: String (Required)
+     *                     fieldName: String (Required)
+     *                     boost: double (Required)
+     *                     interpolation: String(linear/constant/quadratic/logarithmic) (Optional)
+     *                 }
+     *             ]
+     *             functionAggregation: String(sum/average/minimum/maximum/firstMatching/product) (Optional)
+     *         }
+     *     ]
+     *     defaultScoringProfile: String (Optional)
+     *     corsOptions (Optional): {
+     *         allowedOrigins (Required): [
+     *             String (Required)
+     *         ]
+     *         maxAgeInSeconds: Long (Optional)
+     *     }
+     *     suggesters (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             searchMode: String (Required)
+     *             sourceFields (Required): [
+     *                 String (Required)
+     *             ]
+     *         }
+     *     ]
+     *     analyzers (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     tokenizers (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     tokenFilters (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     charFilters (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     normalizers (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     encryptionKey (Optional): {
+     *         keyVaultKeyName: String (Required)
+     *         keyVaultKeyVersion: String (Optional)
+     *         keyVaultUri: String (Required)
+     *         accessCredentials (Optional): {
+     *             applicationId: String (Required)
+     *             applicationSecret: String (Optional)
+     *         }
+     *         identity (Optional): {
+     *             @odata.type: String (Required)
+     *         }
+     *     }
+     *     similarity (Optional): {
+     *         @odata.type: String (Required)
+     *     }
+     *     semantic (Optional): {
+     *         defaultConfiguration: String (Optional)
+     *         configurations (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 prioritizedFields (Required): {
+     *                     titleField (Optional): {
+     *                         fieldName: String (Required)
+     *                     }
+     *                     prioritizedContentFields (Optional): [
+     *                         (recursive schema, see above)
+     *                     ]
+     *                     prioritizedKeywordsFields (Optional): [
+     *                         (recursive schema, see above)
+     *                     ]
+     *                 }
+     *                 rankingOrder: String(BoostedRerankerScore/RerankerScore) (Optional)
+     *                 flightingOptIn: Boolean (Optional)
+     *             }
+     *         ]
+     *     }
+     *     vectorSearch (Optional): {
+     *         profiles (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 algorithm: String (Required)
+     *                 vectorizer: String (Optional)
+     *                 compression: String (Optional)
+     *             }
+     *         ]
+     *         algorithms (Optional): [
+     *              (Optional){
+     *                 kind: String(hnsw/exhaustiveKnn) (Required)
+     *                 name: String (Required)
+     *             }
+     *         ]
+     *         vectorizers (Optional): [
+     *              (Optional){
+     *                 kind: String(azureOpenAI/customWebApi/aiServicesVision/aml) (Required)
+     *                 name: String (Required)
+     *             }
+     *         ]
+     *         compressions (Optional): [
+     *              (Optional){
+     *                 kind: String(scalarQuantization/binaryQuantization) (Required)
+     *                 name: String (Required)
+     *                 rescoringOptions (Optional): {
+     *                     enableRescoring: Boolean (Optional)
+     *                     defaultOversampling: Double (Optional)
+     *                     rescoreStorageMethod: String(preserveOriginals/discardOriginals) (Optional)
+     *                 }
+     *                 truncationDimension: Integer (Optional)
+     *             }
+     *         ]
+     *     }
+     *     permissionFilterOption: String(enabled/disabled) (Optional)
+     *     purviewEnabled: Boolean (Optional)
+     *     @odata.etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param name The name of the index. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents a synonym map definition along with {@link Response} on successful completion of {@link Mono}. + * @return represents a search index definition, which describes the fields and search behavior of an index along + * with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedcreateSynonymMapWithResponse(BinaryData synonymMap, - RequestOptions requestOptions) { - return this.serviceClient.createSynonymMapWithResponseAsync(synonymMap, requestOptions); + Mono> hiddenGeneratedGetIndexWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.getIndexWithResponseAsync(name, requestOptions); } /** - * Retrieves an index definition. + * Lists all indexes available for a search service. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
$selectList<String>NoSelects which top-level properties to retrieve. + * Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all + * properties. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3360,25 +3355,23 @@ Mono> hiddenGeneratedcreateSynonymMapWithResponse(BinaryDat
      * }
      * 
* - * @param name The name of the index. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents a search index definition, which describes the fields and search behavior of an index along - * with {@link Response} on successful completion of {@link Mono}. + * @return response from a List Indexes request as paginated response with {@link PagedFlux}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetIndexWithResponse(String name, RequestOptions requestOptions) { - return this.serviceClient.getIndexWithResponseAsync(name, requestOptions); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux hiddenGeneratedListIndexes(RequestOptions requestOptions) { + return this.serviceClient.listIndexesAsync(requestOptions); } /** * Creates a new search index. *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -3553,9 +3546,9 @@ Mono> hiddenGeneratedgetIndexWithResponse(String name, Requ
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3742,14 +3735,14 @@ Mono> hiddenGeneratedgetIndexWithResponse(String name, Requ
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedcreateIndexWithResponse(BinaryData index, RequestOptions requestOptions) {
+    Mono> hiddenGeneratedCreateIndexWithResponse(BinaryData index, RequestOptions requestOptions) {
         return this.serviceClient.createIndexWithResponseAsync(index, requestOptions);
     }
 
     /**
      * Returns statistics for the given index, including a document count and storage usage.
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3770,7 +3763,7 @@ Mono> hiddenGeneratedcreateIndexWithResponse(BinaryData ind
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetIndexStatisticsWithResponse(String name,
+    Mono> hiddenGeneratedGetIndexStatisticsWithResponse(String name,
         RequestOptions requestOptions) {
         return this.serviceClient.getIndexStatisticsWithResponseAsync(name, requestOptions);
     }
@@ -3778,7 +3771,7 @@ Mono> hiddenGeneratedgetIndexStatisticsWithResponse(String
     /**
      * Shows how an analyzer breaks text into tokens.
      * 

Request Body Schema

- * + * *
      * {@code
      * {
@@ -3795,9 +3788,9 @@ Mono> hiddenGeneratedgetIndexStatisticsWithResponse(String
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3825,7 +3818,7 @@ Mono> hiddenGeneratedgetIndexStatisticsWithResponse(String
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedanalyzeTextWithResponse(String name, BinaryData request,
+    Mono> hiddenGeneratedAnalyzeTextWithResponse(String name, BinaryData request,
         RequestOptions requestOptions) {
         return this.serviceClient.analyzeTextWithResponseAsync(name, request, requestOptions);
     }
@@ -3833,7 +3826,7 @@ Mono> hiddenGeneratedanalyzeTextWithResponse(String name, B
     /**
      * Retrieves an alias definition.
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3857,14 +3850,43 @@ Mono> hiddenGeneratedanalyzeTextWithResponse(String name, B
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetAliasWithResponse(String name, RequestOptions requestOptions) {
+    Mono> hiddenGeneratedGetAliasWithResponse(String name, RequestOptions requestOptions) {
         return this.serviceClient.getAliasWithResponseAsync(name, requestOptions);
     }
 
+    /**
+     * Lists all aliases available for a search service.
+     * 

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     indexes (Required): [
+     *         String (Required)
+     *     ]
+     *     @odata.etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a List Aliases request as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux hiddenGeneratedListAliases(RequestOptions requestOptions) { + return this.serviceClient.listAliasesAsync(requestOptions); + } + /** * Creates a new search alias. *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -3876,9 +3898,9 @@ Mono> hiddenGeneratedgetAliasWithResponse(String name, Requ
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3902,14 +3924,14 @@ Mono> hiddenGeneratedgetAliasWithResponse(String name, Requ
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedcreateAliasWithResponse(BinaryData alias, RequestOptions requestOptions) {
+    Mono> hiddenGeneratedCreateAliasWithResponse(BinaryData alias, RequestOptions requestOptions) {
         return this.serviceClient.createAliasWithResponseAsync(alias, requestOptions);
     }
 
     /**
      * Retrieves a knowledge base definition.
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -3959,14 +3981,69 @@ Mono> hiddenGeneratedcreateAliasWithResponse(BinaryData ali
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetKnowledgeBaseWithResponse(String name, RequestOptions requestOptions) {
+    Mono> hiddenGeneratedGetKnowledgeBaseWithResponse(String name, RequestOptions requestOptions) {
         return this.serviceClient.getKnowledgeBaseWithResponseAsync(name, requestOptions);
     }
 
+    /**
+     * Lists all knowledge bases available for a search service.
+     * 

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     knowledgeSources (Required): [
+     *          (Required){
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     models (Optional): [
+     *          (Optional){
+     *             kind: String(azureOpenAI) (Required)
+     *         }
+     *     ]
+     *     retrievalReasoningEffort (Optional): {
+     *         kind: String(minimal/low/medium) (Required)
+     *     }
+     *     outputMode: String(extractiveData/answerSynthesis) (Optional)
+     *     @odata.etag: String (Optional)
+     *     encryptionKey (Optional): {
+     *         keyVaultKeyName: String (Required)
+     *         keyVaultKeyVersion: String (Optional)
+     *         keyVaultUri: String (Required)
+     *         accessCredentials (Optional): {
+     *             applicationId: String (Required)
+     *             applicationSecret: String (Optional)
+     *         }
+     *         identity (Optional): {
+     *             @odata.type: String (Required)
+     *         }
+     *     }
+     *     description: String (Optional)
+     *     retrievalInstructions: String (Optional)
+     *     answerInstructions: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge bases as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux hiddenGeneratedListKnowledgeBases(RequestOptions requestOptions) { + return this.serviceClient.listKnowledgeBasesAsync(requestOptions); + } + /** * Creates a new knowledge base. *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -4004,9 +4081,9 @@ Mono> hiddenGeneratedgetKnowledgeBaseWithResponse(String na
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -4056,7 +4133,7 @@ Mono> hiddenGeneratedgetKnowledgeBaseWithResponse(String na
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedcreateKnowledgeBaseWithResponse(BinaryData knowledgeBase,
+    Mono> hiddenGeneratedCreateKnowledgeBaseWithResponse(BinaryData knowledgeBase,
         RequestOptions requestOptions) {
         return this.serviceClient.createKnowledgeBaseWithResponseAsync(knowledgeBase, requestOptions);
     }
@@ -4064,7 +4141,7 @@ Mono> hiddenGeneratedcreateKnowledgeBaseWithResponse(Binary
     /**
      * Retrieves a knowledge source definition.
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -4099,15 +4176,55 @@ Mono> hiddenGeneratedcreateKnowledgeBaseWithResponse(Binary
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetKnowledgeSourceWithResponse(String name,
+    Mono> hiddenGeneratedGetKnowledgeSourceWithResponse(String name,
         RequestOptions requestOptions) {
         return this.serviceClient.getKnowledgeSourceWithResponseAsync(name, requestOptions);
     }
 
+    /**
+     * Lists all knowledge sources available for a search service.
+     * 

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/web/remoteSharePoint) (Required)
+     *     name: String (Required)
+     *     description: String (Optional)
+     *     @odata.etag: String (Optional)
+     *     encryptionKey (Optional): {
+     *         keyVaultKeyName: String (Required)
+     *         keyVaultKeyVersion: String (Optional)
+     *         keyVaultUri: String (Required)
+     *         accessCredentials (Optional): {
+     *             applicationId: String (Required)
+     *             applicationSecret: String (Optional)
+     *         }
+     *         identity (Optional): {
+     *             @odata.type: String (Required)
+     *         }
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge sources as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux hiddenGeneratedListKnowledgeSources(RequestOptions requestOptions) { + return this.serviceClient.listKnowledgeSourcesAsync(requestOptions); + } + /** * Creates a new knowledge source. *

Request Body Schema

- * + * *
      * {@code
      * {
@@ -4130,9 +4247,9 @@ Mono> hiddenGeneratedgetKnowledgeSourceWithResponse(String
      * }
      * }
      * 
- * + * *

Response Body Schema

- * + * *
      * {@code
      * {
@@ -4167,7 +4284,7 @@ Mono> hiddenGeneratedgetKnowledgeSourceWithResponse(String
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedcreateKnowledgeSourceWithResponse(BinaryData knowledgeSource,
+    Mono> hiddenGeneratedCreateKnowledgeSourceWithResponse(BinaryData knowledgeSource,
         RequestOptions requestOptions) {
         return this.serviceClient.createKnowledgeSourceWithResponseAsync(knowledgeSource, requestOptions);
     }
@@ -4175,7 +4292,7 @@ Mono> hiddenGeneratedcreateKnowledgeSourceWithResponse(Bina
     /**
      * Retrieves the status of a knowledge source.
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -4214,7 +4331,7 @@ Mono> hiddenGeneratedcreateKnowledgeSourceWithResponse(Bina
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetKnowledgeSourceStatusWithResponse(String name,
+    Mono> hiddenGeneratedGetKnowledgeSourceStatusWithResponse(String name,
         RequestOptions requestOptions) {
         return this.serviceClient.getKnowledgeSourceStatusWithResponseAsync(name, requestOptions);
     }
@@ -4222,7 +4339,7 @@ Mono> hiddenGeneratedgetKnowledgeSourceStatusWithResponse(S
     /**
      * Gets service level statistics for a search service.
      * 

Response Body Schema

- * + * *
      * {@code
      * {
@@ -4268,7 +4385,36 @@ Mono> hiddenGeneratedgetKnowledgeSourceStatusWithResponse(S
      */
     @Generated
     @ServiceMethod(returns = ReturnType.SINGLE)
-    Mono> hiddenGeneratedgetServiceStatisticsWithResponse(RequestOptions requestOptions) {
+    Mono> hiddenGeneratedGetServiceStatisticsWithResponse(RequestOptions requestOptions) {
         return this.serviceClient.getServiceStatisticsWithResponseAsync(requestOptions);
     }
+
+    /**
+     * Retrieves a summary of statistics for all indexes in the search service.
+     * 

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     documentCount: long (Required)
+     *     storageSize: long (Required)
+     *     vectorIndexSize: long (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a request to retrieve stats summary of all indexes as paginated response with + * {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux hiddenGeneratedListIndexStatsSummary(RequestOptions requestOptions) { + return this.serviceClient.listIndexStatsSummaryAsync(requestOptions); + } } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java index fbda036a2991..524d2c673ac0 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java @@ -851,207 +851,6 @@ public Response deleteIndexWithResponse(String name, RequestOptions reques return this.serviceClient.deleteIndexWithResponse(name, requestOptions); } - /** - * Lists all indexes available for a search service. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
$selectList<String>NoSelects which top-level properties to retrieve. - * Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all - * properties. In the form of "," separated string.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     description: String (Optional)
-     *     fields (Required): [
-     *          (Required){
-     *             name: String (Required)
-     *             type: String(Edm.String/Edm.Int32/Edm.Int64/Edm.Double/Edm.Boolean/Edm.DateTimeOffset/Edm.GeographyPoint/Edm.ComplexType/Edm.Single/Edm.Half/Edm.Int16/Edm.SByte/Edm.Byte) (Required)
-     *             key: Boolean (Optional)
-     *             retrievable: Boolean (Optional)
-     *             stored: Boolean (Optional)
-     *             searchable: Boolean (Optional)
-     *             filterable: Boolean (Optional)
-     *             sortable: Boolean (Optional)
-     *             facetable: Boolean (Optional)
-     *             permissionFilter: String(userIds/groupIds/rbacScope) (Optional)
-     *             sensitivityLabel: Boolean (Optional)
-     *             analyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
-     *             searchAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
-     *             indexAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
-     *             normalizer: String(asciifolding/elision/lowercase/standard/uppercase) (Optional)
-     *             dimensions: Integer (Optional)
-     *             vectorSearchProfile: String (Optional)
-     *             vectorEncoding: String(packedBit) (Optional)
-     *             synonymMaps (Optional): [
-     *                 String (Optional)
-     *             ]
-     *             fields (Optional): [
-     *                 (recursive schema, see above)
-     *             ]
-     *         }
-     *     ]
-     *     scoringProfiles (Optional): [
-     *          (Optional){
-     *             name: String (Required)
-     *             text (Optional): {
-     *                 weights (Required): {
-     *                     String: double (Required)
-     *                 }
-     *             }
-     *             functions (Optional): [
-     *                  (Optional){
-     *                     type: String (Required)
-     *                     fieldName: String (Required)
-     *                     boost: double (Required)
-     *                     interpolation: String(linear/constant/quadratic/logarithmic) (Optional)
-     *                 }
-     *             ]
-     *             functionAggregation: String(sum/average/minimum/maximum/firstMatching/product) (Optional)
-     *         }
-     *     ]
-     *     defaultScoringProfile: String (Optional)
-     *     corsOptions (Optional): {
-     *         allowedOrigins (Required): [
-     *             String (Required)
-     *         ]
-     *         maxAgeInSeconds: Long (Optional)
-     *     }
-     *     suggesters (Optional): [
-     *          (Optional){
-     *             name: String (Required)
-     *             searchMode: String (Required)
-     *             sourceFields (Required): [
-     *                 String (Required)
-     *             ]
-     *         }
-     *     ]
-     *     analyzers (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     tokenizers (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     tokenFilters (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     charFilters (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     normalizers (Optional): [
-     *          (Optional){
-     *             @odata.type: String (Required)
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     encryptionKey (Optional): {
-     *         keyVaultKeyName: String (Required)
-     *         keyVaultKeyVersion: String (Optional)
-     *         keyVaultUri: String (Required)
-     *         accessCredentials (Optional): {
-     *             applicationId: String (Required)
-     *             applicationSecret: String (Optional)
-     *         }
-     *         identity (Optional): {
-     *             @odata.type: String (Required)
-     *         }
-     *     }
-     *     similarity (Optional): {
-     *         @odata.type: String (Required)
-     *     }
-     *     semantic (Optional): {
-     *         defaultConfiguration: String (Optional)
-     *         configurations (Optional): [
-     *              (Optional){
-     *                 name: String (Required)
-     *                 prioritizedFields (Required): {
-     *                     titleField (Optional): {
-     *                         fieldName: String (Required)
-     *                     }
-     *                     prioritizedContentFields (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                     prioritizedKeywordsFields (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 rankingOrder: String(BoostedRerankerScore/RerankerScore) (Optional)
-     *                 flightingOptIn: Boolean (Optional)
-     *             }
-     *         ]
-     *     }
-     *     vectorSearch (Optional): {
-     *         profiles (Optional): [
-     *              (Optional){
-     *                 name: String (Required)
-     *                 algorithm: String (Required)
-     *                 vectorizer: String (Optional)
-     *                 compression: String (Optional)
-     *             }
-     *         ]
-     *         algorithms (Optional): [
-     *              (Optional){
-     *                 kind: String(hnsw/exhaustiveKnn) (Required)
-     *                 name: String (Required)
-     *             }
-     *         ]
-     *         vectorizers (Optional): [
-     *              (Optional){
-     *                 kind: String(azureOpenAI/customWebApi/aiServicesVision/aml) (Required)
-     *                 name: String (Required)
-     *             }
-     *         ]
-     *         compressions (Optional): [
-     *              (Optional){
-     *                 kind: String(scalarQuantization/binaryQuantization) (Required)
-     *                 name: String (Required)
-     *                 rescoringOptions (Optional): {
-     *                     enableRescoring: Boolean (Optional)
-     *                     defaultOversampling: Double (Optional)
-     *                     rescoreStorageMethod: String(preserveOriginals/discardOriginals) (Optional)
-     *                 }
-     *                 truncationDimension: Integer (Optional)
-     *             }
-     *         ]
-     *     }
-     *     permissionFilterOption: String(enabled/disabled) (Optional)
-     *     purviewEnabled: Boolean (Optional)
-     *     @odata.etag: String (Optional)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return response from a List Indexes request as paginated response with {@link PagedIterable}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listIndexes(RequestOptions requestOptions) { - return this.serviceClient.listIndexes(requestOptions); - } - /** * Creates a new search alias or updates an alias if it already exists. *

Header Parameters

@@ -1163,35 +962,6 @@ public Response deleteAliasWithResponse(String name, RequestOptions reques return this.serviceClient.deleteAliasWithResponse(name, requestOptions); } - /** - * Lists all aliases available for a search service. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     indexes (Required): [
-     *         String (Required)
-     *     ]
-     *     @odata.etag: String (Optional)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return response from a List Aliases request as paginated response with {@link PagedIterable}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAliases(RequestOptions requestOptions) { - return this.serviceClient.listAliases(requestOptions); - } - /** * Creates a new knowledge base or updates a knowledge base if it already exists. *

Header Parameters

@@ -1354,61 +1124,6 @@ public Response deleteKnowledgeBaseWithResponse(String name, RequestOption return this.serviceClient.deleteKnowledgeBaseWithResponse(name, requestOptions); } - /** - * Lists all knowledge bases available for a search service. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     knowledgeSources (Required): [
-     *          (Required){
-     *             name: String (Required)
-     *         }
-     *     ]
-     *     models (Optional): [
-     *          (Optional){
-     *             kind: String(azureOpenAI) (Required)
-     *         }
-     *     ]
-     *     retrievalReasoningEffort (Optional): {
-     *         kind: String(minimal/low/medium) (Required)
-     *     }
-     *     outputMode: String(extractiveData/answerSynthesis) (Optional)
-     *     @odata.etag: String (Optional)
-     *     encryptionKey (Optional): {
-     *         keyVaultKeyName: String (Required)
-     *         keyVaultKeyVersion: String (Optional)
-     *         keyVaultUri: String (Required)
-     *         accessCredentials (Optional): {
-     *             applicationId: String (Required)
-     *             applicationSecret: String (Optional)
-     *         }
-     *         identity (Optional): {
-     *             @odata.type: String (Required)
-     *         }
-     *     }
-     *     description: String (Optional)
-     *     retrievalInstructions: String (Optional)
-     *     answerInstructions: String (Optional)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return result from listing knowledge bases as paginated response with {@link PagedIterable}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listKnowledgeBases(RequestOptions requestOptions) { - return this.serviceClient.listKnowledgeBases(requestOptions); - } - /** * Creates a new knowledge source or updates an knowledge source if it already exists. *

Header Parameters

@@ -1511,103 +1226,34 @@ Response createOrUpdateKnowledgeSourceWithResponse(String name, Bina @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateKnowledgeSourceWithResponse(KnowledgeSource knowledgeSource, RequestOptions requestOptions) { - return convertResponse(this.serviceClient.createOrUpdateKnowledgeSourceWithResponse(knowledgeSource.getName(), - BinaryData.fromObject(knowledgeSource), requestOptions), KnowledgeSource.class); - } - - /** - * Deletes an existing knowledge source. - *

Header Parameters

- * - * - * - * - * - *
Header Parameters
NameTypeRequiredDescription
If-MatchStringNoDefines the If-Match condition. The operation will be - * performed only if the ETag on the server matches this value.
If-None-MatchStringNoDefines the If-None-Match condition. The operation will - * be performed only if the ETag on the server does not match this value.
- * You can add these to a request with {@link RequestOptions#addHeader} - * - * @param name The name of the knowledge source. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteKnowledgeSourceWithResponse(String name, RequestOptions requestOptions) { - return this.serviceClient.deleteKnowledgeSourceWithResponse(name, requestOptions); - } - - /** - * Lists all knowledge sources available for a search service. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/web/remoteSharePoint) (Required)
-     *     name: String (Required)
-     *     description: String (Optional)
-     *     @odata.etag: String (Optional)
-     *     encryptionKey (Optional): {
-     *         keyVaultKeyName: String (Required)
-     *         keyVaultKeyVersion: String (Optional)
-     *         keyVaultUri: String (Required)
-     *         accessCredentials (Optional): {
-     *             applicationId: String (Required)
-     *             applicationSecret: String (Optional)
-     *         }
-     *         identity (Optional): {
-     *             @odata.type: String (Required)
-     *         }
-     *     }
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return result from listing knowledge sources as paginated response with {@link PagedIterable}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listKnowledgeSources(RequestOptions requestOptions) { - return this.serviceClient.listKnowledgeSources(requestOptions); + return convertResponse(this.serviceClient.createOrUpdateKnowledgeSourceWithResponse(knowledgeSource.getName(), + BinaryData.fromObject(knowledgeSource), requestOptions), KnowledgeSource.class); } /** - * Retrieves a summary of statistics for all indexes in the search service. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     documentCount: long (Required)
-     *     storageSize: long (Required)
-     *     vectorIndexSize: long (Required)
-     * }
-     * }
-     * 
+ * Deletes an existing knowledge source. + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-MatchStringNoDefines the If-Match condition. The operation will be + * performed only if the ETag on the server matches this value.
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} * + * @param name The name of the knowledge source. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return response from a request to retrieve stats summary of all indexes as paginated response with - * {@link PagedIterable}. + * @return the {@link Response}. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listIndexStatsSummary(RequestOptions requestOptions) { - return this.serviceClient.listIndexStatsSummary(requestOptions); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteKnowledgeSourceWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.deleteKnowledgeSourceWithResponse(name, requestOptions); } /** @@ -1740,9 +1386,9 @@ public void deleteSynonymMap(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SynonymMap getSynonymMap(String name) { - // Generated convenience method for hiddenGeneratedgetSynonymMapWithResponse + // Generated convenience method for hiddenGeneratedGetSynonymMapWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetSynonymMapWithResponse(name, requestOptions).getValue().toObject(SynonymMap.class); + return hiddenGeneratedGetSynonymMapWithResponse(name, requestOptions).getValue().toObject(SynonymMap.class); } /** @@ -1879,9 +1525,9 @@ public Response> listSynonymMapNamesWithResponse() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SynonymMap createSynonymMap(SynonymMap synonymMap) { - // Generated convenience method for hiddenGeneratedcreateSynonymMapWithResponse + // Generated convenience method for hiddenGeneratedCreateSynonymMapWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateSynonymMapWithResponse(BinaryData.fromObject(synonymMap), requestOptions).getValue() + return hiddenGeneratedCreateSynonymMapWithResponse(BinaryData.fromObject(synonymMap), requestOptions).getValue() .toObject(SynonymMap.class); } @@ -2027,9 +1673,9 @@ public void deleteIndex(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndex getIndex(String name) { - // Generated convenience method for hiddenGeneratedgetIndexWithResponse + // Generated convenience method for hiddenGeneratedGetIndexWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexWithResponse(name, requestOptions).getValue().toObject(SearchIndex.class); + return hiddenGeneratedGetIndexWithResponse(name, requestOptions).getValue().toObject(SearchIndex.class); } /** @@ -2110,9 +1756,9 @@ public PagedIterable listIndexNames() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndex createIndex(SearchIndex index) { - // Generated convenience method for hiddenGeneratedcreateIndexWithResponse + // Generated convenience method for hiddenGeneratedCreateIndexWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateIndexWithResponse(BinaryData.fromObject(index), requestOptions).getValue() + return hiddenGeneratedCreateIndexWithResponse(BinaryData.fromObject(index), requestOptions).getValue() .toObject(SearchIndex.class); } @@ -2131,9 +1777,9 @@ public SearchIndex createIndex(SearchIndex index) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public GetIndexStatisticsResult getIndexStatistics(String name) { - // Generated convenience method for hiddenGeneratedgetIndexStatisticsWithResponse + // Generated convenience method for hiddenGeneratedGetIndexStatisticsWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexStatisticsWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetIndexStatisticsWithResponse(name, requestOptions).getValue() .toObject(GetIndexStatisticsResult.class); } @@ -2153,9 +1799,9 @@ public GetIndexStatisticsResult getIndexStatistics(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public AnalyzeResult analyzeText(String name, AnalyzeTextOptions request) { - // Generated convenience method for hiddenGeneratedanalyzeTextWithResponse + // Generated convenience method for hiddenGeneratedAnalyzeTextWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedanalyzeTextWithResponse(name, BinaryData.fromObject(request), requestOptions).getValue() + return hiddenGeneratedAnalyzeTextWithResponse(name, BinaryData.fromObject(request), requestOptions).getValue() .toObject(AnalyzeResult.class); } @@ -2291,9 +1937,9 @@ public void deleteAlias(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchAlias getAlias(String name) { - // Generated convenience method for hiddenGeneratedgetAliasWithResponse + // Generated convenience method for hiddenGeneratedGetAliasWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetAliasWithResponse(name, requestOptions).getValue().toObject(SearchAlias.class); + return hiddenGeneratedGetAliasWithResponse(name, requestOptions).getValue().toObject(SearchAlias.class); } /** @@ -2330,9 +1976,9 @@ public PagedIterable listAliases() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchAlias createAlias(SearchAlias alias) { - // Generated convenience method for hiddenGeneratedcreateAliasWithResponse + // Generated convenience method for hiddenGeneratedCreateAliasWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateAliasWithResponse(BinaryData.fromObject(alias), requestOptions).getValue() + return hiddenGeneratedCreateAliasWithResponse(BinaryData.fromObject(alias), requestOptions).getValue() .toObject(SearchAlias.class); } @@ -2469,9 +2115,9 @@ public void deleteKnowledgeBase(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeBase getKnowledgeBase(String name) { - // Generated convenience method for hiddenGeneratedgetKnowledgeBaseWithResponse + // Generated convenience method for hiddenGeneratedGetKnowledgeBaseWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetKnowledgeBaseWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetKnowledgeBaseWithResponse(name, requestOptions).getValue() .toObject(KnowledgeBase.class); } @@ -2509,9 +2155,9 @@ public PagedIterable listKnowledgeBases() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeBase createKnowledgeBase(KnowledgeBase knowledgeBase) { - // Generated convenience method for hiddenGeneratedcreateKnowledgeBaseWithResponse + // Generated convenience method for hiddenGeneratedCreateKnowledgeBaseWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateKnowledgeBaseWithResponse(BinaryData.fromObject(knowledgeBase), requestOptions) + return hiddenGeneratedCreateKnowledgeBaseWithResponse(BinaryData.fromObject(knowledgeBase), requestOptions) .getValue() .toObject(KnowledgeBase.class); } @@ -2649,9 +2295,9 @@ public void deleteKnowledgeSource(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeSource getKnowledgeSource(String name) { - // Generated convenience method for hiddenGeneratedgetKnowledgeSourceWithResponse + // Generated convenience method for hiddenGeneratedGetKnowledgeSourceWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetKnowledgeSourceWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetKnowledgeSourceWithResponse(name, requestOptions).getValue() .toObject(KnowledgeSource.class); } @@ -2689,9 +2335,9 @@ public PagedIterable listKnowledgeSources() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeSource createKnowledgeSource(KnowledgeSource knowledgeSource) { - // Generated convenience method for hiddenGeneratedcreateKnowledgeSourceWithResponse + // Generated convenience method for hiddenGeneratedCreateKnowledgeSourceWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateKnowledgeSourceWithResponse(BinaryData.fromObject(knowledgeSource), requestOptions) + return hiddenGeneratedCreateKnowledgeSourceWithResponse(BinaryData.fromObject(knowledgeSource), requestOptions) .getValue() .toObject(KnowledgeSource.class); } @@ -2711,9 +2357,9 @@ public KnowledgeSource createKnowledgeSource(KnowledgeSource knowledgeSource) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeSourceStatus getKnowledgeSourceStatus(String name) { - // Generated convenience method for hiddenGeneratedgetKnowledgeSourceStatusWithResponse + // Generated convenience method for hiddenGeneratedGetKnowledgeSourceStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetKnowledgeSourceStatusWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetKnowledgeSourceStatusWithResponse(name, requestOptions).getValue() .toObject(KnowledgeSourceStatus.class); } @@ -2730,9 +2376,9 @@ public KnowledgeSourceStatus getKnowledgeSourceStatus(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchServiceStatistics getServiceStatistics() { - // Generated convenience method for hiddenGeneratedgetServiceStatisticsWithResponse + // Generated convenience method for hiddenGeneratedGetServiceStatisticsWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetServiceStatisticsWithResponse(requestOptions).getValue() + return hiddenGeneratedGetServiceStatisticsWithResponse(requestOptions).getValue() .toObject(SearchServiceStatistics.class); } @@ -3003,6 +2649,96 @@ public Response getServiceStatisticsWithResponse(Reques SearchServiceStatistics.class); } + /** + * Lists all indexes available for a search service. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
$selectList<String>NoSelects which top-level properties to retrieve. + * Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all + * properties. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a List Indexes request as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listIndexes(RequestOptions requestOptions) { + return this.serviceClient.listIndexes(requestOptions) + .mapPage(binaryData -> binaryData.toObject(SearchIndex.class)); + } + + /** + * Lists all aliases available for a search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a List Aliases request as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAliases(RequestOptions requestOptions) { + return this.serviceClient.listAliases(requestOptions) + .mapPage(binaryData -> binaryData.toObject(SearchAlias.class)); + } + + /** + * Lists all knowledge bases available for a search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge bases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listKnowledgeBases(RequestOptions requestOptions) { + return this.serviceClient.listKnowledgeBases(requestOptions) + .mapPage(binaryData -> binaryData.toObject(KnowledgeBase.class)); + } + + /** + * Lists all knowledge sources available for a search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge sources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listKnowledgeSources(RequestOptions requestOptions) { + return this.serviceClient.listKnowledgeSources(requestOptions) + .mapPage(binaryData -> binaryData.toObject(KnowledgeSource.class)); + } + + /** + * Retrieves a summary of statistics for all indexes in the search service. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a request to retrieve stats summary of all indexes as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listIndexStatsSummary(RequestOptions requestOptions) { + return this.serviceClient.listIndexStatsSummary(requestOptions) + .mapPage(binaryData -> binaryData.toObject(IndexStatisticsSummary.class)); + } + /** * Retrieves a synonym map definition. *

Response Body Schema

@@ -3042,7 +2778,7 @@ public Response getServiceStatisticsWithResponse(Reques */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetSynonymMapWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetSynonymMapWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getSynonymMapWithResponse(name, requestOptions); } @@ -3066,24 +2802,158 @@ Response hiddenGeneratedgetSynonymMapWithResponse(String name, Reque * applicationId: String (Required) * applicationSecret: String (Optional) * } - * identity (Optional): { + * identity (Optional): { + * @odata.type: String (Required) + * } + * } + * @odata.etag: String (Optional) + * } + * } + *
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     format: String (Required)
+     *     synonyms (Required): [
+     *         String (Required)
+     *     ]
+     *     encryptionKey (Optional): {
+     *         keyVaultKeyName: String (Required)
+     *         keyVaultKeyVersion: String (Optional)
+     *         keyVaultUri: String (Required)
+     *         accessCredentials (Optional): {
+     *             applicationId: String (Required)
+     *             applicationSecret: String (Optional)
+     *         }
+     *         identity (Optional): {
+     *             @odata.type: String (Required)
+     *         }
+     *     }
+     *     @odata.etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param synonymMap The definition of the synonym map to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return represents a synonym map definition along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response hiddenGeneratedCreateSynonymMapWithResponse(BinaryData synonymMap, + RequestOptions requestOptions) { + return this.serviceClient.createSynonymMapWithResponse(synonymMap, requestOptions); + } + + /** + * Retrieves an index definition. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     description: String (Optional)
+     *     fields (Required): [
+     *          (Required){
+     *             name: String (Required)
+     *             type: String(Edm.String/Edm.Int32/Edm.Int64/Edm.Double/Edm.Boolean/Edm.DateTimeOffset/Edm.GeographyPoint/Edm.ComplexType/Edm.Single/Edm.Half/Edm.Int16/Edm.SByte/Edm.Byte) (Required)
+     *             key: Boolean (Optional)
+     *             retrievable: Boolean (Optional)
+     *             stored: Boolean (Optional)
+     *             searchable: Boolean (Optional)
+     *             filterable: Boolean (Optional)
+     *             sortable: Boolean (Optional)
+     *             facetable: Boolean (Optional)
+     *             permissionFilter: String(userIds/groupIds/rbacScope) (Optional)
+     *             sensitivityLabel: Boolean (Optional)
+     *             analyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
+     *             searchAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
+     *             indexAnalyzer: String(ar.microsoft/ar.lucene/hy.lucene/bn.microsoft/eu.lucene/bg.microsoft/bg.lucene/ca.microsoft/ca.lucene/zh-Hans.microsoft/zh-Hans.lucene/zh-Hant.microsoft/zh-Hant.lucene/hr.microsoft/cs.microsoft/cs.lucene/da.microsoft/da.lucene/nl.microsoft/nl.lucene/en.microsoft/en.lucene/et.microsoft/fi.microsoft/fi.lucene/fr.microsoft/fr.lucene/gl.lucene/de.microsoft/de.lucene/el.microsoft/el.lucene/gu.microsoft/he.microsoft/hi.microsoft/hi.lucene/hu.microsoft/hu.lucene/is.microsoft/id.microsoft/id.lucene/ga.lucene/it.microsoft/it.lucene/ja.microsoft/ja.lucene/kn.microsoft/ko.microsoft/ko.lucene/lv.microsoft/lv.lucene/lt.microsoft/ml.microsoft/ms.microsoft/mr.microsoft/nb.microsoft/no.lucene/fa.lucene/pl.microsoft/pl.lucene/pt-BR.microsoft/pt-BR.lucene/pt-PT.microsoft/pt-PT.lucene/pa.microsoft/ro.microsoft/ro.lucene/ru.microsoft/ru.lucene/sr-cyrillic.microsoft/sr-latin.microsoft/sk.microsoft/sl.microsoft/es.microsoft/es.lucene/sv.microsoft/sv.lucene/ta.microsoft/te.microsoft/th.microsoft/th.lucene/tr.microsoft/tr.lucene/uk.microsoft/ur.microsoft/vi.microsoft/standard.lucene/standardasciifolding.lucene/keyword/pattern/simple/stop/whitespace) (Optional)
+     *             normalizer: String(asciifolding/elision/lowercase/standard/uppercase) (Optional)
+     *             dimensions: Integer (Optional)
+     *             vectorSearchProfile: String (Optional)
+     *             vectorEncoding: String(packedBit) (Optional)
+     *             synonymMaps (Optional): [
+     *                 String (Optional)
+     *             ]
+     *             fields (Optional): [
+     *                 (recursive schema, see above)
+     *             ]
+     *         }
+     *     ]
+     *     scoringProfiles (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             text (Optional): {
+     *                 weights (Required): {
+     *                     String: double (Required)
+     *                 }
+     *             }
+     *             functions (Optional): [
+     *                  (Optional){
+     *                     type: String (Required)
+     *                     fieldName: String (Required)
+     *                     boost: double (Required)
+     *                     interpolation: String(linear/constant/quadratic/logarithmic) (Optional)
+     *                 }
+     *             ]
+     *             functionAggregation: String(sum/average/minimum/maximum/firstMatching/product) (Optional)
+     *         }
+     *     ]
+     *     defaultScoringProfile: String (Optional)
+     *     corsOptions (Optional): {
+     *         allowedOrigins (Required): [
+     *             String (Required)
+     *         ]
+     *         maxAgeInSeconds: Long (Optional)
+     *     }
+     *     suggesters (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             searchMode: String (Required)
+     *             sourceFields (Required): [
+     *                 String (Required)
+     *             ]
+     *         }
+     *     ]
+     *     analyzers (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     tokenizers (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     tokenFilters (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     charFilters (Optional): [
+     *          (Optional){
+     *             @odata.type: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     normalizers (Optional): [
+     *          (Optional){
      *             @odata.type: String (Required)
+     *             name: String (Required)
      *         }
-     *     }
-     *     @odata.etag: String (Optional)
-     * }
-     * }
-     * 
- * - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     *     format: String (Required)
-     *     synonyms (Required): [
-     *         String (Required)
      *     ]
      *     encryptionKey (Optional): {
      *         keyVaultKeyName: String (Required)
@@ -3097,28 +2967,97 @@ Response hiddenGeneratedgetSynonymMapWithResponse(String name, Reque
      *             @odata.type: String (Required)
      *         }
      *     }
+     *     similarity (Optional): {
+     *         @odata.type: String (Required)
+     *     }
+     *     semantic (Optional): {
+     *         defaultConfiguration: String (Optional)
+     *         configurations (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 prioritizedFields (Required): {
+     *                     titleField (Optional): {
+     *                         fieldName: String (Required)
+     *                     }
+     *                     prioritizedContentFields (Optional): [
+     *                         (recursive schema, see above)
+     *                     ]
+     *                     prioritizedKeywordsFields (Optional): [
+     *                         (recursive schema, see above)
+     *                     ]
+     *                 }
+     *                 rankingOrder: String(BoostedRerankerScore/RerankerScore) (Optional)
+     *                 flightingOptIn: Boolean (Optional)
+     *             }
+     *         ]
+     *     }
+     *     vectorSearch (Optional): {
+     *         profiles (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 algorithm: String (Required)
+     *                 vectorizer: String (Optional)
+     *                 compression: String (Optional)
+     *             }
+     *         ]
+     *         algorithms (Optional): [
+     *              (Optional){
+     *                 kind: String(hnsw/exhaustiveKnn) (Required)
+     *                 name: String (Required)
+     *             }
+     *         ]
+     *         vectorizers (Optional): [
+     *              (Optional){
+     *                 kind: String(azureOpenAI/customWebApi/aiServicesVision/aml) (Required)
+     *                 name: String (Required)
+     *             }
+     *         ]
+     *         compressions (Optional): [
+     *              (Optional){
+     *                 kind: String(scalarQuantization/binaryQuantization) (Required)
+     *                 name: String (Required)
+     *                 rescoringOptions (Optional): {
+     *                     enableRescoring: Boolean (Optional)
+     *                     defaultOversampling: Double (Optional)
+     *                     rescoreStorageMethod: String(preserveOriginals/discardOriginals) (Optional)
+     *                 }
+     *                 truncationDimension: Integer (Optional)
+     *             }
+     *         ]
+     *     }
+     *     permissionFilterOption: String(enabled/disabled) (Optional)
+     *     purviewEnabled: Boolean (Optional)
      *     @odata.etag: String (Optional)
      * }
      * }
      * 
* - * @param synonymMap The definition of the synonym map to create. + * @param name The name of the index. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents a synonym map definition along with {@link Response}. + * @return represents a search index definition, which describes the fields and search behavior of an index along + * with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateSynonymMapWithResponse(BinaryData synonymMap, - RequestOptions requestOptions) { - return this.serviceClient.createSynonymMapWithResponse(synonymMap, requestOptions); + Response hiddenGeneratedGetIndexWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.getIndexWithResponse(name, requestOptions); } /** - * Retrieves an index definition. + * Lists all indexes available for a search service. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
$selectList<String>NoSelects which top-level properties to retrieve. + * Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all + * properties. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

* *
@@ -3296,19 +3235,17 @@ Response hiddenGeneratedcreateSynonymMapWithResponse(BinaryData syno
      * }
      * 
* - * @param name The name of the index. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents a search index definition, which describes the fields and search behavior of an index along - * with {@link Response}. + * @return response from a List Indexes request as paginated response with {@link PagedIterable}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetIndexWithResponse(String name, RequestOptions requestOptions) { - return this.serviceClient.getIndexWithResponse(name, requestOptions); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable hiddenGeneratedListIndexes(RequestOptions requestOptions) { + return this.serviceClient.listIndexes(requestOptions); } /** @@ -3678,7 +3615,7 @@ Response hiddenGeneratedgetIndexWithResponse(String name, RequestOpt */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateIndexWithResponse(BinaryData index, RequestOptions requestOptions) { + Response hiddenGeneratedCreateIndexWithResponse(BinaryData index, RequestOptions requestOptions) { return this.serviceClient.createIndexWithResponse(index, requestOptions); } @@ -3706,7 +3643,7 @@ Response hiddenGeneratedcreateIndexWithResponse(BinaryData index, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetIndexStatisticsWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetIndexStatisticsWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getIndexStatisticsWithResponse(name, requestOptions); } @@ -3759,7 +3696,7 @@ Response hiddenGeneratedgetIndexStatisticsWithResponse(String name, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedanalyzeTextWithResponse(String name, BinaryData request, + Response hiddenGeneratedAnalyzeTextWithResponse(String name, BinaryData request, RequestOptions requestOptions) { return this.serviceClient.analyzeTextWithResponse(name, request, requestOptions); } @@ -3791,10 +3728,39 @@ Response hiddenGeneratedanalyzeTextWithResponse(String name, BinaryD */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetAliasWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetAliasWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getAliasWithResponse(name, requestOptions); } + /** + * Lists all aliases available for a search service. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     indexes (Required): [
+     *         String (Required)
+     *     ]
+     *     @odata.etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a List Aliases request as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable hiddenGeneratedListAliases(RequestOptions requestOptions) { + return this.serviceClient.listAliases(requestOptions); + } + /** * Creates a new search alias. *

Request Body Schema

@@ -3836,7 +3802,7 @@ Response hiddenGeneratedgetAliasWithResponse(String name, RequestOpt */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateAliasWithResponse(BinaryData alias, RequestOptions requestOptions) { + Response hiddenGeneratedCreateAliasWithResponse(BinaryData alias, RequestOptions requestOptions) { return this.serviceClient.createAliasWithResponse(alias, requestOptions); } @@ -3892,10 +3858,65 @@ Response hiddenGeneratedcreateAliasWithResponse(BinaryData alias, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetKnowledgeBaseWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetKnowledgeBaseWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getKnowledgeBaseWithResponse(name, requestOptions); } + /** + * Lists all knowledge bases available for a search service. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     knowledgeSources (Required): [
+     *          (Required){
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     models (Optional): [
+     *          (Optional){
+     *             kind: String(azureOpenAI) (Required)
+     *         }
+     *     ]
+     *     retrievalReasoningEffort (Optional): {
+     *         kind: String(minimal/low/medium) (Required)
+     *     }
+     *     outputMode: String(extractiveData/answerSynthesis) (Optional)
+     *     @odata.etag: String (Optional)
+     *     encryptionKey (Optional): {
+     *         keyVaultKeyName: String (Required)
+     *         keyVaultKeyVersion: String (Optional)
+     *         keyVaultUri: String (Required)
+     *         accessCredentials (Optional): {
+     *             applicationId: String (Required)
+     *             applicationSecret: String (Optional)
+     *         }
+     *         identity (Optional): {
+     *             @odata.type: String (Required)
+     *         }
+     *     }
+     *     description: String (Optional)
+     *     retrievalInstructions: String (Optional)
+     *     answerInstructions: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge bases as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable hiddenGeneratedListKnowledgeBases(RequestOptions requestOptions) { + return this.serviceClient.listKnowledgeBases(requestOptions); + } + /** * Creates a new knowledge base. *

Request Body Schema

@@ -3988,7 +4009,7 @@ Response hiddenGeneratedgetKnowledgeBaseWithResponse(String name, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateKnowledgeBaseWithResponse(BinaryData knowledgeBase, + Response hiddenGeneratedCreateKnowledgeBaseWithResponse(BinaryData knowledgeBase, RequestOptions requestOptions) { return this.serviceClient.createKnowledgeBaseWithResponse(knowledgeBase, requestOptions); } @@ -4030,10 +4051,50 @@ Response hiddenGeneratedcreateKnowledgeBaseWithResponse(BinaryData k */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetKnowledgeSourceWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetKnowledgeSourceWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getKnowledgeSourceWithResponse(name, requestOptions); } + /** + * Lists all knowledge sources available for a search service. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/web/remoteSharePoint) (Required)
+     *     name: String (Required)
+     *     description: String (Optional)
+     *     @odata.etag: String (Optional)
+     *     encryptionKey (Optional): {
+     *         keyVaultKeyName: String (Required)
+     *         keyVaultKeyVersion: String (Optional)
+     *         keyVaultUri: String (Required)
+     *         accessCredentials (Optional): {
+     *             applicationId: String (Required)
+     *             applicationSecret: String (Optional)
+     *         }
+     *         identity (Optional): {
+     *             @odata.type: String (Required)
+     *         }
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return result from listing knowledge sources as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable hiddenGeneratedListKnowledgeSources(RequestOptions requestOptions) { + return this.serviceClient.listKnowledgeSources(requestOptions); + } + /** * Creates a new knowledge source. *

Request Body Schema

@@ -4096,7 +4157,7 @@ Response hiddenGeneratedgetKnowledgeSourceWithResponse(String name, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateKnowledgeSourceWithResponse(BinaryData knowledgeSource, + Response hiddenGeneratedCreateKnowledgeSourceWithResponse(BinaryData knowledgeSource, RequestOptions requestOptions) { return this.serviceClient.createKnowledgeSourceWithResponse(knowledgeSource, requestOptions); } @@ -4142,7 +4203,7 @@ Response hiddenGeneratedcreateKnowledgeSourceWithResponse(BinaryData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetKnowledgeSourceStatusWithResponse(String name, + Response hiddenGeneratedGetKnowledgeSourceStatusWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getKnowledgeSourceStatusWithResponse(name, requestOptions); } @@ -4195,7 +4256,36 @@ Response hiddenGeneratedgetKnowledgeSourceStatusWithResponse(String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetServiceStatisticsWithResponse(RequestOptions requestOptions) { + Response hiddenGeneratedGetServiceStatisticsWithResponse(RequestOptions requestOptions) { return this.serviceClient.getServiceStatisticsWithResponse(requestOptions); } + + /** + * Retrieves a summary of statistics for all indexes in the search service. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     documentCount: long (Required)
+     *     storageSize: long (Required)
+     *     vectorIndexSize: long (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response from a request to retrieve stats summary of all indexes as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable hiddenGeneratedListIndexStatsSummary(RequestOptions requestOptions) { + return this.serviceClient.listIndexStatsSummary(requestOptions); + } } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java index 5696f6c7a822..1fc2a1c6fecd 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java @@ -362,36 +362,6 @@ public Mono> resetIndexerWithResponse(String name, RequestOptions return this.serviceClient.resetIndexerWithResponseAsync(name, requestOptions); } - /** - * Resync selective options from the datasource to be re-ingested by the indexer.". - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     options (Optional): [
-     *         String(permissions) (Optional)
-     *     ]
-     * }
-     * }
-     * 
- * - * @param name The name of the indexer. - * @param indexerResync The definition of the indexer resync options. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> resyncWithResponse(String name, BinaryData indexerResync, - RequestOptions requestOptions) { - return this.serviceClient.resyncWithResponseAsync(name, indexerResync, requestOptions); - } - /** * Resets specific documents in the datasource to be selectively re-ingested by the indexer. *

Query Parameters

@@ -1325,36 +1295,6 @@ Mono> getSkillsetsWithResponse(RequestOptions requestOption return this.serviceClient.getSkillsetsWithResponseAsync(requestOptions); } - /** - * Reset an existing skillset in a search service. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     skillNames (Optional): [
-     *         String (Optional)
-     *     ]
-     * }
-     * }
-     * 
- * - * @param name The name of the skillset. - * @param skillNames The names of the skills to reset. If not specified, all skills in the skillset will be reset. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> resetSkillsWithResponse(String name, BinaryData skillNames, - RequestOptions requestOptions) { - return this.serviceClient.resetSkillsWithResponseAsync(name, skillNames, requestOptions); - } - /** * Creates a new datasource or updates a datasource if it already exists. * @@ -1506,9 +1446,9 @@ public Mono deleteDataSourceConnection(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getDataSourceConnection(String name) { - // Generated convenience method for hiddenGeneratedgetDataSourceConnectionWithResponse + // Generated convenience method for hiddenGeneratedGetDataSourceConnectionWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetDataSourceConnectionWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetDataSourceConnectionWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexerDataSourceConnection.class)); } @@ -1655,9 +1595,9 @@ Mono getDataSourceConnections() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono createDataSourceConnection(SearchIndexerDataSourceConnection dataSourceConnection) { - // Generated convenience method for hiddenGeneratedcreateDataSourceConnectionWithResponse + // Generated convenience method for hiddenGeneratedCreateDataSourceConnectionWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateDataSourceConnectionWithResponse(BinaryData.fromObject(dataSourceConnection), + return hiddenGeneratedCreateDataSourceConnectionWithResponse(BinaryData.fromObject(dataSourceConnection), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexerDataSourceConnection.class)); } @@ -1698,9 +1638,10 @@ public Mono resetIndexer(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono resync(String name, IndexerResyncBody indexerResync) { - // Generated convenience method for resyncWithResponse + // Generated convenience method for hiddenGeneratedResyncWithResponse RequestOptions requestOptions = new RequestOptions(); - return resyncWithResponse(name, BinaryData.fromObject(indexerResync), requestOptions).flatMap(FluxUtil::toMono); + return hiddenGeneratedResyncWithResponse(name, BinaryData.fromObject(indexerResync), requestOptions) + .flatMap(FluxUtil::toMono); } /** @@ -1923,9 +1864,9 @@ public Mono deleteIndexer(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getIndexer(String name) { - // Generated convenience method for hiddenGeneratedgetIndexerWithResponse + // Generated convenience method for hiddenGeneratedGetIndexerWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexerWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetIndexerWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexer.class)); } @@ -2066,9 +2007,9 @@ Mono getIndexers() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createIndexer(SearchIndexer indexer) { - // Generated convenience method for hiddenGeneratedcreateIndexerWithResponse + // Generated convenience method for hiddenGeneratedCreateIndexerWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateIndexerWithResponse(BinaryData.fromObject(indexer), requestOptions) + return hiddenGeneratedCreateIndexerWithResponse(BinaryData.fromObject(indexer), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexer.class)); } @@ -2089,9 +2030,9 @@ public Mono createIndexer(SearchIndexer indexer) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getIndexerStatus(String name) { - // Generated convenience method for hiddenGeneratedgetIndexerStatusWithResponse + // Generated convenience method for hiddenGeneratedGetIndexerStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexerStatusWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetIndexerStatusWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexerStatus.class)); } @@ -2245,9 +2186,9 @@ public Mono deleteSkillset(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono getSkillset(String name) { - // Generated convenience method for hiddenGeneratedgetSkillsetWithResponse + // Generated convenience method for hiddenGeneratedGetSkillsetWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetSkillsetWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + return hiddenGeneratedGetSkillsetWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexerSkillset.class)); } @@ -2392,9 +2333,9 @@ public Mono>> listSkillsetNamesWithResponse() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSkillset(SearchIndexerSkillset skillset) { - // Generated convenience method for hiddenGeneratedcreateSkillsetWithResponse + // Generated convenience method for hiddenGeneratedCreateSkillsetWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateSkillsetWithResponse(BinaryData.fromObject(skillset), requestOptions) + return hiddenGeneratedCreateSkillsetWithResponse(BinaryData.fromObject(skillset), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SearchIndexerSkillset.class)); } @@ -2415,9 +2356,9 @@ public Mono createSkillset(SearchIndexerSkillset skillset @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono resetSkills(String name, SkillNames skillNames) { - // Generated convenience method for resetSkillsWithResponse + // Generated convenience method for hiddenGeneratedResetSkillsWithResponse RequestOptions requestOptions = new RequestOptions(); - return resetSkillsWithResponse(name, BinaryData.fromObject(skillNames), requestOptions) + return hiddenGeneratedResetSkillsWithResponse(name, BinaryData.fromObject(skillNames), requestOptions) .flatMap(FluxUtil::toMono); } @@ -2549,6 +2490,42 @@ public Mono> createSkillsetWithResponse(SearchIn SearchIndexerSkillset.class); } + /** + * Resync selective options from the datasource to be re-ingested by the indexer.". + * + * @param name The name of the indexer. + * @param indexerResync The definition of the indexer resync options. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resyncWithResponse(String name, IndexerResyncBody indexerResync, + RequestOptions requestOptions) { + return this.serviceClient.resyncWithResponseAsync(name, BinaryData.fromObject(indexerResync), requestOptions); + } + + /** + * Reset an existing skillset in a search service. + * + * @param name The name of the skillset. + * @param skillNames The names of the skills to reset. If not specified, all skills in the skillset will be reset. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resetSkillsWithResponse(String name, SkillNames skillNames, + RequestOptions requestOptions) { + return this.serviceClient.resetSkillsWithResponseAsync(name, BinaryData.fromObject(skillNames), requestOptions); + } + /** * Retrieves a datasource definition. *

Response Body Schema

@@ -2605,7 +2582,7 @@ public Mono> createSkillsetWithResponse(SearchIn */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetDataSourceConnectionWithResponse(String name, + Mono> hiddenGeneratedGetDataSourceConnectionWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getDataSourceConnectionWithResponseAsync(name, requestOptions); } @@ -2709,11 +2686,41 @@ Mono> hiddenGeneratedgetDataSourceConnectionWithResponse(St */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedcreateDataSourceConnectionWithResponse(BinaryData dataSourceConnection, + Mono> hiddenGeneratedCreateDataSourceConnectionWithResponse(BinaryData dataSourceConnection, RequestOptions requestOptions) { return this.serviceClient.createDataSourceConnectionWithResponseAsync(dataSourceConnection, requestOptions); } + /** + * Resync selective options from the datasource to be re-ingested by the indexer.". + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     options (Optional): [
+     *         String(permissions) (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param name The name of the indexer. + * @param indexerResync The definition of the indexer resync options. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> hiddenGeneratedResyncWithResponse(String name, BinaryData indexerResync, + RequestOptions requestOptions) { + return this.serviceClient.resyncWithResponseAsync(name, indexerResync, requestOptions); + } + /** * Retrieves an indexer definition. *

Response Body Schema

@@ -2807,7 +2814,7 @@ Mono> hiddenGeneratedcreateDataSourceConnectionWithResponse */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetIndexerWithResponse(String name, RequestOptions requestOptions) { + Mono> hiddenGeneratedGetIndexerWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getIndexerWithResponseAsync(name, requestOptions); } @@ -2985,7 +2992,7 @@ Mono> hiddenGeneratedgetIndexerWithResponse(String name, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedcreateIndexerWithResponse(BinaryData indexer, + Mono> hiddenGeneratedCreateIndexerWithResponse(BinaryData indexer, RequestOptions requestOptions) { return this.serviceClient.createIndexerWithResponseAsync(indexer, requestOptions); } @@ -3074,7 +3081,7 @@ Mono> hiddenGeneratedcreateIndexerWithResponse(BinaryData i */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetIndexerStatusWithResponse(String name, RequestOptions requestOptions) { + Mono> hiddenGeneratedGetIndexerStatusWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getIndexerStatusWithResponseAsync(name, requestOptions); } @@ -3210,7 +3217,7 @@ Mono> hiddenGeneratedgetIndexerStatusWithResponse(String na */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedgetSkillsetWithResponse(String name, RequestOptions requestOptions) { + Mono> hiddenGeneratedGetSkillsetWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getSkillsetWithResponseAsync(name, requestOptions); } @@ -3466,8 +3473,38 @@ Mono> hiddenGeneratedgetSkillsetWithResponse(String name, R */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedcreateSkillsetWithResponse(BinaryData skillset, + Mono> hiddenGeneratedCreateSkillsetWithResponse(BinaryData skillset, RequestOptions requestOptions) { return this.serviceClient.createSkillsetWithResponseAsync(skillset, requestOptions); } + + /** + * Reset an existing skillset in a search service. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     skillNames (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param name The name of the skillset. + * @param skillNames The names of the skills to reset. If not specified, all skills in the skillset will be reset. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> hiddenGeneratedResetSkillsWithResponse(String name, BinaryData skillNames, + RequestOptions requestOptions) { + return this.serviceClient.resetSkillsWithResponseAsync(name, skillNames, requestOptions); + } } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java index d1e6375f7da4..aef0cb1b905c 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java @@ -353,35 +353,6 @@ public Response resetIndexerWithResponse(String name, RequestOptions reque return this.serviceClient.resetIndexerWithResponse(name, requestOptions); } - /** - * Resync selective options from the datasource to be re-ingested by the indexer.". - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     options (Optional): [
-     *         String(permissions) (Optional)
-     *     ]
-     * }
-     * }
-     * 
- * - * @param name The name of the indexer. - * @param indexerResync The definition of the indexer resync options. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response resyncWithResponse(String name, BinaryData indexerResync, RequestOptions requestOptions) { - return this.serviceClient.resyncWithResponse(name, indexerResync, requestOptions); - } - /** * Resets specific documents in the datasource to be selectively re-ingested by the indexer. *

Query Parameters

@@ -1305,35 +1276,6 @@ Response getSkillsetsWithResponse(RequestOptions requestOptions) { return this.serviceClient.getSkillsetsWithResponse(requestOptions); } - /** - * Reset an existing skillset in a search service. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     skillNames (Optional): [
-     *         String (Optional)
-     *     ]
-     * }
-     * }
-     * 
- * - * @param name The name of the skillset. - * @param skillNames The names of the skills to reset. If not specified, all skills in the skillset will be reset. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response resetSkillsWithResponse(String name, BinaryData skillNames, RequestOptions requestOptions) { - return this.serviceClient.resetSkillsWithResponse(name, skillNames, requestOptions); - } - /** * Creates a new datasource or updates a datasource if it already exists. * @@ -1475,9 +1417,9 @@ public void deleteDataSourceConnection(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexerDataSourceConnection getDataSourceConnection(String name) { - // Generated convenience method for hiddenGeneratedgetDataSourceConnectionWithResponse + // Generated convenience method for hiddenGeneratedGetDataSourceConnectionWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetDataSourceConnectionWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetDataSourceConnectionWithResponse(name, requestOptions).getValue() .toObject(SearchIndexerDataSourceConnection.class); } @@ -1621,9 +1563,9 @@ ListDataSourcesResult getDataSourceConnections() { @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexerDataSourceConnection createDataSourceConnection(SearchIndexerDataSourceConnection dataSourceConnection) { - // Generated convenience method for hiddenGeneratedcreateDataSourceConnectionWithResponse + // Generated convenience method for hiddenGeneratedCreateDataSourceConnectionWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateDataSourceConnectionWithResponse(BinaryData.fromObject(dataSourceConnection), + return hiddenGeneratedCreateDataSourceConnectionWithResponse(BinaryData.fromObject(dataSourceConnection), requestOptions).getValue().toObject(SearchIndexerDataSourceConnection.class); } @@ -1661,9 +1603,9 @@ public void resetIndexer(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public void resync(String name, IndexerResyncBody indexerResync) { - // Generated convenience method for resyncWithResponse + // Generated convenience method for hiddenGeneratedResyncWithResponse RequestOptions requestOptions = new RequestOptions(); - resyncWithResponse(name, BinaryData.fromObject(indexerResync), requestOptions).getValue(); + hiddenGeneratedResyncWithResponse(name, BinaryData.fromObject(indexerResync), requestOptions).getValue(); } /** @@ -1874,9 +1816,9 @@ public void deleteIndexer(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexer getIndexer(String name) { - // Generated convenience method for hiddenGeneratedgetIndexerWithResponse + // Generated convenience method for hiddenGeneratedGetIndexerWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexerWithResponse(name, requestOptions).getValue().toObject(SearchIndexer.class); + return hiddenGeneratedGetIndexerWithResponse(name, requestOptions).getValue().toObject(SearchIndexer.class); } /** @@ -2013,9 +1955,9 @@ ListIndexersResult getIndexers() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexer createIndexer(SearchIndexer indexer) { - // Generated convenience method for hiddenGeneratedcreateIndexerWithResponse + // Generated convenience method for hiddenGeneratedCreateIndexerWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateIndexerWithResponse(BinaryData.fromObject(indexer), requestOptions).getValue() + return hiddenGeneratedCreateIndexerWithResponse(BinaryData.fromObject(indexer), requestOptions).getValue() .toObject(SearchIndexer.class); } @@ -2034,9 +1976,9 @@ public SearchIndexer createIndexer(SearchIndexer indexer) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexerStatus getIndexerStatus(String name) { - // Generated convenience method for hiddenGeneratedgetIndexerStatusWithResponse + // Generated convenience method for hiddenGeneratedGetIndexerStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetIndexerStatusWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetIndexerStatusWithResponse(name, requestOptions).getValue() .toObject(SearchIndexerStatus.class); } @@ -2182,9 +2124,9 @@ public void deleteSkillset(String name) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexerSkillset getSkillset(String name) { - // Generated convenience method for hiddenGeneratedgetSkillsetWithResponse + // Generated convenience method for hiddenGeneratedGetSkillsetWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedgetSkillsetWithResponse(name, requestOptions).getValue() + return hiddenGeneratedGetSkillsetWithResponse(name, requestOptions).getValue() .toObject(SearchIndexerSkillset.class); } @@ -2327,9 +2269,9 @@ public Response> listSkillsetNamesWithResponse() { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexerSkillset createSkillset(SearchIndexerSkillset skillset) { - // Generated convenience method for hiddenGeneratedcreateSkillsetWithResponse + // Generated convenience method for hiddenGeneratedCreateSkillsetWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedcreateSkillsetWithResponse(BinaryData.fromObject(skillset), requestOptions).getValue() + return hiddenGeneratedCreateSkillsetWithResponse(BinaryData.fromObject(skillset), requestOptions).getValue() .toObject(SearchIndexerSkillset.class); } @@ -2348,9 +2290,9 @@ public SearchIndexerSkillset createSkillset(SearchIndexerSkillset skillset) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public void resetSkills(String name, SkillNames skillNames) { - // Generated convenience method for resetSkillsWithResponse + // Generated convenience method for hiddenGeneratedResetSkillsWithResponse RequestOptions requestOptions = new RequestOptions(); - resetSkillsWithResponse(name, BinaryData.fromObject(skillNames), requestOptions).getValue(); + hiddenGeneratedResetSkillsWithResponse(name, BinaryData.fromObject(skillNames), requestOptions).getValue(); } /** @@ -2478,6 +2420,41 @@ public Response createSkillsetWithResponse(SearchIndexerS SearchIndexerSkillset.class); } + /** + * Resync selective options from the datasource to be re-ingested by the indexer.". + * + * @param name The name of the indexer. + * @param indexerResync The definition of the indexer resync options. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resyncWithResponse(String name, IndexerResyncBody indexerResync, + RequestOptions requestOptions) { + return this.serviceClient.resyncWithResponse(name, BinaryData.fromObject(indexerResync), requestOptions); + } + + /** + * Reset an existing skillset in a search service. + * + * @param name The name of the skillset. + * @param skillNames The names of the skills to reset. If not specified, all skills in the skillset will be reset. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetSkillsWithResponse(String name, SkillNames skillNames, RequestOptions requestOptions) { + return this.serviceClient.resetSkillsWithResponse(name, BinaryData.fromObject(skillNames), requestOptions); + } + /** * Retrieves a datasource definition. *

Response Body Schema

@@ -2534,7 +2511,7 @@ public Response createSkillsetWithResponse(SearchIndexerS */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetDataSourceConnectionWithResponse(String name, + Response hiddenGeneratedGetDataSourceConnectionWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getDataSourceConnectionWithResponse(name, requestOptions); } @@ -2638,11 +2615,41 @@ Response hiddenGeneratedgetDataSourceConnectionWithResponse(String n */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateDataSourceConnectionWithResponse(BinaryData dataSourceConnection, + Response hiddenGeneratedCreateDataSourceConnectionWithResponse(BinaryData dataSourceConnection, RequestOptions requestOptions) { return this.serviceClient.createDataSourceConnectionWithResponse(dataSourceConnection, requestOptions); } + /** + * Resync selective options from the datasource to be re-ingested by the indexer.". + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     options (Optional): [
+     *         String(permissions) (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param name The name of the indexer. + * @param indexerResync The definition of the indexer resync options. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response hiddenGeneratedResyncWithResponse(String name, BinaryData indexerResync, + RequestOptions requestOptions) { + return this.serviceClient.resyncWithResponse(name, indexerResync, requestOptions); + } + /** * Retrieves an indexer definition. *

Response Body Schema

@@ -2736,7 +2743,7 @@ Response hiddenGeneratedcreateDataSourceConnectionWithResponse(Binar */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetIndexerWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetIndexerWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getIndexerWithResponse(name, requestOptions); } @@ -2914,7 +2921,7 @@ Response hiddenGeneratedgetIndexerWithResponse(String name, RequestO */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateIndexerWithResponse(BinaryData indexer, RequestOptions requestOptions) { + Response hiddenGeneratedCreateIndexerWithResponse(BinaryData indexer, RequestOptions requestOptions) { return this.serviceClient.createIndexerWithResponse(indexer, requestOptions); } @@ -3001,7 +3008,7 @@ Response hiddenGeneratedcreateIndexerWithResponse(BinaryData indexer */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetIndexerStatusWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetIndexerStatusWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getIndexerStatusWithResponse(name, requestOptions); } @@ -3137,7 +3144,7 @@ Response hiddenGeneratedgetIndexerStatusWithResponse(String name, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedgetSkillsetWithResponse(String name, RequestOptions requestOptions) { + Response hiddenGeneratedGetSkillsetWithResponse(String name, RequestOptions requestOptions) { return this.serviceClient.getSkillsetWithResponse(name, requestOptions); } @@ -3393,7 +3400,37 @@ Response hiddenGeneratedgetSkillsetWithResponse(String name, Request */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedcreateSkillsetWithResponse(BinaryData skillset, RequestOptions requestOptions) { + Response hiddenGeneratedCreateSkillsetWithResponse(BinaryData skillset, RequestOptions requestOptions) { return this.serviceClient.createSkillsetWithResponse(skillset, requestOptions); } + + /** + * Reset an existing skillset in a search service. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     skillNames (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param name The name of the skillset. + * @param skillNames The names of the skills to reset. If not specified, all skills in the skillset will be reset. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response hiddenGeneratedResetSkillsWithResponse(String name, BinaryData skillNames, + RequestOptions requestOptions) { + return this.serviceClient.resetSkillsWithResponse(name, skillNames, requestOptions); + } } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalAsyncClient.java index 08e3c0b611dc..7c26de3f7664 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalAsyncClient.java @@ -89,13 +89,13 @@ public SearchServiceVersion getServiceVersion() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono retrieve(String knowledgeBaseName, KnowledgeBaseRetrievalRequest retrievalRequest, String querySourceAuthorization) { - // Generated convenience method for hiddenGeneratedretrieveWithResponse + // Generated convenience method for hiddenGeneratedRetrieveWithResponse RequestOptions requestOptions = new RequestOptions(); if (querySourceAuthorization != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-query-source-authorization"), querySourceAuthorization); } - return hiddenGeneratedretrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), + return hiddenGeneratedRetrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeBaseRetrievalResponse.class)); } @@ -117,9 +117,9 @@ public Mono retrieve(String knowledgeBaseName, @ServiceMethod(returns = ReturnType.SINGLE) public Mono retrieve(String knowledgeBaseName, KnowledgeBaseRetrievalRequest retrievalRequest) { - // Generated convenience method for hiddenGeneratedretrieveWithResponse + // Generated convenience method for hiddenGeneratedRetrieveWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedretrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), + return hiddenGeneratedRetrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(KnowledgeBaseRetrievalResponse.class)); } @@ -268,7 +268,7 @@ public Mono> retrieveWithResponse(Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> hiddenGeneratedretrieveWithResponse(String knowledgeBaseName, + Mono> hiddenGeneratedRetrieveWithResponse(String knowledgeBaseName, BinaryData retrievalRequest, RequestOptions requestOptions) { return this.serviceClient.retrieveWithResponseAsync(knowledgeBaseName, retrievalRequest, requestOptions); } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalClient.java index db3aaaf871d1..d7946a03f431 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/knowledgebases/KnowledgeBaseRetrievalClient.java @@ -87,13 +87,13 @@ public SearchServiceVersion getServiceVersion() { @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeBaseRetrievalResponse retrieve(String knowledgeBaseName, KnowledgeBaseRetrievalRequest retrievalRequest, String querySourceAuthorization) { - // Generated convenience method for hiddenGeneratedretrieveWithResponse + // Generated convenience method for hiddenGeneratedRetrieveWithResponse RequestOptions requestOptions = new RequestOptions(); if (querySourceAuthorization != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-query-source-authorization"), querySourceAuthorization); } - return hiddenGeneratedretrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), + return hiddenGeneratedRetrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), requestOptions).getValue().toObject(KnowledgeBaseRetrievalResponse.class); } @@ -114,9 +114,9 @@ public KnowledgeBaseRetrievalResponse retrieve(String knowledgeBaseName, @ServiceMethod(returns = ReturnType.SINGLE) public KnowledgeBaseRetrievalResponse retrieve(String knowledgeBaseName, KnowledgeBaseRetrievalRequest retrievalRequest) { - // Generated convenience method for hiddenGeneratedretrieveWithResponse + // Generated convenience method for hiddenGeneratedRetrieveWithResponse RequestOptions requestOptions = new RequestOptions(); - return hiddenGeneratedretrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), + return hiddenGeneratedRetrieveWithResponse(knowledgeBaseName, BinaryData.fromObject(retrievalRequest), requestOptions).getValue().toObject(KnowledgeBaseRetrievalResponse.class); } @@ -262,7 +262,7 @@ public Response retrieveWithResponse(String know */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response hiddenGeneratedretrieveWithResponse(String knowledgeBaseName, BinaryData retrievalRequest, + Response hiddenGeneratedRetrieveWithResponse(String knowledgeBaseName, BinaryData retrievalRequest, RequestOptions requestOptions) { return this.serviceClient.retrieveWithResponse(knowledgeBaseName, retrievalRequest, requestOptions); } diff --git a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/SearchJavaDocCodeSnippets.java b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/SearchJavaDocCodeSnippets.java index a7ed0467c722..0d4f567f9cdd 100644 --- a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/SearchJavaDocCodeSnippets.java +++ b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/SearchJavaDocCodeSnippets.java @@ -2630,19 +2630,18 @@ public void resetSkills() { } /** - * Code snippet for {@link SearchIndexerClient#resetSkillsWithResponse(String, BinaryData, RequestOptions)} + * Code snippet for {@link SearchIndexerClient#resetSkillsWithResponse(String, SkillNames, RequestOptions)} */ public void resetSkillsWithResponse() { - // BEGIN: com.azure.search.documents.indexes.SearchIndexerClient.resetSkillsWithResponse#String-BinaryData-RequestOptions + // BEGIN: com.azure.search.documents.indexes.SearchIndexerClient.resetSkillsWithResponse#String-SkillNames-RequestOptions SearchIndexerSkillset searchIndexerSkillset = SEARCH_INDEXER_CLIENT.getSkillset("searchIndexerSkillset"); // Reset the "myOcr" and "myText" skills. Response resetSkillsResponse = SEARCH_INDEXER_CLIENT.resetSkillsWithResponse( - searchIndexerSkillset.getName(), - BinaryData.fromObject(new SkillNames().setSkillNames("myOcr", "myText")), + searchIndexerSkillset.getName(), new SkillNames().setSkillNames("myOcr", "myText"), new RequestOptions().setContext(new Context(KEY_1, VALUE_1))); System.out.printf("Resetting skills completed with status code %d.%n", resetSkillsResponse.getStatusCode()); - // END: com.azure.search.documents.indexes.SearchIndexerClient.resetSkillsWithResponse#String-BinaryData-RequestOptions + // END: com.azure.search.documents.indexes.SearchIndexerClient.resetSkillsWithResponse#String-SkillNames-RequestOptions } /** @@ -2658,18 +2657,17 @@ public void resetSkillsAsync() { } /** - * Code snippet for {@link SearchIndexerAsyncClient#resetSkillsWithResponse(String, BinaryData, RequestOptions)} + * Code snippet for {@link SearchIndexerAsyncClient#resetSkillsWithResponse(String, SkillNames, RequestOptions)} */ public void resetSkillsWithResponseAsync() { - // BEGIN: com.azure.search.documents.indexes.SearchIndexerAsyncClient.resetSkillsWithResponse#String-BinaryData-RequestOptions + // BEGIN: com.azure.search.documents.indexes.SearchIndexerAsyncClient.resetSkillsWithResponse#String-SkillNames-RequestOptions SEARCH_INDEXER_ASYNC_CLIENT.getSkillset("searchIndexerSkillset") .flatMap(searchIndexerSkillset -> SEARCH_INDEXER_ASYNC_CLIENT.resetSkillsWithResponse( - searchIndexerSkillset.getName(), - BinaryData.fromObject(new SkillNames().setSkillNames("myOcr", "myText")), - new RequestOptions())) + searchIndexerSkillset.getName(), new SkillNames().setSkillNames("myOcr", "myText"), + new RequestOptions())) .subscribe(resetSkillsResponse -> System.out.printf("Resetting skills completed with status code %d.%n", resetSkillsResponse.getStatusCode())); - // END: com.azure.search.documents.indexes.SearchIndexerAsyncClient.resetSkillsWithResponse#String-BinaryData-RequestOptions + // END: com.azure.search.documents.indexes.SearchIndexerAsyncClient.resetSkillsWithResponse#String-SkillNames-RequestOptions } /** @@ -2925,11 +2923,8 @@ public void listAliases() { public void listAliasesWithContext() { // BEGIN: com.azure.search.documents.indexes.SearchIndexClient.listAliases#RequestOptions SEARCH_INDEX_CLIENT.listAliases(new RequestOptions().setContext(new Context(KEY_1, VALUE_1))) - .forEach(binaryData -> { - SearchAlias searchAlias = binaryData.toObject(SearchAlias.class); - System.out.printf("Listed alias '%s' that aliases index '%s'.", - searchAlias.getName(), searchAlias.getIndexes().get(0)); - }); + .forEach(searchAlias -> System.out.printf("Listed alias '%s' that aliases index '%s'.", + searchAlias.getName(), searchAlias.getIndexes().get(0))); // END: com.azure.search.documents.indexes.SearchIndexClient.listAliases#RequestOptions } } diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/KnowledgeBaseTests.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/KnowledgeBaseTests.java index 57daf04397fb..70a8030bed18 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/KnowledgeBaseTests.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/KnowledgeBaseTests.java @@ -535,13 +535,13 @@ public void answerSynthesisRetrievalAsync() { @Test @Disabled("Requires further resource deployment") - public void knowledgeBaseObjectHasNoAgentReferences() { + public void knowledgeBaseObjectHasNoAgentReferences() throws IOException { SearchIndexClient searchIndexClient = getSearchIndexClientBuilder(true).buildClient(); KnowledgeBase knowledgeBase = new KnowledgeBase(randomKnowledgeBaseName(), KNOWLEDGE_SOURCE_REFERENCE).setModels(KNOWLEDGE_BASE_MODEL); KnowledgeBase created = searchIndexClient.createKnowledgeBase(knowledgeBase); - String kbJson = BinaryData.fromObject(created).toString(); + String kbJson = created.toJsonString(); // Filter out the name field which may contain the test method name with "agent" String jsonWithoutName = kbJson.replaceAll("\"name\":\"[^\"]*\"", "\"name\":\"FILTERED\""); diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/models/SearchRequestUrlRewriterPolicyTests.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/models/SearchRequestUrlRewriterPolicyTests.java index b73674dd6127..643ef90e9d70 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/models/SearchRequestUrlRewriterPolicyTests.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/models/SearchRequestUrlRewriterPolicyTests.java @@ -42,7 +42,6 @@ import java.util.function.Supplier; import java.util.stream.Stream; -import static com.azure.core.util.BinaryData.fromObject; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -230,8 +229,8 @@ public HttpResponse sendSync(HttpRequest request, Context context) { skillsetUrl), Arguments.of(toCallable(() -> indexerClient.deleteSkillsetWithResponse(skillset.getName(), null)), skillsetUrl), - Arguments.of(toCallable( - () -> indexerClient.resetSkillsWithResponse(skillset.getName(), fromObject(new SkillNames()), null)), + Arguments.of( + toCallable(() -> indexerClient.resetSkillsWithResponse(skillset.getName(), new SkillNames(), null)), skillsetUrl + "/search.resetskills"), Arguments.of( @@ -269,8 +268,7 @@ public HttpResponse sendSync(HttpRequest request, Context context) { Arguments.of(toCallable(indexerAsyncClient.deleteSkillsetWithResponse(skillset.getName(), null)), skillsetUrl), Arguments.of( - toCallable( - indexerAsyncClient.resetSkillsWithResponse(skillset.getName(), fromObject(new SkillNames()), null)), + toCallable(indexerAsyncClient.resetSkillsWithResponse(skillset.getName(), new SkillNames(), null)), skillsetUrl + "/search.resetskills")); }