| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | // <auto-generated/> |
| | | 5 | | |
| | | 6 | | #nullable disable |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | using System.Collections.Generic; |
| | | 10 | | using System.Linq; |
| | | 11 | | |
| | | 12 | | namespace Azure.Search.Documents.Models |
| | | 13 | | { |
| | | 14 | | /// <summary> The result of Autocomplete query. </summary> |
| | | 15 | | public partial class AutocompleteResults |
| | | 16 | | { |
| | | 17 | | /// <summary> Initializes a new instance of AutocompleteResults. </summary> |
| | | 18 | | /// <param name="results"> The list of returned Autocompleted items. </param> |
| | | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="results"/> is null. </exception> |
| | 0 | 20 | | internal AutocompleteResults(IEnumerable<AutocompleteItem> results) |
| | | 21 | | { |
| | 0 | 22 | | if (results == null) |
| | | 23 | | { |
| | 0 | 24 | | throw new ArgumentNullException(nameof(results)); |
| | | 25 | | } |
| | | 26 | | |
| | 0 | 27 | | Results = results.ToList(); |
| | 0 | 28 | | } |
| | | 29 | | |
| | | 30 | | /// <summary> Initializes a new instance of AutocompleteResults. </summary> |
| | | 31 | | /// <param name="coverage"> A value indicating the percentage of the index that was considered by the autocomple |
| | | 32 | | /// <param name="results"> The list of returned Autocompleted items. </param> |
| | 32 | 33 | | internal AutocompleteResults(double? coverage, IReadOnlyList<AutocompleteItem> results) |
| | | 34 | | { |
| | 32 | 35 | | Coverage = coverage; |
| | 32 | 36 | | Results = results; |
| | 32 | 37 | | } |
| | | 38 | | |
| | | 39 | | /// <summary> A value indicating the percentage of the index that was considered by the autocomplete request, or |
| | 0 | 40 | | public double? Coverage { get; } |
| | | 41 | | /// <summary> The list of returned Autocompleted items. </summary> |
| | 96 | 42 | | public IReadOnlyList<AutocompleteItem> Results { get; } |
| | | 43 | | } |
| | | 44 | | } |