forked from distribution/distribution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
youtube-gen.go
19369 lines (17457 loc) · 750 KB
/
youtube-gen.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
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package youtube provides access to the YouTube Data API.
//
// See https://developers.google.com/youtube/v3
//
// Usage example:
//
// import "google.golang.org/api/youtube/v3"
// ...
// youtubeService, err := youtube.New(oauthHttpClient)
package youtube // import "google.golang.org/api/youtube/v3"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"google.golang.org/api/internal"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = internal.MarshalJSON
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "youtube:v3"
const apiName = "youtube"
const apiVersion = "v3"
const basePath = "https://www.googleapis.com/youtube/v3/"
// OAuth2 scopes used by this API.
const (
// Manage your YouTube account
YoutubeScope = "https://www.googleapis.com/auth/youtube"
// Manage your YouTube account
YoutubeForceSslScope = "https://www.googleapis.com/auth/youtube.force-ssl"
// View your YouTube account
YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.readonly"
// Manage your YouTube videos
YoutubeUploadScope = "https://www.googleapis.com/auth/youtube.upload"
// View and manage your assets and associated content on YouTube
YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepartner"
// View private information of your YouTube channel relevant during the
// audit process with a YouTube partner
YoutubepartnerChannelAuditScope = "https://www.googleapis.com/auth/youtubepartner-channel-audit"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Activities = NewActivitiesService(s)
s.Captions = NewCaptionsService(s)
s.ChannelBanners = NewChannelBannersService(s)
s.ChannelSections = NewChannelSectionsService(s)
s.Channels = NewChannelsService(s)
s.CommentThreads = NewCommentThreadsService(s)
s.Comments = NewCommentsService(s)
s.GuideCategories = NewGuideCategoriesService(s)
s.I18nLanguages = NewI18nLanguagesService(s)
s.I18nRegions = NewI18nRegionsService(s)
s.LiveBroadcasts = NewLiveBroadcastsService(s)
s.LiveStreams = NewLiveStreamsService(s)
s.PlaylistItems = NewPlaylistItemsService(s)
s.Playlists = NewPlaylistsService(s)
s.Search = NewSearchService(s)
s.Subscriptions = NewSubscriptionsService(s)
s.Thumbnails = NewThumbnailsService(s)
s.VideoAbuseReportReasons = NewVideoAbuseReportReasonsService(s)
s.VideoCategories = NewVideoCategoriesService(s)
s.Videos = NewVideosService(s)
s.Watermarks = NewWatermarksService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Activities *ActivitiesService
Captions *CaptionsService
ChannelBanners *ChannelBannersService
ChannelSections *ChannelSectionsService
Channels *ChannelsService
CommentThreads *CommentThreadsService
Comments *CommentsService
GuideCategories *GuideCategoriesService
I18nLanguages *I18nLanguagesService
I18nRegions *I18nRegionsService
LiveBroadcasts *LiveBroadcastsService
LiveStreams *LiveStreamsService
PlaylistItems *PlaylistItemsService
Playlists *PlaylistsService
Search *SearchService
Subscriptions *SubscriptionsService
Thumbnails *ThumbnailsService
VideoAbuseReportReasons *VideoAbuseReportReasonsService
VideoCategories *VideoCategoriesService
Videos *VideosService
Watermarks *WatermarksService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewActivitiesService(s *Service) *ActivitiesService {
rs := &ActivitiesService{s: s}
return rs
}
type ActivitiesService struct {
s *Service
}
func NewCaptionsService(s *Service) *CaptionsService {
rs := &CaptionsService{s: s}
return rs
}
type CaptionsService struct {
s *Service
}
func NewChannelBannersService(s *Service) *ChannelBannersService {
rs := &ChannelBannersService{s: s}
return rs
}
type ChannelBannersService struct {
s *Service
}
func NewChannelSectionsService(s *Service) *ChannelSectionsService {
rs := &ChannelSectionsService{s: s}
return rs
}
type ChannelSectionsService struct {
s *Service
}
func NewChannelsService(s *Service) *ChannelsService {
rs := &ChannelsService{s: s}
return rs
}
type ChannelsService struct {
s *Service
}
func NewCommentThreadsService(s *Service) *CommentThreadsService {
rs := &CommentThreadsService{s: s}
return rs
}
type CommentThreadsService struct {
s *Service
}
func NewCommentsService(s *Service) *CommentsService {
rs := &CommentsService{s: s}
return rs
}
type CommentsService struct {
s *Service
}
func NewGuideCategoriesService(s *Service) *GuideCategoriesService {
rs := &GuideCategoriesService{s: s}
return rs
}
type GuideCategoriesService struct {
s *Service
}
func NewI18nLanguagesService(s *Service) *I18nLanguagesService {
rs := &I18nLanguagesService{s: s}
return rs
}
type I18nLanguagesService struct {
s *Service
}
func NewI18nRegionsService(s *Service) *I18nRegionsService {
rs := &I18nRegionsService{s: s}
return rs
}
type I18nRegionsService struct {
s *Service
}
func NewLiveBroadcastsService(s *Service) *LiveBroadcastsService {
rs := &LiveBroadcastsService{s: s}
return rs
}
type LiveBroadcastsService struct {
s *Service
}
func NewLiveStreamsService(s *Service) *LiveStreamsService {
rs := &LiveStreamsService{s: s}
return rs
}
type LiveStreamsService struct {
s *Service
}
func NewPlaylistItemsService(s *Service) *PlaylistItemsService {
rs := &PlaylistItemsService{s: s}
return rs
}
type PlaylistItemsService struct {
s *Service
}
func NewPlaylistsService(s *Service) *PlaylistsService {
rs := &PlaylistsService{s: s}
return rs
}
type PlaylistsService struct {
s *Service
}
func NewSearchService(s *Service) *SearchService {
rs := &SearchService{s: s}
return rs
}
type SearchService struct {
s *Service
}
func NewSubscriptionsService(s *Service) *SubscriptionsService {
rs := &SubscriptionsService{s: s}
return rs
}
type SubscriptionsService struct {
s *Service
}
func NewThumbnailsService(s *Service) *ThumbnailsService {
rs := &ThumbnailsService{s: s}
return rs
}
type ThumbnailsService struct {
s *Service
}
func NewVideoAbuseReportReasonsService(s *Service) *VideoAbuseReportReasonsService {
rs := &VideoAbuseReportReasonsService{s: s}
return rs
}
type VideoAbuseReportReasonsService struct {
s *Service
}
func NewVideoCategoriesService(s *Service) *VideoCategoriesService {
rs := &VideoCategoriesService{s: s}
return rs
}
type VideoCategoriesService struct {
s *Service
}
func NewVideosService(s *Service) *VideosService {
rs := &VideosService{s: s}
return rs
}
type VideosService struct {
s *Service
}
func NewWatermarksService(s *Service) *WatermarksService {
rs := &WatermarksService{s: s}
return rs
}
type WatermarksService struct {
s *Service
}
// AccessPolicy: Rights management policy for YouTube resources.
type AccessPolicy struct {
// Allowed: The value of allowed indicates whether the access to the
// policy is allowed or denied by default.
Allowed bool `json:"allowed,omitempty"`
// Exception: A list of region codes that identify countries where the
// default policy do not apply.
Exception []string `json:"exception,omitempty"`
// ForceSendFields is a list of field names (e.g. "Allowed") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AccessPolicy) MarshalJSON() ([]byte, error) {
type noMethod AccessPolicy
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Activity: An activity resource contains information about an action
// that a particular channel, or user, has taken on YouTube.The actions
// reported in activity feeds include rating a video, sharing a video,
// marking a video as a favorite, commenting on a video, uploading a
// video, and so forth. Each activity resource identifies the type of
// action, the channel associated with the action, and the resource(s)
// associated with the action, such as the video that was rated or
// uploaded.
type Activity struct {
// ContentDetails: The contentDetails object contains information about
// the content associated with the activity. For example, if the
// snippet.type value is videoRated, then the contentDetails object's
// content identifies the rated video.
ContentDetails *ActivityContentDetails `json:"contentDetails,omitempty"`
// Etag: Etag of this resource.
Etag string `json:"etag,omitempty"`
// Id: The ID that YouTube uses to uniquely identify the activity.
Id string `json:"id,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "youtube#activity".
Kind string `json:"kind,omitempty"`
// Snippet: The snippet object contains basic details about the
// activity, including the activity's type and group ID.
Snippet *ActivitySnippet `json:"snippet,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ContentDetails") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Activity) MarshalJSON() ([]byte, error) {
type noMethod Activity
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetails: Details about the content of an activity: the
// video that was shared, the channel that was subscribed to, etc.
type ActivityContentDetails struct {
// Bulletin: The bulletin object contains details about a channel
// bulletin post. This object is only present if the snippet.type is
// bulletin.
Bulletin *ActivityContentDetailsBulletin `json:"bulletin,omitempty"`
// ChannelItem: The channelItem object contains details about a resource
// which was added to a channel. This property is only present if the
// snippet.type is channelItem.
ChannelItem *ActivityContentDetailsChannelItem `json:"channelItem,omitempty"`
// Comment: The comment object contains information about a resource
// that received a comment. This property is only present if the
// snippet.type is comment.
Comment *ActivityContentDetailsComment `json:"comment,omitempty"`
// Favorite: The favorite object contains information about a video that
// was marked as a favorite video. This property is only present if the
// snippet.type is favorite.
Favorite *ActivityContentDetailsFavorite `json:"favorite,omitempty"`
// Like: The like object contains information about a resource that
// received a positive (like) rating. This property is only present if
// the snippet.type is like.
Like *ActivityContentDetailsLike `json:"like,omitempty"`
// PlaylistItem: The playlistItem object contains information about a
// new playlist item. This property is only present if the snippet.type
// is playlistItem.
PlaylistItem *ActivityContentDetailsPlaylistItem `json:"playlistItem,omitempty"`
// PromotedItem: The promotedItem object contains details about a
// resource which is being promoted. This property is only present if
// the snippet.type is promotedItem.
PromotedItem *ActivityContentDetailsPromotedItem `json:"promotedItem,omitempty"`
// Recommendation: The recommendation object contains information about
// a recommended resource. This property is only present if the
// snippet.type is recommendation.
Recommendation *ActivityContentDetailsRecommendation `json:"recommendation,omitempty"`
// Social: The social object contains details about a social network
// post. This property is only present if the snippet.type is social.
Social *ActivityContentDetailsSocial `json:"social,omitempty"`
// Subscription: The subscription object contains information about a
// channel that a user subscribed to. This property is only present if
// the snippet.type is subscription.
Subscription *ActivityContentDetailsSubscription `json:"subscription,omitempty"`
// Upload: The upload object contains information about the uploaded
// video. This property is only present if the snippet.type is upload.
Upload *ActivityContentDetailsUpload `json:"upload,omitempty"`
// ForceSendFields is a list of field names (e.g. "Bulletin") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetails) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetails
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsBulletin: Details about a channel bulletin
// post.
type ActivityContentDetailsBulletin struct {
// ResourceId: The resourceId object contains information that
// identifies the resource associated with a bulletin post.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResourceId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsBulletin) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsBulletin
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsChannelItem: Details about a resource which was
// added to a channel.
type ActivityContentDetailsChannelItem struct {
// ResourceId: The resourceId object contains information that
// identifies the resource that was added to the channel.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResourceId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsChannelItem) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsChannelItem
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsComment: Information about a resource that
// received a comment.
type ActivityContentDetailsComment struct {
// ResourceId: The resourceId object contains information that
// identifies the resource associated with the comment.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResourceId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsComment) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsComment
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsFavorite: Information about a video that was
// marked as a favorite video.
type ActivityContentDetailsFavorite struct {
// ResourceId: The resourceId object contains information that
// identifies the resource that was marked as a favorite.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResourceId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsFavorite) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsFavorite
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsLike: Information about a resource that
// received a positive (like) rating.
type ActivityContentDetailsLike struct {
// ResourceId: The resourceId object contains information that
// identifies the rated resource.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResourceId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsLike) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsLike
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsPlaylistItem: Information about a new playlist
// item.
type ActivityContentDetailsPlaylistItem struct {
// PlaylistId: The value that YouTube uses to uniquely identify the
// playlist.
PlaylistId string `json:"playlistId,omitempty"`
// PlaylistItemId: ID of the item within the playlist.
PlaylistItemId string `json:"playlistItemId,omitempty"`
// ResourceId: The resourceId object contains information about the
// resource that was added to the playlist.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "PlaylistId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsPlaylistItem) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsPlaylistItem
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsPromotedItem: Details about a resource which is
// being promoted.
type ActivityContentDetailsPromotedItem struct {
// AdTag: The URL the client should fetch to request a promoted item.
AdTag string `json:"adTag,omitempty"`
// ClickTrackingUrl: The URL the client should ping to indicate that the
// user clicked through on this promoted item.
ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
// CreativeViewUrl: The URL the client should ping to indicate that the
// user was shown this promoted item.
CreativeViewUrl string `json:"creativeViewUrl,omitempty"`
// CtaType: The type of call-to-action, a message to the user indicating
// action that can be taken.
//
// Possible values:
// "unspecified"
// "visitAdvertiserSite"
CtaType string `json:"ctaType,omitempty"`
// CustomCtaButtonText: The custom call-to-action button text. If
// specified, it will override the default button text for the cta_type.
CustomCtaButtonText string `json:"customCtaButtonText,omitempty"`
// DescriptionText: The text description to accompany the promoted item.
DescriptionText string `json:"descriptionText,omitempty"`
// DestinationUrl: The URL the client should direct the user to, if the
// user chooses to visit the advertiser's website.
DestinationUrl string `json:"destinationUrl,omitempty"`
// ForecastingUrl: The list of forecasting URLs. The client should ping
// all of these URLs when a promoted item is not available, to indicate
// that a promoted item could have been shown.
ForecastingUrl []string `json:"forecastingUrl,omitempty"`
// ImpressionUrl: The list of impression URLs. The client should ping
// all of these URLs to indicate that the user was shown this promoted
// item.
ImpressionUrl []string `json:"impressionUrl,omitempty"`
// VideoId: The ID that YouTube uses to uniquely identify the promoted
// video.
VideoId string `json:"videoId,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdTag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsPromotedItem) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsPromotedItem
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsRecommendation: Information that identifies the
// recommended resource.
type ActivityContentDetailsRecommendation struct {
// Reason: The reason that the resource is recommended to the user.
//
// Possible values:
// "unspecified"
// "videoFavorited"
// "videoLiked"
// "videoWatched"
Reason string `json:"reason,omitempty"`
// ResourceId: The resourceId object contains information that
// identifies the recommended resource.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// SeedResourceId: The seedResourceId object contains information about
// the resource that caused the recommendation.
SeedResourceId *ResourceId `json:"seedResourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Reason") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsRecommendation) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsRecommendation
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsSocial: Details about a social network post.
type ActivityContentDetailsSocial struct {
// Author: The author of the social network post.
Author string `json:"author,omitempty"`
// ImageUrl: An image of the post's author.
ImageUrl string `json:"imageUrl,omitempty"`
// ReferenceUrl: The URL of the social network post.
ReferenceUrl string `json:"referenceUrl,omitempty"`
// ResourceId: The resourceId object encapsulates information that
// identifies the resource associated with a social network post.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// Type: The name of the social network.
//
// Possible values:
// "facebook"
// "googlePlus"
// "twitter"
// "unspecified"
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Author") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsSocial) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsSocial
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsSubscription: Information about a channel that
// a user subscribed to.
type ActivityContentDetailsSubscription struct {
// ResourceId: The resourceId object contains information that
// identifies the resource that the user subscribed to.
ResourceId *ResourceId `json:"resourceId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResourceId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsSubscription) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsSubscription
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivityContentDetailsUpload: Information about the uploaded video.
type ActivityContentDetailsUpload struct {
// VideoId: The ID that YouTube uses to uniquely identify the uploaded
// video.
VideoId string `json:"videoId,omitempty"`
// ForceSendFields is a list of field names (e.g. "VideoId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityContentDetailsUpload) MarshalJSON() ([]byte, error) {
type noMethod ActivityContentDetailsUpload
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
type ActivityListResponse struct {
// Etag: Etag of this resource.
Etag string `json:"etag,omitempty"`
// EventId: Serialized EventId of the request which produced this
// response.
EventId string `json:"eventId,omitempty"`
// Items: A list of activities, or events, that match the request
// criteria.
Items []*Activity `json:"items,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "youtube#activityListResponse".
Kind string `json:"kind,omitempty"`
// NextPageToken: The token that can be used as the value of the
// pageToken parameter to retrieve the next page in the result set.
NextPageToken string `json:"nextPageToken,omitempty"`
PageInfo *PageInfo `json:"pageInfo,omitempty"`
// PrevPageToken: The token that can be used as the value of the
// pageToken parameter to retrieve the previous page in the result set.
PrevPageToken string `json:"prevPageToken,omitempty"`
TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
// VisitorId: The visitorId identifies the visitor.
VisitorId string `json:"visitorId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivityListResponse) MarshalJSON() ([]byte, error) {
type noMethod ActivityListResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ActivitySnippet: Basic details about an activity, including title,
// description, thumbnails, activity type and group.
type ActivitySnippet struct {
// ChannelId: The ID that YouTube uses to uniquely identify the channel
// associated with the activity.
ChannelId string `json:"channelId,omitempty"`
// ChannelTitle: Channel title for the channel responsible for this
// activity
ChannelTitle string `json:"channelTitle,omitempty"`
// Description: The description of the resource primarily associated
// with the activity.
Description string `json:"description,omitempty"`
// GroupId: The group ID associated with the activity. A group ID
// identifies user events that are associated with the same user and
// resource. For example, if a user rates a video and marks the same
// video as a favorite, the entries for those events would have the same
// group ID in the user's activity feed. In your user interface, you can
// avoid repetition by grouping events with the same groupId value.
GroupId string `json:"groupId,omitempty"`
// PublishedAt: The date and time that the video was uploaded. The value
// is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
PublishedAt string `json:"publishedAt,omitempty"`
// Thumbnails: A map of thumbnail images associated with the resource
// that is primarily associated with the activity. For each object in
// the map, the key is the name of the thumbnail image, and the value is
// an object that contains other information about the thumbnail.
Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
// Title: The title of the resource primarily associated with the
// activity.
Title string `json:"title,omitempty"`
// Type: The type of activity that the resource describes.
//
// Possible values:
// "bulletin"
// "channelItem"
// "comment"
// "favorite"
// "like"
// "playlistItem"
// "promotedItem"
// "recommendation"
// "social"
// "subscription"
// "upload"
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "ChannelId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ActivitySnippet) MarshalJSON() ([]byte, error) {
type noMethod ActivitySnippet
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Caption: A caption resource represents a YouTube caption track. A
// caption track is associated with exactly one YouTube video.
type Caption struct {
// Etag: Etag of this resource.
Etag string `json:"etag,omitempty"`
// Id: The ID that YouTube uses to uniquely identify the caption track.
Id string `json:"id,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "youtube#caption".
Kind string `json:"kind,omitempty"`
// Snippet: The snippet object contains basic details about the caption.
Snippet *CaptionSnippet `json:"snippet,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Caption) MarshalJSON() ([]byte, error) {
type noMethod Caption
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
type CaptionListResponse struct {
// Etag: Etag of this resource.
Etag string `json:"etag,omitempty"`
// EventId: Serialized EventId of the request which produced this
// response.
EventId string `json:"eventId,omitempty"`
// Items: A list of captions that match the request criteria.
Items []*Caption `json:"items,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "youtube#captionListResponse".
Kind string `json:"kind,omitempty"`
// VisitorId: The visitorId identifies the visitor.
VisitorId string `json:"visitorId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *CaptionListResponse) MarshalJSON() ([]byte, error) {
type noMethod CaptionListResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// CaptionSnippet: Basic details about a caption track, such as its
// language and name.
type CaptionSnippet struct {
// AudioTrackType: The type of audio track associated with the caption
// track.
//