-
Notifications
You must be signed in to change notification settings - Fork 12
/
searchaggregation.go
41 lines (27 loc) · 966 Bytes
/
searchaggregation.go
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
package platformclientv2
import (
"encoding/json"
"strconv"
"strings"
)
// Searchaggregation
type Searchaggregation struct {
// Field - The field used for aggregation
Field *string `json:"field,omitempty"`
// Name - The name of the aggregation. The response aggregation uses this name.
Name *string `json:"name,omitempty"`
// VarType - The type of aggregation to perform
VarType *string `json:"type,omitempty"`
// Value - A value to use for aggregation
Value *string `json:"value,omitempty"`
// Size - The number aggregations results to return out of the entire result set
Size *int `json:"size,omitempty"`
// Order - The order in which aggregation results are sorted
Order *[]string `json:"order,omitempty"`
}
// String returns a JSON representation of the model
func (o *Searchaggregation) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}