-
Notifications
You must be signed in to change notification settings - Fork 52
/
model_teams_response_meta_pagination.go
347 lines (305 loc) · 10.7 KB
/
model_teams_response_meta_pagination.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 datadogV2
import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
// TeamsResponseMetaPagination Teams response metadata.
type TeamsResponseMetaPagination struct {
// The first offset.
FirstOffset *int64 `json:"first_offset,omitempty"`
// The last offset.
LastOffset *int64 `json:"last_offset,omitempty"`
// Pagination limit.
Limit *int64 `json:"limit,omitempty"`
// The next offset.
NextOffset *int64 `json:"next_offset,omitempty"`
// The offset.
Offset *int64 `json:"offset,omitempty"`
// The previous offset.
PrevOffset *int64 `json:"prev_offset,omitempty"`
// Total results.
Total *int64 `json:"total,omitempty"`
// Offset type.
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{}
}
// NewTeamsResponseMetaPagination instantiates a new TeamsResponseMetaPagination 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 NewTeamsResponseMetaPagination() *TeamsResponseMetaPagination {
this := TeamsResponseMetaPagination{}
return &this
}
// NewTeamsResponseMetaPaginationWithDefaults instantiates a new TeamsResponseMetaPagination 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 NewTeamsResponseMetaPaginationWithDefaults() *TeamsResponseMetaPagination {
this := TeamsResponseMetaPagination{}
return &this
}
// GetFirstOffset returns the FirstOffset field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) GetFirstOffset() int64 {
if o == nil || o.FirstOffset == nil {
var ret int64
return ret
}
return *o.FirstOffset
}
// GetFirstOffsetOk returns a tuple with the FirstOffset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamsResponseMetaPagination) GetFirstOffsetOk() (*int64, bool) {
if o == nil || o.FirstOffset == nil {
return nil, false
}
return o.FirstOffset, true
}
// HasFirstOffset returns a boolean if a field has been set.
func (o *TeamsResponseMetaPagination) HasFirstOffset() bool {
return o != nil && o.FirstOffset != nil
}
// SetFirstOffset gets a reference to the given int64 and assigns it to the FirstOffset field.
func (o *TeamsResponseMetaPagination) SetFirstOffset(v int64) {
o.FirstOffset = &v
}
// GetLastOffset returns the LastOffset field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) GetLastOffset() int64 {
if o == nil || o.LastOffset == nil {
var ret int64
return ret
}
return *o.LastOffset
}
// GetLastOffsetOk returns a tuple with the LastOffset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamsResponseMetaPagination) GetLastOffsetOk() (*int64, bool) {
if o == nil || o.LastOffset == nil {
return nil, false
}
return o.LastOffset, true
}
// HasLastOffset returns a boolean if a field has been set.
func (o *TeamsResponseMetaPagination) HasLastOffset() bool {
return o != nil && o.LastOffset != nil
}
// SetLastOffset gets a reference to the given int64 and assigns it to the LastOffset field.
func (o *TeamsResponseMetaPagination) SetLastOffset(v int64) {
o.LastOffset = &v
}
// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) GetLimit() int64 {
if o == nil || o.Limit == nil {
var ret int64
return ret
}
return *o.Limit
}
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamsResponseMetaPagination) GetLimitOk() (*int64, bool) {
if o == nil || o.Limit == nil {
return nil, false
}
return o.Limit, true
}
// HasLimit returns a boolean if a field has been set.
func (o *TeamsResponseMetaPagination) HasLimit() bool {
return o != nil && o.Limit != nil
}
// SetLimit gets a reference to the given int64 and assigns it to the Limit field.
func (o *TeamsResponseMetaPagination) SetLimit(v int64) {
o.Limit = &v
}
// GetNextOffset returns the NextOffset field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) GetNextOffset() int64 {
if o == nil || o.NextOffset == nil {
var ret int64
return ret
}
return *o.NextOffset
}
// GetNextOffsetOk returns a tuple with the NextOffset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamsResponseMetaPagination) GetNextOffsetOk() (*int64, bool) {
if o == nil || o.NextOffset == nil {
return nil, false
}
return o.NextOffset, true
}
// HasNextOffset returns a boolean if a field has been set.
func (o *TeamsResponseMetaPagination) HasNextOffset() bool {
return o != nil && o.NextOffset != nil
}
// SetNextOffset gets a reference to the given int64 and assigns it to the NextOffset field.
func (o *TeamsResponseMetaPagination) SetNextOffset(v int64) {
o.NextOffset = &v
}
// GetOffset returns the Offset field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) GetOffset() int64 {
if o == nil || o.Offset == nil {
var ret int64
return ret
}
return *o.Offset
}
// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamsResponseMetaPagination) GetOffsetOk() (*int64, bool) {
if o == nil || o.Offset == nil {
return nil, false
}
return o.Offset, true
}
// HasOffset returns a boolean if a field has been set.
func (o *TeamsResponseMetaPagination) HasOffset() bool {
return o != nil && o.Offset != nil
}
// SetOffset gets a reference to the given int64 and assigns it to the Offset field.
func (o *TeamsResponseMetaPagination) SetOffset(v int64) {
o.Offset = &v
}
// GetPrevOffset returns the PrevOffset field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) GetPrevOffset() int64 {
if o == nil || o.PrevOffset == nil {
var ret int64
return ret
}
return *o.PrevOffset
}
// GetPrevOffsetOk returns a tuple with the PrevOffset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamsResponseMetaPagination) GetPrevOffsetOk() (*int64, bool) {
if o == nil || o.PrevOffset == nil {
return nil, false
}
return o.PrevOffset, true
}
// HasPrevOffset returns a boolean if a field has been set.
func (o *TeamsResponseMetaPagination) HasPrevOffset() bool {
return o != nil && o.PrevOffset != nil
}
// SetPrevOffset gets a reference to the given int64 and assigns it to the PrevOffset field.
func (o *TeamsResponseMetaPagination) SetPrevOffset(v int64) {
o.PrevOffset = &v
}
// GetTotal returns the Total field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) 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 *TeamsResponseMetaPagination) 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 *TeamsResponseMetaPagination) 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 *TeamsResponseMetaPagination) SetTotal(v int64) {
o.Total = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *TeamsResponseMetaPagination) 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 *TeamsResponseMetaPagination) 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 *TeamsResponseMetaPagination) 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 *TeamsResponseMetaPagination) SetType(v string) {
o.Type = &v
}
// MarshalJSON serializes the struct using spec logic.
func (o TeamsResponseMetaPagination) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.FirstOffset != nil {
toSerialize["first_offset"] = o.FirstOffset
}
if o.LastOffset != nil {
toSerialize["last_offset"] = o.LastOffset
}
if o.Limit != nil {
toSerialize["limit"] = o.Limit
}
if o.NextOffset != nil {
toSerialize["next_offset"] = o.NextOffset
}
if o.Offset != nil {
toSerialize["offset"] = o.Offset
}
if o.PrevOffset != nil {
toSerialize["prev_offset"] = o.PrevOffset
}
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 *TeamsResponseMetaPagination) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
FirstOffset *int64 `json:"first_offset,omitempty"`
LastOffset *int64 `json:"last_offset,omitempty"`
Limit *int64 `json:"limit,omitempty"`
NextOffset *int64 `json:"next_offset,omitempty"`
Offset *int64 `json:"offset,omitempty"`
PrevOffset *int64 `json:"prev_offset,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_offset", "last_offset", "limit", "next_offset", "offset", "prev_offset", "total", "type"})
} else {
return err
}
o.FirstOffset = all.FirstOffset
o.LastOffset = all.LastOffset
o.Limit = all.Limit
o.NextOffset = all.NextOffset
o.Offset = all.Offset
o.PrevOffset = all.PrevOffset
o.Total = all.Total
o.Type = all.Type
if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
}
return nil
}