11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License.
33// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
45package com .azure .search .documents .implementation .models ;
56
67import com .azure .core .annotation .Fluent ;
2122 */
2223@ Fluent
2324public 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