-
Notifications
You must be signed in to change notification settings - Fork 52
/
model_monitor_update_request.go
682 lines (601 loc) · 21.8 KB
/
model_monitor_update_request.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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
// 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 (
"time"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
// MonitorUpdateRequest Object describing a monitor update request.
type MonitorUpdateRequest struct {
// Timestamp of the monitor creation.
Created *time.Time `json:"created,omitempty"`
// Object describing the creator of the shared element.
Creator *Creator `json:"creator,omitempty"`
// Whether or not the monitor is deleted. (Always `null`)
Deleted datadog.NullableTime `json:"deleted,omitempty"`
// ID of this monitor.
Id *int64 `json:"id,omitempty"`
// A message to include with notifications for this monitor.
Message *string `json:"message,omitempty"`
// Last timestamp when the monitor was edited.
Modified *time.Time `json:"modified,omitempty"`
// Whether or not the monitor is broken down on different groups.
Multi *bool `json:"multi,omitempty"`
// The monitor name.
Name *string `json:"name,omitempty"`
// List of options associated with your monitor.
Options *MonitorOptions `json:"options,omitempty"`
// The different states your monitor can be in.
OverallState *MonitorOverallStates `json:"overall_state,omitempty"`
// Integer from 1 (high) to 5 (low) indicating alert severity.
Priority *int64 `json:"priority,omitempty"`
// The monitor query.
Query *string `json:"query,omitempty"`
// A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) and are located in the `data.id` field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. `restricted_roles` is the successor of `locked`. For more information about `locked` and `restricted_roles`, see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options).
RestrictedRoles datadog.NullableList[string] `json:"restricted_roles,omitempty"`
// Wrapper object with the different monitor states.
State *MonitorState `json:"state,omitempty"`
// Tags associated to your monitor.
Tags []string `json:"tags,omitempty"`
// The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs.
Type *MonitorType `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{}
}
// NewMonitorUpdateRequest instantiates a new MonitorUpdateRequest 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 NewMonitorUpdateRequest() *MonitorUpdateRequest {
this := MonitorUpdateRequest{}
return &this
}
// NewMonitorUpdateRequestWithDefaults instantiates a new MonitorUpdateRequest 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 NewMonitorUpdateRequestWithDefaults() *MonitorUpdateRequest {
this := MonitorUpdateRequest{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetCreated() time.Time {
if o == nil || o.Created == nil {
var ret time.Time
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetCreatedOk() (*time.Time, bool) {
if o == nil || o.Created == nil {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasCreated() bool {
return o != nil && o.Created != nil
}
// SetCreated gets a reference to the given time.Time and assigns it to the Created field.
func (o *MonitorUpdateRequest) SetCreated(v time.Time) {
o.Created = &v
}
// GetCreator returns the Creator field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetCreator() Creator {
if o == nil || o.Creator == nil {
var ret Creator
return ret
}
return *o.Creator
}
// GetCreatorOk returns a tuple with the Creator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetCreatorOk() (*Creator, bool) {
if o == nil || o.Creator == nil {
return nil, false
}
return o.Creator, true
}
// HasCreator returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasCreator() bool {
return o != nil && o.Creator != nil
}
// SetCreator gets a reference to the given Creator and assigns it to the Creator field.
func (o *MonitorUpdateRequest) SetCreator(v Creator) {
o.Creator = &v
}
// GetDeleted returns the Deleted field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorUpdateRequest) GetDeleted() time.Time {
if o == nil || o.Deleted.Get() == nil {
var ret time.Time
return ret
}
return *o.Deleted.Get()
}
// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorUpdateRequest) GetDeletedOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.Deleted.Get(), o.Deleted.IsSet()
}
// HasDeleted returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasDeleted() bool {
return o != nil && o.Deleted.IsSet()
}
// SetDeleted gets a reference to the given datadog.NullableTime and assigns it to the Deleted field.
func (o *MonitorUpdateRequest) SetDeleted(v time.Time) {
o.Deleted.Set(&v)
}
// SetDeletedNil sets the value for Deleted to be an explicit nil.
func (o *MonitorUpdateRequest) SetDeletedNil() {
o.Deleted.Set(nil)
}
// UnsetDeleted ensures that no value is present for Deleted, not even an explicit nil.
func (o *MonitorUpdateRequest) UnsetDeleted() {
o.Deleted.Unset()
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetId() int64 {
if o == nil || o.Id == nil {
var ret int64
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetIdOk() (*int64, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasId() bool {
return o != nil && o.Id != nil
}
// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *MonitorUpdateRequest) SetId(v int64) {
o.Id = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetMessage() string {
if o == nil || o.Message == nil {
var ret string
return ret
}
return *o.Message
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetMessageOk() (*string, bool) {
if o == nil || o.Message == nil {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasMessage() bool {
return o != nil && o.Message != nil
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *MonitorUpdateRequest) SetMessage(v string) {
o.Message = &v
}
// GetModified returns the Modified field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetModified() time.Time {
if o == nil || o.Modified == nil {
var ret time.Time
return ret
}
return *o.Modified
}
// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetModifiedOk() (*time.Time, bool) {
if o == nil || o.Modified == nil {
return nil, false
}
return o.Modified, true
}
// HasModified returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasModified() bool {
return o != nil && o.Modified != nil
}
// SetModified gets a reference to the given time.Time and assigns it to the Modified field.
func (o *MonitorUpdateRequest) SetModified(v time.Time) {
o.Modified = &v
}
// GetMulti returns the Multi field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetMulti() bool {
if o == nil || o.Multi == nil {
var ret bool
return ret
}
return *o.Multi
}
// GetMultiOk returns a tuple with the Multi field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetMultiOk() (*bool, bool) {
if o == nil || o.Multi == nil {
return nil, false
}
return o.Multi, true
}
// HasMulti returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasMulti() bool {
return o != nil && o.Multi != nil
}
// SetMulti gets a reference to the given bool and assigns it to the Multi field.
func (o *MonitorUpdateRequest) SetMulti(v bool) {
o.Multi = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasName() bool {
return o != nil && o.Name != nil
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *MonitorUpdateRequest) SetName(v string) {
o.Name = &v
}
// GetOptions returns the Options field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetOptions() MonitorOptions {
if o == nil || o.Options == nil {
var ret MonitorOptions
return ret
}
return *o.Options
}
// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetOptionsOk() (*MonitorOptions, bool) {
if o == nil || o.Options == nil {
return nil, false
}
return o.Options, true
}
// HasOptions returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasOptions() bool {
return o != nil && o.Options != nil
}
// SetOptions gets a reference to the given MonitorOptions and assigns it to the Options field.
func (o *MonitorUpdateRequest) SetOptions(v MonitorOptions) {
o.Options = &v
}
// GetOverallState returns the OverallState field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetOverallState() MonitorOverallStates {
if o == nil || o.OverallState == nil {
var ret MonitorOverallStates
return ret
}
return *o.OverallState
}
// GetOverallStateOk returns a tuple with the OverallState field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetOverallStateOk() (*MonitorOverallStates, bool) {
if o == nil || o.OverallState == nil {
return nil, false
}
return o.OverallState, true
}
// HasOverallState returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasOverallState() bool {
return o != nil && o.OverallState != nil
}
// SetOverallState gets a reference to the given MonitorOverallStates and assigns it to the OverallState field.
func (o *MonitorUpdateRequest) SetOverallState(v MonitorOverallStates) {
o.OverallState = &v
}
// GetPriority returns the Priority field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetPriority() int64 {
if o == nil || o.Priority == nil {
var ret int64
return ret
}
return *o.Priority
}
// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetPriorityOk() (*int64, bool) {
if o == nil || o.Priority == nil {
return nil, false
}
return o.Priority, true
}
// HasPriority returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasPriority() bool {
return o != nil && o.Priority != nil
}
// SetPriority gets a reference to the given int64 and assigns it to the Priority field.
func (o *MonitorUpdateRequest) SetPriority(v int64) {
o.Priority = &v
}
// GetQuery returns the Query field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetQuery() string {
if o == nil || o.Query == nil {
var ret string
return ret
}
return *o.Query
}
// GetQueryOk returns a tuple with the Query field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetQueryOk() (*string, bool) {
if o == nil || o.Query == nil {
return nil, false
}
return o.Query, true
}
// HasQuery returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasQuery() bool {
return o != nil && o.Query != nil
}
// SetQuery gets a reference to the given string and assigns it to the Query field.
func (o *MonitorUpdateRequest) SetQuery(v string) {
o.Query = &v
}
// GetRestrictedRoles returns the RestrictedRoles field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorUpdateRequest) GetRestrictedRoles() []string {
if o == nil || o.RestrictedRoles.Get() == nil {
var ret []string
return ret
}
return *o.RestrictedRoles.Get()
}
// GetRestrictedRolesOk returns a tuple with the RestrictedRoles field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
func (o *MonitorUpdateRequest) GetRestrictedRolesOk() (*[]string, bool) {
if o == nil {
return nil, false
}
return o.RestrictedRoles.Get(), o.RestrictedRoles.IsSet()
}
// HasRestrictedRoles returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasRestrictedRoles() bool {
return o != nil && o.RestrictedRoles.IsSet()
}
// SetRestrictedRoles gets a reference to the given datadog.NullableList[string] and assigns it to the RestrictedRoles field.
func (o *MonitorUpdateRequest) SetRestrictedRoles(v []string) {
o.RestrictedRoles.Set(&v)
}
// SetRestrictedRolesNil sets the value for RestrictedRoles to be an explicit nil.
func (o *MonitorUpdateRequest) SetRestrictedRolesNil() {
o.RestrictedRoles.Set(nil)
}
// UnsetRestrictedRoles ensures that no value is present for RestrictedRoles, not even an explicit nil.
func (o *MonitorUpdateRequest) UnsetRestrictedRoles() {
o.RestrictedRoles.Unset()
}
// GetState returns the State field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetState() MonitorState {
if o == nil || o.State == nil {
var ret MonitorState
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetStateOk() (*MonitorState, bool) {
if o == nil || o.State == nil {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasState() bool {
return o != nil && o.State != nil
}
// SetState gets a reference to the given MonitorState and assigns it to the State field.
func (o *MonitorUpdateRequest) SetState(v MonitorState) {
o.State = &v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetTags() []string {
if o == nil || o.Tags == nil {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonitorUpdateRequest) GetTagsOk() (*[]string, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
return &o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *MonitorUpdateRequest) HasTags() bool {
return o != nil && o.Tags != nil
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *MonitorUpdateRequest) SetTags(v []string) {
o.Tags = v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *MonitorUpdateRequest) GetType() MonitorType {
if o == nil || o.Type == nil {
var ret MonitorType
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 *MonitorUpdateRequest) GetTypeOk() (*MonitorType, 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 *MonitorUpdateRequest) HasType() bool {
return o != nil && o.Type != nil
}
// SetType gets a reference to the given MonitorType and assigns it to the Type field.
func (o *MonitorUpdateRequest) SetType(v MonitorType) {
o.Type = &v
}
// MarshalJSON serializes the struct using spec logic.
func (o MonitorUpdateRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.Created != nil {
if o.Created.Nanosecond() == 0 {
toSerialize["created"] = o.Created.Format("2006-01-02T15:04:05Z07:00")
} else {
toSerialize["created"] = o.Created.Format("2006-01-02T15:04:05.000Z07:00")
}
}
if o.Creator != nil {
toSerialize["creator"] = o.Creator
}
if o.Deleted.IsSet() {
toSerialize["deleted"] = o.Deleted.Get()
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Message != nil {
toSerialize["message"] = o.Message
}
if o.Modified != nil {
if o.Modified.Nanosecond() == 0 {
toSerialize["modified"] = o.Modified.Format("2006-01-02T15:04:05Z07:00")
} else {
toSerialize["modified"] = o.Modified.Format("2006-01-02T15:04:05.000Z07:00")
}
}
if o.Multi != nil {
toSerialize["multi"] = o.Multi
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Options != nil {
toSerialize["options"] = o.Options
}
if o.OverallState != nil {
toSerialize["overall_state"] = o.OverallState
}
if o.Priority != nil {
toSerialize["priority"] = o.Priority
}
if o.Query != nil {
toSerialize["query"] = o.Query
}
if o.RestrictedRoles.IsSet() {
toSerialize["restricted_roles"] = o.RestrictedRoles.Get()
}
if o.State != nil {
toSerialize["state"] = o.State
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
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 *MonitorUpdateRequest) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Created *time.Time `json:"created,omitempty"`
Creator *Creator `json:"creator,omitempty"`
Deleted datadog.NullableTime `json:"deleted,omitempty"`
Id *int64 `json:"id,omitempty"`
Message *string `json:"message,omitempty"`
Modified *time.Time `json:"modified,omitempty"`
Multi *bool `json:"multi,omitempty"`
Name *string `json:"name,omitempty"`
Options *MonitorOptions `json:"options,omitempty"`
OverallState *MonitorOverallStates `json:"overall_state,omitempty"`
Priority *int64 `json:"priority,omitempty"`
Query *string `json:"query,omitempty"`
RestrictedRoles datadog.NullableList[string] `json:"restricted_roles,omitempty"`
State *MonitorState `json:"state,omitempty"`
Tags []string `json:"tags,omitempty"`
Type *MonitorType `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{"created", "creator", "deleted", "id", "message", "modified", "multi", "name", "options", "overall_state", "priority", "query", "restricted_roles", "state", "tags", "type"})
} else {
return err
}
hasInvalidField := false
o.Created = all.Created
if all.Creator != nil && all.Creator.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Creator = all.Creator
o.Deleted = all.Deleted
o.Id = all.Id
o.Message = all.Message
o.Modified = all.Modified
o.Multi = all.Multi
o.Name = all.Name
if all.Options != nil && all.Options.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Options = all.Options
if all.OverallState != nil && !all.OverallState.IsValid() {
hasInvalidField = true
} else {
o.OverallState = all.OverallState
}
o.Priority = all.Priority
o.Query = all.Query
o.RestrictedRoles = all.RestrictedRoles
if all.State != nil && all.State.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.State = all.State
o.Tags = all.Tags
if all.Type != nil && !all.Type.IsValid() {
hasInvalidField = true
} else {
o.Type = all.Type
}
if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
}
if hasInvalidField {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
return nil
}