|  |  | 1 |  | // Copyright (c) Microsoft Corporation. All rights reserved. | 
|  |  | 2 |  | // Licensed under the MIT License. | 
|  |  | 3 |  |  | 
|  |  | 4 |  | using System; | 
|  |  | 5 |  |  | 
|  |  | 6 |  | namespace Azure.Search.Documents.Models | 
|  |  | 7 |  | { | 
|  |  | 8 |  |     /// <summary> | 
|  |  | 9 |  |     /// A single bucket of a simple or interval facet query result that reports | 
|  |  | 10 |  |     /// the number of documents with a field falling within a particular | 
|  |  | 11 |  |     /// interval or having a specific value. | 
|  |  | 12 |  |     /// </summary> | 
|  |  | 13 |  |     /// <typeparam name="T"> | 
|  |  | 14 |  |     /// A type that matches the type of the field to which the facet was | 
|  |  | 15 |  |     /// applied. | 
|  |  | 16 |  |     /// </typeparam> | 
|  |  | 17 |  |     public class ValueFacetResult<T> | 
|  |  | 18 |  |     { | 
|  |  | 19 |  |         /// <summary> | 
|  |  | 20 |  |         /// Gets the approximate count of documents falling within the bucket | 
|  |  | 21 |  |         /// described by this facet. | 
|  |  | 22 |  |         /// </summary> | 
|  | 4 | 23 |  |         public long Count { get; } | 
|  |  | 24 |  |  | 
|  |  | 25 |  |         /// <summary> | 
|  |  | 26 |  |         /// Gets the value of the facet, or the inclusive lower bound if it's | 
|  |  | 27 |  |         /// an interval facet. | 
|  |  | 28 |  |         /// </summary> | 
|  | 4 | 29 |  |         public T Value { get; } | 
|  |  | 30 |  |  | 
|  |  | 31 |  |         /// <summary> | 
|  |  | 32 |  |         /// Creates a new instance of the ValueFacetResult class. | 
|  |  | 33 |  |         /// </summary> | 
|  |  | 34 |  |         /// <param name="count"> | 
|  |  | 35 |  |         /// The approximate count of documents falling within the bucket | 
|  |  | 36 |  |         /// described by this facet. | 
|  |  | 37 |  |         /// </param> | 
|  |  | 38 |  |         /// <param name="value"> | 
|  |  | 39 |  |         /// The value of the facet, or the inclusive lower bound if it's an | 
|  |  | 40 |  |         /// interval facet. | 
|  |  | 41 |  |         /// </param> | 
|  | 4 | 42 |  |         public ValueFacetResult(long count, T value) | 
|  |  | 43 |  |         { | 
|  | 4 | 44 |  |             Value = value; | 
|  | 4 | 45 |  |             Count = count; | 
|  | 4 | 46 |  |         } | 
|  |  | 47 |  |     } | 
|  |  | 48 |  | } |