File tree Expand file tree Collapse file tree 8 files changed +20
-7
lines changed
src/IBM.Watson.Discovery.v1/Model Expand file tree Collapse file tree 8 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// Calculation.
2525 /// </summary>
26- public class Calculation
26+ public class Calculation : QueryAggregation
2727 {
2828 /// <summary>
2929 /// The field where the aggregation is located in the document.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// Filter.
2525 /// </summary>
26- public class Filter
26+ public class Filter : QueryAggregation
2727 {
2828 /// <summary>
2929 /// The match the aggregated results queried for.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// Histogram.
2525 /// </summary>
26- public class Histogram
26+ public class Histogram : QueryAggregation
2727 {
2828 /// <summary>
2929 /// The field where the aggregation is located in the document.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// Nested.
2525 /// </summary>
26- public class Nested
26+ public class Nested : QueryAggregation
2727 {
2828 /// <summary>
2929 /// The area of the results the aggregation was restricted to.
Original file line number Diff line number Diff line change 1616*/
1717
1818using System . Collections . Generic ;
19+ using JsonSubTypes ;
1920using Newtonsoft . Json ;
2021
2122namespace IBM . Watson . Discovery . v1 . Model
2223{
2324 /// <summary>
2425 /// An aggregation produced by Discovery to analyze the input provided.
2526 /// </summary>
27+ [ JsonConverter ( typeof ( JsonSubtypes ) , "Type" ) ]
28+ [ JsonSubtypes . KnownSubType ( typeof ( Histogram ) , "histogram" ) ]
29+ [ JsonSubtypes . KnownSubType ( typeof ( Calculation ) , "max" ) ]
30+ [ JsonSubtypes . KnownSubType ( typeof ( Calculation ) , "min" ) ]
31+ [ JsonSubtypes . KnownSubType ( typeof ( Calculation ) , "average" ) ]
32+ [ JsonSubtypes . KnownSubType ( typeof ( Calculation ) , "sum" ) ]
33+ [ JsonSubtypes . KnownSubType ( typeof ( Calculation ) , "unique_count" ) ]
34+ [ JsonSubtypes . KnownSubType ( typeof ( Term ) , "term" ) ]
35+ [ JsonSubtypes . KnownSubType ( typeof ( Filter ) , "filter" ) ]
36+ [ JsonSubtypes . KnownSubType ( typeof ( Nested ) , "nested" ) ]
37+ [ JsonSubtypes . KnownSubType ( typeof ( Timeslice ) , "timeslice" ) ]
38+ [ JsonSubtypes . KnownSubType ( typeof ( TopHits ) , "top_hits" ) ]
2639 public class QueryAggregation
2740 {
2841 /// <summary>
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// Term.
2525 /// </summary>
26- public class Term
26+ public class Term : QueryAggregation
2727 {
2828 /// <summary>
2929 /// The field where the aggregation is located in the document.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// Timeslice.
2525 /// </summary>
26- public class Timeslice
26+ public class Timeslice : QueryAggregation
2727 {
2828 /// <summary>
2929 /// The field where the aggregation is located in the document.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace IBM.Watson.Discovery.v1.Model
2323 /// <summary>
2424 /// TopHits.
2525 /// </summary>
26- public class TopHits
26+ public class TopHits : QueryAggregation
2727 {
2828 /// <summary>
2929 /// Number of top hits returned by the aggregation.
You can’t perform that action at this time.
0 commit comments