-
Notifications
You must be signed in to change notification settings - Fork 52
/
model_search_slo_response_meta_page.go
347 lines (305 loc) · 10.6 KB
/
model_search_slo_response_meta_page.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.
package datadogV1
import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
// SearchSLOResponseMetaPage Pagination metadata returned by the API.
type SearchSLOResponseMetaPage struct {
// The first number.
FirstNumber *int64 `json:"first_number,omitempty"`
// The last number.
LastNumber *int64 `json:"last_number,omitempty"`
// The next number.
NextNumber *int64 `json:"next_number,omitempty"`
// The page number.
Number *int64 `json:"number,omitempty"`
// The previous page number.
PrevNumber *int64 `json:"prev_number,omitempty"`
// The size of the response.
Size *int64 `json:"size,omitempty"`
// The total number of SLOs in the response.
Total *int64 `json:"total,omitempty"`
// Type of pagination.
Type *string `json:"type,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{}
}
// NewSearchSLOResponseMetaPage instantiates a new SearchSLOResponseMetaPage 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 NewSearchSLOResponseMetaPage() *SearchSLOResponseMetaPage {
this := SearchSLOResponseMetaPage{}
return &this
}
// NewSearchSLOResponseMetaPageWithDefaults instantiates a new SearchSLOResponseMetaPage 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 NewSearchSLOResponseMetaPageWithDefaults() *SearchSLOResponseMetaPage {
this := SearchSLOResponseMetaPage{}
return &this
}
// GetFirstNumber returns the FirstNumber field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetFirstNumber() int64 {
if o == nil || o.FirstNumber == nil {
var ret int64
return ret
}
return *o.FirstNumber
}
// GetFirstNumberOk returns a tuple with the FirstNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetFirstNumberOk() (*int64, bool) {
if o == nil || o.FirstNumber == nil {
return nil, false
}
return o.FirstNumber, true
}
// HasFirstNumber returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasFirstNumber() bool {
return o != nil && o.FirstNumber != nil
}
// SetFirstNumber gets a reference to the given int64 and assigns it to the FirstNumber field.
func (o *SearchSLOResponseMetaPage) SetFirstNumber(v int64) {
o.FirstNumber = &v
}
// GetLastNumber returns the LastNumber field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetLastNumber() int64 {
if o == nil || o.LastNumber == nil {
var ret int64
return ret
}
return *o.LastNumber
}
// GetLastNumberOk returns a tuple with the LastNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetLastNumberOk() (*int64, bool) {
if o == nil || o.LastNumber == nil {
return nil, false
}
return o.LastNumber, true
}
// HasLastNumber returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasLastNumber() bool {
return o != nil && o.LastNumber != nil
}
// SetLastNumber gets a reference to the given int64 and assigns it to the LastNumber field.
func (o *SearchSLOResponseMetaPage) SetLastNumber(v int64) {
o.LastNumber = &v
}
// GetNextNumber returns the NextNumber field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetNextNumber() int64 {
if o == nil || o.NextNumber == nil {
var ret int64
return ret
}
return *o.NextNumber
}
// GetNextNumberOk returns a tuple with the NextNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetNextNumberOk() (*int64, bool) {
if o == nil || o.NextNumber == nil {
return nil, false
}
return o.NextNumber, true
}
// HasNextNumber returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasNextNumber() bool {
return o != nil && o.NextNumber != nil
}
// SetNextNumber gets a reference to the given int64 and assigns it to the NextNumber field.
func (o *SearchSLOResponseMetaPage) SetNextNumber(v int64) {
o.NextNumber = &v
}
// GetNumber returns the Number field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetNumber() int64 {
if o == nil || o.Number == nil {
var ret int64
return ret
}
return *o.Number
}
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetNumberOk() (*int64, bool) {
if o == nil || o.Number == nil {
return nil, false
}
return o.Number, true
}
// HasNumber returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasNumber() bool {
return o != nil && o.Number != nil
}
// SetNumber gets a reference to the given int64 and assigns it to the Number field.
func (o *SearchSLOResponseMetaPage) SetNumber(v int64) {
o.Number = &v
}
// GetPrevNumber returns the PrevNumber field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetPrevNumber() int64 {
if o == nil || o.PrevNumber == nil {
var ret int64
return ret
}
return *o.PrevNumber
}
// GetPrevNumberOk returns a tuple with the PrevNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetPrevNumberOk() (*int64, bool) {
if o == nil || o.PrevNumber == nil {
return nil, false
}
return o.PrevNumber, true
}
// HasPrevNumber returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasPrevNumber() bool {
return o != nil && o.PrevNumber != nil
}
// SetPrevNumber gets a reference to the given int64 and assigns it to the PrevNumber field.
func (o *SearchSLOResponseMetaPage) SetPrevNumber(v int64) {
o.PrevNumber = &v
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetSize() int64 {
if o == nil || o.Size == nil {
var ret int64
return ret
}
return *o.Size
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetSizeOk() (*int64, bool) {
if o == nil || o.Size == nil {
return nil, false
}
return o.Size, true
}
// HasSize returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasSize() bool {
return o != nil && o.Size != nil
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *SearchSLOResponseMetaPage) SetSize(v int64) {
o.Size = &v
}
// GetTotal returns the Total field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetTotal() int64 {
if o == nil || o.Total == nil {
var ret int64
return ret
}
return *o.Total
}
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetTotalOk() (*int64, bool) {
if o == nil || o.Total == nil {
return nil, false
}
return o.Total, true
}
// HasTotal returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasTotal() bool {
return o != nil && o.Total != nil
}
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
func (o *SearchSLOResponseMetaPage) SetTotal(v int64) {
o.Total = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *SearchSLOResponseMetaPage) GetType() string {
if o == nil || o.Type == nil {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSLOResponseMetaPage) GetTypeOk() (*string, bool) {
if o == nil || o.Type == nil {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *SearchSLOResponseMetaPage) HasType() bool {
return o != nil && o.Type != nil
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *SearchSLOResponseMetaPage) SetType(v string) {
o.Type = &v
}
// MarshalJSON serializes the struct using spec logic.
func (o SearchSLOResponseMetaPage) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.FirstNumber != nil {
toSerialize["first_number"] = o.FirstNumber
}
if o.LastNumber != nil {
toSerialize["last_number"] = o.LastNumber
}
if o.NextNumber != nil {
toSerialize["next_number"] = o.NextNumber
}
if o.Number != nil {
toSerialize["number"] = o.Number
}
if o.PrevNumber != nil {
toSerialize["prev_number"] = o.PrevNumber
}
if o.Size != nil {
toSerialize["size"] = o.Size
}
if o.Total != nil {
toSerialize["total"] = o.Total
}
if o.Type != nil {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return datadog.Marshal(toSerialize)
}
// UnmarshalJSON deserializes the given payload.
func (o *SearchSLOResponseMetaPage) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
FirstNumber *int64 `json:"first_number,omitempty"`
LastNumber *int64 `json:"last_number,omitempty"`
NextNumber *int64 `json:"next_number,omitempty"`
Number *int64 `json:"number,omitempty"`
PrevNumber *int64 `json:"prev_number,omitempty"`
Size *int64 `json:"size,omitempty"`
Total *int64 `json:"total,omitempty"`
Type *string `json:"type,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"first_number", "last_number", "next_number", "number", "prev_number", "size", "total", "type"})
} else {
return err
}
o.FirstNumber = all.FirstNumber
o.LastNumber = all.LastNumber
o.NextNumber = all.NextNumber
o.Number = all.Number
o.PrevNumber = all.PrevNumber
o.Size = all.Size
o.Total = all.Total
o.Type = all.Type
if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
}
return nil
}