Skip to content

Commit dcf520c

Browse files
committed
make properties private and regen
1 parent 8b54624 commit dcf520c

File tree

341 files changed

+21289
-21688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+21289
-21688
lines changed

sdk/search/azure-search-documents/customizations/src/main/java/SearchCustomizations.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public void customize(LibraryCustomization libraryCustomization, Logger logger)
4646
removeGetApis(searchClient);
4747
removeGetApis(searchAsyncClient);
4848

49+
hideSearchDocumentsResultInternalProperties(
50+
libraryCustomization.getPackage("com.azure.search.documents.models")
51+
.getClass("SearchDocumentsResult"));
52+
4953
hideWithResponseBinaryDataApis(searchClient);
5054
hideWithResponseBinaryDataApis(searchAsyncClient);
5155
hideWithResponseBinaryDataApis(indexes.getClass("SearchIndexClient"));
@@ -159,6 +163,17 @@ private static boolean hasBinaryDataInType(Type type) {
159163
return type.toString().contains("BinaryData");
160164
}
161165

166+
// @@access on model properties is not supported by the Java TypeSpec emitter — it only works on whole models and
167+
// operations. This customization makes getNextLink() and getNextPageParameters() package-private since they are
168+
// internal continuation details not meant for public consumption.
169+
private static void hideSearchDocumentsResultInternalProperties(ClassCustomization customization) {
170+
customization.customizeAst(ast -> ast.getClassByName(customization.getClassName()).ifPresent(clazz -> {
171+
for (String methodName : Arrays.asList("getNextLink", "getNextPageParameters")) {
172+
clazz.getMethodsByName(methodName).forEach(MethodDeclaration::setModifiers);
173+
}
174+
}));
175+
}
176+
162177
// Removes GET equivalents of POST APIs in SearchClient and SearchAsyncClient as we never plan to expose those.
163178
private static void removeGetApis(ClassCustomization customization) {
164179
List<String> methodPrefixesToRemove = Arrays.asList("searchGet", "suggestGet", "autocompleteGet");

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java

Lines changed: 326 additions & 531 deletions
Large diffs are not rendered by default.

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java

Lines changed: 324 additions & 532 deletions
Large diffs are not rendered by default.

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClientBuilder.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -285,23 +285,6 @@ public SearchClientBuilder retryPolicy(RetryPolicy retryPolicy) {
285285
return this;
286286
}
287287

288-
/**
289-
* Sets the Audience to use for authentication with Microsoft Entra ID.
290-
* <p>
291-
* If {@code audience} is null the public cloud audience will be assumed.
292-
*
293-
* @param audience The Audience to use for authentication with Microsoft Entra ID.
294-
* @return The updated SearchClientBuilder object.
295-
*/
296-
public SearchClientBuilder audience(SearchAudience audience) {
297-
if (audience == null) {
298-
this.scopes = DEFAULT_SCOPES;
299-
} else {
300-
this.scopes = new String[] { audience.getValue() + "/.default" };
301-
}
302-
return this;
303-
}
304-
305288
/**
306289
* Builds an instance of SearchClientImpl with the provided parameters.
307290
*

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchServiceVersion.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public enum SearchServiceVersion implements ServiceVersion {
2727
*/
2828
V2025_09_01("2025-09-01"),
2929
/**
30-
* Enum value 2026-04-01.
30+
* Enum value 2025-11-01-preview.
3131
*/
32-
V2026_04_01("2026-04-01");
32+
V2025_11_01_PREVIEW("2025-11-01-preview");
3333

3434
private final String version;
3535

@@ -51,6 +51,6 @@ public String getVersion() {
5151
* @return The latest {@link SearchServiceVersion}.
5252
*/
5353
public static SearchServiceVersion getLatest() {
54-
return V2026_04_01;
54+
return V2025_11_01_PREVIEW;
5555
}
5656
}

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/KnowledgeBaseRetrievalClientImpl.java

Lines changed: 71 additions & 56 deletions
Large diffs are not rendered by default.

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/SearchClientImpl.java

Lines changed: 448 additions & 178 deletions
Large diffs are not rendered by default.

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/SearchIndexClientImpl.java

Lines changed: 650 additions & 1485 deletions
Large diffs are not rendered by default.

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/SearchIndexerClientImpl.java

Lines changed: 759 additions & 331 deletions
Large diffs are not rendered by default.

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/models/AutocompletePostRequest.java

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
45
package com.azure.search.documents.implementation.models;
56

67
import com.azure.core.annotation.Fluent;
@@ -21,7 +22,6 @@
2122
*/
2223
@Fluent
2324
public final class AutocompletePostRequest implements JsonSerializable<AutocompletePostRequest> {
24-
2525
/*
2626
* The search text on which to base autocomplete results.
2727
*/
@@ -93,7 +93,7 @@ public final class AutocompletePostRequest implements JsonSerializable<Autocompl
9393

9494
/**
9595
* Creates an instance of AutocompletePostRequest class.
96-
*
96+
*
9797
* @param searchText the searchText value to set.
9898
* @param suggesterName the suggesterName value to set.
9999
*/
@@ -105,7 +105,7 @@ public AutocompletePostRequest(String searchText, String suggesterName) {
105105

106106
/**
107107
* Get the searchText property: The search text on which to base autocomplete results.
108-
*
108+
*
109109
* @return the searchText value.
110110
*/
111111
@Generated
@@ -116,7 +116,7 @@ public String getSearchText() {
116116
/**
117117
* Get the autocompleteMode property: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms'
118118
* to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms.
119-
*
119+
*
120120
* @return the autocompleteMode value.
121121
*/
122122
@Generated
@@ -127,7 +127,7 @@ public AutocompleteMode getAutocompleteMode() {
127127
/**
128128
* Set the autocompleteMode property: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms'
129129
* to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms.
130-
*
130+
*
131131
* @param autocompleteMode the autocompleteMode value to set.
132132
* @return the AutocompletePostRequest object itself.
133133
*/
@@ -140,7 +140,7 @@ public AutocompletePostRequest setAutocompleteMode(AutocompleteMode autocomplete
140140
/**
141141
* Get the filter property: An OData expression that filters the documents used to produce completed terms for the
142142
* Autocomplete result.
143-
*
143+
*
144144
* @return the filter value.
145145
*/
146146
@Generated
@@ -151,7 +151,7 @@ public String getFilter() {
151151
/**
152152
* Set the filter property: An OData expression that filters the documents used to produce completed terms for the
153153
* Autocomplete result.
154-
*
154+
*
155155
* @param filter the filter value to set.
156156
* @return the AutocompletePostRequest object itself.
157157
*/
@@ -166,7 +166,7 @@ public AutocompletePostRequest setFilter(String filter) {
166166
* Default is false. When set to true, the query will autocomplete terms even if there's a substituted or missing
167167
* character in the search text. While this provides a better experience in some scenarios, it comes at a
168168
* performance cost as fuzzy autocomplete queries are slower and consume more resources.
169-
*
169+
*
170170
* @return the useFuzzyMatching value.
171171
*/
172172
@Generated
@@ -179,7 +179,7 @@ public Boolean isUseFuzzyMatching() {
179179
* Default is false. When set to true, the query will autocomplete terms even if there's a substituted or missing
180180
* character in the search text. While this provides a better experience in some scenarios, it comes at a
181181
* performance cost as fuzzy autocomplete queries are slower and consume more resources.
182-
*
182+
*
183183
* @param useFuzzyMatching the useFuzzyMatching value to set.
184184
* @return the AutocompletePostRequest object itself.
185185
*/
@@ -192,7 +192,7 @@ public AutocompletePostRequest setUseFuzzyMatching(Boolean useFuzzyMatching) {
192192
/**
193193
* Get the highlightPostTag property: A string tag that is appended to hit highlights. Must be set with
194194
* highlightPreTag. If omitted, hit highlighting is disabled.
195-
*
195+
*
196196
* @return the highlightPostTag value.
197197
*/
198198
@Generated
@@ -203,7 +203,7 @@ public String getHighlightPostTag() {
203203
/**
204204
* Set the highlightPostTag property: A string tag that is appended to hit highlights. Must be set with
205205
* highlightPreTag. If omitted, hit highlighting is disabled.
206-
*
206+
*
207207
* @param highlightPostTag the highlightPostTag value to set.
208208
* @return the AutocompletePostRequest object itself.
209209
*/
@@ -216,7 +216,7 @@ public AutocompletePostRequest setHighlightPostTag(String highlightPostTag) {
216216
/**
217217
* Get the highlightPreTag property: A string tag that is prepended to hit highlights. Must be set with
218218
* highlightPostTag. If omitted, hit highlighting is disabled.
219-
*
219+
*
220220
* @return the highlightPreTag value.
221221
*/
222222
@Generated
@@ -227,7 +227,7 @@ public String getHighlightPreTag() {
227227
/**
228228
* Set the highlightPreTag property: A string tag that is prepended to hit highlights. Must be set with
229229
* highlightPostTag. If omitted, hit highlighting is disabled.
230-
*
230+
*
231231
* @param highlightPreTag the highlightPreTag value to set.
232232
* @return the AutocompletePostRequest object itself.
233233
*/
@@ -241,7 +241,7 @@ public AutocompletePostRequest setHighlightPreTag(String highlightPreTag) {
241241
* Get the minimumCoverage property: A number between 0 and 100 indicating the percentage of the index that must be
242242
* covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful
243243
* for ensuring search availability even for services with only one replica. The default is 80.
244-
*
244+
*
245245
* @return the minimumCoverage value.
246246
*/
247247
@Generated
@@ -253,7 +253,7 @@ public Double getMinimumCoverage() {
253253
* Set the minimumCoverage property: A number between 0 and 100 indicating the percentage of the index that must be
254254
* covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful
255255
* for ensuring search availability even for services with only one replica. The default is 80.
256-
*
256+
*
257257
* @param minimumCoverage the minimumCoverage value to set.
258258
* @return the AutocompletePostRequest object itself.
259259
*/
@@ -266,7 +266,7 @@ public AutocompletePostRequest setMinimumCoverage(Double minimumCoverage) {
266266
/**
267267
* Get the searchFields property: The comma-separated list of field names to consider when querying for
268268
* auto-completed terms. Target fields must be included in the specified suggester.
269-
*
269+
*
270270
* @return the searchFields value.
271271
*/
272272
@Generated
@@ -277,7 +277,7 @@ public List<String> getSearchFields() {
277277
/**
278278
* Set the searchFields property: The comma-separated list of field names to consider when querying for
279279
* auto-completed terms. Target fields must be included in the specified suggester.
280-
*
280+
*
281281
* @param searchFields the searchFields value to set.
282282
* @return the AutocompletePostRequest object itself.
283283
*/
@@ -290,7 +290,7 @@ public AutocompletePostRequest setSearchFields(List<String> searchFields) {
290290
/**
291291
* Get the suggesterName property: The name of the suggester as specified in the suggesters collection that's part
292292
* of the index definition.
293-
*
293+
*
294294
* @return the suggesterName value.
295295
*/
296296
@Generated
@@ -301,7 +301,7 @@ public String getSuggesterName() {
301301
/**
302302
* Get the top property: The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The
303303
* default is 5.
304-
*
304+
*
305305
* @return the top value.
306306
*/
307307
@Generated
@@ -312,7 +312,7 @@ public Integer getTop() {
312312
/**
313313
* Set the top property: The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The
314314
* default is 5.
315-
*
315+
*
316316
* @param top the top value to set.
317317
* @return the AutocompletePostRequest object itself.
318318
*/
@@ -350,7 +350,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
350350

351351
/**
352352
* Reads an instance of AutocompletePostRequest from the JsonReader.
353-
*
353+
*
354354
* @param jsonReader The JsonReader being read.
355355
* @return An instance of AutocompletePostRequest if the JsonReader was pointing to an instance of it, or null if it
356356
* was pointing to JSON null.
@@ -373,6 +373,7 @@ public static AutocompletePostRequest fromJson(JsonReader jsonReader) throws IOE
373373
while (reader.nextToken() != JsonToken.END_OBJECT) {
374374
String fieldName = reader.getFieldName();
375375
reader.nextToken();
376+
376377
if ("search".equals(fieldName)) {
377378
searchText = reader.getString();
378379
} else if ("suggesterName".equals(fieldName)) {
@@ -412,6 +413,7 @@ public static AutocompletePostRequest fromJson(JsonReader jsonReader) throws IOE
412413
deserializedAutocompletePostRequest.minimumCoverage = minimumCoverage;
413414
deserializedAutocompletePostRequest.searchFields = searchFields;
414415
deserializedAutocompletePostRequest.top = top;
416+
415417
return deserializedAutocompletePostRequest;
416418
});
417419
}

0 commit comments

Comments
 (0)