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