-
Notifications
You must be signed in to change notification settings - Fork 54
/
model_logs_aggregate_bucket_value_timeseries.go
51 lines (43 loc) · 1.98 KB
/
model_logs_aggregate_bucket_value_timeseries.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
// 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 datadog
import (
"encoding/json"
)
// LogsAggregateBucketValueTimeseries A timeseries array
type LogsAggregateBucketValueTimeseries struct {
Items []LogsAggregateBucketValueTimeseriesPoint
// UnparsedObject contains the raw value of the array if there was an error when deserializing into the struct
UnparsedObject []interface{} `json:-`
}
// NewLogsAggregateBucketValueTimeseries instantiates a new LogsAggregateBucketValueTimeseries 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 NewLogsAggregateBucketValueTimeseries() *LogsAggregateBucketValueTimeseries {
this := LogsAggregateBucketValueTimeseries{}
return &this
}
// NewLogsAggregateBucketValueTimeseriesWithDefaults instantiates a new LogsAggregateBucketValueTimeseries 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 NewLogsAggregateBucketValueTimeseriesWithDefaults() *LogsAggregateBucketValueTimeseries {
this := LogsAggregateBucketValueTimeseries{}
return &this
}
// MarshalJSON serializes the struct using spec logic.
func (o LogsAggregateBucketValueTimeseries) MarshalJSON() ([]byte, error) {
toSerialize := make([]interface{}, len(o.Items))
if o.UnparsedObject != nil {
return json.Marshal(o.UnparsedObject)
}
for i, item := range o.Items {
toSerialize[i] = item
}
return json.Marshal(toSerialize)
}
// UnmarshalJSON deserializes the given payload.
func (o *LogsAggregateBucketValueTimeseries) UnmarshalJSON(bytes []byte) (err error) {
return json.Unmarshal(bytes, &o.Items)
}