/
model_twitter_sentiment_content.go
338 lines (284 loc) · 9.49 KB
/
model_twitter_sentiment_content.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
/*
Finnhub API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package finnhub
import (
"encoding/json"
)
// TwitterSentimentContent struct for TwitterSentimentContent
type TwitterSentimentContent struct {
// Number of mentions
Mention *int64 `json:"mention,omitempty"`
// Number of positive mentions
PositiveMention *int64 `json:"positiveMention,omitempty"`
// Number of negative mentions
NegativeMention *int64 `json:"negativeMention,omitempty"`
// Positive score. Range 0-1
PositiveScore *float32 `json:"positiveScore,omitempty"`
// Negative score. Range 0-1
NegativeScore *float32 `json:"negativeScore,omitempty"`
// Final score. Range: -1 to 1 with 1 is very positive and -1 is very negative
Score *float32 `json:"score,omitempty"`
// Period.
AtTime *string `json:"atTime,omitempty"`
}
// NewTwitterSentimentContent instantiates a new TwitterSentimentContent 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 NewTwitterSentimentContent() *TwitterSentimentContent {
this := TwitterSentimentContent{}
return &this
}
// NewTwitterSentimentContentWithDefaults instantiates a new TwitterSentimentContent 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 NewTwitterSentimentContentWithDefaults() *TwitterSentimentContent {
this := TwitterSentimentContent{}
return &this
}
// GetMention returns the Mention field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetMention() int64 {
if o == nil || o.Mention == nil {
var ret int64
return ret
}
return *o.Mention
}
// GetMentionOk returns a tuple with the Mention field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetMentionOk() (*int64, bool) {
if o == nil || o.Mention == nil {
return nil, false
}
return o.Mention, true
}
// HasMention returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasMention() bool {
if o != nil && o.Mention != nil {
return true
}
return false
}
// SetMention gets a reference to the given int64 and assigns it to the Mention field.
func (o *TwitterSentimentContent) SetMention(v int64) {
o.Mention = &v
}
// GetPositiveMention returns the PositiveMention field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetPositiveMention() int64 {
if o == nil || o.PositiveMention == nil {
var ret int64
return ret
}
return *o.PositiveMention
}
// GetPositiveMentionOk returns a tuple with the PositiveMention field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetPositiveMentionOk() (*int64, bool) {
if o == nil || o.PositiveMention == nil {
return nil, false
}
return o.PositiveMention, true
}
// HasPositiveMention returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasPositiveMention() bool {
if o != nil && o.PositiveMention != nil {
return true
}
return false
}
// SetPositiveMention gets a reference to the given int64 and assigns it to the PositiveMention field.
func (o *TwitterSentimentContent) SetPositiveMention(v int64) {
o.PositiveMention = &v
}
// GetNegativeMention returns the NegativeMention field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetNegativeMention() int64 {
if o == nil || o.NegativeMention == nil {
var ret int64
return ret
}
return *o.NegativeMention
}
// GetNegativeMentionOk returns a tuple with the NegativeMention field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetNegativeMentionOk() (*int64, bool) {
if o == nil || o.NegativeMention == nil {
return nil, false
}
return o.NegativeMention, true
}
// HasNegativeMention returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasNegativeMention() bool {
if o != nil && o.NegativeMention != nil {
return true
}
return false
}
// SetNegativeMention gets a reference to the given int64 and assigns it to the NegativeMention field.
func (o *TwitterSentimentContent) SetNegativeMention(v int64) {
o.NegativeMention = &v
}
// GetPositiveScore returns the PositiveScore field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetPositiveScore() float32 {
if o == nil || o.PositiveScore == nil {
var ret float32
return ret
}
return *o.PositiveScore
}
// GetPositiveScoreOk returns a tuple with the PositiveScore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetPositiveScoreOk() (*float32, bool) {
if o == nil || o.PositiveScore == nil {
return nil, false
}
return o.PositiveScore, true
}
// HasPositiveScore returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasPositiveScore() bool {
if o != nil && o.PositiveScore != nil {
return true
}
return false
}
// SetPositiveScore gets a reference to the given float32 and assigns it to the PositiveScore field.
func (o *TwitterSentimentContent) SetPositiveScore(v float32) {
o.PositiveScore = &v
}
// GetNegativeScore returns the NegativeScore field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetNegativeScore() float32 {
if o == nil || o.NegativeScore == nil {
var ret float32
return ret
}
return *o.NegativeScore
}
// GetNegativeScoreOk returns a tuple with the NegativeScore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetNegativeScoreOk() (*float32, bool) {
if o == nil || o.NegativeScore == nil {
return nil, false
}
return o.NegativeScore, true
}
// HasNegativeScore returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasNegativeScore() bool {
if o != nil && o.NegativeScore != nil {
return true
}
return false
}
// SetNegativeScore gets a reference to the given float32 and assigns it to the NegativeScore field.
func (o *TwitterSentimentContent) SetNegativeScore(v float32) {
o.NegativeScore = &v
}
// GetScore returns the Score field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetScore() float32 {
if o == nil || o.Score == nil {
var ret float32
return ret
}
return *o.Score
}
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetScoreOk() (*float32, bool) {
if o == nil || o.Score == nil {
return nil, false
}
return o.Score, true
}
// HasScore returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasScore() bool {
if o != nil && o.Score != nil {
return true
}
return false
}
// SetScore gets a reference to the given float32 and assigns it to the Score field.
func (o *TwitterSentimentContent) SetScore(v float32) {
o.Score = &v
}
// GetAtTime returns the AtTime field value if set, zero value otherwise.
func (o *TwitterSentimentContent) GetAtTime() string {
if o == nil || o.AtTime == nil {
var ret string
return ret
}
return *o.AtTime
}
// GetAtTimeOk returns a tuple with the AtTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TwitterSentimentContent) GetAtTimeOk() (*string, bool) {
if o == nil || o.AtTime == nil {
return nil, false
}
return o.AtTime, true
}
// HasAtTime returns a boolean if a field has been set.
func (o *TwitterSentimentContent) HasAtTime() bool {
if o != nil && o.AtTime != nil {
return true
}
return false
}
// SetAtTime gets a reference to the given string and assigns it to the AtTime field.
func (o *TwitterSentimentContent) SetAtTime(v string) {
o.AtTime = &v
}
func (o TwitterSentimentContent) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Mention != nil {
toSerialize["mention"] = o.Mention
}
if o.PositiveMention != nil {
toSerialize["positiveMention"] = o.PositiveMention
}
if o.NegativeMention != nil {
toSerialize["negativeMention"] = o.NegativeMention
}
if o.PositiveScore != nil {
toSerialize["positiveScore"] = o.PositiveScore
}
if o.NegativeScore != nil {
toSerialize["negativeScore"] = o.NegativeScore
}
if o.Score != nil {
toSerialize["score"] = o.Score
}
if o.AtTime != nil {
toSerialize["atTime"] = o.AtTime
}
return json.Marshal(toSerialize)
}
type NullableTwitterSentimentContent struct {
value *TwitterSentimentContent
isSet bool
}
func (v NullableTwitterSentimentContent) Get() *TwitterSentimentContent {
return v.value
}
func (v *NullableTwitterSentimentContent) Set(val *TwitterSentimentContent) {
v.value = val
v.isSet = true
}
func (v NullableTwitterSentimentContent) IsSet() bool {
return v.isSet
}
func (v *NullableTwitterSentimentContent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTwitterSentimentContent(val *TwitterSentimentContent) *NullableTwitterSentimentContent {
return &NullableTwitterSentimentContent{value: val, isSet: true}
}
func (v NullableTwitterSentimentContent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTwitterSentimentContent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}