/
model_indicator_properties_custom_metric_params_total_metrics_inner.go
209 lines (173 loc) · 6.65 KB
/
model_indicator_properties_custom_metric_params_total_metrics_inner.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
/*
SLOs
OpenAPI schema for SLOs endpoints
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package slo
import (
"encoding/json"
)
// checks if the IndicatorPropertiesCustomMetricParamsTotalMetricsInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IndicatorPropertiesCustomMetricParamsTotalMetricsInner{}
// IndicatorPropertiesCustomMetricParamsTotalMetricsInner struct for IndicatorPropertiesCustomMetricParamsTotalMetricsInner
type IndicatorPropertiesCustomMetricParamsTotalMetricsInner struct {
// The name of the metric. Only valid options are A-Z
Name string `json:"name"`
// The aggregation type of the metric. Only valid option is \"sum\"
Aggregation string `json:"aggregation"`
// The field of the metric.
Field string `json:"field"`
// The filter to apply to the metric.
Filter *string `json:"filter,omitempty"`
}
// NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner instantiates a new IndicatorPropertiesCustomMetricParamsTotalMetricsInner 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 NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner(name string, aggregation string, field string) *IndicatorPropertiesCustomMetricParamsTotalMetricsInner {
this := IndicatorPropertiesCustomMetricParamsTotalMetricsInner{}
this.Name = name
this.Aggregation = aggregation
this.Field = field
return &this
}
// NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsTotalMetricsInner 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 NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults() *IndicatorPropertiesCustomMetricParamsTotalMetricsInner {
this := IndicatorPropertiesCustomMetricParamsTotalMetricsInner{}
return &this
}
// GetName returns the Name field value
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetName(v string) {
o.Name = v
}
// GetAggregation returns the Aggregation field value
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetAggregation() string {
if o == nil {
var ret string
return ret
}
return o.Aggregation
}
// GetAggregationOk returns a tuple with the Aggregation field value
// and a boolean to check if the value has been set.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetAggregationOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Aggregation, true
}
// SetAggregation sets field value
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetAggregation(v string) {
o.Aggregation = v
}
// GetField returns the Field field value
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetField() string {
if o == nil {
var ret string
return ret
}
return o.Field
}
// GetFieldOk returns a tuple with the Field field value
// and a boolean to check if the value has been set.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFieldOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Field, true
}
// SetField sets field value
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetField(v string) {
o.Field = v
}
// GetFilter returns the Filter field value if set, zero value otherwise.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFilter() string {
if o == nil || IsNil(o.Filter) {
var ret string
return ret
}
return *o.Filter
}
// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFilterOk() (*string, bool) {
if o == nil || IsNil(o.Filter) {
return nil, false
}
return o.Filter, true
}
// HasFilter returns a boolean if a field has been set.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) HasFilter() bool {
if o != nil && !IsNil(o.Filter) {
return true
}
return false
}
// SetFilter gets a reference to the given string and assigns it to the Filter field.
func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetFilter(v string) {
o.Filter = &v
}
func (o IndicatorPropertiesCustomMetricParamsTotalMetricsInner) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IndicatorPropertiesCustomMetricParamsTotalMetricsInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["aggregation"] = o.Aggregation
toSerialize["field"] = o.Field
if !IsNil(o.Filter) {
toSerialize["filter"] = o.Filter
}
return toSerialize, nil
}
type NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner struct {
value *IndicatorPropertiesCustomMetricParamsTotalMetricsInner
isSet bool
}
func (v NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) Get() *IndicatorPropertiesCustomMetricParamsTotalMetricsInner {
return v.value
}
func (v *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) Set(val *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) {
v.value = val
v.isSet = true
}
func (v NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) IsSet() bool {
return v.isSet
}
func (v *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner(val *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner {
return &NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner{value: val, isSet: true}
}
func (v NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}