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 package youtube
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "youtube:v3"
95 const apiName = "youtube"
96 const apiVersion = "v3"
97 const basePath = "https://youtube.googleapis.com/"
98 const basePathTemplate = "https://youtube.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://youtube.mtls.googleapis.com/"
100
101
102 const (
103
104 YoutubeScope = "https://www.googleapis.com/auth/youtube"
105
106
107
108 YoutubeChannelMembershipsCreatorScope = "https://www.googleapis.com/auth/youtube.channel-memberships.creator"
109
110
111
112 YoutubeForceSslScope = "https://www.googleapis.com/auth/youtube.force-ssl"
113
114
115 YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.readonly"
116
117
118 YoutubeUploadScope = "https://www.googleapis.com/auth/youtube.upload"
119
120
121 YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepartner"
122
123
124
125 YoutubepartnerChannelAuditScope = "https://www.googleapis.com/auth/youtubepartner-channel-audit"
126 )
127
128
129 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
130 scopesOption := internaloption.WithDefaultScopes(
131 "https://www.googleapis.com/auth/youtube",
132 "https://www.googleapis.com/auth/youtube.channel-memberships.creator",
133 "https://www.googleapis.com/auth/youtube.force-ssl",
134 "https://www.googleapis.com/auth/youtube.readonly",
135 "https://www.googleapis.com/auth/youtube.upload",
136 "https://www.googleapis.com/auth/youtubepartner",
137 "https://www.googleapis.com/auth/youtubepartner-channel-audit",
138 )
139
140 opts = append([]option.ClientOption{scopesOption}, opts...)
141 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
142 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
143 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
144 opts = append(opts, internaloption.EnableNewAuthLibrary())
145 client, endpoint, err := htransport.NewClient(ctx, opts...)
146 if err != nil {
147 return nil, err
148 }
149 s, err := New(client)
150 if err != nil {
151 return nil, err
152 }
153 if endpoint != "" {
154 s.BasePath = endpoint
155 }
156 return s, nil
157 }
158
159
160
161
162
163
164 func New(client *http.Client) (*Service, error) {
165 if client == nil {
166 return nil, errors.New("client is nil")
167 }
168 s := &Service{client: client, BasePath: basePath}
169 s.AbuseReports = NewAbuseReportsService(s)
170 s.Activities = NewActivitiesService(s)
171 s.Captions = NewCaptionsService(s)
172 s.ChannelBanners = NewChannelBannersService(s)
173 s.ChannelSections = NewChannelSectionsService(s)
174 s.Channels = NewChannelsService(s)
175 s.CommentThreads = NewCommentThreadsService(s)
176 s.Comments = NewCommentsService(s)
177 s.I18nLanguages = NewI18nLanguagesService(s)
178 s.I18nRegions = NewI18nRegionsService(s)
179 s.LiveBroadcasts = NewLiveBroadcastsService(s)
180 s.LiveChatBans = NewLiveChatBansService(s)
181 s.LiveChatMessages = NewLiveChatMessagesService(s)
182 s.LiveChatModerators = NewLiveChatModeratorsService(s)
183 s.LiveStreams = NewLiveStreamsService(s)
184 s.Members = NewMembersService(s)
185 s.MembershipsLevels = NewMembershipsLevelsService(s)
186 s.PlaylistImages = NewPlaylistImagesService(s)
187 s.PlaylistItems = NewPlaylistItemsService(s)
188 s.Playlists = NewPlaylistsService(s)
189 s.Search = NewSearchService(s)
190 s.Subscriptions = NewSubscriptionsService(s)
191 s.SuperChatEvents = NewSuperChatEventsService(s)
192 s.Tests = NewTestsService(s)
193 s.ThirdPartyLinks = NewThirdPartyLinksService(s)
194 s.Thumbnails = NewThumbnailsService(s)
195 s.VideoAbuseReportReasons = NewVideoAbuseReportReasonsService(s)
196 s.VideoCategories = NewVideoCategoriesService(s)
197 s.Videos = NewVideosService(s)
198 s.Watermarks = NewWatermarksService(s)
199 s.Youtube = NewYoutubeService(s)
200 return s, nil
201 }
202
203 type Service struct {
204 client *http.Client
205 BasePath string
206 UserAgent string
207
208 AbuseReports *AbuseReportsService
209
210 Activities *ActivitiesService
211
212 Captions *CaptionsService
213
214 ChannelBanners *ChannelBannersService
215
216 ChannelSections *ChannelSectionsService
217
218 Channels *ChannelsService
219
220 CommentThreads *CommentThreadsService
221
222 Comments *CommentsService
223
224 I18nLanguages *I18nLanguagesService
225
226 I18nRegions *I18nRegionsService
227
228 LiveBroadcasts *LiveBroadcastsService
229
230 LiveChatBans *LiveChatBansService
231
232 LiveChatMessages *LiveChatMessagesService
233
234 LiveChatModerators *LiveChatModeratorsService
235
236 LiveStreams *LiveStreamsService
237
238 Members *MembersService
239
240 MembershipsLevels *MembershipsLevelsService
241
242 PlaylistImages *PlaylistImagesService
243
244 PlaylistItems *PlaylistItemsService
245
246 Playlists *PlaylistsService
247
248 Search *SearchService
249
250 Subscriptions *SubscriptionsService
251
252 SuperChatEvents *SuperChatEventsService
253
254 Tests *TestsService
255
256 ThirdPartyLinks *ThirdPartyLinksService
257
258 Thumbnails *ThumbnailsService
259
260 VideoAbuseReportReasons *VideoAbuseReportReasonsService
261
262 VideoCategories *VideoCategoriesService
263
264 Videos *VideosService
265
266 Watermarks *WatermarksService
267
268 Youtube *YoutubeService
269 }
270
271 func (s *Service) userAgent() string {
272 if s.UserAgent == "" {
273 return googleapi.UserAgent
274 }
275 return googleapi.UserAgent + " " + s.UserAgent
276 }
277
278 func NewAbuseReportsService(s *Service) *AbuseReportsService {
279 rs := &AbuseReportsService{s: s}
280 return rs
281 }
282
283 type AbuseReportsService struct {
284 s *Service
285 }
286
287 func NewActivitiesService(s *Service) *ActivitiesService {
288 rs := &ActivitiesService{s: s}
289 return rs
290 }
291
292 type ActivitiesService struct {
293 s *Service
294 }
295
296 func NewCaptionsService(s *Service) *CaptionsService {
297 rs := &CaptionsService{s: s}
298 return rs
299 }
300
301 type CaptionsService struct {
302 s *Service
303 }
304
305 func NewChannelBannersService(s *Service) *ChannelBannersService {
306 rs := &ChannelBannersService{s: s}
307 return rs
308 }
309
310 type ChannelBannersService struct {
311 s *Service
312 }
313
314 func NewChannelSectionsService(s *Service) *ChannelSectionsService {
315 rs := &ChannelSectionsService{s: s}
316 return rs
317 }
318
319 type ChannelSectionsService struct {
320 s *Service
321 }
322
323 func NewChannelsService(s *Service) *ChannelsService {
324 rs := &ChannelsService{s: s}
325 return rs
326 }
327
328 type ChannelsService struct {
329 s *Service
330 }
331
332 func NewCommentThreadsService(s *Service) *CommentThreadsService {
333 rs := &CommentThreadsService{s: s}
334 return rs
335 }
336
337 type CommentThreadsService struct {
338 s *Service
339 }
340
341 func NewCommentsService(s *Service) *CommentsService {
342 rs := &CommentsService{s: s}
343 return rs
344 }
345
346 type CommentsService struct {
347 s *Service
348 }
349
350 func NewI18nLanguagesService(s *Service) *I18nLanguagesService {
351 rs := &I18nLanguagesService{s: s}
352 return rs
353 }
354
355 type I18nLanguagesService struct {
356 s *Service
357 }
358
359 func NewI18nRegionsService(s *Service) *I18nRegionsService {
360 rs := &I18nRegionsService{s: s}
361 return rs
362 }
363
364 type I18nRegionsService struct {
365 s *Service
366 }
367
368 func NewLiveBroadcastsService(s *Service) *LiveBroadcastsService {
369 rs := &LiveBroadcastsService{s: s}
370 return rs
371 }
372
373 type LiveBroadcastsService struct {
374 s *Service
375 }
376
377 func NewLiveChatBansService(s *Service) *LiveChatBansService {
378 rs := &LiveChatBansService{s: s}
379 return rs
380 }
381
382 type LiveChatBansService struct {
383 s *Service
384 }
385
386 func NewLiveChatMessagesService(s *Service) *LiveChatMessagesService {
387 rs := &LiveChatMessagesService{s: s}
388 return rs
389 }
390
391 type LiveChatMessagesService struct {
392 s *Service
393 }
394
395 func NewLiveChatModeratorsService(s *Service) *LiveChatModeratorsService {
396 rs := &LiveChatModeratorsService{s: s}
397 return rs
398 }
399
400 type LiveChatModeratorsService struct {
401 s *Service
402 }
403
404 func NewLiveStreamsService(s *Service) *LiveStreamsService {
405 rs := &LiveStreamsService{s: s}
406 return rs
407 }
408
409 type LiveStreamsService struct {
410 s *Service
411 }
412
413 func NewMembersService(s *Service) *MembersService {
414 rs := &MembersService{s: s}
415 return rs
416 }
417
418 type MembersService struct {
419 s *Service
420 }
421
422 func NewMembershipsLevelsService(s *Service) *MembershipsLevelsService {
423 rs := &MembershipsLevelsService{s: s}
424 return rs
425 }
426
427 type MembershipsLevelsService struct {
428 s *Service
429 }
430
431 func NewPlaylistImagesService(s *Service) *PlaylistImagesService {
432 rs := &PlaylistImagesService{s: s}
433 return rs
434 }
435
436 type PlaylistImagesService struct {
437 s *Service
438 }
439
440 func NewPlaylistItemsService(s *Service) *PlaylistItemsService {
441 rs := &PlaylistItemsService{s: s}
442 return rs
443 }
444
445 type PlaylistItemsService struct {
446 s *Service
447 }
448
449 func NewPlaylistsService(s *Service) *PlaylistsService {
450 rs := &PlaylistsService{s: s}
451 return rs
452 }
453
454 type PlaylistsService struct {
455 s *Service
456 }
457
458 func NewSearchService(s *Service) *SearchService {
459 rs := &SearchService{s: s}
460 return rs
461 }
462
463 type SearchService struct {
464 s *Service
465 }
466
467 func NewSubscriptionsService(s *Service) *SubscriptionsService {
468 rs := &SubscriptionsService{s: s}
469 return rs
470 }
471
472 type SubscriptionsService struct {
473 s *Service
474 }
475
476 func NewSuperChatEventsService(s *Service) *SuperChatEventsService {
477 rs := &SuperChatEventsService{s: s}
478 return rs
479 }
480
481 type SuperChatEventsService struct {
482 s *Service
483 }
484
485 func NewTestsService(s *Service) *TestsService {
486 rs := &TestsService{s: s}
487 return rs
488 }
489
490 type TestsService struct {
491 s *Service
492 }
493
494 func NewThirdPartyLinksService(s *Service) *ThirdPartyLinksService {
495 rs := &ThirdPartyLinksService{s: s}
496 return rs
497 }
498
499 type ThirdPartyLinksService struct {
500 s *Service
501 }
502
503 func NewThumbnailsService(s *Service) *ThumbnailsService {
504 rs := &ThumbnailsService{s: s}
505 return rs
506 }
507
508 type ThumbnailsService struct {
509 s *Service
510 }
511
512 func NewVideoAbuseReportReasonsService(s *Service) *VideoAbuseReportReasonsService {
513 rs := &VideoAbuseReportReasonsService{s: s}
514 return rs
515 }
516
517 type VideoAbuseReportReasonsService struct {
518 s *Service
519 }
520
521 func NewVideoCategoriesService(s *Service) *VideoCategoriesService {
522 rs := &VideoCategoriesService{s: s}
523 return rs
524 }
525
526 type VideoCategoriesService struct {
527 s *Service
528 }
529
530 func NewVideosService(s *Service) *VideosService {
531 rs := &VideosService{s: s}
532 return rs
533 }
534
535 type VideosService struct {
536 s *Service
537 }
538
539 func NewWatermarksService(s *Service) *WatermarksService {
540 rs := &WatermarksService{s: s}
541 return rs
542 }
543
544 type WatermarksService struct {
545 s *Service
546 }
547
548 func NewYoutubeService(s *Service) *YoutubeService {
549 rs := &YoutubeService{s: s}
550 rs.V3 = NewYoutubeV3Service(s)
551 return rs
552 }
553
554 type YoutubeService struct {
555 s *Service
556
557 V3 *YoutubeV3Service
558 }
559
560 func NewYoutubeV3Service(s *Service) *YoutubeV3Service {
561 rs := &YoutubeV3Service{s: s}
562 return rs
563 }
564
565 type YoutubeV3Service struct {
566 s *Service
567 }
568
569 type AbuseReport struct {
570 AbuseTypes []*AbuseType `json:"abuseTypes,omitempty"`
571 Description string `json:"description,omitempty"`
572 RelatedEntities []*RelatedEntity `json:"relatedEntities,omitempty"`
573 Subject *Entity `json:"subject,omitempty"`
574
575
576 googleapi.ServerResponse `json:"-"`
577
578
579
580
581
582 ForceSendFields []string `json:"-"`
583
584
585
586
587 NullFields []string `json:"-"`
588 }
589
590 func (s *AbuseReport) MarshalJSON() ([]byte, error) {
591 type NoMethod AbuseReport
592 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
593 }
594
595 type AbuseType struct {
596 Id string `json:"id,omitempty"`
597
598
599
600
601
602 ForceSendFields []string `json:"-"`
603
604
605
606
607 NullFields []string `json:"-"`
608 }
609
610 func (s *AbuseType) MarshalJSON() ([]byte, error) {
611 type NoMethod AbuseType
612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
613 }
614
615
616 type AccessPolicy struct {
617
618
619 Allowed bool `json:"allowed,omitempty"`
620
621
622 Exception []string `json:"exception,omitempty"`
623
624
625
626
627
628 ForceSendFields []string `json:"-"`
629
630
631
632
633 NullFields []string `json:"-"`
634 }
635
636 func (s *AccessPolicy) MarshalJSON() ([]byte, error) {
637 type NoMethod AccessPolicy
638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
639 }
640
641
642
643
644
645
646
647
648 type Activity struct {
649
650
651
652
653 ContentDetails *ActivityContentDetails `json:"contentDetails,omitempty"`
654
655 Etag string `json:"etag,omitempty"`
656
657 Id string `json:"id,omitempty"`
658
659
660 Kind string `json:"kind,omitempty"`
661
662
663 Snippet *ActivitySnippet `json:"snippet,omitempty"`
664
665
666
667
668
669 ForceSendFields []string `json:"-"`
670
671
672
673
674 NullFields []string `json:"-"`
675 }
676
677 func (s *Activity) MarshalJSON() ([]byte, error) {
678 type NoMethod Activity
679 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
680 }
681
682
683
684 type ActivityContentDetails struct {
685
686
687 Bulletin *ActivityContentDetailsBulletin `json:"bulletin,omitempty"`
688
689
690
691 ChannelItem *ActivityContentDetailsChannelItem `json:"channelItem,omitempty"`
692
693
694
695 Comment *ActivityContentDetailsComment `json:"comment,omitempty"`
696
697
698
699 Favorite *ActivityContentDetailsFavorite `json:"favorite,omitempty"`
700
701
702
703 Like *ActivityContentDetailsLike `json:"like,omitempty"`
704
705
706
707 PlaylistItem *ActivityContentDetailsPlaylistItem `json:"playlistItem,omitempty"`
708
709
710
711 PromotedItem *ActivityContentDetailsPromotedItem `json:"promotedItem,omitempty"`
712
713
714
715 Recommendation *ActivityContentDetailsRecommendation `json:"recommendation,omitempty"`
716
717
718 Social *ActivityContentDetailsSocial `json:"social,omitempty"`
719
720
721
722 Subscription *ActivityContentDetailsSubscription `json:"subscription,omitempty"`
723
724
725 Upload *ActivityContentDetailsUpload `json:"upload,omitempty"`
726
727
728
729
730
731 ForceSendFields []string `json:"-"`
732
733
734
735
736 NullFields []string `json:"-"`
737 }
738
739 func (s *ActivityContentDetails) MarshalJSON() ([]byte, error) {
740 type NoMethod ActivityContentDetails
741 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
742 }
743
744
745 type ActivityContentDetailsBulletin struct {
746
747
748 ResourceId *ResourceId `json:"resourceId,omitempty"`
749
750
751
752
753
754 ForceSendFields []string `json:"-"`
755
756
757
758
759 NullFields []string `json:"-"`
760 }
761
762 func (s *ActivityContentDetailsBulletin) MarshalJSON() ([]byte, error) {
763 type NoMethod ActivityContentDetailsBulletin
764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
765 }
766
767
768
769 type ActivityContentDetailsChannelItem struct {
770
771
772 ResourceId *ResourceId `json:"resourceId,omitempty"`
773
774
775
776
777
778 ForceSendFields []string `json:"-"`
779
780
781
782
783 NullFields []string `json:"-"`
784 }
785
786 func (s *ActivityContentDetailsChannelItem) MarshalJSON() ([]byte, error) {
787 type NoMethod ActivityContentDetailsChannelItem
788 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
789 }
790
791
792
793 type ActivityContentDetailsComment struct {
794
795
796 ResourceId *ResourceId `json:"resourceId,omitempty"`
797
798
799
800
801
802 ForceSendFields []string `json:"-"`
803
804
805
806
807 NullFields []string `json:"-"`
808 }
809
810 func (s *ActivityContentDetailsComment) MarshalJSON() ([]byte, error) {
811 type NoMethod ActivityContentDetailsComment
812 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
813 }
814
815
816
817 type ActivityContentDetailsFavorite struct {
818
819
820 ResourceId *ResourceId `json:"resourceId,omitempty"`
821
822
823
824
825
826 ForceSendFields []string `json:"-"`
827
828
829
830
831 NullFields []string `json:"-"`
832 }
833
834 func (s *ActivityContentDetailsFavorite) MarshalJSON() ([]byte, error) {
835 type NoMethod ActivityContentDetailsFavorite
836 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
837 }
838
839
840
841 type ActivityContentDetailsLike struct {
842
843
844 ResourceId *ResourceId `json:"resourceId,omitempty"`
845
846
847
848
849
850 ForceSendFields []string `json:"-"`
851
852
853
854
855 NullFields []string `json:"-"`
856 }
857
858 func (s *ActivityContentDetailsLike) MarshalJSON() ([]byte, error) {
859 type NoMethod ActivityContentDetailsLike
860 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
861 }
862
863
864 type ActivityContentDetailsPlaylistItem struct {
865
866 PlaylistId string `json:"playlistId,omitempty"`
867
868 PlaylistItemId string `json:"playlistItemId,omitempty"`
869
870
871 ResourceId *ResourceId `json:"resourceId,omitempty"`
872
873
874
875
876
877 ForceSendFields []string `json:"-"`
878
879
880
881
882 NullFields []string `json:"-"`
883 }
884
885 func (s *ActivityContentDetailsPlaylistItem) MarshalJSON() ([]byte, error) {
886 type NoMethod ActivityContentDetailsPlaylistItem
887 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
888 }
889
890
891
892 type ActivityContentDetailsPromotedItem struct {
893
894 AdTag string `json:"adTag,omitempty"`
895
896
897 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
898
899
900 CreativeViewUrl string `json:"creativeViewUrl,omitempty"`
901
902
903
904
905
906
907 CtaType string `json:"ctaType,omitempty"`
908
909
910 CustomCtaButtonText string `json:"customCtaButtonText,omitempty"`
911
912 DescriptionText string `json:"descriptionText,omitempty"`
913
914
915 DestinationUrl string `json:"destinationUrl,omitempty"`
916
917
918
919 ForecastingUrl []string `json:"forecastingUrl,omitempty"`
920
921
922 ImpressionUrl []string `json:"impressionUrl,omitempty"`
923
924 VideoId string `json:"videoId,omitempty"`
925
926
927
928
929
930 ForceSendFields []string `json:"-"`
931
932
933
934
935 NullFields []string `json:"-"`
936 }
937
938 func (s *ActivityContentDetailsPromotedItem) MarshalJSON() ([]byte, error) {
939 type NoMethod ActivityContentDetailsPromotedItem
940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
941 }
942
943
944
945 type ActivityContentDetailsRecommendation struct {
946
947
948
949
950
951
952
953 Reason string `json:"reason,omitempty"`
954
955
956 ResourceId *ResourceId `json:"resourceId,omitempty"`
957
958
959 SeedResourceId *ResourceId `json:"seedResourceId,omitempty"`
960
961
962
963
964
965 ForceSendFields []string `json:"-"`
966
967
968
969
970 NullFields []string `json:"-"`
971 }
972
973 func (s *ActivityContentDetailsRecommendation) MarshalJSON() ([]byte, error) {
974 type NoMethod ActivityContentDetailsRecommendation
975 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
976 }
977
978
979 type ActivityContentDetailsSocial struct {
980
981 Author string `json:"author,omitempty"`
982
983 ImageUrl string `json:"imageUrl,omitempty"`
984
985 ReferenceUrl string `json:"referenceUrl,omitempty"`
986
987
988 ResourceId *ResourceId `json:"resourceId,omitempty"`
989
990
991
992
993
994
995
996 Type string `json:"type,omitempty"`
997
998
999
1000
1001
1002 ForceSendFields []string `json:"-"`
1003
1004
1005
1006
1007 NullFields []string `json:"-"`
1008 }
1009
1010 func (s *ActivityContentDetailsSocial) MarshalJSON() ([]byte, error) {
1011 type NoMethod ActivityContentDetailsSocial
1012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1013 }
1014
1015
1016
1017 type ActivityContentDetailsSubscription struct {
1018
1019
1020 ResourceId *ResourceId `json:"resourceId,omitempty"`
1021
1022
1023
1024
1025
1026 ForceSendFields []string `json:"-"`
1027
1028
1029
1030
1031 NullFields []string `json:"-"`
1032 }
1033
1034 func (s *ActivityContentDetailsSubscription) MarshalJSON() ([]byte, error) {
1035 type NoMethod ActivityContentDetailsSubscription
1036 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1037 }
1038
1039
1040 type ActivityContentDetailsUpload struct {
1041
1042 VideoId string `json:"videoId,omitempty"`
1043
1044
1045
1046
1047
1048 ForceSendFields []string `json:"-"`
1049
1050
1051
1052
1053 NullFields []string `json:"-"`
1054 }
1055
1056 func (s *ActivityContentDetailsUpload) MarshalJSON() ([]byte, error) {
1057 type NoMethod ActivityContentDetailsUpload
1058 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1059 }
1060
1061 type ActivityListResponse struct {
1062
1063 Etag string `json:"etag,omitempty"`
1064
1065 EventId string `json:"eventId,omitempty"`
1066 Items []*Activity `json:"items,omitempty"`
1067
1068
1069 Kind string `json:"kind,omitempty"`
1070
1071
1072 NextPageToken string `json:"nextPageToken,omitempty"`
1073
1074 PageInfo *PageInfo `json:"pageInfo,omitempty"`
1075
1076
1077 PrevPageToken string `json:"prevPageToken,omitempty"`
1078 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
1079
1080 VisitorId string `json:"visitorId,omitempty"`
1081
1082
1083 googleapi.ServerResponse `json:"-"`
1084
1085
1086
1087
1088
1089 ForceSendFields []string `json:"-"`
1090
1091
1092
1093
1094 NullFields []string `json:"-"`
1095 }
1096
1097 func (s *ActivityListResponse) MarshalJSON() ([]byte, error) {
1098 type NoMethod ActivityListResponse
1099 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1100 }
1101
1102
1103
1104 type ActivitySnippet struct {
1105
1106
1107 ChannelId string `json:"channelId,omitempty"`
1108
1109 ChannelTitle string `json:"channelTitle,omitempty"`
1110
1111
1112 Description string `json:"description,omitempty"`
1113
1114
1115
1116
1117
1118
1119 GroupId string `json:"groupId,omitempty"`
1120
1121 PublishedAt string `json:"publishedAt,omitempty"`
1122
1123
1124
1125
1126 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
1127
1128 Title string `json:"title,omitempty"`
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144 Type string `json:"type,omitempty"`
1145
1146
1147
1148
1149
1150 ForceSendFields []string `json:"-"`
1151
1152
1153
1154
1155 NullFields []string `json:"-"`
1156 }
1157
1158 func (s *ActivitySnippet) MarshalJSON() ([]byte, error) {
1159 type NoMethod ActivitySnippet
1160 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1161 }
1162
1163
1164
1165 type Caption struct {
1166
1167 Etag string `json:"etag,omitempty"`
1168
1169 Id string `json:"id,omitempty"`
1170
1171
1172 Kind string `json:"kind,omitempty"`
1173
1174 Snippet *CaptionSnippet `json:"snippet,omitempty"`
1175
1176
1177 googleapi.ServerResponse `json:"-"`
1178
1179
1180
1181
1182
1183 ForceSendFields []string `json:"-"`
1184
1185
1186
1187
1188 NullFields []string `json:"-"`
1189 }
1190
1191 func (s *Caption) MarshalJSON() ([]byte, error) {
1192 type NoMethod Caption
1193 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1194 }
1195
1196 type CaptionListResponse struct {
1197
1198 Etag string `json:"etag,omitempty"`
1199
1200 EventId string `json:"eventId,omitempty"`
1201
1202 Items []*Caption `json:"items,omitempty"`
1203
1204
1205 Kind string `json:"kind,omitempty"`
1206
1207 VisitorId string `json:"visitorId,omitempty"`
1208
1209
1210 googleapi.ServerResponse `json:"-"`
1211
1212
1213
1214
1215
1216 ForceSendFields []string `json:"-"`
1217
1218
1219
1220
1221 NullFields []string `json:"-"`
1222 }
1223
1224 func (s *CaptionListResponse) MarshalJSON() ([]byte, error) {
1225 type NoMethod CaptionListResponse
1226 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1227 }
1228
1229
1230
1231 type CaptionSnippet struct {
1232
1233
1234
1235
1236
1237
1238
1239 AudioTrackType string `json:"audioTrackType,omitempty"`
1240
1241
1242
1243
1244
1245
1246
1247 FailureReason string `json:"failureReason,omitempty"`
1248
1249
1250
1251
1252
1253
1254
1255 IsAutoSynced bool `json:"isAutoSynced,omitempty"`
1256
1257
1258 IsCC bool `json:"isCC,omitempty"`
1259
1260
1261
1262 IsDraft bool `json:"isDraft,omitempty"`
1263
1264
1265
1266 IsEasyReader bool `json:"isEasyReader,omitempty"`
1267
1268
1269 IsLarge bool `json:"isLarge,omitempty"`
1270
1271
1272 Language string `json:"language,omitempty"`
1273
1274 LastUpdated string `json:"lastUpdated,omitempty"`
1275
1276
1277 Name string `json:"name,omitempty"`
1278
1279
1280
1281
1282
1283
1284 Status string `json:"status,omitempty"`
1285
1286
1287
1288
1289
1290
1291 TrackKind string `json:"trackKind,omitempty"`
1292
1293
1294 VideoId string `json:"videoId,omitempty"`
1295
1296
1297
1298
1299
1300 ForceSendFields []string `json:"-"`
1301
1302
1303
1304
1305 NullFields []string `json:"-"`
1306 }
1307
1308 func (s *CaptionSnippet) MarshalJSON() ([]byte, error) {
1309 type NoMethod CaptionSnippet
1310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1311 }
1312
1313
1314 type CdnSettings struct {
1315
1316 Format string `json:"format,omitempty"`
1317
1318
1319
1320
1321
1322
1323 FrameRate string `json:"frameRate,omitempty"`
1324
1325
1326 IngestionInfo *IngestionInfo `json:"ingestionInfo,omitempty"`
1327
1328
1329
1330
1331
1332
1333
1334 IngestionType string `json:"ingestionType,omitempty"`
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346 Resolution string `json:"resolution,omitempty"`
1347
1348
1349
1350
1351
1352 ForceSendFields []string `json:"-"`
1353
1354
1355
1356
1357 NullFields []string `json:"-"`
1358 }
1359
1360 func (s *CdnSettings) MarshalJSON() ([]byte, error) {
1361 type NoMethod CdnSettings
1362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1363 }
1364
1365
1366 type Channel struct {
1367
1368
1369 AuditDetails *ChannelAuditDetails `json:"auditDetails,omitempty"`
1370
1371
1372 BrandingSettings *ChannelBrandingSettings `json:"brandingSettings,omitempty"`
1373
1374
1375 ContentDetails *ChannelContentDetails `json:"contentDetails,omitempty"`
1376
1377
1378 ContentOwnerDetails *ChannelContentOwnerDetails `json:"contentOwnerDetails,omitempty"`
1379
1380
1381 ConversionPings *ChannelConversionPings `json:"conversionPings,omitempty"`
1382
1383 Etag string `json:"etag,omitempty"`
1384
1385 Id string `json:"id,omitempty"`
1386
1387
1388 Kind string `json:"kind,omitempty"`
1389
1390 Localizations map[string]ChannelLocalization `json:"localizations,omitempty"`
1391
1392
1393 Snippet *ChannelSnippet `json:"snippet,omitempty"`
1394
1395 Statistics *ChannelStatistics `json:"statistics,omitempty"`
1396
1397
1398 Status *ChannelStatus `json:"status,omitempty"`
1399
1400
1401 TopicDetails *ChannelTopicDetails `json:"topicDetails,omitempty"`
1402
1403
1404 googleapi.ServerResponse `json:"-"`
1405
1406
1407
1408
1409
1410 ForceSendFields []string `json:"-"`
1411
1412
1413
1414
1415 NullFields []string `json:"-"`
1416 }
1417
1418 func (s *Channel) MarshalJSON() ([]byte, error) {
1419 type NoMethod Channel
1420 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1421 }
1422
1423
1424
1425 type ChannelAuditDetails struct {
1426
1427
1428 CommunityGuidelinesGoodStanding bool `json:"communityGuidelinesGoodStanding,omitempty"`
1429
1430
1431 ContentIdClaimsGoodStanding bool `json:"contentIdClaimsGoodStanding,omitempty"`
1432
1433
1434 CopyrightStrikesGoodStanding bool `json:"copyrightStrikesGoodStanding,omitempty"`
1435
1436
1437
1438
1439
1440
1441 ForceSendFields []string `json:"-"`
1442
1443
1444
1445
1446 NullFields []string `json:"-"`
1447 }
1448
1449 func (s *ChannelAuditDetails) MarshalJSON() ([]byte, error) {
1450 type NoMethod ChannelAuditDetails
1451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1452 }
1453
1454
1455
1456 type ChannelBannerResource struct {
1457 Etag string `json:"etag,omitempty"`
1458
1459
1460 Kind string `json:"kind,omitempty"`
1461
1462 Url string `json:"url,omitempty"`
1463
1464
1465 googleapi.ServerResponse `json:"-"`
1466
1467
1468
1469
1470
1471 ForceSendFields []string `json:"-"`
1472
1473
1474
1475
1476 NullFields []string `json:"-"`
1477 }
1478
1479 func (s *ChannelBannerResource) MarshalJSON() ([]byte, error) {
1480 type NoMethod ChannelBannerResource
1481 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1482 }
1483
1484
1485 type ChannelBrandingSettings struct {
1486
1487 Channel *ChannelSettings `json:"channel,omitempty"`
1488
1489 Hints []*PropertyValue `json:"hints,omitempty"`
1490
1491 Image *ImageSettings `json:"image,omitempty"`
1492
1493 Watch *WatchSettings `json:"watch,omitempty"`
1494
1495
1496
1497
1498
1499 ForceSendFields []string `json:"-"`
1500
1501
1502
1503
1504 NullFields []string `json:"-"`
1505 }
1506
1507 func (s *ChannelBrandingSettings) MarshalJSON() ([]byte, error) {
1508 type NoMethod ChannelBrandingSettings
1509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1510 }
1511
1512
1513 type ChannelContentDetails struct {
1514 RelatedPlaylists *ChannelContentDetailsRelatedPlaylists `json:"relatedPlaylists,omitempty"`
1515
1516
1517
1518
1519
1520 ForceSendFields []string `json:"-"`
1521
1522
1523
1524
1525 NullFields []string `json:"-"`
1526 }
1527
1528 func (s *ChannelContentDetails) MarshalJSON() ([]byte, error) {
1529 type NoMethod ChannelContentDetails
1530 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1531 }
1532
1533 type ChannelContentDetailsRelatedPlaylists struct {
1534
1535
1536
1537 Favorites string `json:"favorites,omitempty"`
1538
1539
1540
1541 Likes string `json:"likes,omitempty"`
1542
1543
1544
1545 Uploads string `json:"uploads,omitempty"`
1546
1547
1548
1549 WatchHistory string `json:"watchHistory,omitempty"`
1550
1551
1552
1553 WatchLater string `json:"watchLater,omitempty"`
1554
1555
1556
1557
1558
1559 ForceSendFields []string `json:"-"`
1560
1561
1562
1563
1564 NullFields []string `json:"-"`
1565 }
1566
1567 func (s *ChannelContentDetailsRelatedPlaylists) MarshalJSON() ([]byte, error) {
1568 type NoMethod ChannelContentDetailsRelatedPlaylists
1569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1570 }
1571
1572
1573
1574 type ChannelContentOwnerDetails struct {
1575
1576 ContentOwner string `json:"contentOwner,omitempty"`
1577
1578
1579 TimeLinked string `json:"timeLinked,omitempty"`
1580
1581
1582
1583
1584
1585 ForceSendFields []string `json:"-"`
1586
1587
1588
1589
1590 NullFields []string `json:"-"`
1591 }
1592
1593 func (s *ChannelContentOwnerDetails) MarshalJSON() ([]byte, error) {
1594 type NoMethod ChannelContentOwnerDetails
1595 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1596 }
1597
1598
1599
1600
1601 type ChannelConversionPing struct {
1602
1603
1604
1605
1606
1607
1608 Context string `json:"context,omitempty"`
1609
1610
1611
1612
1613
1614
1615
1616 ConversionUrl string `json:"conversionUrl,omitempty"`
1617
1618
1619
1620
1621
1622 ForceSendFields []string `json:"-"`
1623
1624
1625
1626
1627 NullFields []string `json:"-"`
1628 }
1629
1630 func (s *ChannelConversionPing) MarshalJSON() ([]byte, error) {
1631 type NoMethod ChannelConversionPing
1632 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1633 }
1634
1635
1636
1637 type ChannelConversionPings struct {
1638
1639
1640
1641 Pings []*ChannelConversionPing `json:"pings,omitempty"`
1642
1643
1644
1645
1646
1647 ForceSendFields []string `json:"-"`
1648
1649
1650
1651
1652 NullFields []string `json:"-"`
1653 }
1654
1655 func (s *ChannelConversionPings) MarshalJSON() ([]byte, error) {
1656 type NoMethod ChannelConversionPings
1657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1658 }
1659
1660 type ChannelListResponse struct {
1661
1662 Etag string `json:"etag,omitempty"`
1663
1664 EventId string `json:"eventId,omitempty"`
1665 Items []*Channel `json:"items,omitempty"`
1666
1667
1668 Kind string `json:"kind,omitempty"`
1669
1670
1671 NextPageToken string `json:"nextPageToken,omitempty"`
1672
1673 PageInfo *PageInfo `json:"pageInfo,omitempty"`
1674
1675
1676 PrevPageToken string `json:"prevPageToken,omitempty"`
1677 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
1678
1679 VisitorId string `json:"visitorId,omitempty"`
1680
1681
1682 googleapi.ServerResponse `json:"-"`
1683
1684
1685
1686
1687
1688 ForceSendFields []string `json:"-"`
1689
1690
1691
1692
1693 NullFields []string `json:"-"`
1694 }
1695
1696 func (s *ChannelListResponse) MarshalJSON() ([]byte, error) {
1697 type NoMethod ChannelListResponse
1698 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1699 }
1700
1701
1702 type ChannelLocalization struct {
1703
1704 Description string `json:"description,omitempty"`
1705
1706 Title string `json:"title,omitempty"`
1707
1708
1709
1710
1711
1712 ForceSendFields []string `json:"-"`
1713
1714
1715
1716
1717 NullFields []string `json:"-"`
1718 }
1719
1720 func (s *ChannelLocalization) MarshalJSON() ([]byte, error) {
1721 type NoMethod ChannelLocalization
1722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1723 }
1724
1725 type ChannelProfileDetails struct {
1726
1727 ChannelId string `json:"channelId,omitempty"`
1728
1729 ChannelUrl string `json:"channelUrl,omitempty"`
1730
1731 DisplayName string `json:"displayName,omitempty"`
1732
1733 ProfileImageUrl string `json:"profileImageUrl,omitempty"`
1734
1735
1736
1737
1738
1739 ForceSendFields []string `json:"-"`
1740
1741
1742
1743
1744 NullFields []string `json:"-"`
1745 }
1746
1747 func (s *ChannelProfileDetails) MarshalJSON() ([]byte, error) {
1748 type NoMethod ChannelProfileDetails
1749 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1750 }
1751
1752 type ChannelSection struct {
1753
1754
1755
1756 ContentDetails *ChannelSectionContentDetails `json:"contentDetails,omitempty"`
1757
1758 Etag string `json:"etag,omitempty"`
1759
1760 Id string `json:"id,omitempty"`
1761
1762
1763 Kind string `json:"kind,omitempty"`
1764
1765 Localizations map[string]ChannelSectionLocalization `json:"localizations,omitempty"`
1766
1767
1768 Snippet *ChannelSectionSnippet `json:"snippet,omitempty"`
1769
1770
1771 Targeting *ChannelSectionTargeting `json:"targeting,omitempty"`
1772
1773
1774 googleapi.ServerResponse `json:"-"`
1775
1776
1777
1778
1779
1780 ForceSendFields []string `json:"-"`
1781
1782
1783
1784
1785 NullFields []string `json:"-"`
1786 }
1787
1788 func (s *ChannelSection) MarshalJSON() ([]byte, error) {
1789 type NoMethod ChannelSection
1790 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1791 }
1792
1793
1794
1795 type ChannelSectionContentDetails struct {
1796
1797 Channels []string `json:"channels,omitempty"`
1798
1799
1800 Playlists []string `json:"playlists,omitempty"`
1801
1802
1803
1804
1805
1806 ForceSendFields []string `json:"-"`
1807
1808
1809
1810
1811 NullFields []string `json:"-"`
1812 }
1813
1814 func (s *ChannelSectionContentDetails) MarshalJSON() ([]byte, error) {
1815 type NoMethod ChannelSectionContentDetails
1816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1817 }
1818
1819 type ChannelSectionListResponse struct {
1820
1821 Etag string `json:"etag,omitempty"`
1822
1823 EventId string `json:"eventId,omitempty"`
1824
1825 Items []*ChannelSection `json:"items,omitempty"`
1826
1827
1828 Kind string `json:"kind,omitempty"`
1829
1830 VisitorId string `json:"visitorId,omitempty"`
1831
1832
1833 googleapi.ServerResponse `json:"-"`
1834
1835
1836
1837
1838
1839 ForceSendFields []string `json:"-"`
1840
1841
1842
1843
1844 NullFields []string `json:"-"`
1845 }
1846
1847 func (s *ChannelSectionListResponse) MarshalJSON() ([]byte, error) {
1848 type NoMethod ChannelSectionListResponse
1849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1850 }
1851
1852
1853 type ChannelSectionLocalization struct {
1854
1855 Title string `json:"title,omitempty"`
1856
1857
1858
1859
1860
1861 ForceSendFields []string `json:"-"`
1862
1863
1864
1865
1866 NullFields []string `json:"-"`
1867 }
1868
1869 func (s *ChannelSectionLocalization) MarshalJSON() ([]byte, error) {
1870 type NoMethod ChannelSectionLocalization
1871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1872 }
1873
1874
1875
1876 type ChannelSectionSnippet struct {
1877
1878
1879 ChannelId string `json:"channelId,omitempty"`
1880
1881
1882 DefaultLanguage string `json:"defaultLanguage,omitempty"`
1883
1884 Localized *ChannelSectionLocalization `json:"localized,omitempty"`
1885
1886 Position *int64 `json:"position,omitempty"`
1887
1888
1889
1890
1891
1892
1893 Style string `json:"style,omitempty"`
1894
1895
1896 Title string `json:"title,omitempty"`
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917 Type string `json:"type,omitempty"`
1918
1919
1920
1921
1922
1923 ForceSendFields []string `json:"-"`
1924
1925
1926
1927
1928 NullFields []string `json:"-"`
1929 }
1930
1931 func (s *ChannelSectionSnippet) MarshalJSON() ([]byte, error) {
1932 type NoMethod ChannelSectionSnippet
1933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1934 }
1935
1936
1937 type ChannelSectionTargeting struct {
1938
1939 Countries []string `json:"countries,omitempty"`
1940
1941 Languages []string `json:"languages,omitempty"`
1942
1943 Regions []string `json:"regions,omitempty"`
1944
1945
1946
1947
1948
1949 ForceSendFields []string `json:"-"`
1950
1951
1952
1953
1954 NullFields []string `json:"-"`
1955 }
1956
1957 func (s *ChannelSectionTargeting) MarshalJSON() ([]byte, error) {
1958 type NoMethod ChannelSectionTargeting
1959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1960 }
1961
1962
1963 type ChannelSettings struct {
1964
1965 Country string `json:"country,omitempty"`
1966 DefaultLanguage string `json:"defaultLanguage,omitempty"`
1967
1968 DefaultTab string `json:"defaultTab,omitempty"`
1969
1970 Description string `json:"description,omitempty"`
1971
1972 FeaturedChannelsTitle string `json:"featuredChannelsTitle,omitempty"`
1973
1974 FeaturedChannelsUrls []string `json:"featuredChannelsUrls,omitempty"`
1975
1976 Keywords string `json:"keywords,omitempty"`
1977
1978
1979 ModerateComments bool `json:"moderateComments,omitempty"`
1980
1981 ProfileColor string `json:"profileColor,omitempty"`
1982
1983 ShowBrowseView bool `json:"showBrowseView,omitempty"`
1984
1985 ShowRelatedChannels bool `json:"showRelatedChannels,omitempty"`
1986
1987 Title string `json:"title,omitempty"`
1988
1989
1990 TrackingAnalyticsAccountId string `json:"trackingAnalyticsAccountId,omitempty"`
1991
1992
1993 UnsubscribedTrailer string `json:"unsubscribedTrailer,omitempty"`
1994
1995
1996
1997
1998
1999 ForceSendFields []string `json:"-"`
2000
2001
2002
2003
2004 NullFields []string `json:"-"`
2005 }
2006
2007 func (s *ChannelSettings) MarshalJSON() ([]byte, error) {
2008 type NoMethod ChannelSettings
2009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2010 }
2011
2012
2013
2014 type ChannelSnippet struct {
2015
2016 Country string `json:"country,omitempty"`
2017
2018 CustomUrl string `json:"customUrl,omitempty"`
2019
2020
2021 DefaultLanguage string `json:"defaultLanguage,omitempty"`
2022
2023 Description string `json:"description,omitempty"`
2024
2025 Localized *ChannelLocalization `json:"localized,omitempty"`
2026
2027 PublishedAt string `json:"publishedAt,omitempty"`
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
2041
2042 Title string `json:"title,omitempty"`
2043
2044
2045
2046
2047
2048 ForceSendFields []string `json:"-"`
2049
2050
2051
2052
2053 NullFields []string `json:"-"`
2054 }
2055
2056 func (s *ChannelSnippet) MarshalJSON() ([]byte, error) {
2057 type NoMethod ChannelSnippet
2058 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2059 }
2060
2061
2062
2063 type ChannelStatistics struct {
2064
2065 CommentCount uint64 `json:"commentCount,omitempty,string"`
2066
2067
2068 HiddenSubscriberCount bool `json:"hiddenSubscriberCount,omitempty"`
2069
2070 SubscriberCount uint64 `json:"subscriberCount,omitempty,string"`
2071
2072 VideoCount uint64 `json:"videoCount,omitempty,string"`
2073
2074 ViewCount uint64 `json:"viewCount,omitempty,string"`
2075
2076
2077
2078
2079
2080 ForceSendFields []string `json:"-"`
2081
2082
2083
2084
2085 NullFields []string `json:"-"`
2086 }
2087
2088 func (s *ChannelStatistics) MarshalJSON() ([]byte, error) {
2089 type NoMethod ChannelStatistics
2090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2091 }
2092
2093
2094 type ChannelStatus struct {
2095
2096
2097 IsLinked bool `json:"isLinked,omitempty"`
2098
2099
2100
2101
2102
2103
2104
2105
2106 LongUploadsStatus string `json:"longUploadsStatus,omitempty"`
2107 MadeForKids bool `json:"madeForKids,omitempty"`
2108
2109
2110
2111
2112
2113
2114 PrivacyStatus string `json:"privacyStatus,omitempty"`
2115 SelfDeclaredMadeForKids bool `json:"selfDeclaredMadeForKids,omitempty"`
2116
2117
2118
2119
2120
2121 ForceSendFields []string `json:"-"`
2122
2123
2124
2125
2126 NullFields []string `json:"-"`
2127 }
2128
2129 func (s *ChannelStatus) MarshalJSON() ([]byte, error) {
2130 type NoMethod ChannelStatus
2131 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2132 }
2133
2134
2135
2136 type ChannelToStoreLinkDetails struct {
2137
2138 BillingDetails *ChannelToStoreLinkDetailsBillingDetails `json:"billingDetails,omitempty"`
2139
2140 MerchantId uint64 `json:"merchantId,omitempty,string"`
2141
2142 StoreName string `json:"storeName,omitempty"`
2143
2144 StoreUrl string `json:"storeUrl,omitempty"`
2145
2146
2147
2148
2149
2150 ForceSendFields []string `json:"-"`
2151
2152
2153
2154
2155 NullFields []string `json:"-"`
2156 }
2157
2158 func (s *ChannelToStoreLinkDetails) MarshalJSON() ([]byte, error) {
2159 type NoMethod ChannelToStoreLinkDetails
2160 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2161 }
2162
2163
2164 type ChannelToStoreLinkDetailsBillingDetails struct {
2165
2166
2167
2168
2169
2170
2171
2172 BillingStatus string `json:"billingStatus,omitempty"`
2173
2174
2175
2176
2177
2178 ForceSendFields []string `json:"-"`
2179
2180
2181
2182
2183 NullFields []string `json:"-"`
2184 }
2185
2186 func (s *ChannelToStoreLinkDetailsBillingDetails) MarshalJSON() ([]byte, error) {
2187 type NoMethod ChannelToStoreLinkDetailsBillingDetails
2188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2189 }
2190
2191
2192 type ChannelTopicDetails struct {
2193
2194
2195 TopicCategories []string `json:"topicCategories,omitempty"`
2196
2197
2198 TopicIds []string `json:"topicIds,omitempty"`
2199
2200
2201
2202
2203
2204 ForceSendFields []string `json:"-"`
2205
2206
2207
2208
2209 NullFields []string `json:"-"`
2210 }
2211
2212 func (s *ChannelTopicDetails) MarshalJSON() ([]byte, error) {
2213 type NoMethod ChannelTopicDetails
2214 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2215 }
2216
2217
2218 type Comment struct {
2219
2220 Etag string `json:"etag,omitempty"`
2221
2222 Id string `json:"id,omitempty"`
2223
2224
2225 Kind string `json:"kind,omitempty"`
2226
2227 Snippet *CommentSnippet `json:"snippet,omitempty"`
2228
2229
2230 googleapi.ServerResponse `json:"-"`
2231
2232
2233
2234
2235
2236 ForceSendFields []string `json:"-"`
2237
2238
2239
2240
2241 NullFields []string `json:"-"`
2242 }
2243
2244 func (s *Comment) MarshalJSON() ([]byte, error) {
2245 type NoMethod Comment
2246 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2247 }
2248
2249 type CommentListResponse struct {
2250
2251 Etag string `json:"etag,omitempty"`
2252
2253 EventId string `json:"eventId,omitempty"`
2254
2255 Items []*Comment `json:"items,omitempty"`
2256
2257
2258 Kind string `json:"kind,omitempty"`
2259
2260
2261 NextPageToken string `json:"nextPageToken,omitempty"`
2262
2263 PageInfo *PageInfo `json:"pageInfo,omitempty"`
2264 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
2265
2266 VisitorId string `json:"visitorId,omitempty"`
2267
2268
2269 googleapi.ServerResponse `json:"-"`
2270
2271
2272
2273
2274
2275 ForceSendFields []string `json:"-"`
2276
2277
2278
2279
2280 NullFields []string `json:"-"`
2281 }
2282
2283 func (s *CommentListResponse) MarshalJSON() ([]byte, error) {
2284 type NoMethod CommentListResponse
2285 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2286 }
2287
2288
2289 type CommentSnippet struct {
2290 AuthorChannelId *CommentSnippetAuthorChannelId `json:"authorChannelId,omitempty"`
2291
2292 AuthorChannelUrl string `json:"authorChannelUrl,omitempty"`
2293
2294 AuthorDisplayName string `json:"authorDisplayName,omitempty"`
2295
2296
2297 AuthorProfileImageUrl string `json:"authorProfileImageUrl,omitempty"`
2298
2299 CanRate bool `json:"canRate,omitempty"`
2300
2301
2302
2303 ChannelId string `json:"channelId,omitempty"`
2304
2305 LikeCount int64 `json:"likeCount,omitempty"`
2306
2307
2308
2309
2310
2311
2312
2313
2314 ModerationStatus string `json:"moderationStatus,omitempty"`
2315
2316 ParentId string `json:"parentId,omitempty"`
2317
2318 PublishedAt string `json:"publishedAt,omitempty"`
2319
2320
2321
2322
2323 TextDisplay string `json:"textDisplay,omitempty"`
2324
2325
2326
2327 TextOriginal string `json:"textOriginal,omitempty"`
2328
2329 UpdatedAt string `json:"updatedAt,omitempty"`
2330
2331 VideoId string `json:"videoId,omitempty"`
2332
2333
2334
2335
2336
2337
2338
2339
2340 ViewerRating string `json:"viewerRating,omitempty"`
2341
2342
2343
2344
2345
2346 ForceSendFields []string `json:"-"`
2347
2348
2349
2350
2351 NullFields []string `json:"-"`
2352 }
2353
2354 func (s *CommentSnippet) MarshalJSON() ([]byte, error) {
2355 type NoMethod CommentSnippet
2356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2357 }
2358
2359
2360
2361 type CommentSnippetAuthorChannelId struct {
2362 Value string `json:"value,omitempty"`
2363
2364
2365
2366
2367
2368 ForceSendFields []string `json:"-"`
2369
2370
2371
2372
2373 NullFields []string `json:"-"`
2374 }
2375
2376 func (s *CommentSnippetAuthorChannelId) MarshalJSON() ([]byte, error) {
2377 type NoMethod CommentSnippetAuthorChannelId
2378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2379 }
2380
2381
2382
2383
2384 type CommentThread struct {
2385
2386 Etag string `json:"etag,omitempty"`
2387
2388 Id string `json:"id,omitempty"`
2389
2390
2391 Kind string `json:"kind,omitempty"`
2392
2393
2394 Replies *CommentThreadReplies `json:"replies,omitempty"`
2395
2396
2397 Snippet *CommentThreadSnippet `json:"snippet,omitempty"`
2398
2399
2400 googleapi.ServerResponse `json:"-"`
2401
2402
2403
2404
2405
2406 ForceSendFields []string `json:"-"`
2407
2408
2409
2410
2411 NullFields []string `json:"-"`
2412 }
2413
2414 func (s *CommentThread) MarshalJSON() ([]byte, error) {
2415 type NoMethod CommentThread
2416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2417 }
2418
2419 type CommentThreadListResponse struct {
2420
2421 Etag string `json:"etag,omitempty"`
2422
2423 EventId string `json:"eventId,omitempty"`
2424
2425 Items []*CommentThread `json:"items,omitempty"`
2426
2427
2428 Kind string `json:"kind,omitempty"`
2429
2430
2431 NextPageToken string `json:"nextPageToken,omitempty"`
2432
2433 PageInfo *PageInfo `json:"pageInfo,omitempty"`
2434 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
2435
2436 VisitorId string `json:"visitorId,omitempty"`
2437
2438
2439 googleapi.ServerResponse `json:"-"`
2440
2441
2442
2443
2444
2445 ForceSendFields []string `json:"-"`
2446
2447
2448
2449
2450 NullFields []string `json:"-"`
2451 }
2452
2453 func (s *CommentThreadListResponse) MarshalJSON() ([]byte, error) {
2454 type NoMethod CommentThreadListResponse
2455 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2456 }
2457
2458
2459
2460 type CommentThreadReplies struct {
2461
2462
2463
2464 Comments []*Comment `json:"comments,omitempty"`
2465
2466
2467
2468
2469
2470 ForceSendFields []string `json:"-"`
2471
2472
2473
2474
2475 NullFields []string `json:"-"`
2476 }
2477
2478 func (s *CommentThreadReplies) MarshalJSON() ([]byte, error) {
2479 type NoMethod CommentThreadReplies
2480 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2481 }
2482
2483
2484 type CommentThreadSnippet struct {
2485
2486
2487 CanReply bool `json:"canReply,omitempty"`
2488
2489
2490
2491 ChannelId string `json:"channelId,omitempty"`
2492
2493
2494 IsPublic bool `json:"isPublic,omitempty"`
2495
2496 TopLevelComment *Comment `json:"topLevelComment,omitempty"`
2497
2498
2499 TotalReplyCount int64 `json:"totalReplyCount,omitempty"`
2500
2501
2502 VideoId string `json:"videoId,omitempty"`
2503
2504
2505
2506
2507
2508 ForceSendFields []string `json:"-"`
2509
2510
2511
2512
2513 NullFields []string `json:"-"`
2514 }
2515
2516 func (s *CommentThreadSnippet) MarshalJSON() ([]byte, error) {
2517 type NoMethod CommentThreadSnippet
2518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2519 }
2520
2521
2522
2523 type ContentRating struct {
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544 AcbRating string `json:"acbRating,omitempty"`
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554 AgcomRating string `json:"agcomRating,omitempty"`
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568 AnatelRating string `json:"anatelRating,omitempty"`
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581 BbfcRating string `json:"bbfcRating,omitempty"`
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595 BfvcRating string `json:"bfvcRating,omitempty"`
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609 BmukkRating string `json:"bmukkRating,omitempty"`
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626 CatvRating string `json:"catvRating,omitempty"`
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641 CatvfrRating string `json:"catvfrRating,omitempty"`
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655 CbfcRating string `json:"cbfcRating,omitempty"`
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668 CccRating string `json:"cccRating,omitempty"`
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681 CceRating string `json:"cceRating,omitempty"`
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692 ChfilmRating string `json:"chfilmRating,omitempty"`
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704 ChvrsRating string `json:"chvrsRating,omitempty"`
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714 CicfRating string `json:"cicfRating,omitempty"`
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726 CnaRating string `json:"cnaRating,omitempty"`
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740 CncRating string `json:"cncRating,omitempty"`
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753 CsaRating string `json:"csaRating,omitempty"`
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767 CscfRating string `json:"cscfRating,omitempty"`
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777 CzfilmRating string `json:"czfilmRating,omitempty"`
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806 DjctqRating string `json:"djctqRating,omitempty"`
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826 DjctqRatingReasons []string `json:"djctqRatingReasons,omitempty"`
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841 EcbmctRating string `json:"ecbmctRating,omitempty"`
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855 EefilmRating string `json:"eefilmRating,omitempty"`
2856
2857
2858
2859
2860
2861
2862
2863
2864 EgfilmRating string `json:"egfilmRating,omitempty"`
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875 EirinRating string `json:"eirinRating,omitempty"`
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889 FcbmRating string `json:"fcbmRating,omitempty"`
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901 FcoRating string `json:"fcoRating,omitempty"`
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914 FmocRating string `json:"fmocRating,omitempty"`
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931 FpbRating string `json:"fpbRating,omitempty"`
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948 FpbRatingReasons []string `json:"fpbRatingReasons,omitempty"`
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960 FskRating string `json:"fskRating,omitempty"`
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973 GrfilmRating string `json:"grfilmRating,omitempty"`
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987 IcaaRating string `json:"icaaRating,omitempty"`
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002 IfcoRating string `json:"ifcoRating,omitempty"`
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013 IlfilmRating string `json:"ilfilmRating,omitempty"`
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026 IncaaRating string `json:"incaaRating,omitempty"`
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036 KfcbRating string `json:"kfcbRating,omitempty"`
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049 KijkwijzerRating string `json:"kijkwijzerRating,omitempty"`
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061 KmrbRating string `json:"kmrbRating,omitempty"`
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075 LsfRating string `json:"lsfRating,omitempty"`
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091 MccaaRating string `json:"mccaaRating,omitempty"`
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102 MccypRating string `json:"mccypRating,omitempty"`
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115 McstRating string `json:"mcstRating,omitempty"`
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128 MdaRating string `json:"mdaRating,omitempty"`
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143 MedietilsynetRating string `json:"medietilsynetRating,omitempty"`
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155 MekuRating string `json:"mekuRating,omitempty"`
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169 MenaMpaaRating string `json:"menaMpaaRating,omitempty"`
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183 MibacRating string `json:"mibacRating,omitempty"`
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197 MocRating string `json:"mocRating,omitempty"`
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210 MoctwRating string `json:"moctwRating,omitempty"`
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222 MpaaRating string `json:"mpaaRating,omitempty"`
3223
3224
3225
3226
3227
3228
3229
3230 MpaatRating string `json:"mpaatRating,omitempty"`
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243 MtrcbRating string `json:"mtrcbRating,omitempty"`
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257 NbcRating string `json:"nbcRating,omitempty"`
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268 NbcplRating string `json:"nbcplRating,omitempty"`
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279 NfrcRating string `json:"nfrcRating,omitempty"`
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293 NfvcbRating string `json:"nfvcbRating,omitempty"`
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305 NkclvRating string `json:"nkclvRating,omitempty"`
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319 NmcRating string `json:"nmcRating,omitempty"`
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336 OflcRating string `json:"oflcRating,omitempty"`
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346 PefilmRating string `json:"pefilmRating,omitempty"`
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359 RcnofRating string `json:"rcnofRating,omitempty"`
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370 ResorteviolenciaRating string `json:"resorteviolenciaRating,omitempty"`
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383 RtcRating string `json:"rtcRating,omitempty"`
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393 RteRating string `json:"rteRating,omitempty"`
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405 RussiaRating string `json:"russiaRating,omitempty"`
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415 SkfilmRating string `json:"skfilmRating,omitempty"`
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427 SmaisRating string `json:"smaisRating,omitempty"`
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438 SmsaRating string `json:"smsaRating,omitempty"`
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451 TvpgRating string `json:"tvpgRating,omitempty"`
3452
3453
3454
3455
3456
3457 YtRating string `json:"ytRating,omitempty"`
3458
3459
3460
3461
3462
3463 ForceSendFields []string `json:"-"`
3464
3465
3466
3467
3468 NullFields []string `json:"-"`
3469 }
3470
3471 func (s *ContentRating) MarshalJSON() ([]byte, error) {
3472 type NoMethod ContentRating
3473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3474 }
3475
3476
3477
3478
3479 type Cuepoint struct {
3480
3481
3482
3483 CueType string `json:"cueType,omitempty"`
3484
3485 DurationSecs int64 `json:"durationSecs,omitempty"`
3486 Etag string `json:"etag,omitempty"`
3487
3488 Id string `json:"id,omitempty"`
3489
3490
3491 InsertionOffsetTimeMs int64 `json:"insertionOffsetTimeMs,omitempty,string"`
3492
3493
3494 WalltimeMs uint64 `json:"walltimeMs,omitempty,string"`
3495
3496
3497 googleapi.ServerResponse `json:"-"`
3498
3499
3500
3501
3502
3503 ForceSendFields []string `json:"-"`
3504
3505
3506
3507
3508 NullFields []string `json:"-"`
3509 }
3510
3511 func (s *Cuepoint) MarshalJSON() ([]byte, error) {
3512 type NoMethod Cuepoint
3513 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3514 }
3515
3516
3517
3518 type CuepointSchedule struct {
3519
3520
3521 Enabled bool `json:"enabled,omitempty"`
3522
3523
3524 PauseAdsUntil string `json:"pauseAdsUntil,omitempty"`
3525
3526
3527 RepeatIntervalSecs int64 `json:"repeatIntervalSecs,omitempty"`
3528
3529
3530
3531
3532
3533
3534
3535
3536 ScheduleStrategy string `json:"scheduleStrategy,omitempty"`
3537
3538
3539
3540
3541
3542 ForceSendFields []string `json:"-"`
3543
3544
3545
3546
3547 NullFields []string `json:"-"`
3548 }
3549
3550 func (s *CuepointSchedule) MarshalJSON() ([]byte, error) {
3551 type NoMethod CuepointSchedule
3552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3553 }
3554
3555 type Entity struct {
3556 Id string `json:"id,omitempty"`
3557 TypeId string `json:"typeId,omitempty"`
3558 Url string `json:"url,omitempty"`
3559
3560
3561
3562
3563
3564 ForceSendFields []string `json:"-"`
3565
3566
3567
3568
3569 NullFields []string `json:"-"`
3570 }
3571
3572 func (s *Entity) MarshalJSON() ([]byte, error) {
3573 type NoMethod Entity
3574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3575 }
3576
3577
3578 type GeoPoint struct {
3579
3580 Altitude float64 `json:"altitude,omitempty"`
3581
3582 Latitude float64 `json:"latitude,omitempty"`
3583
3584 Longitude float64 `json:"longitude,omitempty"`
3585
3586
3587
3588
3589
3590 ForceSendFields []string `json:"-"`
3591
3592
3593
3594
3595 NullFields []string `json:"-"`
3596 }
3597
3598 func (s *GeoPoint) MarshalJSON() ([]byte, error) {
3599 type NoMethod GeoPoint
3600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3601 }
3602
3603 func (s *GeoPoint) UnmarshalJSON(data []byte) error {
3604 type NoMethod GeoPoint
3605 var s1 struct {
3606 Altitude gensupport.JSONFloat64 `json:"altitude"`
3607 Latitude gensupport.JSONFloat64 `json:"latitude"`
3608 Longitude gensupport.JSONFloat64 `json:"longitude"`
3609 *NoMethod
3610 }
3611 s1.NoMethod = (*NoMethod)(s)
3612 if err := json.Unmarshal(data, &s1); err != nil {
3613 return err
3614 }
3615 s.Altitude = float64(s1.Altitude)
3616 s.Latitude = float64(s1.Latitude)
3617 s.Longitude = float64(s1.Longitude)
3618 return nil
3619 }
3620
3621
3622
3623 type I18nLanguage struct {
3624
3625 Etag string `json:"etag,omitempty"`
3626
3627 Id string `json:"id,omitempty"`
3628
3629
3630 Kind string `json:"kind,omitempty"`
3631
3632
3633 Snippet *I18nLanguageSnippet `json:"snippet,omitempty"`
3634
3635
3636
3637
3638
3639 ForceSendFields []string `json:"-"`
3640
3641
3642
3643
3644 NullFields []string `json:"-"`
3645 }
3646
3647 func (s *I18nLanguage) MarshalJSON() ([]byte, error) {
3648 type NoMethod I18nLanguage
3649 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3650 }
3651
3652 type I18nLanguageListResponse struct {
3653
3654 Etag string `json:"etag,omitempty"`
3655
3656 EventId string `json:"eventId,omitempty"`
3657
3658
3659 Items []*I18nLanguage `json:"items,omitempty"`
3660
3661
3662 Kind string `json:"kind,omitempty"`
3663
3664 VisitorId string `json:"visitorId,omitempty"`
3665
3666
3667 googleapi.ServerResponse `json:"-"`
3668
3669
3670
3671
3672
3673 ForceSendFields []string `json:"-"`
3674
3675
3676
3677
3678 NullFields []string `json:"-"`
3679 }
3680
3681 func (s *I18nLanguageListResponse) MarshalJSON() ([]byte, error) {
3682 type NoMethod I18nLanguageListResponse
3683 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3684 }
3685
3686
3687
3688 type I18nLanguageSnippet struct {
3689
3690 Hl string `json:"hl,omitempty"`
3691
3692 Name string `json:"name,omitempty"`
3693
3694
3695
3696
3697
3698 ForceSendFields []string `json:"-"`
3699
3700
3701
3702
3703 NullFields []string `json:"-"`
3704 }
3705
3706 func (s *I18nLanguageSnippet) MarshalJSON() ([]byte, error) {
3707 type NoMethod I18nLanguageSnippet
3708 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3709 }
3710
3711
3712
3713 type I18nRegion struct {
3714
3715 Etag string `json:"etag,omitempty"`
3716
3717 Id string `json:"id,omitempty"`
3718
3719
3720 Kind string `json:"kind,omitempty"`
3721
3722
3723 Snippet *I18nRegionSnippet `json:"snippet,omitempty"`
3724
3725
3726
3727
3728
3729 ForceSendFields []string `json:"-"`
3730
3731
3732
3733
3734 NullFields []string `json:"-"`
3735 }
3736
3737 func (s *I18nRegion) MarshalJSON() ([]byte, error) {
3738 type NoMethod I18nRegion
3739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3740 }
3741
3742 type I18nRegionListResponse struct {
3743
3744 Etag string `json:"etag,omitempty"`
3745
3746 EventId string `json:"eventId,omitempty"`
3747
3748
3749
3750 Items []*I18nRegion `json:"items,omitempty"`
3751
3752
3753 Kind string `json:"kind,omitempty"`
3754
3755 VisitorId string `json:"visitorId,omitempty"`
3756
3757
3758 googleapi.ServerResponse `json:"-"`
3759
3760
3761
3762
3763
3764 ForceSendFields []string `json:"-"`
3765
3766
3767
3768
3769 NullFields []string `json:"-"`
3770 }
3771
3772 func (s *I18nRegionListResponse) MarshalJSON() ([]byte, error) {
3773 type NoMethod I18nRegionListResponse
3774 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3775 }
3776
3777
3778
3779 type I18nRegionSnippet struct {
3780
3781 Gl string `json:"gl,omitempty"`
3782
3783 Name string `json:"name,omitempty"`
3784
3785
3786
3787
3788
3789 ForceSendFields []string `json:"-"`
3790
3791
3792
3793
3794 NullFields []string `json:"-"`
3795 }
3796
3797 func (s *I18nRegionSnippet) MarshalJSON() ([]byte, error) {
3798 type NoMethod I18nRegionSnippet
3799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3800 }
3801
3802
3803 type ImageSettings struct {
3804
3805
3806
3807 BackgroundImageUrl *LocalizedProperty `json:"backgroundImageUrl,omitempty"`
3808
3809
3810 BannerExternalUrl string `json:"bannerExternalUrl,omitempty"`
3811
3812 BannerImageUrl string `json:"bannerImageUrl,omitempty"`
3813
3814
3815 BannerMobileExtraHdImageUrl string `json:"bannerMobileExtraHdImageUrl,omitempty"`
3816
3817
3818 BannerMobileHdImageUrl string `json:"bannerMobileHdImageUrl,omitempty"`
3819
3820 BannerMobileImageUrl string `json:"bannerMobileImageUrl,omitempty"`
3821
3822 BannerMobileLowImageUrl string `json:"bannerMobileLowImageUrl,omitempty"`
3823
3824
3825 BannerMobileMediumHdImageUrl string `json:"bannerMobileMediumHdImageUrl,omitempty"`
3826
3827
3828 BannerTabletExtraHdImageUrl string `json:"bannerTabletExtraHdImageUrl,omitempty"`
3829
3830
3831 BannerTabletHdImageUrl string `json:"bannerTabletHdImageUrl,omitempty"`
3832
3833 BannerTabletImageUrl string `json:"bannerTabletImageUrl,omitempty"`
3834
3835
3836 BannerTabletLowImageUrl string `json:"bannerTabletLowImageUrl,omitempty"`
3837
3838 BannerTvHighImageUrl string `json:"bannerTvHighImageUrl,omitempty"`
3839
3840 BannerTvImageUrl string `json:"bannerTvImageUrl,omitempty"`
3841
3842 BannerTvLowImageUrl string `json:"bannerTvLowImageUrl,omitempty"`
3843
3844 BannerTvMediumImageUrl string `json:"bannerTvMediumImageUrl,omitempty"`
3845
3846
3847 LargeBrandedBannerImageImapScript *LocalizedProperty `json:"largeBrandedBannerImageImapScript,omitempty"`
3848
3849
3850 LargeBrandedBannerImageUrl *LocalizedProperty `json:"largeBrandedBannerImageUrl,omitempty"`
3851
3852
3853 SmallBrandedBannerImageImapScript *LocalizedProperty `json:"smallBrandedBannerImageImapScript,omitempty"`
3854
3855
3856
3857
3858
3859 SmallBrandedBannerImageUrl *LocalizedProperty `json:"smallBrandedBannerImageUrl,omitempty"`
3860
3861
3862 TrackingImageUrl string `json:"trackingImageUrl,omitempty"`
3863 WatchIconImageUrl string `json:"watchIconImageUrl,omitempty"`
3864
3865
3866
3867
3868
3869 ForceSendFields []string `json:"-"`
3870
3871
3872
3873
3874 NullFields []string `json:"-"`
3875 }
3876
3877 func (s *ImageSettings) MarshalJSON() ([]byte, error) {
3878 type NoMethod ImageSettings
3879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3880 }
3881
3882
3883
3884 type IngestionInfo struct {
3885
3886
3887
3888 BackupIngestionAddress string `json:"backupIngestionAddress,omitempty"`
3889
3890
3891
3892
3893
3894 IngestionAddress string `json:"ingestionAddress,omitempty"`
3895
3896
3897
3898 RtmpsBackupIngestionAddress string `json:"rtmpsBackupIngestionAddress,omitempty"`
3899
3900
3901
3902 RtmpsIngestionAddress string `json:"rtmpsIngestionAddress,omitempty"`
3903
3904 StreamName string `json:"streamName,omitempty"`
3905
3906
3907
3908
3909
3910 ForceSendFields []string `json:"-"`
3911
3912
3913
3914
3915 NullFields []string `json:"-"`
3916 }
3917
3918 func (s *IngestionInfo) MarshalJSON() ([]byte, error) {
3919 type NoMethod IngestionInfo
3920 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3921 }
3922
3923
3924 type InvideoBranding struct {
3925
3926
3927 ImageBytes string `json:"imageBytes,omitempty"`
3928
3929
3930 ImageUrl string `json:"imageUrl,omitempty"`
3931
3932
3933 Position *InvideoPosition `json:"position,omitempty"`
3934
3935
3936 TargetChannelId string `json:"targetChannelId,omitempty"`
3937
3938
3939 Timing *InvideoTiming `json:"timing,omitempty"`
3940
3941
3942
3943
3944
3945 ForceSendFields []string `json:"-"`
3946
3947
3948
3949
3950 NullFields []string `json:"-"`
3951 }
3952
3953 func (s *InvideoBranding) MarshalJSON() ([]byte, error) {
3954 type NoMethod InvideoBranding
3955 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3956 }
3957
3958
3959
3960
3961 type InvideoPosition struct {
3962
3963
3964
3965
3966
3967
3968
3969
3970 CornerPosition string `json:"cornerPosition,omitempty"`
3971
3972
3973
3974
3975 Type string `json:"type,omitempty"`
3976
3977
3978
3979
3980
3981 ForceSendFields []string `json:"-"`
3982
3983
3984
3985
3986 NullFields []string `json:"-"`
3987 }
3988
3989 func (s *InvideoPosition) MarshalJSON() ([]byte, error) {
3990 type NoMethod InvideoPosition
3991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3992 }
3993
3994
3995
3996 type InvideoTiming struct {
3997
3998
3999 DurationMs uint64 `json:"durationMs,omitempty,string"`
4000
4001
4002
4003
4004 OffsetMs uint64 `json:"offsetMs,omitempty,string"`
4005
4006
4007
4008
4009
4010
4011
4012
4013 Type string `json:"type,omitempty"`
4014
4015
4016
4017
4018
4019 ForceSendFields []string `json:"-"`
4020
4021
4022
4023
4024 NullFields []string `json:"-"`
4025 }
4026
4027 func (s *InvideoTiming) MarshalJSON() ([]byte, error) {
4028 type NoMethod InvideoTiming
4029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4030 }
4031
4032 type LanguageTag struct {
4033 Value string `json:"value,omitempty"`
4034
4035
4036
4037
4038
4039 ForceSendFields []string `json:"-"`
4040
4041
4042
4043
4044 NullFields []string `json:"-"`
4045 }
4046
4047 func (s *LanguageTag) MarshalJSON() ([]byte, error) {
4048 type NoMethod LanguageTag
4049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4050 }
4051
4052 type LevelDetails struct {
4053
4054 DisplayName string `json:"displayName,omitempty"`
4055
4056
4057
4058
4059
4060 ForceSendFields []string `json:"-"`
4061
4062
4063
4064
4065 NullFields []string `json:"-"`
4066 }
4067
4068 func (s *LevelDetails) MarshalJSON() ([]byte, error) {
4069 type NoMethod LevelDetails
4070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4071 }
4072
4073
4074
4075 type LiveBroadcast struct {
4076
4077
4078
4079
4080 ContentDetails *LiveBroadcastContentDetails `json:"contentDetails,omitempty"`
4081
4082 Etag string `json:"etag,omitempty"`
4083
4084 Id string `json:"id,omitempty"`
4085
4086
4087 Kind string `json:"kind,omitempty"`
4088
4089
4090 MonetizationDetails *LiveBroadcastMonetizationDetails `json:"monetizationDetails,omitempty"`
4091
4092
4093 Snippet *LiveBroadcastSnippet `json:"snippet,omitempty"`
4094
4095
4096
4097
4098 Statistics *LiveBroadcastStatistics `json:"statistics,omitempty"`
4099
4100 Status *LiveBroadcastStatus `json:"status,omitempty"`
4101
4102
4103 googleapi.ServerResponse `json:"-"`
4104
4105
4106
4107
4108
4109 ForceSendFields []string `json:"-"`
4110
4111
4112
4113
4114 NullFields []string `json:"-"`
4115 }
4116
4117 func (s *LiveBroadcast) MarshalJSON() ([]byte, error) {
4118 type NoMethod LiveBroadcast
4119 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4120 }
4121
4122
4123 type LiveBroadcastContentDetails struct {
4124
4125
4126 BoundStreamId string `json:"boundStreamId,omitempty"`
4127
4128
4129 BoundStreamLastUpdateTimeMs string `json:"boundStreamLastUpdateTimeMs,omitempty"`
4130
4131
4132
4133
4134
4135 ClosedCaptionsType string `json:"closedCaptionsType,omitempty"`
4136
4137
4138
4139 EnableAutoStart bool `json:"enableAutoStart,omitempty"`
4140
4141
4142
4143 EnableAutoStop bool `json:"enableAutoStop,omitempty"`
4144
4145
4146
4147
4148
4149 EnableClosedCaptions bool `json:"enableClosedCaptions,omitempty"`
4150
4151
4152 EnableContentEncryption bool `json:"enableContentEncryption,omitempty"`
4153
4154
4155
4156
4157
4158
4159 EnableDvr bool `json:"enableDvr,omitempty"`
4160
4161
4162
4163 EnableEmbed bool `json:"enableEmbed,omitempty"`
4164
4165 EnableLowLatency bool `json:"enableLowLatency,omitempty"`
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179 LatencyPreference string `json:"latencyPreference,omitempty"`
4180
4181
4182
4183
4184
4185 Mesh string `json:"mesh,omitempty"`
4186
4187
4188
4189 MonitorStream *MonitorStreamInfo `json:"monitorStream,omitempty"`
4190
4191
4192
4193
4194
4195
4196
4197
4198 Projection string `json:"projection,omitempty"`
4199
4200
4201
4202
4203
4204
4205
4206 RecordFromStart bool `json:"recordFromStart,omitempty"`
4207
4208
4209
4210
4211
4212
4213 StartWithSlate bool `json:"startWithSlate,omitempty"`
4214
4215
4216
4217
4218
4219
4220
4221 StereoLayout string `json:"stereoLayout,omitempty"`
4222
4223
4224
4225
4226
4227 ForceSendFields []string `json:"-"`
4228
4229
4230
4231
4232 NullFields []string `json:"-"`
4233 }
4234
4235 func (s *LiveBroadcastContentDetails) MarshalJSON() ([]byte, error) {
4236 type NoMethod LiveBroadcastContentDetails
4237 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4238 }
4239
4240 type LiveBroadcastListResponse struct {
4241
4242 Etag string `json:"etag,omitempty"`
4243
4244 EventId string `json:"eventId,omitempty"`
4245
4246 Items []*LiveBroadcast `json:"items,omitempty"`
4247
4248
4249 Kind string `json:"kind,omitempty"`
4250
4251
4252 NextPageToken string `json:"nextPageToken,omitempty"`
4253
4254 PageInfo *PageInfo `json:"pageInfo,omitempty"`
4255
4256
4257 PrevPageToken string `json:"prevPageToken,omitempty"`
4258 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
4259
4260 VisitorId string `json:"visitorId,omitempty"`
4261
4262
4263 googleapi.ServerResponse `json:"-"`
4264
4265
4266
4267
4268
4269 ForceSendFields []string `json:"-"`
4270
4271
4272
4273
4274 NullFields []string `json:"-"`
4275 }
4276
4277 func (s *LiveBroadcastListResponse) MarshalJSON() ([]byte, error) {
4278 type NoMethod LiveBroadcastListResponse
4279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4280 }
4281
4282
4283 type LiveBroadcastMonetizationDetails struct {
4284 CuepointSchedule *CuepointSchedule `json:"cuepointSchedule,omitempty"`
4285
4286
4287
4288
4289
4290 ForceSendFields []string `json:"-"`
4291
4292
4293
4294
4295 NullFields []string `json:"-"`
4296 }
4297
4298 func (s *LiveBroadcastMonetizationDetails) MarshalJSON() ([]byte, error) {
4299 type NoMethod LiveBroadcastMonetizationDetails
4300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4301 }
4302
4303
4304 type LiveBroadcastSnippet struct {
4305
4306
4307 ActualEndTime string `json:"actualEndTime,omitempty"`
4308
4309
4310 ActualStartTime string `json:"actualStartTime,omitempty"`
4311
4312
4313 ChannelId string `json:"channelId,omitempty"`
4314
4315
4316
4317 Description string `json:"description,omitempty"`
4318
4319
4320 IsDefaultBroadcast bool `json:"isDefaultBroadcast,omitempty"`
4321
4322 LiveChatId string `json:"liveChatId,omitempty"`
4323
4324
4325 PublishedAt string `json:"publishedAt,omitempty"`
4326
4327 ScheduledEndTime string `json:"scheduledEndTime,omitempty"`
4328
4329
4330 ScheduledStartTime string `json:"scheduledStartTime,omitempty"`
4331
4332
4333
4334
4335 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
4336
4337
4338
4339 Title string `json:"title,omitempty"`
4340
4341
4342
4343
4344
4345 ForceSendFields []string `json:"-"`
4346
4347
4348
4349
4350 NullFields []string `json:"-"`
4351 }
4352
4353 func (s *LiveBroadcastSnippet) MarshalJSON() ([]byte, error) {
4354 type NoMethod LiveBroadcastSnippet
4355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4356 }
4357
4358
4359
4360
4361 type LiveBroadcastStatistics struct {
4362
4363
4364
4365
4366
4367
4368
4369 ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"`
4370
4371
4372
4373
4374
4375 ForceSendFields []string `json:"-"`
4376
4377
4378
4379
4380 NullFields []string `json:"-"`
4381 }
4382
4383 func (s *LiveBroadcastStatistics) MarshalJSON() ([]byte, error) {
4384 type NoMethod LiveBroadcastStatistics
4385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4386 }
4387
4388
4389 type LiveBroadcastStatus struct {
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403 LifeCycleStatus string `json:"lifeCycleStatus,omitempty"`
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414 LiveBroadcastPriority string `json:"liveBroadcastPriority,omitempty"`
4415
4416
4417 MadeForKids bool `json:"madeForKids,omitempty"`
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428 PrivacyStatus string `json:"privacyStatus,omitempty"`
4429
4430
4431
4432
4433
4434
4435
4436
4437 RecordingStatus string `json:"recordingStatus,omitempty"`
4438
4439
4440 SelfDeclaredMadeForKids bool `json:"selfDeclaredMadeForKids,omitempty"`
4441
4442
4443
4444
4445
4446 ForceSendFields []string `json:"-"`
4447
4448
4449
4450
4451 NullFields []string `json:"-"`
4452 }
4453
4454 func (s *LiveBroadcastStatus) MarshalJSON() ([]byte, error) {
4455 type NoMethod LiveBroadcastStatus
4456 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4457 }
4458
4459
4460
4461 type LiveChatBan struct {
4462
4463 Etag string `json:"etag,omitempty"`
4464
4465 Id string `json:"id,omitempty"`
4466
4467
4468 Kind string `json:"kind,omitempty"`
4469
4470 Snippet *LiveChatBanSnippet `json:"snippet,omitempty"`
4471
4472
4473 googleapi.ServerResponse `json:"-"`
4474
4475
4476
4477
4478
4479 ForceSendFields []string `json:"-"`
4480
4481
4482
4483
4484 NullFields []string `json:"-"`
4485 }
4486
4487 func (s *LiveChatBan) MarshalJSON() ([]byte, error) {
4488 type NoMethod LiveChatBan
4489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4490 }
4491
4492 type LiveChatBanSnippet struct {
4493
4494
4495 BanDurationSeconds uint64 `json:"banDurationSeconds,omitempty,string"`
4496 BannedUserDetails *ChannelProfileDetails `json:"bannedUserDetails,omitempty"`
4497
4498 LiveChatId string `json:"liveChatId,omitempty"`
4499
4500
4501
4502
4503
4504
4505 Type string `json:"type,omitempty"`
4506
4507
4508
4509
4510
4511 ForceSendFields []string `json:"-"`
4512
4513
4514
4515
4516 NullFields []string `json:"-"`
4517 }
4518
4519 func (s *LiveChatBanSnippet) MarshalJSON() ([]byte, error) {
4520 type NoMethod LiveChatBanSnippet
4521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4522 }
4523
4524 type LiveChatFanFundingEventDetails struct {
4525
4526
4527 AmountDisplayString string `json:"amountDisplayString,omitempty"`
4528
4529 AmountMicros uint64 `json:"amountMicros,omitempty,string"`
4530
4531 Currency string `json:"currency,omitempty"`
4532
4533 UserComment string `json:"userComment,omitempty"`
4534
4535
4536
4537
4538
4539 ForceSendFields []string `json:"-"`
4540
4541
4542
4543
4544 NullFields []string `json:"-"`
4545 }
4546
4547 func (s *LiveChatFanFundingEventDetails) MarshalJSON() ([]byte, error) {
4548 type NoMethod LiveChatFanFundingEventDetails
4549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4550 }
4551
4552 type LiveChatGiftMembershipReceivedDetails struct {
4553
4554
4555
4556 AssociatedMembershipGiftingMessageId string `json:"associatedMembershipGiftingMessageId,omitempty"`
4557
4558
4559
4560 GifterChannelId string `json:"gifterChannelId,omitempty"`
4561
4562
4563
4564
4565
4566 MemberLevelName string `json:"memberLevelName,omitempty"`
4567
4568
4569
4570
4571
4572
4573 ForceSendFields []string `json:"-"`
4574
4575
4576
4577
4578
4579 NullFields []string `json:"-"`
4580 }
4581
4582 func (s *LiveChatGiftMembershipReceivedDetails) MarshalJSON() ([]byte, error) {
4583 type NoMethod LiveChatGiftMembershipReceivedDetails
4584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4585 }
4586
4587 type LiveChatMemberMilestoneChatDetails struct {
4588
4589
4590
4591 MemberLevelName string `json:"memberLevelName,omitempty"`
4592
4593
4594
4595 MemberMonth int64 `json:"memberMonth,omitempty"`
4596
4597
4598 UserComment string `json:"userComment,omitempty"`
4599
4600
4601
4602
4603
4604 ForceSendFields []string `json:"-"`
4605
4606
4607
4608
4609 NullFields []string `json:"-"`
4610 }
4611
4612 func (s *LiveChatMemberMilestoneChatDetails) MarshalJSON() ([]byte, error) {
4613 type NoMethod LiveChatMemberMilestoneChatDetails
4614 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4615 }
4616
4617 type LiveChatMembershipGiftingDetails struct {
4618
4619 GiftMembershipsCount int64 `json:"giftMembershipsCount,omitempty"`
4620
4621
4622
4623 GiftMembershipsLevelName string `json:"giftMembershipsLevelName,omitempty"`
4624
4625
4626
4627
4628
4629 ForceSendFields []string `json:"-"`
4630
4631
4632
4633
4634 NullFields []string `json:"-"`
4635 }
4636
4637 func (s *LiveChatMembershipGiftingDetails) MarshalJSON() ([]byte, error) {
4638 type NoMethod LiveChatMembershipGiftingDetails
4639 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4640 }
4641
4642
4643
4644 type LiveChatMessage struct {
4645
4646
4647 AuthorDetails *LiveChatMessageAuthorDetails `json:"authorDetails,omitempty"`
4648
4649 Etag string `json:"etag,omitempty"`
4650
4651 Id string `json:"id,omitempty"`
4652
4653
4654 Kind string `json:"kind,omitempty"`
4655
4656 Snippet *LiveChatMessageSnippet `json:"snippet,omitempty"`
4657
4658
4659 googleapi.ServerResponse `json:"-"`
4660
4661
4662
4663
4664
4665 ForceSendFields []string `json:"-"`
4666
4667
4668
4669
4670 NullFields []string `json:"-"`
4671 }
4672
4673 func (s *LiveChatMessage) MarshalJSON() ([]byte, error) {
4674 type NoMethod LiveChatMessage
4675 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4676 }
4677
4678 type LiveChatMessageAuthorDetails struct {
4679
4680 ChannelId string `json:"channelId,omitempty"`
4681
4682 ChannelUrl string `json:"channelUrl,omitempty"`
4683
4684 DisplayName string `json:"displayName,omitempty"`
4685
4686 IsChatModerator bool `json:"isChatModerator,omitempty"`
4687
4688 IsChatOwner bool `json:"isChatOwner,omitempty"`
4689
4690 IsChatSponsor bool `json:"isChatSponsor,omitempty"`
4691
4692 IsVerified bool `json:"isVerified,omitempty"`
4693
4694 ProfileImageUrl string `json:"profileImageUrl,omitempty"`
4695
4696
4697
4698
4699
4700 ForceSendFields []string `json:"-"`
4701
4702
4703
4704
4705 NullFields []string `json:"-"`
4706 }
4707
4708 func (s *LiveChatMessageAuthorDetails) MarshalJSON() ([]byte, error) {
4709 type NoMethod LiveChatMessageAuthorDetails
4710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4711 }
4712
4713 type LiveChatMessageDeletedDetails struct {
4714 DeletedMessageId string `json:"deletedMessageId,omitempty"`
4715
4716
4717
4718
4719
4720 ForceSendFields []string `json:"-"`
4721
4722
4723
4724
4725 NullFields []string `json:"-"`
4726 }
4727
4728 func (s *LiveChatMessageDeletedDetails) MarshalJSON() ([]byte, error) {
4729 type NoMethod LiveChatMessageDeletedDetails
4730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4731 }
4732
4733 type LiveChatMessageListResponse struct {
4734
4735 ActivePollItem *LiveChatMessage `json:"activePollItem,omitempty"`
4736
4737 Etag string `json:"etag,omitempty"`
4738
4739 EventId string `json:"eventId,omitempty"`
4740 Items []*LiveChatMessage `json:"items,omitempty"`
4741
4742
4743 Kind string `json:"kind,omitempty"`
4744 NextPageToken string `json:"nextPageToken,omitempty"`
4745
4746 OfflineAt string `json:"offlineAt,omitempty"`
4747
4748 PageInfo *PageInfo `json:"pageInfo,omitempty"`
4749
4750
4751 PollingIntervalMillis int64 `json:"pollingIntervalMillis,omitempty"`
4752 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
4753
4754 VisitorId string `json:"visitorId,omitempty"`
4755
4756
4757 googleapi.ServerResponse `json:"-"`
4758
4759
4760
4761
4762
4763 ForceSendFields []string `json:"-"`
4764
4765
4766
4767
4768 NullFields []string `json:"-"`
4769 }
4770
4771 func (s *LiveChatMessageListResponse) MarshalJSON() ([]byte, error) {
4772 type NoMethod LiveChatMessageListResponse
4773 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4774 }
4775
4776 type LiveChatMessageRetractedDetails struct {
4777 RetractedMessageId string `json:"retractedMessageId,omitempty"`
4778
4779
4780
4781
4782
4783 ForceSendFields []string `json:"-"`
4784
4785
4786
4787
4788 NullFields []string `json:"-"`
4789 }
4790
4791 func (s *LiveChatMessageRetractedDetails) MarshalJSON() ([]byte, error) {
4792 type NoMethod LiveChatMessageRetractedDetails
4793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4794 }
4795
4796
4797 type LiveChatMessageSnippet struct {
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809 AuthorChannelId string `json:"authorChannelId,omitempty"`
4810
4811
4812
4813 DisplayMessage string `json:"displayMessage,omitempty"`
4814
4815
4816 FanFundingEventDetails *LiveChatFanFundingEventDetails `json:"fanFundingEventDetails,omitempty"`
4817
4818
4819 GiftMembershipReceivedDetails *LiveChatGiftMembershipReceivedDetails `json:"giftMembershipReceivedDetails,omitempty"`
4820
4821
4822 HasDisplayContent bool `json:"hasDisplayContent,omitempty"`
4823 LiveChatId string `json:"liveChatId,omitempty"`
4824
4825
4826 MemberMilestoneChatDetails *LiveChatMemberMilestoneChatDetails `json:"memberMilestoneChatDetails,omitempty"`
4827
4828
4829 MembershipGiftingDetails *LiveChatMembershipGiftingDetails `json:"membershipGiftingDetails,omitempty"`
4830 MessageDeletedDetails *LiveChatMessageDeletedDetails `json:"messageDeletedDetails,omitempty"`
4831 MessageRetractedDetails *LiveChatMessageRetractedDetails `json:"messageRetractedDetails,omitempty"`
4832
4833
4834
4835 NewSponsorDetails *LiveChatNewSponsorDetails `json:"newSponsorDetails,omitempty"`
4836
4837
4838 PollDetails *LiveChatPollDetails `json:"pollDetails,omitempty"`
4839
4840 PublishedAt string `json:"publishedAt,omitempty"`
4841
4842
4843 SuperChatDetails *LiveChatSuperChatDetails `json:"superChatDetails,omitempty"`
4844
4845
4846 SuperStickerDetails *LiveChatSuperStickerDetails `json:"superStickerDetails,omitempty"`
4847
4848
4849 TextMessageDetails *LiveChatTextMessageDetails `json:"textMessageDetails,omitempty"`
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871 Type string `json:"type,omitempty"`
4872 UserBannedDetails *LiveChatUserBannedMessageDetails `json:"userBannedDetails,omitempty"`
4873
4874
4875
4876
4877
4878 ForceSendFields []string `json:"-"`
4879
4880
4881
4882
4883 NullFields []string `json:"-"`
4884 }
4885
4886 func (s *LiveChatMessageSnippet) MarshalJSON() ([]byte, error) {
4887 type NoMethod LiveChatMessageSnippet
4888 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4889 }
4890
4891
4892
4893
4894 type LiveChatModerator struct {
4895
4896 Etag string `json:"etag,omitempty"`
4897
4898 Id string `json:"id,omitempty"`
4899
4900
4901 Kind string `json:"kind,omitempty"`
4902
4903 Snippet *LiveChatModeratorSnippet `json:"snippet,omitempty"`
4904
4905
4906 googleapi.ServerResponse `json:"-"`
4907
4908
4909
4910
4911
4912 ForceSendFields []string `json:"-"`
4913
4914
4915
4916
4917 NullFields []string `json:"-"`
4918 }
4919
4920 func (s *LiveChatModerator) MarshalJSON() ([]byte, error) {
4921 type NoMethod LiveChatModerator
4922 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4923 }
4924
4925 type LiveChatModeratorListResponse struct {
4926
4927 Etag string `json:"etag,omitempty"`
4928
4929 EventId string `json:"eventId,omitempty"`
4930
4931 Items []*LiveChatModerator `json:"items,omitempty"`
4932
4933
4934 Kind string `json:"kind,omitempty"`
4935
4936
4937 NextPageToken string `json:"nextPageToken,omitempty"`
4938
4939 PageInfo *PageInfo `json:"pageInfo,omitempty"`
4940
4941
4942 PrevPageToken string `json:"prevPageToken,omitempty"`
4943 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
4944
4945 VisitorId string `json:"visitorId,omitempty"`
4946
4947
4948 googleapi.ServerResponse `json:"-"`
4949
4950
4951
4952
4953
4954 ForceSendFields []string `json:"-"`
4955
4956
4957
4958
4959 NullFields []string `json:"-"`
4960 }
4961
4962 func (s *LiveChatModeratorListResponse) MarshalJSON() ([]byte, error) {
4963 type NoMethod LiveChatModeratorListResponse
4964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4965 }
4966
4967 type LiveChatModeratorSnippet struct {
4968
4969 LiveChatId string `json:"liveChatId,omitempty"`
4970
4971 ModeratorDetails *ChannelProfileDetails `json:"moderatorDetails,omitempty"`
4972
4973
4974
4975
4976
4977 ForceSendFields []string `json:"-"`
4978
4979
4980
4981
4982 NullFields []string `json:"-"`
4983 }
4984
4985 func (s *LiveChatModeratorSnippet) MarshalJSON() ([]byte, error) {
4986 type NoMethod LiveChatModeratorSnippet
4987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4988 }
4989
4990 type LiveChatNewSponsorDetails struct {
4991
4992
4993 IsUpgrade bool `json:"isUpgrade,omitempty"`
4994
4995
4996
4997 MemberLevelName string `json:"memberLevelName,omitempty"`
4998
4999
5000
5001
5002
5003 ForceSendFields []string `json:"-"`
5004
5005
5006
5007
5008 NullFields []string `json:"-"`
5009 }
5010
5011 func (s *LiveChatNewSponsorDetails) MarshalJSON() ([]byte, error) {
5012 type NoMethod LiveChatNewSponsorDetails
5013 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5014 }
5015
5016 type LiveChatPollDetails struct {
5017 Metadata *LiveChatPollDetailsPollMetadata `json:"metadata,omitempty"`
5018
5019
5020
5021
5022 Status string `json:"status,omitempty"`
5023
5024
5025
5026
5027
5028 ForceSendFields []string `json:"-"`
5029
5030
5031
5032
5033 NullFields []string `json:"-"`
5034 }
5035
5036 func (s *LiveChatPollDetails) MarshalJSON() ([]byte, error) {
5037 type NoMethod LiveChatPollDetails
5038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5039 }
5040
5041 type LiveChatPollDetailsPollMetadata struct {
5042
5043 Options []*LiveChatPollDetailsPollMetadataPollOption `json:"options,omitempty"`
5044 QuestionText string `json:"questionText,omitempty"`
5045
5046
5047
5048
5049
5050 ForceSendFields []string `json:"-"`
5051
5052
5053
5054
5055 NullFields []string `json:"-"`
5056 }
5057
5058 func (s *LiveChatPollDetailsPollMetadata) MarshalJSON() ([]byte, error) {
5059 type NoMethod LiveChatPollDetailsPollMetadata
5060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5061 }
5062
5063 type LiveChatPollDetailsPollMetadataPollOption struct {
5064 OptionText string `json:"optionText,omitempty"`
5065 Tally int64 `json:"tally,omitempty,string"`
5066
5067
5068
5069
5070
5071 ForceSendFields []string `json:"-"`
5072
5073
5074
5075
5076 NullFields []string `json:"-"`
5077 }
5078
5079 func (s *LiveChatPollDetailsPollMetadataPollOption) MarshalJSON() ([]byte, error) {
5080 type NoMethod LiveChatPollDetailsPollMetadataPollOption
5081 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5082 }
5083
5084 type LiveChatSuperChatDetails struct {
5085
5086
5087 AmountDisplayString string `json:"amountDisplayString,omitempty"`
5088
5089
5090 AmountMicros uint64 `json:"amountMicros,omitempty,string"`
5091
5092 Currency string `json:"currency,omitempty"`
5093
5094
5095 Tier int64 `json:"tier,omitempty"`
5096
5097 UserComment string `json:"userComment,omitempty"`
5098
5099
5100
5101
5102
5103 ForceSendFields []string `json:"-"`
5104
5105
5106
5107
5108 NullFields []string `json:"-"`
5109 }
5110
5111 func (s *LiveChatSuperChatDetails) MarshalJSON() ([]byte, error) {
5112 type NoMethod LiveChatSuperChatDetails
5113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5114 }
5115
5116 type LiveChatSuperStickerDetails struct {
5117
5118
5119 AmountDisplayString string `json:"amountDisplayString,omitempty"`
5120
5121
5122 AmountMicros uint64 `json:"amountMicros,omitempty,string"`
5123
5124 Currency string `json:"currency,omitempty"`
5125
5126 SuperStickerMetadata *SuperStickerMetadata `json:"superStickerMetadata,omitempty"`
5127
5128
5129 Tier int64 `json:"tier,omitempty"`
5130
5131
5132
5133
5134
5135 ForceSendFields []string `json:"-"`
5136
5137
5138
5139
5140 NullFields []string `json:"-"`
5141 }
5142
5143 func (s *LiveChatSuperStickerDetails) MarshalJSON() ([]byte, error) {
5144 type NoMethod LiveChatSuperStickerDetails
5145 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5146 }
5147
5148 type LiveChatTextMessageDetails struct {
5149
5150 MessageText string `json:"messageText,omitempty"`
5151
5152
5153
5154
5155
5156 ForceSendFields []string `json:"-"`
5157
5158
5159
5160
5161 NullFields []string `json:"-"`
5162 }
5163
5164 func (s *LiveChatTextMessageDetails) MarshalJSON() ([]byte, error) {
5165 type NoMethod LiveChatTextMessageDetails
5166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5167 }
5168
5169 type LiveChatUserBannedMessageDetails struct {
5170
5171
5172 BanDurationSeconds uint64 `json:"banDurationSeconds,omitempty,string"`
5173
5174
5175
5176
5177
5178 BanType string `json:"banType,omitempty"`
5179
5180 BannedUserDetails *ChannelProfileDetails `json:"bannedUserDetails,omitempty"`
5181
5182
5183
5184
5185
5186 ForceSendFields []string `json:"-"`
5187
5188
5189
5190
5191 NullFields []string `json:"-"`
5192 }
5193
5194 func (s *LiveChatUserBannedMessageDetails) MarshalJSON() ([]byte, error) {
5195 type NoMethod LiveChatUserBannedMessageDetails
5196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5197 }
5198
5199
5200 type LiveStream struct {
5201
5202
5203
5204 Cdn *CdnSettings `json:"cdn,omitempty"`
5205
5206
5207 ContentDetails *LiveStreamContentDetails `json:"contentDetails,omitempty"`
5208
5209 Etag string `json:"etag,omitempty"`
5210
5211 Id string `json:"id,omitempty"`
5212
5213
5214 Kind string `json:"kind,omitempty"`
5215
5216
5217 Snippet *LiveStreamSnippet `json:"snippet,omitempty"`
5218
5219 Status *LiveStreamStatus `json:"status,omitempty"`
5220
5221
5222 googleapi.ServerResponse `json:"-"`
5223
5224
5225
5226
5227
5228 ForceSendFields []string `json:"-"`
5229
5230
5231
5232
5233 NullFields []string `json:"-"`
5234 }
5235
5236 func (s *LiveStream) MarshalJSON() ([]byte, error) {
5237 type NoMethod LiveStream
5238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5239 }
5240
5241 type LiveStreamConfigurationIssue struct {
5242
5243 Description string `json:"description,omitempty"`
5244
5245 Reason string `json:"reason,omitempty"`
5246
5247
5248
5249
5250
5251
5252 Severity string `json:"severity,omitempty"`
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290 Type string `json:"type,omitempty"`
5291
5292
5293
5294
5295
5296 ForceSendFields []string `json:"-"`
5297
5298
5299
5300
5301 NullFields []string `json:"-"`
5302 }
5303
5304 func (s *LiveStreamConfigurationIssue) MarshalJSON() ([]byte, error) {
5305 type NoMethod LiveStreamConfigurationIssue
5306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5307 }
5308
5309
5310 type LiveStreamContentDetails struct {
5311
5312
5313 ClosedCaptionsIngestionUrl string `json:"closedCaptionsIngestionUrl,omitempty"`
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326 IsReusable bool `json:"isReusable,omitempty"`
5327
5328
5329
5330
5331
5332 ForceSendFields []string `json:"-"`
5333
5334
5335
5336
5337 NullFields []string `json:"-"`
5338 }
5339
5340 func (s *LiveStreamContentDetails) MarshalJSON() ([]byte, error) {
5341 type NoMethod LiveStreamContentDetails
5342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5343 }
5344
5345 type LiveStreamHealthStatus struct {
5346
5347 ConfigurationIssues []*LiveStreamConfigurationIssue `json:"configurationIssues,omitempty"`
5348
5349 LastUpdateTimeSeconds uint64 `json:"lastUpdateTimeSeconds,omitempty,string"`
5350
5351
5352
5353
5354
5355
5356
5357
5358 Status string `json:"status,omitempty"`
5359
5360
5361
5362
5363
5364 ForceSendFields []string `json:"-"`
5365
5366
5367
5368
5369 NullFields []string `json:"-"`
5370 }
5371
5372 func (s *LiveStreamHealthStatus) MarshalJSON() ([]byte, error) {
5373 type NoMethod LiveStreamHealthStatus
5374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5375 }
5376
5377 type LiveStreamListResponse struct {
5378
5379 Etag string `json:"etag,omitempty"`
5380
5381 EventId string `json:"eventId,omitempty"`
5382
5383 Items []*LiveStream `json:"items,omitempty"`
5384
5385
5386 Kind string `json:"kind,omitempty"`
5387
5388
5389 NextPageToken string `json:"nextPageToken,omitempty"`
5390 PageInfo *PageInfo `json:"pageInfo,omitempty"`
5391
5392
5393 PrevPageToken string `json:"prevPageToken,omitempty"`
5394 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
5395
5396 VisitorId string `json:"visitorId,omitempty"`
5397
5398
5399 googleapi.ServerResponse `json:"-"`
5400
5401
5402
5403
5404
5405 ForceSendFields []string `json:"-"`
5406
5407
5408
5409
5410 NullFields []string `json:"-"`
5411 }
5412
5413 func (s *LiveStreamListResponse) MarshalJSON() ([]byte, error) {
5414 type NoMethod LiveStreamListResponse
5415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5416 }
5417
5418 type LiveStreamSnippet struct {
5419
5420
5421 ChannelId string `json:"channelId,omitempty"`
5422
5423
5424 Description string `json:"description,omitempty"`
5425 IsDefaultStream bool `json:"isDefaultStream,omitempty"`
5426
5427 PublishedAt string `json:"publishedAt,omitempty"`
5428
5429
5430 Title string `json:"title,omitempty"`
5431
5432
5433
5434
5435
5436 ForceSendFields []string `json:"-"`
5437
5438
5439
5440
5441 NullFields []string `json:"-"`
5442 }
5443
5444 func (s *LiveStreamSnippet) MarshalJSON() ([]byte, error) {
5445 type NoMethod LiveStreamSnippet
5446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5447 }
5448
5449
5450 type LiveStreamStatus struct {
5451
5452 HealthStatus *LiveStreamHealthStatus `json:"healthStatus,omitempty"`
5453
5454
5455
5456
5457
5458
5459 StreamStatus string `json:"streamStatus,omitempty"`
5460
5461
5462
5463
5464
5465 ForceSendFields []string `json:"-"`
5466
5467
5468
5469
5470 NullFields []string `json:"-"`
5471 }
5472
5473 func (s *LiveStreamStatus) MarshalJSON() ([]byte, error) {
5474 type NoMethod LiveStreamStatus
5475 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5476 }
5477
5478 type LocalizedProperty struct {
5479 Default string `json:"default,omitempty"`
5480
5481 DefaultLanguage *LanguageTag `json:"defaultLanguage,omitempty"`
5482 Localized []*LocalizedString `json:"localized,omitempty"`
5483
5484
5485
5486
5487
5488 ForceSendFields []string `json:"-"`
5489
5490
5491
5492
5493 NullFields []string `json:"-"`
5494 }
5495
5496 func (s *LocalizedProperty) MarshalJSON() ([]byte, error) {
5497 type NoMethod LocalizedProperty
5498 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5499 }
5500
5501 type LocalizedString struct {
5502 Language string `json:"language,omitempty"`
5503 Value string `json:"value,omitempty"`
5504
5505
5506
5507
5508
5509 ForceSendFields []string `json:"-"`
5510
5511
5512
5513
5514 NullFields []string `json:"-"`
5515 }
5516
5517 func (s *LocalizedString) MarshalJSON() ([]byte, error) {
5518 type NoMethod LocalizedString
5519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5520 }
5521
5522
5523
5524
5525 type Member struct {
5526
5527 Etag string `json:"etag,omitempty"`
5528
5529
5530 Kind string `json:"kind,omitempty"`
5531
5532 Snippet *MemberSnippet `json:"snippet,omitempty"`
5533
5534
5535
5536
5537
5538 ForceSendFields []string `json:"-"`
5539
5540
5541
5542
5543 NullFields []string `json:"-"`
5544 }
5545
5546 func (s *Member) MarshalJSON() ([]byte, error) {
5547 type NoMethod Member
5548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5549 }
5550
5551 type MemberListResponse struct {
5552
5553 Etag string `json:"etag,omitempty"`
5554
5555 EventId string `json:"eventId,omitempty"`
5556
5557 Items []*Member `json:"items,omitempty"`
5558
5559
5560 Kind string `json:"kind,omitempty"`
5561
5562
5563 NextPageToken string `json:"nextPageToken,omitempty"`
5564 PageInfo *PageInfo `json:"pageInfo,omitempty"`
5565 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
5566
5567 VisitorId string `json:"visitorId,omitempty"`
5568
5569
5570 googleapi.ServerResponse `json:"-"`
5571
5572
5573
5574
5575
5576 ForceSendFields []string `json:"-"`
5577
5578
5579
5580
5581 NullFields []string `json:"-"`
5582 }
5583
5584 func (s *MemberListResponse) MarshalJSON() ([]byte, error) {
5585 type NoMethod MemberListResponse
5586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5587 }
5588
5589 type MemberSnippet struct {
5590
5591 CreatorChannelId string `json:"creatorChannelId,omitempty"`
5592
5593 MemberDetails *ChannelProfileDetails `json:"memberDetails,omitempty"`
5594
5595 MembershipsDetails *MembershipsDetails `json:"membershipsDetails,omitempty"`
5596
5597
5598
5599
5600
5601 ForceSendFields []string `json:"-"`
5602
5603
5604
5605
5606 NullFields []string `json:"-"`
5607 }
5608
5609 func (s *MemberSnippet) MarshalJSON() ([]byte, error) {
5610 type NoMethod MemberSnippet
5611 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5612 }
5613
5614 type MembershipsDetails struct {
5615
5616
5617
5618 AccessibleLevels []string `json:"accessibleLevels,omitempty"`
5619
5620
5621 HighestAccessibleLevel string `json:"highestAccessibleLevel,omitempty"`
5622
5623
5624 HighestAccessibleLevelDisplayName string `json:"highestAccessibleLevelDisplayName,omitempty"`
5625
5626
5627 MembershipsDuration *MembershipsDuration `json:"membershipsDuration,omitempty"`
5628
5629
5630 MembershipsDurationAtLevels []*MembershipsDurationAtLevel `json:"membershipsDurationAtLevels,omitempty"`
5631
5632
5633
5634
5635
5636 ForceSendFields []string `json:"-"`
5637
5638
5639
5640
5641 NullFields []string `json:"-"`
5642 }
5643
5644 func (s *MembershipsDetails) MarshalJSON() ([]byte, error) {
5645 type NoMethod MembershipsDetails
5646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5647 }
5648
5649 type MembershipsDuration struct {
5650
5651
5652 MemberSince string `json:"memberSince,omitempty"`
5653
5654
5655
5656 MemberTotalDurationMonths int64 `json:"memberTotalDurationMonths,omitempty"`
5657
5658
5659
5660
5661
5662 ForceSendFields []string `json:"-"`
5663
5664
5665
5666
5667 NullFields []string `json:"-"`
5668 }
5669
5670 func (s *MembershipsDuration) MarshalJSON() ([]byte, error) {
5671 type NoMethod MembershipsDuration
5672 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5673 }
5674
5675 type MembershipsDurationAtLevel struct {
5676
5677 Level string `json:"level,omitempty"`
5678
5679
5680 MemberSince string `json:"memberSince,omitempty"`
5681
5682
5683
5684 MemberTotalDurationMonths int64 `json:"memberTotalDurationMonths,omitempty"`
5685
5686
5687
5688
5689
5690 ForceSendFields []string `json:"-"`
5691
5692
5693
5694
5695 NullFields []string `json:"-"`
5696 }
5697
5698 func (s *MembershipsDurationAtLevel) MarshalJSON() ([]byte, error) {
5699 type NoMethod MembershipsDurationAtLevel
5700 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5701 }
5702
5703
5704
5705
5706
5707 type MembershipsLevel struct {
5708
5709 Etag string `json:"etag,omitempty"`
5710
5711 Id string `json:"id,omitempty"`
5712
5713
5714 Kind string `json:"kind,omitempty"`
5715
5716 Snippet *MembershipsLevelSnippet `json:"snippet,omitempty"`
5717
5718
5719
5720
5721
5722 ForceSendFields []string `json:"-"`
5723
5724
5725
5726
5727 NullFields []string `json:"-"`
5728 }
5729
5730 func (s *MembershipsLevel) MarshalJSON() ([]byte, error) {
5731 type NoMethod MembershipsLevel
5732 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5733 }
5734
5735 type MembershipsLevelListResponse struct {
5736
5737 Etag string `json:"etag,omitempty"`
5738
5739 EventId string `json:"eventId,omitempty"`
5740
5741 Items []*MembershipsLevel `json:"items,omitempty"`
5742
5743
5744 Kind string `json:"kind,omitempty"`
5745
5746 VisitorId string `json:"visitorId,omitempty"`
5747
5748
5749 googleapi.ServerResponse `json:"-"`
5750
5751
5752
5753
5754
5755 ForceSendFields []string `json:"-"`
5756
5757
5758
5759
5760 NullFields []string `json:"-"`
5761 }
5762
5763 func (s *MembershipsLevelListResponse) MarshalJSON() ([]byte, error) {
5764 type NoMethod MembershipsLevelListResponse
5765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5766 }
5767
5768 type MembershipsLevelSnippet struct {
5769
5770 CreatorChannelId string `json:"creatorChannelId,omitempty"`
5771
5772 LevelDetails *LevelDetails `json:"levelDetails,omitempty"`
5773
5774
5775
5776
5777
5778 ForceSendFields []string `json:"-"`
5779
5780
5781
5782
5783 NullFields []string `json:"-"`
5784 }
5785
5786 func (s *MembershipsLevelSnippet) MarshalJSON() ([]byte, error) {
5787 type NoMethod MembershipsLevelSnippet
5788 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5789 }
5790
5791
5792 type MonitorStreamInfo struct {
5793
5794
5795 BroadcastStreamDelayMs int64 `json:"broadcastStreamDelayMs,omitempty"`
5796
5797 EmbedHtml string `json:"embedHtml,omitempty"`
5798
5799
5800
5801
5802
5803
5804
5805
5806 EnableMonitorStream *bool `json:"enableMonitorStream,omitempty"`
5807
5808
5809
5810
5811
5812 ForceSendFields []string `json:"-"`
5813
5814
5815
5816
5817 NullFields []string `json:"-"`
5818 }
5819
5820 func (s *MonitorStreamInfo) MarshalJSON() ([]byte, error) {
5821 type NoMethod MonitorStreamInfo
5822 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5823 }
5824
5825
5826
5827 type PageInfo struct {
5828
5829 ResultsPerPage int64 `json:"resultsPerPage,omitempty"`
5830
5831 TotalResults int64 `json:"totalResults,omitempty"`
5832
5833
5834
5835
5836
5837 ForceSendFields []string `json:"-"`
5838
5839
5840
5841
5842 NullFields []string `json:"-"`
5843 }
5844
5845 func (s *PageInfo) MarshalJSON() ([]byte, error) {
5846 type NoMethod PageInfo
5847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5848 }
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864 type Playlist struct {
5865
5866
5867 ContentDetails *PlaylistContentDetails `json:"contentDetails,omitempty"`
5868
5869 Etag string `json:"etag,omitempty"`
5870
5871 Id string `json:"id,omitempty"`
5872
5873
5874 Kind string `json:"kind,omitempty"`
5875
5876 Localizations map[string]PlaylistLocalization `json:"localizations,omitempty"`
5877
5878
5879 Player *PlaylistPlayer `json:"player,omitempty"`
5880
5881
5882 Snippet *PlaylistSnippet `json:"snippet,omitempty"`
5883
5884 Status *PlaylistStatus `json:"status,omitempty"`
5885
5886
5887 googleapi.ServerResponse `json:"-"`
5888
5889
5890
5891
5892
5893 ForceSendFields []string `json:"-"`
5894
5895
5896
5897
5898 NullFields []string `json:"-"`
5899 }
5900
5901 func (s *Playlist) MarshalJSON() ([]byte, error) {
5902 type NoMethod Playlist
5903 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5904 }
5905
5906 type PlaylistContentDetails struct {
5907
5908 ItemCount int64 `json:"itemCount,omitempty"`
5909
5910
5911
5912
5913
5914 ForceSendFields []string `json:"-"`
5915
5916
5917
5918
5919 NullFields []string `json:"-"`
5920 }
5921
5922 func (s *PlaylistContentDetails) MarshalJSON() ([]byte, error) {
5923 type NoMethod PlaylistContentDetails
5924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5925 }
5926
5927 type PlaylistImage struct {
5928
5929 Id string `json:"id,omitempty"`
5930
5931
5932 Kind string `json:"kind,omitempty"`
5933 Snippet *PlaylistImageSnippet `json:"snippet,omitempty"`
5934
5935
5936 googleapi.ServerResponse `json:"-"`
5937
5938
5939
5940
5941
5942 ForceSendFields []string `json:"-"`
5943
5944
5945
5946
5947 NullFields []string `json:"-"`
5948 }
5949
5950 func (s *PlaylistImage) MarshalJSON() ([]byte, error) {
5951 type NoMethod PlaylistImage
5952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5953 }
5954
5955 type PlaylistImageListResponse struct {
5956 Items []*PlaylistImage `json:"items,omitempty"`
5957
5958
5959 Kind string `json:"kind,omitempty"`
5960
5961
5962 NextPageToken string `json:"nextPageToken,omitempty"`
5963
5964 PageInfo *PageInfo `json:"pageInfo,omitempty"`
5965
5966
5967 PrevPageToken string `json:"prevPageToken,omitempty"`
5968
5969
5970 googleapi.ServerResponse `json:"-"`
5971
5972
5973
5974
5975
5976 ForceSendFields []string `json:"-"`
5977
5978
5979
5980
5981 NullFields []string `json:"-"`
5982 }
5983
5984 func (s *PlaylistImageListResponse) MarshalJSON() ([]byte, error) {
5985 type NoMethod PlaylistImageListResponse
5986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5987 }
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002 type PlaylistImageSnippet struct {
6003
6004 Height int64 `json:"height,omitempty"`
6005
6006 PlaylistId string `json:"playlistId,omitempty"`
6007
6008
6009
6010
6011 Type string `json:"type,omitempty"`
6012
6013 Width int64 `json:"width,omitempty"`
6014
6015
6016
6017
6018
6019 ForceSendFields []string `json:"-"`
6020
6021
6022
6023
6024 NullFields []string `json:"-"`
6025 }
6026
6027 func (s *PlaylistImageSnippet) MarshalJSON() ([]byte, error) {
6028 type NoMethod PlaylistImageSnippet
6029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6030 }
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047 type PlaylistItem struct {
6048
6049
6050
6051 ContentDetails *PlaylistItemContentDetails `json:"contentDetails,omitempty"`
6052
6053 Etag string `json:"etag,omitempty"`
6054
6055 Id string `json:"id,omitempty"`
6056
6057
6058 Kind string `json:"kind,omitempty"`
6059
6060
6061 Snippet *PlaylistItemSnippet `json:"snippet,omitempty"`
6062
6063
6064 Status *PlaylistItemStatus `json:"status,omitempty"`
6065
6066
6067 googleapi.ServerResponse `json:"-"`
6068
6069
6070
6071
6072
6073 ForceSendFields []string `json:"-"`
6074
6075
6076
6077
6078 NullFields []string `json:"-"`
6079 }
6080
6081 func (s *PlaylistItem) MarshalJSON() ([]byte, error) {
6082 type NoMethod PlaylistItem
6083 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6084 }
6085
6086 type PlaylistItemContentDetails struct {
6087
6088
6089
6090
6091
6092 EndAt string `json:"endAt,omitempty"`
6093
6094 Note string `json:"note,omitempty"`
6095
6096
6097
6098
6099 StartAt string `json:"startAt,omitempty"`
6100
6101
6102
6103 VideoId string `json:"videoId,omitempty"`
6104
6105 VideoPublishedAt string `json:"videoPublishedAt,omitempty"`
6106
6107
6108
6109
6110
6111 ForceSendFields []string `json:"-"`
6112
6113
6114
6115
6116 NullFields []string `json:"-"`
6117 }
6118
6119 func (s *PlaylistItemContentDetails) MarshalJSON() ([]byte, error) {
6120 type NoMethod PlaylistItemContentDetails
6121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6122 }
6123
6124 type PlaylistItemListResponse struct {
6125 Etag string `json:"etag,omitempty"`
6126
6127 EventId string `json:"eventId,omitempty"`
6128
6129 Items []*PlaylistItem `json:"items,omitempty"`
6130
6131
6132 Kind string `json:"kind,omitempty"`
6133
6134
6135 NextPageToken string `json:"nextPageToken,omitempty"`
6136
6137 PageInfo *PageInfo `json:"pageInfo,omitempty"`
6138
6139
6140 PrevPageToken string `json:"prevPageToken,omitempty"`
6141 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6142
6143 VisitorId string `json:"visitorId,omitempty"`
6144
6145
6146 googleapi.ServerResponse `json:"-"`
6147
6148
6149
6150
6151
6152 ForceSendFields []string `json:"-"`
6153
6154
6155
6156
6157 NullFields []string `json:"-"`
6158 }
6159
6160 func (s *PlaylistItemListResponse) MarshalJSON() ([]byte, error) {
6161 type NoMethod PlaylistItemListResponse
6162 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6163 }
6164
6165
6166
6167
6168 type PlaylistItemSnippet struct {
6169
6170
6171 ChannelId string `json:"channelId,omitempty"`
6172
6173
6174 ChannelTitle string `json:"channelTitle,omitempty"`
6175
6176 Description string `json:"description,omitempty"`
6177
6178
6179 PlaylistId string `json:"playlistId,omitempty"`
6180
6181
6182
6183 Position int64 `json:"position,omitempty"`
6184
6185 PublishedAt string `json:"publishedAt,omitempty"`
6186
6187
6188 ResourceId *ResourceId `json:"resourceId,omitempty"`
6189
6190
6191
6192 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6193
6194 Title string `json:"title,omitempty"`
6195
6196 VideoOwnerChannelId string `json:"videoOwnerChannelId,omitempty"`
6197
6198 VideoOwnerChannelTitle string `json:"videoOwnerChannelTitle,omitempty"`
6199
6200
6201
6202
6203
6204 ForceSendFields []string `json:"-"`
6205
6206
6207
6208
6209 NullFields []string `json:"-"`
6210 }
6211
6212 func (s *PlaylistItemSnippet) MarshalJSON() ([]byte, error) {
6213 type NoMethod PlaylistItemSnippet
6214 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6215 }
6216
6217
6218 type PlaylistItemStatus struct {
6219
6220
6221
6222
6223
6224
6225 PrivacyStatus string `json:"privacyStatus,omitempty"`
6226
6227
6228
6229
6230
6231 ForceSendFields []string `json:"-"`
6232
6233
6234
6235
6236 NullFields []string `json:"-"`
6237 }
6238
6239 func (s *PlaylistItemStatus) MarshalJSON() ([]byte, error) {
6240 type NoMethod PlaylistItemStatus
6241 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6242 }
6243
6244 type PlaylistListResponse struct {
6245
6246 Etag string `json:"etag,omitempty"`
6247
6248 EventId string `json:"eventId,omitempty"`
6249
6250 Items []*Playlist `json:"items,omitempty"`
6251
6252
6253 Kind string `json:"kind,omitempty"`
6254
6255
6256 NextPageToken string `json:"nextPageToken,omitempty"`
6257
6258 PageInfo *PageInfo `json:"pageInfo,omitempty"`
6259
6260
6261 PrevPageToken string `json:"prevPageToken,omitempty"`
6262 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6263
6264 VisitorId string `json:"visitorId,omitempty"`
6265
6266
6267 googleapi.ServerResponse `json:"-"`
6268
6269
6270
6271
6272
6273 ForceSendFields []string `json:"-"`
6274
6275
6276
6277
6278 NullFields []string `json:"-"`
6279 }
6280
6281 func (s *PlaylistListResponse) MarshalJSON() ([]byte, error) {
6282 type NoMethod PlaylistListResponse
6283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6284 }
6285
6286
6287 type PlaylistLocalization struct {
6288
6289 Description string `json:"description,omitempty"`
6290
6291 Title string `json:"title,omitempty"`
6292
6293
6294
6295
6296
6297 ForceSendFields []string `json:"-"`
6298
6299
6300
6301
6302 NullFields []string `json:"-"`
6303 }
6304
6305 func (s *PlaylistLocalization) MarshalJSON() ([]byte, error) {
6306 type NoMethod PlaylistLocalization
6307 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6308 }
6309
6310 type PlaylistPlayer struct {
6311
6312 EmbedHtml string `json:"embedHtml,omitempty"`
6313
6314
6315
6316
6317
6318 ForceSendFields []string `json:"-"`
6319
6320
6321
6322
6323 NullFields []string `json:"-"`
6324 }
6325
6326 func (s *PlaylistPlayer) MarshalJSON() ([]byte, error) {
6327 type NoMethod PlaylistPlayer
6328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6329 }
6330
6331
6332
6333 type PlaylistSnippet struct {
6334
6335
6336 ChannelId string `json:"channelId,omitempty"`
6337
6338 ChannelTitle string `json:"channelTitle,omitempty"`
6339
6340
6341 DefaultLanguage string `json:"defaultLanguage,omitempty"`
6342
6343 Description string `json:"description,omitempty"`
6344
6345 Localized *PlaylistLocalization `json:"localized,omitempty"`
6346
6347 PublishedAt string `json:"publishedAt,omitempty"`
6348
6349 Tags []string `json:"tags,omitempty"`
6350
6351
6352
6353
6354
6355
6356
6357
6358 ThumbnailVideoId string `json:"thumbnailVideoId,omitempty"`
6359
6360
6361
6362 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6363
6364 Title string `json:"title,omitempty"`
6365
6366
6367
6368
6369
6370 ForceSendFields []string `json:"-"`
6371
6372
6373
6374
6375 NullFields []string `json:"-"`
6376 }
6377
6378 func (s *PlaylistSnippet) MarshalJSON() ([]byte, error) {
6379 type NoMethod PlaylistSnippet
6380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6381 }
6382
6383 type PlaylistStatus struct {
6384
6385
6386
6387
6388
6389
6390 PrivacyStatus string `json:"privacyStatus,omitempty"`
6391
6392
6393
6394
6395
6396 ForceSendFields []string `json:"-"`
6397
6398
6399
6400
6401 NullFields []string `json:"-"`
6402 }
6403
6404 func (s *PlaylistStatus) MarshalJSON() ([]byte, error) {
6405 type NoMethod PlaylistStatus
6406 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6407 }
6408
6409
6410 type PropertyValue struct {
6411
6412 Property string `json:"property,omitempty"`
6413
6414 Value string `json:"value,omitempty"`
6415
6416
6417
6418
6419
6420 ForceSendFields []string `json:"-"`
6421
6422
6423
6424
6425 NullFields []string `json:"-"`
6426 }
6427
6428 func (s *PropertyValue) MarshalJSON() ([]byte, error) {
6429 type NoMethod PropertyValue
6430 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6431 }
6432
6433 type RelatedEntity struct {
6434 Entity *Entity `json:"entity,omitempty"`
6435
6436
6437
6438
6439
6440 ForceSendFields []string `json:"-"`
6441
6442
6443
6444
6445 NullFields []string `json:"-"`
6446 }
6447
6448 func (s *RelatedEntity) MarshalJSON() ([]byte, error) {
6449 type NoMethod RelatedEntity
6450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6451 }
6452
6453
6454
6455 type ResourceId struct {
6456
6457
6458
6459 ChannelId string `json:"channelId,omitempty"`
6460
6461 Kind string `json:"kind,omitempty"`
6462
6463
6464
6465 PlaylistId string `json:"playlistId,omitempty"`
6466
6467
6468
6469 VideoId string `json:"videoId,omitempty"`
6470
6471
6472
6473
6474
6475 ForceSendFields []string `json:"-"`
6476
6477
6478
6479
6480 NullFields []string `json:"-"`
6481 }
6482
6483 func (s *ResourceId) MarshalJSON() ([]byte, error) {
6484 type NoMethod ResourceId
6485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6486 }
6487
6488 type SearchListResponse struct {
6489
6490 Etag string `json:"etag,omitempty"`
6491
6492 EventId string `json:"eventId,omitempty"`
6493
6494 Items []*SearchResult `json:"items,omitempty"`
6495
6496
6497 Kind string `json:"kind,omitempty"`
6498
6499
6500 NextPageToken string `json:"nextPageToken,omitempty"`
6501
6502 PageInfo *PageInfo `json:"pageInfo,omitempty"`
6503
6504
6505 PrevPageToken string `json:"prevPageToken,omitempty"`
6506 RegionCode string `json:"regionCode,omitempty"`
6507 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6508
6509 VisitorId string `json:"visitorId,omitempty"`
6510
6511
6512 googleapi.ServerResponse `json:"-"`
6513
6514
6515
6516
6517
6518 ForceSendFields []string `json:"-"`
6519
6520
6521
6522
6523 NullFields []string `json:"-"`
6524 }
6525
6526 func (s *SearchListResponse) MarshalJSON() ([]byte, error) {
6527 type NoMethod SearchListResponse
6528 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6529 }
6530
6531
6532
6533
6534
6535 type SearchResult struct {
6536
6537 Etag string `json:"etag,omitempty"`
6538
6539
6540 Id *ResourceId `json:"id,omitempty"`
6541
6542
6543 Kind string `json:"kind,omitempty"`
6544
6545
6546
6547
6548 Snippet *SearchResultSnippet `json:"snippet,omitempty"`
6549
6550
6551
6552
6553
6554 ForceSendFields []string `json:"-"`
6555
6556
6557
6558
6559 NullFields []string `json:"-"`
6560 }
6561
6562 func (s *SearchResult) MarshalJSON() ([]byte, error) {
6563 type NoMethod SearchResult
6564 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6565 }
6566
6567
6568
6569 type SearchResultSnippet struct {
6570
6571
6572 ChannelId string `json:"channelId,omitempty"`
6573
6574
6575 ChannelTitle string `json:"channelTitle,omitempty"`
6576
6577 Description string `json:"description,omitempty"`
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587 LiveBroadcastContent string `json:"liveBroadcastContent,omitempty"`
6588
6589
6590 PublishedAt string `json:"publishedAt,omitempty"`
6591
6592
6593
6594 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6595
6596 Title string `json:"title,omitempty"`
6597
6598
6599
6600
6601
6602 ForceSendFields []string `json:"-"`
6603
6604
6605
6606
6607 NullFields []string `json:"-"`
6608 }
6609
6610 func (s *SearchResultSnippet) MarshalJSON() ([]byte, error) {
6611 type NoMethod SearchResultSnippet
6612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6613 }
6614
6615
6616
6617
6618
6619 type Subscription struct {
6620
6621
6622 ContentDetails *SubscriptionContentDetails `json:"contentDetails,omitempty"`
6623
6624 Etag string `json:"etag,omitempty"`
6625
6626 Id string `json:"id,omitempty"`
6627
6628
6629 Kind string `json:"kind,omitempty"`
6630
6631
6632 Snippet *SubscriptionSnippet `json:"snippet,omitempty"`
6633
6634
6635 SubscriberSnippet *SubscriptionSubscriberSnippet `json:"subscriberSnippet,omitempty"`
6636
6637
6638 googleapi.ServerResponse `json:"-"`
6639
6640
6641
6642
6643
6644 ForceSendFields []string `json:"-"`
6645
6646
6647
6648
6649 NullFields []string `json:"-"`
6650 }
6651
6652 func (s *Subscription) MarshalJSON() ([]byte, error) {
6653 type NoMethod Subscription
6654 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6655 }
6656
6657
6658
6659 type SubscriptionContentDetails struct {
6660
6661
6662
6663
6664
6665
6666
6667 ActivityType string `json:"activityType,omitempty"`
6668
6669
6670 NewItemCount int64 `json:"newItemCount,omitempty"`
6671
6672
6673 TotalItemCount int64 `json:"totalItemCount,omitempty"`
6674
6675
6676
6677
6678
6679 ForceSendFields []string `json:"-"`
6680
6681
6682
6683
6684 NullFields []string `json:"-"`
6685 }
6686
6687 func (s *SubscriptionContentDetails) MarshalJSON() ([]byte, error) {
6688 type NoMethod SubscriptionContentDetails
6689 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6690 }
6691
6692 type SubscriptionListResponse struct {
6693
6694 Etag string `json:"etag,omitempty"`
6695
6696 EventId string `json:"eventId,omitempty"`
6697
6698 Items []*Subscription `json:"items,omitempty"`
6699
6700
6701 Kind string `json:"kind,omitempty"`
6702
6703
6704 NextPageToken string `json:"nextPageToken,omitempty"`
6705 PageInfo *PageInfo `json:"pageInfo,omitempty"`
6706
6707
6708 PrevPageToken string `json:"prevPageToken,omitempty"`
6709 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6710
6711 VisitorId string `json:"visitorId,omitempty"`
6712
6713
6714 googleapi.ServerResponse `json:"-"`
6715
6716
6717
6718
6719
6720 ForceSendFields []string `json:"-"`
6721
6722
6723
6724
6725 NullFields []string `json:"-"`
6726 }
6727
6728 func (s *SubscriptionListResponse) MarshalJSON() ([]byte, error) {
6729 type NoMethod SubscriptionListResponse
6730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6731 }
6732
6733
6734
6735 type SubscriptionSnippet struct {
6736
6737
6738 ChannelId string `json:"channelId,omitempty"`
6739
6740
6741 ChannelTitle string `json:"channelTitle,omitempty"`
6742
6743 Description string `json:"description,omitempty"`
6744
6745 PublishedAt string `json:"publishedAt,omitempty"`
6746
6747
6748 ResourceId *ResourceId `json:"resourceId,omitempty"`
6749
6750
6751
6752 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6753
6754 Title string `json:"title,omitempty"`
6755
6756
6757
6758
6759
6760 ForceSendFields []string `json:"-"`
6761
6762
6763
6764
6765 NullFields []string `json:"-"`
6766 }
6767
6768 func (s *SubscriptionSnippet) MarshalJSON() ([]byte, error) {
6769 type NoMethod SubscriptionSnippet
6770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6771 }
6772
6773
6774
6775 type SubscriptionSubscriberSnippet struct {
6776
6777 ChannelId string `json:"channelId,omitempty"`
6778
6779 Description string `json:"description,omitempty"`
6780
6781 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6782
6783 Title string `json:"title,omitempty"`
6784
6785
6786
6787
6788
6789 ForceSendFields []string `json:"-"`
6790
6791
6792
6793
6794 NullFields []string `json:"-"`
6795 }
6796
6797 func (s *SubscriptionSubscriberSnippet) MarshalJSON() ([]byte, error) {
6798 type NoMethod SubscriptionSubscriberSnippet
6799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6800 }
6801
6802
6803
6804 type SuperChatEvent struct {
6805
6806 Etag string `json:"etag,omitempty"`
6807
6808 Id string `json:"id,omitempty"`
6809
6810
6811 Kind string `json:"kind,omitempty"`
6812
6813
6814 Snippet *SuperChatEventSnippet `json:"snippet,omitempty"`
6815
6816
6817
6818
6819
6820 ForceSendFields []string `json:"-"`
6821
6822
6823
6824
6825 NullFields []string `json:"-"`
6826 }
6827
6828 func (s *SuperChatEvent) MarshalJSON() ([]byte, error) {
6829 type NoMethod SuperChatEvent
6830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6831 }
6832
6833 type SuperChatEventListResponse struct {
6834
6835 Etag string `json:"etag,omitempty"`
6836
6837 EventId string `json:"eventId,omitempty"`
6838
6839 Items []*SuperChatEvent `json:"items,omitempty"`
6840
6841
6842 Kind string `json:"kind,omitempty"`
6843
6844
6845 NextPageToken string `json:"nextPageToken,omitempty"`
6846 PageInfo *PageInfo `json:"pageInfo,omitempty"`
6847 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6848
6849 VisitorId string `json:"visitorId,omitempty"`
6850
6851
6852 googleapi.ServerResponse `json:"-"`
6853
6854
6855
6856
6857
6858 ForceSendFields []string `json:"-"`
6859
6860
6861
6862
6863 NullFields []string `json:"-"`
6864 }
6865
6866 func (s *SuperChatEventListResponse) MarshalJSON() ([]byte, error) {
6867 type NoMethod SuperChatEventListResponse
6868 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6869 }
6870
6871 type SuperChatEventSnippet struct {
6872
6873
6874 AmountMicros uint64 `json:"amountMicros,omitempty,string"`
6875
6876 ChannelId string `json:"channelId,omitempty"`
6877
6878 CommentText string `json:"commentText,omitempty"`
6879
6880 CreatedAt string `json:"createdAt,omitempty"`
6881
6882 Currency string `json:"currency,omitempty"`
6883
6884
6885 DisplayString string `json:"displayString,omitempty"`
6886
6887 IsSuperStickerEvent bool `json:"isSuperStickerEvent,omitempty"`
6888
6889
6890 MessageType int64 `json:"messageType,omitempty"`
6891
6892
6893 SuperStickerMetadata *SuperStickerMetadata `json:"superStickerMetadata,omitempty"`
6894
6895 SupporterDetails *ChannelProfileDetails `json:"supporterDetails,omitempty"`
6896
6897
6898
6899
6900
6901 ForceSendFields []string `json:"-"`
6902
6903
6904
6905
6906 NullFields []string `json:"-"`
6907 }
6908
6909 func (s *SuperChatEventSnippet) MarshalJSON() ([]byte, error) {
6910 type NoMethod SuperChatEventSnippet
6911 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6912 }
6913
6914 type SuperStickerMetadata struct {
6915
6916
6917 AltText string `json:"altText,omitempty"`
6918
6919
6920 AltTextLanguage string `json:"altTextLanguage,omitempty"`
6921
6922
6923
6924 StickerId string `json:"stickerId,omitempty"`
6925
6926
6927
6928
6929
6930 ForceSendFields []string `json:"-"`
6931
6932
6933
6934
6935 NullFields []string `json:"-"`
6936 }
6937
6938 func (s *SuperStickerMetadata) MarshalJSON() ([]byte, error) {
6939 type NoMethod SuperStickerMetadata
6940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6941 }
6942
6943 type TestItem struct {
6944 FeaturedPart bool `json:"featuredPart,omitempty"`
6945 Gaia int64 `json:"gaia,omitempty,string"`
6946 Id string `json:"id,omitempty"`
6947 Snippet *TestItemTestItemSnippet `json:"snippet,omitempty"`
6948
6949
6950 googleapi.ServerResponse `json:"-"`
6951
6952
6953
6954
6955
6956 ForceSendFields []string `json:"-"`
6957
6958
6959
6960
6961 NullFields []string `json:"-"`
6962 }
6963
6964 func (s *TestItem) MarshalJSON() ([]byte, error) {
6965 type NoMethod TestItem
6966 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6967 }
6968
6969 type TestItemTestItemSnippet struct {
6970 }
6971
6972
6973
6974
6975 type ThirdPartyLink struct {
6976
6977 Etag string `json:"etag,omitempty"`
6978
6979
6980 Kind string `json:"kind,omitempty"`
6981
6982
6983 LinkingToken string `json:"linkingToken,omitempty"`
6984
6985
6986 Snippet *ThirdPartyLinkSnippet `json:"snippet,omitempty"`
6987
6988 Status *ThirdPartyLinkStatus `json:"status,omitempty"`
6989
6990
6991 googleapi.ServerResponse `json:"-"`
6992
6993
6994
6995
6996
6997 ForceSendFields []string `json:"-"`
6998
6999
7000
7001
7002 NullFields []string `json:"-"`
7003 }
7004
7005 func (s *ThirdPartyLink) MarshalJSON() ([]byte, error) {
7006 type NoMethod ThirdPartyLink
7007 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7008 }
7009
7010 type ThirdPartyLinkListResponse struct {
7011
7012 Etag string `json:"etag,omitempty"`
7013 Items []*ThirdPartyLink `json:"items,omitempty"`
7014
7015
7016 Kind string `json:"kind,omitempty"`
7017
7018
7019 googleapi.ServerResponse `json:"-"`
7020
7021
7022
7023
7024
7025 ForceSendFields []string `json:"-"`
7026
7027
7028
7029
7030 NullFields []string `json:"-"`
7031 }
7032
7033 func (s *ThirdPartyLinkListResponse) MarshalJSON() ([]byte, error) {
7034 type NoMethod ThirdPartyLinkListResponse
7035 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7036 }
7037
7038
7039
7040 type ThirdPartyLinkSnippet struct {
7041
7042
7043 ChannelToStoreLink *ChannelToStoreLinkDetails `json:"channelToStoreLink,omitempty"`
7044
7045
7046
7047
7048
7049
7050
7051 Type string `json:"type,omitempty"`
7052
7053
7054
7055
7056
7057 ForceSendFields []string `json:"-"`
7058
7059
7060
7061
7062 NullFields []string `json:"-"`
7063 }
7064
7065 func (s *ThirdPartyLinkSnippet) MarshalJSON() ([]byte, error) {
7066 type NoMethod ThirdPartyLinkSnippet
7067 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7068 }
7069
7070
7071
7072 type ThirdPartyLinkStatus struct {
7073
7074
7075
7076
7077
7078 LinkStatus string `json:"linkStatus,omitempty"`
7079
7080
7081
7082
7083
7084 ForceSendFields []string `json:"-"`
7085
7086
7087
7088
7089 NullFields []string `json:"-"`
7090 }
7091
7092 func (s *ThirdPartyLinkStatus) MarshalJSON() ([]byte, error) {
7093 type NoMethod ThirdPartyLinkStatus
7094 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7095 }
7096
7097
7098 type Thumbnail struct {
7099
7100 Height int64 `json:"height,omitempty"`
7101
7102 Url string `json:"url,omitempty"`
7103
7104 Width int64 `json:"width,omitempty"`
7105
7106
7107
7108
7109
7110 ForceSendFields []string `json:"-"`
7111
7112
7113
7114
7115 NullFields []string `json:"-"`
7116 }
7117
7118 func (s *Thumbnail) MarshalJSON() ([]byte, error) {
7119 type NoMethod Thumbnail
7120 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7121 }
7122
7123
7124
7125 type ThumbnailDetails struct {
7126
7127 Default *Thumbnail `json:"default,omitempty"`
7128
7129 High *Thumbnail `json:"high,omitempty"`
7130
7131 Maxres *Thumbnail `json:"maxres,omitempty"`
7132
7133 Medium *Thumbnail `json:"medium,omitempty"`
7134
7135 Standard *Thumbnail `json:"standard,omitempty"`
7136
7137
7138
7139
7140
7141 ForceSendFields []string `json:"-"`
7142
7143
7144
7145
7146 NullFields []string `json:"-"`
7147 }
7148
7149 func (s *ThumbnailDetails) MarshalJSON() ([]byte, error) {
7150 type NoMethod ThumbnailDetails
7151 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7152 }
7153
7154 type ThumbnailSetResponse struct {
7155
7156 Etag string `json:"etag,omitempty"`
7157
7158 EventId string `json:"eventId,omitempty"`
7159
7160 Items []*ThumbnailDetails `json:"items,omitempty"`
7161
7162
7163 Kind string `json:"kind,omitempty"`
7164
7165 VisitorId string `json:"visitorId,omitempty"`
7166
7167
7168 googleapi.ServerResponse `json:"-"`
7169
7170
7171
7172
7173
7174 ForceSendFields []string `json:"-"`
7175
7176
7177
7178
7179 NullFields []string `json:"-"`
7180 }
7181
7182 func (s *ThumbnailSetResponse) MarshalJSON() ([]byte, error) {
7183 type NoMethod ThumbnailSetResponse
7184 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7185 }
7186
7187
7188 type TokenPagination struct {
7189 }
7190
7191
7192 type Video struct {
7193
7194
7195 AgeGating *VideoAgeGating `json:"ageGating,omitempty"`
7196
7197
7198 ContentDetails *VideoContentDetails `json:"contentDetails,omitempty"`
7199
7200 Etag string `json:"etag,omitempty"`
7201
7202
7203
7204
7205 FileDetails *VideoFileDetails `json:"fileDetails,omitempty"`
7206
7207 Id string `json:"id,omitempty"`
7208
7209
7210 Kind string `json:"kind,omitempty"`
7211
7212
7213
7214 LiveStreamingDetails *VideoLiveStreamingDetails `json:"liveStreamingDetails,omitempty"`
7215
7216
7217 Localizations map[string]VideoLocalization `json:"localizations,omitempty"`
7218
7219
7220 MonetizationDetails *VideoMonetizationDetails `json:"monetizationDetails,omitempty"`
7221
7222
7223 Player *VideoPlayer `json:"player,omitempty"`
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233 ProcessingDetails *VideoProcessingDetails `json:"processingDetails,omitempty"`
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243 ProjectDetails *VideoProjectDetails `json:"projectDetails,omitempty"`
7244
7245
7246 RecordingDetails *VideoRecordingDetails `json:"recordingDetails,omitempty"`
7247
7248
7249 Snippet *VideoSnippet `json:"snippet,omitempty"`
7250
7251 Statistics *VideoStatistics `json:"statistics,omitempty"`
7252
7253
7254 Status *VideoStatus `json:"status,omitempty"`
7255
7256
7257
7258 Suggestions *VideoSuggestions `json:"suggestions,omitempty"`
7259
7260
7261 TopicDetails *VideoTopicDetails `json:"topicDetails,omitempty"`
7262
7263
7264 googleapi.ServerResponse `json:"-"`
7265
7266
7267
7268
7269
7270 ForceSendFields []string `json:"-"`
7271
7272
7273
7274
7275 NullFields []string `json:"-"`
7276 }
7277
7278 func (s *Video) MarshalJSON() ([]byte, error) {
7279 type NoMethod Video
7280 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7281 }
7282
7283 type VideoAbuseReport struct {
7284
7285 Comments string `json:"comments,omitempty"`
7286
7287 Language string `json:"language,omitempty"`
7288
7289
7290 ReasonId string `json:"reasonId,omitempty"`
7291
7292
7293
7294 SecondaryReasonId string `json:"secondaryReasonId,omitempty"`
7295
7296 VideoId string `json:"videoId,omitempty"`
7297
7298
7299
7300
7301
7302 ForceSendFields []string `json:"-"`
7303
7304
7305
7306
7307 NullFields []string `json:"-"`
7308 }
7309
7310 func (s *VideoAbuseReport) MarshalJSON() ([]byte, error) {
7311 type NoMethod VideoAbuseReport
7312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7313 }
7314
7315
7316
7317
7318 type VideoAbuseReportReason struct {
7319
7320 Etag string `json:"etag,omitempty"`
7321
7322 Id string `json:"id,omitempty"`
7323
7324
7325 Kind string `json:"kind,omitempty"`
7326
7327
7328 Snippet *VideoAbuseReportReasonSnippet `json:"snippet,omitempty"`
7329
7330
7331
7332
7333
7334 ForceSendFields []string `json:"-"`
7335
7336
7337
7338
7339 NullFields []string `json:"-"`
7340 }
7341
7342 func (s *VideoAbuseReportReason) MarshalJSON() ([]byte, error) {
7343 type NoMethod VideoAbuseReportReason
7344 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7345 }
7346
7347 type VideoAbuseReportReasonListResponse struct {
7348
7349 Etag string `json:"etag,omitempty"`
7350
7351 EventId string `json:"eventId,omitempty"`
7352
7353 Items []*VideoAbuseReportReason `json:"items,omitempty"`
7354
7355
7356 Kind string `json:"kind,omitempty"`
7357
7358 VisitorId string `json:"visitorId,omitempty"`
7359
7360
7361 googleapi.ServerResponse `json:"-"`
7362
7363
7364
7365
7366
7367 ForceSendFields []string `json:"-"`
7368
7369
7370
7371
7372 NullFields []string `json:"-"`
7373 }
7374
7375 func (s *VideoAbuseReportReasonListResponse) MarshalJSON() ([]byte, error) {
7376 type NoMethod VideoAbuseReportReasonListResponse
7377 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7378 }
7379
7380
7381
7382 type VideoAbuseReportReasonSnippet struct {
7383
7384 Label string `json:"label,omitempty"`
7385
7386
7387 SecondaryReasons []*VideoAbuseReportSecondaryReason `json:"secondaryReasons,omitempty"`
7388
7389
7390
7391
7392
7393 ForceSendFields []string `json:"-"`
7394
7395
7396
7397
7398 NullFields []string `json:"-"`
7399 }
7400
7401 func (s *VideoAbuseReportReasonSnippet) MarshalJSON() ([]byte, error) {
7402 type NoMethod VideoAbuseReportReasonSnippet
7403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7404 }
7405
7406 type VideoAbuseReportSecondaryReason struct {
7407
7408 Id string `json:"id,omitempty"`
7409
7410 Label string `json:"label,omitempty"`
7411
7412
7413
7414
7415
7416 ForceSendFields []string `json:"-"`
7417
7418
7419
7420
7421 NullFields []string `json:"-"`
7422 }
7423
7424 func (s *VideoAbuseReportSecondaryReason) MarshalJSON() ([]byte, error) {
7425 type NoMethod VideoAbuseReportSecondaryReason
7426 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7427 }
7428
7429 type VideoAgeGating struct {
7430
7431
7432
7433 AlcoholContent bool `json:"alcoholContent,omitempty"`
7434
7435
7436
7437
7438 Restricted bool `json:"restricted,omitempty"`
7439
7440
7441
7442
7443
7444
7445
7446 VideoGameRating string `json:"videoGameRating,omitempty"`
7447
7448
7449
7450
7451
7452 ForceSendFields []string `json:"-"`
7453
7454
7455
7456
7457 NullFields []string `json:"-"`
7458 }
7459
7460 func (s *VideoAgeGating) MarshalJSON() ([]byte, error) {
7461 type NoMethod VideoAgeGating
7462 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7463 }
7464
7465
7466
7467 type VideoCategory struct {
7468
7469 Etag string `json:"etag,omitempty"`
7470
7471 Id string `json:"id,omitempty"`
7472
7473
7474 Kind string `json:"kind,omitempty"`
7475
7476
7477 Snippet *VideoCategorySnippet `json:"snippet,omitempty"`
7478
7479
7480
7481
7482
7483 ForceSendFields []string `json:"-"`
7484
7485
7486
7487
7488 NullFields []string `json:"-"`
7489 }
7490
7491 func (s *VideoCategory) MarshalJSON() ([]byte, error) {
7492 type NoMethod VideoCategory
7493 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7494 }
7495
7496 type VideoCategoryListResponse struct {
7497
7498 Etag string `json:"etag,omitempty"`
7499
7500 EventId string `json:"eventId,omitempty"`
7501
7502
7503
7504 Items []*VideoCategory `json:"items,omitempty"`
7505
7506
7507 Kind string `json:"kind,omitempty"`
7508
7509
7510 NextPageToken string `json:"nextPageToken,omitempty"`
7511
7512 PageInfo *PageInfo `json:"pageInfo,omitempty"`
7513
7514
7515 PrevPageToken string `json:"prevPageToken,omitempty"`
7516 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
7517
7518 VisitorId string `json:"visitorId,omitempty"`
7519
7520
7521 googleapi.ServerResponse `json:"-"`
7522
7523
7524
7525
7526
7527 ForceSendFields []string `json:"-"`
7528
7529
7530
7531
7532 NullFields []string `json:"-"`
7533 }
7534
7535 func (s *VideoCategoryListResponse) MarshalJSON() ([]byte, error) {
7536 type NoMethod VideoCategoryListResponse
7537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7538 }
7539
7540
7541
7542 type VideoCategorySnippet struct {
7543 Assignable bool `json:"assignable,omitempty"`
7544
7545 ChannelId string `json:"channelId,omitempty"`
7546
7547 Title string `json:"title,omitempty"`
7548
7549
7550
7551
7552
7553 ForceSendFields []string `json:"-"`
7554
7555
7556
7557
7558 NullFields []string `json:"-"`
7559 }
7560
7561 func (s *VideoCategorySnippet) MarshalJSON() ([]byte, error) {
7562 type NoMethod VideoCategorySnippet
7563 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7564 }
7565
7566
7567 type VideoContentDetails struct {
7568
7569
7570
7571
7572
7573
7574 Caption string `json:"caption,omitempty"`
7575
7576
7577 ContentRating *ContentRating `json:"contentRating,omitempty"`
7578
7579
7580 CountryRestriction *AccessPolicy `json:"countryRestriction,omitempty"`
7581
7582
7583
7584
7585
7586
7587 Definition string `json:"definition,omitempty"`
7588
7589
7590 Dimension string `json:"dimension,omitempty"`
7591
7592
7593
7594
7595
7596
7597
7598 Duration string `json:"duration,omitempty"`
7599
7600
7601
7602 HasCustomThumbnail bool `json:"hasCustomThumbnail,omitempty"`
7603
7604
7605 LicensedContent bool `json:"licensedContent,omitempty"`
7606
7607
7608
7609
7610
7611 Projection string `json:"projection,omitempty"`
7612
7613
7614
7615
7616 RegionRestriction *VideoContentDetailsRegionRestriction `json:"regionRestriction,omitempty"`
7617
7618
7619
7620
7621
7622 ForceSendFields []string `json:"-"`
7623
7624
7625
7626
7627 NullFields []string `json:"-"`
7628 }
7629
7630 func (s *VideoContentDetails) MarshalJSON() ([]byte, error) {
7631 type NoMethod VideoContentDetails
7632 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7633 }
7634
7635
7636
7637 type VideoContentDetailsRegionRestriction struct {
7638
7639
7640
7641
7642
7643 Allowed []string `json:"allowed,omitempty"`
7644
7645
7646
7647
7648 Blocked []string `json:"blocked,omitempty"`
7649
7650
7651
7652
7653
7654 ForceSendFields []string `json:"-"`
7655
7656
7657
7658
7659 NullFields []string `json:"-"`
7660 }
7661
7662 func (s *VideoContentDetailsRegionRestriction) MarshalJSON() ([]byte, error) {
7663 type NoMethod VideoContentDetailsRegionRestriction
7664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7665 }
7666
7667
7668
7669
7670
7671 type VideoFileDetails struct {
7672
7673
7674 AudioStreams []*VideoFileDetailsAudioStream `json:"audioStreams,omitempty"`
7675
7676
7677 BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
7678
7679 Container string `json:"container,omitempty"`
7680
7681
7682
7683
7684 CreationTime string `json:"creationTime,omitempty"`
7685
7686 DurationMs uint64 `json:"durationMs,omitempty,string"`
7687
7688
7689 FileName string `json:"fileName,omitempty"`
7690
7691
7692 FileSize uint64 `json:"fileSize,omitempty,string"`
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706 FileType string `json:"fileType,omitempty"`
7707
7708
7709 VideoStreams []*VideoFileDetailsVideoStream `json:"videoStreams,omitempty"`
7710
7711
7712
7713
7714
7715 ForceSendFields []string `json:"-"`
7716
7717
7718
7719
7720 NullFields []string `json:"-"`
7721 }
7722
7723 func (s *VideoFileDetails) MarshalJSON() ([]byte, error) {
7724 type NoMethod VideoFileDetails
7725 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7726 }
7727
7728
7729 type VideoFileDetailsAudioStream struct {
7730
7731 BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
7732
7733 ChannelCount int64 `json:"channelCount,omitempty"`
7734
7735 Codec string `json:"codec,omitempty"`
7736
7737
7738 Vendor string `json:"vendor,omitempty"`
7739
7740
7741
7742
7743
7744 ForceSendFields []string `json:"-"`
7745
7746
7747
7748
7749 NullFields []string `json:"-"`
7750 }
7751
7752 func (s *VideoFileDetailsAudioStream) MarshalJSON() ([]byte, error) {
7753 type NoMethod VideoFileDetailsAudioStream
7754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7755 }
7756
7757
7758 type VideoFileDetailsVideoStream struct {
7759
7760
7761 AspectRatio float64 `json:"aspectRatio,omitempty"`
7762
7763 BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
7764
7765 Codec string `json:"codec,omitempty"`
7766
7767 FrameRateFps float64 `json:"frameRateFps,omitempty"`
7768
7769 HeightPixels int64 `json:"heightPixels,omitempty"`
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779 Rotation string `json:"rotation,omitempty"`
7780
7781
7782 Vendor string `json:"vendor,omitempty"`
7783
7784
7785 WidthPixels int64 `json:"widthPixels,omitempty"`
7786
7787
7788
7789
7790
7791 ForceSendFields []string `json:"-"`
7792
7793
7794
7795
7796 NullFields []string `json:"-"`
7797 }
7798
7799 func (s *VideoFileDetailsVideoStream) MarshalJSON() ([]byte, error) {
7800 type NoMethod VideoFileDetailsVideoStream
7801 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7802 }
7803
7804 func (s *VideoFileDetailsVideoStream) UnmarshalJSON(data []byte) error {
7805 type NoMethod VideoFileDetailsVideoStream
7806 var s1 struct {
7807 AspectRatio gensupport.JSONFloat64 `json:"aspectRatio"`
7808 FrameRateFps gensupport.JSONFloat64 `json:"frameRateFps"`
7809 *NoMethod
7810 }
7811 s1.NoMethod = (*NoMethod)(s)
7812 if err := json.Unmarshal(data, &s1); err != nil {
7813 return err
7814 }
7815 s.AspectRatio = float64(s1.AspectRatio)
7816 s.FrameRateFps = float64(s1.FrameRateFps)
7817 return nil
7818 }
7819
7820 type VideoGetRatingResponse struct {
7821
7822 Etag string `json:"etag,omitempty"`
7823
7824 EventId string `json:"eventId,omitempty"`
7825
7826 Items []*VideoRating `json:"items,omitempty"`
7827
7828
7829 Kind string `json:"kind,omitempty"`
7830
7831 VisitorId string `json:"visitorId,omitempty"`
7832
7833
7834 googleapi.ServerResponse `json:"-"`
7835
7836
7837
7838
7839
7840 ForceSendFields []string `json:"-"`
7841
7842
7843
7844
7845 NullFields []string `json:"-"`
7846 }
7847
7848 func (s *VideoGetRatingResponse) MarshalJSON() ([]byte, error) {
7849 type NoMethod VideoGetRatingResponse
7850 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7851 }
7852
7853 type VideoListResponse struct {
7854
7855 Etag string `json:"etag,omitempty"`
7856
7857 EventId string `json:"eventId,omitempty"`
7858 Items []*Video `json:"items,omitempty"`
7859
7860
7861 Kind string `json:"kind,omitempty"`
7862
7863
7864 NextPageToken string `json:"nextPageToken,omitempty"`
7865
7866 PageInfo *PageInfo `json:"pageInfo,omitempty"`
7867
7868
7869 PrevPageToken string `json:"prevPageToken,omitempty"`
7870 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
7871
7872 VisitorId string `json:"visitorId,omitempty"`
7873
7874
7875 googleapi.ServerResponse `json:"-"`
7876
7877
7878
7879
7880
7881 ForceSendFields []string `json:"-"`
7882
7883
7884
7885
7886 NullFields []string `json:"-"`
7887 }
7888
7889 func (s *VideoListResponse) MarshalJSON() ([]byte, error) {
7890 type NoMethod VideoListResponse
7891 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7892 }
7893
7894
7895 type VideoLiveStreamingDetails struct {
7896
7897
7898
7899
7900
7901
7902 ActiveLiveChatId string `json:"activeLiveChatId,omitempty"`
7903
7904
7905 ActualEndTime string `json:"actualEndTime,omitempty"`
7906
7907
7908 ActualStartTime string `json:"actualStartTime,omitempty"`
7909
7910
7911
7912
7913
7914
7915
7916 ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"`
7917
7918
7919
7920 ScheduledEndTime string `json:"scheduledEndTime,omitempty"`
7921
7922 ScheduledStartTime string `json:"scheduledStartTime,omitempty"`
7923
7924
7925
7926
7927
7928 ForceSendFields []string `json:"-"`
7929
7930
7931
7932
7933 NullFields []string `json:"-"`
7934 }
7935
7936 func (s *VideoLiveStreamingDetails) MarshalJSON() ([]byte, error) {
7937 type NoMethod VideoLiveStreamingDetails
7938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7939 }
7940
7941
7942
7943 type VideoLocalization struct {
7944
7945 Description string `json:"description,omitempty"`
7946
7947 Title string `json:"title,omitempty"`
7948
7949
7950
7951
7952
7953 ForceSendFields []string `json:"-"`
7954
7955
7956
7957
7958 NullFields []string `json:"-"`
7959 }
7960
7961 func (s *VideoLocalization) MarshalJSON() ([]byte, error) {
7962 type NoMethod VideoLocalization
7963 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7964 }
7965
7966
7967 type VideoMonetizationDetails struct {
7968
7969
7970 Access *AccessPolicy `json:"access,omitempty"`
7971
7972
7973
7974
7975
7976 ForceSendFields []string `json:"-"`
7977
7978
7979
7980
7981 NullFields []string `json:"-"`
7982 }
7983
7984 func (s *VideoMonetizationDetails) MarshalJSON() ([]byte, error) {
7985 type NoMethod VideoMonetizationDetails
7986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7987 }
7988
7989
7990 type VideoPlayer struct {
7991 EmbedHeight int64 `json:"embedHeight,omitempty,string"`
7992
7993 EmbedHtml string `json:"embedHtml,omitempty"`
7994
7995 EmbedWidth int64 `json:"embedWidth,omitempty,string"`
7996
7997
7998
7999
8000
8001 ForceSendFields []string `json:"-"`
8002
8003
8004
8005
8006 NullFields []string `json:"-"`
8007 }
8008
8009 func (s *VideoPlayer) MarshalJSON() ([]byte, error) {
8010 type NoMethod VideoPlayer
8011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8012 }
8013
8014
8015
8016 type VideoProcessingDetails struct {
8017
8018
8019
8020
8021 EditorSuggestionsAvailability string `json:"editorSuggestionsAvailability,omitempty"`
8022
8023
8024
8025 FileDetailsAvailability string `json:"fileDetailsAvailability,omitempty"`
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035 ProcessingFailureReason string `json:"processingFailureReason,omitempty"`
8036
8037
8038
8039
8040
8041
8042 ProcessingIssuesAvailability string `json:"processingIssuesAvailability,omitempty"`
8043
8044
8045
8046 ProcessingProgress *VideoProcessingDetailsProcessingProgress `json:"processingProgress,omitempty"`
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056 ProcessingStatus string `json:"processingStatus,omitempty"`
8057
8058
8059
8060
8061
8062 TagSuggestionsAvailability string `json:"tagSuggestionsAvailability,omitempty"`
8063
8064
8065 ThumbnailsAvailability string `json:"thumbnailsAvailability,omitempty"`
8066
8067
8068
8069
8070
8071 ForceSendFields []string `json:"-"`
8072
8073
8074
8075
8076 NullFields []string `json:"-"`
8077 }
8078
8079 func (s *VideoProcessingDetails) MarshalJSON() ([]byte, error) {
8080 type NoMethod VideoProcessingDetails
8081 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8082 }
8083
8084
8085
8086 type VideoProcessingDetailsProcessingProgress struct {
8087
8088
8089
8090
8091
8092
8093
8094 PartsProcessed uint64 `json:"partsProcessed,omitempty,string"`
8095
8096
8097
8098 PartsTotal uint64 `json:"partsTotal,omitempty,string"`
8099
8100
8101 TimeLeftMs uint64 `json:"timeLeftMs,omitempty,string"`
8102
8103
8104
8105
8106
8107 ForceSendFields []string `json:"-"`
8108
8109
8110
8111
8112 NullFields []string `json:"-"`
8113 }
8114
8115 func (s *VideoProcessingDetailsProcessingProgress) MarshalJSON() ([]byte, error) {
8116 type NoMethod VideoProcessingDetailsProcessingProgress
8117 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8118 }
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128 type VideoProjectDetails struct {
8129 }
8130
8131
8132 type VideoRating struct {
8133
8134
8135
8136
8137
8138
8139 Rating string `json:"rating,omitempty"`
8140
8141 VideoId string `json:"videoId,omitempty"`
8142
8143
8144
8145
8146
8147 ForceSendFields []string `json:"-"`
8148
8149
8150
8151
8152 NullFields []string `json:"-"`
8153 }
8154
8155 func (s *VideoRating) MarshalJSON() ([]byte, error) {
8156 type NoMethod VideoRating
8157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8158 }
8159
8160
8161 type VideoRecordingDetails struct {
8162
8163 Location *GeoPoint `json:"location,omitempty"`
8164
8165
8166 LocationDescription string `json:"locationDescription,omitempty"`
8167
8168 RecordingDate string `json:"recordingDate,omitempty"`
8169
8170
8171
8172
8173
8174 ForceSendFields []string `json:"-"`
8175
8176
8177
8178
8179 NullFields []string `json:"-"`
8180 }
8181
8182 func (s *VideoRecordingDetails) MarshalJSON() ([]byte, error) {
8183 type NoMethod VideoRecordingDetails
8184 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8185 }
8186
8187
8188
8189 type VideoSnippet struct {
8190
8191 CategoryId string `json:"categoryId,omitempty"`
8192
8193
8194 ChannelId string `json:"channelId,omitempty"`
8195
8196 ChannelTitle string `json:"channelTitle,omitempty"`
8197
8198
8199 DefaultAudioLanguage string `json:"defaultAudioLanguage,omitempty"`
8200
8201 DefaultLanguage string `json:"defaultLanguage,omitempty"`
8202
8203
8204 Description string `json:"description,omitempty"`
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214 LiveBroadcastContent string `json:"liveBroadcastContent,omitempty"`
8215
8216
8217
8218 Localized *VideoLocalization `json:"localized,omitempty"`
8219
8220 PublishedAt string `json:"publishedAt,omitempty"`
8221
8222
8223 Tags []string `json:"tags,omitempty"`
8224
8225
8226
8227 Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
8228
8229
8230 Title string `json:"title,omitempty"`
8231
8232
8233
8234
8235
8236 ForceSendFields []string `json:"-"`
8237
8238
8239
8240
8241 NullFields []string `json:"-"`
8242 }
8243
8244 func (s *VideoSnippet) MarshalJSON() ([]byte, error) {
8245 type NoMethod VideoSnippet
8246 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8247 }
8248
8249
8250
8251 type VideoStatistics struct {
8252
8253 CommentCount uint64 `json:"commentCount,omitempty,string"`
8254
8255
8256 DislikeCount uint64 `json:"dislikeCount,omitempty,string"`
8257
8258
8259 FavoriteCount uint64 `json:"favoriteCount,omitempty,string"`
8260
8261
8262 LikeCount uint64 `json:"likeCount,omitempty,string"`
8263
8264 ViewCount uint64 `json:"viewCount,omitempty,string"`
8265
8266
8267
8268
8269
8270 ForceSendFields []string `json:"-"`
8271
8272
8273
8274
8275 NullFields []string `json:"-"`
8276 }
8277
8278 func (s *VideoStatistics) MarshalJSON() ([]byte, error) {
8279 type NoMethod VideoStatistics
8280 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8281 }
8282
8283
8284
8285 type VideoStatus struct {
8286
8287
8288 Embeddable bool `json:"embeddable,omitempty"`
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300 FailureReason string `json:"failureReason,omitempty"`
8301
8302
8303
8304
8305
8306
8307 License string `json:"license,omitempty"`
8308 MadeForKids bool `json:"madeForKids,omitempty"`
8309
8310
8311
8312
8313
8314
8315 PrivacyStatus string `json:"privacyStatus,omitempty"`
8316
8317
8318
8319
8320 PublicStatsViewable bool `json:"publicStatsViewable,omitempty"`
8321
8322
8323 PublishAt string `json:"publishAt,omitempty"`
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339 RejectionReason string `json:"rejectionReason,omitempty"`
8340 SelfDeclaredMadeForKids bool `json:"selfDeclaredMadeForKids,omitempty"`
8341
8342
8343
8344
8345
8346
8347
8348
8349 UploadStatus string `json:"uploadStatus,omitempty"`
8350
8351
8352
8353
8354
8355 ForceSendFields []string `json:"-"`
8356
8357
8358
8359
8360 NullFields []string `json:"-"`
8361 }
8362
8363 func (s *VideoStatus) MarshalJSON() ([]byte, error) {
8364 type NoMethod VideoStatus
8365 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8366 }
8367
8368
8369
8370 type VideoSuggestions struct {
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382 EditorSuggestions []string `json:"editorSuggestions,omitempty"`
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397 ProcessingErrors []string `json:"processingErrors,omitempty"`
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410 ProcessingHints []string `json:"processingHints,omitempty"`
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437 ProcessingWarnings []string `json:"processingWarnings,omitempty"`
8438
8439
8440
8441 TagSuggestions []*VideoSuggestionsTagSuggestion `json:"tagSuggestions,omitempty"`
8442
8443
8444
8445
8446
8447 ForceSendFields []string `json:"-"`
8448
8449
8450
8451
8452 NullFields []string `json:"-"`
8453 }
8454
8455 func (s *VideoSuggestions) MarshalJSON() ([]byte, error) {
8456 type NoMethod VideoSuggestions
8457 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8458 }
8459
8460
8461
8462 type VideoSuggestionsTagSuggestion struct {
8463
8464
8465
8466
8467
8468 CategoryRestricts []string `json:"categoryRestricts,omitempty"`
8469
8470 Tag string `json:"tag,omitempty"`
8471
8472
8473
8474
8475
8476 ForceSendFields []string `json:"-"`
8477
8478
8479
8480
8481 NullFields []string `json:"-"`
8482 }
8483
8484 func (s *VideoSuggestionsTagSuggestion) MarshalJSON() ([]byte, error) {
8485 type NoMethod VideoSuggestionsTagSuggestion
8486 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8487 }
8488
8489
8490 type VideoTopicDetails struct {
8491
8492
8493
8494
8495 RelevantTopicIds []string `json:"relevantTopicIds,omitempty"`
8496
8497
8498 TopicCategories []string `json:"topicCategories,omitempty"`
8499
8500
8501
8502
8503
8504 TopicIds []string `json:"topicIds,omitempty"`
8505
8506
8507
8508
8509
8510 ForceSendFields []string `json:"-"`
8511
8512
8513
8514
8515 NullFields []string `json:"-"`
8516 }
8517
8518 func (s *VideoTopicDetails) MarshalJSON() ([]byte, error) {
8519 type NoMethod VideoTopicDetails
8520 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8521 }
8522
8523
8524 type WatchSettings struct {
8525
8526 BackgroundColor string `json:"backgroundColor,omitempty"`
8527
8528
8529 FeaturedPlaylistId string `json:"featuredPlaylistId,omitempty"`
8530
8531 TextColor string `json:"textColor,omitempty"`
8532
8533
8534
8535
8536
8537 ForceSendFields []string `json:"-"`
8538
8539
8540
8541
8542 NullFields []string `json:"-"`
8543 }
8544
8545 func (s *WatchSettings) MarshalJSON() ([]byte, error) {
8546 type NoMethod WatchSettings
8547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8548 }
8549
8550 type AbuseReportsInsertCall struct {
8551 s *Service
8552 abusereport *AbuseReport
8553 urlParams_ gensupport.URLParams
8554 ctx_ context.Context
8555 header_ http.Header
8556 }
8557
8558
8559
8560
8561
8562
8563 func (r *AbuseReportsService) Insert(part []string, abusereport *AbuseReport) *AbuseReportsInsertCall {
8564 c := &AbuseReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8565 c.urlParams_.SetMulti("part", append([]string{}, part...))
8566 c.abusereport = abusereport
8567 return c
8568 }
8569
8570
8571
8572
8573 func (c *AbuseReportsInsertCall) Fields(s ...googleapi.Field) *AbuseReportsInsertCall {
8574 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8575 return c
8576 }
8577
8578
8579 func (c *AbuseReportsInsertCall) Context(ctx context.Context) *AbuseReportsInsertCall {
8580 c.ctx_ = ctx
8581 return c
8582 }
8583
8584
8585
8586 func (c *AbuseReportsInsertCall) Header() http.Header {
8587 if c.header_ == nil {
8588 c.header_ = make(http.Header)
8589 }
8590 return c.header_
8591 }
8592
8593 func (c *AbuseReportsInsertCall) doRequest(alt string) (*http.Response, error) {
8594 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8595 var body io.Reader = nil
8596 body, err := googleapi.WithoutDataWrapper.JSONReader(c.abusereport)
8597 if err != nil {
8598 return nil, err
8599 }
8600 c.urlParams_.Set("alt", alt)
8601 c.urlParams_.Set("prettyPrint", "false")
8602 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/abuseReports")
8603 urls += "?" + c.urlParams_.Encode()
8604 req, err := http.NewRequest("POST", urls, body)
8605 if err != nil {
8606 return nil, err
8607 }
8608 req.Header = reqHeaders
8609 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8610 }
8611
8612
8613
8614
8615
8616
8617 func (c *AbuseReportsInsertCall) Do(opts ...googleapi.CallOption) (*AbuseReport, error) {
8618 gensupport.SetOptions(c.urlParams_, opts...)
8619 res, err := c.doRequest("json")
8620 if res != nil && res.StatusCode == http.StatusNotModified {
8621 if res.Body != nil {
8622 res.Body.Close()
8623 }
8624 return nil, gensupport.WrapError(&googleapi.Error{
8625 Code: res.StatusCode,
8626 Header: res.Header,
8627 })
8628 }
8629 if err != nil {
8630 return nil, err
8631 }
8632 defer googleapi.CloseBody(res)
8633 if err := googleapi.CheckResponse(res); err != nil {
8634 return nil, gensupport.WrapError(err)
8635 }
8636 ret := &AbuseReport{
8637 ServerResponse: googleapi.ServerResponse{
8638 Header: res.Header,
8639 HTTPStatusCode: res.StatusCode,
8640 },
8641 }
8642 target := &ret
8643 if err := gensupport.DecodeResponse(target, res); err != nil {
8644 return nil, err
8645 }
8646 return ret, nil
8647 }
8648
8649 type ActivitiesListCall struct {
8650 s *Service
8651 urlParams_ gensupport.URLParams
8652 ifNoneMatch_ string
8653 ctx_ context.Context
8654 header_ http.Header
8655 }
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667 func (r *ActivitiesService) List(part []string) *ActivitiesListCall {
8668 c := &ActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8669 c.urlParams_.SetMulti("part", append([]string{}, part...))
8670 return c
8671 }
8672
8673
8674 func (c *ActivitiesListCall) ChannelId(channelId string) *ActivitiesListCall {
8675 c.urlParams_.Set("channelId", channelId)
8676 return c
8677 }
8678
8679
8680 func (c *ActivitiesListCall) Home(home bool) *ActivitiesListCall {
8681 c.urlParams_.Set("home", fmt.Sprint(home))
8682 return c
8683 }
8684
8685
8686
8687
8688 func (c *ActivitiesListCall) MaxResults(maxResults int64) *ActivitiesListCall {
8689 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8690 return c
8691 }
8692
8693
8694 func (c *ActivitiesListCall) Mine(mine bool) *ActivitiesListCall {
8695 c.urlParams_.Set("mine", fmt.Sprint(mine))
8696 return c
8697 }
8698
8699
8700
8701
8702
8703 func (c *ActivitiesListCall) PageToken(pageToken string) *ActivitiesListCall {
8704 c.urlParams_.Set("pageToken", pageToken)
8705 return c
8706 }
8707
8708
8709 func (c *ActivitiesListCall) PublishedAfter(publishedAfter string) *ActivitiesListCall {
8710 c.urlParams_.Set("publishedAfter", publishedAfter)
8711 return c
8712 }
8713
8714
8715 func (c *ActivitiesListCall) PublishedBefore(publishedBefore string) *ActivitiesListCall {
8716 c.urlParams_.Set("publishedBefore", publishedBefore)
8717 return c
8718 }
8719
8720
8721 func (c *ActivitiesListCall) RegionCode(regionCode string) *ActivitiesListCall {
8722 c.urlParams_.Set("regionCode", regionCode)
8723 return c
8724 }
8725
8726
8727
8728
8729 func (c *ActivitiesListCall) Fields(s ...googleapi.Field) *ActivitiesListCall {
8730 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8731 return c
8732 }
8733
8734
8735
8736
8737 func (c *ActivitiesListCall) IfNoneMatch(entityTag string) *ActivitiesListCall {
8738 c.ifNoneMatch_ = entityTag
8739 return c
8740 }
8741
8742
8743 func (c *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
8744 c.ctx_ = ctx
8745 return c
8746 }
8747
8748
8749
8750 func (c *ActivitiesListCall) Header() http.Header {
8751 if c.header_ == nil {
8752 c.header_ = make(http.Header)
8753 }
8754 return c.header_
8755 }
8756
8757 func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
8758 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8759 if c.ifNoneMatch_ != "" {
8760 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8761 }
8762 var body io.Reader = nil
8763 c.urlParams_.Set("alt", alt)
8764 c.urlParams_.Set("prettyPrint", "false")
8765 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/activities")
8766 urls += "?" + c.urlParams_.Encode()
8767 req, err := http.NewRequest("GET", urls, body)
8768 if err != nil {
8769 return nil, err
8770 }
8771 req.Header = reqHeaders
8772 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8773 }
8774
8775
8776
8777
8778
8779
8780
8781 func (c *ActivitiesListCall) Do(opts ...googleapi.CallOption) (*ActivityListResponse, error) {
8782 gensupport.SetOptions(c.urlParams_, opts...)
8783 res, err := c.doRequest("json")
8784 if res != nil && res.StatusCode == http.StatusNotModified {
8785 if res.Body != nil {
8786 res.Body.Close()
8787 }
8788 return nil, gensupport.WrapError(&googleapi.Error{
8789 Code: res.StatusCode,
8790 Header: res.Header,
8791 })
8792 }
8793 if err != nil {
8794 return nil, err
8795 }
8796 defer googleapi.CloseBody(res)
8797 if err := googleapi.CheckResponse(res); err != nil {
8798 return nil, gensupport.WrapError(err)
8799 }
8800 ret := &ActivityListResponse{
8801 ServerResponse: googleapi.ServerResponse{
8802 Header: res.Header,
8803 HTTPStatusCode: res.StatusCode,
8804 },
8805 }
8806 target := &ret
8807 if err := gensupport.DecodeResponse(target, res); err != nil {
8808 return nil, err
8809 }
8810 return ret, nil
8811 }
8812
8813
8814
8815
8816 func (c *ActivitiesListCall) Pages(ctx context.Context, f func(*ActivityListResponse) error) error {
8817 c.ctx_ = ctx
8818 defer c.PageToken(c.urlParams_.Get("pageToken"))
8819 for {
8820 x, err := c.Do()
8821 if err != nil {
8822 return err
8823 }
8824 if err := f(x); err != nil {
8825 return err
8826 }
8827 if x.NextPageToken == "" {
8828 return nil
8829 }
8830 c.PageToken(x.NextPageToken)
8831 }
8832 }
8833
8834 type CaptionsDeleteCall struct {
8835 s *Service
8836 urlParams_ gensupport.URLParams
8837 ctx_ context.Context
8838 header_ http.Header
8839 }
8840
8841
8842
8843
8844 func (r *CaptionsService) Delete(id string) *CaptionsDeleteCall {
8845 c := &CaptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8846 c.urlParams_.Set("id", id)
8847 return c
8848 }
8849
8850
8851
8852 func (c *CaptionsDeleteCall) OnBehalfOf(onBehalfOf string) *CaptionsDeleteCall {
8853 c.urlParams_.Set("onBehalfOf", onBehalfOf)
8854 return c
8855 }
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868 func (c *CaptionsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsDeleteCall {
8869 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
8870 return c
8871 }
8872
8873
8874
8875
8876 func (c *CaptionsDeleteCall) Fields(s ...googleapi.Field) *CaptionsDeleteCall {
8877 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8878 return c
8879 }
8880
8881
8882 func (c *CaptionsDeleteCall) Context(ctx context.Context) *CaptionsDeleteCall {
8883 c.ctx_ = ctx
8884 return c
8885 }
8886
8887
8888
8889 func (c *CaptionsDeleteCall) Header() http.Header {
8890 if c.header_ == nil {
8891 c.header_ = make(http.Header)
8892 }
8893 return c.header_
8894 }
8895
8896 func (c *CaptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
8897 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8898 var body io.Reader = nil
8899 c.urlParams_.Set("alt", alt)
8900 c.urlParams_.Set("prettyPrint", "false")
8901 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
8902 urls += "?" + c.urlParams_.Encode()
8903 req, err := http.NewRequest("DELETE", urls, body)
8904 if err != nil {
8905 return nil, err
8906 }
8907 req.Header = reqHeaders
8908 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8909 }
8910
8911
8912 func (c *CaptionsDeleteCall) Do(opts ...googleapi.CallOption) error {
8913 gensupport.SetOptions(c.urlParams_, opts...)
8914 res, err := c.doRequest("json")
8915 if err != nil {
8916 return err
8917 }
8918 defer googleapi.CloseBody(res)
8919 if err := googleapi.CheckResponse(res); err != nil {
8920 return gensupport.WrapError(err)
8921 }
8922 return nil
8923 }
8924
8925 type CaptionsDownloadCall struct {
8926 s *Service
8927 id string
8928 urlParams_ gensupport.URLParams
8929 ifNoneMatch_ string
8930 ctx_ context.Context
8931 header_ http.Header
8932 }
8933
8934
8935
8936
8937 func (r *CaptionsService) Download(id string) *CaptionsDownloadCall {
8938 c := &CaptionsDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8939 c.id = id
8940 return c
8941 }
8942
8943
8944
8945 func (c *CaptionsDownloadCall) OnBehalfOf(onBehalfOf string) *CaptionsDownloadCall {
8946 c.urlParams_.Set("onBehalfOf", onBehalfOf)
8947 return c
8948 }
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961 func (c *CaptionsDownloadCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsDownloadCall {
8962 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
8963 return c
8964 }
8965
8966
8967
8968 func (c *CaptionsDownloadCall) Tfmt(tfmt string) *CaptionsDownloadCall {
8969 c.urlParams_.Set("tfmt", tfmt)
8970 return c
8971 }
8972
8973
8974
8975 func (c *CaptionsDownloadCall) Tlang(tlang string) *CaptionsDownloadCall {
8976 c.urlParams_.Set("tlang", tlang)
8977 return c
8978 }
8979
8980
8981
8982
8983 func (c *CaptionsDownloadCall) Fields(s ...googleapi.Field) *CaptionsDownloadCall {
8984 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8985 return c
8986 }
8987
8988
8989
8990
8991 func (c *CaptionsDownloadCall) IfNoneMatch(entityTag string) *CaptionsDownloadCall {
8992 c.ifNoneMatch_ = entityTag
8993 return c
8994 }
8995
8996
8997 func (c *CaptionsDownloadCall) Context(ctx context.Context) *CaptionsDownloadCall {
8998 c.ctx_ = ctx
8999 return c
9000 }
9001
9002
9003
9004 func (c *CaptionsDownloadCall) Header() http.Header {
9005 if c.header_ == nil {
9006 c.header_ = make(http.Header)
9007 }
9008 return c.header_
9009 }
9010
9011 func (c *CaptionsDownloadCall) doRequest(alt string) (*http.Response, error) {
9012 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9013 if c.ifNoneMatch_ != "" {
9014 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9015 }
9016 var body io.Reader = nil
9017 c.urlParams_.Set("alt", alt)
9018 c.urlParams_.Set("prettyPrint", "false")
9019 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions/{id}")
9020 urls += "?" + c.urlParams_.Encode()
9021 req, err := http.NewRequest("GET", urls, body)
9022 if err != nil {
9023 return nil, err
9024 }
9025 req.Header = reqHeaders
9026 googleapi.Expand(req.URL, map[string]string{
9027 "id": c.id,
9028 })
9029 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9030 }
9031
9032
9033
9034
9035 func (c *CaptionsDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
9036 gensupport.SetOptions(c.urlParams_, opts...)
9037 res, err := c.doRequest("media")
9038 if err != nil {
9039 return nil, err
9040 }
9041 if err := googleapi.CheckResponse(res); err != nil {
9042 res.Body.Close()
9043 return nil, gensupport.WrapError(err)
9044 }
9045 return res, nil
9046 }
9047
9048
9049 func (c *CaptionsDownloadCall) Do(opts ...googleapi.CallOption) error {
9050 gensupport.SetOptions(c.urlParams_, opts...)
9051 res, err := c.doRequest("json")
9052 if err != nil {
9053 return err
9054 }
9055 defer googleapi.CloseBody(res)
9056 if err := googleapi.CheckResponse(res); err != nil {
9057 return gensupport.WrapError(err)
9058 }
9059 return nil
9060 }
9061
9062 type CaptionsInsertCall struct {
9063 s *Service
9064 caption *Caption
9065 urlParams_ gensupport.URLParams
9066 mediaInfo_ *gensupport.MediaInfo
9067 ctx_ context.Context
9068 header_ http.Header
9069 }
9070
9071
9072
9073
9074
9075 func (r *CaptionsService) Insert(part []string, caption *Caption) *CaptionsInsertCall {
9076 c := &CaptionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9077 c.urlParams_.SetMulti("part", append([]string{}, part...))
9078 c.caption = caption
9079 return c
9080 }
9081
9082
9083
9084 func (c *CaptionsInsertCall) OnBehalfOf(onBehalfOf string) *CaptionsInsertCall {
9085 c.urlParams_.Set("onBehalfOf", onBehalfOf)
9086 return c
9087 }
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100 func (c *CaptionsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsInsertCall {
9101 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
9102 return c
9103 }
9104
9105
9106
9107 func (c *CaptionsInsertCall) Sync(sync bool) *CaptionsInsertCall {
9108 c.urlParams_.Set("sync", fmt.Sprint(sync))
9109 return c
9110 }
9111
9112
9113
9114
9115
9116
9117
9118
9119 func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsInsertCall {
9120 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
9121 return c
9122 }
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133 func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsInsertCall {
9134 c.ctx_ = ctx
9135 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
9136 return c
9137 }
9138
9139
9140
9141
9142
9143 func (c *CaptionsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsInsertCall {
9144 c.mediaInfo_.SetProgressUpdater(pu)
9145 return c
9146 }
9147
9148
9149
9150
9151 func (c *CaptionsInsertCall) Fields(s ...googleapi.Field) *CaptionsInsertCall {
9152 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9153 return c
9154 }
9155
9156
9157
9158
9159 func (c *CaptionsInsertCall) Context(ctx context.Context) *CaptionsInsertCall {
9160 c.ctx_ = ctx
9161 return c
9162 }
9163
9164
9165
9166 func (c *CaptionsInsertCall) Header() http.Header {
9167 if c.header_ == nil {
9168 c.header_ = make(http.Header)
9169 }
9170 return c.header_
9171 }
9172
9173 func (c *CaptionsInsertCall) doRequest(alt string) (*http.Response, error) {
9174 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9175 var body io.Reader = nil
9176 body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
9177 if err != nil {
9178 return nil, err
9179 }
9180 c.urlParams_.Set("alt", alt)
9181 c.urlParams_.Set("prettyPrint", "false")
9182 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
9183 if c.mediaInfo_ != nil {
9184 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/captions")
9185 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
9186 }
9187 if body == nil {
9188 body = new(bytes.Buffer)
9189 reqHeaders.Set("Content-Type", "application/json")
9190 }
9191 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
9192 defer cleanup()
9193 urls += "?" + c.urlParams_.Encode()
9194 req, err := http.NewRequest("POST", urls, body)
9195 if err != nil {
9196 return nil, err
9197 }
9198 req.Header = reqHeaders
9199 req.GetBody = getBody
9200 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9201 }
9202
9203
9204
9205
9206
9207
9208 func (c *CaptionsInsertCall) Do(opts ...googleapi.CallOption) (*Caption, error) {
9209 gensupport.SetOptions(c.urlParams_, opts...)
9210 res, err := c.doRequest("json")
9211 if res != nil && res.StatusCode == http.StatusNotModified {
9212 if res.Body != nil {
9213 res.Body.Close()
9214 }
9215 return nil, gensupport.WrapError(&googleapi.Error{
9216 Code: res.StatusCode,
9217 Header: res.Header,
9218 })
9219 }
9220 if err != nil {
9221 return nil, err
9222 }
9223 defer googleapi.CloseBody(res)
9224 if err := googleapi.CheckResponse(res); err != nil {
9225 return nil, gensupport.WrapError(err)
9226 }
9227 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
9228 if rx != nil {
9229 rx.Client = c.s.client
9230 rx.UserAgent = c.s.userAgent()
9231 ctx := c.ctx_
9232 if ctx == nil {
9233 ctx = context.TODO()
9234 }
9235 res, err = rx.Upload(ctx)
9236 if err != nil {
9237 return nil, err
9238 }
9239 defer res.Body.Close()
9240 if err := googleapi.CheckResponse(res); err != nil {
9241 return nil, gensupport.WrapError(err)
9242 }
9243 }
9244 ret := &Caption{
9245 ServerResponse: googleapi.ServerResponse{
9246 Header: res.Header,
9247 HTTPStatusCode: res.StatusCode,
9248 },
9249 }
9250 target := &ret
9251 if err := gensupport.DecodeResponse(target, res); err != nil {
9252 return nil, err
9253 }
9254 return ret, nil
9255 }
9256
9257 type CaptionsListCall struct {
9258 s *Service
9259 urlParams_ gensupport.URLParams
9260 ifNoneMatch_ string
9261 ctx_ context.Context
9262 header_ http.Header
9263 }
9264
9265
9266
9267
9268
9269
9270
9271 func (r *CaptionsService) List(part []string, videoId string) *CaptionsListCall {
9272 c := &CaptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9273 c.urlParams_.SetMulti("part", append([]string{}, part...))
9274 c.urlParams_.Set("videoId", videoId)
9275 return c
9276 }
9277
9278
9279
9280 func (c *CaptionsListCall) Id(id ...string) *CaptionsListCall {
9281 c.urlParams_.SetMulti("id", append([]string{}, id...))
9282 return c
9283 }
9284
9285
9286
9287 func (c *CaptionsListCall) OnBehalfOf(onBehalfOf string) *CaptionsListCall {
9288 c.urlParams_.Set("onBehalfOf", onBehalfOf)
9289 return c
9290 }
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303 func (c *CaptionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsListCall {
9304 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
9305 return c
9306 }
9307
9308
9309
9310
9311 func (c *CaptionsListCall) Fields(s ...googleapi.Field) *CaptionsListCall {
9312 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9313 return c
9314 }
9315
9316
9317
9318
9319 func (c *CaptionsListCall) IfNoneMatch(entityTag string) *CaptionsListCall {
9320 c.ifNoneMatch_ = entityTag
9321 return c
9322 }
9323
9324
9325 func (c *CaptionsListCall) Context(ctx context.Context) *CaptionsListCall {
9326 c.ctx_ = ctx
9327 return c
9328 }
9329
9330
9331
9332 func (c *CaptionsListCall) Header() http.Header {
9333 if c.header_ == nil {
9334 c.header_ = make(http.Header)
9335 }
9336 return c.header_
9337 }
9338
9339 func (c *CaptionsListCall) doRequest(alt string) (*http.Response, error) {
9340 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9341 if c.ifNoneMatch_ != "" {
9342 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9343 }
9344 var body io.Reader = nil
9345 c.urlParams_.Set("alt", alt)
9346 c.urlParams_.Set("prettyPrint", "false")
9347 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
9348 urls += "?" + c.urlParams_.Encode()
9349 req, err := http.NewRequest("GET", urls, body)
9350 if err != nil {
9351 return nil, err
9352 }
9353 req.Header = reqHeaders
9354 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9355 }
9356
9357
9358
9359
9360
9361
9362
9363 func (c *CaptionsListCall) Do(opts ...googleapi.CallOption) (*CaptionListResponse, error) {
9364 gensupport.SetOptions(c.urlParams_, opts...)
9365 res, err := c.doRequest("json")
9366 if res != nil && res.StatusCode == http.StatusNotModified {
9367 if res.Body != nil {
9368 res.Body.Close()
9369 }
9370 return nil, gensupport.WrapError(&googleapi.Error{
9371 Code: res.StatusCode,
9372 Header: res.Header,
9373 })
9374 }
9375 if err != nil {
9376 return nil, err
9377 }
9378 defer googleapi.CloseBody(res)
9379 if err := googleapi.CheckResponse(res); err != nil {
9380 return nil, gensupport.WrapError(err)
9381 }
9382 ret := &CaptionListResponse{
9383 ServerResponse: googleapi.ServerResponse{
9384 Header: res.Header,
9385 HTTPStatusCode: res.StatusCode,
9386 },
9387 }
9388 target := &ret
9389 if err := gensupport.DecodeResponse(target, res); err != nil {
9390 return nil, err
9391 }
9392 return ret, nil
9393 }
9394
9395 type CaptionsUpdateCall struct {
9396 s *Service
9397 caption *Caption
9398 urlParams_ gensupport.URLParams
9399 mediaInfo_ *gensupport.MediaInfo
9400 ctx_ context.Context
9401 header_ http.Header
9402 }
9403
9404
9405
9406
9407
9408
9409 func (r *CaptionsService) Update(part []string, caption *Caption) *CaptionsUpdateCall {
9410 c := &CaptionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9411 c.urlParams_.SetMulti("part", append([]string{}, part...))
9412 c.caption = caption
9413 return c
9414 }
9415
9416
9417
9418 func (c *CaptionsUpdateCall) OnBehalfOf(onBehalfOf string) *CaptionsUpdateCall {
9419 c.urlParams_.Set("onBehalfOf", onBehalfOf)
9420 return c
9421 }
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434 func (c *CaptionsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsUpdateCall {
9435 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
9436 return c
9437 }
9438
9439
9440
9441 func (c *CaptionsUpdateCall) Sync(sync bool) *CaptionsUpdateCall {
9442 c.urlParams_.Set("sync", fmt.Sprint(sync))
9443 return c
9444 }
9445
9446
9447
9448
9449
9450
9451
9452
9453 func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsUpdateCall {
9454 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
9455 return c
9456 }
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467 func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsUpdateCall {
9468 c.ctx_ = ctx
9469 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
9470 return c
9471 }
9472
9473
9474
9475
9476
9477 func (c *CaptionsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsUpdateCall {
9478 c.mediaInfo_.SetProgressUpdater(pu)
9479 return c
9480 }
9481
9482
9483
9484
9485 func (c *CaptionsUpdateCall) Fields(s ...googleapi.Field) *CaptionsUpdateCall {
9486 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9487 return c
9488 }
9489
9490
9491
9492
9493 func (c *CaptionsUpdateCall) Context(ctx context.Context) *CaptionsUpdateCall {
9494 c.ctx_ = ctx
9495 return c
9496 }
9497
9498
9499
9500 func (c *CaptionsUpdateCall) Header() http.Header {
9501 if c.header_ == nil {
9502 c.header_ = make(http.Header)
9503 }
9504 return c.header_
9505 }
9506
9507 func (c *CaptionsUpdateCall) doRequest(alt string) (*http.Response, error) {
9508 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9509 var body io.Reader = nil
9510 body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
9511 if err != nil {
9512 return nil, err
9513 }
9514 c.urlParams_.Set("alt", alt)
9515 c.urlParams_.Set("prettyPrint", "false")
9516 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
9517 if c.mediaInfo_ != nil {
9518 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/captions")
9519 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
9520 }
9521 if body == nil {
9522 body = new(bytes.Buffer)
9523 reqHeaders.Set("Content-Type", "application/json")
9524 }
9525 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
9526 defer cleanup()
9527 urls += "?" + c.urlParams_.Encode()
9528 req, err := http.NewRequest("PUT", urls, body)
9529 if err != nil {
9530 return nil, err
9531 }
9532 req.Header = reqHeaders
9533 req.GetBody = getBody
9534 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9535 }
9536
9537
9538
9539
9540
9541
9542 func (c *CaptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Caption, error) {
9543 gensupport.SetOptions(c.urlParams_, opts...)
9544 res, err := c.doRequest("json")
9545 if res != nil && res.StatusCode == http.StatusNotModified {
9546 if res.Body != nil {
9547 res.Body.Close()
9548 }
9549 return nil, gensupport.WrapError(&googleapi.Error{
9550 Code: res.StatusCode,
9551 Header: res.Header,
9552 })
9553 }
9554 if err != nil {
9555 return nil, err
9556 }
9557 defer googleapi.CloseBody(res)
9558 if err := googleapi.CheckResponse(res); err != nil {
9559 return nil, gensupport.WrapError(err)
9560 }
9561 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
9562 if rx != nil {
9563 rx.Client = c.s.client
9564 rx.UserAgent = c.s.userAgent()
9565 ctx := c.ctx_
9566 if ctx == nil {
9567 ctx = context.TODO()
9568 }
9569 res, err = rx.Upload(ctx)
9570 if err != nil {
9571 return nil, err
9572 }
9573 defer res.Body.Close()
9574 if err := googleapi.CheckResponse(res); err != nil {
9575 return nil, gensupport.WrapError(err)
9576 }
9577 }
9578 ret := &Caption{
9579 ServerResponse: googleapi.ServerResponse{
9580 Header: res.Header,
9581 HTTPStatusCode: res.StatusCode,
9582 },
9583 }
9584 target := &ret
9585 if err := gensupport.DecodeResponse(target, res); err != nil {
9586 return nil, err
9587 }
9588 return ret, nil
9589 }
9590
9591 type ChannelBannersInsertCall struct {
9592 s *Service
9593 channelbannerresource *ChannelBannerResource
9594 urlParams_ gensupport.URLParams
9595 mediaInfo_ *gensupport.MediaInfo
9596 ctx_ context.Context
9597 header_ http.Header
9598 }
9599
9600
9601 func (r *ChannelBannersService) Insert(channelbannerresource *ChannelBannerResource) *ChannelBannersInsertCall {
9602 c := &ChannelBannersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9603 c.channelbannerresource = channelbannerresource
9604 return c
9605 }
9606
9607
9608
9609 func (c *ChannelBannersInsertCall) ChannelId(channelId string) *ChannelBannersInsertCall {
9610 c.urlParams_.Set("channelId", channelId)
9611 return c
9612 }
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625 func (c *ChannelBannersInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelBannersInsertCall {
9626 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
9627 return c
9628 }
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647 func (c *ChannelBannersInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *ChannelBannersInsertCall {
9648 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
9649 return c
9650 }
9651
9652
9653
9654
9655
9656
9657
9658
9659 func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ChannelBannersInsertCall {
9660 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
9661 return c
9662 }
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673 func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ChannelBannersInsertCall {
9674 c.ctx_ = ctx
9675 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
9676 return c
9677 }
9678
9679
9680
9681
9682
9683 func (c *ChannelBannersInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ChannelBannersInsertCall {
9684 c.mediaInfo_.SetProgressUpdater(pu)
9685 return c
9686 }
9687
9688
9689
9690
9691 func (c *ChannelBannersInsertCall) Fields(s ...googleapi.Field) *ChannelBannersInsertCall {
9692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9693 return c
9694 }
9695
9696
9697
9698
9699 func (c *ChannelBannersInsertCall) Context(ctx context.Context) *ChannelBannersInsertCall {
9700 c.ctx_ = ctx
9701 return c
9702 }
9703
9704
9705
9706 func (c *ChannelBannersInsertCall) Header() http.Header {
9707 if c.header_ == nil {
9708 c.header_ = make(http.Header)
9709 }
9710 return c.header_
9711 }
9712
9713 func (c *ChannelBannersInsertCall) doRequest(alt string) (*http.Response, error) {
9714 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9715 var body io.Reader = nil
9716 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelbannerresource)
9717 if err != nil {
9718 return nil, err
9719 }
9720 c.urlParams_.Set("alt", alt)
9721 c.urlParams_.Set("prettyPrint", "false")
9722 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelBanners/insert")
9723 if c.mediaInfo_ != nil {
9724 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/channelBanners/insert")
9725 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
9726 }
9727 if body == nil {
9728 body = new(bytes.Buffer)
9729 reqHeaders.Set("Content-Type", "application/json")
9730 }
9731 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
9732 defer cleanup()
9733 urls += "?" + c.urlParams_.Encode()
9734 req, err := http.NewRequest("POST", urls, body)
9735 if err != nil {
9736 return nil, err
9737 }
9738 req.Header = reqHeaders
9739 req.GetBody = getBody
9740 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9741 }
9742
9743
9744
9745
9746
9747
9748
9749 func (c *ChannelBannersInsertCall) Do(opts ...googleapi.CallOption) (*ChannelBannerResource, error) {
9750 gensupport.SetOptions(c.urlParams_, opts...)
9751 res, err := c.doRequest("json")
9752 if res != nil && res.StatusCode == http.StatusNotModified {
9753 if res.Body != nil {
9754 res.Body.Close()
9755 }
9756 return nil, gensupport.WrapError(&googleapi.Error{
9757 Code: res.StatusCode,
9758 Header: res.Header,
9759 })
9760 }
9761 if err != nil {
9762 return nil, err
9763 }
9764 defer googleapi.CloseBody(res)
9765 if err := googleapi.CheckResponse(res); err != nil {
9766 return nil, gensupport.WrapError(err)
9767 }
9768 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
9769 if rx != nil {
9770 rx.Client = c.s.client
9771 rx.UserAgent = c.s.userAgent()
9772 ctx := c.ctx_
9773 if ctx == nil {
9774 ctx = context.TODO()
9775 }
9776 res, err = rx.Upload(ctx)
9777 if err != nil {
9778 return nil, err
9779 }
9780 defer res.Body.Close()
9781 if err := googleapi.CheckResponse(res); err != nil {
9782 return nil, gensupport.WrapError(err)
9783 }
9784 }
9785 ret := &ChannelBannerResource{
9786 ServerResponse: googleapi.ServerResponse{
9787 Header: res.Header,
9788 HTTPStatusCode: res.StatusCode,
9789 },
9790 }
9791 target := &ret
9792 if err := gensupport.DecodeResponse(target, res); err != nil {
9793 return nil, err
9794 }
9795 return ret, nil
9796 }
9797
9798 type ChannelSectionsDeleteCall struct {
9799 s *Service
9800 urlParams_ gensupport.URLParams
9801 ctx_ context.Context
9802 header_ http.Header
9803 }
9804
9805
9806
9807
9808 func (r *ChannelSectionsService) Delete(id string) *ChannelSectionsDeleteCall {
9809 c := &ChannelSectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9810 c.urlParams_.Set("id", id)
9811 return c
9812 }
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825 func (c *ChannelSectionsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsDeleteCall {
9826 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
9827 return c
9828 }
9829
9830
9831
9832
9833 func (c *ChannelSectionsDeleteCall) Fields(s ...googleapi.Field) *ChannelSectionsDeleteCall {
9834 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9835 return c
9836 }
9837
9838
9839 func (c *ChannelSectionsDeleteCall) Context(ctx context.Context) *ChannelSectionsDeleteCall {
9840 c.ctx_ = ctx
9841 return c
9842 }
9843
9844
9845
9846 func (c *ChannelSectionsDeleteCall) Header() http.Header {
9847 if c.header_ == nil {
9848 c.header_ = make(http.Header)
9849 }
9850 return c.header_
9851 }
9852
9853 func (c *ChannelSectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
9854 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9855 var body io.Reader = nil
9856 c.urlParams_.Set("alt", alt)
9857 c.urlParams_.Set("prettyPrint", "false")
9858 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
9859 urls += "?" + c.urlParams_.Encode()
9860 req, err := http.NewRequest("DELETE", urls, body)
9861 if err != nil {
9862 return nil, err
9863 }
9864 req.Header = reqHeaders
9865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9866 }
9867
9868
9869 func (c *ChannelSectionsDeleteCall) Do(opts ...googleapi.CallOption) error {
9870 gensupport.SetOptions(c.urlParams_, opts...)
9871 res, err := c.doRequest("json")
9872 if err != nil {
9873 return err
9874 }
9875 defer googleapi.CloseBody(res)
9876 if err := googleapi.CheckResponse(res); err != nil {
9877 return gensupport.WrapError(err)
9878 }
9879 return nil
9880 }
9881
9882 type ChannelSectionsInsertCall struct {
9883 s *Service
9884 channelsection *ChannelSection
9885 urlParams_ gensupport.URLParams
9886 ctx_ context.Context
9887 header_ http.Header
9888 }
9889
9890
9891
9892
9893
9894
9895
9896 func (r *ChannelSectionsService) Insert(part []string, channelsection *ChannelSection) *ChannelSectionsInsertCall {
9897 c := &ChannelSectionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9898 c.urlParams_.SetMulti("part", append([]string{}, part...))
9899 c.channelsection = channelsection
9900 return c
9901 }
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914 func (c *ChannelSectionsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsInsertCall {
9915 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
9916 return c
9917 }
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936 func (c *ChannelSectionsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *ChannelSectionsInsertCall {
9937 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
9938 return c
9939 }
9940
9941
9942
9943
9944 func (c *ChannelSectionsInsertCall) Fields(s ...googleapi.Field) *ChannelSectionsInsertCall {
9945 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9946 return c
9947 }
9948
9949
9950 func (c *ChannelSectionsInsertCall) Context(ctx context.Context) *ChannelSectionsInsertCall {
9951 c.ctx_ = ctx
9952 return c
9953 }
9954
9955
9956
9957 func (c *ChannelSectionsInsertCall) Header() http.Header {
9958 if c.header_ == nil {
9959 c.header_ = make(http.Header)
9960 }
9961 return c.header_
9962 }
9963
9964 func (c *ChannelSectionsInsertCall) doRequest(alt string) (*http.Response, error) {
9965 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9966 var body io.Reader = nil
9967 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
9968 if err != nil {
9969 return nil, err
9970 }
9971 c.urlParams_.Set("alt", alt)
9972 c.urlParams_.Set("prettyPrint", "false")
9973 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
9974 urls += "?" + c.urlParams_.Encode()
9975 req, err := http.NewRequest("POST", urls, body)
9976 if err != nil {
9977 return nil, err
9978 }
9979 req.Header = reqHeaders
9980 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9981 }
9982
9983
9984
9985
9986
9987
9988 func (c *ChannelSectionsInsertCall) Do(opts ...googleapi.CallOption) (*ChannelSection, error) {
9989 gensupport.SetOptions(c.urlParams_, opts...)
9990 res, err := c.doRequest("json")
9991 if res != nil && res.StatusCode == http.StatusNotModified {
9992 if res.Body != nil {
9993 res.Body.Close()
9994 }
9995 return nil, gensupport.WrapError(&googleapi.Error{
9996 Code: res.StatusCode,
9997 Header: res.Header,
9998 })
9999 }
10000 if err != nil {
10001 return nil, err
10002 }
10003 defer googleapi.CloseBody(res)
10004 if err := googleapi.CheckResponse(res); err != nil {
10005 return nil, gensupport.WrapError(err)
10006 }
10007 ret := &ChannelSection{
10008 ServerResponse: googleapi.ServerResponse{
10009 Header: res.Header,
10010 HTTPStatusCode: res.StatusCode,
10011 },
10012 }
10013 target := &ret
10014 if err := gensupport.DecodeResponse(target, res); err != nil {
10015 return nil, err
10016 }
10017 return ret, nil
10018 }
10019
10020 type ChannelSectionsListCall struct {
10021 s *Service
10022 urlParams_ gensupport.URLParams
10023 ifNoneMatch_ string
10024 ctx_ context.Context
10025 header_ http.Header
10026 }
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039 func (r *ChannelSectionsService) List(part []string) *ChannelSectionsListCall {
10040 c := &ChannelSectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10041 c.urlParams_.SetMulti("part", append([]string{}, part...))
10042 return c
10043 }
10044
10045
10046
10047 func (c *ChannelSectionsListCall) ChannelId(channelId string) *ChannelSectionsListCall {
10048 c.urlParams_.Set("channelId", channelId)
10049 return c
10050 }
10051
10052
10053 func (c *ChannelSectionsListCall) Hl(hl string) *ChannelSectionsListCall {
10054 c.urlParams_.Set("hl", hl)
10055 return c
10056 }
10057
10058
10059
10060 func (c *ChannelSectionsListCall) Id(id ...string) *ChannelSectionsListCall {
10061 c.urlParams_.SetMulti("id", append([]string{}, id...))
10062 return c
10063 }
10064
10065
10066
10067 func (c *ChannelSectionsListCall) Mine(mine bool) *ChannelSectionsListCall {
10068 c.urlParams_.Set("mine", fmt.Sprint(mine))
10069 return c
10070 }
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083 func (c *ChannelSectionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsListCall {
10084 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10085 return c
10086 }
10087
10088
10089
10090
10091 func (c *ChannelSectionsListCall) Fields(s ...googleapi.Field) *ChannelSectionsListCall {
10092 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10093 return c
10094 }
10095
10096
10097
10098
10099 func (c *ChannelSectionsListCall) IfNoneMatch(entityTag string) *ChannelSectionsListCall {
10100 c.ifNoneMatch_ = entityTag
10101 return c
10102 }
10103
10104
10105 func (c *ChannelSectionsListCall) Context(ctx context.Context) *ChannelSectionsListCall {
10106 c.ctx_ = ctx
10107 return c
10108 }
10109
10110
10111
10112 func (c *ChannelSectionsListCall) Header() http.Header {
10113 if c.header_ == nil {
10114 c.header_ = make(http.Header)
10115 }
10116 return c.header_
10117 }
10118
10119 func (c *ChannelSectionsListCall) doRequest(alt string) (*http.Response, error) {
10120 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10121 if c.ifNoneMatch_ != "" {
10122 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10123 }
10124 var body io.Reader = nil
10125 c.urlParams_.Set("alt", alt)
10126 c.urlParams_.Set("prettyPrint", "false")
10127 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
10128 urls += "?" + c.urlParams_.Encode()
10129 req, err := http.NewRequest("GET", urls, body)
10130 if err != nil {
10131 return nil, err
10132 }
10133 req.Header = reqHeaders
10134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10135 }
10136
10137
10138
10139
10140
10141
10142
10143 func (c *ChannelSectionsListCall) Do(opts ...googleapi.CallOption) (*ChannelSectionListResponse, error) {
10144 gensupport.SetOptions(c.urlParams_, opts...)
10145 res, err := c.doRequest("json")
10146 if res != nil && res.StatusCode == http.StatusNotModified {
10147 if res.Body != nil {
10148 res.Body.Close()
10149 }
10150 return nil, gensupport.WrapError(&googleapi.Error{
10151 Code: res.StatusCode,
10152 Header: res.Header,
10153 })
10154 }
10155 if err != nil {
10156 return nil, err
10157 }
10158 defer googleapi.CloseBody(res)
10159 if err := googleapi.CheckResponse(res); err != nil {
10160 return nil, gensupport.WrapError(err)
10161 }
10162 ret := &ChannelSectionListResponse{
10163 ServerResponse: googleapi.ServerResponse{
10164 Header: res.Header,
10165 HTTPStatusCode: res.StatusCode,
10166 },
10167 }
10168 target := &ret
10169 if err := gensupport.DecodeResponse(target, res); err != nil {
10170 return nil, err
10171 }
10172 return ret, nil
10173 }
10174
10175 type ChannelSectionsUpdateCall struct {
10176 s *Service
10177 channelsection *ChannelSection
10178 urlParams_ gensupport.URLParams
10179 ctx_ context.Context
10180 header_ http.Header
10181 }
10182
10183
10184
10185
10186
10187
10188
10189 func (r *ChannelSectionsService) Update(part []string, channelsection *ChannelSection) *ChannelSectionsUpdateCall {
10190 c := &ChannelSectionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10191 c.urlParams_.SetMulti("part", append([]string{}, part...))
10192 c.channelsection = channelsection
10193 return c
10194 }
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207 func (c *ChannelSectionsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsUpdateCall {
10208 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10209 return c
10210 }
10211
10212
10213
10214
10215 func (c *ChannelSectionsUpdateCall) Fields(s ...googleapi.Field) *ChannelSectionsUpdateCall {
10216 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10217 return c
10218 }
10219
10220
10221 func (c *ChannelSectionsUpdateCall) Context(ctx context.Context) *ChannelSectionsUpdateCall {
10222 c.ctx_ = ctx
10223 return c
10224 }
10225
10226
10227
10228 func (c *ChannelSectionsUpdateCall) Header() http.Header {
10229 if c.header_ == nil {
10230 c.header_ = make(http.Header)
10231 }
10232 return c.header_
10233 }
10234
10235 func (c *ChannelSectionsUpdateCall) doRequest(alt string) (*http.Response, error) {
10236 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10237 var body io.Reader = nil
10238 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
10239 if err != nil {
10240 return nil, err
10241 }
10242 c.urlParams_.Set("alt", alt)
10243 c.urlParams_.Set("prettyPrint", "false")
10244 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
10245 urls += "?" + c.urlParams_.Encode()
10246 req, err := http.NewRequest("PUT", urls, body)
10247 if err != nil {
10248 return nil, err
10249 }
10250 req.Header = reqHeaders
10251 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10252 }
10253
10254
10255
10256
10257
10258
10259 func (c *ChannelSectionsUpdateCall) Do(opts ...googleapi.CallOption) (*ChannelSection, error) {
10260 gensupport.SetOptions(c.urlParams_, opts...)
10261 res, err := c.doRequest("json")
10262 if res != nil && res.StatusCode == http.StatusNotModified {
10263 if res.Body != nil {
10264 res.Body.Close()
10265 }
10266 return nil, gensupport.WrapError(&googleapi.Error{
10267 Code: res.StatusCode,
10268 Header: res.Header,
10269 })
10270 }
10271 if err != nil {
10272 return nil, err
10273 }
10274 defer googleapi.CloseBody(res)
10275 if err := googleapi.CheckResponse(res); err != nil {
10276 return nil, gensupport.WrapError(err)
10277 }
10278 ret := &ChannelSection{
10279 ServerResponse: googleapi.ServerResponse{
10280 Header: res.Header,
10281 HTTPStatusCode: res.StatusCode,
10282 },
10283 }
10284 target := &ret
10285 if err := gensupport.DecodeResponse(target, res); err != nil {
10286 return nil, err
10287 }
10288 return ret, nil
10289 }
10290
10291 type ChannelsListCall struct {
10292 s *Service
10293 urlParams_ gensupport.URLParams
10294 ifNoneMatch_ string
10295 ctx_ context.Context
10296 header_ http.Header
10297 }
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308 func (r *ChannelsService) List(part []string) *ChannelsListCall {
10309 c := &ChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10310 c.urlParams_.SetMulti("part", append([]string{}, part...))
10311 return c
10312 }
10313
10314
10315
10316 func (c *ChannelsListCall) CategoryId(categoryId string) *ChannelsListCall {
10317 c.urlParams_.Set("categoryId", categoryId)
10318 return c
10319 }
10320
10321
10322
10323 func (c *ChannelsListCall) ForHandle(forHandle string) *ChannelsListCall {
10324 c.urlParams_.Set("forHandle", forHandle)
10325 return c
10326 }
10327
10328
10329
10330 func (c *ChannelsListCall) ForUsername(forUsername string) *ChannelsListCall {
10331 c.urlParams_.Set("forUsername", forUsername)
10332 return c
10333 }
10334
10335
10336
10337
10338
10339
10340
10341 func (c *ChannelsListCall) Hl(hl string) *ChannelsListCall {
10342 c.urlParams_.Set("hl", hl)
10343 return c
10344 }
10345
10346
10347
10348 func (c *ChannelsListCall) Id(id ...string) *ChannelsListCall {
10349 c.urlParams_.SetMulti("id", append([]string{}, id...))
10350 return c
10351 }
10352
10353
10354
10355 func (c *ChannelsListCall) ManagedByMe(managedByMe bool) *ChannelsListCall {
10356 c.urlParams_.Set("managedByMe", fmt.Sprint(managedByMe))
10357 return c
10358 }
10359
10360
10361
10362
10363 func (c *ChannelsListCall) MaxResults(maxResults int64) *ChannelsListCall {
10364 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10365 return c
10366 }
10367
10368
10369
10370 func (c *ChannelsListCall) Mine(mine bool) *ChannelsListCall {
10371 c.urlParams_.Set("mine", fmt.Sprint(mine))
10372 return c
10373 }
10374
10375
10376
10377 func (c *ChannelsListCall) MySubscribers(mySubscribers bool) *ChannelsListCall {
10378 c.urlParams_.Set("mySubscribers", fmt.Sprint(mySubscribers))
10379 return c
10380 }
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393 func (c *ChannelsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelsListCall {
10394 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10395 return c
10396 }
10397
10398
10399
10400
10401
10402 func (c *ChannelsListCall) PageToken(pageToken string) *ChannelsListCall {
10403 c.urlParams_.Set("pageToken", pageToken)
10404 return c
10405 }
10406
10407
10408
10409
10410 func (c *ChannelsListCall) Fields(s ...googleapi.Field) *ChannelsListCall {
10411 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10412 return c
10413 }
10414
10415
10416
10417
10418 func (c *ChannelsListCall) IfNoneMatch(entityTag string) *ChannelsListCall {
10419 c.ifNoneMatch_ = entityTag
10420 return c
10421 }
10422
10423
10424 func (c *ChannelsListCall) Context(ctx context.Context) *ChannelsListCall {
10425 c.ctx_ = ctx
10426 return c
10427 }
10428
10429
10430
10431 func (c *ChannelsListCall) Header() http.Header {
10432 if c.header_ == nil {
10433 c.header_ = make(http.Header)
10434 }
10435 return c.header_
10436 }
10437
10438 func (c *ChannelsListCall) doRequest(alt string) (*http.Response, error) {
10439 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10440 if c.ifNoneMatch_ != "" {
10441 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10442 }
10443 var body io.Reader = nil
10444 c.urlParams_.Set("alt", alt)
10445 c.urlParams_.Set("prettyPrint", "false")
10446 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channels")
10447 urls += "?" + c.urlParams_.Encode()
10448 req, err := http.NewRequest("GET", urls, body)
10449 if err != nil {
10450 return nil, err
10451 }
10452 req.Header = reqHeaders
10453 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10454 }
10455
10456
10457
10458
10459
10460
10461
10462 func (c *ChannelsListCall) Do(opts ...googleapi.CallOption) (*ChannelListResponse, error) {
10463 gensupport.SetOptions(c.urlParams_, opts...)
10464 res, err := c.doRequest("json")
10465 if res != nil && res.StatusCode == http.StatusNotModified {
10466 if res.Body != nil {
10467 res.Body.Close()
10468 }
10469 return nil, gensupport.WrapError(&googleapi.Error{
10470 Code: res.StatusCode,
10471 Header: res.Header,
10472 })
10473 }
10474 if err != nil {
10475 return nil, err
10476 }
10477 defer googleapi.CloseBody(res)
10478 if err := googleapi.CheckResponse(res); err != nil {
10479 return nil, gensupport.WrapError(err)
10480 }
10481 ret := &ChannelListResponse{
10482 ServerResponse: googleapi.ServerResponse{
10483 Header: res.Header,
10484 HTTPStatusCode: res.StatusCode,
10485 },
10486 }
10487 target := &ret
10488 if err := gensupport.DecodeResponse(target, res); err != nil {
10489 return nil, err
10490 }
10491 return ret, nil
10492 }
10493
10494
10495
10496
10497 func (c *ChannelsListCall) Pages(ctx context.Context, f func(*ChannelListResponse) error) error {
10498 c.ctx_ = ctx
10499 defer c.PageToken(c.urlParams_.Get("pageToken"))
10500 for {
10501 x, err := c.Do()
10502 if err != nil {
10503 return err
10504 }
10505 if err := f(x); err != nil {
10506 return err
10507 }
10508 if x.NextPageToken == "" {
10509 return nil
10510 }
10511 c.PageToken(x.NextPageToken)
10512 }
10513 }
10514
10515 type ChannelsUpdateCall struct {
10516 s *Service
10517 channel *Channel
10518 urlParams_ gensupport.URLParams
10519 ctx_ context.Context
10520 header_ http.Header
10521 }
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533 func (r *ChannelsService) Update(part []string, channel *Channel) *ChannelsUpdateCall {
10534 c := &ChannelsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10535 c.urlParams_.SetMulti("part", append([]string{}, part...))
10536 c.channel = channel
10537 return c
10538 }
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549 func (c *ChannelsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelsUpdateCall {
10550 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10551 return c
10552 }
10553
10554
10555
10556
10557 func (c *ChannelsUpdateCall) Fields(s ...googleapi.Field) *ChannelsUpdateCall {
10558 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10559 return c
10560 }
10561
10562
10563 func (c *ChannelsUpdateCall) Context(ctx context.Context) *ChannelsUpdateCall {
10564 c.ctx_ = ctx
10565 return c
10566 }
10567
10568
10569
10570 func (c *ChannelsUpdateCall) Header() http.Header {
10571 if c.header_ == nil {
10572 c.header_ = make(http.Header)
10573 }
10574 return c.header_
10575 }
10576
10577 func (c *ChannelsUpdateCall) doRequest(alt string) (*http.Response, error) {
10578 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10579 var body io.Reader = nil
10580 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
10581 if err != nil {
10582 return nil, err
10583 }
10584 c.urlParams_.Set("alt", alt)
10585 c.urlParams_.Set("prettyPrint", "false")
10586 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channels")
10587 urls += "?" + c.urlParams_.Encode()
10588 req, err := http.NewRequest("PUT", urls, body)
10589 if err != nil {
10590 return nil, err
10591 }
10592 req.Header = reqHeaders
10593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10594 }
10595
10596
10597
10598
10599
10600
10601 func (c *ChannelsUpdateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
10602 gensupport.SetOptions(c.urlParams_, opts...)
10603 res, err := c.doRequest("json")
10604 if res != nil && res.StatusCode == http.StatusNotModified {
10605 if res.Body != nil {
10606 res.Body.Close()
10607 }
10608 return nil, gensupport.WrapError(&googleapi.Error{
10609 Code: res.StatusCode,
10610 Header: res.Header,
10611 })
10612 }
10613 if err != nil {
10614 return nil, err
10615 }
10616 defer googleapi.CloseBody(res)
10617 if err := googleapi.CheckResponse(res); err != nil {
10618 return nil, gensupport.WrapError(err)
10619 }
10620 ret := &Channel{
10621 ServerResponse: googleapi.ServerResponse{
10622 Header: res.Header,
10623 HTTPStatusCode: res.StatusCode,
10624 },
10625 }
10626 target := &ret
10627 if err := gensupport.DecodeResponse(target, res); err != nil {
10628 return nil, err
10629 }
10630 return ret, nil
10631 }
10632
10633 type CommentThreadsInsertCall struct {
10634 s *Service
10635 commentthread *CommentThread
10636 urlParams_ gensupport.URLParams
10637 ctx_ context.Context
10638 header_ http.Header
10639 }
10640
10641
10642
10643
10644
10645
10646 func (r *CommentThreadsService) Insert(part []string, commentthread *CommentThread) *CommentThreadsInsertCall {
10647 c := &CommentThreadsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10648 c.urlParams_.SetMulti("part", append([]string{}, part...))
10649 c.commentthread = commentthread
10650 return c
10651 }
10652
10653
10654
10655
10656 func (c *CommentThreadsInsertCall) Fields(s ...googleapi.Field) *CommentThreadsInsertCall {
10657 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10658 return c
10659 }
10660
10661
10662 func (c *CommentThreadsInsertCall) Context(ctx context.Context) *CommentThreadsInsertCall {
10663 c.ctx_ = ctx
10664 return c
10665 }
10666
10667
10668
10669 func (c *CommentThreadsInsertCall) Header() http.Header {
10670 if c.header_ == nil {
10671 c.header_ = make(http.Header)
10672 }
10673 return c.header_
10674 }
10675
10676 func (c *CommentThreadsInsertCall) doRequest(alt string) (*http.Response, error) {
10677 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10678 var body io.Reader = nil
10679 body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
10680 if err != nil {
10681 return nil, err
10682 }
10683 c.urlParams_.Set("alt", alt)
10684 c.urlParams_.Set("prettyPrint", "false")
10685 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/commentThreads")
10686 urls += "?" + c.urlParams_.Encode()
10687 req, err := http.NewRequest("POST", urls, body)
10688 if err != nil {
10689 return nil, err
10690 }
10691 req.Header = reqHeaders
10692 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10693 }
10694
10695
10696
10697
10698
10699
10700 func (c *CommentThreadsInsertCall) Do(opts ...googleapi.CallOption) (*CommentThread, error) {
10701 gensupport.SetOptions(c.urlParams_, opts...)
10702 res, err := c.doRequest("json")
10703 if res != nil && res.StatusCode == http.StatusNotModified {
10704 if res.Body != nil {
10705 res.Body.Close()
10706 }
10707 return nil, gensupport.WrapError(&googleapi.Error{
10708 Code: res.StatusCode,
10709 Header: res.Header,
10710 })
10711 }
10712 if err != nil {
10713 return nil, err
10714 }
10715 defer googleapi.CloseBody(res)
10716 if err := googleapi.CheckResponse(res); err != nil {
10717 return nil, gensupport.WrapError(err)
10718 }
10719 ret := &CommentThread{
10720 ServerResponse: googleapi.ServerResponse{
10721 Header: res.Header,
10722 HTTPStatusCode: res.StatusCode,
10723 },
10724 }
10725 target := &ret
10726 if err := gensupport.DecodeResponse(target, res); err != nil {
10727 return nil, err
10728 }
10729 return ret, nil
10730 }
10731
10732 type CommentThreadsListCall struct {
10733 s *Service
10734 urlParams_ gensupport.URLParams
10735 ifNoneMatch_ string
10736 ctx_ context.Context
10737 header_ http.Header
10738 }
10739
10740
10741
10742
10743
10744 func (r *CommentThreadsService) List(part []string) *CommentThreadsListCall {
10745 c := &CommentThreadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10746 c.urlParams_.SetMulti("part", append([]string{}, part...))
10747 return c
10748 }
10749
10750
10751
10752
10753 func (c *CommentThreadsListCall) AllThreadsRelatedToChannelId(allThreadsRelatedToChannelId string) *CommentThreadsListCall {
10754 c.urlParams_.Set("allThreadsRelatedToChannelId", allThreadsRelatedToChannelId)
10755 return c
10756 }
10757
10758
10759
10760
10761 func (c *CommentThreadsListCall) ChannelId(channelId string) *CommentThreadsListCall {
10762 c.urlParams_.Set("channelId", channelId)
10763 return c
10764 }
10765
10766
10767
10768 func (c *CommentThreadsListCall) Id(id ...string) *CommentThreadsListCall {
10769 c.urlParams_.SetMulti("id", append([]string{}, id...))
10770 return c
10771 }
10772
10773
10774
10775
10776 func (c *CommentThreadsListCall) MaxResults(maxResults int64) *CommentThreadsListCall {
10777 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10778 return c
10779 }
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792 func (c *CommentThreadsListCall) ModerationStatus(moderationStatus string) *CommentThreadsListCall {
10793 c.urlParams_.Set("moderationStatus", moderationStatus)
10794 return c
10795 }
10796
10797
10798
10799
10800
10801
10802
10803
10804 func (c *CommentThreadsListCall) Order(order string) *CommentThreadsListCall {
10805 c.urlParams_.Set("order", order)
10806 return c
10807 }
10808
10809
10810
10811
10812
10813 func (c *CommentThreadsListCall) PageToken(pageToken string) *CommentThreadsListCall {
10814 c.urlParams_.Set("pageToken", pageToken)
10815 return c
10816 }
10817
10818
10819
10820
10821 func (c *CommentThreadsListCall) SearchTerms(searchTerms string) *CommentThreadsListCall {
10822 c.urlParams_.Set("searchTerms", searchTerms)
10823 return c
10824 }
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837 func (c *CommentThreadsListCall) TextFormat(textFormat string) *CommentThreadsListCall {
10838 c.urlParams_.Set("textFormat", textFormat)
10839 return c
10840 }
10841
10842
10843
10844 func (c *CommentThreadsListCall) VideoId(videoId string) *CommentThreadsListCall {
10845 c.urlParams_.Set("videoId", videoId)
10846 return c
10847 }
10848
10849
10850
10851
10852 func (c *CommentThreadsListCall) Fields(s ...googleapi.Field) *CommentThreadsListCall {
10853 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10854 return c
10855 }
10856
10857
10858
10859
10860 func (c *CommentThreadsListCall) IfNoneMatch(entityTag string) *CommentThreadsListCall {
10861 c.ifNoneMatch_ = entityTag
10862 return c
10863 }
10864
10865
10866 func (c *CommentThreadsListCall) Context(ctx context.Context) *CommentThreadsListCall {
10867 c.ctx_ = ctx
10868 return c
10869 }
10870
10871
10872
10873 func (c *CommentThreadsListCall) Header() http.Header {
10874 if c.header_ == nil {
10875 c.header_ = make(http.Header)
10876 }
10877 return c.header_
10878 }
10879
10880 func (c *CommentThreadsListCall) doRequest(alt string) (*http.Response, error) {
10881 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10882 if c.ifNoneMatch_ != "" {
10883 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10884 }
10885 var body io.Reader = nil
10886 c.urlParams_.Set("alt", alt)
10887 c.urlParams_.Set("prettyPrint", "false")
10888 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/commentThreads")
10889 urls += "?" + c.urlParams_.Encode()
10890 req, err := http.NewRequest("GET", urls, body)
10891 if err != nil {
10892 return nil, err
10893 }
10894 req.Header = reqHeaders
10895 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10896 }
10897
10898
10899
10900
10901
10902
10903
10904 func (c *CommentThreadsListCall) Do(opts ...googleapi.CallOption) (*CommentThreadListResponse, error) {
10905 gensupport.SetOptions(c.urlParams_, opts...)
10906 res, err := c.doRequest("json")
10907 if res != nil && res.StatusCode == http.StatusNotModified {
10908 if res.Body != nil {
10909 res.Body.Close()
10910 }
10911 return nil, gensupport.WrapError(&googleapi.Error{
10912 Code: res.StatusCode,
10913 Header: res.Header,
10914 })
10915 }
10916 if err != nil {
10917 return nil, err
10918 }
10919 defer googleapi.CloseBody(res)
10920 if err := googleapi.CheckResponse(res); err != nil {
10921 return nil, gensupport.WrapError(err)
10922 }
10923 ret := &CommentThreadListResponse{
10924 ServerResponse: googleapi.ServerResponse{
10925 Header: res.Header,
10926 HTTPStatusCode: res.StatusCode,
10927 },
10928 }
10929 target := &ret
10930 if err := gensupport.DecodeResponse(target, res); err != nil {
10931 return nil, err
10932 }
10933 return ret, nil
10934 }
10935
10936
10937
10938
10939 func (c *CommentThreadsListCall) Pages(ctx context.Context, f func(*CommentThreadListResponse) error) error {
10940 c.ctx_ = ctx
10941 defer c.PageToken(c.urlParams_.Get("pageToken"))
10942 for {
10943 x, err := c.Do()
10944 if err != nil {
10945 return err
10946 }
10947 if err := f(x); err != nil {
10948 return err
10949 }
10950 if x.NextPageToken == "" {
10951 return nil
10952 }
10953 c.PageToken(x.NextPageToken)
10954 }
10955 }
10956
10957 type CommentsDeleteCall struct {
10958 s *Service
10959 urlParams_ gensupport.URLParams
10960 ctx_ context.Context
10961 header_ http.Header
10962 }
10963
10964
10965
10966
10967 func (r *CommentsService) Delete(id string) *CommentsDeleteCall {
10968 c := &CommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10969 c.urlParams_.Set("id", id)
10970 return c
10971 }
10972
10973
10974
10975
10976 func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
10977 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10978 return c
10979 }
10980
10981
10982 func (c *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
10983 c.ctx_ = ctx
10984 return c
10985 }
10986
10987
10988
10989 func (c *CommentsDeleteCall) Header() http.Header {
10990 if c.header_ == nil {
10991 c.header_ = make(http.Header)
10992 }
10993 return c.header_
10994 }
10995
10996 func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
10997 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10998 var body io.Reader = nil
10999 c.urlParams_.Set("alt", alt)
11000 c.urlParams_.Set("prettyPrint", "false")
11001 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
11002 urls += "?" + c.urlParams_.Encode()
11003 req, err := http.NewRequest("DELETE", urls, body)
11004 if err != nil {
11005 return nil, err
11006 }
11007 req.Header = reqHeaders
11008 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11009 }
11010
11011
11012 func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error {
11013 gensupport.SetOptions(c.urlParams_, opts...)
11014 res, err := c.doRequest("json")
11015 if err != nil {
11016 return err
11017 }
11018 defer googleapi.CloseBody(res)
11019 if err := googleapi.CheckResponse(res); err != nil {
11020 return gensupport.WrapError(err)
11021 }
11022 return nil
11023 }
11024
11025 type CommentsInsertCall struct {
11026 s *Service
11027 comment *Comment
11028 urlParams_ gensupport.URLParams
11029 ctx_ context.Context
11030 header_ http.Header
11031 }
11032
11033
11034
11035
11036
11037
11038 func (r *CommentsService) Insert(part []string, comment *Comment) *CommentsInsertCall {
11039 c := &CommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11040 c.urlParams_.SetMulti("part", append([]string{}, part...))
11041 c.comment = comment
11042 return c
11043 }
11044
11045
11046
11047
11048 func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
11049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11050 return c
11051 }
11052
11053
11054 func (c *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
11055 c.ctx_ = ctx
11056 return c
11057 }
11058
11059
11060
11061 func (c *CommentsInsertCall) Header() http.Header {
11062 if c.header_ == nil {
11063 c.header_ = make(http.Header)
11064 }
11065 return c.header_
11066 }
11067
11068 func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
11069 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11070 var body io.Reader = nil
11071 body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
11072 if err != nil {
11073 return nil, err
11074 }
11075 c.urlParams_.Set("alt", alt)
11076 c.urlParams_.Set("prettyPrint", "false")
11077 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
11078 urls += "?" + c.urlParams_.Encode()
11079 req, err := http.NewRequest("POST", urls, body)
11080 if err != nil {
11081 return nil, err
11082 }
11083 req.Header = reqHeaders
11084 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11085 }
11086
11087
11088
11089
11090
11091
11092 func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
11093 gensupport.SetOptions(c.urlParams_, opts...)
11094 res, err := c.doRequest("json")
11095 if res != nil && res.StatusCode == http.StatusNotModified {
11096 if res.Body != nil {
11097 res.Body.Close()
11098 }
11099 return nil, gensupport.WrapError(&googleapi.Error{
11100 Code: res.StatusCode,
11101 Header: res.Header,
11102 })
11103 }
11104 if err != nil {
11105 return nil, err
11106 }
11107 defer googleapi.CloseBody(res)
11108 if err := googleapi.CheckResponse(res); err != nil {
11109 return nil, gensupport.WrapError(err)
11110 }
11111 ret := &Comment{
11112 ServerResponse: googleapi.ServerResponse{
11113 Header: res.Header,
11114 HTTPStatusCode: res.StatusCode,
11115 },
11116 }
11117 target := &ret
11118 if err := gensupport.DecodeResponse(target, res); err != nil {
11119 return nil, err
11120 }
11121 return ret, nil
11122 }
11123
11124 type CommentsListCall struct {
11125 s *Service
11126 urlParams_ gensupport.URLParams
11127 ifNoneMatch_ string
11128 ctx_ context.Context
11129 header_ http.Header
11130 }
11131
11132
11133
11134
11135
11136 func (r *CommentsService) List(part []string) *CommentsListCall {
11137 c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11138 c.urlParams_.SetMulti("part", append([]string{}, part...))
11139 return c
11140 }
11141
11142
11143
11144 func (c *CommentsListCall) Id(id ...string) *CommentsListCall {
11145 c.urlParams_.SetMulti("id", append([]string{}, id...))
11146 return c
11147 }
11148
11149
11150
11151
11152 func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
11153 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11154 return c
11155 }
11156
11157
11158
11159
11160
11161 func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
11162 c.urlParams_.Set("pageToken", pageToken)
11163 return c
11164 }
11165
11166
11167
11168
11169
11170 func (c *CommentsListCall) ParentId(parentId string) *CommentsListCall {
11171 c.urlParams_.Set("parentId", parentId)
11172 return c
11173 }
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186 func (c *CommentsListCall) TextFormat(textFormat string) *CommentsListCall {
11187 c.urlParams_.Set("textFormat", textFormat)
11188 return c
11189 }
11190
11191
11192
11193
11194 func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
11195 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11196 return c
11197 }
11198
11199
11200
11201
11202 func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
11203 c.ifNoneMatch_ = entityTag
11204 return c
11205 }
11206
11207
11208 func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
11209 c.ctx_ = ctx
11210 return c
11211 }
11212
11213
11214
11215 func (c *CommentsListCall) Header() http.Header {
11216 if c.header_ == nil {
11217 c.header_ = make(http.Header)
11218 }
11219 return c.header_
11220 }
11221
11222 func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
11223 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11224 if c.ifNoneMatch_ != "" {
11225 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11226 }
11227 var body io.Reader = nil
11228 c.urlParams_.Set("alt", alt)
11229 c.urlParams_.Set("prettyPrint", "false")
11230 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
11231 urls += "?" + c.urlParams_.Encode()
11232 req, err := http.NewRequest("GET", urls, body)
11233 if err != nil {
11234 return nil, err
11235 }
11236 req.Header = reqHeaders
11237 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11238 }
11239
11240
11241
11242
11243
11244
11245
11246 func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentListResponse, error) {
11247 gensupport.SetOptions(c.urlParams_, opts...)
11248 res, err := c.doRequest("json")
11249 if res != nil && res.StatusCode == http.StatusNotModified {
11250 if res.Body != nil {
11251 res.Body.Close()
11252 }
11253 return nil, gensupport.WrapError(&googleapi.Error{
11254 Code: res.StatusCode,
11255 Header: res.Header,
11256 })
11257 }
11258 if err != nil {
11259 return nil, err
11260 }
11261 defer googleapi.CloseBody(res)
11262 if err := googleapi.CheckResponse(res); err != nil {
11263 return nil, gensupport.WrapError(err)
11264 }
11265 ret := &CommentListResponse{
11266 ServerResponse: googleapi.ServerResponse{
11267 Header: res.Header,
11268 HTTPStatusCode: res.StatusCode,
11269 },
11270 }
11271 target := &ret
11272 if err := gensupport.DecodeResponse(target, res); err != nil {
11273 return nil, err
11274 }
11275 return ret, nil
11276 }
11277
11278
11279
11280
11281 func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentListResponse) error) error {
11282 c.ctx_ = ctx
11283 defer c.PageToken(c.urlParams_.Get("pageToken"))
11284 for {
11285 x, err := c.Do()
11286 if err != nil {
11287 return err
11288 }
11289 if err := f(x); err != nil {
11290 return err
11291 }
11292 if x.NextPageToken == "" {
11293 return nil
11294 }
11295 c.PageToken(x.NextPageToken)
11296 }
11297 }
11298
11299 type CommentsMarkAsSpamCall struct {
11300 s *Service
11301 urlParams_ gensupport.URLParams
11302 ctx_ context.Context
11303 header_ http.Header
11304 }
11305
11306
11307
11308
11309
11310 func (r *CommentsService) MarkAsSpam(id []string) *CommentsMarkAsSpamCall {
11311 c := &CommentsMarkAsSpamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11312 c.urlParams_.SetMulti("id", append([]string{}, id...))
11313 return c
11314 }
11315
11316
11317
11318
11319 func (c *CommentsMarkAsSpamCall) Fields(s ...googleapi.Field) *CommentsMarkAsSpamCall {
11320 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11321 return c
11322 }
11323
11324
11325 func (c *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
11326 c.ctx_ = ctx
11327 return c
11328 }
11329
11330
11331
11332 func (c *CommentsMarkAsSpamCall) Header() http.Header {
11333 if c.header_ == nil {
11334 c.header_ = make(http.Header)
11335 }
11336 return c.header_
11337 }
11338
11339 func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
11340 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11341 var body io.Reader = nil
11342 c.urlParams_.Set("alt", alt)
11343 c.urlParams_.Set("prettyPrint", "false")
11344 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments/markAsSpam")
11345 urls += "?" + c.urlParams_.Encode()
11346 req, err := http.NewRequest("POST", urls, body)
11347 if err != nil {
11348 return nil, err
11349 }
11350 req.Header = reqHeaders
11351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11352 }
11353
11354
11355 func (c *CommentsMarkAsSpamCall) Do(opts ...googleapi.CallOption) error {
11356 gensupport.SetOptions(c.urlParams_, opts...)
11357 res, err := c.doRequest("json")
11358 if err != nil {
11359 return err
11360 }
11361 defer googleapi.CloseBody(res)
11362 if err := googleapi.CheckResponse(res); err != nil {
11363 return gensupport.WrapError(err)
11364 }
11365 return nil
11366 }
11367
11368 type CommentsSetModerationStatusCall struct {
11369 s *Service
11370 urlParams_ gensupport.URLParams
11371 ctx_ context.Context
11372 header_ http.Header
11373 }
11374
11375
11376
11377
11378
11379
11380
11381
11382 func (r *CommentsService) SetModerationStatus(id []string, moderationStatus string) *CommentsSetModerationStatusCall {
11383 c := &CommentsSetModerationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11384 c.urlParams_.SetMulti("id", append([]string{}, id...))
11385 c.urlParams_.Set("moderationStatus", moderationStatus)
11386 return c
11387 }
11388
11389
11390
11391
11392
11393 func (c *CommentsSetModerationStatusCall) BanAuthor(banAuthor bool) *CommentsSetModerationStatusCall {
11394 c.urlParams_.Set("banAuthor", fmt.Sprint(banAuthor))
11395 return c
11396 }
11397
11398
11399
11400
11401 func (c *CommentsSetModerationStatusCall) Fields(s ...googleapi.Field) *CommentsSetModerationStatusCall {
11402 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11403 return c
11404 }
11405
11406
11407 func (c *CommentsSetModerationStatusCall) Context(ctx context.Context) *CommentsSetModerationStatusCall {
11408 c.ctx_ = ctx
11409 return c
11410 }
11411
11412
11413
11414 func (c *CommentsSetModerationStatusCall) Header() http.Header {
11415 if c.header_ == nil {
11416 c.header_ = make(http.Header)
11417 }
11418 return c.header_
11419 }
11420
11421 func (c *CommentsSetModerationStatusCall) doRequest(alt string) (*http.Response, error) {
11422 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11423 var body io.Reader = nil
11424 c.urlParams_.Set("alt", alt)
11425 c.urlParams_.Set("prettyPrint", "false")
11426 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments/setModerationStatus")
11427 urls += "?" + c.urlParams_.Encode()
11428 req, err := http.NewRequest("POST", urls, body)
11429 if err != nil {
11430 return nil, err
11431 }
11432 req.Header = reqHeaders
11433 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11434 }
11435
11436
11437 func (c *CommentsSetModerationStatusCall) Do(opts ...googleapi.CallOption) error {
11438 gensupport.SetOptions(c.urlParams_, opts...)
11439 res, err := c.doRequest("json")
11440 if err != nil {
11441 return err
11442 }
11443 defer googleapi.CloseBody(res)
11444 if err := googleapi.CheckResponse(res); err != nil {
11445 return gensupport.WrapError(err)
11446 }
11447 return nil
11448 }
11449
11450 type CommentsUpdateCall struct {
11451 s *Service
11452 comment *Comment
11453 urlParams_ gensupport.URLParams
11454 ctx_ context.Context
11455 header_ http.Header
11456 }
11457
11458
11459
11460
11461
11462
11463
11464 func (r *CommentsService) Update(part []string, comment *Comment) *CommentsUpdateCall {
11465 c := &CommentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11466 c.urlParams_.SetMulti("part", append([]string{}, part...))
11467 c.comment = comment
11468 return c
11469 }
11470
11471
11472
11473
11474 func (c *CommentsUpdateCall) Fields(s ...googleapi.Field) *CommentsUpdateCall {
11475 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11476 return c
11477 }
11478
11479
11480 func (c *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
11481 c.ctx_ = ctx
11482 return c
11483 }
11484
11485
11486
11487 func (c *CommentsUpdateCall) Header() http.Header {
11488 if c.header_ == nil {
11489 c.header_ = make(http.Header)
11490 }
11491 return c.header_
11492 }
11493
11494 func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
11495 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11496 var body io.Reader = nil
11497 body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
11498 if err != nil {
11499 return nil, err
11500 }
11501 c.urlParams_.Set("alt", alt)
11502 c.urlParams_.Set("prettyPrint", "false")
11503 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
11504 urls += "?" + c.urlParams_.Encode()
11505 req, err := http.NewRequest("PUT", urls, body)
11506 if err != nil {
11507 return nil, err
11508 }
11509 req.Header = reqHeaders
11510 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11511 }
11512
11513
11514
11515
11516
11517
11518 func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
11519 gensupport.SetOptions(c.urlParams_, opts...)
11520 res, err := c.doRequest("json")
11521 if res != nil && res.StatusCode == http.StatusNotModified {
11522 if res.Body != nil {
11523 res.Body.Close()
11524 }
11525 return nil, gensupport.WrapError(&googleapi.Error{
11526 Code: res.StatusCode,
11527 Header: res.Header,
11528 })
11529 }
11530 if err != nil {
11531 return nil, err
11532 }
11533 defer googleapi.CloseBody(res)
11534 if err := googleapi.CheckResponse(res); err != nil {
11535 return nil, gensupport.WrapError(err)
11536 }
11537 ret := &Comment{
11538 ServerResponse: googleapi.ServerResponse{
11539 Header: res.Header,
11540 HTTPStatusCode: res.StatusCode,
11541 },
11542 }
11543 target := &ret
11544 if err := gensupport.DecodeResponse(target, res); err != nil {
11545 return nil, err
11546 }
11547 return ret, nil
11548 }
11549
11550 type I18nLanguagesListCall struct {
11551 s *Service
11552 urlParams_ gensupport.URLParams
11553 ifNoneMatch_ string
11554 ctx_ context.Context
11555 header_ http.Header
11556 }
11557
11558
11559
11560
11561
11562 func (r *I18nLanguagesService) List(part []string) *I18nLanguagesListCall {
11563 c := &I18nLanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11564 c.urlParams_.SetMulti("part", append([]string{}, part...))
11565 return c
11566 }
11567
11568
11569 func (c *I18nLanguagesListCall) Hl(hl string) *I18nLanguagesListCall {
11570 c.urlParams_.Set("hl", hl)
11571 return c
11572 }
11573
11574
11575
11576
11577 func (c *I18nLanguagesListCall) Fields(s ...googleapi.Field) *I18nLanguagesListCall {
11578 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11579 return c
11580 }
11581
11582
11583
11584
11585 func (c *I18nLanguagesListCall) IfNoneMatch(entityTag string) *I18nLanguagesListCall {
11586 c.ifNoneMatch_ = entityTag
11587 return c
11588 }
11589
11590
11591 func (c *I18nLanguagesListCall) Context(ctx context.Context) *I18nLanguagesListCall {
11592 c.ctx_ = ctx
11593 return c
11594 }
11595
11596
11597
11598 func (c *I18nLanguagesListCall) Header() http.Header {
11599 if c.header_ == nil {
11600 c.header_ = make(http.Header)
11601 }
11602 return c.header_
11603 }
11604
11605 func (c *I18nLanguagesListCall) doRequest(alt string) (*http.Response, error) {
11606 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11607 if c.ifNoneMatch_ != "" {
11608 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11609 }
11610 var body io.Reader = nil
11611 c.urlParams_.Set("alt", alt)
11612 c.urlParams_.Set("prettyPrint", "false")
11613 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/i18nLanguages")
11614 urls += "?" + c.urlParams_.Encode()
11615 req, err := http.NewRequest("GET", urls, body)
11616 if err != nil {
11617 return nil, err
11618 }
11619 req.Header = reqHeaders
11620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11621 }
11622
11623
11624
11625
11626
11627
11628
11629 func (c *I18nLanguagesListCall) Do(opts ...googleapi.CallOption) (*I18nLanguageListResponse, error) {
11630 gensupport.SetOptions(c.urlParams_, opts...)
11631 res, err := c.doRequest("json")
11632 if res != nil && res.StatusCode == http.StatusNotModified {
11633 if res.Body != nil {
11634 res.Body.Close()
11635 }
11636 return nil, gensupport.WrapError(&googleapi.Error{
11637 Code: res.StatusCode,
11638 Header: res.Header,
11639 })
11640 }
11641 if err != nil {
11642 return nil, err
11643 }
11644 defer googleapi.CloseBody(res)
11645 if err := googleapi.CheckResponse(res); err != nil {
11646 return nil, gensupport.WrapError(err)
11647 }
11648 ret := &I18nLanguageListResponse{
11649 ServerResponse: googleapi.ServerResponse{
11650 Header: res.Header,
11651 HTTPStatusCode: res.StatusCode,
11652 },
11653 }
11654 target := &ret
11655 if err := gensupport.DecodeResponse(target, res); err != nil {
11656 return nil, err
11657 }
11658 return ret, nil
11659 }
11660
11661 type I18nRegionsListCall struct {
11662 s *Service
11663 urlParams_ gensupport.URLParams
11664 ifNoneMatch_ string
11665 ctx_ context.Context
11666 header_ http.Header
11667 }
11668
11669
11670
11671
11672
11673 func (r *I18nRegionsService) List(part []string) *I18nRegionsListCall {
11674 c := &I18nRegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11675 c.urlParams_.SetMulti("part", append([]string{}, part...))
11676 return c
11677 }
11678
11679
11680 func (c *I18nRegionsListCall) Hl(hl string) *I18nRegionsListCall {
11681 c.urlParams_.Set("hl", hl)
11682 return c
11683 }
11684
11685
11686
11687
11688 func (c *I18nRegionsListCall) Fields(s ...googleapi.Field) *I18nRegionsListCall {
11689 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11690 return c
11691 }
11692
11693
11694
11695
11696 func (c *I18nRegionsListCall) IfNoneMatch(entityTag string) *I18nRegionsListCall {
11697 c.ifNoneMatch_ = entityTag
11698 return c
11699 }
11700
11701
11702 func (c *I18nRegionsListCall) Context(ctx context.Context) *I18nRegionsListCall {
11703 c.ctx_ = ctx
11704 return c
11705 }
11706
11707
11708
11709 func (c *I18nRegionsListCall) Header() http.Header {
11710 if c.header_ == nil {
11711 c.header_ = make(http.Header)
11712 }
11713 return c.header_
11714 }
11715
11716 func (c *I18nRegionsListCall) doRequest(alt string) (*http.Response, error) {
11717 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11718 if c.ifNoneMatch_ != "" {
11719 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11720 }
11721 var body io.Reader = nil
11722 c.urlParams_.Set("alt", alt)
11723 c.urlParams_.Set("prettyPrint", "false")
11724 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/i18nRegions")
11725 urls += "?" + c.urlParams_.Encode()
11726 req, err := http.NewRequest("GET", urls, body)
11727 if err != nil {
11728 return nil, err
11729 }
11730 req.Header = reqHeaders
11731 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11732 }
11733
11734
11735
11736
11737
11738
11739
11740 func (c *I18nRegionsListCall) Do(opts ...googleapi.CallOption) (*I18nRegionListResponse, error) {
11741 gensupport.SetOptions(c.urlParams_, opts...)
11742 res, err := c.doRequest("json")
11743 if res != nil && res.StatusCode == http.StatusNotModified {
11744 if res.Body != nil {
11745 res.Body.Close()
11746 }
11747 return nil, gensupport.WrapError(&googleapi.Error{
11748 Code: res.StatusCode,
11749 Header: res.Header,
11750 })
11751 }
11752 if err != nil {
11753 return nil, err
11754 }
11755 defer googleapi.CloseBody(res)
11756 if err := googleapi.CheckResponse(res); err != nil {
11757 return nil, gensupport.WrapError(err)
11758 }
11759 ret := &I18nRegionListResponse{
11760 ServerResponse: googleapi.ServerResponse{
11761 Header: res.Header,
11762 HTTPStatusCode: res.StatusCode,
11763 },
11764 }
11765 target := &ret
11766 if err := gensupport.DecodeResponse(target, res); err != nil {
11767 return nil, err
11768 }
11769 return ret, nil
11770 }
11771
11772 type LiveBroadcastsBindCall struct {
11773 s *Service
11774 urlParams_ gensupport.URLParams
11775 ctx_ context.Context
11776 header_ http.Header
11777 }
11778
11779
11780
11781
11782
11783
11784
11785
11786 func (r *LiveBroadcastsService) Bind(id string, part []string) *LiveBroadcastsBindCall {
11787 c := &LiveBroadcastsBindCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11788 c.urlParams_.Set("id", id)
11789 c.urlParams_.SetMulti("part", append([]string{}, part...))
11790 return c
11791 }
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804 func (c *LiveBroadcastsBindCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsBindCall {
11805 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11806 return c
11807 }
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826 func (c *LiveBroadcastsBindCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsBindCall {
11827 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
11828 return c
11829 }
11830
11831
11832
11833 func (c *LiveBroadcastsBindCall) StreamId(streamId string) *LiveBroadcastsBindCall {
11834 c.urlParams_.Set("streamId", streamId)
11835 return c
11836 }
11837
11838
11839
11840
11841 func (c *LiveBroadcastsBindCall) Fields(s ...googleapi.Field) *LiveBroadcastsBindCall {
11842 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11843 return c
11844 }
11845
11846
11847 func (c *LiveBroadcastsBindCall) Context(ctx context.Context) *LiveBroadcastsBindCall {
11848 c.ctx_ = ctx
11849 return c
11850 }
11851
11852
11853
11854 func (c *LiveBroadcastsBindCall) Header() http.Header {
11855 if c.header_ == nil {
11856 c.header_ = make(http.Header)
11857 }
11858 return c.header_
11859 }
11860
11861 func (c *LiveBroadcastsBindCall) doRequest(alt string) (*http.Response, error) {
11862 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11863 var body io.Reader = nil
11864 c.urlParams_.Set("alt", alt)
11865 c.urlParams_.Set("prettyPrint", "false")
11866 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/bind")
11867 urls += "?" + c.urlParams_.Encode()
11868 req, err := http.NewRequest("POST", urls, body)
11869 if err != nil {
11870 return nil, err
11871 }
11872 req.Header = reqHeaders
11873 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11874 }
11875
11876
11877
11878
11879
11880
11881 func (c *LiveBroadcastsBindCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
11882 gensupport.SetOptions(c.urlParams_, opts...)
11883 res, err := c.doRequest("json")
11884 if res != nil && res.StatusCode == http.StatusNotModified {
11885 if res.Body != nil {
11886 res.Body.Close()
11887 }
11888 return nil, gensupport.WrapError(&googleapi.Error{
11889 Code: res.StatusCode,
11890 Header: res.Header,
11891 })
11892 }
11893 if err != nil {
11894 return nil, err
11895 }
11896 defer googleapi.CloseBody(res)
11897 if err := googleapi.CheckResponse(res); err != nil {
11898 return nil, gensupport.WrapError(err)
11899 }
11900 ret := &LiveBroadcast{
11901 ServerResponse: googleapi.ServerResponse{
11902 Header: res.Header,
11903 HTTPStatusCode: res.StatusCode,
11904 },
11905 }
11906 target := &ret
11907 if err := gensupport.DecodeResponse(target, res); err != nil {
11908 return nil, err
11909 }
11910 return ret, nil
11911 }
11912
11913 type LiveBroadcastsDeleteCall struct {
11914 s *Service
11915 urlParams_ gensupport.URLParams
11916 ctx_ context.Context
11917 header_ http.Header
11918 }
11919
11920
11921
11922
11923 func (r *LiveBroadcastsService) Delete(id string) *LiveBroadcastsDeleteCall {
11924 c := &LiveBroadcastsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11925 c.urlParams_.Set("id", id)
11926 return c
11927 }
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940 func (c *LiveBroadcastsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsDeleteCall {
11941 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11942 return c
11943 }
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962 func (c *LiveBroadcastsDeleteCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsDeleteCall {
11963 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
11964 return c
11965 }
11966
11967
11968
11969
11970 func (c *LiveBroadcastsDeleteCall) Fields(s ...googleapi.Field) *LiveBroadcastsDeleteCall {
11971 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11972 return c
11973 }
11974
11975
11976 func (c *LiveBroadcastsDeleteCall) Context(ctx context.Context) *LiveBroadcastsDeleteCall {
11977 c.ctx_ = ctx
11978 return c
11979 }
11980
11981
11982
11983 func (c *LiveBroadcastsDeleteCall) Header() http.Header {
11984 if c.header_ == nil {
11985 c.header_ = make(http.Header)
11986 }
11987 return c.header_
11988 }
11989
11990 func (c *LiveBroadcastsDeleteCall) doRequest(alt string) (*http.Response, error) {
11991 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11992 var body io.Reader = nil
11993 c.urlParams_.Set("alt", alt)
11994 c.urlParams_.Set("prettyPrint", "false")
11995 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
11996 urls += "?" + c.urlParams_.Encode()
11997 req, err := http.NewRequest("DELETE", urls, body)
11998 if err != nil {
11999 return nil, err
12000 }
12001 req.Header = reqHeaders
12002 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12003 }
12004
12005
12006 func (c *LiveBroadcastsDeleteCall) Do(opts ...googleapi.CallOption) error {
12007 gensupport.SetOptions(c.urlParams_, opts...)
12008 res, err := c.doRequest("json")
12009 if err != nil {
12010 return err
12011 }
12012 defer googleapi.CloseBody(res)
12013 if err := googleapi.CheckResponse(res); err != nil {
12014 return gensupport.WrapError(err)
12015 }
12016 return nil
12017 }
12018
12019 type LiveBroadcastsInsertCall struct {
12020 s *Service
12021 livebroadcast *LiveBroadcast
12022 urlParams_ gensupport.URLParams
12023 ctx_ context.Context
12024 header_ http.Header
12025 }
12026
12027
12028
12029
12030
12031
12032
12033
12034 func (r *LiveBroadcastsService) Insert(part []string, livebroadcast *LiveBroadcast) *LiveBroadcastsInsertCall {
12035 c := &LiveBroadcastsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12036 c.urlParams_.SetMulti("part", append([]string{}, part...))
12037 c.livebroadcast = livebroadcast
12038 return c
12039 }
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052 func (c *LiveBroadcastsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsInsertCall {
12053 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12054 return c
12055 }
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074 func (c *LiveBroadcastsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsInsertCall {
12075 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
12076 return c
12077 }
12078
12079
12080
12081
12082 func (c *LiveBroadcastsInsertCall) Fields(s ...googleapi.Field) *LiveBroadcastsInsertCall {
12083 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12084 return c
12085 }
12086
12087
12088 func (c *LiveBroadcastsInsertCall) Context(ctx context.Context) *LiveBroadcastsInsertCall {
12089 c.ctx_ = ctx
12090 return c
12091 }
12092
12093
12094
12095 func (c *LiveBroadcastsInsertCall) Header() http.Header {
12096 if c.header_ == nil {
12097 c.header_ = make(http.Header)
12098 }
12099 return c.header_
12100 }
12101
12102 func (c *LiveBroadcastsInsertCall) doRequest(alt string) (*http.Response, error) {
12103 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12104 var body io.Reader = nil
12105 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
12106 if err != nil {
12107 return nil, err
12108 }
12109 c.urlParams_.Set("alt", alt)
12110 c.urlParams_.Set("prettyPrint", "false")
12111 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
12112 urls += "?" + c.urlParams_.Encode()
12113 req, err := http.NewRequest("POST", urls, body)
12114 if err != nil {
12115 return nil, err
12116 }
12117 req.Header = reqHeaders
12118 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12119 }
12120
12121
12122
12123
12124
12125
12126 func (c *LiveBroadcastsInsertCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
12127 gensupport.SetOptions(c.urlParams_, opts...)
12128 res, err := c.doRequest("json")
12129 if res != nil && res.StatusCode == http.StatusNotModified {
12130 if res.Body != nil {
12131 res.Body.Close()
12132 }
12133 return nil, gensupport.WrapError(&googleapi.Error{
12134 Code: res.StatusCode,
12135 Header: res.Header,
12136 })
12137 }
12138 if err != nil {
12139 return nil, err
12140 }
12141 defer googleapi.CloseBody(res)
12142 if err := googleapi.CheckResponse(res); err != nil {
12143 return nil, gensupport.WrapError(err)
12144 }
12145 ret := &LiveBroadcast{
12146 ServerResponse: googleapi.ServerResponse{
12147 Header: res.Header,
12148 HTTPStatusCode: res.StatusCode,
12149 },
12150 }
12151 target := &ret
12152 if err := gensupport.DecodeResponse(target, res); err != nil {
12153 return nil, err
12154 }
12155 return ret, nil
12156 }
12157
12158 type LiveBroadcastsInsertCuepointCall struct {
12159 s *Service
12160 cuepoint *Cuepoint
12161 urlParams_ gensupport.URLParams
12162 ctx_ context.Context
12163 header_ http.Header
12164 }
12165
12166
12167 func (r *LiveBroadcastsService) InsertCuepoint(cuepoint *Cuepoint) *LiveBroadcastsInsertCuepointCall {
12168 c := &LiveBroadcastsInsertCuepointCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12169 c.cuepoint = cuepoint
12170 return c
12171 }
12172
12173
12174
12175 func (c *LiveBroadcastsInsertCuepointCall) Id(id string) *LiveBroadcastsInsertCuepointCall {
12176 c.urlParams_.Set("id", id)
12177 return c
12178 }
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191 func (c *LiveBroadcastsInsertCuepointCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsInsertCuepointCall {
12192 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12193 return c
12194 }
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213 func (c *LiveBroadcastsInsertCuepointCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsInsertCuepointCall {
12214 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
12215 return c
12216 }
12217
12218
12219
12220
12221
12222 func (c *LiveBroadcastsInsertCuepointCall) Part(part ...string) *LiveBroadcastsInsertCuepointCall {
12223 c.urlParams_.SetMulti("part", append([]string{}, part...))
12224 return c
12225 }
12226
12227
12228
12229
12230 func (c *LiveBroadcastsInsertCuepointCall) Fields(s ...googleapi.Field) *LiveBroadcastsInsertCuepointCall {
12231 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12232 return c
12233 }
12234
12235
12236 func (c *LiveBroadcastsInsertCuepointCall) Context(ctx context.Context) *LiveBroadcastsInsertCuepointCall {
12237 c.ctx_ = ctx
12238 return c
12239 }
12240
12241
12242
12243 func (c *LiveBroadcastsInsertCuepointCall) Header() http.Header {
12244 if c.header_ == nil {
12245 c.header_ = make(http.Header)
12246 }
12247 return c.header_
12248 }
12249
12250 func (c *LiveBroadcastsInsertCuepointCall) doRequest(alt string) (*http.Response, error) {
12251 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12252 var body io.Reader = nil
12253 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cuepoint)
12254 if err != nil {
12255 return nil, err
12256 }
12257 c.urlParams_.Set("alt", alt)
12258 c.urlParams_.Set("prettyPrint", "false")
12259 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/cuepoint")
12260 urls += "?" + c.urlParams_.Encode()
12261 req, err := http.NewRequest("POST", urls, body)
12262 if err != nil {
12263 return nil, err
12264 }
12265 req.Header = reqHeaders
12266 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12267 }
12268
12269
12270
12271
12272
12273
12274 func (c *LiveBroadcastsInsertCuepointCall) Do(opts ...googleapi.CallOption) (*Cuepoint, error) {
12275 gensupport.SetOptions(c.urlParams_, opts...)
12276 res, err := c.doRequest("json")
12277 if res != nil && res.StatusCode == http.StatusNotModified {
12278 if res.Body != nil {
12279 res.Body.Close()
12280 }
12281 return nil, gensupport.WrapError(&googleapi.Error{
12282 Code: res.StatusCode,
12283 Header: res.Header,
12284 })
12285 }
12286 if err != nil {
12287 return nil, err
12288 }
12289 defer googleapi.CloseBody(res)
12290 if err := googleapi.CheckResponse(res); err != nil {
12291 return nil, gensupport.WrapError(err)
12292 }
12293 ret := &Cuepoint{
12294 ServerResponse: googleapi.ServerResponse{
12295 Header: res.Header,
12296 HTTPStatusCode: res.StatusCode,
12297 },
12298 }
12299 target := &ret
12300 if err := gensupport.DecodeResponse(target, res); err != nil {
12301 return nil, err
12302 }
12303 return ret, nil
12304 }
12305
12306 type LiveBroadcastsListCall struct {
12307 s *Service
12308 urlParams_ gensupport.URLParams
12309 ifNoneMatch_ string
12310 ctx_ context.Context
12311 header_ http.Header
12312 }
12313
12314
12315
12316
12317
12318
12319
12320 func (r *LiveBroadcastsService) List(part []string) *LiveBroadcastsListCall {
12321 c := &LiveBroadcastsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12322 c.urlParams_.SetMulti("part", append([]string{}, part...))
12323 return c
12324 }
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336 func (c *LiveBroadcastsListCall) BroadcastStatus(broadcastStatus string) *LiveBroadcastsListCall {
12337 c.urlParams_.Set("broadcastStatus", broadcastStatus)
12338 return c
12339 }
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350 func (c *LiveBroadcastsListCall) BroadcastType(broadcastType string) *LiveBroadcastsListCall {
12351 c.urlParams_.Set("broadcastType", broadcastType)
12352 return c
12353 }
12354
12355
12356
12357 func (c *LiveBroadcastsListCall) Id(id ...string) *LiveBroadcastsListCall {
12358 c.urlParams_.SetMulti("id", append([]string{}, id...))
12359 return c
12360 }
12361
12362
12363
12364
12365 func (c *LiveBroadcastsListCall) MaxResults(maxResults int64) *LiveBroadcastsListCall {
12366 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12367 return c
12368 }
12369
12370
12371 func (c *LiveBroadcastsListCall) Mine(mine bool) *LiveBroadcastsListCall {
12372 c.urlParams_.Set("mine", fmt.Sprint(mine))
12373 return c
12374 }
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387 func (c *LiveBroadcastsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsListCall {
12388 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12389 return c
12390 }
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409 func (c *LiveBroadcastsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsListCall {
12410 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
12411 return c
12412 }
12413
12414
12415
12416
12417
12418 func (c *LiveBroadcastsListCall) PageToken(pageToken string) *LiveBroadcastsListCall {
12419 c.urlParams_.Set("pageToken", pageToken)
12420 return c
12421 }
12422
12423
12424
12425
12426 func (c *LiveBroadcastsListCall) Fields(s ...googleapi.Field) *LiveBroadcastsListCall {
12427 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12428 return c
12429 }
12430
12431
12432
12433
12434 func (c *LiveBroadcastsListCall) IfNoneMatch(entityTag string) *LiveBroadcastsListCall {
12435 c.ifNoneMatch_ = entityTag
12436 return c
12437 }
12438
12439
12440 func (c *LiveBroadcastsListCall) Context(ctx context.Context) *LiveBroadcastsListCall {
12441 c.ctx_ = ctx
12442 return c
12443 }
12444
12445
12446
12447 func (c *LiveBroadcastsListCall) Header() http.Header {
12448 if c.header_ == nil {
12449 c.header_ = make(http.Header)
12450 }
12451 return c.header_
12452 }
12453
12454 func (c *LiveBroadcastsListCall) doRequest(alt string) (*http.Response, error) {
12455 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12456 if c.ifNoneMatch_ != "" {
12457 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12458 }
12459 var body io.Reader = nil
12460 c.urlParams_.Set("alt", alt)
12461 c.urlParams_.Set("prettyPrint", "false")
12462 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
12463 urls += "?" + c.urlParams_.Encode()
12464 req, err := http.NewRequest("GET", urls, body)
12465 if err != nil {
12466 return nil, err
12467 }
12468 req.Header = reqHeaders
12469 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12470 }
12471
12472
12473
12474
12475
12476
12477
12478 func (c *LiveBroadcastsListCall) Do(opts ...googleapi.CallOption) (*LiveBroadcastListResponse, error) {
12479 gensupport.SetOptions(c.urlParams_, opts...)
12480 res, err := c.doRequest("json")
12481 if res != nil && res.StatusCode == http.StatusNotModified {
12482 if res.Body != nil {
12483 res.Body.Close()
12484 }
12485 return nil, gensupport.WrapError(&googleapi.Error{
12486 Code: res.StatusCode,
12487 Header: res.Header,
12488 })
12489 }
12490 if err != nil {
12491 return nil, err
12492 }
12493 defer googleapi.CloseBody(res)
12494 if err := googleapi.CheckResponse(res); err != nil {
12495 return nil, gensupport.WrapError(err)
12496 }
12497 ret := &LiveBroadcastListResponse{
12498 ServerResponse: googleapi.ServerResponse{
12499 Header: res.Header,
12500 HTTPStatusCode: res.StatusCode,
12501 },
12502 }
12503 target := &ret
12504 if err := gensupport.DecodeResponse(target, res); err != nil {
12505 return nil, err
12506 }
12507 return ret, nil
12508 }
12509
12510
12511
12512
12513 func (c *LiveBroadcastsListCall) Pages(ctx context.Context, f func(*LiveBroadcastListResponse) error) error {
12514 c.ctx_ = ctx
12515 defer c.PageToken(c.urlParams_.Get("pageToken"))
12516 for {
12517 x, err := c.Do()
12518 if err != nil {
12519 return err
12520 }
12521 if err := f(x); err != nil {
12522 return err
12523 }
12524 if x.NextPageToken == "" {
12525 return nil
12526 }
12527 c.PageToken(x.NextPageToken)
12528 }
12529 }
12530
12531 type LiveBroadcastsTransitionCall struct {
12532 s *Service
12533 urlParams_ gensupport.URLParams
12534 ctx_ context.Context
12535 header_ http.Header
12536 }
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546 func (r *LiveBroadcastsService) Transition(broadcastStatus string, id string, part []string) *LiveBroadcastsTransitionCall {
12547 c := &LiveBroadcastsTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12548 c.urlParams_.Set("broadcastStatus", broadcastStatus)
12549 c.urlParams_.Set("id", id)
12550 c.urlParams_.SetMulti("part", append([]string{}, part...))
12551 return c
12552 }
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565 func (c *LiveBroadcastsTransitionCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsTransitionCall {
12566 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12567 return c
12568 }
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587 func (c *LiveBroadcastsTransitionCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsTransitionCall {
12588 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
12589 return c
12590 }
12591
12592
12593
12594
12595 func (c *LiveBroadcastsTransitionCall) Fields(s ...googleapi.Field) *LiveBroadcastsTransitionCall {
12596 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12597 return c
12598 }
12599
12600
12601 func (c *LiveBroadcastsTransitionCall) Context(ctx context.Context) *LiveBroadcastsTransitionCall {
12602 c.ctx_ = ctx
12603 return c
12604 }
12605
12606
12607
12608 func (c *LiveBroadcastsTransitionCall) Header() http.Header {
12609 if c.header_ == nil {
12610 c.header_ = make(http.Header)
12611 }
12612 return c.header_
12613 }
12614
12615 func (c *LiveBroadcastsTransitionCall) doRequest(alt string) (*http.Response, error) {
12616 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12617 var body io.Reader = nil
12618 c.urlParams_.Set("alt", alt)
12619 c.urlParams_.Set("prettyPrint", "false")
12620 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/transition")
12621 urls += "?" + c.urlParams_.Encode()
12622 req, err := http.NewRequest("POST", urls, body)
12623 if err != nil {
12624 return nil, err
12625 }
12626 req.Header = reqHeaders
12627 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12628 }
12629
12630
12631
12632
12633
12634
12635 func (c *LiveBroadcastsTransitionCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
12636 gensupport.SetOptions(c.urlParams_, opts...)
12637 res, err := c.doRequest("json")
12638 if res != nil && res.StatusCode == http.StatusNotModified {
12639 if res.Body != nil {
12640 res.Body.Close()
12641 }
12642 return nil, gensupport.WrapError(&googleapi.Error{
12643 Code: res.StatusCode,
12644 Header: res.Header,
12645 })
12646 }
12647 if err != nil {
12648 return nil, err
12649 }
12650 defer googleapi.CloseBody(res)
12651 if err := googleapi.CheckResponse(res); err != nil {
12652 return nil, gensupport.WrapError(err)
12653 }
12654 ret := &LiveBroadcast{
12655 ServerResponse: googleapi.ServerResponse{
12656 Header: res.Header,
12657 HTTPStatusCode: res.StatusCode,
12658 },
12659 }
12660 target := &ret
12661 if err := gensupport.DecodeResponse(target, res); err != nil {
12662 return nil, err
12663 }
12664 return ret, nil
12665 }
12666
12667 type LiveBroadcastsUpdateCall struct {
12668 s *Service
12669 livebroadcast *LiveBroadcast
12670 urlParams_ gensupport.URLParams
12671 ctx_ context.Context
12672 header_ http.Header
12673 }
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690 func (r *LiveBroadcastsService) Update(part []string, livebroadcast *LiveBroadcast) *LiveBroadcastsUpdateCall {
12691 c := &LiveBroadcastsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12692 c.urlParams_.SetMulti("part", append([]string{}, part...))
12693 c.livebroadcast = livebroadcast
12694 return c
12695 }
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708 func (c *LiveBroadcastsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsUpdateCall {
12709 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12710 return c
12711 }
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730 func (c *LiveBroadcastsUpdateCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsUpdateCall {
12731 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
12732 return c
12733 }
12734
12735
12736
12737
12738 func (c *LiveBroadcastsUpdateCall) Fields(s ...googleapi.Field) *LiveBroadcastsUpdateCall {
12739 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12740 return c
12741 }
12742
12743
12744 func (c *LiveBroadcastsUpdateCall) Context(ctx context.Context) *LiveBroadcastsUpdateCall {
12745 c.ctx_ = ctx
12746 return c
12747 }
12748
12749
12750
12751 func (c *LiveBroadcastsUpdateCall) Header() http.Header {
12752 if c.header_ == nil {
12753 c.header_ = make(http.Header)
12754 }
12755 return c.header_
12756 }
12757
12758 func (c *LiveBroadcastsUpdateCall) doRequest(alt string) (*http.Response, error) {
12759 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12760 var body io.Reader = nil
12761 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
12762 if err != nil {
12763 return nil, err
12764 }
12765 c.urlParams_.Set("alt", alt)
12766 c.urlParams_.Set("prettyPrint", "false")
12767 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
12768 urls += "?" + c.urlParams_.Encode()
12769 req, err := http.NewRequest("PUT", urls, body)
12770 if err != nil {
12771 return nil, err
12772 }
12773 req.Header = reqHeaders
12774 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12775 }
12776
12777
12778
12779
12780
12781
12782 func (c *LiveBroadcastsUpdateCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
12783 gensupport.SetOptions(c.urlParams_, opts...)
12784 res, err := c.doRequest("json")
12785 if res != nil && res.StatusCode == http.StatusNotModified {
12786 if res.Body != nil {
12787 res.Body.Close()
12788 }
12789 return nil, gensupport.WrapError(&googleapi.Error{
12790 Code: res.StatusCode,
12791 Header: res.Header,
12792 })
12793 }
12794 if err != nil {
12795 return nil, err
12796 }
12797 defer googleapi.CloseBody(res)
12798 if err := googleapi.CheckResponse(res); err != nil {
12799 return nil, gensupport.WrapError(err)
12800 }
12801 ret := &LiveBroadcast{
12802 ServerResponse: googleapi.ServerResponse{
12803 Header: res.Header,
12804 HTTPStatusCode: res.StatusCode,
12805 },
12806 }
12807 target := &ret
12808 if err := gensupport.DecodeResponse(target, res); err != nil {
12809 return nil, err
12810 }
12811 return ret, nil
12812 }
12813
12814 type LiveChatBansDeleteCall struct {
12815 s *Service
12816 urlParams_ gensupport.URLParams
12817 ctx_ context.Context
12818 header_ http.Header
12819 }
12820
12821
12822
12823
12824 func (r *LiveChatBansService) Delete(id string) *LiveChatBansDeleteCall {
12825 c := &LiveChatBansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12826 c.urlParams_.Set("id", id)
12827 return c
12828 }
12829
12830
12831
12832
12833 func (c *LiveChatBansDeleteCall) Fields(s ...googleapi.Field) *LiveChatBansDeleteCall {
12834 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12835 return c
12836 }
12837
12838
12839 func (c *LiveChatBansDeleteCall) Context(ctx context.Context) *LiveChatBansDeleteCall {
12840 c.ctx_ = ctx
12841 return c
12842 }
12843
12844
12845
12846 func (c *LiveChatBansDeleteCall) Header() http.Header {
12847 if c.header_ == nil {
12848 c.header_ = make(http.Header)
12849 }
12850 return c.header_
12851 }
12852
12853 func (c *LiveChatBansDeleteCall) doRequest(alt string) (*http.Response, error) {
12854 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12855 var body io.Reader = nil
12856 c.urlParams_.Set("alt", alt)
12857 c.urlParams_.Set("prettyPrint", "false")
12858 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/bans")
12859 urls += "?" + c.urlParams_.Encode()
12860 req, err := http.NewRequest("DELETE", urls, body)
12861 if err != nil {
12862 return nil, err
12863 }
12864 req.Header = reqHeaders
12865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12866 }
12867
12868
12869 func (c *LiveChatBansDeleteCall) Do(opts ...googleapi.CallOption) error {
12870 gensupport.SetOptions(c.urlParams_, opts...)
12871 res, err := c.doRequest("json")
12872 if err != nil {
12873 return err
12874 }
12875 defer googleapi.CloseBody(res)
12876 if err := googleapi.CheckResponse(res); err != nil {
12877 return gensupport.WrapError(err)
12878 }
12879 return nil
12880 }
12881
12882 type LiveChatBansInsertCall struct {
12883 s *Service
12884 livechatban *LiveChatBan
12885 urlParams_ gensupport.URLParams
12886 ctx_ context.Context
12887 header_ http.Header
12888 }
12889
12890
12891
12892
12893
12894
12895
12896 func (r *LiveChatBansService) Insert(part []string, livechatban *LiveChatBan) *LiveChatBansInsertCall {
12897 c := &LiveChatBansInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12898 c.urlParams_.SetMulti("part", append([]string{}, part...))
12899 c.livechatban = livechatban
12900 return c
12901 }
12902
12903
12904
12905
12906 func (c *LiveChatBansInsertCall) Fields(s ...googleapi.Field) *LiveChatBansInsertCall {
12907 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12908 return c
12909 }
12910
12911
12912 func (c *LiveChatBansInsertCall) Context(ctx context.Context) *LiveChatBansInsertCall {
12913 c.ctx_ = ctx
12914 return c
12915 }
12916
12917
12918
12919 func (c *LiveChatBansInsertCall) Header() http.Header {
12920 if c.header_ == nil {
12921 c.header_ = make(http.Header)
12922 }
12923 return c.header_
12924 }
12925
12926 func (c *LiveChatBansInsertCall) doRequest(alt string) (*http.Response, error) {
12927 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12928 var body io.Reader = nil
12929 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatban)
12930 if err != nil {
12931 return nil, err
12932 }
12933 c.urlParams_.Set("alt", alt)
12934 c.urlParams_.Set("prettyPrint", "false")
12935 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/bans")
12936 urls += "?" + c.urlParams_.Encode()
12937 req, err := http.NewRequest("POST", urls, body)
12938 if err != nil {
12939 return nil, err
12940 }
12941 req.Header = reqHeaders
12942 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12943 }
12944
12945
12946
12947
12948
12949
12950 func (c *LiveChatBansInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatBan, error) {
12951 gensupport.SetOptions(c.urlParams_, opts...)
12952 res, err := c.doRequest("json")
12953 if res != nil && res.StatusCode == http.StatusNotModified {
12954 if res.Body != nil {
12955 res.Body.Close()
12956 }
12957 return nil, gensupport.WrapError(&googleapi.Error{
12958 Code: res.StatusCode,
12959 Header: res.Header,
12960 })
12961 }
12962 if err != nil {
12963 return nil, err
12964 }
12965 defer googleapi.CloseBody(res)
12966 if err := googleapi.CheckResponse(res); err != nil {
12967 return nil, gensupport.WrapError(err)
12968 }
12969 ret := &LiveChatBan{
12970 ServerResponse: googleapi.ServerResponse{
12971 Header: res.Header,
12972 HTTPStatusCode: res.StatusCode,
12973 },
12974 }
12975 target := &ret
12976 if err := gensupport.DecodeResponse(target, res); err != nil {
12977 return nil, err
12978 }
12979 return ret, nil
12980 }
12981
12982 type LiveChatMessagesDeleteCall struct {
12983 s *Service
12984 urlParams_ gensupport.URLParams
12985 ctx_ context.Context
12986 header_ http.Header
12987 }
12988
12989
12990
12991
12992 func (r *LiveChatMessagesService) Delete(id string) *LiveChatMessagesDeleteCall {
12993 c := &LiveChatMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12994 c.urlParams_.Set("id", id)
12995 return c
12996 }
12997
12998
12999
13000
13001 func (c *LiveChatMessagesDeleteCall) Fields(s ...googleapi.Field) *LiveChatMessagesDeleteCall {
13002 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13003 return c
13004 }
13005
13006
13007 func (c *LiveChatMessagesDeleteCall) Context(ctx context.Context) *LiveChatMessagesDeleteCall {
13008 c.ctx_ = ctx
13009 return c
13010 }
13011
13012
13013
13014 func (c *LiveChatMessagesDeleteCall) Header() http.Header {
13015 if c.header_ == nil {
13016 c.header_ = make(http.Header)
13017 }
13018 return c.header_
13019 }
13020
13021 func (c *LiveChatMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
13022 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13023 var body io.Reader = nil
13024 c.urlParams_.Set("alt", alt)
13025 c.urlParams_.Set("prettyPrint", "false")
13026 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages")
13027 urls += "?" + c.urlParams_.Encode()
13028 req, err := http.NewRequest("DELETE", urls, body)
13029 if err != nil {
13030 return nil, err
13031 }
13032 req.Header = reqHeaders
13033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13034 }
13035
13036
13037 func (c *LiveChatMessagesDeleteCall) Do(opts ...googleapi.CallOption) error {
13038 gensupport.SetOptions(c.urlParams_, opts...)
13039 res, err := c.doRequest("json")
13040 if err != nil {
13041 return err
13042 }
13043 defer googleapi.CloseBody(res)
13044 if err := googleapi.CheckResponse(res); err != nil {
13045 return gensupport.WrapError(err)
13046 }
13047 return nil
13048 }
13049
13050 type LiveChatMessagesInsertCall struct {
13051 s *Service
13052 livechatmessage *LiveChatMessage
13053 urlParams_ gensupport.URLParams
13054 ctx_ context.Context
13055 header_ http.Header
13056 }
13057
13058
13059
13060
13061
13062
13063 func (r *LiveChatMessagesService) Insert(part []string, livechatmessage *LiveChatMessage) *LiveChatMessagesInsertCall {
13064 c := &LiveChatMessagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13065 c.urlParams_.SetMulti("part", append([]string{}, part...))
13066 c.livechatmessage = livechatmessage
13067 return c
13068 }
13069
13070
13071
13072
13073 func (c *LiveChatMessagesInsertCall) Fields(s ...googleapi.Field) *LiveChatMessagesInsertCall {
13074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13075 return c
13076 }
13077
13078
13079 func (c *LiveChatMessagesInsertCall) Context(ctx context.Context) *LiveChatMessagesInsertCall {
13080 c.ctx_ = ctx
13081 return c
13082 }
13083
13084
13085
13086 func (c *LiveChatMessagesInsertCall) Header() http.Header {
13087 if c.header_ == nil {
13088 c.header_ = make(http.Header)
13089 }
13090 return c.header_
13091 }
13092
13093 func (c *LiveChatMessagesInsertCall) doRequest(alt string) (*http.Response, error) {
13094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13095 var body io.Reader = nil
13096 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatmessage)
13097 if err != nil {
13098 return nil, err
13099 }
13100 c.urlParams_.Set("alt", alt)
13101 c.urlParams_.Set("prettyPrint", "false")
13102 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages")
13103 urls += "?" + c.urlParams_.Encode()
13104 req, err := http.NewRequest("POST", urls, body)
13105 if err != nil {
13106 return nil, err
13107 }
13108 req.Header = reqHeaders
13109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13110 }
13111
13112
13113
13114
13115
13116
13117
13118 func (c *LiveChatMessagesInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) {
13119 gensupport.SetOptions(c.urlParams_, opts...)
13120 res, err := c.doRequest("json")
13121 if res != nil && res.StatusCode == http.StatusNotModified {
13122 if res.Body != nil {
13123 res.Body.Close()
13124 }
13125 return nil, gensupport.WrapError(&googleapi.Error{
13126 Code: res.StatusCode,
13127 Header: res.Header,
13128 })
13129 }
13130 if err != nil {
13131 return nil, err
13132 }
13133 defer googleapi.CloseBody(res)
13134 if err := googleapi.CheckResponse(res); err != nil {
13135 return nil, gensupport.WrapError(err)
13136 }
13137 ret := &LiveChatMessage{
13138 ServerResponse: googleapi.ServerResponse{
13139 Header: res.Header,
13140 HTTPStatusCode: res.StatusCode,
13141 },
13142 }
13143 target := &ret
13144 if err := gensupport.DecodeResponse(target, res); err != nil {
13145 return nil, err
13146 }
13147 return ret, nil
13148 }
13149
13150 type LiveChatMessagesListCall struct {
13151 s *Service
13152 urlParams_ gensupport.URLParams
13153 ifNoneMatch_ string
13154 ctx_ context.Context
13155 header_ http.Header
13156 }
13157
13158
13159
13160
13161
13162
13163 func (r *LiveChatMessagesService) List(liveChatId string, part []string) *LiveChatMessagesListCall {
13164 c := &LiveChatMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13165 c.urlParams_.Set("liveChatId", liveChatId)
13166 c.urlParams_.SetMulti("part", append([]string{}, part...))
13167 return c
13168 }
13169
13170
13171
13172 func (c *LiveChatMessagesListCall) Hl(hl string) *LiveChatMessagesListCall {
13173 c.urlParams_.Set("hl", hl)
13174 return c
13175 }
13176
13177
13178
13179
13180 func (c *LiveChatMessagesListCall) MaxResults(maxResults int64) *LiveChatMessagesListCall {
13181 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13182 return c
13183 }
13184
13185
13186
13187
13188
13189 func (c *LiveChatMessagesListCall) PageToken(pageToken string) *LiveChatMessagesListCall {
13190 c.urlParams_.Set("pageToken", pageToken)
13191 return c
13192 }
13193
13194
13195
13196 func (c *LiveChatMessagesListCall) ProfileImageSize(profileImageSize int64) *LiveChatMessagesListCall {
13197 c.urlParams_.Set("profileImageSize", fmt.Sprint(profileImageSize))
13198 return c
13199 }
13200
13201
13202
13203
13204 func (c *LiveChatMessagesListCall) Fields(s ...googleapi.Field) *LiveChatMessagesListCall {
13205 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13206 return c
13207 }
13208
13209
13210
13211
13212 func (c *LiveChatMessagesListCall) IfNoneMatch(entityTag string) *LiveChatMessagesListCall {
13213 c.ifNoneMatch_ = entityTag
13214 return c
13215 }
13216
13217
13218 func (c *LiveChatMessagesListCall) Context(ctx context.Context) *LiveChatMessagesListCall {
13219 c.ctx_ = ctx
13220 return c
13221 }
13222
13223
13224
13225 func (c *LiveChatMessagesListCall) Header() http.Header {
13226 if c.header_ == nil {
13227 c.header_ = make(http.Header)
13228 }
13229 return c.header_
13230 }
13231
13232 func (c *LiveChatMessagesListCall) doRequest(alt string) (*http.Response, error) {
13233 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13234 if c.ifNoneMatch_ != "" {
13235 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13236 }
13237 var body io.Reader = nil
13238 c.urlParams_.Set("alt", alt)
13239 c.urlParams_.Set("prettyPrint", "false")
13240 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages")
13241 urls += "?" + c.urlParams_.Encode()
13242 req, err := http.NewRequest("GET", urls, body)
13243 if err != nil {
13244 return nil, err
13245 }
13246 req.Header = reqHeaders
13247 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13248 }
13249
13250
13251
13252
13253
13254
13255
13256 func (c *LiveChatMessagesListCall) Do(opts ...googleapi.CallOption) (*LiveChatMessageListResponse, error) {
13257 gensupport.SetOptions(c.urlParams_, opts...)
13258 res, err := c.doRequest("json")
13259 if res != nil && res.StatusCode == http.StatusNotModified {
13260 if res.Body != nil {
13261 res.Body.Close()
13262 }
13263 return nil, gensupport.WrapError(&googleapi.Error{
13264 Code: res.StatusCode,
13265 Header: res.Header,
13266 })
13267 }
13268 if err != nil {
13269 return nil, err
13270 }
13271 defer googleapi.CloseBody(res)
13272 if err := googleapi.CheckResponse(res); err != nil {
13273 return nil, gensupport.WrapError(err)
13274 }
13275 ret := &LiveChatMessageListResponse{
13276 ServerResponse: googleapi.ServerResponse{
13277 Header: res.Header,
13278 HTTPStatusCode: res.StatusCode,
13279 },
13280 }
13281 target := &ret
13282 if err := gensupport.DecodeResponse(target, res); err != nil {
13283 return nil, err
13284 }
13285 return ret, nil
13286 }
13287
13288
13289
13290
13291 func (c *LiveChatMessagesListCall) Pages(ctx context.Context, f func(*LiveChatMessageListResponse) error) error {
13292 c.ctx_ = ctx
13293 defer c.PageToken(c.urlParams_.Get("pageToken"))
13294 for {
13295 x, err := c.Do()
13296 if err != nil {
13297 return err
13298 }
13299 if err := f(x); err != nil {
13300 return err
13301 }
13302 if x.NextPageToken == "" {
13303 return nil
13304 }
13305 c.PageToken(x.NextPageToken)
13306 }
13307 }
13308
13309 type LiveChatMessagesTransitionCall struct {
13310 s *Service
13311 urlParams_ gensupport.URLParams
13312 ctx_ context.Context
13313 header_ http.Header
13314 }
13315
13316
13317 func (r *LiveChatMessagesService) Transition() *LiveChatMessagesTransitionCall {
13318 c := &LiveChatMessagesTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13319 return c
13320 }
13321
13322
13323
13324 func (c *LiveChatMessagesTransitionCall) Id(id string) *LiveChatMessagesTransitionCall {
13325 c.urlParams_.Set("id", id)
13326 return c
13327 }
13328
13329
13330
13331
13332
13333
13334
13335
13336 func (c *LiveChatMessagesTransitionCall) Status(status string) *LiveChatMessagesTransitionCall {
13337 c.urlParams_.Set("status", status)
13338 return c
13339 }
13340
13341
13342
13343
13344 func (c *LiveChatMessagesTransitionCall) Fields(s ...googleapi.Field) *LiveChatMessagesTransitionCall {
13345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13346 return c
13347 }
13348
13349
13350 func (c *LiveChatMessagesTransitionCall) Context(ctx context.Context) *LiveChatMessagesTransitionCall {
13351 c.ctx_ = ctx
13352 return c
13353 }
13354
13355
13356
13357 func (c *LiveChatMessagesTransitionCall) Header() http.Header {
13358 if c.header_ == nil {
13359 c.header_ = make(http.Header)
13360 }
13361 return c.header_
13362 }
13363
13364 func (c *LiveChatMessagesTransitionCall) doRequest(alt string) (*http.Response, error) {
13365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13366 var body io.Reader = nil
13367 c.urlParams_.Set("alt", alt)
13368 c.urlParams_.Set("prettyPrint", "false")
13369 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages/transition")
13370 urls += "?" + c.urlParams_.Encode()
13371 req, err := http.NewRequest("POST", urls, body)
13372 if err != nil {
13373 return nil, err
13374 }
13375 req.Header = reqHeaders
13376 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13377 }
13378
13379
13380
13381
13382
13383
13384
13385 func (c *LiveChatMessagesTransitionCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) {
13386 gensupport.SetOptions(c.urlParams_, opts...)
13387 res, err := c.doRequest("json")
13388 if res != nil && res.StatusCode == http.StatusNotModified {
13389 if res.Body != nil {
13390 res.Body.Close()
13391 }
13392 return nil, gensupport.WrapError(&googleapi.Error{
13393 Code: res.StatusCode,
13394 Header: res.Header,
13395 })
13396 }
13397 if err != nil {
13398 return nil, err
13399 }
13400 defer googleapi.CloseBody(res)
13401 if err := googleapi.CheckResponse(res); err != nil {
13402 return nil, gensupport.WrapError(err)
13403 }
13404 ret := &LiveChatMessage{
13405 ServerResponse: googleapi.ServerResponse{
13406 Header: res.Header,
13407 HTTPStatusCode: res.StatusCode,
13408 },
13409 }
13410 target := &ret
13411 if err := gensupport.DecodeResponse(target, res); err != nil {
13412 return nil, err
13413 }
13414 return ret, nil
13415 }
13416
13417 type LiveChatModeratorsDeleteCall struct {
13418 s *Service
13419 urlParams_ gensupport.URLParams
13420 ctx_ context.Context
13421 header_ http.Header
13422 }
13423
13424
13425
13426
13427 func (r *LiveChatModeratorsService) Delete(id string) *LiveChatModeratorsDeleteCall {
13428 c := &LiveChatModeratorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13429 c.urlParams_.Set("id", id)
13430 return c
13431 }
13432
13433
13434
13435
13436 func (c *LiveChatModeratorsDeleteCall) Fields(s ...googleapi.Field) *LiveChatModeratorsDeleteCall {
13437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13438 return c
13439 }
13440
13441
13442 func (c *LiveChatModeratorsDeleteCall) Context(ctx context.Context) *LiveChatModeratorsDeleteCall {
13443 c.ctx_ = ctx
13444 return c
13445 }
13446
13447
13448
13449 func (c *LiveChatModeratorsDeleteCall) Header() http.Header {
13450 if c.header_ == nil {
13451 c.header_ = make(http.Header)
13452 }
13453 return c.header_
13454 }
13455
13456 func (c *LiveChatModeratorsDeleteCall) doRequest(alt string) (*http.Response, error) {
13457 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13458 var body io.Reader = nil
13459 c.urlParams_.Set("alt", alt)
13460 c.urlParams_.Set("prettyPrint", "false")
13461 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/moderators")
13462 urls += "?" + c.urlParams_.Encode()
13463 req, err := http.NewRequest("DELETE", urls, body)
13464 if err != nil {
13465 return nil, err
13466 }
13467 req.Header = reqHeaders
13468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13469 }
13470
13471
13472 func (c *LiveChatModeratorsDeleteCall) Do(opts ...googleapi.CallOption) error {
13473 gensupport.SetOptions(c.urlParams_, opts...)
13474 res, err := c.doRequest("json")
13475 if err != nil {
13476 return err
13477 }
13478 defer googleapi.CloseBody(res)
13479 if err := googleapi.CheckResponse(res); err != nil {
13480 return gensupport.WrapError(err)
13481 }
13482 return nil
13483 }
13484
13485 type LiveChatModeratorsInsertCall struct {
13486 s *Service
13487 livechatmoderator *LiveChatModerator
13488 urlParams_ gensupport.URLParams
13489 ctx_ context.Context
13490 header_ http.Header
13491 }
13492
13493
13494
13495
13496
13497
13498
13499 func (r *LiveChatModeratorsService) Insert(part []string, livechatmoderator *LiveChatModerator) *LiveChatModeratorsInsertCall {
13500 c := &LiveChatModeratorsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13501 c.urlParams_.SetMulti("part", append([]string{}, part...))
13502 c.livechatmoderator = livechatmoderator
13503 return c
13504 }
13505
13506
13507
13508
13509 func (c *LiveChatModeratorsInsertCall) Fields(s ...googleapi.Field) *LiveChatModeratorsInsertCall {
13510 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13511 return c
13512 }
13513
13514
13515 func (c *LiveChatModeratorsInsertCall) Context(ctx context.Context) *LiveChatModeratorsInsertCall {
13516 c.ctx_ = ctx
13517 return c
13518 }
13519
13520
13521
13522 func (c *LiveChatModeratorsInsertCall) Header() http.Header {
13523 if c.header_ == nil {
13524 c.header_ = make(http.Header)
13525 }
13526 return c.header_
13527 }
13528
13529 func (c *LiveChatModeratorsInsertCall) doRequest(alt string) (*http.Response, error) {
13530 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13531 var body io.Reader = nil
13532 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatmoderator)
13533 if err != nil {
13534 return nil, err
13535 }
13536 c.urlParams_.Set("alt", alt)
13537 c.urlParams_.Set("prettyPrint", "false")
13538 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/moderators")
13539 urls += "?" + c.urlParams_.Encode()
13540 req, err := http.NewRequest("POST", urls, body)
13541 if err != nil {
13542 return nil, err
13543 }
13544 req.Header = reqHeaders
13545 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13546 }
13547
13548
13549
13550
13551
13552
13553
13554 func (c *LiveChatModeratorsInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatModerator, error) {
13555 gensupport.SetOptions(c.urlParams_, opts...)
13556 res, err := c.doRequest("json")
13557 if res != nil && res.StatusCode == http.StatusNotModified {
13558 if res.Body != nil {
13559 res.Body.Close()
13560 }
13561 return nil, gensupport.WrapError(&googleapi.Error{
13562 Code: res.StatusCode,
13563 Header: res.Header,
13564 })
13565 }
13566 if err != nil {
13567 return nil, err
13568 }
13569 defer googleapi.CloseBody(res)
13570 if err := googleapi.CheckResponse(res); err != nil {
13571 return nil, gensupport.WrapError(err)
13572 }
13573 ret := &LiveChatModerator{
13574 ServerResponse: googleapi.ServerResponse{
13575 Header: res.Header,
13576 HTTPStatusCode: res.StatusCode,
13577 },
13578 }
13579 target := &ret
13580 if err := gensupport.DecodeResponse(target, res); err != nil {
13581 return nil, err
13582 }
13583 return ret, nil
13584 }
13585
13586 type LiveChatModeratorsListCall struct {
13587 s *Service
13588 urlParams_ gensupport.URLParams
13589 ifNoneMatch_ string
13590 ctx_ context.Context
13591 header_ http.Header
13592 }
13593
13594
13595
13596
13597
13598
13599
13600 func (r *LiveChatModeratorsService) List(liveChatId string, part []string) *LiveChatModeratorsListCall {
13601 c := &LiveChatModeratorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13602 c.urlParams_.Set("liveChatId", liveChatId)
13603 c.urlParams_.SetMulti("part", append([]string{}, part...))
13604 return c
13605 }
13606
13607
13608
13609
13610 func (c *LiveChatModeratorsListCall) MaxResults(maxResults int64) *LiveChatModeratorsListCall {
13611 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13612 return c
13613 }
13614
13615
13616
13617
13618
13619 func (c *LiveChatModeratorsListCall) PageToken(pageToken string) *LiveChatModeratorsListCall {
13620 c.urlParams_.Set("pageToken", pageToken)
13621 return c
13622 }
13623
13624
13625
13626
13627 func (c *LiveChatModeratorsListCall) Fields(s ...googleapi.Field) *LiveChatModeratorsListCall {
13628 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13629 return c
13630 }
13631
13632
13633
13634
13635 func (c *LiveChatModeratorsListCall) IfNoneMatch(entityTag string) *LiveChatModeratorsListCall {
13636 c.ifNoneMatch_ = entityTag
13637 return c
13638 }
13639
13640
13641 func (c *LiveChatModeratorsListCall) Context(ctx context.Context) *LiveChatModeratorsListCall {
13642 c.ctx_ = ctx
13643 return c
13644 }
13645
13646
13647
13648 func (c *LiveChatModeratorsListCall) Header() http.Header {
13649 if c.header_ == nil {
13650 c.header_ = make(http.Header)
13651 }
13652 return c.header_
13653 }
13654
13655 func (c *LiveChatModeratorsListCall) doRequest(alt string) (*http.Response, error) {
13656 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13657 if c.ifNoneMatch_ != "" {
13658 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13659 }
13660 var body io.Reader = nil
13661 c.urlParams_.Set("alt", alt)
13662 c.urlParams_.Set("prettyPrint", "false")
13663 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/moderators")
13664 urls += "?" + c.urlParams_.Encode()
13665 req, err := http.NewRequest("GET", urls, body)
13666 if err != nil {
13667 return nil, err
13668 }
13669 req.Header = reqHeaders
13670 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13671 }
13672
13673
13674
13675
13676
13677
13678
13679 func (c *LiveChatModeratorsListCall) Do(opts ...googleapi.CallOption) (*LiveChatModeratorListResponse, error) {
13680 gensupport.SetOptions(c.urlParams_, opts...)
13681 res, err := c.doRequest("json")
13682 if res != nil && res.StatusCode == http.StatusNotModified {
13683 if res.Body != nil {
13684 res.Body.Close()
13685 }
13686 return nil, gensupport.WrapError(&googleapi.Error{
13687 Code: res.StatusCode,
13688 Header: res.Header,
13689 })
13690 }
13691 if err != nil {
13692 return nil, err
13693 }
13694 defer googleapi.CloseBody(res)
13695 if err := googleapi.CheckResponse(res); err != nil {
13696 return nil, gensupport.WrapError(err)
13697 }
13698 ret := &LiveChatModeratorListResponse{
13699 ServerResponse: googleapi.ServerResponse{
13700 Header: res.Header,
13701 HTTPStatusCode: res.StatusCode,
13702 },
13703 }
13704 target := &ret
13705 if err := gensupport.DecodeResponse(target, res); err != nil {
13706 return nil, err
13707 }
13708 return ret, nil
13709 }
13710
13711
13712
13713
13714 func (c *LiveChatModeratorsListCall) Pages(ctx context.Context, f func(*LiveChatModeratorListResponse) error) error {
13715 c.ctx_ = ctx
13716 defer c.PageToken(c.urlParams_.Get("pageToken"))
13717 for {
13718 x, err := c.Do()
13719 if err != nil {
13720 return err
13721 }
13722 if err := f(x); err != nil {
13723 return err
13724 }
13725 if x.NextPageToken == "" {
13726 return nil
13727 }
13728 c.PageToken(x.NextPageToken)
13729 }
13730 }
13731
13732 type LiveStreamsDeleteCall struct {
13733 s *Service
13734 urlParams_ gensupport.URLParams
13735 ctx_ context.Context
13736 header_ http.Header
13737 }
13738
13739
13740
13741
13742 func (r *LiveStreamsService) Delete(id string) *LiveStreamsDeleteCall {
13743 c := &LiveStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13744 c.urlParams_.Set("id", id)
13745 return c
13746 }
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759 func (c *LiveStreamsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsDeleteCall {
13760 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
13761 return c
13762 }
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781 func (c *LiveStreamsDeleteCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsDeleteCall {
13782 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
13783 return c
13784 }
13785
13786
13787
13788
13789 func (c *LiveStreamsDeleteCall) Fields(s ...googleapi.Field) *LiveStreamsDeleteCall {
13790 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13791 return c
13792 }
13793
13794
13795 func (c *LiveStreamsDeleteCall) Context(ctx context.Context) *LiveStreamsDeleteCall {
13796 c.ctx_ = ctx
13797 return c
13798 }
13799
13800
13801
13802 func (c *LiveStreamsDeleteCall) Header() http.Header {
13803 if c.header_ == nil {
13804 c.header_ = make(http.Header)
13805 }
13806 return c.header_
13807 }
13808
13809 func (c *LiveStreamsDeleteCall) doRequest(alt string) (*http.Response, error) {
13810 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13811 var body io.Reader = nil
13812 c.urlParams_.Set("alt", alt)
13813 c.urlParams_.Set("prettyPrint", "false")
13814 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
13815 urls += "?" + c.urlParams_.Encode()
13816 req, err := http.NewRequest("DELETE", urls, body)
13817 if err != nil {
13818 return nil, err
13819 }
13820 req.Header = reqHeaders
13821 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13822 }
13823
13824
13825 func (c *LiveStreamsDeleteCall) Do(opts ...googleapi.CallOption) error {
13826 gensupport.SetOptions(c.urlParams_, opts...)
13827 res, err := c.doRequest("json")
13828 if err != nil {
13829 return err
13830 }
13831 defer googleapi.CloseBody(res)
13832 if err := googleapi.CheckResponse(res); err != nil {
13833 return gensupport.WrapError(err)
13834 }
13835 return nil
13836 }
13837
13838 type LiveStreamsInsertCall struct {
13839 s *Service
13840 livestream *LiveStream
13841 urlParams_ gensupport.URLParams
13842 ctx_ context.Context
13843 header_ http.Header
13844 }
13845
13846
13847
13848
13849
13850
13851
13852
13853 func (r *LiveStreamsService) Insert(part []string, livestream *LiveStream) *LiveStreamsInsertCall {
13854 c := &LiveStreamsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13855 c.urlParams_.SetMulti("part", append([]string{}, part...))
13856 c.livestream = livestream
13857 return c
13858 }
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871 func (c *LiveStreamsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsInsertCall {
13872 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
13873 return c
13874 }
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893 func (c *LiveStreamsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsInsertCall {
13894 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
13895 return c
13896 }
13897
13898
13899
13900
13901 func (c *LiveStreamsInsertCall) Fields(s ...googleapi.Field) *LiveStreamsInsertCall {
13902 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13903 return c
13904 }
13905
13906
13907 func (c *LiveStreamsInsertCall) Context(ctx context.Context) *LiveStreamsInsertCall {
13908 c.ctx_ = ctx
13909 return c
13910 }
13911
13912
13913
13914 func (c *LiveStreamsInsertCall) Header() http.Header {
13915 if c.header_ == nil {
13916 c.header_ = make(http.Header)
13917 }
13918 return c.header_
13919 }
13920
13921 func (c *LiveStreamsInsertCall) doRequest(alt string) (*http.Response, error) {
13922 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13923 var body io.Reader = nil
13924 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
13925 if err != nil {
13926 return nil, err
13927 }
13928 c.urlParams_.Set("alt", alt)
13929 c.urlParams_.Set("prettyPrint", "false")
13930 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
13931 urls += "?" + c.urlParams_.Encode()
13932 req, err := http.NewRequest("POST", urls, body)
13933 if err != nil {
13934 return nil, err
13935 }
13936 req.Header = reqHeaders
13937 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13938 }
13939
13940
13941
13942
13943
13944
13945 func (c *LiveStreamsInsertCall) Do(opts ...googleapi.CallOption) (*LiveStream, error) {
13946 gensupport.SetOptions(c.urlParams_, opts...)
13947 res, err := c.doRequest("json")
13948 if res != nil && res.StatusCode == http.StatusNotModified {
13949 if res.Body != nil {
13950 res.Body.Close()
13951 }
13952 return nil, gensupport.WrapError(&googleapi.Error{
13953 Code: res.StatusCode,
13954 Header: res.Header,
13955 })
13956 }
13957 if err != nil {
13958 return nil, err
13959 }
13960 defer googleapi.CloseBody(res)
13961 if err := googleapi.CheckResponse(res); err != nil {
13962 return nil, gensupport.WrapError(err)
13963 }
13964 ret := &LiveStream{
13965 ServerResponse: googleapi.ServerResponse{
13966 Header: res.Header,
13967 HTTPStatusCode: res.StatusCode,
13968 },
13969 }
13970 target := &ret
13971 if err := gensupport.DecodeResponse(target, res); err != nil {
13972 return nil, err
13973 }
13974 return ret, nil
13975 }
13976
13977 type LiveStreamsListCall struct {
13978 s *Service
13979 urlParams_ gensupport.URLParams
13980 ifNoneMatch_ string
13981 ctx_ context.Context
13982 header_ http.Header
13983 }
13984
13985
13986
13987
13988
13989
13990
13991 func (r *LiveStreamsService) List(part []string) *LiveStreamsListCall {
13992 c := &LiveStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13993 c.urlParams_.SetMulti("part", append([]string{}, part...))
13994 return c
13995 }
13996
13997
13998
13999 func (c *LiveStreamsListCall) Id(id ...string) *LiveStreamsListCall {
14000 c.urlParams_.SetMulti("id", append([]string{}, id...))
14001 return c
14002 }
14003
14004
14005
14006
14007 func (c *LiveStreamsListCall) MaxResults(maxResults int64) *LiveStreamsListCall {
14008 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14009 return c
14010 }
14011
14012
14013 func (c *LiveStreamsListCall) Mine(mine bool) *LiveStreamsListCall {
14014 c.urlParams_.Set("mine", fmt.Sprint(mine))
14015 return c
14016 }
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029 func (c *LiveStreamsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsListCall {
14030 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
14031 return c
14032 }
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051 func (c *LiveStreamsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsListCall {
14052 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
14053 return c
14054 }
14055
14056
14057
14058
14059
14060 func (c *LiveStreamsListCall) PageToken(pageToken string) *LiveStreamsListCall {
14061 c.urlParams_.Set("pageToken", pageToken)
14062 return c
14063 }
14064
14065
14066
14067
14068 func (c *LiveStreamsListCall) Fields(s ...googleapi.Field) *LiveStreamsListCall {
14069 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14070 return c
14071 }
14072
14073
14074
14075
14076 func (c *LiveStreamsListCall) IfNoneMatch(entityTag string) *LiveStreamsListCall {
14077 c.ifNoneMatch_ = entityTag
14078 return c
14079 }
14080
14081
14082 func (c *LiveStreamsListCall) Context(ctx context.Context) *LiveStreamsListCall {
14083 c.ctx_ = ctx
14084 return c
14085 }
14086
14087
14088
14089 func (c *LiveStreamsListCall) Header() http.Header {
14090 if c.header_ == nil {
14091 c.header_ = make(http.Header)
14092 }
14093 return c.header_
14094 }
14095
14096 func (c *LiveStreamsListCall) doRequest(alt string) (*http.Response, error) {
14097 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14098 if c.ifNoneMatch_ != "" {
14099 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14100 }
14101 var body io.Reader = nil
14102 c.urlParams_.Set("alt", alt)
14103 c.urlParams_.Set("prettyPrint", "false")
14104 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
14105 urls += "?" + c.urlParams_.Encode()
14106 req, err := http.NewRequest("GET", urls, body)
14107 if err != nil {
14108 return nil, err
14109 }
14110 req.Header = reqHeaders
14111 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14112 }
14113
14114
14115
14116
14117
14118
14119
14120 func (c *LiveStreamsListCall) Do(opts ...googleapi.CallOption) (*LiveStreamListResponse, error) {
14121 gensupport.SetOptions(c.urlParams_, opts...)
14122 res, err := c.doRequest("json")
14123 if res != nil && res.StatusCode == http.StatusNotModified {
14124 if res.Body != nil {
14125 res.Body.Close()
14126 }
14127 return nil, gensupport.WrapError(&googleapi.Error{
14128 Code: res.StatusCode,
14129 Header: res.Header,
14130 })
14131 }
14132 if err != nil {
14133 return nil, err
14134 }
14135 defer googleapi.CloseBody(res)
14136 if err := googleapi.CheckResponse(res); err != nil {
14137 return nil, gensupport.WrapError(err)
14138 }
14139 ret := &LiveStreamListResponse{
14140 ServerResponse: googleapi.ServerResponse{
14141 Header: res.Header,
14142 HTTPStatusCode: res.StatusCode,
14143 },
14144 }
14145 target := &ret
14146 if err := gensupport.DecodeResponse(target, res); err != nil {
14147 return nil, err
14148 }
14149 return ret, nil
14150 }
14151
14152
14153
14154
14155 func (c *LiveStreamsListCall) Pages(ctx context.Context, f func(*LiveStreamListResponse) error) error {
14156 c.ctx_ = ctx
14157 defer c.PageToken(c.urlParams_.Get("pageToken"))
14158 for {
14159 x, err := c.Do()
14160 if err != nil {
14161 return err
14162 }
14163 if err := f(x); err != nil {
14164 return err
14165 }
14166 if x.NextPageToken == "" {
14167 return nil
14168 }
14169 c.PageToken(x.NextPageToken)
14170 }
14171 }
14172
14173 type LiveStreamsUpdateCall struct {
14174 s *Service
14175 livestream *LiveStream
14176 urlParams_ gensupport.URLParams
14177 ctx_ context.Context
14178 header_ http.Header
14179 }
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191 func (r *LiveStreamsService) Update(part []string, livestream *LiveStream) *LiveStreamsUpdateCall {
14192 c := &LiveStreamsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14193 c.urlParams_.SetMulti("part", append([]string{}, part...))
14194 c.livestream = livestream
14195 return c
14196 }
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209 func (c *LiveStreamsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsUpdateCall {
14210 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
14211 return c
14212 }
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231 func (c *LiveStreamsUpdateCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsUpdateCall {
14232 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
14233 return c
14234 }
14235
14236
14237
14238
14239 func (c *LiveStreamsUpdateCall) Fields(s ...googleapi.Field) *LiveStreamsUpdateCall {
14240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14241 return c
14242 }
14243
14244
14245 func (c *LiveStreamsUpdateCall) Context(ctx context.Context) *LiveStreamsUpdateCall {
14246 c.ctx_ = ctx
14247 return c
14248 }
14249
14250
14251
14252 func (c *LiveStreamsUpdateCall) Header() http.Header {
14253 if c.header_ == nil {
14254 c.header_ = make(http.Header)
14255 }
14256 return c.header_
14257 }
14258
14259 func (c *LiveStreamsUpdateCall) doRequest(alt string) (*http.Response, error) {
14260 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14261 var body io.Reader = nil
14262 body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
14263 if err != nil {
14264 return nil, err
14265 }
14266 c.urlParams_.Set("alt", alt)
14267 c.urlParams_.Set("prettyPrint", "false")
14268 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
14269 urls += "?" + c.urlParams_.Encode()
14270 req, err := http.NewRequest("PUT", urls, body)
14271 if err != nil {
14272 return nil, err
14273 }
14274 req.Header = reqHeaders
14275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14276 }
14277
14278
14279
14280
14281
14282
14283 func (c *LiveStreamsUpdateCall) Do(opts ...googleapi.CallOption) (*LiveStream, error) {
14284 gensupport.SetOptions(c.urlParams_, opts...)
14285 res, err := c.doRequest("json")
14286 if res != nil && res.StatusCode == http.StatusNotModified {
14287 if res.Body != nil {
14288 res.Body.Close()
14289 }
14290 return nil, gensupport.WrapError(&googleapi.Error{
14291 Code: res.StatusCode,
14292 Header: res.Header,
14293 })
14294 }
14295 if err != nil {
14296 return nil, err
14297 }
14298 defer googleapi.CloseBody(res)
14299 if err := googleapi.CheckResponse(res); err != nil {
14300 return nil, gensupport.WrapError(err)
14301 }
14302 ret := &LiveStream{
14303 ServerResponse: googleapi.ServerResponse{
14304 Header: res.Header,
14305 HTTPStatusCode: res.StatusCode,
14306 },
14307 }
14308 target := &ret
14309 if err := gensupport.DecodeResponse(target, res); err != nil {
14310 return nil, err
14311 }
14312 return ret, nil
14313 }
14314
14315 type MembersListCall struct {
14316 s *Service
14317 urlParams_ gensupport.URLParams
14318 ifNoneMatch_ string
14319 ctx_ context.Context
14320 header_ http.Header
14321 }
14322
14323
14324
14325
14326
14327
14328 func (r *MembersService) List(part []string) *MembersListCall {
14329 c := &MembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14330 c.urlParams_.SetMulti("part", append([]string{}, part...))
14331 return c
14332 }
14333
14334
14335
14336
14337 func (c *MembersListCall) FilterByMemberChannelId(filterByMemberChannelId string) *MembersListCall {
14338 c.urlParams_.Set("filterByMemberChannelId", filterByMemberChannelId)
14339 return c
14340 }
14341
14342
14343
14344 func (c *MembersListCall) HasAccessToLevel(hasAccessToLevel string) *MembersListCall {
14345 c.urlParams_.Set("hasAccessToLevel", hasAccessToLevel)
14346 return c
14347 }
14348
14349
14350
14351
14352 func (c *MembersListCall) MaxResults(maxResults int64) *MembersListCall {
14353 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14354 return c
14355 }
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370 func (c *MembersListCall) Mode(mode string) *MembersListCall {
14371 c.urlParams_.Set("mode", mode)
14372 return c
14373 }
14374
14375
14376
14377
14378
14379 func (c *MembersListCall) PageToken(pageToken string) *MembersListCall {
14380 c.urlParams_.Set("pageToken", pageToken)
14381 return c
14382 }
14383
14384
14385
14386
14387 func (c *MembersListCall) Fields(s ...googleapi.Field) *MembersListCall {
14388 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14389 return c
14390 }
14391
14392
14393
14394
14395 func (c *MembersListCall) IfNoneMatch(entityTag string) *MembersListCall {
14396 c.ifNoneMatch_ = entityTag
14397 return c
14398 }
14399
14400
14401 func (c *MembersListCall) Context(ctx context.Context) *MembersListCall {
14402 c.ctx_ = ctx
14403 return c
14404 }
14405
14406
14407
14408 func (c *MembersListCall) Header() http.Header {
14409 if c.header_ == nil {
14410 c.header_ = make(http.Header)
14411 }
14412 return c.header_
14413 }
14414
14415 func (c *MembersListCall) doRequest(alt string) (*http.Response, error) {
14416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14417 if c.ifNoneMatch_ != "" {
14418 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14419 }
14420 var body io.Reader = nil
14421 c.urlParams_.Set("alt", alt)
14422 c.urlParams_.Set("prettyPrint", "false")
14423 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/members")
14424 urls += "?" + c.urlParams_.Encode()
14425 req, err := http.NewRequest("GET", urls, body)
14426 if err != nil {
14427 return nil, err
14428 }
14429 req.Header = reqHeaders
14430 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14431 }
14432
14433
14434
14435
14436
14437
14438
14439 func (c *MembersListCall) Do(opts ...googleapi.CallOption) (*MemberListResponse, error) {
14440 gensupport.SetOptions(c.urlParams_, opts...)
14441 res, err := c.doRequest("json")
14442 if res != nil && res.StatusCode == http.StatusNotModified {
14443 if res.Body != nil {
14444 res.Body.Close()
14445 }
14446 return nil, gensupport.WrapError(&googleapi.Error{
14447 Code: res.StatusCode,
14448 Header: res.Header,
14449 })
14450 }
14451 if err != nil {
14452 return nil, err
14453 }
14454 defer googleapi.CloseBody(res)
14455 if err := googleapi.CheckResponse(res); err != nil {
14456 return nil, gensupport.WrapError(err)
14457 }
14458 ret := &MemberListResponse{
14459 ServerResponse: googleapi.ServerResponse{
14460 Header: res.Header,
14461 HTTPStatusCode: res.StatusCode,
14462 },
14463 }
14464 target := &ret
14465 if err := gensupport.DecodeResponse(target, res); err != nil {
14466 return nil, err
14467 }
14468 return ret, nil
14469 }
14470
14471
14472
14473
14474 func (c *MembersListCall) Pages(ctx context.Context, f func(*MemberListResponse) error) error {
14475 c.ctx_ = ctx
14476 defer c.PageToken(c.urlParams_.Get("pageToken"))
14477 for {
14478 x, err := c.Do()
14479 if err != nil {
14480 return err
14481 }
14482 if err := f(x); err != nil {
14483 return err
14484 }
14485 if x.NextPageToken == "" {
14486 return nil
14487 }
14488 c.PageToken(x.NextPageToken)
14489 }
14490 }
14491
14492 type MembershipsLevelsListCall struct {
14493 s *Service
14494 urlParams_ gensupport.URLParams
14495 ifNoneMatch_ string
14496 ctx_ context.Context
14497 header_ http.Header
14498 }
14499
14500
14501
14502
14503
14504
14505 func (r *MembershipsLevelsService) List(part []string) *MembershipsLevelsListCall {
14506 c := &MembershipsLevelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14507 c.urlParams_.SetMulti("part", append([]string{}, part...))
14508 return c
14509 }
14510
14511
14512
14513
14514 func (c *MembershipsLevelsListCall) Fields(s ...googleapi.Field) *MembershipsLevelsListCall {
14515 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14516 return c
14517 }
14518
14519
14520
14521
14522 func (c *MembershipsLevelsListCall) IfNoneMatch(entityTag string) *MembershipsLevelsListCall {
14523 c.ifNoneMatch_ = entityTag
14524 return c
14525 }
14526
14527
14528 func (c *MembershipsLevelsListCall) Context(ctx context.Context) *MembershipsLevelsListCall {
14529 c.ctx_ = ctx
14530 return c
14531 }
14532
14533
14534
14535 func (c *MembershipsLevelsListCall) Header() http.Header {
14536 if c.header_ == nil {
14537 c.header_ = make(http.Header)
14538 }
14539 return c.header_
14540 }
14541
14542 func (c *MembershipsLevelsListCall) doRequest(alt string) (*http.Response, error) {
14543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14544 if c.ifNoneMatch_ != "" {
14545 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14546 }
14547 var body io.Reader = nil
14548 c.urlParams_.Set("alt", alt)
14549 c.urlParams_.Set("prettyPrint", "false")
14550 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/membershipsLevels")
14551 urls += "?" + c.urlParams_.Encode()
14552 req, err := http.NewRequest("GET", urls, body)
14553 if err != nil {
14554 return nil, err
14555 }
14556 req.Header = reqHeaders
14557 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14558 }
14559
14560
14561
14562
14563
14564
14565
14566 func (c *MembershipsLevelsListCall) Do(opts ...googleapi.CallOption) (*MembershipsLevelListResponse, error) {
14567 gensupport.SetOptions(c.urlParams_, opts...)
14568 res, err := c.doRequest("json")
14569 if res != nil && res.StatusCode == http.StatusNotModified {
14570 if res.Body != nil {
14571 res.Body.Close()
14572 }
14573 return nil, gensupport.WrapError(&googleapi.Error{
14574 Code: res.StatusCode,
14575 Header: res.Header,
14576 })
14577 }
14578 if err != nil {
14579 return nil, err
14580 }
14581 defer googleapi.CloseBody(res)
14582 if err := googleapi.CheckResponse(res); err != nil {
14583 return nil, gensupport.WrapError(err)
14584 }
14585 ret := &MembershipsLevelListResponse{
14586 ServerResponse: googleapi.ServerResponse{
14587 Header: res.Header,
14588 HTTPStatusCode: res.StatusCode,
14589 },
14590 }
14591 target := &ret
14592 if err := gensupport.DecodeResponse(target, res); err != nil {
14593 return nil, err
14594 }
14595 return ret, nil
14596 }
14597
14598 type PlaylistImagesDeleteCall struct {
14599 s *Service
14600 urlParams_ gensupport.URLParams
14601 ctx_ context.Context
14602 header_ http.Header
14603 }
14604
14605
14606 func (r *PlaylistImagesService) Delete() *PlaylistImagesDeleteCall {
14607 c := &PlaylistImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14608 return c
14609 }
14610
14611
14612
14613 func (c *PlaylistImagesDeleteCall) Id(id string) *PlaylistImagesDeleteCall {
14614 c.urlParams_.Set("id", id)
14615 return c
14616 }
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629 func (c *PlaylistImagesDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesDeleteCall {
14630 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
14631 return c
14632 }
14633
14634
14635
14636
14637 func (c *PlaylistImagesDeleteCall) Fields(s ...googleapi.Field) *PlaylistImagesDeleteCall {
14638 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14639 return c
14640 }
14641
14642
14643 func (c *PlaylistImagesDeleteCall) Context(ctx context.Context) *PlaylistImagesDeleteCall {
14644 c.ctx_ = ctx
14645 return c
14646 }
14647
14648
14649
14650 func (c *PlaylistImagesDeleteCall) Header() http.Header {
14651 if c.header_ == nil {
14652 c.header_ = make(http.Header)
14653 }
14654 return c.header_
14655 }
14656
14657 func (c *PlaylistImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
14658 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14659 var body io.Reader = nil
14660 c.urlParams_.Set("alt", alt)
14661 c.urlParams_.Set("prettyPrint", "false")
14662 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
14663 urls += "?" + c.urlParams_.Encode()
14664 req, err := http.NewRequest("DELETE", urls, body)
14665 if err != nil {
14666 return nil, err
14667 }
14668 req.Header = reqHeaders
14669 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14670 }
14671
14672
14673 func (c *PlaylistImagesDeleteCall) Do(opts ...googleapi.CallOption) error {
14674 gensupport.SetOptions(c.urlParams_, opts...)
14675 res, err := c.doRequest("json")
14676 if err != nil {
14677 return err
14678 }
14679 defer googleapi.CloseBody(res)
14680 if err := googleapi.CheckResponse(res); err != nil {
14681 return gensupport.WrapError(err)
14682 }
14683 return nil
14684 }
14685
14686 type PlaylistImagesInsertCall struct {
14687 s *Service
14688 playlistimage *PlaylistImage
14689 urlParams_ gensupport.URLParams
14690 mediaInfo_ *gensupport.MediaInfo
14691 ctx_ context.Context
14692 header_ http.Header
14693 }
14694
14695
14696 func (r *PlaylistImagesService) Insert(playlistimage *PlaylistImage) *PlaylistImagesInsertCall {
14697 c := &PlaylistImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14698 c.playlistimage = playlistimage
14699 return c
14700 }
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713 func (c *PlaylistImagesInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesInsertCall {
14714 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
14715 return c
14716 }
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735 func (c *PlaylistImagesInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistImagesInsertCall {
14736 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
14737 return c
14738 }
14739
14740
14741
14742 func (c *PlaylistImagesInsertCall) Part(part ...string) *PlaylistImagesInsertCall {
14743 c.urlParams_.SetMulti("part", append([]string{}, part...))
14744 return c
14745 }
14746
14747
14748
14749
14750
14751
14752
14753
14754 func (c *PlaylistImagesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *PlaylistImagesInsertCall {
14755 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
14756 return c
14757 }
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768 func (c *PlaylistImagesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *PlaylistImagesInsertCall {
14769 c.ctx_ = ctx
14770 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
14771 return c
14772 }
14773
14774
14775
14776
14777
14778 func (c *PlaylistImagesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *PlaylistImagesInsertCall {
14779 c.mediaInfo_.SetProgressUpdater(pu)
14780 return c
14781 }
14782
14783
14784
14785
14786 func (c *PlaylistImagesInsertCall) Fields(s ...googleapi.Field) *PlaylistImagesInsertCall {
14787 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14788 return c
14789 }
14790
14791
14792
14793
14794 func (c *PlaylistImagesInsertCall) Context(ctx context.Context) *PlaylistImagesInsertCall {
14795 c.ctx_ = ctx
14796 return c
14797 }
14798
14799
14800
14801 func (c *PlaylistImagesInsertCall) Header() http.Header {
14802 if c.header_ == nil {
14803 c.header_ = make(http.Header)
14804 }
14805 return c.header_
14806 }
14807
14808 func (c *PlaylistImagesInsertCall) doRequest(alt string) (*http.Response, error) {
14809 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14810 var body io.Reader = nil
14811 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistimage)
14812 if err != nil {
14813 return nil, err
14814 }
14815 c.urlParams_.Set("alt", alt)
14816 c.urlParams_.Set("prettyPrint", "false")
14817 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
14818 if c.mediaInfo_ != nil {
14819 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/playlistImages")
14820 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
14821 }
14822 if body == nil {
14823 body = new(bytes.Buffer)
14824 reqHeaders.Set("Content-Type", "application/json")
14825 }
14826 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
14827 defer cleanup()
14828 urls += "?" + c.urlParams_.Encode()
14829 req, err := http.NewRequest("POST", urls, body)
14830 if err != nil {
14831 return nil, err
14832 }
14833 req.Header = reqHeaders
14834 req.GetBody = getBody
14835 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14836 }
14837
14838
14839
14840
14841
14842
14843 func (c *PlaylistImagesInsertCall) Do(opts ...googleapi.CallOption) (*PlaylistImage, error) {
14844 gensupport.SetOptions(c.urlParams_, opts...)
14845 res, err := c.doRequest("json")
14846 if res != nil && res.StatusCode == http.StatusNotModified {
14847 if res.Body != nil {
14848 res.Body.Close()
14849 }
14850 return nil, gensupport.WrapError(&googleapi.Error{
14851 Code: res.StatusCode,
14852 Header: res.Header,
14853 })
14854 }
14855 if err != nil {
14856 return nil, err
14857 }
14858 defer googleapi.CloseBody(res)
14859 if err := googleapi.CheckResponse(res); err != nil {
14860 return nil, gensupport.WrapError(err)
14861 }
14862 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
14863 if rx != nil {
14864 rx.Client = c.s.client
14865 rx.UserAgent = c.s.userAgent()
14866 ctx := c.ctx_
14867 if ctx == nil {
14868 ctx = context.TODO()
14869 }
14870 res, err = rx.Upload(ctx)
14871 if err != nil {
14872 return nil, err
14873 }
14874 defer res.Body.Close()
14875 if err := googleapi.CheckResponse(res); err != nil {
14876 return nil, gensupport.WrapError(err)
14877 }
14878 }
14879 ret := &PlaylistImage{
14880 ServerResponse: googleapi.ServerResponse{
14881 Header: res.Header,
14882 HTTPStatusCode: res.StatusCode,
14883 },
14884 }
14885 target := &ret
14886 if err := gensupport.DecodeResponse(target, res); err != nil {
14887 return nil, err
14888 }
14889 return ret, nil
14890 }
14891
14892 type PlaylistImagesListCall struct {
14893 s *Service
14894 urlParams_ gensupport.URLParams
14895 ifNoneMatch_ string
14896 ctx_ context.Context
14897 header_ http.Header
14898 }
14899
14900
14901 func (r *PlaylistImagesService) List() *PlaylistImagesListCall {
14902 c := &PlaylistImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14903 return c
14904 }
14905
14906
14907
14908
14909 func (c *PlaylistImagesListCall) MaxResults(maxResults int64) *PlaylistImagesListCall {
14910 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14911 return c
14912 }
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925 func (c *PlaylistImagesListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesListCall {
14926 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
14927 return c
14928 }
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947 func (c *PlaylistImagesListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistImagesListCall {
14948 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
14949 return c
14950 }
14951
14952
14953
14954
14955
14956 func (c *PlaylistImagesListCall) PageToken(pageToken string) *PlaylistImagesListCall {
14957 c.urlParams_.Set("pageToken", pageToken)
14958 return c
14959 }
14960
14961
14962
14963 func (c *PlaylistImagesListCall) Parent(parent string) *PlaylistImagesListCall {
14964 c.urlParams_.Set("parent", parent)
14965 return c
14966 }
14967
14968
14969
14970
14971
14972
14973 func (c *PlaylistImagesListCall) Part(part ...string) *PlaylistImagesListCall {
14974 c.urlParams_.SetMulti("part", append([]string{}, part...))
14975 return c
14976 }
14977
14978
14979
14980
14981 func (c *PlaylistImagesListCall) Fields(s ...googleapi.Field) *PlaylistImagesListCall {
14982 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14983 return c
14984 }
14985
14986
14987
14988
14989 func (c *PlaylistImagesListCall) IfNoneMatch(entityTag string) *PlaylistImagesListCall {
14990 c.ifNoneMatch_ = entityTag
14991 return c
14992 }
14993
14994
14995 func (c *PlaylistImagesListCall) Context(ctx context.Context) *PlaylistImagesListCall {
14996 c.ctx_ = ctx
14997 return c
14998 }
14999
15000
15001
15002 func (c *PlaylistImagesListCall) Header() http.Header {
15003 if c.header_ == nil {
15004 c.header_ = make(http.Header)
15005 }
15006 return c.header_
15007 }
15008
15009 func (c *PlaylistImagesListCall) doRequest(alt string) (*http.Response, error) {
15010 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15011 if c.ifNoneMatch_ != "" {
15012 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15013 }
15014 var body io.Reader = nil
15015 c.urlParams_.Set("alt", alt)
15016 c.urlParams_.Set("prettyPrint", "false")
15017 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
15018 urls += "?" + c.urlParams_.Encode()
15019 req, err := http.NewRequest("GET", urls, body)
15020 if err != nil {
15021 return nil, err
15022 }
15023 req.Header = reqHeaders
15024 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15025 }
15026
15027
15028
15029
15030
15031
15032
15033 func (c *PlaylistImagesListCall) Do(opts ...googleapi.CallOption) (*PlaylistImageListResponse, error) {
15034 gensupport.SetOptions(c.urlParams_, opts...)
15035 res, err := c.doRequest("json")
15036 if res != nil && res.StatusCode == http.StatusNotModified {
15037 if res.Body != nil {
15038 res.Body.Close()
15039 }
15040 return nil, gensupport.WrapError(&googleapi.Error{
15041 Code: res.StatusCode,
15042 Header: res.Header,
15043 })
15044 }
15045 if err != nil {
15046 return nil, err
15047 }
15048 defer googleapi.CloseBody(res)
15049 if err := googleapi.CheckResponse(res); err != nil {
15050 return nil, gensupport.WrapError(err)
15051 }
15052 ret := &PlaylistImageListResponse{
15053 ServerResponse: googleapi.ServerResponse{
15054 Header: res.Header,
15055 HTTPStatusCode: res.StatusCode,
15056 },
15057 }
15058 target := &ret
15059 if err := gensupport.DecodeResponse(target, res); err != nil {
15060 return nil, err
15061 }
15062 return ret, nil
15063 }
15064
15065
15066
15067
15068 func (c *PlaylistImagesListCall) Pages(ctx context.Context, f func(*PlaylistImageListResponse) error) error {
15069 c.ctx_ = ctx
15070 defer c.PageToken(c.urlParams_.Get("pageToken"))
15071 for {
15072 x, err := c.Do()
15073 if err != nil {
15074 return err
15075 }
15076 if err := f(x); err != nil {
15077 return err
15078 }
15079 if x.NextPageToken == "" {
15080 return nil
15081 }
15082 c.PageToken(x.NextPageToken)
15083 }
15084 }
15085
15086 type PlaylistImagesUpdateCall struct {
15087 s *Service
15088 playlistimage *PlaylistImage
15089 urlParams_ gensupport.URLParams
15090 mediaInfo_ *gensupport.MediaInfo
15091 ctx_ context.Context
15092 header_ http.Header
15093 }
15094
15095
15096 func (r *PlaylistImagesService) Update(playlistimage *PlaylistImage) *PlaylistImagesUpdateCall {
15097 c := &PlaylistImagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15098 c.playlistimage = playlistimage
15099 return c
15100 }
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113 func (c *PlaylistImagesUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesUpdateCall {
15114 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15115 return c
15116 }
15117
15118
15119
15120 func (c *PlaylistImagesUpdateCall) Part(part ...string) *PlaylistImagesUpdateCall {
15121 c.urlParams_.SetMulti("part", append([]string{}, part...))
15122 return c
15123 }
15124
15125
15126
15127
15128
15129
15130
15131
15132 func (c *PlaylistImagesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *PlaylistImagesUpdateCall {
15133 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
15134 return c
15135 }
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146 func (c *PlaylistImagesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *PlaylistImagesUpdateCall {
15147 c.ctx_ = ctx
15148 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
15149 return c
15150 }
15151
15152
15153
15154
15155
15156 func (c *PlaylistImagesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *PlaylistImagesUpdateCall {
15157 c.mediaInfo_.SetProgressUpdater(pu)
15158 return c
15159 }
15160
15161
15162
15163
15164 func (c *PlaylistImagesUpdateCall) Fields(s ...googleapi.Field) *PlaylistImagesUpdateCall {
15165 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15166 return c
15167 }
15168
15169
15170
15171
15172 func (c *PlaylistImagesUpdateCall) Context(ctx context.Context) *PlaylistImagesUpdateCall {
15173 c.ctx_ = ctx
15174 return c
15175 }
15176
15177
15178
15179 func (c *PlaylistImagesUpdateCall) Header() http.Header {
15180 if c.header_ == nil {
15181 c.header_ = make(http.Header)
15182 }
15183 return c.header_
15184 }
15185
15186 func (c *PlaylistImagesUpdateCall) doRequest(alt string) (*http.Response, error) {
15187 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15188 var body io.Reader = nil
15189 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistimage)
15190 if err != nil {
15191 return nil, err
15192 }
15193 c.urlParams_.Set("alt", alt)
15194 c.urlParams_.Set("prettyPrint", "false")
15195 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
15196 if c.mediaInfo_ != nil {
15197 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/playlistImages")
15198 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
15199 }
15200 if body == nil {
15201 body = new(bytes.Buffer)
15202 reqHeaders.Set("Content-Type", "application/json")
15203 }
15204 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
15205 defer cleanup()
15206 urls += "?" + c.urlParams_.Encode()
15207 req, err := http.NewRequest("PUT", urls, body)
15208 if err != nil {
15209 return nil, err
15210 }
15211 req.Header = reqHeaders
15212 req.GetBody = getBody
15213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15214 }
15215
15216
15217
15218
15219
15220
15221 func (c *PlaylistImagesUpdateCall) Do(opts ...googleapi.CallOption) (*PlaylistImage, error) {
15222 gensupport.SetOptions(c.urlParams_, opts...)
15223 res, err := c.doRequest("json")
15224 if res != nil && res.StatusCode == http.StatusNotModified {
15225 if res.Body != nil {
15226 res.Body.Close()
15227 }
15228 return nil, gensupport.WrapError(&googleapi.Error{
15229 Code: res.StatusCode,
15230 Header: res.Header,
15231 })
15232 }
15233 if err != nil {
15234 return nil, err
15235 }
15236 defer googleapi.CloseBody(res)
15237 if err := googleapi.CheckResponse(res); err != nil {
15238 return nil, gensupport.WrapError(err)
15239 }
15240 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
15241 if rx != nil {
15242 rx.Client = c.s.client
15243 rx.UserAgent = c.s.userAgent()
15244 ctx := c.ctx_
15245 if ctx == nil {
15246 ctx = context.TODO()
15247 }
15248 res, err = rx.Upload(ctx)
15249 if err != nil {
15250 return nil, err
15251 }
15252 defer res.Body.Close()
15253 if err := googleapi.CheckResponse(res); err != nil {
15254 return nil, gensupport.WrapError(err)
15255 }
15256 }
15257 ret := &PlaylistImage{
15258 ServerResponse: googleapi.ServerResponse{
15259 Header: res.Header,
15260 HTTPStatusCode: res.StatusCode,
15261 },
15262 }
15263 target := &ret
15264 if err := gensupport.DecodeResponse(target, res); err != nil {
15265 return nil, err
15266 }
15267 return ret, nil
15268 }
15269
15270 type PlaylistItemsDeleteCall struct {
15271 s *Service
15272 urlParams_ gensupport.URLParams
15273 ctx_ context.Context
15274 header_ http.Header
15275 }
15276
15277
15278
15279
15280 func (r *PlaylistItemsService) Delete(id string) *PlaylistItemsDeleteCall {
15281 c := &PlaylistItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15282 c.urlParams_.Set("id", id)
15283 return c
15284 }
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297 func (c *PlaylistItemsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsDeleteCall {
15298 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15299 return c
15300 }
15301
15302
15303
15304
15305 func (c *PlaylistItemsDeleteCall) Fields(s ...googleapi.Field) *PlaylistItemsDeleteCall {
15306 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15307 return c
15308 }
15309
15310
15311 func (c *PlaylistItemsDeleteCall) Context(ctx context.Context) *PlaylistItemsDeleteCall {
15312 c.ctx_ = ctx
15313 return c
15314 }
15315
15316
15317
15318 func (c *PlaylistItemsDeleteCall) Header() http.Header {
15319 if c.header_ == nil {
15320 c.header_ = make(http.Header)
15321 }
15322 return c.header_
15323 }
15324
15325 func (c *PlaylistItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
15326 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15327 var body io.Reader = nil
15328 c.urlParams_.Set("alt", alt)
15329 c.urlParams_.Set("prettyPrint", "false")
15330 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
15331 urls += "?" + c.urlParams_.Encode()
15332 req, err := http.NewRequest("DELETE", urls, body)
15333 if err != nil {
15334 return nil, err
15335 }
15336 req.Header = reqHeaders
15337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15338 }
15339
15340
15341 func (c *PlaylistItemsDeleteCall) Do(opts ...googleapi.CallOption) error {
15342 gensupport.SetOptions(c.urlParams_, opts...)
15343 res, err := c.doRequest("json")
15344 if err != nil {
15345 return err
15346 }
15347 defer googleapi.CloseBody(res)
15348 if err := googleapi.CheckResponse(res); err != nil {
15349 return gensupport.WrapError(err)
15350 }
15351 return nil
15352 }
15353
15354 type PlaylistItemsInsertCall struct {
15355 s *Service
15356 playlistitem *PlaylistItem
15357 urlParams_ gensupport.URLParams
15358 ctx_ context.Context
15359 header_ http.Header
15360 }
15361
15362
15363
15364
15365
15366
15367 func (r *PlaylistItemsService) Insert(part []string, playlistitem *PlaylistItem) *PlaylistItemsInsertCall {
15368 c := &PlaylistItemsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15369 c.urlParams_.SetMulti("part", append([]string{}, part...))
15370 c.playlistitem = playlistitem
15371 return c
15372 }
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385 func (c *PlaylistItemsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsInsertCall {
15386 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15387 return c
15388 }
15389
15390
15391
15392
15393 func (c *PlaylistItemsInsertCall) Fields(s ...googleapi.Field) *PlaylistItemsInsertCall {
15394 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15395 return c
15396 }
15397
15398
15399 func (c *PlaylistItemsInsertCall) Context(ctx context.Context) *PlaylistItemsInsertCall {
15400 c.ctx_ = ctx
15401 return c
15402 }
15403
15404
15405
15406 func (c *PlaylistItemsInsertCall) Header() http.Header {
15407 if c.header_ == nil {
15408 c.header_ = make(http.Header)
15409 }
15410 return c.header_
15411 }
15412
15413 func (c *PlaylistItemsInsertCall) doRequest(alt string) (*http.Response, error) {
15414 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15415 var body io.Reader = nil
15416 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
15417 if err != nil {
15418 return nil, err
15419 }
15420 c.urlParams_.Set("alt", alt)
15421 c.urlParams_.Set("prettyPrint", "false")
15422 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
15423 urls += "?" + c.urlParams_.Encode()
15424 req, err := http.NewRequest("POST", urls, body)
15425 if err != nil {
15426 return nil, err
15427 }
15428 req.Header = reqHeaders
15429 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15430 }
15431
15432
15433
15434
15435
15436
15437 func (c *PlaylistItemsInsertCall) Do(opts ...googleapi.CallOption) (*PlaylistItem, error) {
15438 gensupport.SetOptions(c.urlParams_, opts...)
15439 res, err := c.doRequest("json")
15440 if res != nil && res.StatusCode == http.StatusNotModified {
15441 if res.Body != nil {
15442 res.Body.Close()
15443 }
15444 return nil, gensupport.WrapError(&googleapi.Error{
15445 Code: res.StatusCode,
15446 Header: res.Header,
15447 })
15448 }
15449 if err != nil {
15450 return nil, err
15451 }
15452 defer googleapi.CloseBody(res)
15453 if err := googleapi.CheckResponse(res); err != nil {
15454 return nil, gensupport.WrapError(err)
15455 }
15456 ret := &PlaylistItem{
15457 ServerResponse: googleapi.ServerResponse{
15458 Header: res.Header,
15459 HTTPStatusCode: res.StatusCode,
15460 },
15461 }
15462 target := &ret
15463 if err := gensupport.DecodeResponse(target, res); err != nil {
15464 return nil, err
15465 }
15466 return ret, nil
15467 }
15468
15469 type PlaylistItemsListCall struct {
15470 s *Service
15471 urlParams_ gensupport.URLParams
15472 ifNoneMatch_ string
15473 ctx_ context.Context
15474 header_ http.Header
15475 }
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487 func (r *PlaylistItemsService) List(part []string) *PlaylistItemsListCall {
15488 c := &PlaylistItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15489 c.urlParams_.SetMulti("part", append([]string{}, part...))
15490 return c
15491 }
15492
15493
15494 func (c *PlaylistItemsListCall) Id(id ...string) *PlaylistItemsListCall {
15495 c.urlParams_.SetMulti("id", append([]string{}, id...))
15496 return c
15497 }
15498
15499
15500
15501
15502 func (c *PlaylistItemsListCall) MaxResults(maxResults int64) *PlaylistItemsListCall {
15503 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15504 return c
15505 }
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518 func (c *PlaylistItemsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsListCall {
15519 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15520 return c
15521 }
15522
15523
15524
15525
15526
15527 func (c *PlaylistItemsListCall) PageToken(pageToken string) *PlaylistItemsListCall {
15528 c.urlParams_.Set("pageToken", pageToken)
15529 return c
15530 }
15531
15532
15533
15534 func (c *PlaylistItemsListCall) PlaylistId(playlistId string) *PlaylistItemsListCall {
15535 c.urlParams_.Set("playlistId", playlistId)
15536 return c
15537 }
15538
15539
15540
15541 func (c *PlaylistItemsListCall) VideoId(videoId string) *PlaylistItemsListCall {
15542 c.urlParams_.Set("videoId", videoId)
15543 return c
15544 }
15545
15546
15547
15548
15549 func (c *PlaylistItemsListCall) Fields(s ...googleapi.Field) *PlaylistItemsListCall {
15550 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15551 return c
15552 }
15553
15554
15555
15556
15557 func (c *PlaylistItemsListCall) IfNoneMatch(entityTag string) *PlaylistItemsListCall {
15558 c.ifNoneMatch_ = entityTag
15559 return c
15560 }
15561
15562
15563 func (c *PlaylistItemsListCall) Context(ctx context.Context) *PlaylistItemsListCall {
15564 c.ctx_ = ctx
15565 return c
15566 }
15567
15568
15569
15570 func (c *PlaylistItemsListCall) Header() http.Header {
15571 if c.header_ == nil {
15572 c.header_ = make(http.Header)
15573 }
15574 return c.header_
15575 }
15576
15577 func (c *PlaylistItemsListCall) doRequest(alt string) (*http.Response, error) {
15578 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15579 if c.ifNoneMatch_ != "" {
15580 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15581 }
15582 var body io.Reader = nil
15583 c.urlParams_.Set("alt", alt)
15584 c.urlParams_.Set("prettyPrint", "false")
15585 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
15586 urls += "?" + c.urlParams_.Encode()
15587 req, err := http.NewRequest("GET", urls, body)
15588 if err != nil {
15589 return nil, err
15590 }
15591 req.Header = reqHeaders
15592 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15593 }
15594
15595
15596
15597
15598
15599
15600
15601 func (c *PlaylistItemsListCall) Do(opts ...googleapi.CallOption) (*PlaylistItemListResponse, error) {
15602 gensupport.SetOptions(c.urlParams_, opts...)
15603 res, err := c.doRequest("json")
15604 if res != nil && res.StatusCode == http.StatusNotModified {
15605 if res.Body != nil {
15606 res.Body.Close()
15607 }
15608 return nil, gensupport.WrapError(&googleapi.Error{
15609 Code: res.StatusCode,
15610 Header: res.Header,
15611 })
15612 }
15613 if err != nil {
15614 return nil, err
15615 }
15616 defer googleapi.CloseBody(res)
15617 if err := googleapi.CheckResponse(res); err != nil {
15618 return nil, gensupport.WrapError(err)
15619 }
15620 ret := &PlaylistItemListResponse{
15621 ServerResponse: googleapi.ServerResponse{
15622 Header: res.Header,
15623 HTTPStatusCode: res.StatusCode,
15624 },
15625 }
15626 target := &ret
15627 if err := gensupport.DecodeResponse(target, res); err != nil {
15628 return nil, err
15629 }
15630 return ret, nil
15631 }
15632
15633
15634
15635
15636 func (c *PlaylistItemsListCall) Pages(ctx context.Context, f func(*PlaylistItemListResponse) error) error {
15637 c.ctx_ = ctx
15638 defer c.PageToken(c.urlParams_.Get("pageToken"))
15639 for {
15640 x, err := c.Do()
15641 if err != nil {
15642 return err
15643 }
15644 if err := f(x); err != nil {
15645 return err
15646 }
15647 if x.NextPageToken == "" {
15648 return nil
15649 }
15650 c.PageToken(x.NextPageToken)
15651 }
15652 }
15653
15654 type PlaylistItemsUpdateCall struct {
15655 s *Service
15656 playlistitem *PlaylistItem
15657 urlParams_ gensupport.URLParams
15658 ctx_ context.Context
15659 header_ http.Header
15660 }
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677 func (r *PlaylistItemsService) Update(part []string, playlistitem *PlaylistItem) *PlaylistItemsUpdateCall {
15678 c := &PlaylistItemsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15679 c.urlParams_.SetMulti("part", append([]string{}, part...))
15680 c.playlistitem = playlistitem
15681 return c
15682 }
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695 func (c *PlaylistItemsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsUpdateCall {
15696 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15697 return c
15698 }
15699
15700
15701
15702
15703 func (c *PlaylistItemsUpdateCall) Fields(s ...googleapi.Field) *PlaylistItemsUpdateCall {
15704 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15705 return c
15706 }
15707
15708
15709 func (c *PlaylistItemsUpdateCall) Context(ctx context.Context) *PlaylistItemsUpdateCall {
15710 c.ctx_ = ctx
15711 return c
15712 }
15713
15714
15715
15716 func (c *PlaylistItemsUpdateCall) Header() http.Header {
15717 if c.header_ == nil {
15718 c.header_ = make(http.Header)
15719 }
15720 return c.header_
15721 }
15722
15723 func (c *PlaylistItemsUpdateCall) doRequest(alt string) (*http.Response, error) {
15724 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15725 var body io.Reader = nil
15726 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
15727 if err != nil {
15728 return nil, err
15729 }
15730 c.urlParams_.Set("alt", alt)
15731 c.urlParams_.Set("prettyPrint", "false")
15732 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
15733 urls += "?" + c.urlParams_.Encode()
15734 req, err := http.NewRequest("PUT", urls, body)
15735 if err != nil {
15736 return nil, err
15737 }
15738 req.Header = reqHeaders
15739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15740 }
15741
15742
15743
15744
15745
15746
15747 func (c *PlaylistItemsUpdateCall) Do(opts ...googleapi.CallOption) (*PlaylistItem, error) {
15748 gensupport.SetOptions(c.urlParams_, opts...)
15749 res, err := c.doRequest("json")
15750 if res != nil && res.StatusCode == http.StatusNotModified {
15751 if res.Body != nil {
15752 res.Body.Close()
15753 }
15754 return nil, gensupport.WrapError(&googleapi.Error{
15755 Code: res.StatusCode,
15756 Header: res.Header,
15757 })
15758 }
15759 if err != nil {
15760 return nil, err
15761 }
15762 defer googleapi.CloseBody(res)
15763 if err := googleapi.CheckResponse(res); err != nil {
15764 return nil, gensupport.WrapError(err)
15765 }
15766 ret := &PlaylistItem{
15767 ServerResponse: googleapi.ServerResponse{
15768 Header: res.Header,
15769 HTTPStatusCode: res.StatusCode,
15770 },
15771 }
15772 target := &ret
15773 if err := gensupport.DecodeResponse(target, res); err != nil {
15774 return nil, err
15775 }
15776 return ret, nil
15777 }
15778
15779 type PlaylistsDeleteCall struct {
15780 s *Service
15781 urlParams_ gensupport.URLParams
15782 ctx_ context.Context
15783 header_ http.Header
15784 }
15785
15786
15787
15788
15789 func (r *PlaylistsService) Delete(id string) *PlaylistsDeleteCall {
15790 c := &PlaylistsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15791 c.urlParams_.Set("id", id)
15792 return c
15793 }
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806 func (c *PlaylistsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsDeleteCall {
15807 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15808 return c
15809 }
15810
15811
15812
15813
15814 func (c *PlaylistsDeleteCall) Fields(s ...googleapi.Field) *PlaylistsDeleteCall {
15815 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15816 return c
15817 }
15818
15819
15820 func (c *PlaylistsDeleteCall) Context(ctx context.Context) *PlaylistsDeleteCall {
15821 c.ctx_ = ctx
15822 return c
15823 }
15824
15825
15826
15827 func (c *PlaylistsDeleteCall) Header() http.Header {
15828 if c.header_ == nil {
15829 c.header_ = make(http.Header)
15830 }
15831 return c.header_
15832 }
15833
15834 func (c *PlaylistsDeleteCall) doRequest(alt string) (*http.Response, error) {
15835 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15836 var body io.Reader = nil
15837 c.urlParams_.Set("alt", alt)
15838 c.urlParams_.Set("prettyPrint", "false")
15839 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
15840 urls += "?" + c.urlParams_.Encode()
15841 req, err := http.NewRequest("DELETE", urls, body)
15842 if err != nil {
15843 return nil, err
15844 }
15845 req.Header = reqHeaders
15846 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15847 }
15848
15849
15850 func (c *PlaylistsDeleteCall) Do(opts ...googleapi.CallOption) error {
15851 gensupport.SetOptions(c.urlParams_, opts...)
15852 res, err := c.doRequest("json")
15853 if err != nil {
15854 return err
15855 }
15856 defer googleapi.CloseBody(res)
15857 if err := googleapi.CheckResponse(res); err != nil {
15858 return gensupport.WrapError(err)
15859 }
15860 return nil
15861 }
15862
15863 type PlaylistsInsertCall struct {
15864 s *Service
15865 playlist *Playlist
15866 urlParams_ gensupport.URLParams
15867 ctx_ context.Context
15868 header_ http.Header
15869 }
15870
15871
15872
15873
15874
15875
15876 func (r *PlaylistsService) Insert(part []string, playlist *Playlist) *PlaylistsInsertCall {
15877 c := &PlaylistsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15878 c.urlParams_.SetMulti("part", append([]string{}, part...))
15879 c.playlist = playlist
15880 return c
15881 }
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894 func (c *PlaylistsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsInsertCall {
15895 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15896 return c
15897 }
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916 func (c *PlaylistsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistsInsertCall {
15917 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
15918 return c
15919 }
15920
15921
15922
15923
15924 func (c *PlaylistsInsertCall) Fields(s ...googleapi.Field) *PlaylistsInsertCall {
15925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15926 return c
15927 }
15928
15929
15930 func (c *PlaylistsInsertCall) Context(ctx context.Context) *PlaylistsInsertCall {
15931 c.ctx_ = ctx
15932 return c
15933 }
15934
15935
15936
15937 func (c *PlaylistsInsertCall) Header() http.Header {
15938 if c.header_ == nil {
15939 c.header_ = make(http.Header)
15940 }
15941 return c.header_
15942 }
15943
15944 func (c *PlaylistsInsertCall) doRequest(alt string) (*http.Response, error) {
15945 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15946 var body io.Reader = nil
15947 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
15948 if err != nil {
15949 return nil, err
15950 }
15951 c.urlParams_.Set("alt", alt)
15952 c.urlParams_.Set("prettyPrint", "false")
15953 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
15954 urls += "?" + c.urlParams_.Encode()
15955 req, err := http.NewRequest("POST", urls, body)
15956 if err != nil {
15957 return nil, err
15958 }
15959 req.Header = reqHeaders
15960 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15961 }
15962
15963
15964
15965
15966
15967
15968 func (c *PlaylistsInsertCall) Do(opts ...googleapi.CallOption) (*Playlist, error) {
15969 gensupport.SetOptions(c.urlParams_, opts...)
15970 res, err := c.doRequest("json")
15971 if res != nil && res.StatusCode == http.StatusNotModified {
15972 if res.Body != nil {
15973 res.Body.Close()
15974 }
15975 return nil, gensupport.WrapError(&googleapi.Error{
15976 Code: res.StatusCode,
15977 Header: res.Header,
15978 })
15979 }
15980 if err != nil {
15981 return nil, err
15982 }
15983 defer googleapi.CloseBody(res)
15984 if err := googleapi.CheckResponse(res); err != nil {
15985 return nil, gensupport.WrapError(err)
15986 }
15987 ret := &Playlist{
15988 ServerResponse: googleapi.ServerResponse{
15989 Header: res.Header,
15990 HTTPStatusCode: res.StatusCode,
15991 },
15992 }
15993 target := &ret
15994 if err := gensupport.DecodeResponse(target, res); err != nil {
15995 return nil, err
15996 }
15997 return ret, nil
15998 }
15999
16000 type PlaylistsListCall struct {
16001 s *Service
16002 urlParams_ gensupport.URLParams
16003 ifNoneMatch_ string
16004 ctx_ context.Context
16005 header_ http.Header
16006 }
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017 func (r *PlaylistsService) List(part []string) *PlaylistsListCall {
16018 c := &PlaylistsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16019 c.urlParams_.SetMulti("part", append([]string{}, part...))
16020 return c
16021 }
16022
16023
16024
16025 func (c *PlaylistsListCall) ChannelId(channelId string) *PlaylistsListCall {
16026 c.urlParams_.Set("channelId", channelId)
16027 return c
16028 }
16029
16030
16031 func (c *PlaylistsListCall) Hl(hl string) *PlaylistsListCall {
16032 c.urlParams_.Set("hl", hl)
16033 return c
16034 }
16035
16036
16037
16038 func (c *PlaylistsListCall) Id(id ...string) *PlaylistsListCall {
16039 c.urlParams_.SetMulti("id", append([]string{}, id...))
16040 return c
16041 }
16042
16043
16044
16045
16046 func (c *PlaylistsListCall) MaxResults(maxResults int64) *PlaylistsListCall {
16047 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16048 return c
16049 }
16050
16051
16052
16053 func (c *PlaylistsListCall) Mine(mine bool) *PlaylistsListCall {
16054 c.urlParams_.Set("mine", fmt.Sprint(mine))
16055 return c
16056 }
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069 func (c *PlaylistsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsListCall {
16070 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
16071 return c
16072 }
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091 func (c *PlaylistsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistsListCall {
16092 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
16093 return c
16094 }
16095
16096
16097
16098
16099
16100 func (c *PlaylistsListCall) PageToken(pageToken string) *PlaylistsListCall {
16101 c.urlParams_.Set("pageToken", pageToken)
16102 return c
16103 }
16104
16105
16106
16107
16108 func (c *PlaylistsListCall) Fields(s ...googleapi.Field) *PlaylistsListCall {
16109 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16110 return c
16111 }
16112
16113
16114
16115
16116 func (c *PlaylistsListCall) IfNoneMatch(entityTag string) *PlaylistsListCall {
16117 c.ifNoneMatch_ = entityTag
16118 return c
16119 }
16120
16121
16122 func (c *PlaylistsListCall) Context(ctx context.Context) *PlaylistsListCall {
16123 c.ctx_ = ctx
16124 return c
16125 }
16126
16127
16128
16129 func (c *PlaylistsListCall) Header() http.Header {
16130 if c.header_ == nil {
16131 c.header_ = make(http.Header)
16132 }
16133 return c.header_
16134 }
16135
16136 func (c *PlaylistsListCall) doRequest(alt string) (*http.Response, error) {
16137 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16138 if c.ifNoneMatch_ != "" {
16139 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16140 }
16141 var body io.Reader = nil
16142 c.urlParams_.Set("alt", alt)
16143 c.urlParams_.Set("prettyPrint", "false")
16144 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
16145 urls += "?" + c.urlParams_.Encode()
16146 req, err := http.NewRequest("GET", urls, body)
16147 if err != nil {
16148 return nil, err
16149 }
16150 req.Header = reqHeaders
16151 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16152 }
16153
16154
16155
16156
16157
16158
16159
16160 func (c *PlaylistsListCall) Do(opts ...googleapi.CallOption) (*PlaylistListResponse, error) {
16161 gensupport.SetOptions(c.urlParams_, opts...)
16162 res, err := c.doRequest("json")
16163 if res != nil && res.StatusCode == http.StatusNotModified {
16164 if res.Body != nil {
16165 res.Body.Close()
16166 }
16167 return nil, gensupport.WrapError(&googleapi.Error{
16168 Code: res.StatusCode,
16169 Header: res.Header,
16170 })
16171 }
16172 if err != nil {
16173 return nil, err
16174 }
16175 defer googleapi.CloseBody(res)
16176 if err := googleapi.CheckResponse(res); err != nil {
16177 return nil, gensupport.WrapError(err)
16178 }
16179 ret := &PlaylistListResponse{
16180 ServerResponse: googleapi.ServerResponse{
16181 Header: res.Header,
16182 HTTPStatusCode: res.StatusCode,
16183 },
16184 }
16185 target := &ret
16186 if err := gensupport.DecodeResponse(target, res); err != nil {
16187 return nil, err
16188 }
16189 return ret, nil
16190 }
16191
16192
16193
16194
16195 func (c *PlaylistsListCall) Pages(ctx context.Context, f func(*PlaylistListResponse) error) error {
16196 c.ctx_ = ctx
16197 defer c.PageToken(c.urlParams_.Get("pageToken"))
16198 for {
16199 x, err := c.Do()
16200 if err != nil {
16201 return err
16202 }
16203 if err := f(x); err != nil {
16204 return err
16205 }
16206 if x.NextPageToken == "" {
16207 return nil
16208 }
16209 c.PageToken(x.NextPageToken)
16210 }
16211 }
16212
16213 type PlaylistsUpdateCall struct {
16214 s *Service
16215 playlist *Playlist
16216 urlParams_ gensupport.URLParams
16217 ctx_ context.Context
16218 header_ http.Header
16219 }
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232 func (r *PlaylistsService) Update(part []string, playlist *Playlist) *PlaylistsUpdateCall {
16233 c := &PlaylistsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16234 c.urlParams_.SetMulti("part", append([]string{}, part...))
16235 c.playlist = playlist
16236 return c
16237 }
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250 func (c *PlaylistsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsUpdateCall {
16251 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
16252 return c
16253 }
16254
16255
16256
16257
16258 func (c *PlaylistsUpdateCall) Fields(s ...googleapi.Field) *PlaylistsUpdateCall {
16259 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16260 return c
16261 }
16262
16263
16264 func (c *PlaylistsUpdateCall) Context(ctx context.Context) *PlaylistsUpdateCall {
16265 c.ctx_ = ctx
16266 return c
16267 }
16268
16269
16270
16271 func (c *PlaylistsUpdateCall) Header() http.Header {
16272 if c.header_ == nil {
16273 c.header_ = make(http.Header)
16274 }
16275 return c.header_
16276 }
16277
16278 func (c *PlaylistsUpdateCall) doRequest(alt string) (*http.Response, error) {
16279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16280 var body io.Reader = nil
16281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
16282 if err != nil {
16283 return nil, err
16284 }
16285 c.urlParams_.Set("alt", alt)
16286 c.urlParams_.Set("prettyPrint", "false")
16287 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
16288 urls += "?" + c.urlParams_.Encode()
16289 req, err := http.NewRequest("PUT", urls, body)
16290 if err != nil {
16291 return nil, err
16292 }
16293 req.Header = reqHeaders
16294 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16295 }
16296
16297
16298
16299
16300
16301
16302 func (c *PlaylistsUpdateCall) Do(opts ...googleapi.CallOption) (*Playlist, error) {
16303 gensupport.SetOptions(c.urlParams_, opts...)
16304 res, err := c.doRequest("json")
16305 if res != nil && res.StatusCode == http.StatusNotModified {
16306 if res.Body != nil {
16307 res.Body.Close()
16308 }
16309 return nil, gensupport.WrapError(&googleapi.Error{
16310 Code: res.StatusCode,
16311 Header: res.Header,
16312 })
16313 }
16314 if err != nil {
16315 return nil, err
16316 }
16317 defer googleapi.CloseBody(res)
16318 if err := googleapi.CheckResponse(res); err != nil {
16319 return nil, gensupport.WrapError(err)
16320 }
16321 ret := &Playlist{
16322 ServerResponse: googleapi.ServerResponse{
16323 Header: res.Header,
16324 HTTPStatusCode: res.StatusCode,
16325 },
16326 }
16327 target := &ret
16328 if err := gensupport.DecodeResponse(target, res); err != nil {
16329 return nil, err
16330 }
16331 return ret, nil
16332 }
16333
16334 type SearchListCall struct {
16335 s *Service
16336 urlParams_ gensupport.URLParams
16337 ifNoneMatch_ string
16338 ctx_ context.Context
16339 header_ http.Header
16340 }
16341
16342
16343
16344
16345
16346
16347 func (r *SearchService) List(part []string) *SearchListCall {
16348 c := &SearchListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16349 c.urlParams_.SetMulti("part", append([]string{}, part...))
16350 return c
16351 }
16352
16353
16354
16355 func (c *SearchListCall) ChannelId(channelId string) *SearchListCall {
16356 c.urlParams_.Set("channelId", channelId)
16357 return c
16358 }
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368 func (c *SearchListCall) ChannelType(channelType string) *SearchListCall {
16369 c.urlParams_.Set("channelType", channelType)
16370 return c
16371 }
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382 func (c *SearchListCall) EventType(eventType string) *SearchListCall {
16383 c.urlParams_.Set("eventType", eventType)
16384 return c
16385 }
16386
16387
16388
16389 func (c *SearchListCall) ForContentOwner(forContentOwner bool) *SearchListCall {
16390 c.urlParams_.Set("forContentOwner", fmt.Sprint(forContentOwner))
16391 return c
16392 }
16393
16394
16395
16396
16397 func (c *SearchListCall) ForDeveloper(forDeveloper bool) *SearchListCall {
16398 c.urlParams_.Set("forDeveloper", fmt.Sprint(forDeveloper))
16399 return c
16400 }
16401
16402
16403
16404 func (c *SearchListCall) ForMine(forMine bool) *SearchListCall {
16405 c.urlParams_.Set("forMine", fmt.Sprint(forMine))
16406 return c
16407 }
16408
16409
16410
16411 func (c *SearchListCall) Location(location string) *SearchListCall {
16412 c.urlParams_.Set("location", location)
16413 return c
16414 }
16415
16416
16417
16418 func (c *SearchListCall) LocationRadius(locationRadius string) *SearchListCall {
16419 c.urlParams_.Set("locationRadius", locationRadius)
16420 return c
16421 }
16422
16423
16424
16425
16426 func (c *SearchListCall) MaxResults(maxResults int64) *SearchListCall {
16427 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16428 return c
16429 }
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442 func (c *SearchListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *SearchListCall {
16443 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
16444 return c
16445 }
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466 func (c *SearchListCall) Order(order string) *SearchListCall {
16467 c.urlParams_.Set("order", order)
16468 return c
16469 }
16470
16471
16472
16473
16474
16475 func (c *SearchListCall) PageToken(pageToken string) *SearchListCall {
16476 c.urlParams_.Set("pageToken", pageToken)
16477 return c
16478 }
16479
16480
16481
16482 func (c *SearchListCall) PublishedAfter(publishedAfter string) *SearchListCall {
16483 c.urlParams_.Set("publishedAfter", publishedAfter)
16484 return c
16485 }
16486
16487
16488
16489 func (c *SearchListCall) PublishedBefore(publishedBefore string) *SearchListCall {
16490 c.urlParams_.Set("publishedBefore", publishedBefore)
16491 return c
16492 }
16493
16494
16495 func (c *SearchListCall) Q(q string) *SearchListCall {
16496 c.urlParams_.Set("q", q)
16497 return c
16498 }
16499
16500
16501
16502 func (c *SearchListCall) RegionCode(regionCode string) *SearchListCall {
16503 c.urlParams_.Set("regionCode", regionCode)
16504 return c
16505 }
16506
16507
16508
16509 func (c *SearchListCall) RelevanceLanguage(relevanceLanguage string) *SearchListCall {
16510 c.urlParams_.Set("relevanceLanguage", relevanceLanguage)
16511 return c
16512 }
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532 func (c *SearchListCall) SafeSearch(safeSearch string) *SearchListCall {
16533 c.urlParams_.Set("safeSearch", safeSearch)
16534 return c
16535 }
16536
16537
16538
16539 func (c *SearchListCall) TopicId(topicId string) *SearchListCall {
16540 c.urlParams_.Set("topicId", topicId)
16541 return c
16542 }
16543
16544
16545
16546 func (c *SearchListCall) Type(type_ ...string) *SearchListCall {
16547 c.urlParams_.SetMulti("type", append([]string{}, type_...))
16548 return c
16549 }
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560 func (c *SearchListCall) VideoCaption(videoCaption string) *SearchListCall {
16561 c.urlParams_.Set("videoCaption", videoCaption)
16562 return c
16563 }
16564
16565
16566
16567 func (c *SearchListCall) VideoCategoryId(videoCategoryId string) *SearchListCall {
16568 c.urlParams_.Set("videoCategoryId", videoCategoryId)
16569 return c
16570 }
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580 func (c *SearchListCall) VideoDefinition(videoDefinition string) *SearchListCall {
16581 c.urlParams_.Set("videoDefinition", videoDefinition)
16582 return c
16583 }
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596 func (c *SearchListCall) VideoDimension(videoDimension string) *SearchListCall {
16597 c.urlParams_.Set("videoDimension", videoDimension)
16598 return c
16599 }
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617 func (c *SearchListCall) VideoDuration(videoDuration string) *SearchListCall {
16618 c.urlParams_.Set("videoDuration", videoDuration)
16619 return c
16620 }
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630 func (c *SearchListCall) VideoEmbeddable(videoEmbeddable string) *SearchListCall {
16631 c.urlParams_.Set("videoEmbeddable", videoEmbeddable)
16632 return c
16633 }
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649 func (c *SearchListCall) VideoLicense(videoLicense string) *SearchListCall {
16650 c.urlParams_.Set("videoLicense", videoLicense)
16651 return c
16652 }
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662 func (c *SearchListCall) VideoPaidProductPlacement(videoPaidProductPlacement string) *SearchListCall {
16663 c.urlParams_.Set("videoPaidProductPlacement", videoPaidProductPlacement)
16664 return c
16665 }
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675 func (c *SearchListCall) VideoSyndicated(videoSyndicated string) *SearchListCall {
16676 c.urlParams_.Set("videoSyndicated", videoSyndicated)
16677 return c
16678 }
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689 func (c *SearchListCall) VideoType(videoType string) *SearchListCall {
16690 c.urlParams_.Set("videoType", videoType)
16691 return c
16692 }
16693
16694
16695
16696
16697 func (c *SearchListCall) Fields(s ...googleapi.Field) *SearchListCall {
16698 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16699 return c
16700 }
16701
16702
16703
16704
16705 func (c *SearchListCall) IfNoneMatch(entityTag string) *SearchListCall {
16706 c.ifNoneMatch_ = entityTag
16707 return c
16708 }
16709
16710
16711 func (c *SearchListCall) Context(ctx context.Context) *SearchListCall {
16712 c.ctx_ = ctx
16713 return c
16714 }
16715
16716
16717
16718 func (c *SearchListCall) Header() http.Header {
16719 if c.header_ == nil {
16720 c.header_ = make(http.Header)
16721 }
16722 return c.header_
16723 }
16724
16725 func (c *SearchListCall) doRequest(alt string) (*http.Response, error) {
16726 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16727 if c.ifNoneMatch_ != "" {
16728 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16729 }
16730 var body io.Reader = nil
16731 c.urlParams_.Set("alt", alt)
16732 c.urlParams_.Set("prettyPrint", "false")
16733 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/search")
16734 urls += "?" + c.urlParams_.Encode()
16735 req, err := http.NewRequest("GET", urls, body)
16736 if err != nil {
16737 return nil, err
16738 }
16739 req.Header = reqHeaders
16740 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16741 }
16742
16743
16744
16745
16746
16747
16748
16749 func (c *SearchListCall) Do(opts ...googleapi.CallOption) (*SearchListResponse, error) {
16750 gensupport.SetOptions(c.urlParams_, opts...)
16751 res, err := c.doRequest("json")
16752 if res != nil && res.StatusCode == http.StatusNotModified {
16753 if res.Body != nil {
16754 res.Body.Close()
16755 }
16756 return nil, gensupport.WrapError(&googleapi.Error{
16757 Code: res.StatusCode,
16758 Header: res.Header,
16759 })
16760 }
16761 if err != nil {
16762 return nil, err
16763 }
16764 defer googleapi.CloseBody(res)
16765 if err := googleapi.CheckResponse(res); err != nil {
16766 return nil, gensupport.WrapError(err)
16767 }
16768 ret := &SearchListResponse{
16769 ServerResponse: googleapi.ServerResponse{
16770 Header: res.Header,
16771 HTTPStatusCode: res.StatusCode,
16772 },
16773 }
16774 target := &ret
16775 if err := gensupport.DecodeResponse(target, res); err != nil {
16776 return nil, err
16777 }
16778 return ret, nil
16779 }
16780
16781
16782
16783
16784 func (c *SearchListCall) Pages(ctx context.Context, f func(*SearchListResponse) error) error {
16785 c.ctx_ = ctx
16786 defer c.PageToken(c.urlParams_.Get("pageToken"))
16787 for {
16788 x, err := c.Do()
16789 if err != nil {
16790 return err
16791 }
16792 if err := f(x); err != nil {
16793 return err
16794 }
16795 if x.NextPageToken == "" {
16796 return nil
16797 }
16798 c.PageToken(x.NextPageToken)
16799 }
16800 }
16801
16802 type SubscriptionsDeleteCall struct {
16803 s *Service
16804 urlParams_ gensupport.URLParams
16805 ctx_ context.Context
16806 header_ http.Header
16807 }
16808
16809
16810
16811
16812 func (r *SubscriptionsService) Delete(id string) *SubscriptionsDeleteCall {
16813 c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16814 c.urlParams_.Set("id", id)
16815 return c
16816 }
16817
16818
16819
16820
16821 func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall {
16822 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16823 return c
16824 }
16825
16826
16827 func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
16828 c.ctx_ = ctx
16829 return c
16830 }
16831
16832
16833
16834 func (c *SubscriptionsDeleteCall) Header() http.Header {
16835 if c.header_ == nil {
16836 c.header_ = make(http.Header)
16837 }
16838 return c.header_
16839 }
16840
16841 func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
16842 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16843 var body io.Reader = nil
16844 c.urlParams_.Set("alt", alt)
16845 c.urlParams_.Set("prettyPrint", "false")
16846 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/subscriptions")
16847 urls += "?" + c.urlParams_.Encode()
16848 req, err := http.NewRequest("DELETE", urls, body)
16849 if err != nil {
16850 return nil, err
16851 }
16852 req.Header = reqHeaders
16853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16854 }
16855
16856
16857 func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) error {
16858 gensupport.SetOptions(c.urlParams_, opts...)
16859 res, err := c.doRequest("json")
16860 if err != nil {
16861 return err
16862 }
16863 defer googleapi.CloseBody(res)
16864 if err := googleapi.CheckResponse(res); err != nil {
16865 return gensupport.WrapError(err)
16866 }
16867 return nil
16868 }
16869
16870 type SubscriptionsInsertCall struct {
16871 s *Service
16872 subscription *Subscription
16873 urlParams_ gensupport.URLParams
16874 ctx_ context.Context
16875 header_ http.Header
16876 }
16877
16878
16879
16880
16881
16882
16883 func (r *SubscriptionsService) Insert(part []string, subscription *Subscription) *SubscriptionsInsertCall {
16884 c := &SubscriptionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16885 c.urlParams_.SetMulti("part", append([]string{}, part...))
16886 c.subscription = subscription
16887 return c
16888 }
16889
16890
16891
16892
16893 func (c *SubscriptionsInsertCall) Fields(s ...googleapi.Field) *SubscriptionsInsertCall {
16894 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16895 return c
16896 }
16897
16898
16899 func (c *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
16900 c.ctx_ = ctx
16901 return c
16902 }
16903
16904
16905
16906 func (c *SubscriptionsInsertCall) Header() http.Header {
16907 if c.header_ == nil {
16908 c.header_ = make(http.Header)
16909 }
16910 return c.header_
16911 }
16912
16913 func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
16914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16915 var body io.Reader = nil
16916 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
16917 if err != nil {
16918 return nil, err
16919 }
16920 c.urlParams_.Set("alt", alt)
16921 c.urlParams_.Set("prettyPrint", "false")
16922 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/subscriptions")
16923 urls += "?" + c.urlParams_.Encode()
16924 req, err := http.NewRequest("POST", urls, body)
16925 if err != nil {
16926 return nil, err
16927 }
16928 req.Header = reqHeaders
16929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16930 }
16931
16932
16933
16934
16935
16936
16937 func (c *SubscriptionsInsertCall) Do(opts ...googleapi.CallOption) (*Subscription, error) {
16938 gensupport.SetOptions(c.urlParams_, opts...)
16939 res, err := c.doRequest("json")
16940 if res != nil && res.StatusCode == http.StatusNotModified {
16941 if res.Body != nil {
16942 res.Body.Close()
16943 }
16944 return nil, gensupport.WrapError(&googleapi.Error{
16945 Code: res.StatusCode,
16946 Header: res.Header,
16947 })
16948 }
16949 if err != nil {
16950 return nil, err
16951 }
16952 defer googleapi.CloseBody(res)
16953 if err := googleapi.CheckResponse(res); err != nil {
16954 return nil, gensupport.WrapError(err)
16955 }
16956 ret := &Subscription{
16957 ServerResponse: googleapi.ServerResponse{
16958 Header: res.Header,
16959 HTTPStatusCode: res.StatusCode,
16960 },
16961 }
16962 target := &ret
16963 if err := gensupport.DecodeResponse(target, res); err != nil {
16964 return nil, err
16965 }
16966 return ret, nil
16967 }
16968
16969 type SubscriptionsListCall struct {
16970 s *Service
16971 urlParams_ gensupport.URLParams
16972 ifNoneMatch_ string
16973 ctx_ context.Context
16974 header_ http.Header
16975 }
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986 func (r *SubscriptionsService) List(part []string) *SubscriptionsListCall {
16987 c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16988 c.urlParams_.SetMulti("part", append([]string{}, part...))
16989 return c
16990 }
16991
16992
16993
16994 func (c *SubscriptionsListCall) ChannelId(channelId string) *SubscriptionsListCall {
16995 c.urlParams_.Set("channelId", channelId)
16996 return c
16997 }
16998
16999
17000
17001
17002 func (c *SubscriptionsListCall) ForChannelId(forChannelId string) *SubscriptionsListCall {
17003 c.urlParams_.Set("forChannelId", forChannelId)
17004 return c
17005 }
17006
17007
17008
17009 func (c *SubscriptionsListCall) Id(id ...string) *SubscriptionsListCall {
17010 c.urlParams_.SetMulti("id", append([]string{}, id...))
17011 return c
17012 }
17013
17014
17015
17016
17017 func (c *SubscriptionsListCall) MaxResults(maxResults int64) *SubscriptionsListCall {
17018 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17019 return c
17020 }
17021
17022
17023
17024 func (c *SubscriptionsListCall) Mine(mine bool) *SubscriptionsListCall {
17025 c.urlParams_.Set("mine", fmt.Sprint(mine))
17026 return c
17027 }
17028
17029
17030 func (c *SubscriptionsListCall) MyRecentSubscribers(myRecentSubscribers bool) *SubscriptionsListCall {
17031 c.urlParams_.Set("myRecentSubscribers", fmt.Sprint(myRecentSubscribers))
17032 return c
17033 }
17034
17035
17036
17037 func (c *SubscriptionsListCall) MySubscribers(mySubscribers bool) *SubscriptionsListCall {
17038 c.urlParams_.Set("mySubscribers", fmt.Sprint(mySubscribers))
17039 return c
17040 }
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053 func (c *SubscriptionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *SubscriptionsListCall {
17054 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
17055 return c
17056 }
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075 func (c *SubscriptionsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *SubscriptionsListCall {
17076 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
17077 return c
17078 }
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089 func (c *SubscriptionsListCall) Order(order string) *SubscriptionsListCall {
17090 c.urlParams_.Set("order", order)
17091 return c
17092 }
17093
17094
17095
17096
17097
17098 func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall {
17099 c.urlParams_.Set("pageToken", pageToken)
17100 return c
17101 }
17102
17103
17104
17105
17106 func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall {
17107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17108 return c
17109 }
17110
17111
17112
17113
17114 func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall {
17115 c.ifNoneMatch_ = entityTag
17116 return c
17117 }
17118
17119
17120 func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
17121 c.ctx_ = ctx
17122 return c
17123 }
17124
17125
17126
17127 func (c *SubscriptionsListCall) Header() http.Header {
17128 if c.header_ == nil {
17129 c.header_ = make(http.Header)
17130 }
17131 return c.header_
17132 }
17133
17134 func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
17135 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17136 if c.ifNoneMatch_ != "" {
17137 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17138 }
17139 var body io.Reader = nil
17140 c.urlParams_.Set("alt", alt)
17141 c.urlParams_.Set("prettyPrint", "false")
17142 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/subscriptions")
17143 urls += "?" + c.urlParams_.Encode()
17144 req, err := http.NewRequest("GET", urls, body)
17145 if err != nil {
17146 return nil, err
17147 }
17148 req.Header = reqHeaders
17149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17150 }
17151
17152
17153
17154
17155
17156
17157
17158 func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*SubscriptionListResponse, error) {
17159 gensupport.SetOptions(c.urlParams_, opts...)
17160 res, err := c.doRequest("json")
17161 if res != nil && res.StatusCode == http.StatusNotModified {
17162 if res.Body != nil {
17163 res.Body.Close()
17164 }
17165 return nil, gensupport.WrapError(&googleapi.Error{
17166 Code: res.StatusCode,
17167 Header: res.Header,
17168 })
17169 }
17170 if err != nil {
17171 return nil, err
17172 }
17173 defer googleapi.CloseBody(res)
17174 if err := googleapi.CheckResponse(res); err != nil {
17175 return nil, gensupport.WrapError(err)
17176 }
17177 ret := &SubscriptionListResponse{
17178 ServerResponse: googleapi.ServerResponse{
17179 Header: res.Header,
17180 HTTPStatusCode: res.StatusCode,
17181 },
17182 }
17183 target := &ret
17184 if err := gensupport.DecodeResponse(target, res); err != nil {
17185 return nil, err
17186 }
17187 return ret, nil
17188 }
17189
17190
17191
17192
17193 func (c *SubscriptionsListCall) Pages(ctx context.Context, f func(*SubscriptionListResponse) error) error {
17194 c.ctx_ = ctx
17195 defer c.PageToken(c.urlParams_.Get("pageToken"))
17196 for {
17197 x, err := c.Do()
17198 if err != nil {
17199 return err
17200 }
17201 if err := f(x); err != nil {
17202 return err
17203 }
17204 if x.NextPageToken == "" {
17205 return nil
17206 }
17207 c.PageToken(x.NextPageToken)
17208 }
17209 }
17210
17211 type SuperChatEventsListCall struct {
17212 s *Service
17213 urlParams_ gensupport.URLParams
17214 ifNoneMatch_ string
17215 ctx_ context.Context
17216 header_ http.Header
17217 }
17218
17219
17220
17221
17222
17223
17224 func (r *SuperChatEventsService) List(part []string) *SuperChatEventsListCall {
17225 c := &SuperChatEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17226 c.urlParams_.SetMulti("part", append([]string{}, part...))
17227 return c
17228 }
17229
17230
17231
17232 func (c *SuperChatEventsListCall) Hl(hl string) *SuperChatEventsListCall {
17233 c.urlParams_.Set("hl", hl)
17234 return c
17235 }
17236
17237
17238
17239
17240 func (c *SuperChatEventsListCall) MaxResults(maxResults int64) *SuperChatEventsListCall {
17241 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17242 return c
17243 }
17244
17245
17246
17247
17248
17249 func (c *SuperChatEventsListCall) PageToken(pageToken string) *SuperChatEventsListCall {
17250 c.urlParams_.Set("pageToken", pageToken)
17251 return c
17252 }
17253
17254
17255
17256
17257 func (c *SuperChatEventsListCall) Fields(s ...googleapi.Field) *SuperChatEventsListCall {
17258 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17259 return c
17260 }
17261
17262
17263
17264
17265 func (c *SuperChatEventsListCall) IfNoneMatch(entityTag string) *SuperChatEventsListCall {
17266 c.ifNoneMatch_ = entityTag
17267 return c
17268 }
17269
17270
17271 func (c *SuperChatEventsListCall) Context(ctx context.Context) *SuperChatEventsListCall {
17272 c.ctx_ = ctx
17273 return c
17274 }
17275
17276
17277
17278 func (c *SuperChatEventsListCall) Header() http.Header {
17279 if c.header_ == nil {
17280 c.header_ = make(http.Header)
17281 }
17282 return c.header_
17283 }
17284
17285 func (c *SuperChatEventsListCall) doRequest(alt string) (*http.Response, error) {
17286 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17287 if c.ifNoneMatch_ != "" {
17288 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17289 }
17290 var body io.Reader = nil
17291 c.urlParams_.Set("alt", alt)
17292 c.urlParams_.Set("prettyPrint", "false")
17293 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/superChatEvents")
17294 urls += "?" + c.urlParams_.Encode()
17295 req, err := http.NewRequest("GET", urls, body)
17296 if err != nil {
17297 return nil, err
17298 }
17299 req.Header = reqHeaders
17300 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17301 }
17302
17303
17304
17305
17306
17307
17308
17309 func (c *SuperChatEventsListCall) Do(opts ...googleapi.CallOption) (*SuperChatEventListResponse, error) {
17310 gensupport.SetOptions(c.urlParams_, opts...)
17311 res, err := c.doRequest("json")
17312 if res != nil && res.StatusCode == http.StatusNotModified {
17313 if res.Body != nil {
17314 res.Body.Close()
17315 }
17316 return nil, gensupport.WrapError(&googleapi.Error{
17317 Code: res.StatusCode,
17318 Header: res.Header,
17319 })
17320 }
17321 if err != nil {
17322 return nil, err
17323 }
17324 defer googleapi.CloseBody(res)
17325 if err := googleapi.CheckResponse(res); err != nil {
17326 return nil, gensupport.WrapError(err)
17327 }
17328 ret := &SuperChatEventListResponse{
17329 ServerResponse: googleapi.ServerResponse{
17330 Header: res.Header,
17331 HTTPStatusCode: res.StatusCode,
17332 },
17333 }
17334 target := &ret
17335 if err := gensupport.DecodeResponse(target, res); err != nil {
17336 return nil, err
17337 }
17338 return ret, nil
17339 }
17340
17341
17342
17343
17344 func (c *SuperChatEventsListCall) Pages(ctx context.Context, f func(*SuperChatEventListResponse) error) error {
17345 c.ctx_ = ctx
17346 defer c.PageToken(c.urlParams_.Get("pageToken"))
17347 for {
17348 x, err := c.Do()
17349 if err != nil {
17350 return err
17351 }
17352 if err := f(x); err != nil {
17353 return err
17354 }
17355 if x.NextPageToken == "" {
17356 return nil
17357 }
17358 c.PageToken(x.NextPageToken)
17359 }
17360 }
17361
17362 type TestsInsertCall struct {
17363 s *Service
17364 testitem *TestItem
17365 urlParams_ gensupport.URLParams
17366 ctx_ context.Context
17367 header_ http.Header
17368 }
17369
17370
17371
17372
17373 func (r *TestsService) Insert(part []string, testitem *TestItem) *TestsInsertCall {
17374 c := &TestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17375 c.urlParams_.SetMulti("part", append([]string{}, part...))
17376 c.testitem = testitem
17377 return c
17378 }
17379
17380
17381 func (c *TestsInsertCall) ExternalChannelId(externalChannelId string) *TestsInsertCall {
17382 c.urlParams_.Set("externalChannelId", externalChannelId)
17383 return c
17384 }
17385
17386
17387
17388
17389 func (c *TestsInsertCall) Fields(s ...googleapi.Field) *TestsInsertCall {
17390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17391 return c
17392 }
17393
17394
17395 func (c *TestsInsertCall) Context(ctx context.Context) *TestsInsertCall {
17396 c.ctx_ = ctx
17397 return c
17398 }
17399
17400
17401
17402 func (c *TestsInsertCall) Header() http.Header {
17403 if c.header_ == nil {
17404 c.header_ = make(http.Header)
17405 }
17406 return c.header_
17407 }
17408
17409 func (c *TestsInsertCall) doRequest(alt string) (*http.Response, error) {
17410 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17411 var body io.Reader = nil
17412 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testitem)
17413 if err != nil {
17414 return nil, err
17415 }
17416 c.urlParams_.Set("alt", alt)
17417 c.urlParams_.Set("prettyPrint", "false")
17418 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/tests")
17419 urls += "?" + c.urlParams_.Encode()
17420 req, err := http.NewRequest("POST", urls, body)
17421 if err != nil {
17422 return nil, err
17423 }
17424 req.Header = reqHeaders
17425 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17426 }
17427
17428
17429
17430
17431
17432
17433 func (c *TestsInsertCall) Do(opts ...googleapi.CallOption) (*TestItem, error) {
17434 gensupport.SetOptions(c.urlParams_, opts...)
17435 res, err := c.doRequest("json")
17436 if res != nil && res.StatusCode == http.StatusNotModified {
17437 if res.Body != nil {
17438 res.Body.Close()
17439 }
17440 return nil, gensupport.WrapError(&googleapi.Error{
17441 Code: res.StatusCode,
17442 Header: res.Header,
17443 })
17444 }
17445 if err != nil {
17446 return nil, err
17447 }
17448 defer googleapi.CloseBody(res)
17449 if err := googleapi.CheckResponse(res); err != nil {
17450 return nil, gensupport.WrapError(err)
17451 }
17452 ret := &TestItem{
17453 ServerResponse: googleapi.ServerResponse{
17454 Header: res.Header,
17455 HTTPStatusCode: res.StatusCode,
17456 },
17457 }
17458 target := &ret
17459 if err := gensupport.DecodeResponse(target, res); err != nil {
17460 return nil, err
17461 }
17462 return ret, nil
17463 }
17464
17465 type ThirdPartyLinksDeleteCall struct {
17466 s *Service
17467 urlParams_ gensupport.URLParams
17468 ctx_ context.Context
17469 header_ http.Header
17470 }
17471
17472
17473
17474
17475
17476 func (r *ThirdPartyLinksService) Delete(linkingToken string, type_ string) *ThirdPartyLinksDeleteCall {
17477 c := &ThirdPartyLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17478 c.urlParams_.Set("linkingToken", linkingToken)
17479 c.urlParams_.Set("type", type_)
17480 return c
17481 }
17482
17483
17484
17485 func (c *ThirdPartyLinksDeleteCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksDeleteCall {
17486 c.urlParams_.Set("externalChannelId", externalChannelId)
17487 return c
17488 }
17489
17490
17491
17492 func (c *ThirdPartyLinksDeleteCall) Part(part ...string) *ThirdPartyLinksDeleteCall {
17493 c.urlParams_.SetMulti("part", append([]string{}, part...))
17494 return c
17495 }
17496
17497
17498
17499
17500 func (c *ThirdPartyLinksDeleteCall) Fields(s ...googleapi.Field) *ThirdPartyLinksDeleteCall {
17501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17502 return c
17503 }
17504
17505
17506 func (c *ThirdPartyLinksDeleteCall) Context(ctx context.Context) *ThirdPartyLinksDeleteCall {
17507 c.ctx_ = ctx
17508 return c
17509 }
17510
17511
17512
17513 func (c *ThirdPartyLinksDeleteCall) Header() http.Header {
17514 if c.header_ == nil {
17515 c.header_ = make(http.Header)
17516 }
17517 return c.header_
17518 }
17519
17520 func (c *ThirdPartyLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
17521 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17522 var body io.Reader = nil
17523 c.urlParams_.Set("alt", alt)
17524 c.urlParams_.Set("prettyPrint", "false")
17525 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
17526 urls += "?" + c.urlParams_.Encode()
17527 req, err := http.NewRequest("DELETE", urls, body)
17528 if err != nil {
17529 return nil, err
17530 }
17531 req.Header = reqHeaders
17532 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17533 }
17534
17535
17536 func (c *ThirdPartyLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
17537 gensupport.SetOptions(c.urlParams_, opts...)
17538 res, err := c.doRequest("json")
17539 if err != nil {
17540 return err
17541 }
17542 defer googleapi.CloseBody(res)
17543 if err := googleapi.CheckResponse(res); err != nil {
17544 return gensupport.WrapError(err)
17545 }
17546 return nil
17547 }
17548
17549 type ThirdPartyLinksInsertCall struct {
17550 s *Service
17551 thirdpartylink *ThirdPartyLink
17552 urlParams_ gensupport.URLParams
17553 ctx_ context.Context
17554 header_ http.Header
17555 }
17556
17557
17558
17559
17560
17561
17562 func (r *ThirdPartyLinksService) Insert(part []string, thirdpartylink *ThirdPartyLink) *ThirdPartyLinksInsertCall {
17563 c := &ThirdPartyLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17564 c.urlParams_.SetMulti("part", append([]string{}, part...))
17565 c.thirdpartylink = thirdpartylink
17566 return c
17567 }
17568
17569
17570
17571 func (c *ThirdPartyLinksInsertCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksInsertCall {
17572 c.urlParams_.Set("externalChannelId", externalChannelId)
17573 return c
17574 }
17575
17576
17577
17578
17579 func (c *ThirdPartyLinksInsertCall) Fields(s ...googleapi.Field) *ThirdPartyLinksInsertCall {
17580 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17581 return c
17582 }
17583
17584
17585 func (c *ThirdPartyLinksInsertCall) Context(ctx context.Context) *ThirdPartyLinksInsertCall {
17586 c.ctx_ = ctx
17587 return c
17588 }
17589
17590
17591
17592 func (c *ThirdPartyLinksInsertCall) Header() http.Header {
17593 if c.header_ == nil {
17594 c.header_ = make(http.Header)
17595 }
17596 return c.header_
17597 }
17598
17599 func (c *ThirdPartyLinksInsertCall) doRequest(alt string) (*http.Response, error) {
17600 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17601 var body io.Reader = nil
17602 body, err := googleapi.WithoutDataWrapper.JSONReader(c.thirdpartylink)
17603 if err != nil {
17604 return nil, err
17605 }
17606 c.urlParams_.Set("alt", alt)
17607 c.urlParams_.Set("prettyPrint", "false")
17608 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
17609 urls += "?" + c.urlParams_.Encode()
17610 req, err := http.NewRequest("POST", urls, body)
17611 if err != nil {
17612 return nil, err
17613 }
17614 req.Header = reqHeaders
17615 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17616 }
17617
17618
17619
17620
17621
17622
17623 func (c *ThirdPartyLinksInsertCall) Do(opts ...googleapi.CallOption) (*ThirdPartyLink, error) {
17624 gensupport.SetOptions(c.urlParams_, opts...)
17625 res, err := c.doRequest("json")
17626 if res != nil && res.StatusCode == http.StatusNotModified {
17627 if res.Body != nil {
17628 res.Body.Close()
17629 }
17630 return nil, gensupport.WrapError(&googleapi.Error{
17631 Code: res.StatusCode,
17632 Header: res.Header,
17633 })
17634 }
17635 if err != nil {
17636 return nil, err
17637 }
17638 defer googleapi.CloseBody(res)
17639 if err := googleapi.CheckResponse(res); err != nil {
17640 return nil, gensupport.WrapError(err)
17641 }
17642 ret := &ThirdPartyLink{
17643 ServerResponse: googleapi.ServerResponse{
17644 Header: res.Header,
17645 HTTPStatusCode: res.StatusCode,
17646 },
17647 }
17648 target := &ret
17649 if err := gensupport.DecodeResponse(target, res); err != nil {
17650 return nil, err
17651 }
17652 return ret, nil
17653 }
17654
17655 type ThirdPartyLinksListCall struct {
17656 s *Service
17657 urlParams_ gensupport.URLParams
17658 ifNoneMatch_ string
17659 ctx_ context.Context
17660 header_ http.Header
17661 }
17662
17663
17664
17665
17666
17667
17668 func (r *ThirdPartyLinksService) List(part []string) *ThirdPartyLinksListCall {
17669 c := &ThirdPartyLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17670 c.urlParams_.SetMulti("part", append([]string{}, part...))
17671 return c
17672 }
17673
17674
17675
17676 func (c *ThirdPartyLinksListCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksListCall {
17677 c.urlParams_.Set("externalChannelId", externalChannelId)
17678 return c
17679 }
17680
17681
17682
17683 func (c *ThirdPartyLinksListCall) LinkingToken(linkingToken string) *ThirdPartyLinksListCall {
17684 c.urlParams_.Set("linkingToken", linkingToken)
17685 return c
17686 }
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698 func (c *ThirdPartyLinksListCall) Type(type_ string) *ThirdPartyLinksListCall {
17699 c.urlParams_.Set("type", type_)
17700 return c
17701 }
17702
17703
17704
17705
17706 func (c *ThirdPartyLinksListCall) Fields(s ...googleapi.Field) *ThirdPartyLinksListCall {
17707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17708 return c
17709 }
17710
17711
17712
17713
17714 func (c *ThirdPartyLinksListCall) IfNoneMatch(entityTag string) *ThirdPartyLinksListCall {
17715 c.ifNoneMatch_ = entityTag
17716 return c
17717 }
17718
17719
17720 func (c *ThirdPartyLinksListCall) Context(ctx context.Context) *ThirdPartyLinksListCall {
17721 c.ctx_ = ctx
17722 return c
17723 }
17724
17725
17726
17727 func (c *ThirdPartyLinksListCall) Header() http.Header {
17728 if c.header_ == nil {
17729 c.header_ = make(http.Header)
17730 }
17731 return c.header_
17732 }
17733
17734 func (c *ThirdPartyLinksListCall) doRequest(alt string) (*http.Response, error) {
17735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17736 if c.ifNoneMatch_ != "" {
17737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17738 }
17739 var body io.Reader = nil
17740 c.urlParams_.Set("alt", alt)
17741 c.urlParams_.Set("prettyPrint", "false")
17742 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
17743 urls += "?" + c.urlParams_.Encode()
17744 req, err := http.NewRequest("GET", urls, body)
17745 if err != nil {
17746 return nil, err
17747 }
17748 req.Header = reqHeaders
17749 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17750 }
17751
17752
17753
17754
17755
17756
17757
17758 func (c *ThirdPartyLinksListCall) Do(opts ...googleapi.CallOption) (*ThirdPartyLinkListResponse, error) {
17759 gensupport.SetOptions(c.urlParams_, opts...)
17760 res, err := c.doRequest("json")
17761 if res != nil && res.StatusCode == http.StatusNotModified {
17762 if res.Body != nil {
17763 res.Body.Close()
17764 }
17765 return nil, gensupport.WrapError(&googleapi.Error{
17766 Code: res.StatusCode,
17767 Header: res.Header,
17768 })
17769 }
17770 if err != nil {
17771 return nil, err
17772 }
17773 defer googleapi.CloseBody(res)
17774 if err := googleapi.CheckResponse(res); err != nil {
17775 return nil, gensupport.WrapError(err)
17776 }
17777 ret := &ThirdPartyLinkListResponse{
17778 ServerResponse: googleapi.ServerResponse{
17779 Header: res.Header,
17780 HTTPStatusCode: res.StatusCode,
17781 },
17782 }
17783 target := &ret
17784 if err := gensupport.DecodeResponse(target, res); err != nil {
17785 return nil, err
17786 }
17787 return ret, nil
17788 }
17789
17790 type ThirdPartyLinksUpdateCall struct {
17791 s *Service
17792 thirdpartylink *ThirdPartyLink
17793 urlParams_ gensupport.URLParams
17794 ctx_ context.Context
17795 header_ http.Header
17796 }
17797
17798
17799
17800
17801
17802
17803 func (r *ThirdPartyLinksService) Update(part []string, thirdpartylink *ThirdPartyLink) *ThirdPartyLinksUpdateCall {
17804 c := &ThirdPartyLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17805 c.urlParams_.SetMulti("part", append([]string{}, part...))
17806 c.thirdpartylink = thirdpartylink
17807 return c
17808 }
17809
17810
17811
17812 func (c *ThirdPartyLinksUpdateCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksUpdateCall {
17813 c.urlParams_.Set("externalChannelId", externalChannelId)
17814 return c
17815 }
17816
17817
17818
17819
17820 func (c *ThirdPartyLinksUpdateCall) Fields(s ...googleapi.Field) *ThirdPartyLinksUpdateCall {
17821 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17822 return c
17823 }
17824
17825
17826 func (c *ThirdPartyLinksUpdateCall) Context(ctx context.Context) *ThirdPartyLinksUpdateCall {
17827 c.ctx_ = ctx
17828 return c
17829 }
17830
17831
17832
17833 func (c *ThirdPartyLinksUpdateCall) Header() http.Header {
17834 if c.header_ == nil {
17835 c.header_ = make(http.Header)
17836 }
17837 return c.header_
17838 }
17839
17840 func (c *ThirdPartyLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
17841 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17842 var body io.Reader = nil
17843 body, err := googleapi.WithoutDataWrapper.JSONReader(c.thirdpartylink)
17844 if err != nil {
17845 return nil, err
17846 }
17847 c.urlParams_.Set("alt", alt)
17848 c.urlParams_.Set("prettyPrint", "false")
17849 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
17850 urls += "?" + c.urlParams_.Encode()
17851 req, err := http.NewRequest("PUT", urls, body)
17852 if err != nil {
17853 return nil, err
17854 }
17855 req.Header = reqHeaders
17856 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17857 }
17858
17859
17860
17861
17862
17863
17864 func (c *ThirdPartyLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ThirdPartyLink, error) {
17865 gensupport.SetOptions(c.urlParams_, opts...)
17866 res, err := c.doRequest("json")
17867 if res != nil && res.StatusCode == http.StatusNotModified {
17868 if res.Body != nil {
17869 res.Body.Close()
17870 }
17871 return nil, gensupport.WrapError(&googleapi.Error{
17872 Code: res.StatusCode,
17873 Header: res.Header,
17874 })
17875 }
17876 if err != nil {
17877 return nil, err
17878 }
17879 defer googleapi.CloseBody(res)
17880 if err := googleapi.CheckResponse(res); err != nil {
17881 return nil, gensupport.WrapError(err)
17882 }
17883 ret := &ThirdPartyLink{
17884 ServerResponse: googleapi.ServerResponse{
17885 Header: res.Header,
17886 HTTPStatusCode: res.StatusCode,
17887 },
17888 }
17889 target := &ret
17890 if err := gensupport.DecodeResponse(target, res); err != nil {
17891 return nil, err
17892 }
17893 return ret, nil
17894 }
17895
17896 type ThumbnailsSetCall struct {
17897 s *Service
17898 urlParams_ gensupport.URLParams
17899 mediaInfo_ *gensupport.MediaInfo
17900 ctx_ context.Context
17901 header_ http.Header
17902 }
17903
17904
17905
17906
17907
17908
17909
17910 func (r *ThumbnailsService) Set(videoId string) *ThumbnailsSetCall {
17911 c := &ThumbnailsSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17912 c.urlParams_.Set("videoId", videoId)
17913 return c
17914 }
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927 func (c *ThumbnailsSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ThumbnailsSetCall {
17928 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
17929 return c
17930 }
17931
17932
17933
17934
17935
17936
17937
17938
17939 func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *ThumbnailsSetCall {
17940 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
17941 return c
17942 }
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953 func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ThumbnailsSetCall {
17954 c.ctx_ = ctx
17955 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
17956 return c
17957 }
17958
17959
17960
17961
17962
17963 func (c *ThumbnailsSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ThumbnailsSetCall {
17964 c.mediaInfo_.SetProgressUpdater(pu)
17965 return c
17966 }
17967
17968
17969
17970
17971 func (c *ThumbnailsSetCall) Fields(s ...googleapi.Field) *ThumbnailsSetCall {
17972 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17973 return c
17974 }
17975
17976
17977
17978
17979 func (c *ThumbnailsSetCall) Context(ctx context.Context) *ThumbnailsSetCall {
17980 c.ctx_ = ctx
17981 return c
17982 }
17983
17984
17985
17986 func (c *ThumbnailsSetCall) Header() http.Header {
17987 if c.header_ == nil {
17988 c.header_ = make(http.Header)
17989 }
17990 return c.header_
17991 }
17992
17993 func (c *ThumbnailsSetCall) doRequest(alt string) (*http.Response, error) {
17994 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17995 var body io.Reader = nil
17996 c.urlParams_.Set("alt", alt)
17997 c.urlParams_.Set("prettyPrint", "false")
17998 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thumbnails/set")
17999 if c.mediaInfo_ != nil {
18000 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/thumbnails/set")
18001 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
18002 }
18003 if body == nil {
18004 body = new(bytes.Buffer)
18005 reqHeaders.Set("Content-Type", "application/json")
18006 }
18007 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
18008 defer cleanup()
18009 urls += "?" + c.urlParams_.Encode()
18010 req, err := http.NewRequest("POST", urls, body)
18011 if err != nil {
18012 return nil, err
18013 }
18014 req.Header = reqHeaders
18015 req.GetBody = getBody
18016 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18017 }
18018
18019
18020
18021
18022
18023
18024
18025 func (c *ThumbnailsSetCall) Do(opts ...googleapi.CallOption) (*ThumbnailSetResponse, error) {
18026 gensupport.SetOptions(c.urlParams_, opts...)
18027 res, err := c.doRequest("json")
18028 if res != nil && res.StatusCode == http.StatusNotModified {
18029 if res.Body != nil {
18030 res.Body.Close()
18031 }
18032 return nil, gensupport.WrapError(&googleapi.Error{
18033 Code: res.StatusCode,
18034 Header: res.Header,
18035 })
18036 }
18037 if err != nil {
18038 return nil, err
18039 }
18040 defer googleapi.CloseBody(res)
18041 if err := googleapi.CheckResponse(res); err != nil {
18042 return nil, gensupport.WrapError(err)
18043 }
18044 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
18045 if rx != nil {
18046 rx.Client = c.s.client
18047 rx.UserAgent = c.s.userAgent()
18048 ctx := c.ctx_
18049 if ctx == nil {
18050 ctx = context.TODO()
18051 }
18052 res, err = rx.Upload(ctx)
18053 if err != nil {
18054 return nil, err
18055 }
18056 defer res.Body.Close()
18057 if err := googleapi.CheckResponse(res); err != nil {
18058 return nil, gensupport.WrapError(err)
18059 }
18060 }
18061 ret := &ThumbnailSetResponse{
18062 ServerResponse: googleapi.ServerResponse{
18063 Header: res.Header,
18064 HTTPStatusCode: res.StatusCode,
18065 },
18066 }
18067 target := &ret
18068 if err := gensupport.DecodeResponse(target, res); err != nil {
18069 return nil, err
18070 }
18071 return ret, nil
18072 }
18073
18074 type VideoAbuseReportReasonsListCall struct {
18075 s *Service
18076 urlParams_ gensupport.URLParams
18077 ifNoneMatch_ string
18078 ctx_ context.Context
18079 header_ http.Header
18080 }
18081
18082
18083
18084
18085
18086 func (r *VideoAbuseReportReasonsService) List(part []string) *VideoAbuseReportReasonsListCall {
18087 c := &VideoAbuseReportReasonsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18088 c.urlParams_.SetMulti("part", append([]string{}, part...))
18089 return c
18090 }
18091
18092
18093 func (c *VideoAbuseReportReasonsListCall) Hl(hl string) *VideoAbuseReportReasonsListCall {
18094 c.urlParams_.Set("hl", hl)
18095 return c
18096 }
18097
18098
18099
18100
18101 func (c *VideoAbuseReportReasonsListCall) Fields(s ...googleapi.Field) *VideoAbuseReportReasonsListCall {
18102 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18103 return c
18104 }
18105
18106
18107
18108
18109 func (c *VideoAbuseReportReasonsListCall) IfNoneMatch(entityTag string) *VideoAbuseReportReasonsListCall {
18110 c.ifNoneMatch_ = entityTag
18111 return c
18112 }
18113
18114
18115 func (c *VideoAbuseReportReasonsListCall) Context(ctx context.Context) *VideoAbuseReportReasonsListCall {
18116 c.ctx_ = ctx
18117 return c
18118 }
18119
18120
18121
18122 func (c *VideoAbuseReportReasonsListCall) Header() http.Header {
18123 if c.header_ == nil {
18124 c.header_ = make(http.Header)
18125 }
18126 return c.header_
18127 }
18128
18129 func (c *VideoAbuseReportReasonsListCall) doRequest(alt string) (*http.Response, error) {
18130 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18131 if c.ifNoneMatch_ != "" {
18132 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18133 }
18134 var body io.Reader = nil
18135 c.urlParams_.Set("alt", alt)
18136 c.urlParams_.Set("prettyPrint", "false")
18137 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videoAbuseReportReasons")
18138 urls += "?" + c.urlParams_.Encode()
18139 req, err := http.NewRequest("GET", urls, body)
18140 if err != nil {
18141 return nil, err
18142 }
18143 req.Header = reqHeaders
18144 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18145 }
18146
18147
18148
18149
18150
18151
18152
18153 func (c *VideoAbuseReportReasonsListCall) Do(opts ...googleapi.CallOption) (*VideoAbuseReportReasonListResponse, error) {
18154 gensupport.SetOptions(c.urlParams_, opts...)
18155 res, err := c.doRequest("json")
18156 if res != nil && res.StatusCode == http.StatusNotModified {
18157 if res.Body != nil {
18158 res.Body.Close()
18159 }
18160 return nil, gensupport.WrapError(&googleapi.Error{
18161 Code: res.StatusCode,
18162 Header: res.Header,
18163 })
18164 }
18165 if err != nil {
18166 return nil, err
18167 }
18168 defer googleapi.CloseBody(res)
18169 if err := googleapi.CheckResponse(res); err != nil {
18170 return nil, gensupport.WrapError(err)
18171 }
18172 ret := &VideoAbuseReportReasonListResponse{
18173 ServerResponse: googleapi.ServerResponse{
18174 Header: res.Header,
18175 HTTPStatusCode: res.StatusCode,
18176 },
18177 }
18178 target := &ret
18179 if err := gensupport.DecodeResponse(target, res); err != nil {
18180 return nil, err
18181 }
18182 return ret, nil
18183 }
18184
18185 type VideoCategoriesListCall struct {
18186 s *Service
18187 urlParams_ gensupport.URLParams
18188 ifNoneMatch_ string
18189 ctx_ context.Context
18190 header_ http.Header
18191 }
18192
18193
18194
18195
18196
18197 func (r *VideoCategoriesService) List(part []string) *VideoCategoriesListCall {
18198 c := &VideoCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18199 c.urlParams_.SetMulti("part", append([]string{}, part...))
18200 return c
18201 }
18202
18203
18204 func (c *VideoCategoriesListCall) Hl(hl string) *VideoCategoriesListCall {
18205 c.urlParams_.Set("hl", hl)
18206 return c
18207 }
18208
18209
18210
18211 func (c *VideoCategoriesListCall) Id(id ...string) *VideoCategoriesListCall {
18212 c.urlParams_.SetMulti("id", append([]string{}, id...))
18213 return c
18214 }
18215
18216
18217 func (c *VideoCategoriesListCall) RegionCode(regionCode string) *VideoCategoriesListCall {
18218 c.urlParams_.Set("regionCode", regionCode)
18219 return c
18220 }
18221
18222
18223
18224
18225 func (c *VideoCategoriesListCall) Fields(s ...googleapi.Field) *VideoCategoriesListCall {
18226 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18227 return c
18228 }
18229
18230
18231
18232
18233 func (c *VideoCategoriesListCall) IfNoneMatch(entityTag string) *VideoCategoriesListCall {
18234 c.ifNoneMatch_ = entityTag
18235 return c
18236 }
18237
18238
18239 func (c *VideoCategoriesListCall) Context(ctx context.Context) *VideoCategoriesListCall {
18240 c.ctx_ = ctx
18241 return c
18242 }
18243
18244
18245
18246 func (c *VideoCategoriesListCall) Header() http.Header {
18247 if c.header_ == nil {
18248 c.header_ = make(http.Header)
18249 }
18250 return c.header_
18251 }
18252
18253 func (c *VideoCategoriesListCall) doRequest(alt string) (*http.Response, error) {
18254 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18255 if c.ifNoneMatch_ != "" {
18256 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18257 }
18258 var body io.Reader = nil
18259 c.urlParams_.Set("alt", alt)
18260 c.urlParams_.Set("prettyPrint", "false")
18261 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videoCategories")
18262 urls += "?" + c.urlParams_.Encode()
18263 req, err := http.NewRequest("GET", urls, body)
18264 if err != nil {
18265 return nil, err
18266 }
18267 req.Header = reqHeaders
18268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18269 }
18270
18271
18272
18273
18274
18275
18276
18277 func (c *VideoCategoriesListCall) Do(opts ...googleapi.CallOption) (*VideoCategoryListResponse, error) {
18278 gensupport.SetOptions(c.urlParams_, opts...)
18279 res, err := c.doRequest("json")
18280 if res != nil && res.StatusCode == http.StatusNotModified {
18281 if res.Body != nil {
18282 res.Body.Close()
18283 }
18284 return nil, gensupport.WrapError(&googleapi.Error{
18285 Code: res.StatusCode,
18286 Header: res.Header,
18287 })
18288 }
18289 if err != nil {
18290 return nil, err
18291 }
18292 defer googleapi.CloseBody(res)
18293 if err := googleapi.CheckResponse(res); err != nil {
18294 return nil, gensupport.WrapError(err)
18295 }
18296 ret := &VideoCategoryListResponse{
18297 ServerResponse: googleapi.ServerResponse{
18298 Header: res.Header,
18299 HTTPStatusCode: res.StatusCode,
18300 },
18301 }
18302 target := &ret
18303 if err := gensupport.DecodeResponse(target, res); err != nil {
18304 return nil, err
18305 }
18306 return ret, nil
18307 }
18308
18309 type VideosDeleteCall struct {
18310 s *Service
18311 urlParams_ gensupport.URLParams
18312 ctx_ context.Context
18313 header_ http.Header
18314 }
18315
18316
18317
18318
18319 func (r *VideosService) Delete(id string) *VideosDeleteCall {
18320 c := &VideosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18321 c.urlParams_.Set("id", id)
18322 return c
18323 }
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336 func (c *VideosDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosDeleteCall {
18337 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18338 return c
18339 }
18340
18341
18342
18343
18344 func (c *VideosDeleteCall) Fields(s ...googleapi.Field) *VideosDeleteCall {
18345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18346 return c
18347 }
18348
18349
18350 func (c *VideosDeleteCall) Context(ctx context.Context) *VideosDeleteCall {
18351 c.ctx_ = ctx
18352 return c
18353 }
18354
18355
18356
18357 func (c *VideosDeleteCall) Header() http.Header {
18358 if c.header_ == nil {
18359 c.header_ = make(http.Header)
18360 }
18361 return c.header_
18362 }
18363
18364 func (c *VideosDeleteCall) doRequest(alt string) (*http.Response, error) {
18365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18366 var body io.Reader = nil
18367 c.urlParams_.Set("alt", alt)
18368 c.urlParams_.Set("prettyPrint", "false")
18369 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
18370 urls += "?" + c.urlParams_.Encode()
18371 req, err := http.NewRequest("DELETE", urls, body)
18372 if err != nil {
18373 return nil, err
18374 }
18375 req.Header = reqHeaders
18376 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18377 }
18378
18379
18380 func (c *VideosDeleteCall) Do(opts ...googleapi.CallOption) error {
18381 gensupport.SetOptions(c.urlParams_, opts...)
18382 res, err := c.doRequest("json")
18383 if err != nil {
18384 return err
18385 }
18386 defer googleapi.CloseBody(res)
18387 if err := googleapi.CheckResponse(res); err != nil {
18388 return gensupport.WrapError(err)
18389 }
18390 return nil
18391 }
18392
18393 type VideosGetRatingCall struct {
18394 s *Service
18395 urlParams_ gensupport.URLParams
18396 ifNoneMatch_ string
18397 ctx_ context.Context
18398 header_ http.Header
18399 }
18400
18401
18402
18403
18404
18405 func (r *VideosService) GetRating(id []string) *VideosGetRatingCall {
18406 c := &VideosGetRatingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18407 c.urlParams_.SetMulti("id", append([]string{}, id...))
18408 return c
18409 }
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422 func (c *VideosGetRatingCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosGetRatingCall {
18423 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18424 return c
18425 }
18426
18427
18428
18429
18430 func (c *VideosGetRatingCall) Fields(s ...googleapi.Field) *VideosGetRatingCall {
18431 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18432 return c
18433 }
18434
18435
18436
18437
18438 func (c *VideosGetRatingCall) IfNoneMatch(entityTag string) *VideosGetRatingCall {
18439 c.ifNoneMatch_ = entityTag
18440 return c
18441 }
18442
18443
18444 func (c *VideosGetRatingCall) Context(ctx context.Context) *VideosGetRatingCall {
18445 c.ctx_ = ctx
18446 return c
18447 }
18448
18449
18450
18451 func (c *VideosGetRatingCall) Header() http.Header {
18452 if c.header_ == nil {
18453 c.header_ = make(http.Header)
18454 }
18455 return c.header_
18456 }
18457
18458 func (c *VideosGetRatingCall) doRequest(alt string) (*http.Response, error) {
18459 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18460 if c.ifNoneMatch_ != "" {
18461 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18462 }
18463 var body io.Reader = nil
18464 c.urlParams_.Set("alt", alt)
18465 c.urlParams_.Set("prettyPrint", "false")
18466 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos/getRating")
18467 urls += "?" + c.urlParams_.Encode()
18468 req, err := http.NewRequest("GET", urls, body)
18469 if err != nil {
18470 return nil, err
18471 }
18472 req.Header = reqHeaders
18473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18474 }
18475
18476
18477
18478
18479
18480
18481
18482 func (c *VideosGetRatingCall) Do(opts ...googleapi.CallOption) (*VideoGetRatingResponse, error) {
18483 gensupport.SetOptions(c.urlParams_, opts...)
18484 res, err := c.doRequest("json")
18485 if res != nil && res.StatusCode == http.StatusNotModified {
18486 if res.Body != nil {
18487 res.Body.Close()
18488 }
18489 return nil, gensupport.WrapError(&googleapi.Error{
18490 Code: res.StatusCode,
18491 Header: res.Header,
18492 })
18493 }
18494 if err != nil {
18495 return nil, err
18496 }
18497 defer googleapi.CloseBody(res)
18498 if err := googleapi.CheckResponse(res); err != nil {
18499 return nil, gensupport.WrapError(err)
18500 }
18501 ret := &VideoGetRatingResponse{
18502 ServerResponse: googleapi.ServerResponse{
18503 Header: res.Header,
18504 HTTPStatusCode: res.StatusCode,
18505 },
18506 }
18507 target := &ret
18508 if err := gensupport.DecodeResponse(target, res); err != nil {
18509 return nil, err
18510 }
18511 return ret, nil
18512 }
18513
18514 type VideosInsertCall struct {
18515 s *Service
18516 video *Video
18517 urlParams_ gensupport.URLParams
18518 mediaInfo_ *gensupport.MediaInfo
18519 ctx_ context.Context
18520 header_ http.Header
18521 }
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533 func (r *VideosService) Insert(part []string, video *Video) *VideosInsertCall {
18534 c := &VideosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18535 c.urlParams_.SetMulti("part", append([]string{}, part...))
18536 c.video = video
18537 return c
18538 }
18539
18540
18541
18542 func (c *VideosInsertCall) AutoLevels(autoLevels bool) *VideosInsertCall {
18543 c.urlParams_.Set("autoLevels", fmt.Sprint(autoLevels))
18544 return c
18545 }
18546
18547
18548
18549
18550 func (c *VideosInsertCall) NotifySubscribers(notifySubscribers bool) *VideosInsertCall {
18551 c.urlParams_.Set("notifySubscribers", fmt.Sprint(notifySubscribers))
18552 return c
18553 }
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566 func (c *VideosInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosInsertCall {
18567 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18568 return c
18569 }
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588 func (c *VideosInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *VideosInsertCall {
18589 c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
18590 return c
18591 }
18592
18593
18594
18595 func (c *VideosInsertCall) Stabilize(stabilize bool) *VideosInsertCall {
18596 c.urlParams_.Set("stabilize", fmt.Sprint(stabilize))
18597 return c
18598 }
18599
18600
18601
18602
18603
18604
18605
18606
18607 func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *VideosInsertCall {
18608 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
18609 return c
18610 }
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621 func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *VideosInsertCall {
18622 c.ctx_ = ctx
18623 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
18624 return c
18625 }
18626
18627
18628
18629
18630
18631 func (c *VideosInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *VideosInsertCall {
18632 c.mediaInfo_.SetProgressUpdater(pu)
18633 return c
18634 }
18635
18636
18637
18638
18639 func (c *VideosInsertCall) Fields(s ...googleapi.Field) *VideosInsertCall {
18640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18641 return c
18642 }
18643
18644
18645
18646
18647 func (c *VideosInsertCall) Context(ctx context.Context) *VideosInsertCall {
18648 c.ctx_ = ctx
18649 return c
18650 }
18651
18652
18653
18654 func (c *VideosInsertCall) Header() http.Header {
18655 if c.header_ == nil {
18656 c.header_ = make(http.Header)
18657 }
18658 return c.header_
18659 }
18660
18661 func (c *VideosInsertCall) doRequest(alt string) (*http.Response, error) {
18662 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18663 var body io.Reader = nil
18664 body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
18665 if err != nil {
18666 return nil, err
18667 }
18668 c.urlParams_.Set("alt", alt)
18669 c.urlParams_.Set("prettyPrint", "false")
18670 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
18671 if c.mediaInfo_ != nil {
18672 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/videos")
18673 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
18674 }
18675 if body == nil {
18676 body = new(bytes.Buffer)
18677 reqHeaders.Set("Content-Type", "application/json")
18678 }
18679 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
18680 defer cleanup()
18681 urls += "?" + c.urlParams_.Encode()
18682 req, err := http.NewRequest("POST", urls, body)
18683 if err != nil {
18684 return nil, err
18685 }
18686 req.Header = reqHeaders
18687 req.GetBody = getBody
18688 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18689 }
18690
18691
18692
18693
18694
18695
18696 func (c *VideosInsertCall) Do(opts ...googleapi.CallOption) (*Video, error) {
18697 gensupport.SetOptions(c.urlParams_, opts...)
18698 res, err := c.doRequest("json")
18699 if res != nil && res.StatusCode == http.StatusNotModified {
18700 if res.Body != nil {
18701 res.Body.Close()
18702 }
18703 return nil, gensupport.WrapError(&googleapi.Error{
18704 Code: res.StatusCode,
18705 Header: res.Header,
18706 })
18707 }
18708 if err != nil {
18709 return nil, err
18710 }
18711 defer googleapi.CloseBody(res)
18712 if err := googleapi.CheckResponse(res); err != nil {
18713 return nil, gensupport.WrapError(err)
18714 }
18715 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
18716 if rx != nil {
18717 rx.Client = c.s.client
18718 rx.UserAgent = c.s.userAgent()
18719 ctx := c.ctx_
18720 if ctx == nil {
18721 ctx = context.TODO()
18722 }
18723 res, err = rx.Upload(ctx)
18724 if err != nil {
18725 return nil, err
18726 }
18727 defer res.Body.Close()
18728 if err := googleapi.CheckResponse(res); err != nil {
18729 return nil, gensupport.WrapError(err)
18730 }
18731 }
18732 ret := &Video{
18733 ServerResponse: googleapi.ServerResponse{
18734 Header: res.Header,
18735 HTTPStatusCode: res.StatusCode,
18736 },
18737 }
18738 target := &ret
18739 if err := gensupport.DecodeResponse(target, res); err != nil {
18740 return nil, err
18741 }
18742 return ret, nil
18743 }
18744
18745 type VideosListCall struct {
18746 s *Service
18747 urlParams_ gensupport.URLParams
18748 ifNoneMatch_ string
18749 ctx_ context.Context
18750 header_ http.Header
18751 }
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762 func (r *VideosService) List(part []string) *VideosListCall {
18763 c := &VideosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18764 c.urlParams_.SetMulti("part", append([]string{}, part...))
18765 return c
18766 }
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777 func (c *VideosListCall) Chart(chart string) *VideosListCall {
18778 c.urlParams_.Set("chart", chart)
18779 return c
18780 }
18781
18782
18783
18784
18785
18786
18787
18788 func (c *VideosListCall) Hl(hl string) *VideosListCall {
18789 c.urlParams_.Set("hl", hl)
18790 return c
18791 }
18792
18793
18794 func (c *VideosListCall) Id(id ...string) *VideosListCall {
18795 c.urlParams_.SetMulti("id", append([]string{}, id...))
18796 return c
18797 }
18798
18799
18800 func (c *VideosListCall) Locale(locale string) *VideosListCall {
18801 c.urlParams_.Set("locale", locale)
18802 return c
18803 }
18804
18805
18806 func (c *VideosListCall) MaxHeight(maxHeight int64) *VideosListCall {
18807 c.urlParams_.Set("maxHeight", fmt.Sprint(maxHeight))
18808 return c
18809 }
18810
18811
18812
18813
18814
18815
18816 func (c *VideosListCall) MaxResults(maxResults int64) *VideosListCall {
18817 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18818 return c
18819 }
18820
18821
18822
18823 func (c *VideosListCall) MaxWidth(maxWidth int64) *VideosListCall {
18824 c.urlParams_.Set("maxWidth", fmt.Sprint(maxWidth))
18825 return c
18826 }
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837 func (c *VideosListCall) MyRating(myRating string) *VideosListCall {
18838 c.urlParams_.Set("myRating", myRating)
18839 return c
18840 }
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853 func (c *VideosListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosListCall {
18854 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18855 return c
18856 }
18857
18858
18859
18860
18861
18862
18863
18864 func (c *VideosListCall) PageToken(pageToken string) *VideosListCall {
18865 c.urlParams_.Set("pageToken", pageToken)
18866 return c
18867 }
18868
18869
18870
18871 func (c *VideosListCall) RegionCode(regionCode string) *VideosListCall {
18872 c.urlParams_.Set("regionCode", regionCode)
18873 return c
18874 }
18875
18876
18877
18878 func (c *VideosListCall) VideoCategoryId(videoCategoryId string) *VideosListCall {
18879 c.urlParams_.Set("videoCategoryId", videoCategoryId)
18880 return c
18881 }
18882
18883
18884
18885
18886 func (c *VideosListCall) Fields(s ...googleapi.Field) *VideosListCall {
18887 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18888 return c
18889 }
18890
18891
18892
18893
18894 func (c *VideosListCall) IfNoneMatch(entityTag string) *VideosListCall {
18895 c.ifNoneMatch_ = entityTag
18896 return c
18897 }
18898
18899
18900 func (c *VideosListCall) Context(ctx context.Context) *VideosListCall {
18901 c.ctx_ = ctx
18902 return c
18903 }
18904
18905
18906
18907 func (c *VideosListCall) Header() http.Header {
18908 if c.header_ == nil {
18909 c.header_ = make(http.Header)
18910 }
18911 return c.header_
18912 }
18913
18914 func (c *VideosListCall) doRequest(alt string) (*http.Response, error) {
18915 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18916 if c.ifNoneMatch_ != "" {
18917 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18918 }
18919 var body io.Reader = nil
18920 c.urlParams_.Set("alt", alt)
18921 c.urlParams_.Set("prettyPrint", "false")
18922 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
18923 urls += "?" + c.urlParams_.Encode()
18924 req, err := http.NewRequest("GET", urls, body)
18925 if err != nil {
18926 return nil, err
18927 }
18928 req.Header = reqHeaders
18929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18930 }
18931
18932
18933
18934
18935
18936
18937
18938 func (c *VideosListCall) Do(opts ...googleapi.CallOption) (*VideoListResponse, error) {
18939 gensupport.SetOptions(c.urlParams_, opts...)
18940 res, err := c.doRequest("json")
18941 if res != nil && res.StatusCode == http.StatusNotModified {
18942 if res.Body != nil {
18943 res.Body.Close()
18944 }
18945 return nil, gensupport.WrapError(&googleapi.Error{
18946 Code: res.StatusCode,
18947 Header: res.Header,
18948 })
18949 }
18950 if err != nil {
18951 return nil, err
18952 }
18953 defer googleapi.CloseBody(res)
18954 if err := googleapi.CheckResponse(res); err != nil {
18955 return nil, gensupport.WrapError(err)
18956 }
18957 ret := &VideoListResponse{
18958 ServerResponse: googleapi.ServerResponse{
18959 Header: res.Header,
18960 HTTPStatusCode: res.StatusCode,
18961 },
18962 }
18963 target := &ret
18964 if err := gensupport.DecodeResponse(target, res); err != nil {
18965 return nil, err
18966 }
18967 return ret, nil
18968 }
18969
18970
18971
18972
18973 func (c *VideosListCall) Pages(ctx context.Context, f func(*VideoListResponse) error) error {
18974 c.ctx_ = ctx
18975 defer c.PageToken(c.urlParams_.Get("pageToken"))
18976 for {
18977 x, err := c.Do()
18978 if err != nil {
18979 return err
18980 }
18981 if err := f(x); err != nil {
18982 return err
18983 }
18984 if x.NextPageToken == "" {
18985 return nil
18986 }
18987 c.PageToken(x.NextPageToken)
18988 }
18989 }
18990
18991 type VideosRateCall struct {
18992 s *Service
18993 urlParams_ gensupport.URLParams
18994 ctx_ context.Context
18995 header_ http.Header
18996 }
18997
18998
18999
19000
19001
19002
19003 func (r *VideosService) Rate(id string, rating string) *VideosRateCall {
19004 c := &VideosRateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19005 c.urlParams_.Set("id", id)
19006 c.urlParams_.Set("rating", rating)
19007 return c
19008 }
19009
19010
19011
19012
19013 func (c *VideosRateCall) Fields(s ...googleapi.Field) *VideosRateCall {
19014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19015 return c
19016 }
19017
19018
19019 func (c *VideosRateCall) Context(ctx context.Context) *VideosRateCall {
19020 c.ctx_ = ctx
19021 return c
19022 }
19023
19024
19025
19026 func (c *VideosRateCall) Header() http.Header {
19027 if c.header_ == nil {
19028 c.header_ = make(http.Header)
19029 }
19030 return c.header_
19031 }
19032
19033 func (c *VideosRateCall) doRequest(alt string) (*http.Response, error) {
19034 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19035 var body io.Reader = nil
19036 c.urlParams_.Set("alt", alt)
19037 c.urlParams_.Set("prettyPrint", "false")
19038 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos/rate")
19039 urls += "?" + c.urlParams_.Encode()
19040 req, err := http.NewRequest("POST", urls, body)
19041 if err != nil {
19042 return nil, err
19043 }
19044 req.Header = reqHeaders
19045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19046 }
19047
19048
19049 func (c *VideosRateCall) Do(opts ...googleapi.CallOption) error {
19050 gensupport.SetOptions(c.urlParams_, opts...)
19051 res, err := c.doRequest("json")
19052 if err != nil {
19053 return err
19054 }
19055 defer googleapi.CloseBody(res)
19056 if err := googleapi.CheckResponse(res); err != nil {
19057 return gensupport.WrapError(err)
19058 }
19059 return nil
19060 }
19061
19062 type VideosReportAbuseCall struct {
19063 s *Service
19064 videoabusereport *VideoAbuseReport
19065 urlParams_ gensupport.URLParams
19066 ctx_ context.Context
19067 header_ http.Header
19068 }
19069
19070
19071 func (r *VideosService) ReportAbuse(videoabusereport *VideoAbuseReport) *VideosReportAbuseCall {
19072 c := &VideosReportAbuseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19073 c.videoabusereport = videoabusereport
19074 return c
19075 }
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088 func (c *VideosReportAbuseCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosReportAbuseCall {
19089 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19090 return c
19091 }
19092
19093
19094
19095
19096 func (c *VideosReportAbuseCall) Fields(s ...googleapi.Field) *VideosReportAbuseCall {
19097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19098 return c
19099 }
19100
19101
19102 func (c *VideosReportAbuseCall) Context(ctx context.Context) *VideosReportAbuseCall {
19103 c.ctx_ = ctx
19104 return c
19105 }
19106
19107
19108
19109 func (c *VideosReportAbuseCall) Header() http.Header {
19110 if c.header_ == nil {
19111 c.header_ = make(http.Header)
19112 }
19113 return c.header_
19114 }
19115
19116 func (c *VideosReportAbuseCall) doRequest(alt string) (*http.Response, error) {
19117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19118 var body io.Reader = nil
19119 body, err := googleapi.WithoutDataWrapper.JSONReader(c.videoabusereport)
19120 if err != nil {
19121 return nil, err
19122 }
19123 c.urlParams_.Set("alt", alt)
19124 c.urlParams_.Set("prettyPrint", "false")
19125 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos/reportAbuse")
19126 urls += "?" + c.urlParams_.Encode()
19127 req, err := http.NewRequest("POST", urls, body)
19128 if err != nil {
19129 return nil, err
19130 }
19131 req.Header = reqHeaders
19132 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19133 }
19134
19135
19136 func (c *VideosReportAbuseCall) Do(opts ...googleapi.CallOption) error {
19137 gensupport.SetOptions(c.urlParams_, opts...)
19138 res, err := c.doRequest("json")
19139 if err != nil {
19140 return err
19141 }
19142 defer googleapi.CloseBody(res)
19143 if err := googleapi.CheckResponse(res); err != nil {
19144 return gensupport.WrapError(err)
19145 }
19146 return nil
19147 }
19148
19149 type VideosUpdateCall struct {
19150 s *Service
19151 video *Video
19152 urlParams_ gensupport.URLParams
19153 ctx_ context.Context
19154 header_ http.Header
19155 }
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176 func (r *VideosService) Update(part []string, video *Video) *VideosUpdateCall {
19177 c := &VideosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19178 c.urlParams_.SetMulti("part", append([]string{}, part...))
19179 c.video = video
19180 return c
19181 }
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194 func (c *VideosUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosUpdateCall {
19195 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19196 return c
19197 }
19198
19199
19200
19201
19202 func (c *VideosUpdateCall) Fields(s ...googleapi.Field) *VideosUpdateCall {
19203 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19204 return c
19205 }
19206
19207
19208 func (c *VideosUpdateCall) Context(ctx context.Context) *VideosUpdateCall {
19209 c.ctx_ = ctx
19210 return c
19211 }
19212
19213
19214
19215 func (c *VideosUpdateCall) Header() http.Header {
19216 if c.header_ == nil {
19217 c.header_ = make(http.Header)
19218 }
19219 return c.header_
19220 }
19221
19222 func (c *VideosUpdateCall) doRequest(alt string) (*http.Response, error) {
19223 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19224 var body io.Reader = nil
19225 body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
19226 if err != nil {
19227 return nil, err
19228 }
19229 c.urlParams_.Set("alt", alt)
19230 c.urlParams_.Set("prettyPrint", "false")
19231 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
19232 urls += "?" + c.urlParams_.Encode()
19233 req, err := http.NewRequest("PUT", urls, body)
19234 if err != nil {
19235 return nil, err
19236 }
19237 req.Header = reqHeaders
19238 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19239 }
19240
19241
19242
19243
19244
19245
19246 func (c *VideosUpdateCall) Do(opts ...googleapi.CallOption) (*Video, error) {
19247 gensupport.SetOptions(c.urlParams_, opts...)
19248 res, err := c.doRequest("json")
19249 if res != nil && res.StatusCode == http.StatusNotModified {
19250 if res.Body != nil {
19251 res.Body.Close()
19252 }
19253 return nil, gensupport.WrapError(&googleapi.Error{
19254 Code: res.StatusCode,
19255 Header: res.Header,
19256 })
19257 }
19258 if err != nil {
19259 return nil, err
19260 }
19261 defer googleapi.CloseBody(res)
19262 if err := googleapi.CheckResponse(res); err != nil {
19263 return nil, gensupport.WrapError(err)
19264 }
19265 ret := &Video{
19266 ServerResponse: googleapi.ServerResponse{
19267 Header: res.Header,
19268 HTTPStatusCode: res.StatusCode,
19269 },
19270 }
19271 target := &ret
19272 if err := gensupport.DecodeResponse(target, res); err != nil {
19273 return nil, err
19274 }
19275 return ret, nil
19276 }
19277
19278 type WatermarksSetCall struct {
19279 s *Service
19280 invideobranding *InvideoBranding
19281 urlParams_ gensupport.URLParams
19282 mediaInfo_ *gensupport.MediaInfo
19283 ctx_ context.Context
19284 header_ http.Header
19285 }
19286
19287
19288
19289
19290 func (r *WatermarksService) Set(channelId string, invideobranding *InvideoBranding) *WatermarksSetCall {
19291 c := &WatermarksSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19292 c.urlParams_.Set("channelId", channelId)
19293 c.invideobranding = invideobranding
19294 return c
19295 }
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308 func (c *WatermarksSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *WatermarksSetCall {
19309 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19310 return c
19311 }
19312
19313
19314
19315
19316
19317
19318
19319
19320 func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *WatermarksSetCall {
19321 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
19322 return c
19323 }
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334 func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *WatermarksSetCall {
19335 c.ctx_ = ctx
19336 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
19337 return c
19338 }
19339
19340
19341
19342
19343
19344 func (c *WatermarksSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *WatermarksSetCall {
19345 c.mediaInfo_.SetProgressUpdater(pu)
19346 return c
19347 }
19348
19349
19350
19351
19352 func (c *WatermarksSetCall) Fields(s ...googleapi.Field) *WatermarksSetCall {
19353 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19354 return c
19355 }
19356
19357
19358
19359
19360 func (c *WatermarksSetCall) Context(ctx context.Context) *WatermarksSetCall {
19361 c.ctx_ = ctx
19362 return c
19363 }
19364
19365
19366
19367 func (c *WatermarksSetCall) Header() http.Header {
19368 if c.header_ == nil {
19369 c.header_ = make(http.Header)
19370 }
19371 return c.header_
19372 }
19373
19374 func (c *WatermarksSetCall) doRequest(alt string) (*http.Response, error) {
19375 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19376 var body io.Reader = nil
19377 body, err := googleapi.WithoutDataWrapper.JSONReader(c.invideobranding)
19378 if err != nil {
19379 return nil, err
19380 }
19381 c.urlParams_.Set("alt", alt)
19382 c.urlParams_.Set("prettyPrint", "false")
19383 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/watermarks/set")
19384 if c.mediaInfo_ != nil {
19385 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/watermarks/set")
19386 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
19387 }
19388 if body == nil {
19389 body = new(bytes.Buffer)
19390 reqHeaders.Set("Content-Type", "application/json")
19391 }
19392 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
19393 defer cleanup()
19394 urls += "?" + c.urlParams_.Encode()
19395 req, err := http.NewRequest("POST", urls, body)
19396 if err != nil {
19397 return nil, err
19398 }
19399 req.Header = reqHeaders
19400 req.GetBody = getBody
19401 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19402 }
19403
19404
19405 func (c *WatermarksSetCall) Do(opts ...googleapi.CallOption) error {
19406 gensupport.SetOptions(c.urlParams_, opts...)
19407 res, err := c.doRequest("json")
19408 if err != nil {
19409 return err
19410 }
19411 defer googleapi.CloseBody(res)
19412 if err := googleapi.CheckResponse(res); err != nil {
19413 return gensupport.WrapError(err)
19414 }
19415 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
19416 if rx != nil {
19417 rx.Client = c.s.client
19418 rx.UserAgent = c.s.userAgent()
19419 ctx := c.ctx_
19420 if ctx == nil {
19421 ctx = context.TODO()
19422 }
19423 res, err = rx.Upload(ctx)
19424 if err != nil {
19425 return err
19426 }
19427 defer res.Body.Close()
19428 if err := googleapi.CheckResponse(res); err != nil {
19429 return gensupport.WrapError(err)
19430 }
19431 }
19432 return nil
19433 }
19434
19435 type WatermarksUnsetCall struct {
19436 s *Service
19437 urlParams_ gensupport.URLParams
19438 ctx_ context.Context
19439 header_ http.Header
19440 }
19441
19442
19443
19444
19445 func (r *WatermarksService) Unset(channelId string) *WatermarksUnsetCall {
19446 c := &WatermarksUnsetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19447 c.urlParams_.Set("channelId", channelId)
19448 return c
19449 }
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462 func (c *WatermarksUnsetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *WatermarksUnsetCall {
19463 c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19464 return c
19465 }
19466
19467
19468
19469
19470 func (c *WatermarksUnsetCall) Fields(s ...googleapi.Field) *WatermarksUnsetCall {
19471 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19472 return c
19473 }
19474
19475
19476 func (c *WatermarksUnsetCall) Context(ctx context.Context) *WatermarksUnsetCall {
19477 c.ctx_ = ctx
19478 return c
19479 }
19480
19481
19482
19483 func (c *WatermarksUnsetCall) Header() http.Header {
19484 if c.header_ == nil {
19485 c.header_ = make(http.Header)
19486 }
19487 return c.header_
19488 }
19489
19490 func (c *WatermarksUnsetCall) doRequest(alt string) (*http.Response, error) {
19491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19492 var body io.Reader = nil
19493 c.urlParams_.Set("alt", alt)
19494 c.urlParams_.Set("prettyPrint", "false")
19495 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/watermarks/unset")
19496 urls += "?" + c.urlParams_.Encode()
19497 req, err := http.NewRequest("POST", urls, body)
19498 if err != nil {
19499 return nil, err
19500 }
19501 req.Header = reqHeaders
19502 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19503 }
19504
19505
19506 func (c *WatermarksUnsetCall) Do(opts ...googleapi.CallOption) error {
19507 gensupport.SetOptions(c.urlParams_, opts...)
19508 res, err := c.doRequest("json")
19509 if err != nil {
19510 return err
19511 }
19512 defer googleapi.CloseBody(res)
19513 if err := googleapi.CheckResponse(res); err != nil {
19514 return gensupport.WrapError(err)
19515 }
19516 return nil
19517 }
19518
19519 type YoutubeV3UpdateCommentThreadsCall struct {
19520 s *Service
19521 commentthread *CommentThread
19522 urlParams_ gensupport.URLParams
19523 ctx_ context.Context
19524 header_ http.Header
19525 }
19526
19527
19528 func (r *YoutubeV3Service) UpdateCommentThreads(commentthread *CommentThread) *YoutubeV3UpdateCommentThreadsCall {
19529 c := &YoutubeV3UpdateCommentThreadsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19530 c.commentthread = commentthread
19531 return c
19532 }
19533
19534
19535
19536
19537
19538
19539 func (c *YoutubeV3UpdateCommentThreadsCall) Part(part ...string) *YoutubeV3UpdateCommentThreadsCall {
19540 c.urlParams_.SetMulti("part", append([]string{}, part...))
19541 return c
19542 }
19543
19544
19545
19546
19547 func (c *YoutubeV3UpdateCommentThreadsCall) Fields(s ...googleapi.Field) *YoutubeV3UpdateCommentThreadsCall {
19548 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19549 return c
19550 }
19551
19552
19553 func (c *YoutubeV3UpdateCommentThreadsCall) Context(ctx context.Context) *YoutubeV3UpdateCommentThreadsCall {
19554 c.ctx_ = ctx
19555 return c
19556 }
19557
19558
19559
19560 func (c *YoutubeV3UpdateCommentThreadsCall) Header() http.Header {
19561 if c.header_ == nil {
19562 c.header_ = make(http.Header)
19563 }
19564 return c.header_
19565 }
19566
19567 func (c *YoutubeV3UpdateCommentThreadsCall) doRequest(alt string) (*http.Response, error) {
19568 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19569 var body io.Reader = nil
19570 body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
19571 if err != nil {
19572 return nil, err
19573 }
19574 c.urlParams_.Set("alt", alt)
19575 c.urlParams_.Set("prettyPrint", "false")
19576 urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/commentThreads")
19577 urls += "?" + c.urlParams_.Encode()
19578 req, err := http.NewRequest("PUT", urls, body)
19579 if err != nil {
19580 return nil, err
19581 }
19582 req.Header = reqHeaders
19583 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19584 }
19585
19586
19587
19588
19589
19590
19591 func (c *YoutubeV3UpdateCommentThreadsCall) Do(opts ...googleapi.CallOption) (*CommentThread, error) {
19592 gensupport.SetOptions(c.urlParams_, opts...)
19593 res, err := c.doRequest("json")
19594 if res != nil && res.StatusCode == http.StatusNotModified {
19595 if res.Body != nil {
19596 res.Body.Close()
19597 }
19598 return nil, gensupport.WrapError(&googleapi.Error{
19599 Code: res.StatusCode,
19600 Header: res.Header,
19601 })
19602 }
19603 if err != nil {
19604 return nil, err
19605 }
19606 defer googleapi.CloseBody(res)
19607 if err := googleapi.CheckResponse(res); err != nil {
19608 return nil, gensupport.WrapError(err)
19609 }
19610 ret := &CommentThread{
19611 ServerResponse: googleapi.ServerResponse{
19612 Header: res.Header,
19613 HTTPStatusCode: res.StatusCode,
19614 },
19615 }
19616 target := &ret
19617 if err := gensupport.DecodeResponse(target, res); err != nil {
19618 return nil, err
19619 }
19620 return ret, nil
19621 }
19622
View as plain text