-
Notifications
You must be signed in to change notification settings - Fork 3
/
model_aggregation_2.go
288 lines (236 loc) · 7.62 KB
/
model_aggregation_2.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/*
IdentityNow V3 API
Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
API version: 3.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sailpointsdk
import (
"encoding/json"
)
// Aggregation2 struct for Aggregation2
type Aggregation2 struct {
Nested *NestedAggregation `json:"nested,omitempty"`
Metric *MetricAggregation `json:"metric,omitempty"`
Filter *FilterAggregation `json:"filter,omitempty"`
Bucket *BucketAggregation `json:"bucket,omitempty"`
SubAggregation *Aggregations `json:"subAggregation,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Aggregation2 Aggregation2
// NewAggregation2 instantiates a new Aggregation2 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAggregation2() *Aggregation2 {
this := Aggregation2{}
return &this
}
// NewAggregation2WithDefaults instantiates a new Aggregation2 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAggregation2WithDefaults() *Aggregation2 {
this := Aggregation2{}
return &this
}
// GetNested returns the Nested field value if set, zero value otherwise.
func (o *Aggregation2) GetNested() NestedAggregation {
if o == nil || isNil(o.Nested) {
var ret NestedAggregation
return ret
}
return *o.Nested
}
// GetNestedOk returns a tuple with the Nested field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Aggregation2) GetNestedOk() (*NestedAggregation, bool) {
if o == nil || isNil(o.Nested) {
return nil, false
}
return o.Nested, true
}
// HasNested returns a boolean if a field has been set.
func (o *Aggregation2) HasNested() bool {
if o != nil && !isNil(o.Nested) {
return true
}
return false
}
// SetNested gets a reference to the given NestedAggregation and assigns it to the Nested field.
func (o *Aggregation2) SetNested(v NestedAggregation) {
o.Nested = &v
}
// GetMetric returns the Metric field value if set, zero value otherwise.
func (o *Aggregation2) GetMetric() MetricAggregation {
if o == nil || isNil(o.Metric) {
var ret MetricAggregation
return ret
}
return *o.Metric
}
// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Aggregation2) GetMetricOk() (*MetricAggregation, bool) {
if o == nil || isNil(o.Metric) {
return nil, false
}
return o.Metric, true
}
// HasMetric returns a boolean if a field has been set.
func (o *Aggregation2) HasMetric() bool {
if o != nil && !isNil(o.Metric) {
return true
}
return false
}
// SetMetric gets a reference to the given MetricAggregation and assigns it to the Metric field.
func (o *Aggregation2) SetMetric(v MetricAggregation) {
o.Metric = &v
}
// GetFilter returns the Filter field value if set, zero value otherwise.
func (o *Aggregation2) GetFilter() FilterAggregation {
if o == nil || isNil(o.Filter) {
var ret FilterAggregation
return ret
}
return *o.Filter
}
// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Aggregation2) GetFilterOk() (*FilterAggregation, bool) {
if o == nil || isNil(o.Filter) {
return nil, false
}
return o.Filter, true
}
// HasFilter returns a boolean if a field has been set.
func (o *Aggregation2) HasFilter() bool {
if o != nil && !isNil(o.Filter) {
return true
}
return false
}
// SetFilter gets a reference to the given FilterAggregation and assigns it to the Filter field.
func (o *Aggregation2) SetFilter(v FilterAggregation) {
o.Filter = &v
}
// GetBucket returns the Bucket field value if set, zero value otherwise.
func (o *Aggregation2) GetBucket() BucketAggregation {
if o == nil || isNil(o.Bucket) {
var ret BucketAggregation
return ret
}
return *o.Bucket
}
// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Aggregation2) GetBucketOk() (*BucketAggregation, bool) {
if o == nil || isNil(o.Bucket) {
return nil, false
}
return o.Bucket, true
}
// HasBucket returns a boolean if a field has been set.
func (o *Aggregation2) HasBucket() bool {
if o != nil && !isNil(o.Bucket) {
return true
}
return false
}
// SetBucket gets a reference to the given BucketAggregation and assigns it to the Bucket field.
func (o *Aggregation2) SetBucket(v BucketAggregation) {
o.Bucket = &v
}
// GetSubAggregation returns the SubAggregation field value if set, zero value otherwise.
func (o *Aggregation2) GetSubAggregation() Aggregations {
if o == nil || isNil(o.SubAggregation) {
var ret Aggregations
return ret
}
return *o.SubAggregation
}
// GetSubAggregationOk returns a tuple with the SubAggregation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Aggregation2) GetSubAggregationOk() (*Aggregations, bool) {
if o == nil || isNil(o.SubAggregation) {
return nil, false
}
return o.SubAggregation, true
}
// HasSubAggregation returns a boolean if a field has been set.
func (o *Aggregation2) HasSubAggregation() bool {
if o != nil && !isNil(o.SubAggregation) {
return true
}
return false
}
// SetSubAggregation gets a reference to the given Aggregations and assigns it to the SubAggregation field.
func (o *Aggregation2) SetSubAggregation(v Aggregations) {
o.SubAggregation = &v
}
func (o Aggregation2) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if !isNil(o.Nested) {
toSerialize["nested"] = o.Nested
}
if !isNil(o.Metric) {
toSerialize["metric"] = o.Metric
}
if !isNil(o.Filter) {
toSerialize["filter"] = o.Filter
}
if !isNil(o.Bucket) {
toSerialize["bucket"] = o.Bucket
}
if !isNil(o.SubAggregation) {
toSerialize["subAggregation"] = o.SubAggregation
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *Aggregation2) UnmarshalJSON(bytes []byte) (err error) {
varAggregation2 := _Aggregation2{}
if err = json.Unmarshal(bytes, &varAggregation2); err == nil {
*o = Aggregation2(varAggregation2)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "nested")
delete(additionalProperties, "metric")
delete(additionalProperties, "filter")
delete(additionalProperties, "bucket")
delete(additionalProperties, "subAggregation")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAggregation2 struct {
value *Aggregation2
isSet bool
}
func (v NullableAggregation2) Get() *Aggregation2 {
return v.value
}
func (v *NullableAggregation2) Set(val *Aggregation2) {
v.value = val
v.isSet = true
}
func (v NullableAggregation2) IsSet() bool {
return v.isSet
}
func (v *NullableAggregation2) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAggregation2(val *Aggregation2) *NullableAggregation2 {
return &NullableAggregation2{value: val, isSet: true}
}
func (v NullableAggregation2) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAggregation2) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}