-
Notifications
You must be signed in to change notification settings - Fork 54
/
model_service_summary_widget_definition.go
644 lines (571 loc) · 21 KB
/
model_service_summary_widget_definition.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
// 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 (
"fmt"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
// ServiceSummaryWidgetDefinition The service summary displays the graphs of a chosen service in your screenboard. Only available on FREE layout dashboards.
type ServiceSummaryWidgetDefinition struct {
// Number of columns to display.
DisplayFormat *WidgetServiceSummaryDisplayFormat `json:"display_format,omitempty"`
// APM environment.
Env string `json:"env"`
// APM service.
Service string `json:"service"`
// Whether to show the latency breakdown or not.
ShowBreakdown *bool `json:"show_breakdown,omitempty"`
// Whether to show the latency distribution or not.
ShowDistribution *bool `json:"show_distribution,omitempty"`
// Whether to show the error metrics or not.
ShowErrors *bool `json:"show_errors,omitempty"`
// Whether to show the hits metrics or not.
ShowHits *bool `json:"show_hits,omitempty"`
// Whether to show the latency metrics or not.
ShowLatency *bool `json:"show_latency,omitempty"`
// Whether to show the resource list or not.
ShowResourceList *bool `json:"show_resource_list,omitempty"`
// Size of the widget.
SizeFormat *WidgetSizeFormat `json:"size_format,omitempty"`
// APM span name.
SpanName string `json:"span_name"`
// Time setting for the widget.
Time *WidgetTime `json:"time,omitempty"`
// Title of the widget.
Title *string `json:"title,omitempty"`
// How to align the text on the widget.
TitleAlign *WidgetTextAlign `json:"title_align,omitempty"`
// Size of the title.
TitleSize *string `json:"title_size,omitempty"`
// Type of the service summary widget.
Type ServiceSummaryWidgetDefinitionType `json:"type"`
// 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{}
}
// NewServiceSummaryWidgetDefinition instantiates a new ServiceSummaryWidgetDefinition 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 NewServiceSummaryWidgetDefinition(env string, service string, spanName string, typeVar ServiceSummaryWidgetDefinitionType) *ServiceSummaryWidgetDefinition {
this := ServiceSummaryWidgetDefinition{}
this.Env = env
this.Service = service
this.SpanName = spanName
this.Type = typeVar
return &this
}
// NewServiceSummaryWidgetDefinitionWithDefaults instantiates a new ServiceSummaryWidgetDefinition 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 NewServiceSummaryWidgetDefinitionWithDefaults() *ServiceSummaryWidgetDefinition {
this := ServiceSummaryWidgetDefinition{}
var typeVar ServiceSummaryWidgetDefinitionType = SERVICESUMMARYWIDGETDEFINITIONTYPE_TRACE_SERVICE
this.Type = typeVar
return &this
}
// GetDisplayFormat returns the DisplayFormat field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetDisplayFormat() WidgetServiceSummaryDisplayFormat {
if o == nil || o.DisplayFormat == nil {
var ret WidgetServiceSummaryDisplayFormat
return ret
}
return *o.DisplayFormat
}
// GetDisplayFormatOk returns a tuple with the DisplayFormat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetDisplayFormatOk() (*WidgetServiceSummaryDisplayFormat, bool) {
if o == nil || o.DisplayFormat == nil {
return nil, false
}
return o.DisplayFormat, true
}
// HasDisplayFormat returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasDisplayFormat() bool {
return o != nil && o.DisplayFormat != nil
}
// SetDisplayFormat gets a reference to the given WidgetServiceSummaryDisplayFormat and assigns it to the DisplayFormat field.
func (o *ServiceSummaryWidgetDefinition) SetDisplayFormat(v WidgetServiceSummaryDisplayFormat) {
o.DisplayFormat = &v
}
// GetEnv returns the Env field value.
func (o *ServiceSummaryWidgetDefinition) GetEnv() string {
if o == nil {
var ret string
return ret
}
return o.Env
}
// GetEnvOk returns a tuple with the Env field value
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetEnvOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Env, true
}
// SetEnv sets field value.
func (o *ServiceSummaryWidgetDefinition) SetEnv(v string) {
o.Env = v
}
// GetService returns the Service field value.
func (o *ServiceSummaryWidgetDefinition) GetService() string {
if o == nil {
var ret string
return ret
}
return o.Service
}
// GetServiceOk returns a tuple with the Service field value
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetServiceOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Service, true
}
// SetService sets field value.
func (o *ServiceSummaryWidgetDefinition) SetService(v string) {
o.Service = v
}
// GetShowBreakdown returns the ShowBreakdown field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetShowBreakdown() bool {
if o == nil || o.ShowBreakdown == nil {
var ret bool
return ret
}
return *o.ShowBreakdown
}
// GetShowBreakdownOk returns a tuple with the ShowBreakdown field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetShowBreakdownOk() (*bool, bool) {
if o == nil || o.ShowBreakdown == nil {
return nil, false
}
return o.ShowBreakdown, true
}
// HasShowBreakdown returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasShowBreakdown() bool {
return o != nil && o.ShowBreakdown != nil
}
// SetShowBreakdown gets a reference to the given bool and assigns it to the ShowBreakdown field.
func (o *ServiceSummaryWidgetDefinition) SetShowBreakdown(v bool) {
o.ShowBreakdown = &v
}
// GetShowDistribution returns the ShowDistribution field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetShowDistribution() bool {
if o == nil || o.ShowDistribution == nil {
var ret bool
return ret
}
return *o.ShowDistribution
}
// GetShowDistributionOk returns a tuple with the ShowDistribution field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetShowDistributionOk() (*bool, bool) {
if o == nil || o.ShowDistribution == nil {
return nil, false
}
return o.ShowDistribution, true
}
// HasShowDistribution returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasShowDistribution() bool {
return o != nil && o.ShowDistribution != nil
}
// SetShowDistribution gets a reference to the given bool and assigns it to the ShowDistribution field.
func (o *ServiceSummaryWidgetDefinition) SetShowDistribution(v bool) {
o.ShowDistribution = &v
}
// GetShowErrors returns the ShowErrors field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetShowErrors() bool {
if o == nil || o.ShowErrors == nil {
var ret bool
return ret
}
return *o.ShowErrors
}
// GetShowErrorsOk returns a tuple with the ShowErrors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetShowErrorsOk() (*bool, bool) {
if o == nil || o.ShowErrors == nil {
return nil, false
}
return o.ShowErrors, true
}
// HasShowErrors returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasShowErrors() bool {
return o != nil && o.ShowErrors != nil
}
// SetShowErrors gets a reference to the given bool and assigns it to the ShowErrors field.
func (o *ServiceSummaryWidgetDefinition) SetShowErrors(v bool) {
o.ShowErrors = &v
}
// GetShowHits returns the ShowHits field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetShowHits() bool {
if o == nil || o.ShowHits == nil {
var ret bool
return ret
}
return *o.ShowHits
}
// GetShowHitsOk returns a tuple with the ShowHits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetShowHitsOk() (*bool, bool) {
if o == nil || o.ShowHits == nil {
return nil, false
}
return o.ShowHits, true
}
// HasShowHits returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasShowHits() bool {
return o != nil && o.ShowHits != nil
}
// SetShowHits gets a reference to the given bool and assigns it to the ShowHits field.
func (o *ServiceSummaryWidgetDefinition) SetShowHits(v bool) {
o.ShowHits = &v
}
// GetShowLatency returns the ShowLatency field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetShowLatency() bool {
if o == nil || o.ShowLatency == nil {
var ret bool
return ret
}
return *o.ShowLatency
}
// GetShowLatencyOk returns a tuple with the ShowLatency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetShowLatencyOk() (*bool, bool) {
if o == nil || o.ShowLatency == nil {
return nil, false
}
return o.ShowLatency, true
}
// HasShowLatency returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasShowLatency() bool {
return o != nil && o.ShowLatency != nil
}
// SetShowLatency gets a reference to the given bool and assigns it to the ShowLatency field.
func (o *ServiceSummaryWidgetDefinition) SetShowLatency(v bool) {
o.ShowLatency = &v
}
// GetShowResourceList returns the ShowResourceList field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetShowResourceList() bool {
if o == nil || o.ShowResourceList == nil {
var ret bool
return ret
}
return *o.ShowResourceList
}
// GetShowResourceListOk returns a tuple with the ShowResourceList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetShowResourceListOk() (*bool, bool) {
if o == nil || o.ShowResourceList == nil {
return nil, false
}
return o.ShowResourceList, true
}
// HasShowResourceList returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasShowResourceList() bool {
return o != nil && o.ShowResourceList != nil
}
// SetShowResourceList gets a reference to the given bool and assigns it to the ShowResourceList field.
func (o *ServiceSummaryWidgetDefinition) SetShowResourceList(v bool) {
o.ShowResourceList = &v
}
// GetSizeFormat returns the SizeFormat field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetSizeFormat() WidgetSizeFormat {
if o == nil || o.SizeFormat == nil {
var ret WidgetSizeFormat
return ret
}
return *o.SizeFormat
}
// GetSizeFormatOk returns a tuple with the SizeFormat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetSizeFormatOk() (*WidgetSizeFormat, bool) {
if o == nil || o.SizeFormat == nil {
return nil, false
}
return o.SizeFormat, true
}
// HasSizeFormat returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasSizeFormat() bool {
return o != nil && o.SizeFormat != nil
}
// SetSizeFormat gets a reference to the given WidgetSizeFormat and assigns it to the SizeFormat field.
func (o *ServiceSummaryWidgetDefinition) SetSizeFormat(v WidgetSizeFormat) {
o.SizeFormat = &v
}
// GetSpanName returns the SpanName field value.
func (o *ServiceSummaryWidgetDefinition) GetSpanName() string {
if o == nil {
var ret string
return ret
}
return o.SpanName
}
// GetSpanNameOk returns a tuple with the SpanName field value
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetSpanNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SpanName, true
}
// SetSpanName sets field value.
func (o *ServiceSummaryWidgetDefinition) SetSpanName(v string) {
o.SpanName = v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetTime() WidgetTime {
if o == nil || o.Time == nil {
var ret WidgetTime
return ret
}
return *o.Time
}
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetTimeOk() (*WidgetTime, bool) {
if o == nil || o.Time == nil {
return nil, false
}
return o.Time, true
}
// HasTime returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasTime() bool {
return o != nil && o.Time != nil
}
// SetTime gets a reference to the given WidgetTime and assigns it to the Time field.
func (o *ServiceSummaryWidgetDefinition) SetTime(v WidgetTime) {
o.Time = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetTitle() string {
if o == nil || o.Title == nil {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetTitleOk() (*string, bool) {
if o == nil || o.Title == nil {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasTitle() bool {
return o != nil && o.Title != nil
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *ServiceSummaryWidgetDefinition) SetTitle(v string) {
o.Title = &v
}
// GetTitleAlign returns the TitleAlign field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetTitleAlign() WidgetTextAlign {
if o == nil || o.TitleAlign == nil {
var ret WidgetTextAlign
return ret
}
return *o.TitleAlign
}
// GetTitleAlignOk returns a tuple with the TitleAlign field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetTitleAlignOk() (*WidgetTextAlign, bool) {
if o == nil || o.TitleAlign == nil {
return nil, false
}
return o.TitleAlign, true
}
// HasTitleAlign returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasTitleAlign() bool {
return o != nil && o.TitleAlign != nil
}
// SetTitleAlign gets a reference to the given WidgetTextAlign and assigns it to the TitleAlign field.
func (o *ServiceSummaryWidgetDefinition) SetTitleAlign(v WidgetTextAlign) {
o.TitleAlign = &v
}
// GetTitleSize returns the TitleSize field value if set, zero value otherwise.
func (o *ServiceSummaryWidgetDefinition) GetTitleSize() string {
if o == nil || o.TitleSize == nil {
var ret string
return ret
}
return *o.TitleSize
}
// GetTitleSizeOk returns a tuple with the TitleSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetTitleSizeOk() (*string, bool) {
if o == nil || o.TitleSize == nil {
return nil, false
}
return o.TitleSize, true
}
// HasTitleSize returns a boolean if a field has been set.
func (o *ServiceSummaryWidgetDefinition) HasTitleSize() bool {
return o != nil && o.TitleSize != nil
}
// SetTitleSize gets a reference to the given string and assigns it to the TitleSize field.
func (o *ServiceSummaryWidgetDefinition) SetTitleSize(v string) {
o.TitleSize = &v
}
// GetType returns the Type field value.
func (o *ServiceSummaryWidgetDefinition) GetType() ServiceSummaryWidgetDefinitionType {
if o == nil {
var ret ServiceSummaryWidgetDefinitionType
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *ServiceSummaryWidgetDefinition) GetTypeOk() (*ServiceSummaryWidgetDefinitionType, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value.
func (o *ServiceSummaryWidgetDefinition) SetType(v ServiceSummaryWidgetDefinitionType) {
o.Type = v
}
// MarshalJSON serializes the struct using spec logic.
func (o ServiceSummaryWidgetDefinition) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.DisplayFormat != nil {
toSerialize["display_format"] = o.DisplayFormat
}
toSerialize["env"] = o.Env
toSerialize["service"] = o.Service
if o.ShowBreakdown != nil {
toSerialize["show_breakdown"] = o.ShowBreakdown
}
if o.ShowDistribution != nil {
toSerialize["show_distribution"] = o.ShowDistribution
}
if o.ShowErrors != nil {
toSerialize["show_errors"] = o.ShowErrors
}
if o.ShowHits != nil {
toSerialize["show_hits"] = o.ShowHits
}
if o.ShowLatency != nil {
toSerialize["show_latency"] = o.ShowLatency
}
if o.ShowResourceList != nil {
toSerialize["show_resource_list"] = o.ShowResourceList
}
if o.SizeFormat != nil {
toSerialize["size_format"] = o.SizeFormat
}
toSerialize["span_name"] = o.SpanName
if o.Time != nil {
toSerialize["time"] = o.Time
}
if o.Title != nil {
toSerialize["title"] = o.Title
}
if o.TitleAlign != nil {
toSerialize["title_align"] = o.TitleAlign
}
if o.TitleSize != nil {
toSerialize["title_size"] = o.TitleSize
}
toSerialize["type"] = o.Type
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return datadog.Marshal(toSerialize)
}
// UnmarshalJSON deserializes the given payload.
func (o *ServiceSummaryWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
DisplayFormat *WidgetServiceSummaryDisplayFormat `json:"display_format,omitempty"`
Env *string `json:"env"`
Service *string `json:"service"`
ShowBreakdown *bool `json:"show_breakdown,omitempty"`
ShowDistribution *bool `json:"show_distribution,omitempty"`
ShowErrors *bool `json:"show_errors,omitempty"`
ShowHits *bool `json:"show_hits,omitempty"`
ShowLatency *bool `json:"show_latency,omitempty"`
ShowResourceList *bool `json:"show_resource_list,omitempty"`
SizeFormat *WidgetSizeFormat `json:"size_format,omitempty"`
SpanName *string `json:"span_name"`
Time *WidgetTime `json:"time,omitempty"`
Title *string `json:"title,omitempty"`
TitleAlign *WidgetTextAlign `json:"title_align,omitempty"`
TitleSize *string `json:"title_size,omitempty"`
Type *ServiceSummaryWidgetDefinitionType `json:"type"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
if all.Env == nil {
return fmt.Errorf("required field env missing")
}
if all.Service == nil {
return fmt.Errorf("required field service missing")
}
if all.SpanName == nil {
return fmt.Errorf("required field span_name missing")
}
if all.Type == nil {
return fmt.Errorf("required field type missing")
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"display_format", "env", "service", "show_breakdown", "show_distribution", "show_errors", "show_hits", "show_latency", "show_resource_list", "size_format", "span_name", "time", "title", "title_align", "title_size", "type"})
} else {
return err
}
hasInvalidField := false
if all.DisplayFormat != nil && !all.DisplayFormat.IsValid() {
hasInvalidField = true
} else {
o.DisplayFormat = all.DisplayFormat
}
o.Env = *all.Env
o.Service = *all.Service
o.ShowBreakdown = all.ShowBreakdown
o.ShowDistribution = all.ShowDistribution
o.ShowErrors = all.ShowErrors
o.ShowHits = all.ShowHits
o.ShowLatency = all.ShowLatency
o.ShowResourceList = all.ShowResourceList
if all.SizeFormat != nil && !all.SizeFormat.IsValid() {
hasInvalidField = true
} else {
o.SizeFormat = all.SizeFormat
}
o.SpanName = *all.SpanName
if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Time = all.Time
o.Title = all.Title
if all.TitleAlign != nil && !all.TitleAlign.IsValid() {
hasInvalidField = true
} else {
o.TitleAlign = all.TitleAlign
}
o.TitleSize = all.TitleSize
if !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
}