forked from kraney/stackpath
/
model_metrics_data.go
148 lines (124 loc) · 3.62 KB
/
model_metrics_data.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
/*
* Edge Compute
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package edge_compute
import (
"encoding/json"
)
// MetricsData The data points in a metrics collection
type MetricsData struct {
Matrix *DataMatrix `json:"matrix,omitempty"`
Vector *DataVector `json:"vector,omitempty"`
}
// NewMetricsData instantiates a new MetricsData 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 NewMetricsData() *MetricsData {
this := MetricsData{}
return &this
}
// NewMetricsDataWithDefaults instantiates a new MetricsData 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 NewMetricsDataWithDefaults() *MetricsData {
this := MetricsData{}
return &this
}
// GetMatrix returns the Matrix field value if set, zero value otherwise.
func (o *MetricsData) GetMatrix() DataMatrix {
if o == nil || o.Matrix == nil {
var ret DataMatrix
return ret
}
return *o.Matrix
}
// GetMatrixOk returns a tuple with the Matrix field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetricsData) GetMatrixOk() (*DataMatrix, bool) {
if o == nil || o.Matrix == nil {
return nil, false
}
return o.Matrix, true
}
// HasMatrix returns a boolean if a field has been set.
func (o *MetricsData) HasMatrix() bool {
if o != nil && o.Matrix != nil {
return true
}
return false
}
// SetMatrix gets a reference to the given DataMatrix and assigns it to the Matrix field.
func (o *MetricsData) SetMatrix(v DataMatrix) {
o.Matrix = &v
}
// GetVector returns the Vector field value if set, zero value otherwise.
func (o *MetricsData) GetVector() DataVector {
if o == nil || o.Vector == nil {
var ret DataVector
return ret
}
return *o.Vector
}
// GetVectorOk returns a tuple with the Vector field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetricsData) GetVectorOk() (*DataVector, bool) {
if o == nil || o.Vector == nil {
return nil, false
}
return o.Vector, true
}
// HasVector returns a boolean if a field has been set.
func (o *MetricsData) HasVector() bool {
if o != nil && o.Vector != nil {
return true
}
return false
}
// SetVector gets a reference to the given DataVector and assigns it to the Vector field.
func (o *MetricsData) SetVector(v DataVector) {
o.Vector = &v
}
func (o MetricsData) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Matrix != nil {
toSerialize["matrix"] = o.Matrix
}
if o.Vector != nil {
toSerialize["vector"] = o.Vector
}
return json.Marshal(toSerialize)
}
type NullableMetricsData struct {
value *MetricsData
isSet bool
}
func (v NullableMetricsData) Get() *MetricsData {
return v.value
}
func (v *NullableMetricsData) Set(val *MetricsData) {
v.value = val
v.isSet = true
}
func (v NullableMetricsData) IsSet() bool {
return v.isSet
}
func (v *NullableMetricsData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetricsData(val *MetricsData) *NullableMetricsData {
return &NullableMetricsData{value: val, isSet: true}
}
func (v NullableMetricsData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetricsData) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}