-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_video.go
733 lines (621 loc) · 20.4 KB
/
model_video.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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
/*
* api.video
*
* api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
*
* API version: 1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package apivideosdk
import (
//"encoding/json"
)
// Video struct for Video
type Video struct {
// The unique identifier of the video object.
VideoId string `json:"videoId"`
// When a video was created, presented in ATOM UTC format.
CreatedAt *string `json:"createdAt,omitempty"`
// The title of the video content.
Title *string `json:"title,omitempty"`
// A description for the video content.
Description *string `json:"description,omitempty"`
// The date and time the API created the video. Date and time are provided using ATOM UTC format.
PublishedAt *string `json:"publishedAt,omitempty"`
// The date and time the video was updated. Date and time are provided using ATOM UTC format.
UpdatedAt *string `json:"updatedAt,omitempty"`
// The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.
DiscardedAt *NullableString `json:"discardedAt,omitempty"`
// The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.
DeletesAt *NullableString `json:"deletesAt,omitempty"`
// Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video.
Discarded *bool `json:"discarded,omitempty"`
// Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically.
Language *string `json:"language,omitempty"`
// Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API.
LanguageOrigin *NullableString `json:"languageOrigin,omitempty"`
// One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.
Tags *[]string `json:"tags,omitempty"`
// Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video.
Metadata *[]Metadata `json:"metadata,omitempty"`
Source *VideoSource `json:"source,omitempty"`
Assets *VideoAssets `json:"assets,omitempty"`
// The id of the player that will be applied on the video.
PlayerId *string `json:"playerId,omitempty"`
// Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos/).
Public *bool `json:"public,omitempty"`
// Defines if video is panoramic.
Panoramic *bool `json:"panoramic,omitempty"`
// This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.
Mp4Support *bool `json:"mp4Support,omitempty"`
}
// NewVideo instantiates a new Video 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 NewVideo(videoId string) *Video {
this := Video{}
this.VideoId = videoId
return &this
}
// NewVideoWithDefaults instantiates a new Video 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 NewVideoWithDefaults() *Video {
this := Video{}
return &this
}
// GetVideoId returns the VideoId field value
func (o *Video) GetVideoId() string {
if o == nil {
var ret string
return ret
}
return o.VideoId
}
// GetVideoIdOk returns a tuple with the VideoId field value
// and a boolean to check if the value has been set.
func (o *Video) GetVideoIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.VideoId, true
}
// SetVideoId sets field value
func (o *Video) SetVideoId(v string) {
o.VideoId = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Video) GetCreatedAt() string {
if o == nil || o.CreatedAt == nil {
var ret string
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetCreatedAtOk() (*string, bool) {
if o == nil || o.CreatedAt == nil {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Video) HasCreatedAt() bool {
if o != nil && o.CreatedAt != nil {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *Video) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *Video) GetTitle() string {
if o == nil || o.Title == nil {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetTitleOk() (*string, bool) {
if o == nil || o.Title == nil {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *Video) HasTitle() bool {
if o != nil && o.Title != nil {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *Video) SetTitle(v string) {
o.Title = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Video) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Video) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Video) SetDescription(v string) {
o.Description = &v
}
// GetPublishedAt returns the PublishedAt field value if set, zero value otherwise.
func (o *Video) GetPublishedAt() string {
if o == nil || o.PublishedAt == nil {
var ret string
return ret
}
return *o.PublishedAt
}
// GetPublishedAtOk returns a tuple with the PublishedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetPublishedAtOk() (*string, bool) {
if o == nil || o.PublishedAt == nil {
return nil, false
}
return o.PublishedAt, true
}
// HasPublishedAt returns a boolean if a field has been set.
func (o *Video) HasPublishedAt() bool {
if o != nil && o.PublishedAt != nil {
return true
}
return false
}
// SetPublishedAt gets a reference to the given string and assigns it to the PublishedAt field.
func (o *Video) SetPublishedAt(v string) {
o.PublishedAt = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *Video) GetUpdatedAt() string {
if o == nil || o.UpdatedAt == nil {
var ret string
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetUpdatedAtOk() (*string, bool) {
if o == nil || o.UpdatedAt == nil {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *Video) HasUpdatedAt() bool {
if o != nil && o.UpdatedAt != nil {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
func (o *Video) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
// GetDiscardedAt returns the DiscardedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Video) GetDiscardedAt() string {
if o == nil || o.DiscardedAt.Get() == nil {
var ret string
return ret
}
return *o.DiscardedAt.Get()
}
// GetDiscardedAtOk returns a tuple with the DiscardedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Video) GetDiscardedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.DiscardedAt.Get(), o.DiscardedAt.IsSet()
}
// HasDiscardedAt returns a boolean if a field has been set.
func (o *Video) HasDiscardedAt() bool {
if o != nil && o.DiscardedAt.IsSet() {
return true
}
return false
}
// SetDiscardedAt gets a reference to the given NullableString and assigns it to the DiscardedAt field.
func (o *Video) SetDiscardedAt(v string) {
o.DiscardedAt.Set(&v)
}
// SetDiscardedAtNil sets the value for DiscardedAt to be an explicit nil
func (o *Video) SetDiscardedAtNil() {
o.DiscardedAt.Set(nil)
}
// UnsetDiscardedAt ensures that no value is present for DiscardedAt, not even an explicit nil
func (o *Video) UnsetDiscardedAt() {
o.DiscardedAt.Unset()
}
// GetDeletesAt returns the DeletesAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Video) GetDeletesAt() string {
if o == nil || o.DeletesAt.Get() == nil {
var ret string
return ret
}
return *o.DeletesAt.Get()
}
// GetDeletesAtOk returns a tuple with the DeletesAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Video) GetDeletesAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.DeletesAt.Get(), o.DeletesAt.IsSet()
}
// HasDeletesAt returns a boolean if a field has been set.
func (o *Video) HasDeletesAt() bool {
if o != nil && o.DeletesAt.IsSet() {
return true
}
return false
}
// SetDeletesAt gets a reference to the given NullableString and assigns it to the DeletesAt field.
func (o *Video) SetDeletesAt(v string) {
o.DeletesAt.Set(&v)
}
// SetDeletesAtNil sets the value for DeletesAt to be an explicit nil
func (o *Video) SetDeletesAtNil() {
o.DeletesAt.Set(nil)
}
// UnsetDeletesAt ensures that no value is present for DeletesAt, not even an explicit nil
func (o *Video) UnsetDeletesAt() {
o.DeletesAt.Unset()
}
// GetDiscarded returns the Discarded field value if set, zero value otherwise.
func (o *Video) GetDiscarded() bool {
if o == nil || o.Discarded == nil {
var ret bool
return ret
}
return *o.Discarded
}
// GetDiscardedOk returns a tuple with the Discarded field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetDiscardedOk() (*bool, bool) {
if o == nil || o.Discarded == nil {
return nil, false
}
return o.Discarded, true
}
// HasDiscarded returns a boolean if a field has been set.
func (o *Video) HasDiscarded() bool {
if o != nil && o.Discarded != nil {
return true
}
return false
}
// SetDiscarded gets a reference to the given bool and assigns it to the Discarded field.
func (o *Video) SetDiscarded(v bool) {
o.Discarded = &v
}
// GetLanguage returns the Language field value if set, zero value otherwise.
func (o *Video) GetLanguage() string {
if o == nil || o.Language == nil {
var ret string
return ret
}
return *o.Language
}
// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetLanguageOk() (*string, bool) {
if o == nil || o.Language == nil {
return nil, false
}
return o.Language, true
}
// HasLanguage returns a boolean if a field has been set.
func (o *Video) HasLanguage() bool {
if o != nil && o.Language != nil {
return true
}
return false
}
// SetLanguage gets a reference to the given string and assigns it to the Language field.
func (o *Video) SetLanguage(v string) {
o.Language = &v
}
// GetLanguageOrigin returns the LanguageOrigin field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Video) GetLanguageOrigin() string {
if o == nil || o.LanguageOrigin.Get() == nil {
var ret string
return ret
}
return *o.LanguageOrigin.Get()
}
// GetLanguageOriginOk returns a tuple with the LanguageOrigin field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Video) GetLanguageOriginOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.LanguageOrigin.Get(), o.LanguageOrigin.IsSet()
}
// HasLanguageOrigin returns a boolean if a field has been set.
func (o *Video) HasLanguageOrigin() bool {
if o != nil && o.LanguageOrigin.IsSet() {
return true
}
return false
}
// SetLanguageOrigin gets a reference to the given NullableString and assigns it to the LanguageOrigin field.
func (o *Video) SetLanguageOrigin(v string) {
o.LanguageOrigin.Set(&v)
}
// SetLanguageOriginNil sets the value for LanguageOrigin to be an explicit nil
func (o *Video) SetLanguageOriginNil() {
o.LanguageOrigin.Set(nil)
}
// UnsetLanguageOrigin ensures that no value is present for LanguageOrigin, not even an explicit nil
func (o *Video) UnsetLanguageOrigin() {
o.LanguageOrigin.Unset()
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *Video) GetTags() []string {
if o == nil || o.Tags == nil {
var ret []string
return ret
}
return *o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetTagsOk() (*[]string, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *Video) HasTags() bool {
if o != nil && o.Tags != nil {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *Video) SetTags(v []string) {
o.Tags = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *Video) GetMetadata() []Metadata {
if o == nil || o.Metadata == nil {
var ret []Metadata
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetMetadataOk() (*[]Metadata, bool) {
if o == nil || o.Metadata == nil {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *Video) HasMetadata() bool {
if o != nil && o.Metadata != nil {
return true
}
return false
}
// SetMetadata gets a reference to the given []Metadata and assigns it to the Metadata field.
func (o *Video) SetMetadata(v []Metadata) {
o.Metadata = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *Video) GetSource() VideoSource {
if o == nil || o.Source == nil {
var ret VideoSource
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetSourceOk() (*VideoSource, bool) {
if o == nil || o.Source == nil {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *Video) HasSource() bool {
if o != nil && o.Source != nil {
return true
}
return false
}
// SetSource gets a reference to the given VideoSource and assigns it to the Source field.
func (o *Video) SetSource(v VideoSource) {
o.Source = &v
}
// GetAssets returns the Assets field value if set, zero value otherwise.
func (o *Video) GetAssets() VideoAssets {
if o == nil || o.Assets == nil {
var ret VideoAssets
return ret
}
return *o.Assets
}
// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetAssetsOk() (*VideoAssets, bool) {
if o == nil || o.Assets == nil {
return nil, false
}
return o.Assets, true
}
// HasAssets returns a boolean if a field has been set.
func (o *Video) HasAssets() bool {
if o != nil && o.Assets != nil {
return true
}
return false
}
// SetAssets gets a reference to the given VideoAssets and assigns it to the Assets field.
func (o *Video) SetAssets(v VideoAssets) {
o.Assets = &v
}
// GetPlayerId returns the PlayerId field value if set, zero value otherwise.
func (o *Video) GetPlayerId() string {
if o == nil || o.PlayerId == nil {
var ret string
return ret
}
return *o.PlayerId
}
// GetPlayerIdOk returns a tuple with the PlayerId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetPlayerIdOk() (*string, bool) {
if o == nil || o.PlayerId == nil {
return nil, false
}
return o.PlayerId, true
}
// HasPlayerId returns a boolean if a field has been set.
func (o *Video) HasPlayerId() bool {
if o != nil && o.PlayerId != nil {
return true
}
return false
}
// SetPlayerId gets a reference to the given string and assigns it to the PlayerId field.
func (o *Video) SetPlayerId(v string) {
o.PlayerId = &v
}
// GetPublic returns the Public field value if set, zero value otherwise.
func (o *Video) GetPublic() bool {
if o == nil || o.Public == nil {
var ret bool
return ret
}
return *o.Public
}
// GetPublicOk returns a tuple with the Public field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetPublicOk() (*bool, bool) {
if o == nil || o.Public == nil {
return nil, false
}
return o.Public, true
}
// HasPublic returns a boolean if a field has been set.
func (o *Video) HasPublic() bool {
if o != nil && o.Public != nil {
return true
}
return false
}
// SetPublic gets a reference to the given bool and assigns it to the Public field.
func (o *Video) SetPublic(v bool) {
o.Public = &v
}
// GetPanoramic returns the Panoramic field value if set, zero value otherwise.
func (o *Video) GetPanoramic() bool {
if o == nil || o.Panoramic == nil {
var ret bool
return ret
}
return *o.Panoramic
}
// GetPanoramicOk returns a tuple with the Panoramic field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetPanoramicOk() (*bool, bool) {
if o == nil || o.Panoramic == nil {
return nil, false
}
return o.Panoramic, true
}
// HasPanoramic returns a boolean if a field has been set.
func (o *Video) HasPanoramic() bool {
if o != nil && o.Panoramic != nil {
return true
}
return false
}
// SetPanoramic gets a reference to the given bool and assigns it to the Panoramic field.
func (o *Video) SetPanoramic(v bool) {
o.Panoramic = &v
}
// GetMp4Support returns the Mp4Support field value if set, zero value otherwise.
func (o *Video) GetMp4Support() bool {
if o == nil || o.Mp4Support == nil {
var ret bool
return ret
}
return *o.Mp4Support
}
// GetMp4SupportOk returns a tuple with the Mp4Support field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Video) GetMp4SupportOk() (*bool, bool) {
if o == nil || o.Mp4Support == nil {
return nil, false
}
return o.Mp4Support, true
}
// HasMp4Support returns a boolean if a field has been set.
func (o *Video) HasMp4Support() bool {
if o != nil && o.Mp4Support != nil {
return true
}
return false
}
// SetMp4Support gets a reference to the given bool and assigns it to the Mp4Support field.
func (o *Video) SetMp4Support(v bool) {
o.Mp4Support = &v
}
type NullableVideo struct {
value *Video
isSet bool
}
func (v NullableVideo) Get() *Video {
return v.value
}
func (v *NullableVideo) Set(val *Video) {
v.value = val
v.isSet = true
}
func (v NullableVideo) IsSet() bool {
return v.isSet
}
func (v *NullableVideo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVideo(val *Video) *NullableVideo {
return &NullableVideo{value: val, isSet: true}
}