forked from muxinc/mux-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_insight.go
295 lines (248 loc) · 7.71 KB
/
model_insight.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
/*
* Mux API
*
* Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
*
* API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package muxgo
import (
"encoding/json"
)
// Insight struct for Insight
type Insight struct {
TotalWatchTime *int64 `json:"total_watch_time,omitempty"`
TotalViews *int64 `json:"total_views,omitempty"`
NegativeImpactScore *float32 `json:"negative_impact_score,omitempty"`
Metric *float64 `json:"metric,omitempty"`
FilterValue *string `json:"filter_value,omitempty"`
FilterColumn *string `json:"filter_column,omitempty"`
}
// NewInsight instantiates a new Insight 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 NewInsight() *Insight {
this := Insight{}
return &this
}
// NewInsightWithDefaults instantiates a new Insight 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 NewInsightWithDefaults() *Insight {
this := Insight{}
return &this
}
// GetTotalWatchTime returns the TotalWatchTime field value if set, zero value otherwise.
func (o *Insight) GetTotalWatchTime() int64 {
if o == nil || o.TotalWatchTime == nil {
var ret int64
return ret
}
return *o.TotalWatchTime
}
// GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Insight) GetTotalWatchTimeOk() (*int64, bool) {
if o == nil || o.TotalWatchTime == nil {
return nil, false
}
return o.TotalWatchTime, true
}
// HasTotalWatchTime returns a boolean if a field has been set.
func (o *Insight) HasTotalWatchTime() bool {
if o != nil && o.TotalWatchTime != nil {
return true
}
return false
}
// SetTotalWatchTime gets a reference to the given int64 and assigns it to the TotalWatchTime field.
func (o *Insight) SetTotalWatchTime(v int64) {
o.TotalWatchTime = &v
}
// GetTotalViews returns the TotalViews field value if set, zero value otherwise.
func (o *Insight) GetTotalViews() int64 {
if o == nil || o.TotalViews == nil {
var ret int64
return ret
}
return *o.TotalViews
}
// GetTotalViewsOk returns a tuple with the TotalViews field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Insight) GetTotalViewsOk() (*int64, bool) {
if o == nil || o.TotalViews == nil {
return nil, false
}
return o.TotalViews, true
}
// HasTotalViews returns a boolean if a field has been set.
func (o *Insight) HasTotalViews() bool {
if o != nil && o.TotalViews != nil {
return true
}
return false
}
// SetTotalViews gets a reference to the given int64 and assigns it to the TotalViews field.
func (o *Insight) SetTotalViews(v int64) {
o.TotalViews = &v
}
// GetNegativeImpactScore returns the NegativeImpactScore field value if set, zero value otherwise.
func (o *Insight) GetNegativeImpactScore() float32 {
if o == nil || o.NegativeImpactScore == nil {
var ret float32
return ret
}
return *o.NegativeImpactScore
}
// GetNegativeImpactScoreOk returns a tuple with the NegativeImpactScore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Insight) GetNegativeImpactScoreOk() (*float32, bool) {
if o == nil || o.NegativeImpactScore == nil {
return nil, false
}
return o.NegativeImpactScore, true
}
// HasNegativeImpactScore returns a boolean if a field has been set.
func (o *Insight) HasNegativeImpactScore() bool {
if o != nil && o.NegativeImpactScore != nil {
return true
}
return false
}
// SetNegativeImpactScore gets a reference to the given float32 and assigns it to the NegativeImpactScore field.
func (o *Insight) SetNegativeImpactScore(v float32) {
o.NegativeImpactScore = &v
}
// GetMetric returns the Metric field value if set, zero value otherwise.
func (o *Insight) GetMetric() float64 {
if o == nil || o.Metric == nil {
var ret float64
return ret
}
return *o.Metric
}
// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Insight) GetMetricOk() (*float64, bool) {
if o == nil || o.Metric == nil {
return nil, false
}
return o.Metric, true
}
// HasMetric returns a boolean if a field has been set.
func (o *Insight) HasMetric() bool {
if o != nil && o.Metric != nil {
return true
}
return false
}
// SetMetric gets a reference to the given float64 and assigns it to the Metric field.
func (o *Insight) SetMetric(v float64) {
o.Metric = &v
}
// GetFilterValue returns the FilterValue field value if set, zero value otherwise.
func (o *Insight) GetFilterValue() string {
if o == nil || o.FilterValue == nil {
var ret string
return ret
}
return *o.FilterValue
}
// GetFilterValueOk returns a tuple with the FilterValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Insight) GetFilterValueOk() (*string, bool) {
if o == nil || o.FilterValue == nil {
return nil, false
}
return o.FilterValue, true
}
// HasFilterValue returns a boolean if a field has been set.
func (o *Insight) HasFilterValue() bool {
if o != nil && o.FilterValue != nil {
return true
}
return false
}
// SetFilterValue gets a reference to the given string and assigns it to the FilterValue field.
func (o *Insight) SetFilterValue(v string) {
o.FilterValue = &v
}
// GetFilterColumn returns the FilterColumn field value if set, zero value otherwise.
func (o *Insight) GetFilterColumn() string {
if o == nil || o.FilterColumn == nil {
var ret string
return ret
}
return *o.FilterColumn
}
// GetFilterColumnOk returns a tuple with the FilterColumn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Insight) GetFilterColumnOk() (*string, bool) {
if o == nil || o.FilterColumn == nil {
return nil, false
}
return o.FilterColumn, true
}
// HasFilterColumn returns a boolean if a field has been set.
func (o *Insight) HasFilterColumn() bool {
if o != nil && o.FilterColumn != nil {
return true
}
return false
}
// SetFilterColumn gets a reference to the given string and assigns it to the FilterColumn field.
func (o *Insight) SetFilterColumn(v string) {
o.FilterColumn = &v
}
func (o Insight) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.TotalWatchTime != nil {
toSerialize["total_watch_time"] = o.TotalWatchTime
}
if o.TotalViews != nil {
toSerialize["total_views"] = o.TotalViews
}
if o.NegativeImpactScore != nil {
toSerialize["negative_impact_score"] = o.NegativeImpactScore
}
if o.Metric != nil {
toSerialize["metric"] = o.Metric
}
if o.FilterValue != nil {
toSerialize["filter_value"] = o.FilterValue
}
if o.FilterColumn != nil {
toSerialize["filter_column"] = o.FilterColumn
}
return json.Marshal(toSerialize)
}
type NullableInsight struct {
value *Insight
isSet bool
}
func (v NullableInsight) Get() *Insight {
return v.value
}
func (v *NullableInsight) Set(val *Insight) {
v.value = val
v.isSet = true
}
func (v NullableInsight) IsSet() bool {
return v.isSet
}
func (v *NullableInsight) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInsight(val *Insight) *NullableInsight {
return &NullableInsight{value: val, isSet: true}
}
func (v NullableInsight) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInsight) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}