1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package youtube provides access to the YouTube Data API.
8//
9// For product documentation, see: https://developers.google.com/youtube/v3
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/youtube/v3"
16//   ...
17//   ctx := context.Background()
18//   youtubeService, err := youtube.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   youtubeService, err := youtube.NewService(ctx, option.WithScopes(youtube.YoutubepartnerChannelAuditScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   youtubeService, err := youtube.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   youtubeService, err := youtube.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package youtube // import "google.golang.org/api/youtube/v3"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	gensupport "google.golang.org/api/gensupport"
57	googleapi "google.golang.org/api/googleapi"
58	option "google.golang.org/api/option"
59	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "youtube:v3"
77const apiName = "youtube"
78const apiVersion = "v3"
79const basePath = "https://www.googleapis.com/youtube/v3/"
80
81// OAuth2 scopes used by this API.
82const (
83	// Manage your YouTube account
84	YoutubeScope = "https://www.googleapis.com/auth/youtube"
85
86	// See, edit, and permanently delete your YouTube videos, ratings,
87	// comments and captions
88	YoutubeForceSslScope = "https://www.googleapis.com/auth/youtube.force-ssl"
89
90	// View your YouTube account
91	YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.readonly"
92
93	// Manage your YouTube videos
94	YoutubeUploadScope = "https://www.googleapis.com/auth/youtube.upload"
95
96	// View and manage your assets and associated content on YouTube
97	YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepartner"
98
99	// View private information of your YouTube channel relevant during the
100	// audit process with a YouTube partner
101	YoutubepartnerChannelAuditScope = "https://www.googleapis.com/auth/youtubepartner-channel-audit"
102)
103
104// NewService creates a new Service.
105func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
106	scopesOption := option.WithScopes(
107		"https://www.googleapis.com/auth/youtube",
108		"https://www.googleapis.com/auth/youtube.force-ssl",
109		"https://www.googleapis.com/auth/youtube.readonly",
110		"https://www.googleapis.com/auth/youtube.upload",
111		"https://www.googleapis.com/auth/youtubepartner",
112		"https://www.googleapis.com/auth/youtubepartner-channel-audit",
113	)
114	// NOTE: prepend, so we don't override user-specified scopes.
115	opts = append([]option.ClientOption{scopesOption}, opts...)
116	client, endpoint, err := htransport.NewClient(ctx, opts...)
117	if err != nil {
118		return nil, err
119	}
120	s, err := New(client)
121	if err != nil {
122		return nil, err
123	}
124	if endpoint != "" {
125		s.BasePath = endpoint
126	}
127	return s, nil
128}
129
130// New creates a new Service. It uses the provided http.Client for requests.
131//
132// Deprecated: please use NewService instead.
133// To provide a custom HTTP client, use option.WithHTTPClient.
134// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
135func New(client *http.Client) (*Service, error) {
136	if client == nil {
137		return nil, errors.New("client is nil")
138	}
139	s := &Service{client: client, BasePath: basePath}
140	s.Activities = NewActivitiesService(s)
141	s.Captions = NewCaptionsService(s)
142	s.ChannelBanners = NewChannelBannersService(s)
143	s.ChannelSections = NewChannelSectionsService(s)
144	s.Channels = NewChannelsService(s)
145	s.CommentThreads = NewCommentThreadsService(s)
146	s.Comments = NewCommentsService(s)
147	s.GuideCategories = NewGuideCategoriesService(s)
148	s.I18nLanguages = NewI18nLanguagesService(s)
149	s.I18nRegions = NewI18nRegionsService(s)
150	s.LiveBroadcasts = NewLiveBroadcastsService(s)
151	s.LiveChatBans = NewLiveChatBansService(s)
152	s.LiveChatMessages = NewLiveChatMessagesService(s)
153	s.LiveChatModerators = NewLiveChatModeratorsService(s)
154	s.LiveStreams = NewLiveStreamsService(s)
155	s.PlaylistItems = NewPlaylistItemsService(s)
156	s.Playlists = NewPlaylistsService(s)
157	s.Search = NewSearchService(s)
158	s.Sponsors = NewSponsorsService(s)
159	s.Subscriptions = NewSubscriptionsService(s)
160	s.SuperChatEvents = NewSuperChatEventsService(s)
161	s.Thumbnails = NewThumbnailsService(s)
162	s.VideoAbuseReportReasons = NewVideoAbuseReportReasonsService(s)
163	s.VideoCategories = NewVideoCategoriesService(s)
164	s.Videos = NewVideosService(s)
165	s.Watermarks = NewWatermarksService(s)
166	return s, nil
167}
168
169type Service struct {
170	client    *http.Client
171	BasePath  string // API endpoint base URL
172	UserAgent string // optional additional User-Agent fragment
173
174	Activities *ActivitiesService
175
176	Captions *CaptionsService
177
178	ChannelBanners *ChannelBannersService
179
180	ChannelSections *ChannelSectionsService
181
182	Channels *ChannelsService
183
184	CommentThreads *CommentThreadsService
185
186	Comments *CommentsService
187
188	GuideCategories *GuideCategoriesService
189
190	I18nLanguages *I18nLanguagesService
191
192	I18nRegions *I18nRegionsService
193
194	LiveBroadcasts *LiveBroadcastsService
195
196	LiveChatBans *LiveChatBansService
197
198	LiveChatMessages *LiveChatMessagesService
199
200	LiveChatModerators *LiveChatModeratorsService
201
202	LiveStreams *LiveStreamsService
203
204	PlaylistItems *PlaylistItemsService
205
206	Playlists *PlaylistsService
207
208	Search *SearchService
209
210	Sponsors *SponsorsService
211
212	Subscriptions *SubscriptionsService
213
214	SuperChatEvents *SuperChatEventsService
215
216	Thumbnails *ThumbnailsService
217
218	VideoAbuseReportReasons *VideoAbuseReportReasonsService
219
220	VideoCategories *VideoCategoriesService
221
222	Videos *VideosService
223
224	Watermarks *WatermarksService
225}
226
227func (s *Service) userAgent() string {
228	if s.UserAgent == "" {
229		return googleapi.UserAgent
230	}
231	return googleapi.UserAgent + " " + s.UserAgent
232}
233
234func NewActivitiesService(s *Service) *ActivitiesService {
235	rs := &ActivitiesService{s: s}
236	return rs
237}
238
239type ActivitiesService struct {
240	s *Service
241}
242
243func NewCaptionsService(s *Service) *CaptionsService {
244	rs := &CaptionsService{s: s}
245	return rs
246}
247
248type CaptionsService struct {
249	s *Service
250}
251
252func NewChannelBannersService(s *Service) *ChannelBannersService {
253	rs := &ChannelBannersService{s: s}
254	return rs
255}
256
257type ChannelBannersService struct {
258	s *Service
259}
260
261func NewChannelSectionsService(s *Service) *ChannelSectionsService {
262	rs := &ChannelSectionsService{s: s}
263	return rs
264}
265
266type ChannelSectionsService struct {
267	s *Service
268}
269
270func NewChannelsService(s *Service) *ChannelsService {
271	rs := &ChannelsService{s: s}
272	return rs
273}
274
275type ChannelsService struct {
276	s *Service
277}
278
279func NewCommentThreadsService(s *Service) *CommentThreadsService {
280	rs := &CommentThreadsService{s: s}
281	return rs
282}
283
284type CommentThreadsService struct {
285	s *Service
286}
287
288func NewCommentsService(s *Service) *CommentsService {
289	rs := &CommentsService{s: s}
290	return rs
291}
292
293type CommentsService struct {
294	s *Service
295}
296
297func NewGuideCategoriesService(s *Service) *GuideCategoriesService {
298	rs := &GuideCategoriesService{s: s}
299	return rs
300}
301
302type GuideCategoriesService struct {
303	s *Service
304}
305
306func NewI18nLanguagesService(s *Service) *I18nLanguagesService {
307	rs := &I18nLanguagesService{s: s}
308	return rs
309}
310
311type I18nLanguagesService struct {
312	s *Service
313}
314
315func NewI18nRegionsService(s *Service) *I18nRegionsService {
316	rs := &I18nRegionsService{s: s}
317	return rs
318}
319
320type I18nRegionsService struct {
321	s *Service
322}
323
324func NewLiveBroadcastsService(s *Service) *LiveBroadcastsService {
325	rs := &LiveBroadcastsService{s: s}
326	return rs
327}
328
329type LiveBroadcastsService struct {
330	s *Service
331}
332
333func NewLiveChatBansService(s *Service) *LiveChatBansService {
334	rs := &LiveChatBansService{s: s}
335	return rs
336}
337
338type LiveChatBansService struct {
339	s *Service
340}
341
342func NewLiveChatMessagesService(s *Service) *LiveChatMessagesService {
343	rs := &LiveChatMessagesService{s: s}
344	return rs
345}
346
347type LiveChatMessagesService struct {
348	s *Service
349}
350
351func NewLiveChatModeratorsService(s *Service) *LiveChatModeratorsService {
352	rs := &LiveChatModeratorsService{s: s}
353	return rs
354}
355
356type LiveChatModeratorsService struct {
357	s *Service
358}
359
360func NewLiveStreamsService(s *Service) *LiveStreamsService {
361	rs := &LiveStreamsService{s: s}
362	return rs
363}
364
365type LiveStreamsService struct {
366	s *Service
367}
368
369func NewPlaylistItemsService(s *Service) *PlaylistItemsService {
370	rs := &PlaylistItemsService{s: s}
371	return rs
372}
373
374type PlaylistItemsService struct {
375	s *Service
376}
377
378func NewPlaylistsService(s *Service) *PlaylistsService {
379	rs := &PlaylistsService{s: s}
380	return rs
381}
382
383type PlaylistsService struct {
384	s *Service
385}
386
387func NewSearchService(s *Service) *SearchService {
388	rs := &SearchService{s: s}
389	return rs
390}
391
392type SearchService struct {
393	s *Service
394}
395
396func NewSponsorsService(s *Service) *SponsorsService {
397	rs := &SponsorsService{s: s}
398	return rs
399}
400
401type SponsorsService struct {
402	s *Service
403}
404
405func NewSubscriptionsService(s *Service) *SubscriptionsService {
406	rs := &SubscriptionsService{s: s}
407	return rs
408}
409
410type SubscriptionsService struct {
411	s *Service
412}
413
414func NewSuperChatEventsService(s *Service) *SuperChatEventsService {
415	rs := &SuperChatEventsService{s: s}
416	return rs
417}
418
419type SuperChatEventsService struct {
420	s *Service
421}
422
423func NewThumbnailsService(s *Service) *ThumbnailsService {
424	rs := &ThumbnailsService{s: s}
425	return rs
426}
427
428type ThumbnailsService struct {
429	s *Service
430}
431
432func NewVideoAbuseReportReasonsService(s *Service) *VideoAbuseReportReasonsService {
433	rs := &VideoAbuseReportReasonsService{s: s}
434	return rs
435}
436
437type VideoAbuseReportReasonsService struct {
438	s *Service
439}
440
441func NewVideoCategoriesService(s *Service) *VideoCategoriesService {
442	rs := &VideoCategoriesService{s: s}
443	return rs
444}
445
446type VideoCategoriesService struct {
447	s *Service
448}
449
450func NewVideosService(s *Service) *VideosService {
451	rs := &VideosService{s: s}
452	return rs
453}
454
455type VideosService struct {
456	s *Service
457}
458
459func NewWatermarksService(s *Service) *WatermarksService {
460	rs := &WatermarksService{s: s}
461	return rs
462}
463
464type WatermarksService struct {
465	s *Service
466}
467
468// AccessPolicy: Rights management policy for YouTube resources.
469type AccessPolicy struct {
470	// Allowed: The value of allowed indicates whether the access to the
471	// policy is allowed or denied by default.
472	Allowed bool `json:"allowed,omitempty"`
473
474	// Exception: A list of region codes that identify countries where the
475	// default policy do not apply.
476	Exception []string `json:"exception,omitempty"`
477
478	// ForceSendFields is a list of field names (e.g. "Allowed") to
479	// unconditionally include in API requests. By default, fields with
480	// empty values are omitted from API requests. However, any non-pointer,
481	// non-interface field appearing in ForceSendFields will be sent to the
482	// server regardless of whether the field is empty or not. This may be
483	// used to include empty fields in Patch requests.
484	ForceSendFields []string `json:"-"`
485
486	// NullFields is a list of field names (e.g. "Allowed") to include in
487	// API requests with the JSON null value. By default, fields with empty
488	// values are omitted from API requests. However, any field with an
489	// empty value appearing in NullFields will be sent to the server as
490	// null. It is an error if a field in this list has a non-empty value.
491	// This may be used to include null fields in Patch requests.
492	NullFields []string `json:"-"`
493}
494
495func (s *AccessPolicy) MarshalJSON() ([]byte, error) {
496	type NoMethod AccessPolicy
497	raw := NoMethod(*s)
498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
499}
500
501// Activity: An activity resource contains information about an action
502// that a particular channel, or user, has taken on YouTube.The actions
503// reported in activity feeds include rating a video, sharing a video,
504// marking a video as a favorite, commenting on a video, uploading a
505// video, and so forth. Each activity resource identifies the type of
506// action, the channel associated with the action, and the resource(s)
507// associated with the action, such as the video that was rated or
508// uploaded.
509type Activity struct {
510	// ContentDetails: The contentDetails object contains information about
511	// the content associated with the activity. For example, if the
512	// snippet.type value is videoRated, then the contentDetails object's
513	// content identifies the rated video.
514	ContentDetails *ActivityContentDetails `json:"contentDetails,omitempty"`
515
516	// Etag: Etag of this resource.
517	Etag string `json:"etag,omitempty"`
518
519	// Id: The ID that YouTube uses to uniquely identify the activity.
520	Id string `json:"id,omitempty"`
521
522	// Kind: Identifies what kind of resource this is. Value: the fixed
523	// string "youtube#activity".
524	Kind string `json:"kind,omitempty"`
525
526	// Snippet: The snippet object contains basic details about the
527	// activity, including the activity's type and group ID.
528	Snippet *ActivitySnippet `json:"snippet,omitempty"`
529
530	// ServerResponse contains the HTTP response code and headers from the
531	// server.
532	googleapi.ServerResponse `json:"-"`
533
534	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
535	// unconditionally include in API requests. By default, fields with
536	// empty values are omitted from API requests. However, any non-pointer,
537	// non-interface field appearing in ForceSendFields will be sent to the
538	// server regardless of whether the field is empty or not. This may be
539	// used to include empty fields in Patch requests.
540	ForceSendFields []string `json:"-"`
541
542	// NullFields is a list of field names (e.g. "ContentDetails") to
543	// include in API requests with the JSON null value. By default, fields
544	// with empty values are omitted from API requests. However, any field
545	// with an empty value appearing in NullFields will be sent to the
546	// server as null. It is an error if a field in this list has a
547	// non-empty value. This may be used to include null fields in Patch
548	// requests.
549	NullFields []string `json:"-"`
550}
551
552func (s *Activity) MarshalJSON() ([]byte, error) {
553	type NoMethod Activity
554	raw := NoMethod(*s)
555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
556}
557
558// ActivityContentDetails: Details about the content of an activity: the
559// video that was shared, the channel that was subscribed to, etc.
560type ActivityContentDetails struct {
561	// Bulletin: The bulletin object contains details about a channel
562	// bulletin post. This object is only present if the snippet.type is
563	// bulletin.
564	Bulletin *ActivityContentDetailsBulletin `json:"bulletin,omitempty"`
565
566	// ChannelItem: The channelItem object contains details about a resource
567	// which was added to a channel. This property is only present if the
568	// snippet.type is channelItem.
569	ChannelItem *ActivityContentDetailsChannelItem `json:"channelItem,omitempty"`
570
571	// Comment: The comment object contains information about a resource
572	// that received a comment. This property is only present if the
573	// snippet.type is comment.
574	Comment *ActivityContentDetailsComment `json:"comment,omitempty"`
575
576	// Favorite: The favorite object contains information about a video that
577	// was marked as a favorite video. This property is only present if the
578	// snippet.type is favorite.
579	Favorite *ActivityContentDetailsFavorite `json:"favorite,omitempty"`
580
581	// Like: The like object contains information about a resource that
582	// received a positive (like) rating. This property is only present if
583	// the snippet.type is like.
584	Like *ActivityContentDetailsLike `json:"like,omitempty"`
585
586	// PlaylistItem: The playlistItem object contains information about a
587	// new playlist item. This property is only present if the snippet.type
588	// is playlistItem.
589	PlaylistItem *ActivityContentDetailsPlaylistItem `json:"playlistItem,omitempty"`
590
591	// PromotedItem: The promotedItem object contains details about a
592	// resource which is being promoted. This property is only present if
593	// the snippet.type is promotedItem.
594	PromotedItem *ActivityContentDetailsPromotedItem `json:"promotedItem,omitempty"`
595
596	// Recommendation: The recommendation object contains information about
597	// a recommended resource. This property is only present if the
598	// snippet.type is recommendation.
599	Recommendation *ActivityContentDetailsRecommendation `json:"recommendation,omitempty"`
600
601	// Social: The social object contains details about a social network
602	// post. This property is only present if the snippet.type is social.
603	Social *ActivityContentDetailsSocial `json:"social,omitempty"`
604
605	// Subscription: The subscription object contains information about a
606	// channel that a user subscribed to. This property is only present if
607	// the snippet.type is subscription.
608	Subscription *ActivityContentDetailsSubscription `json:"subscription,omitempty"`
609
610	// Upload: The upload object contains information about the uploaded
611	// video. This property is only present if the snippet.type is upload.
612	Upload *ActivityContentDetailsUpload `json:"upload,omitempty"`
613
614	// ForceSendFields is a list of field names (e.g. "Bulletin") to
615	// unconditionally include in API requests. By default, fields with
616	// empty values are omitted from API requests. However, any non-pointer,
617	// non-interface field appearing in ForceSendFields will be sent to the
618	// server regardless of whether the field is empty or not. This may be
619	// used to include empty fields in Patch requests.
620	ForceSendFields []string `json:"-"`
621
622	// NullFields is a list of field names (e.g. "Bulletin") to include in
623	// API requests with the JSON null value. By default, fields with empty
624	// values are omitted from API requests. However, any field with an
625	// empty value appearing in NullFields will be sent to the server as
626	// null. It is an error if a field in this list has a non-empty value.
627	// This may be used to include null fields in Patch requests.
628	NullFields []string `json:"-"`
629}
630
631func (s *ActivityContentDetails) MarshalJSON() ([]byte, error) {
632	type NoMethod ActivityContentDetails
633	raw := NoMethod(*s)
634	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
635}
636
637// ActivityContentDetailsBulletin: Details about a channel bulletin
638// post.
639type ActivityContentDetailsBulletin struct {
640	// ResourceId: The resourceId object contains information that
641	// identifies the resource associated with a bulletin post.
642	ResourceId *ResourceId `json:"resourceId,omitempty"`
643
644	// ForceSendFields is a list of field names (e.g. "ResourceId") to
645	// unconditionally include in API requests. By default, fields with
646	// empty values are omitted from API requests. However, any non-pointer,
647	// non-interface field appearing in ForceSendFields will be sent to the
648	// server regardless of whether the field is empty or not. This may be
649	// used to include empty fields in Patch requests.
650	ForceSendFields []string `json:"-"`
651
652	// NullFields is a list of field names (e.g. "ResourceId") to include in
653	// API requests with the JSON null value. By default, fields with empty
654	// values are omitted from API requests. However, any field with an
655	// empty value appearing in NullFields will be sent to the server as
656	// null. It is an error if a field in this list has a non-empty value.
657	// This may be used to include null fields in Patch requests.
658	NullFields []string `json:"-"`
659}
660
661func (s *ActivityContentDetailsBulletin) MarshalJSON() ([]byte, error) {
662	type NoMethod ActivityContentDetailsBulletin
663	raw := NoMethod(*s)
664	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
665}
666
667// ActivityContentDetailsChannelItem: Details about a resource which was
668// added to a channel.
669type ActivityContentDetailsChannelItem struct {
670	// ResourceId: The resourceId object contains information that
671	// identifies the resource that was added to the channel.
672	ResourceId *ResourceId `json:"resourceId,omitempty"`
673
674	// ForceSendFields is a list of field names (e.g. "ResourceId") to
675	// unconditionally include in API requests. By default, fields with
676	// empty values are omitted from API requests. However, any non-pointer,
677	// non-interface field appearing in ForceSendFields will be sent to the
678	// server regardless of whether the field is empty or not. This may be
679	// used to include empty fields in Patch requests.
680	ForceSendFields []string `json:"-"`
681
682	// NullFields is a list of field names (e.g. "ResourceId") to include in
683	// API requests with the JSON null value. By default, fields with empty
684	// values are omitted from API requests. However, any field with an
685	// empty value appearing in NullFields will be sent to the server as
686	// null. It is an error if a field in this list has a non-empty value.
687	// This may be used to include null fields in Patch requests.
688	NullFields []string `json:"-"`
689}
690
691func (s *ActivityContentDetailsChannelItem) MarshalJSON() ([]byte, error) {
692	type NoMethod ActivityContentDetailsChannelItem
693	raw := NoMethod(*s)
694	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
695}
696
697// ActivityContentDetailsComment: Information about a resource that
698// received a comment.
699type ActivityContentDetailsComment struct {
700	// ResourceId: The resourceId object contains information that
701	// identifies the resource associated with the comment.
702	ResourceId *ResourceId `json:"resourceId,omitempty"`
703
704	// ForceSendFields is a list of field names (e.g. "ResourceId") to
705	// unconditionally include in API requests. By default, fields with
706	// empty values are omitted from API requests. However, any non-pointer,
707	// non-interface field appearing in ForceSendFields will be sent to the
708	// server regardless of whether the field is empty or not. This may be
709	// used to include empty fields in Patch requests.
710	ForceSendFields []string `json:"-"`
711
712	// NullFields is a list of field names (e.g. "ResourceId") to include in
713	// API requests with the JSON null value. By default, fields with empty
714	// values are omitted from API requests. However, any field with an
715	// empty value appearing in NullFields will be sent to the server as
716	// null. It is an error if a field in this list has a non-empty value.
717	// This may be used to include null fields in Patch requests.
718	NullFields []string `json:"-"`
719}
720
721func (s *ActivityContentDetailsComment) MarshalJSON() ([]byte, error) {
722	type NoMethod ActivityContentDetailsComment
723	raw := NoMethod(*s)
724	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
725}
726
727// ActivityContentDetailsFavorite: Information about a video that was
728// marked as a favorite video.
729type ActivityContentDetailsFavorite struct {
730	// ResourceId: The resourceId object contains information that
731	// identifies the resource that was marked as a favorite.
732	ResourceId *ResourceId `json:"resourceId,omitempty"`
733
734	// ForceSendFields is a list of field names (e.g. "ResourceId") to
735	// unconditionally include in API requests. By default, fields with
736	// empty values are omitted from API requests. However, any non-pointer,
737	// non-interface field appearing in ForceSendFields will be sent to the
738	// server regardless of whether the field is empty or not. This may be
739	// used to include empty fields in Patch requests.
740	ForceSendFields []string `json:"-"`
741
742	// NullFields is a list of field names (e.g. "ResourceId") to include in
743	// API requests with the JSON null value. By default, fields with empty
744	// values are omitted from API requests. However, any field with an
745	// empty value appearing in NullFields will be sent to the server as
746	// null. It is an error if a field in this list has a non-empty value.
747	// This may be used to include null fields in Patch requests.
748	NullFields []string `json:"-"`
749}
750
751func (s *ActivityContentDetailsFavorite) MarshalJSON() ([]byte, error) {
752	type NoMethod ActivityContentDetailsFavorite
753	raw := NoMethod(*s)
754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
755}
756
757// ActivityContentDetailsLike: Information about a resource that
758// received a positive (like) rating.
759type ActivityContentDetailsLike struct {
760	// ResourceId: The resourceId object contains information that
761	// identifies the rated resource.
762	ResourceId *ResourceId `json:"resourceId,omitempty"`
763
764	// ForceSendFields is a list of field names (e.g. "ResourceId") to
765	// unconditionally include in API requests. By default, fields with
766	// empty values are omitted from API requests. However, any non-pointer,
767	// non-interface field appearing in ForceSendFields will be sent to the
768	// server regardless of whether the field is empty or not. This may be
769	// used to include empty fields in Patch requests.
770	ForceSendFields []string `json:"-"`
771
772	// NullFields is a list of field names (e.g. "ResourceId") to include in
773	// API requests with the JSON null value. By default, fields with empty
774	// values are omitted from API requests. However, any field with an
775	// empty value appearing in NullFields will be sent to the server as
776	// null. It is an error if a field in this list has a non-empty value.
777	// This may be used to include null fields in Patch requests.
778	NullFields []string `json:"-"`
779}
780
781func (s *ActivityContentDetailsLike) MarshalJSON() ([]byte, error) {
782	type NoMethod ActivityContentDetailsLike
783	raw := NoMethod(*s)
784	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
785}
786
787// ActivityContentDetailsPlaylistItem: Information about a new playlist
788// item.
789type ActivityContentDetailsPlaylistItem struct {
790	// PlaylistId: The value that YouTube uses to uniquely identify the
791	// playlist.
792	PlaylistId string `json:"playlistId,omitempty"`
793
794	// PlaylistItemId: ID of the item within the playlist.
795	PlaylistItemId string `json:"playlistItemId,omitempty"`
796
797	// ResourceId: The resourceId object contains information about the
798	// resource that was added to the playlist.
799	ResourceId *ResourceId `json:"resourceId,omitempty"`
800
801	// ForceSendFields is a list of field names (e.g. "PlaylistId") to
802	// unconditionally include in API requests. By default, fields with
803	// empty values are omitted from API requests. However, any non-pointer,
804	// non-interface field appearing in ForceSendFields will be sent to the
805	// server regardless of whether the field is empty or not. This may be
806	// used to include empty fields in Patch requests.
807	ForceSendFields []string `json:"-"`
808
809	// NullFields is a list of field names (e.g. "PlaylistId") to include in
810	// API requests with the JSON null value. By default, fields with empty
811	// values are omitted from API requests. However, any field with an
812	// empty value appearing in NullFields will be sent to the server as
813	// null. It is an error if a field in this list has a non-empty value.
814	// This may be used to include null fields in Patch requests.
815	NullFields []string `json:"-"`
816}
817
818func (s *ActivityContentDetailsPlaylistItem) MarshalJSON() ([]byte, error) {
819	type NoMethod ActivityContentDetailsPlaylistItem
820	raw := NoMethod(*s)
821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
822}
823
824// ActivityContentDetailsPromotedItem: Details about a resource which is
825// being promoted.
826type ActivityContentDetailsPromotedItem struct {
827	// AdTag: The URL the client should fetch to request a promoted item.
828	AdTag string `json:"adTag,omitempty"`
829
830	// ClickTrackingUrl: The URL the client should ping to indicate that the
831	// user clicked through on this promoted item.
832	ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
833
834	// CreativeViewUrl: The URL the client should ping to indicate that the
835	// user was shown this promoted item.
836	CreativeViewUrl string `json:"creativeViewUrl,omitempty"`
837
838	// CtaType: The type of call-to-action, a message to the user indicating
839	// action that can be taken.
840	//
841	// Possible values:
842	//   "unspecified"
843	//   "visitAdvertiserSite"
844	CtaType string `json:"ctaType,omitempty"`
845
846	// CustomCtaButtonText: The custom call-to-action button text. If
847	// specified, it will override the default button text for the cta_type.
848	CustomCtaButtonText string `json:"customCtaButtonText,omitempty"`
849
850	// DescriptionText: The text description to accompany the promoted item.
851	DescriptionText string `json:"descriptionText,omitempty"`
852
853	// DestinationUrl: The URL the client should direct the user to, if the
854	// user chooses to visit the advertiser's website.
855	DestinationUrl string `json:"destinationUrl,omitempty"`
856
857	// ForecastingUrl: The list of forecasting URLs. The client should ping
858	// all of these URLs when a promoted item is not available, to indicate
859	// that a promoted item could have been shown.
860	ForecastingUrl []string `json:"forecastingUrl,omitempty"`
861
862	// ImpressionUrl: The list of impression URLs. The client should ping
863	// all of these URLs to indicate that the user was shown this promoted
864	// item.
865	ImpressionUrl []string `json:"impressionUrl,omitempty"`
866
867	// VideoId: The ID that YouTube uses to uniquely identify the promoted
868	// video.
869	VideoId string `json:"videoId,omitempty"`
870
871	// ForceSendFields is a list of field names (e.g. "AdTag") to
872	// unconditionally include in API requests. By default, fields with
873	// empty values are omitted from API requests. However, any non-pointer,
874	// non-interface field appearing in ForceSendFields will be sent to the
875	// server regardless of whether the field is empty or not. This may be
876	// used to include empty fields in Patch requests.
877	ForceSendFields []string `json:"-"`
878
879	// NullFields is a list of field names (e.g. "AdTag") to include in API
880	// requests with the JSON null value. By default, fields with empty
881	// values are omitted from API requests. However, any field with an
882	// empty value appearing in NullFields will be sent to the server as
883	// null. It is an error if a field in this list has a non-empty value.
884	// This may be used to include null fields in Patch requests.
885	NullFields []string `json:"-"`
886}
887
888func (s *ActivityContentDetailsPromotedItem) MarshalJSON() ([]byte, error) {
889	type NoMethod ActivityContentDetailsPromotedItem
890	raw := NoMethod(*s)
891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
892}
893
894// ActivityContentDetailsRecommendation: Information that identifies the
895// recommended resource.
896type ActivityContentDetailsRecommendation struct {
897	// Reason: The reason that the resource is recommended to the user.
898	//
899	// Possible values:
900	//   "unspecified"
901	//   "videoFavorited"
902	//   "videoLiked"
903	//   "videoWatched"
904	Reason string `json:"reason,omitempty"`
905
906	// ResourceId: The resourceId object contains information that
907	// identifies the recommended resource.
908	ResourceId *ResourceId `json:"resourceId,omitempty"`
909
910	// SeedResourceId: The seedResourceId object contains information about
911	// the resource that caused the recommendation.
912	SeedResourceId *ResourceId `json:"seedResourceId,omitempty"`
913
914	// ForceSendFields is a list of field names (e.g. "Reason") to
915	// unconditionally include in API requests. By default, fields with
916	// empty values are omitted from API requests. However, any non-pointer,
917	// non-interface field appearing in ForceSendFields will be sent to the
918	// server regardless of whether the field is empty or not. This may be
919	// used to include empty fields in Patch requests.
920	ForceSendFields []string `json:"-"`
921
922	// NullFields is a list of field names (e.g. "Reason") to include in API
923	// requests with the JSON null value. By default, fields with empty
924	// values are omitted from API requests. However, any field with an
925	// empty value appearing in NullFields will be sent to the server as
926	// null. It is an error if a field in this list has a non-empty value.
927	// This may be used to include null fields in Patch requests.
928	NullFields []string `json:"-"`
929}
930
931func (s *ActivityContentDetailsRecommendation) MarshalJSON() ([]byte, error) {
932	type NoMethod ActivityContentDetailsRecommendation
933	raw := NoMethod(*s)
934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
935}
936
937// ActivityContentDetailsSocial: Details about a social network post.
938type ActivityContentDetailsSocial struct {
939	// Author: The author of the social network post.
940	Author string `json:"author,omitempty"`
941
942	// ImageUrl: An image of the post's author.
943	ImageUrl string `json:"imageUrl,omitempty"`
944
945	// ReferenceUrl: The URL of the social network post.
946	ReferenceUrl string `json:"referenceUrl,omitempty"`
947
948	// ResourceId: The resourceId object encapsulates information that
949	// identifies the resource associated with a social network post.
950	ResourceId *ResourceId `json:"resourceId,omitempty"`
951
952	// Type: The name of the social network.
953	//
954	// Possible values:
955	//   "facebook"
956	//   "googlePlus"
957	//   "twitter"
958	//   "unspecified"
959	Type string `json:"type,omitempty"`
960
961	// ForceSendFields is a list of field names (e.g. "Author") to
962	// unconditionally include in API requests. By default, fields with
963	// empty values are omitted from API requests. However, any non-pointer,
964	// non-interface field appearing in ForceSendFields will be sent to the
965	// server regardless of whether the field is empty or not. This may be
966	// used to include empty fields in Patch requests.
967	ForceSendFields []string `json:"-"`
968
969	// NullFields is a list of field names (e.g. "Author") to include in API
970	// requests with the JSON null value. By default, fields with empty
971	// values are omitted from API requests. However, any field with an
972	// empty value appearing in NullFields will be sent to the server as
973	// null. It is an error if a field in this list has a non-empty value.
974	// This may be used to include null fields in Patch requests.
975	NullFields []string `json:"-"`
976}
977
978func (s *ActivityContentDetailsSocial) MarshalJSON() ([]byte, error) {
979	type NoMethod ActivityContentDetailsSocial
980	raw := NoMethod(*s)
981	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
982}
983
984// ActivityContentDetailsSubscription: Information about a channel that
985// a user subscribed to.
986type ActivityContentDetailsSubscription struct {
987	// ResourceId: The resourceId object contains information that
988	// identifies the resource that the user subscribed to.
989	ResourceId *ResourceId `json:"resourceId,omitempty"`
990
991	// ForceSendFields is a list of field names (e.g. "ResourceId") to
992	// unconditionally include in API requests. By default, fields with
993	// empty values are omitted from API requests. However, any non-pointer,
994	// non-interface field appearing in ForceSendFields will be sent to the
995	// server regardless of whether the field is empty or not. This may be
996	// used to include empty fields in Patch requests.
997	ForceSendFields []string `json:"-"`
998
999	// NullFields is a list of field names (e.g. "ResourceId") to include in
1000	// API requests with the JSON null value. By default, fields with empty
1001	// values are omitted from API requests. However, any field with an
1002	// empty value appearing in NullFields will be sent to the server as
1003	// null. It is an error if a field in this list has a non-empty value.
1004	// This may be used to include null fields in Patch requests.
1005	NullFields []string `json:"-"`
1006}
1007
1008func (s *ActivityContentDetailsSubscription) MarshalJSON() ([]byte, error) {
1009	type NoMethod ActivityContentDetailsSubscription
1010	raw := NoMethod(*s)
1011	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1012}
1013
1014// ActivityContentDetailsUpload: Information about the uploaded video.
1015type ActivityContentDetailsUpload struct {
1016	// VideoId: The ID that YouTube uses to uniquely identify the uploaded
1017	// video.
1018	VideoId string `json:"videoId,omitempty"`
1019
1020	// ForceSendFields is a list of field names (e.g. "VideoId") to
1021	// unconditionally include in API requests. By default, fields with
1022	// empty values are omitted from API requests. However, any non-pointer,
1023	// non-interface field appearing in ForceSendFields will be sent to the
1024	// server regardless of whether the field is empty or not. This may be
1025	// used to include empty fields in Patch requests.
1026	ForceSendFields []string `json:"-"`
1027
1028	// NullFields is a list of field names (e.g. "VideoId") to include in
1029	// API requests with the JSON null value. By default, fields with empty
1030	// values are omitted from API requests. However, any field with an
1031	// empty value appearing in NullFields will be sent to the server as
1032	// null. It is an error if a field in this list has a non-empty value.
1033	// This may be used to include null fields in Patch requests.
1034	NullFields []string `json:"-"`
1035}
1036
1037func (s *ActivityContentDetailsUpload) MarshalJSON() ([]byte, error) {
1038	type NoMethod ActivityContentDetailsUpload
1039	raw := NoMethod(*s)
1040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1041}
1042
1043type ActivityListResponse struct {
1044	// Etag: Etag of this resource.
1045	Etag string `json:"etag,omitempty"`
1046
1047	// EventId: Serialized EventId of the request which produced this
1048	// response.
1049	EventId string `json:"eventId,omitempty"`
1050
1051	// Items: A list of activities, or events, that match the request
1052	// criteria.
1053	Items []*Activity `json:"items,omitempty"`
1054
1055	// Kind: Identifies what kind of resource this is. Value: the fixed
1056	// string "youtube#activityListResponse".
1057	Kind string `json:"kind,omitempty"`
1058
1059	// NextPageToken: The token that can be used as the value of the
1060	// pageToken parameter to retrieve the next page in the result set.
1061	NextPageToken string `json:"nextPageToken,omitempty"`
1062
1063	PageInfo *PageInfo `json:"pageInfo,omitempty"`
1064
1065	// PrevPageToken: The token that can be used as the value of the
1066	// pageToken parameter to retrieve the previous page in the result set.
1067	PrevPageToken string `json:"prevPageToken,omitempty"`
1068
1069	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
1070
1071	// VisitorId: The visitorId identifies the visitor.
1072	VisitorId string `json:"visitorId,omitempty"`
1073
1074	// ServerResponse contains the HTTP response code and headers from the
1075	// server.
1076	googleapi.ServerResponse `json:"-"`
1077
1078	// ForceSendFields is a list of field names (e.g. "Etag") to
1079	// unconditionally include in API requests. By default, fields with
1080	// empty values are omitted from API requests. However, any non-pointer,
1081	// non-interface field appearing in ForceSendFields will be sent to the
1082	// server regardless of whether the field is empty or not. This may be
1083	// used to include empty fields in Patch requests.
1084	ForceSendFields []string `json:"-"`
1085
1086	// NullFields is a list of field names (e.g. "Etag") to include in API
1087	// requests with the JSON null value. By default, fields with empty
1088	// values are omitted from API requests. However, any field with an
1089	// empty value appearing in NullFields will be sent to the server as
1090	// null. It is an error if a field in this list has a non-empty value.
1091	// This may be used to include null fields in Patch requests.
1092	NullFields []string `json:"-"`
1093}
1094
1095func (s *ActivityListResponse) MarshalJSON() ([]byte, error) {
1096	type NoMethod ActivityListResponse
1097	raw := NoMethod(*s)
1098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1099}
1100
1101// ActivitySnippet: Basic details about an activity, including title,
1102// description, thumbnails, activity type and group.
1103type ActivitySnippet struct {
1104	// ChannelId: The ID that YouTube uses to uniquely identify the channel
1105	// associated with the activity.
1106	ChannelId string `json:"channelId,omitempty"`
1107
1108	// ChannelTitle: Channel title for the channel responsible for this
1109	// activity
1110	ChannelTitle string `json:"channelTitle,omitempty"`
1111
1112	// Description: The description of the resource primarily associated
1113	// with the activity.
1114	Description string `json:"description,omitempty"`
1115
1116	// GroupId: The group ID associated with the activity. A group ID
1117	// identifies user events that are associated with the same user and
1118	// resource. For example, if a user rates a video and marks the same
1119	// video as a favorite, the entries for those events would have the same
1120	// group ID in the user's activity feed. In your user interface, you can
1121	// avoid repetition by grouping events with the same groupId value.
1122	GroupId string `json:"groupId,omitempty"`
1123
1124	// PublishedAt: The date and time that the video was uploaded. The value
1125	// is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
1126	PublishedAt string `json:"publishedAt,omitempty"`
1127
1128	// Thumbnails: A map of thumbnail images associated with the resource
1129	// that is primarily associated with the activity. For each object in
1130	// the map, the key is the name of the thumbnail image, and the value is
1131	// an object that contains other information about the thumbnail.
1132	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
1133
1134	// Title: The title of the resource primarily associated with the
1135	// activity.
1136	Title string `json:"title,omitempty"`
1137
1138	// Type: The type of activity that the resource describes.
1139	//
1140	// Possible values:
1141	//   "bulletin"
1142	//   "channelItem"
1143	//   "comment"
1144	//   "favorite"
1145	//   "like"
1146	//   "playlistItem"
1147	//   "promotedItem"
1148	//   "recommendation"
1149	//   "social"
1150	//   "subscription"
1151	//   "upload"
1152	Type string `json:"type,omitempty"`
1153
1154	// ForceSendFields is a list of field names (e.g. "ChannelId") to
1155	// unconditionally include in API requests. By default, fields with
1156	// empty values are omitted from API requests. However, any non-pointer,
1157	// non-interface field appearing in ForceSendFields will be sent to the
1158	// server regardless of whether the field is empty or not. This may be
1159	// used to include empty fields in Patch requests.
1160	ForceSendFields []string `json:"-"`
1161
1162	// NullFields is a list of field names (e.g. "ChannelId") to include in
1163	// API requests with the JSON null value. By default, fields with empty
1164	// values are omitted from API requests. However, any field with an
1165	// empty value appearing in NullFields will be sent to the server as
1166	// null. It is an error if a field in this list has a non-empty value.
1167	// This may be used to include null fields in Patch requests.
1168	NullFields []string `json:"-"`
1169}
1170
1171func (s *ActivitySnippet) MarshalJSON() ([]byte, error) {
1172	type NoMethod ActivitySnippet
1173	raw := NoMethod(*s)
1174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1175}
1176
1177// Caption: A caption resource represents a YouTube caption track. A
1178// caption track is associated with exactly one YouTube video.
1179type Caption struct {
1180	// Etag: Etag of this resource.
1181	Etag string `json:"etag,omitempty"`
1182
1183	// Id: The ID that YouTube uses to uniquely identify the caption track.
1184	Id string `json:"id,omitempty"`
1185
1186	// Kind: Identifies what kind of resource this is. Value: the fixed
1187	// string "youtube#caption".
1188	Kind string `json:"kind,omitempty"`
1189
1190	// Snippet: The snippet object contains basic details about the caption.
1191	Snippet *CaptionSnippet `json:"snippet,omitempty"`
1192
1193	// ServerResponse contains the HTTP response code and headers from the
1194	// server.
1195	googleapi.ServerResponse `json:"-"`
1196
1197	// ForceSendFields is a list of field names (e.g. "Etag") to
1198	// unconditionally include in API requests. By default, fields with
1199	// empty values are omitted from API requests. However, any non-pointer,
1200	// non-interface field appearing in ForceSendFields will be sent to the
1201	// server regardless of whether the field is empty or not. This may be
1202	// used to include empty fields in Patch requests.
1203	ForceSendFields []string `json:"-"`
1204
1205	// NullFields is a list of field names (e.g. "Etag") to include in API
1206	// requests with the JSON null value. By default, fields with empty
1207	// values are omitted from API requests. However, any field with an
1208	// empty value appearing in NullFields will be sent to the server as
1209	// null. It is an error if a field in this list has a non-empty value.
1210	// This may be used to include null fields in Patch requests.
1211	NullFields []string `json:"-"`
1212}
1213
1214func (s *Caption) MarshalJSON() ([]byte, error) {
1215	type NoMethod Caption
1216	raw := NoMethod(*s)
1217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1218}
1219
1220type CaptionListResponse struct {
1221	// Etag: Etag of this resource.
1222	Etag string `json:"etag,omitempty"`
1223
1224	// EventId: Serialized EventId of the request which produced this
1225	// response.
1226	EventId string `json:"eventId,omitempty"`
1227
1228	// Items: A list of captions that match the request criteria.
1229	Items []*Caption `json:"items,omitempty"`
1230
1231	// Kind: Identifies what kind of resource this is. Value: the fixed
1232	// string "youtube#captionListResponse".
1233	Kind string `json:"kind,omitempty"`
1234
1235	// VisitorId: The visitorId identifies the visitor.
1236	VisitorId string `json:"visitorId,omitempty"`
1237
1238	// ServerResponse contains the HTTP response code and headers from the
1239	// server.
1240	googleapi.ServerResponse `json:"-"`
1241
1242	// ForceSendFields is a list of field names (e.g. "Etag") to
1243	// unconditionally include in API requests. By default, fields with
1244	// empty values are omitted from API requests. However, any non-pointer,
1245	// non-interface field appearing in ForceSendFields will be sent to the
1246	// server regardless of whether the field is empty or not. This may be
1247	// used to include empty fields in Patch requests.
1248	ForceSendFields []string `json:"-"`
1249
1250	// NullFields is a list of field names (e.g. "Etag") to include in API
1251	// requests with the JSON null value. By default, fields with empty
1252	// values are omitted from API requests. However, any field with an
1253	// empty value appearing in NullFields will be sent to the server as
1254	// null. It is an error if a field in this list has a non-empty value.
1255	// This may be used to include null fields in Patch requests.
1256	NullFields []string `json:"-"`
1257}
1258
1259func (s *CaptionListResponse) MarshalJSON() ([]byte, error) {
1260	type NoMethod CaptionListResponse
1261	raw := NoMethod(*s)
1262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1263}
1264
1265// CaptionSnippet: Basic details about a caption track, such as its
1266// language and name.
1267type CaptionSnippet struct {
1268	// AudioTrackType: The type of audio track associated with the caption
1269	// track.
1270	//
1271	// Possible values:
1272	//   "commentary"
1273	//   "descriptive"
1274	//   "primary"
1275	//   "unknown"
1276	AudioTrackType string `json:"audioTrackType,omitempty"`
1277
1278	// FailureReason: The reason that YouTube failed to process the caption
1279	// track. This property is only present if the state property's value is
1280	// failed.
1281	//
1282	// Possible values:
1283	//   "processingFailed"
1284	//   "unknownFormat"
1285	//   "unsupportedFormat"
1286	FailureReason string `json:"failureReason,omitempty"`
1287
1288	// IsAutoSynced: Indicates whether YouTube synchronized the caption
1289	// track to the audio track in the video. The value will be true if a
1290	// sync was explicitly requested when the caption track was uploaded.
1291	// For example, when calling the captions.insert or captions.update
1292	// methods, you can set the sync parameter to true to instruct YouTube
1293	// to sync the uploaded track to the video. If the value is false,
1294	// YouTube uses the time codes in the uploaded caption track to
1295	// determine when to display captions.
1296	IsAutoSynced bool `json:"isAutoSynced,omitempty"`
1297
1298	// IsCC: Indicates whether the track contains closed captions for the
1299	// deaf and hard of hearing. The default value is false.
1300	IsCC bool `json:"isCC,omitempty"`
1301
1302	// IsDraft: Indicates whether the caption track is a draft. If the value
1303	// is true, then the track is not publicly visible. The default value is
1304	// false.
1305	IsDraft bool `json:"isDraft,omitempty"`
1306
1307	// IsEasyReader: Indicates whether caption track is formatted for "easy
1308	// reader," meaning it is at a third-grade level for language learners.
1309	// The default value is false.
1310	IsEasyReader bool `json:"isEasyReader,omitempty"`
1311
1312	// IsLarge: Indicates whether the caption track uses large text for the
1313	// vision-impaired. The default value is false.
1314	IsLarge bool `json:"isLarge,omitempty"`
1315
1316	// Language: The language of the caption track. The property value is a
1317	// BCP-47 language tag.
1318	Language string `json:"language,omitempty"`
1319
1320	// LastUpdated: The date and time when the caption track was last
1321	// updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
1322	// format.
1323	LastUpdated string `json:"lastUpdated,omitempty"`
1324
1325	// Name: The name of the caption track. The name is intended to be
1326	// visible to the user as an option during playback.
1327	Name string `json:"name,omitempty"`
1328
1329	// Status: The caption track's status.
1330	//
1331	// Possible values:
1332	//   "failed"
1333	//   "serving"
1334	//   "syncing"
1335	Status string `json:"status,omitempty"`
1336
1337	// TrackKind: The caption track's type.
1338	//
1339	// Possible values:
1340	//   "ASR"
1341	//   "forced"
1342	//   "standard"
1343	TrackKind string `json:"trackKind,omitempty"`
1344
1345	// VideoId: The ID that YouTube uses to uniquely identify the video
1346	// associated with the caption track.
1347	VideoId string `json:"videoId,omitempty"`
1348
1349	// ForceSendFields is a list of field names (e.g. "AudioTrackType") to
1350	// unconditionally include in API requests. By default, fields with
1351	// empty values are omitted from API requests. However, any non-pointer,
1352	// non-interface field appearing in ForceSendFields will be sent to the
1353	// server regardless of whether the field is empty or not. This may be
1354	// used to include empty fields in Patch requests.
1355	ForceSendFields []string `json:"-"`
1356
1357	// NullFields is a list of field names (e.g. "AudioTrackType") to
1358	// include in API requests with the JSON null value. By default, fields
1359	// with empty values are omitted from API requests. However, any field
1360	// with an empty value appearing in NullFields will be sent to the
1361	// server as null. It is an error if a field in this list has a
1362	// non-empty value. This may be used to include null fields in Patch
1363	// requests.
1364	NullFields []string `json:"-"`
1365}
1366
1367func (s *CaptionSnippet) MarshalJSON() ([]byte, error) {
1368	type NoMethod CaptionSnippet
1369	raw := NoMethod(*s)
1370	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1371}
1372
1373// CdnSettings: Brief description of the live stream cdn settings.
1374type CdnSettings struct {
1375	// Format: The format of the video stream that you are sending to
1376	// Youtube.
1377	Format string `json:"format,omitempty"`
1378
1379	// FrameRate: The frame rate of the inbound video data.
1380	//
1381	// Possible values:
1382	//   "30fps"
1383	//   "60fps"
1384	//   "variable"
1385	FrameRate string `json:"frameRate,omitempty"`
1386
1387	// IngestionInfo: The ingestionInfo object contains information that
1388	// YouTube provides that you need to transmit your RTMP or HTTP stream
1389	// to YouTube.
1390	IngestionInfo *IngestionInfo `json:"ingestionInfo,omitempty"`
1391
1392	// IngestionType: The method or protocol used to transmit the video
1393	// stream.
1394	//
1395	// Possible values:
1396	//   "dash"
1397	//   "hls"
1398	//   "rtmp"
1399	IngestionType string `json:"ingestionType,omitempty"`
1400
1401	// Resolution: The resolution of the inbound video data.
1402	//
1403	// Possible values:
1404	//   "1080p"
1405	//   "1440p"
1406	//   "2160p"
1407	//   "240p"
1408	//   "360p"
1409	//   "480p"
1410	//   "720p"
1411	//   "variable"
1412	Resolution string `json:"resolution,omitempty"`
1413
1414	// ForceSendFields is a list of field names (e.g. "Format") to
1415	// unconditionally include in API requests. By default, fields with
1416	// empty values are omitted from API requests. However, any non-pointer,
1417	// non-interface field appearing in ForceSendFields will be sent to the
1418	// server regardless of whether the field is empty or not. This may be
1419	// used to include empty fields in Patch requests.
1420	ForceSendFields []string `json:"-"`
1421
1422	// NullFields is a list of field names (e.g. "Format") to include in API
1423	// requests with the JSON null value. By default, fields with empty
1424	// values are omitted from API requests. However, any field with an
1425	// empty value appearing in NullFields will be sent to the server as
1426	// null. It is an error if a field in this list has a non-empty value.
1427	// This may be used to include null fields in Patch requests.
1428	NullFields []string `json:"-"`
1429}
1430
1431func (s *CdnSettings) MarshalJSON() ([]byte, error) {
1432	type NoMethod CdnSettings
1433	raw := NoMethod(*s)
1434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1435}
1436
1437// Channel: A channel resource contains information about a YouTube
1438// channel.
1439type Channel struct {
1440	// AuditDetails: The auditionDetails object encapsulates channel data
1441	// that is relevant for YouTube Partners during the audition process.
1442	AuditDetails *ChannelAuditDetails `json:"auditDetails,omitempty"`
1443
1444	// BrandingSettings: The brandingSettings object encapsulates
1445	// information about the branding of the channel.
1446	BrandingSettings *ChannelBrandingSettings `json:"brandingSettings,omitempty"`
1447
1448	// ContentDetails: The contentDetails object encapsulates information
1449	// about the channel's content.
1450	ContentDetails *ChannelContentDetails `json:"contentDetails,omitempty"`
1451
1452	// ContentOwnerDetails: The contentOwnerDetails object encapsulates
1453	// channel data that is relevant for YouTube Partners linked with the
1454	// channel.
1455	ContentOwnerDetails *ChannelContentOwnerDetails `json:"contentOwnerDetails,omitempty"`
1456
1457	// ConversionPings: The conversionPings object encapsulates information
1458	// about conversion pings that need to be respected by the channel.
1459	ConversionPings *ChannelConversionPings `json:"conversionPings,omitempty"`
1460
1461	// Etag: Etag of this resource.
1462	Etag string `json:"etag,omitempty"`
1463
1464	// Id: The ID that YouTube uses to uniquely identify the channel.
1465	Id string `json:"id,omitempty"`
1466
1467	// InvideoPromotion: The invideoPromotion object encapsulates
1468	// information about promotion campaign associated with the channel.
1469	InvideoPromotion *InvideoPromotion `json:"invideoPromotion,omitempty"`
1470
1471	// Kind: Identifies what kind of resource this is. Value: the fixed
1472	// string "youtube#channel".
1473	Kind string `json:"kind,omitempty"`
1474
1475	// Localizations: Localizations for different languages
1476	Localizations map[string]ChannelLocalization `json:"localizations,omitempty"`
1477
1478	// Snippet: The snippet object contains basic details about the channel,
1479	// such as its title, description, and thumbnail images.
1480	Snippet *ChannelSnippet `json:"snippet,omitempty"`
1481
1482	// Statistics: The statistics object encapsulates statistics for the
1483	// channel.
1484	Statistics *ChannelStatistics `json:"statistics,omitempty"`
1485
1486	// Status: The status object encapsulates information about the privacy
1487	// status of the channel.
1488	Status *ChannelStatus `json:"status,omitempty"`
1489
1490	// TopicDetails: The topicDetails object encapsulates information about
1491	// Freebase topics associated with the channel.
1492	TopicDetails *ChannelTopicDetails `json:"topicDetails,omitempty"`
1493
1494	// ServerResponse contains the HTTP response code and headers from the
1495	// server.
1496	googleapi.ServerResponse `json:"-"`
1497
1498	// ForceSendFields is a list of field names (e.g. "AuditDetails") to
1499	// unconditionally include in API requests. By default, fields with
1500	// empty values are omitted from API requests. However, any non-pointer,
1501	// non-interface field appearing in ForceSendFields will be sent to the
1502	// server regardless of whether the field is empty or not. This may be
1503	// used to include empty fields in Patch requests.
1504	ForceSendFields []string `json:"-"`
1505
1506	// NullFields is a list of field names (e.g. "AuditDetails") to include
1507	// in API requests with the JSON null value. By default, fields with
1508	// empty values are omitted from API requests. However, any field with
1509	// an empty value appearing in NullFields will be sent to the server as
1510	// null. It is an error if a field in this list has a non-empty value.
1511	// This may be used to include null fields in Patch requests.
1512	NullFields []string `json:"-"`
1513}
1514
1515func (s *Channel) MarshalJSON() ([]byte, error) {
1516	type NoMethod Channel
1517	raw := NoMethod(*s)
1518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1519}
1520
1521// ChannelAuditDetails: The auditDetails object encapsulates channel
1522// data that is relevant for YouTube Partners during the audit process.
1523type ChannelAuditDetails struct {
1524	// CommunityGuidelinesGoodStanding: Whether or not the channel respects
1525	// the community guidelines.
1526	CommunityGuidelinesGoodStanding bool `json:"communityGuidelinesGoodStanding,omitempty"`
1527
1528	// ContentIdClaimsGoodStanding: Whether or not the channel has any
1529	// unresolved claims.
1530	ContentIdClaimsGoodStanding bool `json:"contentIdClaimsGoodStanding,omitempty"`
1531
1532	// CopyrightStrikesGoodStanding: Whether or not the channel has any
1533	// copyright strikes.
1534	CopyrightStrikesGoodStanding bool `json:"copyrightStrikesGoodStanding,omitempty"`
1535
1536	// ForceSendFields is a list of field names (e.g.
1537	// "CommunityGuidelinesGoodStanding") to unconditionally include in API
1538	// requests. By default, fields with empty values are omitted from API
1539	// requests. However, any non-pointer, non-interface field appearing in
1540	// ForceSendFields will be sent to the server regardless of whether the
1541	// field is empty or not. This may be used to include empty fields in
1542	// Patch requests.
1543	ForceSendFields []string `json:"-"`
1544
1545	// NullFields is a list of field names (e.g.
1546	// "CommunityGuidelinesGoodStanding") to include in API requests with
1547	// the JSON null value. By default, fields with empty values are omitted
1548	// from API requests. However, any field with an empty value appearing
1549	// in NullFields will be sent to the server as null. It is an error if a
1550	// field in this list has a non-empty value. This may be used to include
1551	// null fields in Patch requests.
1552	NullFields []string `json:"-"`
1553}
1554
1555func (s *ChannelAuditDetails) MarshalJSON() ([]byte, error) {
1556	type NoMethod ChannelAuditDetails
1557	raw := NoMethod(*s)
1558	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1559}
1560
1561// ChannelBannerResource: A channel banner returned as the response to a
1562// channel_banner.insert call.
1563type ChannelBannerResource struct {
1564	// Etag: Etag of this resource.
1565	Etag string `json:"etag,omitempty"`
1566
1567	// Kind: Identifies what kind of resource this is. Value: the fixed
1568	// string "youtube#channelBannerResource".
1569	Kind string `json:"kind,omitempty"`
1570
1571	// Url: The URL of this banner image.
1572	Url string `json:"url,omitempty"`
1573
1574	// ServerResponse contains the HTTP response code and headers from the
1575	// server.
1576	googleapi.ServerResponse `json:"-"`
1577
1578	// ForceSendFields is a list of field names (e.g. "Etag") to
1579	// unconditionally include in API requests. By default, fields with
1580	// empty values are omitted from API requests. However, any non-pointer,
1581	// non-interface field appearing in ForceSendFields will be sent to the
1582	// server regardless of whether the field is empty or not. This may be
1583	// used to include empty fields in Patch requests.
1584	ForceSendFields []string `json:"-"`
1585
1586	// NullFields is a list of field names (e.g. "Etag") to include in API
1587	// requests with the JSON null value. By default, fields with empty
1588	// values are omitted from API requests. However, any field with an
1589	// empty value appearing in NullFields will be sent to the server as
1590	// null. It is an error if a field in this list has a non-empty value.
1591	// This may be used to include null fields in Patch requests.
1592	NullFields []string `json:"-"`
1593}
1594
1595func (s *ChannelBannerResource) MarshalJSON() ([]byte, error) {
1596	type NoMethod ChannelBannerResource
1597	raw := NoMethod(*s)
1598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1599}
1600
1601// ChannelBrandingSettings: Branding properties of a YouTube channel.
1602type ChannelBrandingSettings struct {
1603	// Channel: Branding properties for the channel view.
1604	Channel *ChannelSettings `json:"channel,omitempty"`
1605
1606	// Hints: Additional experimental branding properties.
1607	Hints []*PropertyValue `json:"hints,omitempty"`
1608
1609	// Image: Branding properties for branding images.
1610	Image *ImageSettings `json:"image,omitempty"`
1611
1612	// Watch: Branding properties for the watch page.
1613	Watch *WatchSettings `json:"watch,omitempty"`
1614
1615	// ForceSendFields is a list of field names (e.g. "Channel") to
1616	// unconditionally include in API requests. By default, fields with
1617	// empty values are omitted from API requests. However, any non-pointer,
1618	// non-interface field appearing in ForceSendFields will be sent to the
1619	// server regardless of whether the field is empty or not. This may be
1620	// used to include empty fields in Patch requests.
1621	ForceSendFields []string `json:"-"`
1622
1623	// NullFields is a list of field names (e.g. "Channel") to include in
1624	// API requests with the JSON null value. By default, fields with empty
1625	// values are omitted from API requests. However, any field with an
1626	// empty value appearing in NullFields will be sent to the server as
1627	// null. It is an error if a field in this list has a non-empty value.
1628	// This may be used to include null fields in Patch requests.
1629	NullFields []string `json:"-"`
1630}
1631
1632func (s *ChannelBrandingSettings) MarshalJSON() ([]byte, error) {
1633	type NoMethod ChannelBrandingSettings
1634	raw := NoMethod(*s)
1635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1636}
1637
1638// ChannelContentDetails: Details about the content of a channel.
1639type ChannelContentDetails struct {
1640	RelatedPlaylists *ChannelContentDetailsRelatedPlaylists `json:"relatedPlaylists,omitempty"`
1641
1642	// ForceSendFields is a list of field names (e.g. "RelatedPlaylists") to
1643	// unconditionally include in API requests. By default, fields with
1644	// empty values are omitted from API requests. However, any non-pointer,
1645	// non-interface field appearing in ForceSendFields will be sent to the
1646	// server regardless of whether the field is empty or not. This may be
1647	// used to include empty fields in Patch requests.
1648	ForceSendFields []string `json:"-"`
1649
1650	// NullFields is a list of field names (e.g. "RelatedPlaylists") to
1651	// include in API requests with the JSON null value. By default, fields
1652	// with empty values are omitted from API requests. However, any field
1653	// with an empty value appearing in NullFields will be sent to the
1654	// server as null. It is an error if a field in this list has a
1655	// non-empty value. This may be used to include null fields in Patch
1656	// requests.
1657	NullFields []string `json:"-"`
1658}
1659
1660func (s *ChannelContentDetails) MarshalJSON() ([]byte, error) {
1661	type NoMethod ChannelContentDetails
1662	raw := NoMethod(*s)
1663	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1664}
1665
1666type ChannelContentDetailsRelatedPlaylists struct {
1667	// Favorites: The ID of the playlist that contains the channel"s
1668	// favorite videos. Use the  playlistItems.insert and
1669	// playlistItems.delete to add or remove items from that list.
1670	Favorites string `json:"favorites,omitempty"`
1671
1672	// Likes: The ID of the playlist that contains the channel"s liked
1673	// videos. Use the   playlistItems.insert and  playlistItems.delete to
1674	// add or remove items from that list.
1675	Likes string `json:"likes,omitempty"`
1676
1677	// Uploads: The ID of the playlist that contains the channel"s uploaded
1678	// videos. Use the  videos.insert method to upload new videos and the
1679	// videos.delete method to delete previously uploaded videos.
1680	Uploads string `json:"uploads,omitempty"`
1681
1682	// WatchHistory: The ID of the playlist that contains the channel"s
1683	// watch history. Use the  playlistItems.insert and
1684	// playlistItems.delete to add or remove items from that list.
1685	WatchHistory string `json:"watchHistory,omitempty"`
1686
1687	// WatchLater: The ID of the playlist that contains the channel"s watch
1688	// later playlist. Use the playlistItems.insert and
1689	// playlistItems.delete to add or remove items from that list.
1690	WatchLater string `json:"watchLater,omitempty"`
1691
1692	// ForceSendFields is a list of field names (e.g. "Favorites") to
1693	// unconditionally include in API requests. By default, fields with
1694	// empty values are omitted from API requests. However, any non-pointer,
1695	// non-interface field appearing in ForceSendFields will be sent to the
1696	// server regardless of whether the field is empty or not. This may be
1697	// used to include empty fields in Patch requests.
1698	ForceSendFields []string `json:"-"`
1699
1700	// NullFields is a list of field names (e.g. "Favorites") to include in
1701	// API requests with the JSON null value. By default, fields with empty
1702	// values are omitted from API requests. However, any field with an
1703	// empty value appearing in NullFields will be sent to the server as
1704	// null. It is an error if a field in this list has a non-empty value.
1705	// This may be used to include null fields in Patch requests.
1706	NullFields []string `json:"-"`
1707}
1708
1709func (s *ChannelContentDetailsRelatedPlaylists) MarshalJSON() ([]byte, error) {
1710	type NoMethod ChannelContentDetailsRelatedPlaylists
1711	raw := NoMethod(*s)
1712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1713}
1714
1715// ChannelContentOwnerDetails: The contentOwnerDetails object
1716// encapsulates channel data that is relevant for YouTube Partners
1717// linked with the channel.
1718type ChannelContentOwnerDetails struct {
1719	// ContentOwner: The ID of the content owner linked to the channel.
1720	ContentOwner string `json:"contentOwner,omitempty"`
1721
1722	// TimeLinked: The date and time of when the channel was linked to the
1723	// content owner. The value is specified in ISO 8601
1724	// (YYYY-MM-DDThh:mm:ss.sZ) format.
1725	TimeLinked string `json:"timeLinked,omitempty"`
1726
1727	// ForceSendFields is a list of field names (e.g. "ContentOwner") to
1728	// unconditionally include in API requests. By default, fields with
1729	// empty values are omitted from API requests. However, any non-pointer,
1730	// non-interface field appearing in ForceSendFields will be sent to the
1731	// server regardless of whether the field is empty or not. This may be
1732	// used to include empty fields in Patch requests.
1733	ForceSendFields []string `json:"-"`
1734
1735	// NullFields is a list of field names (e.g. "ContentOwner") to include
1736	// in API requests with the JSON null value. By default, fields with
1737	// empty values are omitted from API requests. However, any field with
1738	// an empty value appearing in NullFields will be sent to the server as
1739	// null. It is an error if a field in this list has a non-empty value.
1740	// This may be used to include null fields in Patch requests.
1741	NullFields []string `json:"-"`
1742}
1743
1744func (s *ChannelContentOwnerDetails) MarshalJSON() ([]byte, error) {
1745	type NoMethod ChannelContentOwnerDetails
1746	raw := NoMethod(*s)
1747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1748}
1749
1750// ChannelConversionPing: Pings that the app shall fire (authenticated
1751// by biscotti cookie). Each ping has a context, in which the app must
1752// fire the ping, and a url identifying the ping.
1753type ChannelConversionPing struct {
1754	// Context: Defines the context of the ping.
1755	//
1756	// Possible values:
1757	//   "cview"
1758	//   "subscribe"
1759	//   "unsubscribe"
1760	Context string `json:"context,omitempty"`
1761
1762	// ConversionUrl: The url (without the schema) that the player shall
1763	// send the ping to. It's at caller's descretion to decide which schema
1764	// to use (http vs https) Example of a returned url:
1765	// //googleads.g.doubleclick.net/pagead/
1766	// viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D
1767	// cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must
1768	// append biscotti authentication (ms param in case of mobile, for
1769	// example) to this ping.
1770	ConversionUrl string `json:"conversionUrl,omitempty"`
1771
1772	// ForceSendFields is a list of field names (e.g. "Context") to
1773	// unconditionally include in API requests. By default, fields with
1774	// empty values are omitted from API requests. However, any non-pointer,
1775	// non-interface field appearing in ForceSendFields will be sent to the
1776	// server regardless of whether the field is empty or not. This may be
1777	// used to include empty fields in Patch requests.
1778	ForceSendFields []string `json:"-"`
1779
1780	// NullFields is a list of field names (e.g. "Context") to include in
1781	// API requests with the JSON null value. By default, fields with empty
1782	// values are omitted from API requests. However, any field with an
1783	// empty value appearing in NullFields will be sent to the server as
1784	// null. It is an error if a field in this list has a non-empty value.
1785	// This may be used to include null fields in Patch requests.
1786	NullFields []string `json:"-"`
1787}
1788
1789func (s *ChannelConversionPing) MarshalJSON() ([]byte, error) {
1790	type NoMethod ChannelConversionPing
1791	raw := NoMethod(*s)
1792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1793}
1794
1795// ChannelConversionPings: The conversionPings object encapsulates
1796// information about conversion pings that need to be respected by the
1797// channel.
1798type ChannelConversionPings struct {
1799	// Pings: Pings that the app shall fire (authenticated by biscotti
1800	// cookie). Each ping has a context, in which the app must fire the
1801	// ping, and a url identifying the ping.
1802	Pings []*ChannelConversionPing `json:"pings,omitempty"`
1803
1804	// ForceSendFields is a list of field names (e.g. "Pings") to
1805	// unconditionally include in API requests. By default, fields with
1806	// empty values are omitted from API requests. However, any non-pointer,
1807	// non-interface field appearing in ForceSendFields will be sent to the
1808	// server regardless of whether the field is empty or not. This may be
1809	// used to include empty fields in Patch requests.
1810	ForceSendFields []string `json:"-"`
1811
1812	// NullFields is a list of field names (e.g. "Pings") to include in API
1813	// requests with the JSON null value. By default, fields with empty
1814	// values are omitted from API requests. However, any field with an
1815	// empty value appearing in NullFields will be sent to the server as
1816	// null. It is an error if a field in this list has a non-empty value.
1817	// This may be used to include null fields in Patch requests.
1818	NullFields []string `json:"-"`
1819}
1820
1821func (s *ChannelConversionPings) MarshalJSON() ([]byte, error) {
1822	type NoMethod ChannelConversionPings
1823	raw := NoMethod(*s)
1824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1825}
1826
1827type ChannelListResponse struct {
1828	// Etag: Etag of this resource.
1829	Etag string `json:"etag,omitempty"`
1830
1831	// EventId: Serialized EventId of the request which produced this
1832	// response.
1833	EventId string `json:"eventId,omitempty"`
1834
1835	// Items: A list of channels that match the request criteria.
1836	Items []*Channel `json:"items,omitempty"`
1837
1838	// Kind: Identifies what kind of resource this is. Value: the fixed
1839	// string "youtube#channelListResponse".
1840	Kind string `json:"kind,omitempty"`
1841
1842	// NextPageToken: The token that can be used as the value of the
1843	// pageToken parameter to retrieve the next page in the result set.
1844	NextPageToken string `json:"nextPageToken,omitempty"`
1845
1846	PageInfo *PageInfo `json:"pageInfo,omitempty"`
1847
1848	// PrevPageToken: The token that can be used as the value of the
1849	// pageToken parameter to retrieve the previous page in the result set.
1850	PrevPageToken string `json:"prevPageToken,omitempty"`
1851
1852	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
1853
1854	// VisitorId: The visitorId identifies the visitor.
1855	VisitorId string `json:"visitorId,omitempty"`
1856
1857	// ServerResponse contains the HTTP response code and headers from the
1858	// server.
1859	googleapi.ServerResponse `json:"-"`
1860
1861	// ForceSendFields is a list of field names (e.g. "Etag") to
1862	// unconditionally include in API requests. By default, fields with
1863	// empty values are omitted from API requests. However, any non-pointer,
1864	// non-interface field appearing in ForceSendFields will be sent to the
1865	// server regardless of whether the field is empty or not. This may be
1866	// used to include empty fields in Patch requests.
1867	ForceSendFields []string `json:"-"`
1868
1869	// NullFields is a list of field names (e.g. "Etag") to include in API
1870	// requests with the JSON null value. By default, fields with empty
1871	// values are omitted from API requests. However, any field with an
1872	// empty value appearing in NullFields will be sent to the server as
1873	// null. It is an error if a field in this list has a non-empty value.
1874	// This may be used to include null fields in Patch requests.
1875	NullFields []string `json:"-"`
1876}
1877
1878func (s *ChannelListResponse) MarshalJSON() ([]byte, error) {
1879	type NoMethod ChannelListResponse
1880	raw := NoMethod(*s)
1881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1882}
1883
1884// ChannelLocalization: Channel localization setting
1885type ChannelLocalization struct {
1886	// Description: The localized strings for channel's description.
1887	Description string `json:"description,omitempty"`
1888
1889	// Title: The localized strings for channel's title.
1890	Title string `json:"title,omitempty"`
1891
1892	// ForceSendFields is a list of field names (e.g. "Description") to
1893	// unconditionally include in API requests. By default, fields with
1894	// empty values are omitted from API requests. However, any non-pointer,
1895	// non-interface field appearing in ForceSendFields will be sent to the
1896	// server regardless of whether the field is empty or not. This may be
1897	// used to include empty fields in Patch requests.
1898	ForceSendFields []string `json:"-"`
1899
1900	// NullFields is a list of field names (e.g. "Description") to include
1901	// in API requests with the JSON null value. By default, fields with
1902	// empty values are omitted from API requests. However, any field with
1903	// an empty value appearing in NullFields will be sent to the server as
1904	// null. It is an error if a field in this list has a non-empty value.
1905	// This may be used to include null fields in Patch requests.
1906	NullFields []string `json:"-"`
1907}
1908
1909func (s *ChannelLocalization) MarshalJSON() ([]byte, error) {
1910	type NoMethod ChannelLocalization
1911	raw := NoMethod(*s)
1912	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1913}
1914
1915type ChannelProfileDetails struct {
1916	// ChannelId: The YouTube channel ID.
1917	ChannelId string `json:"channelId,omitempty"`
1918
1919	// ChannelUrl: The channel's URL.
1920	ChannelUrl string `json:"channelUrl,omitempty"`
1921
1922	// DisplayName: The channel's display name.
1923	DisplayName string `json:"displayName,omitempty"`
1924
1925	// ProfileImageUrl: The channels's avatar URL.
1926	ProfileImageUrl string `json:"profileImageUrl,omitempty"`
1927
1928	// ForceSendFields is a list of field names (e.g. "ChannelId") to
1929	// unconditionally include in API requests. By default, fields with
1930	// empty values are omitted from API requests. However, any non-pointer,
1931	// non-interface field appearing in ForceSendFields will be sent to the
1932	// server regardless of whether the field is empty or not. This may be
1933	// used to include empty fields in Patch requests.
1934	ForceSendFields []string `json:"-"`
1935
1936	// NullFields is a list of field names (e.g. "ChannelId") to include in
1937	// API requests with the JSON null value. By default, fields with empty
1938	// values are omitted from API requests. However, any field with an
1939	// empty value appearing in NullFields will be sent to the server as
1940	// null. It is an error if a field in this list has a non-empty value.
1941	// This may be used to include null fields in Patch requests.
1942	NullFields []string `json:"-"`
1943}
1944
1945func (s *ChannelProfileDetails) MarshalJSON() ([]byte, error) {
1946	type NoMethod ChannelProfileDetails
1947	raw := NoMethod(*s)
1948	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1949}
1950
1951type ChannelSection struct {
1952	// ContentDetails: The contentDetails object contains details about the
1953	// channel section content, such as a list of playlists or channels
1954	// featured in the section.
1955	ContentDetails *ChannelSectionContentDetails `json:"contentDetails,omitempty"`
1956
1957	// Etag: Etag of this resource.
1958	Etag string `json:"etag,omitempty"`
1959
1960	// Id: The ID that YouTube uses to uniquely identify the channel
1961	// section.
1962	Id string `json:"id,omitempty"`
1963
1964	// Kind: Identifies what kind of resource this is. Value: the fixed
1965	// string "youtube#channelSection".
1966	Kind string `json:"kind,omitempty"`
1967
1968	// Localizations: Localizations for different languages
1969	Localizations map[string]ChannelSectionLocalization `json:"localizations,omitempty"`
1970
1971	// Snippet: The snippet object contains basic details about the channel
1972	// section, such as its type, style and title.
1973	Snippet *ChannelSectionSnippet `json:"snippet,omitempty"`
1974
1975	// Targeting: The targeting object contains basic targeting settings
1976	// about the channel section.
1977	Targeting *ChannelSectionTargeting `json:"targeting,omitempty"`
1978
1979	// ServerResponse contains the HTTP response code and headers from the
1980	// server.
1981	googleapi.ServerResponse `json:"-"`
1982
1983	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
1984	// unconditionally include in API requests. By default, fields with
1985	// empty values are omitted from API requests. However, any non-pointer,
1986	// non-interface field appearing in ForceSendFields will be sent to the
1987	// server regardless of whether the field is empty or not. This may be
1988	// used to include empty fields in Patch requests.
1989	ForceSendFields []string `json:"-"`
1990
1991	// NullFields is a list of field names (e.g. "ContentDetails") to
1992	// include in API requests with the JSON null value. By default, fields
1993	// with empty values are omitted from API requests. However, any field
1994	// with an empty value appearing in NullFields will be sent to the
1995	// server as null. It is an error if a field in this list has a
1996	// non-empty value. This may be used to include null fields in Patch
1997	// requests.
1998	NullFields []string `json:"-"`
1999}
2000
2001func (s *ChannelSection) MarshalJSON() ([]byte, error) {
2002	type NoMethod ChannelSection
2003	raw := NoMethod(*s)
2004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2005}
2006
2007// ChannelSectionContentDetails: Details about a channelsection,
2008// including playlists and channels.
2009type ChannelSectionContentDetails struct {
2010	// Channels: The channel ids for type multiple_channels.
2011	Channels []string `json:"channels,omitempty"`
2012
2013	// Playlists: The playlist ids for type single_playlist and
2014	// multiple_playlists. For singlePlaylist, only one playlistId is
2015	// allowed.
2016	Playlists []string `json:"playlists,omitempty"`
2017
2018	// ForceSendFields is a list of field names (e.g. "Channels") to
2019	// unconditionally include in API requests. By default, fields with
2020	// empty values are omitted from API requests. However, any non-pointer,
2021	// non-interface field appearing in ForceSendFields will be sent to the
2022	// server regardless of whether the field is empty or not. This may be
2023	// used to include empty fields in Patch requests.
2024	ForceSendFields []string `json:"-"`
2025
2026	// NullFields is a list of field names (e.g. "Channels") to include in
2027	// API requests with the JSON null value. By default, fields with empty
2028	// values are omitted from API requests. However, any field with an
2029	// empty value appearing in NullFields will be sent to the server as
2030	// null. It is an error if a field in this list has a non-empty value.
2031	// This may be used to include null fields in Patch requests.
2032	NullFields []string `json:"-"`
2033}
2034
2035func (s *ChannelSectionContentDetails) MarshalJSON() ([]byte, error) {
2036	type NoMethod ChannelSectionContentDetails
2037	raw := NoMethod(*s)
2038	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2039}
2040
2041type ChannelSectionListResponse struct {
2042	// Etag: Etag of this resource.
2043	Etag string `json:"etag,omitempty"`
2044
2045	// EventId: Serialized EventId of the request which produced this
2046	// response.
2047	EventId string `json:"eventId,omitempty"`
2048
2049	// Items: A list of ChannelSections that match the request criteria.
2050	Items []*ChannelSection `json:"items,omitempty"`
2051
2052	// Kind: Identifies what kind of resource this is. Value: the fixed
2053	// string "youtube#channelSectionListResponse".
2054	Kind string `json:"kind,omitempty"`
2055
2056	// VisitorId: The visitorId identifies the visitor.
2057	VisitorId string `json:"visitorId,omitempty"`
2058
2059	// ServerResponse contains the HTTP response code and headers from the
2060	// server.
2061	googleapi.ServerResponse `json:"-"`
2062
2063	// ForceSendFields is a list of field names (e.g. "Etag") to
2064	// unconditionally include in API requests. By default, fields with
2065	// empty values are omitted from API requests. However, any non-pointer,
2066	// non-interface field appearing in ForceSendFields will be sent to the
2067	// server regardless of whether the field is empty or not. This may be
2068	// used to include empty fields in Patch requests.
2069	ForceSendFields []string `json:"-"`
2070
2071	// NullFields is a list of field names (e.g. "Etag") to include in API
2072	// requests with the JSON null value. By default, fields with empty
2073	// values are omitted from API requests. However, any field with an
2074	// empty value appearing in NullFields will be sent to the server as
2075	// null. It is an error if a field in this list has a non-empty value.
2076	// This may be used to include null fields in Patch requests.
2077	NullFields []string `json:"-"`
2078}
2079
2080func (s *ChannelSectionListResponse) MarshalJSON() ([]byte, error) {
2081	type NoMethod ChannelSectionListResponse
2082	raw := NoMethod(*s)
2083	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2084}
2085
2086// ChannelSectionLocalization: ChannelSection localization setting
2087type ChannelSectionLocalization struct {
2088	// Title: The localized strings for channel section's title.
2089	Title string `json:"title,omitempty"`
2090
2091	// ForceSendFields is a list of field names (e.g. "Title") to
2092	// unconditionally include in API requests. By default, fields with
2093	// empty values are omitted from API requests. However, any non-pointer,
2094	// non-interface field appearing in ForceSendFields will be sent to the
2095	// server regardless of whether the field is empty or not. This may be
2096	// used to include empty fields in Patch requests.
2097	ForceSendFields []string `json:"-"`
2098
2099	// NullFields is a list of field names (e.g. "Title") to include in API
2100	// requests with the JSON null value. By default, fields with empty
2101	// values are omitted from API requests. However, any field with an
2102	// empty value appearing in NullFields will be sent to the server as
2103	// null. It is an error if a field in this list has a non-empty value.
2104	// This may be used to include null fields in Patch requests.
2105	NullFields []string `json:"-"`
2106}
2107
2108func (s *ChannelSectionLocalization) MarshalJSON() ([]byte, error) {
2109	type NoMethod ChannelSectionLocalization
2110	raw := NoMethod(*s)
2111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2112}
2113
2114// ChannelSectionSnippet: Basic details about a channel section,
2115// including title, style and position.
2116type ChannelSectionSnippet struct {
2117	// ChannelId: The ID that YouTube uses to uniquely identify the channel
2118	// that published the channel section.
2119	ChannelId string `json:"channelId,omitempty"`
2120
2121	// DefaultLanguage: The language of the channel section's default title
2122	// and description.
2123	DefaultLanguage string `json:"defaultLanguage,omitempty"`
2124
2125	// Localized: Localized title, read-only.
2126	Localized *ChannelSectionLocalization `json:"localized,omitempty"`
2127
2128	// Position: The position of the channel section in the channel.
2129	Position *int64 `json:"position,omitempty"`
2130
2131	// Style: The style of the channel section.
2132	//
2133	// Possible values:
2134	//   "channelsectionStyleUndefined"
2135	//   "horizontalRow"
2136	//   "verticalList"
2137	Style string `json:"style,omitempty"`
2138
2139	// Title: The channel section's title for multiple_playlists and
2140	// multiple_channels.
2141	Title string `json:"title,omitempty"`
2142
2143	// Type: The type of the channel section.
2144	//
2145	// Possible values:
2146	//   "allPlaylists"
2147	//   "channelsectionTypeUndefined"
2148	//   "completedEvents"
2149	//   "likedPlaylists"
2150	//   "likes"
2151	//   "liveEvents"
2152	//   "multipleChannels"
2153	//   "multiplePlaylists"
2154	//   "popularUploads"
2155	//   "postedPlaylists"
2156	//   "postedVideos"
2157	//   "recentActivity"
2158	//   "recentPosts"
2159	//   "recentUploads"
2160	//   "singlePlaylist"
2161	//   "subscriptions"
2162	//   "upcomingEvents"
2163	Type string `json:"type,omitempty"`
2164
2165	// ForceSendFields is a list of field names (e.g. "ChannelId") to
2166	// unconditionally include in API requests. By default, fields with
2167	// empty values are omitted from API requests. However, any non-pointer,
2168	// non-interface field appearing in ForceSendFields will be sent to the
2169	// server regardless of whether the field is empty or not. This may be
2170	// used to include empty fields in Patch requests.
2171	ForceSendFields []string `json:"-"`
2172
2173	// NullFields is a list of field names (e.g. "ChannelId") to include in
2174	// API requests with the JSON null value. By default, fields with empty
2175	// values are omitted from API requests. However, any field with an
2176	// empty value appearing in NullFields will be sent to the server as
2177	// null. It is an error if a field in this list has a non-empty value.
2178	// This may be used to include null fields in Patch requests.
2179	NullFields []string `json:"-"`
2180}
2181
2182func (s *ChannelSectionSnippet) MarshalJSON() ([]byte, error) {
2183	type NoMethod ChannelSectionSnippet
2184	raw := NoMethod(*s)
2185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2186}
2187
2188// ChannelSectionTargeting: ChannelSection targeting setting.
2189type ChannelSectionTargeting struct {
2190	// Countries: The country the channel section is targeting.
2191	Countries []string `json:"countries,omitempty"`
2192
2193	// Languages: The language the channel section is targeting.
2194	Languages []string `json:"languages,omitempty"`
2195
2196	// Regions: The region the channel section is targeting.
2197	Regions []string `json:"regions,omitempty"`
2198
2199	// ForceSendFields is a list of field names (e.g. "Countries") to
2200	// unconditionally include in API requests. By default, fields with
2201	// empty values are omitted from API requests. However, any non-pointer,
2202	// non-interface field appearing in ForceSendFields will be sent to the
2203	// server regardless of whether the field is empty or not. This may be
2204	// used to include empty fields in Patch requests.
2205	ForceSendFields []string `json:"-"`
2206
2207	// NullFields is a list of field names (e.g. "Countries") to include in
2208	// API requests with the JSON null value. By default, fields with empty
2209	// values are omitted from API requests. However, any field with an
2210	// empty value appearing in NullFields will be sent to the server as
2211	// null. It is an error if a field in this list has a non-empty value.
2212	// This may be used to include null fields in Patch requests.
2213	NullFields []string `json:"-"`
2214}
2215
2216func (s *ChannelSectionTargeting) MarshalJSON() ([]byte, error) {
2217	type NoMethod ChannelSectionTargeting
2218	raw := NoMethod(*s)
2219	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2220}
2221
2222// ChannelSettings: Branding properties for the channel view.
2223type ChannelSettings struct {
2224	// Country: The country of the channel.
2225	Country string `json:"country,omitempty"`
2226
2227	DefaultLanguage string `json:"defaultLanguage,omitempty"`
2228
2229	// DefaultTab: Which content tab users should see when viewing the
2230	// channel.
2231	DefaultTab string `json:"defaultTab,omitempty"`
2232
2233	// Description: Specifies the channel description.
2234	Description string `json:"description,omitempty"`
2235
2236	// FeaturedChannelsTitle: Title for the featured channels tab.
2237	FeaturedChannelsTitle string `json:"featuredChannelsTitle,omitempty"`
2238
2239	// FeaturedChannelsUrls: The list of featured channels.
2240	FeaturedChannelsUrls []string `json:"featuredChannelsUrls,omitempty"`
2241
2242	// Keywords: Lists keywords associated with the channel,
2243	// comma-separated.
2244	Keywords string `json:"keywords,omitempty"`
2245
2246	// ModerateComments: Whether user-submitted comments left on the channel
2247	// page need to be approved by the channel owner to be publicly visible.
2248	ModerateComments bool `json:"moderateComments,omitempty"`
2249
2250	// ProfileColor: A prominent color that can be rendered on this channel
2251	// page.
2252	ProfileColor string `json:"profileColor,omitempty"`
2253
2254	// ShowBrowseView: Whether the tab to browse the videos should be
2255	// displayed.
2256	ShowBrowseView bool `json:"showBrowseView,omitempty"`
2257
2258	// ShowRelatedChannels: Whether related channels should be proposed.
2259	ShowRelatedChannels bool `json:"showRelatedChannels,omitempty"`
2260
2261	// Title: Specifies the channel title.
2262	Title string `json:"title,omitempty"`
2263
2264	// TrackingAnalyticsAccountId: The ID for a Google Analytics account to
2265	// track and measure traffic to the channels.
2266	TrackingAnalyticsAccountId string `json:"trackingAnalyticsAccountId,omitempty"`
2267
2268	// UnsubscribedTrailer: The trailer of the channel, for users that are
2269	// not subscribers.
2270	UnsubscribedTrailer string `json:"unsubscribedTrailer,omitempty"`
2271
2272	// ForceSendFields is a list of field names (e.g. "Country") to
2273	// unconditionally include in API requests. By default, fields with
2274	// empty values are omitted from API requests. However, any non-pointer,
2275	// non-interface field appearing in ForceSendFields will be sent to the
2276	// server regardless of whether the field is empty or not. This may be
2277	// used to include empty fields in Patch requests.
2278	ForceSendFields []string `json:"-"`
2279
2280	// NullFields is a list of field names (e.g. "Country") to include in
2281	// API requests with the JSON null value. By default, fields with empty
2282	// values are omitted from API requests. However, any field with an
2283	// empty value appearing in NullFields will be sent to the server as
2284	// null. It is an error if a field in this list has a non-empty value.
2285	// This may be used to include null fields in Patch requests.
2286	NullFields []string `json:"-"`
2287}
2288
2289func (s *ChannelSettings) MarshalJSON() ([]byte, error) {
2290	type NoMethod ChannelSettings
2291	raw := NoMethod(*s)
2292	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2293}
2294
2295// ChannelSnippet: Basic details about a channel, including title,
2296// description and thumbnails.
2297type ChannelSnippet struct {
2298	// Country: The country of the channel.
2299	Country string `json:"country,omitempty"`
2300
2301	// CustomUrl: The custom url of the channel.
2302	CustomUrl string `json:"customUrl,omitempty"`
2303
2304	// DefaultLanguage: The language of the channel's default title and
2305	// description.
2306	DefaultLanguage string `json:"defaultLanguage,omitempty"`
2307
2308	// Description: The description of the channel.
2309	Description string `json:"description,omitempty"`
2310
2311	// Localized: Localized title and description, read-only.
2312	Localized *ChannelLocalization `json:"localized,omitempty"`
2313
2314	// PublishedAt: The date and time that the channel was created. The
2315	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
2316	PublishedAt string `json:"publishedAt,omitempty"`
2317
2318	// Thumbnails: A map of thumbnail images associated with the channel.
2319	// For each object in the map, the key is the name of the thumbnail
2320	// image, and the value is an object that contains other information
2321	// about the thumbnail.
2322	//
2323	// When displaying thumbnails in your application, make sure that your
2324	// code uses the image URLs exactly as they are returned in API
2325	// responses. For example, your application should not use the http
2326	// domain instead of the https domain in a URL returned in an API
2327	// response.
2328	//
2329	// Beginning in July 2018, channel thumbnail URLs will only be available
2330	// in the https domain, which is how the URLs appear in API responses.
2331	// After that time, you might see broken images in your application if
2332	// it tries to load YouTube images from the http domain.
2333	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
2334
2335	// Title: The channel's title.
2336	Title string `json:"title,omitempty"`
2337
2338	// ForceSendFields is a list of field names (e.g. "Country") to
2339	// unconditionally include in API requests. By default, fields with
2340	// empty values are omitted from API requests. However, any non-pointer,
2341	// non-interface field appearing in ForceSendFields will be sent to the
2342	// server regardless of whether the field is empty or not. This may be
2343	// used to include empty fields in Patch requests.
2344	ForceSendFields []string `json:"-"`
2345
2346	// NullFields is a list of field names (e.g. "Country") to include in
2347	// API requests with the JSON null value. By default, fields with empty
2348	// values are omitted from API requests. However, any field with an
2349	// empty value appearing in NullFields will be sent to the server as
2350	// null. It is an error if a field in this list has a non-empty value.
2351	// This may be used to include null fields in Patch requests.
2352	NullFields []string `json:"-"`
2353}
2354
2355func (s *ChannelSnippet) MarshalJSON() ([]byte, error) {
2356	type NoMethod ChannelSnippet
2357	raw := NoMethod(*s)
2358	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2359}
2360
2361// ChannelStatistics: Statistics about a channel: number of subscribers,
2362// number of videos in the channel, etc.
2363type ChannelStatistics struct {
2364	// CommentCount: The number of comments for the channel.
2365	CommentCount uint64 `json:"commentCount,omitempty,string"`
2366
2367	// HiddenSubscriberCount: Whether or not the number of subscribers is
2368	// shown for this user.
2369	HiddenSubscriberCount bool `json:"hiddenSubscriberCount,omitempty"`
2370
2371	// SubscriberCount: The number of subscribers that the channel has.
2372	SubscriberCount uint64 `json:"subscriberCount,omitempty,string"`
2373
2374	// VideoCount: The number of videos uploaded to the channel.
2375	VideoCount uint64 `json:"videoCount,omitempty,string"`
2376
2377	// ViewCount: The number of times the channel has been viewed.
2378	ViewCount uint64 `json:"viewCount,omitempty,string"`
2379
2380	// ForceSendFields is a list of field names (e.g. "CommentCount") to
2381	// unconditionally include in API requests. By default, fields with
2382	// empty values are omitted from API requests. However, any non-pointer,
2383	// non-interface field appearing in ForceSendFields will be sent to the
2384	// server regardless of whether the field is empty or not. This may be
2385	// used to include empty fields in Patch requests.
2386	ForceSendFields []string `json:"-"`
2387
2388	// NullFields is a list of field names (e.g. "CommentCount") to include
2389	// in API requests with the JSON null value. By default, fields with
2390	// empty values are omitted from API requests. However, any field with
2391	// an empty value appearing in NullFields will be sent to the server as
2392	// null. It is an error if a field in this list has a non-empty value.
2393	// This may be used to include null fields in Patch requests.
2394	NullFields []string `json:"-"`
2395}
2396
2397func (s *ChannelStatistics) MarshalJSON() ([]byte, error) {
2398	type NoMethod ChannelStatistics
2399	raw := NoMethod(*s)
2400	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2401}
2402
2403// ChannelStatus: JSON template for the status part of a channel.
2404type ChannelStatus struct {
2405	// IsLinked: If true, then the user is linked to either a YouTube
2406	// username or G+ account. Otherwise, the user doesn't have a public
2407	// YouTube identity.
2408	IsLinked bool `json:"isLinked,omitempty"`
2409
2410	// LongUploadsStatus: The long uploads status of this channel. See
2411	//
2412	// Possible values:
2413	//   "allowed"
2414	//   "disallowed"
2415	//   "eligible"
2416	//   "longUploadsUnspecified"
2417	LongUploadsStatus string `json:"longUploadsStatus,omitempty"`
2418
2419	// PrivacyStatus: Privacy status of the channel.
2420	//
2421	// Possible values:
2422	//   "private"
2423	//   "public"
2424	//   "unlisted"
2425	//   "unlisted_new"
2426	PrivacyStatus string `json:"privacyStatus,omitempty"`
2427
2428	// ForceSendFields is a list of field names (e.g. "IsLinked") to
2429	// unconditionally include in API requests. By default, fields with
2430	// empty values are omitted from API requests. However, any non-pointer,
2431	// non-interface field appearing in ForceSendFields will be sent to the
2432	// server regardless of whether the field is empty or not. This may be
2433	// used to include empty fields in Patch requests.
2434	ForceSendFields []string `json:"-"`
2435
2436	// NullFields is a list of field names (e.g. "IsLinked") to include in
2437	// API requests with the JSON null value. By default, fields with empty
2438	// values are omitted from API requests. However, any field with an
2439	// empty value appearing in NullFields will be sent to the server as
2440	// null. It is an error if a field in this list has a non-empty value.
2441	// This may be used to include null fields in Patch requests.
2442	NullFields []string `json:"-"`
2443}
2444
2445func (s *ChannelStatus) MarshalJSON() ([]byte, error) {
2446	type NoMethod ChannelStatus
2447	raw := NoMethod(*s)
2448	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2449}
2450
2451// ChannelTopicDetails: Freebase topic information related to the
2452// channel.
2453type ChannelTopicDetails struct {
2454	// TopicCategories: A list of Wikipedia URLs that describe the channel's
2455	// content.
2456	TopicCategories []string `json:"topicCategories,omitempty"`
2457
2458	// TopicIds: A list of Freebase topic IDs associated with the channel.
2459	// You can retrieve information about each topic using the Freebase
2460	// Topic API.
2461	TopicIds []string `json:"topicIds,omitempty"`
2462
2463	// ForceSendFields is a list of field names (e.g. "TopicCategories") to
2464	// unconditionally include in API requests. By default, fields with
2465	// empty values are omitted from API requests. However, any non-pointer,
2466	// non-interface field appearing in ForceSendFields will be sent to the
2467	// server regardless of whether the field is empty or not. This may be
2468	// used to include empty fields in Patch requests.
2469	ForceSendFields []string `json:"-"`
2470
2471	// NullFields is a list of field names (e.g. "TopicCategories") to
2472	// include in API requests with the JSON null value. By default, fields
2473	// with empty values are omitted from API requests. However, any field
2474	// with an empty value appearing in NullFields will be sent to the
2475	// server as null. It is an error if a field in this list has a
2476	// non-empty value. This may be used to include null fields in Patch
2477	// requests.
2478	NullFields []string `json:"-"`
2479}
2480
2481func (s *ChannelTopicDetails) MarshalJSON() ([]byte, error) {
2482	type NoMethod ChannelTopicDetails
2483	raw := NoMethod(*s)
2484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2485}
2486
2487// Comment: A comment represents a single YouTube comment.
2488type Comment struct {
2489	// Etag: Etag of this resource.
2490	Etag string `json:"etag,omitempty"`
2491
2492	// Id: The ID that YouTube uses to uniquely identify the comment.
2493	Id string `json:"id,omitempty"`
2494
2495	// Kind: Identifies what kind of resource this is. Value: the fixed
2496	// string "youtube#comment".
2497	Kind string `json:"kind,omitempty"`
2498
2499	// Snippet: The snippet object contains basic details about the comment.
2500	Snippet *CommentSnippet `json:"snippet,omitempty"`
2501
2502	// ServerResponse contains the HTTP response code and headers from the
2503	// server.
2504	googleapi.ServerResponse `json:"-"`
2505
2506	// ForceSendFields is a list of field names (e.g. "Etag") to
2507	// unconditionally include in API requests. By default, fields with
2508	// empty values are omitted from API requests. However, any non-pointer,
2509	// non-interface field appearing in ForceSendFields will be sent to the
2510	// server regardless of whether the field is empty or not. This may be
2511	// used to include empty fields in Patch requests.
2512	ForceSendFields []string `json:"-"`
2513
2514	// NullFields is a list of field names (e.g. "Etag") to include in API
2515	// requests with the JSON null value. By default, fields with empty
2516	// values are omitted from API requests. However, any field with an
2517	// empty value appearing in NullFields will be sent to the server as
2518	// null. It is an error if a field in this list has a non-empty value.
2519	// This may be used to include null fields in Patch requests.
2520	NullFields []string `json:"-"`
2521}
2522
2523func (s *Comment) MarshalJSON() ([]byte, error) {
2524	type NoMethod Comment
2525	raw := NoMethod(*s)
2526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2527}
2528
2529type CommentListResponse struct {
2530	// Etag: Etag of this resource.
2531	Etag string `json:"etag,omitempty"`
2532
2533	// EventId: Serialized EventId of the request which produced this
2534	// response.
2535	EventId string `json:"eventId,omitempty"`
2536
2537	// Items: A list of comments that match the request criteria.
2538	Items []*Comment `json:"items,omitempty"`
2539
2540	// Kind: Identifies what kind of resource this is. Value: the fixed
2541	// string "youtube#commentListResponse".
2542	Kind string `json:"kind,omitempty"`
2543
2544	// NextPageToken: The token that can be used as the value of the
2545	// pageToken parameter to retrieve the next page in the result set.
2546	NextPageToken string `json:"nextPageToken,omitempty"`
2547
2548	PageInfo *PageInfo `json:"pageInfo,omitempty"`
2549
2550	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
2551
2552	// VisitorId: The visitorId identifies the visitor.
2553	VisitorId string `json:"visitorId,omitempty"`
2554
2555	// ServerResponse contains the HTTP response code and headers from the
2556	// server.
2557	googleapi.ServerResponse `json:"-"`
2558
2559	// ForceSendFields is a list of field names (e.g. "Etag") to
2560	// unconditionally include in API requests. By default, fields with
2561	// empty values are omitted from API requests. However, any non-pointer,
2562	// non-interface field appearing in ForceSendFields will be sent to the
2563	// server regardless of whether the field is empty or not. This may be
2564	// used to include empty fields in Patch requests.
2565	ForceSendFields []string `json:"-"`
2566
2567	// NullFields is a list of field names (e.g. "Etag") to include in API
2568	// requests with the JSON null value. By default, fields with empty
2569	// values are omitted from API requests. However, any field with an
2570	// empty value appearing in NullFields will be sent to the server as
2571	// null. It is an error if a field in this list has a non-empty value.
2572	// This may be used to include null fields in Patch requests.
2573	NullFields []string `json:"-"`
2574}
2575
2576func (s *CommentListResponse) MarshalJSON() ([]byte, error) {
2577	type NoMethod CommentListResponse
2578	raw := NoMethod(*s)
2579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2580}
2581
2582// CommentSnippet: Basic details about a comment, such as its author and
2583// text.
2584type CommentSnippet struct {
2585	// AuthorChannelId: The id of the author's YouTube channel, if any.
2586	AuthorChannelId interface{} `json:"authorChannelId,omitempty"`
2587
2588	// AuthorChannelUrl: Link to the author's YouTube channel, if any.
2589	AuthorChannelUrl string `json:"authorChannelUrl,omitempty"`
2590
2591	// AuthorDisplayName: The name of the user who posted the comment.
2592	AuthorDisplayName string `json:"authorDisplayName,omitempty"`
2593
2594	// AuthorProfileImageUrl: The URL for the avatar of the user who posted
2595	// the comment.
2596	AuthorProfileImageUrl string `json:"authorProfileImageUrl,omitempty"`
2597
2598	// CanRate: Whether the current viewer can rate this comment.
2599	CanRate bool `json:"canRate,omitempty"`
2600
2601	// ChannelId: The id of the corresponding YouTube channel. In case of a
2602	// channel comment this is the channel the comment refers to. In case of
2603	// a video comment it's the video's channel.
2604	ChannelId string `json:"channelId,omitempty"`
2605
2606	// LikeCount: The total number of likes this comment has received.
2607	LikeCount int64 `json:"likeCount,omitempty"`
2608
2609	// ModerationStatus: The comment's moderation status. Will not be set if
2610	// the comments were requested through the id filter.
2611	//
2612	// Possible values:
2613	//   "heldForReview"
2614	//   "likelySpam"
2615	//   "published"
2616	//   "rejected"
2617	ModerationStatus string `json:"moderationStatus,omitempty"`
2618
2619	// ParentId: The unique id of the parent comment, only set for replies.
2620	ParentId string `json:"parentId,omitempty"`
2621
2622	// PublishedAt: The date and time when the comment was orignally
2623	// published. The value is specified in ISO 8601
2624	// (YYYY-MM-DDThh:mm:ss.sZ) format.
2625	PublishedAt string `json:"publishedAt,omitempty"`
2626
2627	// TextDisplay: The comment's text. The format is either plain text or
2628	// HTML dependent on what has been requested. Even the plain text
2629	// representation may differ from the text originally posted in that it
2630	// may replace video links with video titles etc.
2631	TextDisplay string `json:"textDisplay,omitempty"`
2632
2633	// TextOriginal: The comment's original raw text as initially posted or
2634	// last updated. The original text will only be returned if it is
2635	// accessible to the viewer, which is only guaranteed if the viewer is
2636	// the comment's author.
2637	TextOriginal string `json:"textOriginal,omitempty"`
2638
2639	// UpdatedAt: The date and time when was last updated . The value is
2640	// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
2641	UpdatedAt string `json:"updatedAt,omitempty"`
2642
2643	// VideoId: The ID of the video the comment refers to, if any.
2644	VideoId string `json:"videoId,omitempty"`
2645
2646	// ViewerRating: The rating the viewer has given to this comment. For
2647	// the time being this will never return RATE_TYPE_DISLIKE and instead
2648	// return RATE_TYPE_NONE. This may change in the future.
2649	//
2650	// Possible values:
2651	//   "dislike"
2652	//   "like"
2653	//   "none"
2654	//   "unspecified"
2655	ViewerRating string `json:"viewerRating,omitempty"`
2656
2657	// ForceSendFields is a list of field names (e.g. "AuthorChannelId") to
2658	// unconditionally include in API requests. By default, fields with
2659	// empty values are omitted from API requests. However, any non-pointer,
2660	// non-interface field appearing in ForceSendFields will be sent to the
2661	// server regardless of whether the field is empty or not. This may be
2662	// used to include empty fields in Patch requests.
2663	ForceSendFields []string `json:"-"`
2664
2665	// NullFields is a list of field names (e.g. "AuthorChannelId") to
2666	// include in API requests with the JSON null value. By default, fields
2667	// with empty values are omitted from API requests. However, any field
2668	// with an empty value appearing in NullFields will be sent to the
2669	// server as null. It is an error if a field in this list has a
2670	// non-empty value. This may be used to include null fields in Patch
2671	// requests.
2672	NullFields []string `json:"-"`
2673}
2674
2675func (s *CommentSnippet) MarshalJSON() ([]byte, error) {
2676	type NoMethod CommentSnippet
2677	raw := NoMethod(*s)
2678	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2679}
2680
2681// CommentThread: A comment thread represents information that applies
2682// to a top level comment and all its replies. It can also include the
2683// top level comment itself and some of the replies.
2684type CommentThread struct {
2685	// Etag: Etag of this resource.
2686	Etag string `json:"etag,omitempty"`
2687
2688	// Id: The ID that YouTube uses to uniquely identify the comment thread.
2689	Id string `json:"id,omitempty"`
2690
2691	// Kind: Identifies what kind of resource this is. Value: the fixed
2692	// string "youtube#commentThread".
2693	Kind string `json:"kind,omitempty"`
2694
2695	// Replies: The replies object contains a limited number of replies (if
2696	// any) to the top level comment found in the snippet.
2697	Replies *CommentThreadReplies `json:"replies,omitempty"`
2698
2699	// Snippet: The snippet object contains basic details about the comment
2700	// thread and also the top level comment.
2701	Snippet *CommentThreadSnippet `json:"snippet,omitempty"`
2702
2703	// ServerResponse contains the HTTP response code and headers from the
2704	// server.
2705	googleapi.ServerResponse `json:"-"`
2706
2707	// ForceSendFields is a list of field names (e.g. "Etag") to
2708	// unconditionally include in API requests. By default, fields with
2709	// empty values are omitted from API requests. However, any non-pointer,
2710	// non-interface field appearing in ForceSendFields will be sent to the
2711	// server regardless of whether the field is empty or not. This may be
2712	// used to include empty fields in Patch requests.
2713	ForceSendFields []string `json:"-"`
2714
2715	// NullFields is a list of field names (e.g. "Etag") to include in API
2716	// requests with the JSON null value. By default, fields with empty
2717	// values are omitted from API requests. However, any field with an
2718	// empty value appearing in NullFields will be sent to the server as
2719	// null. It is an error if a field in this list has a non-empty value.
2720	// This may be used to include null fields in Patch requests.
2721	NullFields []string `json:"-"`
2722}
2723
2724func (s *CommentThread) MarshalJSON() ([]byte, error) {
2725	type NoMethod CommentThread
2726	raw := NoMethod(*s)
2727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2728}
2729
2730type CommentThreadListResponse struct {
2731	// Etag: Etag of this resource.
2732	Etag string `json:"etag,omitempty"`
2733
2734	// EventId: Serialized EventId of the request which produced this
2735	// response.
2736	EventId string `json:"eventId,omitempty"`
2737
2738	// Items: A list of comment threads that match the request criteria.
2739	Items []*CommentThread `json:"items,omitempty"`
2740
2741	// Kind: Identifies what kind of resource this is. Value: the fixed
2742	// string "youtube#commentThreadListResponse".
2743	Kind string `json:"kind,omitempty"`
2744
2745	// NextPageToken: The token that can be used as the value of the
2746	// pageToken parameter to retrieve the next page in the result set.
2747	NextPageToken string `json:"nextPageToken,omitempty"`
2748
2749	PageInfo *PageInfo `json:"pageInfo,omitempty"`
2750
2751	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
2752
2753	// VisitorId: The visitorId identifies the visitor.
2754	VisitorId string `json:"visitorId,omitempty"`
2755
2756	// ServerResponse contains the HTTP response code and headers from the
2757	// server.
2758	googleapi.ServerResponse `json:"-"`
2759
2760	// ForceSendFields is a list of field names (e.g. "Etag") to
2761	// unconditionally include in API requests. By default, fields with
2762	// empty values are omitted from API requests. However, any non-pointer,
2763	// non-interface field appearing in ForceSendFields will be sent to the
2764	// server regardless of whether the field is empty or not. This may be
2765	// used to include empty fields in Patch requests.
2766	ForceSendFields []string `json:"-"`
2767
2768	// NullFields is a list of field names (e.g. "Etag") to include in API
2769	// requests with the JSON null value. By default, fields with empty
2770	// values are omitted from API requests. However, any field with an
2771	// empty value appearing in NullFields will be sent to the server as
2772	// null. It is an error if a field in this list has a non-empty value.
2773	// This may be used to include null fields in Patch requests.
2774	NullFields []string `json:"-"`
2775}
2776
2777func (s *CommentThreadListResponse) MarshalJSON() ([]byte, error) {
2778	type NoMethod CommentThreadListResponse
2779	raw := NoMethod(*s)
2780	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2781}
2782
2783// CommentThreadReplies: Comments written in (direct or indirect) reply
2784// to the top level comment.
2785type CommentThreadReplies struct {
2786	// Comments: A limited number of replies. Unless the number of replies
2787	// returned equals total_reply_count in the snippet the returned replies
2788	// are only a subset of the total number of replies.
2789	Comments []*Comment `json:"comments,omitempty"`
2790
2791	// ForceSendFields is a list of field names (e.g. "Comments") to
2792	// unconditionally include in API requests. By default, fields with
2793	// empty values are omitted from API requests. However, any non-pointer,
2794	// non-interface field appearing in ForceSendFields will be sent to the
2795	// server regardless of whether the field is empty or not. This may be
2796	// used to include empty fields in Patch requests.
2797	ForceSendFields []string `json:"-"`
2798
2799	// NullFields is a list of field names (e.g. "Comments") to include in
2800	// API requests with the JSON null value. By default, fields with empty
2801	// values are omitted from API requests. However, any field with an
2802	// empty value appearing in NullFields will be sent to the server as
2803	// null. It is an error if a field in this list has a non-empty value.
2804	// This may be used to include null fields in Patch requests.
2805	NullFields []string `json:"-"`
2806}
2807
2808func (s *CommentThreadReplies) MarshalJSON() ([]byte, error) {
2809	type NoMethod CommentThreadReplies
2810	raw := NoMethod(*s)
2811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2812}
2813
2814// CommentThreadSnippet: Basic details about a comment thread.
2815type CommentThreadSnippet struct {
2816	// CanReply: Whether the current viewer of the thread can reply to it.
2817	// This is viewer specific - other viewers may see a different value for
2818	// this field.
2819	CanReply bool `json:"canReply,omitempty"`
2820
2821	// ChannelId: The YouTube channel the comments in the thread refer to or
2822	// the channel with the video the comments refer to. If video_id isn't
2823	// set the comments refer to the channel itself.
2824	ChannelId string `json:"channelId,omitempty"`
2825
2826	// IsPublic: Whether the thread (and therefore all its comments) is
2827	// visible to all YouTube users.
2828	IsPublic bool `json:"isPublic,omitempty"`
2829
2830	// TopLevelComment: The top level comment of this thread.
2831	TopLevelComment *Comment `json:"topLevelComment,omitempty"`
2832
2833	// TotalReplyCount: The total number of replies (not including the top
2834	// level comment).
2835	TotalReplyCount int64 `json:"totalReplyCount,omitempty"`
2836
2837	// VideoId: The ID of the video the comments refer to, if any. No
2838	// video_id implies a channel discussion comment.
2839	VideoId string `json:"videoId,omitempty"`
2840
2841	// ForceSendFields is a list of field names (e.g. "CanReply") to
2842	// unconditionally include in API requests. By default, fields with
2843	// empty values are omitted from API requests. However, any non-pointer,
2844	// non-interface field appearing in ForceSendFields will be sent to the
2845	// server regardless of whether the field is empty or not. This may be
2846	// used to include empty fields in Patch requests.
2847	ForceSendFields []string `json:"-"`
2848
2849	// NullFields is a list of field names (e.g. "CanReply") to include in
2850	// API requests with the JSON null value. By default, fields with empty
2851	// values are omitted from API requests. However, any field with an
2852	// empty value appearing in NullFields will be sent to the server as
2853	// null. It is an error if a field in this list has a non-empty value.
2854	// This may be used to include null fields in Patch requests.
2855	NullFields []string `json:"-"`
2856}
2857
2858func (s *CommentThreadSnippet) MarshalJSON() ([]byte, error) {
2859	type NoMethod CommentThreadSnippet
2860	raw := NoMethod(*s)
2861	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2862}
2863
2864// ContentRating: Ratings schemes. The country-specific ratings are
2865// mostly for movies and shows. NEXT_ID: 71
2866type ContentRating struct {
2867	// AcbRating: The video's Australian Classification Board (ACB) or
2868	// Australian Communications and Media Authority (ACMA) rating. ACMA
2869	// ratings are used to classify children's television programming.
2870	//
2871	// Possible values:
2872	//   "acbC"
2873	//   "acbE"
2874	//   "acbG"
2875	//   "acbM"
2876	//   "acbMa15plus"
2877	//   "acbP"
2878	//   "acbPg"
2879	//   "acbR18plus"
2880	//   "acbUnrated"
2881	AcbRating string `json:"acbRating,omitempty"`
2882
2883	// AgcomRating: The video's rating from Italy's Autorità per le
2884	// Garanzie nelle Comunicazioni (AGCOM).
2885	//
2886	// Possible values:
2887	//   "agcomT"
2888	//   "agcomUnrated"
2889	//   "agcomVm14"
2890	//   "agcomVm18"
2891	AgcomRating string `json:"agcomRating,omitempty"`
2892
2893	// AnatelRating: The video's Anatel (Asociación Nacional de
2894	// Televisión) rating for Chilean television.
2895	//
2896	// Possible values:
2897	//   "anatelA"
2898	//   "anatelF"
2899	//   "anatelI"
2900	//   "anatelI10"
2901	//   "anatelI12"
2902	//   "anatelI7"
2903	//   "anatelR"
2904	//   "anatelUnrated"
2905	AnatelRating string `json:"anatelRating,omitempty"`
2906
2907	// BbfcRating: The video's British Board of Film Classification (BBFC)
2908	// rating.
2909	//
2910	// Possible values:
2911	//   "bbfc12"
2912	//   "bbfc12a"
2913	//   "bbfc15"
2914	//   "bbfc18"
2915	//   "bbfcPg"
2916	//   "bbfcR18"
2917	//   "bbfcU"
2918	//   "bbfcUnrated"
2919	BbfcRating string `json:"bbfcRating,omitempty"`
2920
2921	// BfvcRating: The video's rating from Thailand's Board of Film and
2922	// Video Censors.
2923	//
2924	// Possible values:
2925	//   "bfvc13"
2926	//   "bfvc15"
2927	//   "bfvc18"
2928	//   "bfvc20"
2929	//   "bfvcB"
2930	//   "bfvcE"
2931	//   "bfvcG"
2932	//   "bfvcUnrated"
2933	BfvcRating string `json:"bfvcRating,omitempty"`
2934
2935	// BmukkRating: The video's rating from the Austrian Board of Media
2936	// Classification (Bundesministerium für Unterricht, Kunst und Kultur).
2937	//
2938	// Possible values:
2939	//   "bmukk10"
2940	//   "bmukk12"
2941	//   "bmukk14"
2942	//   "bmukk16"
2943	//   "bmukk6"
2944	//   "bmukk8"
2945	//   "bmukkAa"
2946	//   "bmukkUnrated"
2947	BmukkRating string `json:"bmukkRating,omitempty"`
2948
2949	// CatvRating: Rating system for Canadian TV - Canadian TV
2950	// Classification System The video's rating from the Canadian
2951	// Radio-Television and Telecommunications Commission (CRTC) for
2952	// Canadian English-language broadcasts. For more information, see the
2953	// Canadian Broadcast Standards Council website.
2954	//
2955	// Possible values:
2956	//   "catv14plus"
2957	//   "catv18plus"
2958	//   "catvC"
2959	//   "catvC8"
2960	//   "catvG"
2961	//   "catvPg"
2962	//   "catvUnrated"
2963	CatvRating string `json:"catvRating,omitempty"`
2964
2965	// CatvfrRating: The video's rating from the Canadian Radio-Television
2966	// and Telecommunications Commission (CRTC) for Canadian French-language
2967	// broadcasts. For more information, see the Canadian Broadcast
2968	// Standards Council website.
2969	//
2970	// Possible values:
2971	//   "catvfr13plus"
2972	//   "catvfr16plus"
2973	//   "catvfr18plus"
2974	//   "catvfr8plus"
2975	//   "catvfrG"
2976	//   "catvfrUnrated"
2977	CatvfrRating string `json:"catvfrRating,omitempty"`
2978
2979	// CbfcRating: The video's Central Board of Film Certification (CBFC -
2980	// India) rating.
2981	//
2982	// Possible values:
2983	//   "cbfcA"
2984	//   "cbfcS"
2985	//   "cbfcU"
2986	//   "cbfcUA"
2987	//   "cbfcUnrated"
2988	CbfcRating string `json:"cbfcRating,omitempty"`
2989
2990	// CccRating: The video's Consejo de Calificación Cinematográfica
2991	// (Chile) rating.
2992	//
2993	// Possible values:
2994	//   "ccc14"
2995	//   "ccc18"
2996	//   "ccc18s"
2997	//   "ccc18v"
2998	//   "ccc6"
2999	//   "cccTe"
3000	//   "cccUnrated"
3001	CccRating string `json:"cccRating,omitempty"`
3002
3003	// CceRating: The video's rating from Portugal's Comissão de
3004	// Classificação de Espect´culos.
3005	//
3006	// Possible values:
3007	//   "cceM12"
3008	//   "cceM14"
3009	//   "cceM16"
3010	//   "cceM18"
3011	//   "cceM4"
3012	//   "cceM6"
3013	//   "cceUnrated"
3014	CceRating string `json:"cceRating,omitempty"`
3015
3016	// ChfilmRating: The video's rating in Switzerland.
3017	//
3018	// Possible values:
3019	//   "chfilm0"
3020	//   "chfilm12"
3021	//   "chfilm16"
3022	//   "chfilm18"
3023	//   "chfilm6"
3024	//   "chfilmUnrated"
3025	ChfilmRating string `json:"chfilmRating,omitempty"`
3026
3027	// ChvrsRating: The video's Canadian Home Video Rating System (CHVRS)
3028	// rating.
3029	//
3030	// Possible values:
3031	//   "chvrs14a"
3032	//   "chvrs18a"
3033	//   "chvrsE"
3034	//   "chvrsG"
3035	//   "chvrsPg"
3036	//   "chvrsR"
3037	//   "chvrsUnrated"
3038	ChvrsRating string `json:"chvrsRating,omitempty"`
3039
3040	// CicfRating: The video's rating from the Commission de Contrôle des
3041	// Films (Belgium).
3042	//
3043	// Possible values:
3044	//   "cicfE"
3045	//   "cicfKntEna"
3046	//   "cicfKtEa"
3047	//   "cicfUnrated"
3048	CicfRating string `json:"cicfRating,omitempty"`
3049
3050	// CnaRating: The video's rating from Romania's CONSILIUL NATIONAL AL
3051	// AUDIOVIZUALULUI (CNA).
3052	//
3053	// Possible values:
3054	//   "cna12"
3055	//   "cna15"
3056	//   "cna18"
3057	//   "cna18plus"
3058	//   "cnaAp"
3059	//   "cnaUnrated"
3060	CnaRating string `json:"cnaRating,omitempty"`
3061
3062	// CncRating: Rating system in France - Commission de classification
3063	// cinematographique
3064	//
3065	// Possible values:
3066	//   "cnc10"
3067	//   "cnc12"
3068	//   "cnc16"
3069	//   "cnc18"
3070	//   "cncE"
3071	//   "cncInterdiction"
3072	//   "cncT"
3073	//   "cncUnrated"
3074	CncRating string `json:"cncRating,omitempty"`
3075
3076	// CsaRating: The video's rating from France's Conseil supérieur de
3077	// l?audiovisuel, which rates broadcast content.
3078	//
3079	// Possible values:
3080	//   "csa10"
3081	//   "csa12"
3082	//   "csa16"
3083	//   "csa18"
3084	//   "csaInterdiction"
3085	//   "csaT"
3086	//   "csaUnrated"
3087	CsaRating string `json:"csaRating,omitempty"`
3088
3089	// CscfRating: The video's rating from Luxembourg's Commission de
3090	// surveillance de la classification des films (CSCF).
3091	//
3092	// Possible values:
3093	//   "cscf12"
3094	//   "cscf16"
3095	//   "cscf18"
3096	//   "cscf6"
3097	//   "cscf9"
3098	//   "cscfA"
3099	//   "cscfAl"
3100	//   "cscfUnrated"
3101	CscfRating string `json:"cscfRating,omitempty"`
3102
3103	// CzfilmRating: The video's rating in the Czech Republic.
3104	//
3105	// Possible values:
3106	//   "czfilm12"
3107	//   "czfilm14"
3108	//   "czfilm18"
3109	//   "czfilmU"
3110	//   "czfilmUnrated"
3111	CzfilmRating string `json:"czfilmRating,omitempty"`
3112
3113	// DjctqRating: The video's Departamento de Justiça, Classificação,
3114	// Qualificação e Títulos (DJCQT - Brazil) rating.
3115	//
3116	// Possible values:
3117	//   "djctq10"
3118	//   "djctq1012"
3119	//   "djctq1014"
3120	//   "djctq1016"
3121	//   "djctq1018"
3122	//   "djctq12"
3123	//   "djctq1214"
3124	//   "djctq1216"
3125	//   "djctq1218"
3126	//   "djctq14"
3127	//   "djctq1416"
3128	//   "djctq1418"
3129	//   "djctq16"
3130	//   "djctq1618"
3131	//   "djctq18"
3132	//   "djctqEr"
3133	//   "djctqL"
3134	//   "djctqL10"
3135	//   "djctqL12"
3136	//   "djctqL14"
3137	//   "djctqL16"
3138	//   "djctqL18"
3139	//   "djctqUnrated"
3140	DjctqRating string `json:"djctqRating,omitempty"`
3141
3142	// DjctqRatingReasons: Reasons that explain why the video received its
3143	// DJCQT (Brazil) rating.
3144	//
3145	// Possible values:
3146	//   "djctqCriminalActs"
3147	//   "djctqDrugs"
3148	//   "djctqExplicitSex"
3149	//   "djctqExtremeViolence"
3150	//   "djctqIllegalDrugs"
3151	//   "djctqImpactingContent"
3152	//   "djctqInappropriateLanguage"
3153	//   "djctqLegalDrugs"
3154	//   "djctqNudity"
3155	//   "djctqSex"
3156	//   "djctqSexualContent"
3157	//   "djctqViolence"
3158	DjctqRatingReasons []string `json:"djctqRatingReasons,omitempty"`
3159
3160	// EcbmctRating: Rating system in Turkey - Evaluation and Classification
3161	// Board of the Ministry of Culture and Tourism
3162	//
3163	// Possible values:
3164	//   "ecbmct13a"
3165	//   "ecbmct13plus"
3166	//   "ecbmct15a"
3167	//   "ecbmct15plus"
3168	//   "ecbmct18plus"
3169	//   "ecbmct7a"
3170	//   "ecbmct7plus"
3171	//   "ecbmctG"
3172	//   "ecbmctUnrated"
3173	EcbmctRating string `json:"ecbmctRating,omitempty"`
3174
3175	// EefilmRating: The video's rating in Estonia.
3176	//
3177	// Possible values:
3178	//   "eefilmK12"
3179	//   "eefilmK14"
3180	//   "eefilmK16"
3181	//   "eefilmK6"
3182	//   "eefilmL"
3183	//   "eefilmMs12"
3184	//   "eefilmMs6"
3185	//   "eefilmPere"
3186	//   "eefilmUnrated"
3187	EefilmRating string `json:"eefilmRating,omitempty"`
3188
3189	// EgfilmRating: The video's rating in Egypt.
3190	//
3191	// Possible values:
3192	//   "egfilm18"
3193	//   "egfilmBn"
3194	//   "egfilmGn"
3195	//   "egfilmUnrated"
3196	EgfilmRating string `json:"egfilmRating,omitempty"`
3197
3198	// EirinRating: The video's Eirin (映倫) rating. Eirin is the Japanese
3199	// rating system.
3200	//
3201	// Possible values:
3202	//   "eirinG"
3203	//   "eirinPg12"
3204	//   "eirinR15plus"
3205	//   "eirinR18plus"
3206	//   "eirinUnrated"
3207	EirinRating string `json:"eirinRating,omitempty"`
3208
3209	// FcbmRating: The video's rating from Malaysia's Film Censorship Board.
3210	//
3211	// Possible values:
3212	//   "fcbm18"
3213	//   "fcbm18pa"
3214	//   "fcbm18pl"
3215	//   "fcbm18sg"
3216	//   "fcbm18sx"
3217	//   "fcbmP13"
3218	//   "fcbmPg13"
3219	//   "fcbmU"
3220	//   "fcbmUnrated"
3221	FcbmRating string `json:"fcbmRating,omitempty"`
3222
3223	// FcoRating: The video's rating from Hong Kong's Office for Film,
3224	// Newspaper and Article Administration.
3225	//
3226	// Possible values:
3227	//   "fcoI"
3228	//   "fcoIi"
3229	//   "fcoIia"
3230	//   "fcoIib"
3231	//   "fcoIii"
3232	//   "fcoUnrated"
3233	FcoRating string `json:"fcoRating,omitempty"`
3234
3235	// FmocRating: This property has been deprecated. Use the
3236	// contentDetails.contentRating.cncRating instead.
3237	//
3238	// Possible values:
3239	//   "fmoc10"
3240	//   "fmoc12"
3241	//   "fmoc16"
3242	//   "fmoc18"
3243	//   "fmocE"
3244	//   "fmocU"
3245	//   "fmocUnrated"
3246	FmocRating string `json:"fmocRating,omitempty"`
3247
3248	// FpbRating: The video's rating from South Africa's Film and
3249	// Publication Board.
3250	//
3251	// Possible values:
3252	//   "fpb10"
3253	//   "fpb1012Pg"
3254	//   "fpb13"
3255	//   "fpb16"
3256	//   "fpb18"
3257	//   "fpb79Pg"
3258	//   "fpbA"
3259	//   "fpbPg"
3260	//   "fpbUnrated"
3261	//   "fpbX18"
3262	//   "fpbXx"
3263	FpbRating string `json:"fpbRating,omitempty"`
3264
3265	// FpbRatingReasons: Reasons that explain why the video received its FPB
3266	// (South Africa) rating.
3267	//
3268	// Possible values:
3269	//   "fpbBlasphemy"
3270	//   "fpbCriminalTechniques"
3271	//   "fpbDrugs"
3272	//   "fpbHorror"
3273	//   "fpbImitativeActsTechniques"
3274	//   "fpbLanguage"
3275	//   "fpbNudity"
3276	//   "fpbPrejudice"
3277	//   "fpbSex"
3278	//   "fpbSexualViolence"
3279	//   "fpbViolence"
3280	FpbRatingReasons []string `json:"fpbRatingReasons,omitempty"`
3281
3282	// FskRating: The video's Freiwillige Selbstkontrolle der Filmwirtschaft
3283	// (FSK - Germany) rating.
3284	//
3285	// Possible values:
3286	//   "fsk0"
3287	//   "fsk12"
3288	//   "fsk16"
3289	//   "fsk18"
3290	//   "fsk6"
3291	//   "fskUnrated"
3292	FskRating string `json:"fskRating,omitempty"`
3293
3294	// GrfilmRating: The video's rating in Greece.
3295	//
3296	// Possible values:
3297	//   "grfilmE"
3298	//   "grfilmK"
3299	//   "grfilmK12"
3300	//   "grfilmK13"
3301	//   "grfilmK15"
3302	//   "grfilmK17"
3303	//   "grfilmK18"
3304	//   "grfilmUnrated"
3305	GrfilmRating string `json:"grfilmRating,omitempty"`
3306
3307	// IcaaRating: The video's Instituto de la Cinematografía y de las
3308	// Artes Audiovisuales (ICAA - Spain) rating.
3309	//
3310	// Possible values:
3311	//   "icaa12"
3312	//   "icaa13"
3313	//   "icaa16"
3314	//   "icaa18"
3315	//   "icaa7"
3316	//   "icaaApta"
3317	//   "icaaUnrated"
3318	//   "icaaX"
3319	IcaaRating string `json:"icaaRating,omitempty"`
3320
3321	// IfcoRating: The video's Irish Film Classification Office (IFCO -
3322	// Ireland) rating. See the IFCO website for more information.
3323	//
3324	// Possible values:
3325	//   "ifco12"
3326	//   "ifco12a"
3327	//   "ifco15"
3328	//   "ifco15a"
3329	//   "ifco16"
3330	//   "ifco18"
3331	//   "ifcoG"
3332	//   "ifcoPg"
3333	//   "ifcoUnrated"
3334	IfcoRating string `json:"ifcoRating,omitempty"`
3335
3336	// IlfilmRating: The video's rating in Israel.
3337	//
3338	// Possible values:
3339	//   "ilfilm12"
3340	//   "ilfilm14"
3341	//   "ilfilm16"
3342	//   "ilfilm18"
3343	//   "ilfilmAa"
3344	//   "ilfilmUnrated"
3345	IlfilmRating string `json:"ilfilmRating,omitempty"`
3346
3347	// IncaaRating: The video's INCAA (Instituto Nacional de Cine y Artes
3348	// Audiovisuales - Argentina) rating.
3349	//
3350	// Possible values:
3351	//   "incaaAtp"
3352	//   "incaaC"
3353	//   "incaaSam13"
3354	//   "incaaSam16"
3355	//   "incaaSam18"
3356	//   "incaaUnrated"
3357	IncaaRating string `json:"incaaRating,omitempty"`
3358
3359	// KfcbRating: The video's rating from the Kenya Film Classification
3360	// Board.
3361	//
3362	// Possible values:
3363	//   "kfcb16plus"
3364	//   "kfcbG"
3365	//   "kfcbPg"
3366	//   "kfcbR"
3367	//   "kfcbUnrated"
3368	KfcbRating string `json:"kfcbRating,omitempty"`
3369
3370	// KijkwijzerRating: voor de Classificatie van Audiovisuele Media
3371	// (Netherlands).
3372	//
3373	// Possible values:
3374	//   "kijkwijzer12"
3375	//   "kijkwijzer16"
3376	//   "kijkwijzer18"
3377	//   "kijkwijzer6"
3378	//   "kijkwijzer9"
3379	//   "kijkwijzerAl"
3380	//   "kijkwijzerUnrated"
3381	KijkwijzerRating string `json:"kijkwijzerRating,omitempty"`
3382
3383	// KmrbRating: The video's Korea Media Rating Board
3384	// (영상물등급위원회) rating. The KMRB rates videos in South
3385	// Korea.
3386	//
3387	// Possible values:
3388	//   "kmrb12plus"
3389	//   "kmrb15plus"
3390	//   "kmrbAll"
3391	//   "kmrbR"
3392	//   "kmrbTeenr"
3393	//   "kmrbUnrated"
3394	KmrbRating string `json:"kmrbRating,omitempty"`
3395
3396	// LsfRating: The video's rating from Indonesia's Lembaga Sensor Film.
3397	//
3398	// Possible values:
3399	//   "lsf13"
3400	//   "lsf17"
3401	//   "lsf21"
3402	//   "lsfA"
3403	//   "lsfBo"
3404	//   "lsfD"
3405	//   "lsfR"
3406	//   "lsfSu"
3407	//   "lsfUnrated"
3408	LsfRating string `json:"lsfRating,omitempty"`
3409
3410	// MccaaRating: The video's rating from Malta's Film Age-Classification
3411	// Board.
3412	//
3413	// Possible values:
3414	//   "mccaa12"
3415	//   "mccaa12a"
3416	//   "mccaa14"
3417	//   "mccaa15"
3418	//   "mccaa16"
3419	//   "mccaa18"
3420	//   "mccaaPg"
3421	//   "mccaaU"
3422	//   "mccaaUnrated"
3423	MccaaRating string `json:"mccaaRating,omitempty"`
3424
3425	// MccypRating: The video's rating from the Danish Film Institute's (Det
3426	// Danske Filminstitut) Media Council for Children and Young People.
3427	//
3428	// Possible values:
3429	//   "mccyp11"
3430	//   "mccyp15"
3431	//   "mccyp7"
3432	//   "mccypA"
3433	//   "mccypUnrated"
3434	MccypRating string `json:"mccypRating,omitempty"`
3435
3436	// McstRating: The video's rating system for Vietnam - MCST
3437	//
3438	// Possible values:
3439	//   "mcst0"
3440	//   "mcst16plus"
3441	//   "mcstC13"
3442	//   "mcstC16"
3443	//   "mcstC18"
3444	//   "mcstGPg"
3445	//   "mcstP"
3446	//   "mcstUnrated"
3447	McstRating string `json:"mcstRating,omitempty"`
3448
3449	// MdaRating: The video's rating from Singapore's Media Development
3450	// Authority (MDA) and, specifically, it's Board of Film Censors (BFC).
3451	//
3452	// Possible values:
3453	//   "mdaG"
3454	//   "mdaM18"
3455	//   "mdaNc16"
3456	//   "mdaPg"
3457	//   "mdaPg13"
3458	//   "mdaR21"
3459	//   "mdaUnrated"
3460	MdaRating string `json:"mdaRating,omitempty"`
3461
3462	// MedietilsynetRating: The video's rating from Medietilsynet, the
3463	// Norwegian Media Authority.
3464	//
3465	// Possible values:
3466	//   "medietilsynet11"
3467	//   "medietilsynet12"
3468	//   "medietilsynet15"
3469	//   "medietilsynet18"
3470	//   "medietilsynet6"
3471	//   "medietilsynet7"
3472	//   "medietilsynet9"
3473	//   "medietilsynetA"
3474	//   "medietilsynetUnrated"
3475	MedietilsynetRating string `json:"medietilsynetRating,omitempty"`
3476
3477	// MekuRating: The video's rating from Finland's Kansallinen
3478	// Audiovisuaalinen Instituutti (National Audiovisual Institute).
3479	//
3480	// Possible values:
3481	//   "meku12"
3482	//   "meku16"
3483	//   "meku18"
3484	//   "meku7"
3485	//   "mekuS"
3486	//   "mekuUnrated"
3487	MekuRating string `json:"mekuRating,omitempty"`
3488
3489	// MenaMpaaRating: The rating system for MENA countries, a clone of
3490	// MPAA. It is needed to
3491	//
3492	// Possible values:
3493	//   "menaMpaaG"
3494	//   "menaMpaaPg"
3495	//   "menaMpaaPg13"
3496	//   "menaMpaaR"
3497	//   "menaMpaaUnrated"
3498	MenaMpaaRating string `json:"menaMpaaRating,omitempty"`
3499
3500	// MibacRating: The video's rating from the Ministero dei Beni e delle
3501	// Attività Culturali e del Turismo (Italy).
3502	//
3503	// Possible values:
3504	//   "mibacT"
3505	//   "mibacUnrated"
3506	//   "mibacVap"
3507	//   "mibacVm12"
3508	//   "mibacVm14"
3509	//   "mibacVm18"
3510	MibacRating string `json:"mibacRating,omitempty"`
3511
3512	// MocRating: The video's Ministerio de Cultura (Colombia) rating.
3513	//
3514	// Possible values:
3515	//   "moc12"
3516	//   "moc15"
3517	//   "moc18"
3518	//   "moc7"
3519	//   "mocBanned"
3520	//   "mocE"
3521	//   "mocT"
3522	//   "mocUnrated"
3523	//   "mocX"
3524	MocRating string `json:"mocRating,omitempty"`
3525
3526	// MoctwRating: The video's rating from Taiwan's Ministry of Culture
3527	// (文化部).
3528	//
3529	// Possible values:
3530	//   "moctwG"
3531	//   "moctwP"
3532	//   "moctwPg"
3533	//   "moctwR"
3534	//   "moctwR12"
3535	//   "moctwR15"
3536	//   "moctwUnrated"
3537	MoctwRating string `json:"moctwRating,omitempty"`
3538
3539	// MpaaRating: The video's Motion Picture Association of America (MPAA)
3540	// rating.
3541	//
3542	// Possible values:
3543	//   "mpaaG"
3544	//   "mpaaNc17"
3545	//   "mpaaPg"
3546	//   "mpaaPg13"
3547	//   "mpaaR"
3548	//   "mpaaUnrated"
3549	//   "mpaaX"
3550	MpaaRating string `json:"mpaaRating,omitempty"`
3551
3552	// MpaatRating: The rating system for trailer, DVD, and Ad in the US.
3553	// See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html.
3554	//
3555	// Possible values:
3556	//   "mpaatGb"
3557	//   "mpaatRb"
3558	MpaatRating string `json:"mpaatRating,omitempty"`
3559
3560	// MtrcbRating: The video's rating from the Movie and Television Review
3561	// and Classification Board (Philippines).
3562	//
3563	// Possible values:
3564	//   "mtrcbG"
3565	//   "mtrcbPg"
3566	//   "mtrcbR13"
3567	//   "mtrcbR16"
3568	//   "mtrcbR18"
3569	//   "mtrcbUnrated"
3570	//   "mtrcbX"
3571	MtrcbRating string `json:"mtrcbRating,omitempty"`
3572
3573	// NbcRating: The video's rating from the Maldives National Bureau of
3574	// Classification.
3575	//
3576	// Possible values:
3577	//   "nbc12plus"
3578	//   "nbc15plus"
3579	//   "nbc18plus"
3580	//   "nbc18plusr"
3581	//   "nbcG"
3582	//   "nbcPg"
3583	//   "nbcPu"
3584	//   "nbcUnrated"
3585	NbcRating string `json:"nbcRating,omitempty"`
3586
3587	// NbcplRating: The video's rating in Poland.
3588	//
3589	// Possible values:
3590	//   "nbcpl18plus"
3591	//   "nbcplI"
3592	//   "nbcplIi"
3593	//   "nbcplIii"
3594	//   "nbcplIv"
3595	//   "nbcplUnrated"
3596	NbcplRating string `json:"nbcplRating,omitempty"`
3597
3598	// NfrcRating: The video's rating from the Bulgarian National Film
3599	// Center.
3600	//
3601	// Possible values:
3602	//   "nfrcA"
3603	//   "nfrcB"
3604	//   "nfrcC"
3605	//   "nfrcD"
3606	//   "nfrcUnrated"
3607	//   "nfrcX"
3608	NfrcRating string `json:"nfrcRating,omitempty"`
3609
3610	// NfvcbRating: The video's rating from Nigeria's National Film and
3611	// Video Censors Board.
3612	//
3613	// Possible values:
3614	//   "nfvcb12"
3615	//   "nfvcb12a"
3616	//   "nfvcb15"
3617	//   "nfvcb18"
3618	//   "nfvcbG"
3619	//   "nfvcbPg"
3620	//   "nfvcbRe"
3621	//   "nfvcbUnrated"
3622	NfvcbRating string `json:"nfvcbRating,omitempty"`
3623
3624	// NkclvRating: The video's rating from the Nacionãlais Kino centrs
3625	// (National Film Centre of Latvia).
3626	//
3627	// Possible values:
3628	//   "nkclv12plus"
3629	//   "nkclv18plus"
3630	//   "nkclv7plus"
3631	//   "nkclvU"
3632	//   "nkclvUnrated"
3633	NkclvRating string `json:"nkclvRating,omitempty"`
3634
3635	// OflcRating: The video's Office of Film and Literature Classification
3636	// (OFLC - New Zealand) rating.
3637	//
3638	// Possible values:
3639	//   "oflcG"
3640	//   "oflcM"
3641	//   "oflcPg"
3642	//   "oflcR13"
3643	//   "oflcR15"
3644	//   "oflcR16"
3645	//   "oflcR18"
3646	//   "oflcRp13"
3647	//   "oflcRp16"
3648	//   "oflcRp18"
3649	//   "oflcUnrated"
3650	OflcRating string `json:"oflcRating,omitempty"`
3651
3652	// PefilmRating: The video's rating in Peru.
3653	//
3654	// Possible values:
3655	//   "pefilm14"
3656	//   "pefilm18"
3657	//   "pefilmPg"
3658	//   "pefilmPt"
3659	//   "pefilmUnrated"
3660	PefilmRating string `json:"pefilmRating,omitempty"`
3661
3662	// RcnofRating: The video's rating from the Hungarian Nemzeti Filmiroda,
3663	// the Rating Committee of the National Office of Film.
3664	//
3665	// Possible values:
3666	//   "rcnofI"
3667	//   "rcnofIi"
3668	//   "rcnofIii"
3669	//   "rcnofIv"
3670	//   "rcnofUnrated"
3671	//   "rcnofV"
3672	//   "rcnofVi"
3673	RcnofRating string `json:"rcnofRating,omitempty"`
3674
3675	// ResorteviolenciaRating: The video's rating in Venezuela.
3676	//
3677	// Possible values:
3678	//   "resorteviolenciaA"
3679	//   "resorteviolenciaB"
3680	//   "resorteviolenciaC"
3681	//   "resorteviolenciaD"
3682	//   "resorteviolenciaE"
3683	//   "resorteviolenciaUnrated"
3684	ResorteviolenciaRating string `json:"resorteviolenciaRating,omitempty"`
3685
3686	// RtcRating: The video's General Directorate of Radio, Television and
3687	// Cinematography (Mexico) rating.
3688	//
3689	// Possible values:
3690	//   "rtcA"
3691	//   "rtcAa"
3692	//   "rtcB"
3693	//   "rtcB15"
3694	//   "rtcC"
3695	//   "rtcD"
3696	//   "rtcUnrated"
3697	RtcRating string `json:"rtcRating,omitempty"`
3698
3699	// RteRating: The video's rating from Ireland's Raidió Teilifís
3700	// Éireann.
3701	//
3702	// Possible values:
3703	//   "rteCh"
3704	//   "rteGa"
3705	//   "rteMa"
3706	//   "rtePs"
3707	//   "rteUnrated"
3708	RteRating string `json:"rteRating,omitempty"`
3709
3710	// RussiaRating: The video's National Film Registry of the Russian
3711	// Federation (MKRF - Russia) rating.
3712	//
3713	// Possible values:
3714	//   "russia0"
3715	//   "russia12"
3716	//   "russia16"
3717	//   "russia18"
3718	//   "russia6"
3719	//   "russiaUnrated"
3720	RussiaRating string `json:"russiaRating,omitempty"`
3721
3722	// SkfilmRating: The video's rating in Slovakia.
3723	//
3724	// Possible values:
3725	//   "skfilmG"
3726	//   "skfilmP2"
3727	//   "skfilmP5"
3728	//   "skfilmP8"
3729	//   "skfilmUnrated"
3730	SkfilmRating string `json:"skfilmRating,omitempty"`
3731
3732	// SmaisRating: The video's rating in Iceland.
3733	//
3734	// Possible values:
3735	//   "smais12"
3736	//   "smais14"
3737	//   "smais16"
3738	//   "smais18"
3739	//   "smais7"
3740	//   "smaisL"
3741	//   "smaisUnrated"
3742	SmaisRating string `json:"smaisRating,omitempty"`
3743
3744	// SmsaRating: The video's rating from Statens medieråd (Sweden's
3745	// National Media Council).
3746	//
3747	// Possible values:
3748	//   "smsa11"
3749	//   "smsa15"
3750	//   "smsa7"
3751	//   "smsaA"
3752	//   "smsaUnrated"
3753	SmsaRating string `json:"smsaRating,omitempty"`
3754
3755	// TvpgRating: The video's TV Parental Guidelines (TVPG) rating.
3756	//
3757	// Possible values:
3758	//   "pg14"
3759	//   "tvpgG"
3760	//   "tvpgMa"
3761	//   "tvpgPg"
3762	//   "tvpgUnrated"
3763	//   "tvpgY"
3764	//   "tvpgY7"
3765	//   "tvpgY7Fv"
3766	TvpgRating string `json:"tvpgRating,omitempty"`
3767
3768	// YtRating: A rating that YouTube uses to identify age-restricted
3769	// content.
3770	//
3771	// Possible values:
3772	//   "ytAgeRestricted"
3773	YtRating string `json:"ytRating,omitempty"`
3774
3775	// ForceSendFields is a list of field names (e.g. "AcbRating") to
3776	// unconditionally include in API requests. By default, fields with
3777	// empty values are omitted from API requests. However, any non-pointer,
3778	// non-interface field appearing in ForceSendFields will be sent to the
3779	// server regardless of whether the field is empty or not. This may be
3780	// used to include empty fields in Patch requests.
3781	ForceSendFields []string `json:"-"`
3782
3783	// NullFields is a list of field names (e.g. "AcbRating") to include in
3784	// API requests with the JSON null value. By default, fields with empty
3785	// values are omitted from API requests. However, any field with an
3786	// empty value appearing in NullFields will be sent to the server as
3787	// null. It is an error if a field in this list has a non-empty value.
3788	// This may be used to include null fields in Patch requests.
3789	NullFields []string `json:"-"`
3790}
3791
3792func (s *ContentRating) MarshalJSON() ([]byte, error) {
3793	type NoMethod ContentRating
3794	raw := NoMethod(*s)
3795	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3796}
3797
3798// GeoPoint: Geographical coordinates of a point, in WGS84.
3799type GeoPoint struct {
3800	// Altitude: Altitude above the reference ellipsoid, in meters.
3801	Altitude float64 `json:"altitude,omitempty"`
3802
3803	// Latitude: Latitude in degrees.
3804	Latitude float64 `json:"latitude,omitempty"`
3805
3806	// Longitude: Longitude in degrees.
3807	Longitude float64 `json:"longitude,omitempty"`
3808
3809	// ForceSendFields is a list of field names (e.g. "Altitude") to
3810	// unconditionally include in API requests. By default, fields with
3811	// empty values are omitted from API requests. However, any non-pointer,
3812	// non-interface field appearing in ForceSendFields will be sent to the
3813	// server regardless of whether the field is empty or not. This may be
3814	// used to include empty fields in Patch requests.
3815	ForceSendFields []string `json:"-"`
3816
3817	// NullFields is a list of field names (e.g. "Altitude") to include in
3818	// API requests with the JSON null value. By default, fields with empty
3819	// values are omitted from API requests. However, any field with an
3820	// empty value appearing in NullFields will be sent to the server as
3821	// null. It is an error if a field in this list has a non-empty value.
3822	// This may be used to include null fields in Patch requests.
3823	NullFields []string `json:"-"`
3824}
3825
3826func (s *GeoPoint) MarshalJSON() ([]byte, error) {
3827	type NoMethod GeoPoint
3828	raw := NoMethod(*s)
3829	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3830}
3831
3832func (s *GeoPoint) UnmarshalJSON(data []byte) error {
3833	type NoMethod GeoPoint
3834	var s1 struct {
3835		Altitude  gensupport.JSONFloat64 `json:"altitude"`
3836		Latitude  gensupport.JSONFloat64 `json:"latitude"`
3837		Longitude gensupport.JSONFloat64 `json:"longitude"`
3838		*NoMethod
3839	}
3840	s1.NoMethod = (*NoMethod)(s)
3841	if err := json.Unmarshal(data, &s1); err != nil {
3842		return err
3843	}
3844	s.Altitude = float64(s1.Altitude)
3845	s.Latitude = float64(s1.Latitude)
3846	s.Longitude = float64(s1.Longitude)
3847	return nil
3848}
3849
3850// GuideCategory: A guideCategory resource identifies a category that
3851// YouTube algorithmically assigns based on a channel's content or other
3852// indicators, such as the channel's popularity. The list is similar to
3853// video categories, with the difference being that a video's uploader
3854// can assign a video category but only YouTube can assign a channel
3855// category.
3856type GuideCategory struct {
3857	// Etag: Etag of this resource.
3858	Etag string `json:"etag,omitempty"`
3859
3860	// Id: The ID that YouTube uses to uniquely identify the guide category.
3861	Id string `json:"id,omitempty"`
3862
3863	// Kind: Identifies what kind of resource this is. Value: the fixed
3864	// string "youtube#guideCategory".
3865	Kind string `json:"kind,omitempty"`
3866
3867	// Snippet: The snippet object contains basic details about the
3868	// category, such as its title.
3869	Snippet *GuideCategorySnippet `json:"snippet,omitempty"`
3870
3871	// ForceSendFields is a list of field names (e.g. "Etag") to
3872	// unconditionally include in API requests. By default, fields with
3873	// empty values are omitted from API requests. However, any non-pointer,
3874	// non-interface field appearing in ForceSendFields will be sent to the
3875	// server regardless of whether the field is empty or not. This may be
3876	// used to include empty fields in Patch requests.
3877	ForceSendFields []string `json:"-"`
3878
3879	// NullFields is a list of field names (e.g. "Etag") to include in API
3880	// requests with the JSON null value. By default, fields with empty
3881	// values are omitted from API requests. However, any field with an
3882	// empty value appearing in NullFields will be sent to the server as
3883	// null. It is an error if a field in this list has a non-empty value.
3884	// This may be used to include null fields in Patch requests.
3885	NullFields []string `json:"-"`
3886}
3887
3888func (s *GuideCategory) MarshalJSON() ([]byte, error) {
3889	type NoMethod GuideCategory
3890	raw := NoMethod(*s)
3891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3892}
3893
3894type GuideCategoryListResponse struct {
3895	// Etag: Etag of this resource.
3896	Etag string `json:"etag,omitempty"`
3897
3898	// EventId: Serialized EventId of the request which produced this
3899	// response.
3900	EventId string `json:"eventId,omitempty"`
3901
3902	// Items: A list of categories that can be associated with YouTube
3903	// channels. In this map, the category ID is the map key, and its value
3904	// is the corresponding guideCategory resource.
3905	Items []*GuideCategory `json:"items,omitempty"`
3906
3907	// Kind: Identifies what kind of resource this is. Value: the fixed
3908	// string "youtube#guideCategoryListResponse".
3909	Kind string `json:"kind,omitempty"`
3910
3911	// NextPageToken: The token that can be used as the value of the
3912	// pageToken parameter to retrieve the next page in the result set.
3913	NextPageToken string `json:"nextPageToken,omitempty"`
3914
3915	PageInfo *PageInfo `json:"pageInfo,omitempty"`
3916
3917	// PrevPageToken: The token that can be used as the value of the
3918	// pageToken parameter to retrieve the previous page in the result set.
3919	PrevPageToken string `json:"prevPageToken,omitempty"`
3920
3921	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
3922
3923	// VisitorId: The visitorId identifies the visitor.
3924	VisitorId string `json:"visitorId,omitempty"`
3925
3926	// ServerResponse contains the HTTP response code and headers from the
3927	// server.
3928	googleapi.ServerResponse `json:"-"`
3929
3930	// ForceSendFields is a list of field names (e.g. "Etag") to
3931	// unconditionally include in API requests. By default, fields with
3932	// empty values are omitted from API requests. However, any non-pointer,
3933	// non-interface field appearing in ForceSendFields will be sent to the
3934	// server regardless of whether the field is empty or not. This may be
3935	// used to include empty fields in Patch requests.
3936	ForceSendFields []string `json:"-"`
3937
3938	// NullFields is a list of field names (e.g. "Etag") to include in API
3939	// requests with the JSON null value. By default, fields with empty
3940	// values are omitted from API requests. However, any field with an
3941	// empty value appearing in NullFields will be sent to the server as
3942	// null. It is an error if a field in this list has a non-empty value.
3943	// This may be used to include null fields in Patch requests.
3944	NullFields []string `json:"-"`
3945}
3946
3947func (s *GuideCategoryListResponse) MarshalJSON() ([]byte, error) {
3948	type NoMethod GuideCategoryListResponse
3949	raw := NoMethod(*s)
3950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3951}
3952
3953// GuideCategorySnippet: Basic details about a guide category.
3954type GuideCategorySnippet struct {
3955	ChannelId string `json:"channelId,omitempty"`
3956
3957	// Title: Description of the guide category.
3958	Title string `json:"title,omitempty"`
3959
3960	// ForceSendFields is a list of field names (e.g. "ChannelId") to
3961	// unconditionally include in API requests. By default, fields with
3962	// empty values are omitted from API requests. However, any non-pointer,
3963	// non-interface field appearing in ForceSendFields will be sent to the
3964	// server regardless of whether the field is empty or not. This may be
3965	// used to include empty fields in Patch requests.
3966	ForceSendFields []string `json:"-"`
3967
3968	// NullFields is a list of field names (e.g. "ChannelId") to include in
3969	// API requests with the JSON null value. By default, fields with empty
3970	// values are omitted from API requests. However, any field with an
3971	// empty value appearing in NullFields will be sent to the server as
3972	// null. It is an error if a field in this list has a non-empty value.
3973	// This may be used to include null fields in Patch requests.
3974	NullFields []string `json:"-"`
3975}
3976
3977func (s *GuideCategorySnippet) MarshalJSON() ([]byte, error) {
3978	type NoMethod GuideCategorySnippet
3979	raw := NoMethod(*s)
3980	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3981}
3982
3983// I18nLanguage: An i18nLanguage resource identifies a UI language
3984// currently supported by YouTube.
3985type I18nLanguage struct {
3986	// Etag: Etag of this resource.
3987	Etag string `json:"etag,omitempty"`
3988
3989	// Id: The ID that YouTube uses to uniquely identify the i18n language.
3990	Id string `json:"id,omitempty"`
3991
3992	// Kind: Identifies what kind of resource this is. Value: the fixed
3993	// string "youtube#i18nLanguage".
3994	Kind string `json:"kind,omitempty"`
3995
3996	// Snippet: The snippet object contains basic details about the i18n
3997	// language, such as language code and human-readable name.
3998	Snippet *I18nLanguageSnippet `json:"snippet,omitempty"`
3999
4000	// ForceSendFields is a list of field names (e.g. "Etag") to
4001	// unconditionally include in API requests. By default, fields with
4002	// empty values are omitted from API requests. However, any non-pointer,
4003	// non-interface field appearing in ForceSendFields will be sent to the
4004	// server regardless of whether the field is empty or not. This may be
4005	// used to include empty fields in Patch requests.
4006	ForceSendFields []string `json:"-"`
4007
4008	// NullFields is a list of field names (e.g. "Etag") to include in API
4009	// requests with the JSON null value. By default, fields with empty
4010	// values are omitted from API requests. However, any field with an
4011	// empty value appearing in NullFields will be sent to the server as
4012	// null. It is an error if a field in this list has a non-empty value.
4013	// This may be used to include null fields in Patch requests.
4014	NullFields []string `json:"-"`
4015}
4016
4017func (s *I18nLanguage) MarshalJSON() ([]byte, error) {
4018	type NoMethod I18nLanguage
4019	raw := NoMethod(*s)
4020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4021}
4022
4023type I18nLanguageListResponse struct {
4024	// Etag: Etag of this resource.
4025	Etag string `json:"etag,omitempty"`
4026
4027	// EventId: Serialized EventId of the request which produced this
4028	// response.
4029	EventId string `json:"eventId,omitempty"`
4030
4031	// Items: A list of supported i18n languages. In this map, the i18n
4032	// language ID is the map key, and its value is the corresponding
4033	// i18nLanguage resource.
4034	Items []*I18nLanguage `json:"items,omitempty"`
4035
4036	// Kind: Identifies what kind of resource this is. Value: the fixed
4037	// string "youtube#i18nLanguageListResponse".
4038	Kind string `json:"kind,omitempty"`
4039
4040	// VisitorId: The visitorId identifies the visitor.
4041	VisitorId string `json:"visitorId,omitempty"`
4042
4043	// ServerResponse contains the HTTP response code and headers from the
4044	// server.
4045	googleapi.ServerResponse `json:"-"`
4046
4047	// ForceSendFields is a list of field names (e.g. "Etag") to
4048	// unconditionally include in API requests. By default, fields with
4049	// empty values are omitted from API requests. However, any non-pointer,
4050	// non-interface field appearing in ForceSendFields will be sent to the
4051	// server regardless of whether the field is empty or not. This may be
4052	// used to include empty fields in Patch requests.
4053	ForceSendFields []string `json:"-"`
4054
4055	// NullFields is a list of field names (e.g. "Etag") to include in API
4056	// requests with the JSON null value. By default, fields with empty
4057	// values are omitted from API requests. However, any field with an
4058	// empty value appearing in NullFields will be sent to the server as
4059	// null. It is an error if a field in this list has a non-empty value.
4060	// This may be used to include null fields in Patch requests.
4061	NullFields []string `json:"-"`
4062}
4063
4064func (s *I18nLanguageListResponse) MarshalJSON() ([]byte, error) {
4065	type NoMethod I18nLanguageListResponse
4066	raw := NoMethod(*s)
4067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4068}
4069
4070// I18nLanguageSnippet: Basic details about an i18n language, such as
4071// language code and human-readable name.
4072type I18nLanguageSnippet struct {
4073	// Hl: A short BCP-47 code that uniquely identifies a language.
4074	Hl string `json:"hl,omitempty"`
4075
4076	// Name: The human-readable name of the language in the language itself.
4077	Name string `json:"name,omitempty"`
4078
4079	// ForceSendFields is a list of field names (e.g. "Hl") to
4080	// unconditionally include in API requests. By default, fields with
4081	// empty values are omitted from API requests. However, any non-pointer,
4082	// non-interface field appearing in ForceSendFields will be sent to the
4083	// server regardless of whether the field is empty or not. This may be
4084	// used to include empty fields in Patch requests.
4085	ForceSendFields []string `json:"-"`
4086
4087	// NullFields is a list of field names (e.g. "Hl") to include in API
4088	// requests with the JSON null value. By default, fields with empty
4089	// values are omitted from API requests. However, any field with an
4090	// empty value appearing in NullFields will be sent to the server as
4091	// null. It is an error if a field in this list has a non-empty value.
4092	// This may be used to include null fields in Patch requests.
4093	NullFields []string `json:"-"`
4094}
4095
4096func (s *I18nLanguageSnippet) MarshalJSON() ([]byte, error) {
4097	type NoMethod I18nLanguageSnippet
4098	raw := NoMethod(*s)
4099	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4100}
4101
4102// I18nRegion: A i18nRegion resource identifies a region where YouTube
4103// is available.
4104type I18nRegion struct {
4105	// Etag: Etag of this resource.
4106	Etag string `json:"etag,omitempty"`
4107
4108	// Id: The ID that YouTube uses to uniquely identify the i18n region.
4109	Id string `json:"id,omitempty"`
4110
4111	// Kind: Identifies what kind of resource this is. Value: the fixed
4112	// string "youtube#i18nRegion".
4113	Kind string `json:"kind,omitempty"`
4114
4115	// Snippet: The snippet object contains basic details about the i18n
4116	// region, such as region code and human-readable name.
4117	Snippet *I18nRegionSnippet `json:"snippet,omitempty"`
4118
4119	// ForceSendFields is a list of field names (e.g. "Etag") to
4120	// unconditionally include in API requests. By default, fields with
4121	// empty values are omitted from API requests. However, any non-pointer,
4122	// non-interface field appearing in ForceSendFields will be sent to the
4123	// server regardless of whether the field is empty or not. This may be
4124	// used to include empty fields in Patch requests.
4125	ForceSendFields []string `json:"-"`
4126
4127	// NullFields is a list of field names (e.g. "Etag") to include in API
4128	// requests with the JSON null value. By default, fields with empty
4129	// values are omitted from API requests. However, any field with an
4130	// empty value appearing in NullFields will be sent to the server as
4131	// null. It is an error if a field in this list has a non-empty value.
4132	// This may be used to include null fields in Patch requests.
4133	NullFields []string `json:"-"`
4134}
4135
4136func (s *I18nRegion) MarshalJSON() ([]byte, error) {
4137	type NoMethod I18nRegion
4138	raw := NoMethod(*s)
4139	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4140}
4141
4142type I18nRegionListResponse struct {
4143	// Etag: Etag of this resource.
4144	Etag string `json:"etag,omitempty"`
4145
4146	// EventId: Serialized EventId of the request which produced this
4147	// response.
4148	EventId string `json:"eventId,omitempty"`
4149
4150	// Items: A list of regions where YouTube is available. In this map, the
4151	// i18n region ID is the map key, and its value is the corresponding
4152	// i18nRegion resource.
4153	Items []*I18nRegion `json:"items,omitempty"`
4154
4155	// Kind: Identifies what kind of resource this is. Value: the fixed
4156	// string "youtube#i18nRegionListResponse".
4157	Kind string `json:"kind,omitempty"`
4158
4159	// VisitorId: The visitorId identifies the visitor.
4160	VisitorId string `json:"visitorId,omitempty"`
4161
4162	// ServerResponse contains the HTTP response code and headers from the
4163	// server.
4164	googleapi.ServerResponse `json:"-"`
4165
4166	// ForceSendFields is a list of field names (e.g. "Etag") to
4167	// unconditionally include in API requests. By default, fields with
4168	// empty values are omitted from API requests. However, any non-pointer,
4169	// non-interface field appearing in ForceSendFields will be sent to the
4170	// server regardless of whether the field is empty or not. This may be
4171	// used to include empty fields in Patch requests.
4172	ForceSendFields []string `json:"-"`
4173
4174	// NullFields is a list of field names (e.g. "Etag") to include in API
4175	// requests with the JSON null value. By default, fields with empty
4176	// values are omitted from API requests. However, any field with an
4177	// empty value appearing in NullFields will be sent to the server as
4178	// null. It is an error if a field in this list has a non-empty value.
4179	// This may be used to include null fields in Patch requests.
4180	NullFields []string `json:"-"`
4181}
4182
4183func (s *I18nRegionListResponse) MarshalJSON() ([]byte, error) {
4184	type NoMethod I18nRegionListResponse
4185	raw := NoMethod(*s)
4186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4187}
4188
4189// I18nRegionSnippet: Basic details about an i18n region, such as region
4190// code and human-readable name.
4191type I18nRegionSnippet struct {
4192	// Gl: The region code as a 2-letter ISO country code.
4193	Gl string `json:"gl,omitempty"`
4194
4195	// Name: The human-readable name of the region.
4196	Name string `json:"name,omitempty"`
4197
4198	// ForceSendFields is a list of field names (e.g. "Gl") to
4199	// unconditionally include in API requests. By default, fields with
4200	// empty values are omitted from API requests. However, any non-pointer,
4201	// non-interface field appearing in ForceSendFields will be sent to the
4202	// server regardless of whether the field is empty or not. This may be
4203	// used to include empty fields in Patch requests.
4204	ForceSendFields []string `json:"-"`
4205
4206	// NullFields is a list of field names (e.g. "Gl") to include in API
4207	// requests with the JSON null value. By default, fields with empty
4208	// values are omitted from API requests. However, any field with an
4209	// empty value appearing in NullFields will be sent to the server as
4210	// null. It is an error if a field in this list has a non-empty value.
4211	// This may be used to include null fields in Patch requests.
4212	NullFields []string `json:"-"`
4213}
4214
4215func (s *I18nRegionSnippet) MarshalJSON() ([]byte, error) {
4216	type NoMethod I18nRegionSnippet
4217	raw := NoMethod(*s)
4218	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4219}
4220
4221// ImageSettings: Branding properties for images associated with the
4222// channel.
4223type ImageSettings struct {
4224	// BackgroundImageUrl: The URL for the background image shown on the
4225	// video watch page. The image should be 1200px by 615px, with a maximum
4226	// file size of 128k.
4227	BackgroundImageUrl *LocalizedProperty `json:"backgroundImageUrl,omitempty"`
4228
4229	// BannerExternalUrl: This is used only in update requests; if it's set,
4230	// we use this URL to generate all of the above banner URLs.
4231	BannerExternalUrl string `json:"bannerExternalUrl,omitempty"`
4232
4233	// BannerImageUrl: Banner image. Desktop size (1060x175).
4234	BannerImageUrl string `json:"bannerImageUrl,omitempty"`
4235
4236	// BannerMobileExtraHdImageUrl: Banner image. Mobile size high
4237	// resolution (1440x395).
4238	BannerMobileExtraHdImageUrl string `json:"bannerMobileExtraHdImageUrl,omitempty"`
4239
4240	// BannerMobileHdImageUrl: Banner image. Mobile size high resolution
4241	// (1280x360).
4242	BannerMobileHdImageUrl string `json:"bannerMobileHdImageUrl,omitempty"`
4243
4244	// BannerMobileImageUrl: Banner image. Mobile size (640x175).
4245	BannerMobileImageUrl string `json:"bannerMobileImageUrl,omitempty"`
4246
4247	// BannerMobileLowImageUrl: Banner image. Mobile size low resolution
4248	// (320x88).
4249	BannerMobileLowImageUrl string `json:"bannerMobileLowImageUrl,omitempty"`
4250
4251	// BannerMobileMediumHdImageUrl: Banner image. Mobile size medium/high
4252	// resolution (960x263).
4253	BannerMobileMediumHdImageUrl string `json:"bannerMobileMediumHdImageUrl,omitempty"`
4254
4255	// BannerTabletExtraHdImageUrl: Banner image. Tablet size extra high
4256	// resolution (2560x424).
4257	BannerTabletExtraHdImageUrl string `json:"bannerTabletExtraHdImageUrl,omitempty"`
4258
4259	// BannerTabletHdImageUrl: Banner image. Tablet size high resolution
4260	// (2276x377).
4261	BannerTabletHdImageUrl string `json:"bannerTabletHdImageUrl,omitempty"`
4262
4263	// BannerTabletImageUrl: Banner image. Tablet size (1707x283).
4264	BannerTabletImageUrl string `json:"bannerTabletImageUrl,omitempty"`
4265
4266	// BannerTabletLowImageUrl: Banner image. Tablet size low resolution
4267	// (1138x188).
4268	BannerTabletLowImageUrl string `json:"bannerTabletLowImageUrl,omitempty"`
4269
4270	// BannerTvHighImageUrl: Banner image. TV size high resolution
4271	// (1920x1080).
4272	BannerTvHighImageUrl string `json:"bannerTvHighImageUrl,omitempty"`
4273
4274	// BannerTvImageUrl: Banner image. TV size extra high resolution
4275	// (2120x1192).
4276	BannerTvImageUrl string `json:"bannerTvImageUrl,omitempty"`
4277
4278	// BannerTvLowImageUrl: Banner image. TV size low resolution (854x480).
4279	BannerTvLowImageUrl string `json:"bannerTvLowImageUrl,omitempty"`
4280
4281	// BannerTvMediumImageUrl: Banner image. TV size medium resolution
4282	// (1280x720).
4283	BannerTvMediumImageUrl string `json:"bannerTvMediumImageUrl,omitempty"`
4284
4285	// LargeBrandedBannerImageImapScript: The image map script for the large
4286	// banner image.
4287	LargeBrandedBannerImageImapScript *LocalizedProperty `json:"largeBrandedBannerImageImapScript,omitempty"`
4288
4289	// LargeBrandedBannerImageUrl: The URL for the 854px by 70px image that
4290	// appears below the video player in the expanded video view of the
4291	// video watch page.
4292	LargeBrandedBannerImageUrl *LocalizedProperty `json:"largeBrandedBannerImageUrl,omitempty"`
4293
4294	// SmallBrandedBannerImageImapScript: The image map script for the small
4295	// banner image.
4296	SmallBrandedBannerImageImapScript *LocalizedProperty `json:"smallBrandedBannerImageImapScript,omitempty"`
4297
4298	// SmallBrandedBannerImageUrl: The URL for the 640px by 70px banner
4299	// image that appears below the video player in the default view of the
4300	// video watch page.
4301	SmallBrandedBannerImageUrl *LocalizedProperty `json:"smallBrandedBannerImageUrl,omitempty"`
4302
4303	// TrackingImageUrl: The URL for a 1px by 1px tracking pixel that can be
4304	// used to collect statistics for views of the channel or video pages.
4305	TrackingImageUrl string `json:"trackingImageUrl,omitempty"`
4306
4307	// WatchIconImageUrl: The URL for the image that appears above the
4308	// top-left corner of the video player. This is a 25-pixel-high image
4309	// with a flexible width that cannot exceed 170 pixels.
4310	WatchIconImageUrl string `json:"watchIconImageUrl,omitempty"`
4311
4312	// ForceSendFields is a list of field names (e.g. "BackgroundImageUrl")
4313	// to unconditionally include in API requests. By default, fields with
4314	// empty values are omitted from API requests. However, any non-pointer,
4315	// non-interface field appearing in ForceSendFields will be sent to the
4316	// server regardless of whether the field is empty or not. This may be
4317	// used to include empty fields in Patch requests.
4318	ForceSendFields []string `json:"-"`
4319
4320	// NullFields is a list of field names (e.g. "BackgroundImageUrl") to
4321	// include in API requests with the JSON null value. By default, fields
4322	// with empty values are omitted from API requests. However, any field
4323	// with an empty value appearing in NullFields will be sent to the
4324	// server as null. It is an error if a field in this list has a
4325	// non-empty value. This may be used to include null fields in Patch
4326	// requests.
4327	NullFields []string `json:"-"`
4328}
4329
4330func (s *ImageSettings) MarshalJSON() ([]byte, error) {
4331	type NoMethod ImageSettings
4332	raw := NoMethod(*s)
4333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4334}
4335
4336// IngestionInfo: Describes information necessary for ingesting an RTMP
4337// or an HTTP stream.
4338type IngestionInfo struct {
4339	// BackupIngestionAddress: The backup ingestion URL that you should use
4340	// to stream video to YouTube. You have the option of simultaneously
4341	// streaming the content that you are sending to the ingestionAddress to
4342	// this URL.
4343	BackupIngestionAddress string `json:"backupIngestionAddress,omitempty"`
4344
4345	// IngestionAddress: The primary ingestion URL that you should use to
4346	// stream video to YouTube. You must stream video to this
4347	// URL.
4348	//
4349	// Depending on which application or tool you use to encode your video
4350	// stream, you may need to enter the stream URL and stream name
4351	// separately or you may need to concatenate them in the following
4352	// format:
4353	//
4354	// STREAM_URL/STREAM_NAME
4355	IngestionAddress string `json:"ingestionAddress,omitempty"`
4356
4357	// StreamName: The HTTP or RTMP stream name that YouTube assigns to the
4358	// video stream.
4359	StreamName string `json:"streamName,omitempty"`
4360
4361	// ForceSendFields is a list of field names (e.g.
4362	// "BackupIngestionAddress") to unconditionally include in API requests.
4363	// By default, fields with empty values are omitted from API requests.
4364	// However, any non-pointer, non-interface field appearing in
4365	// ForceSendFields will be sent to the server regardless of whether the
4366	// field is empty or not. This may be used to include empty fields in
4367	// Patch requests.
4368	ForceSendFields []string `json:"-"`
4369
4370	// NullFields is a list of field names (e.g. "BackupIngestionAddress")
4371	// to include in API requests with the JSON null value. By default,
4372	// fields with empty values are omitted from API requests. However, any
4373	// field with an empty value appearing in NullFields will be sent to the
4374	// server as null. It is an error if a field in this list has a
4375	// non-empty value. This may be used to include null fields in Patch
4376	// requests.
4377	NullFields []string `json:"-"`
4378}
4379
4380func (s *IngestionInfo) MarshalJSON() ([]byte, error) {
4381	type NoMethod IngestionInfo
4382	raw := NoMethod(*s)
4383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4384}
4385
4386type InvideoBranding struct {
4387	ImageBytes string `json:"imageBytes,omitempty"`
4388
4389	ImageUrl string `json:"imageUrl,omitempty"`
4390
4391	Position *InvideoPosition `json:"position,omitempty"`
4392
4393	TargetChannelId string `json:"targetChannelId,omitempty"`
4394
4395	Timing *InvideoTiming `json:"timing,omitempty"`
4396
4397	// ForceSendFields is a list of field names (e.g. "ImageBytes") to
4398	// unconditionally include in API requests. By default, fields with
4399	// empty values are omitted from API requests. However, any non-pointer,
4400	// non-interface field appearing in ForceSendFields will be sent to the
4401	// server regardless of whether the field is empty or not. This may be
4402	// used to include empty fields in Patch requests.
4403	ForceSendFields []string `json:"-"`
4404
4405	// NullFields is a list of field names (e.g. "ImageBytes") to include in
4406	// API requests with the JSON null value. By default, fields with empty
4407	// values are omitted from API requests. However, any field with an
4408	// empty value appearing in NullFields will be sent to the server as
4409	// null. It is an error if a field in this list has a non-empty value.
4410	// This may be used to include null fields in Patch requests.
4411	NullFields []string `json:"-"`
4412}
4413
4414func (s *InvideoBranding) MarshalJSON() ([]byte, error) {
4415	type NoMethod InvideoBranding
4416	raw := NoMethod(*s)
4417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4418}
4419
4420// InvideoPosition: Describes the spatial position of a visual widget
4421// inside a video. It is a union of various position types, out of which
4422// only will be set one.
4423type InvideoPosition struct {
4424	// CornerPosition: Describes in which corner of the video the visual
4425	// widget will appear.
4426	//
4427	// Possible values:
4428	//   "bottomLeft"
4429	//   "bottomRight"
4430	//   "topLeft"
4431	//   "topRight"
4432	CornerPosition string `json:"cornerPosition,omitempty"`
4433
4434	// Type: Defines the position type.
4435	//
4436	// Possible values:
4437	//   "corner"
4438	Type string `json:"type,omitempty"`
4439
4440	// ForceSendFields is a list of field names (e.g. "CornerPosition") to
4441	// unconditionally include in API requests. By default, fields with
4442	// empty values are omitted from API requests. However, any non-pointer,
4443	// non-interface field appearing in ForceSendFields will be sent to the
4444	// server regardless of whether the field is empty or not. This may be
4445	// used to include empty fields in Patch requests.
4446	ForceSendFields []string `json:"-"`
4447
4448	// NullFields is a list of field names (e.g. "CornerPosition") to
4449	// include in API requests with the JSON null value. By default, fields
4450	// with empty values are omitted from API requests. However, any field
4451	// with an empty value appearing in NullFields will be sent to the
4452	// server as null. It is an error if a field in this list has a
4453	// non-empty value. This may be used to include null fields in Patch
4454	// requests.
4455	NullFields []string `json:"-"`
4456}
4457
4458func (s *InvideoPosition) MarshalJSON() ([]byte, error) {
4459	type NoMethod InvideoPosition
4460	raw := NoMethod(*s)
4461	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4462}
4463
4464// InvideoPromotion: Describes an invideo promotion campaign consisting
4465// of multiple promoted items. A campaign belongs to a single
4466// channel_id.
4467type InvideoPromotion struct {
4468	// DefaultTiming: The default temporal position within the video where
4469	// the promoted item will be displayed. Can be overriden by more
4470	// specific timing in the item.
4471	DefaultTiming *InvideoTiming `json:"defaultTiming,omitempty"`
4472
4473	// Items: List of promoted items in decreasing priority.
4474	Items []*PromotedItem `json:"items,omitempty"`
4475
4476	// Position: The spatial position within the video where the promoted
4477	// item will be displayed.
4478	Position *InvideoPosition `json:"position,omitempty"`
4479
4480	// UseSmartTiming: Indicates whether the channel's promotional campaign
4481	// uses "smart timing." This feature attempts to show promotions at a
4482	// point in the video when they are more likely to be clicked and less
4483	// likely to disrupt the viewing experience. This feature also picks up
4484	// a single promotion to show on each video.
4485	UseSmartTiming bool `json:"useSmartTiming,omitempty"`
4486
4487	// ForceSendFields is a list of field names (e.g. "DefaultTiming") to
4488	// unconditionally include in API requests. By default, fields with
4489	// empty values are omitted from API requests. However, any non-pointer,
4490	// non-interface field appearing in ForceSendFields will be sent to the
4491	// server regardless of whether the field is empty or not. This may be
4492	// used to include empty fields in Patch requests.
4493	ForceSendFields []string `json:"-"`
4494
4495	// NullFields is a list of field names (e.g. "DefaultTiming") to include
4496	// in API requests with the JSON null value. By default, fields with
4497	// empty values are omitted from API requests. However, any field with
4498	// an empty value appearing in NullFields will be sent to the server as
4499	// null. It is an error if a field in this list has a non-empty value.
4500	// This may be used to include null fields in Patch requests.
4501	NullFields []string `json:"-"`
4502}
4503
4504func (s *InvideoPromotion) MarshalJSON() ([]byte, error) {
4505	type NoMethod InvideoPromotion
4506	raw := NoMethod(*s)
4507	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4508}
4509
4510// InvideoTiming: Describes a temporal position of a visual widget
4511// inside a video.
4512type InvideoTiming struct {
4513	// DurationMs: Defines the duration in milliseconds for which the
4514	// promotion should be displayed. If missing, the client should use the
4515	// default.
4516	DurationMs uint64 `json:"durationMs,omitempty,string"`
4517
4518	// OffsetMs: Defines the time at which the promotion will appear.
4519	// Depending on the value of type the value of the offsetMs field will
4520	// represent a time offset from the start or from the end of the video,
4521	// expressed in milliseconds.
4522	OffsetMs uint64 `json:"offsetMs,omitempty,string"`
4523
4524	// Type: Describes a timing type. If the value is offsetFromStart, then
4525	// the offsetMs field represents an offset from the start of the video.
4526	// If the value is offsetFromEnd, then the offsetMs field represents an
4527	// offset from the end of the video.
4528	//
4529	// Possible values:
4530	//   "offsetFromEnd"
4531	//   "offsetFromStart"
4532	Type string `json:"type,omitempty"`
4533
4534	// ForceSendFields is a list of field names (e.g. "DurationMs") to
4535	// unconditionally include in API requests. By default, fields with
4536	// empty values are omitted from API requests. However, any non-pointer,
4537	// non-interface field appearing in ForceSendFields will be sent to the
4538	// server regardless of whether the field is empty or not. This may be
4539	// used to include empty fields in Patch requests.
4540	ForceSendFields []string `json:"-"`
4541
4542	// NullFields is a list of field names (e.g. "DurationMs") to include in
4543	// API requests with the JSON null value. By default, fields with empty
4544	// values are omitted from API requests. However, any field with an
4545	// empty value appearing in NullFields will be sent to the server as
4546	// null. It is an error if a field in this list has a non-empty value.
4547	// This may be used to include null fields in Patch requests.
4548	NullFields []string `json:"-"`
4549}
4550
4551func (s *InvideoTiming) MarshalJSON() ([]byte, error) {
4552	type NoMethod InvideoTiming
4553	raw := NoMethod(*s)
4554	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4555}
4556
4557type LanguageTag struct {
4558	Value string `json:"value,omitempty"`
4559
4560	// ForceSendFields is a list of field names (e.g. "Value") to
4561	// unconditionally include in API requests. By default, fields with
4562	// empty values are omitted from API requests. However, any non-pointer,
4563	// non-interface field appearing in ForceSendFields will be sent to the
4564	// server regardless of whether the field is empty or not. This may be
4565	// used to include empty fields in Patch requests.
4566	ForceSendFields []string `json:"-"`
4567
4568	// NullFields is a list of field names (e.g. "Value") to include in API
4569	// requests with the JSON null value. By default, fields with empty
4570	// values are omitted from API requests. However, any field with an
4571	// empty value appearing in NullFields will be sent to the server as
4572	// null. It is an error if a field in this list has a non-empty value.
4573	// This may be used to include null fields in Patch requests.
4574	NullFields []string `json:"-"`
4575}
4576
4577func (s *LanguageTag) MarshalJSON() ([]byte, error) {
4578	type NoMethod LanguageTag
4579	raw := NoMethod(*s)
4580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4581}
4582
4583// LiveBroadcast: A liveBroadcast resource represents an event that will
4584// be streamed, via live video, on YouTube.
4585type LiveBroadcast struct {
4586	// ContentDetails: The contentDetails object contains information about
4587	// the event's video content, such as whether the content can be shown
4588	// in an embedded video player or if it will be archived and therefore
4589	// available for viewing after the event has concluded.
4590	ContentDetails *LiveBroadcastContentDetails `json:"contentDetails,omitempty"`
4591
4592	// Etag: Etag of this resource.
4593	Etag string `json:"etag,omitempty"`
4594
4595	// Id: The ID that YouTube assigns to uniquely identify the broadcast.
4596	Id string `json:"id,omitempty"`
4597
4598	// Kind: Identifies what kind of resource this is. Value: the fixed
4599	// string "youtube#liveBroadcast".
4600	Kind string `json:"kind,omitempty"`
4601
4602	// Snippet: The snippet object contains basic details about the event,
4603	// including its title, description, start time, and end time.
4604	Snippet *LiveBroadcastSnippet `json:"snippet,omitempty"`
4605
4606	// Statistics: The statistics object contains info about the event's
4607	// current stats. These include concurrent viewers and total chat count.
4608	// Statistics can change (in either direction) during the lifetime of an
4609	// event. Statistics are only returned while the event is live.
4610	Statistics *LiveBroadcastStatistics `json:"statistics,omitempty"`
4611
4612	// Status: The status object contains information about the event's
4613	// status.
4614	Status *LiveBroadcastStatus `json:"status,omitempty"`
4615
4616	// ServerResponse contains the HTTP response code and headers from the
4617	// server.
4618	googleapi.ServerResponse `json:"-"`
4619
4620	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
4621	// unconditionally include in API requests. By default, fields with
4622	// empty values are omitted from API requests. However, any non-pointer,
4623	// non-interface field appearing in ForceSendFields will be sent to the
4624	// server regardless of whether the field is empty or not. This may be
4625	// used to include empty fields in Patch requests.
4626	ForceSendFields []string `json:"-"`
4627
4628	// NullFields is a list of field names (e.g. "ContentDetails") to
4629	// include in API requests with the JSON null value. By default, fields
4630	// with empty values are omitted from API requests. However, any field
4631	// with an empty value appearing in NullFields will be sent to the
4632	// server as null. It is an error if a field in this list has a
4633	// non-empty value. This may be used to include null fields in Patch
4634	// requests.
4635	NullFields []string `json:"-"`
4636}
4637
4638func (s *LiveBroadcast) MarshalJSON() ([]byte, error) {
4639	type NoMethod LiveBroadcast
4640	raw := NoMethod(*s)
4641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4642}
4643
4644// LiveBroadcastContentDetails: Detailed settings of a broadcast.
4645type LiveBroadcastContentDetails struct {
4646	// BoundStreamId: This value uniquely identifies the live stream bound
4647	// to the broadcast.
4648	BoundStreamId string `json:"boundStreamId,omitempty"`
4649
4650	// BoundStreamLastUpdateTimeMs: The date and time that the live stream
4651	// referenced by boundStreamId was last updated.
4652	BoundStreamLastUpdateTimeMs string `json:"boundStreamLastUpdateTimeMs,omitempty"`
4653
4654	// Possible values:
4655	//   "closedCaptionsDisabled"
4656	//   "closedCaptionsEmbedded"
4657	//   "closedCaptionsHttpPost"
4658	ClosedCaptionsType string `json:"closedCaptionsType,omitempty"`
4659
4660	// EnableAutoStart: This setting indicates whether auto start is enabled
4661	// for this broadcast.
4662	EnableAutoStart bool `json:"enableAutoStart,omitempty"`
4663
4664	// EnableClosedCaptions: This setting indicates whether HTTP POST closed
4665	// captioning is enabled for this broadcast. The ingestion URL of the
4666	// closed captions is returned through the liveStreams API. This is
4667	// mutually exclusive with using the closed_captions_type property, and
4668	// is equivalent to setting closed_captions_type to
4669	// CLOSED_CAPTIONS_HTTP_POST.
4670	EnableClosedCaptions bool `json:"enableClosedCaptions,omitempty"`
4671
4672	// EnableContentEncryption: This setting indicates whether YouTube
4673	// should enable content encryption for the broadcast.
4674	EnableContentEncryption bool `json:"enableContentEncryption,omitempty"`
4675
4676	// EnableDvr: This setting determines whether viewers can access DVR
4677	// controls while watching the video. DVR controls enable the viewer to
4678	// control the video playback experience by pausing, rewinding, or fast
4679	// forwarding content. The default value for this property is
4680	// true.
4681	//
4682	//
4683	//
4684	// Important: You must set the value to true and also set the
4685	// enableArchive property's value to true if you want to make playback
4686	// available immediately after the broadcast ends.
4687	EnableDvr bool `json:"enableDvr,omitempty"`
4688
4689	// EnableEmbed: This setting indicates whether the broadcast video can
4690	// be played in an embedded player. If you choose to archive the video
4691	// (using the enableArchive property), this setting will also apply to
4692	// the archived video.
4693	EnableEmbed bool `json:"enableEmbed,omitempty"`
4694
4695	// EnableLowLatency: Indicates whether this broadcast has low latency
4696	// enabled.
4697	EnableLowLatency bool `json:"enableLowLatency,omitempty"`
4698
4699	// LatencyPreference: If both this and enable_low_latency are set, they
4700	// must match. LATENCY_NORMAL should match enable_low_latency=false
4701	// LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW
4702	// should have enable_low_latency omitted.
4703	//
4704	// Possible values:
4705	//   "low"
4706	//   "normal"
4707	//   "ultraLow"
4708	LatencyPreference string `json:"latencyPreference,omitempty"`
4709
4710	Mesh string `json:"mesh,omitempty"`
4711
4712	// MonitorStream: The monitorStream object contains information about
4713	// the monitor stream, which the broadcaster can use to review the event
4714	// content before the broadcast stream is shown publicly.
4715	MonitorStream *MonitorStreamInfo `json:"monitorStream,omitempty"`
4716
4717	// Projection: The projection format of this broadcast. This defaults to
4718	// rectangular.
4719	//
4720	// Possible values:
4721	//   "360"
4722	//   "mesh"
4723	//   "rectangular"
4724	Projection string `json:"projection,omitempty"`
4725
4726	// RecordFromStart: Automatically start recording after the event goes
4727	// live. The default value for this property is true.
4728	//
4729	//
4730	//
4731	// Important: You must also set the enableDvr property's value to true
4732	// if you want the playback to be available immediately after the
4733	// broadcast ends. If you set this property's value to true but do not
4734	// also set the enableDvr property to true, there may be a delay of
4735	// around one day before the archived video will be available for
4736	// playback.
4737	RecordFromStart bool `json:"recordFromStart,omitempty"`
4738
4739	// StartWithSlate: This setting indicates whether the broadcast should
4740	// automatically begin with an in-stream slate when you update the
4741	// broadcast's status to live. After updating the status, you then need
4742	// to send a liveCuepoints.insert request that sets the cuepoint's
4743	// eventState to end to remove the in-stream slate and make your
4744	// broadcast stream visible to viewers.
4745	StartWithSlate bool `json:"startWithSlate,omitempty"`
4746
4747	// Possible values:
4748	//   "left_right"
4749	//   "mono"
4750	//   "top_bottom"
4751	StereoLayout string `json:"stereoLayout,omitempty"`
4752
4753	// ForceSendFields is a list of field names (e.g. "BoundStreamId") to
4754	// unconditionally include in API requests. By default, fields with
4755	// empty values are omitted from API requests. However, any non-pointer,
4756	// non-interface field appearing in ForceSendFields will be sent to the
4757	// server regardless of whether the field is empty or not. This may be
4758	// used to include empty fields in Patch requests.
4759	ForceSendFields []string `json:"-"`
4760
4761	// NullFields is a list of field names (e.g. "BoundStreamId") to include
4762	// in API requests with the JSON null value. By default, fields with
4763	// empty values are omitted from API requests. However, any field with
4764	// an empty value appearing in NullFields will be sent to the server as
4765	// null. It is an error if a field in this list has a non-empty value.
4766	// This may be used to include null fields in Patch requests.
4767	NullFields []string `json:"-"`
4768}
4769
4770func (s *LiveBroadcastContentDetails) MarshalJSON() ([]byte, error) {
4771	type NoMethod LiveBroadcastContentDetails
4772	raw := NoMethod(*s)
4773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4774}
4775
4776type LiveBroadcastListResponse struct {
4777	// Etag: Etag of this resource.
4778	Etag string `json:"etag,omitempty"`
4779
4780	// EventId: Serialized EventId of the request which produced this
4781	// response.
4782	EventId string `json:"eventId,omitempty"`
4783
4784	// Items: A list of broadcasts that match the request criteria.
4785	Items []*LiveBroadcast `json:"items,omitempty"`
4786
4787	// Kind: Identifies what kind of resource this is. Value: the fixed
4788	// string "youtube#liveBroadcastListResponse".
4789	Kind string `json:"kind,omitempty"`
4790
4791	// NextPageToken: The token that can be used as the value of the
4792	// pageToken parameter to retrieve the next page in the result set.
4793	NextPageToken string `json:"nextPageToken,omitempty"`
4794
4795	PageInfo *PageInfo `json:"pageInfo,omitempty"`
4796
4797	// PrevPageToken: The token that can be used as the value of the
4798	// pageToken parameter to retrieve the previous page in the result set.
4799	PrevPageToken string `json:"prevPageToken,omitempty"`
4800
4801	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
4802
4803	// VisitorId: The visitorId identifies the visitor.
4804	VisitorId string `json:"visitorId,omitempty"`
4805
4806	// ServerResponse contains the HTTP response code and headers from the
4807	// server.
4808	googleapi.ServerResponse `json:"-"`
4809
4810	// ForceSendFields is a list of field names (e.g. "Etag") to
4811	// unconditionally include in API requests. By default, fields with
4812	// empty values are omitted from API requests. However, any non-pointer,
4813	// non-interface field appearing in ForceSendFields will be sent to the
4814	// server regardless of whether the field is empty or not. This may be
4815	// used to include empty fields in Patch requests.
4816	ForceSendFields []string `json:"-"`
4817
4818	// NullFields is a list of field names (e.g. "Etag") to include in API
4819	// requests with the JSON null value. By default, fields with empty
4820	// values are omitted from API requests. However, any field with an
4821	// empty value appearing in NullFields will be sent to the server as
4822	// null. It is an error if a field in this list has a non-empty value.
4823	// This may be used to include null fields in Patch requests.
4824	NullFields []string `json:"-"`
4825}
4826
4827func (s *LiveBroadcastListResponse) MarshalJSON() ([]byte, error) {
4828	type NoMethod LiveBroadcastListResponse
4829	raw := NoMethod(*s)
4830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4831}
4832
4833type LiveBroadcastSnippet struct {
4834	// ActualEndTime: The date and time that the broadcast actually ended.
4835	// This information is only available once the broadcast's state is
4836	// complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
4837	// format.
4838	ActualEndTime string `json:"actualEndTime,omitempty"`
4839
4840	// ActualStartTime: The date and time that the broadcast actually
4841	// started. This information is only available once the broadcast's
4842	// state is live. The value is specified in ISO 8601
4843	// (YYYY-MM-DDThh:mm:ss.sZ) format.
4844	ActualStartTime string `json:"actualStartTime,omitempty"`
4845
4846	// ChannelId: The ID that YouTube uses to uniquely identify the channel
4847	// that is publishing the broadcast.
4848	ChannelId string `json:"channelId,omitempty"`
4849
4850	// Description: The broadcast's description. As with the title, you can
4851	// set this field by modifying the broadcast resource or by setting the
4852	// description field of the corresponding video resource.
4853	Description string `json:"description,omitempty"`
4854
4855	IsDefaultBroadcast bool `json:"isDefaultBroadcast,omitempty"`
4856
4857	// LiveChatId: The id of the live chat for this broadcast.
4858	LiveChatId string `json:"liveChatId,omitempty"`
4859
4860	// PublishedAt: The date and time that the broadcast was added to
4861	// YouTube's live broadcast schedule. The value is specified in ISO 8601
4862	// (YYYY-MM-DDThh:mm:ss.sZ) format.
4863	PublishedAt string `json:"publishedAt,omitempty"`
4864
4865	// ScheduledEndTime: The date and time that the broadcast is scheduled
4866	// to end. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
4867	// format.
4868	ScheduledEndTime string `json:"scheduledEndTime,omitempty"`
4869
4870	// ScheduledStartTime: The date and time that the broadcast is scheduled
4871	// to start. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
4872	// format.
4873	ScheduledStartTime string `json:"scheduledStartTime,omitempty"`
4874
4875	// Thumbnails: A map of thumbnail images associated with the broadcast.
4876	// For each nested object in this object, the key is the name of the
4877	// thumbnail image, and the value is an object that contains other
4878	// information about the thumbnail.
4879	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
4880
4881	// Title: The broadcast's title. Note that the broadcast represents
4882	// exactly one YouTube video. You can set this field by modifying the
4883	// broadcast resource or by setting the title field of the corresponding
4884	// video resource.
4885	Title string `json:"title,omitempty"`
4886
4887	// ForceSendFields is a list of field names (e.g. "ActualEndTime") to
4888	// unconditionally include in API requests. By default, fields with
4889	// empty values are omitted from API requests. However, any non-pointer,
4890	// non-interface field appearing in ForceSendFields will be sent to the
4891	// server regardless of whether the field is empty or not. This may be
4892	// used to include empty fields in Patch requests.
4893	ForceSendFields []string `json:"-"`
4894
4895	// NullFields is a list of field names (e.g. "ActualEndTime") to include
4896	// in API requests with the JSON null value. By default, fields with
4897	// empty values are omitted from API requests. However, any field with
4898	// an empty value appearing in NullFields will be sent to the server as
4899	// null. It is an error if a field in this list has a non-empty value.
4900	// This may be used to include null fields in Patch requests.
4901	NullFields []string `json:"-"`
4902}
4903
4904func (s *LiveBroadcastSnippet) MarshalJSON() ([]byte, error) {
4905	type NoMethod LiveBroadcastSnippet
4906	raw := NoMethod(*s)
4907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4908}
4909
4910// LiveBroadcastStatistics: Statistics about the live broadcast. These
4911// represent a snapshot of the values at the time of the request.
4912// Statistics are only returned for live broadcasts.
4913type LiveBroadcastStatistics struct {
4914	// ConcurrentViewers: The number of viewers currently watching the
4915	// broadcast. The property and its value will be present if the
4916	// broadcast has current viewers and the broadcast owner has not hidden
4917	// the viewcount for the video. Note that YouTube stops tracking the
4918	// number of concurrent viewers for a broadcast when the broadcast ends.
4919	// So, this property would not identify the number of viewers watching
4920	// an archived video of a live broadcast that already ended.
4921	ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"`
4922
4923	// TotalChatCount: The total number of live chat messages currently on
4924	// the broadcast. The property and its value will be present if the
4925	// broadcast is public, has the live chat feature enabled, and has at
4926	// least one message. Note that this field will not be filled after the
4927	// broadcast ends. So this property would not identify the number of
4928	// chat messages for an archived video of a completed live broadcast.
4929	TotalChatCount uint64 `json:"totalChatCount,omitempty,string"`
4930
4931	// ForceSendFields is a list of field names (e.g. "ConcurrentViewers")
4932	// to unconditionally include in API requests. By default, fields with
4933	// empty values are omitted from API requests. However, any non-pointer,
4934	// non-interface field appearing in ForceSendFields will be sent to the
4935	// server regardless of whether the field is empty or not. This may be
4936	// used to include empty fields in Patch requests.
4937	ForceSendFields []string `json:"-"`
4938
4939	// NullFields is a list of field names (e.g. "ConcurrentViewers") to
4940	// include in API requests with the JSON null value. By default, fields
4941	// with empty values are omitted from API requests. However, any field
4942	// with an empty value appearing in NullFields will be sent to the
4943	// server as null. It is an error if a field in this list has a
4944	// non-empty value. This may be used to include null fields in Patch
4945	// requests.
4946	NullFields []string `json:"-"`
4947}
4948
4949func (s *LiveBroadcastStatistics) MarshalJSON() ([]byte, error) {
4950	type NoMethod LiveBroadcastStatistics
4951	raw := NoMethod(*s)
4952	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4953}
4954
4955type LiveBroadcastStatus struct {
4956	// LifeCycleStatus: The broadcast's status. The status can be updated
4957	// using the API's liveBroadcasts.transition method.
4958	//
4959	// Possible values:
4960	//   "complete"
4961	//   "created"
4962	//   "live"
4963	//   "liveStarting"
4964	//   "ready"
4965	//   "revoked"
4966	//   "testStarting"
4967	//   "testing"
4968	LifeCycleStatus string `json:"lifeCycleStatus,omitempty"`
4969
4970	// LiveBroadcastPriority: Priority of the live broadcast event (internal
4971	// state).
4972	//
4973	// Possible values:
4974	//   "high"
4975	//   "low"
4976	//   "normal"
4977	LiveBroadcastPriority string `json:"liveBroadcastPriority,omitempty"`
4978
4979	// PrivacyStatus: The broadcast's privacy status. Note that the
4980	// broadcast represents exactly one YouTube video, so the privacy
4981	// settings are identical to those supported for videos. In addition,
4982	// you can set this field by modifying the broadcast resource or by
4983	// setting the privacyStatus field of the corresponding video resource.
4984	//
4985	// Possible values:
4986	//   "private"
4987	//   "public"
4988	//   "unlisted"
4989	//   "unlisted_new"
4990	PrivacyStatus string `json:"privacyStatus,omitempty"`
4991
4992	// RecordingStatus: The broadcast's recording status.
4993	//
4994	// Possible values:
4995	//   "notRecording"
4996	//   "recorded"
4997	//   "recording"
4998	RecordingStatus string `json:"recordingStatus,omitempty"`
4999
5000	// ForceSendFields is a list of field names (e.g. "LifeCycleStatus") to
5001	// unconditionally include in API requests. By default, fields with
5002	// empty values are omitted from API requests. However, any non-pointer,
5003	// non-interface field appearing in ForceSendFields will be sent to the
5004	// server regardless of whether the field is empty or not. This may be
5005	// used to include empty fields in Patch requests.
5006	ForceSendFields []string `json:"-"`
5007
5008	// NullFields is a list of field names (e.g. "LifeCycleStatus") to
5009	// include in API requests with the JSON null value. By default, fields
5010	// with empty values are omitted from API requests. However, any field
5011	// with an empty value appearing in NullFields will be sent to the
5012	// server as null. It is an error if a field in this list has a
5013	// non-empty value. This may be used to include null fields in Patch
5014	// requests.
5015	NullFields []string `json:"-"`
5016}
5017
5018func (s *LiveBroadcastStatus) MarshalJSON() ([]byte, error) {
5019	type NoMethod LiveBroadcastStatus
5020	raw := NoMethod(*s)
5021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5022}
5023
5024// LiveChatBan: A liveChatBan resource represents a ban for a YouTube
5025// live chat.
5026type LiveChatBan struct {
5027	// Etag: Etag of this resource.
5028	Etag string `json:"etag,omitempty"`
5029
5030	// Id: The ID that YouTube assigns to uniquely identify the ban.
5031	Id string `json:"id,omitempty"`
5032
5033	// Kind: Identifies what kind of resource this is. Value: the fixed
5034	// string "youtube#liveChatBan".
5035	Kind string `json:"kind,omitempty"`
5036
5037	// Snippet: The snippet object contains basic details about the ban.
5038	Snippet *LiveChatBanSnippet `json:"snippet,omitempty"`
5039
5040	// ServerResponse contains the HTTP response code and headers from the
5041	// server.
5042	googleapi.ServerResponse `json:"-"`
5043
5044	// ForceSendFields is a list of field names (e.g. "Etag") to
5045	// unconditionally include in API requests. By default, fields with
5046	// empty values are omitted from API requests. However, any non-pointer,
5047	// non-interface field appearing in ForceSendFields will be sent to the
5048	// server regardless of whether the field is empty or not. This may be
5049	// used to include empty fields in Patch requests.
5050	ForceSendFields []string `json:"-"`
5051
5052	// NullFields is a list of field names (e.g. "Etag") to include in API
5053	// requests with the JSON null value. By default, fields with empty
5054	// values are omitted from API requests. However, any field with an
5055	// empty value appearing in NullFields will be sent to the server as
5056	// null. It is an error if a field in this list has a non-empty value.
5057	// This may be used to include null fields in Patch requests.
5058	NullFields []string `json:"-"`
5059}
5060
5061func (s *LiveChatBan) MarshalJSON() ([]byte, error) {
5062	type NoMethod LiveChatBan
5063	raw := NoMethod(*s)
5064	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5065}
5066
5067type LiveChatBanSnippet struct {
5068	// BanDurationSeconds: The duration of a ban, only filled if the ban has
5069	// type TEMPORARY.
5070	BanDurationSeconds uint64 `json:"banDurationSeconds,omitempty,string"`
5071
5072	BannedUserDetails *ChannelProfileDetails `json:"bannedUserDetails,omitempty"`
5073
5074	// LiveChatId: The chat this ban is pertinent to.
5075	LiveChatId string `json:"liveChatId,omitempty"`
5076
5077	// Type: The type of ban.
5078	//
5079	// Possible values:
5080	//   "permanent"
5081	//   "temporary"
5082	Type string `json:"type,omitempty"`
5083
5084	// ForceSendFields is a list of field names (e.g. "BanDurationSeconds")
5085	// to unconditionally include in API requests. By default, fields with
5086	// empty values are omitted from API requests. However, any non-pointer,
5087	// non-interface field appearing in ForceSendFields will be sent to the
5088	// server regardless of whether the field is empty or not. This may be
5089	// used to include empty fields in Patch requests.
5090	ForceSendFields []string `json:"-"`
5091
5092	// NullFields is a list of field names (e.g. "BanDurationSeconds") to
5093	// include in API requests with the JSON null value. By default, fields
5094	// with empty values are omitted from API requests. However, any field
5095	// with an empty value appearing in NullFields will be sent to the
5096	// server as null. It is an error if a field in this list has a
5097	// non-empty value. This may be used to include null fields in Patch
5098	// requests.
5099	NullFields []string `json:"-"`
5100}
5101
5102func (s *LiveChatBanSnippet) MarshalJSON() ([]byte, error) {
5103	type NoMethod LiveChatBanSnippet
5104	raw := NoMethod(*s)
5105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5106}
5107
5108type LiveChatFanFundingEventDetails struct {
5109	// AmountDisplayString: A rendered string that displays the fund amount
5110	// and currency to the user.
5111	AmountDisplayString string `json:"amountDisplayString,omitempty"`
5112
5113	// AmountMicros: The amount of the fund.
5114	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
5115
5116	// Currency: The currency in which the fund was made.
5117	Currency string `json:"currency,omitempty"`
5118
5119	// UserComment: The comment added by the user to this fan funding event.
5120	UserComment string `json:"userComment,omitempty"`
5121
5122	// ForceSendFields is a list of field names (e.g. "AmountDisplayString")
5123	// to unconditionally include in API requests. By default, fields with
5124	// empty values are omitted from API requests. However, any non-pointer,
5125	// non-interface field appearing in ForceSendFields will be sent to the
5126	// server regardless of whether the field is empty or not. This may be
5127	// used to include empty fields in Patch requests.
5128	ForceSendFields []string `json:"-"`
5129
5130	// NullFields is a list of field names (e.g. "AmountDisplayString") to
5131	// include in API requests with the JSON null value. By default, fields
5132	// with empty values are omitted from API requests. However, any field
5133	// with an empty value appearing in NullFields will be sent to the
5134	// server as null. It is an error if a field in this list has a
5135	// non-empty value. This may be used to include null fields in Patch
5136	// requests.
5137	NullFields []string `json:"-"`
5138}
5139
5140func (s *LiveChatFanFundingEventDetails) MarshalJSON() ([]byte, error) {
5141	type NoMethod LiveChatFanFundingEventDetails
5142	raw := NoMethod(*s)
5143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5144}
5145
5146// LiveChatMessage: A liveChatMessage resource represents a chat message
5147// in a YouTube Live Chat.
5148type LiveChatMessage struct {
5149	// AuthorDetails: The authorDetails object contains basic details about
5150	// the user that posted this message.
5151	AuthorDetails *LiveChatMessageAuthorDetails `json:"authorDetails,omitempty"`
5152
5153	// Etag: Etag of this resource.
5154	Etag string `json:"etag,omitempty"`
5155
5156	// Id: The ID that YouTube assigns to uniquely identify the message.
5157	Id string `json:"id,omitempty"`
5158
5159	// Kind: Identifies what kind of resource this is. Value: the fixed
5160	// string "youtube#liveChatMessage".
5161	Kind string `json:"kind,omitempty"`
5162
5163	// Snippet: The snippet object contains basic details about the message.
5164	Snippet *LiveChatMessageSnippet `json:"snippet,omitempty"`
5165
5166	// ServerResponse contains the HTTP response code and headers from the
5167	// server.
5168	googleapi.ServerResponse `json:"-"`
5169
5170	// ForceSendFields is a list of field names (e.g. "AuthorDetails") to
5171	// unconditionally include in API requests. By default, fields with
5172	// empty values are omitted from API requests. However, any non-pointer,
5173	// non-interface field appearing in ForceSendFields will be sent to the
5174	// server regardless of whether the field is empty or not. This may be
5175	// used to include empty fields in Patch requests.
5176	ForceSendFields []string `json:"-"`
5177
5178	// NullFields is a list of field names (e.g. "AuthorDetails") to include
5179	// in API requests with the JSON null value. By default, fields with
5180	// empty values are omitted from API requests. However, any field with
5181	// an empty value appearing in NullFields will be sent to the server as
5182	// null. It is an error if a field in this list has a non-empty value.
5183	// This may be used to include null fields in Patch requests.
5184	NullFields []string `json:"-"`
5185}
5186
5187func (s *LiveChatMessage) MarshalJSON() ([]byte, error) {
5188	type NoMethod LiveChatMessage
5189	raw := NoMethod(*s)
5190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5191}
5192
5193type LiveChatMessageAuthorDetails struct {
5194	// ChannelId: The YouTube channel ID.
5195	ChannelId string `json:"channelId,omitempty"`
5196
5197	// ChannelUrl: The channel's URL.
5198	ChannelUrl string `json:"channelUrl,omitempty"`
5199
5200	// DisplayName: The channel's display name.
5201	DisplayName string `json:"displayName,omitempty"`
5202
5203	// IsChatModerator: Whether the author is a moderator of the live chat.
5204	IsChatModerator bool `json:"isChatModerator,omitempty"`
5205
5206	// IsChatOwner: Whether the author is the owner of the live chat.
5207	IsChatOwner bool `json:"isChatOwner,omitempty"`
5208
5209	// IsChatSponsor: Whether the author is a sponsor of the live chat.
5210	IsChatSponsor bool `json:"isChatSponsor,omitempty"`
5211
5212	// IsVerified: Whether the author's identity has been verified by
5213	// YouTube.
5214	IsVerified bool `json:"isVerified,omitempty"`
5215
5216	// ProfileImageUrl: The channels's avatar URL.
5217	ProfileImageUrl string `json:"profileImageUrl,omitempty"`
5218
5219	// ForceSendFields is a list of field names (e.g. "ChannelId") to
5220	// unconditionally include in API requests. By default, fields with
5221	// empty values are omitted from API requests. However, any non-pointer,
5222	// non-interface field appearing in ForceSendFields will be sent to the
5223	// server regardless of whether the field is empty or not. This may be
5224	// used to include empty fields in Patch requests.
5225	ForceSendFields []string `json:"-"`
5226
5227	// NullFields is a list of field names (e.g. "ChannelId") to include in
5228	// API requests with the JSON null value. By default, fields with empty
5229	// values are omitted from API requests. However, any field with an
5230	// empty value appearing in NullFields will be sent to the server as
5231	// null. It is an error if a field in this list has a non-empty value.
5232	// This may be used to include null fields in Patch requests.
5233	NullFields []string `json:"-"`
5234}
5235
5236func (s *LiveChatMessageAuthorDetails) MarshalJSON() ([]byte, error) {
5237	type NoMethod LiveChatMessageAuthorDetails
5238	raw := NoMethod(*s)
5239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5240}
5241
5242type LiveChatMessageDeletedDetails struct {
5243	DeletedMessageId string `json:"deletedMessageId,omitempty"`
5244
5245	// ForceSendFields is a list of field names (e.g. "DeletedMessageId") to
5246	// unconditionally include in API requests. By default, fields with
5247	// empty values are omitted from API requests. However, any non-pointer,
5248	// non-interface field appearing in ForceSendFields will be sent to the
5249	// server regardless of whether the field is empty or not. This may be
5250	// used to include empty fields in Patch requests.
5251	ForceSendFields []string `json:"-"`
5252
5253	// NullFields is a list of field names (e.g. "DeletedMessageId") to
5254	// include in API requests with the JSON null value. By default, fields
5255	// with empty values are omitted from API requests. However, any field
5256	// with an empty value appearing in NullFields will be sent to the
5257	// server as null. It is an error if a field in this list has a
5258	// non-empty value. This may be used to include null fields in Patch
5259	// requests.
5260	NullFields []string `json:"-"`
5261}
5262
5263func (s *LiveChatMessageDeletedDetails) MarshalJSON() ([]byte, error) {
5264	type NoMethod LiveChatMessageDeletedDetails
5265	raw := NoMethod(*s)
5266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5267}
5268
5269type LiveChatMessageListResponse struct {
5270	// Etag: Etag of this resource.
5271	Etag string `json:"etag,omitempty"`
5272
5273	// EventId: Serialized EventId of the request which produced this
5274	// response.
5275	EventId string `json:"eventId,omitempty"`
5276
5277	// Items: A list of live chat messages.
5278	Items []*LiveChatMessage `json:"items,omitempty"`
5279
5280	// Kind: Identifies what kind of resource this is. Value: the fixed
5281	// string "youtube#liveChatMessageListResponse".
5282	Kind string `json:"kind,omitempty"`
5283
5284	// NextPageToken: The token that can be used as the value of the
5285	// pageToken parameter to retrieve the next page in the result set.
5286	NextPageToken string `json:"nextPageToken,omitempty"`
5287
5288	// OfflineAt: The date and time when the underlying stream went offline.
5289	// The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
5290	OfflineAt string `json:"offlineAt,omitempty"`
5291
5292	PageInfo *PageInfo `json:"pageInfo,omitempty"`
5293
5294	// PollingIntervalMillis: The amount of time the client should wait
5295	// before polling again.
5296	PollingIntervalMillis int64 `json:"pollingIntervalMillis,omitempty"`
5297
5298	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
5299
5300	// VisitorId: The visitorId identifies the visitor.
5301	VisitorId string `json:"visitorId,omitempty"`
5302
5303	// ServerResponse contains the HTTP response code and headers from the
5304	// server.
5305	googleapi.ServerResponse `json:"-"`
5306
5307	// ForceSendFields is a list of field names (e.g. "Etag") to
5308	// unconditionally include in API requests. By default, fields with
5309	// empty values are omitted from API requests. However, any non-pointer,
5310	// non-interface field appearing in ForceSendFields will be sent to the
5311	// server regardless of whether the field is empty or not. This may be
5312	// used to include empty fields in Patch requests.
5313	ForceSendFields []string `json:"-"`
5314
5315	// NullFields is a list of field names (e.g. "Etag") to include in API
5316	// requests with the JSON null value. By default, fields with empty
5317	// values are omitted from API requests. However, any field with an
5318	// empty value appearing in NullFields will be sent to the server as
5319	// null. It is an error if a field in this list has a non-empty value.
5320	// This may be used to include null fields in Patch requests.
5321	NullFields []string `json:"-"`
5322}
5323
5324func (s *LiveChatMessageListResponse) MarshalJSON() ([]byte, error) {
5325	type NoMethod LiveChatMessageListResponse
5326	raw := NoMethod(*s)
5327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5328}
5329
5330type LiveChatMessageRetractedDetails struct {
5331	RetractedMessageId string `json:"retractedMessageId,omitempty"`
5332
5333	// ForceSendFields is a list of field names (e.g. "RetractedMessageId")
5334	// to unconditionally include in API requests. By default, fields with
5335	// empty values are omitted from API requests. However, any non-pointer,
5336	// non-interface field appearing in ForceSendFields will be sent to the
5337	// server regardless of whether the field is empty or not. This may be
5338	// used to include empty fields in Patch requests.
5339	ForceSendFields []string `json:"-"`
5340
5341	// NullFields is a list of field names (e.g. "RetractedMessageId") to
5342	// include in API requests with the JSON null value. By default, fields
5343	// with empty values are omitted from API requests. However, any field
5344	// with an empty value appearing in NullFields will be sent to the
5345	// server as null. It is an error if a field in this list has a
5346	// non-empty value. This may be used to include null fields in Patch
5347	// requests.
5348	NullFields []string `json:"-"`
5349}
5350
5351func (s *LiveChatMessageRetractedDetails) MarshalJSON() ([]byte, error) {
5352	type NoMethod LiveChatMessageRetractedDetails
5353	raw := NoMethod(*s)
5354	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5355}
5356
5357type LiveChatMessageSnippet struct {
5358	// AuthorChannelId: The ID of the user that authored this message, this
5359	// field is not always filled. textMessageEvent - the user that wrote
5360	// the message fanFundingEvent - the user that funded the broadcast
5361	// newSponsorEvent - the user that just became a sponsor
5362	// messageDeletedEvent - the moderator that took the action
5363	// messageRetractedEvent - the author that retracted their message
5364	// userBannedEvent - the moderator that took the action superChatEvent -
5365	// the user that made the purchase
5366	AuthorChannelId string `json:"authorChannelId,omitempty"`
5367
5368	// DisplayMessage: Contains a string that can be displayed to the user.
5369	// If this field is not present the message is silent, at the moment
5370	// only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent.
5371	DisplayMessage string `json:"displayMessage,omitempty"`
5372
5373	// FanFundingEventDetails: Details about the funding event, this is only
5374	// set if the type is 'fanFundingEvent'.
5375	FanFundingEventDetails *LiveChatFanFundingEventDetails `json:"fanFundingEventDetails,omitempty"`
5376
5377	// HasDisplayContent: Whether the message has display content that
5378	// should be displayed to users.
5379	HasDisplayContent bool `json:"hasDisplayContent,omitempty"`
5380
5381	LiveChatId string `json:"liveChatId,omitempty"`
5382
5383	MessageDeletedDetails *LiveChatMessageDeletedDetails `json:"messageDeletedDetails,omitempty"`
5384
5385	MessageRetractedDetails *LiveChatMessageRetractedDetails `json:"messageRetractedDetails,omitempty"`
5386
5387	PollClosedDetails *LiveChatPollClosedDetails `json:"pollClosedDetails,omitempty"`
5388
5389	PollEditedDetails *LiveChatPollEditedDetails `json:"pollEditedDetails,omitempty"`
5390
5391	PollOpenedDetails *LiveChatPollOpenedDetails `json:"pollOpenedDetails,omitempty"`
5392
5393	PollVotedDetails *LiveChatPollVotedDetails `json:"pollVotedDetails,omitempty"`
5394
5395	// PublishedAt: The date and time when the message was orignally
5396	// published. The value is specified in ISO 8601
5397	// (YYYY-MM-DDThh:mm:ss.sZ) format.
5398	PublishedAt string `json:"publishedAt,omitempty"`
5399
5400	// SuperChatDetails: Details about the Super Chat event, this is only
5401	// set if the type is 'superChatEvent'.
5402	SuperChatDetails *LiveChatSuperChatDetails `json:"superChatDetails,omitempty"`
5403
5404	// SuperStickerDetails: Details about the Super Sticker event, this is
5405	// only set if the type is 'superStickerEvent'.
5406	SuperStickerDetails *LiveChatSuperStickerDetails `json:"superStickerDetails,omitempty"`
5407
5408	// TextMessageDetails: Details about the text message, this is only set
5409	// if the type is 'textMessageEvent'.
5410	TextMessageDetails *LiveChatTextMessageDetails `json:"textMessageDetails,omitempty"`
5411
5412	// Type: The type of message, this will always be present, it determines
5413	// the contents of the message as well as which fields will be present.
5414	//
5415	// Possible values:
5416	//   "chatEndedEvent"
5417	//   "fanFundingEvent"
5418	//   "messageDeletedEvent"
5419	//   "messageRetractedEvent"
5420	//   "newSponsorEvent"
5421	//   "pollClosedEvent"
5422	//   "pollEditedEvent"
5423	//   "pollOpenedEvent"
5424	//   "pollVotedEvent"
5425	//   "sponsorOnlyModeEndedEvent"
5426	//   "sponsorOnlyModeStartedEvent"
5427	//   "superChatEvent"
5428	//   "superStickerEvent"
5429	//   "textMessageEvent"
5430	//   "tombstone"
5431	//   "userBannedEvent"
5432	Type string `json:"type,omitempty"`
5433
5434	UserBannedDetails *LiveChatUserBannedMessageDetails `json:"userBannedDetails,omitempty"`
5435
5436	// ForceSendFields is a list of field names (e.g. "AuthorChannelId") to
5437	// unconditionally include in API requests. By default, fields with
5438	// empty values are omitted from API requests. However, any non-pointer,
5439	// non-interface field appearing in ForceSendFields will be sent to the
5440	// server regardless of whether the field is empty or not. This may be
5441	// used to include empty fields in Patch requests.
5442	ForceSendFields []string `json:"-"`
5443
5444	// NullFields is a list of field names (e.g. "AuthorChannelId") to
5445	// include in API requests with the JSON null value. By default, fields
5446	// with empty values are omitted from API requests. However, any field
5447	// with an empty value appearing in NullFields will be sent to the
5448	// server as null. It is an error if a field in this list has a
5449	// non-empty value. This may be used to include null fields in Patch
5450	// requests.
5451	NullFields []string `json:"-"`
5452}
5453
5454func (s *LiveChatMessageSnippet) MarshalJSON() ([]byte, error) {
5455	type NoMethod LiveChatMessageSnippet
5456	raw := NoMethod(*s)
5457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5458}
5459
5460// LiveChatModerator: A liveChatModerator resource represents a
5461// moderator for a YouTube live chat. A chat moderator has the ability
5462// to ban/unban users from a chat, remove message, etc.
5463type LiveChatModerator struct {
5464	// Etag: Etag of this resource.
5465	Etag string `json:"etag,omitempty"`
5466
5467	// Id: The ID that YouTube assigns to uniquely identify the moderator.
5468	Id string `json:"id,omitempty"`
5469
5470	// Kind: Identifies what kind of resource this is. Value: the fixed
5471	// string "youtube#liveChatModerator".
5472	Kind string `json:"kind,omitempty"`
5473
5474	// Snippet: The snippet object contains basic details about the
5475	// moderator.
5476	Snippet *LiveChatModeratorSnippet `json:"snippet,omitempty"`
5477
5478	// ServerResponse contains the HTTP response code and headers from the
5479	// server.
5480	googleapi.ServerResponse `json:"-"`
5481
5482	// ForceSendFields is a list of field names (e.g. "Etag") to
5483	// unconditionally include in API requests. By default, fields with
5484	// empty values are omitted from API requests. However, any non-pointer,
5485	// non-interface field appearing in ForceSendFields will be sent to the
5486	// server regardless of whether the field is empty or not. This may be
5487	// used to include empty fields in Patch requests.
5488	ForceSendFields []string `json:"-"`
5489
5490	// NullFields is a list of field names (e.g. "Etag") to include in API
5491	// requests with the JSON null value. By default, fields with empty
5492	// values are omitted from API requests. However, any field with an
5493	// empty value appearing in NullFields will be sent to the server as
5494	// null. It is an error if a field in this list has a non-empty value.
5495	// This may be used to include null fields in Patch requests.
5496	NullFields []string `json:"-"`
5497}
5498
5499func (s *LiveChatModerator) MarshalJSON() ([]byte, error) {
5500	type NoMethod LiveChatModerator
5501	raw := NoMethod(*s)
5502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5503}
5504
5505type LiveChatModeratorListResponse struct {
5506	// Etag: Etag of this resource.
5507	Etag string `json:"etag,omitempty"`
5508
5509	// EventId: Serialized EventId of the request which produced this
5510	// response.
5511	EventId string `json:"eventId,omitempty"`
5512
5513	// Items: A list of moderators that match the request criteria.
5514	Items []*LiveChatModerator `json:"items,omitempty"`
5515
5516	// Kind: Identifies what kind of resource this is. Value: the fixed
5517	// string "youtube#liveChatModeratorListResponse".
5518	Kind string `json:"kind,omitempty"`
5519
5520	// NextPageToken: The token that can be used as the value of the
5521	// pageToken parameter to retrieve the next page in the result set.
5522	NextPageToken string `json:"nextPageToken,omitempty"`
5523
5524	PageInfo *PageInfo `json:"pageInfo,omitempty"`
5525
5526	// PrevPageToken: The token that can be used as the value of the
5527	// pageToken parameter to retrieve the previous page in the result set.
5528	PrevPageToken string `json:"prevPageToken,omitempty"`
5529
5530	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
5531
5532	// VisitorId: The visitorId identifies the visitor.
5533	VisitorId string `json:"visitorId,omitempty"`
5534
5535	// ServerResponse contains the HTTP response code and headers from the
5536	// server.
5537	googleapi.ServerResponse `json:"-"`
5538
5539	// ForceSendFields is a list of field names (e.g. "Etag") to
5540	// unconditionally include in API requests. By default, fields with
5541	// empty values are omitted from API requests. However, any non-pointer,
5542	// non-interface field appearing in ForceSendFields will be sent to the
5543	// server regardless of whether the field is empty or not. This may be
5544	// used to include empty fields in Patch requests.
5545	ForceSendFields []string `json:"-"`
5546
5547	// NullFields is a list of field names (e.g. "Etag") to include in API
5548	// requests with the JSON null value. By default, fields with empty
5549	// values are omitted from API requests. However, any field with an
5550	// empty value appearing in NullFields will be sent to the server as
5551	// null. It is an error if a field in this list has a non-empty value.
5552	// This may be used to include null fields in Patch requests.
5553	NullFields []string `json:"-"`
5554}
5555
5556func (s *LiveChatModeratorListResponse) MarshalJSON() ([]byte, error) {
5557	type NoMethod LiveChatModeratorListResponse
5558	raw := NoMethod(*s)
5559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5560}
5561
5562type LiveChatModeratorSnippet struct {
5563	// LiveChatId: The ID of the live chat this moderator can act on.
5564	LiveChatId string `json:"liveChatId,omitempty"`
5565
5566	// ModeratorDetails: Details about the moderator.
5567	ModeratorDetails *ChannelProfileDetails `json:"moderatorDetails,omitempty"`
5568
5569	// ForceSendFields is a list of field names (e.g. "LiveChatId") to
5570	// unconditionally include in API requests. By default, fields with
5571	// empty values are omitted from API requests. However, any non-pointer,
5572	// non-interface field appearing in ForceSendFields will be sent to the
5573	// server regardless of whether the field is empty or not. This may be
5574	// used to include empty fields in Patch requests.
5575	ForceSendFields []string `json:"-"`
5576
5577	// NullFields is a list of field names (e.g. "LiveChatId") to include in
5578	// API requests with the JSON null value. By default, fields with empty
5579	// values are omitted from API requests. However, any field with an
5580	// empty value appearing in NullFields will be sent to the server as
5581	// null. It is an error if a field in this list has a non-empty value.
5582	// This may be used to include null fields in Patch requests.
5583	NullFields []string `json:"-"`
5584}
5585
5586func (s *LiveChatModeratorSnippet) MarshalJSON() ([]byte, error) {
5587	type NoMethod LiveChatModeratorSnippet
5588	raw := NoMethod(*s)
5589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5590}
5591
5592type LiveChatPollClosedDetails struct {
5593	// PollId: The id of the poll that was closed.
5594	PollId string `json:"pollId,omitempty"`
5595
5596	// ForceSendFields is a list of field names (e.g. "PollId") to
5597	// unconditionally include in API requests. By default, fields with
5598	// empty values are omitted from API requests. However, any non-pointer,
5599	// non-interface field appearing in ForceSendFields will be sent to the
5600	// server regardless of whether the field is empty or not. This may be
5601	// used to include empty fields in Patch requests.
5602	ForceSendFields []string `json:"-"`
5603
5604	// NullFields is a list of field names (e.g. "PollId") to include in API
5605	// requests with the JSON null value. By default, fields with empty
5606	// values are omitted from API requests. However, any field with an
5607	// empty value appearing in NullFields will be sent to the server as
5608	// null. It is an error if a field in this list has a non-empty value.
5609	// This may be used to include null fields in Patch requests.
5610	NullFields []string `json:"-"`
5611}
5612
5613func (s *LiveChatPollClosedDetails) MarshalJSON() ([]byte, error) {
5614	type NoMethod LiveChatPollClosedDetails
5615	raw := NoMethod(*s)
5616	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5617}
5618
5619type LiveChatPollEditedDetails struct {
5620	Id string `json:"id,omitempty"`
5621
5622	Items []*LiveChatPollItem `json:"items,omitempty"`
5623
5624	Prompt string `json:"prompt,omitempty"`
5625
5626	// ForceSendFields is a list of field names (e.g. "Id") to
5627	// unconditionally include in API requests. By default, fields with
5628	// empty values are omitted from API requests. However, any non-pointer,
5629	// non-interface field appearing in ForceSendFields will be sent to the
5630	// server regardless of whether the field is empty or not. This may be
5631	// used to include empty fields in Patch requests.
5632	ForceSendFields []string `json:"-"`
5633
5634	// NullFields is a list of field names (e.g. "Id") to include in API
5635	// requests with the JSON null value. By default, fields with empty
5636	// values are omitted from API requests. However, any field with an
5637	// empty value appearing in NullFields will be sent to the server as
5638	// null. It is an error if a field in this list has a non-empty value.
5639	// This may be used to include null fields in Patch requests.
5640	NullFields []string `json:"-"`
5641}
5642
5643func (s *LiveChatPollEditedDetails) MarshalJSON() ([]byte, error) {
5644	type NoMethod LiveChatPollEditedDetails
5645	raw := NoMethod(*s)
5646	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5647}
5648
5649type LiveChatPollItem struct {
5650	// Description: Plain text description of the item.
5651	Description string `json:"description,omitempty"`
5652
5653	ItemId string `json:"itemId,omitempty"`
5654
5655	// ForceSendFields is a list of field names (e.g. "Description") to
5656	// unconditionally include in API requests. By default, fields with
5657	// empty values are omitted from API requests. However, any non-pointer,
5658	// non-interface field appearing in ForceSendFields will be sent to the
5659	// server regardless of whether the field is empty or not. This may be
5660	// used to include empty fields in Patch requests.
5661	ForceSendFields []string `json:"-"`
5662
5663	// NullFields is a list of field names (e.g. "Description") to include
5664	// in API requests with the JSON null value. By default, fields with
5665	// empty values are omitted from API requests. However, any field with
5666	// an empty value appearing in NullFields will be sent to the server as
5667	// null. It is an error if a field in this list has a non-empty value.
5668	// This may be used to include null fields in Patch requests.
5669	NullFields []string `json:"-"`
5670}
5671
5672func (s *LiveChatPollItem) MarshalJSON() ([]byte, error) {
5673	type NoMethod LiveChatPollItem
5674	raw := NoMethod(*s)
5675	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5676}
5677
5678type LiveChatPollOpenedDetails struct {
5679	Id string `json:"id,omitempty"`
5680
5681	Items []*LiveChatPollItem `json:"items,omitempty"`
5682
5683	Prompt string `json:"prompt,omitempty"`
5684
5685	// ForceSendFields is a list of field names (e.g. "Id") to
5686	// unconditionally include in API requests. By default, fields with
5687	// empty values are omitted from API requests. However, any non-pointer,
5688	// non-interface field appearing in ForceSendFields will be sent to the
5689	// server regardless of whether the field is empty or not. This may be
5690	// used to include empty fields in Patch requests.
5691	ForceSendFields []string `json:"-"`
5692
5693	// NullFields is a list of field names (e.g. "Id") to include in API
5694	// requests with the JSON null value. By default, fields with empty
5695	// values are omitted from API requests. However, any field with an
5696	// empty value appearing in NullFields will be sent to the server as
5697	// null. It is an error if a field in this list has a non-empty value.
5698	// This may be used to include null fields in Patch requests.
5699	NullFields []string `json:"-"`
5700}
5701
5702func (s *LiveChatPollOpenedDetails) MarshalJSON() ([]byte, error) {
5703	type NoMethod LiveChatPollOpenedDetails
5704	raw := NoMethod(*s)
5705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5706}
5707
5708type LiveChatPollVotedDetails struct {
5709	// ItemId: The poll item the user chose.
5710	ItemId string `json:"itemId,omitempty"`
5711
5712	// PollId: The poll the user voted on.
5713	PollId string `json:"pollId,omitempty"`
5714
5715	// ForceSendFields is a list of field names (e.g. "ItemId") to
5716	// unconditionally include in API requests. By default, fields with
5717	// empty values are omitted from API requests. However, any non-pointer,
5718	// non-interface field appearing in ForceSendFields will be sent to the
5719	// server regardless of whether the field is empty or not. This may be
5720	// used to include empty fields in Patch requests.
5721	ForceSendFields []string `json:"-"`
5722
5723	// NullFields is a list of field names (e.g. "ItemId") to include in API
5724	// requests with the JSON null value. By default, fields with empty
5725	// values are omitted from API requests. However, any field with an
5726	// empty value appearing in NullFields will be sent to the server as
5727	// null. It is an error if a field in this list has a non-empty value.
5728	// This may be used to include null fields in Patch requests.
5729	NullFields []string `json:"-"`
5730}
5731
5732func (s *LiveChatPollVotedDetails) MarshalJSON() ([]byte, error) {
5733	type NoMethod LiveChatPollVotedDetails
5734	raw := NoMethod(*s)
5735	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5736}
5737
5738type LiveChatSuperChatDetails struct {
5739	// AmountDisplayString: A rendered string that displays the fund amount
5740	// and currency to the user.
5741	AmountDisplayString string `json:"amountDisplayString,omitempty"`
5742
5743	// AmountMicros: The amount purchased by the user, in micros (1,750,000
5744	// micros = 1.75).
5745	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
5746
5747	// Currency: The currency in which the purchase was made.
5748	Currency string `json:"currency,omitempty"`
5749
5750	// Tier: The tier in which the amount belongs. Lower amounts belong to
5751	// lower tiers. The lowest tier is 1.
5752	Tier int64 `json:"tier,omitempty"`
5753
5754	// UserComment: The comment added by the user to this Super Chat event.
5755	UserComment string `json:"userComment,omitempty"`
5756
5757	// ForceSendFields is a list of field names (e.g. "AmountDisplayString")
5758	// to unconditionally include in API requests. By default, fields with
5759	// empty values are omitted from API requests. However, any non-pointer,
5760	// non-interface field appearing in ForceSendFields will be sent to the
5761	// server regardless of whether the field is empty or not. This may be
5762	// used to include empty fields in Patch requests.
5763	ForceSendFields []string `json:"-"`
5764
5765	// NullFields is a list of field names (e.g. "AmountDisplayString") to
5766	// include in API requests with the JSON null value. By default, fields
5767	// with empty values are omitted from API requests. However, any field
5768	// with an empty value appearing in NullFields will be sent to the
5769	// server as null. It is an error if a field in this list has a
5770	// non-empty value. This may be used to include null fields in Patch
5771	// requests.
5772	NullFields []string `json:"-"`
5773}
5774
5775func (s *LiveChatSuperChatDetails) MarshalJSON() ([]byte, error) {
5776	type NoMethod LiveChatSuperChatDetails
5777	raw := NoMethod(*s)
5778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5779}
5780
5781type LiveChatSuperStickerDetails struct {
5782	// AmountDisplayString: A rendered string that displays the fund amount
5783	// and currency to the user.
5784	AmountDisplayString string `json:"amountDisplayString,omitempty"`
5785
5786	// AmountMicros: The amount purchased by the user, in micros (1,750,000
5787	// micros = 1.75).
5788	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
5789
5790	// Currency: The currency in which the purchase was made.
5791	Currency string `json:"currency,omitempty"`
5792
5793	// SuperStickerMetadata: Information about the Super Sticker.
5794	SuperStickerMetadata *SuperStickerMetadata `json:"superStickerMetadata,omitempty"`
5795
5796	// Tier: The tier in which the amount belongs. Lower amounts belong to
5797	// lower tiers. The lowest tier is 1.
5798	Tier int64 `json:"tier,omitempty"`
5799
5800	// ForceSendFields is a list of field names (e.g. "AmountDisplayString")
5801	// to unconditionally include in API requests. By default, fields with
5802	// empty values are omitted from API requests. However, any non-pointer,
5803	// non-interface field appearing in ForceSendFields will be sent to the
5804	// server regardless of whether the field is empty or not. This may be
5805	// used to include empty fields in Patch requests.
5806	ForceSendFields []string `json:"-"`
5807
5808	// NullFields is a list of field names (e.g. "AmountDisplayString") to
5809	// include in API requests with the JSON null value. By default, fields
5810	// with empty values are omitted from API requests. However, any field
5811	// with an empty value appearing in NullFields will be sent to the
5812	// server as null. It is an error if a field in this list has a
5813	// non-empty value. This may be used to include null fields in Patch
5814	// requests.
5815	NullFields []string `json:"-"`
5816}
5817
5818func (s *LiveChatSuperStickerDetails) MarshalJSON() ([]byte, error) {
5819	type NoMethod LiveChatSuperStickerDetails
5820	raw := NoMethod(*s)
5821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5822}
5823
5824type LiveChatTextMessageDetails struct {
5825	// MessageText: The user's message.
5826	MessageText string `json:"messageText,omitempty"`
5827
5828	// ForceSendFields is a list of field names (e.g. "MessageText") to
5829	// unconditionally include in API requests. By default, fields with
5830	// empty values are omitted from API requests. However, any non-pointer,
5831	// non-interface field appearing in ForceSendFields will be sent to the
5832	// server regardless of whether the field is empty or not. This may be
5833	// used to include empty fields in Patch requests.
5834	ForceSendFields []string `json:"-"`
5835
5836	// NullFields is a list of field names (e.g. "MessageText") to include
5837	// in API requests with the JSON null value. By default, fields with
5838	// empty values are omitted from API requests. However, any field with
5839	// an empty value appearing in NullFields will be sent to the server as
5840	// null. It is an error if a field in this list has a non-empty value.
5841	// This may be used to include null fields in Patch requests.
5842	NullFields []string `json:"-"`
5843}
5844
5845func (s *LiveChatTextMessageDetails) MarshalJSON() ([]byte, error) {
5846	type NoMethod LiveChatTextMessageDetails
5847	raw := NoMethod(*s)
5848	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5849}
5850
5851type LiveChatUserBannedMessageDetails struct {
5852	// BanDurationSeconds: The duration of the ban. This property is only
5853	// present if the banType is temporary.
5854	BanDurationSeconds uint64 `json:"banDurationSeconds,omitempty,string"`
5855
5856	// BanType: The type of ban.
5857	//
5858	// Possible values:
5859	//   "permanent"
5860	//   "temporary"
5861	BanType string `json:"banType,omitempty"`
5862
5863	// BannedUserDetails: The details of the user that was banned.
5864	BannedUserDetails *ChannelProfileDetails `json:"bannedUserDetails,omitempty"`
5865
5866	// ForceSendFields is a list of field names (e.g. "BanDurationSeconds")
5867	// to unconditionally include in API requests. By default, fields with
5868	// empty values are omitted from API requests. However, any non-pointer,
5869	// non-interface field appearing in ForceSendFields will be sent to the
5870	// server regardless of whether the field is empty or not. This may be
5871	// used to include empty fields in Patch requests.
5872	ForceSendFields []string `json:"-"`
5873
5874	// NullFields is a list of field names (e.g. "BanDurationSeconds") to
5875	// include in API requests with the JSON null value. By default, fields
5876	// with empty values are omitted from API requests. However, any field
5877	// with an empty value appearing in NullFields will be sent to the
5878	// server as null. It is an error if a field in this list has a
5879	// non-empty value. This may be used to include null fields in Patch
5880	// requests.
5881	NullFields []string `json:"-"`
5882}
5883
5884func (s *LiveChatUserBannedMessageDetails) MarshalJSON() ([]byte, error) {
5885	type NoMethod LiveChatUserBannedMessageDetails
5886	raw := NoMethod(*s)
5887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5888}
5889
5890// LiveStream: A live stream describes a live ingestion point.
5891type LiveStream struct {
5892	// Cdn: The cdn object defines the live stream's content delivery
5893	// network (CDN) settings. These settings provide details about the
5894	// manner in which you stream your content to YouTube.
5895	Cdn *CdnSettings `json:"cdn,omitempty"`
5896
5897	// ContentDetails: The content_details object contains information about
5898	// the stream, including the closed captions ingestion URL.
5899	ContentDetails *LiveStreamContentDetails `json:"contentDetails,omitempty"`
5900
5901	// Etag: Etag of this resource.
5902	Etag string `json:"etag,omitempty"`
5903
5904	// Id: The ID that YouTube assigns to uniquely identify the stream.
5905	Id string `json:"id,omitempty"`
5906
5907	// Kind: Identifies what kind of resource this is. Value: the fixed
5908	// string "youtube#liveStream".
5909	Kind string `json:"kind,omitempty"`
5910
5911	// Snippet: The snippet object contains basic details about the stream,
5912	// including its channel, title, and description.
5913	Snippet *LiveStreamSnippet `json:"snippet,omitempty"`
5914
5915	// Status: The status object contains information about live stream's
5916	// status.
5917	Status *LiveStreamStatus `json:"status,omitempty"`
5918
5919	// ServerResponse contains the HTTP response code and headers from the
5920	// server.
5921	googleapi.ServerResponse `json:"-"`
5922
5923	// ForceSendFields is a list of field names (e.g. "Cdn") to
5924	// unconditionally include in API requests. By default, fields with
5925	// empty values are omitted from API requests. However, any non-pointer,
5926	// non-interface field appearing in ForceSendFields will be sent to the
5927	// server regardless of whether the field is empty or not. This may be
5928	// used to include empty fields in Patch requests.
5929	ForceSendFields []string `json:"-"`
5930
5931	// NullFields is a list of field names (e.g. "Cdn") to include in API
5932	// requests with the JSON null value. By default, fields with empty
5933	// values are omitted from API requests. However, any field with an
5934	// empty value appearing in NullFields will be sent to the server as
5935	// null. It is an error if a field in this list has a non-empty value.
5936	// This may be used to include null fields in Patch requests.
5937	NullFields []string `json:"-"`
5938}
5939
5940func (s *LiveStream) MarshalJSON() ([]byte, error) {
5941	type NoMethod LiveStream
5942	raw := NoMethod(*s)
5943	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5944}
5945
5946type LiveStreamConfigurationIssue struct {
5947	// Description: The long-form description of the issue and how to
5948	// resolve it.
5949	Description string `json:"description,omitempty"`
5950
5951	// Reason: The short-form reason for this issue.
5952	Reason string `json:"reason,omitempty"`
5953
5954	// Severity: How severe this issue is to the stream.
5955	//
5956	// Possible values:
5957	//   "error"
5958	//   "info"
5959	//   "warning"
5960	Severity string `json:"severity,omitempty"`
5961
5962	// Type: The kind of error happening.
5963	//
5964	// Possible values:
5965	//   "audioBitrateHigh"
5966	//   "audioBitrateLow"
5967	//   "audioBitrateMismatch"
5968	//   "audioCodec"
5969	//   "audioCodecMismatch"
5970	//   "audioSampleRate"
5971	//   "audioSampleRateMismatch"
5972	//   "audioStereoMismatch"
5973	//   "audioTooManyChannels"
5974	//   "badContainer"
5975	//   "bitrateHigh"
5976	//   "bitrateLow"
5977	//   "frameRateHigh"
5978	//   "framerateMismatch"
5979	//   "gopMismatch"
5980	//   "gopSizeLong"
5981	//   "gopSizeOver"
5982	//   "gopSizeShort"
5983	//   "interlacedVideo"
5984	//   "multipleAudioStreams"
5985	//   "multipleVideoStreams"
5986	//   "noAudioStream"
5987	//   "noVideoStream"
5988	//   "openGop"
5989	//   "resolutionMismatch"
5990	//   "videoBitrateMismatch"
5991	//   "videoCodec"
5992	//   "videoCodecMismatch"
5993	//   "videoIngestionFasterThanRealtime"
5994	//   "videoIngestionStarved"
5995	//   "videoInterlaceMismatch"
5996	//   "videoProfileMismatch"
5997	//   "videoResolutionSuboptimal"
5998	//   "videoResolutionUnsupported"
5999	Type string `json:"type,omitempty"`
6000
6001	// ForceSendFields is a list of field names (e.g. "Description") to
6002	// unconditionally include in API requests. By default, fields with
6003	// empty values are omitted from API requests. However, any non-pointer,
6004	// non-interface field appearing in ForceSendFields will be sent to the
6005	// server regardless of whether the field is empty or not. This may be
6006	// used to include empty fields in Patch requests.
6007	ForceSendFields []string `json:"-"`
6008
6009	// NullFields is a list of field names (e.g. "Description") to include
6010	// in API requests with the JSON null value. By default, fields with
6011	// empty values are omitted from API requests. However, any field with
6012	// an empty value appearing in NullFields will be sent to the server as
6013	// null. It is an error if a field in this list has a non-empty value.
6014	// This may be used to include null fields in Patch requests.
6015	NullFields []string `json:"-"`
6016}
6017
6018func (s *LiveStreamConfigurationIssue) MarshalJSON() ([]byte, error) {
6019	type NoMethod LiveStreamConfigurationIssue
6020	raw := NoMethod(*s)
6021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6022}
6023
6024// LiveStreamContentDetails: Detailed settings of a stream.
6025type LiveStreamContentDetails struct {
6026	// ClosedCaptionsIngestionUrl: The ingestion URL where the closed
6027	// captions of this stream are sent.
6028	ClosedCaptionsIngestionUrl string `json:"closedCaptionsIngestionUrl,omitempty"`
6029
6030	// IsReusable: Indicates whether the stream is reusable, which means
6031	// that it can be bound to multiple broadcasts. It is common for
6032	// broadcasters to reuse the same stream for many different broadcasts
6033	// if those broadcasts occur at different times.
6034	//
6035	// If you set this value to false, then the stream will not be reusable,
6036	// which means that it can only be bound to one broadcast. Non-reusable
6037	// streams differ from reusable streams in the following ways:
6038	// - A non-reusable stream can only be bound to one broadcast.
6039	// - A non-reusable stream might be deleted by an automated process
6040	// after the broadcast ends.
6041	// - The  liveStreams.list method does not list non-reusable streams if
6042	// you call the method and set the mine parameter to true. The only way
6043	// to use that method to retrieve the resource for a non-reusable stream
6044	// is to use the id parameter to identify the stream.
6045	IsReusable bool `json:"isReusable,omitempty"`
6046
6047	// ForceSendFields is a list of field names (e.g.
6048	// "ClosedCaptionsIngestionUrl") to unconditionally include in API
6049	// requests. By default, fields with empty values are omitted from API
6050	// requests. However, any non-pointer, non-interface field appearing in
6051	// ForceSendFields will be sent to the server regardless of whether the
6052	// field is empty or not. This may be used to include empty fields in
6053	// Patch requests.
6054	ForceSendFields []string `json:"-"`
6055
6056	// NullFields is a list of field names (e.g.
6057	// "ClosedCaptionsIngestionUrl") to include in API requests with the
6058	// JSON null value. By default, fields with empty values are omitted
6059	// from API requests. However, any field with an empty value appearing
6060	// in NullFields will be sent to the server as null. It is an error if a
6061	// field in this list has a non-empty value. This may be used to include
6062	// null fields in Patch requests.
6063	NullFields []string `json:"-"`
6064}
6065
6066func (s *LiveStreamContentDetails) MarshalJSON() ([]byte, error) {
6067	type NoMethod LiveStreamContentDetails
6068	raw := NoMethod(*s)
6069	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6070}
6071
6072type LiveStreamHealthStatus struct {
6073	// ConfigurationIssues: The configurations issues on this stream
6074	ConfigurationIssues []*LiveStreamConfigurationIssue `json:"configurationIssues,omitempty"`
6075
6076	// LastUpdateTimeSeconds: The last time this status was updated (in
6077	// seconds)
6078	LastUpdateTimeSeconds uint64 `json:"lastUpdateTimeSeconds,omitempty,string"`
6079
6080	// Status: The status code of this stream
6081	//
6082	// Possible values:
6083	//   "bad"
6084	//   "good"
6085	//   "noData"
6086	//   "ok"
6087	//   "revoked"
6088	Status string `json:"status,omitempty"`
6089
6090	// ForceSendFields is a list of field names (e.g. "ConfigurationIssues")
6091	// to unconditionally include in API requests. By default, fields with
6092	// empty values are omitted from API requests. However, any non-pointer,
6093	// non-interface field appearing in ForceSendFields will be sent to the
6094	// server regardless of whether the field is empty or not. This may be
6095	// used to include empty fields in Patch requests.
6096	ForceSendFields []string `json:"-"`
6097
6098	// NullFields is a list of field names (e.g. "ConfigurationIssues") to
6099	// include in API requests with the JSON null value. By default, fields
6100	// with empty values are omitted from API requests. However, any field
6101	// with an empty value appearing in NullFields will be sent to the
6102	// server as null. It is an error if a field in this list has a
6103	// non-empty value. This may be used to include null fields in Patch
6104	// requests.
6105	NullFields []string `json:"-"`
6106}
6107
6108func (s *LiveStreamHealthStatus) MarshalJSON() ([]byte, error) {
6109	type NoMethod LiveStreamHealthStatus
6110	raw := NoMethod(*s)
6111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6112}
6113
6114type LiveStreamListResponse struct {
6115	// Etag: Etag of this resource.
6116	Etag string `json:"etag,omitempty"`
6117
6118	// EventId: Serialized EventId of the request which produced this
6119	// response.
6120	EventId string `json:"eventId,omitempty"`
6121
6122	// Items: A list of live streams that match the request criteria.
6123	Items []*LiveStream `json:"items,omitempty"`
6124
6125	// Kind: Identifies what kind of resource this is. Value: the fixed
6126	// string "youtube#liveStreamListResponse".
6127	Kind string `json:"kind,omitempty"`
6128
6129	// NextPageToken: The token that can be used as the value of the
6130	// pageToken parameter to retrieve the next page in the result set.
6131	NextPageToken string `json:"nextPageToken,omitempty"`
6132
6133	PageInfo *PageInfo `json:"pageInfo,omitempty"`
6134
6135	// PrevPageToken: The token that can be used as the value of the
6136	// pageToken parameter to retrieve the previous page in the result set.
6137	PrevPageToken string `json:"prevPageToken,omitempty"`
6138
6139	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6140
6141	// VisitorId: The visitorId identifies the visitor.
6142	VisitorId string `json:"visitorId,omitempty"`
6143
6144	// ServerResponse contains the HTTP response code and headers from the
6145	// server.
6146	googleapi.ServerResponse `json:"-"`
6147
6148	// ForceSendFields is a list of field names (e.g. "Etag") to
6149	// unconditionally include in API requests. By default, fields with
6150	// empty values are omitted from API requests. However, any non-pointer,
6151	// non-interface field appearing in ForceSendFields will be sent to the
6152	// server regardless of whether the field is empty or not. This may be
6153	// used to include empty fields in Patch requests.
6154	ForceSendFields []string `json:"-"`
6155
6156	// NullFields is a list of field names (e.g. "Etag") to include in API
6157	// requests with the JSON null value. By default, fields with empty
6158	// values are omitted from API requests. However, any field with an
6159	// empty value appearing in NullFields will be sent to the server as
6160	// null. It is an error if a field in this list has a non-empty value.
6161	// This may be used to include null fields in Patch requests.
6162	NullFields []string `json:"-"`
6163}
6164
6165func (s *LiveStreamListResponse) MarshalJSON() ([]byte, error) {
6166	type NoMethod LiveStreamListResponse
6167	raw := NoMethod(*s)
6168	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6169}
6170
6171type LiveStreamSnippet struct {
6172	// ChannelId: The ID that YouTube uses to uniquely identify the channel
6173	// that is transmitting the stream.
6174	ChannelId string `json:"channelId,omitempty"`
6175
6176	// Description: The stream's description. The value cannot be longer
6177	// than 10000 characters.
6178	Description string `json:"description,omitempty"`
6179
6180	IsDefaultStream bool `json:"isDefaultStream,omitempty"`
6181
6182	// PublishedAt: The date and time that the stream was created. The value
6183	// is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
6184	PublishedAt string `json:"publishedAt,omitempty"`
6185
6186	// Title: The stream's title. The value must be between 1 and 128
6187	// characters long.
6188	Title string `json:"title,omitempty"`
6189
6190	// ForceSendFields is a list of field names (e.g. "ChannelId") to
6191	// unconditionally include in API requests. By default, fields with
6192	// empty values are omitted from API requests. However, any non-pointer,
6193	// non-interface field appearing in ForceSendFields will be sent to the
6194	// server regardless of whether the field is empty or not. This may be
6195	// used to include empty fields in Patch requests.
6196	ForceSendFields []string `json:"-"`
6197
6198	// NullFields is a list of field names (e.g. "ChannelId") to include in
6199	// API requests with the JSON null value. By default, fields with empty
6200	// values are omitted from API requests. However, any field with an
6201	// empty value appearing in NullFields will be sent to the server as
6202	// null. It is an error if a field in this list has a non-empty value.
6203	// This may be used to include null fields in Patch requests.
6204	NullFields []string `json:"-"`
6205}
6206
6207func (s *LiveStreamSnippet) MarshalJSON() ([]byte, error) {
6208	type NoMethod LiveStreamSnippet
6209	raw := NoMethod(*s)
6210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6211}
6212
6213// LiveStreamStatus: Brief description of the live stream status.
6214type LiveStreamStatus struct {
6215	// HealthStatus: The health status of the stream.
6216	HealthStatus *LiveStreamHealthStatus `json:"healthStatus,omitempty"`
6217
6218	// Possible values:
6219	//   "active"
6220	//   "created"
6221	//   "error"
6222	//   "inactive"
6223	//   "ready"
6224	StreamStatus string `json:"streamStatus,omitempty"`
6225
6226	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
6227	// unconditionally include in API requests. By default, fields with
6228	// empty values are omitted from API requests. However, any non-pointer,
6229	// non-interface field appearing in ForceSendFields will be sent to the
6230	// server regardless of whether the field is empty or not. This may be
6231	// used to include empty fields in Patch requests.
6232	ForceSendFields []string `json:"-"`
6233
6234	// NullFields is a list of field names (e.g. "HealthStatus") to include
6235	// in API requests with the JSON null value. By default, fields with
6236	// empty values are omitted from API requests. However, any field with
6237	// an empty value appearing in NullFields will be sent to the server as
6238	// null. It is an error if a field in this list has a non-empty value.
6239	// This may be used to include null fields in Patch requests.
6240	NullFields []string `json:"-"`
6241}
6242
6243func (s *LiveStreamStatus) MarshalJSON() ([]byte, error) {
6244	type NoMethod LiveStreamStatus
6245	raw := NoMethod(*s)
6246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6247}
6248
6249type LocalizedProperty struct {
6250	Default string `json:"default,omitempty"`
6251
6252	// DefaultLanguage: The language of the default property.
6253	DefaultLanguage *LanguageTag `json:"defaultLanguage,omitempty"`
6254
6255	Localized []*LocalizedString `json:"localized,omitempty"`
6256
6257	// ForceSendFields is a list of field names (e.g. "Default") to
6258	// unconditionally include in API requests. By default, fields with
6259	// empty values are omitted from API requests. However, any non-pointer,
6260	// non-interface field appearing in ForceSendFields will be sent to the
6261	// server regardless of whether the field is empty or not. This may be
6262	// used to include empty fields in Patch requests.
6263	ForceSendFields []string `json:"-"`
6264
6265	// NullFields is a list of field names (e.g. "Default") to include in
6266	// API requests with the JSON null value. By default, fields with empty
6267	// values are omitted from API requests. However, any field with an
6268	// empty value appearing in NullFields will be sent to the server as
6269	// null. It is an error if a field in this list has a non-empty value.
6270	// This may be used to include null fields in Patch requests.
6271	NullFields []string `json:"-"`
6272}
6273
6274func (s *LocalizedProperty) MarshalJSON() ([]byte, error) {
6275	type NoMethod LocalizedProperty
6276	raw := NoMethod(*s)
6277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6278}
6279
6280type LocalizedString struct {
6281	Language string `json:"language,omitempty"`
6282
6283	Value string `json:"value,omitempty"`
6284
6285	// ForceSendFields is a list of field names (e.g. "Language") to
6286	// unconditionally include in API requests. By default, fields with
6287	// empty values are omitted from API requests. However, any non-pointer,
6288	// non-interface field appearing in ForceSendFields will be sent to the
6289	// server regardless of whether the field is empty or not. This may be
6290	// used to include empty fields in Patch requests.
6291	ForceSendFields []string `json:"-"`
6292
6293	// NullFields is a list of field names (e.g. "Language") to include in
6294	// API requests with the JSON null value. By default, fields with empty
6295	// values are omitted from API requests. However, any field with an
6296	// empty value appearing in NullFields will be sent to the server as
6297	// null. It is an error if a field in this list has a non-empty value.
6298	// This may be used to include null fields in Patch requests.
6299	NullFields []string `json:"-"`
6300}
6301
6302func (s *LocalizedString) MarshalJSON() ([]byte, error) {
6303	type NoMethod LocalizedString
6304	raw := NoMethod(*s)
6305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6306}
6307
6308// MonitorStreamInfo: Settings and Info of the monitor stream
6309type MonitorStreamInfo struct {
6310	// BroadcastStreamDelayMs: If you have set the enableMonitorStream
6311	// property to true, then this property determines the length of the
6312	// live broadcast delay.
6313	BroadcastStreamDelayMs int64 `json:"broadcastStreamDelayMs,omitempty"`
6314
6315	// EmbedHtml: HTML code that embeds a player that plays the monitor
6316	// stream.
6317	EmbedHtml string `json:"embedHtml,omitempty"`
6318
6319	// EnableMonitorStream: This value determines whether the monitor stream
6320	// is enabled for the broadcast. If the monitor stream is enabled, then
6321	// YouTube will broadcast the event content on a special stream intended
6322	// only for the broadcaster's consumption. The broadcaster can use the
6323	// stream to review the event content and also to identify the optimal
6324	// times to insert cuepoints.
6325	//
6326	// You need to set this value to true if you intend to have a broadcast
6327	// delay for your event.
6328	//
6329	// Note: This property cannot be updated once the broadcast is in the
6330	// testing or live state.
6331	EnableMonitorStream bool `json:"enableMonitorStream,omitempty"`
6332
6333	// ForceSendFields is a list of field names (e.g.
6334	// "BroadcastStreamDelayMs") to unconditionally include in API requests.
6335	// By default, fields with empty values are omitted from API requests.
6336	// However, any non-pointer, non-interface field appearing in
6337	// ForceSendFields will be sent to the server regardless of whether the
6338	// field is empty or not. This may be used to include empty fields in
6339	// Patch requests.
6340	ForceSendFields []string `json:"-"`
6341
6342	// NullFields is a list of field names (e.g. "BroadcastStreamDelayMs")
6343	// to include in API requests with the JSON null value. By default,
6344	// fields with empty values are omitted from API requests. However, any
6345	// field with an empty value appearing in NullFields will be sent to the
6346	// server as null. It is an error if a field in this list has a
6347	// non-empty value. This may be used to include null fields in Patch
6348	// requests.
6349	NullFields []string `json:"-"`
6350}
6351
6352func (s *MonitorStreamInfo) MarshalJSON() ([]byte, error) {
6353	type NoMethod MonitorStreamInfo
6354	raw := NoMethod(*s)
6355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6356}
6357
6358// Nonprofit: Nonprofit information.
6359type Nonprofit struct {
6360	// NonprofitId: Id of the nonprofit.
6361	NonprofitId *NonprofitId `json:"nonprofitId,omitempty"`
6362
6363	// NonprofitLegalName: Legal name of the nonprofit.
6364	NonprofitLegalName string `json:"nonprofitLegalName,omitempty"`
6365
6366	// ForceSendFields is a list of field names (e.g. "NonprofitId") to
6367	// unconditionally include in API requests. By default, fields with
6368	// empty values are omitted from API requests. However, any non-pointer,
6369	// non-interface field appearing in ForceSendFields will be sent to the
6370	// server regardless of whether the field is empty or not. This may be
6371	// used to include empty fields in Patch requests.
6372	ForceSendFields []string `json:"-"`
6373
6374	// NullFields is a list of field names (e.g. "NonprofitId") to include
6375	// in API requests with the JSON null value. By default, fields with
6376	// empty values are omitted from API requests. However, any field with
6377	// an empty value appearing in NullFields will be sent to the server as
6378	// null. It is an error if a field in this list has a non-empty value.
6379	// This may be used to include null fields in Patch requests.
6380	NullFields []string `json:"-"`
6381}
6382
6383func (s *Nonprofit) MarshalJSON() ([]byte, error) {
6384	type NoMethod Nonprofit
6385	raw := NoMethod(*s)
6386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6387}
6388
6389type NonprofitId struct {
6390	Value string `json:"value,omitempty"`
6391
6392	// ForceSendFields is a list of field names (e.g. "Value") to
6393	// unconditionally include in API requests. By default, fields with
6394	// empty values are omitted from API requests. However, any non-pointer,
6395	// non-interface field appearing in ForceSendFields will be sent to the
6396	// server regardless of whether the field is empty or not. This may be
6397	// used to include empty fields in Patch requests.
6398	ForceSendFields []string `json:"-"`
6399
6400	// NullFields is a list of field names (e.g. "Value") to include in API
6401	// requests with the JSON null value. By default, fields with empty
6402	// values are omitted from API requests. However, any field with an
6403	// empty value appearing in NullFields will be sent to the server as
6404	// null. It is an error if a field in this list has a non-empty value.
6405	// This may be used to include null fields in Patch requests.
6406	NullFields []string `json:"-"`
6407}
6408
6409func (s *NonprofitId) MarshalJSON() ([]byte, error) {
6410	type NoMethod NonprofitId
6411	raw := NoMethod(*s)
6412	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6413}
6414
6415// PageInfo: Paging details for lists of resources, including total
6416// number of items available and number of resources returned in a
6417// single page.
6418type PageInfo struct {
6419	// ResultsPerPage: The number of results included in the API response.
6420	ResultsPerPage int64 `json:"resultsPerPage,omitempty"`
6421
6422	// TotalResults: The total number of results in the result set.
6423	TotalResults int64 `json:"totalResults,omitempty"`
6424
6425	// ForceSendFields is a list of field names (e.g. "ResultsPerPage") to
6426	// unconditionally include in API requests. By default, fields with
6427	// empty values are omitted from API requests. However, any non-pointer,
6428	// non-interface field appearing in ForceSendFields will be sent to the
6429	// server regardless of whether the field is empty or not. This may be
6430	// used to include empty fields in Patch requests.
6431	ForceSendFields []string `json:"-"`
6432
6433	// NullFields is a list of field names (e.g. "ResultsPerPage") to
6434	// include in API requests with the JSON null value. By default, fields
6435	// with empty values are omitted from API requests. However, any field
6436	// with an empty value appearing in NullFields will be sent to the
6437	// server as null. It is an error if a field in this list has a
6438	// non-empty value. This may be used to include null fields in Patch
6439	// requests.
6440	NullFields []string `json:"-"`
6441}
6442
6443func (s *PageInfo) MarshalJSON() ([]byte, error) {
6444	type NoMethod PageInfo
6445	raw := NoMethod(*s)
6446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6447}
6448
6449// Playlist: A playlist resource represents a YouTube playlist. A
6450// playlist is a collection of videos that can be viewed sequentially
6451// and shared with other users. A playlist can contain up to 200 videos,
6452// and YouTube does not limit the number of playlists that each user
6453// creates. By default, playlists are publicly visible to other users,
6454// but playlists can be public or private.
6455//
6456// YouTube also uses playlists to identify special collections of videos
6457// for a channel, such as:
6458// - uploaded videos
6459// - favorite videos
6460// - positively rated (liked) videos
6461// - watch history
6462// - watch later  To be more specific, these lists are associated with a
6463// channel, which is a collection of a person, group, or company's
6464// videos, playlists, and other YouTube information. You can retrieve
6465// the playlist IDs for each of these lists from the  channel resource
6466// for a given channel.
6467//
6468// You can then use the   playlistItems.list method to retrieve any of
6469// those lists. You can also add or remove items from those lists by
6470// calling the   playlistItems.insert and   playlistItems.delete
6471// methods.
6472type Playlist struct {
6473	// ContentDetails: The contentDetails object contains information like
6474	// video count.
6475	ContentDetails *PlaylistContentDetails `json:"contentDetails,omitempty"`
6476
6477	// Etag: Etag of this resource.
6478	Etag string `json:"etag,omitempty"`
6479
6480	// Id: The ID that YouTube uses to uniquely identify the playlist.
6481	Id string `json:"id,omitempty"`
6482
6483	// Kind: Identifies what kind of resource this is. Value: the fixed
6484	// string "youtube#playlist".
6485	Kind string `json:"kind,omitempty"`
6486
6487	// Localizations: Localizations for different languages
6488	Localizations map[string]PlaylistLocalization `json:"localizations,omitempty"`
6489
6490	// Player: The player object contains information that you would use to
6491	// play the playlist in an embedded player.
6492	Player *PlaylistPlayer `json:"player,omitempty"`
6493
6494	// Snippet: The snippet object contains basic details about the
6495	// playlist, such as its title and description.
6496	Snippet *PlaylistSnippet `json:"snippet,omitempty"`
6497
6498	// Status: The status object contains status information for the
6499	// playlist.
6500	Status *PlaylistStatus `json:"status,omitempty"`
6501
6502	// ServerResponse contains the HTTP response code and headers from the
6503	// server.
6504	googleapi.ServerResponse `json:"-"`
6505
6506	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
6507	// unconditionally include in API requests. By default, fields with
6508	// empty values are omitted from API requests. However, any non-pointer,
6509	// non-interface field appearing in ForceSendFields will be sent to the
6510	// server regardless of whether the field is empty or not. This may be
6511	// used to include empty fields in Patch requests.
6512	ForceSendFields []string `json:"-"`
6513
6514	// NullFields is a list of field names (e.g. "ContentDetails") to
6515	// include in API requests with the JSON null value. By default, fields
6516	// with empty values are omitted from API requests. However, any field
6517	// with an empty value appearing in NullFields will be sent to the
6518	// server as null. It is an error if a field in this list has a
6519	// non-empty value. This may be used to include null fields in Patch
6520	// requests.
6521	NullFields []string `json:"-"`
6522}
6523
6524func (s *Playlist) MarshalJSON() ([]byte, error) {
6525	type NoMethod Playlist
6526	raw := NoMethod(*s)
6527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6528}
6529
6530type PlaylistContentDetails struct {
6531	// ItemCount: The number of videos in the playlist.
6532	ItemCount int64 `json:"itemCount,omitempty"`
6533
6534	// ForceSendFields is a list of field names (e.g. "ItemCount") to
6535	// unconditionally include in API requests. By default, fields with
6536	// empty values are omitted from API requests. However, any non-pointer,
6537	// non-interface field appearing in ForceSendFields will be sent to the
6538	// server regardless of whether the field is empty or not. This may be
6539	// used to include empty fields in Patch requests.
6540	ForceSendFields []string `json:"-"`
6541
6542	// NullFields is a list of field names (e.g. "ItemCount") to include in
6543	// API requests with the JSON null value. By default, fields with empty
6544	// values are omitted from API requests. However, any field with an
6545	// empty value appearing in NullFields will be sent to the server as
6546	// null. It is an error if a field in this list has a non-empty value.
6547	// This may be used to include null fields in Patch requests.
6548	NullFields []string `json:"-"`
6549}
6550
6551func (s *PlaylistContentDetails) MarshalJSON() ([]byte, error) {
6552	type NoMethod PlaylistContentDetails
6553	raw := NoMethod(*s)
6554	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6555}
6556
6557// PlaylistItem: A playlistItem resource identifies another resource,
6558// such as a video, that is included in a playlist. In addition, the
6559// playlistItem  resource contains details about the included resource
6560// that pertain specifically to how that resource is used in that
6561// playlist.
6562//
6563// YouTube uses playlists to identify special collections of videos for
6564// a channel, such as:
6565// - uploaded videos
6566// - favorite videos
6567// - positively rated (liked) videos
6568// - watch history
6569// - watch later  To be more specific, these lists are associated with a
6570// channel, which is a collection of a person, group, or company's
6571// videos, playlists, and other YouTube information.
6572//
6573// You can retrieve the playlist IDs for each of these lists from the
6574// channel resource  for a given channel. You can then use the
6575// playlistItems.list method to retrieve any of those lists. You can
6576// also add or remove items from those lists by calling the
6577// playlistItems.insert and   playlistItems.delete methods. For example,
6578// if a user gives a positive rating to a video, you would insert that
6579// video into the liked videos playlist for that user's channel.
6580type PlaylistItem struct {
6581	// ContentDetails: The contentDetails object is included in the resource
6582	// if the included item is a YouTube video. The object contains
6583	// additional information about the video.
6584	ContentDetails *PlaylistItemContentDetails `json:"contentDetails,omitempty"`
6585
6586	// Etag: Etag of this resource.
6587	Etag string `json:"etag,omitempty"`
6588
6589	// Id: The ID that YouTube uses to uniquely identify the playlist item.
6590	Id string `json:"id,omitempty"`
6591
6592	// Kind: Identifies what kind of resource this is. Value: the fixed
6593	// string "youtube#playlistItem".
6594	Kind string `json:"kind,omitempty"`
6595
6596	// Snippet: The snippet object contains basic details about the playlist
6597	// item, such as its title and position in the playlist.
6598	Snippet *PlaylistItemSnippet `json:"snippet,omitempty"`
6599
6600	// Status: The status object contains information about the playlist
6601	// item's privacy status.
6602	Status *PlaylistItemStatus `json:"status,omitempty"`
6603
6604	// ServerResponse contains the HTTP response code and headers from the
6605	// server.
6606	googleapi.ServerResponse `json:"-"`
6607
6608	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
6609	// unconditionally include in API requests. By default, fields with
6610	// empty values are omitted from API requests. However, any non-pointer,
6611	// non-interface field appearing in ForceSendFields will be sent to the
6612	// server regardless of whether the field is empty or not. This may be
6613	// used to include empty fields in Patch requests.
6614	ForceSendFields []string `json:"-"`
6615
6616	// NullFields is a list of field names (e.g. "ContentDetails") to
6617	// include in API requests with the JSON null value. By default, fields
6618	// with empty values are omitted from API requests. However, any field
6619	// with an empty value appearing in NullFields will be sent to the
6620	// server as null. It is an error if a field in this list has a
6621	// non-empty value. This may be used to include null fields in Patch
6622	// requests.
6623	NullFields []string `json:"-"`
6624}
6625
6626func (s *PlaylistItem) MarshalJSON() ([]byte, error) {
6627	type NoMethod PlaylistItem
6628	raw := NoMethod(*s)
6629	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6630}
6631
6632type PlaylistItemContentDetails struct {
6633	// EndAt: The time, measured in seconds from the start of the video,
6634	// when the video should stop playing. (The playlist owner can specify
6635	// the times when the video should start and stop playing when the video
6636	// is played in the context of the playlist.) By default, assume that
6637	// the video.endTime is the end of the video.
6638	EndAt string `json:"endAt,omitempty"`
6639
6640	// Note: A user-generated note for this item.
6641	Note string `json:"note,omitempty"`
6642
6643	// StartAt: The time, measured in seconds from the start of the video,
6644	// when the video should start playing. (The playlist owner can specify
6645	// the times when the video should start and stop playing when the video
6646	// is played in the context of the playlist.) The default value is 0.
6647	StartAt string `json:"startAt,omitempty"`
6648
6649	// VideoId: The ID that YouTube uses to uniquely identify a video. To
6650	// retrieve the video resource, set the id query parameter to this value
6651	// in your API request.
6652	VideoId string `json:"videoId,omitempty"`
6653
6654	// VideoPublishedAt: The date and time that the video was published to
6655	// YouTube. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
6656	// format.
6657	VideoPublishedAt string `json:"videoPublishedAt,omitempty"`
6658
6659	// ForceSendFields is a list of field names (e.g. "EndAt") to
6660	// unconditionally include in API requests. By default, fields with
6661	// empty values are omitted from API requests. However, any non-pointer,
6662	// non-interface field appearing in ForceSendFields will be sent to the
6663	// server regardless of whether the field is empty or not. This may be
6664	// used to include empty fields in Patch requests.
6665	ForceSendFields []string `json:"-"`
6666
6667	// NullFields is a list of field names (e.g. "EndAt") to include in API
6668	// requests with the JSON null value. By default, fields with empty
6669	// values are omitted from API requests. However, any field with an
6670	// empty value appearing in NullFields will be sent to the server as
6671	// null. It is an error if a field in this list has a non-empty value.
6672	// This may be used to include null fields in Patch requests.
6673	NullFields []string `json:"-"`
6674}
6675
6676func (s *PlaylistItemContentDetails) MarshalJSON() ([]byte, error) {
6677	type NoMethod PlaylistItemContentDetails
6678	raw := NoMethod(*s)
6679	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6680}
6681
6682type PlaylistItemListResponse struct {
6683	// Etag: Etag of this resource.
6684	Etag string `json:"etag,omitempty"`
6685
6686	// EventId: Serialized EventId of the request which produced this
6687	// response.
6688	EventId string `json:"eventId,omitempty"`
6689
6690	// Items: A list of playlist items that match the request criteria.
6691	Items []*PlaylistItem `json:"items,omitempty"`
6692
6693	// Kind: Identifies what kind of resource this is. Value: the fixed
6694	// string "youtube#playlistItemListResponse".
6695	Kind string `json:"kind,omitempty"`
6696
6697	// NextPageToken: The token that can be used as the value of the
6698	// pageToken parameter to retrieve the next page in the result set.
6699	NextPageToken string `json:"nextPageToken,omitempty"`
6700
6701	PageInfo *PageInfo `json:"pageInfo,omitempty"`
6702
6703	// PrevPageToken: The token that can be used as the value of the
6704	// pageToken parameter to retrieve the previous page in the result set.
6705	PrevPageToken string `json:"prevPageToken,omitempty"`
6706
6707	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6708
6709	// VisitorId: The visitorId identifies the visitor.
6710	VisitorId string `json:"visitorId,omitempty"`
6711
6712	// ServerResponse contains the HTTP response code and headers from the
6713	// server.
6714	googleapi.ServerResponse `json:"-"`
6715
6716	// ForceSendFields is a list of field names (e.g. "Etag") to
6717	// unconditionally include in API requests. By default, fields with
6718	// empty values are omitted from API requests. However, any non-pointer,
6719	// non-interface field appearing in ForceSendFields will be sent to the
6720	// server regardless of whether the field is empty or not. This may be
6721	// used to include empty fields in Patch requests.
6722	ForceSendFields []string `json:"-"`
6723
6724	// NullFields is a list of field names (e.g. "Etag") to include in API
6725	// requests with the JSON null value. By default, fields with empty
6726	// values are omitted from API requests. However, any field with an
6727	// empty value appearing in NullFields will be sent to the server as
6728	// null. It is an error if a field in this list has a non-empty value.
6729	// This may be used to include null fields in Patch requests.
6730	NullFields []string `json:"-"`
6731}
6732
6733func (s *PlaylistItemListResponse) MarshalJSON() ([]byte, error) {
6734	type NoMethod PlaylistItemListResponse
6735	raw := NoMethod(*s)
6736	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6737}
6738
6739// PlaylistItemSnippet: Basic details about a playlist, including title,
6740// description and thumbnails.
6741type PlaylistItemSnippet struct {
6742	// ChannelId: The ID that YouTube uses to uniquely identify the user
6743	// that added the item to the playlist.
6744	ChannelId string `json:"channelId,omitempty"`
6745
6746	// ChannelTitle: Channel title for the channel that the playlist item
6747	// belongs to.
6748	ChannelTitle string `json:"channelTitle,omitempty"`
6749
6750	// Description: The item's description.
6751	Description string `json:"description,omitempty"`
6752
6753	// PlaylistId: The ID that YouTube uses to uniquely identify the
6754	// playlist that the playlist item is in.
6755	PlaylistId string `json:"playlistId,omitempty"`
6756
6757	// Position: The order in which the item appears in the playlist. The
6758	// value uses a zero-based index, so the first item has a position of 0,
6759	// the second item has a position of 1, and so forth.
6760	Position int64 `json:"position,omitempty"`
6761
6762	// PublishedAt: The date and time that the item was added to the
6763	// playlist. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
6764	// format.
6765	PublishedAt string `json:"publishedAt,omitempty"`
6766
6767	// ResourceId: The id object contains information that can be used to
6768	// uniquely identify the resource that is included in the playlist as
6769	// the playlist item.
6770	ResourceId *ResourceId `json:"resourceId,omitempty"`
6771
6772	// Thumbnails: A map of thumbnail images associated with the playlist
6773	// item. For each object in the map, the key is the name of the
6774	// thumbnail image, and the value is an object that contains other
6775	// information about the thumbnail.
6776	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6777
6778	// Title: The item's title.
6779	Title string `json:"title,omitempty"`
6780
6781	// ForceSendFields is a list of field names (e.g. "ChannelId") to
6782	// unconditionally include in API requests. By default, fields with
6783	// empty values are omitted from API requests. However, any non-pointer,
6784	// non-interface field appearing in ForceSendFields will be sent to the
6785	// server regardless of whether the field is empty or not. This may be
6786	// used to include empty fields in Patch requests.
6787	ForceSendFields []string `json:"-"`
6788
6789	// NullFields is a list of field names (e.g. "ChannelId") to include in
6790	// API requests with the JSON null value. By default, fields with empty
6791	// values are omitted from API requests. However, any field with an
6792	// empty value appearing in NullFields will be sent to the server as
6793	// null. It is an error if a field in this list has a non-empty value.
6794	// This may be used to include null fields in Patch requests.
6795	NullFields []string `json:"-"`
6796}
6797
6798func (s *PlaylistItemSnippet) MarshalJSON() ([]byte, error) {
6799	type NoMethod PlaylistItemSnippet
6800	raw := NoMethod(*s)
6801	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6802}
6803
6804// PlaylistItemStatus: Information about the playlist item's privacy
6805// status.
6806type PlaylistItemStatus struct {
6807	// PrivacyStatus: This resource's privacy status.
6808	//
6809	// Possible values:
6810	//   "private"
6811	//   "public"
6812	//   "unlisted"
6813	//   "unlisted_new"
6814	PrivacyStatus string `json:"privacyStatus,omitempty"`
6815
6816	// ForceSendFields is a list of field names (e.g. "PrivacyStatus") to
6817	// unconditionally include in API requests. By default, fields with
6818	// empty values are omitted from API requests. However, any non-pointer,
6819	// non-interface field appearing in ForceSendFields will be sent to the
6820	// server regardless of whether the field is empty or not. This may be
6821	// used to include empty fields in Patch requests.
6822	ForceSendFields []string `json:"-"`
6823
6824	// NullFields is a list of field names (e.g. "PrivacyStatus") to include
6825	// in API requests with the JSON null value. By default, fields with
6826	// empty values are omitted from API requests. However, any field with
6827	// an empty value appearing in NullFields will be sent to the server as
6828	// null. It is an error if a field in this list has a non-empty value.
6829	// This may be used to include null fields in Patch requests.
6830	NullFields []string `json:"-"`
6831}
6832
6833func (s *PlaylistItemStatus) MarshalJSON() ([]byte, error) {
6834	type NoMethod PlaylistItemStatus
6835	raw := NoMethod(*s)
6836	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6837}
6838
6839type PlaylistListResponse struct {
6840	// Etag: Etag of this resource.
6841	Etag string `json:"etag,omitempty"`
6842
6843	// EventId: Serialized EventId of the request which produced this
6844	// response.
6845	EventId string `json:"eventId,omitempty"`
6846
6847	// Items: A list of playlists that match the request criteria.
6848	Items []*Playlist `json:"items,omitempty"`
6849
6850	// Kind: Identifies what kind of resource this is. Value: the fixed
6851	// string "youtube#playlistListResponse".
6852	Kind string `json:"kind,omitempty"`
6853
6854	// NextPageToken: The token that can be used as the value of the
6855	// pageToken parameter to retrieve the next page in the result set.
6856	NextPageToken string `json:"nextPageToken,omitempty"`
6857
6858	PageInfo *PageInfo `json:"pageInfo,omitempty"`
6859
6860	// PrevPageToken: The token that can be used as the value of the
6861	// pageToken parameter to retrieve the previous page in the result set.
6862	PrevPageToken string `json:"prevPageToken,omitempty"`
6863
6864	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
6865
6866	// VisitorId: The visitorId identifies the visitor.
6867	VisitorId string `json:"visitorId,omitempty"`
6868
6869	// ServerResponse contains the HTTP response code and headers from the
6870	// server.
6871	googleapi.ServerResponse `json:"-"`
6872
6873	// ForceSendFields is a list of field names (e.g. "Etag") to
6874	// unconditionally include in API requests. By default, fields with
6875	// empty values are omitted from API requests. However, any non-pointer,
6876	// non-interface field appearing in ForceSendFields will be sent to the
6877	// server regardless of whether the field is empty or not. This may be
6878	// used to include empty fields in Patch requests.
6879	ForceSendFields []string `json:"-"`
6880
6881	// NullFields is a list of field names (e.g. "Etag") to include in API
6882	// requests with the JSON null value. By default, fields with empty
6883	// values are omitted from API requests. However, any field with an
6884	// empty value appearing in NullFields will be sent to the server as
6885	// null. It is an error if a field in this list has a non-empty value.
6886	// This may be used to include null fields in Patch requests.
6887	NullFields []string `json:"-"`
6888}
6889
6890func (s *PlaylistListResponse) MarshalJSON() ([]byte, error) {
6891	type NoMethod PlaylistListResponse
6892	raw := NoMethod(*s)
6893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6894}
6895
6896// PlaylistLocalization: Playlist localization setting
6897type PlaylistLocalization struct {
6898	// Description: The localized strings for playlist's description.
6899	Description string `json:"description,omitempty"`
6900
6901	// Title: The localized strings for playlist's title.
6902	Title string `json:"title,omitempty"`
6903
6904	// ForceSendFields is a list of field names (e.g. "Description") to
6905	// unconditionally include in API requests. By default, fields with
6906	// empty values are omitted from API requests. However, any non-pointer,
6907	// non-interface field appearing in ForceSendFields will be sent to the
6908	// server regardless of whether the field is empty or not. This may be
6909	// used to include empty fields in Patch requests.
6910	ForceSendFields []string `json:"-"`
6911
6912	// NullFields is a list of field names (e.g. "Description") to include
6913	// in API requests with the JSON null value. By default, fields with
6914	// empty values are omitted from API requests. However, any field with
6915	// an empty value appearing in NullFields will be sent to the server as
6916	// null. It is an error if a field in this list has a non-empty value.
6917	// This may be used to include null fields in Patch requests.
6918	NullFields []string `json:"-"`
6919}
6920
6921func (s *PlaylistLocalization) MarshalJSON() ([]byte, error) {
6922	type NoMethod PlaylistLocalization
6923	raw := NoMethod(*s)
6924	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6925}
6926
6927type PlaylistPlayer struct {
6928	// EmbedHtml: An <iframe> tag that embeds a player that will play the
6929	// playlist.
6930	EmbedHtml string `json:"embedHtml,omitempty"`
6931
6932	// ForceSendFields is a list of field names (e.g. "EmbedHtml") to
6933	// unconditionally include in API requests. By default, fields with
6934	// empty values are omitted from API requests. However, any non-pointer,
6935	// non-interface field appearing in ForceSendFields will be sent to the
6936	// server regardless of whether the field is empty or not. This may be
6937	// used to include empty fields in Patch requests.
6938	ForceSendFields []string `json:"-"`
6939
6940	// NullFields is a list of field names (e.g. "EmbedHtml") to include in
6941	// API requests with the JSON null value. By default, fields with empty
6942	// values are omitted from API requests. However, any field with an
6943	// empty value appearing in NullFields will be sent to the server as
6944	// null. It is an error if a field in this list has a non-empty value.
6945	// This may be used to include null fields in Patch requests.
6946	NullFields []string `json:"-"`
6947}
6948
6949func (s *PlaylistPlayer) MarshalJSON() ([]byte, error) {
6950	type NoMethod PlaylistPlayer
6951	raw := NoMethod(*s)
6952	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6953}
6954
6955// PlaylistSnippet: Basic details about a playlist, including title,
6956// description and thumbnails.
6957type PlaylistSnippet struct {
6958	// ChannelId: The ID that YouTube uses to uniquely identify the channel
6959	// that published the playlist.
6960	ChannelId string `json:"channelId,omitempty"`
6961
6962	// ChannelTitle: The channel title of the channel that the video belongs
6963	// to.
6964	ChannelTitle string `json:"channelTitle,omitempty"`
6965
6966	// DefaultLanguage: The language of the playlist's default title and
6967	// description.
6968	DefaultLanguage string `json:"defaultLanguage,omitempty"`
6969
6970	// Description: The playlist's description.
6971	Description string `json:"description,omitempty"`
6972
6973	// Localized: Localized title and description, read-only.
6974	Localized *PlaylistLocalization `json:"localized,omitempty"`
6975
6976	// PublishedAt: The date and time that the playlist was created. The
6977	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
6978	PublishedAt string `json:"publishedAt,omitempty"`
6979
6980	// Tags: Keyword tags associated with the playlist.
6981	Tags []string `json:"tags,omitempty"`
6982
6983	// Thumbnails: A map of thumbnail images associated with the playlist.
6984	// For each object in the map, the key is the name of the thumbnail
6985	// image, and the value is an object that contains other information
6986	// about the thumbnail.
6987	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
6988
6989	// Title: The playlist's title.
6990	Title string `json:"title,omitempty"`
6991
6992	// ForceSendFields is a list of field names (e.g. "ChannelId") to
6993	// unconditionally include in API requests. By default, fields with
6994	// empty values are omitted from API requests. However, any non-pointer,
6995	// non-interface field appearing in ForceSendFields will be sent to the
6996	// server regardless of whether the field is empty or not. This may be
6997	// used to include empty fields in Patch requests.
6998	ForceSendFields []string `json:"-"`
6999
7000	// NullFields is a list of field names (e.g. "ChannelId") to include in
7001	// API requests with the JSON null value. By default, fields with empty
7002	// values are omitted from API requests. However, any field with an
7003	// empty value appearing in NullFields will be sent to the server as
7004	// null. It is an error if a field in this list has a non-empty value.
7005	// This may be used to include null fields in Patch requests.
7006	NullFields []string `json:"-"`
7007}
7008
7009func (s *PlaylistSnippet) MarshalJSON() ([]byte, error) {
7010	type NoMethod PlaylistSnippet
7011	raw := NoMethod(*s)
7012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7013}
7014
7015type PlaylistStatus struct {
7016	// PrivacyStatus: The playlist's privacy status.
7017	//
7018	// Possible values:
7019	//   "private"
7020	//   "public"
7021	//   "unlisted"
7022	//   "unlisted_new"
7023	PrivacyStatus string `json:"privacyStatus,omitempty"`
7024
7025	// ForceSendFields is a list of field names (e.g. "PrivacyStatus") to
7026	// unconditionally include in API requests. By default, fields with
7027	// empty values are omitted from API requests. However, any non-pointer,
7028	// non-interface field appearing in ForceSendFields will be sent to the
7029	// server regardless of whether the field is empty or not. This may be
7030	// used to include empty fields in Patch requests.
7031	ForceSendFields []string `json:"-"`
7032
7033	// NullFields is a list of field names (e.g. "PrivacyStatus") to include
7034	// in API requests with the JSON null value. By default, fields with
7035	// empty values are omitted from API requests. However, any field with
7036	// an empty value appearing in NullFields will be sent to the server as
7037	// null. It is an error if a field in this list has a non-empty value.
7038	// This may be used to include null fields in Patch requests.
7039	NullFields []string `json:"-"`
7040}
7041
7042func (s *PlaylistStatus) MarshalJSON() ([]byte, error) {
7043	type NoMethod PlaylistStatus
7044	raw := NoMethod(*s)
7045	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7046}
7047
7048// PromotedItem: Describes a single promoted item.
7049type PromotedItem struct {
7050	// CustomMessage: A custom message to display for this promotion. This
7051	// field is currently ignored unless the promoted item is a website.
7052	CustomMessage string `json:"customMessage,omitempty"`
7053
7054	// Id: Identifies the promoted item.
7055	Id *PromotedItemId `json:"id,omitempty"`
7056
7057	// PromotedByContentOwner: If true, the content owner's name will be
7058	// used when displaying the promotion. This field can only be set when
7059	// the update is made on behalf of the content owner.
7060	PromotedByContentOwner bool `json:"promotedByContentOwner,omitempty"`
7061
7062	// Timing: The temporal position within the video where the promoted
7063	// item will be displayed. If present, it overrides the default timing.
7064	Timing *InvideoTiming `json:"timing,omitempty"`
7065
7066	// ForceSendFields is a list of field names (e.g. "CustomMessage") to
7067	// unconditionally include in API requests. By default, fields with
7068	// empty values are omitted from API requests. However, any non-pointer,
7069	// non-interface field appearing in ForceSendFields will be sent to the
7070	// server regardless of whether the field is empty or not. This may be
7071	// used to include empty fields in Patch requests.
7072	ForceSendFields []string `json:"-"`
7073
7074	// NullFields is a list of field names (e.g. "CustomMessage") to include
7075	// in API requests with the JSON null value. By default, fields with
7076	// empty values are omitted from API requests. However, any field with
7077	// an empty value appearing in NullFields will be sent to the server as
7078	// null. It is an error if a field in this list has a non-empty value.
7079	// This may be used to include null fields in Patch requests.
7080	NullFields []string `json:"-"`
7081}
7082
7083func (s *PromotedItem) MarshalJSON() ([]byte, error) {
7084	type NoMethod PromotedItem
7085	raw := NoMethod(*s)
7086	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7087}
7088
7089// PromotedItemId: Describes a single promoted item id. It is a union of
7090// various possible types.
7091type PromotedItemId struct {
7092	// RecentlyUploadedBy: If type is recentUpload, this field identifies
7093	// the channel from which to take the recent upload. If missing, the
7094	// channel is assumed to be the same channel for which the
7095	// invideoPromotion is set.
7096	RecentlyUploadedBy string `json:"recentlyUploadedBy,omitempty"`
7097
7098	// Type: Describes the type of the promoted item.
7099	//
7100	// Possible values:
7101	//   "recentUpload"
7102	//   "video"
7103	//   "website"
7104	Type string `json:"type,omitempty"`
7105
7106	// VideoId: If the promoted item represents a video, this field
7107	// represents the unique YouTube ID identifying it. This field will be
7108	// present only if type has the value video.
7109	VideoId string `json:"videoId,omitempty"`
7110
7111	// WebsiteUrl: If the promoted item represents a website, this field
7112	// represents the url pointing to the website. This field will be
7113	// present only if type has the value website.
7114	WebsiteUrl string `json:"websiteUrl,omitempty"`
7115
7116	// ForceSendFields is a list of field names (e.g. "RecentlyUploadedBy")
7117	// to unconditionally include in API requests. By default, fields with
7118	// empty values are omitted from API requests. However, any non-pointer,
7119	// non-interface field appearing in ForceSendFields will be sent to the
7120	// server regardless of whether the field is empty or not. This may be
7121	// used to include empty fields in Patch requests.
7122	ForceSendFields []string `json:"-"`
7123
7124	// NullFields is a list of field names (e.g. "RecentlyUploadedBy") to
7125	// include in API requests with the JSON null value. By default, fields
7126	// with empty values are omitted from API requests. However, any field
7127	// with an empty value appearing in NullFields will be sent to the
7128	// server as null. It is an error if a field in this list has a
7129	// non-empty value. This may be used to include null fields in Patch
7130	// requests.
7131	NullFields []string `json:"-"`
7132}
7133
7134func (s *PromotedItemId) MarshalJSON() ([]byte, error) {
7135	type NoMethod PromotedItemId
7136	raw := NoMethod(*s)
7137	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7138}
7139
7140// PropertyValue: A pair Property / Value.
7141type PropertyValue struct {
7142	// Property: A property.
7143	Property string `json:"property,omitempty"`
7144
7145	// Value: The property's value.
7146	Value string `json:"value,omitempty"`
7147
7148	// ForceSendFields is a list of field names (e.g. "Property") to
7149	// unconditionally include in API requests. By default, fields with
7150	// empty values are omitted from API requests. However, any non-pointer,
7151	// non-interface field appearing in ForceSendFields will be sent to the
7152	// server regardless of whether the field is empty or not. This may be
7153	// used to include empty fields in Patch requests.
7154	ForceSendFields []string `json:"-"`
7155
7156	// NullFields is a list of field names (e.g. "Property") to include in
7157	// API requests with the JSON null value. By default, fields with empty
7158	// values are omitted from API requests. However, any field with an
7159	// empty value appearing in NullFields will be sent to the server as
7160	// null. It is an error if a field in this list has a non-empty value.
7161	// This may be used to include null fields in Patch requests.
7162	NullFields []string `json:"-"`
7163}
7164
7165func (s *PropertyValue) MarshalJSON() ([]byte, error) {
7166	type NoMethod PropertyValue
7167	raw := NoMethod(*s)
7168	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7169}
7170
7171// ResourceId: A resource id is a generic reference that points to
7172// another YouTube resource.
7173type ResourceId struct {
7174	// ChannelId: The ID that YouTube uses to uniquely identify the referred
7175	// resource, if that resource is a channel. This property is only
7176	// present if the resourceId.kind value is youtube#channel.
7177	ChannelId string `json:"channelId,omitempty"`
7178
7179	// Kind: The type of the API resource.
7180	Kind string `json:"kind,omitempty"`
7181
7182	// PlaylistId: The ID that YouTube uses to uniquely identify the
7183	// referred resource, if that resource is a playlist. This property is
7184	// only present if the resourceId.kind value is youtube#playlist.
7185	PlaylistId string `json:"playlistId,omitempty"`
7186
7187	// VideoId: The ID that YouTube uses to uniquely identify the referred
7188	// resource, if that resource is a video. This property is only present
7189	// if the resourceId.kind value is youtube#video.
7190	VideoId string `json:"videoId,omitempty"`
7191
7192	// ForceSendFields is a list of field names (e.g. "ChannelId") to
7193	// unconditionally include in API requests. By default, fields with
7194	// empty values are omitted from API requests. However, any non-pointer,
7195	// non-interface field appearing in ForceSendFields will be sent to the
7196	// server regardless of whether the field is empty or not. This may be
7197	// used to include empty fields in Patch requests.
7198	ForceSendFields []string `json:"-"`
7199
7200	// NullFields is a list of field names (e.g. "ChannelId") to include in
7201	// API requests with the JSON null value. By default, fields with empty
7202	// values are omitted from API requests. However, any field with an
7203	// empty value appearing in NullFields will be sent to the server as
7204	// null. It is an error if a field in this list has a non-empty value.
7205	// This may be used to include null fields in Patch requests.
7206	NullFields []string `json:"-"`
7207}
7208
7209func (s *ResourceId) MarshalJSON() ([]byte, error) {
7210	type NoMethod ResourceId
7211	raw := NoMethod(*s)
7212	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7213}
7214
7215type SearchListResponse struct {
7216	// Etag: Etag of this resource.
7217	Etag string `json:"etag,omitempty"`
7218
7219	// EventId: Serialized EventId of the request which produced this
7220	// response.
7221	EventId string `json:"eventId,omitempty"`
7222
7223	// Items: A list of results that match the search criteria.
7224	Items []*SearchResult `json:"items,omitempty"`
7225
7226	// Kind: Identifies what kind of resource this is. Value: the fixed
7227	// string "youtube#searchListResponse".
7228	Kind string `json:"kind,omitempty"`
7229
7230	// NextPageToken: The token that can be used as the value of the
7231	// pageToken parameter to retrieve the next page in the result set.
7232	NextPageToken string `json:"nextPageToken,omitempty"`
7233
7234	PageInfo *PageInfo `json:"pageInfo,omitempty"`
7235
7236	// PrevPageToken: The token that can be used as the value of the
7237	// pageToken parameter to retrieve the previous page in the result set.
7238	PrevPageToken string `json:"prevPageToken,omitempty"`
7239
7240	RegionCode string `json:"regionCode,omitempty"`
7241
7242	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
7243
7244	// VisitorId: The visitorId identifies the visitor.
7245	VisitorId string `json:"visitorId,omitempty"`
7246
7247	// ServerResponse contains the HTTP response code and headers from the
7248	// server.
7249	googleapi.ServerResponse `json:"-"`
7250
7251	// ForceSendFields is a list of field names (e.g. "Etag") to
7252	// unconditionally include in API requests. By default, fields with
7253	// empty values are omitted from API requests. However, any non-pointer,
7254	// non-interface field appearing in ForceSendFields will be sent to the
7255	// server regardless of whether the field is empty or not. This may be
7256	// used to include empty fields in Patch requests.
7257	ForceSendFields []string `json:"-"`
7258
7259	// NullFields is a list of field names (e.g. "Etag") to include in API
7260	// requests with the JSON null value. By default, fields with empty
7261	// values are omitted from API requests. However, any field with an
7262	// empty value appearing in NullFields will be sent to the server as
7263	// null. It is an error if a field in this list has a non-empty value.
7264	// This may be used to include null fields in Patch requests.
7265	NullFields []string `json:"-"`
7266}
7267
7268func (s *SearchListResponse) MarshalJSON() ([]byte, error) {
7269	type NoMethod SearchListResponse
7270	raw := NoMethod(*s)
7271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7272}
7273
7274// SearchResult: A search result contains information about a YouTube
7275// video, channel, or playlist that matches the search parameters
7276// specified in an API request. While a search result points to a
7277// uniquely identifiable resource, like a video, it does not have its
7278// own persistent data.
7279type SearchResult struct {
7280	// Etag: Etag of this resource.
7281	Etag string `json:"etag,omitempty"`
7282
7283	// Id: The id object contains information that can be used to uniquely
7284	// identify the resource that matches the search request.
7285	Id *ResourceId `json:"id,omitempty"`
7286
7287	// Kind: Identifies what kind of resource this is. Value: the fixed
7288	// string "youtube#searchResult".
7289	Kind string `json:"kind,omitempty"`
7290
7291	// Snippet: The snippet object contains basic details about a search
7292	// result, such as its title or description. For example, if the search
7293	// result is a video, then the title will be the video's title and the
7294	// description will be the video's description.
7295	Snippet *SearchResultSnippet `json:"snippet,omitempty"`
7296
7297	// ForceSendFields is a list of field names (e.g. "Etag") to
7298	// unconditionally include in API requests. By default, fields with
7299	// empty values are omitted from API requests. However, any non-pointer,
7300	// non-interface field appearing in ForceSendFields will be sent to the
7301	// server regardless of whether the field is empty or not. This may be
7302	// used to include empty fields in Patch requests.
7303	ForceSendFields []string `json:"-"`
7304
7305	// NullFields is a list of field names (e.g. "Etag") to include in API
7306	// requests with the JSON null value. By default, fields with empty
7307	// values are omitted from API requests. However, any field with an
7308	// empty value appearing in NullFields will be sent to the server as
7309	// null. It is an error if a field in this list has a non-empty value.
7310	// This may be used to include null fields in Patch requests.
7311	NullFields []string `json:"-"`
7312}
7313
7314func (s *SearchResult) MarshalJSON() ([]byte, error) {
7315	type NoMethod SearchResult
7316	raw := NoMethod(*s)
7317	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7318}
7319
7320// SearchResultSnippet: Basic details about a search result, including
7321// title, description and thumbnails of the item referenced by the
7322// search result.
7323type SearchResultSnippet struct {
7324	// ChannelId: The value that YouTube uses to uniquely identify the
7325	// channel that published the resource that the search result
7326	// identifies.
7327	ChannelId string `json:"channelId,omitempty"`
7328
7329	// ChannelTitle: The title of the channel that published the resource
7330	// that the search result identifies.
7331	ChannelTitle string `json:"channelTitle,omitempty"`
7332
7333	// Description: A description of the search result.
7334	Description string `json:"description,omitempty"`
7335
7336	// LiveBroadcastContent: It indicates if the resource (video or channel)
7337	// has upcoming/active live broadcast content. Or it's "none" if there
7338	// is not any upcoming/active live broadcasts.
7339	//
7340	// Possible values:
7341	//   "live"
7342	//   "none"
7343	//   "upcoming"
7344	LiveBroadcastContent string `json:"liveBroadcastContent,omitempty"`
7345
7346	// PublishedAt: The creation date and time of the resource that the
7347	// search result identifies. The value is specified in ISO 8601
7348	// (YYYY-MM-DDThh:mm:ss.sZ) format.
7349	PublishedAt string `json:"publishedAt,omitempty"`
7350
7351	// Thumbnails: A map of thumbnail images associated with the search
7352	// result. For each object in the map, the key is the name of the
7353	// thumbnail image, and the value is an object that contains other
7354	// information about the thumbnail.
7355	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
7356
7357	// Title: The title of the search result.
7358	Title string `json:"title,omitempty"`
7359
7360	// ForceSendFields is a list of field names (e.g. "ChannelId") to
7361	// unconditionally include in API requests. By default, fields with
7362	// empty values are omitted from API requests. However, any non-pointer,
7363	// non-interface field appearing in ForceSendFields will be sent to the
7364	// server regardless of whether the field is empty or not. This may be
7365	// used to include empty fields in Patch requests.
7366	ForceSendFields []string `json:"-"`
7367
7368	// NullFields is a list of field names (e.g. "ChannelId") to include in
7369	// API requests with the JSON null value. By default, fields with empty
7370	// values are omitted from API requests. However, any field with an
7371	// empty value appearing in NullFields will be sent to the server as
7372	// null. It is an error if a field in this list has a non-empty value.
7373	// This may be used to include null fields in Patch requests.
7374	NullFields []string `json:"-"`
7375}
7376
7377func (s *SearchResultSnippet) MarshalJSON() ([]byte, error) {
7378	type NoMethod SearchResultSnippet
7379	raw := NoMethod(*s)
7380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7381}
7382
7383// Sponsor: A sponsor resource represents a sponsor for a YouTube
7384// channel. A sponsor provides recurring monetary support to a creator
7385// and receives special benefits.
7386type Sponsor struct {
7387	// Etag: Etag of this resource.
7388	Etag string `json:"etag,omitempty"`
7389
7390	// Kind: Identifies what kind of resource this is. Value: the fixed
7391	// string "youtube#sponsor".
7392	Kind string `json:"kind,omitempty"`
7393
7394	// Snippet: The snippet object contains basic details about the sponsor.
7395	Snippet *SponsorSnippet `json:"snippet,omitempty"`
7396
7397	// ForceSendFields is a list of field names (e.g. "Etag") to
7398	// unconditionally include in API requests. By default, fields with
7399	// empty values are omitted from API requests. However, any non-pointer,
7400	// non-interface field appearing in ForceSendFields will be sent to the
7401	// server regardless of whether the field is empty or not. This may be
7402	// used to include empty fields in Patch requests.
7403	ForceSendFields []string `json:"-"`
7404
7405	// NullFields is a list of field names (e.g. "Etag") to include in API
7406	// requests with the JSON null value. By default, fields with empty
7407	// values are omitted from API requests. However, any field with an
7408	// empty value appearing in NullFields will be sent to the server as
7409	// null. It is an error if a field in this list has a non-empty value.
7410	// This may be used to include null fields in Patch requests.
7411	NullFields []string `json:"-"`
7412}
7413
7414func (s *Sponsor) MarshalJSON() ([]byte, error) {
7415	type NoMethod Sponsor
7416	raw := NoMethod(*s)
7417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7418}
7419
7420type SponsorListResponse struct {
7421	// Etag: Etag of this resource.
7422	Etag string `json:"etag,omitempty"`
7423
7424	// EventId: Serialized EventId of the request which produced this
7425	// response.
7426	EventId string `json:"eventId,omitempty"`
7427
7428	// Items: A list of sponsors that match the request criteria.
7429	Items []*Sponsor `json:"items,omitempty"`
7430
7431	// Kind: Identifies what kind of resource this is. Value: the fixed
7432	// string "youtube#sponsorListResponse".
7433	Kind string `json:"kind,omitempty"`
7434
7435	// NextPageToken: The token that can be used as the value of the
7436	// pageToken parameter to retrieve the next page in the result set.
7437	NextPageToken string `json:"nextPageToken,omitempty"`
7438
7439	PageInfo *PageInfo `json:"pageInfo,omitempty"`
7440
7441	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
7442
7443	// VisitorId: The visitorId identifies the visitor.
7444	VisitorId string `json:"visitorId,omitempty"`
7445
7446	// ServerResponse contains the HTTP response code and headers from the
7447	// server.
7448	googleapi.ServerResponse `json:"-"`
7449
7450	// ForceSendFields is a list of field names (e.g. "Etag") to
7451	// unconditionally include in API requests. By default, fields with
7452	// empty values are omitted from API requests. However, any non-pointer,
7453	// non-interface field appearing in ForceSendFields will be sent to the
7454	// server regardless of whether the field is empty or not. This may be
7455	// used to include empty fields in Patch requests.
7456	ForceSendFields []string `json:"-"`
7457
7458	// NullFields is a list of field names (e.g. "Etag") to include in API
7459	// requests with the JSON null value. By default, fields with empty
7460	// values are omitted from API requests. However, any field with an
7461	// empty value appearing in NullFields will be sent to the server as
7462	// null. It is an error if a field in this list has a non-empty value.
7463	// This may be used to include null fields in Patch requests.
7464	NullFields []string `json:"-"`
7465}
7466
7467func (s *SponsorListResponse) MarshalJSON() ([]byte, error) {
7468	type NoMethod SponsorListResponse
7469	raw := NoMethod(*s)
7470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7471}
7472
7473type SponsorSnippet struct {
7474	// ChannelId: The id of the channel being sponsored.
7475	ChannelId string `json:"channelId,omitempty"`
7476
7477	// CumulativeDurationMonths: The cumulative time a user has been a
7478	// sponsor in months.
7479	CumulativeDurationMonths int64 `json:"cumulativeDurationMonths,omitempty"`
7480
7481	// SponsorDetails: Details about the sponsor.
7482	SponsorDetails *ChannelProfileDetails `json:"sponsorDetails,omitempty"`
7483
7484	// SponsorSince: The date and time when the user became a sponsor. The
7485	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
7486	SponsorSince string `json:"sponsorSince,omitempty"`
7487
7488	// ForceSendFields is a list of field names (e.g. "ChannelId") to
7489	// unconditionally include in API requests. By default, fields with
7490	// empty values are omitted from API requests. However, any non-pointer,
7491	// non-interface field appearing in ForceSendFields will be sent to the
7492	// server regardless of whether the field is empty or not. This may be
7493	// used to include empty fields in Patch requests.
7494	ForceSendFields []string `json:"-"`
7495
7496	// NullFields is a list of field names (e.g. "ChannelId") to include in
7497	// API requests with the JSON null value. By default, fields with empty
7498	// values are omitted from API requests. However, any field with an
7499	// empty value appearing in NullFields will be sent to the server as
7500	// null. It is an error if a field in this list has a non-empty value.
7501	// This may be used to include null fields in Patch requests.
7502	NullFields []string `json:"-"`
7503}
7504
7505func (s *SponsorSnippet) MarshalJSON() ([]byte, error) {
7506	type NoMethod SponsorSnippet
7507	raw := NoMethod(*s)
7508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7509}
7510
7511// Subscription: A subscription resource contains information about a
7512// YouTube user subscription. A subscription notifies a user when new
7513// videos are added to a channel or when another user takes one of
7514// several actions on YouTube, such as uploading a video, rating a
7515// video, or commenting on a video.
7516type Subscription struct {
7517	// ContentDetails: The contentDetails object contains basic statistics
7518	// about the subscription.
7519	ContentDetails *SubscriptionContentDetails `json:"contentDetails,omitempty"`
7520
7521	// Etag: Etag of this resource.
7522	Etag string `json:"etag,omitempty"`
7523
7524	// Id: The ID that YouTube uses to uniquely identify the subscription.
7525	Id string `json:"id,omitempty"`
7526
7527	// Kind: Identifies what kind of resource this is. Value: the fixed
7528	// string "youtube#subscription".
7529	Kind string `json:"kind,omitempty"`
7530
7531	// Snippet: The snippet object contains basic details about the
7532	// subscription, including its title and the channel that the user
7533	// subscribed to.
7534	Snippet *SubscriptionSnippet `json:"snippet,omitempty"`
7535
7536	// SubscriberSnippet: The subscriberSnippet object contains basic
7537	// details about the sbuscriber.
7538	SubscriberSnippet *SubscriptionSubscriberSnippet `json:"subscriberSnippet,omitempty"`
7539
7540	// ServerResponse contains the HTTP response code and headers from the
7541	// server.
7542	googleapi.ServerResponse `json:"-"`
7543
7544	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
7545	// unconditionally include in API requests. By default, fields with
7546	// empty values are omitted from API requests. However, any non-pointer,
7547	// non-interface field appearing in ForceSendFields will be sent to the
7548	// server regardless of whether the field is empty or not. This may be
7549	// used to include empty fields in Patch requests.
7550	ForceSendFields []string `json:"-"`
7551
7552	// NullFields is a list of field names (e.g. "ContentDetails") to
7553	// include in API requests with the JSON null value. By default, fields
7554	// with empty values are omitted from API requests. However, any field
7555	// with an empty value appearing in NullFields will be sent to the
7556	// server as null. It is an error if a field in this list has a
7557	// non-empty value. This may be used to include null fields in Patch
7558	// requests.
7559	NullFields []string `json:"-"`
7560}
7561
7562func (s *Subscription) MarshalJSON() ([]byte, error) {
7563	type NoMethod Subscription
7564	raw := NoMethod(*s)
7565	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7566}
7567
7568// SubscriptionContentDetails: Details about the content to witch a
7569// subscription refers.
7570type SubscriptionContentDetails struct {
7571	// ActivityType: The type of activity this subscription is for (only
7572	// uploads, everything).
7573	//
7574	// Possible values:
7575	//   "all"
7576	//   "uploads"
7577	ActivityType string `json:"activityType,omitempty"`
7578
7579	// NewItemCount: The number of new items in the subscription since its
7580	// content was last read.
7581	NewItemCount int64 `json:"newItemCount,omitempty"`
7582
7583	// TotalItemCount: The approximate number of items that the subscription
7584	// points to.
7585	TotalItemCount int64 `json:"totalItemCount,omitempty"`
7586
7587	// ForceSendFields is a list of field names (e.g. "ActivityType") to
7588	// unconditionally include in API requests. By default, fields with
7589	// empty values are omitted from API requests. However, any non-pointer,
7590	// non-interface field appearing in ForceSendFields will be sent to the
7591	// server regardless of whether the field is empty or not. This may be
7592	// used to include empty fields in Patch requests.
7593	ForceSendFields []string `json:"-"`
7594
7595	// NullFields is a list of field names (e.g. "ActivityType") to include
7596	// in API requests with the JSON null value. By default, fields with
7597	// empty values are omitted from API requests. However, any field with
7598	// an empty value appearing in NullFields will be sent to the server as
7599	// null. It is an error if a field in this list has a non-empty value.
7600	// This may be used to include null fields in Patch requests.
7601	NullFields []string `json:"-"`
7602}
7603
7604func (s *SubscriptionContentDetails) MarshalJSON() ([]byte, error) {
7605	type NoMethod SubscriptionContentDetails
7606	raw := NoMethod(*s)
7607	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7608}
7609
7610type SubscriptionListResponse struct {
7611	// Etag: Etag of this resource.
7612	Etag string `json:"etag,omitempty"`
7613
7614	// EventId: Serialized EventId of the request which produced this
7615	// response.
7616	EventId string `json:"eventId,omitempty"`
7617
7618	// Items: A list of subscriptions that match the request criteria.
7619	Items []*Subscription `json:"items,omitempty"`
7620
7621	// Kind: Identifies what kind of resource this is. Value: the fixed
7622	// string "youtube#subscriptionListResponse".
7623	Kind string `json:"kind,omitempty"`
7624
7625	// NextPageToken: The token that can be used as the value of the
7626	// pageToken parameter to retrieve the next page in the result set.
7627	NextPageToken string `json:"nextPageToken,omitempty"`
7628
7629	PageInfo *PageInfo `json:"pageInfo,omitempty"`
7630
7631	// PrevPageToken: The token that can be used as the value of the
7632	// pageToken parameter to retrieve the previous page in the result set.
7633	PrevPageToken string `json:"prevPageToken,omitempty"`
7634
7635	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
7636
7637	// VisitorId: The visitorId identifies the visitor.
7638	VisitorId string `json:"visitorId,omitempty"`
7639
7640	// ServerResponse contains the HTTP response code and headers from the
7641	// server.
7642	googleapi.ServerResponse `json:"-"`
7643
7644	// ForceSendFields is a list of field names (e.g. "Etag") to
7645	// unconditionally include in API requests. By default, fields with
7646	// empty values are omitted from API requests. However, any non-pointer,
7647	// non-interface field appearing in ForceSendFields will be sent to the
7648	// server regardless of whether the field is empty or not. This may be
7649	// used to include empty fields in Patch requests.
7650	ForceSendFields []string `json:"-"`
7651
7652	// NullFields is a list of field names (e.g. "Etag") to include in API
7653	// requests with the JSON null value. By default, fields with empty
7654	// values are omitted from API requests. However, any field with an
7655	// empty value appearing in NullFields will be sent to the server as
7656	// null. It is an error if a field in this list has a non-empty value.
7657	// This may be used to include null fields in Patch requests.
7658	NullFields []string `json:"-"`
7659}
7660
7661func (s *SubscriptionListResponse) MarshalJSON() ([]byte, error) {
7662	type NoMethod SubscriptionListResponse
7663	raw := NoMethod(*s)
7664	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7665}
7666
7667// SubscriptionSnippet: Basic details about a subscription, including
7668// title, description and thumbnails of the subscribed item.
7669type SubscriptionSnippet struct {
7670	// ChannelId: The ID that YouTube uses to uniquely identify the
7671	// subscriber's channel.
7672	ChannelId string `json:"channelId,omitempty"`
7673
7674	// ChannelTitle: Channel title for the channel that the subscription
7675	// belongs to.
7676	ChannelTitle string `json:"channelTitle,omitempty"`
7677
7678	// Description: The subscription's details.
7679	Description string `json:"description,omitempty"`
7680
7681	// PublishedAt: The date and time that the subscription was created. The
7682	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
7683	PublishedAt string `json:"publishedAt,omitempty"`
7684
7685	// ResourceId: The id object contains information about the channel that
7686	// the user subscribed to.
7687	ResourceId *ResourceId `json:"resourceId,omitempty"`
7688
7689	// Thumbnails: A map of thumbnail images associated with the video. For
7690	// each object in the map, the key is the name of the thumbnail image,
7691	// and the value is an object that contains other information about the
7692	// thumbnail.
7693	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
7694
7695	// Title: The subscription's title.
7696	Title string `json:"title,omitempty"`
7697
7698	// ForceSendFields is a list of field names (e.g. "ChannelId") to
7699	// unconditionally include in API requests. By default, fields with
7700	// empty values are omitted from API requests. However, any non-pointer,
7701	// non-interface field appearing in ForceSendFields will be sent to the
7702	// server regardless of whether the field is empty or not. This may be
7703	// used to include empty fields in Patch requests.
7704	ForceSendFields []string `json:"-"`
7705
7706	// NullFields is a list of field names (e.g. "ChannelId") to include in
7707	// API requests with the JSON null value. By default, fields with empty
7708	// values are omitted from API requests. However, any field with an
7709	// empty value appearing in NullFields will be sent to the server as
7710	// null. It is an error if a field in this list has a non-empty value.
7711	// This may be used to include null fields in Patch requests.
7712	NullFields []string `json:"-"`
7713}
7714
7715func (s *SubscriptionSnippet) MarshalJSON() ([]byte, error) {
7716	type NoMethod SubscriptionSnippet
7717	raw := NoMethod(*s)
7718	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7719}
7720
7721// SubscriptionSubscriberSnippet: Basic details about a subscription's
7722// subscriber including title, description, channel ID and thumbnails.
7723type SubscriptionSubscriberSnippet struct {
7724	// ChannelId: The channel ID of the subscriber.
7725	ChannelId string `json:"channelId,omitempty"`
7726
7727	// Description: The description of the subscriber.
7728	Description string `json:"description,omitempty"`
7729
7730	// Thumbnails: Thumbnails for this subscriber.
7731	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
7732
7733	// Title: The title of the subscriber.
7734	Title string `json:"title,omitempty"`
7735
7736	// ForceSendFields is a list of field names (e.g. "ChannelId") to
7737	// unconditionally include in API requests. By default, fields with
7738	// empty values are omitted from API requests. However, any non-pointer,
7739	// non-interface field appearing in ForceSendFields will be sent to the
7740	// server regardless of whether the field is empty or not. This may be
7741	// used to include empty fields in Patch requests.
7742	ForceSendFields []string `json:"-"`
7743
7744	// NullFields is a list of field names (e.g. "ChannelId") to include in
7745	// API requests with the JSON null value. By default, fields with empty
7746	// values are omitted from API requests. However, any field with an
7747	// empty value appearing in NullFields will be sent to the server as
7748	// null. It is an error if a field in this list has a non-empty value.
7749	// This may be used to include null fields in Patch requests.
7750	NullFields []string `json:"-"`
7751}
7752
7753func (s *SubscriptionSubscriberSnippet) MarshalJSON() ([]byte, error) {
7754	type NoMethod SubscriptionSubscriberSnippet
7755	raw := NoMethod(*s)
7756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7757}
7758
7759// SuperChatEvent: A superChatEvent resource represents a Super Chat
7760// purchase on a YouTube channel.
7761type SuperChatEvent struct {
7762	// Etag: Etag of this resource.
7763	Etag string `json:"etag,omitempty"`
7764
7765	// Id: The ID that YouTube assigns to uniquely identify the Super Chat
7766	// event.
7767	Id string `json:"id,omitempty"`
7768
7769	// Kind: Identifies what kind of resource this is. Value: the fixed
7770	// string "youtube#superChatEvent".
7771	Kind string `json:"kind,omitempty"`
7772
7773	// Snippet: The snippet object contains basic details about the Super
7774	// Chat event.
7775	Snippet *SuperChatEventSnippet `json:"snippet,omitempty"`
7776
7777	// ForceSendFields is a list of field names (e.g. "Etag") to
7778	// unconditionally include in API requests. By default, fields with
7779	// empty values are omitted from API requests. However, any non-pointer,
7780	// non-interface field appearing in ForceSendFields will be sent to the
7781	// server regardless of whether the field is empty or not. This may be
7782	// used to include empty fields in Patch requests.
7783	ForceSendFields []string `json:"-"`
7784
7785	// NullFields is a list of field names (e.g. "Etag") to include in API
7786	// requests with the JSON null value. By default, fields with empty
7787	// values are omitted from API requests. However, any field with an
7788	// empty value appearing in NullFields will be sent to the server as
7789	// null. It is an error if a field in this list has a non-empty value.
7790	// This may be used to include null fields in Patch requests.
7791	NullFields []string `json:"-"`
7792}
7793
7794func (s *SuperChatEvent) MarshalJSON() ([]byte, error) {
7795	type NoMethod SuperChatEvent
7796	raw := NoMethod(*s)
7797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7798}
7799
7800type SuperChatEventListResponse struct {
7801	// Etag: Etag of this resource.
7802	Etag string `json:"etag,omitempty"`
7803
7804	// EventId: Serialized EventId of the request which produced this
7805	// response.
7806	EventId string `json:"eventId,omitempty"`
7807
7808	// Items: A list of Super Chat purchases that match the request
7809	// criteria.
7810	Items []*SuperChatEvent `json:"items,omitempty"`
7811
7812	// Kind: Identifies what kind of resource this is. Value: the fixed
7813	// string "youtube#superChatEventListResponse".
7814	Kind string `json:"kind,omitempty"`
7815
7816	// NextPageToken: The token that can be used as the value of the
7817	// pageToken parameter to retrieve the next page in the result set.
7818	NextPageToken string `json:"nextPageToken,omitempty"`
7819
7820	PageInfo *PageInfo `json:"pageInfo,omitempty"`
7821
7822	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
7823
7824	// VisitorId: The visitorId identifies the visitor.
7825	VisitorId string `json:"visitorId,omitempty"`
7826
7827	// ServerResponse contains the HTTP response code and headers from the
7828	// server.
7829	googleapi.ServerResponse `json:"-"`
7830
7831	// ForceSendFields is a list of field names (e.g. "Etag") to
7832	// unconditionally include in API requests. By default, fields with
7833	// empty values are omitted from API requests. However, any non-pointer,
7834	// non-interface field appearing in ForceSendFields will be sent to the
7835	// server regardless of whether the field is empty or not. This may be
7836	// used to include empty fields in Patch requests.
7837	ForceSendFields []string `json:"-"`
7838
7839	// NullFields is a list of field names (e.g. "Etag") to include in API
7840	// requests with the JSON null value. By default, fields with empty
7841	// values are omitted from API requests. However, any field with an
7842	// empty value appearing in NullFields will be sent to the server as
7843	// null. It is an error if a field in this list has a non-empty value.
7844	// This may be used to include null fields in Patch requests.
7845	NullFields []string `json:"-"`
7846}
7847
7848func (s *SuperChatEventListResponse) MarshalJSON() ([]byte, error) {
7849	type NoMethod SuperChatEventListResponse
7850	raw := NoMethod(*s)
7851	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7852}
7853
7854type SuperChatEventSnippet struct {
7855	// AmountMicros: The purchase amount, in micros of the purchase
7856	// currency. e.g., 1 is represented as 1000000.
7857	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
7858
7859	// ChannelId: Channel id where the event occurred.
7860	ChannelId string `json:"channelId,omitempty"`
7861
7862	// CommentText: The text contents of the comment left by the user.
7863	CommentText string `json:"commentText,omitempty"`
7864
7865	// CreatedAt: The date and time when the event occurred. The value is
7866	// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
7867	CreatedAt string `json:"createdAt,omitempty"`
7868
7869	// Currency: The currency in which the purchase was made. ISO 4217.
7870	Currency string `json:"currency,omitempty"`
7871
7872	// DisplayString: A rendered string that displays the purchase amount
7873	// and currency (e.g., "$1.00"). The string is rendered for the given
7874	// language.
7875	DisplayString string `json:"displayString,omitempty"`
7876
7877	// IsSuperChatForGood: True if this event is a Super Chat for Good
7878	// purchase.
7879	IsSuperChatForGood bool `json:"isSuperChatForGood,omitempty"`
7880
7881	// IsSuperStickerEvent: True if this event is a Super Sticker event.
7882	IsSuperStickerEvent bool `json:"isSuperStickerEvent,omitempty"`
7883
7884	// MessageType: The tier for the paid message, which is based on the
7885	// amount of money spent to purchase the message.
7886	MessageType int64 `json:"messageType,omitempty"`
7887
7888	// Nonprofit: If this event is a Super Chat for Good purchase, this
7889	// field will contain information about the charity the purchase is
7890	// donated to.
7891	Nonprofit *Nonprofit `json:"nonprofit,omitempty"`
7892
7893	// SuperStickerMetadata: If this event is a Super Sticker event, this
7894	// field will contain metadata about the Super Sticker.
7895	SuperStickerMetadata *SuperStickerMetadata `json:"superStickerMetadata,omitempty"`
7896
7897	// SupporterDetails: Details about the supporter.
7898	SupporterDetails *ChannelProfileDetails `json:"supporterDetails,omitempty"`
7899
7900	// ForceSendFields is a list of field names (e.g. "AmountMicros") to
7901	// unconditionally include in API requests. By default, fields with
7902	// empty values are omitted from API requests. However, any non-pointer,
7903	// non-interface field appearing in ForceSendFields will be sent to the
7904	// server regardless of whether the field is empty or not. This may be
7905	// used to include empty fields in Patch requests.
7906	ForceSendFields []string `json:"-"`
7907
7908	// NullFields is a list of field names (e.g. "AmountMicros") to include
7909	// in API requests with the JSON null value. By default, fields with
7910	// empty values are omitted from API requests. However, any field with
7911	// an empty value appearing in NullFields will be sent to the server as
7912	// null. It is an error if a field in this list has a non-empty value.
7913	// This may be used to include null fields in Patch requests.
7914	NullFields []string `json:"-"`
7915}
7916
7917func (s *SuperChatEventSnippet) MarshalJSON() ([]byte, error) {
7918	type NoMethod SuperChatEventSnippet
7919	raw := NoMethod(*s)
7920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7921}
7922
7923type SuperStickerMetadata struct {
7924	// AltText: Internationalized alt text that describes the sticker image
7925	// and any animation associated with it.
7926	AltText string `json:"altText,omitempty"`
7927
7928	// AltTextLanguage: Specifies the localization language in which the alt
7929	// text is returned.
7930	AltTextLanguage string `json:"altTextLanguage,omitempty"`
7931
7932	// StickerId: Unique identifier of the Super Sticker. This is a shorter
7933	// form of the alt_text that includes pack name and a recognizable
7934	// characteristic of the sticker.
7935	StickerId string `json:"stickerId,omitempty"`
7936
7937	// ForceSendFields is a list of field names (e.g. "AltText") to
7938	// unconditionally include in API requests. By default, fields with
7939	// empty values are omitted from API requests. However, any non-pointer,
7940	// non-interface field appearing in ForceSendFields will be sent to the
7941	// server regardless of whether the field is empty or not. This may be
7942	// used to include empty fields in Patch requests.
7943	ForceSendFields []string `json:"-"`
7944
7945	// NullFields is a list of field names (e.g. "AltText") to include in
7946	// API requests with the JSON null value. By default, fields with empty
7947	// values are omitted from API requests. However, any field with an
7948	// empty value appearing in NullFields will be sent to the server as
7949	// null. It is an error if a field in this list has a non-empty value.
7950	// This may be used to include null fields in Patch requests.
7951	NullFields []string `json:"-"`
7952}
7953
7954func (s *SuperStickerMetadata) MarshalJSON() ([]byte, error) {
7955	type NoMethod SuperStickerMetadata
7956	raw := NoMethod(*s)
7957	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7958}
7959
7960// Thumbnail: A thumbnail is an image representing a YouTube resource.
7961type Thumbnail struct {
7962	// Height: (Optional) Height of the thumbnail image.
7963	Height int64 `json:"height,omitempty"`
7964
7965	// Url: The thumbnail image's URL.
7966	Url string `json:"url,omitempty"`
7967
7968	// Width: (Optional) Width of the thumbnail image.
7969	Width int64 `json:"width,omitempty"`
7970
7971	// ForceSendFields is a list of field names (e.g. "Height") to
7972	// unconditionally include in API requests. By default, fields with
7973	// empty values are omitted from API requests. However, any non-pointer,
7974	// non-interface field appearing in ForceSendFields will be sent to the
7975	// server regardless of whether the field is empty or not. This may be
7976	// used to include empty fields in Patch requests.
7977	ForceSendFields []string `json:"-"`
7978
7979	// NullFields is a list of field names (e.g. "Height") to include in API
7980	// requests with the JSON null value. By default, fields with empty
7981	// values are omitted from API requests. However, any field with an
7982	// empty value appearing in NullFields will be sent to the server as
7983	// null. It is an error if a field in this list has a non-empty value.
7984	// This may be used to include null fields in Patch requests.
7985	NullFields []string `json:"-"`
7986}
7987
7988func (s *Thumbnail) MarshalJSON() ([]byte, error) {
7989	type NoMethod Thumbnail
7990	raw := NoMethod(*s)
7991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7992}
7993
7994// ThumbnailDetails: Internal representation of thumbnails for a YouTube
7995// resource.
7996type ThumbnailDetails struct {
7997	// Default: The default image for this resource.
7998	Default *Thumbnail `json:"default,omitempty"`
7999
8000	// High: The high quality image for this resource.
8001	High *Thumbnail `json:"high,omitempty"`
8002
8003	// Maxres: The maximum resolution quality image for this resource.
8004	Maxres *Thumbnail `json:"maxres,omitempty"`
8005
8006	// Medium: The medium quality image for this resource.
8007	Medium *Thumbnail `json:"medium,omitempty"`
8008
8009	// Standard: The standard quality image for this resource.
8010	Standard *Thumbnail `json:"standard,omitempty"`
8011
8012	// ForceSendFields is a list of field names (e.g. "Default") to
8013	// unconditionally include in API requests. By default, fields with
8014	// empty values are omitted from API requests. However, any non-pointer,
8015	// non-interface field appearing in ForceSendFields will be sent to the
8016	// server regardless of whether the field is empty or not. This may be
8017	// used to include empty fields in Patch requests.
8018	ForceSendFields []string `json:"-"`
8019
8020	// NullFields is a list of field names (e.g. "Default") to include in
8021	// API requests with the JSON null value. By default, fields with empty
8022	// values are omitted from API requests. However, any field with an
8023	// empty value appearing in NullFields will be sent to the server as
8024	// null. It is an error if a field in this list has a non-empty value.
8025	// This may be used to include null fields in Patch requests.
8026	NullFields []string `json:"-"`
8027}
8028
8029func (s *ThumbnailDetails) MarshalJSON() ([]byte, error) {
8030	type NoMethod ThumbnailDetails
8031	raw := NoMethod(*s)
8032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8033}
8034
8035type ThumbnailSetResponse struct {
8036	// Etag: Etag of this resource.
8037	Etag string `json:"etag,omitempty"`
8038
8039	// EventId: Serialized EventId of the request which produced this
8040	// response.
8041	EventId string `json:"eventId,omitempty"`
8042
8043	// Items: A list of thumbnails.
8044	Items []*ThumbnailDetails `json:"items,omitempty"`
8045
8046	// Kind: Identifies what kind of resource this is. Value: the fixed
8047	// string "youtube#thumbnailSetResponse".
8048	Kind string `json:"kind,omitempty"`
8049
8050	// VisitorId: The visitorId identifies the visitor.
8051	VisitorId string `json:"visitorId,omitempty"`
8052
8053	// ServerResponse contains the HTTP response code and headers from the
8054	// server.
8055	googleapi.ServerResponse `json:"-"`
8056
8057	// ForceSendFields is a list of field names (e.g. "Etag") to
8058	// unconditionally include in API requests. By default, fields with
8059	// empty values are omitted from API requests. However, any non-pointer,
8060	// non-interface field appearing in ForceSendFields will be sent to the
8061	// server regardless of whether the field is empty or not. This may be
8062	// used to include empty fields in Patch requests.
8063	ForceSendFields []string `json:"-"`
8064
8065	// NullFields is a list of field names (e.g. "Etag") to include in API
8066	// requests with the JSON null value. By default, fields with empty
8067	// values are omitted from API requests. However, any field with an
8068	// empty value appearing in NullFields will be sent to the server as
8069	// null. It is an error if a field in this list has a non-empty value.
8070	// This may be used to include null fields in Patch requests.
8071	NullFields []string `json:"-"`
8072}
8073
8074func (s *ThumbnailSetResponse) MarshalJSON() ([]byte, error) {
8075	type NoMethod ThumbnailSetResponse
8076	raw := NoMethod(*s)
8077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8078}
8079
8080// TokenPagination: Stub token pagination template to suppress results.
8081type TokenPagination struct {
8082}
8083
8084// Video: A video resource represents a YouTube video.
8085type Video struct {
8086	// AgeGating: Age restriction details related to a video. This data can
8087	// only be retrieved by the video owner.
8088	AgeGating *VideoAgeGating `json:"ageGating,omitempty"`
8089
8090	// ContentDetails: The contentDetails object contains information about
8091	// the video content, including the length of the video and its aspect
8092	// ratio.
8093	ContentDetails *VideoContentDetails `json:"contentDetails,omitempty"`
8094
8095	// Etag: Etag of this resource.
8096	Etag string `json:"etag,omitempty"`
8097
8098	// FileDetails: The fileDetails object encapsulates information about
8099	// the video file that was uploaded to YouTube, including the file's
8100	// resolution, duration, audio and video codecs, stream bitrates, and
8101	// more. This data can only be retrieved by the video owner.
8102	FileDetails *VideoFileDetails `json:"fileDetails,omitempty"`
8103
8104	// Id: The ID that YouTube uses to uniquely identify the video.
8105	Id string `json:"id,omitempty"`
8106
8107	// Kind: Identifies what kind of resource this is. Value: the fixed
8108	// string "youtube#video".
8109	Kind string `json:"kind,omitempty"`
8110
8111	// LiveStreamingDetails: The liveStreamingDetails object contains
8112	// metadata about a live video broadcast. The object will only be
8113	// present in a video resource if the video is an upcoming, live, or
8114	// completed live broadcast.
8115	LiveStreamingDetails *VideoLiveStreamingDetails `json:"liveStreamingDetails,omitempty"`
8116
8117	// Localizations: List with all localizations.
8118	Localizations map[string]VideoLocalization `json:"localizations,omitempty"`
8119
8120	// MonetizationDetails: The monetizationDetails object encapsulates
8121	// information about the monetization status of the video.
8122	MonetizationDetails *VideoMonetizationDetails `json:"monetizationDetails,omitempty"`
8123
8124	// Player: The player object contains information that you would use to
8125	// play the video in an embedded player.
8126	Player *VideoPlayer `json:"player,omitempty"`
8127
8128	// ProcessingDetails: The processingDetails object encapsulates
8129	// information about YouTube's progress in processing the uploaded video
8130	// file. The properties in the object identify the current processing
8131	// status and an estimate of the time remaining until YouTube finishes
8132	// processing the video. This part also indicates whether different
8133	// types of data or content, such as file details or thumbnail images,
8134	// are available for the video.
8135	//
8136	// The processingProgress object is designed to be polled so that the
8137	// video uploaded can track the progress that YouTube has made in
8138	// processing the uploaded video file. This data can only be retrieved
8139	// by the video owner.
8140	ProcessingDetails *VideoProcessingDetails `json:"processingDetails,omitempty"`
8141
8142	// ProjectDetails: The projectDetails object contains information about
8143	// the project specific video metadata.
8144	ProjectDetails *VideoProjectDetails `json:"projectDetails,omitempty"`
8145
8146	// RecordingDetails: The recordingDetails object encapsulates
8147	// information about the location, date and address where the video was
8148	// recorded.
8149	RecordingDetails *VideoRecordingDetails `json:"recordingDetails,omitempty"`
8150
8151	// Snippet: The snippet object contains basic details about the video,
8152	// such as its title, description, and category.
8153	Snippet *VideoSnippet `json:"snippet,omitempty"`
8154
8155	// Statistics: The statistics object contains statistics about the
8156	// video.
8157	Statistics *VideoStatistics `json:"statistics,omitempty"`
8158
8159	// Status: The status object contains information about the video's
8160	// uploading, processing, and privacy statuses.
8161	Status *VideoStatus `json:"status,omitempty"`
8162
8163	// Suggestions: The suggestions object encapsulates suggestions that
8164	// identify opportunities to improve the video quality or the metadata
8165	// for the uploaded video. This data can only be retrieved by the video
8166	// owner.
8167	Suggestions *VideoSuggestions `json:"suggestions,omitempty"`
8168
8169	// TopicDetails: The topicDetails object encapsulates information about
8170	// Freebase topics associated with the video.
8171	TopicDetails *VideoTopicDetails `json:"topicDetails,omitempty"`
8172
8173	// ServerResponse contains the HTTP response code and headers from the
8174	// server.
8175	googleapi.ServerResponse `json:"-"`
8176
8177	// ForceSendFields is a list of field names (e.g. "AgeGating") to
8178	// unconditionally include in API requests. By default, fields with
8179	// empty values are omitted from API requests. However, any non-pointer,
8180	// non-interface field appearing in ForceSendFields will be sent to the
8181	// server regardless of whether the field is empty or not. This may be
8182	// used to include empty fields in Patch requests.
8183	ForceSendFields []string `json:"-"`
8184
8185	// NullFields is a list of field names (e.g. "AgeGating") to include in
8186	// API requests with the JSON null value. By default, fields with empty
8187	// values are omitted from API requests. However, any field with an
8188	// empty value appearing in NullFields will be sent to the server as
8189	// null. It is an error if a field in this list has a non-empty value.
8190	// This may be used to include null fields in Patch requests.
8191	NullFields []string `json:"-"`
8192}
8193
8194func (s *Video) MarshalJSON() ([]byte, error) {
8195	type NoMethod Video
8196	raw := NoMethod(*s)
8197	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8198}
8199
8200type VideoAbuseReport struct {
8201	// Comments: Additional comments regarding the abuse report.
8202	Comments string `json:"comments,omitempty"`
8203
8204	// Language: The language that the content was viewed in.
8205	Language string `json:"language,omitempty"`
8206
8207	// ReasonId: The high-level, or primary, reason that the content is
8208	// abusive. The value is an abuse report reason ID.
8209	ReasonId string `json:"reasonId,omitempty"`
8210
8211	// SecondaryReasonId: The specific, or secondary, reason that this
8212	// content is abusive (if available). The value is an abuse report
8213	// reason ID that is a valid secondary reason for the primary reason.
8214	SecondaryReasonId string `json:"secondaryReasonId,omitempty"`
8215
8216	// VideoId: The ID that YouTube uses to uniquely identify the video.
8217	VideoId string `json:"videoId,omitempty"`
8218
8219	// ForceSendFields is a list of field names (e.g. "Comments") to
8220	// unconditionally include in API requests. By default, fields with
8221	// empty values are omitted from API requests. However, any non-pointer,
8222	// non-interface field appearing in ForceSendFields will be sent to the
8223	// server regardless of whether the field is empty or not. This may be
8224	// used to include empty fields in Patch requests.
8225	ForceSendFields []string `json:"-"`
8226
8227	// NullFields is a list of field names (e.g. "Comments") to include in
8228	// API requests with the JSON null value. By default, fields with empty
8229	// values are omitted from API requests. However, any field with an
8230	// empty value appearing in NullFields will be sent to the server as
8231	// null. It is an error if a field in this list has a non-empty value.
8232	// This may be used to include null fields in Patch requests.
8233	NullFields []string `json:"-"`
8234}
8235
8236func (s *VideoAbuseReport) MarshalJSON() ([]byte, error) {
8237	type NoMethod VideoAbuseReport
8238	raw := NoMethod(*s)
8239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8240}
8241
8242// VideoAbuseReportReason: A videoAbuseReportReason resource identifies
8243// a reason that a video could be reported as abusive. Video abuse
8244// report reasons are used with video.ReportAbuse.
8245type VideoAbuseReportReason struct {
8246	// Etag: Etag of this resource.
8247	Etag string `json:"etag,omitempty"`
8248
8249	// Id: The ID of this abuse report reason.
8250	Id string `json:"id,omitempty"`
8251
8252	// Kind: Identifies what kind of resource this is. Value: the fixed
8253	// string "youtube#videoAbuseReportReason".
8254	Kind string `json:"kind,omitempty"`
8255
8256	// Snippet: The snippet object contains basic details about the abuse
8257	// report reason.
8258	Snippet *VideoAbuseReportReasonSnippet `json:"snippet,omitempty"`
8259
8260	// ForceSendFields is a list of field names (e.g. "Etag") to
8261	// unconditionally include in API requests. By default, fields with
8262	// empty values are omitted from API requests. However, any non-pointer,
8263	// non-interface field appearing in ForceSendFields will be sent to the
8264	// server regardless of whether the field is empty or not. This may be
8265	// used to include empty fields in Patch requests.
8266	ForceSendFields []string `json:"-"`
8267
8268	// NullFields is a list of field names (e.g. "Etag") to include in API
8269	// requests with the JSON null value. By default, fields with empty
8270	// values are omitted from API requests. However, any field with an
8271	// empty value appearing in NullFields will be sent to the server as
8272	// null. It is an error if a field in this list has a non-empty value.
8273	// This may be used to include null fields in Patch requests.
8274	NullFields []string `json:"-"`
8275}
8276
8277func (s *VideoAbuseReportReason) MarshalJSON() ([]byte, error) {
8278	type NoMethod VideoAbuseReportReason
8279	raw := NoMethod(*s)
8280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8281}
8282
8283type VideoAbuseReportReasonListResponse struct {
8284	// Etag: Etag of this resource.
8285	Etag string `json:"etag,omitempty"`
8286
8287	// EventId: Serialized EventId of the request which produced this
8288	// response.
8289	EventId string `json:"eventId,omitempty"`
8290
8291	// Items: A list of valid abuse reasons that are used with
8292	// video.ReportAbuse.
8293	Items []*VideoAbuseReportReason `json:"items,omitempty"`
8294
8295	// Kind: Identifies what kind of resource this is. Value: the fixed
8296	// string "youtube#videoAbuseReportReasonListResponse".
8297	Kind string `json:"kind,omitempty"`
8298
8299	// VisitorId: The visitorId identifies the visitor.
8300	VisitorId string `json:"visitorId,omitempty"`
8301
8302	// ServerResponse contains the HTTP response code and headers from the
8303	// server.
8304	googleapi.ServerResponse `json:"-"`
8305
8306	// ForceSendFields is a list of field names (e.g. "Etag") to
8307	// unconditionally include in API requests. By default, fields with
8308	// empty values are omitted from API requests. However, any non-pointer,
8309	// non-interface field appearing in ForceSendFields will be sent to the
8310	// server regardless of whether the field is empty or not. This may be
8311	// used to include empty fields in Patch requests.
8312	ForceSendFields []string `json:"-"`
8313
8314	// NullFields is a list of field names (e.g. "Etag") to include in API
8315	// requests with the JSON null value. By default, fields with empty
8316	// values are omitted from API requests. However, any field with an
8317	// empty value appearing in NullFields will be sent to the server as
8318	// null. It is an error if a field in this list has a non-empty value.
8319	// This may be used to include null fields in Patch requests.
8320	NullFields []string `json:"-"`
8321}
8322
8323func (s *VideoAbuseReportReasonListResponse) MarshalJSON() ([]byte, error) {
8324	type NoMethod VideoAbuseReportReasonListResponse
8325	raw := NoMethod(*s)
8326	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8327}
8328
8329// VideoAbuseReportReasonSnippet: Basic details about a video category,
8330// such as its localized title.
8331type VideoAbuseReportReasonSnippet struct {
8332	// Label: The localized label belonging to this abuse report reason.
8333	Label string `json:"label,omitempty"`
8334
8335	// SecondaryReasons: The secondary reasons associated with this reason,
8336	// if any are available. (There might be 0 or more.)
8337	SecondaryReasons []*VideoAbuseReportSecondaryReason `json:"secondaryReasons,omitempty"`
8338
8339	// ForceSendFields is a list of field names (e.g. "Label") to
8340	// unconditionally include in API requests. By default, fields with
8341	// empty values are omitted from API requests. However, any non-pointer,
8342	// non-interface field appearing in ForceSendFields will be sent to the
8343	// server regardless of whether the field is empty or not. This may be
8344	// used to include empty fields in Patch requests.
8345	ForceSendFields []string `json:"-"`
8346
8347	// NullFields is a list of field names (e.g. "Label") to include in API
8348	// requests with the JSON null value. By default, fields with empty
8349	// values are omitted from API requests. However, any field with an
8350	// empty value appearing in NullFields will be sent to the server as
8351	// null. It is an error if a field in this list has a non-empty value.
8352	// This may be used to include null fields in Patch requests.
8353	NullFields []string `json:"-"`
8354}
8355
8356func (s *VideoAbuseReportReasonSnippet) MarshalJSON() ([]byte, error) {
8357	type NoMethod VideoAbuseReportReasonSnippet
8358	raw := NoMethod(*s)
8359	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8360}
8361
8362type VideoAbuseReportSecondaryReason struct {
8363	// Id: The ID of this abuse report secondary reason.
8364	Id string `json:"id,omitempty"`
8365
8366	// Label: The localized label for this abuse report secondary reason.
8367	Label string `json:"label,omitempty"`
8368
8369	// ForceSendFields is a list of field names (e.g. "Id") to
8370	// unconditionally include in API requests. By default, fields with
8371	// empty values are omitted from API requests. However, any non-pointer,
8372	// non-interface field appearing in ForceSendFields will be sent to the
8373	// server regardless of whether the field is empty or not. This may be
8374	// used to include empty fields in Patch requests.
8375	ForceSendFields []string `json:"-"`
8376
8377	// NullFields is a list of field names (e.g. "Id") to include in API
8378	// requests with the JSON null value. By default, fields with empty
8379	// values are omitted from API requests. However, any field with an
8380	// empty value appearing in NullFields will be sent to the server as
8381	// null. It is an error if a field in this list has a non-empty value.
8382	// This may be used to include null fields in Patch requests.
8383	NullFields []string `json:"-"`
8384}
8385
8386func (s *VideoAbuseReportSecondaryReason) MarshalJSON() ([]byte, error) {
8387	type NoMethod VideoAbuseReportSecondaryReason
8388	raw := NoMethod(*s)
8389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8390}
8391
8392type VideoAgeGating struct {
8393	// AlcoholContent: Indicates whether or not the video has alcoholic
8394	// beverage content. Only users of legal purchasing age in a particular
8395	// country, as identified by ICAP, can view the content.
8396	AlcoholContent bool `json:"alcoholContent,omitempty"`
8397
8398	// Restricted: Age-restricted trailers. For redband trailers and
8399	// adult-rated video-games. Only users aged 18+ can view the content.
8400	// The the field is true the content is restricted to viewers aged 18+.
8401	// Otherwise The field won't be present.
8402	Restricted bool `json:"restricted,omitempty"`
8403
8404	// VideoGameRating: Video game rating, if any.
8405	//
8406	// Possible values:
8407	//   "anyone"
8408	//   "m15Plus"
8409	//   "m16Plus"
8410	//   "m17Plus"
8411	VideoGameRating string `json:"videoGameRating,omitempty"`
8412
8413	// ForceSendFields is a list of field names (e.g. "AlcoholContent") to
8414	// unconditionally include in API requests. By default, fields with
8415	// empty values are omitted from API requests. However, any non-pointer,
8416	// non-interface field appearing in ForceSendFields will be sent to the
8417	// server regardless of whether the field is empty or not. This may be
8418	// used to include empty fields in Patch requests.
8419	ForceSendFields []string `json:"-"`
8420
8421	// NullFields is a list of field names (e.g. "AlcoholContent") to
8422	// include in API requests with the JSON null value. By default, fields
8423	// with empty values are omitted from API requests. However, any field
8424	// with an empty value appearing in NullFields will be sent to the
8425	// server as null. It is an error if a field in this list has a
8426	// non-empty value. This may be used to include null fields in Patch
8427	// requests.
8428	NullFields []string `json:"-"`
8429}
8430
8431func (s *VideoAgeGating) MarshalJSON() ([]byte, error) {
8432	type NoMethod VideoAgeGating
8433	raw := NoMethod(*s)
8434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8435}
8436
8437// VideoCategory: A videoCategory resource identifies a category that
8438// has been or could be associated with uploaded videos.
8439type VideoCategory struct {
8440	// Etag: Etag of this resource.
8441	Etag string `json:"etag,omitempty"`
8442
8443	// Id: The ID that YouTube uses to uniquely identify the video category.
8444	Id string `json:"id,omitempty"`
8445
8446	// Kind: Identifies what kind of resource this is. Value: the fixed
8447	// string "youtube#videoCategory".
8448	Kind string `json:"kind,omitempty"`
8449
8450	// Snippet: The snippet object contains basic details about the video
8451	// category, including its title.
8452	Snippet *VideoCategorySnippet `json:"snippet,omitempty"`
8453
8454	// ForceSendFields is a list of field names (e.g. "Etag") to
8455	// unconditionally include in API requests. By default, fields with
8456	// empty values are omitted from API requests. However, any non-pointer,
8457	// non-interface field appearing in ForceSendFields will be sent to the
8458	// server regardless of whether the field is empty or not. This may be
8459	// used to include empty fields in Patch requests.
8460	ForceSendFields []string `json:"-"`
8461
8462	// NullFields is a list of field names (e.g. "Etag") to include in API
8463	// requests with the JSON null value. By default, fields with empty
8464	// values are omitted from API requests. However, any field with an
8465	// empty value appearing in NullFields will be sent to the server as
8466	// null. It is an error if a field in this list has a non-empty value.
8467	// This may be used to include null fields in Patch requests.
8468	NullFields []string `json:"-"`
8469}
8470
8471func (s *VideoCategory) MarshalJSON() ([]byte, error) {
8472	type NoMethod VideoCategory
8473	raw := NoMethod(*s)
8474	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8475}
8476
8477type VideoCategoryListResponse struct {
8478	// Etag: Etag of this resource.
8479	Etag string `json:"etag,omitempty"`
8480
8481	// EventId: Serialized EventId of the request which produced this
8482	// response.
8483	EventId string `json:"eventId,omitempty"`
8484
8485	// Items: A list of video categories that can be associated with YouTube
8486	// videos. In this map, the video category ID is the map key, and its
8487	// value is the corresponding videoCategory resource.
8488	Items []*VideoCategory `json:"items,omitempty"`
8489
8490	// Kind: Identifies what kind of resource this is. Value: the fixed
8491	// string "youtube#videoCategoryListResponse".
8492	Kind string `json:"kind,omitempty"`
8493
8494	// NextPageToken: The token that can be used as the value of the
8495	// pageToken parameter to retrieve the next page in the result set.
8496	NextPageToken string `json:"nextPageToken,omitempty"`
8497
8498	PageInfo *PageInfo `json:"pageInfo,omitempty"`
8499
8500	// PrevPageToken: The token that can be used as the value of the
8501	// pageToken parameter to retrieve the previous page in the result set.
8502	PrevPageToken string `json:"prevPageToken,omitempty"`
8503
8504	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
8505
8506	// VisitorId: The visitorId identifies the visitor.
8507	VisitorId string `json:"visitorId,omitempty"`
8508
8509	// ServerResponse contains the HTTP response code and headers from the
8510	// server.
8511	googleapi.ServerResponse `json:"-"`
8512
8513	// ForceSendFields is a list of field names (e.g. "Etag") to
8514	// unconditionally include in API requests. By default, fields with
8515	// empty values are omitted from API requests. However, any non-pointer,
8516	// non-interface field appearing in ForceSendFields will be sent to the
8517	// server regardless of whether the field is empty or not. This may be
8518	// used to include empty fields in Patch requests.
8519	ForceSendFields []string `json:"-"`
8520
8521	// NullFields is a list of field names (e.g. "Etag") to include in API
8522	// requests with the JSON null value. By default, fields with empty
8523	// values are omitted from API requests. However, any field with an
8524	// empty value appearing in NullFields will be sent to the server as
8525	// null. It is an error if a field in this list has a non-empty value.
8526	// This may be used to include null fields in Patch requests.
8527	NullFields []string `json:"-"`
8528}
8529
8530func (s *VideoCategoryListResponse) MarshalJSON() ([]byte, error) {
8531	type NoMethod VideoCategoryListResponse
8532	raw := NoMethod(*s)
8533	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8534}
8535
8536// VideoCategorySnippet: Basic details about a video category, such as
8537// its localized title.
8538type VideoCategorySnippet struct {
8539	Assignable bool `json:"assignable,omitempty"`
8540
8541	// ChannelId: The YouTube channel that created the video category.
8542	ChannelId string `json:"channelId,omitempty"`
8543
8544	// Title: The video category's title.
8545	Title string `json:"title,omitempty"`
8546
8547	// ForceSendFields is a list of field names (e.g. "Assignable") to
8548	// unconditionally include in API requests. By default, fields with
8549	// empty values are omitted from API requests. However, any non-pointer,
8550	// non-interface field appearing in ForceSendFields will be sent to the
8551	// server regardless of whether the field is empty or not. This may be
8552	// used to include empty fields in Patch requests.
8553	ForceSendFields []string `json:"-"`
8554
8555	// NullFields is a list of field names (e.g. "Assignable") to include in
8556	// API requests with the JSON null value. By default, fields with empty
8557	// values are omitted from API requests. However, any field with an
8558	// empty value appearing in NullFields will be sent to the server as
8559	// null. It is an error if a field in this list has a non-empty value.
8560	// This may be used to include null fields in Patch requests.
8561	NullFields []string `json:"-"`
8562}
8563
8564func (s *VideoCategorySnippet) MarshalJSON() ([]byte, error) {
8565	type NoMethod VideoCategorySnippet
8566	raw := NoMethod(*s)
8567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8568}
8569
8570// VideoContentDetails: Details about the content of a YouTube Video.
8571type VideoContentDetails struct {
8572	// Caption: The value of captions indicates whether the video has
8573	// captions or not.
8574	//
8575	// Possible values:
8576	//   "false"
8577	//   "true"
8578	Caption string `json:"caption,omitempty"`
8579
8580	// ContentRating: Specifies the ratings that the video received under
8581	// various rating schemes.
8582	ContentRating *ContentRating `json:"contentRating,omitempty"`
8583
8584	// CountryRestriction: The countryRestriction object contains
8585	// information about the countries where a video is (or is not)
8586	// viewable.
8587	CountryRestriction *AccessPolicy `json:"countryRestriction,omitempty"`
8588
8589	// Definition: The value of definition indicates whether the video is
8590	// available in high definition or only in standard definition.
8591	//
8592	// Possible values:
8593	//   "hd"
8594	//   "sd"
8595	Definition string `json:"definition,omitempty"`
8596
8597	// Dimension: The value of dimension indicates whether the video is
8598	// available in 3D or in 2D.
8599	Dimension string `json:"dimension,omitempty"`
8600
8601	// Duration: The length of the video. The tag value is an ISO 8601
8602	// duration in the format PT#M#S, in which the letters PT indicate that
8603	// the value specifies a period of time, and the letters M and S refer
8604	// to length in minutes and seconds, respectively. The # characters
8605	// preceding the M and S letters are both integers that specify the
8606	// number of minutes (or seconds) of the video. For example, a value of
8607	// PT15M51S indicates that the video is 15 minutes and 51 seconds long.
8608	Duration string `json:"duration,omitempty"`
8609
8610	// HasCustomThumbnail: Indicates whether the video uploader has provided
8611	// a custom thumbnail image for the video. This property is only visible
8612	// to the video uploader.
8613	HasCustomThumbnail bool `json:"hasCustomThumbnail,omitempty"`
8614
8615	// LicensedContent: The value of is_license_content indicates whether
8616	// the video is licensed content.
8617	LicensedContent bool `json:"licensedContent,omitempty"`
8618
8619	// Projection: Specifies the projection format of the video.
8620	//
8621	// Possible values:
8622	//   "360"
8623	//   "rectangular"
8624	Projection string `json:"projection,omitempty"`
8625
8626	// RegionRestriction: The regionRestriction object contains information
8627	// about the countries where a video is (or is not) viewable. The object
8628	// will contain either the contentDetails.regionRestriction.allowed
8629	// property or the contentDetails.regionRestriction.blocked property.
8630	RegionRestriction *VideoContentDetailsRegionRestriction `json:"regionRestriction,omitempty"`
8631
8632	// ForceSendFields is a list of field names (e.g. "Caption") to
8633	// unconditionally include in API requests. By default, fields with
8634	// empty values are omitted from API requests. However, any non-pointer,
8635	// non-interface field appearing in ForceSendFields will be sent to the
8636	// server regardless of whether the field is empty or not. This may be
8637	// used to include empty fields in Patch requests.
8638	ForceSendFields []string `json:"-"`
8639
8640	// NullFields is a list of field names (e.g. "Caption") to include in
8641	// API requests with the JSON null value. By default, fields with empty
8642	// values are omitted from API requests. However, any field with an
8643	// empty value appearing in NullFields will be sent to the server as
8644	// null. It is an error if a field in this list has a non-empty value.
8645	// This may be used to include null fields in Patch requests.
8646	NullFields []string `json:"-"`
8647}
8648
8649func (s *VideoContentDetails) MarshalJSON() ([]byte, error) {
8650	type NoMethod VideoContentDetails
8651	raw := NoMethod(*s)
8652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8653}
8654
8655// VideoContentDetailsRegionRestriction: DEPRECATED Region restriction
8656// of the video.
8657type VideoContentDetailsRegionRestriction struct {
8658	// Allowed: A list of region codes that identify countries where the
8659	// video is viewable. If this property is present and a country is not
8660	// listed in its value, then the video is blocked from appearing in that
8661	// country. If this property is present and contains an empty list, the
8662	// video is blocked in all countries.
8663	Allowed []string `json:"allowed,omitempty"`
8664
8665	// Blocked: A list of region codes that identify countries where the
8666	// video is blocked. If this property is present and a country is not
8667	// listed in its value, then the video is viewable in that country. If
8668	// this property is present and contains an empty list, the video is
8669	// viewable in all countries.
8670	Blocked []string `json:"blocked,omitempty"`
8671
8672	// ForceSendFields is a list of field names (e.g. "Allowed") to
8673	// unconditionally include in API requests. By default, fields with
8674	// empty values are omitted from API requests. However, any non-pointer,
8675	// non-interface field appearing in ForceSendFields will be sent to the
8676	// server regardless of whether the field is empty or not. This may be
8677	// used to include empty fields in Patch requests.
8678	ForceSendFields []string `json:"-"`
8679
8680	// NullFields is a list of field names (e.g. "Allowed") to include in
8681	// API requests with the JSON null value. By default, fields with empty
8682	// values are omitted from API requests. However, any field with an
8683	// empty value appearing in NullFields will be sent to the server as
8684	// null. It is an error if a field in this list has a non-empty value.
8685	// This may be used to include null fields in Patch requests.
8686	NullFields []string `json:"-"`
8687}
8688
8689func (s *VideoContentDetailsRegionRestriction) MarshalJSON() ([]byte, error) {
8690	type NoMethod VideoContentDetailsRegionRestriction
8691	raw := NoMethod(*s)
8692	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8693}
8694
8695// VideoFileDetails: Describes original video file properties, including
8696// technical details about audio and video streams, but also metadata
8697// information like content length, digitization time, or geotagging
8698// information.
8699type VideoFileDetails struct {
8700	// AudioStreams: A list of audio streams contained in the uploaded video
8701	// file. Each item in the list contains detailed metadata about an audio
8702	// stream.
8703	AudioStreams []*VideoFileDetailsAudioStream `json:"audioStreams,omitempty"`
8704
8705	// BitrateBps: The uploaded video file's combined (video and audio)
8706	// bitrate in bits per second.
8707	BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
8708
8709	// Container: The uploaded video file's container format.
8710	Container string `json:"container,omitempty"`
8711
8712	// CreationTime: The date and time when the uploaded video file was
8713	// created. The value is specified in ISO 8601 format. Currently, the
8714	// following ISO 8601 formats are supported:
8715	// - Date only: YYYY-MM-DD
8716	// - Naive time: YYYY-MM-DDTHH:MM:SS
8717	// - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM
8718	CreationTime string `json:"creationTime,omitempty"`
8719
8720	// DurationMs: The length of the uploaded video in milliseconds.
8721	DurationMs uint64 `json:"durationMs,omitempty,string"`
8722
8723	// FileName: The uploaded file's name. This field is present whether a
8724	// video file or another type of file was uploaded.
8725	FileName string `json:"fileName,omitempty"`
8726
8727	// FileSize: The uploaded file's size in bytes. This field is present
8728	// whether a video file or another type of file was uploaded.
8729	FileSize uint64 `json:"fileSize,omitempty,string"`
8730
8731	// FileType: The uploaded file's type as detected by YouTube's video
8732	// processing engine. Currently, YouTube only processes video files, but
8733	// this field is present whether a video file or another type of file
8734	// was uploaded.
8735	//
8736	// Possible values:
8737	//   "archive"
8738	//   "audio"
8739	//   "document"
8740	//   "image"
8741	//   "other"
8742	//   "project"
8743	//   "video"
8744	FileType string `json:"fileType,omitempty"`
8745
8746	// VideoStreams: A list of video streams contained in the uploaded video
8747	// file. Each item in the list contains detailed metadata about a video
8748	// stream.
8749	VideoStreams []*VideoFileDetailsVideoStream `json:"videoStreams,omitempty"`
8750
8751	// ForceSendFields is a list of field names (e.g. "AudioStreams") to
8752	// unconditionally include in API requests. By default, fields with
8753	// empty values are omitted from API requests. However, any non-pointer,
8754	// non-interface field appearing in ForceSendFields will be sent to the
8755	// server regardless of whether the field is empty or not. This may be
8756	// used to include empty fields in Patch requests.
8757	ForceSendFields []string `json:"-"`
8758
8759	// NullFields is a list of field names (e.g. "AudioStreams") to include
8760	// in API requests with the JSON null value. By default, fields with
8761	// empty values are omitted from API requests. However, any field with
8762	// an empty value appearing in NullFields will be sent to the server as
8763	// null. It is an error if a field in this list has a non-empty value.
8764	// This may be used to include null fields in Patch requests.
8765	NullFields []string `json:"-"`
8766}
8767
8768func (s *VideoFileDetails) MarshalJSON() ([]byte, error) {
8769	type NoMethod VideoFileDetails
8770	raw := NoMethod(*s)
8771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8772}
8773
8774// VideoFileDetailsAudioStream: Information about an audio stream.
8775type VideoFileDetailsAudioStream struct {
8776	// BitrateBps: The audio stream's bitrate, in bits per second.
8777	BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
8778
8779	// ChannelCount: The number of audio channels that the stream contains.
8780	ChannelCount int64 `json:"channelCount,omitempty"`
8781
8782	// Codec: The audio codec that the stream uses.
8783	Codec string `json:"codec,omitempty"`
8784
8785	// Vendor: A value that uniquely identifies a video vendor. Typically,
8786	// the value is a four-letter vendor code.
8787	Vendor string `json:"vendor,omitempty"`
8788
8789	// ForceSendFields is a list of field names (e.g. "BitrateBps") to
8790	// unconditionally include in API requests. By default, fields with
8791	// empty values are omitted from API requests. However, any non-pointer,
8792	// non-interface field appearing in ForceSendFields will be sent to the
8793	// server regardless of whether the field is empty or not. This may be
8794	// used to include empty fields in Patch requests.
8795	ForceSendFields []string `json:"-"`
8796
8797	// NullFields is a list of field names (e.g. "BitrateBps") to include in
8798	// API requests with the JSON null value. By default, fields with empty
8799	// values are omitted from API requests. However, any field with an
8800	// empty value appearing in NullFields will be sent to the server as
8801	// null. It is an error if a field in this list has a non-empty value.
8802	// This may be used to include null fields in Patch requests.
8803	NullFields []string `json:"-"`
8804}
8805
8806func (s *VideoFileDetailsAudioStream) MarshalJSON() ([]byte, error) {
8807	type NoMethod VideoFileDetailsAudioStream
8808	raw := NoMethod(*s)
8809	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8810}
8811
8812// VideoFileDetailsVideoStream: Information about a video stream.
8813type VideoFileDetailsVideoStream struct {
8814	// AspectRatio: The video content's display aspect ratio, which
8815	// specifies the aspect ratio in which the video should be displayed.
8816	AspectRatio float64 `json:"aspectRatio,omitempty"`
8817
8818	// BitrateBps: The video stream's bitrate, in bits per second.
8819	BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
8820
8821	// Codec: The video codec that the stream uses.
8822	Codec string `json:"codec,omitempty"`
8823
8824	// FrameRateFps: The video stream's frame rate, in frames per second.
8825	FrameRateFps float64 `json:"frameRateFps,omitempty"`
8826
8827	// HeightPixels: The encoded video content's height in pixels.
8828	HeightPixels int64 `json:"heightPixels,omitempty"`
8829
8830	// Rotation: The amount that YouTube needs to rotate the original source
8831	// content to properly display the video.
8832	//
8833	// Possible values:
8834	//   "clockwise"
8835	//   "counterClockwise"
8836	//   "none"
8837	//   "other"
8838	//   "upsideDown"
8839	Rotation string `json:"rotation,omitempty"`
8840
8841	// Vendor: A value that uniquely identifies a video vendor. Typically,
8842	// the value is a four-letter vendor code.
8843	Vendor string `json:"vendor,omitempty"`
8844
8845	// WidthPixels: The encoded video content's width in pixels. You can
8846	// calculate the video's encoding aspect ratio as
8847	// width_pixels / height_pixels.
8848	WidthPixels int64 `json:"widthPixels,omitempty"`
8849
8850	// ForceSendFields is a list of field names (e.g. "AspectRatio") to
8851	// unconditionally include in API requests. By default, fields with
8852	// empty values are omitted from API requests. However, any non-pointer,
8853	// non-interface field appearing in ForceSendFields will be sent to the
8854	// server regardless of whether the field is empty or not. This may be
8855	// used to include empty fields in Patch requests.
8856	ForceSendFields []string `json:"-"`
8857
8858	// NullFields is a list of field names (e.g. "AspectRatio") to include
8859	// in API requests with the JSON null value. By default, fields with
8860	// empty values are omitted from API requests. However, any field with
8861	// an empty value appearing in NullFields will be sent to the server as
8862	// null. It is an error if a field in this list has a non-empty value.
8863	// This may be used to include null fields in Patch requests.
8864	NullFields []string `json:"-"`
8865}
8866
8867func (s *VideoFileDetailsVideoStream) MarshalJSON() ([]byte, error) {
8868	type NoMethod VideoFileDetailsVideoStream
8869	raw := NoMethod(*s)
8870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8871}
8872
8873func (s *VideoFileDetailsVideoStream) UnmarshalJSON(data []byte) error {
8874	type NoMethod VideoFileDetailsVideoStream
8875	var s1 struct {
8876		AspectRatio  gensupport.JSONFloat64 `json:"aspectRatio"`
8877		FrameRateFps gensupport.JSONFloat64 `json:"frameRateFps"`
8878		*NoMethod
8879	}
8880	s1.NoMethod = (*NoMethod)(s)
8881	if err := json.Unmarshal(data, &s1); err != nil {
8882		return err
8883	}
8884	s.AspectRatio = float64(s1.AspectRatio)
8885	s.FrameRateFps = float64(s1.FrameRateFps)
8886	return nil
8887}
8888
8889type VideoGetRatingResponse struct {
8890	// Etag: Etag of this resource.
8891	Etag string `json:"etag,omitempty"`
8892
8893	// EventId: Serialized EventId of the request which produced this
8894	// response.
8895	EventId string `json:"eventId,omitempty"`
8896
8897	// Items: A list of ratings that match the request criteria.
8898	Items []*VideoRating `json:"items,omitempty"`
8899
8900	// Kind: Identifies what kind of resource this is. Value: the fixed
8901	// string "youtube#videoGetRatingResponse".
8902	Kind string `json:"kind,omitempty"`
8903
8904	// VisitorId: The visitorId identifies the visitor.
8905	VisitorId string `json:"visitorId,omitempty"`
8906
8907	// ServerResponse contains the HTTP response code and headers from the
8908	// server.
8909	googleapi.ServerResponse `json:"-"`
8910
8911	// ForceSendFields is a list of field names (e.g. "Etag") to
8912	// unconditionally include in API requests. By default, fields with
8913	// empty values are omitted from API requests. However, any non-pointer,
8914	// non-interface field appearing in ForceSendFields will be sent to the
8915	// server regardless of whether the field is empty or not. This may be
8916	// used to include empty fields in Patch requests.
8917	ForceSendFields []string `json:"-"`
8918
8919	// NullFields is a list of field names (e.g. "Etag") to include in API
8920	// requests with the JSON null value. By default, fields with empty
8921	// values are omitted from API requests. However, any field with an
8922	// empty value appearing in NullFields will be sent to the server as
8923	// null. It is an error if a field in this list has a non-empty value.
8924	// This may be used to include null fields in Patch requests.
8925	NullFields []string `json:"-"`
8926}
8927
8928func (s *VideoGetRatingResponse) MarshalJSON() ([]byte, error) {
8929	type NoMethod VideoGetRatingResponse
8930	raw := NoMethod(*s)
8931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8932}
8933
8934type VideoListResponse struct {
8935	// Etag: Etag of this resource.
8936	Etag string `json:"etag,omitempty"`
8937
8938	// EventId: Serialized EventId of the request which produced this
8939	// response.
8940	EventId string `json:"eventId,omitempty"`
8941
8942	// Items: A list of videos that match the request criteria.
8943	Items []*Video `json:"items,omitempty"`
8944
8945	// Kind: Identifies what kind of resource this is. Value: the fixed
8946	// string "youtube#videoListResponse".
8947	Kind string `json:"kind,omitempty"`
8948
8949	// NextPageToken: The token that can be used as the value of the
8950	// pageToken parameter to retrieve the next page in the result set.
8951	NextPageToken string `json:"nextPageToken,omitempty"`
8952
8953	PageInfo *PageInfo `json:"pageInfo,omitempty"`
8954
8955	// PrevPageToken: The token that can be used as the value of the
8956	// pageToken parameter to retrieve the previous page in the result set.
8957	PrevPageToken string `json:"prevPageToken,omitempty"`
8958
8959	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
8960
8961	// VisitorId: The visitorId identifies the visitor.
8962	VisitorId string `json:"visitorId,omitempty"`
8963
8964	// ServerResponse contains the HTTP response code and headers from the
8965	// server.
8966	googleapi.ServerResponse `json:"-"`
8967
8968	// ForceSendFields is a list of field names (e.g. "Etag") to
8969	// unconditionally include in API requests. By default, fields with
8970	// empty values are omitted from API requests. However, any non-pointer,
8971	// non-interface field appearing in ForceSendFields will be sent to the
8972	// server regardless of whether the field is empty or not. This may be
8973	// used to include empty fields in Patch requests.
8974	ForceSendFields []string `json:"-"`
8975
8976	// NullFields is a list of field names (e.g. "Etag") to include in API
8977	// requests with the JSON null value. By default, fields with empty
8978	// values are omitted from API requests. However, any field with an
8979	// empty value appearing in NullFields will be sent to the server as
8980	// null. It is an error if a field in this list has a non-empty value.
8981	// This may be used to include null fields in Patch requests.
8982	NullFields []string `json:"-"`
8983}
8984
8985func (s *VideoListResponse) MarshalJSON() ([]byte, error) {
8986	type NoMethod VideoListResponse
8987	raw := NoMethod(*s)
8988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8989}
8990
8991// VideoLiveStreamingDetails: Details about the live streaming metadata.
8992type VideoLiveStreamingDetails struct {
8993	// ActiveLiveChatId: The ID of the currently active live chat attached
8994	// to this video. This field is filled only if the video is a currently
8995	// live broadcast that has live chat. Once the broadcast transitions to
8996	// complete this field will be removed and the live chat closed down.
8997	// For persistent broadcasts that live chat id will no longer be tied to
8998	// this video but rather to the new video being displayed at the
8999	// persistent page.
9000	ActiveLiveChatId string `json:"activeLiveChatId,omitempty"`
9001
9002	// ActualEndTime: The time that the broadcast actually ended. The value
9003	// is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. This value
9004	// will not be available until the broadcast is over.
9005	ActualEndTime string `json:"actualEndTime,omitempty"`
9006
9007	// ActualStartTime: The time that the broadcast actually started. The
9008	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. This
9009	// value will not be available until the broadcast begins.
9010	ActualStartTime string `json:"actualStartTime,omitempty"`
9011
9012	// ConcurrentViewers: The number of viewers currently watching the
9013	// broadcast. The property and its value will be present if the
9014	// broadcast has current viewers and the broadcast owner has not hidden
9015	// the viewcount for the video. Note that YouTube stops tracking the
9016	// number of concurrent viewers for a broadcast when the broadcast ends.
9017	// So, this property would not identify the number of viewers watching
9018	// an archived video of a live broadcast that already ended.
9019	ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"`
9020
9021	// ScheduledEndTime: The time that the broadcast is scheduled to end.
9022	// The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
9023	// If the value is empty or the property is not present, then the
9024	// broadcast is scheduled to continue indefinitely.
9025	ScheduledEndTime string `json:"scheduledEndTime,omitempty"`
9026
9027	// ScheduledStartTime: The time that the broadcast is scheduled to
9028	// begin. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ)
9029	// format.
9030	ScheduledStartTime string `json:"scheduledStartTime,omitempty"`
9031
9032	// ForceSendFields is a list of field names (e.g. "ActiveLiveChatId") to
9033	// unconditionally include in API requests. By default, fields with
9034	// empty values are omitted from API requests. However, any non-pointer,
9035	// non-interface field appearing in ForceSendFields will be sent to the
9036	// server regardless of whether the field is empty or not. This may be
9037	// used to include empty fields in Patch requests.
9038	ForceSendFields []string `json:"-"`
9039
9040	// NullFields is a list of field names (e.g. "ActiveLiveChatId") to
9041	// include in API requests with the JSON null value. By default, fields
9042	// with empty values are omitted from API requests. However, any field
9043	// with an empty value appearing in NullFields will be sent to the
9044	// server as null. It is an error if a field in this list has a
9045	// non-empty value. This may be used to include null fields in Patch
9046	// requests.
9047	NullFields []string `json:"-"`
9048}
9049
9050func (s *VideoLiveStreamingDetails) MarshalJSON() ([]byte, error) {
9051	type NoMethod VideoLiveStreamingDetails
9052	raw := NoMethod(*s)
9053	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9054}
9055
9056// VideoLocalization: Localized versions of certain video properties
9057// (e.g. title).
9058type VideoLocalization struct {
9059	// Description: Localized version of the video's description.
9060	Description string `json:"description,omitempty"`
9061
9062	// Title: Localized version of the video's title.
9063	Title string `json:"title,omitempty"`
9064
9065	// ForceSendFields is a list of field names (e.g. "Description") to
9066	// unconditionally include in API requests. By default, fields with
9067	// empty values are omitted from API requests. However, any non-pointer,
9068	// non-interface field appearing in ForceSendFields will be sent to the
9069	// server regardless of whether the field is empty or not. This may be
9070	// used to include empty fields in Patch requests.
9071	ForceSendFields []string `json:"-"`
9072
9073	// NullFields is a list of field names (e.g. "Description") to include
9074	// in API requests with the JSON null value. By default, fields with
9075	// empty values are omitted from API requests. However, any field with
9076	// an empty value appearing in NullFields will be sent to the server as
9077	// null. It is an error if a field in this list has a non-empty value.
9078	// This may be used to include null fields in Patch requests.
9079	NullFields []string `json:"-"`
9080}
9081
9082func (s *VideoLocalization) MarshalJSON() ([]byte, error) {
9083	type NoMethod VideoLocalization
9084	raw := NoMethod(*s)
9085	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9086}
9087
9088// VideoMonetizationDetails: Details about monetization of a YouTube
9089// Video.
9090type VideoMonetizationDetails struct {
9091	// Access: The value of access indicates whether the video can be
9092	// monetized or not.
9093	Access *AccessPolicy `json:"access,omitempty"`
9094
9095	// ForceSendFields is a list of field names (e.g. "Access") to
9096	// unconditionally include in API requests. By default, fields with
9097	// empty values are omitted from API requests. However, any non-pointer,
9098	// non-interface field appearing in ForceSendFields will be sent to the
9099	// server regardless of whether the field is empty or not. This may be
9100	// used to include empty fields in Patch requests.
9101	ForceSendFields []string `json:"-"`
9102
9103	// NullFields is a list of field names (e.g. "Access") to include in API
9104	// requests with the JSON null value. By default, fields with empty
9105	// values are omitted from API requests. However, any field with an
9106	// empty value appearing in NullFields will be sent to the server as
9107	// null. It is an error if a field in this list has a non-empty value.
9108	// This may be used to include null fields in Patch requests.
9109	NullFields []string `json:"-"`
9110}
9111
9112func (s *VideoMonetizationDetails) MarshalJSON() ([]byte, error) {
9113	type NoMethod VideoMonetizationDetails
9114	raw := NoMethod(*s)
9115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9116}
9117
9118// VideoPlayer: Player to be used for a video playback.
9119type VideoPlayer struct {
9120	EmbedHeight int64 `json:"embedHeight,omitempty,string"`
9121
9122	// EmbedHtml: An <iframe> tag that embeds a player that will play the
9123	// video.
9124	EmbedHtml string `json:"embedHtml,omitempty"`
9125
9126	// EmbedWidth: The embed width
9127	EmbedWidth int64 `json:"embedWidth,omitempty,string"`
9128
9129	// ForceSendFields is a list of field names (e.g. "EmbedHeight") to
9130	// unconditionally include in API requests. By default, fields with
9131	// empty values are omitted from API requests. However, any non-pointer,
9132	// non-interface field appearing in ForceSendFields will be sent to the
9133	// server regardless of whether the field is empty or not. This may be
9134	// used to include empty fields in Patch requests.
9135	ForceSendFields []string `json:"-"`
9136
9137	// NullFields is a list of field names (e.g. "EmbedHeight") to include
9138	// in API requests with the JSON null value. By default, fields with
9139	// empty values are omitted from API requests. However, any field with
9140	// an empty value appearing in NullFields will be sent to the server as
9141	// null. It is an error if a field in this list has a non-empty value.
9142	// This may be used to include null fields in Patch requests.
9143	NullFields []string `json:"-"`
9144}
9145
9146func (s *VideoPlayer) MarshalJSON() ([]byte, error) {
9147	type NoMethod VideoPlayer
9148	raw := NoMethod(*s)
9149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9150}
9151
9152// VideoProcessingDetails: Describes processing status and progress and
9153// availability of some other Video resource parts.
9154type VideoProcessingDetails struct {
9155	// EditorSuggestionsAvailability: This value indicates whether video
9156	// editing suggestions, which might improve video quality or the
9157	// playback experience, are available for the video. You can retrieve
9158	// these suggestions by requesting the suggestions part in your
9159	// videos.list() request.
9160	EditorSuggestionsAvailability string `json:"editorSuggestionsAvailability,omitempty"`
9161
9162	// FileDetailsAvailability: This value indicates whether file details
9163	// are available for the uploaded video. You can retrieve a video's file
9164	// details by requesting the fileDetails part in your videos.list()
9165	// request.
9166	FileDetailsAvailability string `json:"fileDetailsAvailability,omitempty"`
9167
9168	// ProcessingFailureReason: The reason that YouTube failed to process
9169	// the video. This property will only have a value if the
9170	// processingStatus property's value is failed.
9171	//
9172	// Possible values:
9173	//   "other"
9174	//   "streamingFailed"
9175	//   "transcodeFailed"
9176	//   "uploadFailed"
9177	ProcessingFailureReason string `json:"processingFailureReason,omitempty"`
9178
9179	// ProcessingIssuesAvailability: This value indicates whether the video
9180	// processing engine has generated suggestions that might improve
9181	// YouTube's ability to process the the video, warnings that explain
9182	// video processing problems, or errors that cause video processing
9183	// problems. You can retrieve these suggestions by requesting the
9184	// suggestions part in your videos.list() request.
9185	ProcessingIssuesAvailability string `json:"processingIssuesAvailability,omitempty"`
9186
9187	// ProcessingProgress: The processingProgress object contains
9188	// information about the progress YouTube has made in processing the
9189	// video. The values are really only relevant if the video's processing
9190	// status is processing.
9191	ProcessingProgress *VideoProcessingDetailsProcessingProgress `json:"processingProgress,omitempty"`
9192
9193	// ProcessingStatus: The video's processing status. This value indicates
9194	// whether YouTube was able to process the video or if the video is
9195	// still being processed.
9196	//
9197	// Possible values:
9198	//   "failed"
9199	//   "processing"
9200	//   "succeeded"
9201	//   "terminated"
9202	ProcessingStatus string `json:"processingStatus,omitempty"`
9203
9204	// TagSuggestionsAvailability: This value indicates whether keyword
9205	// (tag) suggestions are available for the video. Tags can be added to a
9206	// video's metadata to make it easier for other users to find the video.
9207	// You can retrieve these suggestions by requesting the suggestions part
9208	// in your videos.list() request.
9209	TagSuggestionsAvailability string `json:"tagSuggestionsAvailability,omitempty"`
9210
9211	// ThumbnailsAvailability: This value indicates whether thumbnail images
9212	// have been generated for the video.
9213	ThumbnailsAvailability string `json:"thumbnailsAvailability,omitempty"`
9214
9215	// ForceSendFields is a list of field names (e.g.
9216	// "EditorSuggestionsAvailability") to unconditionally include in API
9217	// requests. By default, fields with empty values are omitted from API
9218	// requests. However, any non-pointer, non-interface field appearing in
9219	// ForceSendFields will be sent to the server regardless of whether the
9220	// field is empty or not. This may be used to include empty fields in
9221	// Patch requests.
9222	ForceSendFields []string `json:"-"`
9223
9224	// NullFields is a list of field names (e.g.
9225	// "EditorSuggestionsAvailability") to include in API requests with the
9226	// JSON null value. By default, fields with empty values are omitted
9227	// from API requests. However, any field with an empty value appearing
9228	// in NullFields will be sent to the server as null. It is an error if a
9229	// field in this list has a non-empty value. This may be used to include
9230	// null fields in Patch requests.
9231	NullFields []string `json:"-"`
9232}
9233
9234func (s *VideoProcessingDetails) MarshalJSON() ([]byte, error) {
9235	type NoMethod VideoProcessingDetails
9236	raw := NoMethod(*s)
9237	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9238}
9239
9240// VideoProcessingDetailsProcessingProgress: Video processing progress
9241// and completion time estimate.
9242type VideoProcessingDetailsProcessingProgress struct {
9243	// PartsProcessed: The number of parts of the video that YouTube has
9244	// already processed. You can estimate the percentage of the video that
9245	// YouTube has already processed by calculating:
9246	// 100 * parts_processed / parts_total
9247	//
9248	// Note that since the estimated number of parts could increase without
9249	// a corresponding increase in the number of parts that have already
9250	// been processed, it is possible that the calculated progress could
9251	// periodically decrease while YouTube processes a video.
9252	PartsProcessed uint64 `json:"partsProcessed,omitempty,string"`
9253
9254	// PartsTotal: An estimate of the total number of parts that need to be
9255	// processed for the video. The number may be updated with more precise
9256	// estimates while YouTube processes the video.
9257	PartsTotal uint64 `json:"partsTotal,omitempty,string"`
9258
9259	// TimeLeftMs: An estimate of the amount of time, in millseconds, that
9260	// YouTube needs to finish processing the video.
9261	TimeLeftMs uint64 `json:"timeLeftMs,omitempty,string"`
9262
9263	// ForceSendFields is a list of field names (e.g. "PartsProcessed") to
9264	// unconditionally include in API requests. By default, fields with
9265	// empty values are omitted from API requests. However, any non-pointer,
9266	// non-interface field appearing in ForceSendFields will be sent to the
9267	// server regardless of whether the field is empty or not. This may be
9268	// used to include empty fields in Patch requests.
9269	ForceSendFields []string `json:"-"`
9270
9271	// NullFields is a list of field names (e.g. "PartsProcessed") to
9272	// include in API requests with the JSON null value. By default, fields
9273	// with empty values are omitted from API requests. However, any field
9274	// with an empty value appearing in NullFields will be sent to the
9275	// server as null. It is an error if a field in this list has a
9276	// non-empty value. This may be used to include null fields in Patch
9277	// requests.
9278	NullFields []string `json:"-"`
9279}
9280
9281func (s *VideoProcessingDetailsProcessingProgress) MarshalJSON() ([]byte, error) {
9282	type NoMethod VideoProcessingDetailsProcessingProgress
9283	raw := NoMethod(*s)
9284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9285}
9286
9287// VideoProjectDetails: Project specific details about the content of a
9288// YouTube Video.
9289type VideoProjectDetails struct {
9290	// Tags: A list of project tags associated with the video during the
9291	// upload.
9292	Tags []string `json:"tags,omitempty"`
9293
9294	// ForceSendFields is a list of field names (e.g. "Tags") to
9295	// unconditionally include in API requests. By default, fields with
9296	// empty values are omitted from API requests. However, any non-pointer,
9297	// non-interface field appearing in ForceSendFields will be sent to the
9298	// server regardless of whether the field is empty or not. This may be
9299	// used to include empty fields in Patch requests.
9300	ForceSendFields []string `json:"-"`
9301
9302	// NullFields is a list of field names (e.g. "Tags") to include in API
9303	// requests with the JSON null value. By default, fields with empty
9304	// values are omitted from API requests. However, any field with an
9305	// empty value appearing in NullFields will be sent to the server as
9306	// null. It is an error if a field in this list has a non-empty value.
9307	// This may be used to include null fields in Patch requests.
9308	NullFields []string `json:"-"`
9309}
9310
9311func (s *VideoProjectDetails) MarshalJSON() ([]byte, error) {
9312	type NoMethod VideoProjectDetails
9313	raw := NoMethod(*s)
9314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9315}
9316
9317type VideoRating struct {
9318	// Possible values:
9319	//   "dislike"
9320	//   "like"
9321	//   "none"
9322	//   "unspecified"
9323	Rating string `json:"rating,omitempty"`
9324
9325	VideoId string `json:"videoId,omitempty"`
9326
9327	// ForceSendFields is a list of field names (e.g. "Rating") to
9328	// unconditionally include in API requests. By default, fields with
9329	// empty values are omitted from API requests. However, any non-pointer,
9330	// non-interface field appearing in ForceSendFields will be sent to the
9331	// server regardless of whether the field is empty or not. This may be
9332	// used to include empty fields in Patch requests.
9333	ForceSendFields []string `json:"-"`
9334
9335	// NullFields is a list of field names (e.g. "Rating") to include in API
9336	// requests with the JSON null value. By default, fields with empty
9337	// values are omitted from API requests. However, any field with an
9338	// empty value appearing in NullFields will be sent to the server as
9339	// null. It is an error if a field in this list has a non-empty value.
9340	// This may be used to include null fields in Patch requests.
9341	NullFields []string `json:"-"`
9342}
9343
9344func (s *VideoRating) MarshalJSON() ([]byte, error) {
9345	type NoMethod VideoRating
9346	raw := NoMethod(*s)
9347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9348}
9349
9350// VideoRecordingDetails: Recording information associated with the
9351// video.
9352type VideoRecordingDetails struct {
9353	// Location: The geolocation information associated with the video.
9354	Location *GeoPoint `json:"location,omitempty"`
9355
9356	// LocationDescription: The text description of the location where the
9357	// video was recorded.
9358	LocationDescription string `json:"locationDescription,omitempty"`
9359
9360	// RecordingDate: The date and time when the video was recorded. The
9361	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ) format.
9362	RecordingDate string `json:"recordingDate,omitempty"`
9363
9364	// ForceSendFields is a list of field names (e.g. "Location") to
9365	// unconditionally include in API requests. By default, fields with
9366	// empty values are omitted from API requests. However, any non-pointer,
9367	// non-interface field appearing in ForceSendFields will be sent to the
9368	// server regardless of whether the field is empty or not. This may be
9369	// used to include empty fields in Patch requests.
9370	ForceSendFields []string `json:"-"`
9371
9372	// NullFields is a list of field names (e.g. "Location") to include in
9373	// API requests with the JSON null value. By default, fields with empty
9374	// values are omitted from API requests. However, any field with an
9375	// empty value appearing in NullFields will be sent to the server as
9376	// null. It is an error if a field in this list has a non-empty value.
9377	// This may be used to include null fields in Patch requests.
9378	NullFields []string `json:"-"`
9379}
9380
9381func (s *VideoRecordingDetails) MarshalJSON() ([]byte, error) {
9382	type NoMethod VideoRecordingDetails
9383	raw := NoMethod(*s)
9384	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9385}
9386
9387// VideoSnippet: Basic details about a video, including title,
9388// description, uploader, thumbnails and category.
9389type VideoSnippet struct {
9390	// CategoryId: The YouTube video category associated with the video.
9391	CategoryId string `json:"categoryId,omitempty"`
9392
9393	// ChannelId: The ID that YouTube uses to uniquely identify the channel
9394	// that the video was uploaded to.
9395	ChannelId string `json:"channelId,omitempty"`
9396
9397	// ChannelTitle: Channel title for the channel that the video belongs
9398	// to.
9399	ChannelTitle string `json:"channelTitle,omitempty"`
9400
9401	// DefaultAudioLanguage: The default_audio_language property specifies
9402	// the language spoken in the video's default audio track.
9403	DefaultAudioLanguage string `json:"defaultAudioLanguage,omitempty"`
9404
9405	// DefaultLanguage: The language of the videos's default snippet.
9406	DefaultLanguage string `json:"defaultLanguage,omitempty"`
9407
9408	// Description: The video's description.
9409	Description string `json:"description,omitempty"`
9410
9411	// LiveBroadcastContent: Indicates if the video is an upcoming/active
9412	// live broadcast. Or it's "none" if the video is not an upcoming/active
9413	// live broadcast.
9414	//
9415	// Possible values:
9416	//   "live"
9417	//   "none"
9418	//   "upcoming"
9419	LiveBroadcastContent string `json:"liveBroadcastContent,omitempty"`
9420
9421	// Localized: Localized snippet selected with the hl parameter. If no
9422	// such localization exists, this field is populated with the default
9423	// snippet. (Read-only)
9424	Localized *VideoLocalization `json:"localized,omitempty"`
9425
9426	// PublishedAt: The date and time that the video was uploaded. The value
9427	// is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
9428	PublishedAt string `json:"publishedAt,omitempty"`
9429
9430	// Tags: A list of keyword tags associated with the video. Tags may
9431	// contain spaces.
9432	Tags []string `json:"tags,omitempty"`
9433
9434	// Thumbnails: A map of thumbnail images associated with the video. For
9435	// each object in the map, the key is the name of the thumbnail image,
9436	// and the value is an object that contains other information about the
9437	// thumbnail.
9438	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
9439
9440	// Title: The video's title.
9441	Title string `json:"title,omitempty"`
9442
9443	// ForceSendFields is a list of field names (e.g. "CategoryId") to
9444	// unconditionally include in API requests. By default, fields with
9445	// empty values are omitted from API requests. However, any non-pointer,
9446	// non-interface field appearing in ForceSendFields will be sent to the
9447	// server regardless of whether the field is empty or not. This may be
9448	// used to include empty fields in Patch requests.
9449	ForceSendFields []string `json:"-"`
9450
9451	// NullFields is a list of field names (e.g. "CategoryId") to include in
9452	// API requests with the JSON null value. By default, fields with empty
9453	// values are omitted from API requests. However, any field with an
9454	// empty value appearing in NullFields will be sent to the server as
9455	// null. It is an error if a field in this list has a non-empty value.
9456	// This may be used to include null fields in Patch requests.
9457	NullFields []string `json:"-"`
9458}
9459
9460func (s *VideoSnippet) MarshalJSON() ([]byte, error) {
9461	type NoMethod VideoSnippet
9462	raw := NoMethod(*s)
9463	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9464}
9465
9466// VideoStatistics: Statistics about the video, such as the number of
9467// times the video was viewed or liked.
9468type VideoStatistics struct {
9469	// CommentCount: The number of comments for the video.
9470	CommentCount uint64 `json:"commentCount,omitempty,string"`
9471
9472	// DislikeCount: The number of users who have indicated that they
9473	// disliked the video by giving it a negative rating.
9474	DislikeCount uint64 `json:"dislikeCount,omitempty,string"`
9475
9476	// FavoriteCount: The number of users who currently have the video
9477	// marked as a favorite video.
9478	FavoriteCount uint64 `json:"favoriteCount,omitempty,string"`
9479
9480	// LikeCount: The number of users who have indicated that they liked the
9481	// video by giving it a positive rating.
9482	LikeCount uint64 `json:"likeCount,omitempty,string"`
9483
9484	// ViewCount: The number of times the video has been viewed.
9485	ViewCount uint64 `json:"viewCount,omitempty,string"`
9486
9487	// ForceSendFields is a list of field names (e.g. "CommentCount") to
9488	// unconditionally include in API requests. By default, fields with
9489	// empty values are omitted from API requests. However, any non-pointer,
9490	// non-interface field appearing in ForceSendFields will be sent to the
9491	// server regardless of whether the field is empty or not. This may be
9492	// used to include empty fields in Patch requests.
9493	ForceSendFields []string `json:"-"`
9494
9495	// NullFields is a list of field names (e.g. "CommentCount") to include
9496	// in API requests with the JSON null value. By default, fields with
9497	// empty values are omitted from API requests. However, any field with
9498	// an empty value appearing in NullFields will be sent to the server as
9499	// null. It is an error if a field in this list has a non-empty value.
9500	// This may be used to include null fields in Patch requests.
9501	NullFields []string `json:"-"`
9502}
9503
9504func (s *VideoStatistics) MarshalJSON() ([]byte, error) {
9505	type NoMethod VideoStatistics
9506	raw := NoMethod(*s)
9507	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9508}
9509
9510// VideoStatus: Basic details about a video category, such as its
9511// localized title.
9512type VideoStatus struct {
9513	// Embeddable: This value indicates if the video can be embedded on
9514	// another website.
9515	Embeddable bool `json:"embeddable,omitempty"`
9516
9517	// FailureReason: This value explains why a video failed to upload. This
9518	// property is only present if the uploadStatus property indicates that
9519	// the upload failed.
9520	//
9521	// Possible values:
9522	//   "codec"
9523	//   "conversion"
9524	//   "emptyFile"
9525	//   "invalidFile"
9526	//   "tooSmall"
9527	//   "uploadAborted"
9528	FailureReason string `json:"failureReason,omitempty"`
9529
9530	// License: The video's license.
9531	//
9532	// Possible values:
9533	//   "creativeCommon"
9534	//   "youtube"
9535	License string `json:"license,omitempty"`
9536
9537	// PrivacyStatus: The video's privacy status.
9538	//
9539	// Possible values:
9540	//   "private"
9541	//   "public"
9542	//   "unlisted"
9543	//   "unlisted_new"
9544	PrivacyStatus string `json:"privacyStatus,omitempty"`
9545
9546	// PublicStatsViewable: This value indicates if the extended video
9547	// statistics on the watch page can be viewed by everyone. Note that the
9548	// view count, likes, etc will still be visible if this is disabled.
9549	PublicStatsViewable bool `json:"publicStatsViewable,omitempty"`
9550
9551	// PublishAt: The date and time when the video is scheduled to publish.
9552	// It can be set only if the privacy status of the video is private. The
9553	// value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
9554	PublishAt string `json:"publishAt,omitempty"`
9555
9556	// RejectionReason: This value explains why YouTube rejected an uploaded
9557	// video. This property is only present if the uploadStatus property
9558	// indicates that the upload was rejected.
9559	//
9560	// Possible values:
9561	//   "claim"
9562	//   "copyright"
9563	//   "duplicate"
9564	//   "inappropriate"
9565	//   "legal"
9566	//   "length"
9567	//   "termsOfUse"
9568	//   "trademark"
9569	//   "uploaderAccountClosed"
9570	//   "uploaderAccountSuspended"
9571	RejectionReason string `json:"rejectionReason,omitempty"`
9572
9573	// UploadStatus: The status of the uploaded video.
9574	//
9575	// Possible values:
9576	//   "deleted"
9577	//   "failed"
9578	//   "processed"
9579	//   "rejected"
9580	//   "uploaded"
9581	UploadStatus string `json:"uploadStatus,omitempty"`
9582
9583	// ForceSendFields is a list of field names (e.g. "Embeddable") to
9584	// unconditionally include in API requests. By default, fields with
9585	// empty values are omitted from API requests. However, any non-pointer,
9586	// non-interface field appearing in ForceSendFields will be sent to the
9587	// server regardless of whether the field is empty or not. This may be
9588	// used to include empty fields in Patch requests.
9589	ForceSendFields []string `json:"-"`
9590
9591	// NullFields is a list of field names (e.g. "Embeddable") to include in
9592	// API requests with the JSON null value. By default, fields with empty
9593	// values are omitted from API requests. However, any field with an
9594	// empty value appearing in NullFields will be sent to the server as
9595	// null. It is an error if a field in this list has a non-empty value.
9596	// This may be used to include null fields in Patch requests.
9597	NullFields []string `json:"-"`
9598}
9599
9600func (s *VideoStatus) MarshalJSON() ([]byte, error) {
9601	type NoMethod VideoStatus
9602	raw := NoMethod(*s)
9603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9604}
9605
9606// VideoSuggestions: Specifies suggestions on how to improve video
9607// content, including encoding hints, tag suggestions, and editor
9608// suggestions.
9609type VideoSuggestions struct {
9610	// EditorSuggestions: A list of video editing operations that might
9611	// improve the video quality or playback experience of the uploaded
9612	// video.
9613	//
9614	// Possible values:
9615	//   "audioQuietAudioSwap"
9616	//   "videoAutoLevels"
9617	//   "videoCrop"
9618	//   "videoStabilize"
9619	EditorSuggestions []string `json:"editorSuggestions,omitempty"`
9620
9621	// ProcessingErrors: A list of errors that will prevent YouTube from
9622	// successfully processing the uploaded video video. These errors
9623	// indicate that, regardless of the video's current processing status,
9624	// eventually, that status will almost certainly be failed.
9625	//
9626	// Possible values:
9627	//   "archiveFile"
9628	//   "audioFile"
9629	//   "docFile"
9630	//   "imageFile"
9631	//   "notAVideoFile"
9632	//   "projectFile"
9633	//   "unsupportedSpatialAudioLayout"
9634	ProcessingErrors []string `json:"processingErrors,omitempty"`
9635
9636	// ProcessingHints: A list of suggestions that may improve YouTube's
9637	// ability to process the video.
9638	//
9639	// Possible values:
9640	//   "hdrVideo"
9641	//   "nonStreamableMov"
9642	//   "sendBestQualityVideo"
9643	//   "spatialAudio"
9644	//   "sphericalVideo"
9645	//   "vrVideo"
9646	ProcessingHints []string `json:"processingHints,omitempty"`
9647
9648	// ProcessingWarnings: A list of reasons why YouTube may have difficulty
9649	// transcoding the uploaded video or that might result in an erroneous
9650	// transcoding. These warnings are generated before YouTube actually
9651	// processes the uploaded video file. In addition, they identify issues
9652	// that are unlikely to cause the video processing to fail but that
9653	// might cause problems such as sync issues, video artifacts, or a
9654	// missing audio track.
9655	//
9656	// Possible values:
9657	//   "hasEditlist"
9658	//   "inconsistentResolution"
9659	//   "problematicAudioCodec"
9660	//   "problematicHdrLookupTable"
9661	//   "problematicVideoCodec"
9662	//   "unknownAudioCodec"
9663	//   "unknownContainer"
9664	//   "unknownVideoCodec"
9665	//   "unsupportedHdrColorMetadata"
9666	//   "unsupportedHdrPixelFormat"
9667	//   "unsupportedSphericalProjectionType"
9668	//   "unsupportedVrStereoMode"
9669	ProcessingWarnings []string `json:"processingWarnings,omitempty"`
9670
9671	// TagSuggestions: A list of keyword tags that could be added to the
9672	// video's metadata to increase the likelihood that users will locate
9673	// your video when searching or browsing on YouTube.
9674	TagSuggestions []*VideoSuggestionsTagSuggestion `json:"tagSuggestions,omitempty"`
9675
9676	// ForceSendFields is a list of field names (e.g. "EditorSuggestions")
9677	// to unconditionally include in API requests. By default, fields with
9678	// empty values are omitted from API requests. However, any non-pointer,
9679	// non-interface field appearing in ForceSendFields will be sent to the
9680	// server regardless of whether the field is empty or not. This may be
9681	// used to include empty fields in Patch requests.
9682	ForceSendFields []string `json:"-"`
9683
9684	// NullFields is a list of field names (e.g. "EditorSuggestions") to
9685	// include in API requests with the JSON null value. By default, fields
9686	// with empty values are omitted from API requests. However, any field
9687	// with an empty value appearing in NullFields will be sent to the
9688	// server as null. It is an error if a field in this list has a
9689	// non-empty value. This may be used to include null fields in Patch
9690	// requests.
9691	NullFields []string `json:"-"`
9692}
9693
9694func (s *VideoSuggestions) MarshalJSON() ([]byte, error) {
9695	type NoMethod VideoSuggestions
9696	raw := NoMethod(*s)
9697	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9698}
9699
9700// VideoSuggestionsTagSuggestion: A single tag suggestion with it's
9701// relevance information.
9702type VideoSuggestionsTagSuggestion struct {
9703	// CategoryRestricts: A set of video categories for which the tag is
9704	// relevant. You can use this information to display appropriate tag
9705	// suggestions based on the video category that the video uploader
9706	// associates with the video. By default, tag suggestions are relevant
9707	// for all categories if there are no restricts defined for the keyword.
9708	CategoryRestricts []string `json:"categoryRestricts,omitempty"`
9709
9710	// Tag: The keyword tag suggested for the video.
9711	Tag string `json:"tag,omitempty"`
9712
9713	// ForceSendFields is a list of field names (e.g. "CategoryRestricts")
9714	// to unconditionally include in API requests. By default, fields with
9715	// empty values are omitted from API requests. However, any non-pointer,
9716	// non-interface field appearing in ForceSendFields will be sent to the
9717	// server regardless of whether the field is empty or not. This may be
9718	// used to include empty fields in Patch requests.
9719	ForceSendFields []string `json:"-"`
9720
9721	// NullFields is a list of field names (e.g. "CategoryRestricts") to
9722	// include in API requests with the JSON null value. By default, fields
9723	// with empty values are omitted from API requests. However, any field
9724	// with an empty value appearing in NullFields will be sent to the
9725	// server as null. It is an error if a field in this list has a
9726	// non-empty value. This may be used to include null fields in Patch
9727	// requests.
9728	NullFields []string `json:"-"`
9729}
9730
9731func (s *VideoSuggestionsTagSuggestion) MarshalJSON() ([]byte, error) {
9732	type NoMethod VideoSuggestionsTagSuggestion
9733	raw := NoMethod(*s)
9734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9735}
9736
9737// VideoTopicDetails: Freebase topic information related to the video.
9738type VideoTopicDetails struct {
9739	// RelevantTopicIds: Similar to topic_id, except that these topics are
9740	// merely relevant to the video. These are topics that may be mentioned
9741	// in, or appear in the video. You can retrieve information about each
9742	// topic using Freebase Topic API.
9743	RelevantTopicIds []string `json:"relevantTopicIds,omitempty"`
9744
9745	// TopicCategories: A list of Wikipedia URLs that provide a high-level
9746	// description of the video's content.
9747	TopicCategories []string `json:"topicCategories,omitempty"`
9748
9749	// TopicIds: A list of Freebase topic IDs that are centrally associated
9750	// with the video. These are topics that are centrally featured in the
9751	// video, and it can be said that the video is mainly about each of
9752	// these. You can retrieve information about each topic using the
9753	// Freebase Topic API.
9754	TopicIds []string `json:"topicIds,omitempty"`
9755
9756	// ForceSendFields is a list of field names (e.g. "RelevantTopicIds") to
9757	// unconditionally include in API requests. By default, fields with
9758	// empty values are omitted from API requests. However, any non-pointer,
9759	// non-interface field appearing in ForceSendFields will be sent to the
9760	// server regardless of whether the field is empty or not. This may be
9761	// used to include empty fields in Patch requests.
9762	ForceSendFields []string `json:"-"`
9763
9764	// NullFields is a list of field names (e.g. "RelevantTopicIds") to
9765	// include in API requests with the JSON null value. By default, fields
9766	// with empty values are omitted from API requests. However, any field
9767	// with an empty value appearing in NullFields will be sent to the
9768	// server as null. It is an error if a field in this list has a
9769	// non-empty value. This may be used to include null fields in Patch
9770	// requests.
9771	NullFields []string `json:"-"`
9772}
9773
9774func (s *VideoTopicDetails) MarshalJSON() ([]byte, error) {
9775	type NoMethod VideoTopicDetails
9776	raw := NoMethod(*s)
9777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9778}
9779
9780// WatchSettings: Branding properties for the watch. All deprecated.
9781type WatchSettings struct {
9782	// BackgroundColor: The text color for the video watch page's branded
9783	// area.
9784	BackgroundColor string `json:"backgroundColor,omitempty"`
9785
9786	// FeaturedPlaylistId: An ID that uniquely identifies a playlist that
9787	// displays next to the video player.
9788	FeaturedPlaylistId string `json:"featuredPlaylistId,omitempty"`
9789
9790	// TextColor: The background color for the video watch page's branded
9791	// area.
9792	TextColor string `json:"textColor,omitempty"`
9793
9794	// ForceSendFields is a list of field names (e.g. "BackgroundColor") to
9795	// unconditionally include in API requests. By default, fields with
9796	// empty values are omitted from API requests. However, any non-pointer,
9797	// non-interface field appearing in ForceSendFields will be sent to the
9798	// server regardless of whether the field is empty or not. This may be
9799	// used to include empty fields in Patch requests.
9800	ForceSendFields []string `json:"-"`
9801
9802	// NullFields is a list of field names (e.g. "BackgroundColor") to
9803	// include in API requests with the JSON null value. By default, fields
9804	// with empty values are omitted from API requests. However, any field
9805	// with an empty value appearing in NullFields will be sent to the
9806	// server as null. It is an error if a field in this list has a
9807	// non-empty value. This may be used to include null fields in Patch
9808	// requests.
9809	NullFields []string `json:"-"`
9810}
9811
9812func (s *WatchSettings) MarshalJSON() ([]byte, error) {
9813	type NoMethod WatchSettings
9814	raw := NoMethod(*s)
9815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9816}
9817
9818// method id "youtube.activities.insert":
9819
9820type ActivitiesInsertCall struct {
9821	s          *Service
9822	activity   *Activity
9823	urlParams_ gensupport.URLParams
9824	ctx_       context.Context
9825	header_    http.Header
9826}
9827
9828// Insert: Posts a bulletin for a specific channel. (The user submitting
9829// the request must be authorized to act on the channel's
9830// behalf.)
9831//
9832// Note: Even though an activity resource can contain information about
9833// actions like a user rating a video or marking a video as a favorite,
9834// you need to use other API methods to generate those activity
9835// resources. For example, you would use the API's videos.rate() method
9836// to rate a video and the playlistItems.insert() method to mark a video
9837// as a favorite.
9838func (r *ActivitiesService) Insert(part string, activity *Activity) *ActivitiesInsertCall {
9839	c := &ActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9840	c.urlParams_.Set("part", part)
9841	c.activity = activity
9842	return c
9843}
9844
9845// Fields allows partial responses to be retrieved. See
9846// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9847// for more information.
9848func (c *ActivitiesInsertCall) Fields(s ...googleapi.Field) *ActivitiesInsertCall {
9849	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9850	return c
9851}
9852
9853// Context sets the context to be used in this call's Do method. Any
9854// pending HTTP request will be aborted if the provided context is
9855// canceled.
9856func (c *ActivitiesInsertCall) Context(ctx context.Context) *ActivitiesInsertCall {
9857	c.ctx_ = ctx
9858	return c
9859}
9860
9861// Header returns an http.Header that can be modified by the caller to
9862// add HTTP headers to the request.
9863func (c *ActivitiesInsertCall) Header() http.Header {
9864	if c.header_ == nil {
9865		c.header_ = make(http.Header)
9866	}
9867	return c.header_
9868}
9869
9870func (c *ActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
9871	reqHeaders := make(http.Header)
9872	for k, v := range c.header_ {
9873		reqHeaders[k] = v
9874	}
9875	reqHeaders.Set("User-Agent", c.s.userAgent())
9876	var body io.Reader = nil
9877	body, err := googleapi.WithoutDataWrapper.JSONReader(c.activity)
9878	if err != nil {
9879		return nil, err
9880	}
9881	reqHeaders.Set("Content-Type", "application/json")
9882	c.urlParams_.Set("alt", alt)
9883	c.urlParams_.Set("prettyPrint", "false")
9884	urls := googleapi.ResolveRelative(c.s.BasePath, "activities")
9885	urls += "?" + c.urlParams_.Encode()
9886	req, err := http.NewRequest("POST", urls, body)
9887	if err != nil {
9888		return nil, err
9889	}
9890	req.Header = reqHeaders
9891	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9892}
9893
9894// Do executes the "youtube.activities.insert" call.
9895// Exactly one of *Activity or error will be non-nil. Any non-2xx status
9896// code is an error. Response headers are in either
9897// *Activity.ServerResponse.Header or (if a response was returned at
9898// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9899// to check whether the returned error was because
9900// http.StatusNotModified was returned.
9901func (c *ActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*Activity, error) {
9902	gensupport.SetOptions(c.urlParams_, opts...)
9903	res, err := c.doRequest("json")
9904	if res != nil && res.StatusCode == http.StatusNotModified {
9905		if res.Body != nil {
9906			res.Body.Close()
9907		}
9908		return nil, &googleapi.Error{
9909			Code:   res.StatusCode,
9910			Header: res.Header,
9911		}
9912	}
9913	if err != nil {
9914		return nil, err
9915	}
9916	defer googleapi.CloseBody(res)
9917	if err := googleapi.CheckResponse(res); err != nil {
9918		return nil, err
9919	}
9920	ret := &Activity{
9921		ServerResponse: googleapi.ServerResponse{
9922			Header:         res.Header,
9923			HTTPStatusCode: res.StatusCode,
9924		},
9925	}
9926	target := &ret
9927	if err := gensupport.DecodeResponse(target, res); err != nil {
9928		return nil, err
9929	}
9930	return ret, nil
9931	// {
9932	//   "description": "Posts a bulletin for a specific channel. (The user submitting the request must be authorized to act on the channel's behalf.)\n\nNote: Even though an activity resource can contain information about actions like a user rating a video or marking a video as a favorite, you need to use other API methods to generate those activity resources. For example, you would use the API's videos.rate() method to rate a video and the playlistItems.insert() method to mark a video as a favorite.",
9933	//   "httpMethod": "POST",
9934	//   "id": "youtube.activities.insert",
9935	//   "parameterOrder": [
9936	//     "part"
9937	//   ],
9938	//   "parameters": {
9939	//     "part": {
9940	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.",
9941	//       "location": "query",
9942	//       "required": true,
9943	//       "type": "string"
9944	//     }
9945	//   },
9946	//   "path": "activities",
9947	//   "request": {
9948	//     "$ref": "Activity"
9949	//   },
9950	//   "response": {
9951	//     "$ref": "Activity"
9952	//   },
9953	//   "scopes": [
9954	//     "https://www.googleapis.com/auth/youtube",
9955	//     "https://www.googleapis.com/auth/youtube.force-ssl"
9956	//   ]
9957	// }
9958
9959}
9960
9961// method id "youtube.activities.list":
9962
9963type ActivitiesListCall struct {
9964	s            *Service
9965	urlParams_   gensupport.URLParams
9966	ifNoneMatch_ string
9967	ctx_         context.Context
9968	header_      http.Header
9969}
9970
9971// List: Returns a list of channel activity events that match the
9972// request criteria. For example, you can retrieve events associated
9973// with a particular channel, events associated with the user's
9974// subscriptions and Google+ friends, or the YouTube home page feed,
9975// which is customized for each user.
9976func (r *ActivitiesService) List(part string) *ActivitiesListCall {
9977	c := &ActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9978	c.urlParams_.Set("part", part)
9979	return c
9980}
9981
9982// ChannelId sets the optional parameter "channelId": The channelId
9983// parameter specifies a unique YouTube channel ID. The API will then
9984// return a list of that channel's activities.
9985func (c *ActivitiesListCall) ChannelId(channelId string) *ActivitiesListCall {
9986	c.urlParams_.Set("channelId", channelId)
9987	return c
9988}
9989
9990// Home sets the optional parameter "home": Set this parameter's value
9991// to true to retrieve the activity feed that displays on the YouTube
9992// home page for the currently authenticated user.
9993func (c *ActivitiesListCall) Home(home bool) *ActivitiesListCall {
9994	c.urlParams_.Set("home", fmt.Sprint(home))
9995	return c
9996}
9997
9998// MaxResults sets the optional parameter "maxResults": The maxResults
9999// parameter specifies the maximum number of items that should be
10000// returned in the result set.
10001func (c *ActivitiesListCall) MaxResults(maxResults int64) *ActivitiesListCall {
10002	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10003	return c
10004}
10005
10006// Mine sets the optional parameter "mine": Set this parameter's value
10007// to true to retrieve a feed of the authenticated user's activities.
10008func (c *ActivitiesListCall) Mine(mine bool) *ActivitiesListCall {
10009	c.urlParams_.Set("mine", fmt.Sprint(mine))
10010	return c
10011}
10012
10013// PageToken sets the optional parameter "pageToken": The pageToken
10014// parameter identifies a specific page in the result set that should be
10015// returned. In an API response, the nextPageToken and prevPageToken
10016// properties identify other pages that could be retrieved.
10017func (c *ActivitiesListCall) PageToken(pageToken string) *ActivitiesListCall {
10018	c.urlParams_.Set("pageToken", pageToken)
10019	return c
10020}
10021
10022// PublishedAfter sets the optional parameter "publishedAfter": The
10023// publishedAfter parameter specifies the earliest date and time that an
10024// activity could have occurred for that activity to be included in the
10025// API response. If the parameter value specifies a day, but not a time,
10026// then any activities that occurred that day will be included in the
10027// result set. The value is specified in ISO 8601
10028// (YYYY-MM-DDThh:mm:ss.sZ) format.
10029func (c *ActivitiesListCall) PublishedAfter(publishedAfter string) *ActivitiesListCall {
10030	c.urlParams_.Set("publishedAfter", publishedAfter)
10031	return c
10032}
10033
10034// PublishedBefore sets the optional parameter "publishedBefore": The
10035// publishedBefore parameter specifies the date and time before which an
10036// activity must have occurred for that activity to be included in the
10037// API response. If the parameter value specifies a day, but not a time,
10038// then any activities that occurred that day will be excluded from the
10039// result set. The value is specified in ISO 8601
10040// (YYYY-MM-DDThh:mm:ss.sZ) format.
10041func (c *ActivitiesListCall) PublishedBefore(publishedBefore string) *ActivitiesListCall {
10042	c.urlParams_.Set("publishedBefore", publishedBefore)
10043	return c
10044}
10045
10046// RegionCode sets the optional parameter "regionCode": The regionCode
10047// parameter instructs the API to return results for the specified
10048// country. The parameter value is an ISO 3166-1 alpha-2 country code.
10049// YouTube uses this value when the authorized user's previous activity
10050// on YouTube does not provide enough information to generate the
10051// activity feed.
10052func (c *ActivitiesListCall) RegionCode(regionCode string) *ActivitiesListCall {
10053	c.urlParams_.Set("regionCode", regionCode)
10054	return c
10055}
10056
10057// Fields allows partial responses to be retrieved. See
10058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10059// for more information.
10060func (c *ActivitiesListCall) Fields(s ...googleapi.Field) *ActivitiesListCall {
10061	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10062	return c
10063}
10064
10065// IfNoneMatch sets the optional parameter which makes the operation
10066// fail if the object's ETag matches the given value. This is useful for
10067// getting updates only after the object has changed since the last
10068// request. Use googleapi.IsNotModified to check whether the response
10069// error from Do is the result of In-None-Match.
10070func (c *ActivitiesListCall) IfNoneMatch(entityTag string) *ActivitiesListCall {
10071	c.ifNoneMatch_ = entityTag
10072	return c
10073}
10074
10075// Context sets the context to be used in this call's Do method. Any
10076// pending HTTP request will be aborted if the provided context is
10077// canceled.
10078func (c *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
10079	c.ctx_ = ctx
10080	return c
10081}
10082
10083// Header returns an http.Header that can be modified by the caller to
10084// add HTTP headers to the request.
10085func (c *ActivitiesListCall) Header() http.Header {
10086	if c.header_ == nil {
10087		c.header_ = make(http.Header)
10088	}
10089	return c.header_
10090}
10091
10092func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
10093	reqHeaders := make(http.Header)
10094	for k, v := range c.header_ {
10095		reqHeaders[k] = v
10096	}
10097	reqHeaders.Set("User-Agent", c.s.userAgent())
10098	if c.ifNoneMatch_ != "" {
10099		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10100	}
10101	var body io.Reader = nil
10102	c.urlParams_.Set("alt", alt)
10103	c.urlParams_.Set("prettyPrint", "false")
10104	urls := googleapi.ResolveRelative(c.s.BasePath, "activities")
10105	urls += "?" + c.urlParams_.Encode()
10106	req, err := http.NewRequest("GET", urls, body)
10107	if err != nil {
10108		return nil, err
10109	}
10110	req.Header = reqHeaders
10111	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10112}
10113
10114// Do executes the "youtube.activities.list" call.
10115// Exactly one of *ActivityListResponse or error will be non-nil. Any
10116// non-2xx status code is an error. Response headers are in either
10117// *ActivityListResponse.ServerResponse.Header or (if a response was
10118// returned at all) in error.(*googleapi.Error).Header. Use
10119// googleapi.IsNotModified to check whether the returned error was
10120// because http.StatusNotModified was returned.
10121func (c *ActivitiesListCall) Do(opts ...googleapi.CallOption) (*ActivityListResponse, error) {
10122	gensupport.SetOptions(c.urlParams_, opts...)
10123	res, err := c.doRequest("json")
10124	if res != nil && res.StatusCode == http.StatusNotModified {
10125		if res.Body != nil {
10126			res.Body.Close()
10127		}
10128		return nil, &googleapi.Error{
10129			Code:   res.StatusCode,
10130			Header: res.Header,
10131		}
10132	}
10133	if err != nil {
10134		return nil, err
10135	}
10136	defer googleapi.CloseBody(res)
10137	if err := googleapi.CheckResponse(res); err != nil {
10138		return nil, err
10139	}
10140	ret := &ActivityListResponse{
10141		ServerResponse: googleapi.ServerResponse{
10142			Header:         res.Header,
10143			HTTPStatusCode: res.StatusCode,
10144		},
10145	}
10146	target := &ret
10147	if err := gensupport.DecodeResponse(target, res); err != nil {
10148		return nil, err
10149	}
10150	return ret, nil
10151	// {
10152	//   "description": "Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user.",
10153	//   "httpMethod": "GET",
10154	//   "id": "youtube.activities.list",
10155	//   "parameterOrder": [
10156	//     "part"
10157	//   ],
10158	//   "parameters": {
10159	//     "channelId": {
10160	//       "description": "The channelId parameter specifies a unique YouTube channel ID. The API will then return a list of that channel's activities.",
10161	//       "location": "query",
10162	//       "type": "string"
10163	//     },
10164	//     "home": {
10165	//       "description": "Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user.",
10166	//       "location": "query",
10167	//       "type": "boolean"
10168	//     },
10169	//     "maxResults": {
10170	//       "default": "5",
10171	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
10172	//       "format": "uint32",
10173	//       "location": "query",
10174	//       "maximum": "50",
10175	//       "minimum": "0",
10176	//       "type": "integer"
10177	//     },
10178	//     "mine": {
10179	//       "description": "Set this parameter's value to true to retrieve a feed of the authenticated user's activities.",
10180	//       "location": "query",
10181	//       "type": "boolean"
10182	//     },
10183	//     "pageToken": {
10184	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
10185	//       "location": "query",
10186	//       "type": "string"
10187	//     },
10188	//     "part": {
10189	//       "description": "The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in an activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.",
10190	//       "location": "query",
10191	//       "required": true,
10192	//       "type": "string"
10193	//     },
10194	//     "publishedAfter": {
10195	//       "description": "The publishedAfter parameter specifies the earliest date and time that an activity could have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be included in the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.",
10196	//       "format": "date-time",
10197	//       "location": "query",
10198	//       "type": "string"
10199	//     },
10200	//     "publishedBefore": {
10201	//       "description": "The publishedBefore parameter specifies the date and time before which an activity must have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be excluded from the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.",
10202	//       "format": "date-time",
10203	//       "location": "query",
10204	//       "type": "string"
10205	//     },
10206	//     "regionCode": {
10207	//       "description": "The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. YouTube uses this value when the authorized user's previous activity on YouTube does not provide enough information to generate the activity feed.",
10208	//       "location": "query",
10209	//       "type": "string"
10210	//     }
10211	//   },
10212	//   "path": "activities",
10213	//   "response": {
10214	//     "$ref": "ActivityListResponse"
10215	//   },
10216	//   "scopes": [
10217	//     "https://www.googleapis.com/auth/youtube",
10218	//     "https://www.googleapis.com/auth/youtube.force-ssl",
10219	//     "https://www.googleapis.com/auth/youtube.readonly"
10220	//   ]
10221	// }
10222
10223}
10224
10225// Pages invokes f for each page of results.
10226// A non-nil error returned from f will halt the iteration.
10227// The provided context supersedes any context provided to the Context method.
10228func (c *ActivitiesListCall) Pages(ctx context.Context, f func(*ActivityListResponse) error) error {
10229	c.ctx_ = ctx
10230	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10231	for {
10232		x, err := c.Do()
10233		if err != nil {
10234			return err
10235		}
10236		if err := f(x); err != nil {
10237			return err
10238		}
10239		if x.NextPageToken == "" {
10240			return nil
10241		}
10242		c.PageToken(x.NextPageToken)
10243	}
10244}
10245
10246// method id "youtube.captions.delete":
10247
10248type CaptionsDeleteCall struct {
10249	s          *Service
10250	urlParams_ gensupport.URLParams
10251	ctx_       context.Context
10252	header_    http.Header
10253}
10254
10255// Delete: Deletes a specified caption track.
10256func (r *CaptionsService) Delete(id string) *CaptionsDeleteCall {
10257	c := &CaptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10258	c.urlParams_.Set("id", id)
10259	return c
10260}
10261
10262// OnBehalfOf sets the optional parameter "onBehalfOf": ID of the
10263// Google+ Page for the channel that the request is be on behalf of
10264func (c *CaptionsDeleteCall) OnBehalfOf(onBehalfOf string) *CaptionsDeleteCall {
10265	c.urlParams_.Set("onBehalfOf", onBehalfOf)
10266	return c
10267}
10268
10269// OnBehalfOfContentOwner sets the optional parameter
10270// "onBehalfOfContentOwner": Note: This parameter is intended
10271// exclusively for YouTube content partners.
10272//
10273// The onBehalfOfContentOwner parameter indicates that the request's
10274// authorization credentials identify a YouTube CMS user who is acting
10275// on behalf of the content owner specified in the parameter value. This
10276// parameter is intended for YouTube content partners that own and
10277// manage many different YouTube channels. It allows content owners to
10278// authenticate once and get access to all their video and channel data,
10279// without having to provide authentication credentials for each
10280// individual channel. The actual CMS account that the user
10281// authenticates with must be linked to the specified YouTube content
10282// owner.
10283func (c *CaptionsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsDeleteCall {
10284	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10285	return c
10286}
10287
10288// Fields allows partial responses to be retrieved. See
10289// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10290// for more information.
10291func (c *CaptionsDeleteCall) Fields(s ...googleapi.Field) *CaptionsDeleteCall {
10292	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10293	return c
10294}
10295
10296// Context sets the context to be used in this call's Do method. Any
10297// pending HTTP request will be aborted if the provided context is
10298// canceled.
10299func (c *CaptionsDeleteCall) Context(ctx context.Context) *CaptionsDeleteCall {
10300	c.ctx_ = ctx
10301	return c
10302}
10303
10304// Header returns an http.Header that can be modified by the caller to
10305// add HTTP headers to the request.
10306func (c *CaptionsDeleteCall) Header() http.Header {
10307	if c.header_ == nil {
10308		c.header_ = make(http.Header)
10309	}
10310	return c.header_
10311}
10312
10313func (c *CaptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
10314	reqHeaders := make(http.Header)
10315	for k, v := range c.header_ {
10316		reqHeaders[k] = v
10317	}
10318	reqHeaders.Set("User-Agent", c.s.userAgent())
10319	var body io.Reader = nil
10320	c.urlParams_.Set("alt", alt)
10321	c.urlParams_.Set("prettyPrint", "false")
10322	urls := googleapi.ResolveRelative(c.s.BasePath, "captions")
10323	urls += "?" + c.urlParams_.Encode()
10324	req, err := http.NewRequest("DELETE", urls, body)
10325	if err != nil {
10326		return nil, err
10327	}
10328	req.Header = reqHeaders
10329	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10330}
10331
10332// Do executes the "youtube.captions.delete" call.
10333func (c *CaptionsDeleteCall) Do(opts ...googleapi.CallOption) error {
10334	gensupport.SetOptions(c.urlParams_, opts...)
10335	res, err := c.doRequest("json")
10336	if err != nil {
10337		return err
10338	}
10339	defer googleapi.CloseBody(res)
10340	if err := googleapi.CheckResponse(res); err != nil {
10341		return err
10342	}
10343	return nil
10344	// {
10345	//   "description": "Deletes a specified caption track.",
10346	//   "httpMethod": "DELETE",
10347	//   "id": "youtube.captions.delete",
10348	//   "parameterOrder": [
10349	//     "id"
10350	//   ],
10351	//   "parameters": {
10352	//     "id": {
10353	//       "description": "The id parameter identifies the caption track that is being deleted. The value is a caption track ID as identified by the id property in a caption resource.",
10354	//       "location": "query",
10355	//       "required": true,
10356	//       "type": "string"
10357	//     },
10358	//     "onBehalfOf": {
10359	//       "description": "ID of the Google+ Page for the channel that the request is be on behalf of",
10360	//       "location": "query",
10361	//       "type": "string"
10362	//     },
10363	//     "onBehalfOfContentOwner": {
10364	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
10365	//       "location": "query",
10366	//       "type": "string"
10367	//     }
10368	//   },
10369	//   "path": "captions",
10370	//   "scopes": [
10371	//     "https://www.googleapis.com/auth/youtube.force-ssl",
10372	//     "https://www.googleapis.com/auth/youtubepartner"
10373	//   ]
10374	// }
10375
10376}
10377
10378// method id "youtube.captions.download":
10379
10380type CaptionsDownloadCall struct {
10381	s            *Service
10382	id           string
10383	urlParams_   gensupport.URLParams
10384	ifNoneMatch_ string
10385	ctx_         context.Context
10386	header_      http.Header
10387}
10388
10389// Download: Downloads a caption track. The caption track is returned in
10390// its original format unless the request specifies a value for the tfmt
10391// parameter and in its original language unless the request specifies a
10392// value for the tlang parameter.
10393func (r *CaptionsService) Download(id string) *CaptionsDownloadCall {
10394	c := &CaptionsDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10395	c.id = id
10396	return c
10397}
10398
10399// OnBehalfOf sets the optional parameter "onBehalfOf": ID of the
10400// Google+ Page for the channel that the request is be on behalf of
10401func (c *CaptionsDownloadCall) OnBehalfOf(onBehalfOf string) *CaptionsDownloadCall {
10402	c.urlParams_.Set("onBehalfOf", onBehalfOf)
10403	return c
10404}
10405
10406// OnBehalfOfContentOwner sets the optional parameter
10407// "onBehalfOfContentOwner": Note: This parameter is intended
10408// exclusively for YouTube content partners.
10409//
10410// The onBehalfOfContentOwner parameter indicates that the request's
10411// authorization credentials identify a YouTube CMS user who is acting
10412// on behalf of the content owner specified in the parameter value. This
10413// parameter is intended for YouTube content partners that own and
10414// manage many different YouTube channels. It allows content owners to
10415// authenticate once and get access to all their video and channel data,
10416// without having to provide authentication credentials for each
10417// individual channel. The actual CMS account that the user
10418// authenticates with must be linked to the specified YouTube content
10419// owner.
10420func (c *CaptionsDownloadCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsDownloadCall {
10421	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10422	return c
10423}
10424
10425// Tfmt sets the optional parameter "tfmt": The tfmt parameter specifies
10426// that the caption track should be returned in a specific format. If
10427// the parameter is not included in the request, the track is returned
10428// in its original format.
10429//
10430// Possible values:
10431//   "sbv" - SubViewer subtitle.
10432//   "scc" - Scenarist Closed Caption format.
10433//   "srt" - SubRip subtitle.
10434//   "ttml" - Timed Text Markup Language caption.
10435//   "vtt" - Web Video Text Tracks caption.
10436func (c *CaptionsDownloadCall) Tfmt(tfmt string) *CaptionsDownloadCall {
10437	c.urlParams_.Set("tfmt", tfmt)
10438	return c
10439}
10440
10441// Tlang sets the optional parameter "tlang": The tlang parameter
10442// specifies that the API response should return a translation of the
10443// specified caption track. The parameter value is an ISO 639-1
10444// two-letter language code that identifies the desired caption
10445// language. The translation is generated by using machine translation,
10446// such as Google Translate.
10447func (c *CaptionsDownloadCall) Tlang(tlang string) *CaptionsDownloadCall {
10448	c.urlParams_.Set("tlang", tlang)
10449	return c
10450}
10451
10452// Fields allows partial responses to be retrieved. See
10453// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10454// for more information.
10455func (c *CaptionsDownloadCall) Fields(s ...googleapi.Field) *CaptionsDownloadCall {
10456	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10457	return c
10458}
10459
10460// IfNoneMatch sets the optional parameter which makes the operation
10461// fail if the object's ETag matches the given value. This is useful for
10462// getting updates only after the object has changed since the last
10463// request. Use googleapi.IsNotModified to check whether the response
10464// error from Do is the result of In-None-Match.
10465func (c *CaptionsDownloadCall) IfNoneMatch(entityTag string) *CaptionsDownloadCall {
10466	c.ifNoneMatch_ = entityTag
10467	return c
10468}
10469
10470// Context sets the context to be used in this call's Do and Download
10471// methods. Any pending HTTP request will be aborted if the provided
10472// context is canceled.
10473func (c *CaptionsDownloadCall) Context(ctx context.Context) *CaptionsDownloadCall {
10474	c.ctx_ = ctx
10475	return c
10476}
10477
10478// Header returns an http.Header that can be modified by the caller to
10479// add HTTP headers to the request.
10480func (c *CaptionsDownloadCall) Header() http.Header {
10481	if c.header_ == nil {
10482		c.header_ = make(http.Header)
10483	}
10484	return c.header_
10485}
10486
10487func (c *CaptionsDownloadCall) doRequest(alt string) (*http.Response, error) {
10488	reqHeaders := make(http.Header)
10489	for k, v := range c.header_ {
10490		reqHeaders[k] = v
10491	}
10492	reqHeaders.Set("User-Agent", c.s.userAgent())
10493	if c.ifNoneMatch_ != "" {
10494		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10495	}
10496	var body io.Reader = nil
10497	c.urlParams_.Set("alt", alt)
10498	c.urlParams_.Set("prettyPrint", "false")
10499	urls := googleapi.ResolveRelative(c.s.BasePath, "captions/{id}")
10500	urls += "?" + c.urlParams_.Encode()
10501	req, err := http.NewRequest("GET", urls, body)
10502	if err != nil {
10503		return nil, err
10504	}
10505	req.Header = reqHeaders
10506	googleapi.Expand(req.URL, map[string]string{
10507		"id": c.id,
10508	})
10509	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10510}
10511
10512// Download fetches the API endpoint's "media" value, instead of the normal
10513// API response value. If the returned error is nil, the Response is guaranteed to
10514// have a 2xx status code. Callers must close the Response.Body as usual.
10515func (c *CaptionsDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
10516	gensupport.SetOptions(c.urlParams_, opts...)
10517	res, err := c.doRequest("media")
10518	if err != nil {
10519		return nil, err
10520	}
10521	if err := googleapi.CheckMediaResponse(res); err != nil {
10522		res.Body.Close()
10523		return nil, err
10524	}
10525	return res, nil
10526}
10527
10528// Do executes the "youtube.captions.download" call.
10529func (c *CaptionsDownloadCall) Do(opts ...googleapi.CallOption) error {
10530	gensupport.SetOptions(c.urlParams_, opts...)
10531	res, err := c.doRequest("json")
10532	if err != nil {
10533		return err
10534	}
10535	defer googleapi.CloseBody(res)
10536	if err := googleapi.CheckResponse(res); err != nil {
10537		return err
10538	}
10539	return nil
10540	// {
10541	//   "description": "Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.",
10542	//   "httpMethod": "GET",
10543	//   "id": "youtube.captions.download",
10544	//   "parameterOrder": [
10545	//     "id"
10546	//   ],
10547	//   "parameters": {
10548	//     "id": {
10549	//       "description": "The id parameter identifies the caption track that is being retrieved. The value is a caption track ID as identified by the id property in a caption resource.",
10550	//       "location": "path",
10551	//       "required": true,
10552	//       "type": "string"
10553	//     },
10554	//     "onBehalfOf": {
10555	//       "description": "ID of the Google+ Page for the channel that the request is be on behalf of",
10556	//       "location": "query",
10557	//       "type": "string"
10558	//     },
10559	//     "onBehalfOfContentOwner": {
10560	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
10561	//       "location": "query",
10562	//       "type": "string"
10563	//     },
10564	//     "tfmt": {
10565	//       "description": "The tfmt parameter specifies that the caption track should be returned in a specific format. If the parameter is not included in the request, the track is returned in its original format.",
10566	//       "enum": [
10567	//         "sbv",
10568	//         "scc",
10569	//         "srt",
10570	//         "ttml",
10571	//         "vtt"
10572	//       ],
10573	//       "enumDescriptions": [
10574	//         "SubViewer subtitle.",
10575	//         "Scenarist Closed Caption format.",
10576	//         "SubRip subtitle.",
10577	//         "Timed Text Markup Language caption.",
10578	//         "Web Video Text Tracks caption."
10579	//       ],
10580	//       "location": "query",
10581	//       "type": "string"
10582	//     },
10583	//     "tlang": {
10584	//       "description": "The tlang parameter specifies that the API response should return a translation of the specified caption track. The parameter value is an ISO 639-1 two-letter language code that identifies the desired caption language. The translation is generated by using machine translation, such as Google Translate.",
10585	//       "location": "query",
10586	//       "type": "string"
10587	//     }
10588	//   },
10589	//   "path": "captions/{id}",
10590	//   "scopes": [
10591	//     "https://www.googleapis.com/auth/youtube.force-ssl",
10592	//     "https://www.googleapis.com/auth/youtubepartner"
10593	//   ],
10594	//   "supportsMediaDownload": true
10595	// }
10596
10597}
10598
10599// method id "youtube.captions.insert":
10600
10601type CaptionsInsertCall struct {
10602	s          *Service
10603	caption    *Caption
10604	urlParams_ gensupport.URLParams
10605	mediaInfo_ *gensupport.MediaInfo
10606	ctx_       context.Context
10607	header_    http.Header
10608}
10609
10610// Insert: Uploads a caption track.
10611func (r *CaptionsService) Insert(part string, caption *Caption) *CaptionsInsertCall {
10612	c := &CaptionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10613	c.urlParams_.Set("part", part)
10614	c.caption = caption
10615	return c
10616}
10617
10618// OnBehalfOf sets the optional parameter "onBehalfOf": ID of the
10619// Google+ Page for the channel that the request is be on behalf of
10620func (c *CaptionsInsertCall) OnBehalfOf(onBehalfOf string) *CaptionsInsertCall {
10621	c.urlParams_.Set("onBehalfOf", onBehalfOf)
10622	return c
10623}
10624
10625// OnBehalfOfContentOwner sets the optional parameter
10626// "onBehalfOfContentOwner": Note: This parameter is intended
10627// exclusively for YouTube content partners.
10628//
10629// The onBehalfOfContentOwner parameter indicates that the request's
10630// authorization credentials identify a YouTube CMS user who is acting
10631// on behalf of the content owner specified in the parameter value. This
10632// parameter is intended for YouTube content partners that own and
10633// manage many different YouTube channels. It allows content owners to
10634// authenticate once and get access to all their video and channel data,
10635// without having to provide authentication credentials for each
10636// individual channel. The actual CMS account that the user
10637// authenticates with must be linked to the specified YouTube content
10638// owner.
10639func (c *CaptionsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsInsertCall {
10640	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10641	return c
10642}
10643
10644// Sync sets the optional parameter "sync": The sync parameter indicates
10645// whether YouTube should automatically synchronize the caption file
10646// with the audio track of the video. If you set the value to true,
10647// YouTube will disregard any time codes that are in the uploaded
10648// caption file and generate new time codes for the captions.
10649//
10650// You should set the sync parameter to true if you are uploading a
10651// transcript, which has no time codes, or if you suspect the time codes
10652// in your file are incorrect and want YouTube to try to fix them.
10653func (c *CaptionsInsertCall) Sync(sync bool) *CaptionsInsertCall {
10654	c.urlParams_.Set("sync", fmt.Sprint(sync))
10655	return c
10656}
10657
10658// Media specifies the media to upload in one or more chunks. The chunk
10659// size may be controlled by supplying a MediaOption generated by
10660// googleapi.ChunkSize. The chunk size defaults to
10661// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
10662// upload request will be determined by sniffing the contents of r,
10663// unless a MediaOption generated by googleapi.ContentType is
10664// supplied.
10665// At most one of Media and ResumableMedia may be set.
10666func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsInsertCall {
10667	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
10668	return c
10669}
10670
10671// ResumableMedia specifies the media to upload in chunks and can be
10672// canceled with ctx.
10673//
10674// Deprecated: use Media instead.
10675//
10676// At most one of Media and ResumableMedia may be set. mediaType
10677// identifies the MIME media type of the upload, such as "image/png". If
10678// mediaType is "", it will be auto-detected. The provided ctx will
10679// supersede any context previously provided to the Context method.
10680func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsInsertCall {
10681	c.ctx_ = ctx
10682	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
10683	return c
10684}
10685
10686// ProgressUpdater provides a callback function that will be called
10687// after every chunk. It should be a low-latency function in order to
10688// not slow down the upload operation. This should only be called when
10689// using ResumableMedia (as opposed to Media).
10690func (c *CaptionsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsInsertCall {
10691	c.mediaInfo_.SetProgressUpdater(pu)
10692	return c
10693}
10694
10695// Fields allows partial responses to be retrieved. See
10696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10697// for more information.
10698func (c *CaptionsInsertCall) Fields(s ...googleapi.Field) *CaptionsInsertCall {
10699	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10700	return c
10701}
10702
10703// Context sets the context to be used in this call's Do method. Any
10704// pending HTTP request will be aborted if the provided context is
10705// canceled.
10706// This context will supersede any context previously provided to the
10707// ResumableMedia method.
10708func (c *CaptionsInsertCall) Context(ctx context.Context) *CaptionsInsertCall {
10709	c.ctx_ = ctx
10710	return c
10711}
10712
10713// Header returns an http.Header that can be modified by the caller to
10714// add HTTP headers to the request.
10715func (c *CaptionsInsertCall) Header() http.Header {
10716	if c.header_ == nil {
10717		c.header_ = make(http.Header)
10718	}
10719	return c.header_
10720}
10721
10722func (c *CaptionsInsertCall) doRequest(alt string) (*http.Response, error) {
10723	reqHeaders := make(http.Header)
10724	for k, v := range c.header_ {
10725		reqHeaders[k] = v
10726	}
10727	reqHeaders.Set("User-Agent", c.s.userAgent())
10728	var body io.Reader = nil
10729	body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
10730	if err != nil {
10731		return nil, err
10732	}
10733	reqHeaders.Set("Content-Type", "application/json")
10734	c.urlParams_.Set("alt", alt)
10735	c.urlParams_.Set("prettyPrint", "false")
10736	urls := googleapi.ResolveRelative(c.s.BasePath, "captions")
10737	if c.mediaInfo_ != nil {
10738		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
10739		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
10740	}
10741	if body == nil {
10742		body = new(bytes.Buffer)
10743		reqHeaders.Set("Content-Type", "application/json")
10744	}
10745	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
10746	defer cleanup()
10747	urls += "?" + c.urlParams_.Encode()
10748	req, err := http.NewRequest("POST", urls, body)
10749	if err != nil {
10750		return nil, err
10751	}
10752	req.Header = reqHeaders
10753	req.GetBody = getBody
10754	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10755}
10756
10757// Do executes the "youtube.captions.insert" call.
10758// Exactly one of *Caption or error will be non-nil. Any non-2xx status
10759// code is an error. Response headers are in either
10760// *Caption.ServerResponse.Header or (if a response was returned at all)
10761// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10762// check whether the returned error was because http.StatusNotModified
10763// was returned.
10764func (c *CaptionsInsertCall) Do(opts ...googleapi.CallOption) (*Caption, error) {
10765	gensupport.SetOptions(c.urlParams_, opts...)
10766	res, err := c.doRequest("json")
10767	if res != nil && res.StatusCode == http.StatusNotModified {
10768		if res.Body != nil {
10769			res.Body.Close()
10770		}
10771		return nil, &googleapi.Error{
10772			Code:   res.StatusCode,
10773			Header: res.Header,
10774		}
10775	}
10776	if err != nil {
10777		return nil, err
10778	}
10779	defer googleapi.CloseBody(res)
10780	if err := googleapi.CheckResponse(res); err != nil {
10781		return nil, err
10782	}
10783	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
10784	if rx != nil {
10785		rx.Client = c.s.client
10786		rx.UserAgent = c.s.userAgent()
10787		ctx := c.ctx_
10788		if ctx == nil {
10789			ctx = context.TODO()
10790		}
10791		res, err = rx.Upload(ctx)
10792		if err != nil {
10793			return nil, err
10794		}
10795		defer res.Body.Close()
10796		if err := googleapi.CheckResponse(res); err != nil {
10797			return nil, err
10798		}
10799	}
10800	ret := &Caption{
10801		ServerResponse: googleapi.ServerResponse{
10802			Header:         res.Header,
10803			HTTPStatusCode: res.StatusCode,
10804		},
10805	}
10806	target := &ret
10807	if err := gensupport.DecodeResponse(target, res); err != nil {
10808		return nil, err
10809	}
10810	return ret, nil
10811	// {
10812	//   "description": "Uploads a caption track.",
10813	//   "httpMethod": "POST",
10814	//   "id": "youtube.captions.insert",
10815	//   "mediaUpload": {
10816	//     "accept": [
10817	//       "*/*",
10818	//       "application/octet-stream",
10819	//       "text/xml"
10820	//     ],
10821	//     "maxSize": "100MB",
10822	//     "protocols": {
10823	//       "resumable": {
10824	//         "multipart": true,
10825	//         "path": "/resumable/upload/youtube/v3/captions"
10826	//       },
10827	//       "simple": {
10828	//         "multipart": true,
10829	//         "path": "/upload/youtube/v3/captions"
10830	//       }
10831	//     }
10832	//   },
10833	//   "parameterOrder": [
10834	//     "part"
10835	//   ],
10836	//   "parameters": {
10837	//     "onBehalfOf": {
10838	//       "description": "ID of the Google+ Page for the channel that the request is be on behalf of",
10839	//       "location": "query",
10840	//       "type": "string"
10841	//     },
10842	//     "onBehalfOfContentOwner": {
10843	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
10844	//       "location": "query",
10845	//       "type": "string"
10846	//     },
10847	//     "part": {
10848	//       "description": "The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet.",
10849	//       "location": "query",
10850	//       "required": true,
10851	//       "type": "string"
10852	//     },
10853	//     "sync": {
10854	//       "description": "The sync parameter indicates whether YouTube should automatically synchronize the caption file with the audio track of the video. If you set the value to true, YouTube will disregard any time codes that are in the uploaded caption file and generate new time codes for the captions.\n\nYou should set the sync parameter to true if you are uploading a transcript, which has no time codes, or if you suspect the time codes in your file are incorrect and want YouTube to try to fix them.",
10855	//       "location": "query",
10856	//       "type": "boolean"
10857	//     }
10858	//   },
10859	//   "path": "captions",
10860	//   "request": {
10861	//     "$ref": "Caption"
10862	//   },
10863	//   "response": {
10864	//     "$ref": "Caption"
10865	//   },
10866	//   "scopes": [
10867	//     "https://www.googleapis.com/auth/youtube.force-ssl",
10868	//     "https://www.googleapis.com/auth/youtubepartner"
10869	//   ],
10870	//   "supportsMediaUpload": true
10871	// }
10872
10873}
10874
10875// method id "youtube.captions.list":
10876
10877type CaptionsListCall struct {
10878	s            *Service
10879	urlParams_   gensupport.URLParams
10880	ifNoneMatch_ string
10881	ctx_         context.Context
10882	header_      http.Header
10883}
10884
10885// List: Returns a list of caption tracks that are associated with a
10886// specified video. Note that the API response does not contain the
10887// actual captions and that the captions.download method provides the
10888// ability to retrieve a caption track.
10889func (r *CaptionsService) List(part string, videoId string) *CaptionsListCall {
10890	c := &CaptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10891	c.urlParams_.Set("part", part)
10892	c.urlParams_.Set("videoId", videoId)
10893	return c
10894}
10895
10896// Id sets the optional parameter "id": The id parameter specifies a
10897// comma-separated list of IDs that identify the caption resources that
10898// should be retrieved. Each ID must identify a caption track associated
10899// with the specified video.
10900func (c *CaptionsListCall) Id(id string) *CaptionsListCall {
10901	c.urlParams_.Set("id", id)
10902	return c
10903}
10904
10905// OnBehalfOf sets the optional parameter "onBehalfOf": ID of the
10906// Google+ Page for the channel that the request is on behalf of.
10907func (c *CaptionsListCall) OnBehalfOf(onBehalfOf string) *CaptionsListCall {
10908	c.urlParams_.Set("onBehalfOf", onBehalfOf)
10909	return c
10910}
10911
10912// OnBehalfOfContentOwner sets the optional parameter
10913// "onBehalfOfContentOwner": Note: This parameter is intended
10914// exclusively for YouTube content partners.
10915//
10916// The onBehalfOfContentOwner parameter indicates that the request's
10917// authorization credentials identify a YouTube CMS user who is acting
10918// on behalf of the content owner specified in the parameter value. This
10919// parameter is intended for YouTube content partners that own and
10920// manage many different YouTube channels. It allows content owners to
10921// authenticate once and get access to all their video and channel data,
10922// without having to provide authentication credentials for each
10923// individual channel. The actual CMS account that the user
10924// authenticates with must be linked to the specified YouTube content
10925// owner.
10926func (c *CaptionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsListCall {
10927	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
10928	return c
10929}
10930
10931// Fields allows partial responses to be retrieved. See
10932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10933// for more information.
10934func (c *CaptionsListCall) Fields(s ...googleapi.Field) *CaptionsListCall {
10935	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10936	return c
10937}
10938
10939// IfNoneMatch sets the optional parameter which makes the operation
10940// fail if the object's ETag matches the given value. This is useful for
10941// getting updates only after the object has changed since the last
10942// request. Use googleapi.IsNotModified to check whether the response
10943// error from Do is the result of In-None-Match.
10944func (c *CaptionsListCall) IfNoneMatch(entityTag string) *CaptionsListCall {
10945	c.ifNoneMatch_ = entityTag
10946	return c
10947}
10948
10949// Context sets the context to be used in this call's Do method. Any
10950// pending HTTP request will be aborted if the provided context is
10951// canceled.
10952func (c *CaptionsListCall) Context(ctx context.Context) *CaptionsListCall {
10953	c.ctx_ = ctx
10954	return c
10955}
10956
10957// Header returns an http.Header that can be modified by the caller to
10958// add HTTP headers to the request.
10959func (c *CaptionsListCall) Header() http.Header {
10960	if c.header_ == nil {
10961		c.header_ = make(http.Header)
10962	}
10963	return c.header_
10964}
10965
10966func (c *CaptionsListCall) doRequest(alt string) (*http.Response, error) {
10967	reqHeaders := make(http.Header)
10968	for k, v := range c.header_ {
10969		reqHeaders[k] = v
10970	}
10971	reqHeaders.Set("User-Agent", c.s.userAgent())
10972	if c.ifNoneMatch_ != "" {
10973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10974	}
10975	var body io.Reader = nil
10976	c.urlParams_.Set("alt", alt)
10977	c.urlParams_.Set("prettyPrint", "false")
10978	urls := googleapi.ResolveRelative(c.s.BasePath, "captions")
10979	urls += "?" + c.urlParams_.Encode()
10980	req, err := http.NewRequest("GET", urls, body)
10981	if err != nil {
10982		return nil, err
10983	}
10984	req.Header = reqHeaders
10985	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10986}
10987
10988// Do executes the "youtube.captions.list" call.
10989// Exactly one of *CaptionListResponse or error will be non-nil. Any
10990// non-2xx status code is an error. Response headers are in either
10991// *CaptionListResponse.ServerResponse.Header or (if a response was
10992// returned at all) in error.(*googleapi.Error).Header. Use
10993// googleapi.IsNotModified to check whether the returned error was
10994// because http.StatusNotModified was returned.
10995func (c *CaptionsListCall) Do(opts ...googleapi.CallOption) (*CaptionListResponse, error) {
10996	gensupport.SetOptions(c.urlParams_, opts...)
10997	res, err := c.doRequest("json")
10998	if res != nil && res.StatusCode == http.StatusNotModified {
10999		if res.Body != nil {
11000			res.Body.Close()
11001		}
11002		return nil, &googleapi.Error{
11003			Code:   res.StatusCode,
11004			Header: res.Header,
11005		}
11006	}
11007	if err != nil {
11008		return nil, err
11009	}
11010	defer googleapi.CloseBody(res)
11011	if err := googleapi.CheckResponse(res); err != nil {
11012		return nil, err
11013	}
11014	ret := &CaptionListResponse{
11015		ServerResponse: googleapi.ServerResponse{
11016			Header:         res.Header,
11017			HTTPStatusCode: res.StatusCode,
11018		},
11019	}
11020	target := &ret
11021	if err := gensupport.DecodeResponse(target, res); err != nil {
11022		return nil, err
11023	}
11024	return ret, nil
11025	// {
11026	//   "description": "Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.",
11027	//   "httpMethod": "GET",
11028	//   "id": "youtube.captions.list",
11029	//   "parameterOrder": [
11030	//     "part",
11031	//     "videoId"
11032	//   ],
11033	//   "parameters": {
11034	//     "id": {
11035	//       "description": "The id parameter specifies a comma-separated list of IDs that identify the caption resources that should be retrieved. Each ID must identify a caption track associated with the specified video.",
11036	//       "location": "query",
11037	//       "type": "string"
11038	//     },
11039	//     "onBehalfOf": {
11040	//       "description": "ID of the Google+ Page for the channel that the request is on behalf of.",
11041	//       "location": "query",
11042	//       "type": "string"
11043	//     },
11044	//     "onBehalfOfContentOwner": {
11045	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
11046	//       "location": "query",
11047	//       "type": "string"
11048	//     },
11049	//     "part": {
11050	//       "description": "The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.",
11051	//       "location": "query",
11052	//       "required": true,
11053	//       "type": "string"
11054	//     },
11055	//     "videoId": {
11056	//       "description": "The videoId parameter specifies the YouTube video ID of the video for which the API should return caption tracks.",
11057	//       "location": "query",
11058	//       "required": true,
11059	//       "type": "string"
11060	//     }
11061	//   },
11062	//   "path": "captions",
11063	//   "response": {
11064	//     "$ref": "CaptionListResponse"
11065	//   },
11066	//   "scopes": [
11067	//     "https://www.googleapis.com/auth/youtube.force-ssl",
11068	//     "https://www.googleapis.com/auth/youtubepartner"
11069	//   ]
11070	// }
11071
11072}
11073
11074// method id "youtube.captions.update":
11075
11076type CaptionsUpdateCall struct {
11077	s          *Service
11078	caption    *Caption
11079	urlParams_ gensupport.URLParams
11080	mediaInfo_ *gensupport.MediaInfo
11081	ctx_       context.Context
11082	header_    http.Header
11083}
11084
11085// Update: Updates a caption track. When updating a caption track, you
11086// can change the track's draft status, upload a new caption file for
11087// the track, or both.
11088func (r *CaptionsService) Update(part string, caption *Caption) *CaptionsUpdateCall {
11089	c := &CaptionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11090	c.urlParams_.Set("part", part)
11091	c.caption = caption
11092	return c
11093}
11094
11095// OnBehalfOf sets the optional parameter "onBehalfOf": ID of the
11096// Google+ Page for the channel that the request is be on behalf of
11097func (c *CaptionsUpdateCall) OnBehalfOf(onBehalfOf string) *CaptionsUpdateCall {
11098	c.urlParams_.Set("onBehalfOf", onBehalfOf)
11099	return c
11100}
11101
11102// OnBehalfOfContentOwner sets the optional parameter
11103// "onBehalfOfContentOwner": Note: This parameter is intended
11104// exclusively for YouTube content partners.
11105//
11106// The onBehalfOfContentOwner parameter indicates that the request's
11107// authorization credentials identify a YouTube CMS user who is acting
11108// on behalf of the content owner specified in the parameter value. This
11109// parameter is intended for YouTube content partners that own and
11110// manage many different YouTube channels. It allows content owners to
11111// authenticate once and get access to all their video and channel data,
11112// without having to provide authentication credentials for each
11113// individual channel. The actual CMS account that the user
11114// authenticates with must be linked to the specified YouTube content
11115// owner.
11116func (c *CaptionsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsUpdateCall {
11117	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11118	return c
11119}
11120
11121// Sync sets the optional parameter "sync": Note: The API server only
11122// processes the parameter value if the request contains an updated
11123// caption file.
11124//
11125// The sync parameter indicates whether YouTube should automatically
11126// synchronize the caption file with the audio track of the video. If
11127// you set the value to true, YouTube will automatically synchronize the
11128// caption track with the audio track.
11129func (c *CaptionsUpdateCall) Sync(sync bool) *CaptionsUpdateCall {
11130	c.urlParams_.Set("sync", fmt.Sprint(sync))
11131	return c
11132}
11133
11134// Media specifies the media to upload in one or more chunks. The chunk
11135// size may be controlled by supplying a MediaOption generated by
11136// googleapi.ChunkSize. The chunk size defaults to
11137// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
11138// upload request will be determined by sniffing the contents of r,
11139// unless a MediaOption generated by googleapi.ContentType is
11140// supplied.
11141// At most one of Media and ResumableMedia may be set.
11142func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsUpdateCall {
11143	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
11144	return c
11145}
11146
11147// ResumableMedia specifies the media to upload in chunks and can be
11148// canceled with ctx.
11149//
11150// Deprecated: use Media instead.
11151//
11152// At most one of Media and ResumableMedia may be set. mediaType
11153// identifies the MIME media type of the upload, such as "image/png". If
11154// mediaType is "", it will be auto-detected. The provided ctx will
11155// supersede any context previously provided to the Context method.
11156func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsUpdateCall {
11157	c.ctx_ = ctx
11158	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
11159	return c
11160}
11161
11162// ProgressUpdater provides a callback function that will be called
11163// after every chunk. It should be a low-latency function in order to
11164// not slow down the upload operation. This should only be called when
11165// using ResumableMedia (as opposed to Media).
11166func (c *CaptionsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsUpdateCall {
11167	c.mediaInfo_.SetProgressUpdater(pu)
11168	return c
11169}
11170
11171// Fields allows partial responses to be retrieved. See
11172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11173// for more information.
11174func (c *CaptionsUpdateCall) Fields(s ...googleapi.Field) *CaptionsUpdateCall {
11175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11176	return c
11177}
11178
11179// Context sets the context to be used in this call's Do method. Any
11180// pending HTTP request will be aborted if the provided context is
11181// canceled.
11182// This context will supersede any context previously provided to the
11183// ResumableMedia method.
11184func (c *CaptionsUpdateCall) Context(ctx context.Context) *CaptionsUpdateCall {
11185	c.ctx_ = ctx
11186	return c
11187}
11188
11189// Header returns an http.Header that can be modified by the caller to
11190// add HTTP headers to the request.
11191func (c *CaptionsUpdateCall) Header() http.Header {
11192	if c.header_ == nil {
11193		c.header_ = make(http.Header)
11194	}
11195	return c.header_
11196}
11197
11198func (c *CaptionsUpdateCall) doRequest(alt string) (*http.Response, error) {
11199	reqHeaders := make(http.Header)
11200	for k, v := range c.header_ {
11201		reqHeaders[k] = v
11202	}
11203	reqHeaders.Set("User-Agent", c.s.userAgent())
11204	var body io.Reader = nil
11205	body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
11206	if err != nil {
11207		return nil, err
11208	}
11209	reqHeaders.Set("Content-Type", "application/json")
11210	c.urlParams_.Set("alt", alt)
11211	c.urlParams_.Set("prettyPrint", "false")
11212	urls := googleapi.ResolveRelative(c.s.BasePath, "captions")
11213	if c.mediaInfo_ != nil {
11214		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
11215		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
11216	}
11217	if body == nil {
11218		body = new(bytes.Buffer)
11219		reqHeaders.Set("Content-Type", "application/json")
11220	}
11221	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
11222	defer cleanup()
11223	urls += "?" + c.urlParams_.Encode()
11224	req, err := http.NewRequest("PUT", urls, body)
11225	if err != nil {
11226		return nil, err
11227	}
11228	req.Header = reqHeaders
11229	req.GetBody = getBody
11230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11231}
11232
11233// Do executes the "youtube.captions.update" call.
11234// Exactly one of *Caption or error will be non-nil. Any non-2xx status
11235// code is an error. Response headers are in either
11236// *Caption.ServerResponse.Header or (if a response was returned at all)
11237// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11238// check whether the returned error was because http.StatusNotModified
11239// was returned.
11240func (c *CaptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Caption, error) {
11241	gensupport.SetOptions(c.urlParams_, opts...)
11242	res, err := c.doRequest("json")
11243	if res != nil && res.StatusCode == http.StatusNotModified {
11244		if res.Body != nil {
11245			res.Body.Close()
11246		}
11247		return nil, &googleapi.Error{
11248			Code:   res.StatusCode,
11249			Header: res.Header,
11250		}
11251	}
11252	if err != nil {
11253		return nil, err
11254	}
11255	defer googleapi.CloseBody(res)
11256	if err := googleapi.CheckResponse(res); err != nil {
11257		return nil, err
11258	}
11259	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
11260	if rx != nil {
11261		rx.Client = c.s.client
11262		rx.UserAgent = c.s.userAgent()
11263		ctx := c.ctx_
11264		if ctx == nil {
11265			ctx = context.TODO()
11266		}
11267		res, err = rx.Upload(ctx)
11268		if err != nil {
11269			return nil, err
11270		}
11271		defer res.Body.Close()
11272		if err := googleapi.CheckResponse(res); err != nil {
11273			return nil, err
11274		}
11275	}
11276	ret := &Caption{
11277		ServerResponse: googleapi.ServerResponse{
11278			Header:         res.Header,
11279			HTTPStatusCode: res.StatusCode,
11280		},
11281	}
11282	target := &ret
11283	if err := gensupport.DecodeResponse(target, res); err != nil {
11284		return nil, err
11285	}
11286	return ret, nil
11287	// {
11288	//   "description": "Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both.",
11289	//   "httpMethod": "PUT",
11290	//   "id": "youtube.captions.update",
11291	//   "mediaUpload": {
11292	//     "accept": [
11293	//       "*/*",
11294	//       "application/octet-stream",
11295	//       "text/xml"
11296	//     ],
11297	//     "maxSize": "100MB",
11298	//     "protocols": {
11299	//       "resumable": {
11300	//         "multipart": true,
11301	//         "path": "/resumable/upload/youtube/v3/captions"
11302	//       },
11303	//       "simple": {
11304	//         "multipart": true,
11305	//         "path": "/upload/youtube/v3/captions"
11306	//       }
11307	//     }
11308	//   },
11309	//   "parameterOrder": [
11310	//     "part"
11311	//   ],
11312	//   "parameters": {
11313	//     "onBehalfOf": {
11314	//       "description": "ID of the Google+ Page for the channel that the request is be on behalf of",
11315	//       "location": "query",
11316	//       "type": "string"
11317	//     },
11318	//     "onBehalfOfContentOwner": {
11319	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
11320	//       "location": "query",
11321	//       "type": "string"
11322	//     },
11323	//     "part": {
11324	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the property value to snippet if you are updating the track's draft status. Otherwise, set the property value to id.",
11325	//       "location": "query",
11326	//       "required": true,
11327	//       "type": "string"
11328	//     },
11329	//     "sync": {
11330	//       "description": "Note: The API server only processes the parameter value if the request contains an updated caption file.\n\nThe sync parameter indicates whether YouTube should automatically synchronize the caption file with the audio track of the video. If you set the value to true, YouTube will automatically synchronize the caption track with the audio track.",
11331	//       "location": "query",
11332	//       "type": "boolean"
11333	//     }
11334	//   },
11335	//   "path": "captions",
11336	//   "request": {
11337	//     "$ref": "Caption"
11338	//   },
11339	//   "response": {
11340	//     "$ref": "Caption"
11341	//   },
11342	//   "scopes": [
11343	//     "https://www.googleapis.com/auth/youtube.force-ssl",
11344	//     "https://www.googleapis.com/auth/youtubepartner"
11345	//   ],
11346	//   "supportsMediaUpload": true
11347	// }
11348
11349}
11350
11351// method id "youtube.channelBanners.insert":
11352
11353type ChannelBannersInsertCall struct {
11354	s                     *Service
11355	channelbannerresource *ChannelBannerResource
11356	urlParams_            gensupport.URLParams
11357	mediaInfo_            *gensupport.MediaInfo
11358	ctx_                  context.Context
11359	header_               http.Header
11360}
11361
11362// Insert: Uploads a channel banner image to YouTube. This method
11363// represents the first two steps in a three-step process to update the
11364// banner image for a channel:
11365//
11366// - Call the channelBanners.insert method to upload the binary image
11367// data to YouTube. The image must have a 16:9 aspect ratio and be at
11368// least 2120x1192 pixels.
11369// - Extract the url property's value from the response that the API
11370// returns for step 1.
11371// - Call the channels.update method to update the channel's branding
11372// settings. Set the brandingSettings.image.bannerExternalUrl property's
11373// value to the URL obtained in step 2.
11374func (r *ChannelBannersService) Insert(channelbannerresource *ChannelBannerResource) *ChannelBannersInsertCall {
11375	c := &ChannelBannersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11376	c.channelbannerresource = channelbannerresource
11377	return c
11378}
11379
11380// ChannelId sets the optional parameter "channelId": The channelId
11381// parameter identifies the YouTube channel to which the banner is
11382// uploaded. The channelId parameter was introduced as a required
11383// parameter in May 2017. As this was a backward-incompatible change,
11384// channelBanners.insert requests that do not specify this parameter
11385// will not return an error until six months have passed from the time
11386// that the parameter was introduced. Please see the API Terms of
11387// Service for the official policy regarding backward incompatible
11388// changes and the API revision history for the exact date that the
11389// parameter was introduced.
11390func (c *ChannelBannersInsertCall) ChannelId(channelId string) *ChannelBannersInsertCall {
11391	c.urlParams_.Set("channelId", channelId)
11392	return c
11393}
11394
11395// OnBehalfOfContentOwner sets the optional parameter
11396// "onBehalfOfContentOwner": Note: This parameter is intended
11397// exclusively for YouTube content partners.
11398//
11399// The onBehalfOfContentOwner parameter indicates that the request's
11400// authorization credentials identify a YouTube CMS user who is acting
11401// on behalf of the content owner specified in the parameter value. This
11402// parameter is intended for YouTube content partners that own and
11403// manage many different YouTube channels. It allows content owners to
11404// authenticate once and get access to all their video and channel data,
11405// without having to provide authentication credentials for each
11406// individual channel. The CMS account that the user authenticates with
11407// must be linked to the specified YouTube content owner.
11408func (c *ChannelBannersInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelBannersInsertCall {
11409	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11410	return c
11411}
11412
11413// Media specifies the media to upload in one or more chunks. The chunk
11414// size may be controlled by supplying a MediaOption generated by
11415// googleapi.ChunkSize. The chunk size defaults to
11416// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
11417// upload request will be determined by sniffing the contents of r,
11418// unless a MediaOption generated by googleapi.ContentType is
11419// supplied.
11420// At most one of Media and ResumableMedia may be set.
11421func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ChannelBannersInsertCall {
11422	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
11423	return c
11424}
11425
11426// ResumableMedia specifies the media to upload in chunks and can be
11427// canceled with ctx.
11428//
11429// Deprecated: use Media instead.
11430//
11431// At most one of Media and ResumableMedia may be set. mediaType
11432// identifies the MIME media type of the upload, such as "image/png". If
11433// mediaType is "", it will be auto-detected. The provided ctx will
11434// supersede any context previously provided to the Context method.
11435func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ChannelBannersInsertCall {
11436	c.ctx_ = ctx
11437	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
11438	return c
11439}
11440
11441// ProgressUpdater provides a callback function that will be called
11442// after every chunk. It should be a low-latency function in order to
11443// not slow down the upload operation. This should only be called when
11444// using ResumableMedia (as opposed to Media).
11445func (c *ChannelBannersInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ChannelBannersInsertCall {
11446	c.mediaInfo_.SetProgressUpdater(pu)
11447	return c
11448}
11449
11450// Fields allows partial responses to be retrieved. See
11451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11452// for more information.
11453func (c *ChannelBannersInsertCall) Fields(s ...googleapi.Field) *ChannelBannersInsertCall {
11454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11455	return c
11456}
11457
11458// Context sets the context to be used in this call's Do method. Any
11459// pending HTTP request will be aborted if the provided context is
11460// canceled.
11461// This context will supersede any context previously provided to the
11462// ResumableMedia method.
11463func (c *ChannelBannersInsertCall) Context(ctx context.Context) *ChannelBannersInsertCall {
11464	c.ctx_ = ctx
11465	return c
11466}
11467
11468// Header returns an http.Header that can be modified by the caller to
11469// add HTTP headers to the request.
11470func (c *ChannelBannersInsertCall) Header() http.Header {
11471	if c.header_ == nil {
11472		c.header_ = make(http.Header)
11473	}
11474	return c.header_
11475}
11476
11477func (c *ChannelBannersInsertCall) doRequest(alt string) (*http.Response, error) {
11478	reqHeaders := make(http.Header)
11479	for k, v := range c.header_ {
11480		reqHeaders[k] = v
11481	}
11482	reqHeaders.Set("User-Agent", c.s.userAgent())
11483	var body io.Reader = nil
11484	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelbannerresource)
11485	if err != nil {
11486		return nil, err
11487	}
11488	reqHeaders.Set("Content-Type", "application/json")
11489	c.urlParams_.Set("alt", alt)
11490	c.urlParams_.Set("prettyPrint", "false")
11491	urls := googleapi.ResolveRelative(c.s.BasePath, "channelBanners/insert")
11492	if c.mediaInfo_ != nil {
11493		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
11494		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
11495	}
11496	if body == nil {
11497		body = new(bytes.Buffer)
11498		reqHeaders.Set("Content-Type", "application/json")
11499	}
11500	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
11501	defer cleanup()
11502	urls += "?" + c.urlParams_.Encode()
11503	req, err := http.NewRequest("POST", urls, body)
11504	if err != nil {
11505		return nil, err
11506	}
11507	req.Header = reqHeaders
11508	req.GetBody = getBody
11509	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11510}
11511
11512// Do executes the "youtube.channelBanners.insert" call.
11513// Exactly one of *ChannelBannerResource or error will be non-nil. Any
11514// non-2xx status code is an error. Response headers are in either
11515// *ChannelBannerResource.ServerResponse.Header or (if a response was
11516// returned at all) in error.(*googleapi.Error).Header. Use
11517// googleapi.IsNotModified to check whether the returned error was
11518// because http.StatusNotModified was returned.
11519func (c *ChannelBannersInsertCall) Do(opts ...googleapi.CallOption) (*ChannelBannerResource, error) {
11520	gensupport.SetOptions(c.urlParams_, opts...)
11521	res, err := c.doRequest("json")
11522	if res != nil && res.StatusCode == http.StatusNotModified {
11523		if res.Body != nil {
11524			res.Body.Close()
11525		}
11526		return nil, &googleapi.Error{
11527			Code:   res.StatusCode,
11528			Header: res.Header,
11529		}
11530	}
11531	if err != nil {
11532		return nil, err
11533	}
11534	defer googleapi.CloseBody(res)
11535	if err := googleapi.CheckResponse(res); err != nil {
11536		return nil, err
11537	}
11538	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
11539	if rx != nil {
11540		rx.Client = c.s.client
11541		rx.UserAgent = c.s.userAgent()
11542		ctx := c.ctx_
11543		if ctx == nil {
11544			ctx = context.TODO()
11545		}
11546		res, err = rx.Upload(ctx)
11547		if err != nil {
11548			return nil, err
11549		}
11550		defer res.Body.Close()
11551		if err := googleapi.CheckResponse(res); err != nil {
11552			return nil, err
11553		}
11554	}
11555	ret := &ChannelBannerResource{
11556		ServerResponse: googleapi.ServerResponse{
11557			Header:         res.Header,
11558			HTTPStatusCode: res.StatusCode,
11559		},
11560	}
11561	target := &ret
11562	if err := gensupport.DecodeResponse(target, res); err != nil {
11563		return nil, err
11564	}
11565	return ret, nil
11566	// {
11567	//   "description": "Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel:\n\n- Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels.\n- Extract the url property's value from the response that the API returns for step 1.\n- Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2.",
11568	//   "httpMethod": "POST",
11569	//   "id": "youtube.channelBanners.insert",
11570	//   "mediaUpload": {
11571	//     "accept": [
11572	//       "application/octet-stream",
11573	//       "image/jpeg",
11574	//       "image/png"
11575	//     ],
11576	//     "maxSize": "6MB",
11577	//     "protocols": {
11578	//       "resumable": {
11579	//         "multipart": true,
11580	//         "path": "/resumable/upload/youtube/v3/channelBanners/insert"
11581	//       },
11582	//       "simple": {
11583	//         "multipart": true,
11584	//         "path": "/upload/youtube/v3/channelBanners/insert"
11585	//       }
11586	//     }
11587	//   },
11588	//   "parameters": {
11589	//     "channelId": {
11590	//       "description": "The channelId parameter identifies the YouTube channel to which the banner is uploaded. The channelId parameter was introduced as a required parameter in May 2017. As this was a backward-incompatible change, channelBanners.insert requests that do not specify this parameter will not return an error until six months have passed from the time that the parameter was introduced. Please see the API Terms of Service for the official policy regarding backward incompatible changes and the API revision history for the exact date that the parameter was introduced.",
11591	//       "location": "query",
11592	//       "type": "string"
11593	//     },
11594	//     "onBehalfOfContentOwner": {
11595	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
11596	//       "location": "query",
11597	//       "type": "string"
11598	//     }
11599	//   },
11600	//   "path": "channelBanners/insert",
11601	//   "request": {
11602	//     "$ref": "ChannelBannerResource"
11603	//   },
11604	//   "response": {
11605	//     "$ref": "ChannelBannerResource"
11606	//   },
11607	//   "scopes": [
11608	//     "https://www.googleapis.com/auth/youtube",
11609	//     "https://www.googleapis.com/auth/youtube.force-ssl",
11610	//     "https://www.googleapis.com/auth/youtube.upload"
11611	//   ],
11612	//   "supportsMediaUpload": true
11613	// }
11614
11615}
11616
11617// method id "youtube.channelSections.delete":
11618
11619type ChannelSectionsDeleteCall struct {
11620	s          *Service
11621	urlParams_ gensupport.URLParams
11622	ctx_       context.Context
11623	header_    http.Header
11624}
11625
11626// Delete: Deletes a channelSection.
11627func (r *ChannelSectionsService) Delete(id string) *ChannelSectionsDeleteCall {
11628	c := &ChannelSectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11629	c.urlParams_.Set("id", id)
11630	return c
11631}
11632
11633// OnBehalfOfContentOwner sets the optional parameter
11634// "onBehalfOfContentOwner": Note: This parameter is intended
11635// exclusively for YouTube content partners.
11636//
11637// The onBehalfOfContentOwner parameter indicates that the request's
11638// authorization credentials identify a YouTube CMS user who is acting
11639// on behalf of the content owner specified in the parameter value. This
11640// parameter is intended for YouTube content partners that own and
11641// manage many different YouTube channels. It allows content owners to
11642// authenticate once and get access to all their video and channel data,
11643// without having to provide authentication credentials for each
11644// individual channel. The CMS account that the user authenticates with
11645// must be linked to the specified YouTube content owner.
11646func (c *ChannelSectionsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsDeleteCall {
11647	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11648	return c
11649}
11650
11651// Fields allows partial responses to be retrieved. See
11652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11653// for more information.
11654func (c *ChannelSectionsDeleteCall) Fields(s ...googleapi.Field) *ChannelSectionsDeleteCall {
11655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11656	return c
11657}
11658
11659// Context sets the context to be used in this call's Do method. Any
11660// pending HTTP request will be aborted if the provided context is
11661// canceled.
11662func (c *ChannelSectionsDeleteCall) Context(ctx context.Context) *ChannelSectionsDeleteCall {
11663	c.ctx_ = ctx
11664	return c
11665}
11666
11667// Header returns an http.Header that can be modified by the caller to
11668// add HTTP headers to the request.
11669func (c *ChannelSectionsDeleteCall) Header() http.Header {
11670	if c.header_ == nil {
11671		c.header_ = make(http.Header)
11672	}
11673	return c.header_
11674}
11675
11676func (c *ChannelSectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
11677	reqHeaders := make(http.Header)
11678	for k, v := range c.header_ {
11679		reqHeaders[k] = v
11680	}
11681	reqHeaders.Set("User-Agent", c.s.userAgent())
11682	var body io.Reader = nil
11683	c.urlParams_.Set("alt", alt)
11684	c.urlParams_.Set("prettyPrint", "false")
11685	urls := googleapi.ResolveRelative(c.s.BasePath, "channelSections")
11686	urls += "?" + c.urlParams_.Encode()
11687	req, err := http.NewRequest("DELETE", urls, body)
11688	if err != nil {
11689		return nil, err
11690	}
11691	req.Header = reqHeaders
11692	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11693}
11694
11695// Do executes the "youtube.channelSections.delete" call.
11696func (c *ChannelSectionsDeleteCall) Do(opts ...googleapi.CallOption) error {
11697	gensupport.SetOptions(c.urlParams_, opts...)
11698	res, err := c.doRequest("json")
11699	if err != nil {
11700		return err
11701	}
11702	defer googleapi.CloseBody(res)
11703	if err := googleapi.CheckResponse(res); err != nil {
11704		return err
11705	}
11706	return nil
11707	// {
11708	//   "description": "Deletes a channelSection.",
11709	//   "httpMethod": "DELETE",
11710	//   "id": "youtube.channelSections.delete",
11711	//   "parameterOrder": [
11712	//     "id"
11713	//   ],
11714	//   "parameters": {
11715	//     "id": {
11716	//       "description": "The id parameter specifies the YouTube channelSection ID for the resource that is being deleted. In a channelSection resource, the id property specifies the YouTube channelSection ID.",
11717	//       "location": "query",
11718	//       "required": true,
11719	//       "type": "string"
11720	//     },
11721	//     "onBehalfOfContentOwner": {
11722	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
11723	//       "location": "query",
11724	//       "type": "string"
11725	//     }
11726	//   },
11727	//   "path": "channelSections",
11728	//   "scopes": [
11729	//     "https://www.googleapis.com/auth/youtube",
11730	//     "https://www.googleapis.com/auth/youtube.force-ssl",
11731	//     "https://www.googleapis.com/auth/youtubepartner"
11732	//   ]
11733	// }
11734
11735}
11736
11737// method id "youtube.channelSections.insert":
11738
11739type ChannelSectionsInsertCall struct {
11740	s              *Service
11741	channelsection *ChannelSection
11742	urlParams_     gensupport.URLParams
11743	ctx_           context.Context
11744	header_        http.Header
11745}
11746
11747// Insert: Adds a channelSection for the authenticated user's channel.
11748func (r *ChannelSectionsService) Insert(part string, channelsection *ChannelSection) *ChannelSectionsInsertCall {
11749	c := &ChannelSectionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11750	c.urlParams_.Set("part", part)
11751	c.channelsection = channelsection
11752	return c
11753}
11754
11755// OnBehalfOfContentOwner sets the optional parameter
11756// "onBehalfOfContentOwner": Note: This parameter is intended
11757// exclusively for YouTube content partners.
11758//
11759// The onBehalfOfContentOwner parameter indicates that the request's
11760// authorization credentials identify a YouTube CMS user who is acting
11761// on behalf of the content owner specified in the parameter value. This
11762// parameter is intended for YouTube content partners that own and
11763// manage many different YouTube channels. It allows content owners to
11764// authenticate once and get access to all their video and channel data,
11765// without having to provide authentication credentials for each
11766// individual channel. The CMS account that the user authenticates with
11767// must be linked to the specified YouTube content owner.
11768func (c *ChannelSectionsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsInsertCall {
11769	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11770	return c
11771}
11772
11773// OnBehalfOfContentOwnerChannel sets the optional parameter
11774// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
11775// properly authorized request. Note: This parameter is intended
11776// exclusively for YouTube content partners.
11777//
11778// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
11779// channel ID of the channel to which a video is being added. This
11780// parameter is required when a request specifies a value for the
11781// onBehalfOfContentOwner parameter, and it can only be used in
11782// conjunction with that parameter. In addition, the request must be
11783// authorized using a CMS account that is linked to the content owner
11784// that the onBehalfOfContentOwner parameter specifies. Finally, the
11785// channel that the onBehalfOfContentOwnerChannel parameter value
11786// specifies must be linked to the content owner that the
11787// onBehalfOfContentOwner parameter specifies.
11788//
11789// This parameter is intended for YouTube content partners that own and
11790// manage many different YouTube channels. It allows content owners to
11791// authenticate once and perform actions on behalf of the channel
11792// specified in the parameter value, without having to provide
11793// authentication credentials for each separate channel.
11794func (c *ChannelSectionsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *ChannelSectionsInsertCall {
11795	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
11796	return c
11797}
11798
11799// Fields allows partial responses to be retrieved. See
11800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11801// for more information.
11802func (c *ChannelSectionsInsertCall) Fields(s ...googleapi.Field) *ChannelSectionsInsertCall {
11803	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11804	return c
11805}
11806
11807// Context sets the context to be used in this call's Do method. Any
11808// pending HTTP request will be aborted if the provided context is
11809// canceled.
11810func (c *ChannelSectionsInsertCall) Context(ctx context.Context) *ChannelSectionsInsertCall {
11811	c.ctx_ = ctx
11812	return c
11813}
11814
11815// Header returns an http.Header that can be modified by the caller to
11816// add HTTP headers to the request.
11817func (c *ChannelSectionsInsertCall) Header() http.Header {
11818	if c.header_ == nil {
11819		c.header_ = make(http.Header)
11820	}
11821	return c.header_
11822}
11823
11824func (c *ChannelSectionsInsertCall) doRequest(alt string) (*http.Response, error) {
11825	reqHeaders := make(http.Header)
11826	for k, v := range c.header_ {
11827		reqHeaders[k] = v
11828	}
11829	reqHeaders.Set("User-Agent", c.s.userAgent())
11830	var body io.Reader = nil
11831	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
11832	if err != nil {
11833		return nil, err
11834	}
11835	reqHeaders.Set("Content-Type", "application/json")
11836	c.urlParams_.Set("alt", alt)
11837	c.urlParams_.Set("prettyPrint", "false")
11838	urls := googleapi.ResolveRelative(c.s.BasePath, "channelSections")
11839	urls += "?" + c.urlParams_.Encode()
11840	req, err := http.NewRequest("POST", urls, body)
11841	if err != nil {
11842		return nil, err
11843	}
11844	req.Header = reqHeaders
11845	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11846}
11847
11848// Do executes the "youtube.channelSections.insert" call.
11849// Exactly one of *ChannelSection or error will be non-nil. Any non-2xx
11850// status code is an error. Response headers are in either
11851// *ChannelSection.ServerResponse.Header or (if a response was returned
11852// at all) in error.(*googleapi.Error).Header. Use
11853// googleapi.IsNotModified to check whether the returned error was
11854// because http.StatusNotModified was returned.
11855func (c *ChannelSectionsInsertCall) Do(opts ...googleapi.CallOption) (*ChannelSection, error) {
11856	gensupport.SetOptions(c.urlParams_, opts...)
11857	res, err := c.doRequest("json")
11858	if res != nil && res.StatusCode == http.StatusNotModified {
11859		if res.Body != nil {
11860			res.Body.Close()
11861		}
11862		return nil, &googleapi.Error{
11863			Code:   res.StatusCode,
11864			Header: res.Header,
11865		}
11866	}
11867	if err != nil {
11868		return nil, err
11869	}
11870	defer googleapi.CloseBody(res)
11871	if err := googleapi.CheckResponse(res); err != nil {
11872		return nil, err
11873	}
11874	ret := &ChannelSection{
11875		ServerResponse: googleapi.ServerResponse{
11876			Header:         res.Header,
11877			HTTPStatusCode: res.StatusCode,
11878		},
11879	}
11880	target := &ret
11881	if err := gensupport.DecodeResponse(target, res); err != nil {
11882		return nil, err
11883	}
11884	return ret, nil
11885	// {
11886	//   "description": "Adds a channelSection for the authenticated user's channel.",
11887	//   "httpMethod": "POST",
11888	//   "id": "youtube.channelSections.insert",
11889	//   "parameterOrder": [
11890	//     "part"
11891	//   ],
11892	//   "parameters": {
11893	//     "onBehalfOfContentOwner": {
11894	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
11895	//       "location": "query",
11896	//       "type": "string"
11897	//     },
11898	//     "onBehalfOfContentOwnerChannel": {
11899	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
11900	//       "location": "query",
11901	//       "type": "string"
11902	//     },
11903	//     "part": {
11904	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe part names that you can include in the parameter value are snippet and contentDetails.",
11905	//       "location": "query",
11906	//       "required": true,
11907	//       "type": "string"
11908	//     }
11909	//   },
11910	//   "path": "channelSections",
11911	//   "request": {
11912	//     "$ref": "ChannelSection"
11913	//   },
11914	//   "response": {
11915	//     "$ref": "ChannelSection"
11916	//   },
11917	//   "scopes": [
11918	//     "https://www.googleapis.com/auth/youtube",
11919	//     "https://www.googleapis.com/auth/youtube.force-ssl",
11920	//     "https://www.googleapis.com/auth/youtubepartner"
11921	//   ]
11922	// }
11923
11924}
11925
11926// method id "youtube.channelSections.list":
11927
11928type ChannelSectionsListCall struct {
11929	s            *Service
11930	urlParams_   gensupport.URLParams
11931	ifNoneMatch_ string
11932	ctx_         context.Context
11933	header_      http.Header
11934}
11935
11936// List: Returns channelSection resources that match the API request
11937// criteria.
11938func (r *ChannelSectionsService) List(part string) *ChannelSectionsListCall {
11939	c := &ChannelSectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11940	c.urlParams_.Set("part", part)
11941	return c
11942}
11943
11944// ChannelId sets the optional parameter "channelId": The channelId
11945// parameter specifies a YouTube channel ID. The API will only return
11946// that channel's channelSections.
11947func (c *ChannelSectionsListCall) ChannelId(channelId string) *ChannelSectionsListCall {
11948	c.urlParams_.Set("channelId", channelId)
11949	return c
11950}
11951
11952// Hl sets the optional parameter "hl": The hl parameter indicates that
11953// the snippet.localized property values in the returned channelSection
11954// resources should be in the specified language if localized values for
11955// that language are available. For example, if the API request
11956// specifies hl=de, the snippet.localized properties in the API response
11957// will contain German titles if German titles are available. Channel
11958// owners can provide localized channel section titles using either the
11959// channelSections.insert or channelSections.update method.
11960func (c *ChannelSectionsListCall) Hl(hl string) *ChannelSectionsListCall {
11961	c.urlParams_.Set("hl", hl)
11962	return c
11963}
11964
11965// Id sets the optional parameter "id": The id parameter specifies a
11966// comma-separated list of the YouTube channelSection ID(s) for the
11967// resource(s) that are being retrieved. In a channelSection resource,
11968// the id property specifies the YouTube channelSection ID.
11969func (c *ChannelSectionsListCall) Id(id string) *ChannelSectionsListCall {
11970	c.urlParams_.Set("id", id)
11971	return c
11972}
11973
11974// Mine sets the optional parameter "mine": Set this parameter's value
11975// to true to retrieve a feed of the authenticated user's
11976// channelSections.
11977func (c *ChannelSectionsListCall) Mine(mine bool) *ChannelSectionsListCall {
11978	c.urlParams_.Set("mine", fmt.Sprint(mine))
11979	return c
11980}
11981
11982// OnBehalfOfContentOwner sets the optional parameter
11983// "onBehalfOfContentOwner": Note: This parameter is intended
11984// exclusively for YouTube content partners.
11985//
11986// The onBehalfOfContentOwner parameter indicates that the request's
11987// authorization credentials identify a YouTube CMS user who is acting
11988// on behalf of the content owner specified in the parameter value. This
11989// parameter is intended for YouTube content partners that own and
11990// manage many different YouTube channels. It allows content owners to
11991// authenticate once and get access to all their video and channel data,
11992// without having to provide authentication credentials for each
11993// individual channel. The CMS account that the user authenticates with
11994// must be linked to the specified YouTube content owner.
11995func (c *ChannelSectionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsListCall {
11996	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
11997	return c
11998}
11999
12000// Fields allows partial responses to be retrieved. See
12001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12002// for more information.
12003func (c *ChannelSectionsListCall) Fields(s ...googleapi.Field) *ChannelSectionsListCall {
12004	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12005	return c
12006}
12007
12008// IfNoneMatch sets the optional parameter which makes the operation
12009// fail if the object's ETag matches the given value. This is useful for
12010// getting updates only after the object has changed since the last
12011// request. Use googleapi.IsNotModified to check whether the response
12012// error from Do is the result of In-None-Match.
12013func (c *ChannelSectionsListCall) IfNoneMatch(entityTag string) *ChannelSectionsListCall {
12014	c.ifNoneMatch_ = entityTag
12015	return c
12016}
12017
12018// Context sets the context to be used in this call's Do method. Any
12019// pending HTTP request will be aborted if the provided context is
12020// canceled.
12021func (c *ChannelSectionsListCall) Context(ctx context.Context) *ChannelSectionsListCall {
12022	c.ctx_ = ctx
12023	return c
12024}
12025
12026// Header returns an http.Header that can be modified by the caller to
12027// add HTTP headers to the request.
12028func (c *ChannelSectionsListCall) Header() http.Header {
12029	if c.header_ == nil {
12030		c.header_ = make(http.Header)
12031	}
12032	return c.header_
12033}
12034
12035func (c *ChannelSectionsListCall) doRequest(alt string) (*http.Response, error) {
12036	reqHeaders := make(http.Header)
12037	for k, v := range c.header_ {
12038		reqHeaders[k] = v
12039	}
12040	reqHeaders.Set("User-Agent", c.s.userAgent())
12041	if c.ifNoneMatch_ != "" {
12042		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12043	}
12044	var body io.Reader = nil
12045	c.urlParams_.Set("alt", alt)
12046	c.urlParams_.Set("prettyPrint", "false")
12047	urls := googleapi.ResolveRelative(c.s.BasePath, "channelSections")
12048	urls += "?" + c.urlParams_.Encode()
12049	req, err := http.NewRequest("GET", urls, body)
12050	if err != nil {
12051		return nil, err
12052	}
12053	req.Header = reqHeaders
12054	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12055}
12056
12057// Do executes the "youtube.channelSections.list" call.
12058// Exactly one of *ChannelSectionListResponse or error will be non-nil.
12059// Any non-2xx status code is an error. Response headers are in either
12060// *ChannelSectionListResponse.ServerResponse.Header or (if a response
12061// was returned at all) in error.(*googleapi.Error).Header. Use
12062// googleapi.IsNotModified to check whether the returned error was
12063// because http.StatusNotModified was returned.
12064func (c *ChannelSectionsListCall) Do(opts ...googleapi.CallOption) (*ChannelSectionListResponse, error) {
12065	gensupport.SetOptions(c.urlParams_, opts...)
12066	res, err := c.doRequest("json")
12067	if res != nil && res.StatusCode == http.StatusNotModified {
12068		if res.Body != nil {
12069			res.Body.Close()
12070		}
12071		return nil, &googleapi.Error{
12072			Code:   res.StatusCode,
12073			Header: res.Header,
12074		}
12075	}
12076	if err != nil {
12077		return nil, err
12078	}
12079	defer googleapi.CloseBody(res)
12080	if err := googleapi.CheckResponse(res); err != nil {
12081		return nil, err
12082	}
12083	ret := &ChannelSectionListResponse{
12084		ServerResponse: googleapi.ServerResponse{
12085			Header:         res.Header,
12086			HTTPStatusCode: res.StatusCode,
12087		},
12088	}
12089	target := &ret
12090	if err := gensupport.DecodeResponse(target, res); err != nil {
12091		return nil, err
12092	}
12093	return ret, nil
12094	// {
12095	//   "description": "Returns channelSection resources that match the API request criteria.",
12096	//   "httpMethod": "GET",
12097	//   "id": "youtube.channelSections.list",
12098	//   "parameterOrder": [
12099	//     "part"
12100	//   ],
12101	//   "parameters": {
12102	//     "channelId": {
12103	//       "description": "The channelId parameter specifies a YouTube channel ID. The API will only return that channel's channelSections.",
12104	//       "location": "query",
12105	//       "type": "string"
12106	//     },
12107	//     "hl": {
12108	//       "description": "The hl parameter indicates that the snippet.localized property values in the returned channelSection resources should be in the specified language if localized values for that language are available. For example, if the API request specifies hl=de, the snippet.localized properties in the API response will contain German titles if German titles are available. Channel owners can provide localized channel section titles using either the channelSections.insert or channelSections.update method.",
12109	//       "location": "query",
12110	//       "type": "string"
12111	//     },
12112	//     "id": {
12113	//       "description": "The id parameter specifies a comma-separated list of the YouTube channelSection ID(s) for the resource(s) that are being retrieved. In a channelSection resource, the id property specifies the YouTube channelSection ID.",
12114	//       "location": "query",
12115	//       "type": "string"
12116	//     },
12117	//     "mine": {
12118	//       "description": "Set this parameter's value to true to retrieve a feed of the authenticated user's channelSections.",
12119	//       "location": "query",
12120	//       "type": "boolean"
12121	//     },
12122	//     "onBehalfOfContentOwner": {
12123	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
12124	//       "location": "query",
12125	//       "type": "string"
12126	//     },
12127	//     "part": {
12128	//       "description": "The part parameter specifies a comma-separated list of one or more channelSection resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channelSection resource, the snippet property contains other properties, such as a display title for the channelSection. If you set part=snippet, the API response will also contain all of those nested properties.",
12129	//       "location": "query",
12130	//       "required": true,
12131	//       "type": "string"
12132	//     }
12133	//   },
12134	//   "path": "channelSections",
12135	//   "response": {
12136	//     "$ref": "ChannelSectionListResponse"
12137	//   },
12138	//   "scopes": [
12139	//     "https://www.googleapis.com/auth/youtube",
12140	//     "https://www.googleapis.com/auth/youtube.force-ssl",
12141	//     "https://www.googleapis.com/auth/youtube.readonly",
12142	//     "https://www.googleapis.com/auth/youtubepartner"
12143	//   ]
12144	// }
12145
12146}
12147
12148// method id "youtube.channelSections.update":
12149
12150type ChannelSectionsUpdateCall struct {
12151	s              *Service
12152	channelsection *ChannelSection
12153	urlParams_     gensupport.URLParams
12154	ctx_           context.Context
12155	header_        http.Header
12156}
12157
12158// Update: Update a channelSection.
12159func (r *ChannelSectionsService) Update(part string, channelsection *ChannelSection) *ChannelSectionsUpdateCall {
12160	c := &ChannelSectionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12161	c.urlParams_.Set("part", part)
12162	c.channelsection = channelsection
12163	return c
12164}
12165
12166// OnBehalfOfContentOwner sets the optional parameter
12167// "onBehalfOfContentOwner": Note: This parameter is intended
12168// exclusively for YouTube content partners.
12169//
12170// The onBehalfOfContentOwner parameter indicates that the request's
12171// authorization credentials identify a YouTube CMS user who is acting
12172// on behalf of the content owner specified in the parameter value. This
12173// parameter is intended for YouTube content partners that own and
12174// manage many different YouTube channels. It allows content owners to
12175// authenticate once and get access to all their video and channel data,
12176// without having to provide authentication credentials for each
12177// individual channel. The CMS account that the user authenticates with
12178// must be linked to the specified YouTube content owner.
12179func (c *ChannelSectionsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsUpdateCall {
12180	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12181	return c
12182}
12183
12184// Fields allows partial responses to be retrieved. See
12185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12186// for more information.
12187func (c *ChannelSectionsUpdateCall) Fields(s ...googleapi.Field) *ChannelSectionsUpdateCall {
12188	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12189	return c
12190}
12191
12192// Context sets the context to be used in this call's Do method. Any
12193// pending HTTP request will be aborted if the provided context is
12194// canceled.
12195func (c *ChannelSectionsUpdateCall) Context(ctx context.Context) *ChannelSectionsUpdateCall {
12196	c.ctx_ = ctx
12197	return c
12198}
12199
12200// Header returns an http.Header that can be modified by the caller to
12201// add HTTP headers to the request.
12202func (c *ChannelSectionsUpdateCall) Header() http.Header {
12203	if c.header_ == nil {
12204		c.header_ = make(http.Header)
12205	}
12206	return c.header_
12207}
12208
12209func (c *ChannelSectionsUpdateCall) doRequest(alt string) (*http.Response, error) {
12210	reqHeaders := make(http.Header)
12211	for k, v := range c.header_ {
12212		reqHeaders[k] = v
12213	}
12214	reqHeaders.Set("User-Agent", c.s.userAgent())
12215	var body io.Reader = nil
12216	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
12217	if err != nil {
12218		return nil, err
12219	}
12220	reqHeaders.Set("Content-Type", "application/json")
12221	c.urlParams_.Set("alt", alt)
12222	c.urlParams_.Set("prettyPrint", "false")
12223	urls := googleapi.ResolveRelative(c.s.BasePath, "channelSections")
12224	urls += "?" + c.urlParams_.Encode()
12225	req, err := http.NewRequest("PUT", urls, body)
12226	if err != nil {
12227		return nil, err
12228	}
12229	req.Header = reqHeaders
12230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12231}
12232
12233// Do executes the "youtube.channelSections.update" call.
12234// Exactly one of *ChannelSection or error will be non-nil. Any non-2xx
12235// status code is an error. Response headers are in either
12236// *ChannelSection.ServerResponse.Header or (if a response was returned
12237// at all) in error.(*googleapi.Error).Header. Use
12238// googleapi.IsNotModified to check whether the returned error was
12239// because http.StatusNotModified was returned.
12240func (c *ChannelSectionsUpdateCall) Do(opts ...googleapi.CallOption) (*ChannelSection, error) {
12241	gensupport.SetOptions(c.urlParams_, opts...)
12242	res, err := c.doRequest("json")
12243	if res != nil && res.StatusCode == http.StatusNotModified {
12244		if res.Body != nil {
12245			res.Body.Close()
12246		}
12247		return nil, &googleapi.Error{
12248			Code:   res.StatusCode,
12249			Header: res.Header,
12250		}
12251	}
12252	if err != nil {
12253		return nil, err
12254	}
12255	defer googleapi.CloseBody(res)
12256	if err := googleapi.CheckResponse(res); err != nil {
12257		return nil, err
12258	}
12259	ret := &ChannelSection{
12260		ServerResponse: googleapi.ServerResponse{
12261			Header:         res.Header,
12262			HTTPStatusCode: res.StatusCode,
12263		},
12264	}
12265	target := &ret
12266	if err := gensupport.DecodeResponse(target, res); err != nil {
12267		return nil, err
12268	}
12269	return ret, nil
12270	// {
12271	//   "description": "Update a channelSection.",
12272	//   "httpMethod": "PUT",
12273	//   "id": "youtube.channelSections.update",
12274	//   "parameterOrder": [
12275	//     "part"
12276	//   ],
12277	//   "parameters": {
12278	//     "onBehalfOfContentOwner": {
12279	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
12280	//       "location": "query",
12281	//       "type": "string"
12282	//     },
12283	//     "part": {
12284	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe part names that you can include in the parameter value are snippet and contentDetails.",
12285	//       "location": "query",
12286	//       "required": true,
12287	//       "type": "string"
12288	//     }
12289	//   },
12290	//   "path": "channelSections",
12291	//   "request": {
12292	//     "$ref": "ChannelSection"
12293	//   },
12294	//   "response": {
12295	//     "$ref": "ChannelSection"
12296	//   },
12297	//   "scopes": [
12298	//     "https://www.googleapis.com/auth/youtube",
12299	//     "https://www.googleapis.com/auth/youtube.force-ssl",
12300	//     "https://www.googleapis.com/auth/youtubepartner"
12301	//   ]
12302	// }
12303
12304}
12305
12306// method id "youtube.channels.list":
12307
12308type ChannelsListCall struct {
12309	s            *Service
12310	urlParams_   gensupport.URLParams
12311	ifNoneMatch_ string
12312	ctx_         context.Context
12313	header_      http.Header
12314}
12315
12316// List: Returns a collection of zero or more channel resources that
12317// match the request criteria.
12318func (r *ChannelsService) List(part string) *ChannelsListCall {
12319	c := &ChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12320	c.urlParams_.Set("part", part)
12321	return c
12322}
12323
12324// CategoryId sets the optional parameter "categoryId": The categoryId
12325// parameter specifies a YouTube guide category, thereby requesting
12326// YouTube channels associated with that category.
12327func (c *ChannelsListCall) CategoryId(categoryId string) *ChannelsListCall {
12328	c.urlParams_.Set("categoryId", categoryId)
12329	return c
12330}
12331
12332// ForUsername sets the optional parameter "forUsername": The
12333// forUsername parameter specifies a YouTube username, thereby
12334// requesting the channel associated with that username.
12335func (c *ChannelsListCall) ForUsername(forUsername string) *ChannelsListCall {
12336	c.urlParams_.Set("forUsername", forUsername)
12337	return c
12338}
12339
12340// Hl sets the optional parameter "hl": The hl parameter should be used
12341// for filter out the properties that are not in the given language.
12342// Used for the brandingSettings part.
12343func (c *ChannelsListCall) Hl(hl string) *ChannelsListCall {
12344	c.urlParams_.Set("hl", hl)
12345	return c
12346}
12347
12348// Id sets the optional parameter "id": The id parameter specifies a
12349// comma-separated list of the YouTube channel ID(s) for the resource(s)
12350// that are being retrieved. In a channel resource, the id property
12351// specifies the channel's YouTube channel ID.
12352func (c *ChannelsListCall) Id(id string) *ChannelsListCall {
12353	c.urlParams_.Set("id", id)
12354	return c
12355}
12356
12357// ManagedByMe sets the optional parameter "managedByMe": Note: This
12358// parameter is intended exclusively for YouTube content partners.
12359//
12360// Set this parameter's value to true to instruct the API to only return
12361// channels managed by the content owner that the onBehalfOfContentOwner
12362// parameter specifies. The user must be authenticated as a CMS account
12363// linked to the specified content owner and onBehalfOfContentOwner must
12364// be provided.
12365func (c *ChannelsListCall) ManagedByMe(managedByMe bool) *ChannelsListCall {
12366	c.urlParams_.Set("managedByMe", fmt.Sprint(managedByMe))
12367	return c
12368}
12369
12370// MaxResults sets the optional parameter "maxResults": The maxResults
12371// parameter specifies the maximum number of items that should be
12372// returned in the result set.
12373func (c *ChannelsListCall) MaxResults(maxResults int64) *ChannelsListCall {
12374	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12375	return c
12376}
12377
12378// Mine sets the optional parameter "mine": Set this parameter's value
12379// to true to instruct the API to only return channels owned by the
12380// authenticated user.
12381func (c *ChannelsListCall) Mine(mine bool) *ChannelsListCall {
12382	c.urlParams_.Set("mine", fmt.Sprint(mine))
12383	return c
12384}
12385
12386// MySubscribers sets the optional parameter "mySubscribers": Use the
12387// subscriptions.list method and its mySubscribers parameter to retrieve
12388// a list of subscribers to the authenticated user's channel.
12389func (c *ChannelsListCall) MySubscribers(mySubscribers bool) *ChannelsListCall {
12390	c.urlParams_.Set("mySubscribers", fmt.Sprint(mySubscribers))
12391	return c
12392}
12393
12394// OnBehalfOfContentOwner sets the optional parameter
12395// "onBehalfOfContentOwner": Note: This parameter is intended
12396// exclusively for YouTube content partners.
12397//
12398// The onBehalfOfContentOwner parameter indicates that the request's
12399// authorization credentials identify a YouTube CMS user who is acting
12400// on behalf of the content owner specified in the parameter value. This
12401// parameter is intended for YouTube content partners that own and
12402// manage many different YouTube channels. It allows content owners to
12403// authenticate once and get access to all their video and channel data,
12404// without having to provide authentication credentials for each
12405// individual channel. The CMS account that the user authenticates with
12406// must be linked to the specified YouTube content owner.
12407func (c *ChannelsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelsListCall {
12408	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12409	return c
12410}
12411
12412// PageToken sets the optional parameter "pageToken": The pageToken
12413// parameter identifies a specific page in the result set that should be
12414// returned. In an API response, the nextPageToken and prevPageToken
12415// properties identify other pages that could be retrieved.
12416func (c *ChannelsListCall) PageToken(pageToken string) *ChannelsListCall {
12417	c.urlParams_.Set("pageToken", pageToken)
12418	return c
12419}
12420
12421// Fields allows partial responses to be retrieved. See
12422// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12423// for more information.
12424func (c *ChannelsListCall) Fields(s ...googleapi.Field) *ChannelsListCall {
12425	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12426	return c
12427}
12428
12429// IfNoneMatch sets the optional parameter which makes the operation
12430// fail if the object's ETag matches the given value. This is useful for
12431// getting updates only after the object has changed since the last
12432// request. Use googleapi.IsNotModified to check whether the response
12433// error from Do is the result of In-None-Match.
12434func (c *ChannelsListCall) IfNoneMatch(entityTag string) *ChannelsListCall {
12435	c.ifNoneMatch_ = entityTag
12436	return c
12437}
12438
12439// Context sets the context to be used in this call's Do method. Any
12440// pending HTTP request will be aborted if the provided context is
12441// canceled.
12442func (c *ChannelsListCall) Context(ctx context.Context) *ChannelsListCall {
12443	c.ctx_ = ctx
12444	return c
12445}
12446
12447// Header returns an http.Header that can be modified by the caller to
12448// add HTTP headers to the request.
12449func (c *ChannelsListCall) Header() http.Header {
12450	if c.header_ == nil {
12451		c.header_ = make(http.Header)
12452	}
12453	return c.header_
12454}
12455
12456func (c *ChannelsListCall) doRequest(alt string) (*http.Response, error) {
12457	reqHeaders := make(http.Header)
12458	for k, v := range c.header_ {
12459		reqHeaders[k] = v
12460	}
12461	reqHeaders.Set("User-Agent", c.s.userAgent())
12462	if c.ifNoneMatch_ != "" {
12463		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12464	}
12465	var body io.Reader = nil
12466	c.urlParams_.Set("alt", alt)
12467	c.urlParams_.Set("prettyPrint", "false")
12468	urls := googleapi.ResolveRelative(c.s.BasePath, "channels")
12469	urls += "?" + c.urlParams_.Encode()
12470	req, err := http.NewRequest("GET", urls, body)
12471	if err != nil {
12472		return nil, err
12473	}
12474	req.Header = reqHeaders
12475	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12476}
12477
12478// Do executes the "youtube.channels.list" call.
12479// Exactly one of *ChannelListResponse or error will be non-nil. Any
12480// non-2xx status code is an error. Response headers are in either
12481// *ChannelListResponse.ServerResponse.Header or (if a response was
12482// returned at all) in error.(*googleapi.Error).Header. Use
12483// googleapi.IsNotModified to check whether the returned error was
12484// because http.StatusNotModified was returned.
12485func (c *ChannelsListCall) Do(opts ...googleapi.CallOption) (*ChannelListResponse, error) {
12486	gensupport.SetOptions(c.urlParams_, opts...)
12487	res, err := c.doRequest("json")
12488	if res != nil && res.StatusCode == http.StatusNotModified {
12489		if res.Body != nil {
12490			res.Body.Close()
12491		}
12492		return nil, &googleapi.Error{
12493			Code:   res.StatusCode,
12494			Header: res.Header,
12495		}
12496	}
12497	if err != nil {
12498		return nil, err
12499	}
12500	defer googleapi.CloseBody(res)
12501	if err := googleapi.CheckResponse(res); err != nil {
12502		return nil, err
12503	}
12504	ret := &ChannelListResponse{
12505		ServerResponse: googleapi.ServerResponse{
12506			Header:         res.Header,
12507			HTTPStatusCode: res.StatusCode,
12508		},
12509	}
12510	target := &ret
12511	if err := gensupport.DecodeResponse(target, res); err != nil {
12512		return nil, err
12513	}
12514	return ret, nil
12515	// {
12516	//   "description": "Returns a collection of zero or more channel resources that match the request criteria.",
12517	//   "httpMethod": "GET",
12518	//   "id": "youtube.channels.list",
12519	//   "parameterOrder": [
12520	//     "part"
12521	//   ],
12522	//   "parameters": {
12523	//     "categoryId": {
12524	//       "description": "The categoryId parameter specifies a YouTube guide category, thereby requesting YouTube channels associated with that category.",
12525	//       "location": "query",
12526	//       "type": "string"
12527	//     },
12528	//     "forUsername": {
12529	//       "description": "The forUsername parameter specifies a YouTube username, thereby requesting the channel associated with that username.",
12530	//       "location": "query",
12531	//       "type": "string"
12532	//     },
12533	//     "hl": {
12534	//       "description": "The hl parameter should be used for filter out the properties that are not in the given language. Used for the brandingSettings part.",
12535	//       "location": "query",
12536	//       "type": "string"
12537	//     },
12538	//     "id": {
12539	//       "description": "The id parameter specifies a comma-separated list of the YouTube channel ID(s) for the resource(s) that are being retrieved. In a channel resource, the id property specifies the channel's YouTube channel ID.",
12540	//       "location": "query",
12541	//       "type": "string"
12542	//     },
12543	//     "managedByMe": {
12544	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nSet this parameter's value to true to instruct the API to only return channels managed by the content owner that the onBehalfOfContentOwner parameter specifies. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.",
12545	//       "location": "query",
12546	//       "type": "boolean"
12547	//     },
12548	//     "maxResults": {
12549	//       "default": "5",
12550	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
12551	//       "format": "uint32",
12552	//       "location": "query",
12553	//       "maximum": "50",
12554	//       "minimum": "0",
12555	//       "type": "integer"
12556	//     },
12557	//     "mine": {
12558	//       "description": "Set this parameter's value to true to instruct the API to only return channels owned by the authenticated user.",
12559	//       "location": "query",
12560	//       "type": "boolean"
12561	//     },
12562	//     "mySubscribers": {
12563	//       "description": "Use the subscriptions.list method and its mySubscribers parameter to retrieve a list of subscribers to the authenticated user's channel.",
12564	//       "location": "query",
12565	//       "type": "boolean"
12566	//     },
12567	//     "onBehalfOfContentOwner": {
12568	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
12569	//       "location": "query",
12570	//       "type": "string"
12571	//     },
12572	//     "pageToken": {
12573	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
12574	//       "location": "query",
12575	//       "type": "string"
12576	//     },
12577	//     "part": {
12578	//       "description": "The part parameter specifies a comma-separated list of one or more channel resource properties that the API response will include.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set part=contentDetails, the API response will also contain all of those nested properties.",
12579	//       "location": "query",
12580	//       "required": true,
12581	//       "type": "string"
12582	//     }
12583	//   },
12584	//   "path": "channels",
12585	//   "response": {
12586	//     "$ref": "ChannelListResponse"
12587	//   },
12588	//   "scopes": [
12589	//     "https://www.googleapis.com/auth/youtube",
12590	//     "https://www.googleapis.com/auth/youtube.force-ssl",
12591	//     "https://www.googleapis.com/auth/youtube.readonly",
12592	//     "https://www.googleapis.com/auth/youtubepartner",
12593	//     "https://www.googleapis.com/auth/youtubepartner-channel-audit"
12594	//   ]
12595	// }
12596
12597}
12598
12599// Pages invokes f for each page of results.
12600// A non-nil error returned from f will halt the iteration.
12601// The provided context supersedes any context provided to the Context method.
12602func (c *ChannelsListCall) Pages(ctx context.Context, f func(*ChannelListResponse) error) error {
12603	c.ctx_ = ctx
12604	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12605	for {
12606		x, err := c.Do()
12607		if err != nil {
12608			return err
12609		}
12610		if err := f(x); err != nil {
12611			return err
12612		}
12613		if x.NextPageToken == "" {
12614			return nil
12615		}
12616		c.PageToken(x.NextPageToken)
12617	}
12618}
12619
12620// method id "youtube.channels.update":
12621
12622type ChannelsUpdateCall struct {
12623	s          *Service
12624	channel    *Channel
12625	urlParams_ gensupport.URLParams
12626	ctx_       context.Context
12627	header_    http.Header
12628}
12629
12630// Update: Updates a channel's metadata. Note that this method currently
12631// only supports updates to the channel resource's brandingSettings and
12632// invideoPromotion objects and their child properties.
12633func (r *ChannelsService) Update(part string, channel *Channel) *ChannelsUpdateCall {
12634	c := &ChannelsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12635	c.urlParams_.Set("part", part)
12636	c.channel = channel
12637	return c
12638}
12639
12640// OnBehalfOfContentOwner sets the optional parameter
12641// "onBehalfOfContentOwner": The onBehalfOfContentOwner parameter
12642// indicates that the authenticated user is acting on behalf of the
12643// content owner specified in the parameter value. This parameter is
12644// intended for YouTube content partners that own and manage many
12645// different YouTube channels. It allows content owners to authenticate
12646// once and get access to all their video and channel data, without
12647// having to provide authentication credentials for each individual
12648// channel. The actual CMS account that the user authenticates with
12649// needs to be linked to the specified YouTube content owner.
12650func (c *ChannelsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelsUpdateCall {
12651	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
12652	return c
12653}
12654
12655// Fields allows partial responses to be retrieved. See
12656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12657// for more information.
12658func (c *ChannelsUpdateCall) Fields(s ...googleapi.Field) *ChannelsUpdateCall {
12659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12660	return c
12661}
12662
12663// Context sets the context to be used in this call's Do method. Any
12664// pending HTTP request will be aborted if the provided context is
12665// canceled.
12666func (c *ChannelsUpdateCall) Context(ctx context.Context) *ChannelsUpdateCall {
12667	c.ctx_ = ctx
12668	return c
12669}
12670
12671// Header returns an http.Header that can be modified by the caller to
12672// add HTTP headers to the request.
12673func (c *ChannelsUpdateCall) Header() http.Header {
12674	if c.header_ == nil {
12675		c.header_ = make(http.Header)
12676	}
12677	return c.header_
12678}
12679
12680func (c *ChannelsUpdateCall) doRequest(alt string) (*http.Response, error) {
12681	reqHeaders := make(http.Header)
12682	for k, v := range c.header_ {
12683		reqHeaders[k] = v
12684	}
12685	reqHeaders.Set("User-Agent", c.s.userAgent())
12686	var body io.Reader = nil
12687	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
12688	if err != nil {
12689		return nil, err
12690	}
12691	reqHeaders.Set("Content-Type", "application/json")
12692	c.urlParams_.Set("alt", alt)
12693	c.urlParams_.Set("prettyPrint", "false")
12694	urls := googleapi.ResolveRelative(c.s.BasePath, "channels")
12695	urls += "?" + c.urlParams_.Encode()
12696	req, err := http.NewRequest("PUT", urls, body)
12697	if err != nil {
12698		return nil, err
12699	}
12700	req.Header = reqHeaders
12701	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12702}
12703
12704// Do executes the "youtube.channels.update" call.
12705// Exactly one of *Channel or error will be non-nil. Any non-2xx status
12706// code is an error. Response headers are in either
12707// *Channel.ServerResponse.Header or (if a response was returned at all)
12708// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12709// check whether the returned error was because http.StatusNotModified
12710// was returned.
12711func (c *ChannelsUpdateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
12712	gensupport.SetOptions(c.urlParams_, opts...)
12713	res, err := c.doRequest("json")
12714	if res != nil && res.StatusCode == http.StatusNotModified {
12715		if res.Body != nil {
12716			res.Body.Close()
12717		}
12718		return nil, &googleapi.Error{
12719			Code:   res.StatusCode,
12720			Header: res.Header,
12721		}
12722	}
12723	if err != nil {
12724		return nil, err
12725	}
12726	defer googleapi.CloseBody(res)
12727	if err := googleapi.CheckResponse(res); err != nil {
12728		return nil, err
12729	}
12730	ret := &Channel{
12731		ServerResponse: googleapi.ServerResponse{
12732			Header:         res.Header,
12733			HTTPStatusCode: res.StatusCode,
12734		},
12735	}
12736	target := &ret
12737	if err := gensupport.DecodeResponse(target, res); err != nil {
12738		return nil, err
12739	}
12740	return ret, nil
12741	// {
12742	//   "description": "Updates a channel's metadata. Note that this method currently only supports updates to the channel resource's brandingSettings and invideoPromotion objects and their child properties.",
12743	//   "httpMethod": "PUT",
12744	//   "id": "youtube.channels.update",
12745	//   "parameterOrder": [
12746	//     "part"
12747	//   ],
12748	//   "parameters": {
12749	//     "onBehalfOfContentOwner": {
12750	//       "description": "The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.",
12751	//       "location": "query",
12752	//       "type": "string"
12753	//     },
12754	//     "part": {
12755	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.)\n\nNote that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.",
12756	//       "location": "query",
12757	//       "required": true,
12758	//       "type": "string"
12759	//     }
12760	//   },
12761	//   "path": "channels",
12762	//   "request": {
12763	//     "$ref": "Channel"
12764	//   },
12765	//   "response": {
12766	//     "$ref": "Channel"
12767	//   },
12768	//   "scopes": [
12769	//     "https://www.googleapis.com/auth/youtube",
12770	//     "https://www.googleapis.com/auth/youtube.force-ssl",
12771	//     "https://www.googleapis.com/auth/youtubepartner"
12772	//   ]
12773	// }
12774
12775}
12776
12777// method id "youtube.commentThreads.insert":
12778
12779type CommentThreadsInsertCall struct {
12780	s             *Service
12781	commentthread *CommentThread
12782	urlParams_    gensupport.URLParams
12783	ctx_          context.Context
12784	header_       http.Header
12785}
12786
12787// Insert: Creates a new top-level comment. To add a reply to an
12788// existing comment, use the comments.insert method instead.
12789func (r *CommentThreadsService) Insert(part string, commentthread *CommentThread) *CommentThreadsInsertCall {
12790	c := &CommentThreadsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12791	c.urlParams_.Set("part", part)
12792	c.commentthread = commentthread
12793	return c
12794}
12795
12796// Fields allows partial responses to be retrieved. See
12797// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12798// for more information.
12799func (c *CommentThreadsInsertCall) Fields(s ...googleapi.Field) *CommentThreadsInsertCall {
12800	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12801	return c
12802}
12803
12804// Context sets the context to be used in this call's Do method. Any
12805// pending HTTP request will be aborted if the provided context is
12806// canceled.
12807func (c *CommentThreadsInsertCall) Context(ctx context.Context) *CommentThreadsInsertCall {
12808	c.ctx_ = ctx
12809	return c
12810}
12811
12812// Header returns an http.Header that can be modified by the caller to
12813// add HTTP headers to the request.
12814func (c *CommentThreadsInsertCall) Header() http.Header {
12815	if c.header_ == nil {
12816		c.header_ = make(http.Header)
12817	}
12818	return c.header_
12819}
12820
12821func (c *CommentThreadsInsertCall) doRequest(alt string) (*http.Response, error) {
12822	reqHeaders := make(http.Header)
12823	for k, v := range c.header_ {
12824		reqHeaders[k] = v
12825	}
12826	reqHeaders.Set("User-Agent", c.s.userAgent())
12827	var body io.Reader = nil
12828	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
12829	if err != nil {
12830		return nil, err
12831	}
12832	reqHeaders.Set("Content-Type", "application/json")
12833	c.urlParams_.Set("alt", alt)
12834	c.urlParams_.Set("prettyPrint", "false")
12835	urls := googleapi.ResolveRelative(c.s.BasePath, "commentThreads")
12836	urls += "?" + c.urlParams_.Encode()
12837	req, err := http.NewRequest("POST", urls, body)
12838	if err != nil {
12839		return nil, err
12840	}
12841	req.Header = reqHeaders
12842	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12843}
12844
12845// Do executes the "youtube.commentThreads.insert" call.
12846// Exactly one of *CommentThread or error will be non-nil. Any non-2xx
12847// status code is an error. Response headers are in either
12848// *CommentThread.ServerResponse.Header or (if a response was returned
12849// at all) in error.(*googleapi.Error).Header. Use
12850// googleapi.IsNotModified to check whether the returned error was
12851// because http.StatusNotModified was returned.
12852func (c *CommentThreadsInsertCall) Do(opts ...googleapi.CallOption) (*CommentThread, error) {
12853	gensupport.SetOptions(c.urlParams_, opts...)
12854	res, err := c.doRequest("json")
12855	if res != nil && res.StatusCode == http.StatusNotModified {
12856		if res.Body != nil {
12857			res.Body.Close()
12858		}
12859		return nil, &googleapi.Error{
12860			Code:   res.StatusCode,
12861			Header: res.Header,
12862		}
12863	}
12864	if err != nil {
12865		return nil, err
12866	}
12867	defer googleapi.CloseBody(res)
12868	if err := googleapi.CheckResponse(res); err != nil {
12869		return nil, err
12870	}
12871	ret := &CommentThread{
12872		ServerResponse: googleapi.ServerResponse{
12873			Header:         res.Header,
12874			HTTPStatusCode: res.StatusCode,
12875		},
12876	}
12877	target := &ret
12878	if err := gensupport.DecodeResponse(target, res); err != nil {
12879		return nil, err
12880	}
12881	return ret, nil
12882	// {
12883	//   "description": "Creates a new top-level comment. To add a reply to an existing comment, use the comments.insert method instead.",
12884	//   "httpMethod": "POST",
12885	//   "id": "youtube.commentThreads.insert",
12886	//   "parameterOrder": [
12887	//     "part"
12888	//   ],
12889	//   "parameters": {
12890	//     "part": {
12891	//       "description": "The part parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units.",
12892	//       "location": "query",
12893	//       "required": true,
12894	//       "type": "string"
12895	//     }
12896	//   },
12897	//   "path": "commentThreads",
12898	//   "request": {
12899	//     "$ref": "CommentThread"
12900	//   },
12901	//   "response": {
12902	//     "$ref": "CommentThread"
12903	//   },
12904	//   "scopes": [
12905	//     "https://www.googleapis.com/auth/youtube.force-ssl"
12906	//   ]
12907	// }
12908
12909}
12910
12911// method id "youtube.commentThreads.list":
12912
12913type CommentThreadsListCall struct {
12914	s            *Service
12915	urlParams_   gensupport.URLParams
12916	ifNoneMatch_ string
12917	ctx_         context.Context
12918	header_      http.Header
12919}
12920
12921// List: Returns a list of comment threads that match the API request
12922// parameters.
12923func (r *CommentThreadsService) List(part string) *CommentThreadsListCall {
12924	c := &CommentThreadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12925	c.urlParams_.Set("part", part)
12926	return c
12927}
12928
12929// AllThreadsRelatedToChannelId sets the optional parameter
12930// "allThreadsRelatedToChannelId": The allThreadsRelatedToChannelId
12931// parameter instructs the API to return all comment threads associated
12932// with the specified channel. The response can include comments about
12933// the channel or about the channel's videos.
12934func (c *CommentThreadsListCall) AllThreadsRelatedToChannelId(allThreadsRelatedToChannelId string) *CommentThreadsListCall {
12935	c.urlParams_.Set("allThreadsRelatedToChannelId", allThreadsRelatedToChannelId)
12936	return c
12937}
12938
12939// ChannelId sets the optional parameter "channelId": The channelId
12940// parameter instructs the API to return comment threads containing
12941// comments about the specified channel. (The response will not include
12942// comments left on videos that the channel uploaded.)
12943func (c *CommentThreadsListCall) ChannelId(channelId string) *CommentThreadsListCall {
12944	c.urlParams_.Set("channelId", channelId)
12945	return c
12946}
12947
12948// Id sets the optional parameter "id": The id parameter specifies a
12949// comma-separated list of comment thread IDs for the resources that
12950// should be retrieved.
12951func (c *CommentThreadsListCall) Id(id string) *CommentThreadsListCall {
12952	c.urlParams_.Set("id", id)
12953	return c
12954}
12955
12956// MaxResults sets the optional parameter "maxResults": The maxResults
12957// parameter specifies the maximum number of items that should be
12958// returned in the result set.
12959//
12960// Note: This parameter is not supported for use in conjunction with the
12961// id parameter.
12962func (c *CommentThreadsListCall) MaxResults(maxResults int64) *CommentThreadsListCall {
12963	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12964	return c
12965}
12966
12967// ModerationStatus sets the optional parameter "moderationStatus": Set
12968// this parameter to limit the returned comment threads to a particular
12969// moderation state.
12970//
12971// Note: This parameter is not supported for use in conjunction with the
12972// id parameter.
12973//
12974// Possible values:
12975//   "heldForReview" - Retrieve comment threads that are awaiting review
12976// by a moderator. A comment thread can be included in the response if
12977// the top-level comment or at least one of the replies to that comment
12978// are awaiting review.
12979//   "likelySpam" - Retrieve comment threads classified as likely to be
12980// spam. A comment thread can be included in the response if the
12981// top-level comment or at least one of the replies to that comment is
12982// considered likely to be spam.
12983//   "published" - Retrieve threads of published comments. This is the
12984// default value. A comment thread can be included in the response if
12985// its top-level comment has been published.
12986func (c *CommentThreadsListCall) ModerationStatus(moderationStatus string) *CommentThreadsListCall {
12987	c.urlParams_.Set("moderationStatus", moderationStatus)
12988	return c
12989}
12990
12991// Order sets the optional parameter "order": The order parameter
12992// specifies the order in which the API response should list comment
12993// threads. Valid values are:
12994// - time - Comment threads are ordered by time. This is the default
12995// behavior.
12996// - relevance - Comment threads are ordered by relevance.Note: This
12997// parameter is not supported for use in conjunction with the id
12998// parameter.
12999//
13000// Possible values:
13001//   "relevance" - Order by relevance.
13002//   "time" - Order by time.
13003func (c *CommentThreadsListCall) Order(order string) *CommentThreadsListCall {
13004	c.urlParams_.Set("order", order)
13005	return c
13006}
13007
13008// PageToken sets the optional parameter "pageToken": The pageToken
13009// parameter identifies a specific page in the result set that should be
13010// returned. In an API response, the nextPageToken property identifies
13011// the next page of the result that can be retrieved.
13012//
13013// Note: This parameter is not supported for use in conjunction with the
13014// id parameter.
13015func (c *CommentThreadsListCall) PageToken(pageToken string) *CommentThreadsListCall {
13016	c.urlParams_.Set("pageToken", pageToken)
13017	return c
13018}
13019
13020// SearchTerms sets the optional parameter "searchTerms": The
13021// searchTerms parameter instructs the API to limit the API response to
13022// only contain comments that contain the specified search terms.
13023//
13024// Note: This parameter is not supported for use in conjunction with the
13025// id parameter.
13026func (c *CommentThreadsListCall) SearchTerms(searchTerms string) *CommentThreadsListCall {
13027	c.urlParams_.Set("searchTerms", searchTerms)
13028	return c
13029}
13030
13031// TextFormat sets the optional parameter "textFormat": Set this
13032// parameter's value to html or plainText to instruct the API to return
13033// the comments left by users in html formatted or in plain text.
13034//
13035// Possible values:
13036//   "html" - Returns the comments in HTML format. This is the default
13037// value.
13038//   "plainText" - Returns the comments in plain text format.
13039func (c *CommentThreadsListCall) TextFormat(textFormat string) *CommentThreadsListCall {
13040	c.urlParams_.Set("textFormat", textFormat)
13041	return c
13042}
13043
13044// VideoId sets the optional parameter "videoId": The videoId parameter
13045// instructs the API to return comment threads associated with the
13046// specified video ID.
13047func (c *CommentThreadsListCall) VideoId(videoId string) *CommentThreadsListCall {
13048	c.urlParams_.Set("videoId", videoId)
13049	return c
13050}
13051
13052// Fields allows partial responses to be retrieved. See
13053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13054// for more information.
13055func (c *CommentThreadsListCall) Fields(s ...googleapi.Field) *CommentThreadsListCall {
13056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13057	return c
13058}
13059
13060// IfNoneMatch sets the optional parameter which makes the operation
13061// fail if the object's ETag matches the given value. This is useful for
13062// getting updates only after the object has changed since the last
13063// request. Use googleapi.IsNotModified to check whether the response
13064// error from Do is the result of In-None-Match.
13065func (c *CommentThreadsListCall) IfNoneMatch(entityTag string) *CommentThreadsListCall {
13066	c.ifNoneMatch_ = entityTag
13067	return c
13068}
13069
13070// Context sets the context to be used in this call's Do method. Any
13071// pending HTTP request will be aborted if the provided context is
13072// canceled.
13073func (c *CommentThreadsListCall) Context(ctx context.Context) *CommentThreadsListCall {
13074	c.ctx_ = ctx
13075	return c
13076}
13077
13078// Header returns an http.Header that can be modified by the caller to
13079// add HTTP headers to the request.
13080func (c *CommentThreadsListCall) Header() http.Header {
13081	if c.header_ == nil {
13082		c.header_ = make(http.Header)
13083	}
13084	return c.header_
13085}
13086
13087func (c *CommentThreadsListCall) doRequest(alt string) (*http.Response, error) {
13088	reqHeaders := make(http.Header)
13089	for k, v := range c.header_ {
13090		reqHeaders[k] = v
13091	}
13092	reqHeaders.Set("User-Agent", c.s.userAgent())
13093	if c.ifNoneMatch_ != "" {
13094		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13095	}
13096	var body io.Reader = nil
13097	c.urlParams_.Set("alt", alt)
13098	c.urlParams_.Set("prettyPrint", "false")
13099	urls := googleapi.ResolveRelative(c.s.BasePath, "commentThreads")
13100	urls += "?" + c.urlParams_.Encode()
13101	req, err := http.NewRequest("GET", urls, body)
13102	if err != nil {
13103		return nil, err
13104	}
13105	req.Header = reqHeaders
13106	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13107}
13108
13109// Do executes the "youtube.commentThreads.list" call.
13110// Exactly one of *CommentThreadListResponse or error will be non-nil.
13111// Any non-2xx status code is an error. Response headers are in either
13112// *CommentThreadListResponse.ServerResponse.Header or (if a response
13113// was returned at all) in error.(*googleapi.Error).Header. Use
13114// googleapi.IsNotModified to check whether the returned error was
13115// because http.StatusNotModified was returned.
13116func (c *CommentThreadsListCall) Do(opts ...googleapi.CallOption) (*CommentThreadListResponse, error) {
13117	gensupport.SetOptions(c.urlParams_, opts...)
13118	res, err := c.doRequest("json")
13119	if res != nil && res.StatusCode == http.StatusNotModified {
13120		if res.Body != nil {
13121			res.Body.Close()
13122		}
13123		return nil, &googleapi.Error{
13124			Code:   res.StatusCode,
13125			Header: res.Header,
13126		}
13127	}
13128	if err != nil {
13129		return nil, err
13130	}
13131	defer googleapi.CloseBody(res)
13132	if err := googleapi.CheckResponse(res); err != nil {
13133		return nil, err
13134	}
13135	ret := &CommentThreadListResponse{
13136		ServerResponse: googleapi.ServerResponse{
13137			Header:         res.Header,
13138			HTTPStatusCode: res.StatusCode,
13139		},
13140	}
13141	target := &ret
13142	if err := gensupport.DecodeResponse(target, res); err != nil {
13143		return nil, err
13144	}
13145	return ret, nil
13146	// {
13147	//   "description": "Returns a list of comment threads that match the API request parameters.",
13148	//   "httpMethod": "GET",
13149	//   "id": "youtube.commentThreads.list",
13150	//   "parameterOrder": [
13151	//     "part"
13152	//   ],
13153	//   "parameters": {
13154	//     "allThreadsRelatedToChannelId": {
13155	//       "description": "The allThreadsRelatedToChannelId parameter instructs the API to return all comment threads associated with the specified channel. The response can include comments about the channel or about the channel's videos.",
13156	//       "location": "query",
13157	//       "type": "string"
13158	//     },
13159	//     "channelId": {
13160	//       "description": "The channelId parameter instructs the API to return comment threads containing comments about the specified channel. (The response will not include comments left on videos that the channel uploaded.)",
13161	//       "location": "query",
13162	//       "type": "string"
13163	//     },
13164	//     "id": {
13165	//       "description": "The id parameter specifies a comma-separated list of comment thread IDs for the resources that should be retrieved.",
13166	//       "location": "query",
13167	//       "type": "string"
13168	//     },
13169	//     "maxResults": {
13170	//       "default": "20",
13171	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.\n\nNote: This parameter is not supported for use in conjunction with the id parameter.",
13172	//       "format": "uint32",
13173	//       "location": "query",
13174	//       "maximum": "100",
13175	//       "minimum": "1",
13176	//       "type": "integer"
13177	//     },
13178	//     "moderationStatus": {
13179	//       "default": "MODERATION_STATUS_PUBLISHED",
13180	//       "description": "Set this parameter to limit the returned comment threads to a particular moderation state.\n\nNote: This parameter is not supported for use in conjunction with the id parameter.",
13181	//       "enum": [
13182	//         "heldForReview",
13183	//         "likelySpam",
13184	//         "published"
13185	//       ],
13186	//       "enumDescriptions": [
13187	//         "Retrieve comment threads that are awaiting review by a moderator. A comment thread can be included in the response if the top-level comment or at least one of the replies to that comment are awaiting review.",
13188	//         "Retrieve comment threads classified as likely to be spam. A comment thread can be included in the response if the top-level comment or at least one of the replies to that comment is considered likely to be spam.",
13189	//         "Retrieve threads of published comments. This is the default value. A comment thread can be included in the response if its top-level comment has been published."
13190	//       ],
13191	//       "location": "query",
13192	//       "type": "string"
13193	//     },
13194	//     "order": {
13195	//       "default": "true",
13196	//       "description": "The order parameter specifies the order in which the API response should list comment threads. Valid values are: \n- time - Comment threads are ordered by time. This is the default behavior.\n- relevance - Comment threads are ordered by relevance.Note: This parameter is not supported for use in conjunction with the id parameter.",
13197	//       "enum": [
13198	//         "relevance",
13199	//         "time"
13200	//       ],
13201	//       "enumDescriptions": [
13202	//         "Order by relevance.",
13203	//         "Order by time."
13204	//       ],
13205	//       "location": "query",
13206	//       "type": "string"
13207	//     },
13208	//     "pageToken": {
13209	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved.\n\nNote: This parameter is not supported for use in conjunction with the id parameter.",
13210	//       "location": "query",
13211	//       "type": "string"
13212	//     },
13213	//     "part": {
13214	//       "description": "The part parameter specifies a comma-separated list of one or more commentThread resource properties that the API response will include.",
13215	//       "location": "query",
13216	//       "required": true,
13217	//       "type": "string"
13218	//     },
13219	//     "searchTerms": {
13220	//       "description": "The searchTerms parameter instructs the API to limit the API response to only contain comments that contain the specified search terms.\n\nNote: This parameter is not supported for use in conjunction with the id parameter.",
13221	//       "location": "query",
13222	//       "type": "string"
13223	//     },
13224	//     "textFormat": {
13225	//       "default": "FORMAT_HTML",
13226	//       "description": "Set this parameter's value to html or plainText to instruct the API to return the comments left by users in html formatted or in plain text.",
13227	//       "enum": [
13228	//         "html",
13229	//         "plainText"
13230	//       ],
13231	//       "enumDescriptions": [
13232	//         "Returns the comments in HTML format. This is the default value.",
13233	//         "Returns the comments in plain text format."
13234	//       ],
13235	//       "location": "query",
13236	//       "type": "string"
13237	//     },
13238	//     "videoId": {
13239	//       "description": "The videoId parameter instructs the API to return comment threads associated with the specified video ID.",
13240	//       "location": "query",
13241	//       "type": "string"
13242	//     }
13243	//   },
13244	//   "path": "commentThreads",
13245	//   "response": {
13246	//     "$ref": "CommentThreadListResponse"
13247	//   },
13248	//   "scopes": [
13249	//     "https://www.googleapis.com/auth/youtube.force-ssl"
13250	//   ]
13251	// }
13252
13253}
13254
13255// Pages invokes f for each page of results.
13256// A non-nil error returned from f will halt the iteration.
13257// The provided context supersedes any context provided to the Context method.
13258func (c *CommentThreadsListCall) Pages(ctx context.Context, f func(*CommentThreadListResponse) error) error {
13259	c.ctx_ = ctx
13260	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13261	for {
13262		x, err := c.Do()
13263		if err != nil {
13264			return err
13265		}
13266		if err := f(x); err != nil {
13267			return err
13268		}
13269		if x.NextPageToken == "" {
13270			return nil
13271		}
13272		c.PageToken(x.NextPageToken)
13273	}
13274}
13275
13276// method id "youtube.commentThreads.update":
13277
13278type CommentThreadsUpdateCall struct {
13279	s             *Service
13280	commentthread *CommentThread
13281	urlParams_    gensupport.URLParams
13282	ctx_          context.Context
13283	header_       http.Header
13284}
13285
13286// Update: Modifies the top-level comment in a comment thread.
13287func (r *CommentThreadsService) Update(part string, commentthread *CommentThread) *CommentThreadsUpdateCall {
13288	c := &CommentThreadsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13289	c.urlParams_.Set("part", part)
13290	c.commentthread = commentthread
13291	return c
13292}
13293
13294// Fields allows partial responses to be retrieved. See
13295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13296// for more information.
13297func (c *CommentThreadsUpdateCall) Fields(s ...googleapi.Field) *CommentThreadsUpdateCall {
13298	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13299	return c
13300}
13301
13302// Context sets the context to be used in this call's Do method. Any
13303// pending HTTP request will be aborted if the provided context is
13304// canceled.
13305func (c *CommentThreadsUpdateCall) Context(ctx context.Context) *CommentThreadsUpdateCall {
13306	c.ctx_ = ctx
13307	return c
13308}
13309
13310// Header returns an http.Header that can be modified by the caller to
13311// add HTTP headers to the request.
13312func (c *CommentThreadsUpdateCall) Header() http.Header {
13313	if c.header_ == nil {
13314		c.header_ = make(http.Header)
13315	}
13316	return c.header_
13317}
13318
13319func (c *CommentThreadsUpdateCall) doRequest(alt string) (*http.Response, error) {
13320	reqHeaders := make(http.Header)
13321	for k, v := range c.header_ {
13322		reqHeaders[k] = v
13323	}
13324	reqHeaders.Set("User-Agent", c.s.userAgent())
13325	var body io.Reader = nil
13326	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
13327	if err != nil {
13328		return nil, err
13329	}
13330	reqHeaders.Set("Content-Type", "application/json")
13331	c.urlParams_.Set("alt", alt)
13332	c.urlParams_.Set("prettyPrint", "false")
13333	urls := googleapi.ResolveRelative(c.s.BasePath, "commentThreads")
13334	urls += "?" + c.urlParams_.Encode()
13335	req, err := http.NewRequest("PUT", urls, body)
13336	if err != nil {
13337		return nil, err
13338	}
13339	req.Header = reqHeaders
13340	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13341}
13342
13343// Do executes the "youtube.commentThreads.update" call.
13344// Exactly one of *CommentThread or error will be non-nil. Any non-2xx
13345// status code is an error. Response headers are in either
13346// *CommentThread.ServerResponse.Header or (if a response was returned
13347// at all) in error.(*googleapi.Error).Header. Use
13348// googleapi.IsNotModified to check whether the returned error was
13349// because http.StatusNotModified was returned.
13350func (c *CommentThreadsUpdateCall) Do(opts ...googleapi.CallOption) (*CommentThread, error) {
13351	gensupport.SetOptions(c.urlParams_, opts...)
13352	res, err := c.doRequest("json")
13353	if res != nil && res.StatusCode == http.StatusNotModified {
13354		if res.Body != nil {
13355			res.Body.Close()
13356		}
13357		return nil, &googleapi.Error{
13358			Code:   res.StatusCode,
13359			Header: res.Header,
13360		}
13361	}
13362	if err != nil {
13363		return nil, err
13364	}
13365	defer googleapi.CloseBody(res)
13366	if err := googleapi.CheckResponse(res); err != nil {
13367		return nil, err
13368	}
13369	ret := &CommentThread{
13370		ServerResponse: googleapi.ServerResponse{
13371			Header:         res.Header,
13372			HTTPStatusCode: res.StatusCode,
13373		},
13374	}
13375	target := &ret
13376	if err := gensupport.DecodeResponse(target, res); err != nil {
13377		return nil, err
13378	}
13379	return ret, nil
13380	// {
13381	//   "description": "Modifies the top-level comment in a comment thread.",
13382	//   "httpMethod": "PUT",
13383	//   "id": "youtube.commentThreads.update",
13384	//   "parameterOrder": [
13385	//     "part"
13386	//   ],
13387	//   "parameters": {
13388	//     "part": {
13389	//       "description": "The part parameter specifies a comma-separated list of commentThread resource properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update.",
13390	//       "location": "query",
13391	//       "required": true,
13392	//       "type": "string"
13393	//     }
13394	//   },
13395	//   "path": "commentThreads",
13396	//   "request": {
13397	//     "$ref": "CommentThread"
13398	//   },
13399	//   "response": {
13400	//     "$ref": "CommentThread"
13401	//   },
13402	//   "scopes": [
13403	//     "https://www.googleapis.com/auth/youtube.force-ssl"
13404	//   ]
13405	// }
13406
13407}
13408
13409// method id "youtube.comments.delete":
13410
13411type CommentsDeleteCall struct {
13412	s          *Service
13413	urlParams_ gensupport.URLParams
13414	ctx_       context.Context
13415	header_    http.Header
13416}
13417
13418// Delete: Deletes a comment.
13419func (r *CommentsService) Delete(id string) *CommentsDeleteCall {
13420	c := &CommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13421	c.urlParams_.Set("id", id)
13422	return c
13423}
13424
13425// Fields allows partial responses to be retrieved. See
13426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13427// for more information.
13428func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
13429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13430	return c
13431}
13432
13433// Context sets the context to be used in this call's Do method. Any
13434// pending HTTP request will be aborted if the provided context is
13435// canceled.
13436func (c *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
13437	c.ctx_ = ctx
13438	return c
13439}
13440
13441// Header returns an http.Header that can be modified by the caller to
13442// add HTTP headers to the request.
13443func (c *CommentsDeleteCall) Header() http.Header {
13444	if c.header_ == nil {
13445		c.header_ = make(http.Header)
13446	}
13447	return c.header_
13448}
13449
13450func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
13451	reqHeaders := make(http.Header)
13452	for k, v := range c.header_ {
13453		reqHeaders[k] = v
13454	}
13455	reqHeaders.Set("User-Agent", c.s.userAgent())
13456	var body io.Reader = nil
13457	c.urlParams_.Set("alt", alt)
13458	c.urlParams_.Set("prettyPrint", "false")
13459	urls := googleapi.ResolveRelative(c.s.BasePath, "comments")
13460	urls += "?" + c.urlParams_.Encode()
13461	req, err := http.NewRequest("DELETE", urls, body)
13462	if err != nil {
13463		return nil, err
13464	}
13465	req.Header = reqHeaders
13466	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13467}
13468
13469// Do executes the "youtube.comments.delete" call.
13470func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error {
13471	gensupport.SetOptions(c.urlParams_, opts...)
13472	res, err := c.doRequest("json")
13473	if err != nil {
13474		return err
13475	}
13476	defer googleapi.CloseBody(res)
13477	if err := googleapi.CheckResponse(res); err != nil {
13478		return err
13479	}
13480	return nil
13481	// {
13482	//   "description": "Deletes a comment.",
13483	//   "httpMethod": "DELETE",
13484	//   "id": "youtube.comments.delete",
13485	//   "parameterOrder": [
13486	//     "id"
13487	//   ],
13488	//   "parameters": {
13489	//     "id": {
13490	//       "description": "The id parameter specifies the comment ID for the resource that is being deleted.",
13491	//       "location": "query",
13492	//       "required": true,
13493	//       "type": "string"
13494	//     }
13495	//   },
13496	//   "path": "comments",
13497	//   "scopes": [
13498	//     "https://www.googleapis.com/auth/youtube.force-ssl"
13499	//   ]
13500	// }
13501
13502}
13503
13504// method id "youtube.comments.insert":
13505
13506type CommentsInsertCall struct {
13507	s          *Service
13508	comment    *Comment
13509	urlParams_ gensupport.URLParams
13510	ctx_       context.Context
13511	header_    http.Header
13512}
13513
13514// Insert: Creates a reply to an existing comment. Note: To create a
13515// top-level comment, use the commentThreads.insert method.
13516func (r *CommentsService) Insert(part string, comment *Comment) *CommentsInsertCall {
13517	c := &CommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13518	c.urlParams_.Set("part", part)
13519	c.comment = comment
13520	return c
13521}
13522
13523// Fields allows partial responses to be retrieved. See
13524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13525// for more information.
13526func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
13527	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13528	return c
13529}
13530
13531// Context sets the context to be used in this call's Do method. Any
13532// pending HTTP request will be aborted if the provided context is
13533// canceled.
13534func (c *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
13535	c.ctx_ = ctx
13536	return c
13537}
13538
13539// Header returns an http.Header that can be modified by the caller to
13540// add HTTP headers to the request.
13541func (c *CommentsInsertCall) Header() http.Header {
13542	if c.header_ == nil {
13543		c.header_ = make(http.Header)
13544	}
13545	return c.header_
13546}
13547
13548func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
13549	reqHeaders := make(http.Header)
13550	for k, v := range c.header_ {
13551		reqHeaders[k] = v
13552	}
13553	reqHeaders.Set("User-Agent", c.s.userAgent())
13554	var body io.Reader = nil
13555	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
13556	if err != nil {
13557		return nil, err
13558	}
13559	reqHeaders.Set("Content-Type", "application/json")
13560	c.urlParams_.Set("alt", alt)
13561	c.urlParams_.Set("prettyPrint", "false")
13562	urls := googleapi.ResolveRelative(c.s.BasePath, "comments")
13563	urls += "?" + c.urlParams_.Encode()
13564	req, err := http.NewRequest("POST", urls, body)
13565	if err != nil {
13566		return nil, err
13567	}
13568	req.Header = reqHeaders
13569	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13570}
13571
13572// Do executes the "youtube.comments.insert" call.
13573// Exactly one of *Comment or error will be non-nil. Any non-2xx status
13574// code is an error. Response headers are in either
13575// *Comment.ServerResponse.Header or (if a response was returned at all)
13576// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13577// check whether the returned error was because http.StatusNotModified
13578// was returned.
13579func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
13580	gensupport.SetOptions(c.urlParams_, opts...)
13581	res, err := c.doRequest("json")
13582	if res != nil && res.StatusCode == http.StatusNotModified {
13583		if res.Body != nil {
13584			res.Body.Close()
13585		}
13586		return nil, &googleapi.Error{
13587			Code:   res.StatusCode,
13588			Header: res.Header,
13589		}
13590	}
13591	if err != nil {
13592		return nil, err
13593	}
13594	defer googleapi.CloseBody(res)
13595	if err := googleapi.CheckResponse(res); err != nil {
13596		return nil, err
13597	}
13598	ret := &Comment{
13599		ServerResponse: googleapi.ServerResponse{
13600			Header:         res.Header,
13601			HTTPStatusCode: res.StatusCode,
13602		},
13603	}
13604	target := &ret
13605	if err := gensupport.DecodeResponse(target, res); err != nil {
13606		return nil, err
13607	}
13608	return ret, nil
13609	// {
13610	//   "description": "Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method.",
13611	//   "httpMethod": "POST",
13612	//   "id": "youtube.comments.insert",
13613	//   "parameterOrder": [
13614	//     "part"
13615	//   ],
13616	//   "parameters": {
13617	//     "part": {
13618	//       "description": "The part parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units.",
13619	//       "location": "query",
13620	//       "required": true,
13621	//       "type": "string"
13622	//     }
13623	//   },
13624	//   "path": "comments",
13625	//   "request": {
13626	//     "$ref": "Comment"
13627	//   },
13628	//   "response": {
13629	//     "$ref": "Comment"
13630	//   },
13631	//   "scopes": [
13632	//     "https://www.googleapis.com/auth/youtube.force-ssl"
13633	//   ]
13634	// }
13635
13636}
13637
13638// method id "youtube.comments.list":
13639
13640type CommentsListCall struct {
13641	s            *Service
13642	urlParams_   gensupport.URLParams
13643	ifNoneMatch_ string
13644	ctx_         context.Context
13645	header_      http.Header
13646}
13647
13648// List: Returns a list of comments that match the API request
13649// parameters.
13650func (r *CommentsService) List(part string) *CommentsListCall {
13651	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13652	c.urlParams_.Set("part", part)
13653	return c
13654}
13655
13656// Id sets the optional parameter "id": The id parameter specifies a
13657// comma-separated list of comment IDs for the resources that are being
13658// retrieved. In a comment resource, the id property specifies the
13659// comment's ID.
13660func (c *CommentsListCall) Id(id string) *CommentsListCall {
13661	c.urlParams_.Set("id", id)
13662	return c
13663}
13664
13665// MaxResults sets the optional parameter "maxResults": The maxResults
13666// parameter specifies the maximum number of items that should be
13667// returned in the result set.
13668//
13669// Note: This parameter is not supported for use in conjunction with the
13670// id parameter.
13671func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
13672	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13673	return c
13674}
13675
13676// PageToken sets the optional parameter "pageToken": The pageToken
13677// parameter identifies a specific page in the result set that should be
13678// returned. In an API response, the nextPageToken property identifies
13679// the next page of the result that can be retrieved.
13680//
13681// Note: This parameter is not supported for use in conjunction with the
13682// id parameter.
13683func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
13684	c.urlParams_.Set("pageToken", pageToken)
13685	return c
13686}
13687
13688// ParentId sets the optional parameter "parentId": The parentId
13689// parameter specifies the ID of the comment for which replies should be
13690// retrieved.
13691//
13692// Note: YouTube currently supports replies only for top-level comments.
13693// However, replies to replies may be supported in the future.
13694func (c *CommentsListCall) ParentId(parentId string) *CommentsListCall {
13695	c.urlParams_.Set("parentId", parentId)
13696	return c
13697}
13698
13699// TextFormat sets the optional parameter "textFormat": This parameter
13700// indicates whether the API should return comments formatted as HTML or
13701// as plain text.
13702//
13703// Possible values:
13704//   "html" - Returns the comments in HTML format. This is the default
13705// value.
13706//   "plainText" - Returns the comments in plain text format.
13707func (c *CommentsListCall) TextFormat(textFormat string) *CommentsListCall {
13708	c.urlParams_.Set("textFormat", textFormat)
13709	return c
13710}
13711
13712// Fields allows partial responses to be retrieved. See
13713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13714// for more information.
13715func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
13716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13717	return c
13718}
13719
13720// IfNoneMatch sets the optional parameter which makes the operation
13721// fail if the object's ETag matches the given value. This is useful for
13722// getting updates only after the object has changed since the last
13723// request. Use googleapi.IsNotModified to check whether the response
13724// error from Do is the result of In-None-Match.
13725func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
13726	c.ifNoneMatch_ = entityTag
13727	return c
13728}
13729
13730// Context sets the context to be used in this call's Do method. Any
13731// pending HTTP request will be aborted if the provided context is
13732// canceled.
13733func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
13734	c.ctx_ = ctx
13735	return c
13736}
13737
13738// Header returns an http.Header that can be modified by the caller to
13739// add HTTP headers to the request.
13740func (c *CommentsListCall) Header() http.Header {
13741	if c.header_ == nil {
13742		c.header_ = make(http.Header)
13743	}
13744	return c.header_
13745}
13746
13747func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
13748	reqHeaders := make(http.Header)
13749	for k, v := range c.header_ {
13750		reqHeaders[k] = v
13751	}
13752	reqHeaders.Set("User-Agent", c.s.userAgent())
13753	if c.ifNoneMatch_ != "" {
13754		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13755	}
13756	var body io.Reader = nil
13757	c.urlParams_.Set("alt", alt)
13758	c.urlParams_.Set("prettyPrint", "false")
13759	urls := googleapi.ResolveRelative(c.s.BasePath, "comments")
13760	urls += "?" + c.urlParams_.Encode()
13761	req, err := http.NewRequest("GET", urls, body)
13762	if err != nil {
13763		return nil, err
13764	}
13765	req.Header = reqHeaders
13766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13767}
13768
13769// Do executes the "youtube.comments.list" call.
13770// Exactly one of *CommentListResponse or error will be non-nil. Any
13771// non-2xx status code is an error. Response headers are in either
13772// *CommentListResponse.ServerResponse.Header or (if a response was
13773// returned at all) in error.(*googleapi.Error).Header. Use
13774// googleapi.IsNotModified to check whether the returned error was
13775// because http.StatusNotModified was returned.
13776func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentListResponse, error) {
13777	gensupport.SetOptions(c.urlParams_, opts...)
13778	res, err := c.doRequest("json")
13779	if res != nil && res.StatusCode == http.StatusNotModified {
13780		if res.Body != nil {
13781			res.Body.Close()
13782		}
13783		return nil, &googleapi.Error{
13784			Code:   res.StatusCode,
13785			Header: res.Header,
13786		}
13787	}
13788	if err != nil {
13789		return nil, err
13790	}
13791	defer googleapi.CloseBody(res)
13792	if err := googleapi.CheckResponse(res); err != nil {
13793		return nil, err
13794	}
13795	ret := &CommentListResponse{
13796		ServerResponse: googleapi.ServerResponse{
13797			Header:         res.Header,
13798			HTTPStatusCode: res.StatusCode,
13799		},
13800	}
13801	target := &ret
13802	if err := gensupport.DecodeResponse(target, res); err != nil {
13803		return nil, err
13804	}
13805	return ret, nil
13806	// {
13807	//   "description": "Returns a list of comments that match the API request parameters.",
13808	//   "httpMethod": "GET",
13809	//   "id": "youtube.comments.list",
13810	//   "parameterOrder": [
13811	//     "part"
13812	//   ],
13813	//   "parameters": {
13814	//     "id": {
13815	//       "description": "The id parameter specifies a comma-separated list of comment IDs for the resources that are being retrieved. In a comment resource, the id property specifies the comment's ID.",
13816	//       "location": "query",
13817	//       "type": "string"
13818	//     },
13819	//     "maxResults": {
13820	//       "default": "20",
13821	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.\n\nNote: This parameter is not supported for use in conjunction with the id parameter.",
13822	//       "format": "uint32",
13823	//       "location": "query",
13824	//       "maximum": "100",
13825	//       "minimum": "1",
13826	//       "type": "integer"
13827	//     },
13828	//     "pageToken": {
13829	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved.\n\nNote: This parameter is not supported for use in conjunction with the id parameter.",
13830	//       "location": "query",
13831	//       "type": "string"
13832	//     },
13833	//     "parentId": {
13834	//       "description": "The parentId parameter specifies the ID of the comment for which replies should be retrieved.\n\nNote: YouTube currently supports replies only for top-level comments. However, replies to replies may be supported in the future.",
13835	//       "location": "query",
13836	//       "type": "string"
13837	//     },
13838	//     "part": {
13839	//       "description": "The part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include.",
13840	//       "location": "query",
13841	//       "required": true,
13842	//       "type": "string"
13843	//     },
13844	//     "textFormat": {
13845	//       "default": "FORMAT_HTML",
13846	//       "description": "This parameter indicates whether the API should return comments formatted as HTML or as plain text.",
13847	//       "enum": [
13848	//         "html",
13849	//         "plainText"
13850	//       ],
13851	//       "enumDescriptions": [
13852	//         "Returns the comments in HTML format. This is the default value.",
13853	//         "Returns the comments in plain text format."
13854	//       ],
13855	//       "location": "query",
13856	//       "type": "string"
13857	//     }
13858	//   },
13859	//   "path": "comments",
13860	//   "response": {
13861	//     "$ref": "CommentListResponse"
13862	//   },
13863	//   "scopes": [
13864	//     "https://www.googleapis.com/auth/youtube.force-ssl"
13865	//   ]
13866	// }
13867
13868}
13869
13870// Pages invokes f for each page of results.
13871// A non-nil error returned from f will halt the iteration.
13872// The provided context supersedes any context provided to the Context method.
13873func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentListResponse) error) error {
13874	c.ctx_ = ctx
13875	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13876	for {
13877		x, err := c.Do()
13878		if err != nil {
13879			return err
13880		}
13881		if err := f(x); err != nil {
13882			return err
13883		}
13884		if x.NextPageToken == "" {
13885			return nil
13886		}
13887		c.PageToken(x.NextPageToken)
13888	}
13889}
13890
13891// method id "youtube.comments.markAsSpam":
13892
13893type CommentsMarkAsSpamCall struct {
13894	s          *Service
13895	urlParams_ gensupport.URLParams
13896	ctx_       context.Context
13897	header_    http.Header
13898}
13899
13900// MarkAsSpam: Expresses the caller's opinion that one or more comments
13901// should be flagged as spam.
13902func (r *CommentsService) MarkAsSpam(id string) *CommentsMarkAsSpamCall {
13903	c := &CommentsMarkAsSpamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13904	c.urlParams_.Set("id", id)
13905	return c
13906}
13907
13908// Fields allows partial responses to be retrieved. See
13909// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13910// for more information.
13911func (c *CommentsMarkAsSpamCall) Fields(s ...googleapi.Field) *CommentsMarkAsSpamCall {
13912	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13913	return c
13914}
13915
13916// Context sets the context to be used in this call's Do method. Any
13917// pending HTTP request will be aborted if the provided context is
13918// canceled.
13919func (c *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
13920	c.ctx_ = ctx
13921	return c
13922}
13923
13924// Header returns an http.Header that can be modified by the caller to
13925// add HTTP headers to the request.
13926func (c *CommentsMarkAsSpamCall) Header() http.Header {
13927	if c.header_ == nil {
13928		c.header_ = make(http.Header)
13929	}
13930	return c.header_
13931}
13932
13933func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
13934	reqHeaders := make(http.Header)
13935	for k, v := range c.header_ {
13936		reqHeaders[k] = v
13937	}
13938	reqHeaders.Set("User-Agent", c.s.userAgent())
13939	var body io.Reader = nil
13940	c.urlParams_.Set("alt", alt)
13941	c.urlParams_.Set("prettyPrint", "false")
13942	urls := googleapi.ResolveRelative(c.s.BasePath, "comments/markAsSpam")
13943	urls += "?" + c.urlParams_.Encode()
13944	req, err := http.NewRequest("POST", urls, body)
13945	if err != nil {
13946		return nil, err
13947	}
13948	req.Header = reqHeaders
13949	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13950}
13951
13952// Do executes the "youtube.comments.markAsSpam" call.
13953func (c *CommentsMarkAsSpamCall) Do(opts ...googleapi.CallOption) error {
13954	gensupport.SetOptions(c.urlParams_, opts...)
13955	res, err := c.doRequest("json")
13956	if err != nil {
13957		return err
13958	}
13959	defer googleapi.CloseBody(res)
13960	if err := googleapi.CheckResponse(res); err != nil {
13961		return err
13962	}
13963	return nil
13964	// {
13965	//   "description": "Expresses the caller's opinion that one or more comments should be flagged as spam.",
13966	//   "httpMethod": "POST",
13967	//   "id": "youtube.comments.markAsSpam",
13968	//   "parameterOrder": [
13969	//     "id"
13970	//   ],
13971	//   "parameters": {
13972	//     "id": {
13973	//       "description": "The id parameter specifies a comma-separated list of IDs of comments that the caller believes should be classified as spam.",
13974	//       "location": "query",
13975	//       "required": true,
13976	//       "type": "string"
13977	//     }
13978	//   },
13979	//   "path": "comments/markAsSpam",
13980	//   "scopes": [
13981	//     "https://www.googleapis.com/auth/youtube.force-ssl"
13982	//   ]
13983	// }
13984
13985}
13986
13987// method id "youtube.comments.setModerationStatus":
13988
13989type CommentsSetModerationStatusCall struct {
13990	s          *Service
13991	urlParams_ gensupport.URLParams
13992	ctx_       context.Context
13993	header_    http.Header
13994}
13995
13996// SetModerationStatus: Sets the moderation status of one or more
13997// comments. The API request must be authorized by the owner of the
13998// channel or video associated with the comments.
13999func (r *CommentsService) SetModerationStatus(id string, moderationStatus string) *CommentsSetModerationStatusCall {
14000	c := &CommentsSetModerationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14001	c.urlParams_.Set("id", id)
14002	c.urlParams_.Set("moderationStatus", moderationStatus)
14003	return c
14004}
14005
14006// BanAuthor sets the optional parameter "banAuthor": The banAuthor
14007// parameter lets you indicate that you want to automatically reject any
14008// additional comments written by the comment's author. Set the
14009// parameter value to true to ban the author.
14010//
14011// Note: This parameter is only valid if the moderationStatus parameter
14012// is also set to rejected.
14013func (c *CommentsSetModerationStatusCall) BanAuthor(banAuthor bool) *CommentsSetModerationStatusCall {
14014	c.urlParams_.Set("banAuthor", fmt.Sprint(banAuthor))
14015	return c
14016}
14017
14018// Fields allows partial responses to be retrieved. See
14019// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14020// for more information.
14021func (c *CommentsSetModerationStatusCall) Fields(s ...googleapi.Field) *CommentsSetModerationStatusCall {
14022	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14023	return c
14024}
14025
14026// Context sets the context to be used in this call's Do method. Any
14027// pending HTTP request will be aborted if the provided context is
14028// canceled.
14029func (c *CommentsSetModerationStatusCall) Context(ctx context.Context) *CommentsSetModerationStatusCall {
14030	c.ctx_ = ctx
14031	return c
14032}
14033
14034// Header returns an http.Header that can be modified by the caller to
14035// add HTTP headers to the request.
14036func (c *CommentsSetModerationStatusCall) Header() http.Header {
14037	if c.header_ == nil {
14038		c.header_ = make(http.Header)
14039	}
14040	return c.header_
14041}
14042
14043func (c *CommentsSetModerationStatusCall) doRequest(alt string) (*http.Response, error) {
14044	reqHeaders := make(http.Header)
14045	for k, v := range c.header_ {
14046		reqHeaders[k] = v
14047	}
14048	reqHeaders.Set("User-Agent", c.s.userAgent())
14049	var body io.Reader = nil
14050	c.urlParams_.Set("alt", alt)
14051	c.urlParams_.Set("prettyPrint", "false")
14052	urls := googleapi.ResolveRelative(c.s.BasePath, "comments/setModerationStatus")
14053	urls += "?" + c.urlParams_.Encode()
14054	req, err := http.NewRequest("POST", urls, body)
14055	if err != nil {
14056		return nil, err
14057	}
14058	req.Header = reqHeaders
14059	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14060}
14061
14062// Do executes the "youtube.comments.setModerationStatus" call.
14063func (c *CommentsSetModerationStatusCall) Do(opts ...googleapi.CallOption) error {
14064	gensupport.SetOptions(c.urlParams_, opts...)
14065	res, err := c.doRequest("json")
14066	if err != nil {
14067		return err
14068	}
14069	defer googleapi.CloseBody(res)
14070	if err := googleapi.CheckResponse(res); err != nil {
14071		return err
14072	}
14073	return nil
14074	// {
14075	//   "description": "Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments.",
14076	//   "httpMethod": "POST",
14077	//   "id": "youtube.comments.setModerationStatus",
14078	//   "parameterOrder": [
14079	//     "id",
14080	//     "moderationStatus"
14081	//   ],
14082	//   "parameters": {
14083	//     "banAuthor": {
14084	//       "default": "false",
14085	//       "description": "The banAuthor parameter lets you indicate that you want to automatically reject any additional comments written by the comment's author. Set the parameter value to true to ban the author.\n\nNote: This parameter is only valid if the moderationStatus parameter is also set to rejected.",
14086	//       "location": "query",
14087	//       "type": "boolean"
14088	//     },
14089	//     "id": {
14090	//       "description": "The id parameter specifies a comma-separated list of IDs that identify the comments for which you are updating the moderation status.",
14091	//       "location": "query",
14092	//       "required": true,
14093	//       "type": "string"
14094	//     },
14095	//     "moderationStatus": {
14096	//       "description": "Identifies the new moderation status of the specified comments.",
14097	//       "enum": [
14098	//         "heldForReview",
14099	//         "published",
14100	//         "rejected"
14101	//       ],
14102	//       "enumDescriptions": [
14103	//         "Marks a comment as awaiting review by a moderator.",
14104	//         "Clears a comment for public display.",
14105	//         "Rejects a comment as being unfit for display. This action also effectively hides all replies to the rejected comment.\n\nNote: The API does not currently provide a way to list or otherwise discover rejected comments. However, you can change the moderation status of a rejected comment if you still know its ID. If you were to change the moderation status of a rejected comment, the comment replies would subsequently be discoverable again as well."
14106	//       ],
14107	//       "location": "query",
14108	//       "required": true,
14109	//       "type": "string"
14110	//     }
14111	//   },
14112	//   "path": "comments/setModerationStatus",
14113	//   "scopes": [
14114	//     "https://www.googleapis.com/auth/youtube.force-ssl"
14115	//   ]
14116	// }
14117
14118}
14119
14120// method id "youtube.comments.update":
14121
14122type CommentsUpdateCall struct {
14123	s          *Service
14124	comment    *Comment
14125	urlParams_ gensupport.URLParams
14126	ctx_       context.Context
14127	header_    http.Header
14128}
14129
14130// Update: Modifies a comment.
14131func (r *CommentsService) Update(part string, comment *Comment) *CommentsUpdateCall {
14132	c := &CommentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14133	c.urlParams_.Set("part", part)
14134	c.comment = comment
14135	return c
14136}
14137
14138// Fields allows partial responses to be retrieved. See
14139// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14140// for more information.
14141func (c *CommentsUpdateCall) Fields(s ...googleapi.Field) *CommentsUpdateCall {
14142	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14143	return c
14144}
14145
14146// Context sets the context to be used in this call's Do method. Any
14147// pending HTTP request will be aborted if the provided context is
14148// canceled.
14149func (c *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
14150	c.ctx_ = ctx
14151	return c
14152}
14153
14154// Header returns an http.Header that can be modified by the caller to
14155// add HTTP headers to the request.
14156func (c *CommentsUpdateCall) Header() http.Header {
14157	if c.header_ == nil {
14158		c.header_ = make(http.Header)
14159	}
14160	return c.header_
14161}
14162
14163func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
14164	reqHeaders := make(http.Header)
14165	for k, v := range c.header_ {
14166		reqHeaders[k] = v
14167	}
14168	reqHeaders.Set("User-Agent", c.s.userAgent())
14169	var body io.Reader = nil
14170	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
14171	if err != nil {
14172		return nil, err
14173	}
14174	reqHeaders.Set("Content-Type", "application/json")
14175	c.urlParams_.Set("alt", alt)
14176	c.urlParams_.Set("prettyPrint", "false")
14177	urls := googleapi.ResolveRelative(c.s.BasePath, "comments")
14178	urls += "?" + c.urlParams_.Encode()
14179	req, err := http.NewRequest("PUT", urls, body)
14180	if err != nil {
14181		return nil, err
14182	}
14183	req.Header = reqHeaders
14184	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14185}
14186
14187// Do executes the "youtube.comments.update" call.
14188// Exactly one of *Comment or error will be non-nil. Any non-2xx status
14189// code is an error. Response headers are in either
14190// *Comment.ServerResponse.Header or (if a response was returned at all)
14191// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14192// check whether the returned error was because http.StatusNotModified
14193// was returned.
14194func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
14195	gensupport.SetOptions(c.urlParams_, opts...)
14196	res, err := c.doRequest("json")
14197	if res != nil && res.StatusCode == http.StatusNotModified {
14198		if res.Body != nil {
14199			res.Body.Close()
14200		}
14201		return nil, &googleapi.Error{
14202			Code:   res.StatusCode,
14203			Header: res.Header,
14204		}
14205	}
14206	if err != nil {
14207		return nil, err
14208	}
14209	defer googleapi.CloseBody(res)
14210	if err := googleapi.CheckResponse(res); err != nil {
14211		return nil, err
14212	}
14213	ret := &Comment{
14214		ServerResponse: googleapi.ServerResponse{
14215			Header:         res.Header,
14216			HTTPStatusCode: res.StatusCode,
14217		},
14218	}
14219	target := &ret
14220	if err := gensupport.DecodeResponse(target, res); err != nil {
14221		return nil, err
14222	}
14223	return ret, nil
14224	// {
14225	//   "description": "Modifies a comment.",
14226	//   "httpMethod": "PUT",
14227	//   "id": "youtube.comments.update",
14228	//   "parameterOrder": [
14229	//     "part"
14230	//   ],
14231	//   "parameters": {
14232	//     "part": {
14233	//       "description": "The part parameter identifies the properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update.",
14234	//       "location": "query",
14235	//       "required": true,
14236	//       "type": "string"
14237	//     }
14238	//   },
14239	//   "path": "comments",
14240	//   "request": {
14241	//     "$ref": "Comment"
14242	//   },
14243	//   "response": {
14244	//     "$ref": "Comment"
14245	//   },
14246	//   "scopes": [
14247	//     "https://www.googleapis.com/auth/youtube.force-ssl"
14248	//   ]
14249	// }
14250
14251}
14252
14253// method id "youtube.guideCategories.list":
14254
14255type GuideCategoriesListCall struct {
14256	s            *Service
14257	urlParams_   gensupport.URLParams
14258	ifNoneMatch_ string
14259	ctx_         context.Context
14260	header_      http.Header
14261}
14262
14263// List: Returns a list of categories that can be associated with
14264// YouTube channels.
14265func (r *GuideCategoriesService) List(part string) *GuideCategoriesListCall {
14266	c := &GuideCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14267	c.urlParams_.Set("part", part)
14268	return c
14269}
14270
14271// Hl sets the optional parameter "hl": The hl parameter specifies the
14272// language that will be used for text values in the API response.
14273func (c *GuideCategoriesListCall) Hl(hl string) *GuideCategoriesListCall {
14274	c.urlParams_.Set("hl", hl)
14275	return c
14276}
14277
14278// Id sets the optional parameter "id": The id parameter specifies a
14279// comma-separated list of the YouTube channel category ID(s) for the
14280// resource(s) that are being retrieved. In a guideCategory resource,
14281// the id property specifies the YouTube channel category ID.
14282func (c *GuideCategoriesListCall) Id(id string) *GuideCategoriesListCall {
14283	c.urlParams_.Set("id", id)
14284	return c
14285}
14286
14287// RegionCode sets the optional parameter "regionCode": The regionCode
14288// parameter instructs the API to return the list of guide categories
14289// available in the specified country. The parameter value is an ISO
14290// 3166-1 alpha-2 country code.
14291func (c *GuideCategoriesListCall) RegionCode(regionCode string) *GuideCategoriesListCall {
14292	c.urlParams_.Set("regionCode", regionCode)
14293	return c
14294}
14295
14296// Fields allows partial responses to be retrieved. See
14297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14298// for more information.
14299func (c *GuideCategoriesListCall) Fields(s ...googleapi.Field) *GuideCategoriesListCall {
14300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14301	return c
14302}
14303
14304// IfNoneMatch sets the optional parameter which makes the operation
14305// fail if the object's ETag matches the given value. This is useful for
14306// getting updates only after the object has changed since the last
14307// request. Use googleapi.IsNotModified to check whether the response
14308// error from Do is the result of In-None-Match.
14309func (c *GuideCategoriesListCall) IfNoneMatch(entityTag string) *GuideCategoriesListCall {
14310	c.ifNoneMatch_ = entityTag
14311	return c
14312}
14313
14314// Context sets the context to be used in this call's Do method. Any
14315// pending HTTP request will be aborted if the provided context is
14316// canceled.
14317func (c *GuideCategoriesListCall) Context(ctx context.Context) *GuideCategoriesListCall {
14318	c.ctx_ = ctx
14319	return c
14320}
14321
14322// Header returns an http.Header that can be modified by the caller to
14323// add HTTP headers to the request.
14324func (c *GuideCategoriesListCall) Header() http.Header {
14325	if c.header_ == nil {
14326		c.header_ = make(http.Header)
14327	}
14328	return c.header_
14329}
14330
14331func (c *GuideCategoriesListCall) doRequest(alt string) (*http.Response, error) {
14332	reqHeaders := make(http.Header)
14333	for k, v := range c.header_ {
14334		reqHeaders[k] = v
14335	}
14336	reqHeaders.Set("User-Agent", c.s.userAgent())
14337	if c.ifNoneMatch_ != "" {
14338		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14339	}
14340	var body io.Reader = nil
14341	c.urlParams_.Set("alt", alt)
14342	c.urlParams_.Set("prettyPrint", "false")
14343	urls := googleapi.ResolveRelative(c.s.BasePath, "guideCategories")
14344	urls += "?" + c.urlParams_.Encode()
14345	req, err := http.NewRequest("GET", urls, body)
14346	if err != nil {
14347		return nil, err
14348	}
14349	req.Header = reqHeaders
14350	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14351}
14352
14353// Do executes the "youtube.guideCategories.list" call.
14354// Exactly one of *GuideCategoryListResponse or error will be non-nil.
14355// Any non-2xx status code is an error. Response headers are in either
14356// *GuideCategoryListResponse.ServerResponse.Header or (if a response
14357// was returned at all) in error.(*googleapi.Error).Header. Use
14358// googleapi.IsNotModified to check whether the returned error was
14359// because http.StatusNotModified was returned.
14360func (c *GuideCategoriesListCall) Do(opts ...googleapi.CallOption) (*GuideCategoryListResponse, error) {
14361	gensupport.SetOptions(c.urlParams_, opts...)
14362	res, err := c.doRequest("json")
14363	if res != nil && res.StatusCode == http.StatusNotModified {
14364		if res.Body != nil {
14365			res.Body.Close()
14366		}
14367		return nil, &googleapi.Error{
14368			Code:   res.StatusCode,
14369			Header: res.Header,
14370		}
14371	}
14372	if err != nil {
14373		return nil, err
14374	}
14375	defer googleapi.CloseBody(res)
14376	if err := googleapi.CheckResponse(res); err != nil {
14377		return nil, err
14378	}
14379	ret := &GuideCategoryListResponse{
14380		ServerResponse: googleapi.ServerResponse{
14381			Header:         res.Header,
14382			HTTPStatusCode: res.StatusCode,
14383		},
14384	}
14385	target := &ret
14386	if err := gensupport.DecodeResponse(target, res); err != nil {
14387		return nil, err
14388	}
14389	return ret, nil
14390	// {
14391	//   "description": "Returns a list of categories that can be associated with YouTube channels.",
14392	//   "httpMethod": "GET",
14393	//   "id": "youtube.guideCategories.list",
14394	//   "parameterOrder": [
14395	//     "part"
14396	//   ],
14397	//   "parameters": {
14398	//     "hl": {
14399	//       "default": "en-US",
14400	//       "description": "The hl parameter specifies the language that will be used for text values in the API response.",
14401	//       "location": "query",
14402	//       "type": "string"
14403	//     },
14404	//     "id": {
14405	//       "description": "The id parameter specifies a comma-separated list of the YouTube channel category ID(s) for the resource(s) that are being retrieved. In a guideCategory resource, the id property specifies the YouTube channel category ID.",
14406	//       "location": "query",
14407	//       "type": "string"
14408	//     },
14409	//     "part": {
14410	//       "description": "The part parameter specifies the guideCategory resource properties that the API response will include. Set the parameter value to snippet.",
14411	//       "location": "query",
14412	//       "required": true,
14413	//       "type": "string"
14414	//     },
14415	//     "regionCode": {
14416	//       "description": "The regionCode parameter instructs the API to return the list of guide categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.",
14417	//       "location": "query",
14418	//       "type": "string"
14419	//     }
14420	//   },
14421	//   "path": "guideCategories",
14422	//   "response": {
14423	//     "$ref": "GuideCategoryListResponse"
14424	//   },
14425	//   "scopes": [
14426	//     "https://www.googleapis.com/auth/youtube",
14427	//     "https://www.googleapis.com/auth/youtube.force-ssl",
14428	//     "https://www.googleapis.com/auth/youtube.readonly",
14429	//     "https://www.googleapis.com/auth/youtubepartner"
14430	//   ]
14431	// }
14432
14433}
14434
14435// method id "youtube.i18nLanguages.list":
14436
14437type I18nLanguagesListCall struct {
14438	s            *Service
14439	urlParams_   gensupport.URLParams
14440	ifNoneMatch_ string
14441	ctx_         context.Context
14442	header_      http.Header
14443}
14444
14445// List: Returns a list of application languages that the YouTube
14446// website supports.
14447func (r *I18nLanguagesService) List(part string) *I18nLanguagesListCall {
14448	c := &I18nLanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14449	c.urlParams_.Set("part", part)
14450	return c
14451}
14452
14453// Hl sets the optional parameter "hl": The hl parameter specifies the
14454// language that should be used for text values in the API response.
14455func (c *I18nLanguagesListCall) Hl(hl string) *I18nLanguagesListCall {
14456	c.urlParams_.Set("hl", hl)
14457	return c
14458}
14459
14460// Fields allows partial responses to be retrieved. See
14461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14462// for more information.
14463func (c *I18nLanguagesListCall) Fields(s ...googleapi.Field) *I18nLanguagesListCall {
14464	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14465	return c
14466}
14467
14468// IfNoneMatch sets the optional parameter which makes the operation
14469// fail if the object's ETag matches the given value. This is useful for
14470// getting updates only after the object has changed since the last
14471// request. Use googleapi.IsNotModified to check whether the response
14472// error from Do is the result of In-None-Match.
14473func (c *I18nLanguagesListCall) IfNoneMatch(entityTag string) *I18nLanguagesListCall {
14474	c.ifNoneMatch_ = entityTag
14475	return c
14476}
14477
14478// Context sets the context to be used in this call's Do method. Any
14479// pending HTTP request will be aborted if the provided context is
14480// canceled.
14481func (c *I18nLanguagesListCall) Context(ctx context.Context) *I18nLanguagesListCall {
14482	c.ctx_ = ctx
14483	return c
14484}
14485
14486// Header returns an http.Header that can be modified by the caller to
14487// add HTTP headers to the request.
14488func (c *I18nLanguagesListCall) Header() http.Header {
14489	if c.header_ == nil {
14490		c.header_ = make(http.Header)
14491	}
14492	return c.header_
14493}
14494
14495func (c *I18nLanguagesListCall) doRequest(alt string) (*http.Response, error) {
14496	reqHeaders := make(http.Header)
14497	for k, v := range c.header_ {
14498		reqHeaders[k] = v
14499	}
14500	reqHeaders.Set("User-Agent", c.s.userAgent())
14501	if c.ifNoneMatch_ != "" {
14502		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14503	}
14504	var body io.Reader = nil
14505	c.urlParams_.Set("alt", alt)
14506	c.urlParams_.Set("prettyPrint", "false")
14507	urls := googleapi.ResolveRelative(c.s.BasePath, "i18nLanguages")
14508	urls += "?" + c.urlParams_.Encode()
14509	req, err := http.NewRequest("GET", urls, body)
14510	if err != nil {
14511		return nil, err
14512	}
14513	req.Header = reqHeaders
14514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14515}
14516
14517// Do executes the "youtube.i18nLanguages.list" call.
14518// Exactly one of *I18nLanguageListResponse or error will be non-nil.
14519// Any non-2xx status code is an error. Response headers are in either
14520// *I18nLanguageListResponse.ServerResponse.Header or (if a response was
14521// returned at all) in error.(*googleapi.Error).Header. Use
14522// googleapi.IsNotModified to check whether the returned error was
14523// because http.StatusNotModified was returned.
14524func (c *I18nLanguagesListCall) Do(opts ...googleapi.CallOption) (*I18nLanguageListResponse, error) {
14525	gensupport.SetOptions(c.urlParams_, opts...)
14526	res, err := c.doRequest("json")
14527	if res != nil && res.StatusCode == http.StatusNotModified {
14528		if res.Body != nil {
14529			res.Body.Close()
14530		}
14531		return nil, &googleapi.Error{
14532			Code:   res.StatusCode,
14533			Header: res.Header,
14534		}
14535	}
14536	if err != nil {
14537		return nil, err
14538	}
14539	defer googleapi.CloseBody(res)
14540	if err := googleapi.CheckResponse(res); err != nil {
14541		return nil, err
14542	}
14543	ret := &I18nLanguageListResponse{
14544		ServerResponse: googleapi.ServerResponse{
14545			Header:         res.Header,
14546			HTTPStatusCode: res.StatusCode,
14547		},
14548	}
14549	target := &ret
14550	if err := gensupport.DecodeResponse(target, res); err != nil {
14551		return nil, err
14552	}
14553	return ret, nil
14554	// {
14555	//   "description": "Returns a list of application languages that the YouTube website supports.",
14556	//   "httpMethod": "GET",
14557	//   "id": "youtube.i18nLanguages.list",
14558	//   "parameterOrder": [
14559	//     "part"
14560	//   ],
14561	//   "parameters": {
14562	//     "hl": {
14563	//       "default": "en_US",
14564	//       "description": "The hl parameter specifies the language that should be used for text values in the API response.",
14565	//       "location": "query",
14566	//       "type": "string"
14567	//     },
14568	//     "part": {
14569	//       "description": "The part parameter specifies the i18nLanguage resource properties that the API response will include. Set the parameter value to snippet.",
14570	//       "location": "query",
14571	//       "required": true,
14572	//       "type": "string"
14573	//     }
14574	//   },
14575	//   "path": "i18nLanguages",
14576	//   "response": {
14577	//     "$ref": "I18nLanguageListResponse"
14578	//   },
14579	//   "scopes": [
14580	//     "https://www.googleapis.com/auth/youtube",
14581	//     "https://www.googleapis.com/auth/youtube.force-ssl",
14582	//     "https://www.googleapis.com/auth/youtube.readonly",
14583	//     "https://www.googleapis.com/auth/youtubepartner"
14584	//   ]
14585	// }
14586
14587}
14588
14589// method id "youtube.i18nRegions.list":
14590
14591type I18nRegionsListCall struct {
14592	s            *Service
14593	urlParams_   gensupport.URLParams
14594	ifNoneMatch_ string
14595	ctx_         context.Context
14596	header_      http.Header
14597}
14598
14599// List: Returns a list of content regions that the YouTube website
14600// supports.
14601func (r *I18nRegionsService) List(part string) *I18nRegionsListCall {
14602	c := &I18nRegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14603	c.urlParams_.Set("part", part)
14604	return c
14605}
14606
14607// Hl sets the optional parameter "hl": The hl parameter specifies the
14608// language that should be used for text values in the API response.
14609func (c *I18nRegionsListCall) Hl(hl string) *I18nRegionsListCall {
14610	c.urlParams_.Set("hl", hl)
14611	return c
14612}
14613
14614// Fields allows partial responses to be retrieved. See
14615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14616// for more information.
14617func (c *I18nRegionsListCall) Fields(s ...googleapi.Field) *I18nRegionsListCall {
14618	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14619	return c
14620}
14621
14622// IfNoneMatch sets the optional parameter which makes the operation
14623// fail if the object's ETag matches the given value. This is useful for
14624// getting updates only after the object has changed since the last
14625// request. Use googleapi.IsNotModified to check whether the response
14626// error from Do is the result of In-None-Match.
14627func (c *I18nRegionsListCall) IfNoneMatch(entityTag string) *I18nRegionsListCall {
14628	c.ifNoneMatch_ = entityTag
14629	return c
14630}
14631
14632// Context sets the context to be used in this call's Do method. Any
14633// pending HTTP request will be aborted if the provided context is
14634// canceled.
14635func (c *I18nRegionsListCall) Context(ctx context.Context) *I18nRegionsListCall {
14636	c.ctx_ = ctx
14637	return c
14638}
14639
14640// Header returns an http.Header that can be modified by the caller to
14641// add HTTP headers to the request.
14642func (c *I18nRegionsListCall) Header() http.Header {
14643	if c.header_ == nil {
14644		c.header_ = make(http.Header)
14645	}
14646	return c.header_
14647}
14648
14649func (c *I18nRegionsListCall) doRequest(alt string) (*http.Response, error) {
14650	reqHeaders := make(http.Header)
14651	for k, v := range c.header_ {
14652		reqHeaders[k] = v
14653	}
14654	reqHeaders.Set("User-Agent", c.s.userAgent())
14655	if c.ifNoneMatch_ != "" {
14656		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14657	}
14658	var body io.Reader = nil
14659	c.urlParams_.Set("alt", alt)
14660	c.urlParams_.Set("prettyPrint", "false")
14661	urls := googleapi.ResolveRelative(c.s.BasePath, "i18nRegions")
14662	urls += "?" + c.urlParams_.Encode()
14663	req, err := http.NewRequest("GET", urls, body)
14664	if err != nil {
14665		return nil, err
14666	}
14667	req.Header = reqHeaders
14668	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14669}
14670
14671// Do executes the "youtube.i18nRegions.list" call.
14672// Exactly one of *I18nRegionListResponse or error will be non-nil. Any
14673// non-2xx status code is an error. Response headers are in either
14674// *I18nRegionListResponse.ServerResponse.Header or (if a response was
14675// returned at all) in error.(*googleapi.Error).Header. Use
14676// googleapi.IsNotModified to check whether the returned error was
14677// because http.StatusNotModified was returned.
14678func (c *I18nRegionsListCall) Do(opts ...googleapi.CallOption) (*I18nRegionListResponse, error) {
14679	gensupport.SetOptions(c.urlParams_, opts...)
14680	res, err := c.doRequest("json")
14681	if res != nil && res.StatusCode == http.StatusNotModified {
14682		if res.Body != nil {
14683			res.Body.Close()
14684		}
14685		return nil, &googleapi.Error{
14686			Code:   res.StatusCode,
14687			Header: res.Header,
14688		}
14689	}
14690	if err != nil {
14691		return nil, err
14692	}
14693	defer googleapi.CloseBody(res)
14694	if err := googleapi.CheckResponse(res); err != nil {
14695		return nil, err
14696	}
14697	ret := &I18nRegionListResponse{
14698		ServerResponse: googleapi.ServerResponse{
14699			Header:         res.Header,
14700			HTTPStatusCode: res.StatusCode,
14701		},
14702	}
14703	target := &ret
14704	if err := gensupport.DecodeResponse(target, res); err != nil {
14705		return nil, err
14706	}
14707	return ret, nil
14708	// {
14709	//   "description": "Returns a list of content regions that the YouTube website supports.",
14710	//   "httpMethod": "GET",
14711	//   "id": "youtube.i18nRegions.list",
14712	//   "parameterOrder": [
14713	//     "part"
14714	//   ],
14715	//   "parameters": {
14716	//     "hl": {
14717	//       "default": "en_US",
14718	//       "description": "The hl parameter specifies the language that should be used for text values in the API response.",
14719	//       "location": "query",
14720	//       "type": "string"
14721	//     },
14722	//     "part": {
14723	//       "description": "The part parameter specifies the i18nRegion resource properties that the API response will include. Set the parameter value to snippet.",
14724	//       "location": "query",
14725	//       "required": true,
14726	//       "type": "string"
14727	//     }
14728	//   },
14729	//   "path": "i18nRegions",
14730	//   "response": {
14731	//     "$ref": "I18nRegionListResponse"
14732	//   },
14733	//   "scopes": [
14734	//     "https://www.googleapis.com/auth/youtube",
14735	//     "https://www.googleapis.com/auth/youtube.force-ssl",
14736	//     "https://www.googleapis.com/auth/youtube.readonly",
14737	//     "https://www.googleapis.com/auth/youtubepartner"
14738	//   ]
14739	// }
14740
14741}
14742
14743// method id "youtube.liveBroadcasts.bind":
14744
14745type LiveBroadcastsBindCall struct {
14746	s          *Service
14747	urlParams_ gensupport.URLParams
14748	ctx_       context.Context
14749	header_    http.Header
14750}
14751
14752// Bind: Binds a YouTube broadcast to a stream or removes an existing
14753// binding between a broadcast and a stream. A broadcast can only be
14754// bound to one video stream, though a video stream may be bound to more
14755// than one broadcast.
14756func (r *LiveBroadcastsService) Bind(id string, part string) *LiveBroadcastsBindCall {
14757	c := &LiveBroadcastsBindCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14758	c.urlParams_.Set("id", id)
14759	c.urlParams_.Set("part", part)
14760	return c
14761}
14762
14763// OnBehalfOfContentOwner sets the optional parameter
14764// "onBehalfOfContentOwner": Note: This parameter is intended
14765// exclusively for YouTube content partners.
14766//
14767// The onBehalfOfContentOwner parameter indicates that the request's
14768// authorization credentials identify a YouTube CMS user who is acting
14769// on behalf of the content owner specified in the parameter value. This
14770// parameter is intended for YouTube content partners that own and
14771// manage many different YouTube channels. It allows content owners to
14772// authenticate once and get access to all their video and channel data,
14773// without having to provide authentication credentials for each
14774// individual channel. The CMS account that the user authenticates with
14775// must be linked to the specified YouTube content owner.
14776func (c *LiveBroadcastsBindCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsBindCall {
14777	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
14778	return c
14779}
14780
14781// OnBehalfOfContentOwnerChannel sets the optional parameter
14782// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
14783// properly authorized request. Note: This parameter is intended
14784// exclusively for YouTube content partners.
14785//
14786// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
14787// channel ID of the channel to which a video is being added. This
14788// parameter is required when a request specifies a value for the
14789// onBehalfOfContentOwner parameter, and it can only be used in
14790// conjunction with that parameter. In addition, the request must be
14791// authorized using a CMS account that is linked to the content owner
14792// that the onBehalfOfContentOwner parameter specifies. Finally, the
14793// channel that the onBehalfOfContentOwnerChannel parameter value
14794// specifies must be linked to the content owner that the
14795// onBehalfOfContentOwner parameter specifies.
14796//
14797// This parameter is intended for YouTube content partners that own and
14798// manage many different YouTube channels. It allows content owners to
14799// authenticate once and perform actions on behalf of the channel
14800// specified in the parameter value, without having to provide
14801// authentication credentials for each separate channel.
14802func (c *LiveBroadcastsBindCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsBindCall {
14803	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
14804	return c
14805}
14806
14807// StreamId sets the optional parameter "streamId": The streamId
14808// parameter specifies the unique ID of the video stream that is being
14809// bound to a broadcast. If this parameter is omitted, the API will
14810// remove any existing binding between the broadcast and a video stream.
14811func (c *LiveBroadcastsBindCall) StreamId(streamId string) *LiveBroadcastsBindCall {
14812	c.urlParams_.Set("streamId", streamId)
14813	return c
14814}
14815
14816// Fields allows partial responses to be retrieved. See
14817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14818// for more information.
14819func (c *LiveBroadcastsBindCall) Fields(s ...googleapi.Field) *LiveBroadcastsBindCall {
14820	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14821	return c
14822}
14823
14824// Context sets the context to be used in this call's Do method. Any
14825// pending HTTP request will be aborted if the provided context is
14826// canceled.
14827func (c *LiveBroadcastsBindCall) Context(ctx context.Context) *LiveBroadcastsBindCall {
14828	c.ctx_ = ctx
14829	return c
14830}
14831
14832// Header returns an http.Header that can be modified by the caller to
14833// add HTTP headers to the request.
14834func (c *LiveBroadcastsBindCall) Header() http.Header {
14835	if c.header_ == nil {
14836		c.header_ = make(http.Header)
14837	}
14838	return c.header_
14839}
14840
14841func (c *LiveBroadcastsBindCall) doRequest(alt string) (*http.Response, error) {
14842	reqHeaders := make(http.Header)
14843	for k, v := range c.header_ {
14844		reqHeaders[k] = v
14845	}
14846	reqHeaders.Set("User-Agent", c.s.userAgent())
14847	var body io.Reader = nil
14848	c.urlParams_.Set("alt", alt)
14849	c.urlParams_.Set("prettyPrint", "false")
14850	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts/bind")
14851	urls += "?" + c.urlParams_.Encode()
14852	req, err := http.NewRequest("POST", urls, body)
14853	if err != nil {
14854		return nil, err
14855	}
14856	req.Header = reqHeaders
14857	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14858}
14859
14860// Do executes the "youtube.liveBroadcasts.bind" call.
14861// Exactly one of *LiveBroadcast or error will be non-nil. Any non-2xx
14862// status code is an error. Response headers are in either
14863// *LiveBroadcast.ServerResponse.Header or (if a response was returned
14864// at all) in error.(*googleapi.Error).Header. Use
14865// googleapi.IsNotModified to check whether the returned error was
14866// because http.StatusNotModified was returned.
14867func (c *LiveBroadcastsBindCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
14868	gensupport.SetOptions(c.urlParams_, opts...)
14869	res, err := c.doRequest("json")
14870	if res != nil && res.StatusCode == http.StatusNotModified {
14871		if res.Body != nil {
14872			res.Body.Close()
14873		}
14874		return nil, &googleapi.Error{
14875			Code:   res.StatusCode,
14876			Header: res.Header,
14877		}
14878	}
14879	if err != nil {
14880		return nil, err
14881	}
14882	defer googleapi.CloseBody(res)
14883	if err := googleapi.CheckResponse(res); err != nil {
14884		return nil, err
14885	}
14886	ret := &LiveBroadcast{
14887		ServerResponse: googleapi.ServerResponse{
14888			Header:         res.Header,
14889			HTTPStatusCode: res.StatusCode,
14890		},
14891	}
14892	target := &ret
14893	if err := gensupport.DecodeResponse(target, res); err != nil {
14894		return nil, err
14895	}
14896	return ret, nil
14897	// {
14898	//   "description": "Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream, though a video stream may be bound to more than one broadcast.",
14899	//   "httpMethod": "POST",
14900	//   "id": "youtube.liveBroadcasts.bind",
14901	//   "parameterOrder": [
14902	//     "id",
14903	//     "part"
14904	//   ],
14905	//   "parameters": {
14906	//     "id": {
14907	//       "description": "The id parameter specifies the unique ID of the broadcast that is being bound to a video stream.",
14908	//       "location": "query",
14909	//       "required": true,
14910	//       "type": "string"
14911	//     },
14912	//     "onBehalfOfContentOwner": {
14913	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
14914	//       "location": "query",
14915	//       "type": "string"
14916	//     },
14917	//     "onBehalfOfContentOwnerChannel": {
14918	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
14919	//       "location": "query",
14920	//       "type": "string"
14921	//     },
14922	//     "part": {
14923	//       "description": "The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.",
14924	//       "location": "query",
14925	//       "required": true,
14926	//       "type": "string"
14927	//     },
14928	//     "streamId": {
14929	//       "description": "The streamId parameter specifies the unique ID of the video stream that is being bound to a broadcast. If this parameter is omitted, the API will remove any existing binding between the broadcast and a video stream.",
14930	//       "location": "query",
14931	//       "type": "string"
14932	//     }
14933	//   },
14934	//   "path": "liveBroadcasts/bind",
14935	//   "response": {
14936	//     "$ref": "LiveBroadcast"
14937	//   },
14938	//   "scopes": [
14939	//     "https://www.googleapis.com/auth/youtube",
14940	//     "https://www.googleapis.com/auth/youtube.force-ssl"
14941	//   ]
14942	// }
14943
14944}
14945
14946// method id "youtube.liveBroadcasts.control":
14947
14948type LiveBroadcastsControlCall struct {
14949	s          *Service
14950	urlParams_ gensupport.URLParams
14951	ctx_       context.Context
14952	header_    http.Header
14953}
14954
14955// Control: Controls the settings for a slate that can be displayed in
14956// the broadcast stream.
14957func (r *LiveBroadcastsService) Control(id string, part string) *LiveBroadcastsControlCall {
14958	c := &LiveBroadcastsControlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14959	c.urlParams_.Set("id", id)
14960	c.urlParams_.Set("part", part)
14961	return c
14962}
14963
14964// DisplaySlate sets the optional parameter "displaySlate": The
14965// displaySlate parameter specifies whether the slate is being enabled
14966// or disabled.
14967func (c *LiveBroadcastsControlCall) DisplaySlate(displaySlate bool) *LiveBroadcastsControlCall {
14968	c.urlParams_.Set("displaySlate", fmt.Sprint(displaySlate))
14969	return c
14970}
14971
14972// OffsetTimeMs sets the optional parameter "offsetTimeMs": The
14973// offsetTimeMs parameter specifies a positive time offset when the
14974// specified slate change will occur. The value is measured in
14975// milliseconds from the beginning of the broadcast's monitor stream,
14976// which is the time that the testing phase for the broadcast began.
14977// Even though it is specified in milliseconds, the value is actually an
14978// approximation, and YouTube completes the requested action as closely
14979// as possible to that time.
14980//
14981// If you do not specify a value for this parameter, then YouTube
14982// performs the action as soon as possible. See the Getting started
14983// guide for more details.
14984//
14985// Important: You should only specify a value for this parameter if your
14986// broadcast stream is delayed.
14987func (c *LiveBroadcastsControlCall) OffsetTimeMs(offsetTimeMs uint64) *LiveBroadcastsControlCall {
14988	c.urlParams_.Set("offsetTimeMs", fmt.Sprint(offsetTimeMs))
14989	return c
14990}
14991
14992// OnBehalfOfContentOwner sets the optional parameter
14993// "onBehalfOfContentOwner": Note: This parameter is intended
14994// exclusively for YouTube content partners.
14995//
14996// The onBehalfOfContentOwner parameter indicates that the request's
14997// authorization credentials identify a YouTube CMS user who is acting
14998// on behalf of the content owner specified in the parameter value. This
14999// parameter is intended for YouTube content partners that own and
15000// manage many different YouTube channels. It allows content owners to
15001// authenticate once and get access to all their video and channel data,
15002// without having to provide authentication credentials for each
15003// individual channel. The CMS account that the user authenticates with
15004// must be linked to the specified YouTube content owner.
15005func (c *LiveBroadcastsControlCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsControlCall {
15006	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15007	return c
15008}
15009
15010// OnBehalfOfContentOwnerChannel sets the optional parameter
15011// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
15012// properly authorized request. Note: This parameter is intended
15013// exclusively for YouTube content partners.
15014//
15015// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
15016// channel ID of the channel to which a video is being added. This
15017// parameter is required when a request specifies a value for the
15018// onBehalfOfContentOwner parameter, and it can only be used in
15019// conjunction with that parameter. In addition, the request must be
15020// authorized using a CMS account that is linked to the content owner
15021// that the onBehalfOfContentOwner parameter specifies. Finally, the
15022// channel that the onBehalfOfContentOwnerChannel parameter value
15023// specifies must be linked to the content owner that the
15024// onBehalfOfContentOwner parameter specifies.
15025//
15026// This parameter is intended for YouTube content partners that own and
15027// manage many different YouTube channels. It allows content owners to
15028// authenticate once and perform actions on behalf of the channel
15029// specified in the parameter value, without having to provide
15030// authentication credentials for each separate channel.
15031func (c *LiveBroadcastsControlCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsControlCall {
15032	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
15033	return c
15034}
15035
15036// Walltime sets the optional parameter "walltime": The walltime
15037// parameter specifies the wall clock time at which the specified slate
15038// change will occur. The value is specified in ISO 8601
15039// (YYYY-MM-DDThh:mm:ss.sssZ) format.
15040func (c *LiveBroadcastsControlCall) Walltime(walltime string) *LiveBroadcastsControlCall {
15041	c.urlParams_.Set("walltime", walltime)
15042	return c
15043}
15044
15045// Fields allows partial responses to be retrieved. See
15046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15047// for more information.
15048func (c *LiveBroadcastsControlCall) Fields(s ...googleapi.Field) *LiveBroadcastsControlCall {
15049	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15050	return c
15051}
15052
15053// Context sets the context to be used in this call's Do method. Any
15054// pending HTTP request will be aborted if the provided context is
15055// canceled.
15056func (c *LiveBroadcastsControlCall) Context(ctx context.Context) *LiveBroadcastsControlCall {
15057	c.ctx_ = ctx
15058	return c
15059}
15060
15061// Header returns an http.Header that can be modified by the caller to
15062// add HTTP headers to the request.
15063func (c *LiveBroadcastsControlCall) Header() http.Header {
15064	if c.header_ == nil {
15065		c.header_ = make(http.Header)
15066	}
15067	return c.header_
15068}
15069
15070func (c *LiveBroadcastsControlCall) doRequest(alt string) (*http.Response, error) {
15071	reqHeaders := make(http.Header)
15072	for k, v := range c.header_ {
15073		reqHeaders[k] = v
15074	}
15075	reqHeaders.Set("User-Agent", c.s.userAgent())
15076	var body io.Reader = nil
15077	c.urlParams_.Set("alt", alt)
15078	c.urlParams_.Set("prettyPrint", "false")
15079	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts/control")
15080	urls += "?" + c.urlParams_.Encode()
15081	req, err := http.NewRequest("POST", urls, body)
15082	if err != nil {
15083		return nil, err
15084	}
15085	req.Header = reqHeaders
15086	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15087}
15088
15089// Do executes the "youtube.liveBroadcasts.control" call.
15090// Exactly one of *LiveBroadcast or error will be non-nil. Any non-2xx
15091// status code is an error. Response headers are in either
15092// *LiveBroadcast.ServerResponse.Header or (if a response was returned
15093// at all) in error.(*googleapi.Error).Header. Use
15094// googleapi.IsNotModified to check whether the returned error was
15095// because http.StatusNotModified was returned.
15096func (c *LiveBroadcastsControlCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
15097	gensupport.SetOptions(c.urlParams_, opts...)
15098	res, err := c.doRequest("json")
15099	if res != nil && res.StatusCode == http.StatusNotModified {
15100		if res.Body != nil {
15101			res.Body.Close()
15102		}
15103		return nil, &googleapi.Error{
15104			Code:   res.StatusCode,
15105			Header: res.Header,
15106		}
15107	}
15108	if err != nil {
15109		return nil, err
15110	}
15111	defer googleapi.CloseBody(res)
15112	if err := googleapi.CheckResponse(res); err != nil {
15113		return nil, err
15114	}
15115	ret := &LiveBroadcast{
15116		ServerResponse: googleapi.ServerResponse{
15117			Header:         res.Header,
15118			HTTPStatusCode: res.StatusCode,
15119		},
15120	}
15121	target := &ret
15122	if err := gensupport.DecodeResponse(target, res); err != nil {
15123		return nil, err
15124	}
15125	return ret, nil
15126	// {
15127	//   "description": "Controls the settings for a slate that can be displayed in the broadcast stream.",
15128	//   "httpMethod": "POST",
15129	//   "id": "youtube.liveBroadcasts.control",
15130	//   "parameterOrder": [
15131	//     "id",
15132	//     "part"
15133	//   ],
15134	//   "parameters": {
15135	//     "displaySlate": {
15136	//       "description": "The displaySlate parameter specifies whether the slate is being enabled or disabled.",
15137	//       "location": "query",
15138	//       "type": "boolean"
15139	//     },
15140	//     "id": {
15141	//       "description": "The id parameter specifies the YouTube live broadcast ID that uniquely identifies the broadcast in which the slate is being updated.",
15142	//       "location": "query",
15143	//       "required": true,
15144	//       "type": "string"
15145	//     },
15146	//     "offsetTimeMs": {
15147	//       "description": "The offsetTimeMs parameter specifies a positive time offset when the specified slate change will occur. The value is measured in milliseconds from the beginning of the broadcast's monitor stream, which is the time that the testing phase for the broadcast began. Even though it is specified in milliseconds, the value is actually an approximation, and YouTube completes the requested action as closely as possible to that time.\n\nIf you do not specify a value for this parameter, then YouTube performs the action as soon as possible. See the Getting started guide for more details.\n\nImportant: You should only specify a value for this parameter if your broadcast stream is delayed.",
15148	//       "format": "uint64",
15149	//       "location": "query",
15150	//       "type": "string"
15151	//     },
15152	//     "onBehalfOfContentOwner": {
15153	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
15154	//       "location": "query",
15155	//       "type": "string"
15156	//     },
15157	//     "onBehalfOfContentOwnerChannel": {
15158	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
15159	//       "location": "query",
15160	//       "type": "string"
15161	//     },
15162	//     "part": {
15163	//       "description": "The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.",
15164	//       "location": "query",
15165	//       "required": true,
15166	//       "type": "string"
15167	//     },
15168	//     "walltime": {
15169	//       "description": "The walltime parameter specifies the wall clock time at which the specified slate change will occur. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ) format.",
15170	//       "format": "date-time",
15171	//       "location": "query",
15172	//       "type": "string"
15173	//     }
15174	//   },
15175	//   "path": "liveBroadcasts/control",
15176	//   "response": {
15177	//     "$ref": "LiveBroadcast"
15178	//   },
15179	//   "scopes": [
15180	//     "https://www.googleapis.com/auth/youtube",
15181	//     "https://www.googleapis.com/auth/youtube.force-ssl"
15182	//   ]
15183	// }
15184
15185}
15186
15187// method id "youtube.liveBroadcasts.delete":
15188
15189type LiveBroadcastsDeleteCall struct {
15190	s          *Service
15191	urlParams_ gensupport.URLParams
15192	ctx_       context.Context
15193	header_    http.Header
15194}
15195
15196// Delete: Deletes a broadcast.
15197func (r *LiveBroadcastsService) Delete(id string) *LiveBroadcastsDeleteCall {
15198	c := &LiveBroadcastsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15199	c.urlParams_.Set("id", id)
15200	return c
15201}
15202
15203// OnBehalfOfContentOwner sets the optional parameter
15204// "onBehalfOfContentOwner": Note: This parameter is intended
15205// exclusively for YouTube content partners.
15206//
15207// The onBehalfOfContentOwner parameter indicates that the request's
15208// authorization credentials identify a YouTube CMS user who is acting
15209// on behalf of the content owner specified in the parameter value. This
15210// parameter is intended for YouTube content partners that own and
15211// manage many different YouTube channels. It allows content owners to
15212// authenticate once and get access to all their video and channel data,
15213// without having to provide authentication credentials for each
15214// individual channel. The CMS account that the user authenticates with
15215// must be linked to the specified YouTube content owner.
15216func (c *LiveBroadcastsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsDeleteCall {
15217	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15218	return c
15219}
15220
15221// OnBehalfOfContentOwnerChannel sets the optional parameter
15222// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
15223// properly authorized request. Note: This parameter is intended
15224// exclusively for YouTube content partners.
15225//
15226// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
15227// channel ID of the channel to which a video is being added. This
15228// parameter is required when a request specifies a value for the
15229// onBehalfOfContentOwner parameter, and it can only be used in
15230// conjunction with that parameter. In addition, the request must be
15231// authorized using a CMS account that is linked to the content owner
15232// that the onBehalfOfContentOwner parameter specifies. Finally, the
15233// channel that the onBehalfOfContentOwnerChannel parameter value
15234// specifies must be linked to the content owner that the
15235// onBehalfOfContentOwner parameter specifies.
15236//
15237// This parameter is intended for YouTube content partners that own and
15238// manage many different YouTube channels. It allows content owners to
15239// authenticate once and perform actions on behalf of the channel
15240// specified in the parameter value, without having to provide
15241// authentication credentials for each separate channel.
15242func (c *LiveBroadcastsDeleteCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsDeleteCall {
15243	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
15244	return c
15245}
15246
15247// Fields allows partial responses to be retrieved. See
15248// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15249// for more information.
15250func (c *LiveBroadcastsDeleteCall) Fields(s ...googleapi.Field) *LiveBroadcastsDeleteCall {
15251	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15252	return c
15253}
15254
15255// Context sets the context to be used in this call's Do method. Any
15256// pending HTTP request will be aborted if the provided context is
15257// canceled.
15258func (c *LiveBroadcastsDeleteCall) Context(ctx context.Context) *LiveBroadcastsDeleteCall {
15259	c.ctx_ = ctx
15260	return c
15261}
15262
15263// Header returns an http.Header that can be modified by the caller to
15264// add HTTP headers to the request.
15265func (c *LiveBroadcastsDeleteCall) Header() http.Header {
15266	if c.header_ == nil {
15267		c.header_ = make(http.Header)
15268	}
15269	return c.header_
15270}
15271
15272func (c *LiveBroadcastsDeleteCall) doRequest(alt string) (*http.Response, error) {
15273	reqHeaders := make(http.Header)
15274	for k, v := range c.header_ {
15275		reqHeaders[k] = v
15276	}
15277	reqHeaders.Set("User-Agent", c.s.userAgent())
15278	var body io.Reader = nil
15279	c.urlParams_.Set("alt", alt)
15280	c.urlParams_.Set("prettyPrint", "false")
15281	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts")
15282	urls += "?" + c.urlParams_.Encode()
15283	req, err := http.NewRequest("DELETE", urls, body)
15284	if err != nil {
15285		return nil, err
15286	}
15287	req.Header = reqHeaders
15288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15289}
15290
15291// Do executes the "youtube.liveBroadcasts.delete" call.
15292func (c *LiveBroadcastsDeleteCall) Do(opts ...googleapi.CallOption) error {
15293	gensupport.SetOptions(c.urlParams_, opts...)
15294	res, err := c.doRequest("json")
15295	if err != nil {
15296		return err
15297	}
15298	defer googleapi.CloseBody(res)
15299	if err := googleapi.CheckResponse(res); err != nil {
15300		return err
15301	}
15302	return nil
15303	// {
15304	//   "description": "Deletes a broadcast.",
15305	//   "httpMethod": "DELETE",
15306	//   "id": "youtube.liveBroadcasts.delete",
15307	//   "parameterOrder": [
15308	//     "id"
15309	//   ],
15310	//   "parameters": {
15311	//     "id": {
15312	//       "description": "The id parameter specifies the YouTube live broadcast ID for the resource that is being deleted.",
15313	//       "location": "query",
15314	//       "required": true,
15315	//       "type": "string"
15316	//     },
15317	//     "onBehalfOfContentOwner": {
15318	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
15319	//       "location": "query",
15320	//       "type": "string"
15321	//     },
15322	//     "onBehalfOfContentOwnerChannel": {
15323	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
15324	//       "location": "query",
15325	//       "type": "string"
15326	//     }
15327	//   },
15328	//   "path": "liveBroadcasts",
15329	//   "scopes": [
15330	//     "https://www.googleapis.com/auth/youtube",
15331	//     "https://www.googleapis.com/auth/youtube.force-ssl"
15332	//   ]
15333	// }
15334
15335}
15336
15337// method id "youtube.liveBroadcasts.insert":
15338
15339type LiveBroadcastsInsertCall struct {
15340	s             *Service
15341	livebroadcast *LiveBroadcast
15342	urlParams_    gensupport.URLParams
15343	ctx_          context.Context
15344	header_       http.Header
15345}
15346
15347// Insert: Creates a broadcast.
15348func (r *LiveBroadcastsService) Insert(part string, livebroadcast *LiveBroadcast) *LiveBroadcastsInsertCall {
15349	c := &LiveBroadcastsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15350	c.urlParams_.Set("part", part)
15351	c.livebroadcast = livebroadcast
15352	return c
15353}
15354
15355// OnBehalfOfContentOwner sets the optional parameter
15356// "onBehalfOfContentOwner": Note: This parameter is intended
15357// exclusively for YouTube content partners.
15358//
15359// The onBehalfOfContentOwner parameter indicates that the request's
15360// authorization credentials identify a YouTube CMS user who is acting
15361// on behalf of the content owner specified in the parameter value. This
15362// parameter is intended for YouTube content partners that own and
15363// manage many different YouTube channels. It allows content owners to
15364// authenticate once and get access to all their video and channel data,
15365// without having to provide authentication credentials for each
15366// individual channel. The CMS account that the user authenticates with
15367// must be linked to the specified YouTube content owner.
15368func (c *LiveBroadcastsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsInsertCall {
15369	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15370	return c
15371}
15372
15373// OnBehalfOfContentOwnerChannel sets the optional parameter
15374// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
15375// properly authorized request. Note: This parameter is intended
15376// exclusively for YouTube content partners.
15377//
15378// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
15379// channel ID of the channel to which a video is being added. This
15380// parameter is required when a request specifies a value for the
15381// onBehalfOfContentOwner parameter, and it can only be used in
15382// conjunction with that parameter. In addition, the request must be
15383// authorized using a CMS account that is linked to the content owner
15384// that the onBehalfOfContentOwner parameter specifies. Finally, the
15385// channel that the onBehalfOfContentOwnerChannel parameter value
15386// specifies must be linked to the content owner that the
15387// onBehalfOfContentOwner parameter specifies.
15388//
15389// This parameter is intended for YouTube content partners that own and
15390// manage many different YouTube channels. It allows content owners to
15391// authenticate once and perform actions on behalf of the channel
15392// specified in the parameter value, without having to provide
15393// authentication credentials for each separate channel.
15394func (c *LiveBroadcastsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsInsertCall {
15395	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
15396	return c
15397}
15398
15399// Fields allows partial responses to be retrieved. See
15400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15401// for more information.
15402func (c *LiveBroadcastsInsertCall) Fields(s ...googleapi.Field) *LiveBroadcastsInsertCall {
15403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15404	return c
15405}
15406
15407// Context sets the context to be used in this call's Do method. Any
15408// pending HTTP request will be aborted if the provided context is
15409// canceled.
15410func (c *LiveBroadcastsInsertCall) Context(ctx context.Context) *LiveBroadcastsInsertCall {
15411	c.ctx_ = ctx
15412	return c
15413}
15414
15415// Header returns an http.Header that can be modified by the caller to
15416// add HTTP headers to the request.
15417func (c *LiveBroadcastsInsertCall) Header() http.Header {
15418	if c.header_ == nil {
15419		c.header_ = make(http.Header)
15420	}
15421	return c.header_
15422}
15423
15424func (c *LiveBroadcastsInsertCall) doRequest(alt string) (*http.Response, error) {
15425	reqHeaders := make(http.Header)
15426	for k, v := range c.header_ {
15427		reqHeaders[k] = v
15428	}
15429	reqHeaders.Set("User-Agent", c.s.userAgent())
15430	var body io.Reader = nil
15431	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
15432	if err != nil {
15433		return nil, err
15434	}
15435	reqHeaders.Set("Content-Type", "application/json")
15436	c.urlParams_.Set("alt", alt)
15437	c.urlParams_.Set("prettyPrint", "false")
15438	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts")
15439	urls += "?" + c.urlParams_.Encode()
15440	req, err := http.NewRequest("POST", urls, body)
15441	if err != nil {
15442		return nil, err
15443	}
15444	req.Header = reqHeaders
15445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15446}
15447
15448// Do executes the "youtube.liveBroadcasts.insert" call.
15449// Exactly one of *LiveBroadcast or error will be non-nil. Any non-2xx
15450// status code is an error. Response headers are in either
15451// *LiveBroadcast.ServerResponse.Header or (if a response was returned
15452// at all) in error.(*googleapi.Error).Header. Use
15453// googleapi.IsNotModified to check whether the returned error was
15454// because http.StatusNotModified was returned.
15455func (c *LiveBroadcastsInsertCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
15456	gensupport.SetOptions(c.urlParams_, opts...)
15457	res, err := c.doRequest("json")
15458	if res != nil && res.StatusCode == http.StatusNotModified {
15459		if res.Body != nil {
15460			res.Body.Close()
15461		}
15462		return nil, &googleapi.Error{
15463			Code:   res.StatusCode,
15464			Header: res.Header,
15465		}
15466	}
15467	if err != nil {
15468		return nil, err
15469	}
15470	defer googleapi.CloseBody(res)
15471	if err := googleapi.CheckResponse(res); err != nil {
15472		return nil, err
15473	}
15474	ret := &LiveBroadcast{
15475		ServerResponse: googleapi.ServerResponse{
15476			Header:         res.Header,
15477			HTTPStatusCode: res.StatusCode,
15478		},
15479	}
15480	target := &ret
15481	if err := gensupport.DecodeResponse(target, res); err != nil {
15482		return nil, err
15483	}
15484	return ret, nil
15485	// {
15486	//   "description": "Creates a broadcast.",
15487	//   "httpMethod": "POST",
15488	//   "id": "youtube.liveBroadcasts.insert",
15489	//   "parameterOrder": [
15490	//     "part"
15491	//   ],
15492	//   "parameters": {
15493	//     "onBehalfOfContentOwner": {
15494	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
15495	//       "location": "query",
15496	//       "type": "string"
15497	//     },
15498	//     "onBehalfOfContentOwnerChannel": {
15499	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
15500	//       "location": "query",
15501	//       "type": "string"
15502	//     },
15503	//     "part": {
15504	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe part properties that you can include in the parameter value are id, snippet, contentDetails, and status.",
15505	//       "location": "query",
15506	//       "required": true,
15507	//       "type": "string"
15508	//     }
15509	//   },
15510	//   "path": "liveBroadcasts",
15511	//   "request": {
15512	//     "$ref": "LiveBroadcast"
15513	//   },
15514	//   "response": {
15515	//     "$ref": "LiveBroadcast"
15516	//   },
15517	//   "scopes": [
15518	//     "https://www.googleapis.com/auth/youtube",
15519	//     "https://www.googleapis.com/auth/youtube.force-ssl"
15520	//   ]
15521	// }
15522
15523}
15524
15525// method id "youtube.liveBroadcasts.list":
15526
15527type LiveBroadcastsListCall struct {
15528	s            *Service
15529	urlParams_   gensupport.URLParams
15530	ifNoneMatch_ string
15531	ctx_         context.Context
15532	header_      http.Header
15533}
15534
15535// List: Returns a list of YouTube broadcasts that match the API request
15536// parameters.
15537func (r *LiveBroadcastsService) List(part string) *LiveBroadcastsListCall {
15538	c := &LiveBroadcastsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15539	c.urlParams_.Set("part", part)
15540	return c
15541}
15542
15543// BroadcastStatus sets the optional parameter "broadcastStatus": The
15544// broadcastStatus parameter filters the API response to only include
15545// broadcasts with the specified status.
15546//
15547// Possible values:
15548//   "active" - Return current live broadcasts.
15549//   "all" - Return all broadcasts.
15550//   "completed" - Return broadcasts that have already ended.
15551//   "upcoming" - Return broadcasts that have not yet started.
15552func (c *LiveBroadcastsListCall) BroadcastStatus(broadcastStatus string) *LiveBroadcastsListCall {
15553	c.urlParams_.Set("broadcastStatus", broadcastStatus)
15554	return c
15555}
15556
15557// BroadcastType sets the optional parameter "broadcastType": The
15558// broadcastType parameter filters the API response to only include
15559// broadcasts with the specified type. This is only compatible with the
15560// mine filter for now.
15561//
15562// Possible values:
15563//   "all" - Return all broadcasts.
15564//   "event" - Return only scheduled event broadcasts.
15565//   "persistent" - Return only persistent broadcasts.
15566func (c *LiveBroadcastsListCall) BroadcastType(broadcastType string) *LiveBroadcastsListCall {
15567	c.urlParams_.Set("broadcastType", broadcastType)
15568	return c
15569}
15570
15571// Id sets the optional parameter "id": The id parameter specifies a
15572// comma-separated list of YouTube broadcast IDs that identify the
15573// broadcasts being retrieved. In a liveBroadcast resource, the id
15574// property specifies the broadcast's ID.
15575func (c *LiveBroadcastsListCall) Id(id string) *LiveBroadcastsListCall {
15576	c.urlParams_.Set("id", id)
15577	return c
15578}
15579
15580// MaxResults sets the optional parameter "maxResults": The maxResults
15581// parameter specifies the maximum number of items that should be
15582// returned in the result set.
15583func (c *LiveBroadcastsListCall) MaxResults(maxResults int64) *LiveBroadcastsListCall {
15584	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15585	return c
15586}
15587
15588// Mine sets the optional parameter "mine": The mine parameter can be
15589// used to instruct the API to only return broadcasts owned by the
15590// authenticated user. Set the parameter value to true to only retrieve
15591// your own broadcasts.
15592func (c *LiveBroadcastsListCall) Mine(mine bool) *LiveBroadcastsListCall {
15593	c.urlParams_.Set("mine", fmt.Sprint(mine))
15594	return c
15595}
15596
15597// OnBehalfOfContentOwner sets the optional parameter
15598// "onBehalfOfContentOwner": Note: This parameter is intended
15599// exclusively for YouTube content partners.
15600//
15601// The onBehalfOfContentOwner parameter indicates that the request's
15602// authorization credentials identify a YouTube CMS user who is acting
15603// on behalf of the content owner specified in the parameter value. This
15604// parameter is intended for YouTube content partners that own and
15605// manage many different YouTube channels. It allows content owners to
15606// authenticate once and get access to all their video and channel data,
15607// without having to provide authentication credentials for each
15608// individual channel. The CMS account that the user authenticates with
15609// must be linked to the specified YouTube content owner.
15610func (c *LiveBroadcastsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsListCall {
15611	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15612	return c
15613}
15614
15615// OnBehalfOfContentOwnerChannel sets the optional parameter
15616// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
15617// properly authorized request. Note: This parameter is intended
15618// exclusively for YouTube content partners.
15619//
15620// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
15621// channel ID of the channel to which a video is being added. This
15622// parameter is required when a request specifies a value for the
15623// onBehalfOfContentOwner parameter, and it can only be used in
15624// conjunction with that parameter. In addition, the request must be
15625// authorized using a CMS account that is linked to the content owner
15626// that the onBehalfOfContentOwner parameter specifies. Finally, the
15627// channel that the onBehalfOfContentOwnerChannel parameter value
15628// specifies must be linked to the content owner that the
15629// onBehalfOfContentOwner parameter specifies.
15630//
15631// This parameter is intended for YouTube content partners that own and
15632// manage many different YouTube channels. It allows content owners to
15633// authenticate once and perform actions on behalf of the channel
15634// specified in the parameter value, without having to provide
15635// authentication credentials for each separate channel.
15636func (c *LiveBroadcastsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsListCall {
15637	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
15638	return c
15639}
15640
15641// PageToken sets the optional parameter "pageToken": The pageToken
15642// parameter identifies a specific page in the result set that should be
15643// returned. In an API response, the nextPageToken and prevPageToken
15644// properties identify other pages that could be retrieved.
15645func (c *LiveBroadcastsListCall) PageToken(pageToken string) *LiveBroadcastsListCall {
15646	c.urlParams_.Set("pageToken", pageToken)
15647	return c
15648}
15649
15650// Fields allows partial responses to be retrieved. See
15651// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15652// for more information.
15653func (c *LiveBroadcastsListCall) Fields(s ...googleapi.Field) *LiveBroadcastsListCall {
15654	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15655	return c
15656}
15657
15658// IfNoneMatch sets the optional parameter which makes the operation
15659// fail if the object's ETag matches the given value. This is useful for
15660// getting updates only after the object has changed since the last
15661// request. Use googleapi.IsNotModified to check whether the response
15662// error from Do is the result of In-None-Match.
15663func (c *LiveBroadcastsListCall) IfNoneMatch(entityTag string) *LiveBroadcastsListCall {
15664	c.ifNoneMatch_ = entityTag
15665	return c
15666}
15667
15668// Context sets the context to be used in this call's Do method. Any
15669// pending HTTP request will be aborted if the provided context is
15670// canceled.
15671func (c *LiveBroadcastsListCall) Context(ctx context.Context) *LiveBroadcastsListCall {
15672	c.ctx_ = ctx
15673	return c
15674}
15675
15676// Header returns an http.Header that can be modified by the caller to
15677// add HTTP headers to the request.
15678func (c *LiveBroadcastsListCall) Header() http.Header {
15679	if c.header_ == nil {
15680		c.header_ = make(http.Header)
15681	}
15682	return c.header_
15683}
15684
15685func (c *LiveBroadcastsListCall) doRequest(alt string) (*http.Response, error) {
15686	reqHeaders := make(http.Header)
15687	for k, v := range c.header_ {
15688		reqHeaders[k] = v
15689	}
15690	reqHeaders.Set("User-Agent", c.s.userAgent())
15691	if c.ifNoneMatch_ != "" {
15692		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15693	}
15694	var body io.Reader = nil
15695	c.urlParams_.Set("alt", alt)
15696	c.urlParams_.Set("prettyPrint", "false")
15697	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts")
15698	urls += "?" + c.urlParams_.Encode()
15699	req, err := http.NewRequest("GET", urls, body)
15700	if err != nil {
15701		return nil, err
15702	}
15703	req.Header = reqHeaders
15704	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15705}
15706
15707// Do executes the "youtube.liveBroadcasts.list" call.
15708// Exactly one of *LiveBroadcastListResponse or error will be non-nil.
15709// Any non-2xx status code is an error. Response headers are in either
15710// *LiveBroadcastListResponse.ServerResponse.Header or (if a response
15711// was returned at all) in error.(*googleapi.Error).Header. Use
15712// googleapi.IsNotModified to check whether the returned error was
15713// because http.StatusNotModified was returned.
15714func (c *LiveBroadcastsListCall) Do(opts ...googleapi.CallOption) (*LiveBroadcastListResponse, error) {
15715	gensupport.SetOptions(c.urlParams_, opts...)
15716	res, err := c.doRequest("json")
15717	if res != nil && res.StatusCode == http.StatusNotModified {
15718		if res.Body != nil {
15719			res.Body.Close()
15720		}
15721		return nil, &googleapi.Error{
15722			Code:   res.StatusCode,
15723			Header: res.Header,
15724		}
15725	}
15726	if err != nil {
15727		return nil, err
15728	}
15729	defer googleapi.CloseBody(res)
15730	if err := googleapi.CheckResponse(res); err != nil {
15731		return nil, err
15732	}
15733	ret := &LiveBroadcastListResponse{
15734		ServerResponse: googleapi.ServerResponse{
15735			Header:         res.Header,
15736			HTTPStatusCode: res.StatusCode,
15737		},
15738	}
15739	target := &ret
15740	if err := gensupport.DecodeResponse(target, res); err != nil {
15741		return nil, err
15742	}
15743	return ret, nil
15744	// {
15745	//   "description": "Returns a list of YouTube broadcasts that match the API request parameters.",
15746	//   "httpMethod": "GET",
15747	//   "id": "youtube.liveBroadcasts.list",
15748	//   "parameterOrder": [
15749	//     "part"
15750	//   ],
15751	//   "parameters": {
15752	//     "broadcastStatus": {
15753	//       "description": "The broadcastStatus parameter filters the API response to only include broadcasts with the specified status.",
15754	//       "enum": [
15755	//         "active",
15756	//         "all",
15757	//         "completed",
15758	//         "upcoming"
15759	//       ],
15760	//       "enumDescriptions": [
15761	//         "Return current live broadcasts.",
15762	//         "Return all broadcasts.",
15763	//         "Return broadcasts that have already ended.",
15764	//         "Return broadcasts that have not yet started."
15765	//       ],
15766	//       "location": "query",
15767	//       "type": "string"
15768	//     },
15769	//     "broadcastType": {
15770	//       "default": "BROADCAST_TYPE_FILTER_EVENT",
15771	//       "description": "The broadcastType parameter filters the API response to only include broadcasts with the specified type. This is only compatible with the mine filter for now.",
15772	//       "enum": [
15773	//         "all",
15774	//         "event",
15775	//         "persistent"
15776	//       ],
15777	//       "enumDescriptions": [
15778	//         "Return all broadcasts.",
15779	//         "Return only scheduled event broadcasts.",
15780	//         "Return only persistent broadcasts."
15781	//       ],
15782	//       "location": "query",
15783	//       "type": "string"
15784	//     },
15785	//     "id": {
15786	//       "description": "The id parameter specifies a comma-separated list of YouTube broadcast IDs that identify the broadcasts being retrieved. In a liveBroadcast resource, the id property specifies the broadcast's ID.",
15787	//       "location": "query",
15788	//       "type": "string"
15789	//     },
15790	//     "maxResults": {
15791	//       "default": "5",
15792	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
15793	//       "format": "uint32",
15794	//       "location": "query",
15795	//       "maximum": "50",
15796	//       "minimum": "0",
15797	//       "type": "integer"
15798	//     },
15799	//     "mine": {
15800	//       "description": "The mine parameter can be used to instruct the API to only return broadcasts owned by the authenticated user. Set the parameter value to true to only retrieve your own broadcasts.",
15801	//       "location": "query",
15802	//       "type": "boolean"
15803	//     },
15804	//     "onBehalfOfContentOwner": {
15805	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
15806	//       "location": "query",
15807	//       "type": "string"
15808	//     },
15809	//     "onBehalfOfContentOwnerChannel": {
15810	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
15811	//       "location": "query",
15812	//       "type": "string"
15813	//     },
15814	//     "pageToken": {
15815	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
15816	//       "location": "query",
15817	//       "type": "string"
15818	//     },
15819	//     "part": {
15820	//       "description": "The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.",
15821	//       "location": "query",
15822	//       "required": true,
15823	//       "type": "string"
15824	//     }
15825	//   },
15826	//   "path": "liveBroadcasts",
15827	//   "response": {
15828	//     "$ref": "LiveBroadcastListResponse"
15829	//   },
15830	//   "scopes": [
15831	//     "https://www.googleapis.com/auth/youtube",
15832	//     "https://www.googleapis.com/auth/youtube.force-ssl",
15833	//     "https://www.googleapis.com/auth/youtube.readonly"
15834	//   ]
15835	// }
15836
15837}
15838
15839// Pages invokes f for each page of results.
15840// A non-nil error returned from f will halt the iteration.
15841// The provided context supersedes any context provided to the Context method.
15842func (c *LiveBroadcastsListCall) Pages(ctx context.Context, f func(*LiveBroadcastListResponse) error) error {
15843	c.ctx_ = ctx
15844	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15845	for {
15846		x, err := c.Do()
15847		if err != nil {
15848			return err
15849		}
15850		if err := f(x); err != nil {
15851			return err
15852		}
15853		if x.NextPageToken == "" {
15854			return nil
15855		}
15856		c.PageToken(x.NextPageToken)
15857	}
15858}
15859
15860// method id "youtube.liveBroadcasts.transition":
15861
15862type LiveBroadcastsTransitionCall struct {
15863	s          *Service
15864	urlParams_ gensupport.URLParams
15865	ctx_       context.Context
15866	header_    http.Header
15867}
15868
15869// Transition: Changes the status of a YouTube live broadcast and
15870// initiates any processes associated with the new status. For example,
15871// when you transition a broadcast's status to testing, YouTube starts
15872// to transmit video to that broadcast's monitor stream. Before calling
15873// this method, you should confirm that the value of the
15874// status.streamStatus property for the stream bound to your broadcast
15875// is active.
15876func (r *LiveBroadcastsService) Transition(broadcastStatus string, id string, part string) *LiveBroadcastsTransitionCall {
15877	c := &LiveBroadcastsTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15878	c.urlParams_.Set("broadcastStatus", broadcastStatus)
15879	c.urlParams_.Set("id", id)
15880	c.urlParams_.Set("part", part)
15881	return c
15882}
15883
15884// OnBehalfOfContentOwner sets the optional parameter
15885// "onBehalfOfContentOwner": Note: This parameter is intended
15886// exclusively for YouTube content partners.
15887//
15888// The onBehalfOfContentOwner parameter indicates that the request's
15889// authorization credentials identify a YouTube CMS user who is acting
15890// on behalf of the content owner specified in the parameter value. This
15891// parameter is intended for YouTube content partners that own and
15892// manage many different YouTube channels. It allows content owners to
15893// authenticate once and get access to all their video and channel data,
15894// without having to provide authentication credentials for each
15895// individual channel. The CMS account that the user authenticates with
15896// must be linked to the specified YouTube content owner.
15897func (c *LiveBroadcastsTransitionCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsTransitionCall {
15898	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
15899	return c
15900}
15901
15902// OnBehalfOfContentOwnerChannel sets the optional parameter
15903// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
15904// properly authorized request. Note: This parameter is intended
15905// exclusively for YouTube content partners.
15906//
15907// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
15908// channel ID of the channel to which a video is being added. This
15909// parameter is required when a request specifies a value for the
15910// onBehalfOfContentOwner parameter, and it can only be used in
15911// conjunction with that parameter. In addition, the request must be
15912// authorized using a CMS account that is linked to the content owner
15913// that the onBehalfOfContentOwner parameter specifies. Finally, the
15914// channel that the onBehalfOfContentOwnerChannel parameter value
15915// specifies must be linked to the content owner that the
15916// onBehalfOfContentOwner parameter specifies.
15917//
15918// This parameter is intended for YouTube content partners that own and
15919// manage many different YouTube channels. It allows content owners to
15920// authenticate once and perform actions on behalf of the channel
15921// specified in the parameter value, without having to provide
15922// authentication credentials for each separate channel.
15923func (c *LiveBroadcastsTransitionCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsTransitionCall {
15924	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
15925	return c
15926}
15927
15928// Fields allows partial responses to be retrieved. See
15929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15930// for more information.
15931func (c *LiveBroadcastsTransitionCall) Fields(s ...googleapi.Field) *LiveBroadcastsTransitionCall {
15932	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15933	return c
15934}
15935
15936// Context sets the context to be used in this call's Do method. Any
15937// pending HTTP request will be aborted if the provided context is
15938// canceled.
15939func (c *LiveBroadcastsTransitionCall) Context(ctx context.Context) *LiveBroadcastsTransitionCall {
15940	c.ctx_ = ctx
15941	return c
15942}
15943
15944// Header returns an http.Header that can be modified by the caller to
15945// add HTTP headers to the request.
15946func (c *LiveBroadcastsTransitionCall) Header() http.Header {
15947	if c.header_ == nil {
15948		c.header_ = make(http.Header)
15949	}
15950	return c.header_
15951}
15952
15953func (c *LiveBroadcastsTransitionCall) doRequest(alt string) (*http.Response, error) {
15954	reqHeaders := make(http.Header)
15955	for k, v := range c.header_ {
15956		reqHeaders[k] = v
15957	}
15958	reqHeaders.Set("User-Agent", c.s.userAgent())
15959	var body io.Reader = nil
15960	c.urlParams_.Set("alt", alt)
15961	c.urlParams_.Set("prettyPrint", "false")
15962	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts/transition")
15963	urls += "?" + c.urlParams_.Encode()
15964	req, err := http.NewRequest("POST", urls, body)
15965	if err != nil {
15966		return nil, err
15967	}
15968	req.Header = reqHeaders
15969	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15970}
15971
15972// Do executes the "youtube.liveBroadcasts.transition" call.
15973// Exactly one of *LiveBroadcast or error will be non-nil. Any non-2xx
15974// status code is an error. Response headers are in either
15975// *LiveBroadcast.ServerResponse.Header or (if a response was returned
15976// at all) in error.(*googleapi.Error).Header. Use
15977// googleapi.IsNotModified to check whether the returned error was
15978// because http.StatusNotModified was returned.
15979func (c *LiveBroadcastsTransitionCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
15980	gensupport.SetOptions(c.urlParams_, opts...)
15981	res, err := c.doRequest("json")
15982	if res != nil && res.StatusCode == http.StatusNotModified {
15983		if res.Body != nil {
15984			res.Body.Close()
15985		}
15986		return nil, &googleapi.Error{
15987			Code:   res.StatusCode,
15988			Header: res.Header,
15989		}
15990	}
15991	if err != nil {
15992		return nil, err
15993	}
15994	defer googleapi.CloseBody(res)
15995	if err := googleapi.CheckResponse(res); err != nil {
15996		return nil, err
15997	}
15998	ret := &LiveBroadcast{
15999		ServerResponse: googleapi.ServerResponse{
16000			Header:         res.Header,
16001			HTTPStatusCode: res.StatusCode,
16002		},
16003	}
16004	target := &ret
16005	if err := gensupport.DecodeResponse(target, res); err != nil {
16006		return nil, err
16007	}
16008	return ret, nil
16009	// {
16010	//   "description": "Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active.",
16011	//   "httpMethod": "POST",
16012	//   "id": "youtube.liveBroadcasts.transition",
16013	//   "parameterOrder": [
16014	//     "broadcastStatus",
16015	//     "id",
16016	//     "part"
16017	//   ],
16018	//   "parameters": {
16019	//     "broadcastStatus": {
16020	//       "description": "The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to.",
16021	//       "enum": [
16022	//         "complete",
16023	//         "live",
16024	//         "testing"
16025	//       ],
16026	//       "enumDescriptions": [
16027	//         "The broadcast is over. YouTube stops transmitting video.",
16028	//         "The broadcast is visible to its audience. YouTube transmits video to the broadcast's monitor stream and its broadcast stream.",
16029	//         "Start testing the broadcast. YouTube transmits video to the broadcast's monitor stream. Note that you can only transition a broadcast to the testing state if its contentDetails.monitorStream.enableMonitorStream property is set to true."
16030	//       ],
16031	//       "location": "query",
16032	//       "required": true,
16033	//       "type": "string"
16034	//     },
16035	//     "id": {
16036	//       "description": "The id parameter specifies the unique ID of the broadcast that is transitioning to another status.",
16037	//       "location": "query",
16038	//       "required": true,
16039	//       "type": "string"
16040	//     },
16041	//     "onBehalfOfContentOwner": {
16042	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
16043	//       "location": "query",
16044	//       "type": "string"
16045	//     },
16046	//     "onBehalfOfContentOwnerChannel": {
16047	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
16048	//       "location": "query",
16049	//       "type": "string"
16050	//     },
16051	//     "part": {
16052	//       "description": "The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.",
16053	//       "location": "query",
16054	//       "required": true,
16055	//       "type": "string"
16056	//     }
16057	//   },
16058	//   "path": "liveBroadcasts/transition",
16059	//   "response": {
16060	//     "$ref": "LiveBroadcast"
16061	//   },
16062	//   "scopes": [
16063	//     "https://www.googleapis.com/auth/youtube",
16064	//     "https://www.googleapis.com/auth/youtube.force-ssl"
16065	//   ]
16066	// }
16067
16068}
16069
16070// method id "youtube.liveBroadcasts.update":
16071
16072type LiveBroadcastsUpdateCall struct {
16073	s             *Service
16074	livebroadcast *LiveBroadcast
16075	urlParams_    gensupport.URLParams
16076	ctx_          context.Context
16077	header_       http.Header
16078}
16079
16080// Update: Updates a broadcast. For example, you could modify the
16081// broadcast settings defined in the liveBroadcast resource's
16082// contentDetails object.
16083func (r *LiveBroadcastsService) Update(part string, livebroadcast *LiveBroadcast) *LiveBroadcastsUpdateCall {
16084	c := &LiveBroadcastsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16085	c.urlParams_.Set("part", part)
16086	c.livebroadcast = livebroadcast
16087	return c
16088}
16089
16090// OnBehalfOfContentOwner sets the optional parameter
16091// "onBehalfOfContentOwner": Note: This parameter is intended
16092// exclusively for YouTube content partners.
16093//
16094// The onBehalfOfContentOwner parameter indicates that the request's
16095// authorization credentials identify a YouTube CMS user who is acting
16096// on behalf of the content owner specified in the parameter value. This
16097// parameter is intended for YouTube content partners that own and
16098// manage many different YouTube channels. It allows content owners to
16099// authenticate once and get access to all their video and channel data,
16100// without having to provide authentication credentials for each
16101// individual channel. The CMS account that the user authenticates with
16102// must be linked to the specified YouTube content owner.
16103func (c *LiveBroadcastsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsUpdateCall {
16104	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
16105	return c
16106}
16107
16108// OnBehalfOfContentOwnerChannel sets the optional parameter
16109// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
16110// properly authorized request. Note: This parameter is intended
16111// exclusively for YouTube content partners.
16112//
16113// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
16114// channel ID of the channel to which a video is being added. This
16115// parameter is required when a request specifies a value for the
16116// onBehalfOfContentOwner parameter, and it can only be used in
16117// conjunction with that parameter. In addition, the request must be
16118// authorized using a CMS account that is linked to the content owner
16119// that the onBehalfOfContentOwner parameter specifies. Finally, the
16120// channel that the onBehalfOfContentOwnerChannel parameter value
16121// specifies must be linked to the content owner that the
16122// onBehalfOfContentOwner parameter specifies.
16123//
16124// This parameter is intended for YouTube content partners that own and
16125// manage many different YouTube channels. It allows content owners to
16126// authenticate once and perform actions on behalf of the channel
16127// specified in the parameter value, without having to provide
16128// authentication credentials for each separate channel.
16129func (c *LiveBroadcastsUpdateCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsUpdateCall {
16130	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
16131	return c
16132}
16133
16134// Fields allows partial responses to be retrieved. See
16135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16136// for more information.
16137func (c *LiveBroadcastsUpdateCall) Fields(s ...googleapi.Field) *LiveBroadcastsUpdateCall {
16138	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16139	return c
16140}
16141
16142// Context sets the context to be used in this call's Do method. Any
16143// pending HTTP request will be aborted if the provided context is
16144// canceled.
16145func (c *LiveBroadcastsUpdateCall) Context(ctx context.Context) *LiveBroadcastsUpdateCall {
16146	c.ctx_ = ctx
16147	return c
16148}
16149
16150// Header returns an http.Header that can be modified by the caller to
16151// add HTTP headers to the request.
16152func (c *LiveBroadcastsUpdateCall) Header() http.Header {
16153	if c.header_ == nil {
16154		c.header_ = make(http.Header)
16155	}
16156	return c.header_
16157}
16158
16159func (c *LiveBroadcastsUpdateCall) doRequest(alt string) (*http.Response, error) {
16160	reqHeaders := make(http.Header)
16161	for k, v := range c.header_ {
16162		reqHeaders[k] = v
16163	}
16164	reqHeaders.Set("User-Agent", c.s.userAgent())
16165	var body io.Reader = nil
16166	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
16167	if err != nil {
16168		return nil, err
16169	}
16170	reqHeaders.Set("Content-Type", "application/json")
16171	c.urlParams_.Set("alt", alt)
16172	c.urlParams_.Set("prettyPrint", "false")
16173	urls := googleapi.ResolveRelative(c.s.BasePath, "liveBroadcasts")
16174	urls += "?" + c.urlParams_.Encode()
16175	req, err := http.NewRequest("PUT", urls, body)
16176	if err != nil {
16177		return nil, err
16178	}
16179	req.Header = reqHeaders
16180	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16181}
16182
16183// Do executes the "youtube.liveBroadcasts.update" call.
16184// Exactly one of *LiveBroadcast or error will be non-nil. Any non-2xx
16185// status code is an error. Response headers are in either
16186// *LiveBroadcast.ServerResponse.Header or (if a response was returned
16187// at all) in error.(*googleapi.Error).Header. Use
16188// googleapi.IsNotModified to check whether the returned error was
16189// because http.StatusNotModified was returned.
16190func (c *LiveBroadcastsUpdateCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
16191	gensupport.SetOptions(c.urlParams_, opts...)
16192	res, err := c.doRequest("json")
16193	if res != nil && res.StatusCode == http.StatusNotModified {
16194		if res.Body != nil {
16195			res.Body.Close()
16196		}
16197		return nil, &googleapi.Error{
16198			Code:   res.StatusCode,
16199			Header: res.Header,
16200		}
16201	}
16202	if err != nil {
16203		return nil, err
16204	}
16205	defer googleapi.CloseBody(res)
16206	if err := googleapi.CheckResponse(res); err != nil {
16207		return nil, err
16208	}
16209	ret := &LiveBroadcast{
16210		ServerResponse: googleapi.ServerResponse{
16211			Header:         res.Header,
16212			HTTPStatusCode: res.StatusCode,
16213		},
16214	}
16215	target := &ret
16216	if err := gensupport.DecodeResponse(target, res); err != nil {
16217		return nil, err
16218	}
16219	return ret, nil
16220	// {
16221	//   "description": "Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object.",
16222	//   "httpMethod": "PUT",
16223	//   "id": "youtube.liveBroadcasts.update",
16224	//   "parameterOrder": [
16225	//     "part"
16226	//   ],
16227	//   "parameters": {
16228	//     "onBehalfOfContentOwner": {
16229	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
16230	//       "location": "query",
16231	//       "type": "string"
16232	//     },
16233	//     "onBehalfOfContentOwnerChannel": {
16234	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
16235	//       "location": "query",
16236	//       "type": "string"
16237	//     },
16238	//     "part": {
16239	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe part properties that you can include in the parameter value are id, snippet, contentDetails, and status.\n\nNote that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a broadcast's privacy status is defined in the status part. As such, if your request is updating a private or unlisted broadcast, and the request's part parameter value includes the status part, the broadcast's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the broadcast will revert to the default privacy setting.",
16240	//       "location": "query",
16241	//       "required": true,
16242	//       "type": "string"
16243	//     }
16244	//   },
16245	//   "path": "liveBroadcasts",
16246	//   "request": {
16247	//     "$ref": "LiveBroadcast"
16248	//   },
16249	//   "response": {
16250	//     "$ref": "LiveBroadcast"
16251	//   },
16252	//   "scopes": [
16253	//     "https://www.googleapis.com/auth/youtube",
16254	//     "https://www.googleapis.com/auth/youtube.force-ssl"
16255	//   ]
16256	// }
16257
16258}
16259
16260// method id "youtube.liveChatBans.delete":
16261
16262type LiveChatBansDeleteCall struct {
16263	s          *Service
16264	urlParams_ gensupport.URLParams
16265	ctx_       context.Context
16266	header_    http.Header
16267}
16268
16269// Delete: Removes a chat ban.
16270func (r *LiveChatBansService) Delete(id string) *LiveChatBansDeleteCall {
16271	c := &LiveChatBansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16272	c.urlParams_.Set("id", id)
16273	return c
16274}
16275
16276// Fields allows partial responses to be retrieved. See
16277// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16278// for more information.
16279func (c *LiveChatBansDeleteCall) Fields(s ...googleapi.Field) *LiveChatBansDeleteCall {
16280	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16281	return c
16282}
16283
16284// Context sets the context to be used in this call's Do method. Any
16285// pending HTTP request will be aborted if the provided context is
16286// canceled.
16287func (c *LiveChatBansDeleteCall) Context(ctx context.Context) *LiveChatBansDeleteCall {
16288	c.ctx_ = ctx
16289	return c
16290}
16291
16292// Header returns an http.Header that can be modified by the caller to
16293// add HTTP headers to the request.
16294func (c *LiveChatBansDeleteCall) Header() http.Header {
16295	if c.header_ == nil {
16296		c.header_ = make(http.Header)
16297	}
16298	return c.header_
16299}
16300
16301func (c *LiveChatBansDeleteCall) doRequest(alt string) (*http.Response, error) {
16302	reqHeaders := make(http.Header)
16303	for k, v := range c.header_ {
16304		reqHeaders[k] = v
16305	}
16306	reqHeaders.Set("User-Agent", c.s.userAgent())
16307	var body io.Reader = nil
16308	c.urlParams_.Set("alt", alt)
16309	c.urlParams_.Set("prettyPrint", "false")
16310	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/bans")
16311	urls += "?" + c.urlParams_.Encode()
16312	req, err := http.NewRequest("DELETE", urls, body)
16313	if err != nil {
16314		return nil, err
16315	}
16316	req.Header = reqHeaders
16317	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16318}
16319
16320// Do executes the "youtube.liveChatBans.delete" call.
16321func (c *LiveChatBansDeleteCall) Do(opts ...googleapi.CallOption) error {
16322	gensupport.SetOptions(c.urlParams_, opts...)
16323	res, err := c.doRequest("json")
16324	if err != nil {
16325		return err
16326	}
16327	defer googleapi.CloseBody(res)
16328	if err := googleapi.CheckResponse(res); err != nil {
16329		return err
16330	}
16331	return nil
16332	// {
16333	//   "description": "Removes a chat ban.",
16334	//   "httpMethod": "DELETE",
16335	//   "id": "youtube.liveChatBans.delete",
16336	//   "parameterOrder": [
16337	//     "id"
16338	//   ],
16339	//   "parameters": {
16340	//     "id": {
16341	//       "description": "The id parameter identifies the chat ban to remove. The value uniquely identifies both the ban and the chat.",
16342	//       "location": "query",
16343	//       "required": true,
16344	//       "type": "string"
16345	//     }
16346	//   },
16347	//   "path": "liveChat/bans",
16348	//   "scopes": [
16349	//     "https://www.googleapis.com/auth/youtube",
16350	//     "https://www.googleapis.com/auth/youtube.force-ssl"
16351	//   ]
16352	// }
16353
16354}
16355
16356// method id "youtube.liveChatBans.insert":
16357
16358type LiveChatBansInsertCall struct {
16359	s           *Service
16360	livechatban *LiveChatBan
16361	urlParams_  gensupport.URLParams
16362	ctx_        context.Context
16363	header_     http.Header
16364}
16365
16366// Insert: Adds a new ban to the chat.
16367func (r *LiveChatBansService) Insert(part string, livechatban *LiveChatBan) *LiveChatBansInsertCall {
16368	c := &LiveChatBansInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16369	c.urlParams_.Set("part", part)
16370	c.livechatban = livechatban
16371	return c
16372}
16373
16374// Fields allows partial responses to be retrieved. See
16375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16376// for more information.
16377func (c *LiveChatBansInsertCall) Fields(s ...googleapi.Field) *LiveChatBansInsertCall {
16378	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16379	return c
16380}
16381
16382// Context sets the context to be used in this call's Do method. Any
16383// pending HTTP request will be aborted if the provided context is
16384// canceled.
16385func (c *LiveChatBansInsertCall) Context(ctx context.Context) *LiveChatBansInsertCall {
16386	c.ctx_ = ctx
16387	return c
16388}
16389
16390// Header returns an http.Header that can be modified by the caller to
16391// add HTTP headers to the request.
16392func (c *LiveChatBansInsertCall) Header() http.Header {
16393	if c.header_ == nil {
16394		c.header_ = make(http.Header)
16395	}
16396	return c.header_
16397}
16398
16399func (c *LiveChatBansInsertCall) doRequest(alt string) (*http.Response, error) {
16400	reqHeaders := make(http.Header)
16401	for k, v := range c.header_ {
16402		reqHeaders[k] = v
16403	}
16404	reqHeaders.Set("User-Agent", c.s.userAgent())
16405	var body io.Reader = nil
16406	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatban)
16407	if err != nil {
16408		return nil, err
16409	}
16410	reqHeaders.Set("Content-Type", "application/json")
16411	c.urlParams_.Set("alt", alt)
16412	c.urlParams_.Set("prettyPrint", "false")
16413	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/bans")
16414	urls += "?" + c.urlParams_.Encode()
16415	req, err := http.NewRequest("POST", urls, body)
16416	if err != nil {
16417		return nil, err
16418	}
16419	req.Header = reqHeaders
16420	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16421}
16422
16423// Do executes the "youtube.liveChatBans.insert" call.
16424// Exactly one of *LiveChatBan or error will be non-nil. Any non-2xx
16425// status code is an error. Response headers are in either
16426// *LiveChatBan.ServerResponse.Header or (if a response was returned at
16427// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16428// to check whether the returned error was because
16429// http.StatusNotModified was returned.
16430func (c *LiveChatBansInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatBan, error) {
16431	gensupport.SetOptions(c.urlParams_, opts...)
16432	res, err := c.doRequest("json")
16433	if res != nil && res.StatusCode == http.StatusNotModified {
16434		if res.Body != nil {
16435			res.Body.Close()
16436		}
16437		return nil, &googleapi.Error{
16438			Code:   res.StatusCode,
16439			Header: res.Header,
16440		}
16441	}
16442	if err != nil {
16443		return nil, err
16444	}
16445	defer googleapi.CloseBody(res)
16446	if err := googleapi.CheckResponse(res); err != nil {
16447		return nil, err
16448	}
16449	ret := &LiveChatBan{
16450		ServerResponse: googleapi.ServerResponse{
16451			Header:         res.Header,
16452			HTTPStatusCode: res.StatusCode,
16453		},
16454	}
16455	target := &ret
16456	if err := gensupport.DecodeResponse(target, res); err != nil {
16457		return nil, err
16458	}
16459	return ret, nil
16460	// {
16461	//   "description": "Adds a new ban to the chat.",
16462	//   "httpMethod": "POST",
16463	//   "id": "youtube.liveChatBans.insert",
16464	//   "parameterOrder": [
16465	//     "part"
16466	//   ],
16467	//   "parameters": {
16468	//     "part": {
16469	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response returns. Set the parameter value to snippet.",
16470	//       "location": "query",
16471	//       "required": true,
16472	//       "type": "string"
16473	//     }
16474	//   },
16475	//   "path": "liveChat/bans",
16476	//   "request": {
16477	//     "$ref": "LiveChatBan"
16478	//   },
16479	//   "response": {
16480	//     "$ref": "LiveChatBan"
16481	//   },
16482	//   "scopes": [
16483	//     "https://www.googleapis.com/auth/youtube",
16484	//     "https://www.googleapis.com/auth/youtube.force-ssl"
16485	//   ]
16486	// }
16487
16488}
16489
16490// method id "youtube.liveChatMessages.delete":
16491
16492type LiveChatMessagesDeleteCall struct {
16493	s          *Service
16494	urlParams_ gensupport.URLParams
16495	ctx_       context.Context
16496	header_    http.Header
16497}
16498
16499// Delete: Deletes a chat message.
16500func (r *LiveChatMessagesService) Delete(id string) *LiveChatMessagesDeleteCall {
16501	c := &LiveChatMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16502	c.urlParams_.Set("id", id)
16503	return c
16504}
16505
16506// Fields allows partial responses to be retrieved. See
16507// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16508// for more information.
16509func (c *LiveChatMessagesDeleteCall) Fields(s ...googleapi.Field) *LiveChatMessagesDeleteCall {
16510	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16511	return c
16512}
16513
16514// Context sets the context to be used in this call's Do method. Any
16515// pending HTTP request will be aborted if the provided context is
16516// canceled.
16517func (c *LiveChatMessagesDeleteCall) Context(ctx context.Context) *LiveChatMessagesDeleteCall {
16518	c.ctx_ = ctx
16519	return c
16520}
16521
16522// Header returns an http.Header that can be modified by the caller to
16523// add HTTP headers to the request.
16524func (c *LiveChatMessagesDeleteCall) Header() http.Header {
16525	if c.header_ == nil {
16526		c.header_ = make(http.Header)
16527	}
16528	return c.header_
16529}
16530
16531func (c *LiveChatMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
16532	reqHeaders := make(http.Header)
16533	for k, v := range c.header_ {
16534		reqHeaders[k] = v
16535	}
16536	reqHeaders.Set("User-Agent", c.s.userAgent())
16537	var body io.Reader = nil
16538	c.urlParams_.Set("alt", alt)
16539	c.urlParams_.Set("prettyPrint", "false")
16540	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/messages")
16541	urls += "?" + c.urlParams_.Encode()
16542	req, err := http.NewRequest("DELETE", urls, body)
16543	if err != nil {
16544		return nil, err
16545	}
16546	req.Header = reqHeaders
16547	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16548}
16549
16550// Do executes the "youtube.liveChatMessages.delete" call.
16551func (c *LiveChatMessagesDeleteCall) Do(opts ...googleapi.CallOption) error {
16552	gensupport.SetOptions(c.urlParams_, opts...)
16553	res, err := c.doRequest("json")
16554	if err != nil {
16555		return err
16556	}
16557	defer googleapi.CloseBody(res)
16558	if err := googleapi.CheckResponse(res); err != nil {
16559		return err
16560	}
16561	return nil
16562	// {
16563	//   "description": "Deletes a chat message.",
16564	//   "httpMethod": "DELETE",
16565	//   "id": "youtube.liveChatMessages.delete",
16566	//   "parameterOrder": [
16567	//     "id"
16568	//   ],
16569	//   "parameters": {
16570	//     "id": {
16571	//       "description": "The id parameter specifies the YouTube chat message ID of the resource that is being deleted.",
16572	//       "location": "query",
16573	//       "required": true,
16574	//       "type": "string"
16575	//     }
16576	//   },
16577	//   "path": "liveChat/messages",
16578	//   "scopes": [
16579	//     "https://www.googleapis.com/auth/youtube",
16580	//     "https://www.googleapis.com/auth/youtube.force-ssl"
16581	//   ]
16582	// }
16583
16584}
16585
16586// method id "youtube.liveChatMessages.insert":
16587
16588type LiveChatMessagesInsertCall struct {
16589	s               *Service
16590	livechatmessage *LiveChatMessage
16591	urlParams_      gensupport.URLParams
16592	ctx_            context.Context
16593	header_         http.Header
16594}
16595
16596// Insert: Adds a message to a live chat.
16597func (r *LiveChatMessagesService) Insert(part string, livechatmessage *LiveChatMessage) *LiveChatMessagesInsertCall {
16598	c := &LiveChatMessagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16599	c.urlParams_.Set("part", part)
16600	c.livechatmessage = livechatmessage
16601	return c
16602}
16603
16604// Fields allows partial responses to be retrieved. See
16605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16606// for more information.
16607func (c *LiveChatMessagesInsertCall) Fields(s ...googleapi.Field) *LiveChatMessagesInsertCall {
16608	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16609	return c
16610}
16611
16612// Context sets the context to be used in this call's Do method. Any
16613// pending HTTP request will be aborted if the provided context is
16614// canceled.
16615func (c *LiveChatMessagesInsertCall) Context(ctx context.Context) *LiveChatMessagesInsertCall {
16616	c.ctx_ = ctx
16617	return c
16618}
16619
16620// Header returns an http.Header that can be modified by the caller to
16621// add HTTP headers to the request.
16622func (c *LiveChatMessagesInsertCall) Header() http.Header {
16623	if c.header_ == nil {
16624		c.header_ = make(http.Header)
16625	}
16626	return c.header_
16627}
16628
16629func (c *LiveChatMessagesInsertCall) doRequest(alt string) (*http.Response, error) {
16630	reqHeaders := make(http.Header)
16631	for k, v := range c.header_ {
16632		reqHeaders[k] = v
16633	}
16634	reqHeaders.Set("User-Agent", c.s.userAgent())
16635	var body io.Reader = nil
16636	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatmessage)
16637	if err != nil {
16638		return nil, err
16639	}
16640	reqHeaders.Set("Content-Type", "application/json")
16641	c.urlParams_.Set("alt", alt)
16642	c.urlParams_.Set("prettyPrint", "false")
16643	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/messages")
16644	urls += "?" + c.urlParams_.Encode()
16645	req, err := http.NewRequest("POST", urls, body)
16646	if err != nil {
16647		return nil, err
16648	}
16649	req.Header = reqHeaders
16650	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16651}
16652
16653// Do executes the "youtube.liveChatMessages.insert" call.
16654// Exactly one of *LiveChatMessage or error will be non-nil. Any non-2xx
16655// status code is an error. Response headers are in either
16656// *LiveChatMessage.ServerResponse.Header or (if a response was returned
16657// at all) in error.(*googleapi.Error).Header. Use
16658// googleapi.IsNotModified to check whether the returned error was
16659// because http.StatusNotModified was returned.
16660func (c *LiveChatMessagesInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) {
16661	gensupport.SetOptions(c.urlParams_, opts...)
16662	res, err := c.doRequest("json")
16663	if res != nil && res.StatusCode == http.StatusNotModified {
16664		if res.Body != nil {
16665			res.Body.Close()
16666		}
16667		return nil, &googleapi.Error{
16668			Code:   res.StatusCode,
16669			Header: res.Header,
16670		}
16671	}
16672	if err != nil {
16673		return nil, err
16674	}
16675	defer googleapi.CloseBody(res)
16676	if err := googleapi.CheckResponse(res); err != nil {
16677		return nil, err
16678	}
16679	ret := &LiveChatMessage{
16680		ServerResponse: googleapi.ServerResponse{
16681			Header:         res.Header,
16682			HTTPStatusCode: res.StatusCode,
16683		},
16684	}
16685	target := &ret
16686	if err := gensupport.DecodeResponse(target, res); err != nil {
16687		return nil, err
16688	}
16689	return ret, nil
16690	// {
16691	//   "description": "Adds a message to a live chat.",
16692	//   "httpMethod": "POST",
16693	//   "id": "youtube.liveChatMessages.insert",
16694	//   "parameterOrder": [
16695	//     "part"
16696	//   ],
16697	//   "parameters": {
16698	//     "part": {
16699	//       "description": "The part parameter serves two purposes. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the parameter value to snippet.",
16700	//       "location": "query",
16701	//       "required": true,
16702	//       "type": "string"
16703	//     }
16704	//   },
16705	//   "path": "liveChat/messages",
16706	//   "request": {
16707	//     "$ref": "LiveChatMessage"
16708	//   },
16709	//   "response": {
16710	//     "$ref": "LiveChatMessage"
16711	//   },
16712	//   "scopes": [
16713	//     "https://www.googleapis.com/auth/youtube",
16714	//     "https://www.googleapis.com/auth/youtube.force-ssl"
16715	//   ]
16716	// }
16717
16718}
16719
16720// method id "youtube.liveChatMessages.list":
16721
16722type LiveChatMessagesListCall struct {
16723	s            *Service
16724	urlParams_   gensupport.URLParams
16725	ifNoneMatch_ string
16726	ctx_         context.Context
16727	header_      http.Header
16728}
16729
16730// List: Lists live chat messages for a specific chat.
16731func (r *LiveChatMessagesService) List(liveChatId string, part string) *LiveChatMessagesListCall {
16732	c := &LiveChatMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16733	c.urlParams_.Set("liveChatId", liveChatId)
16734	c.urlParams_.Set("part", part)
16735	return c
16736}
16737
16738// Hl sets the optional parameter "hl": The hl parameter instructs the
16739// API to retrieve localized resource metadata for a specific
16740// application language that the YouTube website supports. The parameter
16741// value must be a language code included in the list returned by the
16742// i18nLanguages.list method.
16743//
16744// If localized resource details are available in that language, the
16745// resource's snippet.localized object will contain the localized
16746// values. However, if localized details are not available, the
16747// snippet.localized object will contain resource details in the
16748// resource's default language.
16749func (c *LiveChatMessagesListCall) Hl(hl string) *LiveChatMessagesListCall {
16750	c.urlParams_.Set("hl", hl)
16751	return c
16752}
16753
16754// MaxResults sets the optional parameter "maxResults": The maxResults
16755// parameter specifies the maximum number of messages that should be
16756// returned in the result set.
16757func (c *LiveChatMessagesListCall) MaxResults(maxResults int64) *LiveChatMessagesListCall {
16758	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16759	return c
16760}
16761
16762// PageToken sets the optional parameter "pageToken": The pageToken
16763// parameter identifies a specific page in the result set that should be
16764// returned. In an API response, the nextPageToken property identify
16765// other pages that could be retrieved.
16766func (c *LiveChatMessagesListCall) PageToken(pageToken string) *LiveChatMessagesListCall {
16767	c.urlParams_.Set("pageToken", pageToken)
16768	return c
16769}
16770
16771// ProfileImageSize sets the optional parameter "profileImageSize": The
16772// profileImageSize parameter specifies the size of the user profile
16773// pictures that should be returned in the result set. Default: 88.
16774func (c *LiveChatMessagesListCall) ProfileImageSize(profileImageSize int64) *LiveChatMessagesListCall {
16775	c.urlParams_.Set("profileImageSize", fmt.Sprint(profileImageSize))
16776	return c
16777}
16778
16779// Fields allows partial responses to be retrieved. See
16780// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16781// for more information.
16782func (c *LiveChatMessagesListCall) Fields(s ...googleapi.Field) *LiveChatMessagesListCall {
16783	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16784	return c
16785}
16786
16787// IfNoneMatch sets the optional parameter which makes the operation
16788// fail if the object's ETag matches the given value. This is useful for
16789// getting updates only after the object has changed since the last
16790// request. Use googleapi.IsNotModified to check whether the response
16791// error from Do is the result of In-None-Match.
16792func (c *LiveChatMessagesListCall) IfNoneMatch(entityTag string) *LiveChatMessagesListCall {
16793	c.ifNoneMatch_ = entityTag
16794	return c
16795}
16796
16797// Context sets the context to be used in this call's Do method. Any
16798// pending HTTP request will be aborted if the provided context is
16799// canceled.
16800func (c *LiveChatMessagesListCall) Context(ctx context.Context) *LiveChatMessagesListCall {
16801	c.ctx_ = ctx
16802	return c
16803}
16804
16805// Header returns an http.Header that can be modified by the caller to
16806// add HTTP headers to the request.
16807func (c *LiveChatMessagesListCall) Header() http.Header {
16808	if c.header_ == nil {
16809		c.header_ = make(http.Header)
16810	}
16811	return c.header_
16812}
16813
16814func (c *LiveChatMessagesListCall) doRequest(alt string) (*http.Response, error) {
16815	reqHeaders := make(http.Header)
16816	for k, v := range c.header_ {
16817		reqHeaders[k] = v
16818	}
16819	reqHeaders.Set("User-Agent", c.s.userAgent())
16820	if c.ifNoneMatch_ != "" {
16821		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16822	}
16823	var body io.Reader = nil
16824	c.urlParams_.Set("alt", alt)
16825	c.urlParams_.Set("prettyPrint", "false")
16826	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/messages")
16827	urls += "?" + c.urlParams_.Encode()
16828	req, err := http.NewRequest("GET", urls, body)
16829	if err != nil {
16830		return nil, err
16831	}
16832	req.Header = reqHeaders
16833	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16834}
16835
16836// Do executes the "youtube.liveChatMessages.list" call.
16837// Exactly one of *LiveChatMessageListResponse or error will be non-nil.
16838// Any non-2xx status code is an error. Response headers are in either
16839// *LiveChatMessageListResponse.ServerResponse.Header or (if a response
16840// was returned at all) in error.(*googleapi.Error).Header. Use
16841// googleapi.IsNotModified to check whether the returned error was
16842// because http.StatusNotModified was returned.
16843func (c *LiveChatMessagesListCall) Do(opts ...googleapi.CallOption) (*LiveChatMessageListResponse, error) {
16844	gensupport.SetOptions(c.urlParams_, opts...)
16845	res, err := c.doRequest("json")
16846	if res != nil && res.StatusCode == http.StatusNotModified {
16847		if res.Body != nil {
16848			res.Body.Close()
16849		}
16850		return nil, &googleapi.Error{
16851			Code:   res.StatusCode,
16852			Header: res.Header,
16853		}
16854	}
16855	if err != nil {
16856		return nil, err
16857	}
16858	defer googleapi.CloseBody(res)
16859	if err := googleapi.CheckResponse(res); err != nil {
16860		return nil, err
16861	}
16862	ret := &LiveChatMessageListResponse{
16863		ServerResponse: googleapi.ServerResponse{
16864			Header:         res.Header,
16865			HTTPStatusCode: res.StatusCode,
16866		},
16867	}
16868	target := &ret
16869	if err := gensupport.DecodeResponse(target, res); err != nil {
16870		return nil, err
16871	}
16872	return ret, nil
16873	// {
16874	//   "description": "Lists live chat messages for a specific chat.",
16875	//   "httpMethod": "GET",
16876	//   "id": "youtube.liveChatMessages.list",
16877	//   "parameterOrder": [
16878	//     "liveChatId",
16879	//     "part"
16880	//   ],
16881	//   "parameters": {
16882	//     "hl": {
16883	//       "description": "The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method.\n\nIf localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language.",
16884	//       "location": "query",
16885	//       "type": "string"
16886	//     },
16887	//     "liveChatId": {
16888	//       "description": "The liveChatId parameter specifies the ID of the chat whose messages will be returned.",
16889	//       "location": "query",
16890	//       "required": true,
16891	//       "type": "string"
16892	//     },
16893	//     "maxResults": {
16894	//       "default": "500",
16895	//       "description": "The maxResults parameter specifies the maximum number of messages that should be returned in the result set.",
16896	//       "format": "uint32",
16897	//       "location": "query",
16898	//       "maximum": "2000",
16899	//       "minimum": "200",
16900	//       "type": "integer"
16901	//     },
16902	//     "pageToken": {
16903	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.",
16904	//       "location": "query",
16905	//       "type": "string"
16906	//     },
16907	//     "part": {
16908	//       "description": "The part parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id and snippet.",
16909	//       "location": "query",
16910	//       "required": true,
16911	//       "type": "string"
16912	//     },
16913	//     "profileImageSize": {
16914	//       "description": "The profileImageSize parameter specifies the size of the user profile pictures that should be returned in the result set. Default: 88.",
16915	//       "format": "uint32",
16916	//       "location": "query",
16917	//       "maximum": "720",
16918	//       "minimum": "16",
16919	//       "type": "integer"
16920	//     }
16921	//   },
16922	//   "path": "liveChat/messages",
16923	//   "response": {
16924	//     "$ref": "LiveChatMessageListResponse"
16925	//   },
16926	//   "scopes": [
16927	//     "https://www.googleapis.com/auth/youtube",
16928	//     "https://www.googleapis.com/auth/youtube.force-ssl",
16929	//     "https://www.googleapis.com/auth/youtube.readonly"
16930	//   ]
16931	// }
16932
16933}
16934
16935// Pages invokes f for each page of results.
16936// A non-nil error returned from f will halt the iteration.
16937// The provided context supersedes any context provided to the Context method.
16938func (c *LiveChatMessagesListCall) Pages(ctx context.Context, f func(*LiveChatMessageListResponse) error) error {
16939	c.ctx_ = ctx
16940	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16941	for {
16942		x, err := c.Do()
16943		if err != nil {
16944			return err
16945		}
16946		if err := f(x); err != nil {
16947			return err
16948		}
16949		if x.NextPageToken == "" {
16950			return nil
16951		}
16952		c.PageToken(x.NextPageToken)
16953	}
16954}
16955
16956// method id "youtube.liveChatModerators.delete":
16957
16958type LiveChatModeratorsDeleteCall struct {
16959	s          *Service
16960	urlParams_ gensupport.URLParams
16961	ctx_       context.Context
16962	header_    http.Header
16963}
16964
16965// Delete: Removes a chat moderator.
16966func (r *LiveChatModeratorsService) Delete(id string) *LiveChatModeratorsDeleteCall {
16967	c := &LiveChatModeratorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16968	c.urlParams_.Set("id", id)
16969	return c
16970}
16971
16972// Fields allows partial responses to be retrieved. See
16973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16974// for more information.
16975func (c *LiveChatModeratorsDeleteCall) Fields(s ...googleapi.Field) *LiveChatModeratorsDeleteCall {
16976	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16977	return c
16978}
16979
16980// Context sets the context to be used in this call's Do method. Any
16981// pending HTTP request will be aborted if the provided context is
16982// canceled.
16983func (c *LiveChatModeratorsDeleteCall) Context(ctx context.Context) *LiveChatModeratorsDeleteCall {
16984	c.ctx_ = ctx
16985	return c
16986}
16987
16988// Header returns an http.Header that can be modified by the caller to
16989// add HTTP headers to the request.
16990func (c *LiveChatModeratorsDeleteCall) Header() http.Header {
16991	if c.header_ == nil {
16992		c.header_ = make(http.Header)
16993	}
16994	return c.header_
16995}
16996
16997func (c *LiveChatModeratorsDeleteCall) doRequest(alt string) (*http.Response, error) {
16998	reqHeaders := make(http.Header)
16999	for k, v := range c.header_ {
17000		reqHeaders[k] = v
17001	}
17002	reqHeaders.Set("User-Agent", c.s.userAgent())
17003	var body io.Reader = nil
17004	c.urlParams_.Set("alt", alt)
17005	c.urlParams_.Set("prettyPrint", "false")
17006	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/moderators")
17007	urls += "?" + c.urlParams_.Encode()
17008	req, err := http.NewRequest("DELETE", urls, body)
17009	if err != nil {
17010		return nil, err
17011	}
17012	req.Header = reqHeaders
17013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17014}
17015
17016// Do executes the "youtube.liveChatModerators.delete" call.
17017func (c *LiveChatModeratorsDeleteCall) Do(opts ...googleapi.CallOption) error {
17018	gensupport.SetOptions(c.urlParams_, opts...)
17019	res, err := c.doRequest("json")
17020	if err != nil {
17021		return err
17022	}
17023	defer googleapi.CloseBody(res)
17024	if err := googleapi.CheckResponse(res); err != nil {
17025		return err
17026	}
17027	return nil
17028	// {
17029	//   "description": "Removes a chat moderator.",
17030	//   "httpMethod": "DELETE",
17031	//   "id": "youtube.liveChatModerators.delete",
17032	//   "parameterOrder": [
17033	//     "id"
17034	//   ],
17035	//   "parameters": {
17036	//     "id": {
17037	//       "description": "The id parameter identifies the chat moderator to remove. The value uniquely identifies both the moderator and the chat.",
17038	//       "location": "query",
17039	//       "required": true,
17040	//       "type": "string"
17041	//     }
17042	//   },
17043	//   "path": "liveChat/moderators",
17044	//   "scopes": [
17045	//     "https://www.googleapis.com/auth/youtube",
17046	//     "https://www.googleapis.com/auth/youtube.force-ssl"
17047	//   ]
17048	// }
17049
17050}
17051
17052// method id "youtube.liveChatModerators.insert":
17053
17054type LiveChatModeratorsInsertCall struct {
17055	s                 *Service
17056	livechatmoderator *LiveChatModerator
17057	urlParams_        gensupport.URLParams
17058	ctx_              context.Context
17059	header_           http.Header
17060}
17061
17062// Insert: Adds a new moderator for the chat.
17063func (r *LiveChatModeratorsService) Insert(part string, livechatmoderator *LiveChatModerator) *LiveChatModeratorsInsertCall {
17064	c := &LiveChatModeratorsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17065	c.urlParams_.Set("part", part)
17066	c.livechatmoderator = livechatmoderator
17067	return c
17068}
17069
17070// Fields allows partial responses to be retrieved. See
17071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17072// for more information.
17073func (c *LiveChatModeratorsInsertCall) Fields(s ...googleapi.Field) *LiveChatModeratorsInsertCall {
17074	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17075	return c
17076}
17077
17078// Context sets the context to be used in this call's Do method. Any
17079// pending HTTP request will be aborted if the provided context is
17080// canceled.
17081func (c *LiveChatModeratorsInsertCall) Context(ctx context.Context) *LiveChatModeratorsInsertCall {
17082	c.ctx_ = ctx
17083	return c
17084}
17085
17086// Header returns an http.Header that can be modified by the caller to
17087// add HTTP headers to the request.
17088func (c *LiveChatModeratorsInsertCall) Header() http.Header {
17089	if c.header_ == nil {
17090		c.header_ = make(http.Header)
17091	}
17092	return c.header_
17093}
17094
17095func (c *LiveChatModeratorsInsertCall) doRequest(alt string) (*http.Response, error) {
17096	reqHeaders := make(http.Header)
17097	for k, v := range c.header_ {
17098		reqHeaders[k] = v
17099	}
17100	reqHeaders.Set("User-Agent", c.s.userAgent())
17101	var body io.Reader = nil
17102	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatmoderator)
17103	if err != nil {
17104		return nil, err
17105	}
17106	reqHeaders.Set("Content-Type", "application/json")
17107	c.urlParams_.Set("alt", alt)
17108	c.urlParams_.Set("prettyPrint", "false")
17109	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/moderators")
17110	urls += "?" + c.urlParams_.Encode()
17111	req, err := http.NewRequest("POST", urls, body)
17112	if err != nil {
17113		return nil, err
17114	}
17115	req.Header = reqHeaders
17116	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17117}
17118
17119// Do executes the "youtube.liveChatModerators.insert" call.
17120// Exactly one of *LiveChatModerator or error will be non-nil. Any
17121// non-2xx status code is an error. Response headers are in either
17122// *LiveChatModerator.ServerResponse.Header or (if a response was
17123// returned at all) in error.(*googleapi.Error).Header. Use
17124// googleapi.IsNotModified to check whether the returned error was
17125// because http.StatusNotModified was returned.
17126func (c *LiveChatModeratorsInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatModerator, error) {
17127	gensupport.SetOptions(c.urlParams_, opts...)
17128	res, err := c.doRequest("json")
17129	if res != nil && res.StatusCode == http.StatusNotModified {
17130		if res.Body != nil {
17131			res.Body.Close()
17132		}
17133		return nil, &googleapi.Error{
17134			Code:   res.StatusCode,
17135			Header: res.Header,
17136		}
17137	}
17138	if err != nil {
17139		return nil, err
17140	}
17141	defer googleapi.CloseBody(res)
17142	if err := googleapi.CheckResponse(res); err != nil {
17143		return nil, err
17144	}
17145	ret := &LiveChatModerator{
17146		ServerResponse: googleapi.ServerResponse{
17147			Header:         res.Header,
17148			HTTPStatusCode: res.StatusCode,
17149		},
17150	}
17151	target := &ret
17152	if err := gensupport.DecodeResponse(target, res); err != nil {
17153		return nil, err
17154	}
17155	return ret, nil
17156	// {
17157	//   "description": "Adds a new moderator for the chat.",
17158	//   "httpMethod": "POST",
17159	//   "id": "youtube.liveChatModerators.insert",
17160	//   "parameterOrder": [
17161	//     "part"
17162	//   ],
17163	//   "parameters": {
17164	//     "part": {
17165	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response returns. Set the parameter value to snippet.",
17166	//       "location": "query",
17167	//       "required": true,
17168	//       "type": "string"
17169	//     }
17170	//   },
17171	//   "path": "liveChat/moderators",
17172	//   "request": {
17173	//     "$ref": "LiveChatModerator"
17174	//   },
17175	//   "response": {
17176	//     "$ref": "LiveChatModerator"
17177	//   },
17178	//   "scopes": [
17179	//     "https://www.googleapis.com/auth/youtube",
17180	//     "https://www.googleapis.com/auth/youtube.force-ssl"
17181	//   ]
17182	// }
17183
17184}
17185
17186// method id "youtube.liveChatModerators.list":
17187
17188type LiveChatModeratorsListCall struct {
17189	s            *Service
17190	urlParams_   gensupport.URLParams
17191	ifNoneMatch_ string
17192	ctx_         context.Context
17193	header_      http.Header
17194}
17195
17196// List: Lists moderators for a live chat.
17197func (r *LiveChatModeratorsService) List(liveChatId string, part string) *LiveChatModeratorsListCall {
17198	c := &LiveChatModeratorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17199	c.urlParams_.Set("liveChatId", liveChatId)
17200	c.urlParams_.Set("part", part)
17201	return c
17202}
17203
17204// MaxResults sets the optional parameter "maxResults": The maxResults
17205// parameter specifies the maximum number of items that should be
17206// returned in the result set.
17207func (c *LiveChatModeratorsListCall) MaxResults(maxResults int64) *LiveChatModeratorsListCall {
17208	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17209	return c
17210}
17211
17212// PageToken sets the optional parameter "pageToken": The pageToken
17213// parameter identifies a specific page in the result set that should be
17214// returned. In an API response, the nextPageToken and prevPageToken
17215// properties identify other pages that could be retrieved.
17216func (c *LiveChatModeratorsListCall) PageToken(pageToken string) *LiveChatModeratorsListCall {
17217	c.urlParams_.Set("pageToken", pageToken)
17218	return c
17219}
17220
17221// Fields allows partial responses to be retrieved. See
17222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17223// for more information.
17224func (c *LiveChatModeratorsListCall) Fields(s ...googleapi.Field) *LiveChatModeratorsListCall {
17225	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17226	return c
17227}
17228
17229// IfNoneMatch sets the optional parameter which makes the operation
17230// fail if the object's ETag matches the given value. This is useful for
17231// getting updates only after the object has changed since the last
17232// request. Use googleapi.IsNotModified to check whether the response
17233// error from Do is the result of In-None-Match.
17234func (c *LiveChatModeratorsListCall) IfNoneMatch(entityTag string) *LiveChatModeratorsListCall {
17235	c.ifNoneMatch_ = entityTag
17236	return c
17237}
17238
17239// Context sets the context to be used in this call's Do method. Any
17240// pending HTTP request will be aborted if the provided context is
17241// canceled.
17242func (c *LiveChatModeratorsListCall) Context(ctx context.Context) *LiveChatModeratorsListCall {
17243	c.ctx_ = ctx
17244	return c
17245}
17246
17247// Header returns an http.Header that can be modified by the caller to
17248// add HTTP headers to the request.
17249func (c *LiveChatModeratorsListCall) Header() http.Header {
17250	if c.header_ == nil {
17251		c.header_ = make(http.Header)
17252	}
17253	return c.header_
17254}
17255
17256func (c *LiveChatModeratorsListCall) doRequest(alt string) (*http.Response, error) {
17257	reqHeaders := make(http.Header)
17258	for k, v := range c.header_ {
17259		reqHeaders[k] = v
17260	}
17261	reqHeaders.Set("User-Agent", c.s.userAgent())
17262	if c.ifNoneMatch_ != "" {
17263		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17264	}
17265	var body io.Reader = nil
17266	c.urlParams_.Set("alt", alt)
17267	c.urlParams_.Set("prettyPrint", "false")
17268	urls := googleapi.ResolveRelative(c.s.BasePath, "liveChat/moderators")
17269	urls += "?" + c.urlParams_.Encode()
17270	req, err := http.NewRequest("GET", urls, body)
17271	if err != nil {
17272		return nil, err
17273	}
17274	req.Header = reqHeaders
17275	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17276}
17277
17278// Do executes the "youtube.liveChatModerators.list" call.
17279// Exactly one of *LiveChatModeratorListResponse or error will be
17280// non-nil. Any non-2xx status code is an error. Response headers are in
17281// either *LiveChatModeratorListResponse.ServerResponse.Header or (if a
17282// response was returned at all) in error.(*googleapi.Error).Header. Use
17283// googleapi.IsNotModified to check whether the returned error was
17284// because http.StatusNotModified was returned.
17285func (c *LiveChatModeratorsListCall) Do(opts ...googleapi.CallOption) (*LiveChatModeratorListResponse, error) {
17286	gensupport.SetOptions(c.urlParams_, opts...)
17287	res, err := c.doRequest("json")
17288	if res != nil && res.StatusCode == http.StatusNotModified {
17289		if res.Body != nil {
17290			res.Body.Close()
17291		}
17292		return nil, &googleapi.Error{
17293			Code:   res.StatusCode,
17294			Header: res.Header,
17295		}
17296	}
17297	if err != nil {
17298		return nil, err
17299	}
17300	defer googleapi.CloseBody(res)
17301	if err := googleapi.CheckResponse(res); err != nil {
17302		return nil, err
17303	}
17304	ret := &LiveChatModeratorListResponse{
17305		ServerResponse: googleapi.ServerResponse{
17306			Header:         res.Header,
17307			HTTPStatusCode: res.StatusCode,
17308		},
17309	}
17310	target := &ret
17311	if err := gensupport.DecodeResponse(target, res); err != nil {
17312		return nil, err
17313	}
17314	return ret, nil
17315	// {
17316	//   "description": "Lists moderators for a live chat.",
17317	//   "httpMethod": "GET",
17318	//   "id": "youtube.liveChatModerators.list",
17319	//   "parameterOrder": [
17320	//     "liveChatId",
17321	//     "part"
17322	//   ],
17323	//   "parameters": {
17324	//     "liveChatId": {
17325	//       "description": "The liveChatId parameter specifies the YouTube live chat for which the API should return moderators.",
17326	//       "location": "query",
17327	//       "required": true,
17328	//       "type": "string"
17329	//     },
17330	//     "maxResults": {
17331	//       "default": "5",
17332	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
17333	//       "format": "uint32",
17334	//       "location": "query",
17335	//       "maximum": "50",
17336	//       "minimum": "0",
17337	//       "type": "integer"
17338	//     },
17339	//     "pageToken": {
17340	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
17341	//       "location": "query",
17342	//       "type": "string"
17343	//     },
17344	//     "part": {
17345	//       "description": "The part parameter specifies the liveChatModerator resource parts that the API response will include. Supported values are id and snippet.",
17346	//       "location": "query",
17347	//       "required": true,
17348	//       "type": "string"
17349	//     }
17350	//   },
17351	//   "path": "liveChat/moderators",
17352	//   "response": {
17353	//     "$ref": "LiveChatModeratorListResponse"
17354	//   },
17355	//   "scopes": [
17356	//     "https://www.googleapis.com/auth/youtube",
17357	//     "https://www.googleapis.com/auth/youtube.force-ssl",
17358	//     "https://www.googleapis.com/auth/youtube.readonly"
17359	//   ]
17360	// }
17361
17362}
17363
17364// Pages invokes f for each page of results.
17365// A non-nil error returned from f will halt the iteration.
17366// The provided context supersedes any context provided to the Context method.
17367func (c *LiveChatModeratorsListCall) Pages(ctx context.Context, f func(*LiveChatModeratorListResponse) error) error {
17368	c.ctx_ = ctx
17369	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17370	for {
17371		x, err := c.Do()
17372		if err != nil {
17373			return err
17374		}
17375		if err := f(x); err != nil {
17376			return err
17377		}
17378		if x.NextPageToken == "" {
17379			return nil
17380		}
17381		c.PageToken(x.NextPageToken)
17382	}
17383}
17384
17385// method id "youtube.liveStreams.delete":
17386
17387type LiveStreamsDeleteCall struct {
17388	s          *Service
17389	urlParams_ gensupport.URLParams
17390	ctx_       context.Context
17391	header_    http.Header
17392}
17393
17394// Delete: Deletes a video stream.
17395func (r *LiveStreamsService) Delete(id string) *LiveStreamsDeleteCall {
17396	c := &LiveStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17397	c.urlParams_.Set("id", id)
17398	return c
17399}
17400
17401// OnBehalfOfContentOwner sets the optional parameter
17402// "onBehalfOfContentOwner": Note: This parameter is intended
17403// exclusively for YouTube content partners.
17404//
17405// The onBehalfOfContentOwner parameter indicates that the request's
17406// authorization credentials identify a YouTube CMS user who is acting
17407// on behalf of the content owner specified in the parameter value. This
17408// parameter is intended for YouTube content partners that own and
17409// manage many different YouTube channels. It allows content owners to
17410// authenticate once and get access to all their video and channel data,
17411// without having to provide authentication credentials for each
17412// individual channel. The CMS account that the user authenticates with
17413// must be linked to the specified YouTube content owner.
17414func (c *LiveStreamsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsDeleteCall {
17415	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
17416	return c
17417}
17418
17419// OnBehalfOfContentOwnerChannel sets the optional parameter
17420// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
17421// properly authorized request. Note: This parameter is intended
17422// exclusively for YouTube content partners.
17423//
17424// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
17425// channel ID of the channel to which a video is being added. This
17426// parameter is required when a request specifies a value for the
17427// onBehalfOfContentOwner parameter, and it can only be used in
17428// conjunction with that parameter. In addition, the request must be
17429// authorized using a CMS account that is linked to the content owner
17430// that the onBehalfOfContentOwner parameter specifies. Finally, the
17431// channel that the onBehalfOfContentOwnerChannel parameter value
17432// specifies must be linked to the content owner that the
17433// onBehalfOfContentOwner parameter specifies.
17434//
17435// This parameter is intended for YouTube content partners that own and
17436// manage many different YouTube channels. It allows content owners to
17437// authenticate once and perform actions on behalf of the channel
17438// specified in the parameter value, without having to provide
17439// authentication credentials for each separate channel.
17440func (c *LiveStreamsDeleteCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsDeleteCall {
17441	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
17442	return c
17443}
17444
17445// Fields allows partial responses to be retrieved. See
17446// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17447// for more information.
17448func (c *LiveStreamsDeleteCall) Fields(s ...googleapi.Field) *LiveStreamsDeleteCall {
17449	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17450	return c
17451}
17452
17453// Context sets the context to be used in this call's Do method. Any
17454// pending HTTP request will be aborted if the provided context is
17455// canceled.
17456func (c *LiveStreamsDeleteCall) Context(ctx context.Context) *LiveStreamsDeleteCall {
17457	c.ctx_ = ctx
17458	return c
17459}
17460
17461// Header returns an http.Header that can be modified by the caller to
17462// add HTTP headers to the request.
17463func (c *LiveStreamsDeleteCall) Header() http.Header {
17464	if c.header_ == nil {
17465		c.header_ = make(http.Header)
17466	}
17467	return c.header_
17468}
17469
17470func (c *LiveStreamsDeleteCall) doRequest(alt string) (*http.Response, error) {
17471	reqHeaders := make(http.Header)
17472	for k, v := range c.header_ {
17473		reqHeaders[k] = v
17474	}
17475	reqHeaders.Set("User-Agent", c.s.userAgent())
17476	var body io.Reader = nil
17477	c.urlParams_.Set("alt", alt)
17478	c.urlParams_.Set("prettyPrint", "false")
17479	urls := googleapi.ResolveRelative(c.s.BasePath, "liveStreams")
17480	urls += "?" + c.urlParams_.Encode()
17481	req, err := http.NewRequest("DELETE", urls, body)
17482	if err != nil {
17483		return nil, err
17484	}
17485	req.Header = reqHeaders
17486	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17487}
17488
17489// Do executes the "youtube.liveStreams.delete" call.
17490func (c *LiveStreamsDeleteCall) Do(opts ...googleapi.CallOption) error {
17491	gensupport.SetOptions(c.urlParams_, opts...)
17492	res, err := c.doRequest("json")
17493	if err != nil {
17494		return err
17495	}
17496	defer googleapi.CloseBody(res)
17497	if err := googleapi.CheckResponse(res); err != nil {
17498		return err
17499	}
17500	return nil
17501	// {
17502	//   "description": "Deletes a video stream.",
17503	//   "httpMethod": "DELETE",
17504	//   "id": "youtube.liveStreams.delete",
17505	//   "parameterOrder": [
17506	//     "id"
17507	//   ],
17508	//   "parameters": {
17509	//     "id": {
17510	//       "description": "The id parameter specifies the YouTube live stream ID for the resource that is being deleted.",
17511	//       "location": "query",
17512	//       "required": true,
17513	//       "type": "string"
17514	//     },
17515	//     "onBehalfOfContentOwner": {
17516	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
17517	//       "location": "query",
17518	//       "type": "string"
17519	//     },
17520	//     "onBehalfOfContentOwnerChannel": {
17521	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
17522	//       "location": "query",
17523	//       "type": "string"
17524	//     }
17525	//   },
17526	//   "path": "liveStreams",
17527	//   "scopes": [
17528	//     "https://www.googleapis.com/auth/youtube",
17529	//     "https://www.googleapis.com/auth/youtube.force-ssl"
17530	//   ]
17531	// }
17532
17533}
17534
17535// method id "youtube.liveStreams.insert":
17536
17537type LiveStreamsInsertCall struct {
17538	s          *Service
17539	livestream *LiveStream
17540	urlParams_ gensupport.URLParams
17541	ctx_       context.Context
17542	header_    http.Header
17543}
17544
17545// Insert: Creates a video stream. The stream enables you to send your
17546// video to YouTube, which can then broadcast the video to your
17547// audience.
17548func (r *LiveStreamsService) Insert(part string, livestream *LiveStream) *LiveStreamsInsertCall {
17549	c := &LiveStreamsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17550	c.urlParams_.Set("part", part)
17551	c.livestream = livestream
17552	return c
17553}
17554
17555// OnBehalfOfContentOwner sets the optional parameter
17556// "onBehalfOfContentOwner": Note: This parameter is intended
17557// exclusively for YouTube content partners.
17558//
17559// The onBehalfOfContentOwner parameter indicates that the request's
17560// authorization credentials identify a YouTube CMS user who is acting
17561// on behalf of the content owner specified in the parameter value. This
17562// parameter is intended for YouTube content partners that own and
17563// manage many different YouTube channels. It allows content owners to
17564// authenticate once and get access to all their video and channel data,
17565// without having to provide authentication credentials for each
17566// individual channel. The CMS account that the user authenticates with
17567// must be linked to the specified YouTube content owner.
17568func (c *LiveStreamsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsInsertCall {
17569	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
17570	return c
17571}
17572
17573// OnBehalfOfContentOwnerChannel sets the optional parameter
17574// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
17575// properly authorized request. Note: This parameter is intended
17576// exclusively for YouTube content partners.
17577//
17578// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
17579// channel ID of the channel to which a video is being added. This
17580// parameter is required when a request specifies a value for the
17581// onBehalfOfContentOwner parameter, and it can only be used in
17582// conjunction with that parameter. In addition, the request must be
17583// authorized using a CMS account that is linked to the content owner
17584// that the onBehalfOfContentOwner parameter specifies. Finally, the
17585// channel that the onBehalfOfContentOwnerChannel parameter value
17586// specifies must be linked to the content owner that the
17587// onBehalfOfContentOwner parameter specifies.
17588//
17589// This parameter is intended for YouTube content partners that own and
17590// manage many different YouTube channels. It allows content owners to
17591// authenticate once and perform actions on behalf of the channel
17592// specified in the parameter value, without having to provide
17593// authentication credentials for each separate channel.
17594func (c *LiveStreamsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsInsertCall {
17595	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
17596	return c
17597}
17598
17599// Fields allows partial responses to be retrieved. See
17600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17601// for more information.
17602func (c *LiveStreamsInsertCall) Fields(s ...googleapi.Field) *LiveStreamsInsertCall {
17603	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17604	return c
17605}
17606
17607// Context sets the context to be used in this call's Do method. Any
17608// pending HTTP request will be aborted if the provided context is
17609// canceled.
17610func (c *LiveStreamsInsertCall) Context(ctx context.Context) *LiveStreamsInsertCall {
17611	c.ctx_ = ctx
17612	return c
17613}
17614
17615// Header returns an http.Header that can be modified by the caller to
17616// add HTTP headers to the request.
17617func (c *LiveStreamsInsertCall) Header() http.Header {
17618	if c.header_ == nil {
17619		c.header_ = make(http.Header)
17620	}
17621	return c.header_
17622}
17623
17624func (c *LiveStreamsInsertCall) doRequest(alt string) (*http.Response, error) {
17625	reqHeaders := make(http.Header)
17626	for k, v := range c.header_ {
17627		reqHeaders[k] = v
17628	}
17629	reqHeaders.Set("User-Agent", c.s.userAgent())
17630	var body io.Reader = nil
17631	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
17632	if err != nil {
17633		return nil, err
17634	}
17635	reqHeaders.Set("Content-Type", "application/json")
17636	c.urlParams_.Set("alt", alt)
17637	c.urlParams_.Set("prettyPrint", "false")
17638	urls := googleapi.ResolveRelative(c.s.BasePath, "liveStreams")
17639	urls += "?" + c.urlParams_.Encode()
17640	req, err := http.NewRequest("POST", urls, body)
17641	if err != nil {
17642		return nil, err
17643	}
17644	req.Header = reqHeaders
17645	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17646}
17647
17648// Do executes the "youtube.liveStreams.insert" call.
17649// Exactly one of *LiveStream or error will be non-nil. Any non-2xx
17650// status code is an error. Response headers are in either
17651// *LiveStream.ServerResponse.Header or (if a response was returned at
17652// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17653// to check whether the returned error was because
17654// http.StatusNotModified was returned.
17655func (c *LiveStreamsInsertCall) Do(opts ...googleapi.CallOption) (*LiveStream, error) {
17656	gensupport.SetOptions(c.urlParams_, opts...)
17657	res, err := c.doRequest("json")
17658	if res != nil && res.StatusCode == http.StatusNotModified {
17659		if res.Body != nil {
17660			res.Body.Close()
17661		}
17662		return nil, &googleapi.Error{
17663			Code:   res.StatusCode,
17664			Header: res.Header,
17665		}
17666	}
17667	if err != nil {
17668		return nil, err
17669	}
17670	defer googleapi.CloseBody(res)
17671	if err := googleapi.CheckResponse(res); err != nil {
17672		return nil, err
17673	}
17674	ret := &LiveStream{
17675		ServerResponse: googleapi.ServerResponse{
17676			Header:         res.Header,
17677			HTTPStatusCode: res.StatusCode,
17678		},
17679	}
17680	target := &ret
17681	if err := gensupport.DecodeResponse(target, res); err != nil {
17682		return nil, err
17683	}
17684	return ret, nil
17685	// {
17686	//   "description": "Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience.",
17687	//   "httpMethod": "POST",
17688	//   "id": "youtube.liveStreams.insert",
17689	//   "parameterOrder": [
17690	//     "part"
17691	//   ],
17692	//   "parameters": {
17693	//     "onBehalfOfContentOwner": {
17694	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
17695	//       "location": "query",
17696	//       "type": "string"
17697	//     },
17698	//     "onBehalfOfContentOwnerChannel": {
17699	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
17700	//       "location": "query",
17701	//       "type": "string"
17702	//     },
17703	//     "part": {
17704	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe part properties that you can include in the parameter value are id, snippet, cdn, and status.",
17705	//       "location": "query",
17706	//       "required": true,
17707	//       "type": "string"
17708	//     }
17709	//   },
17710	//   "path": "liveStreams",
17711	//   "request": {
17712	//     "$ref": "LiveStream"
17713	//   },
17714	//   "response": {
17715	//     "$ref": "LiveStream"
17716	//   },
17717	//   "scopes": [
17718	//     "https://www.googleapis.com/auth/youtube",
17719	//     "https://www.googleapis.com/auth/youtube.force-ssl"
17720	//   ]
17721	// }
17722
17723}
17724
17725// method id "youtube.liveStreams.list":
17726
17727type LiveStreamsListCall struct {
17728	s            *Service
17729	urlParams_   gensupport.URLParams
17730	ifNoneMatch_ string
17731	ctx_         context.Context
17732	header_      http.Header
17733}
17734
17735// List: Returns a list of video streams that match the API request
17736// parameters.
17737func (r *LiveStreamsService) List(part string) *LiveStreamsListCall {
17738	c := &LiveStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17739	c.urlParams_.Set("part", part)
17740	return c
17741}
17742
17743// Id sets the optional parameter "id": The id parameter specifies a
17744// comma-separated list of YouTube stream IDs that identify the streams
17745// being retrieved. In a liveStream resource, the id property specifies
17746// the stream's ID.
17747func (c *LiveStreamsListCall) Id(id string) *LiveStreamsListCall {
17748	c.urlParams_.Set("id", id)
17749	return c
17750}
17751
17752// MaxResults sets the optional parameter "maxResults": The maxResults
17753// parameter specifies the maximum number of items that should be
17754// returned in the result set.
17755func (c *LiveStreamsListCall) MaxResults(maxResults int64) *LiveStreamsListCall {
17756	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17757	return c
17758}
17759
17760// Mine sets the optional parameter "mine": The mine parameter can be
17761// used to instruct the API to only return streams owned by the
17762// authenticated user. Set the parameter value to true to only retrieve
17763// your own streams.
17764func (c *LiveStreamsListCall) Mine(mine bool) *LiveStreamsListCall {
17765	c.urlParams_.Set("mine", fmt.Sprint(mine))
17766	return c
17767}
17768
17769// OnBehalfOfContentOwner sets the optional parameter
17770// "onBehalfOfContentOwner": Note: This parameter is intended
17771// exclusively for YouTube content partners.
17772//
17773// The onBehalfOfContentOwner parameter indicates that the request's
17774// authorization credentials identify a YouTube CMS user who is acting
17775// on behalf of the content owner specified in the parameter value. This
17776// parameter is intended for YouTube content partners that own and
17777// manage many different YouTube channels. It allows content owners to
17778// authenticate once and get access to all their video and channel data,
17779// without having to provide authentication credentials for each
17780// individual channel. The CMS account that the user authenticates with
17781// must be linked to the specified YouTube content owner.
17782func (c *LiveStreamsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsListCall {
17783	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
17784	return c
17785}
17786
17787// OnBehalfOfContentOwnerChannel sets the optional parameter
17788// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
17789// properly authorized request. Note: This parameter is intended
17790// exclusively for YouTube content partners.
17791//
17792// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
17793// channel ID of the channel to which a video is being added. This
17794// parameter is required when a request specifies a value for the
17795// onBehalfOfContentOwner parameter, and it can only be used in
17796// conjunction with that parameter. In addition, the request must be
17797// authorized using a CMS account that is linked to the content owner
17798// that the onBehalfOfContentOwner parameter specifies. Finally, the
17799// channel that the onBehalfOfContentOwnerChannel parameter value
17800// specifies must be linked to the content owner that the
17801// onBehalfOfContentOwner parameter specifies.
17802//
17803// This parameter is intended for YouTube content partners that own and
17804// manage many different YouTube channels. It allows content owners to
17805// authenticate once and perform actions on behalf of the channel
17806// specified in the parameter value, without having to provide
17807// authentication credentials for each separate channel.
17808func (c *LiveStreamsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsListCall {
17809	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
17810	return c
17811}
17812
17813// PageToken sets the optional parameter "pageToken": The pageToken
17814// parameter identifies a specific page in the result set that should be
17815// returned. In an API response, the nextPageToken and prevPageToken
17816// properties identify other pages that could be retrieved.
17817func (c *LiveStreamsListCall) PageToken(pageToken string) *LiveStreamsListCall {
17818	c.urlParams_.Set("pageToken", pageToken)
17819	return c
17820}
17821
17822// Fields allows partial responses to be retrieved. See
17823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17824// for more information.
17825func (c *LiveStreamsListCall) Fields(s ...googleapi.Field) *LiveStreamsListCall {
17826	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17827	return c
17828}
17829
17830// IfNoneMatch sets the optional parameter which makes the operation
17831// fail if the object's ETag matches the given value. This is useful for
17832// getting updates only after the object has changed since the last
17833// request. Use googleapi.IsNotModified to check whether the response
17834// error from Do is the result of In-None-Match.
17835func (c *LiveStreamsListCall) IfNoneMatch(entityTag string) *LiveStreamsListCall {
17836	c.ifNoneMatch_ = entityTag
17837	return c
17838}
17839
17840// Context sets the context to be used in this call's Do method. Any
17841// pending HTTP request will be aborted if the provided context is
17842// canceled.
17843func (c *LiveStreamsListCall) Context(ctx context.Context) *LiveStreamsListCall {
17844	c.ctx_ = ctx
17845	return c
17846}
17847
17848// Header returns an http.Header that can be modified by the caller to
17849// add HTTP headers to the request.
17850func (c *LiveStreamsListCall) Header() http.Header {
17851	if c.header_ == nil {
17852		c.header_ = make(http.Header)
17853	}
17854	return c.header_
17855}
17856
17857func (c *LiveStreamsListCall) doRequest(alt string) (*http.Response, error) {
17858	reqHeaders := make(http.Header)
17859	for k, v := range c.header_ {
17860		reqHeaders[k] = v
17861	}
17862	reqHeaders.Set("User-Agent", c.s.userAgent())
17863	if c.ifNoneMatch_ != "" {
17864		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17865	}
17866	var body io.Reader = nil
17867	c.urlParams_.Set("alt", alt)
17868	c.urlParams_.Set("prettyPrint", "false")
17869	urls := googleapi.ResolveRelative(c.s.BasePath, "liveStreams")
17870	urls += "?" + c.urlParams_.Encode()
17871	req, err := http.NewRequest("GET", urls, body)
17872	if err != nil {
17873		return nil, err
17874	}
17875	req.Header = reqHeaders
17876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17877}
17878
17879// Do executes the "youtube.liveStreams.list" call.
17880// Exactly one of *LiveStreamListResponse or error will be non-nil. Any
17881// non-2xx status code is an error. Response headers are in either
17882// *LiveStreamListResponse.ServerResponse.Header or (if a response was
17883// returned at all) in error.(*googleapi.Error).Header. Use
17884// googleapi.IsNotModified to check whether the returned error was
17885// because http.StatusNotModified was returned.
17886func (c *LiveStreamsListCall) Do(opts ...googleapi.CallOption) (*LiveStreamListResponse, error) {
17887	gensupport.SetOptions(c.urlParams_, opts...)
17888	res, err := c.doRequest("json")
17889	if res != nil && res.StatusCode == http.StatusNotModified {
17890		if res.Body != nil {
17891			res.Body.Close()
17892		}
17893		return nil, &googleapi.Error{
17894			Code:   res.StatusCode,
17895			Header: res.Header,
17896		}
17897	}
17898	if err != nil {
17899		return nil, err
17900	}
17901	defer googleapi.CloseBody(res)
17902	if err := googleapi.CheckResponse(res); err != nil {
17903		return nil, err
17904	}
17905	ret := &LiveStreamListResponse{
17906		ServerResponse: googleapi.ServerResponse{
17907			Header:         res.Header,
17908			HTTPStatusCode: res.StatusCode,
17909		},
17910	}
17911	target := &ret
17912	if err := gensupport.DecodeResponse(target, res); err != nil {
17913		return nil, err
17914	}
17915	return ret, nil
17916	// {
17917	//   "description": "Returns a list of video streams that match the API request parameters.",
17918	//   "httpMethod": "GET",
17919	//   "id": "youtube.liveStreams.list",
17920	//   "parameterOrder": [
17921	//     "part"
17922	//   ],
17923	//   "parameters": {
17924	//     "id": {
17925	//       "description": "The id parameter specifies a comma-separated list of YouTube stream IDs that identify the streams being retrieved. In a liveStream resource, the id property specifies the stream's ID.",
17926	//       "location": "query",
17927	//       "type": "string"
17928	//     },
17929	//     "maxResults": {
17930	//       "default": "5",
17931	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
17932	//       "format": "uint32",
17933	//       "location": "query",
17934	//       "maximum": "50",
17935	//       "minimum": "0",
17936	//       "type": "integer"
17937	//     },
17938	//     "mine": {
17939	//       "description": "The mine parameter can be used to instruct the API to only return streams owned by the authenticated user. Set the parameter value to true to only retrieve your own streams.",
17940	//       "location": "query",
17941	//       "type": "boolean"
17942	//     },
17943	//     "onBehalfOfContentOwner": {
17944	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
17945	//       "location": "query",
17946	//       "type": "string"
17947	//     },
17948	//     "onBehalfOfContentOwnerChannel": {
17949	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
17950	//       "location": "query",
17951	//       "type": "string"
17952	//     },
17953	//     "pageToken": {
17954	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
17955	//       "location": "query",
17956	//       "type": "string"
17957	//     },
17958	//     "part": {
17959	//       "description": "The part parameter specifies a comma-separated list of one or more liveStream resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, cdn, and status.",
17960	//       "location": "query",
17961	//       "required": true,
17962	//       "type": "string"
17963	//     }
17964	//   },
17965	//   "path": "liveStreams",
17966	//   "response": {
17967	//     "$ref": "LiveStreamListResponse"
17968	//   },
17969	//   "scopes": [
17970	//     "https://www.googleapis.com/auth/youtube",
17971	//     "https://www.googleapis.com/auth/youtube.force-ssl",
17972	//     "https://www.googleapis.com/auth/youtube.readonly"
17973	//   ]
17974	// }
17975
17976}
17977
17978// Pages invokes f for each page of results.
17979// A non-nil error returned from f will halt the iteration.
17980// The provided context supersedes any context provided to the Context method.
17981func (c *LiveStreamsListCall) Pages(ctx context.Context, f func(*LiveStreamListResponse) error) error {
17982	c.ctx_ = ctx
17983	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17984	for {
17985		x, err := c.Do()
17986		if err != nil {
17987			return err
17988		}
17989		if err := f(x); err != nil {
17990			return err
17991		}
17992		if x.NextPageToken == "" {
17993			return nil
17994		}
17995		c.PageToken(x.NextPageToken)
17996	}
17997}
17998
17999// method id "youtube.liveStreams.update":
18000
18001type LiveStreamsUpdateCall struct {
18002	s          *Service
18003	livestream *LiveStream
18004	urlParams_ gensupport.URLParams
18005	ctx_       context.Context
18006	header_    http.Header
18007}
18008
18009// Update: Updates a video stream. If the properties that you want to
18010// change cannot be updated, then you need to create a new stream with
18011// the proper settings.
18012func (r *LiveStreamsService) Update(part string, livestream *LiveStream) *LiveStreamsUpdateCall {
18013	c := &LiveStreamsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18014	c.urlParams_.Set("part", part)
18015	c.livestream = livestream
18016	return c
18017}
18018
18019// OnBehalfOfContentOwner sets the optional parameter
18020// "onBehalfOfContentOwner": Note: This parameter is intended
18021// exclusively for YouTube content partners.
18022//
18023// The onBehalfOfContentOwner parameter indicates that the request's
18024// authorization credentials identify a YouTube CMS user who is acting
18025// on behalf of the content owner specified in the parameter value. This
18026// parameter is intended for YouTube content partners that own and
18027// manage many different YouTube channels. It allows content owners to
18028// authenticate once and get access to all their video and channel data,
18029// without having to provide authentication credentials for each
18030// individual channel. The CMS account that the user authenticates with
18031// must be linked to the specified YouTube content owner.
18032func (c *LiveStreamsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsUpdateCall {
18033	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18034	return c
18035}
18036
18037// OnBehalfOfContentOwnerChannel sets the optional parameter
18038// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
18039// properly authorized request. Note: This parameter is intended
18040// exclusively for YouTube content partners.
18041//
18042// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
18043// channel ID of the channel to which a video is being added. This
18044// parameter is required when a request specifies a value for the
18045// onBehalfOfContentOwner parameter, and it can only be used in
18046// conjunction with that parameter. In addition, the request must be
18047// authorized using a CMS account that is linked to the content owner
18048// that the onBehalfOfContentOwner parameter specifies. Finally, the
18049// channel that the onBehalfOfContentOwnerChannel parameter value
18050// specifies must be linked to the content owner that the
18051// onBehalfOfContentOwner parameter specifies.
18052//
18053// This parameter is intended for YouTube content partners that own and
18054// manage many different YouTube channels. It allows content owners to
18055// authenticate once and perform actions on behalf of the channel
18056// specified in the parameter value, without having to provide
18057// authentication credentials for each separate channel.
18058func (c *LiveStreamsUpdateCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsUpdateCall {
18059	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
18060	return c
18061}
18062
18063// Fields allows partial responses to be retrieved. See
18064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18065// for more information.
18066func (c *LiveStreamsUpdateCall) Fields(s ...googleapi.Field) *LiveStreamsUpdateCall {
18067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18068	return c
18069}
18070
18071// Context sets the context to be used in this call's Do method. Any
18072// pending HTTP request will be aborted if the provided context is
18073// canceled.
18074func (c *LiveStreamsUpdateCall) Context(ctx context.Context) *LiveStreamsUpdateCall {
18075	c.ctx_ = ctx
18076	return c
18077}
18078
18079// Header returns an http.Header that can be modified by the caller to
18080// add HTTP headers to the request.
18081func (c *LiveStreamsUpdateCall) Header() http.Header {
18082	if c.header_ == nil {
18083		c.header_ = make(http.Header)
18084	}
18085	return c.header_
18086}
18087
18088func (c *LiveStreamsUpdateCall) doRequest(alt string) (*http.Response, error) {
18089	reqHeaders := make(http.Header)
18090	for k, v := range c.header_ {
18091		reqHeaders[k] = v
18092	}
18093	reqHeaders.Set("User-Agent", c.s.userAgent())
18094	var body io.Reader = nil
18095	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
18096	if err != nil {
18097		return nil, err
18098	}
18099	reqHeaders.Set("Content-Type", "application/json")
18100	c.urlParams_.Set("alt", alt)
18101	c.urlParams_.Set("prettyPrint", "false")
18102	urls := googleapi.ResolveRelative(c.s.BasePath, "liveStreams")
18103	urls += "?" + c.urlParams_.Encode()
18104	req, err := http.NewRequest("PUT", urls, body)
18105	if err != nil {
18106		return nil, err
18107	}
18108	req.Header = reqHeaders
18109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18110}
18111
18112// Do executes the "youtube.liveStreams.update" call.
18113// Exactly one of *LiveStream or error will be non-nil. Any non-2xx
18114// status code is an error. Response headers are in either
18115// *LiveStream.ServerResponse.Header or (if a response was returned at
18116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18117// to check whether the returned error was because
18118// http.StatusNotModified was returned.
18119func (c *LiveStreamsUpdateCall) Do(opts ...googleapi.CallOption) (*LiveStream, error) {
18120	gensupport.SetOptions(c.urlParams_, opts...)
18121	res, err := c.doRequest("json")
18122	if res != nil && res.StatusCode == http.StatusNotModified {
18123		if res.Body != nil {
18124			res.Body.Close()
18125		}
18126		return nil, &googleapi.Error{
18127			Code:   res.StatusCode,
18128			Header: res.Header,
18129		}
18130	}
18131	if err != nil {
18132		return nil, err
18133	}
18134	defer googleapi.CloseBody(res)
18135	if err := googleapi.CheckResponse(res); err != nil {
18136		return nil, err
18137	}
18138	ret := &LiveStream{
18139		ServerResponse: googleapi.ServerResponse{
18140			Header:         res.Header,
18141			HTTPStatusCode: res.StatusCode,
18142		},
18143	}
18144	target := &ret
18145	if err := gensupport.DecodeResponse(target, res); err != nil {
18146		return nil, err
18147	}
18148	return ret, nil
18149	// {
18150	//   "description": "Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings.",
18151	//   "httpMethod": "PUT",
18152	//   "id": "youtube.liveStreams.update",
18153	//   "parameterOrder": [
18154	//     "part"
18155	//   ],
18156	//   "parameters": {
18157	//     "onBehalfOfContentOwner": {
18158	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
18159	//       "location": "query",
18160	//       "type": "string"
18161	//     },
18162	//     "onBehalfOfContentOwnerChannel": {
18163	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
18164	//       "location": "query",
18165	//       "type": "string"
18166	//     },
18167	//     "part": {
18168	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nThe part properties that you can include in the parameter value are id, snippet, cdn, and status.\n\nNote that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. If the request body does not specify a value for a mutable property, the existing value for that property will be removed.",
18169	//       "location": "query",
18170	//       "required": true,
18171	//       "type": "string"
18172	//     }
18173	//   },
18174	//   "path": "liveStreams",
18175	//   "request": {
18176	//     "$ref": "LiveStream"
18177	//   },
18178	//   "response": {
18179	//     "$ref": "LiveStream"
18180	//   },
18181	//   "scopes": [
18182	//     "https://www.googleapis.com/auth/youtube",
18183	//     "https://www.googleapis.com/auth/youtube.force-ssl"
18184	//   ]
18185	// }
18186
18187}
18188
18189// method id "youtube.playlistItems.delete":
18190
18191type PlaylistItemsDeleteCall struct {
18192	s          *Service
18193	urlParams_ gensupport.URLParams
18194	ctx_       context.Context
18195	header_    http.Header
18196}
18197
18198// Delete: Deletes a playlist item.
18199func (r *PlaylistItemsService) Delete(id string) *PlaylistItemsDeleteCall {
18200	c := &PlaylistItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18201	c.urlParams_.Set("id", id)
18202	return c
18203}
18204
18205// OnBehalfOfContentOwner sets the optional parameter
18206// "onBehalfOfContentOwner": Note: This parameter is intended
18207// exclusively for YouTube content partners.
18208//
18209// The onBehalfOfContentOwner parameter indicates that the request's
18210// authorization credentials identify a YouTube CMS user who is acting
18211// on behalf of the content owner specified in the parameter value. This
18212// parameter is intended for YouTube content partners that own and
18213// manage many different YouTube channels. It allows content owners to
18214// authenticate once and get access to all their video and channel data,
18215// without having to provide authentication credentials for each
18216// individual channel. The CMS account that the user authenticates with
18217// must be linked to the specified YouTube content owner.
18218func (c *PlaylistItemsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsDeleteCall {
18219	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18220	return c
18221}
18222
18223// Fields allows partial responses to be retrieved. See
18224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18225// for more information.
18226func (c *PlaylistItemsDeleteCall) Fields(s ...googleapi.Field) *PlaylistItemsDeleteCall {
18227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18228	return c
18229}
18230
18231// Context sets the context to be used in this call's Do method. Any
18232// pending HTTP request will be aborted if the provided context is
18233// canceled.
18234func (c *PlaylistItemsDeleteCall) Context(ctx context.Context) *PlaylistItemsDeleteCall {
18235	c.ctx_ = ctx
18236	return c
18237}
18238
18239// Header returns an http.Header that can be modified by the caller to
18240// add HTTP headers to the request.
18241func (c *PlaylistItemsDeleteCall) Header() http.Header {
18242	if c.header_ == nil {
18243		c.header_ = make(http.Header)
18244	}
18245	return c.header_
18246}
18247
18248func (c *PlaylistItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
18249	reqHeaders := make(http.Header)
18250	for k, v := range c.header_ {
18251		reqHeaders[k] = v
18252	}
18253	reqHeaders.Set("User-Agent", c.s.userAgent())
18254	var body io.Reader = nil
18255	c.urlParams_.Set("alt", alt)
18256	c.urlParams_.Set("prettyPrint", "false")
18257	urls := googleapi.ResolveRelative(c.s.BasePath, "playlistItems")
18258	urls += "?" + c.urlParams_.Encode()
18259	req, err := http.NewRequest("DELETE", urls, body)
18260	if err != nil {
18261		return nil, err
18262	}
18263	req.Header = reqHeaders
18264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18265}
18266
18267// Do executes the "youtube.playlistItems.delete" call.
18268func (c *PlaylistItemsDeleteCall) Do(opts ...googleapi.CallOption) error {
18269	gensupport.SetOptions(c.urlParams_, opts...)
18270	res, err := c.doRequest("json")
18271	if err != nil {
18272		return err
18273	}
18274	defer googleapi.CloseBody(res)
18275	if err := googleapi.CheckResponse(res); err != nil {
18276		return err
18277	}
18278	return nil
18279	// {
18280	//   "description": "Deletes a playlist item.",
18281	//   "httpMethod": "DELETE",
18282	//   "id": "youtube.playlistItems.delete",
18283	//   "parameterOrder": [
18284	//     "id"
18285	//   ],
18286	//   "parameters": {
18287	//     "id": {
18288	//       "description": "The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID.",
18289	//       "location": "query",
18290	//       "required": true,
18291	//       "type": "string"
18292	//     },
18293	//     "onBehalfOfContentOwner": {
18294	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
18295	//       "location": "query",
18296	//       "type": "string"
18297	//     }
18298	//   },
18299	//   "path": "playlistItems",
18300	//   "scopes": [
18301	//     "https://www.googleapis.com/auth/youtube",
18302	//     "https://www.googleapis.com/auth/youtube.force-ssl",
18303	//     "https://www.googleapis.com/auth/youtubepartner"
18304	//   ]
18305	// }
18306
18307}
18308
18309// method id "youtube.playlistItems.insert":
18310
18311type PlaylistItemsInsertCall struct {
18312	s            *Service
18313	playlistitem *PlaylistItem
18314	urlParams_   gensupport.URLParams
18315	ctx_         context.Context
18316	header_      http.Header
18317}
18318
18319// Insert: Adds a resource to a playlist.
18320func (r *PlaylistItemsService) Insert(part string, playlistitem *PlaylistItem) *PlaylistItemsInsertCall {
18321	c := &PlaylistItemsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18322	c.urlParams_.Set("part", part)
18323	c.playlistitem = playlistitem
18324	return c
18325}
18326
18327// OnBehalfOfContentOwner sets the optional parameter
18328// "onBehalfOfContentOwner": Note: This parameter is intended
18329// exclusively for YouTube content partners.
18330//
18331// The onBehalfOfContentOwner parameter indicates that the request's
18332// authorization credentials identify a YouTube CMS user who is acting
18333// on behalf of the content owner specified in the parameter value. This
18334// parameter is intended for YouTube content partners that own and
18335// manage many different YouTube channels. It allows content owners to
18336// authenticate once and get access to all their video and channel data,
18337// without having to provide authentication credentials for each
18338// individual channel. The CMS account that the user authenticates with
18339// must be linked to the specified YouTube content owner.
18340func (c *PlaylistItemsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsInsertCall {
18341	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18342	return c
18343}
18344
18345// Fields allows partial responses to be retrieved. See
18346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18347// for more information.
18348func (c *PlaylistItemsInsertCall) Fields(s ...googleapi.Field) *PlaylistItemsInsertCall {
18349	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18350	return c
18351}
18352
18353// Context sets the context to be used in this call's Do method. Any
18354// pending HTTP request will be aborted if the provided context is
18355// canceled.
18356func (c *PlaylistItemsInsertCall) Context(ctx context.Context) *PlaylistItemsInsertCall {
18357	c.ctx_ = ctx
18358	return c
18359}
18360
18361// Header returns an http.Header that can be modified by the caller to
18362// add HTTP headers to the request.
18363func (c *PlaylistItemsInsertCall) Header() http.Header {
18364	if c.header_ == nil {
18365		c.header_ = make(http.Header)
18366	}
18367	return c.header_
18368}
18369
18370func (c *PlaylistItemsInsertCall) doRequest(alt string) (*http.Response, error) {
18371	reqHeaders := make(http.Header)
18372	for k, v := range c.header_ {
18373		reqHeaders[k] = v
18374	}
18375	reqHeaders.Set("User-Agent", c.s.userAgent())
18376	var body io.Reader = nil
18377	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
18378	if err != nil {
18379		return nil, err
18380	}
18381	reqHeaders.Set("Content-Type", "application/json")
18382	c.urlParams_.Set("alt", alt)
18383	c.urlParams_.Set("prettyPrint", "false")
18384	urls := googleapi.ResolveRelative(c.s.BasePath, "playlistItems")
18385	urls += "?" + c.urlParams_.Encode()
18386	req, err := http.NewRequest("POST", urls, body)
18387	if err != nil {
18388		return nil, err
18389	}
18390	req.Header = reqHeaders
18391	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18392}
18393
18394// Do executes the "youtube.playlistItems.insert" call.
18395// Exactly one of *PlaylistItem or error will be non-nil. Any non-2xx
18396// status code is an error. Response headers are in either
18397// *PlaylistItem.ServerResponse.Header or (if a response was returned at
18398// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18399// to check whether the returned error was because
18400// http.StatusNotModified was returned.
18401func (c *PlaylistItemsInsertCall) Do(opts ...googleapi.CallOption) (*PlaylistItem, error) {
18402	gensupport.SetOptions(c.urlParams_, opts...)
18403	res, err := c.doRequest("json")
18404	if res != nil && res.StatusCode == http.StatusNotModified {
18405		if res.Body != nil {
18406			res.Body.Close()
18407		}
18408		return nil, &googleapi.Error{
18409			Code:   res.StatusCode,
18410			Header: res.Header,
18411		}
18412	}
18413	if err != nil {
18414		return nil, err
18415	}
18416	defer googleapi.CloseBody(res)
18417	if err := googleapi.CheckResponse(res); err != nil {
18418		return nil, err
18419	}
18420	ret := &PlaylistItem{
18421		ServerResponse: googleapi.ServerResponse{
18422			Header:         res.Header,
18423			HTTPStatusCode: res.StatusCode,
18424		},
18425	}
18426	target := &ret
18427	if err := gensupport.DecodeResponse(target, res); err != nil {
18428		return nil, err
18429	}
18430	return ret, nil
18431	// {
18432	//   "description": "Adds a resource to a playlist.",
18433	//   "httpMethod": "POST",
18434	//   "id": "youtube.playlistItems.insert",
18435	//   "parameterOrder": [
18436	//     "part"
18437	//   ],
18438	//   "parameters": {
18439	//     "onBehalfOfContentOwner": {
18440	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
18441	//       "location": "query",
18442	//       "type": "string"
18443	//     },
18444	//     "part": {
18445	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.",
18446	//       "location": "query",
18447	//       "required": true,
18448	//       "type": "string"
18449	//     }
18450	//   },
18451	//   "path": "playlistItems",
18452	//   "request": {
18453	//     "$ref": "PlaylistItem"
18454	//   },
18455	//   "response": {
18456	//     "$ref": "PlaylistItem"
18457	//   },
18458	//   "scopes": [
18459	//     "https://www.googleapis.com/auth/youtube",
18460	//     "https://www.googleapis.com/auth/youtube.force-ssl",
18461	//     "https://www.googleapis.com/auth/youtubepartner"
18462	//   ]
18463	// }
18464
18465}
18466
18467// method id "youtube.playlistItems.list":
18468
18469type PlaylistItemsListCall struct {
18470	s            *Service
18471	urlParams_   gensupport.URLParams
18472	ifNoneMatch_ string
18473	ctx_         context.Context
18474	header_      http.Header
18475}
18476
18477// List: Returns a collection of playlist items that match the API
18478// request parameters. You can retrieve all of the playlist items in a
18479// specified playlist or retrieve one or more playlist items by their
18480// unique IDs.
18481func (r *PlaylistItemsService) List(part string) *PlaylistItemsListCall {
18482	c := &PlaylistItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18483	c.urlParams_.Set("part", part)
18484	return c
18485}
18486
18487// Id sets the optional parameter "id": The id parameter specifies a
18488// comma-separated list of one or more unique playlist item IDs.
18489func (c *PlaylistItemsListCall) Id(id string) *PlaylistItemsListCall {
18490	c.urlParams_.Set("id", id)
18491	return c
18492}
18493
18494// MaxResults sets the optional parameter "maxResults": The maxResults
18495// parameter specifies the maximum number of items that should be
18496// returned in the result set.
18497func (c *PlaylistItemsListCall) MaxResults(maxResults int64) *PlaylistItemsListCall {
18498	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18499	return c
18500}
18501
18502// OnBehalfOfContentOwner sets the optional parameter
18503// "onBehalfOfContentOwner": Note: This parameter is intended
18504// exclusively for YouTube content partners.
18505//
18506// The onBehalfOfContentOwner parameter indicates that the request's
18507// authorization credentials identify a YouTube CMS user who is acting
18508// on behalf of the content owner specified in the parameter value. This
18509// parameter is intended for YouTube content partners that own and
18510// manage many different YouTube channels. It allows content owners to
18511// authenticate once and get access to all their video and channel data,
18512// without having to provide authentication credentials for each
18513// individual channel. The CMS account that the user authenticates with
18514// must be linked to the specified YouTube content owner.
18515func (c *PlaylistItemsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsListCall {
18516	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18517	return c
18518}
18519
18520// PageToken sets the optional parameter "pageToken": The pageToken
18521// parameter identifies a specific page in the result set that should be
18522// returned. In an API response, the nextPageToken and prevPageToken
18523// properties identify other pages that could be retrieved.
18524func (c *PlaylistItemsListCall) PageToken(pageToken string) *PlaylistItemsListCall {
18525	c.urlParams_.Set("pageToken", pageToken)
18526	return c
18527}
18528
18529// PlaylistId sets the optional parameter "playlistId": The playlistId
18530// parameter specifies the unique ID of the playlist for which you want
18531// to retrieve playlist items. Note that even though this is an optional
18532// parameter, every request to retrieve playlist items must specify a
18533// value for either the id parameter or the playlistId parameter.
18534func (c *PlaylistItemsListCall) PlaylistId(playlistId string) *PlaylistItemsListCall {
18535	c.urlParams_.Set("playlistId", playlistId)
18536	return c
18537}
18538
18539// VideoId sets the optional parameter "videoId": The videoId parameter
18540// specifies that the request should return only the playlist items that
18541// contain the specified video.
18542func (c *PlaylistItemsListCall) VideoId(videoId string) *PlaylistItemsListCall {
18543	c.urlParams_.Set("videoId", videoId)
18544	return c
18545}
18546
18547// Fields allows partial responses to be retrieved. See
18548// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18549// for more information.
18550func (c *PlaylistItemsListCall) Fields(s ...googleapi.Field) *PlaylistItemsListCall {
18551	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18552	return c
18553}
18554
18555// IfNoneMatch sets the optional parameter which makes the operation
18556// fail if the object's ETag matches the given value. This is useful for
18557// getting updates only after the object has changed since the last
18558// request. Use googleapi.IsNotModified to check whether the response
18559// error from Do is the result of In-None-Match.
18560func (c *PlaylistItemsListCall) IfNoneMatch(entityTag string) *PlaylistItemsListCall {
18561	c.ifNoneMatch_ = entityTag
18562	return c
18563}
18564
18565// Context sets the context to be used in this call's Do method. Any
18566// pending HTTP request will be aborted if the provided context is
18567// canceled.
18568func (c *PlaylistItemsListCall) Context(ctx context.Context) *PlaylistItemsListCall {
18569	c.ctx_ = ctx
18570	return c
18571}
18572
18573// Header returns an http.Header that can be modified by the caller to
18574// add HTTP headers to the request.
18575func (c *PlaylistItemsListCall) Header() http.Header {
18576	if c.header_ == nil {
18577		c.header_ = make(http.Header)
18578	}
18579	return c.header_
18580}
18581
18582func (c *PlaylistItemsListCall) doRequest(alt string) (*http.Response, error) {
18583	reqHeaders := make(http.Header)
18584	for k, v := range c.header_ {
18585		reqHeaders[k] = v
18586	}
18587	reqHeaders.Set("User-Agent", c.s.userAgent())
18588	if c.ifNoneMatch_ != "" {
18589		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18590	}
18591	var body io.Reader = nil
18592	c.urlParams_.Set("alt", alt)
18593	c.urlParams_.Set("prettyPrint", "false")
18594	urls := googleapi.ResolveRelative(c.s.BasePath, "playlistItems")
18595	urls += "?" + c.urlParams_.Encode()
18596	req, err := http.NewRequest("GET", urls, body)
18597	if err != nil {
18598		return nil, err
18599	}
18600	req.Header = reqHeaders
18601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18602}
18603
18604// Do executes the "youtube.playlistItems.list" call.
18605// Exactly one of *PlaylistItemListResponse or error will be non-nil.
18606// Any non-2xx status code is an error. Response headers are in either
18607// *PlaylistItemListResponse.ServerResponse.Header or (if a response was
18608// returned at all) in error.(*googleapi.Error).Header. Use
18609// googleapi.IsNotModified to check whether the returned error was
18610// because http.StatusNotModified was returned.
18611func (c *PlaylistItemsListCall) Do(opts ...googleapi.CallOption) (*PlaylistItemListResponse, error) {
18612	gensupport.SetOptions(c.urlParams_, opts...)
18613	res, err := c.doRequest("json")
18614	if res != nil && res.StatusCode == http.StatusNotModified {
18615		if res.Body != nil {
18616			res.Body.Close()
18617		}
18618		return nil, &googleapi.Error{
18619			Code:   res.StatusCode,
18620			Header: res.Header,
18621		}
18622	}
18623	if err != nil {
18624		return nil, err
18625	}
18626	defer googleapi.CloseBody(res)
18627	if err := googleapi.CheckResponse(res); err != nil {
18628		return nil, err
18629	}
18630	ret := &PlaylistItemListResponse{
18631		ServerResponse: googleapi.ServerResponse{
18632			Header:         res.Header,
18633			HTTPStatusCode: res.StatusCode,
18634		},
18635	}
18636	target := &ret
18637	if err := gensupport.DecodeResponse(target, res); err != nil {
18638		return nil, err
18639	}
18640	return ret, nil
18641	// {
18642	//   "description": "Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.",
18643	//   "httpMethod": "GET",
18644	//   "id": "youtube.playlistItems.list",
18645	//   "parameterOrder": [
18646	//     "part"
18647	//   ],
18648	//   "parameters": {
18649	//     "id": {
18650	//       "description": "The id parameter specifies a comma-separated list of one or more unique playlist item IDs.",
18651	//       "location": "query",
18652	//       "type": "string"
18653	//     },
18654	//     "maxResults": {
18655	//       "default": "5",
18656	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
18657	//       "format": "uint32",
18658	//       "location": "query",
18659	//       "maximum": "50",
18660	//       "minimum": "0",
18661	//       "type": "integer"
18662	//     },
18663	//     "onBehalfOfContentOwner": {
18664	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
18665	//       "location": "query",
18666	//       "type": "string"
18667	//     },
18668	//     "pageToken": {
18669	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
18670	//       "location": "query",
18671	//       "type": "string"
18672	//     },
18673	//     "part": {
18674	//       "description": "The part parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties.",
18675	//       "location": "query",
18676	//       "required": true,
18677	//       "type": "string"
18678	//     },
18679	//     "playlistId": {
18680	//       "description": "The playlistId parameter specifies the unique ID of the playlist for which you want to retrieve playlist items. Note that even though this is an optional parameter, every request to retrieve playlist items must specify a value for either the id parameter or the playlistId parameter.",
18681	//       "location": "query",
18682	//       "type": "string"
18683	//     },
18684	//     "videoId": {
18685	//       "description": "The videoId parameter specifies that the request should return only the playlist items that contain the specified video.",
18686	//       "location": "query",
18687	//       "type": "string"
18688	//     }
18689	//   },
18690	//   "path": "playlistItems",
18691	//   "response": {
18692	//     "$ref": "PlaylistItemListResponse"
18693	//   },
18694	//   "scopes": [
18695	//     "https://www.googleapis.com/auth/youtube",
18696	//     "https://www.googleapis.com/auth/youtube.force-ssl",
18697	//     "https://www.googleapis.com/auth/youtube.readonly",
18698	//     "https://www.googleapis.com/auth/youtubepartner"
18699	//   ],
18700	//   "supportsSubscription": true
18701	// }
18702
18703}
18704
18705// Pages invokes f for each page of results.
18706// A non-nil error returned from f will halt the iteration.
18707// The provided context supersedes any context provided to the Context method.
18708func (c *PlaylistItemsListCall) Pages(ctx context.Context, f func(*PlaylistItemListResponse) error) error {
18709	c.ctx_ = ctx
18710	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18711	for {
18712		x, err := c.Do()
18713		if err != nil {
18714			return err
18715		}
18716		if err := f(x); err != nil {
18717			return err
18718		}
18719		if x.NextPageToken == "" {
18720			return nil
18721		}
18722		c.PageToken(x.NextPageToken)
18723	}
18724}
18725
18726// method id "youtube.playlistItems.update":
18727
18728type PlaylistItemsUpdateCall struct {
18729	s            *Service
18730	playlistitem *PlaylistItem
18731	urlParams_   gensupport.URLParams
18732	ctx_         context.Context
18733	header_      http.Header
18734}
18735
18736// Update: Modifies a playlist item. For example, you could update the
18737// item's position in the playlist.
18738func (r *PlaylistItemsService) Update(part string, playlistitem *PlaylistItem) *PlaylistItemsUpdateCall {
18739	c := &PlaylistItemsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18740	c.urlParams_.Set("part", part)
18741	c.playlistitem = playlistitem
18742	return c
18743}
18744
18745// OnBehalfOfContentOwner sets the optional parameter
18746// "onBehalfOfContentOwner": Note: This parameter is intended
18747// exclusively for YouTube content partners.
18748//
18749// The onBehalfOfContentOwner parameter indicates that the request's
18750// authorization credentials identify a YouTube CMS user who is acting
18751// on behalf of the content owner specified in the parameter value. This
18752// parameter is intended for YouTube content partners that own and
18753// manage many different YouTube channels. It allows content owners to
18754// authenticate once and get access to all their video and channel data,
18755// without having to provide authentication credentials for each
18756// individual channel. The CMS account that the user authenticates with
18757// must be linked to the specified YouTube content owner.
18758func (c *PlaylistItemsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsUpdateCall {
18759	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18760	return c
18761}
18762
18763// Fields allows partial responses to be retrieved. See
18764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18765// for more information.
18766func (c *PlaylistItemsUpdateCall) Fields(s ...googleapi.Field) *PlaylistItemsUpdateCall {
18767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18768	return c
18769}
18770
18771// Context sets the context to be used in this call's Do method. Any
18772// pending HTTP request will be aborted if the provided context is
18773// canceled.
18774func (c *PlaylistItemsUpdateCall) Context(ctx context.Context) *PlaylistItemsUpdateCall {
18775	c.ctx_ = ctx
18776	return c
18777}
18778
18779// Header returns an http.Header that can be modified by the caller to
18780// add HTTP headers to the request.
18781func (c *PlaylistItemsUpdateCall) Header() http.Header {
18782	if c.header_ == nil {
18783		c.header_ = make(http.Header)
18784	}
18785	return c.header_
18786}
18787
18788func (c *PlaylistItemsUpdateCall) doRequest(alt string) (*http.Response, error) {
18789	reqHeaders := make(http.Header)
18790	for k, v := range c.header_ {
18791		reqHeaders[k] = v
18792	}
18793	reqHeaders.Set("User-Agent", c.s.userAgent())
18794	var body io.Reader = nil
18795	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
18796	if err != nil {
18797		return nil, err
18798	}
18799	reqHeaders.Set("Content-Type", "application/json")
18800	c.urlParams_.Set("alt", alt)
18801	c.urlParams_.Set("prettyPrint", "false")
18802	urls := googleapi.ResolveRelative(c.s.BasePath, "playlistItems")
18803	urls += "?" + c.urlParams_.Encode()
18804	req, err := http.NewRequest("PUT", urls, body)
18805	if err != nil {
18806		return nil, err
18807	}
18808	req.Header = reqHeaders
18809	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18810}
18811
18812// Do executes the "youtube.playlistItems.update" call.
18813// Exactly one of *PlaylistItem or error will be non-nil. Any non-2xx
18814// status code is an error. Response headers are in either
18815// *PlaylistItem.ServerResponse.Header or (if a response was returned at
18816// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18817// to check whether the returned error was because
18818// http.StatusNotModified was returned.
18819func (c *PlaylistItemsUpdateCall) Do(opts ...googleapi.CallOption) (*PlaylistItem, error) {
18820	gensupport.SetOptions(c.urlParams_, opts...)
18821	res, err := c.doRequest("json")
18822	if res != nil && res.StatusCode == http.StatusNotModified {
18823		if res.Body != nil {
18824			res.Body.Close()
18825		}
18826		return nil, &googleapi.Error{
18827			Code:   res.StatusCode,
18828			Header: res.Header,
18829		}
18830	}
18831	if err != nil {
18832		return nil, err
18833	}
18834	defer googleapi.CloseBody(res)
18835	if err := googleapi.CheckResponse(res); err != nil {
18836		return nil, err
18837	}
18838	ret := &PlaylistItem{
18839		ServerResponse: googleapi.ServerResponse{
18840			Header:         res.Header,
18841			HTTPStatusCode: res.StatusCode,
18842		},
18843	}
18844	target := &ret
18845	if err := gensupport.DecodeResponse(target, res); err != nil {
18846		return nil, err
18847	}
18848	return ret, nil
18849	// {
18850	//   "description": "Modifies a playlist item. For example, you could update the item's position in the playlist.",
18851	//   "httpMethod": "PUT",
18852	//   "id": "youtube.playlistItems.update",
18853	//   "parameterOrder": [
18854	//     "part"
18855	//   ],
18856	//   "parameters": {
18857	//     "onBehalfOfContentOwner": {
18858	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
18859	//       "location": "query",
18860	//       "type": "string"
18861	//     },
18862	//     "part": {
18863	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nNote that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist item can specify a start time and end time, which identify the times portion of the video that should play when users watch the video in the playlist. If your request is updating a playlist item that sets these values, and the request's part parameter value includes the contentDetails part, the playlist item's start and end times will be updated to whatever value the request body specifies. If the request body does not specify values, the existing start and end times will be removed and replaced with the default settings.",
18864	//       "location": "query",
18865	//       "required": true,
18866	//       "type": "string"
18867	//     }
18868	//   },
18869	//   "path": "playlistItems",
18870	//   "request": {
18871	//     "$ref": "PlaylistItem"
18872	//   },
18873	//   "response": {
18874	//     "$ref": "PlaylistItem"
18875	//   },
18876	//   "scopes": [
18877	//     "https://www.googleapis.com/auth/youtube",
18878	//     "https://www.googleapis.com/auth/youtube.force-ssl",
18879	//     "https://www.googleapis.com/auth/youtubepartner"
18880	//   ]
18881	// }
18882
18883}
18884
18885// method id "youtube.playlists.delete":
18886
18887type PlaylistsDeleteCall struct {
18888	s          *Service
18889	urlParams_ gensupport.URLParams
18890	ctx_       context.Context
18891	header_    http.Header
18892}
18893
18894// Delete: Deletes a playlist.
18895func (r *PlaylistsService) Delete(id string) *PlaylistsDeleteCall {
18896	c := &PlaylistsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18897	c.urlParams_.Set("id", id)
18898	return c
18899}
18900
18901// OnBehalfOfContentOwner sets the optional parameter
18902// "onBehalfOfContentOwner": Note: This parameter is intended
18903// exclusively for YouTube content partners.
18904//
18905// The onBehalfOfContentOwner parameter indicates that the request's
18906// authorization credentials identify a YouTube CMS user who is acting
18907// on behalf of the content owner specified in the parameter value. This
18908// parameter is intended for YouTube content partners that own and
18909// manage many different YouTube channels. It allows content owners to
18910// authenticate once and get access to all their video and channel data,
18911// without having to provide authentication credentials for each
18912// individual channel. The CMS account that the user authenticates with
18913// must be linked to the specified YouTube content owner.
18914func (c *PlaylistsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsDeleteCall {
18915	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
18916	return c
18917}
18918
18919// Fields allows partial responses to be retrieved. See
18920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18921// for more information.
18922func (c *PlaylistsDeleteCall) Fields(s ...googleapi.Field) *PlaylistsDeleteCall {
18923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18924	return c
18925}
18926
18927// Context sets the context to be used in this call's Do method. Any
18928// pending HTTP request will be aborted if the provided context is
18929// canceled.
18930func (c *PlaylistsDeleteCall) Context(ctx context.Context) *PlaylistsDeleteCall {
18931	c.ctx_ = ctx
18932	return c
18933}
18934
18935// Header returns an http.Header that can be modified by the caller to
18936// add HTTP headers to the request.
18937func (c *PlaylistsDeleteCall) Header() http.Header {
18938	if c.header_ == nil {
18939		c.header_ = make(http.Header)
18940	}
18941	return c.header_
18942}
18943
18944func (c *PlaylistsDeleteCall) doRequest(alt string) (*http.Response, error) {
18945	reqHeaders := make(http.Header)
18946	for k, v := range c.header_ {
18947		reqHeaders[k] = v
18948	}
18949	reqHeaders.Set("User-Agent", c.s.userAgent())
18950	var body io.Reader = nil
18951	c.urlParams_.Set("alt", alt)
18952	c.urlParams_.Set("prettyPrint", "false")
18953	urls := googleapi.ResolveRelative(c.s.BasePath, "playlists")
18954	urls += "?" + c.urlParams_.Encode()
18955	req, err := http.NewRequest("DELETE", urls, body)
18956	if err != nil {
18957		return nil, err
18958	}
18959	req.Header = reqHeaders
18960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18961}
18962
18963// Do executes the "youtube.playlists.delete" call.
18964func (c *PlaylistsDeleteCall) Do(opts ...googleapi.CallOption) error {
18965	gensupport.SetOptions(c.urlParams_, opts...)
18966	res, err := c.doRequest("json")
18967	if err != nil {
18968		return err
18969	}
18970	defer googleapi.CloseBody(res)
18971	if err := googleapi.CheckResponse(res); err != nil {
18972		return err
18973	}
18974	return nil
18975	// {
18976	//   "description": "Deletes a playlist.",
18977	//   "httpMethod": "DELETE",
18978	//   "id": "youtube.playlists.delete",
18979	//   "parameterOrder": [
18980	//     "id"
18981	//   ],
18982	//   "parameters": {
18983	//     "id": {
18984	//       "description": "The id parameter specifies the YouTube playlist ID for the playlist that is being deleted. In a playlist resource, the id property specifies the playlist's ID.",
18985	//       "location": "query",
18986	//       "required": true,
18987	//       "type": "string"
18988	//     },
18989	//     "onBehalfOfContentOwner": {
18990	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
18991	//       "location": "query",
18992	//       "type": "string"
18993	//     }
18994	//   },
18995	//   "path": "playlists",
18996	//   "scopes": [
18997	//     "https://www.googleapis.com/auth/youtube",
18998	//     "https://www.googleapis.com/auth/youtube.force-ssl",
18999	//     "https://www.googleapis.com/auth/youtubepartner"
19000	//   ]
19001	// }
19002
19003}
19004
19005// method id "youtube.playlists.insert":
19006
19007type PlaylistsInsertCall struct {
19008	s          *Service
19009	playlist   *Playlist
19010	urlParams_ gensupport.URLParams
19011	ctx_       context.Context
19012	header_    http.Header
19013}
19014
19015// Insert: Creates a playlist.
19016func (r *PlaylistsService) Insert(part string, playlist *Playlist) *PlaylistsInsertCall {
19017	c := &PlaylistsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19018	c.urlParams_.Set("part", part)
19019	c.playlist = playlist
19020	return c
19021}
19022
19023// OnBehalfOfContentOwner sets the optional parameter
19024// "onBehalfOfContentOwner": Note: This parameter is intended
19025// exclusively for YouTube content partners.
19026//
19027// The onBehalfOfContentOwner parameter indicates that the request's
19028// authorization credentials identify a YouTube CMS user who is acting
19029// on behalf of the content owner specified in the parameter value. This
19030// parameter is intended for YouTube content partners that own and
19031// manage many different YouTube channels. It allows content owners to
19032// authenticate once and get access to all their video and channel data,
19033// without having to provide authentication credentials for each
19034// individual channel. The CMS account that the user authenticates with
19035// must be linked to the specified YouTube content owner.
19036func (c *PlaylistsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsInsertCall {
19037	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19038	return c
19039}
19040
19041// OnBehalfOfContentOwnerChannel sets the optional parameter
19042// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
19043// properly authorized request. Note: This parameter is intended
19044// exclusively for YouTube content partners.
19045//
19046// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
19047// channel ID of the channel to which a video is being added. This
19048// parameter is required when a request specifies a value for the
19049// onBehalfOfContentOwner parameter, and it can only be used in
19050// conjunction with that parameter. In addition, the request must be
19051// authorized using a CMS account that is linked to the content owner
19052// that the onBehalfOfContentOwner parameter specifies. Finally, the
19053// channel that the onBehalfOfContentOwnerChannel parameter value
19054// specifies must be linked to the content owner that the
19055// onBehalfOfContentOwner parameter specifies.
19056//
19057// This parameter is intended for YouTube content partners that own and
19058// manage many different YouTube channels. It allows content owners to
19059// authenticate once and perform actions on behalf of the channel
19060// specified in the parameter value, without having to provide
19061// authentication credentials for each separate channel.
19062func (c *PlaylistsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistsInsertCall {
19063	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
19064	return c
19065}
19066
19067// Fields allows partial responses to be retrieved. See
19068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19069// for more information.
19070func (c *PlaylistsInsertCall) Fields(s ...googleapi.Field) *PlaylistsInsertCall {
19071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19072	return c
19073}
19074
19075// Context sets the context to be used in this call's Do method. Any
19076// pending HTTP request will be aborted if the provided context is
19077// canceled.
19078func (c *PlaylistsInsertCall) Context(ctx context.Context) *PlaylistsInsertCall {
19079	c.ctx_ = ctx
19080	return c
19081}
19082
19083// Header returns an http.Header that can be modified by the caller to
19084// add HTTP headers to the request.
19085func (c *PlaylistsInsertCall) Header() http.Header {
19086	if c.header_ == nil {
19087		c.header_ = make(http.Header)
19088	}
19089	return c.header_
19090}
19091
19092func (c *PlaylistsInsertCall) doRequest(alt string) (*http.Response, error) {
19093	reqHeaders := make(http.Header)
19094	for k, v := range c.header_ {
19095		reqHeaders[k] = v
19096	}
19097	reqHeaders.Set("User-Agent", c.s.userAgent())
19098	var body io.Reader = nil
19099	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
19100	if err != nil {
19101		return nil, err
19102	}
19103	reqHeaders.Set("Content-Type", "application/json")
19104	c.urlParams_.Set("alt", alt)
19105	c.urlParams_.Set("prettyPrint", "false")
19106	urls := googleapi.ResolveRelative(c.s.BasePath, "playlists")
19107	urls += "?" + c.urlParams_.Encode()
19108	req, err := http.NewRequest("POST", urls, body)
19109	if err != nil {
19110		return nil, err
19111	}
19112	req.Header = reqHeaders
19113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19114}
19115
19116// Do executes the "youtube.playlists.insert" call.
19117// Exactly one of *Playlist or error will be non-nil. Any non-2xx status
19118// code is an error. Response headers are in either
19119// *Playlist.ServerResponse.Header or (if a response was returned at
19120// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19121// to check whether the returned error was because
19122// http.StatusNotModified was returned.
19123func (c *PlaylistsInsertCall) Do(opts ...googleapi.CallOption) (*Playlist, error) {
19124	gensupport.SetOptions(c.urlParams_, opts...)
19125	res, err := c.doRequest("json")
19126	if res != nil && res.StatusCode == http.StatusNotModified {
19127		if res.Body != nil {
19128			res.Body.Close()
19129		}
19130		return nil, &googleapi.Error{
19131			Code:   res.StatusCode,
19132			Header: res.Header,
19133		}
19134	}
19135	if err != nil {
19136		return nil, err
19137	}
19138	defer googleapi.CloseBody(res)
19139	if err := googleapi.CheckResponse(res); err != nil {
19140		return nil, err
19141	}
19142	ret := &Playlist{
19143		ServerResponse: googleapi.ServerResponse{
19144			Header:         res.Header,
19145			HTTPStatusCode: res.StatusCode,
19146		},
19147	}
19148	target := &ret
19149	if err := gensupport.DecodeResponse(target, res); err != nil {
19150		return nil, err
19151	}
19152	return ret, nil
19153	// {
19154	//   "description": "Creates a playlist.",
19155	//   "httpMethod": "POST",
19156	//   "id": "youtube.playlists.insert",
19157	//   "parameterOrder": [
19158	//     "part"
19159	//   ],
19160	//   "parameters": {
19161	//     "onBehalfOfContentOwner": {
19162	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
19163	//       "location": "query",
19164	//       "type": "string"
19165	//     },
19166	//     "onBehalfOfContentOwnerChannel": {
19167	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
19168	//       "location": "query",
19169	//       "type": "string"
19170	//     },
19171	//     "part": {
19172	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.",
19173	//       "location": "query",
19174	//       "required": true,
19175	//       "type": "string"
19176	//     }
19177	//   },
19178	//   "path": "playlists",
19179	//   "request": {
19180	//     "$ref": "Playlist"
19181	//   },
19182	//   "response": {
19183	//     "$ref": "Playlist"
19184	//   },
19185	//   "scopes": [
19186	//     "https://www.googleapis.com/auth/youtube",
19187	//     "https://www.googleapis.com/auth/youtube.force-ssl",
19188	//     "https://www.googleapis.com/auth/youtubepartner"
19189	//   ]
19190	// }
19191
19192}
19193
19194// method id "youtube.playlists.list":
19195
19196type PlaylistsListCall struct {
19197	s            *Service
19198	urlParams_   gensupport.URLParams
19199	ifNoneMatch_ string
19200	ctx_         context.Context
19201	header_      http.Header
19202}
19203
19204// List: Returns a collection of playlists that match the API request
19205// parameters. For example, you can retrieve all playlists that the
19206// authenticated user owns, or you can retrieve one or more playlists by
19207// their unique IDs.
19208func (r *PlaylistsService) List(part string) *PlaylistsListCall {
19209	c := &PlaylistsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19210	c.urlParams_.Set("part", part)
19211	return c
19212}
19213
19214// ChannelId sets the optional parameter "channelId": This value
19215// indicates that the API should only return the specified channel's
19216// playlists.
19217func (c *PlaylistsListCall) ChannelId(channelId string) *PlaylistsListCall {
19218	c.urlParams_.Set("channelId", channelId)
19219	return c
19220}
19221
19222// Hl sets the optional parameter "hl": The hl parameter should be used
19223// for filter out the properties that are not in the given language.
19224// Used for the snippet part.
19225func (c *PlaylistsListCall) Hl(hl string) *PlaylistsListCall {
19226	c.urlParams_.Set("hl", hl)
19227	return c
19228}
19229
19230// Id sets the optional parameter "id": The id parameter specifies a
19231// comma-separated list of the YouTube playlist ID(s) for the
19232// resource(s) that are being retrieved. In a playlist resource, the id
19233// property specifies the playlist's YouTube playlist ID.
19234func (c *PlaylistsListCall) Id(id string) *PlaylistsListCall {
19235	c.urlParams_.Set("id", id)
19236	return c
19237}
19238
19239// MaxResults sets the optional parameter "maxResults": The maxResults
19240// parameter specifies the maximum number of items that should be
19241// returned in the result set.
19242func (c *PlaylistsListCall) MaxResults(maxResults int64) *PlaylistsListCall {
19243	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19244	return c
19245}
19246
19247// Mine sets the optional parameter "mine": Set this parameter's value
19248// to true to instruct the API to only return playlists owned by the
19249// authenticated user.
19250func (c *PlaylistsListCall) Mine(mine bool) *PlaylistsListCall {
19251	c.urlParams_.Set("mine", fmt.Sprint(mine))
19252	return c
19253}
19254
19255// OnBehalfOfContentOwner sets the optional parameter
19256// "onBehalfOfContentOwner": Note: This parameter is intended
19257// exclusively for YouTube content partners.
19258//
19259// The onBehalfOfContentOwner parameter indicates that the request's
19260// authorization credentials identify a YouTube CMS user who is acting
19261// on behalf of the content owner specified in the parameter value. This
19262// parameter is intended for YouTube content partners that own and
19263// manage many different YouTube channels. It allows content owners to
19264// authenticate once and get access to all their video and channel data,
19265// without having to provide authentication credentials for each
19266// individual channel. The CMS account that the user authenticates with
19267// must be linked to the specified YouTube content owner.
19268func (c *PlaylistsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsListCall {
19269	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19270	return c
19271}
19272
19273// OnBehalfOfContentOwnerChannel sets the optional parameter
19274// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
19275// properly authorized request. Note: This parameter is intended
19276// exclusively for YouTube content partners.
19277//
19278// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
19279// channel ID of the channel to which a video is being added. This
19280// parameter is required when a request specifies a value for the
19281// onBehalfOfContentOwner parameter, and it can only be used in
19282// conjunction with that parameter. In addition, the request must be
19283// authorized using a CMS account that is linked to the content owner
19284// that the onBehalfOfContentOwner parameter specifies. Finally, the
19285// channel that the onBehalfOfContentOwnerChannel parameter value
19286// specifies must be linked to the content owner that the
19287// onBehalfOfContentOwner parameter specifies.
19288//
19289// This parameter is intended for YouTube content partners that own and
19290// manage many different YouTube channels. It allows content owners to
19291// authenticate once and perform actions on behalf of the channel
19292// specified in the parameter value, without having to provide
19293// authentication credentials for each separate channel.
19294func (c *PlaylistsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistsListCall {
19295	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
19296	return c
19297}
19298
19299// PageToken sets the optional parameter "pageToken": The pageToken
19300// parameter identifies a specific page in the result set that should be
19301// returned. In an API response, the nextPageToken and prevPageToken
19302// properties identify other pages that could be retrieved.
19303func (c *PlaylistsListCall) PageToken(pageToken string) *PlaylistsListCall {
19304	c.urlParams_.Set("pageToken", pageToken)
19305	return c
19306}
19307
19308// Fields allows partial responses to be retrieved. See
19309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19310// for more information.
19311func (c *PlaylistsListCall) Fields(s ...googleapi.Field) *PlaylistsListCall {
19312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19313	return c
19314}
19315
19316// IfNoneMatch sets the optional parameter which makes the operation
19317// fail if the object's ETag matches the given value. This is useful for
19318// getting updates only after the object has changed since the last
19319// request. Use googleapi.IsNotModified to check whether the response
19320// error from Do is the result of In-None-Match.
19321func (c *PlaylistsListCall) IfNoneMatch(entityTag string) *PlaylistsListCall {
19322	c.ifNoneMatch_ = entityTag
19323	return c
19324}
19325
19326// Context sets the context to be used in this call's Do method. Any
19327// pending HTTP request will be aborted if the provided context is
19328// canceled.
19329func (c *PlaylistsListCall) Context(ctx context.Context) *PlaylistsListCall {
19330	c.ctx_ = ctx
19331	return c
19332}
19333
19334// Header returns an http.Header that can be modified by the caller to
19335// add HTTP headers to the request.
19336func (c *PlaylistsListCall) Header() http.Header {
19337	if c.header_ == nil {
19338		c.header_ = make(http.Header)
19339	}
19340	return c.header_
19341}
19342
19343func (c *PlaylistsListCall) doRequest(alt string) (*http.Response, error) {
19344	reqHeaders := make(http.Header)
19345	for k, v := range c.header_ {
19346		reqHeaders[k] = v
19347	}
19348	reqHeaders.Set("User-Agent", c.s.userAgent())
19349	if c.ifNoneMatch_ != "" {
19350		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19351	}
19352	var body io.Reader = nil
19353	c.urlParams_.Set("alt", alt)
19354	c.urlParams_.Set("prettyPrint", "false")
19355	urls := googleapi.ResolveRelative(c.s.BasePath, "playlists")
19356	urls += "?" + c.urlParams_.Encode()
19357	req, err := http.NewRequest("GET", urls, body)
19358	if err != nil {
19359		return nil, err
19360	}
19361	req.Header = reqHeaders
19362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19363}
19364
19365// Do executes the "youtube.playlists.list" call.
19366// Exactly one of *PlaylistListResponse or error will be non-nil. Any
19367// non-2xx status code is an error. Response headers are in either
19368// *PlaylistListResponse.ServerResponse.Header or (if a response was
19369// returned at all) in error.(*googleapi.Error).Header. Use
19370// googleapi.IsNotModified to check whether the returned error was
19371// because http.StatusNotModified was returned.
19372func (c *PlaylistsListCall) Do(opts ...googleapi.CallOption) (*PlaylistListResponse, error) {
19373	gensupport.SetOptions(c.urlParams_, opts...)
19374	res, err := c.doRequest("json")
19375	if res != nil && res.StatusCode == http.StatusNotModified {
19376		if res.Body != nil {
19377			res.Body.Close()
19378		}
19379		return nil, &googleapi.Error{
19380			Code:   res.StatusCode,
19381			Header: res.Header,
19382		}
19383	}
19384	if err != nil {
19385		return nil, err
19386	}
19387	defer googleapi.CloseBody(res)
19388	if err := googleapi.CheckResponse(res); err != nil {
19389		return nil, err
19390	}
19391	ret := &PlaylistListResponse{
19392		ServerResponse: googleapi.ServerResponse{
19393			Header:         res.Header,
19394			HTTPStatusCode: res.StatusCode,
19395		},
19396	}
19397	target := &ret
19398	if err := gensupport.DecodeResponse(target, res); err != nil {
19399		return nil, err
19400	}
19401	return ret, nil
19402	// {
19403	//   "description": "Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.",
19404	//   "httpMethod": "GET",
19405	//   "id": "youtube.playlists.list",
19406	//   "parameterOrder": [
19407	//     "part"
19408	//   ],
19409	//   "parameters": {
19410	//     "channelId": {
19411	//       "description": "This value indicates that the API should only return the specified channel's playlists.",
19412	//       "location": "query",
19413	//       "type": "string"
19414	//     },
19415	//     "hl": {
19416	//       "description": "The hl parameter should be used for filter out the properties that are not in the given language. Used for the snippet part.",
19417	//       "location": "query",
19418	//       "type": "string"
19419	//     },
19420	//     "id": {
19421	//       "description": "The id parameter specifies a comma-separated list of the YouTube playlist ID(s) for the resource(s) that are being retrieved. In a playlist resource, the id property specifies the playlist's YouTube playlist ID.",
19422	//       "location": "query",
19423	//       "type": "string"
19424	//     },
19425	//     "maxResults": {
19426	//       "default": "5",
19427	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
19428	//       "format": "uint32",
19429	//       "location": "query",
19430	//       "maximum": "50",
19431	//       "minimum": "0",
19432	//       "type": "integer"
19433	//     },
19434	//     "mine": {
19435	//       "description": "Set this parameter's value to true to instruct the API to only return playlists owned by the authenticated user.",
19436	//       "location": "query",
19437	//       "type": "boolean"
19438	//     },
19439	//     "onBehalfOfContentOwner": {
19440	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
19441	//       "location": "query",
19442	//       "type": "string"
19443	//     },
19444	//     "onBehalfOfContentOwnerChannel": {
19445	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
19446	//       "location": "query",
19447	//       "type": "string"
19448	//     },
19449	//     "pageToken": {
19450	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
19451	//       "location": "query",
19452	//       "type": "string"
19453	//     },
19454	//     "part": {
19455	//       "description": "The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. As such, if you set part=snippet, the API response will contain all of those properties.",
19456	//       "location": "query",
19457	//       "required": true,
19458	//       "type": "string"
19459	//     }
19460	//   },
19461	//   "path": "playlists",
19462	//   "response": {
19463	//     "$ref": "PlaylistListResponse"
19464	//   },
19465	//   "scopes": [
19466	//     "https://www.googleapis.com/auth/youtube",
19467	//     "https://www.googleapis.com/auth/youtube.force-ssl",
19468	//     "https://www.googleapis.com/auth/youtube.readonly",
19469	//     "https://www.googleapis.com/auth/youtubepartner"
19470	//   ]
19471	// }
19472
19473}
19474
19475// Pages invokes f for each page of results.
19476// A non-nil error returned from f will halt the iteration.
19477// The provided context supersedes any context provided to the Context method.
19478func (c *PlaylistsListCall) Pages(ctx context.Context, f func(*PlaylistListResponse) error) error {
19479	c.ctx_ = ctx
19480	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19481	for {
19482		x, err := c.Do()
19483		if err != nil {
19484			return err
19485		}
19486		if err := f(x); err != nil {
19487			return err
19488		}
19489		if x.NextPageToken == "" {
19490			return nil
19491		}
19492		c.PageToken(x.NextPageToken)
19493	}
19494}
19495
19496// method id "youtube.playlists.update":
19497
19498type PlaylistsUpdateCall struct {
19499	s          *Service
19500	playlist   *Playlist
19501	urlParams_ gensupport.URLParams
19502	ctx_       context.Context
19503	header_    http.Header
19504}
19505
19506// Update: Modifies a playlist. For example, you could change a
19507// playlist's title, description, or privacy status.
19508func (r *PlaylistsService) Update(part string, playlist *Playlist) *PlaylistsUpdateCall {
19509	c := &PlaylistsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19510	c.urlParams_.Set("part", part)
19511	c.playlist = playlist
19512	return c
19513}
19514
19515// OnBehalfOfContentOwner sets the optional parameter
19516// "onBehalfOfContentOwner": Note: This parameter is intended
19517// exclusively for YouTube content partners.
19518//
19519// The onBehalfOfContentOwner parameter indicates that the request's
19520// authorization credentials identify a YouTube CMS user who is acting
19521// on behalf of the content owner specified in the parameter value. This
19522// parameter is intended for YouTube content partners that own and
19523// manage many different YouTube channels. It allows content owners to
19524// authenticate once and get access to all their video and channel data,
19525// without having to provide authentication credentials for each
19526// individual channel. The CMS account that the user authenticates with
19527// must be linked to the specified YouTube content owner.
19528func (c *PlaylistsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsUpdateCall {
19529	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19530	return c
19531}
19532
19533// Fields allows partial responses to be retrieved. See
19534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19535// for more information.
19536func (c *PlaylistsUpdateCall) Fields(s ...googleapi.Field) *PlaylistsUpdateCall {
19537	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19538	return c
19539}
19540
19541// Context sets the context to be used in this call's Do method. Any
19542// pending HTTP request will be aborted if the provided context is
19543// canceled.
19544func (c *PlaylistsUpdateCall) Context(ctx context.Context) *PlaylistsUpdateCall {
19545	c.ctx_ = ctx
19546	return c
19547}
19548
19549// Header returns an http.Header that can be modified by the caller to
19550// add HTTP headers to the request.
19551func (c *PlaylistsUpdateCall) Header() http.Header {
19552	if c.header_ == nil {
19553		c.header_ = make(http.Header)
19554	}
19555	return c.header_
19556}
19557
19558func (c *PlaylistsUpdateCall) doRequest(alt string) (*http.Response, error) {
19559	reqHeaders := make(http.Header)
19560	for k, v := range c.header_ {
19561		reqHeaders[k] = v
19562	}
19563	reqHeaders.Set("User-Agent", c.s.userAgent())
19564	var body io.Reader = nil
19565	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
19566	if err != nil {
19567		return nil, err
19568	}
19569	reqHeaders.Set("Content-Type", "application/json")
19570	c.urlParams_.Set("alt", alt)
19571	c.urlParams_.Set("prettyPrint", "false")
19572	urls := googleapi.ResolveRelative(c.s.BasePath, "playlists")
19573	urls += "?" + c.urlParams_.Encode()
19574	req, err := http.NewRequest("PUT", urls, body)
19575	if err != nil {
19576		return nil, err
19577	}
19578	req.Header = reqHeaders
19579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19580}
19581
19582// Do executes the "youtube.playlists.update" call.
19583// Exactly one of *Playlist or error will be non-nil. Any non-2xx status
19584// code is an error. Response headers are in either
19585// *Playlist.ServerResponse.Header or (if a response was returned at
19586// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19587// to check whether the returned error was because
19588// http.StatusNotModified was returned.
19589func (c *PlaylistsUpdateCall) Do(opts ...googleapi.CallOption) (*Playlist, error) {
19590	gensupport.SetOptions(c.urlParams_, opts...)
19591	res, err := c.doRequest("json")
19592	if res != nil && res.StatusCode == http.StatusNotModified {
19593		if res.Body != nil {
19594			res.Body.Close()
19595		}
19596		return nil, &googleapi.Error{
19597			Code:   res.StatusCode,
19598			Header: res.Header,
19599		}
19600	}
19601	if err != nil {
19602		return nil, err
19603	}
19604	defer googleapi.CloseBody(res)
19605	if err := googleapi.CheckResponse(res); err != nil {
19606		return nil, err
19607	}
19608	ret := &Playlist{
19609		ServerResponse: googleapi.ServerResponse{
19610			Header:         res.Header,
19611			HTTPStatusCode: res.StatusCode,
19612		},
19613	}
19614	target := &ret
19615	if err := gensupport.DecodeResponse(target, res); err != nil {
19616		return nil, err
19617	}
19618	return ret, nil
19619	// {
19620	//   "description": "Modifies a playlist. For example, you could change a playlist's title, description, or privacy status.",
19621	//   "httpMethod": "PUT",
19622	//   "id": "youtube.playlists.update",
19623	//   "parameterOrder": [
19624	//     "part"
19625	//   ],
19626	//   "parameters": {
19627	//     "onBehalfOfContentOwner": {
19628	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
19629	//       "location": "query",
19630	//       "type": "string"
19631	//     },
19632	//     "part": {
19633	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nNote that this method will override the existing values for mutable properties that are contained in any parts that the request body specifies. For example, a playlist's description is contained in the snippet part, which must be included in the request body. If the request does not specify a value for the snippet.description property, the playlist's existing description will be deleted.",
19634	//       "location": "query",
19635	//       "required": true,
19636	//       "type": "string"
19637	//     }
19638	//   },
19639	//   "path": "playlists",
19640	//   "request": {
19641	//     "$ref": "Playlist"
19642	//   },
19643	//   "response": {
19644	//     "$ref": "Playlist"
19645	//   },
19646	//   "scopes": [
19647	//     "https://www.googleapis.com/auth/youtube",
19648	//     "https://www.googleapis.com/auth/youtube.force-ssl",
19649	//     "https://www.googleapis.com/auth/youtubepartner"
19650	//   ]
19651	// }
19652
19653}
19654
19655// method id "youtube.search.list":
19656
19657type SearchListCall struct {
19658	s            *Service
19659	urlParams_   gensupport.URLParams
19660	ifNoneMatch_ string
19661	ctx_         context.Context
19662	header_      http.Header
19663}
19664
19665// List: Returns a collection of search results that match the query
19666// parameters specified in the API request. By default, a search result
19667// set identifies matching video, channel, and playlist resources, but
19668// you can also configure queries to only retrieve a specific type of
19669// resource.
19670func (r *SearchService) List(part string) *SearchListCall {
19671	c := &SearchListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19672	c.urlParams_.Set("part", part)
19673	return c
19674}
19675
19676// ChannelId sets the optional parameter "channelId": The channelId
19677// parameter indicates that the API response should only contain
19678// resources created by the channel
19679func (c *SearchListCall) ChannelId(channelId string) *SearchListCall {
19680	c.urlParams_.Set("channelId", channelId)
19681	return c
19682}
19683
19684// ChannelType sets the optional parameter "channelType": The
19685// channelType parameter lets you restrict a search to a particular type
19686// of channel.
19687//
19688// Possible values:
19689//   "any" - Return all channels.
19690//   "show" - Only retrieve shows.
19691func (c *SearchListCall) ChannelType(channelType string) *SearchListCall {
19692	c.urlParams_.Set("channelType", channelType)
19693	return c
19694}
19695
19696// EventType sets the optional parameter "eventType": The eventType
19697// parameter restricts a search to broadcast events. If you specify a
19698// value for this parameter, you must also set the type parameter's
19699// value to video.
19700//
19701// Possible values:
19702//   "completed" - Only include completed broadcasts.
19703//   "live" - Only include active broadcasts.
19704//   "upcoming" - Only include upcoming broadcasts.
19705func (c *SearchListCall) EventType(eventType string) *SearchListCall {
19706	c.urlParams_.Set("eventType", eventType)
19707	return c
19708}
19709
19710// ForContentOwner sets the optional parameter "forContentOwner": Note:
19711// This parameter is intended exclusively for YouTube content
19712// partners.
19713//
19714// The forContentOwner parameter restricts the search to only retrieve
19715// resources owned by the content owner specified by the
19716// onBehalfOfContentOwner parameter. The user must be authenticated
19717// using a CMS account linked to the specified content owner and
19718// onBehalfOfContentOwner must be provided.
19719func (c *SearchListCall) ForContentOwner(forContentOwner bool) *SearchListCall {
19720	c.urlParams_.Set("forContentOwner", fmt.Sprint(forContentOwner))
19721	return c
19722}
19723
19724// ForDeveloper sets the optional parameter "forDeveloper": The
19725// forDeveloper parameter restricts the search to only retrieve videos
19726// uploaded via the developer's application or website. The API server
19727// uses the request's authorization credentials to identify the
19728// developer. Therefore, a developer can restrict results to videos
19729// uploaded through the developer's own app or website but not to videos
19730// uploaded through other apps or sites.
19731func (c *SearchListCall) ForDeveloper(forDeveloper bool) *SearchListCall {
19732	c.urlParams_.Set("forDeveloper", fmt.Sprint(forDeveloper))
19733	return c
19734}
19735
19736// ForMine sets the optional parameter "forMine": The forMine parameter
19737// restricts the search to only retrieve videos owned by the
19738// authenticated user. If you set this parameter to true, then the type
19739// parameter's value must also be set to video.
19740func (c *SearchListCall) ForMine(forMine bool) *SearchListCall {
19741	c.urlParams_.Set("forMine", fmt.Sprint(forMine))
19742	return c
19743}
19744
19745// Location sets the optional parameter "location": The location
19746// parameter, in conjunction with the locationRadius parameter, defines
19747// a circular geographic area and also restricts a search to videos that
19748// specify, in their metadata, a geographic location that falls within
19749// that area. The parameter value is a string that specifies
19750// latitude/longitude coordinates e.g. (37.42307,-122.08427).
19751//
19752//
19753// - The location parameter value identifies the point at the center of
19754// the area.
19755// - The locationRadius parameter specifies the maximum distance that
19756// the location associated with a video can be from that point for the
19757// video to still be included in the search results.The API returns an
19758// error if your request specifies a value for the location parameter
19759// but does not also specify a value for the locationRadius parameter.
19760func (c *SearchListCall) Location(location string) *SearchListCall {
19761	c.urlParams_.Set("location", location)
19762	return c
19763}
19764
19765// LocationRadius sets the optional parameter "locationRadius": The
19766// locationRadius parameter, in conjunction with the location parameter,
19767// defines a circular geographic area.
19768//
19769// The parameter value must be a floating point number followed by a
19770// measurement unit. Valid measurement units are m, km, ft, and mi. For
19771// example, valid parameter values include 1500m, 5km, 10000ft, and
19772// 0.75mi. The API does not support locationRadius parameter values
19773// larger than 1000 kilometers.
19774//
19775// Note: See the definition of the location parameter for more
19776// information.
19777func (c *SearchListCall) LocationRadius(locationRadius string) *SearchListCall {
19778	c.urlParams_.Set("locationRadius", locationRadius)
19779	return c
19780}
19781
19782// MaxResults sets the optional parameter "maxResults": The maxResults
19783// parameter specifies the maximum number of items that should be
19784// returned in the result set.
19785func (c *SearchListCall) MaxResults(maxResults int64) *SearchListCall {
19786	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19787	return c
19788}
19789
19790// OnBehalfOfContentOwner sets the optional parameter
19791// "onBehalfOfContentOwner": Note: This parameter is intended
19792// exclusively for YouTube content partners.
19793//
19794// The onBehalfOfContentOwner parameter indicates that the request's
19795// authorization credentials identify a YouTube CMS user who is acting
19796// on behalf of the content owner specified in the parameter value. This
19797// parameter is intended for YouTube content partners that own and
19798// manage many different YouTube channels. It allows content owners to
19799// authenticate once and get access to all their video and channel data,
19800// without having to provide authentication credentials for each
19801// individual channel. The CMS account that the user authenticates with
19802// must be linked to the specified YouTube content owner.
19803func (c *SearchListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *SearchListCall {
19804	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
19805	return c
19806}
19807
19808// Order sets the optional parameter "order": The order parameter
19809// specifies the method that will be used to order resources in the API
19810// response.
19811//
19812// Possible values:
19813//   "date" - Resources are sorted in reverse chronological order based
19814// on the date they were created.
19815//   "rating" - Resources are sorted from highest to lowest rating.
19816//   "relevance" - Resources are sorted based on their relevance to the
19817// search query. This is the default value for this parameter.
19818//   "title" - Resources are sorted alphabetically by title.
19819//   "videoCount" - Channels are sorted in descending order of their
19820// number of uploaded videos.
19821//   "viewCount" - Resources are sorted from highest to lowest number of
19822// views.
19823func (c *SearchListCall) Order(order string) *SearchListCall {
19824	c.urlParams_.Set("order", order)
19825	return c
19826}
19827
19828// PageToken sets the optional parameter "pageToken": The pageToken
19829// parameter identifies a specific page in the result set that should be
19830// returned. In an API response, the nextPageToken and prevPageToken
19831// properties identify other pages that could be retrieved.
19832func (c *SearchListCall) PageToken(pageToken string) *SearchListCall {
19833	c.urlParams_.Set("pageToken", pageToken)
19834	return c
19835}
19836
19837// PublishedAfter sets the optional parameter "publishedAfter": The
19838// publishedAfter parameter indicates that the API response should only
19839// contain resources created after the specified time. The value is an
19840// RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
19841func (c *SearchListCall) PublishedAfter(publishedAfter string) *SearchListCall {
19842	c.urlParams_.Set("publishedAfter", publishedAfter)
19843	return c
19844}
19845
19846// PublishedBefore sets the optional parameter "publishedBefore": The
19847// publishedBefore parameter indicates that the API response should only
19848// contain resources created before the specified time. The value is an
19849// RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
19850func (c *SearchListCall) PublishedBefore(publishedBefore string) *SearchListCall {
19851	c.urlParams_.Set("publishedBefore", publishedBefore)
19852	return c
19853}
19854
19855// Q sets the optional parameter "q": The q parameter specifies the
19856// query term to search for.
19857//
19858// Your request can also use the Boolean NOT (-) and OR (|) operators to
19859// exclude videos or to find videos that are associated with one of
19860// several search terms. For example, to search for videos matching
19861// either "boating" or "sailing", set the q parameter value to
19862// boating|sailing. Similarly, to search for videos matching either
19863// "boating" or "sailing" but not "fishing", set the q parameter value
19864// to boating|sailing -fishing. Note that the pipe character must be
19865// URL-escaped when it is sent in your API request. The URL-escaped
19866// value for the pipe character is %7C.
19867func (c *SearchListCall) Q(q string) *SearchListCall {
19868	c.urlParams_.Set("q", q)
19869	return c
19870}
19871
19872// RegionCode sets the optional parameter "regionCode": The regionCode
19873// parameter instructs the API to return search results for the
19874// specified country. The parameter value is an ISO 3166-1 alpha-2
19875// country code.
19876func (c *SearchListCall) RegionCode(regionCode string) *SearchListCall {
19877	c.urlParams_.Set("regionCode", regionCode)
19878	return c
19879}
19880
19881// RelatedToVideoId sets the optional parameter "relatedToVideoId": The
19882// relatedToVideoId parameter retrieves a list of videos that are
19883// related to the video that the parameter value identifies. The
19884// parameter value must be set to a YouTube video ID and, if you are
19885// using this parameter, the type parameter must be set to video.
19886func (c *SearchListCall) RelatedToVideoId(relatedToVideoId string) *SearchListCall {
19887	c.urlParams_.Set("relatedToVideoId", relatedToVideoId)
19888	return c
19889}
19890
19891// RelevanceLanguage sets the optional parameter "relevanceLanguage":
19892// The relevanceLanguage parameter instructs the API to return search
19893// results that are most relevant to the specified language. The
19894// parameter value is typically an ISO 639-1 two-letter language code.
19895// However, you should use the values zh-Hans for simplified Chinese and
19896// zh-Hant for traditional Chinese. Please note that results in other
19897// languages will still be returned if they are highly relevant to the
19898// search query term.
19899func (c *SearchListCall) RelevanceLanguage(relevanceLanguage string) *SearchListCall {
19900	c.urlParams_.Set("relevanceLanguage", relevanceLanguage)
19901	return c
19902}
19903
19904// SafeSearch sets the optional parameter "safeSearch": The safeSearch
19905// parameter indicates whether the search results should include
19906// restricted content as well as standard content.
19907//
19908// Possible values:
19909//   "moderate" - YouTube will filter some content from search results
19910// and, at the least, will filter content that is restricted in your
19911// locale. Based on their content, search results could be removed from
19912// search results or demoted in search results. This is the default
19913// parameter value.
19914//   "none" - YouTube will not filter the search result set.
19915//   "strict" - YouTube will try to exclude all restricted content from
19916// the search result set. Based on their content, search results could
19917// be removed from search results or demoted in search results.
19918func (c *SearchListCall) SafeSearch(safeSearch string) *SearchListCall {
19919	c.urlParams_.Set("safeSearch", safeSearch)
19920	return c
19921}
19922
19923// TopicId sets the optional parameter "topicId": The topicId parameter
19924// indicates that the API response should only contain resources
19925// associated with the specified topic. The value identifies a Freebase
19926// topic ID.
19927func (c *SearchListCall) TopicId(topicId string) *SearchListCall {
19928	c.urlParams_.Set("topicId", topicId)
19929	return c
19930}
19931
19932// Type sets the optional parameter "type": The type parameter restricts
19933// a search query to only retrieve a particular type of resource. The
19934// value is a comma-separated list of resource types.
19935func (c *SearchListCall) Type(type_ string) *SearchListCall {
19936	c.urlParams_.Set("type", type_)
19937	return c
19938}
19939
19940// VideoCaption sets the optional parameter "videoCaption": The
19941// videoCaption parameter indicates whether the API should filter video
19942// search results based on whether they have captions. If you specify a
19943// value for this parameter, you must also set the type parameter's
19944// value to video.
19945//
19946// Possible values:
19947//   "any" - Do not filter results based on caption availability.
19948//   "closedCaption" - Only include videos that have captions.
19949//   "none" - Only include videos that do not have captions.
19950func (c *SearchListCall) VideoCaption(videoCaption string) *SearchListCall {
19951	c.urlParams_.Set("videoCaption", videoCaption)
19952	return c
19953}
19954
19955// VideoCategoryId sets the optional parameter "videoCategoryId": The
19956// videoCategoryId parameter filters video search results based on their
19957// category. If you specify a value for this parameter, you must also
19958// set the type parameter's value to video.
19959func (c *SearchListCall) VideoCategoryId(videoCategoryId string) *SearchListCall {
19960	c.urlParams_.Set("videoCategoryId", videoCategoryId)
19961	return c
19962}
19963
19964// VideoDefinition sets the optional parameter "videoDefinition": The
19965// videoDefinition parameter lets you restrict a search to only include
19966// either high definition (HD) or standard definition (SD) videos. HD
19967// videos are available for playback in at least 720p, though higher
19968// resolutions, like 1080p, might also be available. If you specify a
19969// value for this parameter, you must also set the type parameter's
19970// value to video.
19971//
19972// Possible values:
19973//   "any" - Return all videos, regardless of their resolution.
19974//   "high" - Only retrieve HD videos.
19975//   "standard" - Only retrieve videos in standard definition.
19976func (c *SearchListCall) VideoDefinition(videoDefinition string) *SearchListCall {
19977	c.urlParams_.Set("videoDefinition", videoDefinition)
19978	return c
19979}
19980
19981// VideoDimension sets the optional parameter "videoDimension": The
19982// videoDimension parameter lets you restrict a search to only retrieve
19983// 2D or 3D videos. If you specify a value for this parameter, you must
19984// also set the type parameter's value to video.
19985//
19986// Possible values:
19987//   "2d" - Restrict search results to exclude 3D videos.
19988//   "3d" - Restrict search results to only include 3D videos.
19989//   "any" - Include both 3D and non-3D videos in returned results. This
19990// is the default value.
19991func (c *SearchListCall) VideoDimension(videoDimension string) *SearchListCall {
19992	c.urlParams_.Set("videoDimension", videoDimension)
19993	return c
19994}
19995
19996// VideoDuration sets the optional parameter "videoDuration": The
19997// videoDuration parameter filters video search results based on their
19998// duration. If you specify a value for this parameter, you must also
19999// set the type parameter's value to video.
20000//
20001// Possible values:
20002//   "any" - Do not filter video search results based on their duration.
20003// This is the default value.
20004//   "long" - Only include videos longer than 20 minutes.
20005//   "medium" - Only include videos that are between four and 20 minutes
20006// long (inclusive).
20007//   "short" - Only include videos that are less than four minutes long.
20008func (c *SearchListCall) VideoDuration(videoDuration string) *SearchListCall {
20009	c.urlParams_.Set("videoDuration", videoDuration)
20010	return c
20011}
20012
20013// VideoEmbeddable sets the optional parameter "videoEmbeddable": The
20014// videoEmbeddable parameter lets you to restrict a search to only
20015// videos that can be embedded into a webpage. If you specify a value
20016// for this parameter, you must also set the type parameter's value to
20017// video.
20018//
20019// Possible values:
20020//   "any" - Return all videos, embeddable or not.
20021//   "true" - Only retrieve embeddable videos.
20022func (c *SearchListCall) VideoEmbeddable(videoEmbeddable string) *SearchListCall {
20023	c.urlParams_.Set("videoEmbeddable", videoEmbeddable)
20024	return c
20025}
20026
20027// VideoLicense sets the optional parameter "videoLicense": The
20028// videoLicense parameter filters search results to only include videos
20029// with a particular license. YouTube lets video uploaders choose to
20030// attach either the Creative Commons license or the standard YouTube
20031// license to each of their videos. If you specify a value for this
20032// parameter, you must also set the type parameter's value to video.
20033//
20034// Possible values:
20035//   "any" - Return all videos, regardless of which license they have,
20036// that match the query parameters.
20037//   "creativeCommon" - Only return videos that have a Creative Commons
20038// license. Users can reuse videos with this license in other videos
20039// that they create. Learn more.
20040//   "youtube" - Only return videos that have the standard YouTube
20041// license.
20042func (c *SearchListCall) VideoLicense(videoLicense string) *SearchListCall {
20043	c.urlParams_.Set("videoLicense", videoLicense)
20044	return c
20045}
20046
20047// VideoSyndicated sets the optional parameter "videoSyndicated": The
20048// videoSyndicated parameter lets you to restrict a search to only
20049// videos that can be played outside youtube.com. If you specify a value
20050// for this parameter, you must also set the type parameter's value to
20051// video.
20052//
20053// Possible values:
20054//   "any" - Return all videos, syndicated or not.
20055//   "true" - Only retrieve syndicated videos.
20056func (c *SearchListCall) VideoSyndicated(videoSyndicated string) *SearchListCall {
20057	c.urlParams_.Set("videoSyndicated", videoSyndicated)
20058	return c
20059}
20060
20061// VideoType sets the optional parameter "videoType": The videoType
20062// parameter lets you restrict a search to a particular type of videos.
20063// If you specify a value for this parameter, you must also set the type
20064// parameter's value to video.
20065//
20066// Possible values:
20067//   "any" - Return all videos.
20068//   "episode" - Only retrieve episodes of shows.
20069//   "movie" - Only retrieve movies.
20070func (c *SearchListCall) VideoType(videoType string) *SearchListCall {
20071	c.urlParams_.Set("videoType", videoType)
20072	return c
20073}
20074
20075// Fields allows partial responses to be retrieved. See
20076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20077// for more information.
20078func (c *SearchListCall) Fields(s ...googleapi.Field) *SearchListCall {
20079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20080	return c
20081}
20082
20083// IfNoneMatch sets the optional parameter which makes the operation
20084// fail if the object's ETag matches the given value. This is useful for
20085// getting updates only after the object has changed since the last
20086// request. Use googleapi.IsNotModified to check whether the response
20087// error from Do is the result of In-None-Match.
20088func (c *SearchListCall) IfNoneMatch(entityTag string) *SearchListCall {
20089	c.ifNoneMatch_ = entityTag
20090	return c
20091}
20092
20093// Context sets the context to be used in this call's Do method. Any
20094// pending HTTP request will be aborted if the provided context is
20095// canceled.
20096func (c *SearchListCall) Context(ctx context.Context) *SearchListCall {
20097	c.ctx_ = ctx
20098	return c
20099}
20100
20101// Header returns an http.Header that can be modified by the caller to
20102// add HTTP headers to the request.
20103func (c *SearchListCall) Header() http.Header {
20104	if c.header_ == nil {
20105		c.header_ = make(http.Header)
20106	}
20107	return c.header_
20108}
20109
20110func (c *SearchListCall) doRequest(alt string) (*http.Response, error) {
20111	reqHeaders := make(http.Header)
20112	for k, v := range c.header_ {
20113		reqHeaders[k] = v
20114	}
20115	reqHeaders.Set("User-Agent", c.s.userAgent())
20116	if c.ifNoneMatch_ != "" {
20117		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20118	}
20119	var body io.Reader = nil
20120	c.urlParams_.Set("alt", alt)
20121	c.urlParams_.Set("prettyPrint", "false")
20122	urls := googleapi.ResolveRelative(c.s.BasePath, "search")
20123	urls += "?" + c.urlParams_.Encode()
20124	req, err := http.NewRequest("GET", urls, body)
20125	if err != nil {
20126		return nil, err
20127	}
20128	req.Header = reqHeaders
20129	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20130}
20131
20132// Do executes the "youtube.search.list" call.
20133// Exactly one of *SearchListResponse or error will be non-nil. Any
20134// non-2xx status code is an error. Response headers are in either
20135// *SearchListResponse.ServerResponse.Header or (if a response was
20136// returned at all) in error.(*googleapi.Error).Header. Use
20137// googleapi.IsNotModified to check whether the returned error was
20138// because http.StatusNotModified was returned.
20139func (c *SearchListCall) Do(opts ...googleapi.CallOption) (*SearchListResponse, error) {
20140	gensupport.SetOptions(c.urlParams_, opts...)
20141	res, err := c.doRequest("json")
20142	if res != nil && res.StatusCode == http.StatusNotModified {
20143		if res.Body != nil {
20144			res.Body.Close()
20145		}
20146		return nil, &googleapi.Error{
20147			Code:   res.StatusCode,
20148			Header: res.Header,
20149		}
20150	}
20151	if err != nil {
20152		return nil, err
20153	}
20154	defer googleapi.CloseBody(res)
20155	if err := googleapi.CheckResponse(res); err != nil {
20156		return nil, err
20157	}
20158	ret := &SearchListResponse{
20159		ServerResponse: googleapi.ServerResponse{
20160			Header:         res.Header,
20161			HTTPStatusCode: res.StatusCode,
20162		},
20163	}
20164	target := &ret
20165	if err := gensupport.DecodeResponse(target, res); err != nil {
20166		return nil, err
20167	}
20168	return ret, nil
20169	// {
20170	//   "description": "Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.",
20171	//   "httpMethod": "GET",
20172	//   "id": "youtube.search.list",
20173	//   "parameterOrder": [
20174	//     "part"
20175	//   ],
20176	//   "parameters": {
20177	//     "channelId": {
20178	//       "description": "The channelId parameter indicates that the API response should only contain resources created by the channel",
20179	//       "location": "query",
20180	//       "type": "string"
20181	//     },
20182	//     "channelType": {
20183	//       "description": "The channelType parameter lets you restrict a search to a particular type of channel.",
20184	//       "enum": [
20185	//         "any",
20186	//         "show"
20187	//       ],
20188	//       "enumDescriptions": [
20189	//         "Return all channels.",
20190	//         "Only retrieve shows."
20191	//       ],
20192	//       "location": "query",
20193	//       "type": "string"
20194	//     },
20195	//     "eventType": {
20196	//       "description": "The eventType parameter restricts a search to broadcast events. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20197	//       "enum": [
20198	//         "completed",
20199	//         "live",
20200	//         "upcoming"
20201	//       ],
20202	//       "enumDescriptions": [
20203	//         "Only include completed broadcasts.",
20204	//         "Only include active broadcasts.",
20205	//         "Only include upcoming broadcasts."
20206	//       ],
20207	//       "location": "query",
20208	//       "type": "string"
20209	//     },
20210	//     "forContentOwner": {
20211	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated using a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.",
20212	//       "location": "query",
20213	//       "type": "boolean"
20214	//     },
20215	//     "forDeveloper": {
20216	//       "description": "The forDeveloper parameter restricts the search to only retrieve videos uploaded via the developer's application or website. The API server uses the request's authorization credentials to identify the developer. Therefore, a developer can restrict results to videos uploaded through the developer's own app or website but not to videos uploaded through other apps or sites.",
20217	//       "location": "query",
20218	//       "type": "boolean"
20219	//     },
20220	//     "forMine": {
20221	//       "description": "The forMine parameter restricts the search to only retrieve videos owned by the authenticated user. If you set this parameter to true, then the type parameter's value must also be set to video.",
20222	//       "location": "query",
20223	//       "type": "boolean"
20224	//     },
20225	//     "location": {
20226	//       "description": "The location parameter, in conjunction with the locationRadius parameter, defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. The parameter value is a string that specifies latitude/longitude coordinates e.g. (37.42307,-122.08427).\n\n\n- The location parameter value identifies the point at the center of the area.\n- The locationRadius parameter specifies the maximum distance that the location associated with a video can be from that point for the video to still be included in the search results.The API returns an error if your request specifies a value for the location parameter but does not also specify a value for the locationRadius parameter.",
20227	//       "location": "query",
20228	//       "type": "string"
20229	//     },
20230	//     "locationRadius": {
20231	//       "description": "The locationRadius parameter, in conjunction with the location parameter, defines a circular geographic area.\n\nThe parameter value must be a floating point number followed by a measurement unit. Valid measurement units are m, km, ft, and mi. For example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi. The API does not support locationRadius parameter values larger than 1000 kilometers.\n\nNote: See the definition of the location parameter for more information.",
20232	//       "location": "query",
20233	//       "type": "string"
20234	//     },
20235	//     "maxResults": {
20236	//       "default": "5",
20237	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
20238	//       "format": "uint32",
20239	//       "location": "query",
20240	//       "maximum": "50",
20241	//       "minimum": "0",
20242	//       "type": "integer"
20243	//     },
20244	//     "onBehalfOfContentOwner": {
20245	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
20246	//       "location": "query",
20247	//       "type": "string"
20248	//     },
20249	//     "order": {
20250	//       "default": "SEARCH_SORT_RELEVANCE",
20251	//       "description": "The order parameter specifies the method that will be used to order resources in the API response.",
20252	//       "enum": [
20253	//         "date",
20254	//         "rating",
20255	//         "relevance",
20256	//         "title",
20257	//         "videoCount",
20258	//         "viewCount"
20259	//       ],
20260	//       "enumDescriptions": [
20261	//         "Resources are sorted in reverse chronological order based on the date they were created.",
20262	//         "Resources are sorted from highest to lowest rating.",
20263	//         "Resources are sorted based on their relevance to the search query. This is the default value for this parameter.",
20264	//         "Resources are sorted alphabetically by title.",
20265	//         "Channels are sorted in descending order of their number of uploaded videos.",
20266	//         "Resources are sorted from highest to lowest number of views."
20267	//       ],
20268	//       "location": "query",
20269	//       "type": "string"
20270	//     },
20271	//     "pageToken": {
20272	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
20273	//       "location": "query",
20274	//       "type": "string"
20275	//     },
20276	//     "part": {
20277	//       "description": "The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.",
20278	//       "location": "query",
20279	//       "required": true,
20280	//       "type": "string"
20281	//     },
20282	//     "publishedAfter": {
20283	//       "description": "The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).",
20284	//       "format": "date-time",
20285	//       "location": "query",
20286	//       "type": "string"
20287	//     },
20288	//     "publishedBefore": {
20289	//       "description": "The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).",
20290	//       "format": "date-time",
20291	//       "location": "query",
20292	//       "type": "string"
20293	//     },
20294	//     "q": {
20295	//       "description": "The q parameter specifies the query term to search for.\n\nYour request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either \"boating\" or \"sailing\", set the q parameter value to boating|sailing. Similarly, to search for videos matching either \"boating\" or \"sailing\" but not \"fishing\", set the q parameter value to boating|sailing -fishing. Note that the pipe character must be URL-escaped when it is sent in your API request. The URL-escaped value for the pipe character is %7C.",
20296	//       "location": "query",
20297	//       "type": "string"
20298	//     },
20299	//     "regionCode": {
20300	//       "description": "The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.",
20301	//       "location": "query",
20302	//       "type": "string"
20303	//     },
20304	//     "relatedToVideoId": {
20305	//       "description": "The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video.",
20306	//       "location": "query",
20307	//       "type": "string"
20308	//     },
20309	//     "relevanceLanguage": {
20310	//       "description": "The relevanceLanguage parameter instructs the API to return search results that are most relevant to the specified language. The parameter value is typically an ISO 639-1 two-letter language code. However, you should use the values zh-Hans for simplified Chinese and zh-Hant for traditional Chinese. Please note that results in other languages will still be returned if they are highly relevant to the search query term.",
20311	//       "location": "query",
20312	//       "type": "string"
20313	//     },
20314	//     "safeSearch": {
20315	//       "description": "The safeSearch parameter indicates whether the search results should include restricted content as well as standard content.",
20316	//       "enum": [
20317	//         "moderate",
20318	//         "none",
20319	//         "strict"
20320	//       ],
20321	//       "enumDescriptions": [
20322	//         "YouTube will filter some content from search results and, at the least, will filter content that is restricted in your locale. Based on their content, search results could be removed from search results or demoted in search results. This is the default parameter value.",
20323	//         "YouTube will not filter the search result set.",
20324	//         "YouTube will try to exclude all restricted content from the search result set. Based on their content, search results could be removed from search results or demoted in search results."
20325	//       ],
20326	//       "location": "query",
20327	//       "type": "string"
20328	//     },
20329	//     "topicId": {
20330	//       "description": "The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.",
20331	//       "location": "query",
20332	//       "type": "string"
20333	//     },
20334	//     "type": {
20335	//       "default": "video,channel,playlist",
20336	//       "description": "The type parameter restricts a search query to only retrieve a particular type of resource. The value is a comma-separated list of resource types.",
20337	//       "location": "query",
20338	//       "type": "string"
20339	//     },
20340	//     "videoCaption": {
20341	//       "description": "The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20342	//       "enum": [
20343	//         "any",
20344	//         "closedCaption",
20345	//         "none"
20346	//       ],
20347	//       "enumDescriptions": [
20348	//         "Do not filter results based on caption availability.",
20349	//         "Only include videos that have captions.",
20350	//         "Only include videos that do not have captions."
20351	//       ],
20352	//       "location": "query",
20353	//       "type": "string"
20354	//     },
20355	//     "videoCategoryId": {
20356	//       "description": "The videoCategoryId parameter filters video search results based on their category. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20357	//       "location": "query",
20358	//       "type": "string"
20359	//     },
20360	//     "videoDefinition": {
20361	//       "description": "The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20362	//       "enum": [
20363	//         "any",
20364	//         "high",
20365	//         "standard"
20366	//       ],
20367	//       "enumDescriptions": [
20368	//         "Return all videos, regardless of their resolution.",
20369	//         "Only retrieve HD videos.",
20370	//         "Only retrieve videos in standard definition."
20371	//       ],
20372	//       "location": "query",
20373	//       "type": "string"
20374	//     },
20375	//     "videoDimension": {
20376	//       "description": "The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20377	//       "enum": [
20378	//         "2d",
20379	//         "3d",
20380	//         "any"
20381	//       ],
20382	//       "enumDescriptions": [
20383	//         "Restrict search results to exclude 3D videos.",
20384	//         "Restrict search results to only include 3D videos.",
20385	//         "Include both 3D and non-3D videos in returned results. This is the default value."
20386	//       ],
20387	//       "location": "query",
20388	//       "type": "string"
20389	//     },
20390	//     "videoDuration": {
20391	//       "description": "The videoDuration parameter filters video search results based on their duration. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20392	//       "enum": [
20393	//         "any",
20394	//         "long",
20395	//         "medium",
20396	//         "short"
20397	//       ],
20398	//       "enumDescriptions": [
20399	//         "Do not filter video search results based on their duration. This is the default value.",
20400	//         "Only include videos longer than 20 minutes.",
20401	//         "Only include videos that are between four and 20 minutes long (inclusive).",
20402	//         "Only include videos that are less than four minutes long."
20403	//       ],
20404	//       "location": "query",
20405	//       "type": "string"
20406	//     },
20407	//     "videoEmbeddable": {
20408	//       "description": "The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20409	//       "enum": [
20410	//         "any",
20411	//         "true"
20412	//       ],
20413	//       "enumDescriptions": [
20414	//         "Return all videos, embeddable or not.",
20415	//         "Only retrieve embeddable videos."
20416	//       ],
20417	//       "location": "query",
20418	//       "type": "string"
20419	//     },
20420	//     "videoLicense": {
20421	//       "description": "The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20422	//       "enum": [
20423	//         "any",
20424	//         "creativeCommon",
20425	//         "youtube"
20426	//       ],
20427	//       "enumDescriptions": [
20428	//         "Return all videos, regardless of which license they have, that match the query parameters.",
20429	//         "Only return videos that have a Creative Commons license. Users can reuse videos with this license in other videos that they create. Learn more.",
20430	//         "Only return videos that have the standard YouTube license."
20431	//       ],
20432	//       "location": "query",
20433	//       "type": "string"
20434	//     },
20435	//     "videoSyndicated": {
20436	//       "description": "The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20437	//       "enum": [
20438	//         "any",
20439	//         "true"
20440	//       ],
20441	//       "enumDescriptions": [
20442	//         "Return all videos, syndicated or not.",
20443	//         "Only retrieve syndicated videos."
20444	//       ],
20445	//       "location": "query",
20446	//       "type": "string"
20447	//     },
20448	//     "videoType": {
20449	//       "description": "The videoType parameter lets you restrict a search to a particular type of videos. If you specify a value for this parameter, you must also set the type parameter's value to video.",
20450	//       "enum": [
20451	//         "any",
20452	//         "episode",
20453	//         "movie"
20454	//       ],
20455	//       "enumDescriptions": [
20456	//         "Return all videos.",
20457	//         "Only retrieve episodes of shows.",
20458	//         "Only retrieve movies."
20459	//       ],
20460	//       "location": "query",
20461	//       "type": "string"
20462	//     }
20463	//   },
20464	//   "path": "search",
20465	//   "response": {
20466	//     "$ref": "SearchListResponse"
20467	//   },
20468	//   "scopes": [
20469	//     "https://www.googleapis.com/auth/youtube",
20470	//     "https://www.googleapis.com/auth/youtube.force-ssl",
20471	//     "https://www.googleapis.com/auth/youtube.readonly",
20472	//     "https://www.googleapis.com/auth/youtubepartner"
20473	//   ]
20474	// }
20475
20476}
20477
20478// Pages invokes f for each page of results.
20479// A non-nil error returned from f will halt the iteration.
20480// The provided context supersedes any context provided to the Context method.
20481func (c *SearchListCall) Pages(ctx context.Context, f func(*SearchListResponse) error) error {
20482	c.ctx_ = ctx
20483	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20484	for {
20485		x, err := c.Do()
20486		if err != nil {
20487			return err
20488		}
20489		if err := f(x); err != nil {
20490			return err
20491		}
20492		if x.NextPageToken == "" {
20493			return nil
20494		}
20495		c.PageToken(x.NextPageToken)
20496	}
20497}
20498
20499// method id "youtube.sponsors.list":
20500
20501type SponsorsListCall struct {
20502	s            *Service
20503	urlParams_   gensupport.URLParams
20504	ifNoneMatch_ string
20505	ctx_         context.Context
20506	header_      http.Header
20507}
20508
20509// List: Lists sponsors for a channel.
20510func (r *SponsorsService) List(part string) *SponsorsListCall {
20511	c := &SponsorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20512	c.urlParams_.Set("part", part)
20513	return c
20514}
20515
20516// Filter sets the optional parameter "filter": The filter parameter
20517// specifies which channel sponsors to return.
20518//
20519// Possible values:
20520//   "all" - Return all sponsors, from newest to oldest.
20521//   "newest" - Return the most recent sponsors, from newest to oldest.
20522func (c *SponsorsListCall) Filter(filter string) *SponsorsListCall {
20523	c.urlParams_.Set("filter", filter)
20524	return c
20525}
20526
20527// MaxResults sets the optional parameter "maxResults": The maxResults
20528// parameter specifies the maximum number of items that should be
20529// returned in the result set.
20530func (c *SponsorsListCall) MaxResults(maxResults int64) *SponsorsListCall {
20531	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20532	return c
20533}
20534
20535// PageToken sets the optional parameter "pageToken": The pageToken
20536// parameter identifies a specific page in the result set that should be
20537// returned. In an API response, the nextPageToken and prevPageToken
20538// properties identify other pages that could be retrieved.
20539func (c *SponsorsListCall) PageToken(pageToken string) *SponsorsListCall {
20540	c.urlParams_.Set("pageToken", pageToken)
20541	return c
20542}
20543
20544// Fields allows partial responses to be retrieved. See
20545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20546// for more information.
20547func (c *SponsorsListCall) Fields(s ...googleapi.Field) *SponsorsListCall {
20548	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20549	return c
20550}
20551
20552// IfNoneMatch sets the optional parameter which makes the operation
20553// fail if the object's ETag matches the given value. This is useful for
20554// getting updates only after the object has changed since the last
20555// request. Use googleapi.IsNotModified to check whether the response
20556// error from Do is the result of In-None-Match.
20557func (c *SponsorsListCall) IfNoneMatch(entityTag string) *SponsorsListCall {
20558	c.ifNoneMatch_ = entityTag
20559	return c
20560}
20561
20562// Context sets the context to be used in this call's Do method. Any
20563// pending HTTP request will be aborted if the provided context is
20564// canceled.
20565func (c *SponsorsListCall) Context(ctx context.Context) *SponsorsListCall {
20566	c.ctx_ = ctx
20567	return c
20568}
20569
20570// Header returns an http.Header that can be modified by the caller to
20571// add HTTP headers to the request.
20572func (c *SponsorsListCall) Header() http.Header {
20573	if c.header_ == nil {
20574		c.header_ = make(http.Header)
20575	}
20576	return c.header_
20577}
20578
20579func (c *SponsorsListCall) doRequest(alt string) (*http.Response, error) {
20580	reqHeaders := make(http.Header)
20581	for k, v := range c.header_ {
20582		reqHeaders[k] = v
20583	}
20584	reqHeaders.Set("User-Agent", c.s.userAgent())
20585	if c.ifNoneMatch_ != "" {
20586		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20587	}
20588	var body io.Reader = nil
20589	c.urlParams_.Set("alt", alt)
20590	c.urlParams_.Set("prettyPrint", "false")
20591	urls := googleapi.ResolveRelative(c.s.BasePath, "sponsors")
20592	urls += "?" + c.urlParams_.Encode()
20593	req, err := http.NewRequest("GET", urls, body)
20594	if err != nil {
20595		return nil, err
20596	}
20597	req.Header = reqHeaders
20598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20599}
20600
20601// Do executes the "youtube.sponsors.list" call.
20602// Exactly one of *SponsorListResponse or error will be non-nil. Any
20603// non-2xx status code is an error. Response headers are in either
20604// *SponsorListResponse.ServerResponse.Header or (if a response was
20605// returned at all) in error.(*googleapi.Error).Header. Use
20606// googleapi.IsNotModified to check whether the returned error was
20607// because http.StatusNotModified was returned.
20608func (c *SponsorsListCall) Do(opts ...googleapi.CallOption) (*SponsorListResponse, error) {
20609	gensupport.SetOptions(c.urlParams_, opts...)
20610	res, err := c.doRequest("json")
20611	if res != nil && res.StatusCode == http.StatusNotModified {
20612		if res.Body != nil {
20613			res.Body.Close()
20614		}
20615		return nil, &googleapi.Error{
20616			Code:   res.StatusCode,
20617			Header: res.Header,
20618		}
20619	}
20620	if err != nil {
20621		return nil, err
20622	}
20623	defer googleapi.CloseBody(res)
20624	if err := googleapi.CheckResponse(res); err != nil {
20625		return nil, err
20626	}
20627	ret := &SponsorListResponse{
20628		ServerResponse: googleapi.ServerResponse{
20629			Header:         res.Header,
20630			HTTPStatusCode: res.StatusCode,
20631		},
20632	}
20633	target := &ret
20634	if err := gensupport.DecodeResponse(target, res); err != nil {
20635		return nil, err
20636	}
20637	return ret, nil
20638	// {
20639	//   "description": "Lists sponsors for a channel.",
20640	//   "httpMethod": "GET",
20641	//   "id": "youtube.sponsors.list",
20642	//   "parameterOrder": [
20643	//     "part"
20644	//   ],
20645	//   "parameters": {
20646	//     "filter": {
20647	//       "default": "POLL_NEWEST",
20648	//       "description": "The filter parameter specifies which channel sponsors to return.",
20649	//       "enum": [
20650	//         "all",
20651	//         "newest"
20652	//       ],
20653	//       "enumDescriptions": [
20654	//         "Return all sponsors, from newest to oldest.",
20655	//         "Return the most recent sponsors, from newest to oldest."
20656	//       ],
20657	//       "location": "query",
20658	//       "type": "string"
20659	//     },
20660	//     "maxResults": {
20661	//       "default": "5",
20662	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
20663	//       "format": "uint32",
20664	//       "location": "query",
20665	//       "maximum": "50",
20666	//       "minimum": "0",
20667	//       "type": "integer"
20668	//     },
20669	//     "pageToken": {
20670	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
20671	//       "location": "query",
20672	//       "type": "string"
20673	//     },
20674	//     "part": {
20675	//       "description": "The part parameter specifies the sponsor resource parts that the API response will include. Supported values are id and snippet.",
20676	//       "location": "query",
20677	//       "required": true,
20678	//       "type": "string"
20679	//     }
20680	//   },
20681	//   "path": "sponsors",
20682	//   "response": {
20683	//     "$ref": "SponsorListResponse"
20684	//   },
20685	//   "scopes": [
20686	//     "https://www.googleapis.com/auth/youtube",
20687	//     "https://www.googleapis.com/auth/youtube.force-ssl",
20688	//     "https://www.googleapis.com/auth/youtube.readonly"
20689	//   ]
20690	// }
20691
20692}
20693
20694// Pages invokes f for each page of results.
20695// A non-nil error returned from f will halt the iteration.
20696// The provided context supersedes any context provided to the Context method.
20697func (c *SponsorsListCall) Pages(ctx context.Context, f func(*SponsorListResponse) error) error {
20698	c.ctx_ = ctx
20699	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20700	for {
20701		x, err := c.Do()
20702		if err != nil {
20703			return err
20704		}
20705		if err := f(x); err != nil {
20706			return err
20707		}
20708		if x.NextPageToken == "" {
20709			return nil
20710		}
20711		c.PageToken(x.NextPageToken)
20712	}
20713}
20714
20715// method id "youtube.subscriptions.delete":
20716
20717type SubscriptionsDeleteCall struct {
20718	s          *Service
20719	urlParams_ gensupport.URLParams
20720	ctx_       context.Context
20721	header_    http.Header
20722}
20723
20724// Delete: Deletes a subscription.
20725func (r *SubscriptionsService) Delete(id string) *SubscriptionsDeleteCall {
20726	c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20727	c.urlParams_.Set("id", id)
20728	return c
20729}
20730
20731// Fields allows partial responses to be retrieved. See
20732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20733// for more information.
20734func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall {
20735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20736	return c
20737}
20738
20739// Context sets the context to be used in this call's Do method. Any
20740// pending HTTP request will be aborted if the provided context is
20741// canceled.
20742func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
20743	c.ctx_ = ctx
20744	return c
20745}
20746
20747// Header returns an http.Header that can be modified by the caller to
20748// add HTTP headers to the request.
20749func (c *SubscriptionsDeleteCall) Header() http.Header {
20750	if c.header_ == nil {
20751		c.header_ = make(http.Header)
20752	}
20753	return c.header_
20754}
20755
20756func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
20757	reqHeaders := make(http.Header)
20758	for k, v := range c.header_ {
20759		reqHeaders[k] = v
20760	}
20761	reqHeaders.Set("User-Agent", c.s.userAgent())
20762	var body io.Reader = nil
20763	c.urlParams_.Set("alt", alt)
20764	c.urlParams_.Set("prettyPrint", "false")
20765	urls := googleapi.ResolveRelative(c.s.BasePath, "subscriptions")
20766	urls += "?" + c.urlParams_.Encode()
20767	req, err := http.NewRequest("DELETE", urls, body)
20768	if err != nil {
20769		return nil, err
20770	}
20771	req.Header = reqHeaders
20772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20773}
20774
20775// Do executes the "youtube.subscriptions.delete" call.
20776func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) error {
20777	gensupport.SetOptions(c.urlParams_, opts...)
20778	res, err := c.doRequest("json")
20779	if err != nil {
20780		return err
20781	}
20782	defer googleapi.CloseBody(res)
20783	if err := googleapi.CheckResponse(res); err != nil {
20784		return err
20785	}
20786	return nil
20787	// {
20788	//   "description": "Deletes a subscription.",
20789	//   "httpMethod": "DELETE",
20790	//   "id": "youtube.subscriptions.delete",
20791	//   "parameterOrder": [
20792	//     "id"
20793	//   ],
20794	//   "parameters": {
20795	//     "id": {
20796	//       "description": "The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID.",
20797	//       "location": "query",
20798	//       "required": true,
20799	//       "type": "string"
20800	//     }
20801	//   },
20802	//   "path": "subscriptions",
20803	//   "scopes": [
20804	//     "https://www.googleapis.com/auth/youtube",
20805	//     "https://www.googleapis.com/auth/youtube.force-ssl",
20806	//     "https://www.googleapis.com/auth/youtubepartner"
20807	//   ]
20808	// }
20809
20810}
20811
20812// method id "youtube.subscriptions.insert":
20813
20814type SubscriptionsInsertCall struct {
20815	s            *Service
20816	subscription *Subscription
20817	urlParams_   gensupport.URLParams
20818	ctx_         context.Context
20819	header_      http.Header
20820}
20821
20822// Insert: Adds a subscription for the authenticated user's channel.
20823func (r *SubscriptionsService) Insert(part string, subscription *Subscription) *SubscriptionsInsertCall {
20824	c := &SubscriptionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20825	c.urlParams_.Set("part", part)
20826	c.subscription = subscription
20827	return c
20828}
20829
20830// Fields allows partial responses to be retrieved. See
20831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20832// for more information.
20833func (c *SubscriptionsInsertCall) Fields(s ...googleapi.Field) *SubscriptionsInsertCall {
20834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20835	return c
20836}
20837
20838// Context sets the context to be used in this call's Do method. Any
20839// pending HTTP request will be aborted if the provided context is
20840// canceled.
20841func (c *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
20842	c.ctx_ = ctx
20843	return c
20844}
20845
20846// Header returns an http.Header that can be modified by the caller to
20847// add HTTP headers to the request.
20848func (c *SubscriptionsInsertCall) Header() http.Header {
20849	if c.header_ == nil {
20850		c.header_ = make(http.Header)
20851	}
20852	return c.header_
20853}
20854
20855func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
20856	reqHeaders := make(http.Header)
20857	for k, v := range c.header_ {
20858		reqHeaders[k] = v
20859	}
20860	reqHeaders.Set("User-Agent", c.s.userAgent())
20861	var body io.Reader = nil
20862	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
20863	if err != nil {
20864		return nil, err
20865	}
20866	reqHeaders.Set("Content-Type", "application/json")
20867	c.urlParams_.Set("alt", alt)
20868	c.urlParams_.Set("prettyPrint", "false")
20869	urls := googleapi.ResolveRelative(c.s.BasePath, "subscriptions")
20870	urls += "?" + c.urlParams_.Encode()
20871	req, err := http.NewRequest("POST", urls, body)
20872	if err != nil {
20873		return nil, err
20874	}
20875	req.Header = reqHeaders
20876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20877}
20878
20879// Do executes the "youtube.subscriptions.insert" call.
20880// Exactly one of *Subscription or error will be non-nil. Any non-2xx
20881// status code is an error. Response headers are in either
20882// *Subscription.ServerResponse.Header or (if a response was returned at
20883// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20884// to check whether the returned error was because
20885// http.StatusNotModified was returned.
20886func (c *SubscriptionsInsertCall) Do(opts ...googleapi.CallOption) (*Subscription, error) {
20887	gensupport.SetOptions(c.urlParams_, opts...)
20888	res, err := c.doRequest("json")
20889	if res != nil && res.StatusCode == http.StatusNotModified {
20890		if res.Body != nil {
20891			res.Body.Close()
20892		}
20893		return nil, &googleapi.Error{
20894			Code:   res.StatusCode,
20895			Header: res.Header,
20896		}
20897	}
20898	if err != nil {
20899		return nil, err
20900	}
20901	defer googleapi.CloseBody(res)
20902	if err := googleapi.CheckResponse(res); err != nil {
20903		return nil, err
20904	}
20905	ret := &Subscription{
20906		ServerResponse: googleapi.ServerResponse{
20907			Header:         res.Header,
20908			HTTPStatusCode: res.StatusCode,
20909		},
20910	}
20911	target := &ret
20912	if err := gensupport.DecodeResponse(target, res); err != nil {
20913		return nil, err
20914	}
20915	return ret, nil
20916	// {
20917	//   "description": "Adds a subscription for the authenticated user's channel.",
20918	//   "httpMethod": "POST",
20919	//   "id": "youtube.subscriptions.insert",
20920	//   "parameterOrder": [
20921	//     "part"
20922	//   ],
20923	//   "parameters": {
20924	//     "part": {
20925	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.",
20926	//       "location": "query",
20927	//       "required": true,
20928	//       "type": "string"
20929	//     }
20930	//   },
20931	//   "path": "subscriptions",
20932	//   "request": {
20933	//     "$ref": "Subscription"
20934	//   },
20935	//   "response": {
20936	//     "$ref": "Subscription"
20937	//   },
20938	//   "scopes": [
20939	//     "https://www.googleapis.com/auth/youtube",
20940	//     "https://www.googleapis.com/auth/youtube.force-ssl",
20941	//     "https://www.googleapis.com/auth/youtubepartner"
20942	//   ]
20943	// }
20944
20945}
20946
20947// method id "youtube.subscriptions.list":
20948
20949type SubscriptionsListCall struct {
20950	s            *Service
20951	urlParams_   gensupport.URLParams
20952	ifNoneMatch_ string
20953	ctx_         context.Context
20954	header_      http.Header
20955}
20956
20957// List: Returns subscription resources that match the API request
20958// criteria.
20959func (r *SubscriptionsService) List(part string) *SubscriptionsListCall {
20960	c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20961	c.urlParams_.Set("part", part)
20962	return c
20963}
20964
20965// ChannelId sets the optional parameter "channelId": The channelId
20966// parameter specifies a YouTube channel ID. The API will only return
20967// that channel's subscriptions.
20968func (c *SubscriptionsListCall) ChannelId(channelId string) *SubscriptionsListCall {
20969	c.urlParams_.Set("channelId", channelId)
20970	return c
20971}
20972
20973// ForChannelId sets the optional parameter "forChannelId": The
20974// forChannelId parameter specifies a comma-separated list of channel
20975// IDs. The API response will then only contain subscriptions matching
20976// those channels.
20977func (c *SubscriptionsListCall) ForChannelId(forChannelId string) *SubscriptionsListCall {
20978	c.urlParams_.Set("forChannelId", forChannelId)
20979	return c
20980}
20981
20982// Id sets the optional parameter "id": The id parameter specifies a
20983// comma-separated list of the YouTube subscription ID(s) for the
20984// resource(s) that are being retrieved. In a subscription resource, the
20985// id property specifies the YouTube subscription ID.
20986func (c *SubscriptionsListCall) Id(id string) *SubscriptionsListCall {
20987	c.urlParams_.Set("id", id)
20988	return c
20989}
20990
20991// MaxResults sets the optional parameter "maxResults": The maxResults
20992// parameter specifies the maximum number of items that should be
20993// returned in the result set.
20994func (c *SubscriptionsListCall) MaxResults(maxResults int64) *SubscriptionsListCall {
20995	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20996	return c
20997}
20998
20999// Mine sets the optional parameter "mine": Set this parameter's value
21000// to true to retrieve a feed of the authenticated user's subscriptions.
21001func (c *SubscriptionsListCall) Mine(mine bool) *SubscriptionsListCall {
21002	c.urlParams_.Set("mine", fmt.Sprint(mine))
21003	return c
21004}
21005
21006// MyRecentSubscribers sets the optional parameter
21007// "myRecentSubscribers": Set this parameter's value to true to retrieve
21008// a feed of the subscribers of the authenticated user in reverse
21009// chronological order (newest first).
21010func (c *SubscriptionsListCall) MyRecentSubscribers(myRecentSubscribers bool) *SubscriptionsListCall {
21011	c.urlParams_.Set("myRecentSubscribers", fmt.Sprint(myRecentSubscribers))
21012	return c
21013}
21014
21015// MySubscribers sets the optional parameter "mySubscribers": Set this
21016// parameter's value to true to retrieve a feed of the subscribers of
21017// the authenticated user in no particular order.
21018func (c *SubscriptionsListCall) MySubscribers(mySubscribers bool) *SubscriptionsListCall {
21019	c.urlParams_.Set("mySubscribers", fmt.Sprint(mySubscribers))
21020	return c
21021}
21022
21023// OnBehalfOfContentOwner sets the optional parameter
21024// "onBehalfOfContentOwner": Note: This parameter is intended
21025// exclusively for YouTube content partners.
21026//
21027// The onBehalfOfContentOwner parameter indicates that the request's
21028// authorization credentials identify a YouTube CMS user who is acting
21029// on behalf of the content owner specified in the parameter value. This
21030// parameter is intended for YouTube content partners that own and
21031// manage many different YouTube channels. It allows content owners to
21032// authenticate once and get access to all their video and channel data,
21033// without having to provide authentication credentials for each
21034// individual channel. The CMS account that the user authenticates with
21035// must be linked to the specified YouTube content owner.
21036func (c *SubscriptionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *SubscriptionsListCall {
21037	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
21038	return c
21039}
21040
21041// OnBehalfOfContentOwnerChannel sets the optional parameter
21042// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
21043// properly authorized request. Note: This parameter is intended
21044// exclusively for YouTube content partners.
21045//
21046// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
21047// channel ID of the channel to which a video is being added. This
21048// parameter is required when a request specifies a value for the
21049// onBehalfOfContentOwner parameter, and it can only be used in
21050// conjunction with that parameter. In addition, the request must be
21051// authorized using a CMS account that is linked to the content owner
21052// that the onBehalfOfContentOwner parameter specifies. Finally, the
21053// channel that the onBehalfOfContentOwnerChannel parameter value
21054// specifies must be linked to the content owner that the
21055// onBehalfOfContentOwner parameter specifies.
21056//
21057// This parameter is intended for YouTube content partners that own and
21058// manage many different YouTube channels. It allows content owners to
21059// authenticate once and perform actions on behalf of the channel
21060// specified in the parameter value, without having to provide
21061// authentication credentials for each separate channel.
21062func (c *SubscriptionsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *SubscriptionsListCall {
21063	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
21064	return c
21065}
21066
21067// Order sets the optional parameter "order": The order parameter
21068// specifies the method that will be used to sort resources in the API
21069// response.
21070//
21071// Possible values:
21072//   "alphabetical" - Sort alphabetically.
21073//   "relevance" - Sort by relevance.
21074//   "unread" - Sort by order of activity.
21075func (c *SubscriptionsListCall) Order(order string) *SubscriptionsListCall {
21076	c.urlParams_.Set("order", order)
21077	return c
21078}
21079
21080// PageToken sets the optional parameter "pageToken": The pageToken
21081// parameter identifies a specific page in the result set that should be
21082// returned. In an API response, the nextPageToken and prevPageToken
21083// properties identify other pages that could be retrieved.
21084func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall {
21085	c.urlParams_.Set("pageToken", pageToken)
21086	return c
21087}
21088
21089// Fields allows partial responses to be retrieved. See
21090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21091// for more information.
21092func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall {
21093	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21094	return c
21095}
21096
21097// IfNoneMatch sets the optional parameter which makes the operation
21098// fail if the object's ETag matches the given value. This is useful for
21099// getting updates only after the object has changed since the last
21100// request. Use googleapi.IsNotModified to check whether the response
21101// error from Do is the result of In-None-Match.
21102func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall {
21103	c.ifNoneMatch_ = entityTag
21104	return c
21105}
21106
21107// Context sets the context to be used in this call's Do method. Any
21108// pending HTTP request will be aborted if the provided context is
21109// canceled.
21110func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
21111	c.ctx_ = ctx
21112	return c
21113}
21114
21115// Header returns an http.Header that can be modified by the caller to
21116// add HTTP headers to the request.
21117func (c *SubscriptionsListCall) Header() http.Header {
21118	if c.header_ == nil {
21119		c.header_ = make(http.Header)
21120	}
21121	return c.header_
21122}
21123
21124func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
21125	reqHeaders := make(http.Header)
21126	for k, v := range c.header_ {
21127		reqHeaders[k] = v
21128	}
21129	reqHeaders.Set("User-Agent", c.s.userAgent())
21130	if c.ifNoneMatch_ != "" {
21131		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21132	}
21133	var body io.Reader = nil
21134	c.urlParams_.Set("alt", alt)
21135	c.urlParams_.Set("prettyPrint", "false")
21136	urls := googleapi.ResolveRelative(c.s.BasePath, "subscriptions")
21137	urls += "?" + c.urlParams_.Encode()
21138	req, err := http.NewRequest("GET", urls, body)
21139	if err != nil {
21140		return nil, err
21141	}
21142	req.Header = reqHeaders
21143	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21144}
21145
21146// Do executes the "youtube.subscriptions.list" call.
21147// Exactly one of *SubscriptionListResponse or error will be non-nil.
21148// Any non-2xx status code is an error. Response headers are in either
21149// *SubscriptionListResponse.ServerResponse.Header or (if a response was
21150// returned at all) in error.(*googleapi.Error).Header. Use
21151// googleapi.IsNotModified to check whether the returned error was
21152// because http.StatusNotModified was returned.
21153func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*SubscriptionListResponse, error) {
21154	gensupport.SetOptions(c.urlParams_, opts...)
21155	res, err := c.doRequest("json")
21156	if res != nil && res.StatusCode == http.StatusNotModified {
21157		if res.Body != nil {
21158			res.Body.Close()
21159		}
21160		return nil, &googleapi.Error{
21161			Code:   res.StatusCode,
21162			Header: res.Header,
21163		}
21164	}
21165	if err != nil {
21166		return nil, err
21167	}
21168	defer googleapi.CloseBody(res)
21169	if err := googleapi.CheckResponse(res); err != nil {
21170		return nil, err
21171	}
21172	ret := &SubscriptionListResponse{
21173		ServerResponse: googleapi.ServerResponse{
21174			Header:         res.Header,
21175			HTTPStatusCode: res.StatusCode,
21176		},
21177	}
21178	target := &ret
21179	if err := gensupport.DecodeResponse(target, res); err != nil {
21180		return nil, err
21181	}
21182	return ret, nil
21183	// {
21184	//   "description": "Returns subscription resources that match the API request criteria.",
21185	//   "httpMethod": "GET",
21186	//   "id": "youtube.subscriptions.list",
21187	//   "parameterOrder": [
21188	//     "part"
21189	//   ],
21190	//   "parameters": {
21191	//     "channelId": {
21192	//       "description": "The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions.",
21193	//       "location": "query",
21194	//       "type": "string"
21195	//     },
21196	//     "forChannelId": {
21197	//       "description": "The forChannelId parameter specifies a comma-separated list of channel IDs. The API response will then only contain subscriptions matching those channels.",
21198	//       "location": "query",
21199	//       "type": "string"
21200	//     },
21201	//     "id": {
21202	//       "description": "The id parameter specifies a comma-separated list of the YouTube subscription ID(s) for the resource(s) that are being retrieved. In a subscription resource, the id property specifies the YouTube subscription ID.",
21203	//       "location": "query",
21204	//       "type": "string"
21205	//     },
21206	//     "maxResults": {
21207	//       "default": "5",
21208	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
21209	//       "format": "uint32",
21210	//       "location": "query",
21211	//       "maximum": "50",
21212	//       "minimum": "0",
21213	//       "type": "integer"
21214	//     },
21215	//     "mine": {
21216	//       "description": "Set this parameter's value to true to retrieve a feed of the authenticated user's subscriptions.",
21217	//       "location": "query",
21218	//       "type": "boolean"
21219	//     },
21220	//     "myRecentSubscribers": {
21221	//       "description": "Set this parameter's value to true to retrieve a feed of the subscribers of the authenticated user in reverse chronological order (newest first).",
21222	//       "location": "query",
21223	//       "type": "boolean"
21224	//     },
21225	//     "mySubscribers": {
21226	//       "description": "Set this parameter's value to true to retrieve a feed of the subscribers of the authenticated user in no particular order.",
21227	//       "location": "query",
21228	//       "type": "boolean"
21229	//     },
21230	//     "onBehalfOfContentOwner": {
21231	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
21232	//       "location": "query",
21233	//       "type": "string"
21234	//     },
21235	//     "onBehalfOfContentOwnerChannel": {
21236	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
21237	//       "location": "query",
21238	//       "type": "string"
21239	//     },
21240	//     "order": {
21241	//       "default": "SUBSCRIPTION_ORDER_RELEVANCE",
21242	//       "description": "The order parameter specifies the method that will be used to sort resources in the API response.",
21243	//       "enum": [
21244	//         "alphabetical",
21245	//         "relevance",
21246	//         "unread"
21247	//       ],
21248	//       "enumDescriptions": [
21249	//         "Sort alphabetically.",
21250	//         "Sort by relevance.",
21251	//         "Sort by order of activity."
21252	//       ],
21253	//       "location": "query",
21254	//       "type": "string"
21255	//     },
21256	//     "pageToken": {
21257	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
21258	//       "location": "query",
21259	//       "type": "string"
21260	//     },
21261	//     "part": {
21262	//       "description": "The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties.",
21263	//       "location": "query",
21264	//       "required": true,
21265	//       "type": "string"
21266	//     }
21267	//   },
21268	//   "path": "subscriptions",
21269	//   "response": {
21270	//     "$ref": "SubscriptionListResponse"
21271	//   },
21272	//   "scopes": [
21273	//     "https://www.googleapis.com/auth/youtube",
21274	//     "https://www.googleapis.com/auth/youtube.force-ssl",
21275	//     "https://www.googleapis.com/auth/youtube.readonly",
21276	//     "https://www.googleapis.com/auth/youtubepartner"
21277	//   ]
21278	// }
21279
21280}
21281
21282// Pages invokes f for each page of results.
21283// A non-nil error returned from f will halt the iteration.
21284// The provided context supersedes any context provided to the Context method.
21285func (c *SubscriptionsListCall) Pages(ctx context.Context, f func(*SubscriptionListResponse) error) error {
21286	c.ctx_ = ctx
21287	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21288	for {
21289		x, err := c.Do()
21290		if err != nil {
21291			return err
21292		}
21293		if err := f(x); err != nil {
21294			return err
21295		}
21296		if x.NextPageToken == "" {
21297			return nil
21298		}
21299		c.PageToken(x.NextPageToken)
21300	}
21301}
21302
21303// method id "youtube.superChatEvents.list":
21304
21305type SuperChatEventsListCall struct {
21306	s            *Service
21307	urlParams_   gensupport.URLParams
21308	ifNoneMatch_ string
21309	ctx_         context.Context
21310	header_      http.Header
21311}
21312
21313// List: Lists Super Chat events for a channel.
21314func (r *SuperChatEventsService) List(part string) *SuperChatEventsListCall {
21315	c := &SuperChatEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21316	c.urlParams_.Set("part", part)
21317	return c
21318}
21319
21320// Hl sets the optional parameter "hl": The hl parameter instructs the
21321// API to retrieve localized resource metadata for a specific
21322// application language that the YouTube website supports. The parameter
21323// value must be a language code included in the list returned by the
21324// i18nLanguages.list method.
21325//
21326// If localized resource details are available in that language, the
21327// resource's snippet.localized object will contain the localized
21328// values. However, if localized details are not available, the
21329// snippet.localized object will contain resource details in the
21330// resource's default language.
21331func (c *SuperChatEventsListCall) Hl(hl string) *SuperChatEventsListCall {
21332	c.urlParams_.Set("hl", hl)
21333	return c
21334}
21335
21336// MaxResults sets the optional parameter "maxResults": The maxResults
21337// parameter specifies the maximum number of items that should be
21338// returned in the result set.
21339func (c *SuperChatEventsListCall) MaxResults(maxResults int64) *SuperChatEventsListCall {
21340	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21341	return c
21342}
21343
21344// PageToken sets the optional parameter "pageToken": The pageToken
21345// parameter identifies a specific page in the result set that should be
21346// returned. In an API response, the nextPageToken and prevPageToken
21347// properties identify other pages that could be retrieved.
21348func (c *SuperChatEventsListCall) PageToken(pageToken string) *SuperChatEventsListCall {
21349	c.urlParams_.Set("pageToken", pageToken)
21350	return c
21351}
21352
21353// Fields allows partial responses to be retrieved. See
21354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21355// for more information.
21356func (c *SuperChatEventsListCall) Fields(s ...googleapi.Field) *SuperChatEventsListCall {
21357	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21358	return c
21359}
21360
21361// IfNoneMatch sets the optional parameter which makes the operation
21362// fail if the object's ETag matches the given value. This is useful for
21363// getting updates only after the object has changed since the last
21364// request. Use googleapi.IsNotModified to check whether the response
21365// error from Do is the result of In-None-Match.
21366func (c *SuperChatEventsListCall) IfNoneMatch(entityTag string) *SuperChatEventsListCall {
21367	c.ifNoneMatch_ = entityTag
21368	return c
21369}
21370
21371// Context sets the context to be used in this call's Do method. Any
21372// pending HTTP request will be aborted if the provided context is
21373// canceled.
21374func (c *SuperChatEventsListCall) Context(ctx context.Context) *SuperChatEventsListCall {
21375	c.ctx_ = ctx
21376	return c
21377}
21378
21379// Header returns an http.Header that can be modified by the caller to
21380// add HTTP headers to the request.
21381func (c *SuperChatEventsListCall) Header() http.Header {
21382	if c.header_ == nil {
21383		c.header_ = make(http.Header)
21384	}
21385	return c.header_
21386}
21387
21388func (c *SuperChatEventsListCall) doRequest(alt string) (*http.Response, error) {
21389	reqHeaders := make(http.Header)
21390	for k, v := range c.header_ {
21391		reqHeaders[k] = v
21392	}
21393	reqHeaders.Set("User-Agent", c.s.userAgent())
21394	if c.ifNoneMatch_ != "" {
21395		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21396	}
21397	var body io.Reader = nil
21398	c.urlParams_.Set("alt", alt)
21399	c.urlParams_.Set("prettyPrint", "false")
21400	urls := googleapi.ResolveRelative(c.s.BasePath, "superChatEvents")
21401	urls += "?" + c.urlParams_.Encode()
21402	req, err := http.NewRequest("GET", urls, body)
21403	if err != nil {
21404		return nil, err
21405	}
21406	req.Header = reqHeaders
21407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21408}
21409
21410// Do executes the "youtube.superChatEvents.list" call.
21411// Exactly one of *SuperChatEventListResponse or error will be non-nil.
21412// Any non-2xx status code is an error. Response headers are in either
21413// *SuperChatEventListResponse.ServerResponse.Header or (if a response
21414// was returned at all) in error.(*googleapi.Error).Header. Use
21415// googleapi.IsNotModified to check whether the returned error was
21416// because http.StatusNotModified was returned.
21417func (c *SuperChatEventsListCall) Do(opts ...googleapi.CallOption) (*SuperChatEventListResponse, error) {
21418	gensupport.SetOptions(c.urlParams_, opts...)
21419	res, err := c.doRequest("json")
21420	if res != nil && res.StatusCode == http.StatusNotModified {
21421		if res.Body != nil {
21422			res.Body.Close()
21423		}
21424		return nil, &googleapi.Error{
21425			Code:   res.StatusCode,
21426			Header: res.Header,
21427		}
21428	}
21429	if err != nil {
21430		return nil, err
21431	}
21432	defer googleapi.CloseBody(res)
21433	if err := googleapi.CheckResponse(res); err != nil {
21434		return nil, err
21435	}
21436	ret := &SuperChatEventListResponse{
21437		ServerResponse: googleapi.ServerResponse{
21438			Header:         res.Header,
21439			HTTPStatusCode: res.StatusCode,
21440		},
21441	}
21442	target := &ret
21443	if err := gensupport.DecodeResponse(target, res); err != nil {
21444		return nil, err
21445	}
21446	return ret, nil
21447	// {
21448	//   "description": "Lists Super Chat events for a channel.",
21449	//   "httpMethod": "GET",
21450	//   "id": "youtube.superChatEvents.list",
21451	//   "parameterOrder": [
21452	//     "part"
21453	//   ],
21454	//   "parameters": {
21455	//     "hl": {
21456	//       "description": "The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method.\n\nIf localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language.",
21457	//       "location": "query",
21458	//       "type": "string"
21459	//     },
21460	//     "maxResults": {
21461	//       "default": "5",
21462	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
21463	//       "format": "uint32",
21464	//       "location": "query",
21465	//       "maximum": "50",
21466	//       "minimum": "1",
21467	//       "type": "integer"
21468	//     },
21469	//     "pageToken": {
21470	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.",
21471	//       "location": "query",
21472	//       "type": "string"
21473	//     },
21474	//     "part": {
21475	//       "description": "The part parameter specifies the superChatEvent resource parts that the API response will include. Supported values are id and snippet.",
21476	//       "location": "query",
21477	//       "required": true,
21478	//       "type": "string"
21479	//     }
21480	//   },
21481	//   "path": "superChatEvents",
21482	//   "response": {
21483	//     "$ref": "SuperChatEventListResponse"
21484	//   },
21485	//   "scopes": [
21486	//     "https://www.googleapis.com/auth/youtube",
21487	//     "https://www.googleapis.com/auth/youtube.force-ssl",
21488	//     "https://www.googleapis.com/auth/youtube.readonly"
21489	//   ]
21490	// }
21491
21492}
21493
21494// Pages invokes f for each page of results.
21495// A non-nil error returned from f will halt the iteration.
21496// The provided context supersedes any context provided to the Context method.
21497func (c *SuperChatEventsListCall) Pages(ctx context.Context, f func(*SuperChatEventListResponse) error) error {
21498	c.ctx_ = ctx
21499	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21500	for {
21501		x, err := c.Do()
21502		if err != nil {
21503			return err
21504		}
21505		if err := f(x); err != nil {
21506			return err
21507		}
21508		if x.NextPageToken == "" {
21509			return nil
21510		}
21511		c.PageToken(x.NextPageToken)
21512	}
21513}
21514
21515// method id "youtube.thumbnails.set":
21516
21517type ThumbnailsSetCall struct {
21518	s          *Service
21519	urlParams_ gensupport.URLParams
21520	mediaInfo_ *gensupport.MediaInfo
21521	ctx_       context.Context
21522	header_    http.Header
21523}
21524
21525// Set: Uploads a custom video thumbnail to YouTube and sets it for a
21526// video.
21527func (r *ThumbnailsService) Set(videoId string) *ThumbnailsSetCall {
21528	c := &ThumbnailsSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21529	c.urlParams_.Set("videoId", videoId)
21530	return c
21531}
21532
21533// OnBehalfOfContentOwner sets the optional parameter
21534// "onBehalfOfContentOwner": Note: This parameter is intended
21535// exclusively for YouTube content partners.
21536//
21537// The onBehalfOfContentOwner parameter indicates that the request's
21538// authorization credentials identify a YouTube CMS user who is acting
21539// on behalf of the content owner specified in the parameter value. This
21540// parameter is intended for YouTube content partners that own and
21541// manage many different YouTube channels. It allows content owners to
21542// authenticate once and get access to all their video and channel data,
21543// without having to provide authentication credentials for each
21544// individual channel. The actual CMS account that the user
21545// authenticates with must be linked to the specified YouTube content
21546// owner.
21547func (c *ThumbnailsSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ThumbnailsSetCall {
21548	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
21549	return c
21550}
21551
21552// Media specifies the media to upload in one or more chunks. The chunk
21553// size may be controlled by supplying a MediaOption generated by
21554// googleapi.ChunkSize. The chunk size defaults to
21555// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
21556// upload request will be determined by sniffing the contents of r,
21557// unless a MediaOption generated by googleapi.ContentType is
21558// supplied.
21559// At most one of Media and ResumableMedia may be set.
21560func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *ThumbnailsSetCall {
21561	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
21562	return c
21563}
21564
21565// ResumableMedia specifies the media to upload in chunks and can be
21566// canceled with ctx.
21567//
21568// Deprecated: use Media instead.
21569//
21570// At most one of Media and ResumableMedia may be set. mediaType
21571// identifies the MIME media type of the upload, such as "image/png". If
21572// mediaType is "", it will be auto-detected. The provided ctx will
21573// supersede any context previously provided to the Context method.
21574func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ThumbnailsSetCall {
21575	c.ctx_ = ctx
21576	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
21577	return c
21578}
21579
21580// ProgressUpdater provides a callback function that will be called
21581// after every chunk. It should be a low-latency function in order to
21582// not slow down the upload operation. This should only be called when
21583// using ResumableMedia (as opposed to Media).
21584func (c *ThumbnailsSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ThumbnailsSetCall {
21585	c.mediaInfo_.SetProgressUpdater(pu)
21586	return c
21587}
21588
21589// Fields allows partial responses to be retrieved. See
21590// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21591// for more information.
21592func (c *ThumbnailsSetCall) Fields(s ...googleapi.Field) *ThumbnailsSetCall {
21593	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21594	return c
21595}
21596
21597// Context sets the context to be used in this call's Do method. Any
21598// pending HTTP request will be aborted if the provided context is
21599// canceled.
21600// This context will supersede any context previously provided to the
21601// ResumableMedia method.
21602func (c *ThumbnailsSetCall) Context(ctx context.Context) *ThumbnailsSetCall {
21603	c.ctx_ = ctx
21604	return c
21605}
21606
21607// Header returns an http.Header that can be modified by the caller to
21608// add HTTP headers to the request.
21609func (c *ThumbnailsSetCall) Header() http.Header {
21610	if c.header_ == nil {
21611		c.header_ = make(http.Header)
21612	}
21613	return c.header_
21614}
21615
21616func (c *ThumbnailsSetCall) doRequest(alt string) (*http.Response, error) {
21617	reqHeaders := make(http.Header)
21618	for k, v := range c.header_ {
21619		reqHeaders[k] = v
21620	}
21621	reqHeaders.Set("User-Agent", c.s.userAgent())
21622	var body io.Reader = nil
21623	c.urlParams_.Set("alt", alt)
21624	c.urlParams_.Set("prettyPrint", "false")
21625	urls := googleapi.ResolveRelative(c.s.BasePath, "thumbnails/set")
21626	if c.mediaInfo_ != nil {
21627		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
21628		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
21629	}
21630	if body == nil {
21631		body = new(bytes.Buffer)
21632		reqHeaders.Set("Content-Type", "application/json")
21633	}
21634	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
21635	defer cleanup()
21636	urls += "?" + c.urlParams_.Encode()
21637	req, err := http.NewRequest("POST", urls, body)
21638	if err != nil {
21639		return nil, err
21640	}
21641	req.Header = reqHeaders
21642	req.GetBody = getBody
21643	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21644}
21645
21646// Do executes the "youtube.thumbnails.set" call.
21647// Exactly one of *ThumbnailSetResponse or error will be non-nil. Any
21648// non-2xx status code is an error. Response headers are in either
21649// *ThumbnailSetResponse.ServerResponse.Header or (if a response was
21650// returned at all) in error.(*googleapi.Error).Header. Use
21651// googleapi.IsNotModified to check whether the returned error was
21652// because http.StatusNotModified was returned.
21653func (c *ThumbnailsSetCall) Do(opts ...googleapi.CallOption) (*ThumbnailSetResponse, error) {
21654	gensupport.SetOptions(c.urlParams_, opts...)
21655	res, err := c.doRequest("json")
21656	if res != nil && res.StatusCode == http.StatusNotModified {
21657		if res.Body != nil {
21658			res.Body.Close()
21659		}
21660		return nil, &googleapi.Error{
21661			Code:   res.StatusCode,
21662			Header: res.Header,
21663		}
21664	}
21665	if err != nil {
21666		return nil, err
21667	}
21668	defer googleapi.CloseBody(res)
21669	if err := googleapi.CheckResponse(res); err != nil {
21670		return nil, err
21671	}
21672	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
21673	if rx != nil {
21674		rx.Client = c.s.client
21675		rx.UserAgent = c.s.userAgent()
21676		ctx := c.ctx_
21677		if ctx == nil {
21678			ctx = context.TODO()
21679		}
21680		res, err = rx.Upload(ctx)
21681		if err != nil {
21682			return nil, err
21683		}
21684		defer res.Body.Close()
21685		if err := googleapi.CheckResponse(res); err != nil {
21686			return nil, err
21687		}
21688	}
21689	ret := &ThumbnailSetResponse{
21690		ServerResponse: googleapi.ServerResponse{
21691			Header:         res.Header,
21692			HTTPStatusCode: res.StatusCode,
21693		},
21694	}
21695	target := &ret
21696	if err := gensupport.DecodeResponse(target, res); err != nil {
21697		return nil, err
21698	}
21699	return ret, nil
21700	// {
21701	//   "description": "Uploads a custom video thumbnail to YouTube and sets it for a video.",
21702	//   "httpMethod": "POST",
21703	//   "id": "youtube.thumbnails.set",
21704	//   "mediaUpload": {
21705	//     "accept": [
21706	//       "application/octet-stream",
21707	//       "image/jpeg",
21708	//       "image/png"
21709	//     ],
21710	//     "maxSize": "2MB",
21711	//     "protocols": {
21712	//       "resumable": {
21713	//         "multipart": true,
21714	//         "path": "/resumable/upload/youtube/v3/thumbnails/set"
21715	//       },
21716	//       "simple": {
21717	//         "multipart": true,
21718	//         "path": "/upload/youtube/v3/thumbnails/set"
21719	//       }
21720	//     }
21721	//   },
21722	//   "parameterOrder": [
21723	//     "videoId"
21724	//   ],
21725	//   "parameters": {
21726	//     "onBehalfOfContentOwner": {
21727	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
21728	//       "location": "query",
21729	//       "type": "string"
21730	//     },
21731	//     "videoId": {
21732	//       "description": "The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided.",
21733	//       "location": "query",
21734	//       "required": true,
21735	//       "type": "string"
21736	//     }
21737	//   },
21738	//   "path": "thumbnails/set",
21739	//   "response": {
21740	//     "$ref": "ThumbnailSetResponse"
21741	//   },
21742	//   "scopes": [
21743	//     "https://www.googleapis.com/auth/youtube",
21744	//     "https://www.googleapis.com/auth/youtube.force-ssl",
21745	//     "https://www.googleapis.com/auth/youtube.upload",
21746	//     "https://www.googleapis.com/auth/youtubepartner"
21747	//   ],
21748	//   "supportsMediaUpload": true
21749	// }
21750
21751}
21752
21753// method id "youtube.videoAbuseReportReasons.list":
21754
21755type VideoAbuseReportReasonsListCall struct {
21756	s            *Service
21757	urlParams_   gensupport.URLParams
21758	ifNoneMatch_ string
21759	ctx_         context.Context
21760	header_      http.Header
21761}
21762
21763// List: Returns a list of abuse reasons that can be used for reporting
21764// abusive videos.
21765func (r *VideoAbuseReportReasonsService) List(part string) *VideoAbuseReportReasonsListCall {
21766	c := &VideoAbuseReportReasonsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21767	c.urlParams_.Set("part", part)
21768	return c
21769}
21770
21771// Hl sets the optional parameter "hl": The hl parameter specifies the
21772// language that should be used for text values in the API response.
21773func (c *VideoAbuseReportReasonsListCall) Hl(hl string) *VideoAbuseReportReasonsListCall {
21774	c.urlParams_.Set("hl", hl)
21775	return c
21776}
21777
21778// Fields allows partial responses to be retrieved. See
21779// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21780// for more information.
21781func (c *VideoAbuseReportReasonsListCall) Fields(s ...googleapi.Field) *VideoAbuseReportReasonsListCall {
21782	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21783	return c
21784}
21785
21786// IfNoneMatch sets the optional parameter which makes the operation
21787// fail if the object's ETag matches the given value. This is useful for
21788// getting updates only after the object has changed since the last
21789// request. Use googleapi.IsNotModified to check whether the response
21790// error from Do is the result of In-None-Match.
21791func (c *VideoAbuseReportReasonsListCall) IfNoneMatch(entityTag string) *VideoAbuseReportReasonsListCall {
21792	c.ifNoneMatch_ = entityTag
21793	return c
21794}
21795
21796// Context sets the context to be used in this call's Do method. Any
21797// pending HTTP request will be aborted if the provided context is
21798// canceled.
21799func (c *VideoAbuseReportReasonsListCall) Context(ctx context.Context) *VideoAbuseReportReasonsListCall {
21800	c.ctx_ = ctx
21801	return c
21802}
21803
21804// Header returns an http.Header that can be modified by the caller to
21805// add HTTP headers to the request.
21806func (c *VideoAbuseReportReasonsListCall) Header() http.Header {
21807	if c.header_ == nil {
21808		c.header_ = make(http.Header)
21809	}
21810	return c.header_
21811}
21812
21813func (c *VideoAbuseReportReasonsListCall) doRequest(alt string) (*http.Response, error) {
21814	reqHeaders := make(http.Header)
21815	for k, v := range c.header_ {
21816		reqHeaders[k] = v
21817	}
21818	reqHeaders.Set("User-Agent", c.s.userAgent())
21819	if c.ifNoneMatch_ != "" {
21820		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21821	}
21822	var body io.Reader = nil
21823	c.urlParams_.Set("alt", alt)
21824	c.urlParams_.Set("prettyPrint", "false")
21825	urls := googleapi.ResolveRelative(c.s.BasePath, "videoAbuseReportReasons")
21826	urls += "?" + c.urlParams_.Encode()
21827	req, err := http.NewRequest("GET", urls, body)
21828	if err != nil {
21829		return nil, err
21830	}
21831	req.Header = reqHeaders
21832	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21833}
21834
21835// Do executes the "youtube.videoAbuseReportReasons.list" call.
21836// Exactly one of *VideoAbuseReportReasonListResponse or error will be
21837// non-nil. Any non-2xx status code is an error. Response headers are in
21838// either *VideoAbuseReportReasonListResponse.ServerResponse.Header or
21839// (if a response was returned at all) in
21840// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21841// whether the returned error was because http.StatusNotModified was
21842// returned.
21843func (c *VideoAbuseReportReasonsListCall) Do(opts ...googleapi.CallOption) (*VideoAbuseReportReasonListResponse, error) {
21844	gensupport.SetOptions(c.urlParams_, opts...)
21845	res, err := c.doRequest("json")
21846	if res != nil && res.StatusCode == http.StatusNotModified {
21847		if res.Body != nil {
21848			res.Body.Close()
21849		}
21850		return nil, &googleapi.Error{
21851			Code:   res.StatusCode,
21852			Header: res.Header,
21853		}
21854	}
21855	if err != nil {
21856		return nil, err
21857	}
21858	defer googleapi.CloseBody(res)
21859	if err := googleapi.CheckResponse(res); err != nil {
21860		return nil, err
21861	}
21862	ret := &VideoAbuseReportReasonListResponse{
21863		ServerResponse: googleapi.ServerResponse{
21864			Header:         res.Header,
21865			HTTPStatusCode: res.StatusCode,
21866		},
21867	}
21868	target := &ret
21869	if err := gensupport.DecodeResponse(target, res); err != nil {
21870		return nil, err
21871	}
21872	return ret, nil
21873	// {
21874	//   "description": "Returns a list of abuse reasons that can be used for reporting abusive videos.",
21875	//   "httpMethod": "GET",
21876	//   "id": "youtube.videoAbuseReportReasons.list",
21877	//   "parameterOrder": [
21878	//     "part"
21879	//   ],
21880	//   "parameters": {
21881	//     "hl": {
21882	//       "default": "en_US",
21883	//       "description": "The hl parameter specifies the language that should be used for text values in the API response.",
21884	//       "location": "query",
21885	//       "type": "string"
21886	//     },
21887	//     "part": {
21888	//       "description": "The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.",
21889	//       "location": "query",
21890	//       "required": true,
21891	//       "type": "string"
21892	//     }
21893	//   },
21894	//   "path": "videoAbuseReportReasons",
21895	//   "response": {
21896	//     "$ref": "VideoAbuseReportReasonListResponse"
21897	//   },
21898	//   "scopes": [
21899	//     "https://www.googleapis.com/auth/youtube",
21900	//     "https://www.googleapis.com/auth/youtube.force-ssl",
21901	//     "https://www.googleapis.com/auth/youtube.readonly"
21902	//   ]
21903	// }
21904
21905}
21906
21907// method id "youtube.videoCategories.list":
21908
21909type VideoCategoriesListCall struct {
21910	s            *Service
21911	urlParams_   gensupport.URLParams
21912	ifNoneMatch_ string
21913	ctx_         context.Context
21914	header_      http.Header
21915}
21916
21917// List: Returns a list of categories that can be associated with
21918// YouTube videos.
21919func (r *VideoCategoriesService) List(part string) *VideoCategoriesListCall {
21920	c := &VideoCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21921	c.urlParams_.Set("part", part)
21922	return c
21923}
21924
21925// Hl sets the optional parameter "hl": The hl parameter specifies the
21926// language that should be used for text values in the API response.
21927func (c *VideoCategoriesListCall) Hl(hl string) *VideoCategoriesListCall {
21928	c.urlParams_.Set("hl", hl)
21929	return c
21930}
21931
21932// Id sets the optional parameter "id": The id parameter specifies a
21933// comma-separated list of video category IDs for the resources that you
21934// are retrieving.
21935func (c *VideoCategoriesListCall) Id(id string) *VideoCategoriesListCall {
21936	c.urlParams_.Set("id", id)
21937	return c
21938}
21939
21940// RegionCode sets the optional parameter "regionCode": The regionCode
21941// parameter instructs the API to return the list of video categories
21942// available in the specified country. The parameter value is an ISO
21943// 3166-1 alpha-2 country code.
21944func (c *VideoCategoriesListCall) RegionCode(regionCode string) *VideoCategoriesListCall {
21945	c.urlParams_.Set("regionCode", regionCode)
21946	return c
21947}
21948
21949// Fields allows partial responses to be retrieved. See
21950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21951// for more information.
21952func (c *VideoCategoriesListCall) Fields(s ...googleapi.Field) *VideoCategoriesListCall {
21953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21954	return c
21955}
21956
21957// IfNoneMatch sets the optional parameter which makes the operation
21958// fail if the object's ETag matches the given value. This is useful for
21959// getting updates only after the object has changed since the last
21960// request. Use googleapi.IsNotModified to check whether the response
21961// error from Do is the result of In-None-Match.
21962func (c *VideoCategoriesListCall) IfNoneMatch(entityTag string) *VideoCategoriesListCall {
21963	c.ifNoneMatch_ = entityTag
21964	return c
21965}
21966
21967// Context sets the context to be used in this call's Do method. Any
21968// pending HTTP request will be aborted if the provided context is
21969// canceled.
21970func (c *VideoCategoriesListCall) Context(ctx context.Context) *VideoCategoriesListCall {
21971	c.ctx_ = ctx
21972	return c
21973}
21974
21975// Header returns an http.Header that can be modified by the caller to
21976// add HTTP headers to the request.
21977func (c *VideoCategoriesListCall) Header() http.Header {
21978	if c.header_ == nil {
21979		c.header_ = make(http.Header)
21980	}
21981	return c.header_
21982}
21983
21984func (c *VideoCategoriesListCall) doRequest(alt string) (*http.Response, error) {
21985	reqHeaders := make(http.Header)
21986	for k, v := range c.header_ {
21987		reqHeaders[k] = v
21988	}
21989	reqHeaders.Set("User-Agent", c.s.userAgent())
21990	if c.ifNoneMatch_ != "" {
21991		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21992	}
21993	var body io.Reader = nil
21994	c.urlParams_.Set("alt", alt)
21995	c.urlParams_.Set("prettyPrint", "false")
21996	urls := googleapi.ResolveRelative(c.s.BasePath, "videoCategories")
21997	urls += "?" + c.urlParams_.Encode()
21998	req, err := http.NewRequest("GET", urls, body)
21999	if err != nil {
22000		return nil, err
22001	}
22002	req.Header = reqHeaders
22003	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22004}
22005
22006// Do executes the "youtube.videoCategories.list" call.
22007// Exactly one of *VideoCategoryListResponse or error will be non-nil.
22008// Any non-2xx status code is an error. Response headers are in either
22009// *VideoCategoryListResponse.ServerResponse.Header or (if a response
22010// was returned at all) in error.(*googleapi.Error).Header. Use
22011// googleapi.IsNotModified to check whether the returned error was
22012// because http.StatusNotModified was returned.
22013func (c *VideoCategoriesListCall) Do(opts ...googleapi.CallOption) (*VideoCategoryListResponse, error) {
22014	gensupport.SetOptions(c.urlParams_, opts...)
22015	res, err := c.doRequest("json")
22016	if res != nil && res.StatusCode == http.StatusNotModified {
22017		if res.Body != nil {
22018			res.Body.Close()
22019		}
22020		return nil, &googleapi.Error{
22021			Code:   res.StatusCode,
22022			Header: res.Header,
22023		}
22024	}
22025	if err != nil {
22026		return nil, err
22027	}
22028	defer googleapi.CloseBody(res)
22029	if err := googleapi.CheckResponse(res); err != nil {
22030		return nil, err
22031	}
22032	ret := &VideoCategoryListResponse{
22033		ServerResponse: googleapi.ServerResponse{
22034			Header:         res.Header,
22035			HTTPStatusCode: res.StatusCode,
22036		},
22037	}
22038	target := &ret
22039	if err := gensupport.DecodeResponse(target, res); err != nil {
22040		return nil, err
22041	}
22042	return ret, nil
22043	// {
22044	//   "description": "Returns a list of categories that can be associated with YouTube videos.",
22045	//   "httpMethod": "GET",
22046	//   "id": "youtube.videoCategories.list",
22047	//   "parameterOrder": [
22048	//     "part"
22049	//   ],
22050	//   "parameters": {
22051	//     "hl": {
22052	//       "default": "en_US",
22053	//       "description": "The hl parameter specifies the language that should be used for text values in the API response.",
22054	//       "location": "query",
22055	//       "type": "string"
22056	//     },
22057	//     "id": {
22058	//       "description": "The id parameter specifies a comma-separated list of video category IDs for the resources that you are retrieving.",
22059	//       "location": "query",
22060	//       "type": "string"
22061	//     },
22062	//     "part": {
22063	//       "description": "The part parameter specifies the videoCategory resource properties that the API response will include. Set the parameter value to snippet.",
22064	//       "location": "query",
22065	//       "required": true,
22066	//       "type": "string"
22067	//     },
22068	//     "regionCode": {
22069	//       "description": "The regionCode parameter instructs the API to return the list of video categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.",
22070	//       "location": "query",
22071	//       "type": "string"
22072	//     }
22073	//   },
22074	//   "path": "videoCategories",
22075	//   "response": {
22076	//     "$ref": "VideoCategoryListResponse"
22077	//   },
22078	//   "scopes": [
22079	//     "https://www.googleapis.com/auth/youtube",
22080	//     "https://www.googleapis.com/auth/youtube.force-ssl",
22081	//     "https://www.googleapis.com/auth/youtube.readonly",
22082	//     "https://www.googleapis.com/auth/youtubepartner"
22083	//   ]
22084	// }
22085
22086}
22087
22088// method id "youtube.videos.delete":
22089
22090type VideosDeleteCall struct {
22091	s          *Service
22092	urlParams_ gensupport.URLParams
22093	ctx_       context.Context
22094	header_    http.Header
22095}
22096
22097// Delete: Deletes a YouTube video.
22098func (r *VideosService) Delete(id string) *VideosDeleteCall {
22099	c := &VideosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22100	c.urlParams_.Set("id", id)
22101	return c
22102}
22103
22104// OnBehalfOfContentOwner sets the optional parameter
22105// "onBehalfOfContentOwner": Note: This parameter is intended
22106// exclusively for YouTube content partners.
22107//
22108// The onBehalfOfContentOwner parameter indicates that the request's
22109// authorization credentials identify a YouTube CMS user who is acting
22110// on behalf of the content owner specified in the parameter value. This
22111// parameter is intended for YouTube content partners that own and
22112// manage many different YouTube channels. It allows content owners to
22113// authenticate once and get access to all their video and channel data,
22114// without having to provide authentication credentials for each
22115// individual channel. The actual CMS account that the user
22116// authenticates with must be linked to the specified YouTube content
22117// owner.
22118func (c *VideosDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosDeleteCall {
22119	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
22120	return c
22121}
22122
22123// Fields allows partial responses to be retrieved. See
22124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22125// for more information.
22126func (c *VideosDeleteCall) Fields(s ...googleapi.Field) *VideosDeleteCall {
22127	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22128	return c
22129}
22130
22131// Context sets the context to be used in this call's Do method. Any
22132// pending HTTP request will be aborted if the provided context is
22133// canceled.
22134func (c *VideosDeleteCall) Context(ctx context.Context) *VideosDeleteCall {
22135	c.ctx_ = ctx
22136	return c
22137}
22138
22139// Header returns an http.Header that can be modified by the caller to
22140// add HTTP headers to the request.
22141func (c *VideosDeleteCall) Header() http.Header {
22142	if c.header_ == nil {
22143		c.header_ = make(http.Header)
22144	}
22145	return c.header_
22146}
22147
22148func (c *VideosDeleteCall) doRequest(alt string) (*http.Response, error) {
22149	reqHeaders := make(http.Header)
22150	for k, v := range c.header_ {
22151		reqHeaders[k] = v
22152	}
22153	reqHeaders.Set("User-Agent", c.s.userAgent())
22154	var body io.Reader = nil
22155	c.urlParams_.Set("alt", alt)
22156	c.urlParams_.Set("prettyPrint", "false")
22157	urls := googleapi.ResolveRelative(c.s.BasePath, "videos")
22158	urls += "?" + c.urlParams_.Encode()
22159	req, err := http.NewRequest("DELETE", urls, body)
22160	if err != nil {
22161		return nil, err
22162	}
22163	req.Header = reqHeaders
22164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22165}
22166
22167// Do executes the "youtube.videos.delete" call.
22168func (c *VideosDeleteCall) Do(opts ...googleapi.CallOption) error {
22169	gensupport.SetOptions(c.urlParams_, opts...)
22170	res, err := c.doRequest("json")
22171	if err != nil {
22172		return err
22173	}
22174	defer googleapi.CloseBody(res)
22175	if err := googleapi.CheckResponse(res); err != nil {
22176		return err
22177	}
22178	return nil
22179	// {
22180	//   "description": "Deletes a YouTube video.",
22181	//   "httpMethod": "DELETE",
22182	//   "id": "youtube.videos.delete",
22183	//   "parameterOrder": [
22184	//     "id"
22185	//   ],
22186	//   "parameters": {
22187	//     "id": {
22188	//       "description": "The id parameter specifies the YouTube video ID for the resource that is being deleted. In a video resource, the id property specifies the video's ID.",
22189	//       "location": "query",
22190	//       "required": true,
22191	//       "type": "string"
22192	//     },
22193	//     "onBehalfOfContentOwner": {
22194	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
22195	//       "location": "query",
22196	//       "type": "string"
22197	//     }
22198	//   },
22199	//   "path": "videos",
22200	//   "scopes": [
22201	//     "https://www.googleapis.com/auth/youtube",
22202	//     "https://www.googleapis.com/auth/youtube.force-ssl",
22203	//     "https://www.googleapis.com/auth/youtubepartner"
22204	//   ]
22205	// }
22206
22207}
22208
22209// method id "youtube.videos.getRating":
22210
22211type VideosGetRatingCall struct {
22212	s            *Service
22213	urlParams_   gensupport.URLParams
22214	ifNoneMatch_ string
22215	ctx_         context.Context
22216	header_      http.Header
22217}
22218
22219// GetRating: Retrieves the ratings that the authorized user gave to a
22220// list of specified videos.
22221func (r *VideosService) GetRating(id string) *VideosGetRatingCall {
22222	c := &VideosGetRatingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22223	c.urlParams_.Set("id", id)
22224	return c
22225}
22226
22227// OnBehalfOfContentOwner sets the optional parameter
22228// "onBehalfOfContentOwner": Note: This parameter is intended
22229// exclusively for YouTube content partners.
22230//
22231// The onBehalfOfContentOwner parameter indicates that the request's
22232// authorization credentials identify a YouTube CMS user who is acting
22233// on behalf of the content owner specified in the parameter value. This
22234// parameter is intended for YouTube content partners that own and
22235// manage many different YouTube channels. It allows content owners to
22236// authenticate once and get access to all their video and channel data,
22237// without having to provide authentication credentials for each
22238// individual channel. The CMS account that the user authenticates with
22239// must be linked to the specified YouTube content owner.
22240func (c *VideosGetRatingCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosGetRatingCall {
22241	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
22242	return c
22243}
22244
22245// Fields allows partial responses to be retrieved. See
22246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22247// for more information.
22248func (c *VideosGetRatingCall) Fields(s ...googleapi.Field) *VideosGetRatingCall {
22249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22250	return c
22251}
22252
22253// IfNoneMatch sets the optional parameter which makes the operation
22254// fail if the object's ETag matches the given value. This is useful for
22255// getting updates only after the object has changed since the last
22256// request. Use googleapi.IsNotModified to check whether the response
22257// error from Do is the result of In-None-Match.
22258func (c *VideosGetRatingCall) IfNoneMatch(entityTag string) *VideosGetRatingCall {
22259	c.ifNoneMatch_ = entityTag
22260	return c
22261}
22262
22263// Context sets the context to be used in this call's Do method. Any
22264// pending HTTP request will be aborted if the provided context is
22265// canceled.
22266func (c *VideosGetRatingCall) Context(ctx context.Context) *VideosGetRatingCall {
22267	c.ctx_ = ctx
22268	return c
22269}
22270
22271// Header returns an http.Header that can be modified by the caller to
22272// add HTTP headers to the request.
22273func (c *VideosGetRatingCall) Header() http.Header {
22274	if c.header_ == nil {
22275		c.header_ = make(http.Header)
22276	}
22277	return c.header_
22278}
22279
22280func (c *VideosGetRatingCall) doRequest(alt string) (*http.Response, error) {
22281	reqHeaders := make(http.Header)
22282	for k, v := range c.header_ {
22283		reqHeaders[k] = v
22284	}
22285	reqHeaders.Set("User-Agent", c.s.userAgent())
22286	if c.ifNoneMatch_ != "" {
22287		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22288	}
22289	var body io.Reader = nil
22290	c.urlParams_.Set("alt", alt)
22291	c.urlParams_.Set("prettyPrint", "false")
22292	urls := googleapi.ResolveRelative(c.s.BasePath, "videos/getRating")
22293	urls += "?" + c.urlParams_.Encode()
22294	req, err := http.NewRequest("GET", urls, body)
22295	if err != nil {
22296		return nil, err
22297	}
22298	req.Header = reqHeaders
22299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22300}
22301
22302// Do executes the "youtube.videos.getRating" call.
22303// Exactly one of *VideoGetRatingResponse or error will be non-nil. Any
22304// non-2xx status code is an error. Response headers are in either
22305// *VideoGetRatingResponse.ServerResponse.Header or (if a response was
22306// returned at all) in error.(*googleapi.Error).Header. Use
22307// googleapi.IsNotModified to check whether the returned error was
22308// because http.StatusNotModified was returned.
22309func (c *VideosGetRatingCall) Do(opts ...googleapi.CallOption) (*VideoGetRatingResponse, error) {
22310	gensupport.SetOptions(c.urlParams_, opts...)
22311	res, err := c.doRequest("json")
22312	if res != nil && res.StatusCode == http.StatusNotModified {
22313		if res.Body != nil {
22314			res.Body.Close()
22315		}
22316		return nil, &googleapi.Error{
22317			Code:   res.StatusCode,
22318			Header: res.Header,
22319		}
22320	}
22321	if err != nil {
22322		return nil, err
22323	}
22324	defer googleapi.CloseBody(res)
22325	if err := googleapi.CheckResponse(res); err != nil {
22326		return nil, err
22327	}
22328	ret := &VideoGetRatingResponse{
22329		ServerResponse: googleapi.ServerResponse{
22330			Header:         res.Header,
22331			HTTPStatusCode: res.StatusCode,
22332		},
22333	}
22334	target := &ret
22335	if err := gensupport.DecodeResponse(target, res); err != nil {
22336		return nil, err
22337	}
22338	return ret, nil
22339	// {
22340	//   "description": "Retrieves the ratings that the authorized user gave to a list of specified videos.",
22341	//   "httpMethod": "GET",
22342	//   "id": "youtube.videos.getRating",
22343	//   "parameterOrder": [
22344	//     "id"
22345	//   ],
22346	//   "parameters": {
22347	//     "id": {
22348	//       "description": "The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) for which you are retrieving rating data. In a video resource, the id property specifies the video's ID.",
22349	//       "location": "query",
22350	//       "required": true,
22351	//       "type": "string"
22352	//     },
22353	//     "onBehalfOfContentOwner": {
22354	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
22355	//       "location": "query",
22356	//       "type": "string"
22357	//     }
22358	//   },
22359	//   "path": "videos/getRating",
22360	//   "response": {
22361	//     "$ref": "VideoGetRatingResponse"
22362	//   },
22363	//   "scopes": [
22364	//     "https://www.googleapis.com/auth/youtube",
22365	//     "https://www.googleapis.com/auth/youtube.force-ssl",
22366	//     "https://www.googleapis.com/auth/youtubepartner"
22367	//   ]
22368	// }
22369
22370}
22371
22372// method id "youtube.videos.insert":
22373
22374type VideosInsertCall struct {
22375	s          *Service
22376	video      *Video
22377	urlParams_ gensupport.URLParams
22378	mediaInfo_ *gensupport.MediaInfo
22379	ctx_       context.Context
22380	header_    http.Header
22381}
22382
22383// Insert: Uploads a video to YouTube and optionally sets the video's
22384// metadata.
22385func (r *VideosService) Insert(part string, video *Video) *VideosInsertCall {
22386	c := &VideosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22387	c.urlParams_.Set("part", part)
22388	c.video = video
22389	return c
22390}
22391
22392// AutoLevels sets the optional parameter "autoLevels": The autoLevels
22393// parameter indicates whether YouTube should automatically enhance the
22394// video's lighting and color.
22395func (c *VideosInsertCall) AutoLevels(autoLevels bool) *VideosInsertCall {
22396	c.urlParams_.Set("autoLevels", fmt.Sprint(autoLevels))
22397	return c
22398}
22399
22400// NotifySubscribers sets the optional parameter "notifySubscribers":
22401// The notifySubscribers parameter indicates whether YouTube should send
22402// a notification about the new video to users who subscribe to the
22403// video's channel. A parameter value of True indicates that subscribers
22404// will be notified of newly uploaded videos. However, a channel owner
22405// who is uploading many videos might prefer to set the value to False
22406// to avoid sending a notification about each new video to the channel's
22407// subscribers.
22408func (c *VideosInsertCall) NotifySubscribers(notifySubscribers bool) *VideosInsertCall {
22409	c.urlParams_.Set("notifySubscribers", fmt.Sprint(notifySubscribers))
22410	return c
22411}
22412
22413// OnBehalfOfContentOwner sets the optional parameter
22414// "onBehalfOfContentOwner": Note: This parameter is intended
22415// exclusively for YouTube content partners.
22416//
22417// The onBehalfOfContentOwner parameter indicates that the request's
22418// authorization credentials identify a YouTube CMS user who is acting
22419// on behalf of the content owner specified in the parameter value. This
22420// parameter is intended for YouTube content partners that own and
22421// manage many different YouTube channels. It allows content owners to
22422// authenticate once and get access to all their video and channel data,
22423// without having to provide authentication credentials for each
22424// individual channel. The CMS account that the user authenticates with
22425// must be linked to the specified YouTube content owner.
22426func (c *VideosInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosInsertCall {
22427	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
22428	return c
22429}
22430
22431// OnBehalfOfContentOwnerChannel sets the optional parameter
22432// "onBehalfOfContentOwnerChannel": This parameter can only be used in a
22433// properly authorized request. Note: This parameter is intended
22434// exclusively for YouTube content partners.
22435//
22436// The onBehalfOfContentOwnerChannel parameter specifies the YouTube
22437// channel ID of the channel to which a video is being added. This
22438// parameter is required when a request specifies a value for the
22439// onBehalfOfContentOwner parameter, and it can only be used in
22440// conjunction with that parameter. In addition, the request must be
22441// authorized using a CMS account that is linked to the content owner
22442// that the onBehalfOfContentOwner parameter specifies. Finally, the
22443// channel that the onBehalfOfContentOwnerChannel parameter value
22444// specifies must be linked to the content owner that the
22445// onBehalfOfContentOwner parameter specifies.
22446//
22447// This parameter is intended for YouTube content partners that own and
22448// manage many different YouTube channels. It allows content owners to
22449// authenticate once and perform actions on behalf of the channel
22450// specified in the parameter value, without having to provide
22451// authentication credentials for each separate channel.
22452func (c *VideosInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *VideosInsertCall {
22453	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
22454	return c
22455}
22456
22457// Stabilize sets the optional parameter "stabilize": The stabilize
22458// parameter indicates whether YouTube should adjust the video to remove
22459// shaky camera motions.
22460func (c *VideosInsertCall) Stabilize(stabilize bool) *VideosInsertCall {
22461	c.urlParams_.Set("stabilize", fmt.Sprint(stabilize))
22462	return c
22463}
22464
22465// Media specifies the media to upload in one or more chunks. The chunk
22466// size may be controlled by supplying a MediaOption generated by
22467// googleapi.ChunkSize. The chunk size defaults to
22468// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
22469// upload request will be determined by sniffing the contents of r,
22470// unless a MediaOption generated by googleapi.ContentType is
22471// supplied.
22472// At most one of Media and ResumableMedia may be set.
22473func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *VideosInsertCall {
22474	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
22475	return c
22476}
22477
22478// ResumableMedia specifies the media to upload in chunks and can be
22479// canceled with ctx.
22480//
22481// Deprecated: use Media instead.
22482//
22483// At most one of Media and ResumableMedia may be set. mediaType
22484// identifies the MIME media type of the upload, such as "image/png". If
22485// mediaType is "", it will be auto-detected. The provided ctx will
22486// supersede any context previously provided to the Context method.
22487func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *VideosInsertCall {
22488	c.ctx_ = ctx
22489	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
22490	return c
22491}
22492
22493// ProgressUpdater provides a callback function that will be called
22494// after every chunk. It should be a low-latency function in order to
22495// not slow down the upload operation. This should only be called when
22496// using ResumableMedia (as opposed to Media).
22497func (c *VideosInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *VideosInsertCall {
22498	c.mediaInfo_.SetProgressUpdater(pu)
22499	return c
22500}
22501
22502// Fields allows partial responses to be retrieved. See
22503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22504// for more information.
22505func (c *VideosInsertCall) Fields(s ...googleapi.Field) *VideosInsertCall {
22506	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22507	return c
22508}
22509
22510// Context sets the context to be used in this call's Do method. Any
22511// pending HTTP request will be aborted if the provided context is
22512// canceled.
22513// This context will supersede any context previously provided to the
22514// ResumableMedia method.
22515func (c *VideosInsertCall) Context(ctx context.Context) *VideosInsertCall {
22516	c.ctx_ = ctx
22517	return c
22518}
22519
22520// Header returns an http.Header that can be modified by the caller to
22521// add HTTP headers to the request.
22522func (c *VideosInsertCall) Header() http.Header {
22523	if c.header_ == nil {
22524		c.header_ = make(http.Header)
22525	}
22526	return c.header_
22527}
22528
22529func (c *VideosInsertCall) doRequest(alt string) (*http.Response, error) {
22530	reqHeaders := make(http.Header)
22531	for k, v := range c.header_ {
22532		reqHeaders[k] = v
22533	}
22534	reqHeaders.Set("User-Agent", c.s.userAgent())
22535	var body io.Reader = nil
22536	body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
22537	if err != nil {
22538		return nil, err
22539	}
22540	reqHeaders.Set("Content-Type", "application/json")
22541	c.urlParams_.Set("alt", alt)
22542	c.urlParams_.Set("prettyPrint", "false")
22543	urls := googleapi.ResolveRelative(c.s.BasePath, "videos")
22544	if c.mediaInfo_ != nil {
22545		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
22546		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
22547	}
22548	if body == nil {
22549		body = new(bytes.Buffer)
22550		reqHeaders.Set("Content-Type", "application/json")
22551	}
22552	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
22553	defer cleanup()
22554	urls += "?" + c.urlParams_.Encode()
22555	req, err := http.NewRequest("POST", urls, body)
22556	if err != nil {
22557		return nil, err
22558	}
22559	req.Header = reqHeaders
22560	req.GetBody = getBody
22561	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22562}
22563
22564// Do executes the "youtube.videos.insert" call.
22565// Exactly one of *Video or error will be non-nil. Any non-2xx status
22566// code is an error. Response headers are in either
22567// *Video.ServerResponse.Header or (if a response was returned at all)
22568// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22569// check whether the returned error was because http.StatusNotModified
22570// was returned.
22571func (c *VideosInsertCall) Do(opts ...googleapi.CallOption) (*Video, error) {
22572	gensupport.SetOptions(c.urlParams_, opts...)
22573	res, err := c.doRequest("json")
22574	if res != nil && res.StatusCode == http.StatusNotModified {
22575		if res.Body != nil {
22576			res.Body.Close()
22577		}
22578		return nil, &googleapi.Error{
22579			Code:   res.StatusCode,
22580			Header: res.Header,
22581		}
22582	}
22583	if err != nil {
22584		return nil, err
22585	}
22586	defer googleapi.CloseBody(res)
22587	if err := googleapi.CheckResponse(res); err != nil {
22588		return nil, err
22589	}
22590	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
22591	if rx != nil {
22592		rx.Client = c.s.client
22593		rx.UserAgent = c.s.userAgent()
22594		ctx := c.ctx_
22595		if ctx == nil {
22596			ctx = context.TODO()
22597		}
22598		res, err = rx.Upload(ctx)
22599		if err != nil {
22600			return nil, err
22601		}
22602		defer res.Body.Close()
22603		if err := googleapi.CheckResponse(res); err != nil {
22604			return nil, err
22605		}
22606	}
22607	ret := &Video{
22608		ServerResponse: googleapi.ServerResponse{
22609			Header:         res.Header,
22610			HTTPStatusCode: res.StatusCode,
22611		},
22612	}
22613	target := &ret
22614	if err := gensupport.DecodeResponse(target, res); err != nil {
22615		return nil, err
22616	}
22617	return ret, nil
22618	// {
22619	//   "description": "Uploads a video to YouTube and optionally sets the video's metadata.",
22620	//   "httpMethod": "POST",
22621	//   "id": "youtube.videos.insert",
22622	//   "mediaUpload": {
22623	//     "accept": [
22624	//       "application/octet-stream",
22625	//       "video/*"
22626	//     ],
22627	//     "maxSize": "64GB",
22628	//     "protocols": {
22629	//       "resumable": {
22630	//         "multipart": true,
22631	//         "path": "/resumable/upload/youtube/v3/videos"
22632	//       },
22633	//       "simple": {
22634	//         "multipart": true,
22635	//         "path": "/upload/youtube/v3/videos"
22636	//       }
22637	//     }
22638	//   },
22639	//   "parameterOrder": [
22640	//     "part"
22641	//   ],
22642	//   "parameters": {
22643	//     "autoLevels": {
22644	//       "description": "The autoLevels parameter indicates whether YouTube should automatically enhance the video's lighting and color.",
22645	//       "location": "query",
22646	//       "type": "boolean"
22647	//     },
22648	//     "notifySubscribers": {
22649	//       "default": "true",
22650	//       "description": "The notifySubscribers parameter indicates whether YouTube should send a notification about the new video to users who subscribe to the video's channel. A parameter value of True indicates that subscribers will be notified of newly uploaded videos. However, a channel owner who is uploading many videos might prefer to set the value to False to avoid sending a notification about each new video to the channel's subscribers.",
22651	//       "location": "query",
22652	//       "type": "boolean"
22653	//     },
22654	//     "onBehalfOfContentOwner": {
22655	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
22656	//       "location": "query",
22657	//       "type": "string"
22658	//     },
22659	//     "onBehalfOfContentOwnerChannel": {
22660	//       "description": "This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.\n\nThis parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.",
22661	//       "location": "query",
22662	//       "type": "string"
22663	//     },
22664	//     "part": {
22665	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nNote that not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.",
22666	//       "location": "query",
22667	//       "required": true,
22668	//       "type": "string"
22669	//     },
22670	//     "stabilize": {
22671	//       "description": "The stabilize parameter indicates whether YouTube should adjust the video to remove shaky camera motions.",
22672	//       "location": "query",
22673	//       "type": "boolean"
22674	//     }
22675	//   },
22676	//   "path": "videos",
22677	//   "request": {
22678	//     "$ref": "Video"
22679	//   },
22680	//   "response": {
22681	//     "$ref": "Video"
22682	//   },
22683	//   "scopes": [
22684	//     "https://www.googleapis.com/auth/youtube",
22685	//     "https://www.googleapis.com/auth/youtube.force-ssl",
22686	//     "https://www.googleapis.com/auth/youtube.upload",
22687	//     "https://www.googleapis.com/auth/youtubepartner"
22688	//   ],
22689	//   "supportsMediaUpload": true
22690	// }
22691
22692}
22693
22694// method id "youtube.videos.list":
22695
22696type VideosListCall struct {
22697	s            *Service
22698	urlParams_   gensupport.URLParams
22699	ifNoneMatch_ string
22700	ctx_         context.Context
22701	header_      http.Header
22702}
22703
22704// List: Returns a list of videos that match the API request parameters.
22705func (r *VideosService) List(part string) *VideosListCall {
22706	c := &VideosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22707	c.urlParams_.Set("part", part)
22708	return c
22709}
22710
22711// Chart sets the optional parameter "chart": The chart parameter
22712// identifies the chart that you want to retrieve.
22713//
22714// Possible values:
22715//   "mostPopular" - Return the most popular videos for the specified
22716// content region and video category.
22717func (c *VideosListCall) Chart(chart string) *VideosListCall {
22718	c.urlParams_.Set("chart", chart)
22719	return c
22720}
22721
22722// Hl sets the optional parameter "hl": The hl parameter instructs the
22723// API to retrieve localized resource metadata for a specific
22724// application language that the YouTube website supports. The parameter
22725// value must be a language code included in the list returned by the
22726// i18nLanguages.list method.
22727//
22728// If localized resource details are available in that language, the
22729// resource's snippet.localized object will contain the localized
22730// values. However, if localized details are not available, the
22731// snippet.localized object will contain resource details in the
22732// resource's default language.
22733func (c *VideosListCall) Hl(hl string) *VideosListCall {
22734	c.urlParams_.Set("hl", hl)
22735	return c
22736}
22737
22738// Id sets the optional parameter "id": The id parameter specifies a
22739// comma-separated list of the YouTube video ID(s) for the resource(s)
22740// that are being retrieved. In a video resource, the id property
22741// specifies the video's ID.
22742func (c *VideosListCall) Id(id string) *VideosListCall {
22743	c.urlParams_.Set("id", id)
22744	return c
22745}
22746
22747// Locale sets the optional parameter "locale": DEPRECATED
22748func (c *VideosListCall) Locale(locale string) *VideosListCall {
22749	c.urlParams_.Set("locale", locale)
22750	return c
22751}
22752
22753// MaxHeight sets the optional parameter "maxHeight": The maxHeight
22754// parameter specifies a maximum height of the embedded player. If
22755// maxWidth is provided, maxHeight may not be reached in order to not
22756// violate the width request.
22757func (c *VideosListCall) MaxHeight(maxHeight int64) *VideosListCall {
22758	c.urlParams_.Set("maxHeight", fmt.Sprint(maxHeight))
22759	return c
22760}
22761
22762// MaxResults sets the optional parameter "maxResults": The maxResults
22763// parameter specifies the maximum number of items that should be
22764// returned in the result set.
22765//
22766// Note: This parameter is supported for use in conjunction with the
22767// myRating and chart parameters, but it is not supported for use in
22768// conjunction with the id parameter.
22769func (c *VideosListCall) MaxResults(maxResults int64) *VideosListCall {
22770	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22771	return c
22772}
22773
22774// MaxWidth sets the optional parameter "maxWidth": The maxWidth
22775// parameter specifies a maximum width of the embedded player. If
22776// maxHeight is provided, maxWidth may not be reached in order to not
22777// violate the height request.
22778func (c *VideosListCall) MaxWidth(maxWidth int64) *VideosListCall {
22779	c.urlParams_.Set("maxWidth", fmt.Sprint(maxWidth))
22780	return c
22781}
22782
22783// MyRating sets the optional parameter "myRating": Set this parameter's
22784// value to like or dislike to instruct the API to only return videos
22785// liked or disliked by the authenticated user.
22786//
22787// Possible values:
22788//   "dislike" - Returns only videos disliked by the authenticated user.
22789//   "like" - Returns only video liked by the authenticated user.
22790func (c *VideosListCall) MyRating(myRating string) *VideosListCall {
22791	c.urlParams_.Set("myRating", myRating)
22792	return c
22793}
22794
22795// OnBehalfOfContentOwner sets the optional parameter
22796// "onBehalfOfContentOwner": Note: This parameter is intended
22797// exclusively for YouTube content partners.
22798//
22799// The onBehalfOfContentOwner parameter indicates that the request's
22800// authorization credentials identify a YouTube CMS user who is acting
22801// on behalf of the content owner specified in the parameter value. This
22802// parameter is intended for YouTube content partners that own and
22803// manage many different YouTube channels. It allows content owners to
22804// authenticate once and get access to all their video and channel data,
22805// without having to provide authentication credentials for each
22806// individual channel. The CMS account that the user authenticates with
22807// must be linked to the specified YouTube content owner.
22808func (c *VideosListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosListCall {
22809	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
22810	return c
22811}
22812
22813// PageToken sets the optional parameter "pageToken": The pageToken
22814// parameter identifies a specific page in the result set that should be
22815// returned. In an API response, the nextPageToken and prevPageToken
22816// properties identify other pages that could be retrieved.
22817//
22818// Note: This parameter is supported for use in conjunction with the
22819// myRating and chart parameters, but it is not supported for use in
22820// conjunction with the id parameter.
22821func (c *VideosListCall) PageToken(pageToken string) *VideosListCall {
22822	c.urlParams_.Set("pageToken", pageToken)
22823	return c
22824}
22825
22826// RegionCode sets the optional parameter "regionCode": The regionCode
22827// parameter instructs the API to select a video chart available in the
22828// specified region. This parameter can only be used in conjunction with
22829// the chart parameter. The parameter value is an ISO 3166-1 alpha-2
22830// country code.
22831func (c *VideosListCall) RegionCode(regionCode string) *VideosListCall {
22832	c.urlParams_.Set("regionCode", regionCode)
22833	return c
22834}
22835
22836// VideoCategoryId sets the optional parameter "videoCategoryId": The
22837// videoCategoryId parameter identifies the video category for which the
22838// chart should be retrieved. This parameter can only be used in
22839// conjunction with the chart parameter. By default, charts are not
22840// restricted to a particular category.
22841func (c *VideosListCall) VideoCategoryId(videoCategoryId string) *VideosListCall {
22842	c.urlParams_.Set("videoCategoryId", videoCategoryId)
22843	return c
22844}
22845
22846// Fields allows partial responses to be retrieved. See
22847// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22848// for more information.
22849func (c *VideosListCall) Fields(s ...googleapi.Field) *VideosListCall {
22850	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22851	return c
22852}
22853
22854// IfNoneMatch sets the optional parameter which makes the operation
22855// fail if the object's ETag matches the given value. This is useful for
22856// getting updates only after the object has changed since the last
22857// request. Use googleapi.IsNotModified to check whether the response
22858// error from Do is the result of In-None-Match.
22859func (c *VideosListCall) IfNoneMatch(entityTag string) *VideosListCall {
22860	c.ifNoneMatch_ = entityTag
22861	return c
22862}
22863
22864// Context sets the context to be used in this call's Do method. Any
22865// pending HTTP request will be aborted if the provided context is
22866// canceled.
22867func (c *VideosListCall) Context(ctx context.Context) *VideosListCall {
22868	c.ctx_ = ctx
22869	return c
22870}
22871
22872// Header returns an http.Header that can be modified by the caller to
22873// add HTTP headers to the request.
22874func (c *VideosListCall) Header() http.Header {
22875	if c.header_ == nil {
22876		c.header_ = make(http.Header)
22877	}
22878	return c.header_
22879}
22880
22881func (c *VideosListCall) doRequest(alt string) (*http.Response, error) {
22882	reqHeaders := make(http.Header)
22883	for k, v := range c.header_ {
22884		reqHeaders[k] = v
22885	}
22886	reqHeaders.Set("User-Agent", c.s.userAgent())
22887	if c.ifNoneMatch_ != "" {
22888		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22889	}
22890	var body io.Reader = nil
22891	c.urlParams_.Set("alt", alt)
22892	c.urlParams_.Set("prettyPrint", "false")
22893	urls := googleapi.ResolveRelative(c.s.BasePath, "videos")
22894	urls += "?" + c.urlParams_.Encode()
22895	req, err := http.NewRequest("GET", urls, body)
22896	if err != nil {
22897		return nil, err
22898	}
22899	req.Header = reqHeaders
22900	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22901}
22902
22903// Do executes the "youtube.videos.list" call.
22904// Exactly one of *VideoListResponse or error will be non-nil. Any
22905// non-2xx status code is an error. Response headers are in either
22906// *VideoListResponse.ServerResponse.Header or (if a response was
22907// returned at all) in error.(*googleapi.Error).Header. Use
22908// googleapi.IsNotModified to check whether the returned error was
22909// because http.StatusNotModified was returned.
22910func (c *VideosListCall) Do(opts ...googleapi.CallOption) (*VideoListResponse, error) {
22911	gensupport.SetOptions(c.urlParams_, opts...)
22912	res, err := c.doRequest("json")
22913	if res != nil && res.StatusCode == http.StatusNotModified {
22914		if res.Body != nil {
22915			res.Body.Close()
22916		}
22917		return nil, &googleapi.Error{
22918			Code:   res.StatusCode,
22919			Header: res.Header,
22920		}
22921	}
22922	if err != nil {
22923		return nil, err
22924	}
22925	defer googleapi.CloseBody(res)
22926	if err := googleapi.CheckResponse(res); err != nil {
22927		return nil, err
22928	}
22929	ret := &VideoListResponse{
22930		ServerResponse: googleapi.ServerResponse{
22931			Header:         res.Header,
22932			HTTPStatusCode: res.StatusCode,
22933		},
22934	}
22935	target := &ret
22936	if err := gensupport.DecodeResponse(target, res); err != nil {
22937		return nil, err
22938	}
22939	return ret, nil
22940	// {
22941	//   "description": "Returns a list of videos that match the API request parameters.",
22942	//   "httpMethod": "GET",
22943	//   "id": "youtube.videos.list",
22944	//   "parameterOrder": [
22945	//     "part"
22946	//   ],
22947	//   "parameters": {
22948	//     "chart": {
22949	//       "description": "The chart parameter identifies the chart that you want to retrieve.",
22950	//       "enum": [
22951	//         "mostPopular"
22952	//       ],
22953	//       "enumDescriptions": [
22954	//         "Return the most popular videos for the specified content region and video category."
22955	//       ],
22956	//       "location": "query",
22957	//       "type": "string"
22958	//     },
22959	//     "hl": {
22960	//       "description": "The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method.\n\nIf localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language.",
22961	//       "location": "query",
22962	//       "type": "string"
22963	//     },
22964	//     "id": {
22965	//       "description": "The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID.",
22966	//       "location": "query",
22967	//       "type": "string"
22968	//     },
22969	//     "locale": {
22970	//       "description": "DEPRECATED",
22971	//       "location": "query",
22972	//       "type": "string"
22973	//     },
22974	//     "maxHeight": {
22975	//       "description": "The maxHeight parameter specifies a maximum height of the embedded player. If maxWidth is provided, maxHeight may not be reached in order to not violate the width request.",
22976	//       "format": "uint32",
22977	//       "location": "query",
22978	//       "maximum": "8192",
22979	//       "minimum": "72",
22980	//       "type": "integer"
22981	//     },
22982	//     "maxResults": {
22983	//       "default": "5",
22984	//       "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.\n\nNote: This parameter is supported for use in conjunction with the myRating and chart parameters, but it is not supported for use in conjunction with the id parameter.",
22985	//       "format": "uint32",
22986	//       "location": "query",
22987	//       "maximum": "50",
22988	//       "minimum": "1",
22989	//       "type": "integer"
22990	//     },
22991	//     "maxWidth": {
22992	//       "description": "The maxWidth parameter specifies a maximum width of the embedded player. If maxHeight is provided, maxWidth may not be reached in order to not violate the height request.",
22993	//       "format": "uint32",
22994	//       "location": "query",
22995	//       "maximum": "8192",
22996	//       "minimum": "72",
22997	//       "type": "integer"
22998	//     },
22999	//     "myRating": {
23000	//       "description": "Set this parameter's value to like or dislike to instruct the API to only return videos liked or disliked by the authenticated user.",
23001	//       "enum": [
23002	//         "dislike",
23003	//         "like"
23004	//       ],
23005	//       "enumDescriptions": [
23006	//         "Returns only videos disliked by the authenticated user.",
23007	//         "Returns only video liked by the authenticated user."
23008	//       ],
23009	//       "location": "query",
23010	//       "type": "string"
23011	//     },
23012	//     "onBehalfOfContentOwner": {
23013	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
23014	//       "location": "query",
23015	//       "type": "string"
23016	//     },
23017	//     "pageToken": {
23018	//       "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.\n\nNote: This parameter is supported for use in conjunction with the myRating and chart parameters, but it is not supported for use in conjunction with the id parameter.",
23019	//       "location": "query",
23020	//       "type": "string"
23021	//     },
23022	//     "part": {
23023	//       "description": "The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include.\n\nIf the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties.",
23024	//       "location": "query",
23025	//       "required": true,
23026	//       "type": "string"
23027	//     },
23028	//     "regionCode": {
23029	//       "description": "The regionCode parameter instructs the API to select a video chart available in the specified region. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code.",
23030	//       "location": "query",
23031	//       "type": "string"
23032	//     },
23033	//     "videoCategoryId": {
23034	//       "default": "0",
23035	//       "description": "The videoCategoryId parameter identifies the video category for which the chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. By default, charts are not restricted to a particular category.",
23036	//       "location": "query",
23037	//       "type": "string"
23038	//     }
23039	//   },
23040	//   "path": "videos",
23041	//   "response": {
23042	//     "$ref": "VideoListResponse"
23043	//   },
23044	//   "scopes": [
23045	//     "https://www.googleapis.com/auth/youtube",
23046	//     "https://www.googleapis.com/auth/youtube.force-ssl",
23047	//     "https://www.googleapis.com/auth/youtube.readonly",
23048	//     "https://www.googleapis.com/auth/youtubepartner"
23049	//   ]
23050	// }
23051
23052}
23053
23054// Pages invokes f for each page of results.
23055// A non-nil error returned from f will halt the iteration.
23056// The provided context supersedes any context provided to the Context method.
23057func (c *VideosListCall) Pages(ctx context.Context, f func(*VideoListResponse) error) error {
23058	c.ctx_ = ctx
23059	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23060	for {
23061		x, err := c.Do()
23062		if err != nil {
23063			return err
23064		}
23065		if err := f(x); err != nil {
23066			return err
23067		}
23068		if x.NextPageToken == "" {
23069			return nil
23070		}
23071		c.PageToken(x.NextPageToken)
23072	}
23073}
23074
23075// method id "youtube.videos.rate":
23076
23077type VideosRateCall struct {
23078	s          *Service
23079	urlParams_ gensupport.URLParams
23080	ctx_       context.Context
23081	header_    http.Header
23082}
23083
23084// Rate: Add a like or dislike rating to a video or remove a rating from
23085// a video.
23086func (r *VideosService) Rate(id string, rating string) *VideosRateCall {
23087	c := &VideosRateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23088	c.urlParams_.Set("id", id)
23089	c.urlParams_.Set("rating", rating)
23090	return c
23091}
23092
23093// Fields allows partial responses to be retrieved. See
23094// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23095// for more information.
23096func (c *VideosRateCall) Fields(s ...googleapi.Field) *VideosRateCall {
23097	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23098	return c
23099}
23100
23101// Context sets the context to be used in this call's Do method. Any
23102// pending HTTP request will be aborted if the provided context is
23103// canceled.
23104func (c *VideosRateCall) Context(ctx context.Context) *VideosRateCall {
23105	c.ctx_ = ctx
23106	return c
23107}
23108
23109// Header returns an http.Header that can be modified by the caller to
23110// add HTTP headers to the request.
23111func (c *VideosRateCall) Header() http.Header {
23112	if c.header_ == nil {
23113		c.header_ = make(http.Header)
23114	}
23115	return c.header_
23116}
23117
23118func (c *VideosRateCall) doRequest(alt string) (*http.Response, error) {
23119	reqHeaders := make(http.Header)
23120	for k, v := range c.header_ {
23121		reqHeaders[k] = v
23122	}
23123	reqHeaders.Set("User-Agent", c.s.userAgent())
23124	var body io.Reader = nil
23125	c.urlParams_.Set("alt", alt)
23126	c.urlParams_.Set("prettyPrint", "false")
23127	urls := googleapi.ResolveRelative(c.s.BasePath, "videos/rate")
23128	urls += "?" + c.urlParams_.Encode()
23129	req, err := http.NewRequest("POST", urls, body)
23130	if err != nil {
23131		return nil, err
23132	}
23133	req.Header = reqHeaders
23134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23135}
23136
23137// Do executes the "youtube.videos.rate" call.
23138func (c *VideosRateCall) Do(opts ...googleapi.CallOption) error {
23139	gensupport.SetOptions(c.urlParams_, opts...)
23140	res, err := c.doRequest("json")
23141	if err != nil {
23142		return err
23143	}
23144	defer googleapi.CloseBody(res)
23145	if err := googleapi.CheckResponse(res); err != nil {
23146		return err
23147	}
23148	return nil
23149	// {
23150	//   "description": "Add a like or dislike rating to a video or remove a rating from a video.",
23151	//   "httpMethod": "POST",
23152	//   "id": "youtube.videos.rate",
23153	//   "parameterOrder": [
23154	//     "id",
23155	//     "rating"
23156	//   ],
23157	//   "parameters": {
23158	//     "id": {
23159	//       "description": "The id parameter specifies the YouTube video ID of the video that is being rated or having its rating removed.",
23160	//       "location": "query",
23161	//       "required": true,
23162	//       "type": "string"
23163	//     },
23164	//     "rating": {
23165	//       "description": "Specifies the rating to record.",
23166	//       "enum": [
23167	//         "dislike",
23168	//         "like",
23169	//         "none"
23170	//       ],
23171	//       "enumDescriptions": [
23172	//         "Records that the authenticated user disliked the video.",
23173	//         "Records that the authenticated user liked the video.",
23174	//         "Removes any rating that the authenticated user had previously set for the video."
23175	//       ],
23176	//       "location": "query",
23177	//       "required": true,
23178	//       "type": "string"
23179	//     }
23180	//   },
23181	//   "path": "videos/rate",
23182	//   "scopes": [
23183	//     "https://www.googleapis.com/auth/youtube",
23184	//     "https://www.googleapis.com/auth/youtube.force-ssl",
23185	//     "https://www.googleapis.com/auth/youtubepartner"
23186	//   ]
23187	// }
23188
23189}
23190
23191// method id "youtube.videos.reportAbuse":
23192
23193type VideosReportAbuseCall struct {
23194	s                *Service
23195	videoabusereport *VideoAbuseReport
23196	urlParams_       gensupport.URLParams
23197	ctx_             context.Context
23198	header_          http.Header
23199}
23200
23201// ReportAbuse: Report abuse for a video.
23202func (r *VideosService) ReportAbuse(videoabusereport *VideoAbuseReport) *VideosReportAbuseCall {
23203	c := &VideosReportAbuseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23204	c.videoabusereport = videoabusereport
23205	return c
23206}
23207
23208// OnBehalfOfContentOwner sets the optional parameter
23209// "onBehalfOfContentOwner": Note: This parameter is intended
23210// exclusively for YouTube content partners.
23211//
23212// The onBehalfOfContentOwner parameter indicates that the request's
23213// authorization credentials identify a YouTube CMS user who is acting
23214// on behalf of the content owner specified in the parameter value. This
23215// parameter is intended for YouTube content partners that own and
23216// manage many different YouTube channels. It allows content owners to
23217// authenticate once and get access to all their video and channel data,
23218// without having to provide authentication credentials for each
23219// individual channel. The CMS account that the user authenticates with
23220// must be linked to the specified YouTube content owner.
23221func (c *VideosReportAbuseCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosReportAbuseCall {
23222	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
23223	return c
23224}
23225
23226// Fields allows partial responses to be retrieved. See
23227// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23228// for more information.
23229func (c *VideosReportAbuseCall) Fields(s ...googleapi.Field) *VideosReportAbuseCall {
23230	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23231	return c
23232}
23233
23234// Context sets the context to be used in this call's Do method. Any
23235// pending HTTP request will be aborted if the provided context is
23236// canceled.
23237func (c *VideosReportAbuseCall) Context(ctx context.Context) *VideosReportAbuseCall {
23238	c.ctx_ = ctx
23239	return c
23240}
23241
23242// Header returns an http.Header that can be modified by the caller to
23243// add HTTP headers to the request.
23244func (c *VideosReportAbuseCall) Header() http.Header {
23245	if c.header_ == nil {
23246		c.header_ = make(http.Header)
23247	}
23248	return c.header_
23249}
23250
23251func (c *VideosReportAbuseCall) doRequest(alt string) (*http.Response, error) {
23252	reqHeaders := make(http.Header)
23253	for k, v := range c.header_ {
23254		reqHeaders[k] = v
23255	}
23256	reqHeaders.Set("User-Agent", c.s.userAgent())
23257	var body io.Reader = nil
23258	body, err := googleapi.WithoutDataWrapper.JSONReader(c.videoabusereport)
23259	if err != nil {
23260		return nil, err
23261	}
23262	reqHeaders.Set("Content-Type", "application/json")
23263	c.urlParams_.Set("alt", alt)
23264	c.urlParams_.Set("prettyPrint", "false")
23265	urls := googleapi.ResolveRelative(c.s.BasePath, "videos/reportAbuse")
23266	urls += "?" + c.urlParams_.Encode()
23267	req, err := http.NewRequest("POST", urls, body)
23268	if err != nil {
23269		return nil, err
23270	}
23271	req.Header = reqHeaders
23272	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23273}
23274
23275// Do executes the "youtube.videos.reportAbuse" call.
23276func (c *VideosReportAbuseCall) Do(opts ...googleapi.CallOption) error {
23277	gensupport.SetOptions(c.urlParams_, opts...)
23278	res, err := c.doRequest("json")
23279	if err != nil {
23280		return err
23281	}
23282	defer googleapi.CloseBody(res)
23283	if err := googleapi.CheckResponse(res); err != nil {
23284		return err
23285	}
23286	return nil
23287	// {
23288	//   "description": "Report abuse for a video.",
23289	//   "httpMethod": "POST",
23290	//   "id": "youtube.videos.reportAbuse",
23291	//   "parameters": {
23292	//     "onBehalfOfContentOwner": {
23293	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
23294	//       "location": "query",
23295	//       "type": "string"
23296	//     }
23297	//   },
23298	//   "path": "videos/reportAbuse",
23299	//   "request": {
23300	//     "$ref": "VideoAbuseReport"
23301	//   },
23302	//   "scopes": [
23303	//     "https://www.googleapis.com/auth/youtube",
23304	//     "https://www.googleapis.com/auth/youtube.force-ssl",
23305	//     "https://www.googleapis.com/auth/youtubepartner"
23306	//   ]
23307	// }
23308
23309}
23310
23311// method id "youtube.videos.update":
23312
23313type VideosUpdateCall struct {
23314	s          *Service
23315	video      *Video
23316	urlParams_ gensupport.URLParams
23317	ctx_       context.Context
23318	header_    http.Header
23319}
23320
23321// Update: Updates a video's metadata.
23322func (r *VideosService) Update(part string, video *Video) *VideosUpdateCall {
23323	c := &VideosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23324	c.urlParams_.Set("part", part)
23325	c.video = video
23326	return c
23327}
23328
23329// OnBehalfOfContentOwner sets the optional parameter
23330// "onBehalfOfContentOwner": Note: This parameter is intended
23331// exclusively for YouTube content partners.
23332//
23333// The onBehalfOfContentOwner parameter indicates that the request's
23334// authorization credentials identify a YouTube CMS user who is acting
23335// on behalf of the content owner specified in the parameter value. This
23336// parameter is intended for YouTube content partners that own and
23337// manage many different YouTube channels. It allows content owners to
23338// authenticate once and get access to all their video and channel data,
23339// without having to provide authentication credentials for each
23340// individual channel. The actual CMS account that the user
23341// authenticates with must be linked to the specified YouTube content
23342// owner.
23343func (c *VideosUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosUpdateCall {
23344	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
23345	return c
23346}
23347
23348// Fields allows partial responses to be retrieved. See
23349// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23350// for more information.
23351func (c *VideosUpdateCall) Fields(s ...googleapi.Field) *VideosUpdateCall {
23352	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23353	return c
23354}
23355
23356// Context sets the context to be used in this call's Do method. Any
23357// pending HTTP request will be aborted if the provided context is
23358// canceled.
23359func (c *VideosUpdateCall) Context(ctx context.Context) *VideosUpdateCall {
23360	c.ctx_ = ctx
23361	return c
23362}
23363
23364// Header returns an http.Header that can be modified by the caller to
23365// add HTTP headers to the request.
23366func (c *VideosUpdateCall) Header() http.Header {
23367	if c.header_ == nil {
23368		c.header_ = make(http.Header)
23369	}
23370	return c.header_
23371}
23372
23373func (c *VideosUpdateCall) doRequest(alt string) (*http.Response, error) {
23374	reqHeaders := make(http.Header)
23375	for k, v := range c.header_ {
23376		reqHeaders[k] = v
23377	}
23378	reqHeaders.Set("User-Agent", c.s.userAgent())
23379	var body io.Reader = nil
23380	body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
23381	if err != nil {
23382		return nil, err
23383	}
23384	reqHeaders.Set("Content-Type", "application/json")
23385	c.urlParams_.Set("alt", alt)
23386	c.urlParams_.Set("prettyPrint", "false")
23387	urls := googleapi.ResolveRelative(c.s.BasePath, "videos")
23388	urls += "?" + c.urlParams_.Encode()
23389	req, err := http.NewRequest("PUT", urls, body)
23390	if err != nil {
23391		return nil, err
23392	}
23393	req.Header = reqHeaders
23394	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23395}
23396
23397// Do executes the "youtube.videos.update" call.
23398// Exactly one of *Video or error will be non-nil. Any non-2xx status
23399// code is an error. Response headers are in either
23400// *Video.ServerResponse.Header or (if a response was returned at all)
23401// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23402// check whether the returned error was because http.StatusNotModified
23403// was returned.
23404func (c *VideosUpdateCall) Do(opts ...googleapi.CallOption) (*Video, error) {
23405	gensupport.SetOptions(c.urlParams_, opts...)
23406	res, err := c.doRequest("json")
23407	if res != nil && res.StatusCode == http.StatusNotModified {
23408		if res.Body != nil {
23409			res.Body.Close()
23410		}
23411		return nil, &googleapi.Error{
23412			Code:   res.StatusCode,
23413			Header: res.Header,
23414		}
23415	}
23416	if err != nil {
23417		return nil, err
23418	}
23419	defer googleapi.CloseBody(res)
23420	if err := googleapi.CheckResponse(res); err != nil {
23421		return nil, err
23422	}
23423	ret := &Video{
23424		ServerResponse: googleapi.ServerResponse{
23425			Header:         res.Header,
23426			HTTPStatusCode: res.StatusCode,
23427		},
23428	}
23429	target := &ret
23430	if err := gensupport.DecodeResponse(target, res); err != nil {
23431		return nil, err
23432	}
23433	return ret, nil
23434	// {
23435	//   "description": "Updates a video's metadata.",
23436	//   "httpMethod": "PUT",
23437	//   "id": "youtube.videos.update",
23438	//   "parameterOrder": [
23439	//     "part"
23440	//   ],
23441	//   "parameters": {
23442	//     "onBehalfOfContentOwner": {
23443	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
23444	//       "location": "query",
23445	//       "type": "string"
23446	//     },
23447	//     "part": {
23448	//       "description": "The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.\n\nNote that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a video's privacy setting is contained in the status part. As such, if your request is updating a private video, and the request's part parameter value includes the status part, the video's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the video will revert to the default privacy setting.\n\nIn addition, not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.",
23449	//       "location": "query",
23450	//       "required": true,
23451	//       "type": "string"
23452	//     }
23453	//   },
23454	//   "path": "videos",
23455	//   "request": {
23456	//     "$ref": "Video"
23457	//   },
23458	//   "response": {
23459	//     "$ref": "Video"
23460	//   },
23461	//   "scopes": [
23462	//     "https://www.googleapis.com/auth/youtube",
23463	//     "https://www.googleapis.com/auth/youtube.force-ssl",
23464	//     "https://www.googleapis.com/auth/youtubepartner"
23465	//   ]
23466	// }
23467
23468}
23469
23470// method id "youtube.watermarks.set":
23471
23472type WatermarksSetCall struct {
23473	s               *Service
23474	invideobranding *InvideoBranding
23475	urlParams_      gensupport.URLParams
23476	mediaInfo_      *gensupport.MediaInfo
23477	ctx_            context.Context
23478	header_         http.Header
23479}
23480
23481// Set: Uploads a watermark image to YouTube and sets it for a channel.
23482func (r *WatermarksService) Set(channelId string, invideobranding *InvideoBranding) *WatermarksSetCall {
23483	c := &WatermarksSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23484	c.urlParams_.Set("channelId", channelId)
23485	c.invideobranding = invideobranding
23486	return c
23487}
23488
23489// OnBehalfOfContentOwner sets the optional parameter
23490// "onBehalfOfContentOwner": Note: This parameter is intended
23491// exclusively for YouTube content partners.
23492//
23493// The onBehalfOfContentOwner parameter indicates that the request's
23494// authorization credentials identify a YouTube CMS user who is acting
23495// on behalf of the content owner specified in the parameter value. This
23496// parameter is intended for YouTube content partners that own and
23497// manage many different YouTube channels. It allows content owners to
23498// authenticate once and get access to all their video and channel data,
23499// without having to provide authentication credentials for each
23500// individual channel. The CMS account that the user authenticates with
23501// must be linked to the specified YouTube content owner.
23502func (c *WatermarksSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *WatermarksSetCall {
23503	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
23504	return c
23505}
23506
23507// Media specifies the media to upload in one or more chunks. The chunk
23508// size may be controlled by supplying a MediaOption generated by
23509// googleapi.ChunkSize. The chunk size defaults to
23510// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
23511// upload request will be determined by sniffing the contents of r,
23512// unless a MediaOption generated by googleapi.ContentType is
23513// supplied.
23514// At most one of Media and ResumableMedia may be set.
23515func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *WatermarksSetCall {
23516	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
23517	return c
23518}
23519
23520// ResumableMedia specifies the media to upload in chunks and can be
23521// canceled with ctx.
23522//
23523// Deprecated: use Media instead.
23524//
23525// At most one of Media and ResumableMedia may be set. mediaType
23526// identifies the MIME media type of the upload, such as "image/png". If
23527// mediaType is "", it will be auto-detected. The provided ctx will
23528// supersede any context previously provided to the Context method.
23529func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *WatermarksSetCall {
23530	c.ctx_ = ctx
23531	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
23532	return c
23533}
23534
23535// ProgressUpdater provides a callback function that will be called
23536// after every chunk. It should be a low-latency function in order to
23537// not slow down the upload operation. This should only be called when
23538// using ResumableMedia (as opposed to Media).
23539func (c *WatermarksSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *WatermarksSetCall {
23540	c.mediaInfo_.SetProgressUpdater(pu)
23541	return c
23542}
23543
23544// Fields allows partial responses to be retrieved. See
23545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23546// for more information.
23547func (c *WatermarksSetCall) Fields(s ...googleapi.Field) *WatermarksSetCall {
23548	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23549	return c
23550}
23551
23552// Context sets the context to be used in this call's Do method. Any
23553// pending HTTP request will be aborted if the provided context is
23554// canceled.
23555// This context will supersede any context previously provided to the
23556// ResumableMedia method.
23557func (c *WatermarksSetCall) Context(ctx context.Context) *WatermarksSetCall {
23558	c.ctx_ = ctx
23559	return c
23560}
23561
23562// Header returns an http.Header that can be modified by the caller to
23563// add HTTP headers to the request.
23564func (c *WatermarksSetCall) Header() http.Header {
23565	if c.header_ == nil {
23566		c.header_ = make(http.Header)
23567	}
23568	return c.header_
23569}
23570
23571func (c *WatermarksSetCall) doRequest(alt string) (*http.Response, error) {
23572	reqHeaders := make(http.Header)
23573	for k, v := range c.header_ {
23574		reqHeaders[k] = v
23575	}
23576	reqHeaders.Set("User-Agent", c.s.userAgent())
23577	var body io.Reader = nil
23578	body, err := googleapi.WithoutDataWrapper.JSONReader(c.invideobranding)
23579	if err != nil {
23580		return nil, err
23581	}
23582	reqHeaders.Set("Content-Type", "application/json")
23583	c.urlParams_.Set("alt", alt)
23584	c.urlParams_.Set("prettyPrint", "false")
23585	urls := googleapi.ResolveRelative(c.s.BasePath, "watermarks/set")
23586	if c.mediaInfo_ != nil {
23587		urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
23588		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
23589	}
23590	if body == nil {
23591		body = new(bytes.Buffer)
23592		reqHeaders.Set("Content-Type", "application/json")
23593	}
23594	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
23595	defer cleanup()
23596	urls += "?" + c.urlParams_.Encode()
23597	req, err := http.NewRequest("POST", urls, body)
23598	if err != nil {
23599		return nil, err
23600	}
23601	req.Header = reqHeaders
23602	req.GetBody = getBody
23603	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23604}
23605
23606// Do executes the "youtube.watermarks.set" call.
23607func (c *WatermarksSetCall) Do(opts ...googleapi.CallOption) error {
23608	gensupport.SetOptions(c.urlParams_, opts...)
23609	res, err := c.doRequest("json")
23610	if err != nil {
23611		return err
23612	}
23613	defer googleapi.CloseBody(res)
23614	if err := googleapi.CheckResponse(res); err != nil {
23615		return err
23616	}
23617	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
23618	if rx != nil {
23619		rx.Client = c.s.client
23620		rx.UserAgent = c.s.userAgent()
23621		ctx := c.ctx_
23622		if ctx == nil {
23623			ctx = context.TODO()
23624		}
23625		res, err = rx.Upload(ctx)
23626		if err != nil {
23627			return err
23628		}
23629		defer res.Body.Close()
23630		if err := googleapi.CheckResponse(res); err != nil {
23631			return err
23632		}
23633	}
23634	return nil
23635	// {
23636	//   "description": "Uploads a watermark image to YouTube and sets it for a channel.",
23637	//   "httpMethod": "POST",
23638	//   "id": "youtube.watermarks.set",
23639	//   "mediaUpload": {
23640	//     "accept": [
23641	//       "application/octet-stream",
23642	//       "image/jpeg",
23643	//       "image/png"
23644	//     ],
23645	//     "maxSize": "10MB",
23646	//     "protocols": {
23647	//       "resumable": {
23648	//         "multipart": true,
23649	//         "path": "/resumable/upload/youtube/v3/watermarks/set"
23650	//       },
23651	//       "simple": {
23652	//         "multipart": true,
23653	//         "path": "/upload/youtube/v3/watermarks/set"
23654	//       }
23655	//     }
23656	//   },
23657	//   "parameterOrder": [
23658	//     "channelId"
23659	//   ],
23660	//   "parameters": {
23661	//     "channelId": {
23662	//       "description": "The channelId parameter specifies the YouTube channel ID for which the watermark is being provided.",
23663	//       "location": "query",
23664	//       "required": true,
23665	//       "type": "string"
23666	//     },
23667	//     "onBehalfOfContentOwner": {
23668	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
23669	//       "location": "query",
23670	//       "type": "string"
23671	//     }
23672	//   },
23673	//   "path": "watermarks/set",
23674	//   "request": {
23675	//     "$ref": "InvideoBranding"
23676	//   },
23677	//   "scopes": [
23678	//     "https://www.googleapis.com/auth/youtube",
23679	//     "https://www.googleapis.com/auth/youtube.force-ssl",
23680	//     "https://www.googleapis.com/auth/youtube.upload",
23681	//     "https://www.googleapis.com/auth/youtubepartner"
23682	//   ],
23683	//   "supportsMediaUpload": true
23684	// }
23685
23686}
23687
23688// method id "youtube.watermarks.unset":
23689
23690type WatermarksUnsetCall struct {
23691	s          *Service
23692	urlParams_ gensupport.URLParams
23693	ctx_       context.Context
23694	header_    http.Header
23695}
23696
23697// Unset: Deletes a channel's watermark image.
23698func (r *WatermarksService) Unset(channelId string) *WatermarksUnsetCall {
23699	c := &WatermarksUnsetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23700	c.urlParams_.Set("channelId", channelId)
23701	return c
23702}
23703
23704// OnBehalfOfContentOwner sets the optional parameter
23705// "onBehalfOfContentOwner": Note: This parameter is intended
23706// exclusively for YouTube content partners.
23707//
23708// The onBehalfOfContentOwner parameter indicates that the request's
23709// authorization credentials identify a YouTube CMS user who is acting
23710// on behalf of the content owner specified in the parameter value. This
23711// parameter is intended for YouTube content partners that own and
23712// manage many different YouTube channels. It allows content owners to
23713// authenticate once and get access to all their video and channel data,
23714// without having to provide authentication credentials for each
23715// individual channel. The CMS account that the user authenticates with
23716// must be linked to the specified YouTube content owner.
23717func (c *WatermarksUnsetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *WatermarksUnsetCall {
23718	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
23719	return c
23720}
23721
23722// Fields allows partial responses to be retrieved. See
23723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23724// for more information.
23725func (c *WatermarksUnsetCall) Fields(s ...googleapi.Field) *WatermarksUnsetCall {
23726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23727	return c
23728}
23729
23730// Context sets the context to be used in this call's Do method. Any
23731// pending HTTP request will be aborted if the provided context is
23732// canceled.
23733func (c *WatermarksUnsetCall) Context(ctx context.Context) *WatermarksUnsetCall {
23734	c.ctx_ = ctx
23735	return c
23736}
23737
23738// Header returns an http.Header that can be modified by the caller to
23739// add HTTP headers to the request.
23740func (c *WatermarksUnsetCall) Header() http.Header {
23741	if c.header_ == nil {
23742		c.header_ = make(http.Header)
23743	}
23744	return c.header_
23745}
23746
23747func (c *WatermarksUnsetCall) doRequest(alt string) (*http.Response, error) {
23748	reqHeaders := make(http.Header)
23749	for k, v := range c.header_ {
23750		reqHeaders[k] = v
23751	}
23752	reqHeaders.Set("User-Agent", c.s.userAgent())
23753	var body io.Reader = nil
23754	c.urlParams_.Set("alt", alt)
23755	c.urlParams_.Set("prettyPrint", "false")
23756	urls := googleapi.ResolveRelative(c.s.BasePath, "watermarks/unset")
23757	urls += "?" + c.urlParams_.Encode()
23758	req, err := http.NewRequest("POST", urls, body)
23759	if err != nil {
23760		return nil, err
23761	}
23762	req.Header = reqHeaders
23763	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23764}
23765
23766// Do executes the "youtube.watermarks.unset" call.
23767func (c *WatermarksUnsetCall) Do(opts ...googleapi.CallOption) error {
23768	gensupport.SetOptions(c.urlParams_, opts...)
23769	res, err := c.doRequest("json")
23770	if err != nil {
23771		return err
23772	}
23773	defer googleapi.CloseBody(res)
23774	if err := googleapi.CheckResponse(res); err != nil {
23775		return err
23776	}
23777	return nil
23778	// {
23779	//   "description": "Deletes a channel's watermark image.",
23780	//   "httpMethod": "POST",
23781	//   "id": "youtube.watermarks.unset",
23782	//   "parameterOrder": [
23783	//     "channelId"
23784	//   ],
23785	//   "parameters": {
23786	//     "channelId": {
23787	//       "description": "The channelId parameter specifies the YouTube channel ID for which the watermark is being unset.",
23788	//       "location": "query",
23789	//       "required": true,
23790	//       "type": "string"
23791	//     },
23792	//     "onBehalfOfContentOwner": {
23793	//       "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
23794	//       "location": "query",
23795	//       "type": "string"
23796	//     }
23797	//   },
23798	//   "path": "watermarks/unset",
23799	//   "scopes": [
23800	//     "https://www.googleapis.com/auth/youtube",
23801	//     "https://www.googleapis.com/auth/youtube.force-ssl",
23802	//     "https://www.googleapis.com/auth/youtubepartner"
23803	//   ]
23804	// }
23805
23806}
23807