...

Source file src/google.golang.org/api/youtube/v3/youtube-gen.go

Documentation: google.golang.org/api/youtube/v3

     1  // Copyright 2024 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 v3.
     8  //
     9  // For product documentation, see: https://developers.google.com/youtube/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/youtube/v3"
    27  //	...
    28  //	ctx := context.Background()
    29  //	youtubeService, err := youtube.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	youtubeService, err := youtube.NewService(ctx, option.WithScopes(youtube.YoutubepartnerChannelAuditScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	youtubeService, err := youtube.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	youtubeService, err := youtube.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package youtube // import "google.golang.org/api/youtube/v3"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "youtube:v3"
    95  const apiName = "youtube"
    96  const apiVersion = "v3"
    97  const basePath = "https://youtube.googleapis.com/"
    98  const basePathTemplate = "https://youtube.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://youtube.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// Manage your YouTube account
   104  	YoutubeScope = "https://www.googleapis.com/auth/youtube"
   105  
   106  	// See a list of your current active channel members, their current level, and
   107  	// when they became a member
   108  	YoutubeChannelMembershipsCreatorScope = "https://www.googleapis.com/auth/youtube.channel-memberships.creator"
   109  
   110  	// See, edit, and permanently delete your YouTube videos, ratings, comments and
   111  	// captions
   112  	YoutubeForceSslScope = "https://www.googleapis.com/auth/youtube.force-ssl"
   113  
   114  	// View your YouTube account
   115  	YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.readonly"
   116  
   117  	// Manage your YouTube videos
   118  	YoutubeUploadScope = "https://www.googleapis.com/auth/youtube.upload"
   119  
   120  	// View and manage your assets and associated content on YouTube
   121  	YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepartner"
   122  
   123  	// View private information of your YouTube channel relevant during the audit
   124  	// process with a YouTube partner
   125  	YoutubepartnerChannelAuditScope = "https://www.googleapis.com/auth/youtubepartner-channel-audit"
   126  )
   127  
   128  // NewService creates a new Service.
   129  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   130  	scopesOption := internaloption.WithDefaultScopes(
   131  		"https://www.googleapis.com/auth/youtube",
   132  		"https://www.googleapis.com/auth/youtube.channel-memberships.creator",
   133  		"https://www.googleapis.com/auth/youtube.force-ssl",
   134  		"https://www.googleapis.com/auth/youtube.readonly",
   135  		"https://www.googleapis.com/auth/youtube.upload",
   136  		"https://www.googleapis.com/auth/youtubepartner",
   137  		"https://www.googleapis.com/auth/youtubepartner-channel-audit",
   138  	)
   139  	// NOTE: prepend, so we don't override user-specified scopes.
   140  	opts = append([]option.ClientOption{scopesOption}, opts...)
   141  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   142  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   143  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   144  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   145  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   146  	if err != nil {
   147  		return nil, err
   148  	}
   149  	s, err := New(client)
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	if endpoint != "" {
   154  		s.BasePath = endpoint
   155  	}
   156  	return s, nil
   157  }
   158  
   159  // New creates a new Service. It uses the provided http.Client for requests.
   160  //
   161  // Deprecated: please use NewService instead.
   162  // To provide a custom HTTP client, use option.WithHTTPClient.
   163  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   164  func New(client *http.Client) (*Service, error) {
   165  	if client == nil {
   166  		return nil, errors.New("client is nil")
   167  	}
   168  	s := &Service{client: client, BasePath: basePath}
   169  	s.AbuseReports = NewAbuseReportsService(s)
   170  	s.Activities = NewActivitiesService(s)
   171  	s.Captions = NewCaptionsService(s)
   172  	s.ChannelBanners = NewChannelBannersService(s)
   173  	s.ChannelSections = NewChannelSectionsService(s)
   174  	s.Channels = NewChannelsService(s)
   175  	s.CommentThreads = NewCommentThreadsService(s)
   176  	s.Comments = NewCommentsService(s)
   177  	s.I18nLanguages = NewI18nLanguagesService(s)
   178  	s.I18nRegions = NewI18nRegionsService(s)
   179  	s.LiveBroadcasts = NewLiveBroadcastsService(s)
   180  	s.LiveChatBans = NewLiveChatBansService(s)
   181  	s.LiveChatMessages = NewLiveChatMessagesService(s)
   182  	s.LiveChatModerators = NewLiveChatModeratorsService(s)
   183  	s.LiveStreams = NewLiveStreamsService(s)
   184  	s.Members = NewMembersService(s)
   185  	s.MembershipsLevels = NewMembershipsLevelsService(s)
   186  	s.PlaylistImages = NewPlaylistImagesService(s)
   187  	s.PlaylistItems = NewPlaylistItemsService(s)
   188  	s.Playlists = NewPlaylistsService(s)
   189  	s.Search = NewSearchService(s)
   190  	s.Subscriptions = NewSubscriptionsService(s)
   191  	s.SuperChatEvents = NewSuperChatEventsService(s)
   192  	s.Tests = NewTestsService(s)
   193  	s.ThirdPartyLinks = NewThirdPartyLinksService(s)
   194  	s.Thumbnails = NewThumbnailsService(s)
   195  	s.VideoAbuseReportReasons = NewVideoAbuseReportReasonsService(s)
   196  	s.VideoCategories = NewVideoCategoriesService(s)
   197  	s.Videos = NewVideosService(s)
   198  	s.Watermarks = NewWatermarksService(s)
   199  	s.Youtube = NewYoutubeService(s)
   200  	return s, nil
   201  }
   202  
   203  type Service struct {
   204  	client    *http.Client
   205  	BasePath  string // API endpoint base URL
   206  	UserAgent string // optional additional User-Agent fragment
   207  
   208  	AbuseReports *AbuseReportsService
   209  
   210  	Activities *ActivitiesService
   211  
   212  	Captions *CaptionsService
   213  
   214  	ChannelBanners *ChannelBannersService
   215  
   216  	ChannelSections *ChannelSectionsService
   217  
   218  	Channels *ChannelsService
   219  
   220  	CommentThreads *CommentThreadsService
   221  
   222  	Comments *CommentsService
   223  
   224  	I18nLanguages *I18nLanguagesService
   225  
   226  	I18nRegions *I18nRegionsService
   227  
   228  	LiveBroadcasts *LiveBroadcastsService
   229  
   230  	LiveChatBans *LiveChatBansService
   231  
   232  	LiveChatMessages *LiveChatMessagesService
   233  
   234  	LiveChatModerators *LiveChatModeratorsService
   235  
   236  	LiveStreams *LiveStreamsService
   237  
   238  	Members *MembersService
   239  
   240  	MembershipsLevels *MembershipsLevelsService
   241  
   242  	PlaylistImages *PlaylistImagesService
   243  
   244  	PlaylistItems *PlaylistItemsService
   245  
   246  	Playlists *PlaylistsService
   247  
   248  	Search *SearchService
   249  
   250  	Subscriptions *SubscriptionsService
   251  
   252  	SuperChatEvents *SuperChatEventsService
   253  
   254  	Tests *TestsService
   255  
   256  	ThirdPartyLinks *ThirdPartyLinksService
   257  
   258  	Thumbnails *ThumbnailsService
   259  
   260  	VideoAbuseReportReasons *VideoAbuseReportReasonsService
   261  
   262  	VideoCategories *VideoCategoriesService
   263  
   264  	Videos *VideosService
   265  
   266  	Watermarks *WatermarksService
   267  
   268  	Youtube *YoutubeService
   269  }
   270  
   271  func (s *Service) userAgent() string {
   272  	if s.UserAgent == "" {
   273  		return googleapi.UserAgent
   274  	}
   275  	return googleapi.UserAgent + " " + s.UserAgent
   276  }
   277  
   278  func NewAbuseReportsService(s *Service) *AbuseReportsService {
   279  	rs := &AbuseReportsService{s: s}
   280  	return rs
   281  }
   282  
   283  type AbuseReportsService struct {
   284  	s *Service
   285  }
   286  
   287  func NewActivitiesService(s *Service) *ActivitiesService {
   288  	rs := &ActivitiesService{s: s}
   289  	return rs
   290  }
   291  
   292  type ActivitiesService struct {
   293  	s *Service
   294  }
   295  
   296  func NewCaptionsService(s *Service) *CaptionsService {
   297  	rs := &CaptionsService{s: s}
   298  	return rs
   299  }
   300  
   301  type CaptionsService struct {
   302  	s *Service
   303  }
   304  
   305  func NewChannelBannersService(s *Service) *ChannelBannersService {
   306  	rs := &ChannelBannersService{s: s}
   307  	return rs
   308  }
   309  
   310  type ChannelBannersService struct {
   311  	s *Service
   312  }
   313  
   314  func NewChannelSectionsService(s *Service) *ChannelSectionsService {
   315  	rs := &ChannelSectionsService{s: s}
   316  	return rs
   317  }
   318  
   319  type ChannelSectionsService struct {
   320  	s *Service
   321  }
   322  
   323  func NewChannelsService(s *Service) *ChannelsService {
   324  	rs := &ChannelsService{s: s}
   325  	return rs
   326  }
   327  
   328  type ChannelsService struct {
   329  	s *Service
   330  }
   331  
   332  func NewCommentThreadsService(s *Service) *CommentThreadsService {
   333  	rs := &CommentThreadsService{s: s}
   334  	return rs
   335  }
   336  
   337  type CommentThreadsService struct {
   338  	s *Service
   339  }
   340  
   341  func NewCommentsService(s *Service) *CommentsService {
   342  	rs := &CommentsService{s: s}
   343  	return rs
   344  }
   345  
   346  type CommentsService struct {
   347  	s *Service
   348  }
   349  
   350  func NewI18nLanguagesService(s *Service) *I18nLanguagesService {
   351  	rs := &I18nLanguagesService{s: s}
   352  	return rs
   353  }
   354  
   355  type I18nLanguagesService struct {
   356  	s *Service
   357  }
   358  
   359  func NewI18nRegionsService(s *Service) *I18nRegionsService {
   360  	rs := &I18nRegionsService{s: s}
   361  	return rs
   362  }
   363  
   364  type I18nRegionsService struct {
   365  	s *Service
   366  }
   367  
   368  func NewLiveBroadcastsService(s *Service) *LiveBroadcastsService {
   369  	rs := &LiveBroadcastsService{s: s}
   370  	return rs
   371  }
   372  
   373  type LiveBroadcastsService struct {
   374  	s *Service
   375  }
   376  
   377  func NewLiveChatBansService(s *Service) *LiveChatBansService {
   378  	rs := &LiveChatBansService{s: s}
   379  	return rs
   380  }
   381  
   382  type LiveChatBansService struct {
   383  	s *Service
   384  }
   385  
   386  func NewLiveChatMessagesService(s *Service) *LiveChatMessagesService {
   387  	rs := &LiveChatMessagesService{s: s}
   388  	return rs
   389  }
   390  
   391  type LiveChatMessagesService struct {
   392  	s *Service
   393  }
   394  
   395  func NewLiveChatModeratorsService(s *Service) *LiveChatModeratorsService {
   396  	rs := &LiveChatModeratorsService{s: s}
   397  	return rs
   398  }
   399  
   400  type LiveChatModeratorsService struct {
   401  	s *Service
   402  }
   403  
   404  func NewLiveStreamsService(s *Service) *LiveStreamsService {
   405  	rs := &LiveStreamsService{s: s}
   406  	return rs
   407  }
   408  
   409  type LiveStreamsService struct {
   410  	s *Service
   411  }
   412  
   413  func NewMembersService(s *Service) *MembersService {
   414  	rs := &MembersService{s: s}
   415  	return rs
   416  }
   417  
   418  type MembersService struct {
   419  	s *Service
   420  }
   421  
   422  func NewMembershipsLevelsService(s *Service) *MembershipsLevelsService {
   423  	rs := &MembershipsLevelsService{s: s}
   424  	return rs
   425  }
   426  
   427  type MembershipsLevelsService struct {
   428  	s *Service
   429  }
   430  
   431  func NewPlaylistImagesService(s *Service) *PlaylistImagesService {
   432  	rs := &PlaylistImagesService{s: s}
   433  	return rs
   434  }
   435  
   436  type PlaylistImagesService struct {
   437  	s *Service
   438  }
   439  
   440  func NewPlaylistItemsService(s *Service) *PlaylistItemsService {
   441  	rs := &PlaylistItemsService{s: s}
   442  	return rs
   443  }
   444  
   445  type PlaylistItemsService struct {
   446  	s *Service
   447  }
   448  
   449  func NewPlaylistsService(s *Service) *PlaylistsService {
   450  	rs := &PlaylistsService{s: s}
   451  	return rs
   452  }
   453  
   454  type PlaylistsService struct {
   455  	s *Service
   456  }
   457  
   458  func NewSearchService(s *Service) *SearchService {
   459  	rs := &SearchService{s: s}
   460  	return rs
   461  }
   462  
   463  type SearchService struct {
   464  	s *Service
   465  }
   466  
   467  func NewSubscriptionsService(s *Service) *SubscriptionsService {
   468  	rs := &SubscriptionsService{s: s}
   469  	return rs
   470  }
   471  
   472  type SubscriptionsService struct {
   473  	s *Service
   474  }
   475  
   476  func NewSuperChatEventsService(s *Service) *SuperChatEventsService {
   477  	rs := &SuperChatEventsService{s: s}
   478  	return rs
   479  }
   480  
   481  type SuperChatEventsService struct {
   482  	s *Service
   483  }
   484  
   485  func NewTestsService(s *Service) *TestsService {
   486  	rs := &TestsService{s: s}
   487  	return rs
   488  }
   489  
   490  type TestsService struct {
   491  	s *Service
   492  }
   493  
   494  func NewThirdPartyLinksService(s *Service) *ThirdPartyLinksService {
   495  	rs := &ThirdPartyLinksService{s: s}
   496  	return rs
   497  }
   498  
   499  type ThirdPartyLinksService struct {
   500  	s *Service
   501  }
   502  
   503  func NewThumbnailsService(s *Service) *ThumbnailsService {
   504  	rs := &ThumbnailsService{s: s}
   505  	return rs
   506  }
   507  
   508  type ThumbnailsService struct {
   509  	s *Service
   510  }
   511  
   512  func NewVideoAbuseReportReasonsService(s *Service) *VideoAbuseReportReasonsService {
   513  	rs := &VideoAbuseReportReasonsService{s: s}
   514  	return rs
   515  }
   516  
   517  type VideoAbuseReportReasonsService struct {
   518  	s *Service
   519  }
   520  
   521  func NewVideoCategoriesService(s *Service) *VideoCategoriesService {
   522  	rs := &VideoCategoriesService{s: s}
   523  	return rs
   524  }
   525  
   526  type VideoCategoriesService struct {
   527  	s *Service
   528  }
   529  
   530  func NewVideosService(s *Service) *VideosService {
   531  	rs := &VideosService{s: s}
   532  	return rs
   533  }
   534  
   535  type VideosService struct {
   536  	s *Service
   537  }
   538  
   539  func NewWatermarksService(s *Service) *WatermarksService {
   540  	rs := &WatermarksService{s: s}
   541  	return rs
   542  }
   543  
   544  type WatermarksService struct {
   545  	s *Service
   546  }
   547  
   548  func NewYoutubeService(s *Service) *YoutubeService {
   549  	rs := &YoutubeService{s: s}
   550  	rs.V3 = NewYoutubeV3Service(s)
   551  	return rs
   552  }
   553  
   554  type YoutubeService struct {
   555  	s *Service
   556  
   557  	V3 *YoutubeV3Service
   558  }
   559  
   560  func NewYoutubeV3Service(s *Service) *YoutubeV3Service {
   561  	rs := &YoutubeV3Service{s: s}
   562  	return rs
   563  }
   564  
   565  type YoutubeV3Service struct {
   566  	s *Service
   567  }
   568  
   569  type AbuseReport struct {
   570  	AbuseTypes      []*AbuseType     `json:"abuseTypes,omitempty"`
   571  	Description     string           `json:"description,omitempty"`
   572  	RelatedEntities []*RelatedEntity `json:"relatedEntities,omitempty"`
   573  	Subject         *Entity          `json:"subject,omitempty"`
   574  
   575  	// ServerResponse contains the HTTP response code and headers from the server.
   576  	googleapi.ServerResponse `json:"-"`
   577  	// ForceSendFields is a list of field names (e.g. "AbuseTypes") to
   578  	// unconditionally include in API requests. By default, fields with empty or
   579  	// default values are omitted from API requests. See
   580  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   581  	// details.
   582  	ForceSendFields []string `json:"-"`
   583  	// NullFields is a list of field names (e.g. "AbuseTypes") to include in API
   584  	// requests with the JSON null value. By default, fields with empty values are
   585  	// omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   587  	NullFields []string `json:"-"`
   588  }
   589  
   590  func (s *AbuseReport) MarshalJSON() ([]byte, error) {
   591  	type NoMethod AbuseReport
   592  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   593  }
   594  
   595  type AbuseType struct {
   596  	Id string `json:"id,omitempty"`
   597  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   598  	// include in API requests. By default, fields with empty or default values are
   599  	// omitted from API requests. See
   600  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   601  	// details.
   602  	ForceSendFields []string `json:"-"`
   603  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   604  	// with the JSON null value. By default, fields with empty values are omitted
   605  	// from API requests. See
   606  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   607  	NullFields []string `json:"-"`
   608  }
   609  
   610  func (s *AbuseType) MarshalJSON() ([]byte, error) {
   611  	type NoMethod AbuseType
   612  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   613  }
   614  
   615  // AccessPolicy: Rights management policy for YouTube resources.
   616  type AccessPolicy struct {
   617  	// Allowed: The value of allowed indicates whether the access to the policy is
   618  	// allowed or denied by default.
   619  	Allowed bool `json:"allowed,omitempty"`
   620  	// Exception: A list of region codes that identify countries where the default
   621  	// policy do not apply.
   622  	Exception []string `json:"exception,omitempty"`
   623  	// ForceSendFields is a list of field names (e.g. "Allowed") to unconditionally
   624  	// include in API requests. By default, fields with empty or default values are
   625  	// omitted from API requests. See
   626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   627  	// details.
   628  	ForceSendFields []string `json:"-"`
   629  	// NullFields is a list of field names (e.g. "Allowed") to include in API
   630  	// requests with the JSON null value. By default, fields with empty values are
   631  	// omitted from API requests. See
   632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   633  	NullFields []string `json:"-"`
   634  }
   635  
   636  func (s *AccessPolicy) MarshalJSON() ([]byte, error) {
   637  	type NoMethod AccessPolicy
   638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   639  }
   640  
   641  // Activity: An *activity* resource contains information about an action that a
   642  // particular channel, or user, has taken on YouTube.The actions reported in
   643  // activity feeds include rating a video, sharing a video, marking a video as a
   644  // favorite, commenting on a video, uploading a video, and so forth. Each
   645  // activity resource identifies the type of action, the channel associated with
   646  // the action, and the resource(s) associated with the action, such as the
   647  // video that was rated or uploaded.
   648  type Activity struct {
   649  	// ContentDetails: The contentDetails object contains information about the
   650  	// content associated with the activity. For example, if the snippet.type value
   651  	// is videoRated, then the contentDetails object's content identifies the rated
   652  	// video.
   653  	ContentDetails *ActivityContentDetails `json:"contentDetails,omitempty"`
   654  	// Etag: Etag of this resource
   655  	Etag string `json:"etag,omitempty"`
   656  	// Id: The ID that YouTube uses to uniquely identify the activity.
   657  	Id string `json:"id,omitempty"`
   658  	// Kind: Identifies what kind of resource this is. Value: the fixed string
   659  	// "youtube#activity".
   660  	Kind string `json:"kind,omitempty"`
   661  	// Snippet: The snippet object contains basic details about the activity,
   662  	// including the activity's type and group ID.
   663  	Snippet *ActivitySnippet `json:"snippet,omitempty"`
   664  	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
   665  	// unconditionally include in API requests. By default, fields with empty or
   666  	// default values are omitted from API requests. See
   667  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   668  	// details.
   669  	ForceSendFields []string `json:"-"`
   670  	// NullFields is a list of field names (e.g. "ContentDetails") to include in
   671  	// API requests with the JSON null value. By default, fields with empty values
   672  	// are omitted from API requests. See
   673  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   674  	NullFields []string `json:"-"`
   675  }
   676  
   677  func (s *Activity) MarshalJSON() ([]byte, error) {
   678  	type NoMethod Activity
   679  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   680  }
   681  
   682  // ActivityContentDetails: Details about the content of an activity: the video
   683  // that was shared, the channel that was subscribed to, etc.
   684  type ActivityContentDetails struct {
   685  	// Bulletin: The bulletin object contains details about a channel bulletin
   686  	// post. This object is only present if the snippet.type is bulletin.
   687  	Bulletin *ActivityContentDetailsBulletin `json:"bulletin,omitempty"`
   688  	// ChannelItem: The channelItem object contains details about a resource which
   689  	// was added to a channel. This property is only present if the snippet.type is
   690  	// channelItem.
   691  	ChannelItem *ActivityContentDetailsChannelItem `json:"channelItem,omitempty"`
   692  	// Comment: The comment object contains information about a resource that
   693  	// received a comment. This property is only present if the snippet.type is
   694  	// comment.
   695  	Comment *ActivityContentDetailsComment `json:"comment,omitempty"`
   696  	// Favorite: The favorite object contains information about a video that was
   697  	// marked as a favorite video. This property is only present if the
   698  	// snippet.type is favorite.
   699  	Favorite *ActivityContentDetailsFavorite `json:"favorite,omitempty"`
   700  	// Like: The like object contains information about a resource that received a
   701  	// positive (like) rating. This property is only present if the snippet.type is
   702  	// like.
   703  	Like *ActivityContentDetailsLike `json:"like,omitempty"`
   704  	// PlaylistItem: The playlistItem object contains information about a new
   705  	// playlist item. This property is only present if the snippet.type is
   706  	// playlistItem.
   707  	PlaylistItem *ActivityContentDetailsPlaylistItem `json:"playlistItem,omitempty"`
   708  	// PromotedItem: The promotedItem object contains details about a resource
   709  	// which is being promoted. This property is only present if the snippet.type
   710  	// is promotedItem.
   711  	PromotedItem *ActivityContentDetailsPromotedItem `json:"promotedItem,omitempty"`
   712  	// Recommendation: The recommendation object contains information about a
   713  	// recommended resource. This property is only present if the snippet.type is
   714  	// recommendation.
   715  	Recommendation *ActivityContentDetailsRecommendation `json:"recommendation,omitempty"`
   716  	// Social: The social object contains details about a social network post. This
   717  	// property is only present if the snippet.type is social.
   718  	Social *ActivityContentDetailsSocial `json:"social,omitempty"`
   719  	// Subscription: The subscription object contains information about a channel
   720  	// that a user subscribed to. This property is only present if the snippet.type
   721  	// is subscription.
   722  	Subscription *ActivityContentDetailsSubscription `json:"subscription,omitempty"`
   723  	// Upload: The upload object contains information about the uploaded video.
   724  	// This property is only present if the snippet.type is upload.
   725  	Upload *ActivityContentDetailsUpload `json:"upload,omitempty"`
   726  	// ForceSendFields is a list of field names (e.g. "Bulletin") to
   727  	// unconditionally include in API requests. By default, fields with empty or
   728  	// default values are omitted from API requests. See
   729  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   730  	// details.
   731  	ForceSendFields []string `json:"-"`
   732  	// NullFields is a list of field names (e.g. "Bulletin") to include in API
   733  	// requests with the JSON null value. By default, fields with empty values are
   734  	// omitted from API requests. See
   735  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   736  	NullFields []string `json:"-"`
   737  }
   738  
   739  func (s *ActivityContentDetails) MarshalJSON() ([]byte, error) {
   740  	type NoMethod ActivityContentDetails
   741  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   742  }
   743  
   744  // ActivityContentDetailsBulletin: Details about a channel bulletin post.
   745  type ActivityContentDetailsBulletin struct {
   746  	// ResourceId: The resourceId object contains information that identifies the
   747  	// resource associated with a bulletin post. @mutable youtube.activities.insert
   748  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   749  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
   750  	// unconditionally include in API requests. By default, fields with empty or
   751  	// default values are omitted from API requests. See
   752  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   753  	// details.
   754  	ForceSendFields []string `json:"-"`
   755  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
   756  	// requests with the JSON null value. By default, fields with empty values are
   757  	// omitted from API requests. See
   758  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   759  	NullFields []string `json:"-"`
   760  }
   761  
   762  func (s *ActivityContentDetailsBulletin) MarshalJSON() ([]byte, error) {
   763  	type NoMethod ActivityContentDetailsBulletin
   764  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   765  }
   766  
   767  // ActivityContentDetailsChannelItem: Details about a resource which was added
   768  // to a channel.
   769  type ActivityContentDetailsChannelItem struct {
   770  	// ResourceId: The resourceId object contains information that identifies the
   771  	// resource that was added to the channel.
   772  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   773  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
   774  	// unconditionally include in API requests. By default, fields with empty or
   775  	// default values are omitted from API requests. See
   776  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   777  	// details.
   778  	ForceSendFields []string `json:"-"`
   779  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
   780  	// requests with the JSON null value. By default, fields with empty values are
   781  	// omitted from API requests. See
   782  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   783  	NullFields []string `json:"-"`
   784  }
   785  
   786  func (s *ActivityContentDetailsChannelItem) MarshalJSON() ([]byte, error) {
   787  	type NoMethod ActivityContentDetailsChannelItem
   788  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   789  }
   790  
   791  // ActivityContentDetailsComment: Information about a resource that received a
   792  // comment.
   793  type ActivityContentDetailsComment struct {
   794  	// ResourceId: The resourceId object contains information that identifies the
   795  	// resource associated with the comment.
   796  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   797  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
   798  	// unconditionally include in API requests. By default, fields with empty or
   799  	// default values are omitted from API requests. See
   800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   801  	// details.
   802  	ForceSendFields []string `json:"-"`
   803  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
   804  	// requests with the JSON null value. By default, fields with empty values are
   805  	// omitted from API requests. See
   806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   807  	NullFields []string `json:"-"`
   808  }
   809  
   810  func (s *ActivityContentDetailsComment) MarshalJSON() ([]byte, error) {
   811  	type NoMethod ActivityContentDetailsComment
   812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   813  }
   814  
   815  // ActivityContentDetailsFavorite: Information about a video that was marked as
   816  // a favorite video.
   817  type ActivityContentDetailsFavorite struct {
   818  	// ResourceId: The resourceId object contains information that identifies the
   819  	// resource that was marked as a favorite.
   820  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   821  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
   822  	// unconditionally include in API requests. By default, fields with empty or
   823  	// default values are omitted from API requests. See
   824  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   825  	// details.
   826  	ForceSendFields []string `json:"-"`
   827  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
   828  	// requests with the JSON null value. By default, fields with empty values are
   829  	// omitted from API requests. See
   830  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   831  	NullFields []string `json:"-"`
   832  }
   833  
   834  func (s *ActivityContentDetailsFavorite) MarshalJSON() ([]byte, error) {
   835  	type NoMethod ActivityContentDetailsFavorite
   836  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   837  }
   838  
   839  // ActivityContentDetailsLike: Information about a resource that received a
   840  // positive (like) rating.
   841  type ActivityContentDetailsLike struct {
   842  	// ResourceId: The resourceId object contains information that identifies the
   843  	// rated resource.
   844  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   845  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
   846  	// unconditionally include in API requests. By default, fields with empty or
   847  	// default values are omitted from API requests. See
   848  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   849  	// details.
   850  	ForceSendFields []string `json:"-"`
   851  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
   852  	// requests with the JSON null value. By default, fields with empty values are
   853  	// omitted from API requests. See
   854  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   855  	NullFields []string `json:"-"`
   856  }
   857  
   858  func (s *ActivityContentDetailsLike) MarshalJSON() ([]byte, error) {
   859  	type NoMethod ActivityContentDetailsLike
   860  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   861  }
   862  
   863  // ActivityContentDetailsPlaylistItem: Information about a new playlist item.
   864  type ActivityContentDetailsPlaylistItem struct {
   865  	// PlaylistId: The value that YouTube uses to uniquely identify the playlist.
   866  	PlaylistId string `json:"playlistId,omitempty"`
   867  	// PlaylistItemId: ID of the item within the playlist.
   868  	PlaylistItemId string `json:"playlistItemId,omitempty"`
   869  	// ResourceId: The resourceId object contains information about the resource
   870  	// that was added to the playlist.
   871  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   872  	// ForceSendFields is a list of field names (e.g. "PlaylistId") to
   873  	// unconditionally include in API requests. By default, fields with empty or
   874  	// default values are omitted from API requests. See
   875  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   876  	// details.
   877  	ForceSendFields []string `json:"-"`
   878  	// NullFields is a list of field names (e.g. "PlaylistId") to include in API
   879  	// requests with the JSON null value. By default, fields with empty values are
   880  	// omitted from API requests. See
   881  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   882  	NullFields []string `json:"-"`
   883  }
   884  
   885  func (s *ActivityContentDetailsPlaylistItem) MarshalJSON() ([]byte, error) {
   886  	type NoMethod ActivityContentDetailsPlaylistItem
   887  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   888  }
   889  
   890  // ActivityContentDetailsPromotedItem: Details about a resource which is being
   891  // promoted.
   892  type ActivityContentDetailsPromotedItem struct {
   893  	// AdTag: The URL the client should fetch to request a promoted item.
   894  	AdTag string `json:"adTag,omitempty"`
   895  	// ClickTrackingUrl: The URL the client should ping to indicate that the user
   896  	// clicked through on this promoted item.
   897  	ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
   898  	// CreativeViewUrl: The URL the client should ping to indicate that the user
   899  	// was shown this promoted item.
   900  	CreativeViewUrl string `json:"creativeViewUrl,omitempty"`
   901  	// CtaType: The type of call-to-action, a message to the user indicating action
   902  	// that can be taken.
   903  	//
   904  	// Possible values:
   905  	//   "ctaTypeUnspecified"
   906  	//   "visitAdvertiserSite"
   907  	CtaType string `json:"ctaType,omitempty"`
   908  	// CustomCtaButtonText: The custom call-to-action button text. If specified, it
   909  	// will override the default button text for the cta_type.
   910  	CustomCtaButtonText string `json:"customCtaButtonText,omitempty"`
   911  	// DescriptionText: The text description to accompany the promoted item.
   912  	DescriptionText string `json:"descriptionText,omitempty"`
   913  	// DestinationUrl: The URL the client should direct the user to, if the user
   914  	// chooses to visit the advertiser's website.
   915  	DestinationUrl string `json:"destinationUrl,omitempty"`
   916  	// ForecastingUrl: The list of forecasting URLs. The client should ping all of
   917  	// these URLs when a promoted item is not available, to indicate that a
   918  	// promoted item could have been shown.
   919  	ForecastingUrl []string `json:"forecastingUrl,omitempty"`
   920  	// ImpressionUrl: The list of impression URLs. The client should ping all of
   921  	// these URLs to indicate that the user was shown this promoted item.
   922  	ImpressionUrl []string `json:"impressionUrl,omitempty"`
   923  	// VideoId: The ID that YouTube uses to uniquely identify the promoted video.
   924  	VideoId string `json:"videoId,omitempty"`
   925  	// ForceSendFields is a list of field names (e.g. "AdTag") to unconditionally
   926  	// include in API requests. By default, fields with empty or default values are
   927  	// omitted from API requests. See
   928  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   929  	// details.
   930  	ForceSendFields []string `json:"-"`
   931  	// NullFields is a list of field names (e.g. "AdTag") to include in API
   932  	// requests with the JSON null value. By default, fields with empty values are
   933  	// omitted from API requests. See
   934  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   935  	NullFields []string `json:"-"`
   936  }
   937  
   938  func (s *ActivityContentDetailsPromotedItem) MarshalJSON() ([]byte, error) {
   939  	type NoMethod ActivityContentDetailsPromotedItem
   940  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   941  }
   942  
   943  // ActivityContentDetailsRecommendation: Information that identifies the
   944  // recommended resource.
   945  type ActivityContentDetailsRecommendation struct {
   946  	// Reason: The reason that the resource is recommended to the user.
   947  	//
   948  	// Possible values:
   949  	//   "reasonUnspecified"
   950  	//   "videoFavorited"
   951  	//   "videoLiked"
   952  	//   "videoWatched"
   953  	Reason string `json:"reason,omitempty"`
   954  	// ResourceId: The resourceId object contains information that identifies the
   955  	// recommended resource.
   956  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   957  	// SeedResourceId: The seedResourceId object contains information about the
   958  	// resource that caused the recommendation.
   959  	SeedResourceId *ResourceId `json:"seedResourceId,omitempty"`
   960  	// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
   961  	// include in API requests. By default, fields with empty or default values are
   962  	// omitted from API requests. See
   963  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   964  	// details.
   965  	ForceSendFields []string `json:"-"`
   966  	// NullFields is a list of field names (e.g. "Reason") to include in API
   967  	// requests with the JSON null value. By default, fields with empty values are
   968  	// omitted from API requests. See
   969  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   970  	NullFields []string `json:"-"`
   971  }
   972  
   973  func (s *ActivityContentDetailsRecommendation) MarshalJSON() ([]byte, error) {
   974  	type NoMethod ActivityContentDetailsRecommendation
   975  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   976  }
   977  
   978  // ActivityContentDetailsSocial: Details about a social network post.
   979  type ActivityContentDetailsSocial struct {
   980  	// Author: The author of the social network post.
   981  	Author string `json:"author,omitempty"`
   982  	// ImageUrl: An image of the post's author.
   983  	ImageUrl string `json:"imageUrl,omitempty"`
   984  	// ReferenceUrl: The URL of the social network post.
   985  	ReferenceUrl string `json:"referenceUrl,omitempty"`
   986  	// ResourceId: The resourceId object encapsulates information that identifies
   987  	// the resource associated with a social network post.
   988  	ResourceId *ResourceId `json:"resourceId,omitempty"`
   989  	// Type: The name of the social network.
   990  	//
   991  	// Possible values:
   992  	//   "unspecified"
   993  	//   "googlePlus"
   994  	//   "facebook"
   995  	//   "twitter"
   996  	Type string `json:"type,omitempty"`
   997  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   998  	// include in API requests. By default, fields with empty or default values are
   999  	// omitted from API requests. See
  1000  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1001  	// details.
  1002  	ForceSendFields []string `json:"-"`
  1003  	// NullFields is a list of field names (e.g. "Author") to include in API
  1004  	// requests with the JSON null value. By default, fields with empty values are
  1005  	// omitted from API requests. See
  1006  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1007  	NullFields []string `json:"-"`
  1008  }
  1009  
  1010  func (s *ActivityContentDetailsSocial) MarshalJSON() ([]byte, error) {
  1011  	type NoMethod ActivityContentDetailsSocial
  1012  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1013  }
  1014  
  1015  // ActivityContentDetailsSubscription: Information about a channel that a user
  1016  // subscribed to.
  1017  type ActivityContentDetailsSubscription struct {
  1018  	// ResourceId: The resourceId object contains information that identifies the
  1019  	// resource that the user subscribed to.
  1020  	ResourceId *ResourceId `json:"resourceId,omitempty"`
  1021  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
  1022  	// unconditionally include in API requests. By default, fields with empty or
  1023  	// default values are omitted from API requests. See
  1024  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1025  	// details.
  1026  	ForceSendFields []string `json:"-"`
  1027  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
  1028  	// requests with the JSON null value. By default, fields with empty values are
  1029  	// omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1031  	NullFields []string `json:"-"`
  1032  }
  1033  
  1034  func (s *ActivityContentDetailsSubscription) MarshalJSON() ([]byte, error) {
  1035  	type NoMethod ActivityContentDetailsSubscription
  1036  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1037  }
  1038  
  1039  // ActivityContentDetailsUpload: Information about the uploaded video.
  1040  type ActivityContentDetailsUpload struct {
  1041  	// VideoId: The ID that YouTube uses to uniquely identify the uploaded video.
  1042  	VideoId string `json:"videoId,omitempty"`
  1043  	// ForceSendFields is a list of field names (e.g. "VideoId") to unconditionally
  1044  	// include in API requests. By default, fields with empty or default values are
  1045  	// omitted from API requests. See
  1046  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1047  	// details.
  1048  	ForceSendFields []string `json:"-"`
  1049  	// NullFields is a list of field names (e.g. "VideoId") to include in API
  1050  	// requests with the JSON null value. By default, fields with empty values are
  1051  	// omitted from API requests. See
  1052  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1053  	NullFields []string `json:"-"`
  1054  }
  1055  
  1056  func (s *ActivityContentDetailsUpload) MarshalJSON() ([]byte, error) {
  1057  	type NoMethod ActivityContentDetailsUpload
  1058  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1059  }
  1060  
  1061  type ActivityListResponse struct {
  1062  	// Etag: Etag of this resource.
  1063  	Etag string `json:"etag,omitempty"`
  1064  	// EventId: Serialized EventId of the request which produced this response.
  1065  	EventId string      `json:"eventId,omitempty"`
  1066  	Items   []*Activity `json:"items,omitempty"`
  1067  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1068  	// "youtube#activityListResponse".
  1069  	Kind string `json:"kind,omitempty"`
  1070  	// NextPageToken: The token that can be used as the value of the pageToken
  1071  	// parameter to retrieve the next page in the result set.
  1072  	NextPageToken string `json:"nextPageToken,omitempty"`
  1073  	// PageInfo: General pagination information.
  1074  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  1075  	// PrevPageToken: The token that can be used as the value of the pageToken
  1076  	// parameter to retrieve the previous page in the result set.
  1077  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  1078  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  1079  	// VisitorId: The visitorId identifies the visitor.
  1080  	VisitorId string `json:"visitorId,omitempty"`
  1081  
  1082  	// ServerResponse contains the HTTP response code and headers from the server.
  1083  	googleapi.ServerResponse `json:"-"`
  1084  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1085  	// include in API requests. By default, fields with empty or default values are
  1086  	// omitted from API requests. See
  1087  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1088  	// details.
  1089  	ForceSendFields []string `json:"-"`
  1090  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1091  	// with the JSON null value. By default, fields with empty values are omitted
  1092  	// from API requests. See
  1093  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1094  	NullFields []string `json:"-"`
  1095  }
  1096  
  1097  func (s *ActivityListResponse) MarshalJSON() ([]byte, error) {
  1098  	type NoMethod ActivityListResponse
  1099  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1100  }
  1101  
  1102  // ActivitySnippet: Basic details about an activity, including title,
  1103  // description, thumbnails, activity type and group. Next ID: 12
  1104  type ActivitySnippet struct {
  1105  	// ChannelId: The ID that YouTube uses to uniquely identify the channel
  1106  	// associated with the activity.
  1107  	ChannelId string `json:"channelId,omitempty"`
  1108  	// ChannelTitle: Channel title for the channel responsible for this activity
  1109  	ChannelTitle string `json:"channelTitle,omitempty"`
  1110  	// Description: The description of the resource primarily associated with the
  1111  	// activity. @mutable youtube.activities.insert
  1112  	Description string `json:"description,omitempty"`
  1113  	// GroupId: The group ID associated with the activity. A group ID identifies
  1114  	// user events that are associated with the same user and resource. For
  1115  	// example, if a user rates a video and marks the same video as a favorite, the
  1116  	// entries for those events would have the same group ID in the user's activity
  1117  	// feed. In your user interface, you can avoid repetition by grouping events
  1118  	// with the same groupId value.
  1119  	GroupId string `json:"groupId,omitempty"`
  1120  	// PublishedAt: The date and time that the video was uploaded.
  1121  	PublishedAt string `json:"publishedAt,omitempty"`
  1122  	// Thumbnails: A map of thumbnail images associated with the resource that is
  1123  	// primarily associated with the activity. For each object in the map, the key
  1124  	// is the name of the thumbnail image, and the value is an object that contains
  1125  	// other information about the thumbnail.
  1126  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  1127  	// Title: The title of the resource primarily associated with the activity.
  1128  	Title string `json:"title,omitempty"`
  1129  	// Type: The type of activity that the resource describes.
  1130  	//
  1131  	// Possible values:
  1132  	//   "typeUnspecified"
  1133  	//   "upload"
  1134  	//   "like"
  1135  	//   "favorite"
  1136  	//   "comment"
  1137  	//   "subscription"
  1138  	//   "playlistItem"
  1139  	//   "recommendation"
  1140  	//   "bulletin"
  1141  	//   "social"
  1142  	//   "channelItem"
  1143  	//   "promotedItem"
  1144  	Type string `json:"type,omitempty"`
  1145  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  1146  	// unconditionally include in API requests. By default, fields with empty or
  1147  	// default values are omitted from API requests. See
  1148  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1149  	// details.
  1150  	ForceSendFields []string `json:"-"`
  1151  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  1152  	// requests with the JSON null value. By default, fields with empty values are
  1153  	// omitted from API requests. See
  1154  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1155  	NullFields []string `json:"-"`
  1156  }
  1157  
  1158  func (s *ActivitySnippet) MarshalJSON() ([]byte, error) {
  1159  	type NoMethod ActivitySnippet
  1160  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1161  }
  1162  
  1163  // Caption: A *caption* resource represents a YouTube caption track. A caption
  1164  // track is associated with exactly one YouTube video.
  1165  type Caption struct {
  1166  	// Etag: Etag of this resource.
  1167  	Etag string `json:"etag,omitempty"`
  1168  	// Id: The ID that YouTube uses to uniquely identify the caption track.
  1169  	Id string `json:"id,omitempty"`
  1170  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1171  	// "youtube#caption".
  1172  	Kind string `json:"kind,omitempty"`
  1173  	// Snippet: The snippet object contains basic details about the caption.
  1174  	Snippet *CaptionSnippet `json:"snippet,omitempty"`
  1175  
  1176  	// ServerResponse contains the HTTP response code and headers from the server.
  1177  	googleapi.ServerResponse `json:"-"`
  1178  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1179  	// include in API requests. By default, fields with empty or default values are
  1180  	// omitted from API requests. See
  1181  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1182  	// details.
  1183  	ForceSendFields []string `json:"-"`
  1184  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1185  	// with the JSON null value. By default, fields with empty values are omitted
  1186  	// from API requests. See
  1187  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1188  	NullFields []string `json:"-"`
  1189  }
  1190  
  1191  func (s *Caption) MarshalJSON() ([]byte, error) {
  1192  	type NoMethod Caption
  1193  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1194  }
  1195  
  1196  type CaptionListResponse struct {
  1197  	// Etag: Etag of this resource.
  1198  	Etag string `json:"etag,omitempty"`
  1199  	// EventId: Serialized EventId of the request which produced this response.
  1200  	EventId string `json:"eventId,omitempty"`
  1201  	// Items: A list of captions that match the request criteria.
  1202  	Items []*Caption `json:"items,omitempty"`
  1203  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1204  	// "youtube#captionListResponse".
  1205  	Kind string `json:"kind,omitempty"`
  1206  	// VisitorId: The visitorId identifies the visitor.
  1207  	VisitorId string `json:"visitorId,omitempty"`
  1208  
  1209  	// ServerResponse contains the HTTP response code and headers from the server.
  1210  	googleapi.ServerResponse `json:"-"`
  1211  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1212  	// include in API requests. By default, fields with empty or default values are
  1213  	// omitted from API requests. See
  1214  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1215  	// details.
  1216  	ForceSendFields []string `json:"-"`
  1217  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1218  	// with the JSON null value. By default, fields with empty values are omitted
  1219  	// from API requests. See
  1220  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1221  	NullFields []string `json:"-"`
  1222  }
  1223  
  1224  func (s *CaptionListResponse) MarshalJSON() ([]byte, error) {
  1225  	type NoMethod CaptionListResponse
  1226  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1227  }
  1228  
  1229  // CaptionSnippet: Basic details about a caption track, such as its language
  1230  // and name.
  1231  type CaptionSnippet struct {
  1232  	// AudioTrackType: The type of audio track associated with the caption track.
  1233  	//
  1234  	// Possible values:
  1235  	//   "unknown"
  1236  	//   "primary"
  1237  	//   "commentary"
  1238  	//   "descriptive"
  1239  	AudioTrackType string `json:"audioTrackType,omitempty"`
  1240  	// FailureReason: The reason that YouTube failed to process the caption track.
  1241  	// This property is only present if the state property's value is failed.
  1242  	//
  1243  	// Possible values:
  1244  	//   "unknownFormat"
  1245  	//   "unsupportedFormat"
  1246  	//   "processingFailed"
  1247  	FailureReason string `json:"failureReason,omitempty"`
  1248  	// IsAutoSynced: Indicates whether YouTube synchronized the caption track to
  1249  	// the audio track in the video. The value will be true if a sync was
  1250  	// explicitly requested when the caption track was uploaded. For example, when
  1251  	// calling the captions.insert or captions.update methods, you can set the sync
  1252  	// parameter to true to instruct YouTube to sync the uploaded track to the
  1253  	// video. If the value is false, YouTube uses the time codes in the uploaded
  1254  	// caption track to determine when to display captions.
  1255  	IsAutoSynced bool `json:"isAutoSynced,omitempty"`
  1256  	// IsCC: Indicates whether the track contains closed captions for the deaf and
  1257  	// hard of hearing. The default value is false.
  1258  	IsCC bool `json:"isCC,omitempty"`
  1259  	// IsDraft: Indicates whether the caption track is a draft. If the value is
  1260  	// true, then the track is not publicly visible. The default value is false.
  1261  	// @mutable youtube.captions.insert youtube.captions.update
  1262  	IsDraft bool `json:"isDraft,omitempty"`
  1263  	// IsEasyReader: Indicates whether caption track is formatted for "easy
  1264  	// reader," meaning it is at a third-grade level for language learners. The
  1265  	// default value is false.
  1266  	IsEasyReader bool `json:"isEasyReader,omitempty"`
  1267  	// IsLarge: Indicates whether the caption track uses large text for the
  1268  	// vision-impaired. The default value is false.
  1269  	IsLarge bool `json:"isLarge,omitempty"`
  1270  	// Language: The language of the caption track. The property value is a BCP-47
  1271  	// language tag.
  1272  	Language string `json:"language,omitempty"`
  1273  	// LastUpdated: The date and time when the caption track was last updated.
  1274  	LastUpdated string `json:"lastUpdated,omitempty"`
  1275  	// Name: The name of the caption track. The name is intended to be visible to
  1276  	// the user as an option during playback.
  1277  	Name string `json:"name,omitempty"`
  1278  	// Status: The caption track's status.
  1279  	//
  1280  	// Possible values:
  1281  	//   "serving"
  1282  	//   "syncing"
  1283  	//   "failed"
  1284  	Status string `json:"status,omitempty"`
  1285  	// TrackKind: The caption track's type.
  1286  	//
  1287  	// Possible values:
  1288  	//   "standard"
  1289  	//   "ASR"
  1290  	//   "forced"
  1291  	TrackKind string `json:"trackKind,omitempty"`
  1292  	// VideoId: The ID that YouTube uses to uniquely identify the video associated
  1293  	// with the caption track. @mutable youtube.captions.insert
  1294  	VideoId string `json:"videoId,omitempty"`
  1295  	// ForceSendFields is a list of field names (e.g. "AudioTrackType") to
  1296  	// unconditionally include in API requests. By default, fields with empty or
  1297  	// default values are omitted from API requests. See
  1298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1299  	// details.
  1300  	ForceSendFields []string `json:"-"`
  1301  	// NullFields is a list of field names (e.g. "AudioTrackType") to include in
  1302  	// API requests with the JSON null value. By default, fields with empty values
  1303  	// are omitted from API requests. See
  1304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1305  	NullFields []string `json:"-"`
  1306  }
  1307  
  1308  func (s *CaptionSnippet) MarshalJSON() ([]byte, error) {
  1309  	type NoMethod CaptionSnippet
  1310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1311  }
  1312  
  1313  // CdnSettings: Brief description of the live stream cdn settings.
  1314  type CdnSettings struct {
  1315  	// Format: The format of the video stream that you are sending to Youtube.
  1316  	Format string `json:"format,omitempty"`
  1317  	// FrameRate: The frame rate of the inbound video data.
  1318  	//
  1319  	// Possible values:
  1320  	//   "30fps"
  1321  	//   "60fps"
  1322  	//   "variable"
  1323  	FrameRate string `json:"frameRate,omitempty"`
  1324  	// IngestionInfo: The ingestionInfo object contains information that YouTube
  1325  	// provides that you need to transmit your RTMP or HTTP stream to YouTube.
  1326  	IngestionInfo *IngestionInfo `json:"ingestionInfo,omitempty"`
  1327  	// IngestionType:  The method or protocol used to transmit the video stream.
  1328  	//
  1329  	// Possible values:
  1330  	//   "rtmp"
  1331  	//   "dash"
  1332  	//   "webrtc"
  1333  	//   "hls"
  1334  	IngestionType string `json:"ingestionType,omitempty"`
  1335  	// Resolution: The resolution of the inbound video data.
  1336  	//
  1337  	// Possible values:
  1338  	//   "240p"
  1339  	//   "360p"
  1340  	//   "480p"
  1341  	//   "720p"
  1342  	//   "1080p"
  1343  	//   "1440p"
  1344  	//   "2160p"
  1345  	//   "variable"
  1346  	Resolution string `json:"resolution,omitempty"`
  1347  	// ForceSendFields is a list of field names (e.g. "Format") to unconditionally
  1348  	// include in API requests. By default, fields with empty or default values are
  1349  	// omitted from API requests. See
  1350  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1351  	// details.
  1352  	ForceSendFields []string `json:"-"`
  1353  	// NullFields is a list of field names (e.g. "Format") to include in API
  1354  	// requests with the JSON null value. By default, fields with empty values are
  1355  	// omitted from API requests. See
  1356  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1357  	NullFields []string `json:"-"`
  1358  }
  1359  
  1360  func (s *CdnSettings) MarshalJSON() ([]byte, error) {
  1361  	type NoMethod CdnSettings
  1362  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1363  }
  1364  
  1365  // Channel: A *channel* resource contains information about a YouTube channel.
  1366  type Channel struct {
  1367  	// AuditDetails: The auditionDetails object encapsulates channel data that is
  1368  	// relevant for YouTube Partners during the audition process.
  1369  	AuditDetails *ChannelAuditDetails `json:"auditDetails,omitempty"`
  1370  	// BrandingSettings: The brandingSettings object encapsulates information about
  1371  	// the branding of the channel.
  1372  	BrandingSettings *ChannelBrandingSettings `json:"brandingSettings,omitempty"`
  1373  	// ContentDetails: The contentDetails object encapsulates information about the
  1374  	// channel's content.
  1375  	ContentDetails *ChannelContentDetails `json:"contentDetails,omitempty"`
  1376  	// ContentOwnerDetails: The contentOwnerDetails object encapsulates channel
  1377  	// data that is relevant for YouTube Partners linked with the channel.
  1378  	ContentOwnerDetails *ChannelContentOwnerDetails `json:"contentOwnerDetails,omitempty"`
  1379  	// ConversionPings: The conversionPings object encapsulates information about
  1380  	// conversion pings that need to be respected by the channel.
  1381  	ConversionPings *ChannelConversionPings `json:"conversionPings,omitempty"`
  1382  	// Etag: Etag of this resource.
  1383  	Etag string `json:"etag,omitempty"`
  1384  	// Id: The ID that YouTube uses to uniquely identify the channel.
  1385  	Id string `json:"id,omitempty"`
  1386  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1387  	// "youtube#channel".
  1388  	Kind string `json:"kind,omitempty"`
  1389  	// Localizations: Localizations for different languages
  1390  	Localizations map[string]ChannelLocalization `json:"localizations,omitempty"`
  1391  	// Snippet: The snippet object contains basic details about the channel, such
  1392  	// as its title, description, and thumbnail images.
  1393  	Snippet *ChannelSnippet `json:"snippet,omitempty"`
  1394  	// Statistics: The statistics object encapsulates statistics for the channel.
  1395  	Statistics *ChannelStatistics `json:"statistics,omitempty"`
  1396  	// Status: The status object encapsulates information about the privacy status
  1397  	// of the channel.
  1398  	Status *ChannelStatus `json:"status,omitempty"`
  1399  	// TopicDetails: The topicDetails object encapsulates information about
  1400  	// Freebase topics associated with the channel.
  1401  	TopicDetails *ChannelTopicDetails `json:"topicDetails,omitempty"`
  1402  
  1403  	// ServerResponse contains the HTTP response code and headers from the server.
  1404  	googleapi.ServerResponse `json:"-"`
  1405  	// ForceSendFields is a list of field names (e.g. "AuditDetails") to
  1406  	// unconditionally include in API requests. By default, fields with empty or
  1407  	// default values are omitted from API requests. See
  1408  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1409  	// details.
  1410  	ForceSendFields []string `json:"-"`
  1411  	// NullFields is a list of field names (e.g. "AuditDetails") to include in API
  1412  	// requests with the JSON null value. By default, fields with empty values are
  1413  	// omitted from API requests. See
  1414  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1415  	NullFields []string `json:"-"`
  1416  }
  1417  
  1418  func (s *Channel) MarshalJSON() ([]byte, error) {
  1419  	type NoMethod Channel
  1420  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1421  }
  1422  
  1423  // ChannelAuditDetails: The auditDetails object encapsulates channel data that
  1424  // is relevant for YouTube Partners during the audit process.
  1425  type ChannelAuditDetails struct {
  1426  	// CommunityGuidelinesGoodStanding: Whether or not the channel respects the
  1427  	// community guidelines.
  1428  	CommunityGuidelinesGoodStanding bool `json:"communityGuidelinesGoodStanding,omitempty"`
  1429  	// ContentIdClaimsGoodStanding: Whether or not the channel has any unresolved
  1430  	// claims.
  1431  	ContentIdClaimsGoodStanding bool `json:"contentIdClaimsGoodStanding,omitempty"`
  1432  	// CopyrightStrikesGoodStanding: Whether or not the channel has any copyright
  1433  	// strikes.
  1434  	CopyrightStrikesGoodStanding bool `json:"copyrightStrikesGoodStanding,omitempty"`
  1435  	// ForceSendFields is a list of field names (e.g.
  1436  	// "CommunityGuidelinesGoodStanding") to unconditionally include in API
  1437  	// requests. By default, fields with empty or default values are omitted from
  1438  	// API requests. See
  1439  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1440  	// details.
  1441  	ForceSendFields []string `json:"-"`
  1442  	// NullFields is a list of field names (e.g. "CommunityGuidelinesGoodStanding")
  1443  	// to include in API requests with the JSON null value. By default, fields with
  1444  	// empty values are omitted from API requests. See
  1445  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1446  	NullFields []string `json:"-"`
  1447  }
  1448  
  1449  func (s *ChannelAuditDetails) MarshalJSON() ([]byte, error) {
  1450  	type NoMethod ChannelAuditDetails
  1451  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1452  }
  1453  
  1454  // ChannelBannerResource: A channel banner returned as the response to a
  1455  // channel_banner.insert call.
  1456  type ChannelBannerResource struct {
  1457  	Etag string `json:"etag,omitempty"`
  1458  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1459  	// "youtube#channelBannerResource".
  1460  	Kind string `json:"kind,omitempty"`
  1461  	// Url: The URL of this banner image.
  1462  	Url string `json:"url,omitempty"`
  1463  
  1464  	// ServerResponse contains the HTTP response code and headers from the server.
  1465  	googleapi.ServerResponse `json:"-"`
  1466  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1467  	// include in API requests. By default, fields with empty or default values are
  1468  	// omitted from API requests. See
  1469  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1470  	// details.
  1471  	ForceSendFields []string `json:"-"`
  1472  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1473  	// with the JSON null value. By default, fields with empty values are omitted
  1474  	// from API requests. See
  1475  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1476  	NullFields []string `json:"-"`
  1477  }
  1478  
  1479  func (s *ChannelBannerResource) MarshalJSON() ([]byte, error) {
  1480  	type NoMethod ChannelBannerResource
  1481  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1482  }
  1483  
  1484  // ChannelBrandingSettings: Branding properties of a YouTube channel.
  1485  type ChannelBrandingSettings struct {
  1486  	// Channel: Branding properties for the channel view.
  1487  	Channel *ChannelSettings `json:"channel,omitempty"`
  1488  	// Hints: Additional experimental branding properties.
  1489  	Hints []*PropertyValue `json:"hints,omitempty"`
  1490  	// Image: Branding properties for branding images.
  1491  	Image *ImageSettings `json:"image,omitempty"`
  1492  	// Watch: Branding properties for the watch page.
  1493  	Watch *WatchSettings `json:"watch,omitempty"`
  1494  	// ForceSendFields is a list of field names (e.g. "Channel") to unconditionally
  1495  	// include in API requests. By default, fields with empty or default values are
  1496  	// omitted from API requests. See
  1497  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1498  	// details.
  1499  	ForceSendFields []string `json:"-"`
  1500  	// NullFields is a list of field names (e.g. "Channel") to include in API
  1501  	// requests with the JSON null value. By default, fields with empty values are
  1502  	// omitted from API requests. See
  1503  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1504  	NullFields []string `json:"-"`
  1505  }
  1506  
  1507  func (s *ChannelBrandingSettings) MarshalJSON() ([]byte, error) {
  1508  	type NoMethod ChannelBrandingSettings
  1509  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1510  }
  1511  
  1512  // ChannelContentDetails: Details about the content of a channel.
  1513  type ChannelContentDetails struct {
  1514  	RelatedPlaylists *ChannelContentDetailsRelatedPlaylists `json:"relatedPlaylists,omitempty"`
  1515  	// ForceSendFields is a list of field names (e.g. "RelatedPlaylists") to
  1516  	// unconditionally include in API requests. By default, fields with empty or
  1517  	// default values are omitted from API requests. See
  1518  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1519  	// details.
  1520  	ForceSendFields []string `json:"-"`
  1521  	// NullFields is a list of field names (e.g. "RelatedPlaylists") to include in
  1522  	// API requests with the JSON null value. By default, fields with empty values
  1523  	// are omitted from API requests. See
  1524  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1525  	NullFields []string `json:"-"`
  1526  }
  1527  
  1528  func (s *ChannelContentDetails) MarshalJSON() ([]byte, error) {
  1529  	type NoMethod ChannelContentDetails
  1530  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1531  }
  1532  
  1533  type ChannelContentDetailsRelatedPlaylists struct {
  1534  	// Favorites: The ID of the playlist that contains the channel"s favorite
  1535  	// videos. Use the playlistItems.insert and playlistItems.delete to add or
  1536  	// remove items from that list.
  1537  	Favorites string `json:"favorites,omitempty"`
  1538  	// Likes: The ID of the playlist that contains the channel"s liked videos. Use
  1539  	// the playlistItems.insert and playlistItems.delete to add or remove items
  1540  	// from that list.
  1541  	Likes string `json:"likes,omitempty"`
  1542  	// Uploads: The ID of the playlist that contains the channel"s uploaded videos.
  1543  	// Use the videos.insert method to upload new videos and the videos.delete
  1544  	// method to delete previously uploaded videos.
  1545  	Uploads string `json:"uploads,omitempty"`
  1546  	// WatchHistory: The ID of the playlist that contains the channel"s watch
  1547  	// history. Use the playlistItems.insert and playlistItems.delete to add or
  1548  	// remove items from that list.
  1549  	WatchHistory string `json:"watchHistory,omitempty"`
  1550  	// WatchLater: The ID of the playlist that contains the channel"s watch later
  1551  	// playlist. Use the playlistItems.insert and playlistItems.delete to add or
  1552  	// remove items from that list.
  1553  	WatchLater string `json:"watchLater,omitempty"`
  1554  	// ForceSendFields is a list of field names (e.g. "Favorites") to
  1555  	// unconditionally include in API requests. By default, fields with empty or
  1556  	// default values are omitted from API requests. See
  1557  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1558  	// details.
  1559  	ForceSendFields []string `json:"-"`
  1560  	// NullFields is a list of field names (e.g. "Favorites") to include in API
  1561  	// requests with the JSON null value. By default, fields with empty values are
  1562  	// omitted from API requests. See
  1563  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1564  	NullFields []string `json:"-"`
  1565  }
  1566  
  1567  func (s *ChannelContentDetailsRelatedPlaylists) MarshalJSON() ([]byte, error) {
  1568  	type NoMethod ChannelContentDetailsRelatedPlaylists
  1569  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1570  }
  1571  
  1572  // ChannelContentOwnerDetails: The contentOwnerDetails object encapsulates
  1573  // channel data that is relevant for YouTube Partners linked with the channel.
  1574  type ChannelContentOwnerDetails struct {
  1575  	// ContentOwner: The ID of the content owner linked to the channel.
  1576  	ContentOwner string `json:"contentOwner,omitempty"`
  1577  	// TimeLinked: The date and time when the channel was linked to the content
  1578  	// owner.
  1579  	TimeLinked string `json:"timeLinked,omitempty"`
  1580  	// ForceSendFields is a list of field names (e.g. "ContentOwner") to
  1581  	// unconditionally include in API requests. By default, fields with empty or
  1582  	// default values are omitted from API requests. See
  1583  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1584  	// details.
  1585  	ForceSendFields []string `json:"-"`
  1586  	// NullFields is a list of field names (e.g. "ContentOwner") to include in API
  1587  	// requests with the JSON null value. By default, fields with empty values are
  1588  	// omitted from API requests. See
  1589  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1590  	NullFields []string `json:"-"`
  1591  }
  1592  
  1593  func (s *ChannelContentOwnerDetails) MarshalJSON() ([]byte, error) {
  1594  	type NoMethod ChannelContentOwnerDetails
  1595  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1596  }
  1597  
  1598  // ChannelConversionPing: Pings that the app shall fire (authenticated by
  1599  // biscotti cookie). Each ping has a context, in which the app must fire the
  1600  // ping, and a url identifying the ping.
  1601  type ChannelConversionPing struct {
  1602  	// Context: Defines the context of the ping.
  1603  	//
  1604  	// Possible values:
  1605  	//   "subscribe"
  1606  	//   "unsubscribe"
  1607  	//   "cview"
  1608  	Context string `json:"context,omitempty"`
  1609  	// ConversionUrl: The url (without the schema) that the player shall send the
  1610  	// ping to. It's at caller's descretion to decide which schema to use (http vs
  1611  	// https) Example of a returned url: //googleads.g.doubleclick.net/pagead/
  1612  	// viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D
  1613  	// cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append
  1614  	// biscotti authentication (ms param in case of mobile, for example) to this
  1615  	// ping.
  1616  	ConversionUrl string `json:"conversionUrl,omitempty"`
  1617  	// ForceSendFields is a list of field names (e.g. "Context") to unconditionally
  1618  	// include in API requests. By default, fields with empty or default values are
  1619  	// omitted from API requests. See
  1620  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1621  	// details.
  1622  	ForceSendFields []string `json:"-"`
  1623  	// NullFields is a list of field names (e.g. "Context") to include in API
  1624  	// requests with the JSON null value. By default, fields with empty values are
  1625  	// omitted from API requests. See
  1626  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1627  	NullFields []string `json:"-"`
  1628  }
  1629  
  1630  func (s *ChannelConversionPing) MarshalJSON() ([]byte, error) {
  1631  	type NoMethod ChannelConversionPing
  1632  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1633  }
  1634  
  1635  // ChannelConversionPings: The conversionPings object encapsulates information
  1636  // about conversion pings that need to be respected by the channel.
  1637  type ChannelConversionPings struct {
  1638  	// Pings: Pings that the app shall fire (authenticated by biscotti cookie).
  1639  	// Each ping has a context, in which the app must fire the ping, and a url
  1640  	// identifying the ping.
  1641  	Pings []*ChannelConversionPing `json:"pings,omitempty"`
  1642  	// ForceSendFields is a list of field names (e.g. "Pings") to unconditionally
  1643  	// include in API requests. By default, fields with empty or default values are
  1644  	// omitted from API requests. See
  1645  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1646  	// details.
  1647  	ForceSendFields []string `json:"-"`
  1648  	// NullFields is a list of field names (e.g. "Pings") to include in API
  1649  	// requests with the JSON null value. By default, fields with empty values are
  1650  	// omitted from API requests. See
  1651  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1652  	NullFields []string `json:"-"`
  1653  }
  1654  
  1655  func (s *ChannelConversionPings) MarshalJSON() ([]byte, error) {
  1656  	type NoMethod ChannelConversionPings
  1657  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1658  }
  1659  
  1660  type ChannelListResponse struct {
  1661  	// Etag: Etag of this resource.
  1662  	Etag string `json:"etag,omitempty"`
  1663  	// EventId: Serialized EventId of the request which produced this response.
  1664  	EventId string     `json:"eventId,omitempty"`
  1665  	Items   []*Channel `json:"items,omitempty"`
  1666  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1667  	// "youtube#channelListResponse".
  1668  	Kind string `json:"kind,omitempty"`
  1669  	// NextPageToken: The token that can be used as the value of the pageToken
  1670  	// parameter to retrieve the next page in the result set.
  1671  	NextPageToken string `json:"nextPageToken,omitempty"`
  1672  	// PageInfo: General pagination information.
  1673  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  1674  	// PrevPageToken: The token that can be used as the value of the pageToken
  1675  	// parameter to retrieve the previous page in the result set.
  1676  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  1677  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  1678  	// VisitorId: The visitorId identifies the visitor.
  1679  	VisitorId string `json:"visitorId,omitempty"`
  1680  
  1681  	// ServerResponse contains the HTTP response code and headers from the server.
  1682  	googleapi.ServerResponse `json:"-"`
  1683  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1684  	// include in API requests. By default, fields with empty or default values are
  1685  	// omitted from API requests. See
  1686  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1687  	// details.
  1688  	ForceSendFields []string `json:"-"`
  1689  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1690  	// with the JSON null value. By default, fields with empty values are omitted
  1691  	// from API requests. See
  1692  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1693  	NullFields []string `json:"-"`
  1694  }
  1695  
  1696  func (s *ChannelListResponse) MarshalJSON() ([]byte, error) {
  1697  	type NoMethod ChannelListResponse
  1698  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1699  }
  1700  
  1701  // ChannelLocalization: Channel localization setting
  1702  type ChannelLocalization struct {
  1703  	// Description: The localized strings for channel's description.
  1704  	Description string `json:"description,omitempty"`
  1705  	// Title: The localized strings for channel's title.
  1706  	Title string `json:"title,omitempty"`
  1707  	// ForceSendFields is a list of field names (e.g. "Description") to
  1708  	// unconditionally include in API requests. By default, fields with empty or
  1709  	// default values are omitted from API requests. See
  1710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1711  	// details.
  1712  	ForceSendFields []string `json:"-"`
  1713  	// NullFields is a list of field names (e.g. "Description") to include in API
  1714  	// requests with the JSON null value. By default, fields with empty values are
  1715  	// omitted from API requests. See
  1716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1717  	NullFields []string `json:"-"`
  1718  }
  1719  
  1720  func (s *ChannelLocalization) MarshalJSON() ([]byte, error) {
  1721  	type NoMethod ChannelLocalization
  1722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1723  }
  1724  
  1725  type ChannelProfileDetails struct {
  1726  	// ChannelId: The YouTube channel ID.
  1727  	ChannelId string `json:"channelId,omitempty"`
  1728  	// ChannelUrl: The channel's URL.
  1729  	ChannelUrl string `json:"channelUrl,omitempty"`
  1730  	// DisplayName: The channel's display name.
  1731  	DisplayName string `json:"displayName,omitempty"`
  1732  	// ProfileImageUrl: The channels's avatar URL.
  1733  	ProfileImageUrl string `json:"profileImageUrl,omitempty"`
  1734  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  1735  	// unconditionally include in API requests. By default, fields with empty or
  1736  	// default values are omitted from API requests. See
  1737  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1738  	// details.
  1739  	ForceSendFields []string `json:"-"`
  1740  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  1741  	// requests with the JSON null value. By default, fields with empty values are
  1742  	// omitted from API requests. See
  1743  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1744  	NullFields []string `json:"-"`
  1745  }
  1746  
  1747  func (s *ChannelProfileDetails) MarshalJSON() ([]byte, error) {
  1748  	type NoMethod ChannelProfileDetails
  1749  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1750  }
  1751  
  1752  type ChannelSection struct {
  1753  	// ContentDetails: The contentDetails object contains details about the channel
  1754  	// section content, such as a list of playlists or channels featured in the
  1755  	// section.
  1756  	ContentDetails *ChannelSectionContentDetails `json:"contentDetails,omitempty"`
  1757  	// Etag: Etag of this resource.
  1758  	Etag string `json:"etag,omitempty"`
  1759  	// Id: The ID that YouTube uses to uniquely identify the channel section.
  1760  	Id string `json:"id,omitempty"`
  1761  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1762  	// "youtube#channelSection".
  1763  	Kind string `json:"kind,omitempty"`
  1764  	// Localizations: Localizations for different languages
  1765  	Localizations map[string]ChannelSectionLocalization `json:"localizations,omitempty"`
  1766  	// Snippet: The snippet object contains basic details about the channel
  1767  	// section, such as its type, style and title.
  1768  	Snippet *ChannelSectionSnippet `json:"snippet,omitempty"`
  1769  	// Targeting: The targeting object contains basic targeting settings about the
  1770  	// channel section.
  1771  	Targeting *ChannelSectionTargeting `json:"targeting,omitempty"`
  1772  
  1773  	// ServerResponse contains the HTTP response code and headers from the server.
  1774  	googleapi.ServerResponse `json:"-"`
  1775  	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
  1776  	// unconditionally include in API requests. By default, fields with empty or
  1777  	// default values are omitted from API requests. See
  1778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1779  	// details.
  1780  	ForceSendFields []string `json:"-"`
  1781  	// NullFields is a list of field names (e.g. "ContentDetails") to include in
  1782  	// API requests with the JSON null value. By default, fields with empty values
  1783  	// are omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1785  	NullFields []string `json:"-"`
  1786  }
  1787  
  1788  func (s *ChannelSection) MarshalJSON() ([]byte, error) {
  1789  	type NoMethod ChannelSection
  1790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1791  }
  1792  
  1793  // ChannelSectionContentDetails: Details about a channelsection, including
  1794  // playlists and channels.
  1795  type ChannelSectionContentDetails struct {
  1796  	// Channels: The channel ids for type multiple_channels.
  1797  	Channels []string `json:"channels,omitempty"`
  1798  	// Playlists: The playlist ids for type single_playlist and multiple_playlists.
  1799  	// For singlePlaylist, only one playlistId is allowed.
  1800  	Playlists []string `json:"playlists,omitempty"`
  1801  	// ForceSendFields is a list of field names (e.g. "Channels") to
  1802  	// unconditionally include in API requests. By default, fields with empty or
  1803  	// default values are omitted from API requests. See
  1804  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1805  	// details.
  1806  	ForceSendFields []string `json:"-"`
  1807  	// NullFields is a list of field names (e.g. "Channels") to include in API
  1808  	// requests with the JSON null value. By default, fields with empty values are
  1809  	// omitted from API requests. See
  1810  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1811  	NullFields []string `json:"-"`
  1812  }
  1813  
  1814  func (s *ChannelSectionContentDetails) MarshalJSON() ([]byte, error) {
  1815  	type NoMethod ChannelSectionContentDetails
  1816  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1817  }
  1818  
  1819  type ChannelSectionListResponse struct {
  1820  	// Etag: Etag of this resource.
  1821  	Etag string `json:"etag,omitempty"`
  1822  	// EventId: Serialized EventId of the request which produced this response.
  1823  	EventId string `json:"eventId,omitempty"`
  1824  	// Items: A list of ChannelSections that match the request criteria.
  1825  	Items []*ChannelSection `json:"items,omitempty"`
  1826  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  1827  	// "youtube#channelSectionListResponse".
  1828  	Kind string `json:"kind,omitempty"`
  1829  	// VisitorId: The visitorId identifies the visitor.
  1830  	VisitorId string `json:"visitorId,omitempty"`
  1831  
  1832  	// ServerResponse contains the HTTP response code and headers from the server.
  1833  	googleapi.ServerResponse `json:"-"`
  1834  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1835  	// include in API requests. By default, fields with empty or default values are
  1836  	// omitted from API requests. See
  1837  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1838  	// details.
  1839  	ForceSendFields []string `json:"-"`
  1840  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1841  	// with the JSON null value. By default, fields with empty values are omitted
  1842  	// from API requests. See
  1843  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1844  	NullFields []string `json:"-"`
  1845  }
  1846  
  1847  func (s *ChannelSectionListResponse) MarshalJSON() ([]byte, error) {
  1848  	type NoMethod ChannelSectionListResponse
  1849  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1850  }
  1851  
  1852  // ChannelSectionLocalization: ChannelSection localization setting
  1853  type ChannelSectionLocalization struct {
  1854  	// Title: The localized strings for channel section's title.
  1855  	Title string `json:"title,omitempty"`
  1856  	// ForceSendFields is a list of field names (e.g. "Title") to unconditionally
  1857  	// include in API requests. By default, fields with empty or default values are
  1858  	// omitted from API requests. See
  1859  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1860  	// details.
  1861  	ForceSendFields []string `json:"-"`
  1862  	// NullFields is a list of field names (e.g. "Title") to include in API
  1863  	// requests with the JSON null value. By default, fields with empty values are
  1864  	// omitted from API requests. See
  1865  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1866  	NullFields []string `json:"-"`
  1867  }
  1868  
  1869  func (s *ChannelSectionLocalization) MarshalJSON() ([]byte, error) {
  1870  	type NoMethod ChannelSectionLocalization
  1871  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1872  }
  1873  
  1874  // ChannelSectionSnippet: Basic details about a channel section, including
  1875  // title, style and position.
  1876  type ChannelSectionSnippet struct {
  1877  	// ChannelId: The ID that YouTube uses to uniquely identify the channel that
  1878  	// published the channel section.
  1879  	ChannelId string `json:"channelId,omitempty"`
  1880  	// DefaultLanguage: The language of the channel section's default title and
  1881  	// description.
  1882  	DefaultLanguage string `json:"defaultLanguage,omitempty"`
  1883  	// Localized: Localized title, read-only.
  1884  	Localized *ChannelSectionLocalization `json:"localized,omitempty"`
  1885  	// Position: The position of the channel section in the channel.
  1886  	Position *int64 `json:"position,omitempty"`
  1887  	// Style: The style of the channel section.
  1888  	//
  1889  	// Possible values:
  1890  	//   "channelsectionStyleUnspecified"
  1891  	//   "horizontalRow"
  1892  	//   "verticalList"
  1893  	Style string `json:"style,omitempty"`
  1894  	// Title: The channel section's title for multiple_playlists and
  1895  	// multiple_channels.
  1896  	Title string `json:"title,omitempty"`
  1897  	// Type: The type of the channel section.
  1898  	//
  1899  	// Possible values:
  1900  	//   "channelsectionTypeUndefined"
  1901  	//   "singlePlaylist"
  1902  	//   "multiplePlaylists"
  1903  	//   "popularUploads"
  1904  	//   "recentUploads"
  1905  	//   "likes"
  1906  	//   "allPlaylists"
  1907  	//   "likedPlaylists"
  1908  	//   "recentPosts"
  1909  	//   "recentActivity"
  1910  	//   "liveEvents"
  1911  	//   "upcomingEvents"
  1912  	//   "completedEvents"
  1913  	//   "multipleChannels"
  1914  	//   "postedVideos"
  1915  	//   "postedPlaylists"
  1916  	//   "subscriptions"
  1917  	Type string `json:"type,omitempty"`
  1918  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  1919  	// unconditionally include in API requests. By default, fields with empty or
  1920  	// default values are omitted from API requests. See
  1921  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1922  	// details.
  1923  	ForceSendFields []string `json:"-"`
  1924  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  1925  	// requests with the JSON null value. By default, fields with empty values are
  1926  	// omitted from API requests. See
  1927  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1928  	NullFields []string `json:"-"`
  1929  }
  1930  
  1931  func (s *ChannelSectionSnippet) MarshalJSON() ([]byte, error) {
  1932  	type NoMethod ChannelSectionSnippet
  1933  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1934  }
  1935  
  1936  // ChannelSectionTargeting: ChannelSection targeting setting.
  1937  type ChannelSectionTargeting struct {
  1938  	// Countries: The country the channel section is targeting.
  1939  	Countries []string `json:"countries,omitempty"`
  1940  	// Languages: The language the channel section is targeting.
  1941  	Languages []string `json:"languages,omitempty"`
  1942  	// Regions: The region the channel section is targeting.
  1943  	Regions []string `json:"regions,omitempty"`
  1944  	// ForceSendFields is a list of field names (e.g. "Countries") to
  1945  	// unconditionally include in API requests. By default, fields with empty or
  1946  	// default values are omitted from API requests. See
  1947  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1948  	// details.
  1949  	ForceSendFields []string `json:"-"`
  1950  	// NullFields is a list of field names (e.g. "Countries") to include in API
  1951  	// requests with the JSON null value. By default, fields with empty values are
  1952  	// omitted from API requests. See
  1953  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1954  	NullFields []string `json:"-"`
  1955  }
  1956  
  1957  func (s *ChannelSectionTargeting) MarshalJSON() ([]byte, error) {
  1958  	type NoMethod ChannelSectionTargeting
  1959  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1960  }
  1961  
  1962  // ChannelSettings: Branding properties for the channel view.
  1963  type ChannelSettings struct {
  1964  	// Country: The country of the channel.
  1965  	Country         string `json:"country,omitempty"`
  1966  	DefaultLanguage string `json:"defaultLanguage,omitempty"`
  1967  	// DefaultTab: Which content tab users should see when viewing the channel.
  1968  	DefaultTab string `json:"defaultTab,omitempty"`
  1969  	// Description: Specifies the channel description.
  1970  	Description string `json:"description,omitempty"`
  1971  	// FeaturedChannelsTitle: Title for the featured channels tab.
  1972  	FeaturedChannelsTitle string `json:"featuredChannelsTitle,omitempty"`
  1973  	// FeaturedChannelsUrls: The list of featured channels.
  1974  	FeaturedChannelsUrls []string `json:"featuredChannelsUrls,omitempty"`
  1975  	// Keywords: Lists keywords associated with the channel, comma-separated.
  1976  	Keywords string `json:"keywords,omitempty"`
  1977  	// ModerateComments: Whether user-submitted comments left on the channel page
  1978  	// need to be approved by the channel owner to be publicly visible.
  1979  	ModerateComments bool `json:"moderateComments,omitempty"`
  1980  	// ProfileColor: A prominent color that can be rendered on this channel page.
  1981  	ProfileColor string `json:"profileColor,omitempty"`
  1982  	// ShowBrowseView: Whether the tab to browse the videos should be displayed.
  1983  	ShowBrowseView bool `json:"showBrowseView,omitempty"`
  1984  	// ShowRelatedChannels: Whether related channels should be proposed.
  1985  	ShowRelatedChannels bool `json:"showRelatedChannels,omitempty"`
  1986  	// Title: Specifies the channel title.
  1987  	Title string `json:"title,omitempty"`
  1988  	// TrackingAnalyticsAccountId: The ID for a Google Analytics account to track
  1989  	// and measure traffic to the channels.
  1990  	TrackingAnalyticsAccountId string `json:"trackingAnalyticsAccountId,omitempty"`
  1991  	// UnsubscribedTrailer: The trailer of the channel, for users that are not
  1992  	// subscribers.
  1993  	UnsubscribedTrailer string `json:"unsubscribedTrailer,omitempty"`
  1994  	// ForceSendFields is a list of field names (e.g. "Country") to unconditionally
  1995  	// include in API requests. By default, fields with empty or default values are
  1996  	// omitted from API requests. See
  1997  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1998  	// details.
  1999  	ForceSendFields []string `json:"-"`
  2000  	// NullFields is a list of field names (e.g. "Country") to include in API
  2001  	// requests with the JSON null value. By default, fields with empty values are
  2002  	// omitted from API requests. See
  2003  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2004  	NullFields []string `json:"-"`
  2005  }
  2006  
  2007  func (s *ChannelSettings) MarshalJSON() ([]byte, error) {
  2008  	type NoMethod ChannelSettings
  2009  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2010  }
  2011  
  2012  // ChannelSnippet: Basic details about a channel, including title, description
  2013  // and thumbnails.
  2014  type ChannelSnippet struct {
  2015  	// Country: The country of the channel.
  2016  	Country string `json:"country,omitempty"`
  2017  	// CustomUrl: The custom url of the channel.
  2018  	CustomUrl string `json:"customUrl,omitempty"`
  2019  	// DefaultLanguage: The language of the channel's default title and
  2020  	// description.
  2021  	DefaultLanguage string `json:"defaultLanguage,omitempty"`
  2022  	// Description: The description of the channel.
  2023  	Description string `json:"description,omitempty"`
  2024  	// Localized: Localized title and description, read-only.
  2025  	Localized *ChannelLocalization `json:"localized,omitempty"`
  2026  	// PublishedAt: The date and time that the channel was created.
  2027  	PublishedAt string `json:"publishedAt,omitempty"`
  2028  	// Thumbnails: A map of thumbnail images associated with the channel. For each
  2029  	// object in the map, the key is the name of the thumbnail image, and the value
  2030  	// is an object that contains other information about the thumbnail. When
  2031  	// displaying thumbnails in your application, make sure that your code uses the
  2032  	// image URLs exactly as they are returned in API responses. For example, your
  2033  	// application should not use the http domain instead of the https domain in a
  2034  	// URL returned in an API response. Beginning in July 2018, channel thumbnail
  2035  	// URLs will only be available in the https domain, which is how the URLs
  2036  	// appear in API responses. After that time, you might see broken images in
  2037  	// your application if it tries to load YouTube images from the http domain.
  2038  	// Thumbnail images might be empty for newly created channels and might take up
  2039  	// to one day to populate.
  2040  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  2041  	// Title: The channel's title.
  2042  	Title string `json:"title,omitempty"`
  2043  	// ForceSendFields is a list of field names (e.g. "Country") to unconditionally
  2044  	// include in API requests. By default, fields with empty or default values are
  2045  	// omitted from API requests. See
  2046  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2047  	// details.
  2048  	ForceSendFields []string `json:"-"`
  2049  	// NullFields is a list of field names (e.g. "Country") to include in API
  2050  	// requests with the JSON null value. By default, fields with empty values are
  2051  	// omitted from API requests. See
  2052  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2053  	NullFields []string `json:"-"`
  2054  }
  2055  
  2056  func (s *ChannelSnippet) MarshalJSON() ([]byte, error) {
  2057  	type NoMethod ChannelSnippet
  2058  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2059  }
  2060  
  2061  // ChannelStatistics: Statistics about a channel: number of subscribers, number
  2062  // of videos in the channel, etc.
  2063  type ChannelStatistics struct {
  2064  	// CommentCount: The number of comments for the channel.
  2065  	CommentCount uint64 `json:"commentCount,omitempty,string"`
  2066  	// HiddenSubscriberCount: Whether or not the number of subscribers is shown for
  2067  	// this user.
  2068  	HiddenSubscriberCount bool `json:"hiddenSubscriberCount,omitempty"`
  2069  	// SubscriberCount: The number of subscribers that the channel has.
  2070  	SubscriberCount uint64 `json:"subscriberCount,omitempty,string"`
  2071  	// VideoCount: The number of videos uploaded to the channel.
  2072  	VideoCount uint64 `json:"videoCount,omitempty,string"`
  2073  	// ViewCount: The number of times the channel has been viewed.
  2074  	ViewCount uint64 `json:"viewCount,omitempty,string"`
  2075  	// ForceSendFields is a list of field names (e.g. "CommentCount") to
  2076  	// unconditionally include in API requests. By default, fields with empty or
  2077  	// default values are omitted from API requests. See
  2078  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2079  	// details.
  2080  	ForceSendFields []string `json:"-"`
  2081  	// NullFields is a list of field names (e.g. "CommentCount") to include in API
  2082  	// requests with the JSON null value. By default, fields with empty values are
  2083  	// omitted from API requests. See
  2084  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2085  	NullFields []string `json:"-"`
  2086  }
  2087  
  2088  func (s *ChannelStatistics) MarshalJSON() ([]byte, error) {
  2089  	type NoMethod ChannelStatistics
  2090  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2091  }
  2092  
  2093  // ChannelStatus: JSON template for the status part of a channel.
  2094  type ChannelStatus struct {
  2095  	// IsLinked: If true, then the user is linked to either a YouTube username or
  2096  	// G+ account. Otherwise, the user doesn't have a public YouTube identity.
  2097  	IsLinked bool `json:"isLinked,omitempty"`
  2098  	// LongUploadsStatus: The long uploads status of this channel. See
  2099  	// https://support.google.com/youtube/answer/71673 for more information.
  2100  	//
  2101  	// Possible values:
  2102  	//   "longUploadsUnspecified"
  2103  	//   "allowed"
  2104  	//   "eligible"
  2105  	//   "disallowed"
  2106  	LongUploadsStatus string `json:"longUploadsStatus,omitempty"`
  2107  	MadeForKids       bool   `json:"madeForKids,omitempty"`
  2108  	// PrivacyStatus: Privacy status of the channel.
  2109  	//
  2110  	// Possible values:
  2111  	//   "public"
  2112  	//   "unlisted"
  2113  	//   "private"
  2114  	PrivacyStatus           string `json:"privacyStatus,omitempty"`
  2115  	SelfDeclaredMadeForKids bool   `json:"selfDeclaredMadeForKids,omitempty"`
  2116  	// ForceSendFields is a list of field names (e.g. "IsLinked") to
  2117  	// unconditionally include in API requests. By default, fields with empty or
  2118  	// default values are omitted from API requests. See
  2119  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2120  	// details.
  2121  	ForceSendFields []string `json:"-"`
  2122  	// NullFields is a list of field names (e.g. "IsLinked") to include in API
  2123  	// requests with the JSON null value. By default, fields with empty values are
  2124  	// omitted from API requests. See
  2125  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2126  	NullFields []string `json:"-"`
  2127  }
  2128  
  2129  func (s *ChannelStatus) MarshalJSON() ([]byte, error) {
  2130  	type NoMethod ChannelStatus
  2131  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2132  }
  2133  
  2134  // ChannelToStoreLinkDetails: Information specific to a store on a
  2135  // merchandising platform linked to a YouTube channel.
  2136  type ChannelToStoreLinkDetails struct {
  2137  	// BillingDetails: Information specific to billing (read-only).
  2138  	BillingDetails *ChannelToStoreLinkDetailsBillingDetails `json:"billingDetails,omitempty"`
  2139  	// MerchantId: Google Merchant Center id of the store.
  2140  	MerchantId uint64 `json:"merchantId,omitempty,string"`
  2141  	// StoreName: Name of the store.
  2142  	StoreName string `json:"storeName,omitempty"`
  2143  	// StoreUrl: Landing page of the store.
  2144  	StoreUrl string `json:"storeUrl,omitempty"`
  2145  	// ForceSendFields is a list of field names (e.g. "BillingDetails") to
  2146  	// unconditionally include in API requests. By default, fields with empty or
  2147  	// default values are omitted from API requests. See
  2148  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2149  	// details.
  2150  	ForceSendFields []string `json:"-"`
  2151  	// NullFields is a list of field names (e.g. "BillingDetails") to include in
  2152  	// API requests with the JSON null value. By default, fields with empty values
  2153  	// are omitted from API requests. See
  2154  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2155  	NullFields []string `json:"-"`
  2156  }
  2157  
  2158  func (s *ChannelToStoreLinkDetails) MarshalJSON() ([]byte, error) {
  2159  	type NoMethod ChannelToStoreLinkDetails
  2160  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2161  }
  2162  
  2163  // ChannelToStoreLinkDetailsBillingDetails: Information specific to billing.
  2164  type ChannelToStoreLinkDetailsBillingDetails struct {
  2165  	// BillingStatus: The current billing profile status.
  2166  	//
  2167  	// Possible values:
  2168  	//   "billingStatusUnspecified"
  2169  	//   "billingStatusPending"
  2170  	//   "billingStatusActive"
  2171  	//   "billingStatusInactive"
  2172  	BillingStatus string `json:"billingStatus,omitempty"`
  2173  	// ForceSendFields is a list of field names (e.g. "BillingStatus") to
  2174  	// unconditionally include in API requests. By default, fields with empty or
  2175  	// default values are omitted from API requests. See
  2176  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2177  	// details.
  2178  	ForceSendFields []string `json:"-"`
  2179  	// NullFields is a list of field names (e.g. "BillingStatus") to include in API
  2180  	// requests with the JSON null value. By default, fields with empty values are
  2181  	// omitted from API requests. See
  2182  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2183  	NullFields []string `json:"-"`
  2184  }
  2185  
  2186  func (s *ChannelToStoreLinkDetailsBillingDetails) MarshalJSON() ([]byte, error) {
  2187  	type NoMethod ChannelToStoreLinkDetailsBillingDetails
  2188  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2189  }
  2190  
  2191  // ChannelTopicDetails: Freebase topic information related to the channel.
  2192  type ChannelTopicDetails struct {
  2193  	// TopicCategories: A list of Wikipedia URLs that describe the channel's
  2194  	// content.
  2195  	TopicCategories []string `json:"topicCategories,omitempty"`
  2196  	// TopicIds: A list of Freebase topic IDs associated with the channel. You can
  2197  	// retrieve information about each topic using the Freebase Topic API.
  2198  	TopicIds []string `json:"topicIds,omitempty"`
  2199  	// ForceSendFields is a list of field names (e.g. "TopicCategories") to
  2200  	// unconditionally include in API requests. By default, fields with empty or
  2201  	// default values are omitted from API requests. See
  2202  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2203  	// details.
  2204  	ForceSendFields []string `json:"-"`
  2205  	// NullFields is a list of field names (e.g. "TopicCategories") to include in
  2206  	// API requests with the JSON null value. By default, fields with empty values
  2207  	// are omitted from API requests. See
  2208  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2209  	NullFields []string `json:"-"`
  2210  }
  2211  
  2212  func (s *ChannelTopicDetails) MarshalJSON() ([]byte, error) {
  2213  	type NoMethod ChannelTopicDetails
  2214  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2215  }
  2216  
  2217  // Comment: A *comment* represents a single YouTube comment.
  2218  type Comment struct {
  2219  	// Etag: Etag of this resource.
  2220  	Etag string `json:"etag,omitempty"`
  2221  	// Id: The ID that YouTube uses to uniquely identify the comment.
  2222  	Id string `json:"id,omitempty"`
  2223  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  2224  	// "youtube#comment".
  2225  	Kind string `json:"kind,omitempty"`
  2226  	// Snippet: The snippet object contains basic details about the comment.
  2227  	Snippet *CommentSnippet `json:"snippet,omitempty"`
  2228  
  2229  	// ServerResponse contains the HTTP response code and headers from the server.
  2230  	googleapi.ServerResponse `json:"-"`
  2231  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2232  	// include in API requests. By default, fields with empty or default values are
  2233  	// omitted from API requests. See
  2234  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2235  	// details.
  2236  	ForceSendFields []string `json:"-"`
  2237  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2238  	// with the JSON null value. By default, fields with empty values are omitted
  2239  	// from API requests. See
  2240  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2241  	NullFields []string `json:"-"`
  2242  }
  2243  
  2244  func (s *Comment) MarshalJSON() ([]byte, error) {
  2245  	type NoMethod Comment
  2246  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2247  }
  2248  
  2249  type CommentListResponse struct {
  2250  	// Etag: Etag of this resource.
  2251  	Etag string `json:"etag,omitempty"`
  2252  	// EventId: Serialized EventId of the request which produced this response.
  2253  	EventId string `json:"eventId,omitempty"`
  2254  	// Items: A list of comments that match the request criteria.
  2255  	Items []*Comment `json:"items,omitempty"`
  2256  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  2257  	// "youtube#commentListResponse".
  2258  	Kind string `json:"kind,omitempty"`
  2259  	// NextPageToken: The token that can be used as the value of the pageToken
  2260  	// parameter to retrieve the next page in the result set.
  2261  	NextPageToken string `json:"nextPageToken,omitempty"`
  2262  	// PageInfo: General pagination information.
  2263  	PageInfo        *PageInfo        `json:"pageInfo,omitempty"`
  2264  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  2265  	// VisitorId: The visitorId identifies the visitor.
  2266  	VisitorId string `json:"visitorId,omitempty"`
  2267  
  2268  	// ServerResponse contains the HTTP response code and headers from the server.
  2269  	googleapi.ServerResponse `json:"-"`
  2270  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2271  	// include in API requests. By default, fields with empty or default values are
  2272  	// omitted from API requests. See
  2273  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2274  	// details.
  2275  	ForceSendFields []string `json:"-"`
  2276  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2277  	// with the JSON null value. By default, fields with empty values are omitted
  2278  	// from API requests. See
  2279  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2280  	NullFields []string `json:"-"`
  2281  }
  2282  
  2283  func (s *CommentListResponse) MarshalJSON() ([]byte, error) {
  2284  	type NoMethod CommentListResponse
  2285  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2286  }
  2287  
  2288  // CommentSnippet: Basic details about a comment, such as its author and text.
  2289  type CommentSnippet struct {
  2290  	AuthorChannelId *CommentSnippetAuthorChannelId `json:"authorChannelId,omitempty"`
  2291  	// AuthorChannelUrl: Link to the author's YouTube channel, if any.
  2292  	AuthorChannelUrl string `json:"authorChannelUrl,omitempty"`
  2293  	// AuthorDisplayName: The name of the user who posted the comment.
  2294  	AuthorDisplayName string `json:"authorDisplayName,omitempty"`
  2295  	// AuthorProfileImageUrl: The URL for the avatar of the user who posted the
  2296  	// comment.
  2297  	AuthorProfileImageUrl string `json:"authorProfileImageUrl,omitempty"`
  2298  	// CanRate: Whether the current viewer can rate this comment.
  2299  	CanRate bool `json:"canRate,omitempty"`
  2300  	// ChannelId: The id of the corresponding YouTube channel. In case of a channel
  2301  	// comment this is the channel the comment refers to. In case of a video
  2302  	// comment it's the video's channel.
  2303  	ChannelId string `json:"channelId,omitempty"`
  2304  	// LikeCount: The total number of likes this comment has received.
  2305  	LikeCount int64 `json:"likeCount,omitempty"`
  2306  	// ModerationStatus: The comment's moderation status. Will not be set if the
  2307  	// comments were requested through the id filter.
  2308  	//
  2309  	// Possible values:
  2310  	//   "published" - The comment is available for public display.
  2311  	//   "heldForReview" - The comment is awaiting review by a moderator.
  2312  	//   "likelySpam"
  2313  	//   "rejected" - The comment is unfit for display.
  2314  	ModerationStatus string `json:"moderationStatus,omitempty"`
  2315  	// ParentId: The unique id of the parent comment, only set for replies.
  2316  	ParentId string `json:"parentId,omitempty"`
  2317  	// PublishedAt: The date and time when the comment was originally published.
  2318  	PublishedAt string `json:"publishedAt,omitempty"`
  2319  	// TextDisplay: The comment's text. The format is either plain text or HTML
  2320  	// dependent on what has been requested. Even the plain text representation may
  2321  	// differ from the text originally posted in that it may replace video links
  2322  	// with video titles etc.
  2323  	TextDisplay string `json:"textDisplay,omitempty"`
  2324  	// TextOriginal: The comment's original raw text as initially posted or last
  2325  	// updated. The original text will only be returned if it is accessible to the
  2326  	// viewer, which is only guaranteed if the viewer is the comment's author.
  2327  	TextOriginal string `json:"textOriginal,omitempty"`
  2328  	// UpdatedAt: The date and time when the comment was last updated.
  2329  	UpdatedAt string `json:"updatedAt,omitempty"`
  2330  	// VideoId: The ID of the video the comment refers to, if any.
  2331  	VideoId string `json:"videoId,omitempty"`
  2332  	// ViewerRating: The rating the viewer has given to this comment. For the time
  2333  	// being this will never return RATE_TYPE_DISLIKE and instead return
  2334  	// RATE_TYPE_NONE. This may change in the future.
  2335  	//
  2336  	// Possible values:
  2337  	//   "none"
  2338  	//   "like" - The entity is liked.
  2339  	//   "dislike" - The entity is disliked.
  2340  	ViewerRating string `json:"viewerRating,omitempty"`
  2341  	// ForceSendFields is a list of field names (e.g. "AuthorChannelId") to
  2342  	// unconditionally include in API requests. By default, fields with empty or
  2343  	// default values are omitted from API requests. See
  2344  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2345  	// details.
  2346  	ForceSendFields []string `json:"-"`
  2347  	// NullFields is a list of field names (e.g. "AuthorChannelId") to include in
  2348  	// API requests with the JSON null value. By default, fields with empty values
  2349  	// are omitted from API requests. See
  2350  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2351  	NullFields []string `json:"-"`
  2352  }
  2353  
  2354  func (s *CommentSnippet) MarshalJSON() ([]byte, error) {
  2355  	type NoMethod CommentSnippet
  2356  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2357  }
  2358  
  2359  // CommentSnippetAuthorChannelId: The id of the author's YouTube channel, if
  2360  // any.
  2361  type CommentSnippetAuthorChannelId struct {
  2362  	Value string `json:"value,omitempty"`
  2363  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
  2364  	// include in API requests. By default, fields with empty or default values are
  2365  	// omitted from API requests. See
  2366  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2367  	// details.
  2368  	ForceSendFields []string `json:"-"`
  2369  	// NullFields is a list of field names (e.g. "Value") to include in API
  2370  	// requests with the JSON null value. By default, fields with empty values are
  2371  	// omitted from API requests. See
  2372  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2373  	NullFields []string `json:"-"`
  2374  }
  2375  
  2376  func (s *CommentSnippetAuthorChannelId) MarshalJSON() ([]byte, error) {
  2377  	type NoMethod CommentSnippetAuthorChannelId
  2378  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2379  }
  2380  
  2381  // CommentThread: A *comment thread* represents information that applies to a
  2382  // top level comment and all its replies. It can also include the top level
  2383  // comment itself and some of the replies.
  2384  type CommentThread struct {
  2385  	// Etag: Etag of this resource.
  2386  	Etag string `json:"etag,omitempty"`
  2387  	// Id: The ID that YouTube uses to uniquely identify the comment thread.
  2388  	Id string `json:"id,omitempty"`
  2389  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  2390  	// "youtube#commentThread".
  2391  	Kind string `json:"kind,omitempty"`
  2392  	// Replies: The replies object contains a limited number of replies (if any) to
  2393  	// the top level comment found in the snippet.
  2394  	Replies *CommentThreadReplies `json:"replies,omitempty"`
  2395  	// Snippet: The snippet object contains basic details about the comment thread
  2396  	// and also the top level comment.
  2397  	Snippet *CommentThreadSnippet `json:"snippet,omitempty"`
  2398  
  2399  	// ServerResponse contains the HTTP response code and headers from the server.
  2400  	googleapi.ServerResponse `json:"-"`
  2401  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2402  	// include in API requests. By default, fields with empty or default values are
  2403  	// omitted from API requests. See
  2404  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2405  	// details.
  2406  	ForceSendFields []string `json:"-"`
  2407  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2408  	// with the JSON null value. By default, fields with empty values are omitted
  2409  	// from API requests. See
  2410  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2411  	NullFields []string `json:"-"`
  2412  }
  2413  
  2414  func (s *CommentThread) MarshalJSON() ([]byte, error) {
  2415  	type NoMethod CommentThread
  2416  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2417  }
  2418  
  2419  type CommentThreadListResponse struct {
  2420  	// Etag: Etag of this resource.
  2421  	Etag string `json:"etag,omitempty"`
  2422  	// EventId: Serialized EventId of the request which produced this response.
  2423  	EventId string `json:"eventId,omitempty"`
  2424  	// Items: A list of comment threads that match the request criteria.
  2425  	Items []*CommentThread `json:"items,omitempty"`
  2426  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  2427  	// "youtube#commentThreadListResponse".
  2428  	Kind string `json:"kind,omitempty"`
  2429  	// NextPageToken: The token that can be used as the value of the pageToken
  2430  	// parameter to retrieve the next page in the result set.
  2431  	NextPageToken string `json:"nextPageToken,omitempty"`
  2432  	// PageInfo: General pagination information.
  2433  	PageInfo        *PageInfo        `json:"pageInfo,omitempty"`
  2434  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  2435  	// VisitorId: The visitorId identifies the visitor.
  2436  	VisitorId string `json:"visitorId,omitempty"`
  2437  
  2438  	// ServerResponse contains the HTTP response code and headers from the server.
  2439  	googleapi.ServerResponse `json:"-"`
  2440  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2441  	// include in API requests. By default, fields with empty or default values are
  2442  	// omitted from API requests. See
  2443  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2444  	// details.
  2445  	ForceSendFields []string `json:"-"`
  2446  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2447  	// with the JSON null value. By default, fields with empty values are omitted
  2448  	// from API requests. See
  2449  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2450  	NullFields []string `json:"-"`
  2451  }
  2452  
  2453  func (s *CommentThreadListResponse) MarshalJSON() ([]byte, error) {
  2454  	type NoMethod CommentThreadListResponse
  2455  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2456  }
  2457  
  2458  // CommentThreadReplies: Comments written in (direct or indirect) reply to the
  2459  // top level comment.
  2460  type CommentThreadReplies struct {
  2461  	// Comments: A limited number of replies. Unless the number of replies returned
  2462  	// equals total_reply_count in the snippet the returned replies are only a
  2463  	// subset of the total number of replies.
  2464  	Comments []*Comment `json:"comments,omitempty"`
  2465  	// ForceSendFields is a list of field names (e.g. "Comments") to
  2466  	// unconditionally include in API requests. By default, fields with empty or
  2467  	// default values are omitted from API requests. See
  2468  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2469  	// details.
  2470  	ForceSendFields []string `json:"-"`
  2471  	// NullFields is a list of field names (e.g. "Comments") to include in API
  2472  	// requests with the JSON null value. By default, fields with empty values are
  2473  	// omitted from API requests. See
  2474  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2475  	NullFields []string `json:"-"`
  2476  }
  2477  
  2478  func (s *CommentThreadReplies) MarshalJSON() ([]byte, error) {
  2479  	type NoMethod CommentThreadReplies
  2480  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2481  }
  2482  
  2483  // CommentThreadSnippet: Basic details about a comment thread.
  2484  type CommentThreadSnippet struct {
  2485  	// CanReply: Whether the current viewer of the thread can reply to it. This is
  2486  	// viewer specific - other viewers may see a different value for this field.
  2487  	CanReply bool `json:"canReply,omitempty"`
  2488  	// ChannelId: The YouTube channel the comments in the thread refer to or the
  2489  	// channel with the video the comments refer to. If video_id isn't set the
  2490  	// comments refer to the channel itself.
  2491  	ChannelId string `json:"channelId,omitempty"`
  2492  	// IsPublic: Whether the thread (and therefore all its comments) is visible to
  2493  	// all YouTube users.
  2494  	IsPublic bool `json:"isPublic,omitempty"`
  2495  	// TopLevelComment: The top level comment of this thread.
  2496  	TopLevelComment *Comment `json:"topLevelComment,omitempty"`
  2497  	// TotalReplyCount: The total number of replies (not including the top level
  2498  	// comment).
  2499  	TotalReplyCount int64 `json:"totalReplyCount,omitempty"`
  2500  	// VideoId: The ID of the video the comments refer to, if any. No video_id
  2501  	// implies a channel discussion comment.
  2502  	VideoId string `json:"videoId,omitempty"`
  2503  	// ForceSendFields is a list of field names (e.g. "CanReply") to
  2504  	// unconditionally include in API requests. By default, fields with empty or
  2505  	// default values are omitted from API requests. See
  2506  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2507  	// details.
  2508  	ForceSendFields []string `json:"-"`
  2509  	// NullFields is a list of field names (e.g. "CanReply") to include in API
  2510  	// requests with the JSON null value. By default, fields with empty values are
  2511  	// omitted from API requests. See
  2512  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2513  	NullFields []string `json:"-"`
  2514  }
  2515  
  2516  func (s *CommentThreadSnippet) MarshalJSON() ([]byte, error) {
  2517  	type NoMethod CommentThreadSnippet
  2518  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2519  }
  2520  
  2521  // ContentRating: Ratings schemes. The country-specific ratings are mostly for
  2522  // movies and shows. LINT.IfChange
  2523  type ContentRating struct {
  2524  	// AcbRating: The video's Australian Classification Board (ACB) or Australian
  2525  	// Communications and Media Authority (ACMA) rating. ACMA ratings are used to
  2526  	// classify children's television programming.
  2527  	//
  2528  	// Possible values:
  2529  	//   "acbUnspecified"
  2530  	//   "acbE" - E
  2531  	//   "acbP" - Programs that have been given a P classification by the
  2532  	// Australian Communications and Media Authority. These programs are intended
  2533  	// for preschool children.
  2534  	//   "acbC" - Programs that have been given a C classification by the
  2535  	// Australian Communications and Media Authority. These programs are intended
  2536  	// for children (other than preschool children) who are younger than 14 years
  2537  	// of age.
  2538  	//   "acbG" - G
  2539  	//   "acbPg" - PG
  2540  	//   "acbM" - M
  2541  	//   "acbMa15plus" - MA15+
  2542  	//   "acbR18plus" - R18+
  2543  	//   "acbUnrated"
  2544  	AcbRating string `json:"acbRating,omitempty"`
  2545  	// AgcomRating: The video's rating from Italy's Autorità per le Garanzie nelle
  2546  	// Comunicazioni (AGCOM).
  2547  	//
  2548  	// Possible values:
  2549  	//   "agcomUnspecified"
  2550  	//   "agcomT" - T
  2551  	//   "agcomVm14" - VM14
  2552  	//   "agcomVm18" - VM18
  2553  	//   "agcomUnrated"
  2554  	AgcomRating string `json:"agcomRating,omitempty"`
  2555  	// AnatelRating: The video's Anatel (Asociación Nacional de Televisión)
  2556  	// rating for Chilean television.
  2557  	//
  2558  	// Possible values:
  2559  	//   "anatelUnspecified"
  2560  	//   "anatelF" - F
  2561  	//   "anatelI" - I
  2562  	//   "anatelI7" - I-7
  2563  	//   "anatelI10" - I-10
  2564  	//   "anatelI12" - I-12
  2565  	//   "anatelR" - R
  2566  	//   "anatelA" - A
  2567  	//   "anatelUnrated"
  2568  	AnatelRating string `json:"anatelRating,omitempty"`
  2569  	// BbfcRating: The video's British Board of Film Classification (BBFC) rating.
  2570  	//
  2571  	// Possible values:
  2572  	//   "bbfcUnspecified"
  2573  	//   "bbfcU" - U
  2574  	//   "bbfcPg" - PG
  2575  	//   "bbfc12a" - 12A
  2576  	//   "bbfc12" - 12
  2577  	//   "bbfc15" - 15
  2578  	//   "bbfc18" - 18
  2579  	//   "bbfcR18" - R18
  2580  	//   "bbfcUnrated"
  2581  	BbfcRating string `json:"bbfcRating,omitempty"`
  2582  	// BfvcRating: The video's rating from Thailand's Board of Film and Video
  2583  	// Censors.
  2584  	//
  2585  	// Possible values:
  2586  	//   "bfvcUnspecified"
  2587  	//   "bfvcG" - G
  2588  	//   "bfvcE" - E
  2589  	//   "bfvc13" - 13
  2590  	//   "bfvc15" - 15
  2591  	//   "bfvc18" - 18
  2592  	//   "bfvc20" - 20
  2593  	//   "bfvcB" - B
  2594  	//   "bfvcUnrated"
  2595  	BfvcRating string `json:"bfvcRating,omitempty"`
  2596  	// BmukkRating: The video's rating from the Austrian Board of Media
  2597  	// Classification (Bundesministerium für Unterricht, Kunst und Kultur).
  2598  	//
  2599  	// Possible values:
  2600  	//   "bmukkUnspecified"
  2601  	//   "bmukkAa" - Unrestricted
  2602  	//   "bmukk6" - 6+
  2603  	//   "bmukk8" - 8+
  2604  	//   "bmukk10" - 10+
  2605  	//   "bmukk12" - 12+
  2606  	//   "bmukk14" - 14+
  2607  	//   "bmukk16" - 16+
  2608  	//   "bmukkUnrated"
  2609  	BmukkRating string `json:"bmukkRating,omitempty"`
  2610  	// CatvRating: Rating system for Canadian TV - Canadian TV Classification
  2611  	// System The video's rating from the Canadian Radio-Television and
  2612  	// Telecommunications Commission (CRTC) for Canadian English-language
  2613  	// broadcasts. For more information, see the Canadian Broadcast Standards
  2614  	// Council website.
  2615  	//
  2616  	// Possible values:
  2617  	//   "catvUnspecified"
  2618  	//   "catvC" - C
  2619  	//   "catvC8" - C8
  2620  	//   "catvG" - G
  2621  	//   "catvPg" - PG
  2622  	//   "catv14plus" - 14+
  2623  	//   "catv18plus" - 18+
  2624  	//   "catvUnrated"
  2625  	//   "catvE"
  2626  	CatvRating string `json:"catvRating,omitempty"`
  2627  	// CatvfrRating: The video's rating from the Canadian Radio-Television and
  2628  	// Telecommunications Commission (CRTC) for Canadian French-language
  2629  	// broadcasts. For more information, see the Canadian Broadcast Standards
  2630  	// Council website.
  2631  	//
  2632  	// Possible values:
  2633  	//   "catvfrUnspecified"
  2634  	//   "catvfrG" - G
  2635  	//   "catvfr8plus" - 8+
  2636  	//   "catvfr13plus" - 13+
  2637  	//   "catvfr16plus" - 16+
  2638  	//   "catvfr18plus" - 18+
  2639  	//   "catvfrUnrated"
  2640  	//   "catvfrE"
  2641  	CatvfrRating string `json:"catvfrRating,omitempty"`
  2642  	// CbfcRating: The video's Central Board of Film Certification (CBFC - India)
  2643  	// rating.
  2644  	//
  2645  	// Possible values:
  2646  	//   "cbfcUnspecified"
  2647  	//   "cbfcU" - U
  2648  	//   "cbfcUA" - U/A
  2649  	//   "cbfcUA7plus" - U/A 7+
  2650  	//   "cbfcUA13plus" - U/A 13+
  2651  	//   "cbfcUA16plus" - U/A 16+
  2652  	//   "cbfcA" - A
  2653  	//   "cbfcS" - S
  2654  	//   "cbfcUnrated"
  2655  	CbfcRating string `json:"cbfcRating,omitempty"`
  2656  	// CccRating: The video's Consejo de Calificación Cinematográfica (Chile)
  2657  	// rating.
  2658  	//
  2659  	// Possible values:
  2660  	//   "cccUnspecified"
  2661  	//   "cccTe" - Todo espectador
  2662  	//   "ccc6" - 6+ - Inconveniente para menores de 7 años
  2663  	//   "ccc14" - 14+
  2664  	//   "ccc18" - 18+
  2665  	//   "ccc18v" - 18+ - contenido excesivamente violento
  2666  	//   "ccc18s" - 18+ - contenido pornográfico
  2667  	//   "cccUnrated"
  2668  	CccRating string `json:"cccRating,omitempty"`
  2669  	// CceRating: The video's rating from Portugal's Comissão de Classificação
  2670  	// de Espect´culos.
  2671  	//
  2672  	// Possible values:
  2673  	//   "cceUnspecified"
  2674  	//   "cceM4" - 4
  2675  	//   "cceM6" - 6
  2676  	//   "cceM12" - 12
  2677  	//   "cceM16" - 16
  2678  	//   "cceM18" - 18
  2679  	//   "cceUnrated"
  2680  	//   "cceM14" - 14
  2681  	CceRating string `json:"cceRating,omitempty"`
  2682  	// ChfilmRating: The video's rating in Switzerland.
  2683  	//
  2684  	// Possible values:
  2685  	//   "chfilmUnspecified"
  2686  	//   "chfilm0" - 0
  2687  	//   "chfilm6" - 6
  2688  	//   "chfilm12" - 12
  2689  	//   "chfilm16" - 16
  2690  	//   "chfilm18" - 18
  2691  	//   "chfilmUnrated"
  2692  	ChfilmRating string `json:"chfilmRating,omitempty"`
  2693  	// ChvrsRating: The video's Canadian Home Video Rating System (CHVRS) rating.
  2694  	//
  2695  	// Possible values:
  2696  	//   "chvrsUnspecified"
  2697  	//   "chvrsG" - G
  2698  	//   "chvrsPg" - PG
  2699  	//   "chvrs14a" - 14A
  2700  	//   "chvrs18a" - 18A
  2701  	//   "chvrsR" - R
  2702  	//   "chvrsE" - E
  2703  	//   "chvrsUnrated"
  2704  	ChvrsRating string `json:"chvrsRating,omitempty"`
  2705  	// CicfRating: The video's rating from the Commission de Contrôle des Films
  2706  	// (Belgium).
  2707  	//
  2708  	// Possible values:
  2709  	//   "cicfUnspecified"
  2710  	//   "cicfE" - E
  2711  	//   "cicfKtEa" - KT/EA
  2712  	//   "cicfKntEna" - KNT/ENA
  2713  	//   "cicfUnrated"
  2714  	CicfRating string `json:"cicfRating,omitempty"`
  2715  	// CnaRating: The video's rating from Romania's CONSILIUL NATIONAL AL
  2716  	// AUDIOVIZUALULUI (CNA).
  2717  	//
  2718  	// Possible values:
  2719  	//   "cnaUnspecified"
  2720  	//   "cnaAp" - AP
  2721  	//   "cna12" - 12
  2722  	//   "cna15" - 15
  2723  	//   "cna18" - 18
  2724  	//   "cna18plus" - 18+
  2725  	//   "cnaUnrated"
  2726  	CnaRating string `json:"cnaRating,omitempty"`
  2727  	// CncRating: Rating system in France - Commission de classification
  2728  	// cinematographique
  2729  	//
  2730  	// Possible values:
  2731  	//   "cncUnspecified"
  2732  	//   "cncT" - T
  2733  	//   "cnc10" - 10
  2734  	//   "cnc12" - 12
  2735  	//   "cnc16" - 16
  2736  	//   "cnc18" - 18
  2737  	//   "cncE" - E
  2738  	//   "cncInterdiction" - interdiction
  2739  	//   "cncUnrated"
  2740  	CncRating string `json:"cncRating,omitempty"`
  2741  	// CsaRating: The video's rating from France's Conseil supérieur de
  2742  	// l’audiovisuel, which rates broadcast content.
  2743  	//
  2744  	// Possible values:
  2745  	//   "csaUnspecified"
  2746  	//   "csaT" - T
  2747  	//   "csa10" - 10
  2748  	//   "csa12" - 12
  2749  	//   "csa16" - 16
  2750  	//   "csa18" - 18
  2751  	//   "csaInterdiction" - Interdiction
  2752  	//   "csaUnrated"
  2753  	CsaRating string `json:"csaRating,omitempty"`
  2754  	// CscfRating: The video's rating from Luxembourg's Commission de surveillance
  2755  	// de la classification des films (CSCF).
  2756  	//
  2757  	// Possible values:
  2758  	//   "cscfUnspecified"
  2759  	//   "cscfAl" - AL
  2760  	//   "cscfA" - A
  2761  	//   "cscf6" - 6
  2762  	//   "cscf9" - 9
  2763  	//   "cscf12" - 12
  2764  	//   "cscf16" - 16
  2765  	//   "cscf18" - 18
  2766  	//   "cscfUnrated"
  2767  	CscfRating string `json:"cscfRating,omitempty"`
  2768  	// CzfilmRating: The video's rating in the Czech Republic.
  2769  	//
  2770  	// Possible values:
  2771  	//   "czfilmUnspecified"
  2772  	//   "czfilmU" - U
  2773  	//   "czfilm12" - 12
  2774  	//   "czfilm14" - 14
  2775  	//   "czfilm18" - 18
  2776  	//   "czfilmUnrated"
  2777  	CzfilmRating string `json:"czfilmRating,omitempty"`
  2778  	// DjctqRating: The video's Departamento de Justiça, Classificação,
  2779  	// Qualificação e Títulos (DJCQT - Brazil) rating.
  2780  	//
  2781  	// Possible values:
  2782  	//   "djctqUnspecified"
  2783  	//   "djctqL" - L
  2784  	//   "djctq10" - 10
  2785  	//   "djctq12" - 12
  2786  	//   "djctq14" - 14
  2787  	//   "djctq16" - 16
  2788  	//   "djctq18" - 18
  2789  	//   "djctqEr"
  2790  	//   "djctqL10"
  2791  	//   "djctqL12"
  2792  	//   "djctqL14"
  2793  	//   "djctqL16"
  2794  	//   "djctqL18"
  2795  	//   "djctq1012"
  2796  	//   "djctq1014"
  2797  	//   "djctq1016"
  2798  	//   "djctq1018"
  2799  	//   "djctq1214"
  2800  	//   "djctq1216"
  2801  	//   "djctq1218"
  2802  	//   "djctq1416"
  2803  	//   "djctq1418"
  2804  	//   "djctq1618"
  2805  	//   "djctqUnrated"
  2806  	DjctqRating string `json:"djctqRating,omitempty"`
  2807  	// DjctqRatingReasons: Reasons that explain why the video received its DJCQT
  2808  	// (Brazil) rating.
  2809  	//
  2810  	// Possible values:
  2811  	//   "djctqRatingReasonUnspecified"
  2812  	//   "djctqViolence" - Brazil rating content descriptors. See
  2813  	// http://go/brazilratings section F. Violência (Violence)
  2814  	//   "djctqExtremeViolence" - Violência extrema (Extreme violence)
  2815  	//   "djctqSexualContent" - Conteúdo sexual (Sexual content)
  2816  	//   "djctqNudity" - Nudez (Nudity)
  2817  	//   "djctqSex" - Sexo (Sex)
  2818  	//   "djctqExplicitSex" - Sexo Explícito (Explicit sex)
  2819  	//   "djctqDrugs" - Drogas (Drugs)
  2820  	//   "djctqLegalDrugs" - Drogas Lícitas (Legal drugs)
  2821  	//   "djctqIllegalDrugs" - Drogas Ilícitas (Illegal drugs)
  2822  	//   "djctqInappropriateLanguage" - Linguagem Imprópria (Inappropriate
  2823  	// language)
  2824  	//   "djctqCriminalActs" - Atos Criminosos (Criminal Acts)
  2825  	//   "djctqImpactingContent" - Conteúdo Impactante (Impacting content)
  2826  	DjctqRatingReasons []string `json:"djctqRatingReasons,omitempty"`
  2827  	// EcbmctRating: Rating system in Turkey - Evaluation and Classification Board
  2828  	// of the Ministry of Culture and Tourism
  2829  	//
  2830  	// Possible values:
  2831  	//   "ecbmctUnspecified"
  2832  	//   "ecbmctG" - G
  2833  	//   "ecbmct7a" - 7A
  2834  	//   "ecbmct7plus" - 7+
  2835  	//   "ecbmct13a" - 13A
  2836  	//   "ecbmct13plus" - 13+
  2837  	//   "ecbmct15a" - 15A
  2838  	//   "ecbmct15plus" - 15+
  2839  	//   "ecbmct18plus" - 18+
  2840  	//   "ecbmctUnrated"
  2841  	EcbmctRating string `json:"ecbmctRating,omitempty"`
  2842  	// EefilmRating: The video's rating in Estonia.
  2843  	//
  2844  	// Possible values:
  2845  	//   "eefilmUnspecified"
  2846  	//   "eefilmPere" - Pere
  2847  	//   "eefilmL" - L
  2848  	//   "eefilmMs6" - MS-6
  2849  	//   "eefilmK6" - K-6
  2850  	//   "eefilmMs12" - MS-12
  2851  	//   "eefilmK12" - K-12
  2852  	//   "eefilmK14" - K-14
  2853  	//   "eefilmK16" - K-16
  2854  	//   "eefilmUnrated"
  2855  	EefilmRating string `json:"eefilmRating,omitempty"`
  2856  	// EgfilmRating: The video's rating in Egypt.
  2857  	//
  2858  	// Possible values:
  2859  	//   "egfilmUnspecified"
  2860  	//   "egfilmGn" - GN
  2861  	//   "egfilm18" - 18
  2862  	//   "egfilmBn" - BN
  2863  	//   "egfilmUnrated"
  2864  	EgfilmRating string `json:"egfilmRating,omitempty"`
  2865  	// EirinRating: The video's Eirin (映倫) rating. Eirin is the Japanese rating
  2866  	// system.
  2867  	//
  2868  	// Possible values:
  2869  	//   "eirinUnspecified"
  2870  	//   "eirinG" - G
  2871  	//   "eirinPg12" - PG-12
  2872  	//   "eirinR15plus" - R15+
  2873  	//   "eirinR18plus" - R18+
  2874  	//   "eirinUnrated"
  2875  	EirinRating string `json:"eirinRating,omitempty"`
  2876  	// FcbmRating: The video's rating from Malaysia's Film Censorship Board.
  2877  	//
  2878  	// Possible values:
  2879  	//   "fcbmUnspecified"
  2880  	//   "fcbmU" - U
  2881  	//   "fcbmPg13" - PG13
  2882  	//   "fcbmP13" - P13
  2883  	//   "fcbm18" - 18
  2884  	//   "fcbm18sx" - 18SX
  2885  	//   "fcbm18pa" - 18PA
  2886  	//   "fcbm18sg" - 18SG
  2887  	//   "fcbm18pl" - 18PL
  2888  	//   "fcbmUnrated"
  2889  	FcbmRating string `json:"fcbmRating,omitempty"`
  2890  	// FcoRating: The video's rating from Hong Kong's Office for Film, Newspaper
  2891  	// and Article Administration.
  2892  	//
  2893  	// Possible values:
  2894  	//   "fcoUnspecified"
  2895  	//   "fcoI" - I
  2896  	//   "fcoIia" - IIA
  2897  	//   "fcoIib" - IIB
  2898  	//   "fcoIi" - II
  2899  	//   "fcoIii" - III
  2900  	//   "fcoUnrated"
  2901  	FcoRating string `json:"fcoRating,omitempty"`
  2902  	// FmocRating: This property has been deprecated. Use the
  2903  	// contentDetails.contentRating.cncRating instead.
  2904  	//
  2905  	// Possible values:
  2906  	//   "fmocUnspecified"
  2907  	//   "fmocU" - U
  2908  	//   "fmoc10" - 10
  2909  	//   "fmoc12" - 12
  2910  	//   "fmoc16" - 16
  2911  	//   "fmoc18" - 18
  2912  	//   "fmocE" - E
  2913  	//   "fmocUnrated"
  2914  	FmocRating string `json:"fmocRating,omitempty"`
  2915  	// FpbRating: The video's rating from South Africa's Film and Publication
  2916  	// Board.
  2917  	//
  2918  	// Possible values:
  2919  	//   "fpbUnspecified"
  2920  	//   "fpbA" - A
  2921  	//   "fpbPg" - PG
  2922  	//   "fpb79Pg" - 7-9PG
  2923  	//   "fpb1012Pg" - 10-12PG
  2924  	//   "fpb13" - 13
  2925  	//   "fpb16" - 16
  2926  	//   "fpb18" - 18
  2927  	//   "fpbX18" - X18
  2928  	//   "fpbXx" - XX
  2929  	//   "fpbUnrated"
  2930  	//   "fpb10" - 10
  2931  	FpbRating string `json:"fpbRating,omitempty"`
  2932  	// FpbRatingReasons: Reasons that explain why the video received its FPB (South
  2933  	// Africa) rating.
  2934  	//
  2935  	// Possible values:
  2936  	//   "fpbRatingReasonUnspecified"
  2937  	//   "fpbBlasphemy" - South Africa rating content descriptors.
  2938  	//   "fpbLanguage"
  2939  	//   "fpbNudity"
  2940  	//   "fpbPrejudice"
  2941  	//   "fpbSex"
  2942  	//   "fpbViolence"
  2943  	//   "fpbDrugs"
  2944  	//   "fpbSexualViolence"
  2945  	//   "fpbHorror"
  2946  	//   "fpbCriminalTechniques"
  2947  	//   "fpbImitativeActsTechniques"
  2948  	FpbRatingReasons []string `json:"fpbRatingReasons,omitempty"`
  2949  	// FskRating: The video's Freiwillige Selbstkontrolle der Filmwirtschaft (FSK -
  2950  	// Germany) rating.
  2951  	//
  2952  	// Possible values:
  2953  	//   "fskUnspecified"
  2954  	//   "fsk0" - FSK 0
  2955  	//   "fsk6" - FSK 6
  2956  	//   "fsk12" - FSK 12
  2957  	//   "fsk16" - FSK 16
  2958  	//   "fsk18" - FSK 18
  2959  	//   "fskUnrated"
  2960  	FskRating string `json:"fskRating,omitempty"`
  2961  	// GrfilmRating: The video's rating in Greece.
  2962  	//
  2963  	// Possible values:
  2964  	//   "grfilmUnspecified"
  2965  	//   "grfilmK" - K
  2966  	//   "grfilmE" - E
  2967  	//   "grfilmK12" - K-12
  2968  	//   "grfilmK13" - K-13
  2969  	//   "grfilmK15" - K-15
  2970  	//   "grfilmK17" - K-17
  2971  	//   "grfilmK18" - K-18
  2972  	//   "grfilmUnrated"
  2973  	GrfilmRating string `json:"grfilmRating,omitempty"`
  2974  	// IcaaRating: The video's Instituto de la Cinematografía y de las Artes
  2975  	// Audiovisuales (ICAA - Spain) rating.
  2976  	//
  2977  	// Possible values:
  2978  	//   "icaaUnspecified"
  2979  	//   "icaaApta" - APTA
  2980  	//   "icaa7" - 7
  2981  	//   "icaa12" - 12
  2982  	//   "icaa13" - 13
  2983  	//   "icaa16" - 16
  2984  	//   "icaa18" - 18
  2985  	//   "icaaX" - X
  2986  	//   "icaaUnrated"
  2987  	IcaaRating string `json:"icaaRating,omitempty"`
  2988  	// IfcoRating: The video's Irish Film Classification Office (IFCO - Ireland)
  2989  	// rating. See the IFCO website for more information.
  2990  	//
  2991  	// Possible values:
  2992  	//   "ifcoUnspecified"
  2993  	//   "ifcoG" - G
  2994  	//   "ifcoPg" - PG
  2995  	//   "ifco12" - 12
  2996  	//   "ifco12a" - 12A
  2997  	//   "ifco15" - 15
  2998  	//   "ifco15a" - 15A
  2999  	//   "ifco16" - 16
  3000  	//   "ifco18" - 18
  3001  	//   "ifcoUnrated"
  3002  	IfcoRating string `json:"ifcoRating,omitempty"`
  3003  	// IlfilmRating: The video's rating in Israel.
  3004  	//
  3005  	// Possible values:
  3006  	//   "ilfilmUnspecified"
  3007  	//   "ilfilmAa" - AA
  3008  	//   "ilfilm12" - 12
  3009  	//   "ilfilm14" - 14
  3010  	//   "ilfilm16" - 16
  3011  	//   "ilfilm18" - 18
  3012  	//   "ilfilmUnrated"
  3013  	IlfilmRating string `json:"ilfilmRating,omitempty"`
  3014  	// IncaaRating: The video's INCAA (Instituto Nacional de Cine y Artes
  3015  	// Audiovisuales - Argentina) rating.
  3016  	//
  3017  	// Possible values:
  3018  	//   "incaaUnspecified"
  3019  	//   "incaaAtp" - ATP (Apta para todo publico)
  3020  	//   "incaaSam13" - 13 (Solo apta para mayores de 13 años)
  3021  	//   "incaaSam16" - 16 (Solo apta para mayores de 16 años)
  3022  	//   "incaaSam18" - 18 (Solo apta para mayores de 18 años)
  3023  	//   "incaaC" - X (Solo apta para mayores de 18 años, de exhibición
  3024  	// condicionada)
  3025  	//   "incaaUnrated"
  3026  	IncaaRating string `json:"incaaRating,omitempty"`
  3027  	// KfcbRating: The video's rating from the Kenya Film Classification Board.
  3028  	//
  3029  	// Possible values:
  3030  	//   "kfcbUnspecified"
  3031  	//   "kfcbG" - GE
  3032  	//   "kfcbPg" - PG
  3033  	//   "kfcb16plus" - 16
  3034  	//   "kfcbR" - 18
  3035  	//   "kfcbUnrated"
  3036  	KfcbRating string `json:"kfcbRating,omitempty"`
  3037  	// KijkwijzerRating: The video's NICAM/Kijkwijzer rating from the Nederlands
  3038  	// Instituut voor de Classificatie van Audiovisuele Media (Netherlands).
  3039  	//
  3040  	// Possible values:
  3041  	//   "kijkwijzerUnspecified"
  3042  	//   "kijkwijzerAl" - AL
  3043  	//   "kijkwijzer6" - 6
  3044  	//   "kijkwijzer9" - 9
  3045  	//   "kijkwijzer12" - 12
  3046  	//   "kijkwijzer16" - 16
  3047  	//   "kijkwijzer18"
  3048  	//   "kijkwijzerUnrated"
  3049  	KijkwijzerRating string `json:"kijkwijzerRating,omitempty"`
  3050  	// KmrbRating: The video's Korea Media Rating Board (영상물등급위원회)
  3051  	// rating. The KMRB rates videos in South Korea.
  3052  	//
  3053  	// Possible values:
  3054  	//   "kmrbUnspecified"
  3055  	//   "kmrbAll" - 전체관람가
  3056  	//   "kmrb12plus" - 12세 이상 관람가
  3057  	//   "kmrb15plus" - 15세 이상 관람가
  3058  	//   "kmrbTeenr"
  3059  	//   "kmrbR" - 청소년 관람불가
  3060  	//   "kmrbUnrated"
  3061  	KmrbRating string `json:"kmrbRating,omitempty"`
  3062  	// LsfRating: The video's rating from Indonesia's Lembaga Sensor Film.
  3063  	//
  3064  	// Possible values:
  3065  	//   "lsfUnspecified"
  3066  	//   "lsfSu" - SU
  3067  	//   "lsfA" - A
  3068  	//   "lsfBo" - BO
  3069  	//   "lsf13" - 13
  3070  	//   "lsfR" - R
  3071  	//   "lsf17" - 17
  3072  	//   "lsfD" - D
  3073  	//   "lsf21" - 21
  3074  	//   "lsfUnrated"
  3075  	LsfRating string `json:"lsfRating,omitempty"`
  3076  	// MccaaRating: The video's rating from Malta's Film Age-Classification Board.
  3077  	//
  3078  	// Possible values:
  3079  	//   "mccaaUnspecified"
  3080  	//   "mccaaU" - U
  3081  	//   "mccaaPg" - PG
  3082  	//   "mccaa12a" - 12A
  3083  	//   "mccaa12" - 12
  3084  	//   "mccaa14" - 14 - this rating was removed from the new classification
  3085  	// structure introduced in 2013.
  3086  	//   "mccaa15" - 15
  3087  	//   "mccaa16" - 16 - this rating was removed from the new classification
  3088  	// structure introduced in 2013.
  3089  	//   "mccaa18" - 18
  3090  	//   "mccaaUnrated"
  3091  	MccaaRating string `json:"mccaaRating,omitempty"`
  3092  	// MccypRating: The video's rating from the Danish Film Institute's (Det Danske
  3093  	// Filminstitut) Media Council for Children and Young People.
  3094  	//
  3095  	// Possible values:
  3096  	//   "mccypUnspecified"
  3097  	//   "mccypA" - A
  3098  	//   "mccyp7" - 7
  3099  	//   "mccyp11" - 11
  3100  	//   "mccyp15" - 15
  3101  	//   "mccypUnrated"
  3102  	MccypRating string `json:"mccypRating,omitempty"`
  3103  	// McstRating: The video's rating system for Vietnam - MCST
  3104  	//
  3105  	// Possible values:
  3106  	//   "mcstUnspecified"
  3107  	//   "mcstP" - P
  3108  	//   "mcst0" - 0
  3109  	//   "mcstC13" - C13
  3110  	//   "mcstC16" - C16
  3111  	//   "mcst16plus" - 16+
  3112  	//   "mcstC18" - C18
  3113  	//   "mcstGPg" - MCST_G_PG
  3114  	//   "mcstUnrated"
  3115  	McstRating string `json:"mcstRating,omitempty"`
  3116  	// MdaRating: The video's rating from Singapore's Media Development Authority
  3117  	// (MDA) and, specifically, it's Board of Film Censors (BFC).
  3118  	//
  3119  	// Possible values:
  3120  	//   "mdaUnspecified"
  3121  	//   "mdaG" - G
  3122  	//   "mdaPg" - PG
  3123  	//   "mdaPg13" - PG13
  3124  	//   "mdaNc16" - NC16
  3125  	//   "mdaM18" - M18
  3126  	//   "mdaR21" - R21
  3127  	//   "mdaUnrated"
  3128  	MdaRating string `json:"mdaRating,omitempty"`
  3129  	// MedietilsynetRating: The video's rating from Medietilsynet, the Norwegian
  3130  	// Media Authority.
  3131  	//
  3132  	// Possible values:
  3133  	//   "medietilsynetUnspecified"
  3134  	//   "medietilsynetA" - A
  3135  	//   "medietilsynet6" - 6
  3136  	//   "medietilsynet7" - 7
  3137  	//   "medietilsynet9" - 9
  3138  	//   "medietilsynet11" - 11
  3139  	//   "medietilsynet12" - 12
  3140  	//   "medietilsynet15" - 15
  3141  	//   "medietilsynet18" - 18
  3142  	//   "medietilsynetUnrated"
  3143  	MedietilsynetRating string `json:"medietilsynetRating,omitempty"`
  3144  	// MekuRating: The video's rating from Finland's Kansallinen Audiovisuaalinen
  3145  	// Instituutti (National Audiovisual Institute).
  3146  	//
  3147  	// Possible values:
  3148  	//   "mekuUnspecified"
  3149  	//   "mekuS" - S
  3150  	//   "meku7" - 7
  3151  	//   "meku12" - 12
  3152  	//   "meku16" - 16
  3153  	//   "meku18" - 18
  3154  	//   "mekuUnrated"
  3155  	MekuRating string `json:"mekuRating,omitempty"`
  3156  	// MenaMpaaRating: The rating system for MENA countries, a clone of MPAA. It is
  3157  	// needed to prevent titles go live w/o additional QC check, since some of them
  3158  	// can be inappropriate for the countries at all. See b/33408548 for more
  3159  	// details.
  3160  	//
  3161  	// Possible values:
  3162  	//   "menaMpaaUnspecified"
  3163  	//   "menaMpaaG" - G
  3164  	//   "menaMpaaPg" - PG
  3165  	//   "menaMpaaPg13" - PG-13
  3166  	//   "menaMpaaR" - R
  3167  	//   "menaMpaaUnrated" - To keep the same enum values as MPAA's items have,
  3168  	// skip NC_17.
  3169  	MenaMpaaRating string `json:"menaMpaaRating,omitempty"`
  3170  	// MibacRating: The video's rating from the Ministero dei Beni e delle
  3171  	// Attività Culturali e del Turismo (Italy).
  3172  	//
  3173  	// Possible values:
  3174  	//   "mibacUnspecified"
  3175  	//   "mibacT"
  3176  	//   "mibacVap"
  3177  	//   "mibacVm6"
  3178  	//   "mibacVm12"
  3179  	//   "mibacVm14"
  3180  	//   "mibacVm16"
  3181  	//   "mibacVm18"
  3182  	//   "mibacUnrated"
  3183  	MibacRating string `json:"mibacRating,omitempty"`
  3184  	// MocRating: The video's Ministerio de Cultura (Colombia) rating.
  3185  	//
  3186  	// Possible values:
  3187  	//   "mocUnspecified"
  3188  	//   "mocE" - E
  3189  	//   "mocT" - T
  3190  	//   "moc7" - 7
  3191  	//   "moc12" - 12
  3192  	//   "moc15" - 15
  3193  	//   "moc18" - 18
  3194  	//   "mocX" - X
  3195  	//   "mocBanned" - Banned
  3196  	//   "mocUnrated"
  3197  	MocRating string `json:"mocRating,omitempty"`
  3198  	// MoctwRating: The video's rating from Taiwan's Ministry of Culture
  3199  	// (文化部).
  3200  	//
  3201  	// Possible values:
  3202  	//   "moctwUnspecified"
  3203  	//   "moctwG" - G
  3204  	//   "moctwP" - P
  3205  	//   "moctwPg" - PG
  3206  	//   "moctwR" - R
  3207  	//   "moctwUnrated"
  3208  	//   "moctwR12" - R-12
  3209  	//   "moctwR15" - R-15
  3210  	MoctwRating string `json:"moctwRating,omitempty"`
  3211  	// MpaaRating: The video's Motion Picture Association of America (MPAA) rating.
  3212  	//
  3213  	// Possible values:
  3214  	//   "mpaaUnspecified"
  3215  	//   "mpaaG" - G
  3216  	//   "mpaaPg" - PG
  3217  	//   "mpaaPg13" - PG-13
  3218  	//   "mpaaR" - R
  3219  	//   "mpaaNc17" - NC-17
  3220  	//   "mpaaX" - ! X
  3221  	//   "mpaaUnrated"
  3222  	MpaaRating string `json:"mpaaRating,omitempty"`
  3223  	// MpaatRating: The rating system for trailer, DVD, and Ad in the US. See
  3224  	// http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html.
  3225  	//
  3226  	// Possible values:
  3227  	//   "mpaatUnspecified"
  3228  	//   "mpaatGb" - GB
  3229  	//   "mpaatRb" - RB
  3230  	MpaatRating string `json:"mpaatRating,omitempty"`
  3231  	// MtrcbRating: The video's rating from the Movie and Television Review and
  3232  	// Classification Board (Philippines).
  3233  	//
  3234  	// Possible values:
  3235  	//   "mtrcbUnspecified"
  3236  	//   "mtrcbG" - G
  3237  	//   "mtrcbPg" - PG
  3238  	//   "mtrcbR13" - R-13
  3239  	//   "mtrcbR16" - R-16
  3240  	//   "mtrcbR18" - R-18
  3241  	//   "mtrcbX" - X
  3242  	//   "mtrcbUnrated"
  3243  	MtrcbRating string `json:"mtrcbRating,omitempty"`
  3244  	// NbcRating: The video's rating from the Maldives National Bureau of
  3245  	// Classification.
  3246  	//
  3247  	// Possible values:
  3248  	//   "nbcUnspecified"
  3249  	//   "nbcG" - G
  3250  	//   "nbcPg" - PG
  3251  	//   "nbc12plus" - 12+
  3252  	//   "nbc15plus" - 15+
  3253  	//   "nbc18plus" - 18+
  3254  	//   "nbc18plusr" - 18+R
  3255  	//   "nbcPu" - PU
  3256  	//   "nbcUnrated"
  3257  	NbcRating string `json:"nbcRating,omitempty"`
  3258  	// NbcplRating: The video's rating in Poland.
  3259  	//
  3260  	// Possible values:
  3261  	//   "nbcplUnspecified"
  3262  	//   "nbcplI"
  3263  	//   "nbcplIi"
  3264  	//   "nbcplIii"
  3265  	//   "nbcplIv"
  3266  	//   "nbcpl18plus"
  3267  	//   "nbcplUnrated"
  3268  	NbcplRating string `json:"nbcplRating,omitempty"`
  3269  	// NfrcRating: The video's rating from the Bulgarian National Film Center.
  3270  	//
  3271  	// Possible values:
  3272  	//   "nfrcUnspecified"
  3273  	//   "nfrcA" - A
  3274  	//   "nfrcB" - B
  3275  	//   "nfrcC" - C
  3276  	//   "nfrcD" - D
  3277  	//   "nfrcX" - X
  3278  	//   "nfrcUnrated"
  3279  	NfrcRating string `json:"nfrcRating,omitempty"`
  3280  	// NfvcbRating: The video's rating from Nigeria's National Film and Video
  3281  	// Censors Board.
  3282  	//
  3283  	// Possible values:
  3284  	//   "nfvcbUnspecified"
  3285  	//   "nfvcbG" - G
  3286  	//   "nfvcbPg" - PG
  3287  	//   "nfvcb12" - 12
  3288  	//   "nfvcb12a" - 12A
  3289  	//   "nfvcb15" - 15
  3290  	//   "nfvcb18" - 18
  3291  	//   "nfvcbRe" - RE
  3292  	//   "nfvcbUnrated"
  3293  	NfvcbRating string `json:"nfvcbRating,omitempty"`
  3294  	// NkclvRating: The video's rating from the Nacionãlais Kino centrs (National
  3295  	// Film Centre of Latvia).
  3296  	//
  3297  	// Possible values:
  3298  	//   "nkclvUnspecified"
  3299  	//   "nkclvU" - U
  3300  	//   "nkclv7plus" - 7+
  3301  	//   "nkclv12plus" - 12+
  3302  	//   "nkclv16plus" - ! 16+
  3303  	//   "nkclv18plus" - 18+
  3304  	//   "nkclvUnrated"
  3305  	NkclvRating string `json:"nkclvRating,omitempty"`
  3306  	// NmcRating: The National Media Council ratings system for United Arab
  3307  	// Emirates.
  3308  	//
  3309  	// Possible values:
  3310  	//   "nmcUnspecified"
  3311  	//   "nmcG" - G
  3312  	//   "nmcPg" - PG
  3313  	//   "nmcPg13" - PG-13
  3314  	//   "nmcPg15" - PG-15
  3315  	//   "nmc15plus" - 15+
  3316  	//   "nmc18plus" - 18+
  3317  	//   "nmc18tc" - 18TC
  3318  	//   "nmcUnrated"
  3319  	NmcRating string `json:"nmcRating,omitempty"`
  3320  	// OflcRating: The video's Office of Film and Literature Classification (OFLC -
  3321  	// New Zealand) rating.
  3322  	//
  3323  	// Possible values:
  3324  	//   "oflcUnspecified"
  3325  	//   "oflcG" - G
  3326  	//   "oflcPg" - PG
  3327  	//   "oflcM" - M
  3328  	//   "oflcR13" - R13
  3329  	//   "oflcR15" - R15
  3330  	//   "oflcR16" - R16
  3331  	//   "oflcR18" - R18
  3332  	//   "oflcUnrated"
  3333  	//   "oflcRp13" - RP13
  3334  	//   "oflcRp16" - RP16
  3335  	//   "oflcRp18" - RP18
  3336  	OflcRating string `json:"oflcRating,omitempty"`
  3337  	// PefilmRating: The video's rating in Peru.
  3338  	//
  3339  	// Possible values:
  3340  	//   "pefilmUnspecified"
  3341  	//   "pefilmPt" - PT
  3342  	//   "pefilmPg" - PG
  3343  	//   "pefilm14" - 14
  3344  	//   "pefilm18" - 18
  3345  	//   "pefilmUnrated"
  3346  	PefilmRating string `json:"pefilmRating,omitempty"`
  3347  	// RcnofRating: The video's rating from the Hungarian Nemzeti Filmiroda, the
  3348  	// Rating Committee of the National Office of Film.
  3349  	//
  3350  	// Possible values:
  3351  	//   "rcnofUnspecified"
  3352  	//   "rcnofI"
  3353  	//   "rcnofIi"
  3354  	//   "rcnofIii"
  3355  	//   "rcnofIv"
  3356  	//   "rcnofV"
  3357  	//   "rcnofVi"
  3358  	//   "rcnofUnrated"
  3359  	RcnofRating string `json:"rcnofRating,omitempty"`
  3360  	// ResorteviolenciaRating: The video's rating in Venezuela.
  3361  	//
  3362  	// Possible values:
  3363  	//   "resorteviolenciaUnspecified"
  3364  	//   "resorteviolenciaA" - A
  3365  	//   "resorteviolenciaB" - B
  3366  	//   "resorteviolenciaC" - C
  3367  	//   "resorteviolenciaD" - D
  3368  	//   "resorteviolenciaE" - E
  3369  	//   "resorteviolenciaUnrated"
  3370  	ResorteviolenciaRating string `json:"resorteviolenciaRating,omitempty"`
  3371  	// RtcRating: The video's General Directorate of Radio, Television and
  3372  	// Cinematography (Mexico) rating.
  3373  	//
  3374  	// Possible values:
  3375  	//   "rtcUnspecified"
  3376  	//   "rtcAa" - AA
  3377  	//   "rtcA" - A
  3378  	//   "rtcB" - B
  3379  	//   "rtcB15" - B15
  3380  	//   "rtcC" - C
  3381  	//   "rtcD" - D
  3382  	//   "rtcUnrated"
  3383  	RtcRating string `json:"rtcRating,omitempty"`
  3384  	// RteRating: The video's rating from Ireland's Raidió Teilifís Éireann.
  3385  	//
  3386  	// Possible values:
  3387  	//   "rteUnspecified"
  3388  	//   "rteGa" - GA
  3389  	//   "rteCh" - CH
  3390  	//   "rtePs" - PS
  3391  	//   "rteMa" - MA
  3392  	//   "rteUnrated"
  3393  	RteRating string `json:"rteRating,omitempty"`
  3394  	// RussiaRating: The video's National Film Registry of the Russian Federation
  3395  	// (MKRF - Russia) rating.
  3396  	//
  3397  	// Possible values:
  3398  	//   "russiaUnspecified"
  3399  	//   "russia0" - 0+
  3400  	//   "russia6" - 6+
  3401  	//   "russia12" - 12+
  3402  	//   "russia16" - 16+
  3403  	//   "russia18" - 18+
  3404  	//   "russiaUnrated"
  3405  	RussiaRating string `json:"russiaRating,omitempty"`
  3406  	// SkfilmRating: The video's rating in Slovakia.
  3407  	//
  3408  	// Possible values:
  3409  	//   "skfilmUnspecified"
  3410  	//   "skfilmG" - G
  3411  	//   "skfilmP2" - P2
  3412  	//   "skfilmP5" - P5
  3413  	//   "skfilmP8" - P8
  3414  	//   "skfilmUnrated"
  3415  	SkfilmRating string `json:"skfilmRating,omitempty"`
  3416  	// SmaisRating: The video's rating in Iceland.
  3417  	//
  3418  	// Possible values:
  3419  	//   "smaisUnspecified"
  3420  	//   "smaisL" - L
  3421  	//   "smais7" - 7
  3422  	//   "smais12" - 12
  3423  	//   "smais14" - 14
  3424  	//   "smais16" - 16
  3425  	//   "smais18" - 18
  3426  	//   "smaisUnrated"
  3427  	SmaisRating string `json:"smaisRating,omitempty"`
  3428  	// SmsaRating: The video's rating from Statens medieråd (Sweden's National
  3429  	// Media Council).
  3430  	//
  3431  	// Possible values:
  3432  	//   "smsaUnspecified"
  3433  	//   "smsaA" - All ages
  3434  	//   "smsa7" - 7
  3435  	//   "smsa11" - 11
  3436  	//   "smsa15" - 15
  3437  	//   "smsaUnrated"
  3438  	SmsaRating string `json:"smsaRating,omitempty"`
  3439  	// TvpgRating: The video's TV Parental Guidelines (TVPG) rating.
  3440  	//
  3441  	// Possible values:
  3442  	//   "tvpgUnspecified"
  3443  	//   "tvpgY" - TV-Y
  3444  	//   "tvpgY7" - TV-Y7
  3445  	//   "tvpgY7Fv" - TV-Y7-FV
  3446  	//   "tvpgG" - TV-G
  3447  	//   "tvpgPg" - TV-PG
  3448  	//   "pg14" - TV-14
  3449  	//   "tvpgMa" - TV-MA
  3450  	//   "tvpgUnrated"
  3451  	TvpgRating string `json:"tvpgRating,omitempty"`
  3452  	// YtRating: A rating that YouTube uses to identify age-restricted content.
  3453  	//
  3454  	// Possible values:
  3455  	//   "ytUnspecified"
  3456  	//   "ytAgeRestricted"
  3457  	YtRating string `json:"ytRating,omitempty"`
  3458  	// ForceSendFields is a list of field names (e.g. "AcbRating") to
  3459  	// unconditionally include in API requests. By default, fields with empty or
  3460  	// default values are omitted from API requests. See
  3461  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3462  	// details.
  3463  	ForceSendFields []string `json:"-"`
  3464  	// NullFields is a list of field names (e.g. "AcbRating") to include in API
  3465  	// requests with the JSON null value. By default, fields with empty values are
  3466  	// omitted from API requests. See
  3467  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3468  	NullFields []string `json:"-"`
  3469  }
  3470  
  3471  func (s *ContentRating) MarshalJSON() ([]byte, error) {
  3472  	type NoMethod ContentRating
  3473  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3474  }
  3475  
  3476  // Cuepoint: Note that there may be a 5-second end-point resolution issue. For
  3477  // instance, if a cuepoint comes in for 22:03:27, we may stuff the cuepoint
  3478  // into 22:03:25 or 22:03:30, depending. This is an artifact of HLS.
  3479  type Cuepoint struct {
  3480  	// Possible values:
  3481  	//   "cueTypeUnspecified"
  3482  	//   "cueTypeAd"
  3483  	CueType string `json:"cueType,omitempty"`
  3484  	// DurationSecs: The duration of this cuepoint.
  3485  	DurationSecs int64  `json:"durationSecs,omitempty"`
  3486  	Etag         string `json:"etag,omitempty"`
  3487  	// Id: The identifier for cuepoint resource.
  3488  	Id string `json:"id,omitempty"`
  3489  	// InsertionOffsetTimeMs: The time when the cuepoint should be inserted by
  3490  	// offset to the broadcast actual start time.
  3491  	InsertionOffsetTimeMs int64 `json:"insertionOffsetTimeMs,omitempty,string"`
  3492  	// WalltimeMs: The wall clock time at which the cuepoint should be inserted.
  3493  	// Only one of insertion_offset_time_ms and walltime_ms may be set at a time.
  3494  	WalltimeMs uint64 `json:"walltimeMs,omitempty,string"`
  3495  
  3496  	// ServerResponse contains the HTTP response code and headers from the server.
  3497  	googleapi.ServerResponse `json:"-"`
  3498  	// ForceSendFields is a list of field names (e.g. "CueType") to unconditionally
  3499  	// include in API requests. By default, fields with empty or default values are
  3500  	// omitted from API requests. See
  3501  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3502  	// details.
  3503  	ForceSendFields []string `json:"-"`
  3504  	// NullFields is a list of field names (e.g. "CueType") to include in API
  3505  	// requests with the JSON null value. By default, fields with empty values are
  3506  	// omitted from API requests. See
  3507  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3508  	NullFields []string `json:"-"`
  3509  }
  3510  
  3511  func (s *Cuepoint) MarshalJSON() ([]byte, error) {
  3512  	type NoMethod Cuepoint
  3513  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3514  }
  3515  
  3516  // CuepointSchedule: Schedule to insert cuepoints into a broadcast by ads
  3517  // automator.
  3518  type CuepointSchedule struct {
  3519  	// Enabled: This field is semantically required. If it is set false or not set,
  3520  	// other fields in this message will be ignored.
  3521  	Enabled bool `json:"enabled,omitempty"`
  3522  	// PauseAdsUntil: If set, automatic cuepoint insertion is paused until this
  3523  	// timestamp ("No Ad Zone"). The value is specified in ISO 8601 format.
  3524  	PauseAdsUntil string `json:"pauseAdsUntil,omitempty"`
  3525  	// RepeatIntervalSecs: Interval frequency in seconds that api uses to insert
  3526  	// cuepoints automatically.
  3527  	RepeatIntervalSecs int64 `json:"repeatIntervalSecs,omitempty"`
  3528  	// ScheduleStrategy: The strategy to use when scheduling cuepoints.
  3529  	//
  3530  	// Possible values:
  3531  	//   "scheduleStrategyUnspecified"
  3532  	//   "concurrent" - Strategy to schedule cuepoints at one time for all viewers.
  3533  	//   "nonConcurrent" - Strategy to schedule cuepoints at an increased rate to
  3534  	// allow viewers to receive cuepoints when eligible. See
  3535  	// go/lcr-non-concurrent-ads for more details.
  3536  	ScheduleStrategy string `json:"scheduleStrategy,omitempty"`
  3537  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
  3538  	// include in API requests. By default, fields with empty or default values are
  3539  	// omitted from API requests. See
  3540  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3541  	// details.
  3542  	ForceSendFields []string `json:"-"`
  3543  	// NullFields is a list of field names (e.g. "Enabled") to include in API
  3544  	// requests with the JSON null value. By default, fields with empty values are
  3545  	// omitted from API requests. See
  3546  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3547  	NullFields []string `json:"-"`
  3548  }
  3549  
  3550  func (s *CuepointSchedule) MarshalJSON() ([]byte, error) {
  3551  	type NoMethod CuepointSchedule
  3552  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3553  }
  3554  
  3555  type Entity struct {
  3556  	Id     string `json:"id,omitempty"`
  3557  	TypeId string `json:"typeId,omitempty"`
  3558  	Url    string `json:"url,omitempty"`
  3559  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3560  	// include in API requests. By default, fields with empty or default values are
  3561  	// omitted from API requests. See
  3562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3563  	// details.
  3564  	ForceSendFields []string `json:"-"`
  3565  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3566  	// with the JSON null value. By default, fields with empty values are omitted
  3567  	// from API requests. See
  3568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3569  	NullFields []string `json:"-"`
  3570  }
  3571  
  3572  func (s *Entity) MarshalJSON() ([]byte, error) {
  3573  	type NoMethod Entity
  3574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3575  }
  3576  
  3577  // GeoPoint: Geographical coordinates of a point, in WGS84.
  3578  type GeoPoint struct {
  3579  	// Altitude: Altitude above the reference ellipsoid, in meters.
  3580  	Altitude float64 `json:"altitude,omitempty"`
  3581  	// Latitude: Latitude in degrees.
  3582  	Latitude float64 `json:"latitude,omitempty"`
  3583  	// Longitude: Longitude in degrees.
  3584  	Longitude float64 `json:"longitude,omitempty"`
  3585  	// ForceSendFields is a list of field names (e.g. "Altitude") to
  3586  	// unconditionally include in API requests. By default, fields with empty or
  3587  	// default values are omitted from API requests. See
  3588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3589  	// details.
  3590  	ForceSendFields []string `json:"-"`
  3591  	// NullFields is a list of field names (e.g. "Altitude") to include in API
  3592  	// requests with the JSON null value. By default, fields with empty values are
  3593  	// omitted from API requests. See
  3594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3595  	NullFields []string `json:"-"`
  3596  }
  3597  
  3598  func (s *GeoPoint) MarshalJSON() ([]byte, error) {
  3599  	type NoMethod GeoPoint
  3600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3601  }
  3602  
  3603  func (s *GeoPoint) UnmarshalJSON(data []byte) error {
  3604  	type NoMethod GeoPoint
  3605  	var s1 struct {
  3606  		Altitude  gensupport.JSONFloat64 `json:"altitude"`
  3607  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
  3608  		Longitude gensupport.JSONFloat64 `json:"longitude"`
  3609  		*NoMethod
  3610  	}
  3611  	s1.NoMethod = (*NoMethod)(s)
  3612  	if err := json.Unmarshal(data, &s1); err != nil {
  3613  		return err
  3614  	}
  3615  	s.Altitude = float64(s1.Altitude)
  3616  	s.Latitude = float64(s1.Latitude)
  3617  	s.Longitude = float64(s1.Longitude)
  3618  	return nil
  3619  }
  3620  
  3621  // I18nLanguage: An *i18nLanguage* resource identifies a UI language currently
  3622  // supported by YouTube.
  3623  type I18nLanguage struct {
  3624  	// Etag: Etag of this resource.
  3625  	Etag string `json:"etag,omitempty"`
  3626  	// Id: The ID that YouTube uses to uniquely identify the i18n language.
  3627  	Id string `json:"id,omitempty"`
  3628  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  3629  	// "youtube#i18nLanguage".
  3630  	Kind string `json:"kind,omitempty"`
  3631  	// Snippet: The snippet object contains basic details about the i18n language,
  3632  	// such as language code and human-readable name.
  3633  	Snippet *I18nLanguageSnippet `json:"snippet,omitempty"`
  3634  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  3635  	// include in API requests. By default, fields with empty or default values are
  3636  	// omitted from API requests. See
  3637  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3638  	// details.
  3639  	ForceSendFields []string `json:"-"`
  3640  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  3641  	// with the JSON null value. By default, fields with empty values are omitted
  3642  	// from API requests. See
  3643  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3644  	NullFields []string `json:"-"`
  3645  }
  3646  
  3647  func (s *I18nLanguage) MarshalJSON() ([]byte, error) {
  3648  	type NoMethod I18nLanguage
  3649  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3650  }
  3651  
  3652  type I18nLanguageListResponse struct {
  3653  	// Etag: Etag of this resource.
  3654  	Etag string `json:"etag,omitempty"`
  3655  	// EventId: Serialized EventId of the request which produced this response.
  3656  	EventId string `json:"eventId,omitempty"`
  3657  	// Items: A list of supported i18n languages. In this map, the i18n language ID
  3658  	// is the map key, and its value is the corresponding i18nLanguage resource.
  3659  	Items []*I18nLanguage `json:"items,omitempty"`
  3660  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  3661  	// "youtube#i18nLanguageListResponse".
  3662  	Kind string `json:"kind,omitempty"`
  3663  	// VisitorId: The visitorId identifies the visitor.
  3664  	VisitorId string `json:"visitorId,omitempty"`
  3665  
  3666  	// ServerResponse contains the HTTP response code and headers from the server.
  3667  	googleapi.ServerResponse `json:"-"`
  3668  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  3669  	// include in API requests. By default, fields with empty or default values are
  3670  	// omitted from API requests. See
  3671  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3672  	// details.
  3673  	ForceSendFields []string `json:"-"`
  3674  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  3675  	// with the JSON null value. By default, fields with empty values are omitted
  3676  	// from API requests. See
  3677  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3678  	NullFields []string `json:"-"`
  3679  }
  3680  
  3681  func (s *I18nLanguageListResponse) MarshalJSON() ([]byte, error) {
  3682  	type NoMethod I18nLanguageListResponse
  3683  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3684  }
  3685  
  3686  // I18nLanguageSnippet: Basic details about an i18n language, such as language
  3687  // code and human-readable name.
  3688  type I18nLanguageSnippet struct {
  3689  	// Hl: A short BCP-47 code that uniquely identifies a language.
  3690  	Hl string `json:"hl,omitempty"`
  3691  	// Name: The human-readable name of the language in the language itself.
  3692  	Name string `json:"name,omitempty"`
  3693  	// ForceSendFields is a list of field names (e.g. "Hl") to unconditionally
  3694  	// include in API requests. By default, fields with empty or default values are
  3695  	// omitted from API requests. See
  3696  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3697  	// details.
  3698  	ForceSendFields []string `json:"-"`
  3699  	// NullFields is a list of field names (e.g. "Hl") to include in API requests
  3700  	// with the JSON null value. By default, fields with empty values are omitted
  3701  	// from API requests. See
  3702  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3703  	NullFields []string `json:"-"`
  3704  }
  3705  
  3706  func (s *I18nLanguageSnippet) MarshalJSON() ([]byte, error) {
  3707  	type NoMethod I18nLanguageSnippet
  3708  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3709  }
  3710  
  3711  // I18nRegion: A *i18nRegion* resource identifies a region where YouTube is
  3712  // available.
  3713  type I18nRegion struct {
  3714  	// Etag: Etag of this resource.
  3715  	Etag string `json:"etag,omitempty"`
  3716  	// Id: The ID that YouTube uses to uniquely identify the i18n region.
  3717  	Id string `json:"id,omitempty"`
  3718  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  3719  	// "youtube#i18nRegion".
  3720  	Kind string `json:"kind,omitempty"`
  3721  	// Snippet: The snippet object contains basic details about the i18n region,
  3722  	// such as region code and human-readable name.
  3723  	Snippet *I18nRegionSnippet `json:"snippet,omitempty"`
  3724  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  3725  	// include in API requests. By default, fields with empty or default values are
  3726  	// omitted from API requests. See
  3727  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3728  	// details.
  3729  	ForceSendFields []string `json:"-"`
  3730  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  3731  	// with the JSON null value. By default, fields with empty values are omitted
  3732  	// from API requests. See
  3733  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3734  	NullFields []string `json:"-"`
  3735  }
  3736  
  3737  func (s *I18nRegion) MarshalJSON() ([]byte, error) {
  3738  	type NoMethod I18nRegion
  3739  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3740  }
  3741  
  3742  type I18nRegionListResponse struct {
  3743  	// Etag: Etag of this resource.
  3744  	Etag string `json:"etag,omitempty"`
  3745  	// EventId: Serialized EventId of the request which produced this response.
  3746  	EventId string `json:"eventId,omitempty"`
  3747  	// Items: A list of regions where YouTube is available. In this map, the i18n
  3748  	// region ID is the map key, and its value is the corresponding i18nRegion
  3749  	// resource.
  3750  	Items []*I18nRegion `json:"items,omitempty"`
  3751  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  3752  	// "youtube#i18nRegionListResponse".
  3753  	Kind string `json:"kind,omitempty"`
  3754  	// VisitorId: The visitorId identifies the visitor.
  3755  	VisitorId string `json:"visitorId,omitempty"`
  3756  
  3757  	// ServerResponse contains the HTTP response code and headers from the server.
  3758  	googleapi.ServerResponse `json:"-"`
  3759  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  3760  	// include in API requests. By default, fields with empty or default values are
  3761  	// omitted from API requests. See
  3762  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3763  	// details.
  3764  	ForceSendFields []string `json:"-"`
  3765  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  3766  	// with the JSON null value. By default, fields with empty values are omitted
  3767  	// from API requests. See
  3768  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3769  	NullFields []string `json:"-"`
  3770  }
  3771  
  3772  func (s *I18nRegionListResponse) MarshalJSON() ([]byte, error) {
  3773  	type NoMethod I18nRegionListResponse
  3774  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3775  }
  3776  
  3777  // I18nRegionSnippet: Basic details about an i18n region, such as region code
  3778  // and human-readable name.
  3779  type I18nRegionSnippet struct {
  3780  	// Gl: The region code as a 2-letter ISO country code.
  3781  	Gl string `json:"gl,omitempty"`
  3782  	// Name: The human-readable name of the region.
  3783  	Name string `json:"name,omitempty"`
  3784  	// ForceSendFields is a list of field names (e.g. "Gl") to unconditionally
  3785  	// include in API requests. By default, fields with empty or default values are
  3786  	// omitted from API requests. See
  3787  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3788  	// details.
  3789  	ForceSendFields []string `json:"-"`
  3790  	// NullFields is a list of field names (e.g. "Gl") to include in API requests
  3791  	// with the JSON null value. By default, fields with empty values are omitted
  3792  	// from API requests. See
  3793  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3794  	NullFields []string `json:"-"`
  3795  }
  3796  
  3797  func (s *I18nRegionSnippet) MarshalJSON() ([]byte, error) {
  3798  	type NoMethod I18nRegionSnippet
  3799  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3800  }
  3801  
  3802  // ImageSettings: Branding properties for images associated with the channel.
  3803  type ImageSettings struct {
  3804  	// BackgroundImageUrl: The URL for the background image shown on the video
  3805  	// watch page. The image should be 1200px by 615px, with a maximum file size of
  3806  	// 128k.
  3807  	BackgroundImageUrl *LocalizedProperty `json:"backgroundImageUrl,omitempty"`
  3808  	// BannerExternalUrl: This is generated when a ChannelBanner.Insert request has
  3809  	// succeeded for the given channel.
  3810  	BannerExternalUrl string `json:"bannerExternalUrl,omitempty"`
  3811  	// BannerImageUrl: Banner image. Desktop size (1060x175).
  3812  	BannerImageUrl string `json:"bannerImageUrl,omitempty"`
  3813  	// BannerMobileExtraHdImageUrl: Banner image. Mobile size high resolution
  3814  	// (1440x395).
  3815  	BannerMobileExtraHdImageUrl string `json:"bannerMobileExtraHdImageUrl,omitempty"`
  3816  	// BannerMobileHdImageUrl: Banner image. Mobile size high resolution
  3817  	// (1280x360).
  3818  	BannerMobileHdImageUrl string `json:"bannerMobileHdImageUrl,omitempty"`
  3819  	// BannerMobileImageUrl: Banner image. Mobile size (640x175).
  3820  	BannerMobileImageUrl string `json:"bannerMobileImageUrl,omitempty"`
  3821  	// BannerMobileLowImageUrl: Banner image. Mobile size low resolution (320x88).
  3822  	BannerMobileLowImageUrl string `json:"bannerMobileLowImageUrl,omitempty"`
  3823  	// BannerMobileMediumHdImageUrl: Banner image. Mobile size medium/high
  3824  	// resolution (960x263).
  3825  	BannerMobileMediumHdImageUrl string `json:"bannerMobileMediumHdImageUrl,omitempty"`
  3826  	// BannerTabletExtraHdImageUrl: Banner image. Tablet size extra high resolution
  3827  	// (2560x424).
  3828  	BannerTabletExtraHdImageUrl string `json:"bannerTabletExtraHdImageUrl,omitempty"`
  3829  	// BannerTabletHdImageUrl: Banner image. Tablet size high resolution
  3830  	// (2276x377).
  3831  	BannerTabletHdImageUrl string `json:"bannerTabletHdImageUrl,omitempty"`
  3832  	// BannerTabletImageUrl: Banner image. Tablet size (1707x283).
  3833  	BannerTabletImageUrl string `json:"bannerTabletImageUrl,omitempty"`
  3834  	// BannerTabletLowImageUrl: Banner image. Tablet size low resolution
  3835  	// (1138x188).
  3836  	BannerTabletLowImageUrl string `json:"bannerTabletLowImageUrl,omitempty"`
  3837  	// BannerTvHighImageUrl: Banner image. TV size high resolution (1920x1080).
  3838  	BannerTvHighImageUrl string `json:"bannerTvHighImageUrl,omitempty"`
  3839  	// BannerTvImageUrl: Banner image. TV size extra high resolution (2120x1192).
  3840  	BannerTvImageUrl string `json:"bannerTvImageUrl,omitempty"`
  3841  	// BannerTvLowImageUrl: Banner image. TV size low resolution (854x480).
  3842  	BannerTvLowImageUrl string `json:"bannerTvLowImageUrl,omitempty"`
  3843  	// BannerTvMediumImageUrl: Banner image. TV size medium resolution (1280x720).
  3844  	BannerTvMediumImageUrl string `json:"bannerTvMediumImageUrl,omitempty"`
  3845  	// LargeBrandedBannerImageImapScript: The image map script for the large banner
  3846  	// image.
  3847  	LargeBrandedBannerImageImapScript *LocalizedProperty `json:"largeBrandedBannerImageImapScript,omitempty"`
  3848  	// LargeBrandedBannerImageUrl: The URL for the 854px by 70px image that appears
  3849  	// below the video player in the expanded video view of the video watch page.
  3850  	LargeBrandedBannerImageUrl *LocalizedProperty `json:"largeBrandedBannerImageUrl,omitempty"`
  3851  	// SmallBrandedBannerImageImapScript: The image map script for the small banner
  3852  	// image.
  3853  	SmallBrandedBannerImageImapScript *LocalizedProperty `json:"smallBrandedBannerImageImapScript,omitempty"`
  3854  	// SmallBrandedBannerImageUrl: The URL for the 640px by 70px banner image that
  3855  	// appears below the video player in the default view of the video watch page.
  3856  	// The URL for the image that appears above the top-left corner of the video
  3857  	// player. This is a 25-pixel-high image with a flexible width that cannot
  3858  	// exceed 170 pixels.
  3859  	SmallBrandedBannerImageUrl *LocalizedProperty `json:"smallBrandedBannerImageUrl,omitempty"`
  3860  	// TrackingImageUrl: The URL for a 1px by 1px tracking pixel that can be used
  3861  	// to collect statistics for views of the channel or video pages.
  3862  	TrackingImageUrl  string `json:"trackingImageUrl,omitempty"`
  3863  	WatchIconImageUrl string `json:"watchIconImageUrl,omitempty"`
  3864  	// ForceSendFields is a list of field names (e.g. "BackgroundImageUrl") to
  3865  	// unconditionally include in API requests. By default, fields with empty or
  3866  	// default values are omitted from API requests. See
  3867  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3868  	// details.
  3869  	ForceSendFields []string `json:"-"`
  3870  	// NullFields is a list of field names (e.g. "BackgroundImageUrl") to include
  3871  	// in API requests with the JSON null value. By default, fields with empty
  3872  	// values are omitted from API requests. See
  3873  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3874  	NullFields []string `json:"-"`
  3875  }
  3876  
  3877  func (s *ImageSettings) MarshalJSON() ([]byte, error) {
  3878  	type NoMethod ImageSettings
  3879  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3880  }
  3881  
  3882  // IngestionInfo: Describes information necessary for ingesting an RTMP, HTTP,
  3883  // or SRT stream.
  3884  type IngestionInfo struct {
  3885  	// BackupIngestionAddress: The backup ingestion URL that you should use to
  3886  	// stream video to YouTube. You have the option of simultaneously streaming the
  3887  	// content that you are sending to the ingestionAddress to this URL.
  3888  	BackupIngestionAddress string `json:"backupIngestionAddress,omitempty"`
  3889  	// IngestionAddress: The primary ingestion URL that you should use to stream
  3890  	// video to YouTube. You must stream video to this URL. Depending on which
  3891  	// application or tool you use to encode your video stream, you may need to
  3892  	// enter the stream URL and stream name separately or you may need to
  3893  	// concatenate them in the following format: *STREAM_URL/STREAM_NAME*
  3894  	IngestionAddress string `json:"ingestionAddress,omitempty"`
  3895  	// RtmpsBackupIngestionAddress: This ingestion url may be used instead of
  3896  	// backupIngestionAddress in order to stream via RTMPS. Not applicable to
  3897  	// non-RTMP streams.
  3898  	RtmpsBackupIngestionAddress string `json:"rtmpsBackupIngestionAddress,omitempty"`
  3899  	// RtmpsIngestionAddress: This ingestion url may be used instead of
  3900  	// ingestionAddress in order to stream via RTMPS. Not applicable to non-RTMP
  3901  	// streams.
  3902  	RtmpsIngestionAddress string `json:"rtmpsIngestionAddress,omitempty"`
  3903  	// StreamName: The stream name that YouTube assigns to the video stream.
  3904  	StreamName string `json:"streamName,omitempty"`
  3905  	// ForceSendFields is a list of field names (e.g. "BackupIngestionAddress") to
  3906  	// unconditionally include in API requests. By default, fields with empty or
  3907  	// default values are omitted from API requests. See
  3908  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3909  	// details.
  3910  	ForceSendFields []string `json:"-"`
  3911  	// NullFields is a list of field names (e.g. "BackupIngestionAddress") to
  3912  	// include in API requests with the JSON null value. By default, fields with
  3913  	// empty values are omitted from API requests. See
  3914  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3915  	NullFields []string `json:"-"`
  3916  }
  3917  
  3918  func (s *IngestionInfo) MarshalJSON() ([]byte, error) {
  3919  	type NoMethod IngestionInfo
  3920  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3921  }
  3922  
  3923  // InvideoBranding: LINT.IfChange Describes an invideo branding.
  3924  type InvideoBranding struct {
  3925  	// ImageBytes: The bytes the uploaded image. Only used in api to youtube
  3926  	// communication.
  3927  	ImageBytes string `json:"imageBytes,omitempty"`
  3928  	// ImageUrl: The url of the uploaded image. Only used in apiary to api
  3929  	// communication.
  3930  	ImageUrl string `json:"imageUrl,omitempty"`
  3931  	// Position: The spatial position within the video where the branding watermark
  3932  	// will be displayed.
  3933  	Position *InvideoPosition `json:"position,omitempty"`
  3934  	// TargetChannelId: The channel to which this branding links. If not present it
  3935  	// defaults to the current channel.
  3936  	TargetChannelId string `json:"targetChannelId,omitempty"`
  3937  	// Timing: The temporal position within the video where watermark will be
  3938  	// displayed.
  3939  	Timing *InvideoTiming `json:"timing,omitempty"`
  3940  	// ForceSendFields is a list of field names (e.g. "ImageBytes") to
  3941  	// unconditionally include in API requests. By default, fields with empty or
  3942  	// default values are omitted from API requests. See
  3943  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3944  	// details.
  3945  	ForceSendFields []string `json:"-"`
  3946  	// NullFields is a list of field names (e.g. "ImageBytes") to include in API
  3947  	// requests with the JSON null value. By default, fields with empty values are
  3948  	// omitted from API requests. See
  3949  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3950  	NullFields []string `json:"-"`
  3951  }
  3952  
  3953  func (s *InvideoBranding) MarshalJSON() ([]byte, error) {
  3954  	type NoMethod InvideoBranding
  3955  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3956  }
  3957  
  3958  // InvideoPosition: Describes the spatial position of a visual widget inside a
  3959  // video. It is a union of various position types, out of which only will be
  3960  // set one.
  3961  type InvideoPosition struct {
  3962  	// CornerPosition: Describes in which corner of the video the visual widget
  3963  	// will appear.
  3964  	//
  3965  	// Possible values:
  3966  	//   "topLeft"
  3967  	//   "topRight"
  3968  	//   "bottomLeft"
  3969  	//   "bottomRight"
  3970  	CornerPosition string `json:"cornerPosition,omitempty"`
  3971  	// Type: Defines the position type.
  3972  	//
  3973  	// Possible values:
  3974  	//   "corner"
  3975  	Type string `json:"type,omitempty"`
  3976  	// ForceSendFields is a list of field names (e.g. "CornerPosition") to
  3977  	// unconditionally include in API requests. By default, fields with empty or
  3978  	// default values are omitted from API requests. See
  3979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3980  	// details.
  3981  	ForceSendFields []string `json:"-"`
  3982  	// NullFields is a list of field names (e.g. "CornerPosition") to include in
  3983  	// API requests with the JSON null value. By default, fields with empty values
  3984  	// are omitted from API requests. See
  3985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3986  	NullFields []string `json:"-"`
  3987  }
  3988  
  3989  func (s *InvideoPosition) MarshalJSON() ([]byte, error) {
  3990  	type NoMethod InvideoPosition
  3991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3992  }
  3993  
  3994  // InvideoTiming: Describes a temporal position of a visual widget inside a
  3995  // video.
  3996  type InvideoTiming struct {
  3997  	// DurationMs: Defines the duration in milliseconds for which the promotion
  3998  	// should be displayed. If missing, the client should use the default.
  3999  	DurationMs uint64 `json:"durationMs,omitempty,string"`
  4000  	// OffsetMs: Defines the time at which the promotion will appear. Depending on
  4001  	// the value of type the value of the offsetMs field will represent a time
  4002  	// offset from the start or from the end of the video, expressed in
  4003  	// milliseconds.
  4004  	OffsetMs uint64 `json:"offsetMs,omitempty,string"`
  4005  	// Type: Describes a timing type. If the value is offsetFromStart, then the
  4006  	// offsetMs field represents an offset from the start of the video. If the
  4007  	// value is offsetFromEnd, then the offsetMs field represents an offset from
  4008  	// the end of the video.
  4009  	//
  4010  	// Possible values:
  4011  	//   "offsetFromStart"
  4012  	//   "offsetFromEnd"
  4013  	Type string `json:"type,omitempty"`
  4014  	// ForceSendFields is a list of field names (e.g. "DurationMs") to
  4015  	// unconditionally include in API requests. By default, fields with empty or
  4016  	// default values are omitted from API requests. See
  4017  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4018  	// details.
  4019  	ForceSendFields []string `json:"-"`
  4020  	// NullFields is a list of field names (e.g. "DurationMs") to include in API
  4021  	// requests with the JSON null value. By default, fields with empty values are
  4022  	// omitted from API requests. See
  4023  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4024  	NullFields []string `json:"-"`
  4025  }
  4026  
  4027  func (s *InvideoTiming) MarshalJSON() ([]byte, error) {
  4028  	type NoMethod InvideoTiming
  4029  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4030  }
  4031  
  4032  type LanguageTag struct {
  4033  	Value string `json:"value,omitempty"`
  4034  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
  4035  	// include in API requests. By default, fields with empty or default values are
  4036  	// omitted from API requests. See
  4037  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4038  	// details.
  4039  	ForceSendFields []string `json:"-"`
  4040  	// NullFields is a list of field names (e.g. "Value") to include in API
  4041  	// requests with the JSON null value. By default, fields with empty values are
  4042  	// omitted from API requests. See
  4043  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4044  	NullFields []string `json:"-"`
  4045  }
  4046  
  4047  func (s *LanguageTag) MarshalJSON() ([]byte, error) {
  4048  	type NoMethod LanguageTag
  4049  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4050  }
  4051  
  4052  type LevelDetails struct {
  4053  	// DisplayName: The name that should be used when referring to this level.
  4054  	DisplayName string `json:"displayName,omitempty"`
  4055  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  4056  	// unconditionally include in API requests. By default, fields with empty or
  4057  	// default values are omitted from API requests. See
  4058  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4059  	// details.
  4060  	ForceSendFields []string `json:"-"`
  4061  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  4062  	// requests with the JSON null value. By default, fields with empty values are
  4063  	// omitted from API requests. See
  4064  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4065  	NullFields []string `json:"-"`
  4066  }
  4067  
  4068  func (s *LevelDetails) MarshalJSON() ([]byte, error) {
  4069  	type NoMethod LevelDetails
  4070  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4071  }
  4072  
  4073  // LiveBroadcast: A *liveBroadcast* resource represents an event that will be
  4074  // streamed, via live video, on YouTube.
  4075  type LiveBroadcast struct {
  4076  	// ContentDetails: The contentDetails object contains information about the
  4077  	// event's video content, such as whether the content can be shown in an
  4078  	// embedded video player or if it will be archived and therefore available for
  4079  	// viewing after the event has concluded.
  4080  	ContentDetails *LiveBroadcastContentDetails `json:"contentDetails,omitempty"`
  4081  	// Etag: Etag of this resource.
  4082  	Etag string `json:"etag,omitempty"`
  4083  	// Id: The ID that YouTube assigns to uniquely identify the broadcast.
  4084  	Id string `json:"id,omitempty"`
  4085  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4086  	// "youtube#liveBroadcast".
  4087  	Kind string `json:"kind,omitempty"`
  4088  	// MonetizationDetails: The monetizationDetails object contains information
  4089  	// about the event's monetization details.
  4090  	MonetizationDetails *LiveBroadcastMonetizationDetails `json:"monetizationDetails,omitempty"`
  4091  	// Snippet: The snippet object contains basic details about the event,
  4092  	// including its title, description, start time, and end time.
  4093  	Snippet *LiveBroadcastSnippet `json:"snippet,omitempty"`
  4094  	// Statistics: The statistics object contains info about the event's current
  4095  	// stats. These include concurrent viewers and total chat count. Statistics can
  4096  	// change (in either direction) during the lifetime of an event. Statistics are
  4097  	// only returned while the event is live.
  4098  	Statistics *LiveBroadcastStatistics `json:"statistics,omitempty"`
  4099  	// Status: The status object contains information about the event's status.
  4100  	Status *LiveBroadcastStatus `json:"status,omitempty"`
  4101  
  4102  	// ServerResponse contains the HTTP response code and headers from the server.
  4103  	googleapi.ServerResponse `json:"-"`
  4104  	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
  4105  	// unconditionally include in API requests. By default, fields with empty or
  4106  	// default values are omitted from API requests. See
  4107  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4108  	// details.
  4109  	ForceSendFields []string `json:"-"`
  4110  	// NullFields is a list of field names (e.g. "ContentDetails") to include in
  4111  	// API requests with the JSON null value. By default, fields with empty values
  4112  	// are omitted from API requests. See
  4113  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4114  	NullFields []string `json:"-"`
  4115  }
  4116  
  4117  func (s *LiveBroadcast) MarshalJSON() ([]byte, error) {
  4118  	type NoMethod LiveBroadcast
  4119  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4120  }
  4121  
  4122  // LiveBroadcastContentDetails: Detailed settings of a broadcast.
  4123  type LiveBroadcastContentDetails struct {
  4124  	// BoundStreamId: This value uniquely identifies the live stream bound to the
  4125  	// broadcast.
  4126  	BoundStreamId string `json:"boundStreamId,omitempty"`
  4127  	// BoundStreamLastUpdateTimeMs: The date and time that the live stream
  4128  	// referenced by boundStreamId was last updated.
  4129  	BoundStreamLastUpdateTimeMs string `json:"boundStreamLastUpdateTimeMs,omitempty"`
  4130  	// Possible values:
  4131  	//   "closedCaptionsTypeUnspecified"
  4132  	//   "closedCaptionsDisabled"
  4133  	//   "closedCaptionsHttpPost"
  4134  	//   "closedCaptionsEmbedded"
  4135  	ClosedCaptionsType string `json:"closedCaptionsType,omitempty"`
  4136  	// EnableAutoStart: This setting indicates whether auto start is enabled for
  4137  	// this broadcast. The default value for this property is false. This setting
  4138  	// can only be used by Events.
  4139  	EnableAutoStart bool `json:"enableAutoStart,omitempty"`
  4140  	// EnableAutoStop: This setting indicates whether auto stop is enabled for this
  4141  	// broadcast. The default value for this property is false. This setting can
  4142  	// only be used by Events.
  4143  	EnableAutoStop bool `json:"enableAutoStop,omitempty"`
  4144  	// EnableClosedCaptions: This setting indicates whether HTTP POST closed
  4145  	// captioning is enabled for this broadcast. The ingestion URL of the closed
  4146  	// captions is returned through the liveStreams API. This is mutually exclusive
  4147  	// with using the closed_captions_type property, and is equivalent to setting
  4148  	// closed_captions_type to CLOSED_CAPTIONS_HTTP_POST.
  4149  	EnableClosedCaptions bool `json:"enableClosedCaptions,omitempty"`
  4150  	// EnableContentEncryption: This setting indicates whether YouTube should
  4151  	// enable content encryption for the broadcast.
  4152  	EnableContentEncryption bool `json:"enableContentEncryption,omitempty"`
  4153  	// EnableDvr: This setting determines whether viewers can access DVR controls
  4154  	// while watching the video. DVR controls enable the viewer to control the
  4155  	// video playback experience by pausing, rewinding, or fast forwarding content.
  4156  	// The default value for this property is true. *Important:* You must set the
  4157  	// value to true and also set the enableArchive property's value to true if you
  4158  	// want to make playback available immediately after the broadcast ends.
  4159  	EnableDvr bool `json:"enableDvr,omitempty"`
  4160  	// EnableEmbed: This setting indicates whether the broadcast video can be
  4161  	// played in an embedded player. If you choose to archive the video (using the
  4162  	// enableArchive property), this setting will also apply to the archived video.
  4163  	EnableEmbed bool `json:"enableEmbed,omitempty"`
  4164  	// EnableLowLatency: Indicates whether this broadcast has low latency enabled.
  4165  	EnableLowLatency bool `json:"enableLowLatency,omitempty"`
  4166  	// LatencyPreference: If both this and enable_low_latency are set, they must
  4167  	// match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW
  4168  	// should match enable_low_latency=true LATENCY_ULTRA_LOW should have
  4169  	// enable_low_latency omitted.
  4170  	//
  4171  	// Possible values:
  4172  	//   "latencyPreferenceUnspecified"
  4173  	//   "normal" - Best for: highest quality viewer playbacks and higher
  4174  	// resolutions.
  4175  	//   "low" - Best for: near real-time interaction, with minimal playback
  4176  	// buffering.
  4177  	//   "ultraLow" - Best for: real-time interaction Does not support: Closed
  4178  	// captions, 1440p, and 4k resolutions
  4179  	LatencyPreference string `json:"latencyPreference,omitempty"`
  4180  	// Mesh: The mesh for projecting the video if projection is mesh. The mesh
  4181  	// value must be a UTF-8 string containing the base-64 encoding of 3D mesh data
  4182  	// that follows the Spherical Video V2 RFC specification for an mshp box,
  4183  	// excluding the box size and type but including the following four reserved
  4184  	// zero bytes for the version and flags.
  4185  	Mesh string `json:"mesh,omitempty"`
  4186  	// MonitorStream: The monitorStream object contains information about the
  4187  	// monitor stream, which the broadcaster can use to review the event content
  4188  	// before the broadcast stream is shown publicly.
  4189  	MonitorStream *MonitorStreamInfo `json:"monitorStream,omitempty"`
  4190  	// Projection: The projection format of this broadcast. This defaults to
  4191  	// rectangular.
  4192  	//
  4193  	// Possible values:
  4194  	//   "projectionUnspecified"
  4195  	//   "rectangular"
  4196  	//   "360"
  4197  	//   "mesh"
  4198  	Projection string `json:"projection,omitempty"`
  4199  	// RecordFromStart: Automatically start recording after the event goes live.
  4200  	// The default value for this property is true. *Important:* You must also set
  4201  	// the enableDvr property's value to true if you want the playback to be
  4202  	// available immediately after the broadcast ends. If you set this property's
  4203  	// value to true but do not also set the enableDvr property to true, there may
  4204  	// be a delay of around one day before the archived video will be available for
  4205  	// playback.
  4206  	RecordFromStart bool `json:"recordFromStart,omitempty"`
  4207  	// StartWithSlate: This setting indicates whether the broadcast should
  4208  	// automatically begin with an in-stream slate when you update the broadcast's
  4209  	// status to live. After updating the status, you then need to send a
  4210  	// liveCuepoints.insert request that sets the cuepoint's eventState to end to
  4211  	// remove the in-stream slate and make your broadcast stream visible to
  4212  	// viewers.
  4213  	StartWithSlate bool `json:"startWithSlate,omitempty"`
  4214  	// StereoLayout: The 3D stereo layout of this broadcast. This defaults to mono.
  4215  	//
  4216  	// Possible values:
  4217  	//   "stereoLayoutUnspecified"
  4218  	//   "mono"
  4219  	//   "leftRight"
  4220  	//   "topBottom"
  4221  	StereoLayout string `json:"stereoLayout,omitempty"`
  4222  	// ForceSendFields is a list of field names (e.g. "BoundStreamId") to
  4223  	// unconditionally include in API requests. By default, fields with empty or
  4224  	// default values are omitted from API requests. See
  4225  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4226  	// details.
  4227  	ForceSendFields []string `json:"-"`
  4228  	// NullFields is a list of field names (e.g. "BoundStreamId") to include in API
  4229  	// requests with the JSON null value. By default, fields with empty values are
  4230  	// omitted from API requests. See
  4231  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4232  	NullFields []string `json:"-"`
  4233  }
  4234  
  4235  func (s *LiveBroadcastContentDetails) MarshalJSON() ([]byte, error) {
  4236  	type NoMethod LiveBroadcastContentDetails
  4237  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4238  }
  4239  
  4240  type LiveBroadcastListResponse struct {
  4241  	// Etag: Etag of this resource.
  4242  	Etag string `json:"etag,omitempty"`
  4243  	// EventId: Serialized EventId of the request which produced this response.
  4244  	EventId string `json:"eventId,omitempty"`
  4245  	// Items: A list of broadcasts that match the request criteria.
  4246  	Items []*LiveBroadcast `json:"items,omitempty"`
  4247  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4248  	// "youtube#liveBroadcastListResponse".
  4249  	Kind string `json:"kind,omitempty"`
  4250  	// NextPageToken: The token that can be used as the value of the pageToken
  4251  	// parameter to retrieve the next page in the result set.
  4252  	NextPageToken string `json:"nextPageToken,omitempty"`
  4253  	// PageInfo: General pagination information.
  4254  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  4255  	// PrevPageToken: The token that can be used as the value of the pageToken
  4256  	// parameter to retrieve the previous page in the result set.
  4257  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  4258  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  4259  	// VisitorId: The visitorId identifies the visitor.
  4260  	VisitorId string `json:"visitorId,omitempty"`
  4261  
  4262  	// ServerResponse contains the HTTP response code and headers from the server.
  4263  	googleapi.ServerResponse `json:"-"`
  4264  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  4265  	// include in API requests. By default, fields with empty or default values are
  4266  	// omitted from API requests. See
  4267  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4268  	// details.
  4269  	ForceSendFields []string `json:"-"`
  4270  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  4271  	// with the JSON null value. By default, fields with empty values are omitted
  4272  	// from API requests. See
  4273  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4274  	NullFields []string `json:"-"`
  4275  }
  4276  
  4277  func (s *LiveBroadcastListResponse) MarshalJSON() ([]byte, error) {
  4278  	type NoMethod LiveBroadcastListResponse
  4279  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4280  }
  4281  
  4282  // LiveBroadcastMonetizationDetails: Monetization settings of a broadcast.
  4283  type LiveBroadcastMonetizationDetails struct {
  4284  	CuepointSchedule *CuepointSchedule `json:"cuepointSchedule,omitempty"`
  4285  	// ForceSendFields is a list of field names (e.g. "CuepointSchedule") to
  4286  	// unconditionally include in API requests. By default, fields with empty or
  4287  	// default values are omitted from API requests. See
  4288  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4289  	// details.
  4290  	ForceSendFields []string `json:"-"`
  4291  	// NullFields is a list of field names (e.g. "CuepointSchedule") to include in
  4292  	// API requests with the JSON null value. By default, fields with empty values
  4293  	// are omitted from API requests. See
  4294  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4295  	NullFields []string `json:"-"`
  4296  }
  4297  
  4298  func (s *LiveBroadcastMonetizationDetails) MarshalJSON() ([]byte, error) {
  4299  	type NoMethod LiveBroadcastMonetizationDetails
  4300  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4301  }
  4302  
  4303  // LiveBroadcastSnippet: Basic broadcast information.
  4304  type LiveBroadcastSnippet struct {
  4305  	// ActualEndTime: The date and time that the broadcast actually ended. This
  4306  	// information is only available once the broadcast's state is complete.
  4307  	ActualEndTime string `json:"actualEndTime,omitempty"`
  4308  	// ActualStartTime: The date and time that the broadcast actually started. This
  4309  	// information is only available once the broadcast's state is live.
  4310  	ActualStartTime string `json:"actualStartTime,omitempty"`
  4311  	// ChannelId: The ID that YouTube uses to uniquely identify the channel that is
  4312  	// publishing the broadcast.
  4313  	ChannelId string `json:"channelId,omitempty"`
  4314  	// Description: The broadcast's description. As with the title, you can set
  4315  	// this field by modifying the broadcast resource or by setting the description
  4316  	// field of the corresponding video resource.
  4317  	Description string `json:"description,omitempty"`
  4318  	// IsDefaultBroadcast: Indicates whether this broadcast is the default
  4319  	// broadcast. Internal only.
  4320  	IsDefaultBroadcast bool `json:"isDefaultBroadcast,omitempty"`
  4321  	// LiveChatId: The id of the live chat for this broadcast.
  4322  	LiveChatId string `json:"liveChatId,omitempty"`
  4323  	// PublishedAt: The date and time that the broadcast was added to YouTube's
  4324  	// live broadcast schedule.
  4325  	PublishedAt string `json:"publishedAt,omitempty"`
  4326  	// ScheduledEndTime: The date and time that the broadcast is scheduled to end.
  4327  	ScheduledEndTime string `json:"scheduledEndTime,omitempty"`
  4328  	// ScheduledStartTime: The date and time that the broadcast is scheduled to
  4329  	// start.
  4330  	ScheduledStartTime string `json:"scheduledStartTime,omitempty"`
  4331  	// Thumbnails: A map of thumbnail images associated with the broadcast. For
  4332  	// each nested object in this object, the key is the name of the thumbnail
  4333  	// image, and the value is an object that contains other information about the
  4334  	// thumbnail.
  4335  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  4336  	// Title: The broadcast's title. Note that the broadcast represents exactly one
  4337  	// YouTube video. You can set this field by modifying the broadcast resource or
  4338  	// by setting the title field of the corresponding video resource.
  4339  	Title string `json:"title,omitempty"`
  4340  	// ForceSendFields is a list of field names (e.g. "ActualEndTime") to
  4341  	// unconditionally include in API requests. By default, fields with empty or
  4342  	// default values are omitted from API requests. See
  4343  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4344  	// details.
  4345  	ForceSendFields []string `json:"-"`
  4346  	// NullFields is a list of field names (e.g. "ActualEndTime") to include in API
  4347  	// requests with the JSON null value. By default, fields with empty values are
  4348  	// omitted from API requests. See
  4349  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4350  	NullFields []string `json:"-"`
  4351  }
  4352  
  4353  func (s *LiveBroadcastSnippet) MarshalJSON() ([]byte, error) {
  4354  	type NoMethod LiveBroadcastSnippet
  4355  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4356  }
  4357  
  4358  // LiveBroadcastStatistics: Statistics about the live broadcast. These
  4359  // represent a snapshot of the values at the time of the request. Statistics
  4360  // are only returned for live broadcasts.
  4361  type LiveBroadcastStatistics struct {
  4362  	// ConcurrentViewers: The number of viewers currently watching the broadcast.
  4363  	// The property and its value will be present if the broadcast has current
  4364  	// viewers and the broadcast owner has not hidden the viewcount for the video.
  4365  	// Note that YouTube stops tracking the number of concurrent viewers for a
  4366  	// broadcast when the broadcast ends. So, this property would not identify the
  4367  	// number of viewers watching an archived video of a live broadcast that
  4368  	// already ended.
  4369  	ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"`
  4370  	// ForceSendFields is a list of field names (e.g. "ConcurrentViewers") to
  4371  	// unconditionally include in API requests. By default, fields with empty or
  4372  	// default values are omitted from API requests. See
  4373  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4374  	// details.
  4375  	ForceSendFields []string `json:"-"`
  4376  	// NullFields is a list of field names (e.g. "ConcurrentViewers") to include in
  4377  	// API requests with the JSON null value. By default, fields with empty values
  4378  	// are omitted from API requests. See
  4379  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4380  	NullFields []string `json:"-"`
  4381  }
  4382  
  4383  func (s *LiveBroadcastStatistics) MarshalJSON() ([]byte, error) {
  4384  	type NoMethod LiveBroadcastStatistics
  4385  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4386  }
  4387  
  4388  // LiveBroadcastStatus: Live broadcast state.
  4389  type LiveBroadcastStatus struct {
  4390  	// LifeCycleStatus: The broadcast's status. The status can be updated using the
  4391  	// API's liveBroadcasts.transition method.
  4392  	//
  4393  	// Possible values:
  4394  	//   "lifeCycleStatusUnspecified" - No value or the value is unknown.
  4395  	//   "created" - Incomplete settings, but otherwise valid
  4396  	//   "ready" - Complete settings
  4397  	//   "testing" - Visible only to partner, may need special UI treatment
  4398  	//   "live" - Viper is recording; this means the "clock" is running
  4399  	//   "complete" - The broadcast is finished.
  4400  	//   "revoked" - This broadcast was removed by admin action
  4401  	//   "testStarting" - Transition into TESTING has been requested
  4402  	//   "liveStarting" - Transition into LIVE has been requested
  4403  	LifeCycleStatus string `json:"lifeCycleStatus,omitempty"`
  4404  	// LiveBroadcastPriority: Priority of the live broadcast event (internal
  4405  	// state).
  4406  	//
  4407  	// Possible values:
  4408  	//   "liveBroadcastPriorityUnspecified"
  4409  	//   "low" - Low priority broadcast: for low view count HoAs or other low
  4410  	// priority broadcasts.
  4411  	//   "normal" - Normal priority broadcast: for regular HoAs and broadcasts.
  4412  	//   "high" - High priority broadcast: for high profile HoAs, like PixelCorp
  4413  	// ones.
  4414  	LiveBroadcastPriority string `json:"liveBroadcastPriority,omitempty"`
  4415  	// MadeForKids: Whether the broadcast is made for kids or not, decided by
  4416  	// YouTube instead of the creator. This field is read only.
  4417  	MadeForKids bool `json:"madeForKids,omitempty"`
  4418  	// PrivacyStatus: The broadcast's privacy status. Note that the broadcast
  4419  	// represents exactly one YouTube video, so the privacy settings are identical
  4420  	// to those supported for videos. In addition, you can set this field by
  4421  	// modifying the broadcast resource or by setting the privacyStatus field of
  4422  	// the corresponding video resource.
  4423  	//
  4424  	// Possible values:
  4425  	//   "public"
  4426  	//   "unlisted"
  4427  	//   "private"
  4428  	PrivacyStatus string `json:"privacyStatus,omitempty"`
  4429  	// RecordingStatus: The broadcast's recording status.
  4430  	//
  4431  	// Possible values:
  4432  	//   "liveBroadcastRecordingStatusUnspecified" - No value or the value is
  4433  	// unknown.
  4434  	//   "notRecording" - The recording has not yet been started.
  4435  	//   "recording" - The recording is currently on.
  4436  	//   "recorded" - The recording is completed, and cannot be started again.
  4437  	RecordingStatus string `json:"recordingStatus,omitempty"`
  4438  	// SelfDeclaredMadeForKids: This field will be set to True if the creator
  4439  	// declares the broadcast to be kids only: go/live-cw-work.
  4440  	SelfDeclaredMadeForKids bool `json:"selfDeclaredMadeForKids,omitempty"`
  4441  	// ForceSendFields is a list of field names (e.g. "LifeCycleStatus") to
  4442  	// unconditionally include in API requests. By default, fields with empty or
  4443  	// default values are omitted from API requests. See
  4444  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4445  	// details.
  4446  	ForceSendFields []string `json:"-"`
  4447  	// NullFields is a list of field names (e.g. "LifeCycleStatus") to include in
  4448  	// API requests with the JSON null value. By default, fields with empty values
  4449  	// are omitted from API requests. See
  4450  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4451  	NullFields []string `json:"-"`
  4452  }
  4453  
  4454  func (s *LiveBroadcastStatus) MarshalJSON() ([]byte, error) {
  4455  	type NoMethod LiveBroadcastStatus
  4456  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4457  }
  4458  
  4459  // LiveChatBan: A `__liveChatBan__` resource represents a ban for a YouTube
  4460  // live chat.
  4461  type LiveChatBan struct {
  4462  	// Etag: Etag of this resource.
  4463  	Etag string `json:"etag,omitempty"`
  4464  	// Id: The ID that YouTube assigns to uniquely identify the ban.
  4465  	Id string `json:"id,omitempty"`
  4466  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4467  	// "youtube#liveChatBan".
  4468  	Kind string `json:"kind,omitempty"`
  4469  	// Snippet: The `snippet` object contains basic details about the ban.
  4470  	Snippet *LiveChatBanSnippet `json:"snippet,omitempty"`
  4471  
  4472  	// ServerResponse contains the HTTP response code and headers from the server.
  4473  	googleapi.ServerResponse `json:"-"`
  4474  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  4475  	// include in API requests. By default, fields with empty or default values are
  4476  	// omitted from API requests. See
  4477  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4478  	// details.
  4479  	ForceSendFields []string `json:"-"`
  4480  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  4481  	// with the JSON null value. By default, fields with empty values are omitted
  4482  	// from API requests. See
  4483  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4484  	NullFields []string `json:"-"`
  4485  }
  4486  
  4487  func (s *LiveChatBan) MarshalJSON() ([]byte, error) {
  4488  	type NoMethod LiveChatBan
  4489  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4490  }
  4491  
  4492  type LiveChatBanSnippet struct {
  4493  	// BanDurationSeconds: The duration of a ban, only filled if the ban has type
  4494  	// TEMPORARY.
  4495  	BanDurationSeconds uint64                 `json:"banDurationSeconds,omitempty,string"`
  4496  	BannedUserDetails  *ChannelProfileDetails `json:"bannedUserDetails,omitempty"`
  4497  	// LiveChatId: The chat this ban is pertinent to.
  4498  	LiveChatId string `json:"liveChatId,omitempty"`
  4499  	// Type: The type of ban.
  4500  	//
  4501  	// Possible values:
  4502  	//   "liveChatBanTypeUnspecified" - An invalid ban type.
  4503  	//   "permanent" - A permanent ban.
  4504  	//   "temporary" - A temporary ban.
  4505  	Type string `json:"type,omitempty"`
  4506  	// ForceSendFields is a list of field names (e.g. "BanDurationSeconds") to
  4507  	// unconditionally include in API requests. By default, fields with empty or
  4508  	// default values are omitted from API requests. See
  4509  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4510  	// details.
  4511  	ForceSendFields []string `json:"-"`
  4512  	// NullFields is a list of field names (e.g. "BanDurationSeconds") to include
  4513  	// in API requests with the JSON null value. By default, fields with empty
  4514  	// values are omitted from API requests. See
  4515  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4516  	NullFields []string `json:"-"`
  4517  }
  4518  
  4519  func (s *LiveChatBanSnippet) MarshalJSON() ([]byte, error) {
  4520  	type NoMethod LiveChatBanSnippet
  4521  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4522  }
  4523  
  4524  type LiveChatFanFundingEventDetails struct {
  4525  	// AmountDisplayString: A rendered string that displays the fund amount and
  4526  	// currency to the user.
  4527  	AmountDisplayString string `json:"amountDisplayString,omitempty"`
  4528  	// AmountMicros: The amount of the fund.
  4529  	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
  4530  	// Currency: The currency in which the fund was made.
  4531  	Currency string `json:"currency,omitempty"`
  4532  	// UserComment: The comment added by the user to this fan funding event.
  4533  	UserComment string `json:"userComment,omitempty"`
  4534  	// ForceSendFields is a list of field names (e.g. "AmountDisplayString") to
  4535  	// unconditionally include in API requests. By default, fields with empty or
  4536  	// default values are omitted from API requests. See
  4537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4538  	// details.
  4539  	ForceSendFields []string `json:"-"`
  4540  	// NullFields is a list of field names (e.g. "AmountDisplayString") to include
  4541  	// in API requests with the JSON null value. By default, fields with empty
  4542  	// values are omitted from API requests. See
  4543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4544  	NullFields []string `json:"-"`
  4545  }
  4546  
  4547  func (s *LiveChatFanFundingEventDetails) MarshalJSON() ([]byte, error) {
  4548  	type NoMethod LiveChatFanFundingEventDetails
  4549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4550  }
  4551  
  4552  type LiveChatGiftMembershipReceivedDetails struct {
  4553  	// AssociatedMembershipGiftingMessageId: The ID of the membership gifting
  4554  	// message that is related to this gift membership. This ID will always refer
  4555  	// to a message whose type is 'membershipGiftingEvent'.
  4556  	AssociatedMembershipGiftingMessageId string `json:"associatedMembershipGiftingMessageId,omitempty"`
  4557  	// GifterChannelId: The ID of the user that made the membership gifting
  4558  	// purchase. This matches the `snippet.authorChannelId` of the associated
  4559  	// membership gifting message.
  4560  	GifterChannelId string `json:"gifterChannelId,omitempty"`
  4561  	// MemberLevelName: The name of the Level at which the viewer is a member. This
  4562  	// matches the `snippet.membershipGiftingDetails.giftMembershipsLevelName` of
  4563  	// the associated membership gifting message. The Level names are defined by
  4564  	// the YouTube channel offering the Membership. In some situations this field
  4565  	// isn't filled.
  4566  	MemberLevelName string `json:"memberLevelName,omitempty"`
  4567  	// ForceSendFields is a list of field names (e.g.
  4568  	// "AssociatedMembershipGiftingMessageId") to unconditionally include in API
  4569  	// requests. By default, fields with empty or default values are omitted from
  4570  	// API requests. See
  4571  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4572  	// details.
  4573  	ForceSendFields []string `json:"-"`
  4574  	// NullFields is a list of field names (e.g.
  4575  	// "AssociatedMembershipGiftingMessageId") to include in API requests with the
  4576  	// JSON null value. By default, fields with empty values are omitted from API
  4577  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
  4578  	// more details.
  4579  	NullFields []string `json:"-"`
  4580  }
  4581  
  4582  func (s *LiveChatGiftMembershipReceivedDetails) MarshalJSON() ([]byte, error) {
  4583  	type NoMethod LiveChatGiftMembershipReceivedDetails
  4584  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4585  }
  4586  
  4587  type LiveChatMemberMilestoneChatDetails struct {
  4588  	// MemberLevelName: The name of the Level at which the viever is a member. The
  4589  	// Level names are defined by the YouTube channel offering the Membership. In
  4590  	// some situations this field isn't filled.
  4591  	MemberLevelName string `json:"memberLevelName,omitempty"`
  4592  	// MemberMonth: The total amount of months (rounded up) the viewer has been a
  4593  	// member that granted them this Member Milestone Chat. This is the same number
  4594  	// of months as is being displayed to YouTube users.
  4595  	MemberMonth int64 `json:"memberMonth,omitempty"`
  4596  	// UserComment: The comment added by the member to this Member Milestone Chat.
  4597  	// This field is empty for messages without a comment from the member.
  4598  	UserComment string `json:"userComment,omitempty"`
  4599  	// ForceSendFields is a list of field names (e.g. "MemberLevelName") to
  4600  	// unconditionally include in API requests. By default, fields with empty or
  4601  	// default values are omitted from API requests. See
  4602  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4603  	// details.
  4604  	ForceSendFields []string `json:"-"`
  4605  	// NullFields is a list of field names (e.g. "MemberLevelName") to include in
  4606  	// API requests with the JSON null value. By default, fields with empty values
  4607  	// are omitted from API requests. See
  4608  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4609  	NullFields []string `json:"-"`
  4610  }
  4611  
  4612  func (s *LiveChatMemberMilestoneChatDetails) MarshalJSON() ([]byte, error) {
  4613  	type NoMethod LiveChatMemberMilestoneChatDetails
  4614  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4615  }
  4616  
  4617  type LiveChatMembershipGiftingDetails struct {
  4618  	// GiftMembershipsCount: The number of gift memberships purchased by the user.
  4619  	GiftMembershipsCount int64 `json:"giftMembershipsCount,omitempty"`
  4620  	// GiftMembershipsLevelName: The name of the level of the gift memberships
  4621  	// purchased by the user. The Level names are defined by the YouTube channel
  4622  	// offering the Membership. In some situations this field isn't filled.
  4623  	GiftMembershipsLevelName string `json:"giftMembershipsLevelName,omitempty"`
  4624  	// ForceSendFields is a list of field names (e.g. "GiftMembershipsCount") to
  4625  	// unconditionally include in API requests. By default, fields with empty or
  4626  	// default values are omitted from API requests. See
  4627  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4628  	// details.
  4629  	ForceSendFields []string `json:"-"`
  4630  	// NullFields is a list of field names (e.g. "GiftMembershipsCount") to include
  4631  	// in API requests with the JSON null value. By default, fields with empty
  4632  	// values are omitted from API requests. See
  4633  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4634  	NullFields []string `json:"-"`
  4635  }
  4636  
  4637  func (s *LiveChatMembershipGiftingDetails) MarshalJSON() ([]byte, error) {
  4638  	type NoMethod LiveChatMembershipGiftingDetails
  4639  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4640  }
  4641  
  4642  // LiveChatMessage: A *liveChatMessage* resource represents a chat message in a
  4643  // YouTube Live Chat.
  4644  type LiveChatMessage struct {
  4645  	// AuthorDetails: The authorDetails object contains basic details about the
  4646  	// user that posted this message.
  4647  	AuthorDetails *LiveChatMessageAuthorDetails `json:"authorDetails,omitempty"`
  4648  	// Etag: Etag of this resource.
  4649  	Etag string `json:"etag,omitempty"`
  4650  	// Id: The ID that YouTube assigns to uniquely identify the message.
  4651  	Id string `json:"id,omitempty"`
  4652  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4653  	// "youtube#liveChatMessage".
  4654  	Kind string `json:"kind,omitempty"`
  4655  	// Snippet: The snippet object contains basic details about the message.
  4656  	Snippet *LiveChatMessageSnippet `json:"snippet,omitempty"`
  4657  
  4658  	// ServerResponse contains the HTTP response code and headers from the server.
  4659  	googleapi.ServerResponse `json:"-"`
  4660  	// ForceSendFields is a list of field names (e.g. "AuthorDetails") to
  4661  	// unconditionally include in API requests. By default, fields with empty or
  4662  	// default values are omitted from API requests. See
  4663  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4664  	// details.
  4665  	ForceSendFields []string `json:"-"`
  4666  	// NullFields is a list of field names (e.g. "AuthorDetails") to include in API
  4667  	// requests with the JSON null value. By default, fields with empty values are
  4668  	// omitted from API requests. See
  4669  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4670  	NullFields []string `json:"-"`
  4671  }
  4672  
  4673  func (s *LiveChatMessage) MarshalJSON() ([]byte, error) {
  4674  	type NoMethod LiveChatMessage
  4675  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4676  }
  4677  
  4678  type LiveChatMessageAuthorDetails struct {
  4679  	// ChannelId: The YouTube channel ID.
  4680  	ChannelId string `json:"channelId,omitempty"`
  4681  	// ChannelUrl: The channel's URL.
  4682  	ChannelUrl string `json:"channelUrl,omitempty"`
  4683  	// DisplayName: The channel's display name.
  4684  	DisplayName string `json:"displayName,omitempty"`
  4685  	// IsChatModerator: Whether the author is a moderator of the live chat.
  4686  	IsChatModerator bool `json:"isChatModerator,omitempty"`
  4687  	// IsChatOwner: Whether the author is the owner of the live chat.
  4688  	IsChatOwner bool `json:"isChatOwner,omitempty"`
  4689  	// IsChatSponsor: Whether the author is a sponsor of the live chat.
  4690  	IsChatSponsor bool `json:"isChatSponsor,omitempty"`
  4691  	// IsVerified: Whether the author's identity has been verified by YouTube.
  4692  	IsVerified bool `json:"isVerified,omitempty"`
  4693  	// ProfileImageUrl: The channels's avatar URL.
  4694  	ProfileImageUrl string `json:"profileImageUrl,omitempty"`
  4695  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  4696  	// unconditionally include in API requests. By default, fields with empty or
  4697  	// default values are omitted from API requests. See
  4698  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4699  	// details.
  4700  	ForceSendFields []string `json:"-"`
  4701  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  4702  	// requests with the JSON null value. By default, fields with empty values are
  4703  	// omitted from API requests. See
  4704  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4705  	NullFields []string `json:"-"`
  4706  }
  4707  
  4708  func (s *LiveChatMessageAuthorDetails) MarshalJSON() ([]byte, error) {
  4709  	type NoMethod LiveChatMessageAuthorDetails
  4710  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4711  }
  4712  
  4713  type LiveChatMessageDeletedDetails struct {
  4714  	DeletedMessageId string `json:"deletedMessageId,omitempty"`
  4715  	// ForceSendFields is a list of field names (e.g. "DeletedMessageId") to
  4716  	// unconditionally include in API requests. By default, fields with empty or
  4717  	// default values are omitted from API requests. See
  4718  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4719  	// details.
  4720  	ForceSendFields []string `json:"-"`
  4721  	// NullFields is a list of field names (e.g. "DeletedMessageId") to include in
  4722  	// API requests with the JSON null value. By default, fields with empty values
  4723  	// are omitted from API requests. See
  4724  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4725  	NullFields []string `json:"-"`
  4726  }
  4727  
  4728  func (s *LiveChatMessageDeletedDetails) MarshalJSON() ([]byte, error) {
  4729  	type NoMethod LiveChatMessageDeletedDetails
  4730  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4731  }
  4732  
  4733  type LiveChatMessageListResponse struct {
  4734  	// ActivePollItem: Set when there is an active poll.
  4735  	ActivePollItem *LiveChatMessage `json:"activePollItem,omitempty"`
  4736  	// Etag: Etag of this resource.
  4737  	Etag string `json:"etag,omitempty"`
  4738  	// EventId: Serialized EventId of the request which produced this response.
  4739  	EventId string             `json:"eventId,omitempty"`
  4740  	Items   []*LiveChatMessage `json:"items,omitempty"`
  4741  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4742  	// "youtube#liveChatMessageListResponse".
  4743  	Kind          string `json:"kind,omitempty"`
  4744  	NextPageToken string `json:"nextPageToken,omitempty"`
  4745  	// OfflineAt: The date and time when the underlying stream went offline.
  4746  	OfflineAt string `json:"offlineAt,omitempty"`
  4747  	// PageInfo: General pagination information.
  4748  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  4749  	// PollingIntervalMillis: The amount of time the client should wait before
  4750  	// polling again.
  4751  	PollingIntervalMillis int64            `json:"pollingIntervalMillis,omitempty"`
  4752  	TokenPagination       *TokenPagination `json:"tokenPagination,omitempty"`
  4753  	// VisitorId: The visitorId identifies the visitor.
  4754  	VisitorId string `json:"visitorId,omitempty"`
  4755  
  4756  	// ServerResponse contains the HTTP response code and headers from the server.
  4757  	googleapi.ServerResponse `json:"-"`
  4758  	// ForceSendFields is a list of field names (e.g. "ActivePollItem") to
  4759  	// unconditionally include in API requests. By default, fields with empty or
  4760  	// default values are omitted from API requests. See
  4761  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4762  	// details.
  4763  	ForceSendFields []string `json:"-"`
  4764  	// NullFields is a list of field names (e.g. "ActivePollItem") to include in
  4765  	// API requests with the JSON null value. By default, fields with empty values
  4766  	// are omitted from API requests. See
  4767  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4768  	NullFields []string `json:"-"`
  4769  }
  4770  
  4771  func (s *LiveChatMessageListResponse) MarshalJSON() ([]byte, error) {
  4772  	type NoMethod LiveChatMessageListResponse
  4773  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4774  }
  4775  
  4776  type LiveChatMessageRetractedDetails struct {
  4777  	RetractedMessageId string `json:"retractedMessageId,omitempty"`
  4778  	// ForceSendFields is a list of field names (e.g. "RetractedMessageId") to
  4779  	// unconditionally include in API requests. By default, fields with empty or
  4780  	// default values are omitted from API requests. See
  4781  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4782  	// details.
  4783  	ForceSendFields []string `json:"-"`
  4784  	// NullFields is a list of field names (e.g. "RetractedMessageId") to include
  4785  	// in API requests with the JSON null value. By default, fields with empty
  4786  	// values are omitted from API requests. See
  4787  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4788  	NullFields []string `json:"-"`
  4789  }
  4790  
  4791  func (s *LiveChatMessageRetractedDetails) MarshalJSON() ([]byte, error) {
  4792  	type NoMethod LiveChatMessageRetractedDetails
  4793  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4794  }
  4795  
  4796  // LiveChatMessageSnippet: Next ID: 34
  4797  type LiveChatMessageSnippet struct {
  4798  	// AuthorChannelId: The ID of the user that authored this message, this field
  4799  	// is not always filled. textMessageEvent - the user that wrote the message
  4800  	// fanFundingEvent - the user that funded the broadcast newSponsorEvent - the
  4801  	// user that just became a sponsor memberMilestoneChatEvent - the member that
  4802  	// sent the message membershipGiftingEvent - the user that made the purchase
  4803  	// giftMembershipReceivedEvent - the user that received the gift membership
  4804  	// messageDeletedEvent - the moderator that took the action
  4805  	// messageRetractedEvent - the author that retracted their message
  4806  	// userBannedEvent - the moderator that took the action superChatEvent - the
  4807  	// user that made the purchase superStickerEvent - the user that made the
  4808  	// purchase pollEvent - the user that created the poll
  4809  	AuthorChannelId string `json:"authorChannelId,omitempty"`
  4810  	// DisplayMessage: Contains a string that can be displayed to the user. If this
  4811  	// field is not present the message is silent, at the moment only messages of
  4812  	// type TOMBSTONE and CHAT_ENDED_EVENT are silent.
  4813  	DisplayMessage string `json:"displayMessage,omitempty"`
  4814  	// FanFundingEventDetails: Details about the funding event, this is only set if
  4815  	// the type is 'fanFundingEvent'.
  4816  	FanFundingEventDetails *LiveChatFanFundingEventDetails `json:"fanFundingEventDetails,omitempty"`
  4817  	// GiftMembershipReceivedDetails: Details about the Gift Membership Received
  4818  	// event, this is only set if the type is 'giftMembershipReceivedEvent'.
  4819  	GiftMembershipReceivedDetails *LiveChatGiftMembershipReceivedDetails `json:"giftMembershipReceivedDetails,omitempty"`
  4820  	// HasDisplayContent: Whether the message has display content that should be
  4821  	// displayed to users.
  4822  	HasDisplayContent bool   `json:"hasDisplayContent,omitempty"`
  4823  	LiveChatId        string `json:"liveChatId,omitempty"`
  4824  	// MemberMilestoneChatDetails: Details about the Member Milestone Chat event,
  4825  	// this is only set if the type is 'memberMilestoneChatEvent'.
  4826  	MemberMilestoneChatDetails *LiveChatMemberMilestoneChatDetails `json:"memberMilestoneChatDetails,omitempty"`
  4827  	// MembershipGiftingDetails: Details about the Membership Gifting event, this
  4828  	// is only set if the type is 'membershipGiftingEvent'.
  4829  	MembershipGiftingDetails *LiveChatMembershipGiftingDetails `json:"membershipGiftingDetails,omitempty"`
  4830  	MessageDeletedDetails    *LiveChatMessageDeletedDetails    `json:"messageDeletedDetails,omitempty"`
  4831  	MessageRetractedDetails  *LiveChatMessageRetractedDetails  `json:"messageRetractedDetails,omitempty"`
  4832  	// NewSponsorDetails: Details about the New Member Announcement event, this is
  4833  	// only set if the type is 'newSponsorEvent'. Please note that "member" is the
  4834  	// new term for "sponsor".
  4835  	NewSponsorDetails *LiveChatNewSponsorDetails `json:"newSponsorDetails,omitempty"`
  4836  	// PollDetails: Details about the poll event, this is only set if the type is
  4837  	// 'pollEvent'.
  4838  	PollDetails *LiveChatPollDetails `json:"pollDetails,omitempty"`
  4839  	// PublishedAt: The date and time when the message was orignally published.
  4840  	PublishedAt string `json:"publishedAt,omitempty"`
  4841  	// SuperChatDetails: Details about the Super Chat event, this is only set if
  4842  	// the type is 'superChatEvent'.
  4843  	SuperChatDetails *LiveChatSuperChatDetails `json:"superChatDetails,omitempty"`
  4844  	// SuperStickerDetails: Details about the Super Sticker event, this is only set
  4845  	// if the type is 'superStickerEvent'.
  4846  	SuperStickerDetails *LiveChatSuperStickerDetails `json:"superStickerDetails,omitempty"`
  4847  	// TextMessageDetails: Details about the text message, this is only set if the
  4848  	// type is 'textMessageEvent'.
  4849  	TextMessageDetails *LiveChatTextMessageDetails `json:"textMessageDetails,omitempty"`
  4850  	// Type: The type of message, this will always be present, it determines the
  4851  	// contents of the message as well as which fields will be present.
  4852  	//
  4853  	// Possible values:
  4854  	//   "invalidType"
  4855  	//   "textMessageEvent"
  4856  	//   "tombstone"
  4857  	//   "fanFundingEvent"
  4858  	//   "chatEndedEvent"
  4859  	//   "sponsorOnlyModeStartedEvent"
  4860  	//   "sponsorOnlyModeEndedEvent"
  4861  	//   "newSponsorEvent"
  4862  	//   "memberMilestoneChatEvent"
  4863  	//   "membershipGiftingEvent"
  4864  	//   "giftMembershipReceivedEvent"
  4865  	//   "messageDeletedEvent"
  4866  	//   "messageRetractedEvent"
  4867  	//   "userBannedEvent"
  4868  	//   "superChatEvent"
  4869  	//   "superStickerEvent"
  4870  	//   "pollEvent"
  4871  	Type              string                            `json:"type,omitempty"`
  4872  	UserBannedDetails *LiveChatUserBannedMessageDetails `json:"userBannedDetails,omitempty"`
  4873  	// ForceSendFields is a list of field names (e.g. "AuthorChannelId") to
  4874  	// unconditionally include in API requests. By default, fields with empty or
  4875  	// default values are omitted from API requests. See
  4876  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4877  	// details.
  4878  	ForceSendFields []string `json:"-"`
  4879  	// NullFields is a list of field names (e.g. "AuthorChannelId") to include in
  4880  	// API requests with the JSON null value. By default, fields with empty values
  4881  	// are omitted from API requests. See
  4882  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4883  	NullFields []string `json:"-"`
  4884  }
  4885  
  4886  func (s *LiveChatMessageSnippet) MarshalJSON() ([]byte, error) {
  4887  	type NoMethod LiveChatMessageSnippet
  4888  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4889  }
  4890  
  4891  // LiveChatModerator: A *liveChatModerator* resource represents a moderator for
  4892  // a YouTube live chat. A chat moderator has the ability to ban/unban users
  4893  // from a chat, remove message, etc.
  4894  type LiveChatModerator struct {
  4895  	// Etag: Etag of this resource.
  4896  	Etag string `json:"etag,omitempty"`
  4897  	// Id: The ID that YouTube assigns to uniquely identify the moderator.
  4898  	Id string `json:"id,omitempty"`
  4899  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4900  	// "youtube#liveChatModerator".
  4901  	Kind string `json:"kind,omitempty"`
  4902  	// Snippet: The snippet object contains basic details about the moderator.
  4903  	Snippet *LiveChatModeratorSnippet `json:"snippet,omitempty"`
  4904  
  4905  	// ServerResponse contains the HTTP response code and headers from the server.
  4906  	googleapi.ServerResponse `json:"-"`
  4907  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  4908  	// include in API requests. By default, fields with empty or default values are
  4909  	// omitted from API requests. See
  4910  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4911  	// details.
  4912  	ForceSendFields []string `json:"-"`
  4913  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  4914  	// with the JSON null value. By default, fields with empty values are omitted
  4915  	// from API requests. See
  4916  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4917  	NullFields []string `json:"-"`
  4918  }
  4919  
  4920  func (s *LiveChatModerator) MarshalJSON() ([]byte, error) {
  4921  	type NoMethod LiveChatModerator
  4922  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4923  }
  4924  
  4925  type LiveChatModeratorListResponse struct {
  4926  	// Etag: Etag of this resource.
  4927  	Etag string `json:"etag,omitempty"`
  4928  	// EventId: Serialized EventId of the request which produced this response.
  4929  	EventId string `json:"eventId,omitempty"`
  4930  	// Items: A list of moderators that match the request criteria.
  4931  	Items []*LiveChatModerator `json:"items,omitempty"`
  4932  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  4933  	// "youtube#liveChatModeratorListResponse".
  4934  	Kind string `json:"kind,omitempty"`
  4935  	// NextPageToken: The token that can be used as the value of the pageToken
  4936  	// parameter to retrieve the next page in the result set.
  4937  	NextPageToken string `json:"nextPageToken,omitempty"`
  4938  	// PageInfo: General pagination information.
  4939  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  4940  	// PrevPageToken: The token that can be used as the value of the pageToken
  4941  	// parameter to retrieve the previous page in the result set.
  4942  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  4943  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  4944  	// VisitorId: The visitorId identifies the visitor.
  4945  	VisitorId string `json:"visitorId,omitempty"`
  4946  
  4947  	// ServerResponse contains the HTTP response code and headers from the server.
  4948  	googleapi.ServerResponse `json:"-"`
  4949  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  4950  	// include in API requests. By default, fields with empty or default values are
  4951  	// omitted from API requests. See
  4952  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4953  	// details.
  4954  	ForceSendFields []string `json:"-"`
  4955  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  4956  	// with the JSON null value. By default, fields with empty values are omitted
  4957  	// from API requests. See
  4958  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4959  	NullFields []string `json:"-"`
  4960  }
  4961  
  4962  func (s *LiveChatModeratorListResponse) MarshalJSON() ([]byte, error) {
  4963  	type NoMethod LiveChatModeratorListResponse
  4964  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4965  }
  4966  
  4967  type LiveChatModeratorSnippet struct {
  4968  	// LiveChatId: The ID of the live chat this moderator can act on.
  4969  	LiveChatId string `json:"liveChatId,omitempty"`
  4970  	// ModeratorDetails: Details about the moderator.
  4971  	ModeratorDetails *ChannelProfileDetails `json:"moderatorDetails,omitempty"`
  4972  	// ForceSendFields is a list of field names (e.g. "LiveChatId") to
  4973  	// unconditionally include in API requests. By default, fields with empty or
  4974  	// default values are omitted from API requests. See
  4975  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4976  	// details.
  4977  	ForceSendFields []string `json:"-"`
  4978  	// NullFields is a list of field names (e.g. "LiveChatId") to include in API
  4979  	// requests with the JSON null value. By default, fields with empty values are
  4980  	// omitted from API requests. See
  4981  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4982  	NullFields []string `json:"-"`
  4983  }
  4984  
  4985  func (s *LiveChatModeratorSnippet) MarshalJSON() ([]byte, error) {
  4986  	type NoMethod LiveChatModeratorSnippet
  4987  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4988  }
  4989  
  4990  type LiveChatNewSponsorDetails struct {
  4991  	// IsUpgrade: If the viewer just had upgraded from a lower level. For viewers
  4992  	// that were not members at the time of purchase, this field is false.
  4993  	IsUpgrade bool `json:"isUpgrade,omitempty"`
  4994  	// MemberLevelName: The name of the Level that the viewer just had joined. The
  4995  	// Level names are defined by the YouTube channel offering the Membership. In
  4996  	// some situations this field isn't filled.
  4997  	MemberLevelName string `json:"memberLevelName,omitempty"`
  4998  	// ForceSendFields is a list of field names (e.g. "IsUpgrade") to
  4999  	// unconditionally include in API requests. By default, fields with empty or
  5000  	// default values are omitted from API requests. See
  5001  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5002  	// details.
  5003  	ForceSendFields []string `json:"-"`
  5004  	// NullFields is a list of field names (e.g. "IsUpgrade") to include in API
  5005  	// requests with the JSON null value. By default, fields with empty values are
  5006  	// omitted from API requests. See
  5007  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5008  	NullFields []string `json:"-"`
  5009  }
  5010  
  5011  func (s *LiveChatNewSponsorDetails) MarshalJSON() ([]byte, error) {
  5012  	type NoMethod LiveChatNewSponsorDetails
  5013  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5014  }
  5015  
  5016  type LiveChatPollDetails struct {
  5017  	Metadata *LiveChatPollDetailsPollMetadata `json:"metadata,omitempty"`
  5018  	// Possible values:
  5019  	//   "unknown"
  5020  	//   "active"
  5021  	//   "closed"
  5022  	Status string `json:"status,omitempty"`
  5023  	// ForceSendFields is a list of field names (e.g. "Metadata") to
  5024  	// unconditionally include in API requests. By default, fields with empty or
  5025  	// default values are omitted from API requests. See
  5026  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5027  	// details.
  5028  	ForceSendFields []string `json:"-"`
  5029  	// NullFields is a list of field names (e.g. "Metadata") to include in API
  5030  	// requests with the JSON null value. By default, fields with empty values are
  5031  	// omitted from API requests. See
  5032  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5033  	NullFields []string `json:"-"`
  5034  }
  5035  
  5036  func (s *LiveChatPollDetails) MarshalJSON() ([]byte, error) {
  5037  	type NoMethod LiveChatPollDetails
  5038  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5039  }
  5040  
  5041  type LiveChatPollDetailsPollMetadata struct {
  5042  	// Options: The options will be returned in the order that is displayed in 1P
  5043  	Options      []*LiveChatPollDetailsPollMetadataPollOption `json:"options,omitempty"`
  5044  	QuestionText string                                       `json:"questionText,omitempty"`
  5045  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
  5046  	// include in API requests. By default, fields with empty or default values are
  5047  	// omitted from API requests. See
  5048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5049  	// details.
  5050  	ForceSendFields []string `json:"-"`
  5051  	// NullFields is a list of field names (e.g. "Options") to include in API
  5052  	// requests with the JSON null value. By default, fields with empty values are
  5053  	// omitted from API requests. See
  5054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5055  	NullFields []string `json:"-"`
  5056  }
  5057  
  5058  func (s *LiveChatPollDetailsPollMetadata) MarshalJSON() ([]byte, error) {
  5059  	type NoMethod LiveChatPollDetailsPollMetadata
  5060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5061  }
  5062  
  5063  type LiveChatPollDetailsPollMetadataPollOption struct {
  5064  	OptionText string `json:"optionText,omitempty"`
  5065  	Tally      int64  `json:"tally,omitempty,string"`
  5066  	// ForceSendFields is a list of field names (e.g. "OptionText") to
  5067  	// unconditionally include in API requests. By default, fields with empty or
  5068  	// default values are omitted from API requests. See
  5069  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5070  	// details.
  5071  	ForceSendFields []string `json:"-"`
  5072  	// NullFields is a list of field names (e.g. "OptionText") to include in API
  5073  	// requests with the JSON null value. By default, fields with empty values are
  5074  	// omitted from API requests. See
  5075  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5076  	NullFields []string `json:"-"`
  5077  }
  5078  
  5079  func (s *LiveChatPollDetailsPollMetadataPollOption) MarshalJSON() ([]byte, error) {
  5080  	type NoMethod LiveChatPollDetailsPollMetadataPollOption
  5081  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5082  }
  5083  
  5084  type LiveChatSuperChatDetails struct {
  5085  	// AmountDisplayString: A rendered string that displays the fund amount and
  5086  	// currency to the user.
  5087  	AmountDisplayString string `json:"amountDisplayString,omitempty"`
  5088  	// AmountMicros: The amount purchased by the user, in micros (1,750,000 micros
  5089  	// = 1.75).
  5090  	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
  5091  	// Currency: The currency in which the purchase was made.
  5092  	Currency string `json:"currency,omitempty"`
  5093  	// Tier: The tier in which the amount belongs. Lower amounts belong to lower
  5094  	// tiers. The lowest tier is 1.
  5095  	Tier int64 `json:"tier,omitempty"`
  5096  	// UserComment: The comment added by the user to this Super Chat event.
  5097  	UserComment string `json:"userComment,omitempty"`
  5098  	// ForceSendFields is a list of field names (e.g. "AmountDisplayString") to
  5099  	// unconditionally include in API requests. By default, fields with empty or
  5100  	// default values are omitted from API requests. See
  5101  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5102  	// details.
  5103  	ForceSendFields []string `json:"-"`
  5104  	// NullFields is a list of field names (e.g. "AmountDisplayString") to include
  5105  	// in API requests with the JSON null value. By default, fields with empty
  5106  	// values are omitted from API requests. See
  5107  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5108  	NullFields []string `json:"-"`
  5109  }
  5110  
  5111  func (s *LiveChatSuperChatDetails) MarshalJSON() ([]byte, error) {
  5112  	type NoMethod LiveChatSuperChatDetails
  5113  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5114  }
  5115  
  5116  type LiveChatSuperStickerDetails struct {
  5117  	// AmountDisplayString: A rendered string that displays the fund amount and
  5118  	// currency to the user.
  5119  	AmountDisplayString string `json:"amountDisplayString,omitempty"`
  5120  	// AmountMicros: The amount purchased by the user, in micros (1,750,000 micros
  5121  	// = 1.75).
  5122  	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
  5123  	// Currency: The currency in which the purchase was made.
  5124  	Currency string `json:"currency,omitempty"`
  5125  	// SuperStickerMetadata: Information about the Super Sticker.
  5126  	SuperStickerMetadata *SuperStickerMetadata `json:"superStickerMetadata,omitempty"`
  5127  	// Tier: The tier in which the amount belongs. Lower amounts belong to lower
  5128  	// tiers. The lowest tier is 1.
  5129  	Tier int64 `json:"tier,omitempty"`
  5130  	// ForceSendFields is a list of field names (e.g. "AmountDisplayString") to
  5131  	// unconditionally include in API requests. By default, fields with empty or
  5132  	// default values are omitted from API requests. See
  5133  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5134  	// details.
  5135  	ForceSendFields []string `json:"-"`
  5136  	// NullFields is a list of field names (e.g. "AmountDisplayString") to include
  5137  	// in API requests with the JSON null value. By default, fields with empty
  5138  	// values are omitted from API requests. See
  5139  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5140  	NullFields []string `json:"-"`
  5141  }
  5142  
  5143  func (s *LiveChatSuperStickerDetails) MarshalJSON() ([]byte, error) {
  5144  	type NoMethod LiveChatSuperStickerDetails
  5145  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5146  }
  5147  
  5148  type LiveChatTextMessageDetails struct {
  5149  	// MessageText: The user's message.
  5150  	MessageText string `json:"messageText,omitempty"`
  5151  	// ForceSendFields is a list of field names (e.g. "MessageText") to
  5152  	// unconditionally include in API requests. By default, fields with empty or
  5153  	// default values are omitted from API requests. See
  5154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5155  	// details.
  5156  	ForceSendFields []string `json:"-"`
  5157  	// NullFields is a list of field names (e.g. "MessageText") to include in API
  5158  	// requests with the JSON null value. By default, fields with empty values are
  5159  	// omitted from API requests. See
  5160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5161  	NullFields []string `json:"-"`
  5162  }
  5163  
  5164  func (s *LiveChatTextMessageDetails) MarshalJSON() ([]byte, error) {
  5165  	type NoMethod LiveChatTextMessageDetails
  5166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5167  }
  5168  
  5169  type LiveChatUserBannedMessageDetails struct {
  5170  	// BanDurationSeconds: The duration of the ban. This property is only present
  5171  	// if the banType is temporary.
  5172  	BanDurationSeconds uint64 `json:"banDurationSeconds,omitempty,string"`
  5173  	// BanType: The type of ban.
  5174  	//
  5175  	// Possible values:
  5176  	//   "permanent"
  5177  	//   "temporary"
  5178  	BanType string `json:"banType,omitempty"`
  5179  	// BannedUserDetails: The details of the user that was banned.
  5180  	BannedUserDetails *ChannelProfileDetails `json:"bannedUserDetails,omitempty"`
  5181  	// ForceSendFields is a list of field names (e.g. "BanDurationSeconds") to
  5182  	// unconditionally include in API requests. By default, fields with empty or
  5183  	// default values are omitted from API requests. See
  5184  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5185  	// details.
  5186  	ForceSendFields []string `json:"-"`
  5187  	// NullFields is a list of field names (e.g. "BanDurationSeconds") to include
  5188  	// in API requests with the JSON null value. By default, fields with empty
  5189  	// values are omitted from API requests. See
  5190  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5191  	NullFields []string `json:"-"`
  5192  }
  5193  
  5194  func (s *LiveChatUserBannedMessageDetails) MarshalJSON() ([]byte, error) {
  5195  	type NoMethod LiveChatUserBannedMessageDetails
  5196  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5197  }
  5198  
  5199  // LiveStream: A live stream describes a live ingestion point.
  5200  type LiveStream struct {
  5201  	// Cdn: The cdn object defines the live stream's content delivery network (CDN)
  5202  	// settings. These settings provide details about the manner in which you
  5203  	// stream your content to YouTube.
  5204  	Cdn *CdnSettings `json:"cdn,omitempty"`
  5205  	// ContentDetails: The content_details object contains information about the
  5206  	// stream, including the closed captions ingestion URL.
  5207  	ContentDetails *LiveStreamContentDetails `json:"contentDetails,omitempty"`
  5208  	// Etag: Etag of this resource.
  5209  	Etag string `json:"etag,omitempty"`
  5210  	// Id: The ID that YouTube assigns to uniquely identify the stream.
  5211  	Id string `json:"id,omitempty"`
  5212  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5213  	// "youtube#liveStream".
  5214  	Kind string `json:"kind,omitempty"`
  5215  	// Snippet: The snippet object contains basic details about the stream,
  5216  	// including its channel, title, and description.
  5217  	Snippet *LiveStreamSnippet `json:"snippet,omitempty"`
  5218  	// Status: The status object contains information about live stream's status.
  5219  	Status *LiveStreamStatus `json:"status,omitempty"`
  5220  
  5221  	// ServerResponse contains the HTTP response code and headers from the server.
  5222  	googleapi.ServerResponse `json:"-"`
  5223  	// ForceSendFields is a list of field names (e.g. "Cdn") to unconditionally
  5224  	// include in API requests. By default, fields with empty or default values are
  5225  	// omitted from API requests. See
  5226  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5227  	// details.
  5228  	ForceSendFields []string `json:"-"`
  5229  	// NullFields is a list of field names (e.g. "Cdn") to include in API requests
  5230  	// with the JSON null value. By default, fields with empty values are omitted
  5231  	// from API requests. See
  5232  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5233  	NullFields []string `json:"-"`
  5234  }
  5235  
  5236  func (s *LiveStream) MarshalJSON() ([]byte, error) {
  5237  	type NoMethod LiveStream
  5238  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5239  }
  5240  
  5241  type LiveStreamConfigurationIssue struct {
  5242  	// Description: The long-form description of the issue and how to resolve it.
  5243  	Description string `json:"description,omitempty"`
  5244  	// Reason: The short-form reason for this issue.
  5245  	Reason string `json:"reason,omitempty"`
  5246  	// Severity: How severe this issue is to the stream.
  5247  	//
  5248  	// Possible values:
  5249  	//   "info"
  5250  	//   "warning"
  5251  	//   "error"
  5252  	Severity string `json:"severity,omitempty"`
  5253  	// Type: The kind of error happening.
  5254  	//
  5255  	// Possible values:
  5256  	//   "gopSizeOver"
  5257  	//   "gopSizeLong"
  5258  	//   "gopSizeShort"
  5259  	//   "openGop"
  5260  	//   "badContainer"
  5261  	//   "audioBitrateHigh"
  5262  	//   "audioBitrateLow"
  5263  	//   "audioSampleRate"
  5264  	//   "bitrateHigh"
  5265  	//   "bitrateLow"
  5266  	//   "audioCodec"
  5267  	//   "videoCodec"
  5268  	//   "noAudioStream"
  5269  	//   "noVideoStream"
  5270  	//   "multipleVideoStreams"
  5271  	//   "multipleAudioStreams"
  5272  	//   "audioTooManyChannels"
  5273  	//   "interlacedVideo"
  5274  	//   "frameRateHigh"
  5275  	//   "resolutionMismatch"
  5276  	//   "videoCodecMismatch"
  5277  	//   "videoInterlaceMismatch"
  5278  	//   "videoProfileMismatch"
  5279  	//   "videoBitrateMismatch"
  5280  	//   "framerateMismatch"
  5281  	//   "gopMismatch"
  5282  	//   "audioSampleRateMismatch"
  5283  	//   "audioStereoMismatch"
  5284  	//   "audioCodecMismatch"
  5285  	//   "audioBitrateMismatch"
  5286  	//   "videoResolutionSuboptimal"
  5287  	//   "videoResolutionUnsupported"
  5288  	//   "videoIngestionStarved"
  5289  	//   "videoIngestionFasterThanRealtime"
  5290  	Type string `json:"type,omitempty"`
  5291  	// ForceSendFields is a list of field names (e.g. "Description") to
  5292  	// unconditionally include in API requests. By default, fields with empty or
  5293  	// default values are omitted from API requests. See
  5294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5295  	// details.
  5296  	ForceSendFields []string `json:"-"`
  5297  	// NullFields is a list of field names (e.g. "Description") to include in API
  5298  	// requests with the JSON null value. By default, fields with empty values are
  5299  	// omitted from API requests. See
  5300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5301  	NullFields []string `json:"-"`
  5302  }
  5303  
  5304  func (s *LiveStreamConfigurationIssue) MarshalJSON() ([]byte, error) {
  5305  	type NoMethod LiveStreamConfigurationIssue
  5306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5307  }
  5308  
  5309  // LiveStreamContentDetails: Detailed settings of a stream.
  5310  type LiveStreamContentDetails struct {
  5311  	// ClosedCaptionsIngestionUrl: The ingestion URL where the closed captions of
  5312  	// this stream are sent.
  5313  	ClosedCaptionsIngestionUrl string `json:"closedCaptionsIngestionUrl,omitempty"`
  5314  	// IsReusable: Indicates whether the stream is reusable, which means that it
  5315  	// can be bound to multiple broadcasts. It is common for broadcasters to reuse
  5316  	// the same stream for many different broadcasts if those broadcasts occur at
  5317  	// different times. If you set this value to false, then the stream will not be
  5318  	// reusable, which means that it can only be bound to one broadcast.
  5319  	// Non-reusable streams differ from reusable streams in the following ways: - A
  5320  	// non-reusable stream can only be bound to one broadcast. - A non-reusable
  5321  	// stream might be deleted by an automated process after the broadcast ends. -
  5322  	// The liveStreams.list method does not list non-reusable streams if you call
  5323  	// the method and set the mine parameter to true. The only way to use that
  5324  	// method to retrieve the resource for a non-reusable stream is to use the id
  5325  	// parameter to identify the stream.
  5326  	IsReusable bool `json:"isReusable,omitempty"`
  5327  	// ForceSendFields is a list of field names (e.g. "ClosedCaptionsIngestionUrl")
  5328  	// to unconditionally include in API requests. By default, fields with empty or
  5329  	// default values are omitted from API requests. See
  5330  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5331  	// details.
  5332  	ForceSendFields []string `json:"-"`
  5333  	// NullFields is a list of field names (e.g. "ClosedCaptionsIngestionUrl") to
  5334  	// include in API requests with the JSON null value. By default, fields with
  5335  	// empty values are omitted from API requests. See
  5336  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5337  	NullFields []string `json:"-"`
  5338  }
  5339  
  5340  func (s *LiveStreamContentDetails) MarshalJSON() ([]byte, error) {
  5341  	type NoMethod LiveStreamContentDetails
  5342  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5343  }
  5344  
  5345  type LiveStreamHealthStatus struct {
  5346  	// ConfigurationIssues: The configurations issues on this stream
  5347  	ConfigurationIssues []*LiveStreamConfigurationIssue `json:"configurationIssues,omitempty"`
  5348  	// LastUpdateTimeSeconds: The last time this status was updated (in seconds)
  5349  	LastUpdateTimeSeconds uint64 `json:"lastUpdateTimeSeconds,omitempty,string"`
  5350  	// Status: The status code of this stream
  5351  	//
  5352  	// Possible values:
  5353  	//   "good"
  5354  	//   "ok"
  5355  	//   "bad"
  5356  	//   "noData"
  5357  	//   "revoked"
  5358  	Status string `json:"status,omitempty"`
  5359  	// ForceSendFields is a list of field names (e.g. "ConfigurationIssues") to
  5360  	// unconditionally include in API requests. By default, fields with empty or
  5361  	// default values are omitted from API requests. See
  5362  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5363  	// details.
  5364  	ForceSendFields []string `json:"-"`
  5365  	// NullFields is a list of field names (e.g. "ConfigurationIssues") to include
  5366  	// in API requests with the JSON null value. By default, fields with empty
  5367  	// values are omitted from API requests. See
  5368  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5369  	NullFields []string `json:"-"`
  5370  }
  5371  
  5372  func (s *LiveStreamHealthStatus) MarshalJSON() ([]byte, error) {
  5373  	type NoMethod LiveStreamHealthStatus
  5374  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5375  }
  5376  
  5377  type LiveStreamListResponse struct {
  5378  	// Etag: Etag of this resource.
  5379  	Etag string `json:"etag,omitempty"`
  5380  	// EventId: Serialized EventId of the request which produced this response.
  5381  	EventId string `json:"eventId,omitempty"`
  5382  	// Items: A list of live streams that match the request criteria.
  5383  	Items []*LiveStream `json:"items,omitempty"`
  5384  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5385  	// "youtube#liveStreamListResponse".
  5386  	Kind string `json:"kind,omitempty"`
  5387  	// NextPageToken: The token that can be used as the value of the pageToken
  5388  	// parameter to retrieve the next page in the result set.
  5389  	NextPageToken string    `json:"nextPageToken,omitempty"`
  5390  	PageInfo      *PageInfo `json:"pageInfo,omitempty"`
  5391  	// PrevPageToken: The token that can be used as the value of the pageToken
  5392  	// parameter to retrieve the previous page in the result set.
  5393  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  5394  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  5395  	// VisitorId: The visitorId identifies the visitor.
  5396  	VisitorId string `json:"visitorId,omitempty"`
  5397  
  5398  	// ServerResponse contains the HTTP response code and headers from the server.
  5399  	googleapi.ServerResponse `json:"-"`
  5400  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  5401  	// include in API requests. By default, fields with empty or default values are
  5402  	// omitted from API requests. See
  5403  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5404  	// details.
  5405  	ForceSendFields []string `json:"-"`
  5406  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  5407  	// with the JSON null value. By default, fields with empty values are omitted
  5408  	// from API requests. See
  5409  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5410  	NullFields []string `json:"-"`
  5411  }
  5412  
  5413  func (s *LiveStreamListResponse) MarshalJSON() ([]byte, error) {
  5414  	type NoMethod LiveStreamListResponse
  5415  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5416  }
  5417  
  5418  type LiveStreamSnippet struct {
  5419  	// ChannelId: The ID that YouTube uses to uniquely identify the channel that is
  5420  	// transmitting the stream.
  5421  	ChannelId string `json:"channelId,omitempty"`
  5422  	// Description: The stream's description. The value cannot be longer than 10000
  5423  	// characters.
  5424  	Description     string `json:"description,omitempty"`
  5425  	IsDefaultStream bool   `json:"isDefaultStream,omitempty"`
  5426  	// PublishedAt: The date and time that the stream was created.
  5427  	PublishedAt string `json:"publishedAt,omitempty"`
  5428  	// Title: The stream's title. The value must be between 1 and 128 characters
  5429  	// long.
  5430  	Title string `json:"title,omitempty"`
  5431  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  5432  	// unconditionally include in API requests. By default, fields with empty or
  5433  	// default values are omitted from API requests. See
  5434  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5435  	// details.
  5436  	ForceSendFields []string `json:"-"`
  5437  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  5438  	// requests with the JSON null value. By default, fields with empty values are
  5439  	// omitted from API requests. See
  5440  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5441  	NullFields []string `json:"-"`
  5442  }
  5443  
  5444  func (s *LiveStreamSnippet) MarshalJSON() ([]byte, error) {
  5445  	type NoMethod LiveStreamSnippet
  5446  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5447  }
  5448  
  5449  // LiveStreamStatus: Brief description of the live stream status.
  5450  type LiveStreamStatus struct {
  5451  	// HealthStatus: The health status of the stream.
  5452  	HealthStatus *LiveStreamHealthStatus `json:"healthStatus,omitempty"`
  5453  	// Possible values:
  5454  	//   "created"
  5455  	//   "ready"
  5456  	//   "active"
  5457  	//   "inactive"
  5458  	//   "error"
  5459  	StreamStatus string `json:"streamStatus,omitempty"`
  5460  	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
  5461  	// unconditionally include in API requests. By default, fields with empty or
  5462  	// default values are omitted from API requests. See
  5463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5464  	// details.
  5465  	ForceSendFields []string `json:"-"`
  5466  	// NullFields is a list of field names (e.g. "HealthStatus") to include in API
  5467  	// requests with the JSON null value. By default, fields with empty values are
  5468  	// omitted from API requests. See
  5469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5470  	NullFields []string `json:"-"`
  5471  }
  5472  
  5473  func (s *LiveStreamStatus) MarshalJSON() ([]byte, error) {
  5474  	type NoMethod LiveStreamStatus
  5475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5476  }
  5477  
  5478  type LocalizedProperty struct {
  5479  	Default string `json:"default,omitempty"`
  5480  	// DefaultLanguage: The language of the default property.
  5481  	DefaultLanguage *LanguageTag       `json:"defaultLanguage,omitempty"`
  5482  	Localized       []*LocalizedString `json:"localized,omitempty"`
  5483  	// ForceSendFields is a list of field names (e.g. "Default") to unconditionally
  5484  	// include in API requests. By default, fields with empty or default values are
  5485  	// omitted from API requests. See
  5486  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5487  	// details.
  5488  	ForceSendFields []string `json:"-"`
  5489  	// NullFields is a list of field names (e.g. "Default") to include in API
  5490  	// requests with the JSON null value. By default, fields with empty values are
  5491  	// omitted from API requests. See
  5492  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5493  	NullFields []string `json:"-"`
  5494  }
  5495  
  5496  func (s *LocalizedProperty) MarshalJSON() ([]byte, error) {
  5497  	type NoMethod LocalizedProperty
  5498  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5499  }
  5500  
  5501  type LocalizedString struct {
  5502  	Language string `json:"language,omitempty"`
  5503  	Value    string `json:"value,omitempty"`
  5504  	// ForceSendFields is a list of field names (e.g. "Language") to
  5505  	// unconditionally include in API requests. By default, fields with empty or
  5506  	// default values are omitted from API requests. See
  5507  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5508  	// details.
  5509  	ForceSendFields []string `json:"-"`
  5510  	// NullFields is a list of field names (e.g. "Language") to include in API
  5511  	// requests with the JSON null value. By default, fields with empty values are
  5512  	// omitted from API requests. See
  5513  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5514  	NullFields []string `json:"-"`
  5515  }
  5516  
  5517  func (s *LocalizedString) MarshalJSON() ([]byte, error) {
  5518  	type NoMethod LocalizedString
  5519  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5520  }
  5521  
  5522  // Member: A *member* resource represents a member for a YouTube channel. A
  5523  // member provides recurring monetary support to a creator and receives special
  5524  // benefits.
  5525  type Member struct {
  5526  	// Etag: Etag of this resource.
  5527  	Etag string `json:"etag,omitempty"`
  5528  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5529  	// "youtube#member".
  5530  	Kind string `json:"kind,omitempty"`
  5531  	// Snippet: The snippet object contains basic details about the member.
  5532  	Snippet *MemberSnippet `json:"snippet,omitempty"`
  5533  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  5534  	// include in API requests. By default, fields with empty or default values are
  5535  	// omitted from API requests. See
  5536  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5537  	// details.
  5538  	ForceSendFields []string `json:"-"`
  5539  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  5540  	// with the JSON null value. By default, fields with empty values are omitted
  5541  	// from API requests. See
  5542  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5543  	NullFields []string `json:"-"`
  5544  }
  5545  
  5546  func (s *Member) MarshalJSON() ([]byte, error) {
  5547  	type NoMethod Member
  5548  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5549  }
  5550  
  5551  type MemberListResponse struct {
  5552  	// Etag: Etag of this resource.
  5553  	Etag string `json:"etag,omitempty"`
  5554  	// EventId: Serialized EventId of the request which produced this response.
  5555  	EventId string `json:"eventId,omitempty"`
  5556  	// Items: A list of members that match the request criteria.
  5557  	Items []*Member `json:"items,omitempty"`
  5558  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5559  	// "youtube#memberListResponse".
  5560  	Kind string `json:"kind,omitempty"`
  5561  	// NextPageToken: The token that can be used as the value of the pageToken
  5562  	// parameter to retrieve the next page in the result set.
  5563  	NextPageToken   string           `json:"nextPageToken,omitempty"`
  5564  	PageInfo        *PageInfo        `json:"pageInfo,omitempty"`
  5565  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  5566  	// VisitorId: The visitorId identifies the visitor.
  5567  	VisitorId string `json:"visitorId,omitempty"`
  5568  
  5569  	// ServerResponse contains the HTTP response code and headers from the server.
  5570  	googleapi.ServerResponse `json:"-"`
  5571  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  5572  	// include in API requests. By default, fields with empty or default values are
  5573  	// omitted from API requests. See
  5574  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5575  	// details.
  5576  	ForceSendFields []string `json:"-"`
  5577  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  5578  	// with the JSON null value. By default, fields with empty values are omitted
  5579  	// from API requests. See
  5580  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5581  	NullFields []string `json:"-"`
  5582  }
  5583  
  5584  func (s *MemberListResponse) MarshalJSON() ([]byte, error) {
  5585  	type NoMethod MemberListResponse
  5586  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5587  }
  5588  
  5589  type MemberSnippet struct {
  5590  	// CreatorChannelId: The id of the channel that's offering memberships.
  5591  	CreatorChannelId string `json:"creatorChannelId,omitempty"`
  5592  	// MemberDetails: Details about the member.
  5593  	MemberDetails *ChannelProfileDetails `json:"memberDetails,omitempty"`
  5594  	// MembershipsDetails: Details about the user's membership.
  5595  	MembershipsDetails *MembershipsDetails `json:"membershipsDetails,omitempty"`
  5596  	// ForceSendFields is a list of field names (e.g. "CreatorChannelId") to
  5597  	// unconditionally include in API requests. By default, fields with empty or
  5598  	// default values are omitted from API requests. See
  5599  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5600  	// details.
  5601  	ForceSendFields []string `json:"-"`
  5602  	// NullFields is a list of field names (e.g. "CreatorChannelId") to include in
  5603  	// API requests with the JSON null value. By default, fields with empty values
  5604  	// are omitted from API requests. See
  5605  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5606  	NullFields []string `json:"-"`
  5607  }
  5608  
  5609  func (s *MemberSnippet) MarshalJSON() ([]byte, error) {
  5610  	type NoMethod MemberSnippet
  5611  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5612  }
  5613  
  5614  type MembershipsDetails struct {
  5615  	// AccessibleLevels: Ids of all levels that the user has access to. This
  5616  	// includes the currently active level and all other levels that are included
  5617  	// because of a higher purchase.
  5618  	AccessibleLevels []string `json:"accessibleLevels,omitempty"`
  5619  	// HighestAccessibleLevel: Id of the highest level that the user has access to
  5620  	// at the moment.
  5621  	HighestAccessibleLevel string `json:"highestAccessibleLevel,omitempty"`
  5622  	// HighestAccessibleLevelDisplayName: Display name for the highest level that
  5623  	// the user has access to at the moment.
  5624  	HighestAccessibleLevelDisplayName string `json:"highestAccessibleLevelDisplayName,omitempty"`
  5625  	// MembershipsDuration: Data about memberships duration without taking into
  5626  	// consideration pricing levels.
  5627  	MembershipsDuration *MembershipsDuration `json:"membershipsDuration,omitempty"`
  5628  	// MembershipsDurationAtLevels: Data about memberships duration on particular
  5629  	// pricing levels.
  5630  	MembershipsDurationAtLevels []*MembershipsDurationAtLevel `json:"membershipsDurationAtLevels,omitempty"`
  5631  	// ForceSendFields is a list of field names (e.g. "AccessibleLevels") to
  5632  	// unconditionally include in API requests. By default, fields with empty or
  5633  	// default values are omitted from API requests. See
  5634  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5635  	// details.
  5636  	ForceSendFields []string `json:"-"`
  5637  	// NullFields is a list of field names (e.g. "AccessibleLevels") to include in
  5638  	// API requests with the JSON null value. By default, fields with empty values
  5639  	// are omitted from API requests. See
  5640  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5641  	NullFields []string `json:"-"`
  5642  }
  5643  
  5644  func (s *MembershipsDetails) MarshalJSON() ([]byte, error) {
  5645  	type NoMethod MembershipsDetails
  5646  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5647  }
  5648  
  5649  type MembershipsDuration struct {
  5650  	// MemberSince: The date and time when the user became a continuous member
  5651  	// across all levels.
  5652  	MemberSince string `json:"memberSince,omitempty"`
  5653  	// MemberTotalDurationMonths: The cumulative time the user has been a member
  5654  	// across all levels in complete months (the time is rounded down to the
  5655  	// nearest integer).
  5656  	MemberTotalDurationMonths int64 `json:"memberTotalDurationMonths,omitempty"`
  5657  	// ForceSendFields is a list of field names (e.g. "MemberSince") to
  5658  	// unconditionally include in API requests. By default, fields with empty or
  5659  	// default values are omitted from API requests. See
  5660  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5661  	// details.
  5662  	ForceSendFields []string `json:"-"`
  5663  	// NullFields is a list of field names (e.g. "MemberSince") to include in API
  5664  	// requests with the JSON null value. By default, fields with empty values are
  5665  	// omitted from API requests. See
  5666  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5667  	NullFields []string `json:"-"`
  5668  }
  5669  
  5670  func (s *MembershipsDuration) MarshalJSON() ([]byte, error) {
  5671  	type NoMethod MembershipsDuration
  5672  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5673  }
  5674  
  5675  type MembershipsDurationAtLevel struct {
  5676  	// Level: Pricing level ID.
  5677  	Level string `json:"level,omitempty"`
  5678  	// MemberSince: The date and time when the user became a continuous member for
  5679  	// the given level.
  5680  	MemberSince string `json:"memberSince,omitempty"`
  5681  	// MemberTotalDurationMonths: The cumulative time the user has been a member
  5682  	// for the given level in complete months (the time is rounded down to the
  5683  	// nearest integer).
  5684  	MemberTotalDurationMonths int64 `json:"memberTotalDurationMonths,omitempty"`
  5685  	// ForceSendFields is a list of field names (e.g. "Level") to unconditionally
  5686  	// include in API requests. By default, fields with empty or default values are
  5687  	// omitted from API requests. See
  5688  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5689  	// details.
  5690  	ForceSendFields []string `json:"-"`
  5691  	// NullFields is a list of field names (e.g. "Level") to include in API
  5692  	// requests with the JSON null value. By default, fields with empty values are
  5693  	// omitted from API requests. See
  5694  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5695  	NullFields []string `json:"-"`
  5696  }
  5697  
  5698  func (s *MembershipsDurationAtLevel) MarshalJSON() ([]byte, error) {
  5699  	type NoMethod MembershipsDurationAtLevel
  5700  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5701  }
  5702  
  5703  // MembershipsLevel: A *membershipsLevel* resource represents an offer made by
  5704  // YouTube creators for their fans. Users can become members of the channel by
  5705  // joining one of the available levels. They will provide recurring monetary
  5706  // support and receives special benefits.
  5707  type MembershipsLevel struct {
  5708  	// Etag: Etag of this resource.
  5709  	Etag string `json:"etag,omitempty"`
  5710  	// Id: The ID that YouTube assigns to uniquely identify the memberships level.
  5711  	Id string `json:"id,omitempty"`
  5712  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5713  	// "youtube#membershipsLevelListResponse".
  5714  	Kind string `json:"kind,omitempty"`
  5715  	// Snippet: The snippet object contains basic details about the level.
  5716  	Snippet *MembershipsLevelSnippet `json:"snippet,omitempty"`
  5717  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  5718  	// include in API requests. By default, fields with empty or default values are
  5719  	// omitted from API requests. See
  5720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5721  	// details.
  5722  	ForceSendFields []string `json:"-"`
  5723  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  5724  	// with the JSON null value. By default, fields with empty values are omitted
  5725  	// from API requests. See
  5726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5727  	NullFields []string `json:"-"`
  5728  }
  5729  
  5730  func (s *MembershipsLevel) MarshalJSON() ([]byte, error) {
  5731  	type NoMethod MembershipsLevel
  5732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5733  }
  5734  
  5735  type MembershipsLevelListResponse struct {
  5736  	// Etag: Etag of this resource.
  5737  	Etag string `json:"etag,omitempty"`
  5738  	// EventId: Serialized EventId of the request which produced this response.
  5739  	EventId string `json:"eventId,omitempty"`
  5740  	// Items: A list of pricing levels offered by a creator to the fans.
  5741  	Items []*MembershipsLevel `json:"items,omitempty"`
  5742  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5743  	// "youtube#membershipsLevelListResponse".
  5744  	Kind string `json:"kind,omitempty"`
  5745  	// VisitorId: The visitorId identifies the visitor.
  5746  	VisitorId string `json:"visitorId,omitempty"`
  5747  
  5748  	// ServerResponse contains the HTTP response code and headers from the server.
  5749  	googleapi.ServerResponse `json:"-"`
  5750  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  5751  	// include in API requests. By default, fields with empty or default values are
  5752  	// omitted from API requests. See
  5753  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5754  	// details.
  5755  	ForceSendFields []string `json:"-"`
  5756  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  5757  	// with the JSON null value. By default, fields with empty values are omitted
  5758  	// from API requests. See
  5759  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5760  	NullFields []string `json:"-"`
  5761  }
  5762  
  5763  func (s *MembershipsLevelListResponse) MarshalJSON() ([]byte, error) {
  5764  	type NoMethod MembershipsLevelListResponse
  5765  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5766  }
  5767  
  5768  type MembershipsLevelSnippet struct {
  5769  	// CreatorChannelId: The id of the channel that's offering channel memberships.
  5770  	CreatorChannelId string `json:"creatorChannelId,omitempty"`
  5771  	// LevelDetails: Details about the pricing level.
  5772  	LevelDetails *LevelDetails `json:"levelDetails,omitempty"`
  5773  	// ForceSendFields is a list of field names (e.g. "CreatorChannelId") to
  5774  	// unconditionally include in API requests. By default, fields with empty or
  5775  	// default values are omitted from API requests. See
  5776  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5777  	// details.
  5778  	ForceSendFields []string `json:"-"`
  5779  	// NullFields is a list of field names (e.g. "CreatorChannelId") to include in
  5780  	// API requests with the JSON null value. By default, fields with empty values
  5781  	// are omitted from API requests. See
  5782  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5783  	NullFields []string `json:"-"`
  5784  }
  5785  
  5786  func (s *MembershipsLevelSnippet) MarshalJSON() ([]byte, error) {
  5787  	type NoMethod MembershipsLevelSnippet
  5788  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5789  }
  5790  
  5791  // MonitorStreamInfo: Settings and Info of the monitor stream
  5792  type MonitorStreamInfo struct {
  5793  	// BroadcastStreamDelayMs: If you have set the enableMonitorStream property to
  5794  	// true, then this property determines the length of the live broadcast delay.
  5795  	BroadcastStreamDelayMs int64 `json:"broadcastStreamDelayMs,omitempty"`
  5796  	// EmbedHtml: HTML code that embeds a player that plays the monitor stream.
  5797  	EmbedHtml string `json:"embedHtml,omitempty"`
  5798  	// EnableMonitorStream: This value determines whether the monitor stream is
  5799  	// enabled for the broadcast. If the monitor stream is enabled, then YouTube
  5800  	// will broadcast the event content on a special stream intended only for the
  5801  	// broadcaster's consumption. The broadcaster can use the stream to review the
  5802  	// event content and also to identify the optimal times to insert cuepoints.
  5803  	// You need to set this value to true if you intend to have a broadcast delay
  5804  	// for your event. *Note:* This property cannot be updated once the broadcast
  5805  	// is in the testing or live state.
  5806  	EnableMonitorStream *bool `json:"enableMonitorStream,omitempty"`
  5807  	// ForceSendFields is a list of field names (e.g. "BroadcastStreamDelayMs") to
  5808  	// unconditionally include in API requests. By default, fields with empty or
  5809  	// default values are omitted from API requests. See
  5810  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5811  	// details.
  5812  	ForceSendFields []string `json:"-"`
  5813  	// NullFields is a list of field names (e.g. "BroadcastStreamDelayMs") to
  5814  	// include in API requests with the JSON null value. By default, fields with
  5815  	// empty values are omitted from API requests. See
  5816  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5817  	NullFields []string `json:"-"`
  5818  }
  5819  
  5820  func (s *MonitorStreamInfo) MarshalJSON() ([]byte, error) {
  5821  	type NoMethod MonitorStreamInfo
  5822  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5823  }
  5824  
  5825  // PageInfo: Paging details for lists of resources, including total number of
  5826  // items available and number of resources returned in a single page.
  5827  type PageInfo struct {
  5828  	// ResultsPerPage: The number of results included in the API response.
  5829  	ResultsPerPage int64 `json:"resultsPerPage,omitempty"`
  5830  	// TotalResults: The total number of results in the result set.
  5831  	TotalResults int64 `json:"totalResults,omitempty"`
  5832  	// ForceSendFields is a list of field names (e.g. "ResultsPerPage") to
  5833  	// unconditionally include in API requests. By default, fields with empty or
  5834  	// default values are omitted from API requests. See
  5835  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5836  	// details.
  5837  	ForceSendFields []string `json:"-"`
  5838  	// NullFields is a list of field names (e.g. "ResultsPerPage") to include in
  5839  	// API requests with the JSON null value. By default, fields with empty values
  5840  	// are omitted from API requests. See
  5841  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5842  	NullFields []string `json:"-"`
  5843  }
  5844  
  5845  func (s *PageInfo) MarshalJSON() ([]byte, error) {
  5846  	type NoMethod PageInfo
  5847  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5848  }
  5849  
  5850  // Playlist: A *playlist* resource represents a YouTube playlist. A playlist is
  5851  // a collection of videos that can be viewed sequentially and shared with other
  5852  // users. A playlist can contain up to 200 videos, and YouTube does not limit
  5853  // the number of playlists that each user creates. By default, playlists are
  5854  // publicly visible to other users, but playlists can be public or private.
  5855  // YouTube also uses playlists to identify special collections of videos for a
  5856  // channel, such as: - uploaded videos - favorite videos - positively rated
  5857  // (liked) videos - watch history - watch later To be more specific, these
  5858  // lists are associated with a channel, which is a collection of a person,
  5859  // group, or company's videos, playlists, and other YouTube information. You
  5860  // can retrieve the playlist IDs for each of these lists from the channel
  5861  // resource for a given channel. You can then use the playlistItems.list method
  5862  // to retrieve any of those lists. You can also add or remove items from those
  5863  // lists by calling the playlistItems.insert and playlistItems.delete methods.
  5864  type Playlist struct {
  5865  	// ContentDetails: The contentDetails object contains information like video
  5866  	// count.
  5867  	ContentDetails *PlaylistContentDetails `json:"contentDetails,omitempty"`
  5868  	// Etag: Etag of this resource.
  5869  	Etag string `json:"etag,omitempty"`
  5870  	// Id: The ID that YouTube uses to uniquely identify the playlist.
  5871  	Id string `json:"id,omitempty"`
  5872  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5873  	// "youtube#playlist".
  5874  	Kind string `json:"kind,omitempty"`
  5875  	// Localizations: Localizations for different languages
  5876  	Localizations map[string]PlaylistLocalization `json:"localizations,omitempty"`
  5877  	// Player: The player object contains information that you would use to play
  5878  	// the playlist in an embedded player.
  5879  	Player *PlaylistPlayer `json:"player,omitempty"`
  5880  	// Snippet: The snippet object contains basic details about the playlist, such
  5881  	// as its title and description.
  5882  	Snippet *PlaylistSnippet `json:"snippet,omitempty"`
  5883  	// Status: The status object contains status information for the playlist.
  5884  	Status *PlaylistStatus `json:"status,omitempty"`
  5885  
  5886  	// ServerResponse contains the HTTP response code and headers from the server.
  5887  	googleapi.ServerResponse `json:"-"`
  5888  	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
  5889  	// unconditionally include in API requests. By default, fields with empty or
  5890  	// default values are omitted from API requests. See
  5891  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5892  	// details.
  5893  	ForceSendFields []string `json:"-"`
  5894  	// NullFields is a list of field names (e.g. "ContentDetails") to include in
  5895  	// API requests with the JSON null value. By default, fields with empty values
  5896  	// are omitted from API requests. See
  5897  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5898  	NullFields []string `json:"-"`
  5899  }
  5900  
  5901  func (s *Playlist) MarshalJSON() ([]byte, error) {
  5902  	type NoMethod Playlist
  5903  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5904  }
  5905  
  5906  type PlaylistContentDetails struct {
  5907  	// ItemCount: The number of videos in the playlist.
  5908  	ItemCount int64 `json:"itemCount,omitempty"`
  5909  	// ForceSendFields is a list of field names (e.g. "ItemCount") to
  5910  	// unconditionally include in API requests. By default, fields with empty or
  5911  	// default values are omitted from API requests. See
  5912  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5913  	// details.
  5914  	ForceSendFields []string `json:"-"`
  5915  	// NullFields is a list of field names (e.g. "ItemCount") to include in API
  5916  	// requests with the JSON null value. By default, fields with empty values are
  5917  	// omitted from API requests. See
  5918  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5919  	NullFields []string `json:"-"`
  5920  }
  5921  
  5922  func (s *PlaylistContentDetails) MarshalJSON() ([]byte, error) {
  5923  	type NoMethod PlaylistContentDetails
  5924  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5925  }
  5926  
  5927  type PlaylistImage struct {
  5928  	// Id: Identifies this resource (playlist id and image type).
  5929  	Id string `json:"id,omitempty"`
  5930  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5931  	// "youtube#playlistImages".
  5932  	Kind    string                `json:"kind,omitempty"`
  5933  	Snippet *PlaylistImageSnippet `json:"snippet,omitempty"`
  5934  
  5935  	// ServerResponse contains the HTTP response code and headers from the server.
  5936  	googleapi.ServerResponse `json:"-"`
  5937  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  5938  	// include in API requests. By default, fields with empty or default values are
  5939  	// omitted from API requests. See
  5940  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5941  	// details.
  5942  	ForceSendFields []string `json:"-"`
  5943  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  5944  	// with the JSON null value. By default, fields with empty values are omitted
  5945  	// from API requests. See
  5946  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5947  	NullFields []string `json:"-"`
  5948  }
  5949  
  5950  func (s *PlaylistImage) MarshalJSON() ([]byte, error) {
  5951  	type NoMethod PlaylistImage
  5952  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5953  }
  5954  
  5955  type PlaylistImageListResponse struct {
  5956  	Items []*PlaylistImage `json:"items,omitempty"`
  5957  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  5958  	// "youtube#playlistImageListResponse".
  5959  	Kind string `json:"kind,omitempty"`
  5960  	// NextPageToken: The token that can be used as the value of the pageToken
  5961  	// parameter to retrieve the next page in the result set.
  5962  	NextPageToken string `json:"nextPageToken,omitempty"`
  5963  	// PageInfo: General pagination information.
  5964  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  5965  	// PrevPageToken: The token that can be used as the value of the pageToken
  5966  	// parameter to retrieve the previous page in the result set.
  5967  	PrevPageToken string `json:"prevPageToken,omitempty"`
  5968  
  5969  	// ServerResponse contains the HTTP response code and headers from the server.
  5970  	googleapi.ServerResponse `json:"-"`
  5971  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  5972  	// include in API requests. By default, fields with empty or default values are
  5973  	// omitted from API requests. See
  5974  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5975  	// details.
  5976  	ForceSendFields []string `json:"-"`
  5977  	// NullFields is a list of field names (e.g. "Items") to include in API
  5978  	// requests with the JSON null value. By default, fields with empty values are
  5979  	// omitted from API requests. See
  5980  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5981  	NullFields []string `json:"-"`
  5982  }
  5983  
  5984  func (s *PlaylistImageListResponse) MarshalJSON() ([]byte, error) {
  5985  	type NoMethod PlaylistImageListResponse
  5986  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5987  }
  5988  
  5989  // PlaylistImageSnippet: A *playlistImage* resource identifies another
  5990  // resource, such as a image, that is associated with a playlist. In addition,
  5991  // the playlistImage resource contains details about the included resource that
  5992  // pertain specifically to how that resource is used in that playlist. YouTube
  5993  // uses playlists to identify special collections of videos for a channel, such
  5994  // as: - uploaded videos - favorite videos - positively rated (liked) videos -
  5995  // watch history To be more specific, these lists are associated with a
  5996  // channel, which is a collection of a person, group, or company's videos,
  5997  // playlists, and other YouTube information. You can retrieve the playlist IDs
  5998  // for each of these lists from the channel resource for a given channel. You
  5999  // can then use the playlistImages.list method to retrieve image data for any
  6000  // of those playlists. You can also add or remove images from those lists by
  6001  // calling the playlistImages.insert and playlistImages.delete methods.
  6002  type PlaylistImageSnippet struct {
  6003  	// Height: The image height.
  6004  	Height int64 `json:"height,omitempty"`
  6005  	// PlaylistId: The Playlist ID of the playlist this image is associated with.
  6006  	PlaylistId string `json:"playlistId,omitempty"`
  6007  	// Type: The image type.
  6008  	//
  6009  	// Possible values:
  6010  	//   "hero" - The main image that will be used for this playlist.
  6011  	Type string `json:"type,omitempty"`
  6012  	// Width: The image width.
  6013  	Width int64 `json:"width,omitempty"`
  6014  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
  6015  	// include in API requests. By default, fields with empty or default values are
  6016  	// omitted from API requests. See
  6017  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6018  	// details.
  6019  	ForceSendFields []string `json:"-"`
  6020  	// NullFields is a list of field names (e.g. "Height") to include in API
  6021  	// requests with the JSON null value. By default, fields with empty values are
  6022  	// omitted from API requests. See
  6023  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6024  	NullFields []string `json:"-"`
  6025  }
  6026  
  6027  func (s *PlaylistImageSnippet) MarshalJSON() ([]byte, error) {
  6028  	type NoMethod PlaylistImageSnippet
  6029  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6030  }
  6031  
  6032  // PlaylistItem: A *playlistItem* resource identifies another resource, such as
  6033  // a video, that is included in a playlist. In addition, the playlistItem
  6034  // resource contains details about the included resource that pertain
  6035  // specifically to how that resource is used in that playlist. YouTube uses
  6036  // playlists to identify special collections of videos for a channel, such as:
  6037  // - uploaded videos - favorite videos - positively rated (liked) videos -
  6038  // watch history - watch later To be more specific, these lists are associated
  6039  // with a channel, which is a collection of a person, group, or company's
  6040  // videos, playlists, and other YouTube information. You can retrieve the
  6041  // playlist IDs for each of these lists from the channel resource for a given
  6042  // channel. You can then use the playlistItems.list method to retrieve any of
  6043  // those lists. You can also add or remove items from those lists by calling
  6044  // the playlistItems.insert and playlistItems.delete methods. For example, if a
  6045  // user gives a positive rating to a video, you would insert that video into
  6046  // the liked videos playlist for that user's channel.
  6047  type PlaylistItem struct {
  6048  	// ContentDetails: The contentDetails object is included in the resource if the
  6049  	// included item is a YouTube video. The object contains additional information
  6050  	// about the video.
  6051  	ContentDetails *PlaylistItemContentDetails `json:"contentDetails,omitempty"`
  6052  	// Etag: Etag of this resource.
  6053  	Etag string `json:"etag,omitempty"`
  6054  	// Id: The ID that YouTube uses to uniquely identify the playlist item.
  6055  	Id string `json:"id,omitempty"`
  6056  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6057  	// "youtube#playlistItem".
  6058  	Kind string `json:"kind,omitempty"`
  6059  	// Snippet: The snippet object contains basic details about the playlist item,
  6060  	// such as its title and position in the playlist.
  6061  	Snippet *PlaylistItemSnippet `json:"snippet,omitempty"`
  6062  	// Status: The status object contains information about the playlist item's
  6063  	// privacy status.
  6064  	Status *PlaylistItemStatus `json:"status,omitempty"`
  6065  
  6066  	// ServerResponse contains the HTTP response code and headers from the server.
  6067  	googleapi.ServerResponse `json:"-"`
  6068  	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
  6069  	// unconditionally include in API requests. By default, fields with empty or
  6070  	// default values are omitted from API requests. See
  6071  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6072  	// details.
  6073  	ForceSendFields []string `json:"-"`
  6074  	// NullFields is a list of field names (e.g. "ContentDetails") to include in
  6075  	// API requests with the JSON null value. By default, fields with empty values
  6076  	// are omitted from API requests. See
  6077  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6078  	NullFields []string `json:"-"`
  6079  }
  6080  
  6081  func (s *PlaylistItem) MarshalJSON() ([]byte, error) {
  6082  	type NoMethod PlaylistItem
  6083  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6084  }
  6085  
  6086  type PlaylistItemContentDetails struct {
  6087  	// EndAt: The time, measured in seconds from the start of the video, when the
  6088  	// video should stop playing. (The playlist owner can specify the times when
  6089  	// the video should start and stop playing when the video is played in the
  6090  	// context of the playlist.) By default, assume that the video.endTime is the
  6091  	// end of the video.
  6092  	EndAt string `json:"endAt,omitempty"`
  6093  	// Note: A user-generated note for this item.
  6094  	Note string `json:"note,omitempty"`
  6095  	// StartAt: The time, measured in seconds from the start of the video, when the
  6096  	// video should start playing. (The playlist owner can specify the times when
  6097  	// the video should start and stop playing when the video is played in the
  6098  	// context of the playlist.) The default value is 0.
  6099  	StartAt string `json:"startAt,omitempty"`
  6100  	// VideoId: The ID that YouTube uses to uniquely identify a video. To retrieve
  6101  	// the video resource, set the id query parameter to this value in your API
  6102  	// request.
  6103  	VideoId string `json:"videoId,omitempty"`
  6104  	// VideoPublishedAt: The date and time that the video was published to YouTube.
  6105  	VideoPublishedAt string `json:"videoPublishedAt,omitempty"`
  6106  	// ForceSendFields is a list of field names (e.g. "EndAt") to unconditionally
  6107  	// include in API requests. By default, fields with empty or default values are
  6108  	// omitted from API requests. See
  6109  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6110  	// details.
  6111  	ForceSendFields []string `json:"-"`
  6112  	// NullFields is a list of field names (e.g. "EndAt") to include in API
  6113  	// requests with the JSON null value. By default, fields with empty values are
  6114  	// omitted from API requests. See
  6115  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6116  	NullFields []string `json:"-"`
  6117  }
  6118  
  6119  func (s *PlaylistItemContentDetails) MarshalJSON() ([]byte, error) {
  6120  	type NoMethod PlaylistItemContentDetails
  6121  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6122  }
  6123  
  6124  type PlaylistItemListResponse struct {
  6125  	Etag string `json:"etag,omitempty"`
  6126  	// EventId: Serialized EventId of the request which produced this response.
  6127  	EventId string `json:"eventId,omitempty"`
  6128  	// Items: A list of playlist items that match the request criteria.
  6129  	Items []*PlaylistItem `json:"items,omitempty"`
  6130  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6131  	// "youtube#playlistItemListResponse". Etag of this resource.
  6132  	Kind string `json:"kind,omitempty"`
  6133  	// NextPageToken: The token that can be used as the value of the pageToken
  6134  	// parameter to retrieve the next page in the result set.
  6135  	NextPageToken string `json:"nextPageToken,omitempty"`
  6136  	// PageInfo: General pagination information.
  6137  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  6138  	// PrevPageToken: The token that can be used as the value of the pageToken
  6139  	// parameter to retrieve the previous page in the result set.
  6140  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  6141  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  6142  	// VisitorId: The visitorId identifies the visitor.
  6143  	VisitorId string `json:"visitorId,omitempty"`
  6144  
  6145  	// ServerResponse contains the HTTP response code and headers from the server.
  6146  	googleapi.ServerResponse `json:"-"`
  6147  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6148  	// include in API requests. By default, fields with empty or default values are
  6149  	// omitted from API requests. See
  6150  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6151  	// details.
  6152  	ForceSendFields []string `json:"-"`
  6153  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6154  	// with the JSON null value. By default, fields with empty values are omitted
  6155  	// from API requests. See
  6156  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6157  	NullFields []string `json:"-"`
  6158  }
  6159  
  6160  func (s *PlaylistItemListResponse) MarshalJSON() ([]byte, error) {
  6161  	type NoMethod PlaylistItemListResponse
  6162  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6163  }
  6164  
  6165  // PlaylistItemSnippet: Basic details about a playlist, including title,
  6166  // description and thumbnails. Basic details of a YouTube Playlist item
  6167  // provided by the author. Next ID: 15
  6168  type PlaylistItemSnippet struct {
  6169  	// ChannelId: The ID that YouTube uses to uniquely identify the user that added
  6170  	// the item to the playlist.
  6171  	ChannelId string `json:"channelId,omitempty"`
  6172  	// ChannelTitle: Channel title for the channel that the playlist item belongs
  6173  	// to.
  6174  	ChannelTitle string `json:"channelTitle,omitempty"`
  6175  	// Description: The item's description.
  6176  	Description string `json:"description,omitempty"`
  6177  	// PlaylistId: The ID that YouTube uses to uniquely identify thGe playlist that
  6178  	// the playlist item is in.
  6179  	PlaylistId string `json:"playlistId,omitempty"`
  6180  	// Position: The order in which the item appears in the playlist. The value
  6181  	// uses a zero-based index, so the first item has a position of 0, the second
  6182  	// item has a position of 1, and so forth.
  6183  	Position int64 `json:"position,omitempty"`
  6184  	// PublishedAt: The date and time that the item was added to the playlist.
  6185  	PublishedAt string `json:"publishedAt,omitempty"`
  6186  	// ResourceId: The id object contains information that can be used to uniquely
  6187  	// identify the resource that is included in the playlist as the playlist item.
  6188  	ResourceId *ResourceId `json:"resourceId,omitempty"`
  6189  	// Thumbnails: A map of thumbnail images associated with the playlist item. For
  6190  	// each object in the map, the key is the name of the thumbnail image, and the
  6191  	// value is an object that contains other information about the thumbnail.
  6192  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  6193  	// Title: The item's title.
  6194  	Title string `json:"title,omitempty"`
  6195  	// VideoOwnerChannelId: Channel id for the channel this video belongs to.
  6196  	VideoOwnerChannelId string `json:"videoOwnerChannelId,omitempty"`
  6197  	// VideoOwnerChannelTitle: Channel title for the channel this video belongs to.
  6198  	VideoOwnerChannelTitle string `json:"videoOwnerChannelTitle,omitempty"`
  6199  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  6200  	// unconditionally include in API requests. By default, fields with empty or
  6201  	// default values are omitted from API requests. See
  6202  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6203  	// details.
  6204  	ForceSendFields []string `json:"-"`
  6205  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  6206  	// requests with the JSON null value. By default, fields with empty values are
  6207  	// omitted from API requests. See
  6208  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6209  	NullFields []string `json:"-"`
  6210  }
  6211  
  6212  func (s *PlaylistItemSnippet) MarshalJSON() ([]byte, error) {
  6213  	type NoMethod PlaylistItemSnippet
  6214  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6215  }
  6216  
  6217  // PlaylistItemStatus: Information about the playlist item's privacy status.
  6218  type PlaylistItemStatus struct {
  6219  	// PrivacyStatus: This resource's privacy status.
  6220  	//
  6221  	// Possible values:
  6222  	//   "public"
  6223  	//   "unlisted"
  6224  	//   "private"
  6225  	PrivacyStatus string `json:"privacyStatus,omitempty"`
  6226  	// ForceSendFields is a list of field names (e.g. "PrivacyStatus") to
  6227  	// unconditionally include in API requests. By default, fields with empty or
  6228  	// default values are omitted from API requests. See
  6229  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6230  	// details.
  6231  	ForceSendFields []string `json:"-"`
  6232  	// NullFields is a list of field names (e.g. "PrivacyStatus") to include in API
  6233  	// requests with the JSON null value. By default, fields with empty values are
  6234  	// omitted from API requests. See
  6235  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6236  	NullFields []string `json:"-"`
  6237  }
  6238  
  6239  func (s *PlaylistItemStatus) MarshalJSON() ([]byte, error) {
  6240  	type NoMethod PlaylistItemStatus
  6241  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6242  }
  6243  
  6244  type PlaylistListResponse struct {
  6245  	// Etag: Etag of this resource.
  6246  	Etag string `json:"etag,omitempty"`
  6247  	// EventId: Serialized EventId of the request which produced this response.
  6248  	EventId string `json:"eventId,omitempty"`
  6249  	// Items: A list of playlists that match the request criteria
  6250  	Items []*Playlist `json:"items,omitempty"`
  6251  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6252  	// "youtube#playlistListResponse".
  6253  	Kind string `json:"kind,omitempty"`
  6254  	// NextPageToken: The token that can be used as the value of the pageToken
  6255  	// parameter to retrieve the next page in the result set.
  6256  	NextPageToken string `json:"nextPageToken,omitempty"`
  6257  	// PageInfo: General pagination information.
  6258  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  6259  	// PrevPageToken: The token that can be used as the value of the pageToken
  6260  	// parameter to retrieve the previous page in the result set.
  6261  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  6262  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  6263  	// VisitorId: The visitorId identifies the visitor.
  6264  	VisitorId string `json:"visitorId,omitempty"`
  6265  
  6266  	// ServerResponse contains the HTTP response code and headers from the server.
  6267  	googleapi.ServerResponse `json:"-"`
  6268  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6269  	// include in API requests. By default, fields with empty or default values are
  6270  	// omitted from API requests. See
  6271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6272  	// details.
  6273  	ForceSendFields []string `json:"-"`
  6274  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6275  	// with the JSON null value. By default, fields with empty values are omitted
  6276  	// from API requests. See
  6277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6278  	NullFields []string `json:"-"`
  6279  }
  6280  
  6281  func (s *PlaylistListResponse) MarshalJSON() ([]byte, error) {
  6282  	type NoMethod PlaylistListResponse
  6283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6284  }
  6285  
  6286  // PlaylistLocalization: Playlist localization setting
  6287  type PlaylistLocalization struct {
  6288  	// Description: The localized strings for playlist's description.
  6289  	Description string `json:"description,omitempty"`
  6290  	// Title: The localized strings for playlist's title.
  6291  	Title string `json:"title,omitempty"`
  6292  	// ForceSendFields is a list of field names (e.g. "Description") to
  6293  	// unconditionally include in API requests. By default, fields with empty or
  6294  	// default values are omitted from API requests. See
  6295  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6296  	// details.
  6297  	ForceSendFields []string `json:"-"`
  6298  	// NullFields is a list of field names (e.g. "Description") to include in API
  6299  	// requests with the JSON null value. By default, fields with empty values are
  6300  	// omitted from API requests. See
  6301  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6302  	NullFields []string `json:"-"`
  6303  }
  6304  
  6305  func (s *PlaylistLocalization) MarshalJSON() ([]byte, error) {
  6306  	type NoMethod PlaylistLocalization
  6307  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6308  }
  6309  
  6310  type PlaylistPlayer struct {
  6311  	// EmbedHtml: An <iframe> tag that embeds a player that will play the playlist.
  6312  	EmbedHtml string `json:"embedHtml,omitempty"`
  6313  	// ForceSendFields is a list of field names (e.g. "EmbedHtml") to
  6314  	// unconditionally include in API requests. By default, fields with empty or
  6315  	// default values are omitted from API requests. See
  6316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6317  	// details.
  6318  	ForceSendFields []string `json:"-"`
  6319  	// NullFields is a list of field names (e.g. "EmbedHtml") to include in API
  6320  	// requests with the JSON null value. By default, fields with empty values are
  6321  	// omitted from API requests. See
  6322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6323  	NullFields []string `json:"-"`
  6324  }
  6325  
  6326  func (s *PlaylistPlayer) MarshalJSON() ([]byte, error) {
  6327  	type NoMethod PlaylistPlayer
  6328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6329  }
  6330  
  6331  // PlaylistSnippet: Basic details about a playlist, including title,
  6332  // description and thumbnails.
  6333  type PlaylistSnippet struct {
  6334  	// ChannelId: The ID that YouTube uses to uniquely identify the channel that
  6335  	// published the playlist.
  6336  	ChannelId string `json:"channelId,omitempty"`
  6337  	// ChannelTitle: The channel title of the channel that the video belongs to.
  6338  	ChannelTitle string `json:"channelTitle,omitempty"`
  6339  	// DefaultLanguage: The language of the playlist's default title and
  6340  	// description.
  6341  	DefaultLanguage string `json:"defaultLanguage,omitempty"`
  6342  	// Description: The playlist's description.
  6343  	Description string `json:"description,omitempty"`
  6344  	// Localized: Localized title and description, read-only.
  6345  	Localized *PlaylistLocalization `json:"localized,omitempty"`
  6346  	// PublishedAt: The date and time that the playlist was created.
  6347  	PublishedAt string `json:"publishedAt,omitempty"`
  6348  	// Tags: Keyword tags associated with the playlist.
  6349  	Tags []string `json:"tags,omitempty"`
  6350  	// ThumbnailVideoId: Note: if the playlist has a custom thumbnail, this field
  6351  	// will not be populated. The video id selected by the user that will be used
  6352  	// as the thumbnail of this playlist. This field defaults to the first publicly
  6353  	// viewable video in the playlist, if: 1. The user has never selected a video
  6354  	// to be the thumbnail of the playlist. 2. The user selects a video to be the
  6355  	// thumbnail, and then removes that video from the playlist. 3. The user
  6356  	// selects a non-owned video to be the thumbnail, but that video becomes
  6357  	// private, or gets deleted.
  6358  	ThumbnailVideoId string `json:"thumbnailVideoId,omitempty"`
  6359  	// Thumbnails: A map of thumbnail images associated with the playlist. For each
  6360  	// object in the map, the key is the name of the thumbnail image, and the value
  6361  	// is an object that contains other information about the thumbnail.
  6362  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  6363  	// Title: The playlist's title.
  6364  	Title string `json:"title,omitempty"`
  6365  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  6366  	// unconditionally include in API requests. By default, fields with empty or
  6367  	// default values are omitted from API requests. See
  6368  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6369  	// details.
  6370  	ForceSendFields []string `json:"-"`
  6371  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  6372  	// requests with the JSON null value. By default, fields with empty values are
  6373  	// omitted from API requests. See
  6374  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6375  	NullFields []string `json:"-"`
  6376  }
  6377  
  6378  func (s *PlaylistSnippet) MarshalJSON() ([]byte, error) {
  6379  	type NoMethod PlaylistSnippet
  6380  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6381  }
  6382  
  6383  type PlaylistStatus struct {
  6384  	// PrivacyStatus: The playlist's privacy status.
  6385  	//
  6386  	// Possible values:
  6387  	//   "public"
  6388  	//   "unlisted"
  6389  	//   "private"
  6390  	PrivacyStatus string `json:"privacyStatus,omitempty"`
  6391  	// ForceSendFields is a list of field names (e.g. "PrivacyStatus") to
  6392  	// unconditionally include in API requests. By default, fields with empty or
  6393  	// default values are omitted from API requests. See
  6394  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6395  	// details.
  6396  	ForceSendFields []string `json:"-"`
  6397  	// NullFields is a list of field names (e.g. "PrivacyStatus") to include in API
  6398  	// requests with the JSON null value. By default, fields with empty values are
  6399  	// omitted from API requests. See
  6400  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6401  	NullFields []string `json:"-"`
  6402  }
  6403  
  6404  func (s *PlaylistStatus) MarshalJSON() ([]byte, error) {
  6405  	type NoMethod PlaylistStatus
  6406  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6407  }
  6408  
  6409  // PropertyValue: A pair Property / Value.
  6410  type PropertyValue struct {
  6411  	// Property: A property.
  6412  	Property string `json:"property,omitempty"`
  6413  	// Value: The property's value.
  6414  	Value string `json:"value,omitempty"`
  6415  	// ForceSendFields is a list of field names (e.g. "Property") to
  6416  	// unconditionally include in API requests. By default, fields with empty or
  6417  	// default values are omitted from API requests. See
  6418  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6419  	// details.
  6420  	ForceSendFields []string `json:"-"`
  6421  	// NullFields is a list of field names (e.g. "Property") to include in API
  6422  	// requests with the JSON null value. By default, fields with empty values are
  6423  	// omitted from API requests. See
  6424  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6425  	NullFields []string `json:"-"`
  6426  }
  6427  
  6428  func (s *PropertyValue) MarshalJSON() ([]byte, error) {
  6429  	type NoMethod PropertyValue
  6430  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6431  }
  6432  
  6433  type RelatedEntity struct {
  6434  	Entity *Entity `json:"entity,omitempty"`
  6435  	// ForceSendFields is a list of field names (e.g. "Entity") to unconditionally
  6436  	// include in API requests. By default, fields with empty or default values are
  6437  	// omitted from API requests. See
  6438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6439  	// details.
  6440  	ForceSendFields []string `json:"-"`
  6441  	// NullFields is a list of field names (e.g. "Entity") to include in API
  6442  	// requests with the JSON null value. By default, fields with empty values are
  6443  	// omitted from API requests. See
  6444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6445  	NullFields []string `json:"-"`
  6446  }
  6447  
  6448  func (s *RelatedEntity) MarshalJSON() ([]byte, error) {
  6449  	type NoMethod RelatedEntity
  6450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6451  }
  6452  
  6453  // ResourceId: A resource id is a generic reference that points to another
  6454  // YouTube resource.
  6455  type ResourceId struct {
  6456  	// ChannelId: The ID that YouTube uses to uniquely identify the referred
  6457  	// resource, if that resource is a channel. This property is only present if
  6458  	// the resourceId.kind value is youtube#channel.
  6459  	ChannelId string `json:"channelId,omitempty"`
  6460  	// Kind: The type of the API resource.
  6461  	Kind string `json:"kind,omitempty"`
  6462  	// PlaylistId: The ID that YouTube uses to uniquely identify the referred
  6463  	// resource, if that resource is a playlist. This property is only present if
  6464  	// the resourceId.kind value is youtube#playlist.
  6465  	PlaylistId string `json:"playlistId,omitempty"`
  6466  	// VideoId: The ID that YouTube uses to uniquely identify the referred
  6467  	// resource, if that resource is a video. This property is only present if the
  6468  	// resourceId.kind value is youtube#video.
  6469  	VideoId string `json:"videoId,omitempty"`
  6470  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  6471  	// unconditionally include in API requests. By default, fields with empty or
  6472  	// default values are omitted from API requests. See
  6473  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6474  	// details.
  6475  	ForceSendFields []string `json:"-"`
  6476  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  6477  	// requests with the JSON null value. By default, fields with empty values are
  6478  	// omitted from API requests. See
  6479  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6480  	NullFields []string `json:"-"`
  6481  }
  6482  
  6483  func (s *ResourceId) MarshalJSON() ([]byte, error) {
  6484  	type NoMethod ResourceId
  6485  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6486  }
  6487  
  6488  type SearchListResponse struct {
  6489  	// Etag: Etag of this resource.
  6490  	Etag string `json:"etag,omitempty"`
  6491  	// EventId: Serialized EventId of the request which produced this response.
  6492  	EventId string `json:"eventId,omitempty"`
  6493  	// Items: Pagination information for token pagination.
  6494  	Items []*SearchResult `json:"items,omitempty"`
  6495  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6496  	// "youtube#searchListResponse".
  6497  	Kind string `json:"kind,omitempty"`
  6498  	// NextPageToken: The token that can be used as the value of the pageToken
  6499  	// parameter to retrieve the next page in the result set.
  6500  	NextPageToken string `json:"nextPageToken,omitempty"`
  6501  	// PageInfo: General pagination information.
  6502  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  6503  	// PrevPageToken: The token that can be used as the value of the pageToken
  6504  	// parameter to retrieve the previous page in the result set.
  6505  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  6506  	RegionCode      string           `json:"regionCode,omitempty"`
  6507  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  6508  	// VisitorId: The visitorId identifies the visitor.
  6509  	VisitorId string `json:"visitorId,omitempty"`
  6510  
  6511  	// ServerResponse contains the HTTP response code and headers from the server.
  6512  	googleapi.ServerResponse `json:"-"`
  6513  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6514  	// include in API requests. By default, fields with empty or default values are
  6515  	// omitted from API requests. See
  6516  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6517  	// details.
  6518  	ForceSendFields []string `json:"-"`
  6519  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6520  	// with the JSON null value. By default, fields with empty values are omitted
  6521  	// from API requests. See
  6522  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6523  	NullFields []string `json:"-"`
  6524  }
  6525  
  6526  func (s *SearchListResponse) MarshalJSON() ([]byte, error) {
  6527  	type NoMethod SearchListResponse
  6528  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6529  }
  6530  
  6531  // SearchResult: A search result contains information about a YouTube video,
  6532  // channel, or playlist that matches the search parameters specified in an API
  6533  // request. While a search result points to a uniquely identifiable resource,
  6534  // like a video, it does not have its own persistent data.
  6535  type SearchResult struct {
  6536  	// Etag: Etag of this resource.
  6537  	Etag string `json:"etag,omitempty"`
  6538  	// Id: The id object contains information that can be used to uniquely identify
  6539  	// the resource that matches the search request.
  6540  	Id *ResourceId `json:"id,omitempty"`
  6541  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6542  	// "youtube#searchResult".
  6543  	Kind string `json:"kind,omitempty"`
  6544  	// Snippet: The snippet object contains basic details about a search result,
  6545  	// such as its title or description. For example, if the search result is a
  6546  	// video, then the title will be the video's title and the description will be
  6547  	// the video's description.
  6548  	Snippet *SearchResultSnippet `json:"snippet,omitempty"`
  6549  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6550  	// include in API requests. By default, fields with empty or default values are
  6551  	// omitted from API requests. See
  6552  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6553  	// details.
  6554  	ForceSendFields []string `json:"-"`
  6555  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6556  	// with the JSON null value. By default, fields with empty values are omitted
  6557  	// from API requests. See
  6558  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6559  	NullFields []string `json:"-"`
  6560  }
  6561  
  6562  func (s *SearchResult) MarshalJSON() ([]byte, error) {
  6563  	type NoMethod SearchResult
  6564  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6565  }
  6566  
  6567  // SearchResultSnippet: Basic details about a search result, including title,
  6568  // description and thumbnails of the item referenced by the search result.
  6569  type SearchResultSnippet struct {
  6570  	// ChannelId: The value that YouTube uses to uniquely identify the channel that
  6571  	// published the resource that the search result identifies.
  6572  	ChannelId string `json:"channelId,omitempty"`
  6573  	// ChannelTitle: The title of the channel that published the resource that the
  6574  	// search result identifies.
  6575  	ChannelTitle string `json:"channelTitle,omitempty"`
  6576  	// Description: A description of the search result.
  6577  	Description string `json:"description,omitempty"`
  6578  	// LiveBroadcastContent: It indicates if the resource (video or channel) has
  6579  	// upcoming/active live broadcast content. Or it's "none" if there is not any
  6580  	// upcoming/active live broadcasts.
  6581  	//
  6582  	// Possible values:
  6583  	//   "none"
  6584  	//   "upcoming" - The live broadcast is upcoming.
  6585  	//   "live" - The live broadcast is active.
  6586  	//   "completed" - The live broadcast has been completed.
  6587  	LiveBroadcastContent string `json:"liveBroadcastContent,omitempty"`
  6588  	// PublishedAt: The creation date and time of the resource that the search
  6589  	// result identifies.
  6590  	PublishedAt string `json:"publishedAt,omitempty"`
  6591  	// Thumbnails: A map of thumbnail images associated with the search result. For
  6592  	// each object in the map, the key is the name of the thumbnail image, and the
  6593  	// value is an object that contains other information about the thumbnail.
  6594  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  6595  	// Title: The title of the search result.
  6596  	Title string `json:"title,omitempty"`
  6597  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  6598  	// unconditionally include in API requests. By default, fields with empty or
  6599  	// default values are omitted from API requests. See
  6600  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6601  	// details.
  6602  	ForceSendFields []string `json:"-"`
  6603  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  6604  	// requests with the JSON null value. By default, fields with empty values are
  6605  	// omitted from API requests. See
  6606  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6607  	NullFields []string `json:"-"`
  6608  }
  6609  
  6610  func (s *SearchResultSnippet) MarshalJSON() ([]byte, error) {
  6611  	type NoMethod SearchResultSnippet
  6612  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6613  }
  6614  
  6615  // Subscription: A *subscription* resource contains information about a YouTube
  6616  // user subscription. A subscription notifies a user when new videos are added
  6617  // to a channel or when another user takes one of several actions on YouTube,
  6618  // such as uploading a video, rating a video, or commenting on a video.
  6619  type Subscription struct {
  6620  	// ContentDetails: The contentDetails object contains basic statistics about
  6621  	// the subscription.
  6622  	ContentDetails *SubscriptionContentDetails `json:"contentDetails,omitempty"`
  6623  	// Etag: Etag of this resource.
  6624  	Etag string `json:"etag,omitempty"`
  6625  	// Id: The ID that YouTube uses to uniquely identify the subscription.
  6626  	Id string `json:"id,omitempty"`
  6627  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6628  	// "youtube#subscription".
  6629  	Kind string `json:"kind,omitempty"`
  6630  	// Snippet: The snippet object contains basic details about the subscription,
  6631  	// including its title and the channel that the user subscribed to.
  6632  	Snippet *SubscriptionSnippet `json:"snippet,omitempty"`
  6633  	// SubscriberSnippet: The subscriberSnippet object contains basic details about
  6634  	// the subscriber.
  6635  	SubscriberSnippet *SubscriptionSubscriberSnippet `json:"subscriberSnippet,omitempty"`
  6636  
  6637  	// ServerResponse contains the HTTP response code and headers from the server.
  6638  	googleapi.ServerResponse `json:"-"`
  6639  	// ForceSendFields is a list of field names (e.g. "ContentDetails") to
  6640  	// unconditionally include in API requests. By default, fields with empty or
  6641  	// default values are omitted from API requests. See
  6642  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6643  	// details.
  6644  	ForceSendFields []string `json:"-"`
  6645  	// NullFields is a list of field names (e.g. "ContentDetails") to include in
  6646  	// API requests with the JSON null value. By default, fields with empty values
  6647  	// are omitted from API requests. See
  6648  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6649  	NullFields []string `json:"-"`
  6650  }
  6651  
  6652  func (s *Subscription) MarshalJSON() ([]byte, error) {
  6653  	type NoMethod Subscription
  6654  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6655  }
  6656  
  6657  // SubscriptionContentDetails: Details about the content to witch a
  6658  // subscription refers.
  6659  type SubscriptionContentDetails struct {
  6660  	// ActivityType: The type of activity this subscription is for (only uploads,
  6661  	// everything).
  6662  	//
  6663  	// Possible values:
  6664  	//   "subscriptionActivityTypeUnspecified"
  6665  	//   "all"
  6666  	//   "uploads"
  6667  	ActivityType string `json:"activityType,omitempty"`
  6668  	// NewItemCount: The number of new items in the subscription since its content
  6669  	// was last read.
  6670  	NewItemCount int64 `json:"newItemCount,omitempty"`
  6671  	// TotalItemCount: The approximate number of items that the subscription points
  6672  	// to.
  6673  	TotalItemCount int64 `json:"totalItemCount,omitempty"`
  6674  	// ForceSendFields is a list of field names (e.g. "ActivityType") to
  6675  	// unconditionally include in API requests. By default, fields with empty or
  6676  	// default values are omitted from API requests. See
  6677  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6678  	// details.
  6679  	ForceSendFields []string `json:"-"`
  6680  	// NullFields is a list of field names (e.g. "ActivityType") to include in API
  6681  	// requests with the JSON null value. By default, fields with empty values are
  6682  	// omitted from API requests. See
  6683  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6684  	NullFields []string `json:"-"`
  6685  }
  6686  
  6687  func (s *SubscriptionContentDetails) MarshalJSON() ([]byte, error) {
  6688  	type NoMethod SubscriptionContentDetails
  6689  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6690  }
  6691  
  6692  type SubscriptionListResponse struct {
  6693  	// Etag: Etag of this resource.
  6694  	Etag string `json:"etag,omitempty"`
  6695  	// EventId: Serialized EventId of the request which produced this response.
  6696  	EventId string `json:"eventId,omitempty"`
  6697  	// Items: A list of subscriptions that match the request criteria.
  6698  	Items []*Subscription `json:"items,omitempty"`
  6699  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6700  	// "youtube#subscriptionListResponse".
  6701  	Kind string `json:"kind,omitempty"`
  6702  	// NextPageToken: The token that can be used as the value of the pageToken
  6703  	// parameter to retrieve the next page in the result set.
  6704  	NextPageToken string    `json:"nextPageToken,omitempty"`
  6705  	PageInfo      *PageInfo `json:"pageInfo,omitempty"`
  6706  	// PrevPageToken: The token that can be used as the value of the pageToken
  6707  	// parameter to retrieve the previous page in the result set.
  6708  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  6709  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  6710  	// VisitorId: The visitorId identifies the visitor.
  6711  	VisitorId string `json:"visitorId,omitempty"`
  6712  
  6713  	// ServerResponse contains the HTTP response code and headers from the server.
  6714  	googleapi.ServerResponse `json:"-"`
  6715  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6716  	// include in API requests. By default, fields with empty or default values are
  6717  	// omitted from API requests. See
  6718  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6719  	// details.
  6720  	ForceSendFields []string `json:"-"`
  6721  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6722  	// with the JSON null value. By default, fields with empty values are omitted
  6723  	// from API requests. See
  6724  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6725  	NullFields []string `json:"-"`
  6726  }
  6727  
  6728  func (s *SubscriptionListResponse) MarshalJSON() ([]byte, error) {
  6729  	type NoMethod SubscriptionListResponse
  6730  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6731  }
  6732  
  6733  // SubscriptionSnippet: Basic details about a subscription, including title,
  6734  // description and thumbnails of the subscribed item.
  6735  type SubscriptionSnippet struct {
  6736  	// ChannelId: The ID that YouTube uses to uniquely identify the subscriber's
  6737  	// channel.
  6738  	ChannelId string `json:"channelId,omitempty"`
  6739  	// ChannelTitle: Channel title for the channel that the subscription belongs
  6740  	// to.
  6741  	ChannelTitle string `json:"channelTitle,omitempty"`
  6742  	// Description: The subscription's details.
  6743  	Description string `json:"description,omitempty"`
  6744  	// PublishedAt: The date and time that the subscription was created.
  6745  	PublishedAt string `json:"publishedAt,omitempty"`
  6746  	// ResourceId: The id object contains information about the channel that the
  6747  	// user subscribed to.
  6748  	ResourceId *ResourceId `json:"resourceId,omitempty"`
  6749  	// Thumbnails: A map of thumbnail images associated with the video. For each
  6750  	// object in the map, the key is the name of the thumbnail image, and the value
  6751  	// is an object that contains other information about the thumbnail.
  6752  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  6753  	// Title: The subscription's title.
  6754  	Title string `json:"title,omitempty"`
  6755  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  6756  	// unconditionally include in API requests. By default, fields with empty or
  6757  	// default values are omitted from API requests. See
  6758  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6759  	// details.
  6760  	ForceSendFields []string `json:"-"`
  6761  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  6762  	// requests with the JSON null value. By default, fields with empty values are
  6763  	// omitted from API requests. See
  6764  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6765  	NullFields []string `json:"-"`
  6766  }
  6767  
  6768  func (s *SubscriptionSnippet) MarshalJSON() ([]byte, error) {
  6769  	type NoMethod SubscriptionSnippet
  6770  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6771  }
  6772  
  6773  // SubscriptionSubscriberSnippet: Basic details about a subscription's
  6774  // subscriber including title, description, channel ID and thumbnails.
  6775  type SubscriptionSubscriberSnippet struct {
  6776  	// ChannelId: The channel ID of the subscriber.
  6777  	ChannelId string `json:"channelId,omitempty"`
  6778  	// Description: The description of the subscriber.
  6779  	Description string `json:"description,omitempty"`
  6780  	// Thumbnails: Thumbnails for this subscriber.
  6781  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  6782  	// Title: The title of the subscriber.
  6783  	Title string `json:"title,omitempty"`
  6784  	// ForceSendFields is a list of field names (e.g. "ChannelId") to
  6785  	// unconditionally include in API requests. By default, fields with empty or
  6786  	// default values are omitted from API requests. See
  6787  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6788  	// details.
  6789  	ForceSendFields []string `json:"-"`
  6790  	// NullFields is a list of field names (e.g. "ChannelId") to include in API
  6791  	// requests with the JSON null value. By default, fields with empty values are
  6792  	// omitted from API requests. See
  6793  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6794  	NullFields []string `json:"-"`
  6795  }
  6796  
  6797  func (s *SubscriptionSubscriberSnippet) MarshalJSON() ([]byte, error) {
  6798  	type NoMethod SubscriptionSubscriberSnippet
  6799  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6800  }
  6801  
  6802  // SuperChatEvent: A `__superChatEvent__` resource represents a Super Chat
  6803  // purchase on a YouTube channel.
  6804  type SuperChatEvent struct {
  6805  	// Etag: Etag of this resource.
  6806  	Etag string `json:"etag,omitempty"`
  6807  	// Id: The ID that YouTube assigns to uniquely identify the Super Chat event.
  6808  	Id string `json:"id,omitempty"`
  6809  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6810  	// "youtube#superChatEvent".
  6811  	Kind string `json:"kind,omitempty"`
  6812  	// Snippet: The `snippet` object contains basic details about the Super Chat
  6813  	// event.
  6814  	Snippet *SuperChatEventSnippet `json:"snippet,omitempty"`
  6815  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6816  	// include in API requests. By default, fields with empty or default values are
  6817  	// omitted from API requests. See
  6818  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6819  	// details.
  6820  	ForceSendFields []string `json:"-"`
  6821  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6822  	// with the JSON null value. By default, fields with empty values are omitted
  6823  	// from API requests. See
  6824  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6825  	NullFields []string `json:"-"`
  6826  }
  6827  
  6828  func (s *SuperChatEvent) MarshalJSON() ([]byte, error) {
  6829  	type NoMethod SuperChatEvent
  6830  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6831  }
  6832  
  6833  type SuperChatEventListResponse struct {
  6834  	// Etag: Etag of this resource.
  6835  	Etag string `json:"etag,omitempty"`
  6836  	// EventId: Serialized EventId of the request which produced this response.
  6837  	EventId string `json:"eventId,omitempty"`
  6838  	// Items: A list of Super Chat purchases that match the request criteria.
  6839  	Items []*SuperChatEvent `json:"items,omitempty"`
  6840  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6841  	// "youtube#superChatEventListResponse".
  6842  	Kind string `json:"kind,omitempty"`
  6843  	// NextPageToken: The token that can be used as the value of the pageToken
  6844  	// parameter to retrieve the next page in the result set.
  6845  	NextPageToken   string           `json:"nextPageToken,omitempty"`
  6846  	PageInfo        *PageInfo        `json:"pageInfo,omitempty"`
  6847  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  6848  	// VisitorId: The visitorId identifies the visitor.
  6849  	VisitorId string `json:"visitorId,omitempty"`
  6850  
  6851  	// ServerResponse contains the HTTP response code and headers from the server.
  6852  	googleapi.ServerResponse `json:"-"`
  6853  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6854  	// include in API requests. By default, fields with empty or default values are
  6855  	// omitted from API requests. See
  6856  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6857  	// details.
  6858  	ForceSendFields []string `json:"-"`
  6859  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6860  	// with the JSON null value. By default, fields with empty values are omitted
  6861  	// from API requests. See
  6862  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6863  	NullFields []string `json:"-"`
  6864  }
  6865  
  6866  func (s *SuperChatEventListResponse) MarshalJSON() ([]byte, error) {
  6867  	type NoMethod SuperChatEventListResponse
  6868  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6869  }
  6870  
  6871  type SuperChatEventSnippet struct {
  6872  	// AmountMicros: The purchase amount, in micros of the purchase currency. e.g.,
  6873  	// 1 is represented as 1000000.
  6874  	AmountMicros uint64 `json:"amountMicros,omitempty,string"`
  6875  	// ChannelId: Channel id where the event occurred.
  6876  	ChannelId string `json:"channelId,omitempty"`
  6877  	// CommentText: The text contents of the comment left by the user.
  6878  	CommentText string `json:"commentText,omitempty"`
  6879  	// CreatedAt: The date and time when the event occurred.
  6880  	CreatedAt string `json:"createdAt,omitempty"`
  6881  	// Currency: The currency in which the purchase was made. ISO 4217.
  6882  	Currency string `json:"currency,omitempty"`
  6883  	// DisplayString: A rendered string that displays the purchase amount and
  6884  	// currency (e.g., "$1.00"). The string is rendered for the given language.
  6885  	DisplayString string `json:"displayString,omitempty"`
  6886  	// IsSuperStickerEvent: True if this event is a Super Sticker event.
  6887  	IsSuperStickerEvent bool `json:"isSuperStickerEvent,omitempty"`
  6888  	// MessageType: The tier for the paid message, which is based on the amount of
  6889  	// money spent to purchase the message.
  6890  	MessageType int64 `json:"messageType,omitempty"`
  6891  	// SuperStickerMetadata: If this event is a Super Sticker event, this field
  6892  	// will contain metadata about the Super Sticker.
  6893  	SuperStickerMetadata *SuperStickerMetadata `json:"superStickerMetadata,omitempty"`
  6894  	// SupporterDetails: Details about the supporter.
  6895  	SupporterDetails *ChannelProfileDetails `json:"supporterDetails,omitempty"`
  6896  	// ForceSendFields is a list of field names (e.g. "AmountMicros") to
  6897  	// unconditionally include in API requests. By default, fields with empty or
  6898  	// default values are omitted from API requests. See
  6899  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6900  	// details.
  6901  	ForceSendFields []string `json:"-"`
  6902  	// NullFields is a list of field names (e.g. "AmountMicros") to include in API
  6903  	// requests with the JSON null value. By default, fields with empty values are
  6904  	// omitted from API requests. See
  6905  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6906  	NullFields []string `json:"-"`
  6907  }
  6908  
  6909  func (s *SuperChatEventSnippet) MarshalJSON() ([]byte, error) {
  6910  	type NoMethod SuperChatEventSnippet
  6911  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6912  }
  6913  
  6914  type SuperStickerMetadata struct {
  6915  	// AltText: Internationalized alt text that describes the sticker image and any
  6916  	// animation associated with it.
  6917  	AltText string `json:"altText,omitempty"`
  6918  	// AltTextLanguage: Specifies the localization language in which the alt text
  6919  	// is returned.
  6920  	AltTextLanguage string `json:"altTextLanguage,omitempty"`
  6921  	// StickerId: Unique identifier of the Super Sticker. This is a shorter form of
  6922  	// the alt_text that includes pack name and a recognizable characteristic of
  6923  	// the sticker.
  6924  	StickerId string `json:"stickerId,omitempty"`
  6925  	// ForceSendFields is a list of field names (e.g. "AltText") to unconditionally
  6926  	// include in API requests. By default, fields with empty or default values are
  6927  	// omitted from API requests. See
  6928  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6929  	// details.
  6930  	ForceSendFields []string `json:"-"`
  6931  	// NullFields is a list of field names (e.g. "AltText") to include in API
  6932  	// requests with the JSON null value. By default, fields with empty values are
  6933  	// omitted from API requests. See
  6934  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6935  	NullFields []string `json:"-"`
  6936  }
  6937  
  6938  func (s *SuperStickerMetadata) MarshalJSON() ([]byte, error) {
  6939  	type NoMethod SuperStickerMetadata
  6940  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6941  }
  6942  
  6943  type TestItem struct {
  6944  	FeaturedPart bool                     `json:"featuredPart,omitempty"`
  6945  	Gaia         int64                    `json:"gaia,omitempty,string"`
  6946  	Id           string                   `json:"id,omitempty"`
  6947  	Snippet      *TestItemTestItemSnippet `json:"snippet,omitempty"`
  6948  
  6949  	// ServerResponse contains the HTTP response code and headers from the server.
  6950  	googleapi.ServerResponse `json:"-"`
  6951  	// ForceSendFields is a list of field names (e.g. "FeaturedPart") to
  6952  	// unconditionally include in API requests. By default, fields with empty or
  6953  	// default values are omitted from API requests. See
  6954  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6955  	// details.
  6956  	ForceSendFields []string `json:"-"`
  6957  	// NullFields is a list of field names (e.g. "FeaturedPart") to include in API
  6958  	// requests with the JSON null value. By default, fields with empty values are
  6959  	// omitted from API requests. See
  6960  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6961  	NullFields []string `json:"-"`
  6962  }
  6963  
  6964  func (s *TestItem) MarshalJSON() ([]byte, error) {
  6965  	type NoMethod TestItem
  6966  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6967  }
  6968  
  6969  type TestItemTestItemSnippet struct {
  6970  }
  6971  
  6972  // ThirdPartyLink: A *third party account link* resource represents a link
  6973  // between a YouTube account or a channel and an account on a third-party
  6974  // service.
  6975  type ThirdPartyLink struct {
  6976  	// Etag: Etag of this resource
  6977  	Etag string `json:"etag,omitempty"`
  6978  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  6979  	// "youtube#thirdPartyLink".
  6980  	Kind string `json:"kind,omitempty"`
  6981  	// LinkingToken: The linking_token identifies a YouTube account and channel
  6982  	// with which the third party account is linked.
  6983  	LinkingToken string `json:"linkingToken,omitempty"`
  6984  	// Snippet: The snippet object contains basic details about the third- party
  6985  	// account link.
  6986  	Snippet *ThirdPartyLinkSnippet `json:"snippet,omitempty"`
  6987  	// Status: The status object contains information about the status of the link.
  6988  	Status *ThirdPartyLinkStatus `json:"status,omitempty"`
  6989  
  6990  	// ServerResponse contains the HTTP response code and headers from the server.
  6991  	googleapi.ServerResponse `json:"-"`
  6992  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  6993  	// include in API requests. By default, fields with empty or default values are
  6994  	// omitted from API requests. See
  6995  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6996  	// details.
  6997  	ForceSendFields []string `json:"-"`
  6998  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  6999  	// with the JSON null value. By default, fields with empty values are omitted
  7000  	// from API requests. See
  7001  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7002  	NullFields []string `json:"-"`
  7003  }
  7004  
  7005  func (s *ThirdPartyLink) MarshalJSON() ([]byte, error) {
  7006  	type NoMethod ThirdPartyLink
  7007  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7008  }
  7009  
  7010  type ThirdPartyLinkListResponse struct {
  7011  	// Etag: Etag of this resource.
  7012  	Etag  string            `json:"etag,omitempty"`
  7013  	Items []*ThirdPartyLink `json:"items,omitempty"`
  7014  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7015  	// "youtube#thirdPartyLinkListResponse".
  7016  	Kind string `json:"kind,omitempty"`
  7017  
  7018  	// ServerResponse contains the HTTP response code and headers from the server.
  7019  	googleapi.ServerResponse `json:"-"`
  7020  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7021  	// include in API requests. By default, fields with empty or default values are
  7022  	// omitted from API requests. See
  7023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7024  	// details.
  7025  	ForceSendFields []string `json:"-"`
  7026  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7027  	// with the JSON null value. By default, fields with empty values are omitted
  7028  	// from API requests. See
  7029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7030  	NullFields []string `json:"-"`
  7031  }
  7032  
  7033  func (s *ThirdPartyLinkListResponse) MarshalJSON() ([]byte, error) {
  7034  	type NoMethod ThirdPartyLinkListResponse
  7035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7036  }
  7037  
  7038  // ThirdPartyLinkSnippet: Basic information about a third party account link,
  7039  // including its type and type-specific information.
  7040  type ThirdPartyLinkSnippet struct {
  7041  	// ChannelToStoreLink: Information specific to a link between a channel and a
  7042  	// store on a merchandising platform.
  7043  	ChannelToStoreLink *ChannelToStoreLinkDetails `json:"channelToStoreLink,omitempty"`
  7044  	// Type: Type of the link named after the entities that are being linked.
  7045  	//
  7046  	// Possible values:
  7047  	//   "linkUnspecified"
  7048  	//   "channelToStoreLink" - A link that is connecting (or about to connect) a
  7049  	// channel with a store on a merchandising platform in order to enable retail
  7050  	// commerce capabilities for that channel on YouTube.
  7051  	Type string `json:"type,omitempty"`
  7052  	// ForceSendFields is a list of field names (e.g. "ChannelToStoreLink") to
  7053  	// unconditionally include in API requests. By default, fields with empty or
  7054  	// default values are omitted from API requests. See
  7055  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7056  	// details.
  7057  	ForceSendFields []string `json:"-"`
  7058  	// NullFields is a list of field names (e.g. "ChannelToStoreLink") to include
  7059  	// in API requests with the JSON null value. By default, fields with empty
  7060  	// values are omitted from API requests. See
  7061  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7062  	NullFields []string `json:"-"`
  7063  }
  7064  
  7065  func (s *ThirdPartyLinkSnippet) MarshalJSON() ([]byte, error) {
  7066  	type NoMethod ThirdPartyLinkSnippet
  7067  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7068  }
  7069  
  7070  // ThirdPartyLinkStatus: The third-party link status object contains
  7071  // information about the status of the link.
  7072  type ThirdPartyLinkStatus struct {
  7073  	// Possible values:
  7074  	//   "unknown"
  7075  	//   "failed"
  7076  	//   "pending"
  7077  	//   "linked"
  7078  	LinkStatus string `json:"linkStatus,omitempty"`
  7079  	// ForceSendFields is a list of field names (e.g. "LinkStatus") to
  7080  	// unconditionally include in API requests. By default, fields with empty or
  7081  	// default values are omitted from API requests. See
  7082  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7083  	// details.
  7084  	ForceSendFields []string `json:"-"`
  7085  	// NullFields is a list of field names (e.g. "LinkStatus") to include in API
  7086  	// requests with the JSON null value. By default, fields with empty values are
  7087  	// omitted from API requests. See
  7088  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7089  	NullFields []string `json:"-"`
  7090  }
  7091  
  7092  func (s *ThirdPartyLinkStatus) MarshalJSON() ([]byte, error) {
  7093  	type NoMethod ThirdPartyLinkStatus
  7094  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7095  }
  7096  
  7097  // Thumbnail: A thumbnail is an image representing a YouTube resource.
  7098  type Thumbnail struct {
  7099  	// Height: (Optional) Height of the thumbnail image.
  7100  	Height int64 `json:"height,omitempty"`
  7101  	// Url: The thumbnail image's URL.
  7102  	Url string `json:"url,omitempty"`
  7103  	// Width: (Optional) Width of the thumbnail image.
  7104  	Width int64 `json:"width,omitempty"`
  7105  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
  7106  	// include in API requests. By default, fields with empty or default values are
  7107  	// omitted from API requests. See
  7108  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7109  	// details.
  7110  	ForceSendFields []string `json:"-"`
  7111  	// NullFields is a list of field names (e.g. "Height") to include in API
  7112  	// requests with the JSON null value. By default, fields with empty values are
  7113  	// omitted from API requests. See
  7114  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7115  	NullFields []string `json:"-"`
  7116  }
  7117  
  7118  func (s *Thumbnail) MarshalJSON() ([]byte, error) {
  7119  	type NoMethod Thumbnail
  7120  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7121  }
  7122  
  7123  // ThumbnailDetails: Internal representation of thumbnails for a YouTube
  7124  // resource.
  7125  type ThumbnailDetails struct {
  7126  	// Default: The default image for this resource.
  7127  	Default *Thumbnail `json:"default,omitempty"`
  7128  	// High: The high quality image for this resource.
  7129  	High *Thumbnail `json:"high,omitempty"`
  7130  	// Maxres: The maximum resolution quality image for this resource.
  7131  	Maxres *Thumbnail `json:"maxres,omitempty"`
  7132  	// Medium: The medium quality image for this resource.
  7133  	Medium *Thumbnail `json:"medium,omitempty"`
  7134  	// Standard: The standard quality image for this resource.
  7135  	Standard *Thumbnail `json:"standard,omitempty"`
  7136  	// ForceSendFields is a list of field names (e.g. "Default") to unconditionally
  7137  	// include in API requests. By default, fields with empty or default values are
  7138  	// omitted from API requests. See
  7139  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7140  	// details.
  7141  	ForceSendFields []string `json:"-"`
  7142  	// NullFields is a list of field names (e.g. "Default") to include in API
  7143  	// requests with the JSON null value. By default, fields with empty values are
  7144  	// omitted from API requests. See
  7145  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7146  	NullFields []string `json:"-"`
  7147  }
  7148  
  7149  func (s *ThumbnailDetails) MarshalJSON() ([]byte, error) {
  7150  	type NoMethod ThumbnailDetails
  7151  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7152  }
  7153  
  7154  type ThumbnailSetResponse struct {
  7155  	// Etag: Etag of this resource.
  7156  	Etag string `json:"etag,omitempty"`
  7157  	// EventId: Serialized EventId of the request which produced this response.
  7158  	EventId string `json:"eventId,omitempty"`
  7159  	// Items: A list of thumbnails.
  7160  	Items []*ThumbnailDetails `json:"items,omitempty"`
  7161  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7162  	// "youtube#thumbnailSetResponse".
  7163  	Kind string `json:"kind,omitempty"`
  7164  	// VisitorId: The visitorId identifies the visitor.
  7165  	VisitorId string `json:"visitorId,omitempty"`
  7166  
  7167  	// ServerResponse contains the HTTP response code and headers from the server.
  7168  	googleapi.ServerResponse `json:"-"`
  7169  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7170  	// include in API requests. By default, fields with empty or default values are
  7171  	// omitted from API requests. See
  7172  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7173  	// details.
  7174  	ForceSendFields []string `json:"-"`
  7175  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7176  	// with the JSON null value. By default, fields with empty values are omitted
  7177  	// from API requests. See
  7178  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7179  	NullFields []string `json:"-"`
  7180  }
  7181  
  7182  func (s *ThumbnailSetResponse) MarshalJSON() ([]byte, error) {
  7183  	type NoMethod ThumbnailSetResponse
  7184  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7185  }
  7186  
  7187  // TokenPagination: Stub token pagination template to suppress results.
  7188  type TokenPagination struct {
  7189  }
  7190  
  7191  // Video: A *video* resource represents a YouTube video.
  7192  type Video struct {
  7193  	// AgeGating: Age restriction details related to a video. This data can only be
  7194  	// retrieved by the video owner.
  7195  	AgeGating *VideoAgeGating `json:"ageGating,omitempty"`
  7196  	// ContentDetails: The contentDetails object contains information about the
  7197  	// video content, including the length of the video and its aspect ratio.
  7198  	ContentDetails *VideoContentDetails `json:"contentDetails,omitempty"`
  7199  	// Etag: Etag of this resource.
  7200  	Etag string `json:"etag,omitempty"`
  7201  	// FileDetails: The fileDetails object encapsulates information about the video
  7202  	// file that was uploaded to YouTube, including the file's resolution,
  7203  	// duration, audio and video codecs, stream bitrates, and more. This data can
  7204  	// only be retrieved by the video owner.
  7205  	FileDetails *VideoFileDetails `json:"fileDetails,omitempty"`
  7206  	// Id: The ID that YouTube uses to uniquely identify the video.
  7207  	Id string `json:"id,omitempty"`
  7208  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7209  	// "youtube#video".
  7210  	Kind string `json:"kind,omitempty"`
  7211  	// LiveStreamingDetails: The liveStreamingDetails object contains metadata
  7212  	// about a live video broadcast. The object will only be present in a video
  7213  	// resource if the video is an upcoming, live, or completed live broadcast.
  7214  	LiveStreamingDetails *VideoLiveStreamingDetails `json:"liveStreamingDetails,omitempty"`
  7215  	// Localizations: The localizations object contains localized versions of the
  7216  	// basic details about the video, such as its title and description.
  7217  	Localizations map[string]VideoLocalization `json:"localizations,omitempty"`
  7218  	// MonetizationDetails: The monetizationDetails object encapsulates information
  7219  	// about the monetization status of the video.
  7220  	MonetizationDetails *VideoMonetizationDetails `json:"monetizationDetails,omitempty"`
  7221  	// Player: The player object contains information that you would use to play
  7222  	// the video in an embedded player.
  7223  	Player *VideoPlayer `json:"player,omitempty"`
  7224  	// ProcessingDetails: The processingDetails object encapsulates information
  7225  	// about YouTube's progress in processing the uploaded video file. The
  7226  	// properties in the object identify the current processing status and an
  7227  	// estimate of the time remaining until YouTube finishes processing the video.
  7228  	// This part also indicates whether different types of data or content, such as
  7229  	// file details or thumbnail images, are available for the video. The
  7230  	// processingProgress object is designed to be polled so that the video
  7231  	// uploaded can track the progress that YouTube has made in processing the
  7232  	// uploaded video file. This data can only be retrieved by the video owner.
  7233  	ProcessingDetails *VideoProcessingDetails `json:"processingDetails,omitempty"`
  7234  	// ProjectDetails: The projectDetails object contains information about the
  7235  	// project specific video metadata. b/157517979: This part was never populated
  7236  	// after it was added. However, it sees non-zero traffic because there is
  7237  	// generated client code in the wild that refers to it [1]. We keep this field
  7238  	// and do NOT remove it because otherwise V3 would return an error when this
  7239  	// part gets requested [2]. [1]
  7240  	// https://developers.google.com/resources/api-libraries/documentation/youtube/v3/csharp/latest/classGoogle_1_1Apis_1_1YouTube_1_1v3_1_1Data_1_1VideoProjectDetails.html
  7241  	// [2]
  7242  	// http://google3/video/youtube/src/python/servers/data_api/common.py?l=1565-1569&rcl=344141677
  7243  	ProjectDetails *VideoProjectDetails `json:"projectDetails,omitempty"`
  7244  	// RecordingDetails: The recordingDetails object encapsulates information about
  7245  	// the location, date and address where the video was recorded.
  7246  	RecordingDetails *VideoRecordingDetails `json:"recordingDetails,omitempty"`
  7247  	// Snippet: The snippet object contains basic details about the video, such as
  7248  	// its title, description, and category.
  7249  	Snippet *VideoSnippet `json:"snippet,omitempty"`
  7250  	// Statistics: The statistics object contains statistics about the video.
  7251  	Statistics *VideoStatistics `json:"statistics,omitempty"`
  7252  	// Status: The status object contains information about the video's uploading,
  7253  	// processing, and privacy statuses.
  7254  	Status *VideoStatus `json:"status,omitempty"`
  7255  	// Suggestions: The suggestions object encapsulates suggestions that identify
  7256  	// opportunities to improve the video quality or the metadata for the uploaded
  7257  	// video. This data can only be retrieved by the video owner.
  7258  	Suggestions *VideoSuggestions `json:"suggestions,omitempty"`
  7259  	// TopicDetails: The topicDetails object encapsulates information about
  7260  	// Freebase topics associated with the video.
  7261  	TopicDetails *VideoTopicDetails `json:"topicDetails,omitempty"`
  7262  
  7263  	// ServerResponse contains the HTTP response code and headers from the server.
  7264  	googleapi.ServerResponse `json:"-"`
  7265  	// ForceSendFields is a list of field names (e.g. "AgeGating") to
  7266  	// unconditionally include in API requests. By default, fields with empty or
  7267  	// default values are omitted from API requests. See
  7268  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7269  	// details.
  7270  	ForceSendFields []string `json:"-"`
  7271  	// NullFields is a list of field names (e.g. "AgeGating") to include in API
  7272  	// requests with the JSON null value. By default, fields with empty values are
  7273  	// omitted from API requests. See
  7274  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7275  	NullFields []string `json:"-"`
  7276  }
  7277  
  7278  func (s *Video) MarshalJSON() ([]byte, error) {
  7279  	type NoMethod Video
  7280  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7281  }
  7282  
  7283  type VideoAbuseReport struct {
  7284  	// Comments: Additional comments regarding the abuse report.
  7285  	Comments string `json:"comments,omitempty"`
  7286  	// Language: The language that the content was viewed in.
  7287  	Language string `json:"language,omitempty"`
  7288  	// ReasonId: The high-level, or primary, reason that the content is abusive.
  7289  	// The value is an abuse report reason ID.
  7290  	ReasonId string `json:"reasonId,omitempty"`
  7291  	// SecondaryReasonId: The specific, or secondary, reason that this content is
  7292  	// abusive (if available). The value is an abuse report reason ID that is a
  7293  	// valid secondary reason for the primary reason.
  7294  	SecondaryReasonId string `json:"secondaryReasonId,omitempty"`
  7295  	// VideoId: The ID that YouTube uses to uniquely identify the video.
  7296  	VideoId string `json:"videoId,omitempty"`
  7297  	// ForceSendFields is a list of field names (e.g. "Comments") to
  7298  	// unconditionally include in API requests. By default, fields with empty or
  7299  	// default values are omitted from API requests. See
  7300  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7301  	// details.
  7302  	ForceSendFields []string `json:"-"`
  7303  	// NullFields is a list of field names (e.g. "Comments") to include in API
  7304  	// requests with the JSON null value. By default, fields with empty values are
  7305  	// omitted from API requests. See
  7306  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7307  	NullFields []string `json:"-"`
  7308  }
  7309  
  7310  func (s *VideoAbuseReport) MarshalJSON() ([]byte, error) {
  7311  	type NoMethod VideoAbuseReport
  7312  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7313  }
  7314  
  7315  // VideoAbuseReportReason: A `__videoAbuseReportReason__` resource identifies a
  7316  // reason that a video could be reported as abusive. Video abuse report reasons
  7317  // are used with `video.ReportAbuse`.
  7318  type VideoAbuseReportReason struct {
  7319  	// Etag: Etag of this resource.
  7320  	Etag string `json:"etag,omitempty"`
  7321  	// Id: The ID of this abuse report reason.
  7322  	Id string `json:"id,omitempty"`
  7323  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7324  	// "youtube#videoAbuseReportReason".
  7325  	Kind string `json:"kind,omitempty"`
  7326  	// Snippet: The `snippet` object contains basic details about the abuse report
  7327  	// reason.
  7328  	Snippet *VideoAbuseReportReasonSnippet `json:"snippet,omitempty"`
  7329  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7330  	// include in API requests. By default, fields with empty or default values are
  7331  	// omitted from API requests. See
  7332  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7333  	// details.
  7334  	ForceSendFields []string `json:"-"`
  7335  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7336  	// with the JSON null value. By default, fields with empty values are omitted
  7337  	// from API requests. See
  7338  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7339  	NullFields []string `json:"-"`
  7340  }
  7341  
  7342  func (s *VideoAbuseReportReason) MarshalJSON() ([]byte, error) {
  7343  	type NoMethod VideoAbuseReportReason
  7344  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7345  }
  7346  
  7347  type VideoAbuseReportReasonListResponse struct {
  7348  	// Etag: Etag of this resource.
  7349  	Etag string `json:"etag,omitempty"`
  7350  	// EventId: Serialized EventId of the request which produced this response.
  7351  	EventId string `json:"eventId,omitempty"`
  7352  	// Items: A list of valid abuse reasons that are used with `video.ReportAbuse`.
  7353  	Items []*VideoAbuseReportReason `json:"items,omitempty"`
  7354  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7355  	// "youtube#videoAbuseReportReasonListResponse".
  7356  	Kind string `json:"kind,omitempty"`
  7357  	// VisitorId: The `visitorId` identifies the visitor.
  7358  	VisitorId string `json:"visitorId,omitempty"`
  7359  
  7360  	// ServerResponse contains the HTTP response code and headers from the server.
  7361  	googleapi.ServerResponse `json:"-"`
  7362  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7363  	// include in API requests. By default, fields with empty or default values are
  7364  	// omitted from API requests. See
  7365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7366  	// details.
  7367  	ForceSendFields []string `json:"-"`
  7368  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7369  	// with the JSON null value. By default, fields with empty values are omitted
  7370  	// from API requests. See
  7371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7372  	NullFields []string `json:"-"`
  7373  }
  7374  
  7375  func (s *VideoAbuseReportReasonListResponse) MarshalJSON() ([]byte, error) {
  7376  	type NoMethod VideoAbuseReportReasonListResponse
  7377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7378  }
  7379  
  7380  // VideoAbuseReportReasonSnippet: Basic details about a video category, such as
  7381  // its localized title.
  7382  type VideoAbuseReportReasonSnippet struct {
  7383  	// Label: The localized label belonging to this abuse report reason.
  7384  	Label string `json:"label,omitempty"`
  7385  	// SecondaryReasons: The secondary reasons associated with this reason, if any
  7386  	// are available. (There might be 0 or more.)
  7387  	SecondaryReasons []*VideoAbuseReportSecondaryReason `json:"secondaryReasons,omitempty"`
  7388  	// ForceSendFields is a list of field names (e.g. "Label") to unconditionally
  7389  	// include in API requests. By default, fields with empty or default values are
  7390  	// omitted from API requests. See
  7391  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7392  	// details.
  7393  	ForceSendFields []string `json:"-"`
  7394  	// NullFields is a list of field names (e.g. "Label") to include in API
  7395  	// requests with the JSON null value. By default, fields with empty values are
  7396  	// omitted from API requests. See
  7397  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7398  	NullFields []string `json:"-"`
  7399  }
  7400  
  7401  func (s *VideoAbuseReportReasonSnippet) MarshalJSON() ([]byte, error) {
  7402  	type NoMethod VideoAbuseReportReasonSnippet
  7403  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7404  }
  7405  
  7406  type VideoAbuseReportSecondaryReason struct {
  7407  	// Id: The ID of this abuse report secondary reason.
  7408  	Id string `json:"id,omitempty"`
  7409  	// Label: The localized label for this abuse report secondary reason.
  7410  	Label string `json:"label,omitempty"`
  7411  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  7412  	// include in API requests. By default, fields with empty or default values are
  7413  	// omitted from API requests. See
  7414  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7415  	// details.
  7416  	ForceSendFields []string `json:"-"`
  7417  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  7418  	// with the JSON null value. By default, fields with empty values are omitted
  7419  	// from API requests. See
  7420  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7421  	NullFields []string `json:"-"`
  7422  }
  7423  
  7424  func (s *VideoAbuseReportSecondaryReason) MarshalJSON() ([]byte, error) {
  7425  	type NoMethod VideoAbuseReportSecondaryReason
  7426  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7427  }
  7428  
  7429  type VideoAgeGating struct {
  7430  	// AlcoholContent: Indicates whether or not the video has alcoholic beverage
  7431  	// content. Only users of legal purchasing age in a particular country, as
  7432  	// identified by ICAP, can view the content.
  7433  	AlcoholContent bool `json:"alcoholContent,omitempty"`
  7434  	// Restricted: Age-restricted trailers. For redband trailers and adult-rated
  7435  	// video-games. Only users aged 18+ can view the content. The the field is true
  7436  	// the content is restricted to viewers aged 18+. Otherwise The field won't be
  7437  	// present.
  7438  	Restricted bool `json:"restricted,omitempty"`
  7439  	// VideoGameRating: Video game rating, if any.
  7440  	//
  7441  	// Possible values:
  7442  	//   "anyone"
  7443  	//   "m15Plus"
  7444  	//   "m16Plus"
  7445  	//   "m17Plus"
  7446  	VideoGameRating string `json:"videoGameRating,omitempty"`
  7447  	// ForceSendFields is a list of field names (e.g. "AlcoholContent") to
  7448  	// unconditionally include in API requests. By default, fields with empty or
  7449  	// default values are omitted from API requests. See
  7450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7451  	// details.
  7452  	ForceSendFields []string `json:"-"`
  7453  	// NullFields is a list of field names (e.g. "AlcoholContent") to include in
  7454  	// API requests with the JSON null value. By default, fields with empty values
  7455  	// are omitted from API requests. See
  7456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7457  	NullFields []string `json:"-"`
  7458  }
  7459  
  7460  func (s *VideoAgeGating) MarshalJSON() ([]byte, error) {
  7461  	type NoMethod VideoAgeGating
  7462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7463  }
  7464  
  7465  // VideoCategory: A *videoCategory* resource identifies a category that has
  7466  // been or could be associated with uploaded videos.
  7467  type VideoCategory struct {
  7468  	// Etag: Etag of this resource.
  7469  	Etag string `json:"etag,omitempty"`
  7470  	// Id: The ID that YouTube uses to uniquely identify the video category.
  7471  	Id string `json:"id,omitempty"`
  7472  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7473  	// "youtube#videoCategory".
  7474  	Kind string `json:"kind,omitempty"`
  7475  	// Snippet: The snippet object contains basic details about the video category,
  7476  	// including its title.
  7477  	Snippet *VideoCategorySnippet `json:"snippet,omitempty"`
  7478  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7479  	// include in API requests. By default, fields with empty or default values are
  7480  	// omitted from API requests. See
  7481  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7482  	// details.
  7483  	ForceSendFields []string `json:"-"`
  7484  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7485  	// with the JSON null value. By default, fields with empty values are omitted
  7486  	// from API requests. See
  7487  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7488  	NullFields []string `json:"-"`
  7489  }
  7490  
  7491  func (s *VideoCategory) MarshalJSON() ([]byte, error) {
  7492  	type NoMethod VideoCategory
  7493  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7494  }
  7495  
  7496  type VideoCategoryListResponse struct {
  7497  	// Etag: Etag of this resource.
  7498  	Etag string `json:"etag,omitempty"`
  7499  	// EventId: Serialized EventId of the request which produced this response.
  7500  	EventId string `json:"eventId,omitempty"`
  7501  	// Items: A list of video categories that can be associated with YouTube
  7502  	// videos. In this map, the video category ID is the map key, and its value is
  7503  	// the corresponding videoCategory resource.
  7504  	Items []*VideoCategory `json:"items,omitempty"`
  7505  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7506  	// "youtube#videoCategoryListResponse".
  7507  	Kind string `json:"kind,omitempty"`
  7508  	// NextPageToken: The token that can be used as the value of the pageToken
  7509  	// parameter to retrieve the next page in the result set.
  7510  	NextPageToken string `json:"nextPageToken,omitempty"`
  7511  	// PageInfo: General pagination information.
  7512  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  7513  	// PrevPageToken: The token that can be used as the value of the pageToken
  7514  	// parameter to retrieve the previous page in the result set.
  7515  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  7516  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  7517  	// VisitorId: The visitorId identifies the visitor.
  7518  	VisitorId string `json:"visitorId,omitempty"`
  7519  
  7520  	// ServerResponse contains the HTTP response code and headers from the server.
  7521  	googleapi.ServerResponse `json:"-"`
  7522  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7523  	// include in API requests. By default, fields with empty or default values are
  7524  	// omitted from API requests. See
  7525  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7526  	// details.
  7527  	ForceSendFields []string `json:"-"`
  7528  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7529  	// with the JSON null value. By default, fields with empty values are omitted
  7530  	// from API requests. See
  7531  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7532  	NullFields []string `json:"-"`
  7533  }
  7534  
  7535  func (s *VideoCategoryListResponse) MarshalJSON() ([]byte, error) {
  7536  	type NoMethod VideoCategoryListResponse
  7537  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7538  }
  7539  
  7540  // VideoCategorySnippet: Basic details about a video category, such as its
  7541  // localized title.
  7542  type VideoCategorySnippet struct {
  7543  	Assignable bool `json:"assignable,omitempty"`
  7544  	// ChannelId: The YouTube channel that created the video category.
  7545  	ChannelId string `json:"channelId,omitempty"`
  7546  	// Title: The video category's title.
  7547  	Title string `json:"title,omitempty"`
  7548  	// ForceSendFields is a list of field names (e.g. "Assignable") to
  7549  	// unconditionally include in API requests. By default, fields with empty or
  7550  	// default values are omitted from API requests. See
  7551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7552  	// details.
  7553  	ForceSendFields []string `json:"-"`
  7554  	// NullFields is a list of field names (e.g. "Assignable") to include in API
  7555  	// requests with the JSON null value. By default, fields with empty values are
  7556  	// omitted from API requests. See
  7557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7558  	NullFields []string `json:"-"`
  7559  }
  7560  
  7561  func (s *VideoCategorySnippet) MarshalJSON() ([]byte, error) {
  7562  	type NoMethod VideoCategorySnippet
  7563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7564  }
  7565  
  7566  // VideoContentDetails: Details about the content of a YouTube Video.
  7567  type VideoContentDetails struct {
  7568  	// Caption: The value of captions indicates whether the video has captions or
  7569  	// not.
  7570  	//
  7571  	// Possible values:
  7572  	//   "true"
  7573  	//   "false"
  7574  	Caption string `json:"caption,omitempty"`
  7575  	// ContentRating: Specifies the ratings that the video received under various
  7576  	// rating schemes.
  7577  	ContentRating *ContentRating `json:"contentRating,omitempty"`
  7578  	// CountryRestriction: The countryRestriction object contains information about
  7579  	// the countries where a video is (or is not) viewable.
  7580  	CountryRestriction *AccessPolicy `json:"countryRestriction,omitempty"`
  7581  	// Definition: The value of definition indicates whether the video is available
  7582  	// in high definition or only in standard definition.
  7583  	//
  7584  	// Possible values:
  7585  	//   "sd" - sd
  7586  	//   "hd" - hd
  7587  	Definition string `json:"definition,omitempty"`
  7588  	// Dimension: The value of dimension indicates whether the video is available
  7589  	// in 3D or in 2D.
  7590  	Dimension string `json:"dimension,omitempty"`
  7591  	// Duration: The length of the video. The tag value is an ISO 8601 duration in
  7592  	// the format PT#M#S, in which the letters PT indicate that the value specifies
  7593  	// a period of time, and the letters M and S refer to length in minutes and
  7594  	// seconds, respectively. The # characters preceding the M and S letters are
  7595  	// both integers that specify the number of minutes (or seconds) of the video.
  7596  	// For example, a value of PT15M51S indicates that the video is 15 minutes and
  7597  	// 51 seconds long.
  7598  	Duration string `json:"duration,omitempty"`
  7599  	// HasCustomThumbnail: Indicates whether the video uploader has provided a
  7600  	// custom thumbnail image for the video. This property is only visible to the
  7601  	// video uploader.
  7602  	HasCustomThumbnail bool `json:"hasCustomThumbnail,omitempty"`
  7603  	// LicensedContent: The value of is_license_content indicates whether the video
  7604  	// is licensed content.
  7605  	LicensedContent bool `json:"licensedContent,omitempty"`
  7606  	// Projection: Specifies the projection format of the video.
  7607  	//
  7608  	// Possible values:
  7609  	//   "rectangular"
  7610  	//   "360"
  7611  	Projection string `json:"projection,omitempty"`
  7612  	// RegionRestriction: The regionRestriction object contains information about
  7613  	// the countries where a video is (or is not) viewable. The object will contain
  7614  	// either the contentDetails.regionRestriction.allowed property or the
  7615  	// contentDetails.regionRestriction.blocked property.
  7616  	RegionRestriction *VideoContentDetailsRegionRestriction `json:"regionRestriction,omitempty"`
  7617  	// ForceSendFields is a list of field names (e.g. "Caption") to unconditionally
  7618  	// include in API requests. By default, fields with empty or default values are
  7619  	// omitted from API requests. See
  7620  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7621  	// details.
  7622  	ForceSendFields []string `json:"-"`
  7623  	// NullFields is a list of field names (e.g. "Caption") to include in API
  7624  	// requests with the JSON null value. By default, fields with empty values are
  7625  	// omitted from API requests. See
  7626  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7627  	NullFields []string `json:"-"`
  7628  }
  7629  
  7630  func (s *VideoContentDetails) MarshalJSON() ([]byte, error) {
  7631  	type NoMethod VideoContentDetails
  7632  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7633  }
  7634  
  7635  // VideoContentDetailsRegionRestriction: DEPRECATED Region restriction of the
  7636  // video.
  7637  type VideoContentDetailsRegionRestriction struct {
  7638  	// Allowed: A list of region codes that identify countries where the video is
  7639  	// viewable. If this property is present and a country is not listed in its
  7640  	// value, then the video is blocked from appearing in that country. If this
  7641  	// property is present and contains an empty list, the video is blocked in all
  7642  	// countries.
  7643  	Allowed []string `json:"allowed,omitempty"`
  7644  	// Blocked: A list of region codes that identify countries where the video is
  7645  	// blocked. If this property is present and a country is not listed in its
  7646  	// value, then the video is viewable in that country. If this property is
  7647  	// present and contains an empty list, the video is viewable in all countries.
  7648  	Blocked []string `json:"blocked,omitempty"`
  7649  	// ForceSendFields is a list of field names (e.g. "Allowed") to unconditionally
  7650  	// include in API requests. By default, fields with empty or default values are
  7651  	// omitted from API requests. See
  7652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7653  	// details.
  7654  	ForceSendFields []string `json:"-"`
  7655  	// NullFields is a list of field names (e.g. "Allowed") to include in API
  7656  	// requests with the JSON null value. By default, fields with empty values are
  7657  	// omitted from API requests. See
  7658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7659  	NullFields []string `json:"-"`
  7660  }
  7661  
  7662  func (s *VideoContentDetailsRegionRestriction) MarshalJSON() ([]byte, error) {
  7663  	type NoMethod VideoContentDetailsRegionRestriction
  7664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7665  }
  7666  
  7667  // VideoFileDetails: Describes original video file properties, including
  7668  // technical details about audio and video streams, but also metadata
  7669  // information like content length, digitization time, or geotagging
  7670  // information.
  7671  type VideoFileDetails struct {
  7672  	// AudioStreams: A list of audio streams contained in the uploaded video file.
  7673  	// Each item in the list contains detailed metadata about an audio stream.
  7674  	AudioStreams []*VideoFileDetailsAudioStream `json:"audioStreams,omitempty"`
  7675  	// BitrateBps: The uploaded video file's combined (video and audio) bitrate in
  7676  	// bits per second.
  7677  	BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
  7678  	// Container: The uploaded video file's container format.
  7679  	Container string `json:"container,omitempty"`
  7680  	// CreationTime: The date and time when the uploaded video file was created.
  7681  	// The value is specified in ISO 8601 format. Currently, the following ISO 8601
  7682  	// formats are supported: - Date only: YYYY-MM-DD - Naive time:
  7683  	// YYYY-MM-DDTHH:MM:SS - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM
  7684  	CreationTime string `json:"creationTime,omitempty"`
  7685  	// DurationMs: The length of the uploaded video in milliseconds.
  7686  	DurationMs uint64 `json:"durationMs,omitempty,string"`
  7687  	// FileName: The uploaded file's name. This field is present whether a video
  7688  	// file or another type of file was uploaded.
  7689  	FileName string `json:"fileName,omitempty"`
  7690  	// FileSize: The uploaded file's size in bytes. This field is present whether a
  7691  	// video file or another type of file was uploaded.
  7692  	FileSize uint64 `json:"fileSize,omitempty,string"`
  7693  	// FileType: The uploaded file's type as detected by YouTube's video processing
  7694  	// engine. Currently, YouTube only processes video files, but this field is
  7695  	// present whether a video file or another type of file was uploaded.
  7696  	//
  7697  	// Possible values:
  7698  	//   "video" - Known video file (e.g., an MP4 file).
  7699  	//   "audio" - Audio only file (e.g., an MP3 file).
  7700  	//   "image" - Image file (e.g., a JPEG image).
  7701  	//   "archive" - Archive file (e.g., a ZIP archive).
  7702  	//   "document" - Document or text file (e.g., MS Word document).
  7703  	//   "project" - Movie project file (e.g., Microsoft Windows Movie Maker
  7704  	// project).
  7705  	//   "other" - Other non-video file type.
  7706  	FileType string `json:"fileType,omitempty"`
  7707  	// VideoStreams: A list of video streams contained in the uploaded video file.
  7708  	// Each item in the list contains detailed metadata about a video stream.
  7709  	VideoStreams []*VideoFileDetailsVideoStream `json:"videoStreams,omitempty"`
  7710  	// ForceSendFields is a list of field names (e.g. "AudioStreams") to
  7711  	// unconditionally include in API requests. By default, fields with empty or
  7712  	// default values are omitted from API requests. See
  7713  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7714  	// details.
  7715  	ForceSendFields []string `json:"-"`
  7716  	// NullFields is a list of field names (e.g. "AudioStreams") to include in API
  7717  	// requests with the JSON null value. By default, fields with empty values are
  7718  	// omitted from API requests. See
  7719  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7720  	NullFields []string `json:"-"`
  7721  }
  7722  
  7723  func (s *VideoFileDetails) MarshalJSON() ([]byte, error) {
  7724  	type NoMethod VideoFileDetails
  7725  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7726  }
  7727  
  7728  // VideoFileDetailsAudioStream: Information about an audio stream.
  7729  type VideoFileDetailsAudioStream struct {
  7730  	// BitrateBps: The audio stream's bitrate, in bits per second.
  7731  	BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
  7732  	// ChannelCount: The number of audio channels that the stream contains.
  7733  	ChannelCount int64 `json:"channelCount,omitempty"`
  7734  	// Codec: The audio codec that the stream uses.
  7735  	Codec string `json:"codec,omitempty"`
  7736  	// Vendor: A value that uniquely identifies a video vendor. Typically, the
  7737  	// value is a four-letter vendor code.
  7738  	Vendor string `json:"vendor,omitempty"`
  7739  	// ForceSendFields is a list of field names (e.g. "BitrateBps") to
  7740  	// unconditionally include in API requests. By default, fields with empty or
  7741  	// default values are omitted from API requests. See
  7742  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7743  	// details.
  7744  	ForceSendFields []string `json:"-"`
  7745  	// NullFields is a list of field names (e.g. "BitrateBps") to include in API
  7746  	// requests with the JSON null value. By default, fields with empty values are
  7747  	// omitted from API requests. See
  7748  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7749  	NullFields []string `json:"-"`
  7750  }
  7751  
  7752  func (s *VideoFileDetailsAudioStream) MarshalJSON() ([]byte, error) {
  7753  	type NoMethod VideoFileDetailsAudioStream
  7754  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7755  }
  7756  
  7757  // VideoFileDetailsVideoStream: Information about a video stream.
  7758  type VideoFileDetailsVideoStream struct {
  7759  	// AspectRatio: The video content's display aspect ratio, which specifies the
  7760  	// aspect ratio in which the video should be displayed.
  7761  	AspectRatio float64 `json:"aspectRatio,omitempty"`
  7762  	// BitrateBps: The video stream's bitrate, in bits per second.
  7763  	BitrateBps uint64 `json:"bitrateBps,omitempty,string"`
  7764  	// Codec: The video codec that the stream uses.
  7765  	Codec string `json:"codec,omitempty"`
  7766  	// FrameRateFps: The video stream's frame rate, in frames per second.
  7767  	FrameRateFps float64 `json:"frameRateFps,omitempty"`
  7768  	// HeightPixels: The encoded video content's height in pixels.
  7769  	HeightPixels int64 `json:"heightPixels,omitempty"`
  7770  	// Rotation: The amount that YouTube needs to rotate the original source
  7771  	// content to properly display the video.
  7772  	//
  7773  	// Possible values:
  7774  	//   "none"
  7775  	//   "clockwise"
  7776  	//   "upsideDown"
  7777  	//   "counterClockwise"
  7778  	//   "other"
  7779  	Rotation string `json:"rotation,omitempty"`
  7780  	// Vendor: A value that uniquely identifies a video vendor. Typically, the
  7781  	// value is a four-letter vendor code.
  7782  	Vendor string `json:"vendor,omitempty"`
  7783  	// WidthPixels: The encoded video content's width in pixels. You can calculate
  7784  	// the video's encoding aspect ratio as width_pixels / height_pixels.
  7785  	WidthPixels int64 `json:"widthPixels,omitempty"`
  7786  	// ForceSendFields is a list of field names (e.g. "AspectRatio") to
  7787  	// unconditionally include in API requests. By default, fields with empty or
  7788  	// default values are omitted from API requests. See
  7789  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7790  	// details.
  7791  	ForceSendFields []string `json:"-"`
  7792  	// NullFields is a list of field names (e.g. "AspectRatio") to include in API
  7793  	// requests with the JSON null value. By default, fields with empty values are
  7794  	// omitted from API requests. See
  7795  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7796  	NullFields []string `json:"-"`
  7797  }
  7798  
  7799  func (s *VideoFileDetailsVideoStream) MarshalJSON() ([]byte, error) {
  7800  	type NoMethod VideoFileDetailsVideoStream
  7801  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7802  }
  7803  
  7804  func (s *VideoFileDetailsVideoStream) UnmarshalJSON(data []byte) error {
  7805  	type NoMethod VideoFileDetailsVideoStream
  7806  	var s1 struct {
  7807  		AspectRatio  gensupport.JSONFloat64 `json:"aspectRatio"`
  7808  		FrameRateFps gensupport.JSONFloat64 `json:"frameRateFps"`
  7809  		*NoMethod
  7810  	}
  7811  	s1.NoMethod = (*NoMethod)(s)
  7812  	if err := json.Unmarshal(data, &s1); err != nil {
  7813  		return err
  7814  	}
  7815  	s.AspectRatio = float64(s1.AspectRatio)
  7816  	s.FrameRateFps = float64(s1.FrameRateFps)
  7817  	return nil
  7818  }
  7819  
  7820  type VideoGetRatingResponse struct {
  7821  	// Etag: Etag of this resource.
  7822  	Etag string `json:"etag,omitempty"`
  7823  	// EventId: Serialized EventId of the request which produced this response.
  7824  	EventId string `json:"eventId,omitempty"`
  7825  	// Items: A list of ratings that match the request criteria.
  7826  	Items []*VideoRating `json:"items,omitempty"`
  7827  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7828  	// "youtube#videoGetRatingResponse".
  7829  	Kind string `json:"kind,omitempty"`
  7830  	// VisitorId: The visitorId identifies the visitor.
  7831  	VisitorId string `json:"visitorId,omitempty"`
  7832  
  7833  	// ServerResponse contains the HTTP response code and headers from the server.
  7834  	googleapi.ServerResponse `json:"-"`
  7835  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7836  	// include in API requests. By default, fields with empty or default values are
  7837  	// omitted from API requests. See
  7838  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7839  	// details.
  7840  	ForceSendFields []string `json:"-"`
  7841  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7842  	// with the JSON null value. By default, fields with empty values are omitted
  7843  	// from API requests. See
  7844  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7845  	NullFields []string `json:"-"`
  7846  }
  7847  
  7848  func (s *VideoGetRatingResponse) MarshalJSON() ([]byte, error) {
  7849  	type NoMethod VideoGetRatingResponse
  7850  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7851  }
  7852  
  7853  type VideoListResponse struct {
  7854  	// Etag: Etag of this resource.
  7855  	Etag string `json:"etag,omitempty"`
  7856  	// EventId: Serialized EventId of the request which produced this response.
  7857  	EventId string   `json:"eventId,omitempty"`
  7858  	Items   []*Video `json:"items,omitempty"`
  7859  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  7860  	// "youtube#videoListResponse".
  7861  	Kind string `json:"kind,omitempty"`
  7862  	// NextPageToken: The token that can be used as the value of the pageToken
  7863  	// parameter to retrieve the next page in the result set.
  7864  	NextPageToken string `json:"nextPageToken,omitempty"`
  7865  	// PageInfo: General pagination information.
  7866  	PageInfo *PageInfo `json:"pageInfo,omitempty"`
  7867  	// PrevPageToken: The token that can be used as the value of the pageToken
  7868  	// parameter to retrieve the previous page in the result set.
  7869  	PrevPageToken   string           `json:"prevPageToken,omitempty"`
  7870  	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
  7871  	// VisitorId: The visitorId identifies the visitor.
  7872  	VisitorId string `json:"visitorId,omitempty"`
  7873  
  7874  	// ServerResponse contains the HTTP response code and headers from the server.
  7875  	googleapi.ServerResponse `json:"-"`
  7876  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  7877  	// include in API requests. By default, fields with empty or default values are
  7878  	// omitted from API requests. See
  7879  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7880  	// details.
  7881  	ForceSendFields []string `json:"-"`
  7882  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  7883  	// with the JSON null value. By default, fields with empty values are omitted
  7884  	// from API requests. See
  7885  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7886  	NullFields []string `json:"-"`
  7887  }
  7888  
  7889  func (s *VideoListResponse) MarshalJSON() ([]byte, error) {
  7890  	type NoMethod VideoListResponse
  7891  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7892  }
  7893  
  7894  // VideoLiveStreamingDetails: Details about the live streaming metadata.
  7895  type VideoLiveStreamingDetails struct {
  7896  	// ActiveLiveChatId: The ID of the currently active live chat attached to this
  7897  	// video. This field is filled only if the video is a currently live broadcast
  7898  	// that has live chat. Once the broadcast transitions to complete this field
  7899  	// will be removed and the live chat closed down. For persistent broadcasts
  7900  	// that live chat id will no longer be tied to this video but rather to the new
  7901  	// video being displayed at the persistent page.
  7902  	ActiveLiveChatId string `json:"activeLiveChatId,omitempty"`
  7903  	// ActualEndTime: The time that the broadcast actually ended. This value will
  7904  	// not be available until the broadcast is over.
  7905  	ActualEndTime string `json:"actualEndTime,omitempty"`
  7906  	// ActualStartTime: The time that the broadcast actually started. This value
  7907  	// will not be available until the broadcast begins.
  7908  	ActualStartTime string `json:"actualStartTime,omitempty"`
  7909  	// ConcurrentViewers: The number of viewers currently watching the broadcast.
  7910  	// The property and its value will be present if the broadcast has current
  7911  	// viewers and the broadcast owner has not hidden the viewcount for the video.
  7912  	// Note that YouTube stops tracking the number of concurrent viewers for a
  7913  	// broadcast when the broadcast ends. So, this property would not identify the
  7914  	// number of viewers watching an archived video of a live broadcast that
  7915  	// already ended.
  7916  	ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"`
  7917  	// ScheduledEndTime: The time that the broadcast is scheduled to end. If the
  7918  	// value is empty or the property is not present, then the broadcast is
  7919  	// scheduled to contiue indefinitely.
  7920  	ScheduledEndTime string `json:"scheduledEndTime,omitempty"`
  7921  	// ScheduledStartTime: The time that the broadcast is scheduled to begin.
  7922  	ScheduledStartTime string `json:"scheduledStartTime,omitempty"`
  7923  	// ForceSendFields is a list of field names (e.g. "ActiveLiveChatId") to
  7924  	// unconditionally include in API requests. By default, fields with empty or
  7925  	// default values are omitted from API requests. See
  7926  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7927  	// details.
  7928  	ForceSendFields []string `json:"-"`
  7929  	// NullFields is a list of field names (e.g. "ActiveLiveChatId") to include in
  7930  	// API requests with the JSON null value. By default, fields with empty values
  7931  	// are omitted from API requests. See
  7932  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7933  	NullFields []string `json:"-"`
  7934  }
  7935  
  7936  func (s *VideoLiveStreamingDetails) MarshalJSON() ([]byte, error) {
  7937  	type NoMethod VideoLiveStreamingDetails
  7938  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7939  }
  7940  
  7941  // VideoLocalization: Localized versions of certain video properties (e.g.
  7942  // title).
  7943  type VideoLocalization struct {
  7944  	// Description: Localized version of the video's description.
  7945  	Description string `json:"description,omitempty"`
  7946  	// Title: Localized version of the video's title.
  7947  	Title string `json:"title,omitempty"`
  7948  	// ForceSendFields is a list of field names (e.g. "Description") to
  7949  	// unconditionally include in API requests. By default, fields with empty or
  7950  	// default values are omitted from API requests. See
  7951  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7952  	// details.
  7953  	ForceSendFields []string `json:"-"`
  7954  	// NullFields is a list of field names (e.g. "Description") to include in API
  7955  	// requests with the JSON null value. By default, fields with empty values are
  7956  	// omitted from API requests. See
  7957  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7958  	NullFields []string `json:"-"`
  7959  }
  7960  
  7961  func (s *VideoLocalization) MarshalJSON() ([]byte, error) {
  7962  	type NoMethod VideoLocalization
  7963  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7964  }
  7965  
  7966  // VideoMonetizationDetails: Details about monetization of a YouTube Video.
  7967  type VideoMonetizationDetails struct {
  7968  	// Access: The value of access indicates whether the video can be monetized or
  7969  	// not.
  7970  	Access *AccessPolicy `json:"access,omitempty"`
  7971  	// ForceSendFields is a list of field names (e.g. "Access") to unconditionally
  7972  	// include in API requests. By default, fields with empty or default values are
  7973  	// omitted from API requests. See
  7974  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7975  	// details.
  7976  	ForceSendFields []string `json:"-"`
  7977  	// NullFields is a list of field names (e.g. "Access") to include in API
  7978  	// requests with the JSON null value. By default, fields with empty values are
  7979  	// omitted from API requests. See
  7980  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7981  	NullFields []string `json:"-"`
  7982  }
  7983  
  7984  func (s *VideoMonetizationDetails) MarshalJSON() ([]byte, error) {
  7985  	type NoMethod VideoMonetizationDetails
  7986  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7987  }
  7988  
  7989  // VideoPlayer: Player to be used for a video playback.
  7990  type VideoPlayer struct {
  7991  	EmbedHeight int64 `json:"embedHeight,omitempty,string"`
  7992  	// EmbedHtml: An <iframe> tag that embeds a player that will play the video.
  7993  	EmbedHtml string `json:"embedHtml,omitempty"`
  7994  	// EmbedWidth: The embed width
  7995  	EmbedWidth int64 `json:"embedWidth,omitempty,string"`
  7996  	// ForceSendFields is a list of field names (e.g. "EmbedHeight") to
  7997  	// unconditionally include in API requests. By default, fields with empty or
  7998  	// default values are omitted from API requests. See
  7999  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8000  	// details.
  8001  	ForceSendFields []string `json:"-"`
  8002  	// NullFields is a list of field names (e.g. "EmbedHeight") to include in API
  8003  	// requests with the JSON null value. By default, fields with empty values are
  8004  	// omitted from API requests. See
  8005  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8006  	NullFields []string `json:"-"`
  8007  }
  8008  
  8009  func (s *VideoPlayer) MarshalJSON() ([]byte, error) {
  8010  	type NoMethod VideoPlayer
  8011  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8012  }
  8013  
  8014  // VideoProcessingDetails: Describes processing status and progress and
  8015  // availability of some other Video resource parts.
  8016  type VideoProcessingDetails struct {
  8017  	// EditorSuggestionsAvailability: This value indicates whether video editing
  8018  	// suggestions, which might improve video quality or the playback experience,
  8019  	// are available for the video. You can retrieve these suggestions by
  8020  	// requesting the suggestions part in your videos.list() request.
  8021  	EditorSuggestionsAvailability string `json:"editorSuggestionsAvailability,omitempty"`
  8022  	// FileDetailsAvailability: This value indicates whether file details are
  8023  	// available for the uploaded video. You can retrieve a video's file details by
  8024  	// requesting the fileDetails part in your videos.list() request.
  8025  	FileDetailsAvailability string `json:"fileDetailsAvailability,omitempty"`
  8026  	// ProcessingFailureReason: The reason that YouTube failed to process the
  8027  	// video. This property will only have a value if the processingStatus
  8028  	// property's value is failed.
  8029  	//
  8030  	// Possible values:
  8031  	//   "uploadFailed"
  8032  	//   "transcodeFailed"
  8033  	//   "streamingFailed"
  8034  	//   "other"
  8035  	ProcessingFailureReason string `json:"processingFailureReason,omitempty"`
  8036  	// ProcessingIssuesAvailability: This value indicates whether the video
  8037  	// processing engine has generated suggestions that might improve YouTube's
  8038  	// ability to process the the video, warnings that explain video processing
  8039  	// problems, or errors that cause video processing problems. You can retrieve
  8040  	// these suggestions by requesting the suggestions part in your videos.list()
  8041  	// request.
  8042  	ProcessingIssuesAvailability string `json:"processingIssuesAvailability,omitempty"`
  8043  	// ProcessingProgress: The processingProgress object contains information about
  8044  	// the progress YouTube has made in processing the video. The values are really
  8045  	// only relevant if the video's processing status is processing.
  8046  	ProcessingProgress *VideoProcessingDetailsProcessingProgress `json:"processingProgress,omitempty"`
  8047  	// ProcessingStatus: The video's processing status. This value indicates
  8048  	// whether YouTube was able to process the video or if the video is still being
  8049  	// processed.
  8050  	//
  8051  	// Possible values:
  8052  	//   "processing"
  8053  	//   "succeeded"
  8054  	//   "failed"
  8055  	//   "terminated"
  8056  	ProcessingStatus string `json:"processingStatus,omitempty"`
  8057  	// TagSuggestionsAvailability: This value indicates whether keyword (tag)
  8058  	// suggestions are available for the video. Tags can be added to a video's
  8059  	// metadata to make it easier for other users to find the video. You can
  8060  	// retrieve these suggestions by requesting the suggestions part in your
  8061  	// videos.list() request.
  8062  	TagSuggestionsAvailability string `json:"tagSuggestionsAvailability,omitempty"`
  8063  	// ThumbnailsAvailability: This value indicates whether thumbnail images have
  8064  	// been generated for the video.
  8065  	ThumbnailsAvailability string `json:"thumbnailsAvailability,omitempty"`
  8066  	// ForceSendFields is a list of field names (e.g.
  8067  	// "EditorSuggestionsAvailability") to unconditionally include in API requests.
  8068  	// By default, fields with empty or default values are omitted from API
  8069  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  8070  	// for more details.
  8071  	ForceSendFields []string `json:"-"`
  8072  	// NullFields is a list of field names (e.g. "EditorSuggestionsAvailability")
  8073  	// to include in API requests with the JSON null value. By default, fields with
  8074  	// empty values are omitted from API requests. See
  8075  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8076  	NullFields []string `json:"-"`
  8077  }
  8078  
  8079  func (s *VideoProcessingDetails) MarshalJSON() ([]byte, error) {
  8080  	type NoMethod VideoProcessingDetails
  8081  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8082  }
  8083  
  8084  // VideoProcessingDetailsProcessingProgress: Video processing progress and
  8085  // completion time estimate.
  8086  type VideoProcessingDetailsProcessingProgress struct {
  8087  	// PartsProcessed: The number of parts of the video that YouTube has already
  8088  	// processed. You can estimate the percentage of the video that YouTube has
  8089  	// already processed by calculating: 100 * parts_processed / parts_total Note
  8090  	// that since the estimated number of parts could increase without a
  8091  	// corresponding increase in the number of parts that have already been
  8092  	// processed, it is possible that the calculated progress could periodically
  8093  	// decrease while YouTube processes a video.
  8094  	PartsProcessed uint64 `json:"partsProcessed,omitempty,string"`
  8095  	// PartsTotal: An estimate of the total number of parts that need to be
  8096  	// processed for the video. The number may be updated with more precise
  8097  	// estimates while YouTube processes the video.
  8098  	PartsTotal uint64 `json:"partsTotal,omitempty,string"`
  8099  	// TimeLeftMs: An estimate of the amount of time, in millseconds, that YouTube
  8100  	// needs to finish processing the video.
  8101  	TimeLeftMs uint64 `json:"timeLeftMs,omitempty,string"`
  8102  	// ForceSendFields is a list of field names (e.g. "PartsProcessed") to
  8103  	// unconditionally include in API requests. By default, fields with empty or
  8104  	// default values are omitted from API requests. See
  8105  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8106  	// details.
  8107  	ForceSendFields []string `json:"-"`
  8108  	// NullFields is a list of field names (e.g. "PartsProcessed") to include in
  8109  	// API requests with the JSON null value. By default, fields with empty values
  8110  	// are omitted from API requests. See
  8111  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8112  	NullFields []string `json:"-"`
  8113  }
  8114  
  8115  func (s *VideoProcessingDetailsProcessingProgress) MarshalJSON() ([]byte, error) {
  8116  	type NoMethod VideoProcessingDetailsProcessingProgress
  8117  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8118  }
  8119  
  8120  // VideoProjectDetails: DEPRECATED. b/157517979: This part was never populated
  8121  // after it was added. However, it sees non-zero traffic because there is
  8122  // generated client code in the wild that refers to it [1]. We keep this field
  8123  // and do NOT remove it because otherwise V3 would return an error when this
  8124  // part gets requested [2]. [1]
  8125  // https://developers.google.com/resources/api-libraries/documentation/youtube/v3/csharp/latest/classGoogle_1_1Apis_1_1YouTube_1_1v3_1_1Data_1_1VideoProjectDetails.html
  8126  // [2]
  8127  // http://google3/video/youtube/src/python/servers/data_api/common.py?l=1565-1569&rcl=344141677
  8128  type VideoProjectDetails struct {
  8129  }
  8130  
  8131  // VideoRating: Basic details about rating of a video.
  8132  type VideoRating struct {
  8133  	// Rating: Rating of a video.
  8134  	//
  8135  	// Possible values:
  8136  	//   "none"
  8137  	//   "like" - The entity is liked.
  8138  	//   "dislike" - The entity is disliked.
  8139  	Rating string `json:"rating,omitempty"`
  8140  	// VideoId: The ID that YouTube uses to uniquely identify the video.
  8141  	VideoId string `json:"videoId,omitempty"`
  8142  	// ForceSendFields is a list of field names (e.g. "Rating") to unconditionally
  8143  	// include in API requests. By default, fields with empty or default values are
  8144  	// omitted from API requests. See
  8145  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8146  	// details.
  8147  	ForceSendFields []string `json:"-"`
  8148  	// NullFields is a list of field names (e.g. "Rating") to include in API
  8149  	// requests with the JSON null value. By default, fields with empty values are
  8150  	// omitted from API requests. See
  8151  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8152  	NullFields []string `json:"-"`
  8153  }
  8154  
  8155  func (s *VideoRating) MarshalJSON() ([]byte, error) {
  8156  	type NoMethod VideoRating
  8157  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8158  }
  8159  
  8160  // VideoRecordingDetails: Recording information associated with the video.
  8161  type VideoRecordingDetails struct {
  8162  	// Location: The geolocation information associated with the video.
  8163  	Location *GeoPoint `json:"location,omitempty"`
  8164  	// LocationDescription: The text description of the location where the video
  8165  	// was recorded.
  8166  	LocationDescription string `json:"locationDescription,omitempty"`
  8167  	// RecordingDate: The date and time when the video was recorded.
  8168  	RecordingDate string `json:"recordingDate,omitempty"`
  8169  	// ForceSendFields is a list of field names (e.g. "Location") to
  8170  	// unconditionally include in API requests. By default, fields with empty or
  8171  	// default values are omitted from API requests. See
  8172  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8173  	// details.
  8174  	ForceSendFields []string `json:"-"`
  8175  	// NullFields is a list of field names (e.g. "Location") to include in API
  8176  	// requests with the JSON null value. By default, fields with empty values are
  8177  	// omitted from API requests. See
  8178  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8179  	NullFields []string `json:"-"`
  8180  }
  8181  
  8182  func (s *VideoRecordingDetails) MarshalJSON() ([]byte, error) {
  8183  	type NoMethod VideoRecordingDetails
  8184  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8185  }
  8186  
  8187  // VideoSnippet: Basic details about a video, including title, description,
  8188  // uploader, thumbnails and category.
  8189  type VideoSnippet struct {
  8190  	// CategoryId: The YouTube video category associated with the video.
  8191  	CategoryId string `json:"categoryId,omitempty"`
  8192  	// ChannelId: The ID that YouTube uses to uniquely identify the channel that
  8193  	// the video was uploaded to.
  8194  	ChannelId string `json:"channelId,omitempty"`
  8195  	// ChannelTitle: Channel title for the channel that the video belongs to.
  8196  	ChannelTitle string `json:"channelTitle,omitempty"`
  8197  	// DefaultAudioLanguage: The default_audio_language property specifies the
  8198  	// language spoken in the video's default audio track.
  8199  	DefaultAudioLanguage string `json:"defaultAudioLanguage,omitempty"`
  8200  	// DefaultLanguage: The language of the videos's default snippet.
  8201  	DefaultLanguage string `json:"defaultLanguage,omitempty"`
  8202  	// Description: The video's description. @mutable youtube.videos.insert
  8203  	// youtube.videos.update
  8204  	Description string `json:"description,omitempty"`
  8205  	// LiveBroadcastContent: Indicates if the video is an upcoming/active live
  8206  	// broadcast. Or it's "none" if the video is not an upcoming/active live
  8207  	// broadcast.
  8208  	//
  8209  	// Possible values:
  8210  	//   "none"
  8211  	//   "upcoming" - The live broadcast is upcoming.
  8212  	//   "live" - The live broadcast is active.
  8213  	//   "completed" - The live broadcast has been completed.
  8214  	LiveBroadcastContent string `json:"liveBroadcastContent,omitempty"`
  8215  	// Localized: Localized snippet selected with the hl parameter. If no such
  8216  	// localization exists, this field is populated with the default snippet.
  8217  	// (Read-only)
  8218  	Localized *VideoLocalization `json:"localized,omitempty"`
  8219  	// PublishedAt: The date and time when the video was uploaded.
  8220  	PublishedAt string `json:"publishedAt,omitempty"`
  8221  	// Tags: A list of keyword tags associated with the video. Tags may contain
  8222  	// spaces.
  8223  	Tags []string `json:"tags,omitempty"`
  8224  	// Thumbnails: A map of thumbnail images associated with the video. For each
  8225  	// object in the map, the key is the name of the thumbnail image, and the value
  8226  	// is an object that contains other information about the thumbnail.
  8227  	Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"`
  8228  	// Title: The video's title. @mutable youtube.videos.insert
  8229  	// youtube.videos.update
  8230  	Title string `json:"title,omitempty"`
  8231  	// ForceSendFields is a list of field names (e.g. "CategoryId") to
  8232  	// unconditionally include in API requests. By default, fields with empty or
  8233  	// default values are omitted from API requests. See
  8234  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8235  	// details.
  8236  	ForceSendFields []string `json:"-"`
  8237  	// NullFields is a list of field names (e.g. "CategoryId") to include in API
  8238  	// requests with the JSON null value. By default, fields with empty values are
  8239  	// omitted from API requests. See
  8240  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8241  	NullFields []string `json:"-"`
  8242  }
  8243  
  8244  func (s *VideoSnippet) MarshalJSON() ([]byte, error) {
  8245  	type NoMethod VideoSnippet
  8246  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8247  }
  8248  
  8249  // VideoStatistics: Statistics about the video, such as the number of times the
  8250  // video was viewed or liked.
  8251  type VideoStatistics struct {
  8252  	// CommentCount: The number of comments for the video.
  8253  	CommentCount uint64 `json:"commentCount,omitempty,string"`
  8254  	// DislikeCount: The number of users who have indicated that they disliked the
  8255  	// video by giving it a negative rating.
  8256  	DislikeCount uint64 `json:"dislikeCount,omitempty,string"`
  8257  	// FavoriteCount: The number of users who currently have the video marked as a
  8258  	// favorite video.
  8259  	FavoriteCount uint64 `json:"favoriteCount,omitempty,string"`
  8260  	// LikeCount: The number of users who have indicated that they liked the video
  8261  	// by giving it a positive rating.
  8262  	LikeCount uint64 `json:"likeCount,omitempty,string"`
  8263  	// ViewCount: The number of times the video has been viewed.
  8264  	ViewCount uint64 `json:"viewCount,omitempty,string"`
  8265  	// ForceSendFields is a list of field names (e.g. "CommentCount") to
  8266  	// unconditionally include in API requests. By default, fields with empty or
  8267  	// default values are omitted from API requests. See
  8268  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8269  	// details.
  8270  	ForceSendFields []string `json:"-"`
  8271  	// NullFields is a list of field names (e.g. "CommentCount") to include in API
  8272  	// requests with the JSON null value. By default, fields with empty values are
  8273  	// omitted from API requests. See
  8274  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8275  	NullFields []string `json:"-"`
  8276  }
  8277  
  8278  func (s *VideoStatistics) MarshalJSON() ([]byte, error) {
  8279  	type NoMethod VideoStatistics
  8280  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8281  }
  8282  
  8283  // VideoStatus: Basic details about a video category, such as its localized
  8284  // title. Next Id: 18
  8285  type VideoStatus struct {
  8286  	// Embeddable: This value indicates if the video can be embedded on another
  8287  	// website. @mutable youtube.videos.insert youtube.videos.update
  8288  	Embeddable bool `json:"embeddable,omitempty"`
  8289  	// FailureReason: This value explains why a video failed to upload. This
  8290  	// property is only present if the uploadStatus property indicates that the
  8291  	// upload failed.
  8292  	//
  8293  	// Possible values:
  8294  	//   "conversion" - Unable to convert video content.
  8295  	//   "invalidFile" - Invalid file format.
  8296  	//   "emptyFile" - Empty file.
  8297  	//   "tooSmall" - File was too small.
  8298  	//   "codec" - Unsupported codec.
  8299  	//   "uploadAborted" - Upload wasn't finished.
  8300  	FailureReason string `json:"failureReason,omitempty"`
  8301  	// License: The video's license. @mutable youtube.videos.insert
  8302  	// youtube.videos.update
  8303  	//
  8304  	// Possible values:
  8305  	//   "youtube"
  8306  	//   "creativeCommon"
  8307  	License     string `json:"license,omitempty"`
  8308  	MadeForKids bool   `json:"madeForKids,omitempty"`
  8309  	// PrivacyStatus: The video's privacy status.
  8310  	//
  8311  	// Possible values:
  8312  	//   "public"
  8313  	//   "unlisted"
  8314  	//   "private"
  8315  	PrivacyStatus string `json:"privacyStatus,omitempty"`
  8316  	// PublicStatsViewable: This value indicates if the extended video statistics
  8317  	// on the watch page can be viewed by everyone. Note that the view count,
  8318  	// likes, etc will still be visible if this is disabled. @mutable
  8319  	// youtube.videos.insert youtube.videos.update
  8320  	PublicStatsViewable bool `json:"publicStatsViewable,omitempty"`
  8321  	// PublishAt: The date and time when the video is scheduled to publish. It can
  8322  	// be set only if the privacy status of the video is private..
  8323  	PublishAt string `json:"publishAt,omitempty"`
  8324  	// RejectionReason: This value explains why YouTube rejected an uploaded video.
  8325  	// This property is only present if the uploadStatus property indicates that
  8326  	// the upload was rejected.
  8327  	//
  8328  	// Possible values:
  8329  	//   "copyright" - Copyright infringement.
  8330  	//   "inappropriate" - Inappropriate video content.
  8331  	//   "duplicate" - Duplicate upload in the same channel.
  8332  	//   "termsOfUse" - Terms of use violation.
  8333  	//   "uploaderAccountSuspended" - Uploader account was suspended.
  8334  	//   "length" - Video duration was too long.
  8335  	//   "claim" - Blocked by content owner.
  8336  	//   "uploaderAccountClosed" - Uploader closed his/her account.
  8337  	//   "trademark" - Trademark infringement.
  8338  	//   "legal" - An unspecified legal reason.
  8339  	RejectionReason         string `json:"rejectionReason,omitempty"`
  8340  	SelfDeclaredMadeForKids bool   `json:"selfDeclaredMadeForKids,omitempty"`
  8341  	// UploadStatus: The status of the uploaded video.
  8342  	//
  8343  	// Possible values:
  8344  	//   "uploaded" - Video has been uploaded but not processed yet.
  8345  	//   "processed" - Video has been successfully processed.
  8346  	//   "failed" - Processing has failed. See FailureReason.
  8347  	//   "rejected" - Video has been rejected. See RejectionReason.
  8348  	//   "deleted" - Video has been deleted.
  8349  	UploadStatus string `json:"uploadStatus,omitempty"`
  8350  	// ForceSendFields is a list of field names (e.g. "Embeddable") to
  8351  	// unconditionally include in API requests. By default, fields with empty or
  8352  	// default values are omitted from API requests. See
  8353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8354  	// details.
  8355  	ForceSendFields []string `json:"-"`
  8356  	// NullFields is a list of field names (e.g. "Embeddable") to include in API
  8357  	// requests with the JSON null value. By default, fields with empty values are
  8358  	// omitted from API requests. See
  8359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8360  	NullFields []string `json:"-"`
  8361  }
  8362  
  8363  func (s *VideoStatus) MarshalJSON() ([]byte, error) {
  8364  	type NoMethod VideoStatus
  8365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8366  }
  8367  
  8368  // VideoSuggestions: Specifies suggestions on how to improve video content,
  8369  // including encoding hints, tag suggestions, and editor suggestions.
  8370  type VideoSuggestions struct {
  8371  	// EditorSuggestions: A list of video editing operations that might improve the
  8372  	// video quality or playback experience of the uploaded video.
  8373  	//
  8374  	// Possible values:
  8375  	//   "videoAutoLevels" - Picture brightness levels seem off and could be
  8376  	// corrected.
  8377  	//   "videoStabilize" - The video appears shaky and could be stabilized.
  8378  	//   "videoCrop" - Margins (mattes) detected around the picture could be
  8379  	// cropped.
  8380  	//   "audioQuietAudioSwap" - The audio track appears silent and could be
  8381  	// swapped with a better quality one.
  8382  	EditorSuggestions []string `json:"editorSuggestions,omitempty"`
  8383  	// ProcessingErrors: A list of errors that will prevent YouTube from
  8384  	// successfully processing the uploaded video video. These errors indicate
  8385  	// that, regardless of the video's current processing status, eventually, that
  8386  	// status will almost certainly be failed.
  8387  	//
  8388  	// Possible values:
  8389  	//   "audioFile" - File contains audio only (e.g., an MP3 file).
  8390  	//   "imageFile" - Image file (e.g., a JPEG image).
  8391  	//   "projectFile" - Movie project file (e.g., Microsoft Windows Movie Maker
  8392  	// project).
  8393  	//   "notAVideoFile" - Other non-video file.
  8394  	//   "docFile" - Document or text file (e.g., MS Word document).
  8395  	//   "archiveFile" - An archive file (e.g., a ZIP archive).
  8396  	//   "unsupportedSpatialAudioLayout" - Unsupported spatial audio layout type.
  8397  	ProcessingErrors []string `json:"processingErrors,omitempty"`
  8398  	// ProcessingHints: A list of suggestions that may improve YouTube's ability to
  8399  	// process the video.
  8400  	//
  8401  	// Possible values:
  8402  	//   "nonStreamableMov" - The MP4 file is not streamable, this will slow down
  8403  	// the processing. MOOV atom was not found at the beginning of the file.
  8404  	//   "sendBestQualityVideo" - Probably a better quality version of the video
  8405  	// exists. The video has wide screen aspect ratio, but is not an HD video.
  8406  	//   "sphericalVideo" - Uploaded video is spherical video.
  8407  	//   "spatialAudio" - Uploaded video has spatial audio.
  8408  	//   "vrVideo" - Uploaded video is VR video.
  8409  	//   "hdrVideo" - Uploaded video is HDR video.
  8410  	ProcessingHints []string `json:"processingHints,omitempty"`
  8411  	// ProcessingWarnings: A list of reasons why YouTube may have difficulty
  8412  	// transcoding the uploaded video or that might result in an erroneous
  8413  	// transcoding. These warnings are generated before YouTube actually processes
  8414  	// the uploaded video file. In addition, they identify issues that are unlikely
  8415  	// to cause the video processing to fail but that might cause problems such as
  8416  	// sync issues, video artifacts, or a missing audio track.
  8417  	//
  8418  	// Possible values:
  8419  	//   "unknownContainer" - Unrecognized file format, transcoding is likely to
  8420  	// fail.
  8421  	//   "unknownVideoCodec" - Unrecognized video codec, transcoding is likely to
  8422  	// fail.
  8423  	//   "unknownAudioCodec" - Unrecognized audio codec, transcoding is likely to
  8424  	// fail.
  8425  	//   "inconsistentResolution" - Conflicting container and stream resolutions.
  8426  	//   "hasEditlist" - Edit lists are not currently supported.
  8427  	//   "problematicVideoCodec" - Video codec that is known to cause problems was
  8428  	// used.
  8429  	//   "problematicAudioCodec" - Audio codec that is known to cause problems was
  8430  	// used.
  8431  	//   "unsupportedVrStereoMode" - Unsupported VR video stereo mode.
  8432  	//   "unsupportedSphericalProjectionType" - Unsupported spherical video
  8433  	// projection type.
  8434  	//   "unsupportedHdrPixelFormat" - Unsupported HDR pixel format.
  8435  	//   "unsupportedHdrColorMetadata" - Unspecified HDR color metadata.
  8436  	//   "problematicHdrLookupTable" - Problematic HDR lookup table attached.
  8437  	ProcessingWarnings []string `json:"processingWarnings,omitempty"`
  8438  	// TagSuggestions: A list of keyword tags that could be added to the video's
  8439  	// metadata to increase the likelihood that users will locate your video when
  8440  	// searching or browsing on YouTube.
  8441  	TagSuggestions []*VideoSuggestionsTagSuggestion `json:"tagSuggestions,omitempty"`
  8442  	// ForceSendFields is a list of field names (e.g. "EditorSuggestions") to
  8443  	// unconditionally include in API requests. By default, fields with empty or
  8444  	// default values are omitted from API requests. See
  8445  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8446  	// details.
  8447  	ForceSendFields []string `json:"-"`
  8448  	// NullFields is a list of field names (e.g. "EditorSuggestions") to include in
  8449  	// API requests with the JSON null value. By default, fields with empty values
  8450  	// are omitted from API requests. See
  8451  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8452  	NullFields []string `json:"-"`
  8453  }
  8454  
  8455  func (s *VideoSuggestions) MarshalJSON() ([]byte, error) {
  8456  	type NoMethod VideoSuggestions
  8457  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8458  }
  8459  
  8460  // VideoSuggestionsTagSuggestion: A single tag suggestion with it's relevance
  8461  // information.
  8462  type VideoSuggestionsTagSuggestion struct {
  8463  	// CategoryRestricts: A set of video categories for which the tag is relevant.
  8464  	// You can use this information to display appropriate tag suggestions based on
  8465  	// the video category that the video uploader associates with the video. By
  8466  	// default, tag suggestions are relevant for all categories if there are no
  8467  	// restricts defined for the keyword.
  8468  	CategoryRestricts []string `json:"categoryRestricts,omitempty"`
  8469  	// Tag: The keyword tag suggested for the video.
  8470  	Tag string `json:"tag,omitempty"`
  8471  	// ForceSendFields is a list of field names (e.g. "CategoryRestricts") to
  8472  	// unconditionally include in API requests. By default, fields with empty or
  8473  	// default values are omitted from API requests. See
  8474  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8475  	// details.
  8476  	ForceSendFields []string `json:"-"`
  8477  	// NullFields is a list of field names (e.g. "CategoryRestricts") to include in
  8478  	// API requests with the JSON null value. By default, fields with empty values
  8479  	// are omitted from API requests. See
  8480  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8481  	NullFields []string `json:"-"`
  8482  }
  8483  
  8484  func (s *VideoSuggestionsTagSuggestion) MarshalJSON() ([]byte, error) {
  8485  	type NoMethod VideoSuggestionsTagSuggestion
  8486  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8487  }
  8488  
  8489  // VideoTopicDetails: Freebase topic information related to the video.
  8490  type VideoTopicDetails struct {
  8491  	// RelevantTopicIds: Similar to topic_id, except that these topics are merely
  8492  	// relevant to the video. These are topics that may be mentioned in, or appear
  8493  	// in the video. You can retrieve information about each topic using Freebase
  8494  	// Topic API.
  8495  	RelevantTopicIds []string `json:"relevantTopicIds,omitempty"`
  8496  	// TopicCategories: A list of Wikipedia URLs that provide a high-level
  8497  	// description of the video's content.
  8498  	TopicCategories []string `json:"topicCategories,omitempty"`
  8499  	// TopicIds: A list of Freebase topic IDs that are centrally associated with
  8500  	// the video. These are topics that are centrally featured in the video, and it
  8501  	// can be said that the video is mainly about each of these. You can retrieve
  8502  	// information about each topic using the < a
  8503  	// href="http://wiki.freebase.com/wiki/Topic_API">Freebase Topic API.
  8504  	TopicIds []string `json:"topicIds,omitempty"`
  8505  	// ForceSendFields is a list of field names (e.g. "RelevantTopicIds") to
  8506  	// unconditionally include in API requests. By default, fields with empty or
  8507  	// default values are omitted from API requests. See
  8508  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8509  	// details.
  8510  	ForceSendFields []string `json:"-"`
  8511  	// NullFields is a list of field names (e.g. "RelevantTopicIds") to include in
  8512  	// API requests with the JSON null value. By default, fields with empty values
  8513  	// are omitted from API requests. See
  8514  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8515  	NullFields []string `json:"-"`
  8516  }
  8517  
  8518  func (s *VideoTopicDetails) MarshalJSON() ([]byte, error) {
  8519  	type NoMethod VideoTopicDetails
  8520  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8521  }
  8522  
  8523  // WatchSettings: Branding properties for the watch. All deprecated.
  8524  type WatchSettings struct {
  8525  	// BackgroundColor: The text color for the video watch page's branded area.
  8526  	BackgroundColor string `json:"backgroundColor,omitempty"`
  8527  	// FeaturedPlaylistId: An ID that uniquely identifies a playlist that displays
  8528  	// next to the video player.
  8529  	FeaturedPlaylistId string `json:"featuredPlaylistId,omitempty"`
  8530  	// TextColor: The background color for the video watch page's branded area.
  8531  	TextColor string `json:"textColor,omitempty"`
  8532  	// ForceSendFields is a list of field names (e.g. "BackgroundColor") to
  8533  	// unconditionally include in API requests. By default, fields with empty or
  8534  	// default values are omitted from API requests. See
  8535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8536  	// details.
  8537  	ForceSendFields []string `json:"-"`
  8538  	// NullFields is a list of field names (e.g. "BackgroundColor") to include in
  8539  	// API requests with the JSON null value. By default, fields with empty values
  8540  	// are omitted from API requests. See
  8541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8542  	NullFields []string `json:"-"`
  8543  }
  8544  
  8545  func (s *WatchSettings) MarshalJSON() ([]byte, error) {
  8546  	type NoMethod WatchSettings
  8547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8548  }
  8549  
  8550  type AbuseReportsInsertCall struct {
  8551  	s           *Service
  8552  	abusereport *AbuseReport
  8553  	urlParams_  gensupport.URLParams
  8554  	ctx_        context.Context
  8555  	header_     http.Header
  8556  }
  8557  
  8558  // Insert: Inserts a new resource into this collection.
  8559  //
  8560  //   - part: The *part* parameter serves two purposes in this operation. It
  8561  //     identifies the properties that the write operation will set as well as the
  8562  //     properties that the API response will include.
  8563  func (r *AbuseReportsService) Insert(part []string, abusereport *AbuseReport) *AbuseReportsInsertCall {
  8564  	c := &AbuseReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8565  	c.urlParams_.SetMulti("part", append([]string{}, part...))
  8566  	c.abusereport = abusereport
  8567  	return c
  8568  }
  8569  
  8570  // Fields allows partial responses to be retrieved. See
  8571  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8572  // details.
  8573  func (c *AbuseReportsInsertCall) Fields(s ...googleapi.Field) *AbuseReportsInsertCall {
  8574  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8575  	return c
  8576  }
  8577  
  8578  // Context sets the context to be used in this call's Do method.
  8579  func (c *AbuseReportsInsertCall) Context(ctx context.Context) *AbuseReportsInsertCall {
  8580  	c.ctx_ = ctx
  8581  	return c
  8582  }
  8583  
  8584  // Header returns a http.Header that can be modified by the caller to add
  8585  // headers to the request.
  8586  func (c *AbuseReportsInsertCall) Header() http.Header {
  8587  	if c.header_ == nil {
  8588  		c.header_ = make(http.Header)
  8589  	}
  8590  	return c.header_
  8591  }
  8592  
  8593  func (c *AbuseReportsInsertCall) doRequest(alt string) (*http.Response, error) {
  8594  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8595  	var body io.Reader = nil
  8596  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.abusereport)
  8597  	if err != nil {
  8598  		return nil, err
  8599  	}
  8600  	c.urlParams_.Set("alt", alt)
  8601  	c.urlParams_.Set("prettyPrint", "false")
  8602  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/abuseReports")
  8603  	urls += "?" + c.urlParams_.Encode()
  8604  	req, err := http.NewRequest("POST", urls, body)
  8605  	if err != nil {
  8606  		return nil, err
  8607  	}
  8608  	req.Header = reqHeaders
  8609  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8610  }
  8611  
  8612  // Do executes the "youtube.abuseReports.insert" call.
  8613  // Any non-2xx status code is an error. Response headers are in either
  8614  // *AbuseReport.ServerResponse.Header or (if a response was returned at all) in
  8615  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8616  // whether the returned error was because http.StatusNotModified was returned.
  8617  func (c *AbuseReportsInsertCall) Do(opts ...googleapi.CallOption) (*AbuseReport, error) {
  8618  	gensupport.SetOptions(c.urlParams_, opts...)
  8619  	res, err := c.doRequest("json")
  8620  	if res != nil && res.StatusCode == http.StatusNotModified {
  8621  		if res.Body != nil {
  8622  			res.Body.Close()
  8623  		}
  8624  		return nil, gensupport.WrapError(&googleapi.Error{
  8625  			Code:   res.StatusCode,
  8626  			Header: res.Header,
  8627  		})
  8628  	}
  8629  	if err != nil {
  8630  		return nil, err
  8631  	}
  8632  	defer googleapi.CloseBody(res)
  8633  	if err := googleapi.CheckResponse(res); err != nil {
  8634  		return nil, gensupport.WrapError(err)
  8635  	}
  8636  	ret := &AbuseReport{
  8637  		ServerResponse: googleapi.ServerResponse{
  8638  			Header:         res.Header,
  8639  			HTTPStatusCode: res.StatusCode,
  8640  		},
  8641  	}
  8642  	target := &ret
  8643  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8644  		return nil, err
  8645  	}
  8646  	return ret, nil
  8647  }
  8648  
  8649  type ActivitiesListCall struct {
  8650  	s            *Service
  8651  	urlParams_   gensupport.URLParams
  8652  	ifNoneMatch_ string
  8653  	ctx_         context.Context
  8654  	header_      http.Header
  8655  }
  8656  
  8657  // List: Retrieves a list of resources, possibly filtered.
  8658  //
  8659  //   - part: The *part* parameter specifies a comma-separated list of one or more
  8660  //     activity resource properties that the API response will include. If the
  8661  //     parameter identifies a property that contains child properties, the child
  8662  //     properties will be included in the response. For example, in an activity
  8663  //     resource, the snippet property contains other properties that identify the
  8664  //     type of activity, a display title for the activity, and so forth. If you
  8665  //     set *part=snippet*, the API response will also contain all of those nested
  8666  //     properties.
  8667  func (r *ActivitiesService) List(part []string) *ActivitiesListCall {
  8668  	c := &ActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8669  	c.urlParams_.SetMulti("part", append([]string{}, part...))
  8670  	return c
  8671  }
  8672  
  8673  // ChannelId sets the optional parameter "channelId":
  8674  func (c *ActivitiesListCall) ChannelId(channelId string) *ActivitiesListCall {
  8675  	c.urlParams_.Set("channelId", channelId)
  8676  	return c
  8677  }
  8678  
  8679  // Home sets the optional parameter "home":
  8680  func (c *ActivitiesListCall) Home(home bool) *ActivitiesListCall {
  8681  	c.urlParams_.Set("home", fmt.Sprint(home))
  8682  	return c
  8683  }
  8684  
  8685  // MaxResults sets the optional parameter "maxResults": The *maxResults*
  8686  // parameter specifies the maximum number of items that should be returned in
  8687  // the result set.
  8688  func (c *ActivitiesListCall) MaxResults(maxResults int64) *ActivitiesListCall {
  8689  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  8690  	return c
  8691  }
  8692  
  8693  // Mine sets the optional parameter "mine":
  8694  func (c *ActivitiesListCall) Mine(mine bool) *ActivitiesListCall {
  8695  	c.urlParams_.Set("mine", fmt.Sprint(mine))
  8696  	return c
  8697  }
  8698  
  8699  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
  8700  // identifies a specific page in the result set that should be returned. In an
  8701  // API response, the nextPageToken and prevPageToken properties identify other
  8702  // pages that could be retrieved.
  8703  func (c *ActivitiesListCall) PageToken(pageToken string) *ActivitiesListCall {
  8704  	c.urlParams_.Set("pageToken", pageToken)
  8705  	return c
  8706  }
  8707  
  8708  // PublishedAfter sets the optional parameter "publishedAfter":
  8709  func (c *ActivitiesListCall) PublishedAfter(publishedAfter string) *ActivitiesListCall {
  8710  	c.urlParams_.Set("publishedAfter", publishedAfter)
  8711  	return c
  8712  }
  8713  
  8714  // PublishedBefore sets the optional parameter "publishedBefore":
  8715  func (c *ActivitiesListCall) PublishedBefore(publishedBefore string) *ActivitiesListCall {
  8716  	c.urlParams_.Set("publishedBefore", publishedBefore)
  8717  	return c
  8718  }
  8719  
  8720  // RegionCode sets the optional parameter "regionCode":
  8721  func (c *ActivitiesListCall) RegionCode(regionCode string) *ActivitiesListCall {
  8722  	c.urlParams_.Set("regionCode", regionCode)
  8723  	return c
  8724  }
  8725  
  8726  // Fields allows partial responses to be retrieved. See
  8727  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8728  // details.
  8729  func (c *ActivitiesListCall) Fields(s ...googleapi.Field) *ActivitiesListCall {
  8730  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8731  	return c
  8732  }
  8733  
  8734  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8735  // object's ETag matches the given value. This is useful for getting updates
  8736  // only after the object has changed since the last request.
  8737  func (c *ActivitiesListCall) IfNoneMatch(entityTag string) *ActivitiesListCall {
  8738  	c.ifNoneMatch_ = entityTag
  8739  	return c
  8740  }
  8741  
  8742  // Context sets the context to be used in this call's Do method.
  8743  func (c *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
  8744  	c.ctx_ = ctx
  8745  	return c
  8746  }
  8747  
  8748  // Header returns a http.Header that can be modified by the caller to add
  8749  // headers to the request.
  8750  func (c *ActivitiesListCall) Header() http.Header {
  8751  	if c.header_ == nil {
  8752  		c.header_ = make(http.Header)
  8753  	}
  8754  	return c.header_
  8755  }
  8756  
  8757  func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
  8758  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8759  	if c.ifNoneMatch_ != "" {
  8760  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8761  	}
  8762  	var body io.Reader = nil
  8763  	c.urlParams_.Set("alt", alt)
  8764  	c.urlParams_.Set("prettyPrint", "false")
  8765  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/activities")
  8766  	urls += "?" + c.urlParams_.Encode()
  8767  	req, err := http.NewRequest("GET", urls, body)
  8768  	if err != nil {
  8769  		return nil, err
  8770  	}
  8771  	req.Header = reqHeaders
  8772  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8773  }
  8774  
  8775  // Do executes the "youtube.activities.list" call.
  8776  // Any non-2xx status code is an error. Response headers are in either
  8777  // *ActivityListResponse.ServerResponse.Header or (if a response was returned
  8778  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8779  // check whether the returned error was because http.StatusNotModified was
  8780  // returned.
  8781  func (c *ActivitiesListCall) Do(opts ...googleapi.CallOption) (*ActivityListResponse, error) {
  8782  	gensupport.SetOptions(c.urlParams_, opts...)
  8783  	res, err := c.doRequest("json")
  8784  	if res != nil && res.StatusCode == http.StatusNotModified {
  8785  		if res.Body != nil {
  8786  			res.Body.Close()
  8787  		}
  8788  		return nil, gensupport.WrapError(&googleapi.Error{
  8789  			Code:   res.StatusCode,
  8790  			Header: res.Header,
  8791  		})
  8792  	}
  8793  	if err != nil {
  8794  		return nil, err
  8795  	}
  8796  	defer googleapi.CloseBody(res)
  8797  	if err := googleapi.CheckResponse(res); err != nil {
  8798  		return nil, gensupport.WrapError(err)
  8799  	}
  8800  	ret := &ActivityListResponse{
  8801  		ServerResponse: googleapi.ServerResponse{
  8802  			Header:         res.Header,
  8803  			HTTPStatusCode: res.StatusCode,
  8804  		},
  8805  	}
  8806  	target := &ret
  8807  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8808  		return nil, err
  8809  	}
  8810  	return ret, nil
  8811  }
  8812  
  8813  // Pages invokes f for each page of results.
  8814  // A non-nil error returned from f will halt the iteration.
  8815  // The provided context supersedes any context provided to the Context method.
  8816  func (c *ActivitiesListCall) Pages(ctx context.Context, f func(*ActivityListResponse) error) error {
  8817  	c.ctx_ = ctx
  8818  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8819  	for {
  8820  		x, err := c.Do()
  8821  		if err != nil {
  8822  			return err
  8823  		}
  8824  		if err := f(x); err != nil {
  8825  			return err
  8826  		}
  8827  		if x.NextPageToken == "" {
  8828  			return nil
  8829  		}
  8830  		c.PageToken(x.NextPageToken)
  8831  	}
  8832  }
  8833  
  8834  type CaptionsDeleteCall struct {
  8835  	s          *Service
  8836  	urlParams_ gensupport.URLParams
  8837  	ctx_       context.Context
  8838  	header_    http.Header
  8839  }
  8840  
  8841  // Delete: Deletes a resource.
  8842  //
  8843  // - id: .
  8844  func (r *CaptionsService) Delete(id string) *CaptionsDeleteCall {
  8845  	c := &CaptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8846  	c.urlParams_.Set("id", id)
  8847  	return c
  8848  }
  8849  
  8850  // OnBehalfOf sets the optional parameter "onBehalfOf": ID of the Google+ Page
  8851  // for the channel that the request is be on behalf of
  8852  func (c *CaptionsDeleteCall) OnBehalfOf(onBehalfOf string) *CaptionsDeleteCall {
  8853  	c.urlParams_.Set("onBehalfOf", onBehalfOf)
  8854  	return c
  8855  }
  8856  
  8857  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  8858  // *Note:* This parameter is intended exclusively for YouTube content partners.
  8859  // The *onBehalfOfContentOwner* parameter indicates that the request's
  8860  // authorization credentials identify a YouTube CMS user who is acting on
  8861  // behalf of the content owner specified in the parameter value. This parameter
  8862  // is intended for YouTube content partners that own and manage many different
  8863  // YouTube channels. It allows content owners to authenticate once and get
  8864  // access to all their video and channel data, without having to provide
  8865  // authentication credentials for each individual channel. The actual CMS
  8866  // account that the user authenticates with must be linked to the specified
  8867  // YouTube content owner.
  8868  func (c *CaptionsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsDeleteCall {
  8869  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  8870  	return c
  8871  }
  8872  
  8873  // Fields allows partial responses to be retrieved. See
  8874  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8875  // details.
  8876  func (c *CaptionsDeleteCall) Fields(s ...googleapi.Field) *CaptionsDeleteCall {
  8877  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8878  	return c
  8879  }
  8880  
  8881  // Context sets the context to be used in this call's Do method.
  8882  func (c *CaptionsDeleteCall) Context(ctx context.Context) *CaptionsDeleteCall {
  8883  	c.ctx_ = ctx
  8884  	return c
  8885  }
  8886  
  8887  // Header returns a http.Header that can be modified by the caller to add
  8888  // headers to the request.
  8889  func (c *CaptionsDeleteCall) Header() http.Header {
  8890  	if c.header_ == nil {
  8891  		c.header_ = make(http.Header)
  8892  	}
  8893  	return c.header_
  8894  }
  8895  
  8896  func (c *CaptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8897  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8898  	var body io.Reader = nil
  8899  	c.urlParams_.Set("alt", alt)
  8900  	c.urlParams_.Set("prettyPrint", "false")
  8901  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
  8902  	urls += "?" + c.urlParams_.Encode()
  8903  	req, err := http.NewRequest("DELETE", urls, body)
  8904  	if err != nil {
  8905  		return nil, err
  8906  	}
  8907  	req.Header = reqHeaders
  8908  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8909  }
  8910  
  8911  // Do executes the "youtube.captions.delete" call.
  8912  func (c *CaptionsDeleteCall) Do(opts ...googleapi.CallOption) error {
  8913  	gensupport.SetOptions(c.urlParams_, opts...)
  8914  	res, err := c.doRequest("json")
  8915  	if err != nil {
  8916  		return err
  8917  	}
  8918  	defer googleapi.CloseBody(res)
  8919  	if err := googleapi.CheckResponse(res); err != nil {
  8920  		return gensupport.WrapError(err)
  8921  	}
  8922  	return nil
  8923  }
  8924  
  8925  type CaptionsDownloadCall struct {
  8926  	s            *Service
  8927  	id           string
  8928  	urlParams_   gensupport.URLParams
  8929  	ifNoneMatch_ string
  8930  	ctx_         context.Context
  8931  	header_      http.Header
  8932  }
  8933  
  8934  // Download: Downloads a caption track.
  8935  //
  8936  // - id: The ID of the caption track to download, required for One Platform.
  8937  func (r *CaptionsService) Download(id string) *CaptionsDownloadCall {
  8938  	c := &CaptionsDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8939  	c.id = id
  8940  	return c
  8941  }
  8942  
  8943  // OnBehalfOf sets the optional parameter "onBehalfOf": ID of the Google+ Page
  8944  // for the channel that the request is be on behalf of
  8945  func (c *CaptionsDownloadCall) OnBehalfOf(onBehalfOf string) *CaptionsDownloadCall {
  8946  	c.urlParams_.Set("onBehalfOf", onBehalfOf)
  8947  	return c
  8948  }
  8949  
  8950  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  8951  // *Note:* This parameter is intended exclusively for YouTube content partners.
  8952  // The *onBehalfOfContentOwner* parameter indicates that the request's
  8953  // authorization credentials identify a YouTube CMS user who is acting on
  8954  // behalf of the content owner specified in the parameter value. This parameter
  8955  // is intended for YouTube content partners that own and manage many different
  8956  // YouTube channels. It allows content owners to authenticate once and get
  8957  // access to all their video and channel data, without having to provide
  8958  // authentication credentials for each individual channel. The actual CMS
  8959  // account that the user authenticates with must be linked to the specified
  8960  // YouTube content owner.
  8961  func (c *CaptionsDownloadCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsDownloadCall {
  8962  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  8963  	return c
  8964  }
  8965  
  8966  // Tfmt sets the optional parameter "tfmt": Convert the captions into this
  8967  // format. Supported options are sbv, srt, and vtt.
  8968  func (c *CaptionsDownloadCall) Tfmt(tfmt string) *CaptionsDownloadCall {
  8969  	c.urlParams_.Set("tfmt", tfmt)
  8970  	return c
  8971  }
  8972  
  8973  // Tlang sets the optional parameter "tlang": tlang is the language code;
  8974  // machine translate the captions into this language.
  8975  func (c *CaptionsDownloadCall) Tlang(tlang string) *CaptionsDownloadCall {
  8976  	c.urlParams_.Set("tlang", tlang)
  8977  	return c
  8978  }
  8979  
  8980  // Fields allows partial responses to be retrieved. See
  8981  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8982  // details.
  8983  func (c *CaptionsDownloadCall) Fields(s ...googleapi.Field) *CaptionsDownloadCall {
  8984  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8985  	return c
  8986  }
  8987  
  8988  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8989  // object's ETag matches the given value. This is useful for getting updates
  8990  // only after the object has changed since the last request.
  8991  func (c *CaptionsDownloadCall) IfNoneMatch(entityTag string) *CaptionsDownloadCall {
  8992  	c.ifNoneMatch_ = entityTag
  8993  	return c
  8994  }
  8995  
  8996  // Context sets the context to be used in this call's Do and Download methods.
  8997  func (c *CaptionsDownloadCall) Context(ctx context.Context) *CaptionsDownloadCall {
  8998  	c.ctx_ = ctx
  8999  	return c
  9000  }
  9001  
  9002  // Header returns a http.Header that can be modified by the caller to add
  9003  // headers to the request.
  9004  func (c *CaptionsDownloadCall) Header() http.Header {
  9005  	if c.header_ == nil {
  9006  		c.header_ = make(http.Header)
  9007  	}
  9008  	return c.header_
  9009  }
  9010  
  9011  func (c *CaptionsDownloadCall) doRequest(alt string) (*http.Response, error) {
  9012  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9013  	if c.ifNoneMatch_ != "" {
  9014  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9015  	}
  9016  	var body io.Reader = nil
  9017  	c.urlParams_.Set("alt", alt)
  9018  	c.urlParams_.Set("prettyPrint", "false")
  9019  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions/{id}")
  9020  	urls += "?" + c.urlParams_.Encode()
  9021  	req, err := http.NewRequest("GET", urls, body)
  9022  	if err != nil {
  9023  		return nil, err
  9024  	}
  9025  	req.Header = reqHeaders
  9026  	googleapi.Expand(req.URL, map[string]string{
  9027  		"id": c.id,
  9028  	})
  9029  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9030  }
  9031  
  9032  // Download fetches the API endpoint's "media" value, instead of the normal
  9033  // API response value. If the returned error is nil, the Response is guaranteed to
  9034  // have a 2xx status code. Callers must close the Response.Body as usual.
  9035  func (c *CaptionsDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  9036  	gensupport.SetOptions(c.urlParams_, opts...)
  9037  	res, err := c.doRequest("media")
  9038  	if err != nil {
  9039  		return nil, err
  9040  	}
  9041  	if err := googleapi.CheckResponse(res); err != nil {
  9042  		res.Body.Close()
  9043  		return nil, gensupport.WrapError(err)
  9044  	}
  9045  	return res, nil
  9046  }
  9047  
  9048  // Do executes the "youtube.captions.download" call.
  9049  func (c *CaptionsDownloadCall) Do(opts ...googleapi.CallOption) error {
  9050  	gensupport.SetOptions(c.urlParams_, opts...)
  9051  	res, err := c.doRequest("json")
  9052  	if err != nil {
  9053  		return err
  9054  	}
  9055  	defer googleapi.CloseBody(res)
  9056  	if err := googleapi.CheckResponse(res); err != nil {
  9057  		return gensupport.WrapError(err)
  9058  	}
  9059  	return nil
  9060  }
  9061  
  9062  type CaptionsInsertCall struct {
  9063  	s          *Service
  9064  	caption    *Caption
  9065  	urlParams_ gensupport.URLParams
  9066  	mediaInfo_ *gensupport.MediaInfo
  9067  	ctx_       context.Context
  9068  	header_    http.Header
  9069  }
  9070  
  9071  // Insert: Inserts a new resource into this collection.
  9072  //
  9073  //   - part: The *part* parameter specifies the caption resource parts that the
  9074  //     API response will include. Set the parameter value to snippet.
  9075  func (r *CaptionsService) Insert(part []string, caption *Caption) *CaptionsInsertCall {
  9076  	c := &CaptionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9077  	c.urlParams_.SetMulti("part", append([]string{}, part...))
  9078  	c.caption = caption
  9079  	return c
  9080  }
  9081  
  9082  // OnBehalfOf sets the optional parameter "onBehalfOf": ID of the Google+ Page
  9083  // for the channel that the request is be on behalf of
  9084  func (c *CaptionsInsertCall) OnBehalfOf(onBehalfOf string) *CaptionsInsertCall {
  9085  	c.urlParams_.Set("onBehalfOf", onBehalfOf)
  9086  	return c
  9087  }
  9088  
  9089  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  9090  // *Note:* This parameter is intended exclusively for YouTube content partners.
  9091  // The *onBehalfOfContentOwner* parameter indicates that the request's
  9092  // authorization credentials identify a YouTube CMS user who is acting on
  9093  // behalf of the content owner specified in the parameter value. This parameter
  9094  // is intended for YouTube content partners that own and manage many different
  9095  // YouTube channels. It allows content owners to authenticate once and get
  9096  // access to all their video and channel data, without having to provide
  9097  // authentication credentials for each individual channel. The actual CMS
  9098  // account that the user authenticates with must be linked to the specified
  9099  // YouTube content owner.
  9100  func (c *CaptionsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsInsertCall {
  9101  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  9102  	return c
  9103  }
  9104  
  9105  // Sync sets the optional parameter "sync": Extra parameter to allow
  9106  // automatically syncing the uploaded caption/transcript with the audio.
  9107  func (c *CaptionsInsertCall) Sync(sync bool) *CaptionsInsertCall {
  9108  	c.urlParams_.Set("sync", fmt.Sprint(sync))
  9109  	return c
  9110  }
  9111  
  9112  // Media specifies the media to upload in one or more chunks. The chunk size
  9113  // may be controlled by supplying a MediaOption generated by
  9114  // googleapi.ChunkSize. The chunk size defaults to
  9115  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  9116  // request will be determined by sniffing the contents of r, unless a
  9117  // MediaOption generated by googleapi.ContentType is supplied.
  9118  // At most one of Media and ResumableMedia may be set.
  9119  func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsInsertCall {
  9120  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  9121  	return c
  9122  }
  9123  
  9124  // ResumableMedia specifies the media to upload in chunks and can be canceled
  9125  // with ctx.
  9126  //
  9127  // Deprecated: use Media instead.
  9128  //
  9129  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  9130  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  9131  // will be auto-detected. The provided ctx will supersede any context
  9132  // previously provided to the Context method.
  9133  func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsInsertCall {
  9134  	c.ctx_ = ctx
  9135  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  9136  	return c
  9137  }
  9138  
  9139  // ProgressUpdater provides a callback function that will be called after every
  9140  // chunk. It should be a low-latency function in order to not slow down the
  9141  // upload operation. This should only be called when using ResumableMedia (as
  9142  // opposed to Media).
  9143  func (c *CaptionsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsInsertCall {
  9144  	c.mediaInfo_.SetProgressUpdater(pu)
  9145  	return c
  9146  }
  9147  
  9148  // Fields allows partial responses to be retrieved. See
  9149  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9150  // details.
  9151  func (c *CaptionsInsertCall) Fields(s ...googleapi.Field) *CaptionsInsertCall {
  9152  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9153  	return c
  9154  }
  9155  
  9156  // Context sets the context to be used in this call's Do method.
  9157  // This context will supersede any context previously provided to the
  9158  // ResumableMedia method.
  9159  func (c *CaptionsInsertCall) Context(ctx context.Context) *CaptionsInsertCall {
  9160  	c.ctx_ = ctx
  9161  	return c
  9162  }
  9163  
  9164  // Header returns a http.Header that can be modified by the caller to add
  9165  // headers to the request.
  9166  func (c *CaptionsInsertCall) Header() http.Header {
  9167  	if c.header_ == nil {
  9168  		c.header_ = make(http.Header)
  9169  	}
  9170  	return c.header_
  9171  }
  9172  
  9173  func (c *CaptionsInsertCall) doRequest(alt string) (*http.Response, error) {
  9174  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9175  	var body io.Reader = nil
  9176  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
  9177  	if err != nil {
  9178  		return nil, err
  9179  	}
  9180  	c.urlParams_.Set("alt", alt)
  9181  	c.urlParams_.Set("prettyPrint", "false")
  9182  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
  9183  	if c.mediaInfo_ != nil {
  9184  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/captions")
  9185  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  9186  	}
  9187  	if body == nil {
  9188  		body = new(bytes.Buffer)
  9189  		reqHeaders.Set("Content-Type", "application/json")
  9190  	}
  9191  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  9192  	defer cleanup()
  9193  	urls += "?" + c.urlParams_.Encode()
  9194  	req, err := http.NewRequest("POST", urls, body)
  9195  	if err != nil {
  9196  		return nil, err
  9197  	}
  9198  	req.Header = reqHeaders
  9199  	req.GetBody = getBody
  9200  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9201  }
  9202  
  9203  // Do executes the "youtube.captions.insert" call.
  9204  // Any non-2xx status code is an error. Response headers are in either
  9205  // *Caption.ServerResponse.Header or (if a response was returned at all) in
  9206  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9207  // whether the returned error was because http.StatusNotModified was returned.
  9208  func (c *CaptionsInsertCall) Do(opts ...googleapi.CallOption) (*Caption, error) {
  9209  	gensupport.SetOptions(c.urlParams_, opts...)
  9210  	res, err := c.doRequest("json")
  9211  	if res != nil && res.StatusCode == http.StatusNotModified {
  9212  		if res.Body != nil {
  9213  			res.Body.Close()
  9214  		}
  9215  		return nil, gensupport.WrapError(&googleapi.Error{
  9216  			Code:   res.StatusCode,
  9217  			Header: res.Header,
  9218  		})
  9219  	}
  9220  	if err != nil {
  9221  		return nil, err
  9222  	}
  9223  	defer googleapi.CloseBody(res)
  9224  	if err := googleapi.CheckResponse(res); err != nil {
  9225  		return nil, gensupport.WrapError(err)
  9226  	}
  9227  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  9228  	if rx != nil {
  9229  		rx.Client = c.s.client
  9230  		rx.UserAgent = c.s.userAgent()
  9231  		ctx := c.ctx_
  9232  		if ctx == nil {
  9233  			ctx = context.TODO()
  9234  		}
  9235  		res, err = rx.Upload(ctx)
  9236  		if err != nil {
  9237  			return nil, err
  9238  		}
  9239  		defer res.Body.Close()
  9240  		if err := googleapi.CheckResponse(res); err != nil {
  9241  			return nil, gensupport.WrapError(err)
  9242  		}
  9243  	}
  9244  	ret := &Caption{
  9245  		ServerResponse: googleapi.ServerResponse{
  9246  			Header:         res.Header,
  9247  			HTTPStatusCode: res.StatusCode,
  9248  		},
  9249  	}
  9250  	target := &ret
  9251  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9252  		return nil, err
  9253  	}
  9254  	return ret, nil
  9255  }
  9256  
  9257  type CaptionsListCall struct {
  9258  	s            *Service
  9259  	urlParams_   gensupport.URLParams
  9260  	ifNoneMatch_ string
  9261  	ctx_         context.Context
  9262  	header_      http.Header
  9263  }
  9264  
  9265  // List: Retrieves a list of resources, possibly filtered.
  9266  //
  9267  //   - part: The *part* parameter specifies a comma-separated list of one or more
  9268  //     caption resource parts that the API response will include. The part names
  9269  //     that you can include in the parameter value are id and snippet.
  9270  //   - videoId: Returns the captions for the specified video.
  9271  func (r *CaptionsService) List(part []string, videoId string) *CaptionsListCall {
  9272  	c := &CaptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9273  	c.urlParams_.SetMulti("part", append([]string{}, part...))
  9274  	c.urlParams_.Set("videoId", videoId)
  9275  	return c
  9276  }
  9277  
  9278  // Id sets the optional parameter "id": Returns the captions with the given IDs
  9279  // for Stubby or Apiary.
  9280  func (c *CaptionsListCall) Id(id ...string) *CaptionsListCall {
  9281  	c.urlParams_.SetMulti("id", append([]string{}, id...))
  9282  	return c
  9283  }
  9284  
  9285  // OnBehalfOf sets the optional parameter "onBehalfOf": ID of the Google+ Page
  9286  // for the channel that the request is on behalf of.
  9287  func (c *CaptionsListCall) OnBehalfOf(onBehalfOf string) *CaptionsListCall {
  9288  	c.urlParams_.Set("onBehalfOf", onBehalfOf)
  9289  	return c
  9290  }
  9291  
  9292  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  9293  // *Note:* This parameter is intended exclusively for YouTube content partners.
  9294  // The *onBehalfOfContentOwner* parameter indicates that the request's
  9295  // authorization credentials identify a YouTube CMS user who is acting on
  9296  // behalf of the content owner specified in the parameter value. This parameter
  9297  // is intended for YouTube content partners that own and manage many different
  9298  // YouTube channels. It allows content owners to authenticate once and get
  9299  // access to all their video and channel data, without having to provide
  9300  // authentication credentials for each individual channel. The actual CMS
  9301  // account that the user authenticates with must be linked to the specified
  9302  // YouTube content owner.
  9303  func (c *CaptionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsListCall {
  9304  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  9305  	return c
  9306  }
  9307  
  9308  // Fields allows partial responses to be retrieved. See
  9309  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9310  // details.
  9311  func (c *CaptionsListCall) Fields(s ...googleapi.Field) *CaptionsListCall {
  9312  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9313  	return c
  9314  }
  9315  
  9316  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9317  // object's ETag matches the given value. This is useful for getting updates
  9318  // only after the object has changed since the last request.
  9319  func (c *CaptionsListCall) IfNoneMatch(entityTag string) *CaptionsListCall {
  9320  	c.ifNoneMatch_ = entityTag
  9321  	return c
  9322  }
  9323  
  9324  // Context sets the context to be used in this call's Do method.
  9325  func (c *CaptionsListCall) Context(ctx context.Context) *CaptionsListCall {
  9326  	c.ctx_ = ctx
  9327  	return c
  9328  }
  9329  
  9330  // Header returns a http.Header that can be modified by the caller to add
  9331  // headers to the request.
  9332  func (c *CaptionsListCall) Header() http.Header {
  9333  	if c.header_ == nil {
  9334  		c.header_ = make(http.Header)
  9335  	}
  9336  	return c.header_
  9337  }
  9338  
  9339  func (c *CaptionsListCall) doRequest(alt string) (*http.Response, error) {
  9340  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9341  	if c.ifNoneMatch_ != "" {
  9342  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9343  	}
  9344  	var body io.Reader = nil
  9345  	c.urlParams_.Set("alt", alt)
  9346  	c.urlParams_.Set("prettyPrint", "false")
  9347  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
  9348  	urls += "?" + c.urlParams_.Encode()
  9349  	req, err := http.NewRequest("GET", urls, body)
  9350  	if err != nil {
  9351  		return nil, err
  9352  	}
  9353  	req.Header = reqHeaders
  9354  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9355  }
  9356  
  9357  // Do executes the "youtube.captions.list" call.
  9358  // Any non-2xx status code is an error. Response headers are in either
  9359  // *CaptionListResponse.ServerResponse.Header or (if a response was returned at
  9360  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9361  // check whether the returned error was because http.StatusNotModified was
  9362  // returned.
  9363  func (c *CaptionsListCall) Do(opts ...googleapi.CallOption) (*CaptionListResponse, error) {
  9364  	gensupport.SetOptions(c.urlParams_, opts...)
  9365  	res, err := c.doRequest("json")
  9366  	if res != nil && res.StatusCode == http.StatusNotModified {
  9367  		if res.Body != nil {
  9368  			res.Body.Close()
  9369  		}
  9370  		return nil, gensupport.WrapError(&googleapi.Error{
  9371  			Code:   res.StatusCode,
  9372  			Header: res.Header,
  9373  		})
  9374  	}
  9375  	if err != nil {
  9376  		return nil, err
  9377  	}
  9378  	defer googleapi.CloseBody(res)
  9379  	if err := googleapi.CheckResponse(res); err != nil {
  9380  		return nil, gensupport.WrapError(err)
  9381  	}
  9382  	ret := &CaptionListResponse{
  9383  		ServerResponse: googleapi.ServerResponse{
  9384  			Header:         res.Header,
  9385  			HTTPStatusCode: res.StatusCode,
  9386  		},
  9387  	}
  9388  	target := &ret
  9389  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9390  		return nil, err
  9391  	}
  9392  	return ret, nil
  9393  }
  9394  
  9395  type CaptionsUpdateCall struct {
  9396  	s          *Service
  9397  	caption    *Caption
  9398  	urlParams_ gensupport.URLParams
  9399  	mediaInfo_ *gensupport.MediaInfo
  9400  	ctx_       context.Context
  9401  	header_    http.Header
  9402  }
  9403  
  9404  // Update: Updates an existing resource.
  9405  //
  9406  //   - part: The *part* parameter specifies a comma-separated list of one or more
  9407  //     caption resource parts that the API response will include. The part names
  9408  //     that you can include in the parameter value are id and snippet.
  9409  func (r *CaptionsService) Update(part []string, caption *Caption) *CaptionsUpdateCall {
  9410  	c := &CaptionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9411  	c.urlParams_.SetMulti("part", append([]string{}, part...))
  9412  	c.caption = caption
  9413  	return c
  9414  }
  9415  
  9416  // OnBehalfOf sets the optional parameter "onBehalfOf": ID of the Google+ Page
  9417  // for the channel that the request is on behalf of.
  9418  func (c *CaptionsUpdateCall) OnBehalfOf(onBehalfOf string) *CaptionsUpdateCall {
  9419  	c.urlParams_.Set("onBehalfOf", onBehalfOf)
  9420  	return c
  9421  }
  9422  
  9423  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  9424  // *Note:* This parameter is intended exclusively for YouTube content partners.
  9425  // The *onBehalfOfContentOwner* parameter indicates that the request's
  9426  // authorization credentials identify a YouTube CMS user who is acting on
  9427  // behalf of the content owner specified in the parameter value. This parameter
  9428  // is intended for YouTube content partners that own and manage many different
  9429  // YouTube channels. It allows content owners to authenticate once and get
  9430  // access to all their video and channel data, without having to provide
  9431  // authentication credentials for each individual channel. The actual CMS
  9432  // account that the user authenticates with must be linked to the specified
  9433  // YouTube content owner.
  9434  func (c *CaptionsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *CaptionsUpdateCall {
  9435  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  9436  	return c
  9437  }
  9438  
  9439  // Sync sets the optional parameter "sync": Extra parameter to allow
  9440  // automatically syncing the uploaded caption/transcript with the audio.
  9441  func (c *CaptionsUpdateCall) Sync(sync bool) *CaptionsUpdateCall {
  9442  	c.urlParams_.Set("sync", fmt.Sprint(sync))
  9443  	return c
  9444  }
  9445  
  9446  // Media specifies the media to upload in one or more chunks. The chunk size
  9447  // may be controlled by supplying a MediaOption generated by
  9448  // googleapi.ChunkSize. The chunk size defaults to
  9449  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  9450  // request will be determined by sniffing the contents of r, unless a
  9451  // MediaOption generated by googleapi.ContentType is supplied.
  9452  // At most one of Media and ResumableMedia may be set.
  9453  func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsUpdateCall {
  9454  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  9455  	return c
  9456  }
  9457  
  9458  // ResumableMedia specifies the media to upload in chunks and can be canceled
  9459  // with ctx.
  9460  //
  9461  // Deprecated: use Media instead.
  9462  //
  9463  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  9464  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  9465  // will be auto-detected. The provided ctx will supersede any context
  9466  // previously provided to the Context method.
  9467  func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsUpdateCall {
  9468  	c.ctx_ = ctx
  9469  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  9470  	return c
  9471  }
  9472  
  9473  // ProgressUpdater provides a callback function that will be called after every
  9474  // chunk. It should be a low-latency function in order to not slow down the
  9475  // upload operation. This should only be called when using ResumableMedia (as
  9476  // opposed to Media).
  9477  func (c *CaptionsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsUpdateCall {
  9478  	c.mediaInfo_.SetProgressUpdater(pu)
  9479  	return c
  9480  }
  9481  
  9482  // Fields allows partial responses to be retrieved. See
  9483  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9484  // details.
  9485  func (c *CaptionsUpdateCall) Fields(s ...googleapi.Field) *CaptionsUpdateCall {
  9486  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9487  	return c
  9488  }
  9489  
  9490  // Context sets the context to be used in this call's Do method.
  9491  // This context will supersede any context previously provided to the
  9492  // ResumableMedia method.
  9493  func (c *CaptionsUpdateCall) Context(ctx context.Context) *CaptionsUpdateCall {
  9494  	c.ctx_ = ctx
  9495  	return c
  9496  }
  9497  
  9498  // Header returns a http.Header that can be modified by the caller to add
  9499  // headers to the request.
  9500  func (c *CaptionsUpdateCall) Header() http.Header {
  9501  	if c.header_ == nil {
  9502  		c.header_ = make(http.Header)
  9503  	}
  9504  	return c.header_
  9505  }
  9506  
  9507  func (c *CaptionsUpdateCall) doRequest(alt string) (*http.Response, error) {
  9508  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9509  	var body io.Reader = nil
  9510  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
  9511  	if err != nil {
  9512  		return nil, err
  9513  	}
  9514  	c.urlParams_.Set("alt", alt)
  9515  	c.urlParams_.Set("prettyPrint", "false")
  9516  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/captions")
  9517  	if c.mediaInfo_ != nil {
  9518  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/captions")
  9519  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  9520  	}
  9521  	if body == nil {
  9522  		body = new(bytes.Buffer)
  9523  		reqHeaders.Set("Content-Type", "application/json")
  9524  	}
  9525  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  9526  	defer cleanup()
  9527  	urls += "?" + c.urlParams_.Encode()
  9528  	req, err := http.NewRequest("PUT", urls, body)
  9529  	if err != nil {
  9530  		return nil, err
  9531  	}
  9532  	req.Header = reqHeaders
  9533  	req.GetBody = getBody
  9534  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9535  }
  9536  
  9537  // Do executes the "youtube.captions.update" call.
  9538  // Any non-2xx status code is an error. Response headers are in either
  9539  // *Caption.ServerResponse.Header or (if a response was returned at all) in
  9540  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9541  // whether the returned error was because http.StatusNotModified was returned.
  9542  func (c *CaptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Caption, error) {
  9543  	gensupport.SetOptions(c.urlParams_, opts...)
  9544  	res, err := c.doRequest("json")
  9545  	if res != nil && res.StatusCode == http.StatusNotModified {
  9546  		if res.Body != nil {
  9547  			res.Body.Close()
  9548  		}
  9549  		return nil, gensupport.WrapError(&googleapi.Error{
  9550  			Code:   res.StatusCode,
  9551  			Header: res.Header,
  9552  		})
  9553  	}
  9554  	if err != nil {
  9555  		return nil, err
  9556  	}
  9557  	defer googleapi.CloseBody(res)
  9558  	if err := googleapi.CheckResponse(res); err != nil {
  9559  		return nil, gensupport.WrapError(err)
  9560  	}
  9561  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  9562  	if rx != nil {
  9563  		rx.Client = c.s.client
  9564  		rx.UserAgent = c.s.userAgent()
  9565  		ctx := c.ctx_
  9566  		if ctx == nil {
  9567  			ctx = context.TODO()
  9568  		}
  9569  		res, err = rx.Upload(ctx)
  9570  		if err != nil {
  9571  			return nil, err
  9572  		}
  9573  		defer res.Body.Close()
  9574  		if err := googleapi.CheckResponse(res); err != nil {
  9575  			return nil, gensupport.WrapError(err)
  9576  		}
  9577  	}
  9578  	ret := &Caption{
  9579  		ServerResponse: googleapi.ServerResponse{
  9580  			Header:         res.Header,
  9581  			HTTPStatusCode: res.StatusCode,
  9582  		},
  9583  	}
  9584  	target := &ret
  9585  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9586  		return nil, err
  9587  	}
  9588  	return ret, nil
  9589  }
  9590  
  9591  type ChannelBannersInsertCall struct {
  9592  	s                     *Service
  9593  	channelbannerresource *ChannelBannerResource
  9594  	urlParams_            gensupport.URLParams
  9595  	mediaInfo_            *gensupport.MediaInfo
  9596  	ctx_                  context.Context
  9597  	header_               http.Header
  9598  }
  9599  
  9600  // Insert: Inserts a new resource into this collection.
  9601  func (r *ChannelBannersService) Insert(channelbannerresource *ChannelBannerResource) *ChannelBannersInsertCall {
  9602  	c := &ChannelBannersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9603  	c.channelbannerresource = channelbannerresource
  9604  	return c
  9605  }
  9606  
  9607  // ChannelId sets the optional parameter "channelId": Unused, channel_id is
  9608  // currently derived from the security context of the requestor.
  9609  func (c *ChannelBannersInsertCall) ChannelId(channelId string) *ChannelBannersInsertCall {
  9610  	c.urlParams_.Set("channelId", channelId)
  9611  	return c
  9612  }
  9613  
  9614  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  9615  // *Note:* This parameter is intended exclusively for YouTube content partners.
  9616  // The *onBehalfOfContentOwner* parameter indicates that the request's
  9617  // authorization credentials identify a YouTube CMS user who is acting on
  9618  // behalf of the content owner specified in the parameter value. This parameter
  9619  // is intended for YouTube content partners that own and manage many different
  9620  // YouTube channels. It allows content owners to authenticate once and get
  9621  // access to all their video and channel data, without having to provide
  9622  // authentication credentials for each individual channel. The actual CMS
  9623  // account that the user authenticates with must be linked to the specified
  9624  // YouTube content owner.
  9625  func (c *ChannelBannersInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelBannersInsertCall {
  9626  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  9627  	return c
  9628  }
  9629  
  9630  // OnBehalfOfContentOwnerChannel sets the optional parameter
  9631  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
  9632  // properly authorized request. *Note:* This parameter is intended exclusively
  9633  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
  9634  // specifies the YouTube channel ID of the channel to which a video is being
  9635  // added. This parameter is required when a request specifies a value for the
  9636  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
  9637  // with that parameter. In addition, the request must be authorized using a CMS
  9638  // account that is linked to the content owner that the onBehalfOfContentOwner
  9639  // parameter specifies. Finally, the channel that the
  9640  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
  9641  // the content owner that the onBehalfOfContentOwner parameter specifies. This
  9642  // parameter is intended for YouTube content partners that own and manage many
  9643  // different YouTube channels. It allows content owners to authenticate once
  9644  // and perform actions on behalf of the channel specified in the parameter
  9645  // value, without having to provide authentication credentials for each
  9646  // separate channel.
  9647  func (c *ChannelBannersInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *ChannelBannersInsertCall {
  9648  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
  9649  	return c
  9650  }
  9651  
  9652  // Media specifies the media to upload in one or more chunks. The chunk size
  9653  // may be controlled by supplying a MediaOption generated by
  9654  // googleapi.ChunkSize. The chunk size defaults to
  9655  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  9656  // request will be determined by sniffing the contents of r, unless a
  9657  // MediaOption generated by googleapi.ContentType is supplied.
  9658  // At most one of Media and ResumableMedia may be set.
  9659  func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ChannelBannersInsertCall {
  9660  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  9661  	return c
  9662  }
  9663  
  9664  // ResumableMedia specifies the media to upload in chunks and can be canceled
  9665  // with ctx.
  9666  //
  9667  // Deprecated: use Media instead.
  9668  //
  9669  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  9670  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  9671  // will be auto-detected. The provided ctx will supersede any context
  9672  // previously provided to the Context method.
  9673  func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ChannelBannersInsertCall {
  9674  	c.ctx_ = ctx
  9675  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  9676  	return c
  9677  }
  9678  
  9679  // ProgressUpdater provides a callback function that will be called after every
  9680  // chunk. It should be a low-latency function in order to not slow down the
  9681  // upload operation. This should only be called when using ResumableMedia (as
  9682  // opposed to Media).
  9683  func (c *ChannelBannersInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ChannelBannersInsertCall {
  9684  	c.mediaInfo_.SetProgressUpdater(pu)
  9685  	return c
  9686  }
  9687  
  9688  // Fields allows partial responses to be retrieved. See
  9689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9690  // details.
  9691  func (c *ChannelBannersInsertCall) Fields(s ...googleapi.Field) *ChannelBannersInsertCall {
  9692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9693  	return c
  9694  }
  9695  
  9696  // Context sets the context to be used in this call's Do method.
  9697  // This context will supersede any context previously provided to the
  9698  // ResumableMedia method.
  9699  func (c *ChannelBannersInsertCall) Context(ctx context.Context) *ChannelBannersInsertCall {
  9700  	c.ctx_ = ctx
  9701  	return c
  9702  }
  9703  
  9704  // Header returns a http.Header that can be modified by the caller to add
  9705  // headers to the request.
  9706  func (c *ChannelBannersInsertCall) Header() http.Header {
  9707  	if c.header_ == nil {
  9708  		c.header_ = make(http.Header)
  9709  	}
  9710  	return c.header_
  9711  }
  9712  
  9713  func (c *ChannelBannersInsertCall) doRequest(alt string) (*http.Response, error) {
  9714  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9715  	var body io.Reader = nil
  9716  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelbannerresource)
  9717  	if err != nil {
  9718  		return nil, err
  9719  	}
  9720  	c.urlParams_.Set("alt", alt)
  9721  	c.urlParams_.Set("prettyPrint", "false")
  9722  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelBanners/insert")
  9723  	if c.mediaInfo_ != nil {
  9724  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/channelBanners/insert")
  9725  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  9726  	}
  9727  	if body == nil {
  9728  		body = new(bytes.Buffer)
  9729  		reqHeaders.Set("Content-Type", "application/json")
  9730  	}
  9731  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  9732  	defer cleanup()
  9733  	urls += "?" + c.urlParams_.Encode()
  9734  	req, err := http.NewRequest("POST", urls, body)
  9735  	if err != nil {
  9736  		return nil, err
  9737  	}
  9738  	req.Header = reqHeaders
  9739  	req.GetBody = getBody
  9740  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9741  }
  9742  
  9743  // Do executes the "youtube.channelBanners.insert" call.
  9744  // Any non-2xx status code is an error. Response headers are in either
  9745  // *ChannelBannerResource.ServerResponse.Header or (if a response was returned
  9746  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9747  // check whether the returned error was because http.StatusNotModified was
  9748  // returned.
  9749  func (c *ChannelBannersInsertCall) Do(opts ...googleapi.CallOption) (*ChannelBannerResource, error) {
  9750  	gensupport.SetOptions(c.urlParams_, opts...)
  9751  	res, err := c.doRequest("json")
  9752  	if res != nil && res.StatusCode == http.StatusNotModified {
  9753  		if res.Body != nil {
  9754  			res.Body.Close()
  9755  		}
  9756  		return nil, gensupport.WrapError(&googleapi.Error{
  9757  			Code:   res.StatusCode,
  9758  			Header: res.Header,
  9759  		})
  9760  	}
  9761  	if err != nil {
  9762  		return nil, err
  9763  	}
  9764  	defer googleapi.CloseBody(res)
  9765  	if err := googleapi.CheckResponse(res); err != nil {
  9766  		return nil, gensupport.WrapError(err)
  9767  	}
  9768  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  9769  	if rx != nil {
  9770  		rx.Client = c.s.client
  9771  		rx.UserAgent = c.s.userAgent()
  9772  		ctx := c.ctx_
  9773  		if ctx == nil {
  9774  			ctx = context.TODO()
  9775  		}
  9776  		res, err = rx.Upload(ctx)
  9777  		if err != nil {
  9778  			return nil, err
  9779  		}
  9780  		defer res.Body.Close()
  9781  		if err := googleapi.CheckResponse(res); err != nil {
  9782  			return nil, gensupport.WrapError(err)
  9783  		}
  9784  	}
  9785  	ret := &ChannelBannerResource{
  9786  		ServerResponse: googleapi.ServerResponse{
  9787  			Header:         res.Header,
  9788  			HTTPStatusCode: res.StatusCode,
  9789  		},
  9790  	}
  9791  	target := &ret
  9792  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9793  		return nil, err
  9794  	}
  9795  	return ret, nil
  9796  }
  9797  
  9798  type ChannelSectionsDeleteCall struct {
  9799  	s          *Service
  9800  	urlParams_ gensupport.URLParams
  9801  	ctx_       context.Context
  9802  	header_    http.Header
  9803  }
  9804  
  9805  // Delete: Deletes a resource.
  9806  //
  9807  // - id: .
  9808  func (r *ChannelSectionsService) Delete(id string) *ChannelSectionsDeleteCall {
  9809  	c := &ChannelSectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9810  	c.urlParams_.Set("id", id)
  9811  	return c
  9812  }
  9813  
  9814  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  9815  // *Note:* This parameter is intended exclusively for YouTube content partners.
  9816  // The *onBehalfOfContentOwner* parameter indicates that the request's
  9817  // authorization credentials identify a YouTube CMS user who is acting on
  9818  // behalf of the content owner specified in the parameter value. This parameter
  9819  // is intended for YouTube content partners that own and manage many different
  9820  // YouTube channels. It allows content owners to authenticate once and get
  9821  // access to all their video and channel data, without having to provide
  9822  // authentication credentials for each individual channel. The CMS account that
  9823  // the user authenticates with must be linked to the specified YouTube content
  9824  // owner.
  9825  func (c *ChannelSectionsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsDeleteCall {
  9826  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  9827  	return c
  9828  }
  9829  
  9830  // Fields allows partial responses to be retrieved. See
  9831  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9832  // details.
  9833  func (c *ChannelSectionsDeleteCall) Fields(s ...googleapi.Field) *ChannelSectionsDeleteCall {
  9834  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9835  	return c
  9836  }
  9837  
  9838  // Context sets the context to be used in this call's Do method.
  9839  func (c *ChannelSectionsDeleteCall) Context(ctx context.Context) *ChannelSectionsDeleteCall {
  9840  	c.ctx_ = ctx
  9841  	return c
  9842  }
  9843  
  9844  // Header returns a http.Header that can be modified by the caller to add
  9845  // headers to the request.
  9846  func (c *ChannelSectionsDeleteCall) Header() http.Header {
  9847  	if c.header_ == nil {
  9848  		c.header_ = make(http.Header)
  9849  	}
  9850  	return c.header_
  9851  }
  9852  
  9853  func (c *ChannelSectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9854  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9855  	var body io.Reader = nil
  9856  	c.urlParams_.Set("alt", alt)
  9857  	c.urlParams_.Set("prettyPrint", "false")
  9858  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
  9859  	urls += "?" + c.urlParams_.Encode()
  9860  	req, err := http.NewRequest("DELETE", urls, body)
  9861  	if err != nil {
  9862  		return nil, err
  9863  	}
  9864  	req.Header = reqHeaders
  9865  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9866  }
  9867  
  9868  // Do executes the "youtube.channelSections.delete" call.
  9869  func (c *ChannelSectionsDeleteCall) Do(opts ...googleapi.CallOption) error {
  9870  	gensupport.SetOptions(c.urlParams_, opts...)
  9871  	res, err := c.doRequest("json")
  9872  	if err != nil {
  9873  		return err
  9874  	}
  9875  	defer googleapi.CloseBody(res)
  9876  	if err := googleapi.CheckResponse(res); err != nil {
  9877  		return gensupport.WrapError(err)
  9878  	}
  9879  	return nil
  9880  }
  9881  
  9882  type ChannelSectionsInsertCall struct {
  9883  	s              *Service
  9884  	channelsection *ChannelSection
  9885  	urlParams_     gensupport.URLParams
  9886  	ctx_           context.Context
  9887  	header_        http.Header
  9888  }
  9889  
  9890  // Insert: Inserts a new resource into this collection.
  9891  //
  9892  //   - part: The *part* parameter serves two purposes in this operation. It
  9893  //     identifies the properties that the write operation will set as well as the
  9894  //     properties that the API response will include. The part names that you can
  9895  //     include in the parameter value are snippet and contentDetails.
  9896  func (r *ChannelSectionsService) Insert(part []string, channelsection *ChannelSection) *ChannelSectionsInsertCall {
  9897  	c := &ChannelSectionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9898  	c.urlParams_.SetMulti("part", append([]string{}, part...))
  9899  	c.channelsection = channelsection
  9900  	return c
  9901  }
  9902  
  9903  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
  9904  // *Note:* This parameter is intended exclusively for YouTube content partners.
  9905  // The *onBehalfOfContentOwner* parameter indicates that the request's
  9906  // authorization credentials identify a YouTube CMS user who is acting on
  9907  // behalf of the content owner specified in the parameter value. This parameter
  9908  // is intended for YouTube content partners that own and manage many different
  9909  // YouTube channels. It allows content owners to authenticate once and get
  9910  // access to all their video and channel data, without having to provide
  9911  // authentication credentials for each individual channel. The CMS account that
  9912  // the user authenticates with must be linked to the specified YouTube content
  9913  // owner.
  9914  func (c *ChannelSectionsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsInsertCall {
  9915  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
  9916  	return c
  9917  }
  9918  
  9919  // OnBehalfOfContentOwnerChannel sets the optional parameter
  9920  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
  9921  // properly authorized request. *Note:* This parameter is intended exclusively
  9922  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
  9923  // specifies the YouTube channel ID of the channel to which a video is being
  9924  // added. This parameter is required when a request specifies a value for the
  9925  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
  9926  // with that parameter. In addition, the request must be authorized using a CMS
  9927  // account that is linked to the content owner that the onBehalfOfContentOwner
  9928  // parameter specifies. Finally, the channel that the
  9929  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
  9930  // the content owner that the onBehalfOfContentOwner parameter specifies. This
  9931  // parameter is intended for YouTube content partners that own and manage many
  9932  // different YouTube channels. It allows content owners to authenticate once
  9933  // and perform actions on behalf of the channel specified in the parameter
  9934  // value, without having to provide authentication credentials for each
  9935  // separate channel.
  9936  func (c *ChannelSectionsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *ChannelSectionsInsertCall {
  9937  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
  9938  	return c
  9939  }
  9940  
  9941  // Fields allows partial responses to be retrieved. See
  9942  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9943  // details.
  9944  func (c *ChannelSectionsInsertCall) Fields(s ...googleapi.Field) *ChannelSectionsInsertCall {
  9945  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9946  	return c
  9947  }
  9948  
  9949  // Context sets the context to be used in this call's Do method.
  9950  func (c *ChannelSectionsInsertCall) Context(ctx context.Context) *ChannelSectionsInsertCall {
  9951  	c.ctx_ = ctx
  9952  	return c
  9953  }
  9954  
  9955  // Header returns a http.Header that can be modified by the caller to add
  9956  // headers to the request.
  9957  func (c *ChannelSectionsInsertCall) Header() http.Header {
  9958  	if c.header_ == nil {
  9959  		c.header_ = make(http.Header)
  9960  	}
  9961  	return c.header_
  9962  }
  9963  
  9964  func (c *ChannelSectionsInsertCall) doRequest(alt string) (*http.Response, error) {
  9965  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9966  	var body io.Reader = nil
  9967  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
  9968  	if err != nil {
  9969  		return nil, err
  9970  	}
  9971  	c.urlParams_.Set("alt", alt)
  9972  	c.urlParams_.Set("prettyPrint", "false")
  9973  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
  9974  	urls += "?" + c.urlParams_.Encode()
  9975  	req, err := http.NewRequest("POST", urls, body)
  9976  	if err != nil {
  9977  		return nil, err
  9978  	}
  9979  	req.Header = reqHeaders
  9980  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9981  }
  9982  
  9983  // Do executes the "youtube.channelSections.insert" call.
  9984  // Any non-2xx status code is an error. Response headers are in either
  9985  // *ChannelSection.ServerResponse.Header or (if a response was returned at all)
  9986  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9987  // whether the returned error was because http.StatusNotModified was returned.
  9988  func (c *ChannelSectionsInsertCall) Do(opts ...googleapi.CallOption) (*ChannelSection, error) {
  9989  	gensupport.SetOptions(c.urlParams_, opts...)
  9990  	res, err := c.doRequest("json")
  9991  	if res != nil && res.StatusCode == http.StatusNotModified {
  9992  		if res.Body != nil {
  9993  			res.Body.Close()
  9994  		}
  9995  		return nil, gensupport.WrapError(&googleapi.Error{
  9996  			Code:   res.StatusCode,
  9997  			Header: res.Header,
  9998  		})
  9999  	}
 10000  	if err != nil {
 10001  		return nil, err
 10002  	}
 10003  	defer googleapi.CloseBody(res)
 10004  	if err := googleapi.CheckResponse(res); err != nil {
 10005  		return nil, gensupport.WrapError(err)
 10006  	}
 10007  	ret := &ChannelSection{
 10008  		ServerResponse: googleapi.ServerResponse{
 10009  			Header:         res.Header,
 10010  			HTTPStatusCode: res.StatusCode,
 10011  		},
 10012  	}
 10013  	target := &ret
 10014  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10015  		return nil, err
 10016  	}
 10017  	return ret, nil
 10018  }
 10019  
 10020  type ChannelSectionsListCall struct {
 10021  	s            *Service
 10022  	urlParams_   gensupport.URLParams
 10023  	ifNoneMatch_ string
 10024  	ctx_         context.Context
 10025  	header_      http.Header
 10026  }
 10027  
 10028  // List: Retrieves a list of resources, possibly filtered.
 10029  //
 10030  //   - part: The *part* parameter specifies a comma-separated list of one or more
 10031  //     channelSection resource properties that the API response will include. The
 10032  //     part names that you can include in the parameter value are id, snippet,
 10033  //     and contentDetails. If the parameter identifies a property that contains
 10034  //     child properties, the child properties will be included in the response.
 10035  //     For example, in a channelSection resource, the snippet property contains
 10036  //     other properties, such as a display title for the channelSection. If you
 10037  //     set *part=snippet*, the API response will also contain all of those nested
 10038  //     properties.
 10039  func (r *ChannelSectionsService) List(part []string) *ChannelSectionsListCall {
 10040  	c := &ChannelSectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10041  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 10042  	return c
 10043  }
 10044  
 10045  // ChannelId sets the optional parameter "channelId": Return the
 10046  // ChannelSections owned by the specified channel ID.
 10047  func (c *ChannelSectionsListCall) ChannelId(channelId string) *ChannelSectionsListCall {
 10048  	c.urlParams_.Set("channelId", channelId)
 10049  	return c
 10050  }
 10051  
 10052  // Hl sets the optional parameter "hl": Return content in specified language
 10053  func (c *ChannelSectionsListCall) Hl(hl string) *ChannelSectionsListCall {
 10054  	c.urlParams_.Set("hl", hl)
 10055  	return c
 10056  }
 10057  
 10058  // Id sets the optional parameter "id": Return the ChannelSections with the
 10059  // given IDs for Stubby or Apiary.
 10060  func (c *ChannelSectionsListCall) Id(id ...string) *ChannelSectionsListCall {
 10061  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 10062  	return c
 10063  }
 10064  
 10065  // Mine sets the optional parameter "mine": Return the ChannelSections owned by
 10066  // the authenticated user.
 10067  func (c *ChannelSectionsListCall) Mine(mine bool) *ChannelSectionsListCall {
 10068  	c.urlParams_.Set("mine", fmt.Sprint(mine))
 10069  	return c
 10070  }
 10071  
 10072  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 10073  // *Note:* This parameter is intended exclusively for YouTube content partners.
 10074  // The *onBehalfOfContentOwner* parameter indicates that the request's
 10075  // authorization credentials identify a YouTube CMS user who is acting on
 10076  // behalf of the content owner specified in the parameter value. This parameter
 10077  // is intended for YouTube content partners that own and manage many different
 10078  // YouTube channels. It allows content owners to authenticate once and get
 10079  // access to all their video and channel data, without having to provide
 10080  // authentication credentials for each individual channel. The CMS account that
 10081  // the user authenticates with must be linked to the specified YouTube content
 10082  // owner.
 10083  func (c *ChannelSectionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsListCall {
 10084  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 10085  	return c
 10086  }
 10087  
 10088  // Fields allows partial responses to be retrieved. See
 10089  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10090  // details.
 10091  func (c *ChannelSectionsListCall) Fields(s ...googleapi.Field) *ChannelSectionsListCall {
 10092  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10093  	return c
 10094  }
 10095  
 10096  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10097  // object's ETag matches the given value. This is useful for getting updates
 10098  // only after the object has changed since the last request.
 10099  func (c *ChannelSectionsListCall) IfNoneMatch(entityTag string) *ChannelSectionsListCall {
 10100  	c.ifNoneMatch_ = entityTag
 10101  	return c
 10102  }
 10103  
 10104  // Context sets the context to be used in this call's Do method.
 10105  func (c *ChannelSectionsListCall) Context(ctx context.Context) *ChannelSectionsListCall {
 10106  	c.ctx_ = ctx
 10107  	return c
 10108  }
 10109  
 10110  // Header returns a http.Header that can be modified by the caller to add
 10111  // headers to the request.
 10112  func (c *ChannelSectionsListCall) Header() http.Header {
 10113  	if c.header_ == nil {
 10114  		c.header_ = make(http.Header)
 10115  	}
 10116  	return c.header_
 10117  }
 10118  
 10119  func (c *ChannelSectionsListCall) doRequest(alt string) (*http.Response, error) {
 10120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10121  	if c.ifNoneMatch_ != "" {
 10122  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10123  	}
 10124  	var body io.Reader = nil
 10125  	c.urlParams_.Set("alt", alt)
 10126  	c.urlParams_.Set("prettyPrint", "false")
 10127  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
 10128  	urls += "?" + c.urlParams_.Encode()
 10129  	req, err := http.NewRequest("GET", urls, body)
 10130  	if err != nil {
 10131  		return nil, err
 10132  	}
 10133  	req.Header = reqHeaders
 10134  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10135  }
 10136  
 10137  // Do executes the "youtube.channelSections.list" call.
 10138  // Any non-2xx status code is an error. Response headers are in either
 10139  // *ChannelSectionListResponse.ServerResponse.Header or (if a response was
 10140  // returned at all) in error.(*googleapi.Error).Header. Use
 10141  // googleapi.IsNotModified to check whether the returned error was because
 10142  // http.StatusNotModified was returned.
 10143  func (c *ChannelSectionsListCall) Do(opts ...googleapi.CallOption) (*ChannelSectionListResponse, error) {
 10144  	gensupport.SetOptions(c.urlParams_, opts...)
 10145  	res, err := c.doRequest("json")
 10146  	if res != nil && res.StatusCode == http.StatusNotModified {
 10147  		if res.Body != nil {
 10148  			res.Body.Close()
 10149  		}
 10150  		return nil, gensupport.WrapError(&googleapi.Error{
 10151  			Code:   res.StatusCode,
 10152  			Header: res.Header,
 10153  		})
 10154  	}
 10155  	if err != nil {
 10156  		return nil, err
 10157  	}
 10158  	defer googleapi.CloseBody(res)
 10159  	if err := googleapi.CheckResponse(res); err != nil {
 10160  		return nil, gensupport.WrapError(err)
 10161  	}
 10162  	ret := &ChannelSectionListResponse{
 10163  		ServerResponse: googleapi.ServerResponse{
 10164  			Header:         res.Header,
 10165  			HTTPStatusCode: res.StatusCode,
 10166  		},
 10167  	}
 10168  	target := &ret
 10169  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10170  		return nil, err
 10171  	}
 10172  	return ret, nil
 10173  }
 10174  
 10175  type ChannelSectionsUpdateCall struct {
 10176  	s              *Service
 10177  	channelsection *ChannelSection
 10178  	urlParams_     gensupport.URLParams
 10179  	ctx_           context.Context
 10180  	header_        http.Header
 10181  }
 10182  
 10183  // Update: Updates an existing resource.
 10184  //
 10185  //   - part: The *part* parameter serves two purposes in this operation. It
 10186  //     identifies the properties that the write operation will set as well as the
 10187  //     properties that the API response will include. The part names that you can
 10188  //     include in the parameter value are snippet and contentDetails.
 10189  func (r *ChannelSectionsService) Update(part []string, channelsection *ChannelSection) *ChannelSectionsUpdateCall {
 10190  	c := &ChannelSectionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10191  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 10192  	c.channelsection = channelsection
 10193  	return c
 10194  }
 10195  
 10196  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 10197  // *Note:* This parameter is intended exclusively for YouTube content partners.
 10198  // The *onBehalfOfContentOwner* parameter indicates that the request's
 10199  // authorization credentials identify a YouTube CMS user who is acting on
 10200  // behalf of the content owner specified in the parameter value. This parameter
 10201  // is intended for YouTube content partners that own and manage many different
 10202  // YouTube channels. It allows content owners to authenticate once and get
 10203  // access to all their video and channel data, without having to provide
 10204  // authentication credentials for each individual channel. The CMS account that
 10205  // the user authenticates with must be linked to the specified YouTube content
 10206  // owner.
 10207  func (c *ChannelSectionsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelSectionsUpdateCall {
 10208  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 10209  	return c
 10210  }
 10211  
 10212  // Fields allows partial responses to be retrieved. See
 10213  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10214  // details.
 10215  func (c *ChannelSectionsUpdateCall) Fields(s ...googleapi.Field) *ChannelSectionsUpdateCall {
 10216  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10217  	return c
 10218  }
 10219  
 10220  // Context sets the context to be used in this call's Do method.
 10221  func (c *ChannelSectionsUpdateCall) Context(ctx context.Context) *ChannelSectionsUpdateCall {
 10222  	c.ctx_ = ctx
 10223  	return c
 10224  }
 10225  
 10226  // Header returns a http.Header that can be modified by the caller to add
 10227  // headers to the request.
 10228  func (c *ChannelSectionsUpdateCall) Header() http.Header {
 10229  	if c.header_ == nil {
 10230  		c.header_ = make(http.Header)
 10231  	}
 10232  	return c.header_
 10233  }
 10234  
 10235  func (c *ChannelSectionsUpdateCall) doRequest(alt string) (*http.Response, error) {
 10236  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10237  	var body io.Reader = nil
 10238  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
 10239  	if err != nil {
 10240  		return nil, err
 10241  	}
 10242  	c.urlParams_.Set("alt", alt)
 10243  	c.urlParams_.Set("prettyPrint", "false")
 10244  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channelSections")
 10245  	urls += "?" + c.urlParams_.Encode()
 10246  	req, err := http.NewRequest("PUT", urls, body)
 10247  	if err != nil {
 10248  		return nil, err
 10249  	}
 10250  	req.Header = reqHeaders
 10251  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10252  }
 10253  
 10254  // Do executes the "youtube.channelSections.update" call.
 10255  // Any non-2xx status code is an error. Response headers are in either
 10256  // *ChannelSection.ServerResponse.Header or (if a response was returned at all)
 10257  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10258  // whether the returned error was because http.StatusNotModified was returned.
 10259  func (c *ChannelSectionsUpdateCall) Do(opts ...googleapi.CallOption) (*ChannelSection, error) {
 10260  	gensupport.SetOptions(c.urlParams_, opts...)
 10261  	res, err := c.doRequest("json")
 10262  	if res != nil && res.StatusCode == http.StatusNotModified {
 10263  		if res.Body != nil {
 10264  			res.Body.Close()
 10265  		}
 10266  		return nil, gensupport.WrapError(&googleapi.Error{
 10267  			Code:   res.StatusCode,
 10268  			Header: res.Header,
 10269  		})
 10270  	}
 10271  	if err != nil {
 10272  		return nil, err
 10273  	}
 10274  	defer googleapi.CloseBody(res)
 10275  	if err := googleapi.CheckResponse(res); err != nil {
 10276  		return nil, gensupport.WrapError(err)
 10277  	}
 10278  	ret := &ChannelSection{
 10279  		ServerResponse: googleapi.ServerResponse{
 10280  			Header:         res.Header,
 10281  			HTTPStatusCode: res.StatusCode,
 10282  		},
 10283  	}
 10284  	target := &ret
 10285  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10286  		return nil, err
 10287  	}
 10288  	return ret, nil
 10289  }
 10290  
 10291  type ChannelsListCall struct {
 10292  	s            *Service
 10293  	urlParams_   gensupport.URLParams
 10294  	ifNoneMatch_ string
 10295  	ctx_         context.Context
 10296  	header_      http.Header
 10297  }
 10298  
 10299  // List: Retrieves a list of resources, possibly filtered.
 10300  //
 10301  //   - part: The *part* parameter specifies a comma-separated list of one or more
 10302  //     channel resource properties that the API response will include. If the
 10303  //     parameter identifies a property that contains child properties, the child
 10304  //     properties will be included in the response. For example, in a channel
 10305  //     resource, the contentDetails property contains other properties, such as
 10306  //     the uploads properties. As such, if you set *part=contentDetails*, the API
 10307  //     response will also contain all of those nested properties.
 10308  func (r *ChannelsService) List(part []string) *ChannelsListCall {
 10309  	c := &ChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10310  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 10311  	return c
 10312  }
 10313  
 10314  // CategoryId sets the optional parameter "categoryId": Return the channels
 10315  // within the specified guide category ID.
 10316  func (c *ChannelsListCall) CategoryId(categoryId string) *ChannelsListCall {
 10317  	c.urlParams_.Set("categoryId", categoryId)
 10318  	return c
 10319  }
 10320  
 10321  // ForHandle sets the optional parameter "forHandle": Return the channel
 10322  // associated with a YouTube handle.
 10323  func (c *ChannelsListCall) ForHandle(forHandle string) *ChannelsListCall {
 10324  	c.urlParams_.Set("forHandle", forHandle)
 10325  	return c
 10326  }
 10327  
 10328  // ForUsername sets the optional parameter "forUsername": Return the channel
 10329  // associated with a YouTube username.
 10330  func (c *ChannelsListCall) ForUsername(forUsername string) *ChannelsListCall {
 10331  	c.urlParams_.Set("forUsername", forUsername)
 10332  	return c
 10333  }
 10334  
 10335  // Hl sets the optional parameter "hl": Stands for "host language". Specifies
 10336  // the localization language of the metadata to be filled into
 10337  // snippet.localized. The field is filled with the default metadata if there is
 10338  // no localization in the specified language. The parameter value must be a
 10339  // language code included in the list returned by the i18nLanguages.list method
 10340  // (e.g. en_US, es_MX).
 10341  func (c *ChannelsListCall) Hl(hl string) *ChannelsListCall {
 10342  	c.urlParams_.Set("hl", hl)
 10343  	return c
 10344  }
 10345  
 10346  // Id sets the optional parameter "id": Return the channels with the specified
 10347  // IDs.
 10348  func (c *ChannelsListCall) Id(id ...string) *ChannelsListCall {
 10349  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 10350  	return c
 10351  }
 10352  
 10353  // ManagedByMe sets the optional parameter "managedByMe": Return the channels
 10354  // managed by the authenticated user.
 10355  func (c *ChannelsListCall) ManagedByMe(managedByMe bool) *ChannelsListCall {
 10356  	c.urlParams_.Set("managedByMe", fmt.Sprint(managedByMe))
 10357  	return c
 10358  }
 10359  
 10360  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 10361  // parameter specifies the maximum number of items that should be returned in
 10362  // the result set.
 10363  func (c *ChannelsListCall) MaxResults(maxResults int64) *ChannelsListCall {
 10364  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 10365  	return c
 10366  }
 10367  
 10368  // Mine sets the optional parameter "mine": Return the ids of channels owned by
 10369  // the authenticated user.
 10370  func (c *ChannelsListCall) Mine(mine bool) *ChannelsListCall {
 10371  	c.urlParams_.Set("mine", fmt.Sprint(mine))
 10372  	return c
 10373  }
 10374  
 10375  // MySubscribers sets the optional parameter "mySubscribers": Return the
 10376  // channels subscribed to the authenticated user
 10377  func (c *ChannelsListCall) MySubscribers(mySubscribers bool) *ChannelsListCall {
 10378  	c.urlParams_.Set("mySubscribers", fmt.Sprint(mySubscribers))
 10379  	return c
 10380  }
 10381  
 10382  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 10383  // *Note:* This parameter is intended exclusively for YouTube content partners.
 10384  // The *onBehalfOfContentOwner* parameter indicates that the request's
 10385  // authorization credentials identify a YouTube CMS user who is acting on
 10386  // behalf of the content owner specified in the parameter value. This parameter
 10387  // is intended for YouTube content partners that own and manage many different
 10388  // YouTube channels. It allows content owners to authenticate once and get
 10389  // access to all their video and channel data, without having to provide
 10390  // authentication credentials for each individual channel. The CMS account that
 10391  // the user authenticates with must be linked to the specified YouTube content
 10392  // owner.
 10393  func (c *ChannelsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelsListCall {
 10394  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 10395  	return c
 10396  }
 10397  
 10398  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 10399  // identifies a specific page in the result set that should be returned. In an
 10400  // API response, the nextPageToken and prevPageToken properties identify other
 10401  // pages that could be retrieved.
 10402  func (c *ChannelsListCall) PageToken(pageToken string) *ChannelsListCall {
 10403  	c.urlParams_.Set("pageToken", pageToken)
 10404  	return c
 10405  }
 10406  
 10407  // Fields allows partial responses to be retrieved. See
 10408  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10409  // details.
 10410  func (c *ChannelsListCall) Fields(s ...googleapi.Field) *ChannelsListCall {
 10411  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10412  	return c
 10413  }
 10414  
 10415  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10416  // object's ETag matches the given value. This is useful for getting updates
 10417  // only after the object has changed since the last request.
 10418  func (c *ChannelsListCall) IfNoneMatch(entityTag string) *ChannelsListCall {
 10419  	c.ifNoneMatch_ = entityTag
 10420  	return c
 10421  }
 10422  
 10423  // Context sets the context to be used in this call's Do method.
 10424  func (c *ChannelsListCall) Context(ctx context.Context) *ChannelsListCall {
 10425  	c.ctx_ = ctx
 10426  	return c
 10427  }
 10428  
 10429  // Header returns a http.Header that can be modified by the caller to add
 10430  // headers to the request.
 10431  func (c *ChannelsListCall) Header() http.Header {
 10432  	if c.header_ == nil {
 10433  		c.header_ = make(http.Header)
 10434  	}
 10435  	return c.header_
 10436  }
 10437  
 10438  func (c *ChannelsListCall) doRequest(alt string) (*http.Response, error) {
 10439  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10440  	if c.ifNoneMatch_ != "" {
 10441  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10442  	}
 10443  	var body io.Reader = nil
 10444  	c.urlParams_.Set("alt", alt)
 10445  	c.urlParams_.Set("prettyPrint", "false")
 10446  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channels")
 10447  	urls += "?" + c.urlParams_.Encode()
 10448  	req, err := http.NewRequest("GET", urls, body)
 10449  	if err != nil {
 10450  		return nil, err
 10451  	}
 10452  	req.Header = reqHeaders
 10453  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10454  }
 10455  
 10456  // Do executes the "youtube.channels.list" call.
 10457  // Any non-2xx status code is an error. Response headers are in either
 10458  // *ChannelListResponse.ServerResponse.Header or (if a response was returned at
 10459  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10460  // check whether the returned error was because http.StatusNotModified was
 10461  // returned.
 10462  func (c *ChannelsListCall) Do(opts ...googleapi.CallOption) (*ChannelListResponse, error) {
 10463  	gensupport.SetOptions(c.urlParams_, opts...)
 10464  	res, err := c.doRequest("json")
 10465  	if res != nil && res.StatusCode == http.StatusNotModified {
 10466  		if res.Body != nil {
 10467  			res.Body.Close()
 10468  		}
 10469  		return nil, gensupport.WrapError(&googleapi.Error{
 10470  			Code:   res.StatusCode,
 10471  			Header: res.Header,
 10472  		})
 10473  	}
 10474  	if err != nil {
 10475  		return nil, err
 10476  	}
 10477  	defer googleapi.CloseBody(res)
 10478  	if err := googleapi.CheckResponse(res); err != nil {
 10479  		return nil, gensupport.WrapError(err)
 10480  	}
 10481  	ret := &ChannelListResponse{
 10482  		ServerResponse: googleapi.ServerResponse{
 10483  			Header:         res.Header,
 10484  			HTTPStatusCode: res.StatusCode,
 10485  		},
 10486  	}
 10487  	target := &ret
 10488  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10489  		return nil, err
 10490  	}
 10491  	return ret, nil
 10492  }
 10493  
 10494  // Pages invokes f for each page of results.
 10495  // A non-nil error returned from f will halt the iteration.
 10496  // The provided context supersedes any context provided to the Context method.
 10497  func (c *ChannelsListCall) Pages(ctx context.Context, f func(*ChannelListResponse) error) error {
 10498  	c.ctx_ = ctx
 10499  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10500  	for {
 10501  		x, err := c.Do()
 10502  		if err != nil {
 10503  			return err
 10504  		}
 10505  		if err := f(x); err != nil {
 10506  			return err
 10507  		}
 10508  		if x.NextPageToken == "" {
 10509  			return nil
 10510  		}
 10511  		c.PageToken(x.NextPageToken)
 10512  	}
 10513  }
 10514  
 10515  type ChannelsUpdateCall struct {
 10516  	s          *Service
 10517  	channel    *Channel
 10518  	urlParams_ gensupport.URLParams
 10519  	ctx_       context.Context
 10520  	header_    http.Header
 10521  }
 10522  
 10523  // Update: Updates an existing resource.
 10524  //
 10525  //   - part: The *part* parameter serves two purposes in this operation. It
 10526  //     identifies the properties that the write operation will set as well as the
 10527  //     properties that the API response will include. The API currently only
 10528  //     allows the parameter value to be set to either brandingSettings or
 10529  //     invideoPromotion. (You cannot update both of those parts with a single
 10530  //     request.) Note that this method overrides the existing values for all of
 10531  //     the mutable properties that are contained in any parts that the parameter
 10532  //     value specifies.
 10533  func (r *ChannelsService) Update(part []string, channel *Channel) *ChannelsUpdateCall {
 10534  	c := &ChannelsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10535  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 10536  	c.channel = channel
 10537  	return c
 10538  }
 10539  
 10540  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 10541  // The *onBehalfOfContentOwner* parameter indicates that the authenticated user
 10542  // is acting on behalf of the content owner specified in the parameter value.
 10543  // This parameter is intended for YouTube content partners that own and manage
 10544  // many different YouTube channels. It allows content owners to authenticate
 10545  // once and get access to all their video and channel data, without having to
 10546  // provide authentication credentials for each individual channel. The actual
 10547  // CMS account that the user authenticates with needs to be linked to the
 10548  // specified YouTube content owner.
 10549  func (c *ChannelsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ChannelsUpdateCall {
 10550  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 10551  	return c
 10552  }
 10553  
 10554  // Fields allows partial responses to be retrieved. See
 10555  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10556  // details.
 10557  func (c *ChannelsUpdateCall) Fields(s ...googleapi.Field) *ChannelsUpdateCall {
 10558  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10559  	return c
 10560  }
 10561  
 10562  // Context sets the context to be used in this call's Do method.
 10563  func (c *ChannelsUpdateCall) Context(ctx context.Context) *ChannelsUpdateCall {
 10564  	c.ctx_ = ctx
 10565  	return c
 10566  }
 10567  
 10568  // Header returns a http.Header that can be modified by the caller to add
 10569  // headers to the request.
 10570  func (c *ChannelsUpdateCall) Header() http.Header {
 10571  	if c.header_ == nil {
 10572  		c.header_ = make(http.Header)
 10573  	}
 10574  	return c.header_
 10575  }
 10576  
 10577  func (c *ChannelsUpdateCall) doRequest(alt string) (*http.Response, error) {
 10578  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10579  	var body io.Reader = nil
 10580  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
 10581  	if err != nil {
 10582  		return nil, err
 10583  	}
 10584  	c.urlParams_.Set("alt", alt)
 10585  	c.urlParams_.Set("prettyPrint", "false")
 10586  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/channels")
 10587  	urls += "?" + c.urlParams_.Encode()
 10588  	req, err := http.NewRequest("PUT", urls, body)
 10589  	if err != nil {
 10590  		return nil, err
 10591  	}
 10592  	req.Header = reqHeaders
 10593  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10594  }
 10595  
 10596  // Do executes the "youtube.channels.update" call.
 10597  // Any non-2xx status code is an error. Response headers are in either
 10598  // *Channel.ServerResponse.Header or (if a response was returned at all) in
 10599  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10600  // whether the returned error was because http.StatusNotModified was returned.
 10601  func (c *ChannelsUpdateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
 10602  	gensupport.SetOptions(c.urlParams_, opts...)
 10603  	res, err := c.doRequest("json")
 10604  	if res != nil && res.StatusCode == http.StatusNotModified {
 10605  		if res.Body != nil {
 10606  			res.Body.Close()
 10607  		}
 10608  		return nil, gensupport.WrapError(&googleapi.Error{
 10609  			Code:   res.StatusCode,
 10610  			Header: res.Header,
 10611  		})
 10612  	}
 10613  	if err != nil {
 10614  		return nil, err
 10615  	}
 10616  	defer googleapi.CloseBody(res)
 10617  	if err := googleapi.CheckResponse(res); err != nil {
 10618  		return nil, gensupport.WrapError(err)
 10619  	}
 10620  	ret := &Channel{
 10621  		ServerResponse: googleapi.ServerResponse{
 10622  			Header:         res.Header,
 10623  			HTTPStatusCode: res.StatusCode,
 10624  		},
 10625  	}
 10626  	target := &ret
 10627  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10628  		return nil, err
 10629  	}
 10630  	return ret, nil
 10631  }
 10632  
 10633  type CommentThreadsInsertCall struct {
 10634  	s             *Service
 10635  	commentthread *CommentThread
 10636  	urlParams_    gensupport.URLParams
 10637  	ctx_          context.Context
 10638  	header_       http.Header
 10639  }
 10640  
 10641  // Insert: Inserts a new resource into this collection.
 10642  //
 10643  //   - part: The *part* parameter identifies the properties that the API response
 10644  //     will include. Set the parameter value to snippet. The snippet part has a
 10645  //     quota cost of 2 units.
 10646  func (r *CommentThreadsService) Insert(part []string, commentthread *CommentThread) *CommentThreadsInsertCall {
 10647  	c := &CommentThreadsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10648  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 10649  	c.commentthread = commentthread
 10650  	return c
 10651  }
 10652  
 10653  // Fields allows partial responses to be retrieved. See
 10654  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10655  // details.
 10656  func (c *CommentThreadsInsertCall) Fields(s ...googleapi.Field) *CommentThreadsInsertCall {
 10657  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10658  	return c
 10659  }
 10660  
 10661  // Context sets the context to be used in this call's Do method.
 10662  func (c *CommentThreadsInsertCall) Context(ctx context.Context) *CommentThreadsInsertCall {
 10663  	c.ctx_ = ctx
 10664  	return c
 10665  }
 10666  
 10667  // Header returns a http.Header that can be modified by the caller to add
 10668  // headers to the request.
 10669  func (c *CommentThreadsInsertCall) Header() http.Header {
 10670  	if c.header_ == nil {
 10671  		c.header_ = make(http.Header)
 10672  	}
 10673  	return c.header_
 10674  }
 10675  
 10676  func (c *CommentThreadsInsertCall) doRequest(alt string) (*http.Response, error) {
 10677  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10678  	var body io.Reader = nil
 10679  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
 10680  	if err != nil {
 10681  		return nil, err
 10682  	}
 10683  	c.urlParams_.Set("alt", alt)
 10684  	c.urlParams_.Set("prettyPrint", "false")
 10685  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/commentThreads")
 10686  	urls += "?" + c.urlParams_.Encode()
 10687  	req, err := http.NewRequest("POST", urls, body)
 10688  	if err != nil {
 10689  		return nil, err
 10690  	}
 10691  	req.Header = reqHeaders
 10692  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10693  }
 10694  
 10695  // Do executes the "youtube.commentThreads.insert" call.
 10696  // Any non-2xx status code is an error. Response headers are in either
 10697  // *CommentThread.ServerResponse.Header or (if a response was returned at all)
 10698  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10699  // whether the returned error was because http.StatusNotModified was returned.
 10700  func (c *CommentThreadsInsertCall) Do(opts ...googleapi.CallOption) (*CommentThread, error) {
 10701  	gensupport.SetOptions(c.urlParams_, opts...)
 10702  	res, err := c.doRequest("json")
 10703  	if res != nil && res.StatusCode == http.StatusNotModified {
 10704  		if res.Body != nil {
 10705  			res.Body.Close()
 10706  		}
 10707  		return nil, gensupport.WrapError(&googleapi.Error{
 10708  			Code:   res.StatusCode,
 10709  			Header: res.Header,
 10710  		})
 10711  	}
 10712  	if err != nil {
 10713  		return nil, err
 10714  	}
 10715  	defer googleapi.CloseBody(res)
 10716  	if err := googleapi.CheckResponse(res); err != nil {
 10717  		return nil, gensupport.WrapError(err)
 10718  	}
 10719  	ret := &CommentThread{
 10720  		ServerResponse: googleapi.ServerResponse{
 10721  			Header:         res.Header,
 10722  			HTTPStatusCode: res.StatusCode,
 10723  		},
 10724  	}
 10725  	target := &ret
 10726  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10727  		return nil, err
 10728  	}
 10729  	return ret, nil
 10730  }
 10731  
 10732  type CommentThreadsListCall struct {
 10733  	s            *Service
 10734  	urlParams_   gensupport.URLParams
 10735  	ifNoneMatch_ string
 10736  	ctx_         context.Context
 10737  	header_      http.Header
 10738  }
 10739  
 10740  // List: Retrieves a list of resources, possibly filtered.
 10741  //
 10742  //   - part: The *part* parameter specifies a comma-separated list of one or more
 10743  //     commentThread resource properties that the API response will include.
 10744  func (r *CommentThreadsService) List(part []string) *CommentThreadsListCall {
 10745  	c := &CommentThreadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10746  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 10747  	return c
 10748  }
 10749  
 10750  // AllThreadsRelatedToChannelId sets the optional parameter
 10751  // "allThreadsRelatedToChannelId": Returns the comment threads of all videos of
 10752  // the channel and the channel comments as well.
 10753  func (c *CommentThreadsListCall) AllThreadsRelatedToChannelId(allThreadsRelatedToChannelId string) *CommentThreadsListCall {
 10754  	c.urlParams_.Set("allThreadsRelatedToChannelId", allThreadsRelatedToChannelId)
 10755  	return c
 10756  }
 10757  
 10758  // ChannelId sets the optional parameter "channelId": Returns the comment
 10759  // threads for all the channel comments (ie does not include comments left on
 10760  // videos).
 10761  func (c *CommentThreadsListCall) ChannelId(channelId string) *CommentThreadsListCall {
 10762  	c.urlParams_.Set("channelId", channelId)
 10763  	return c
 10764  }
 10765  
 10766  // Id sets the optional parameter "id": Returns the comment threads with the
 10767  // given IDs for Stubby or Apiary.
 10768  func (c *CommentThreadsListCall) Id(id ...string) *CommentThreadsListCall {
 10769  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 10770  	return c
 10771  }
 10772  
 10773  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 10774  // parameter specifies the maximum number of items that should be returned in
 10775  // the result set.
 10776  func (c *CommentThreadsListCall) MaxResults(maxResults int64) *CommentThreadsListCall {
 10777  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 10778  	return c
 10779  }
 10780  
 10781  // ModerationStatus sets the optional parameter "moderationStatus": Limits the
 10782  // returned comment threads to those with the specified moderation status. Not
 10783  // compatible with the 'id' filter. Valid values: published, heldForReview,
 10784  // likelySpam.
 10785  //
 10786  // Possible values:
 10787  //
 10788  //	"published" (default) - The comment is available for public display.
 10789  //	"heldForReview" - The comment is awaiting review by a moderator.
 10790  //	"likelySpam"
 10791  //	"rejected" - The comment is unfit for display.
 10792  func (c *CommentThreadsListCall) ModerationStatus(moderationStatus string) *CommentThreadsListCall {
 10793  	c.urlParams_.Set("moderationStatus", moderationStatus)
 10794  	return c
 10795  }
 10796  
 10797  // Order sets the optional parameter "order":
 10798  //
 10799  // Possible values:
 10800  //
 10801  //	"orderUnspecified"
 10802  //	"time" (default) - Order by time.
 10803  //	"relevance" - Order by relevance.
 10804  func (c *CommentThreadsListCall) Order(order string) *CommentThreadsListCall {
 10805  	c.urlParams_.Set("order", order)
 10806  	return c
 10807  }
 10808  
 10809  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 10810  // identifies a specific page in the result set that should be returned. In an
 10811  // API response, the nextPageToken and prevPageToken properties identify other
 10812  // pages that could be retrieved.
 10813  func (c *CommentThreadsListCall) PageToken(pageToken string) *CommentThreadsListCall {
 10814  	c.urlParams_.Set("pageToken", pageToken)
 10815  	return c
 10816  }
 10817  
 10818  // SearchTerms sets the optional parameter "searchTerms": Limits the returned
 10819  // comment threads to those matching the specified key words. Not compatible
 10820  // with the 'id' filter.
 10821  func (c *CommentThreadsListCall) SearchTerms(searchTerms string) *CommentThreadsListCall {
 10822  	c.urlParams_.Set("searchTerms", searchTerms)
 10823  	return c
 10824  }
 10825  
 10826  // TextFormat sets the optional parameter "textFormat": The requested text
 10827  // format for the returned comments.
 10828  //
 10829  // Possible values:
 10830  //
 10831  //	"textFormatUnspecified"
 10832  //	"html" (default) - Returns the comments in HTML format. This is the
 10833  //
 10834  // default value.
 10835  //
 10836  //	"plainText" - Returns the comments in plain text format.
 10837  func (c *CommentThreadsListCall) TextFormat(textFormat string) *CommentThreadsListCall {
 10838  	c.urlParams_.Set("textFormat", textFormat)
 10839  	return c
 10840  }
 10841  
 10842  // VideoId sets the optional parameter "videoId": Returns the comment threads
 10843  // of the specified video.
 10844  func (c *CommentThreadsListCall) VideoId(videoId string) *CommentThreadsListCall {
 10845  	c.urlParams_.Set("videoId", videoId)
 10846  	return c
 10847  }
 10848  
 10849  // Fields allows partial responses to be retrieved. See
 10850  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10851  // details.
 10852  func (c *CommentThreadsListCall) Fields(s ...googleapi.Field) *CommentThreadsListCall {
 10853  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10854  	return c
 10855  }
 10856  
 10857  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10858  // object's ETag matches the given value. This is useful for getting updates
 10859  // only after the object has changed since the last request.
 10860  func (c *CommentThreadsListCall) IfNoneMatch(entityTag string) *CommentThreadsListCall {
 10861  	c.ifNoneMatch_ = entityTag
 10862  	return c
 10863  }
 10864  
 10865  // Context sets the context to be used in this call's Do method.
 10866  func (c *CommentThreadsListCall) Context(ctx context.Context) *CommentThreadsListCall {
 10867  	c.ctx_ = ctx
 10868  	return c
 10869  }
 10870  
 10871  // Header returns a http.Header that can be modified by the caller to add
 10872  // headers to the request.
 10873  func (c *CommentThreadsListCall) Header() http.Header {
 10874  	if c.header_ == nil {
 10875  		c.header_ = make(http.Header)
 10876  	}
 10877  	return c.header_
 10878  }
 10879  
 10880  func (c *CommentThreadsListCall) doRequest(alt string) (*http.Response, error) {
 10881  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10882  	if c.ifNoneMatch_ != "" {
 10883  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10884  	}
 10885  	var body io.Reader = nil
 10886  	c.urlParams_.Set("alt", alt)
 10887  	c.urlParams_.Set("prettyPrint", "false")
 10888  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/commentThreads")
 10889  	urls += "?" + c.urlParams_.Encode()
 10890  	req, err := http.NewRequest("GET", urls, body)
 10891  	if err != nil {
 10892  		return nil, err
 10893  	}
 10894  	req.Header = reqHeaders
 10895  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10896  }
 10897  
 10898  // Do executes the "youtube.commentThreads.list" call.
 10899  // Any non-2xx status code is an error. Response headers are in either
 10900  // *CommentThreadListResponse.ServerResponse.Header or (if a response was
 10901  // returned at all) in error.(*googleapi.Error).Header. Use
 10902  // googleapi.IsNotModified to check whether the returned error was because
 10903  // http.StatusNotModified was returned.
 10904  func (c *CommentThreadsListCall) Do(opts ...googleapi.CallOption) (*CommentThreadListResponse, error) {
 10905  	gensupport.SetOptions(c.urlParams_, opts...)
 10906  	res, err := c.doRequest("json")
 10907  	if res != nil && res.StatusCode == http.StatusNotModified {
 10908  		if res.Body != nil {
 10909  			res.Body.Close()
 10910  		}
 10911  		return nil, gensupport.WrapError(&googleapi.Error{
 10912  			Code:   res.StatusCode,
 10913  			Header: res.Header,
 10914  		})
 10915  	}
 10916  	if err != nil {
 10917  		return nil, err
 10918  	}
 10919  	defer googleapi.CloseBody(res)
 10920  	if err := googleapi.CheckResponse(res); err != nil {
 10921  		return nil, gensupport.WrapError(err)
 10922  	}
 10923  	ret := &CommentThreadListResponse{
 10924  		ServerResponse: googleapi.ServerResponse{
 10925  			Header:         res.Header,
 10926  			HTTPStatusCode: res.StatusCode,
 10927  		},
 10928  	}
 10929  	target := &ret
 10930  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10931  		return nil, err
 10932  	}
 10933  	return ret, nil
 10934  }
 10935  
 10936  // Pages invokes f for each page of results.
 10937  // A non-nil error returned from f will halt the iteration.
 10938  // The provided context supersedes any context provided to the Context method.
 10939  func (c *CommentThreadsListCall) Pages(ctx context.Context, f func(*CommentThreadListResponse) error) error {
 10940  	c.ctx_ = ctx
 10941  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10942  	for {
 10943  		x, err := c.Do()
 10944  		if err != nil {
 10945  			return err
 10946  		}
 10947  		if err := f(x); err != nil {
 10948  			return err
 10949  		}
 10950  		if x.NextPageToken == "" {
 10951  			return nil
 10952  		}
 10953  		c.PageToken(x.NextPageToken)
 10954  	}
 10955  }
 10956  
 10957  type CommentsDeleteCall struct {
 10958  	s          *Service
 10959  	urlParams_ gensupport.URLParams
 10960  	ctx_       context.Context
 10961  	header_    http.Header
 10962  }
 10963  
 10964  // Delete: Deletes a resource.
 10965  //
 10966  // - id: .
 10967  func (r *CommentsService) Delete(id string) *CommentsDeleteCall {
 10968  	c := &CommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10969  	c.urlParams_.Set("id", id)
 10970  	return c
 10971  }
 10972  
 10973  // Fields allows partial responses to be retrieved. See
 10974  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10975  // details.
 10976  func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
 10977  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10978  	return c
 10979  }
 10980  
 10981  // Context sets the context to be used in this call's Do method.
 10982  func (c *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
 10983  	c.ctx_ = ctx
 10984  	return c
 10985  }
 10986  
 10987  // Header returns a http.Header that can be modified by the caller to add
 10988  // headers to the request.
 10989  func (c *CommentsDeleteCall) Header() http.Header {
 10990  	if c.header_ == nil {
 10991  		c.header_ = make(http.Header)
 10992  	}
 10993  	return c.header_
 10994  }
 10995  
 10996  func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10997  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10998  	var body io.Reader = nil
 10999  	c.urlParams_.Set("alt", alt)
 11000  	c.urlParams_.Set("prettyPrint", "false")
 11001  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
 11002  	urls += "?" + c.urlParams_.Encode()
 11003  	req, err := http.NewRequest("DELETE", urls, body)
 11004  	if err != nil {
 11005  		return nil, err
 11006  	}
 11007  	req.Header = reqHeaders
 11008  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11009  }
 11010  
 11011  // Do executes the "youtube.comments.delete" call.
 11012  func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error {
 11013  	gensupport.SetOptions(c.urlParams_, opts...)
 11014  	res, err := c.doRequest("json")
 11015  	if err != nil {
 11016  		return err
 11017  	}
 11018  	defer googleapi.CloseBody(res)
 11019  	if err := googleapi.CheckResponse(res); err != nil {
 11020  		return gensupport.WrapError(err)
 11021  	}
 11022  	return nil
 11023  }
 11024  
 11025  type CommentsInsertCall struct {
 11026  	s          *Service
 11027  	comment    *Comment
 11028  	urlParams_ gensupport.URLParams
 11029  	ctx_       context.Context
 11030  	header_    http.Header
 11031  }
 11032  
 11033  // Insert: Inserts a new resource into this collection.
 11034  //
 11035  //   - part: The *part* parameter identifies the properties that the API response
 11036  //     will include. Set the parameter value to snippet. The snippet part has a
 11037  //     quota cost of 2 units.
 11038  func (r *CommentsService) Insert(part []string, comment *Comment) *CommentsInsertCall {
 11039  	c := &CommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11040  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 11041  	c.comment = comment
 11042  	return c
 11043  }
 11044  
 11045  // Fields allows partial responses to be retrieved. See
 11046  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11047  // details.
 11048  func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
 11049  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11050  	return c
 11051  }
 11052  
 11053  // Context sets the context to be used in this call's Do method.
 11054  func (c *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
 11055  	c.ctx_ = ctx
 11056  	return c
 11057  }
 11058  
 11059  // Header returns a http.Header that can be modified by the caller to add
 11060  // headers to the request.
 11061  func (c *CommentsInsertCall) Header() http.Header {
 11062  	if c.header_ == nil {
 11063  		c.header_ = make(http.Header)
 11064  	}
 11065  	return c.header_
 11066  }
 11067  
 11068  func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
 11069  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11070  	var body io.Reader = nil
 11071  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
 11072  	if err != nil {
 11073  		return nil, err
 11074  	}
 11075  	c.urlParams_.Set("alt", alt)
 11076  	c.urlParams_.Set("prettyPrint", "false")
 11077  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
 11078  	urls += "?" + c.urlParams_.Encode()
 11079  	req, err := http.NewRequest("POST", urls, body)
 11080  	if err != nil {
 11081  		return nil, err
 11082  	}
 11083  	req.Header = reqHeaders
 11084  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11085  }
 11086  
 11087  // Do executes the "youtube.comments.insert" call.
 11088  // Any non-2xx status code is an error. Response headers are in either
 11089  // *Comment.ServerResponse.Header or (if a response was returned at all) in
 11090  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11091  // whether the returned error was because http.StatusNotModified was returned.
 11092  func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
 11093  	gensupport.SetOptions(c.urlParams_, opts...)
 11094  	res, err := c.doRequest("json")
 11095  	if res != nil && res.StatusCode == http.StatusNotModified {
 11096  		if res.Body != nil {
 11097  			res.Body.Close()
 11098  		}
 11099  		return nil, gensupport.WrapError(&googleapi.Error{
 11100  			Code:   res.StatusCode,
 11101  			Header: res.Header,
 11102  		})
 11103  	}
 11104  	if err != nil {
 11105  		return nil, err
 11106  	}
 11107  	defer googleapi.CloseBody(res)
 11108  	if err := googleapi.CheckResponse(res); err != nil {
 11109  		return nil, gensupport.WrapError(err)
 11110  	}
 11111  	ret := &Comment{
 11112  		ServerResponse: googleapi.ServerResponse{
 11113  			Header:         res.Header,
 11114  			HTTPStatusCode: res.StatusCode,
 11115  		},
 11116  	}
 11117  	target := &ret
 11118  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11119  		return nil, err
 11120  	}
 11121  	return ret, nil
 11122  }
 11123  
 11124  type CommentsListCall struct {
 11125  	s            *Service
 11126  	urlParams_   gensupport.URLParams
 11127  	ifNoneMatch_ string
 11128  	ctx_         context.Context
 11129  	header_      http.Header
 11130  }
 11131  
 11132  // List: Retrieves a list of resources, possibly filtered.
 11133  //
 11134  //   - part: The *part* parameter specifies a comma-separated list of one or more
 11135  //     comment resource properties that the API response will include.
 11136  func (r *CommentsService) List(part []string) *CommentsListCall {
 11137  	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11138  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 11139  	return c
 11140  }
 11141  
 11142  // Id sets the optional parameter "id": Returns the comments with the given IDs
 11143  // for One Platform.
 11144  func (c *CommentsListCall) Id(id ...string) *CommentsListCall {
 11145  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 11146  	return c
 11147  }
 11148  
 11149  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 11150  // parameter specifies the maximum number of items that should be returned in
 11151  // the result set.
 11152  func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
 11153  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 11154  	return c
 11155  }
 11156  
 11157  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 11158  // identifies a specific page in the result set that should be returned. In an
 11159  // API response, the nextPageToken and prevPageToken properties identify other
 11160  // pages that could be retrieved.
 11161  func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
 11162  	c.urlParams_.Set("pageToken", pageToken)
 11163  	return c
 11164  }
 11165  
 11166  // ParentId sets the optional parameter "parentId": Returns replies to the
 11167  // specified comment. Note, currently YouTube features only one level of
 11168  // replies (ie replies to top level comments). However replies to replies may
 11169  // be supported in the future.
 11170  func (c *CommentsListCall) ParentId(parentId string) *CommentsListCall {
 11171  	c.urlParams_.Set("parentId", parentId)
 11172  	return c
 11173  }
 11174  
 11175  // TextFormat sets the optional parameter "textFormat": The requested text
 11176  // format for the returned comments.
 11177  //
 11178  // Possible values:
 11179  //
 11180  //	"textFormatUnspecified"
 11181  //	"html" (default) - Returns the comments in HTML format. This is the
 11182  //
 11183  // default value.
 11184  //
 11185  //	"plainText" - Returns the comments in plain text format.
 11186  func (c *CommentsListCall) TextFormat(textFormat string) *CommentsListCall {
 11187  	c.urlParams_.Set("textFormat", textFormat)
 11188  	return c
 11189  }
 11190  
 11191  // Fields allows partial responses to be retrieved. See
 11192  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11193  // details.
 11194  func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
 11195  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11196  	return c
 11197  }
 11198  
 11199  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11200  // object's ETag matches the given value. This is useful for getting updates
 11201  // only after the object has changed since the last request.
 11202  func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
 11203  	c.ifNoneMatch_ = entityTag
 11204  	return c
 11205  }
 11206  
 11207  // Context sets the context to be used in this call's Do method.
 11208  func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
 11209  	c.ctx_ = ctx
 11210  	return c
 11211  }
 11212  
 11213  // Header returns a http.Header that can be modified by the caller to add
 11214  // headers to the request.
 11215  func (c *CommentsListCall) Header() http.Header {
 11216  	if c.header_ == nil {
 11217  		c.header_ = make(http.Header)
 11218  	}
 11219  	return c.header_
 11220  }
 11221  
 11222  func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
 11223  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11224  	if c.ifNoneMatch_ != "" {
 11225  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11226  	}
 11227  	var body io.Reader = nil
 11228  	c.urlParams_.Set("alt", alt)
 11229  	c.urlParams_.Set("prettyPrint", "false")
 11230  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
 11231  	urls += "?" + c.urlParams_.Encode()
 11232  	req, err := http.NewRequest("GET", urls, body)
 11233  	if err != nil {
 11234  		return nil, err
 11235  	}
 11236  	req.Header = reqHeaders
 11237  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11238  }
 11239  
 11240  // Do executes the "youtube.comments.list" call.
 11241  // Any non-2xx status code is an error. Response headers are in either
 11242  // *CommentListResponse.ServerResponse.Header or (if a response was returned at
 11243  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11244  // check whether the returned error was because http.StatusNotModified was
 11245  // returned.
 11246  func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentListResponse, error) {
 11247  	gensupport.SetOptions(c.urlParams_, opts...)
 11248  	res, err := c.doRequest("json")
 11249  	if res != nil && res.StatusCode == http.StatusNotModified {
 11250  		if res.Body != nil {
 11251  			res.Body.Close()
 11252  		}
 11253  		return nil, gensupport.WrapError(&googleapi.Error{
 11254  			Code:   res.StatusCode,
 11255  			Header: res.Header,
 11256  		})
 11257  	}
 11258  	if err != nil {
 11259  		return nil, err
 11260  	}
 11261  	defer googleapi.CloseBody(res)
 11262  	if err := googleapi.CheckResponse(res); err != nil {
 11263  		return nil, gensupport.WrapError(err)
 11264  	}
 11265  	ret := &CommentListResponse{
 11266  		ServerResponse: googleapi.ServerResponse{
 11267  			Header:         res.Header,
 11268  			HTTPStatusCode: res.StatusCode,
 11269  		},
 11270  	}
 11271  	target := &ret
 11272  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11273  		return nil, err
 11274  	}
 11275  	return ret, nil
 11276  }
 11277  
 11278  // Pages invokes f for each page of results.
 11279  // A non-nil error returned from f will halt the iteration.
 11280  // The provided context supersedes any context provided to the Context method.
 11281  func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentListResponse) error) error {
 11282  	c.ctx_ = ctx
 11283  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11284  	for {
 11285  		x, err := c.Do()
 11286  		if err != nil {
 11287  			return err
 11288  		}
 11289  		if err := f(x); err != nil {
 11290  			return err
 11291  		}
 11292  		if x.NextPageToken == "" {
 11293  			return nil
 11294  		}
 11295  		c.PageToken(x.NextPageToken)
 11296  	}
 11297  }
 11298  
 11299  type CommentsMarkAsSpamCall struct {
 11300  	s          *Service
 11301  	urlParams_ gensupport.URLParams
 11302  	ctx_       context.Context
 11303  	header_    http.Header
 11304  }
 11305  
 11306  // MarkAsSpam: Expresses the caller's opinion that one or more comments should
 11307  // be flagged as spam.
 11308  //
 11309  // - id: Flags the comments with the given IDs as spam in the caller's opinion.
 11310  func (r *CommentsService) MarkAsSpam(id []string) *CommentsMarkAsSpamCall {
 11311  	c := &CommentsMarkAsSpamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11312  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 11313  	return c
 11314  }
 11315  
 11316  // Fields allows partial responses to be retrieved. See
 11317  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11318  // details.
 11319  func (c *CommentsMarkAsSpamCall) Fields(s ...googleapi.Field) *CommentsMarkAsSpamCall {
 11320  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11321  	return c
 11322  }
 11323  
 11324  // Context sets the context to be used in this call's Do method.
 11325  func (c *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
 11326  	c.ctx_ = ctx
 11327  	return c
 11328  }
 11329  
 11330  // Header returns a http.Header that can be modified by the caller to add
 11331  // headers to the request.
 11332  func (c *CommentsMarkAsSpamCall) Header() http.Header {
 11333  	if c.header_ == nil {
 11334  		c.header_ = make(http.Header)
 11335  	}
 11336  	return c.header_
 11337  }
 11338  
 11339  func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
 11340  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11341  	var body io.Reader = nil
 11342  	c.urlParams_.Set("alt", alt)
 11343  	c.urlParams_.Set("prettyPrint", "false")
 11344  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments/markAsSpam")
 11345  	urls += "?" + c.urlParams_.Encode()
 11346  	req, err := http.NewRequest("POST", urls, body)
 11347  	if err != nil {
 11348  		return nil, err
 11349  	}
 11350  	req.Header = reqHeaders
 11351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11352  }
 11353  
 11354  // Do executes the "youtube.comments.markAsSpam" call.
 11355  func (c *CommentsMarkAsSpamCall) Do(opts ...googleapi.CallOption) error {
 11356  	gensupport.SetOptions(c.urlParams_, opts...)
 11357  	res, err := c.doRequest("json")
 11358  	if err != nil {
 11359  		return err
 11360  	}
 11361  	defer googleapi.CloseBody(res)
 11362  	if err := googleapi.CheckResponse(res); err != nil {
 11363  		return gensupport.WrapError(err)
 11364  	}
 11365  	return nil
 11366  }
 11367  
 11368  type CommentsSetModerationStatusCall struct {
 11369  	s          *Service
 11370  	urlParams_ gensupport.URLParams
 11371  	ctx_       context.Context
 11372  	header_    http.Header
 11373  }
 11374  
 11375  // SetModerationStatus: Sets the moderation status of one or more comments.
 11376  //
 11377  //   - id: Modifies the moderation status of the comments with the given IDs.
 11378  //   - moderationStatus: Specifies the requested moderation status. Note,
 11379  //     comments can be in statuses, which are not available through this call.
 11380  //     For example, this call does not allow to mark a comment as 'likely spam'.
 11381  //     Valid values: 'heldForReview', 'published' or 'rejected'.
 11382  func (r *CommentsService) SetModerationStatus(id []string, moderationStatus string) *CommentsSetModerationStatusCall {
 11383  	c := &CommentsSetModerationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11384  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 11385  	c.urlParams_.Set("moderationStatus", moderationStatus)
 11386  	return c
 11387  }
 11388  
 11389  // BanAuthor sets the optional parameter "banAuthor": If set to true the author
 11390  // of the comment gets added to the ban list. This means all future comments of
 11391  // the author will autmomatically be rejected. Only valid in combination with
 11392  // STATUS_REJECTED.
 11393  func (c *CommentsSetModerationStatusCall) BanAuthor(banAuthor bool) *CommentsSetModerationStatusCall {
 11394  	c.urlParams_.Set("banAuthor", fmt.Sprint(banAuthor))
 11395  	return c
 11396  }
 11397  
 11398  // Fields allows partial responses to be retrieved. See
 11399  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11400  // details.
 11401  func (c *CommentsSetModerationStatusCall) Fields(s ...googleapi.Field) *CommentsSetModerationStatusCall {
 11402  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11403  	return c
 11404  }
 11405  
 11406  // Context sets the context to be used in this call's Do method.
 11407  func (c *CommentsSetModerationStatusCall) Context(ctx context.Context) *CommentsSetModerationStatusCall {
 11408  	c.ctx_ = ctx
 11409  	return c
 11410  }
 11411  
 11412  // Header returns a http.Header that can be modified by the caller to add
 11413  // headers to the request.
 11414  func (c *CommentsSetModerationStatusCall) Header() http.Header {
 11415  	if c.header_ == nil {
 11416  		c.header_ = make(http.Header)
 11417  	}
 11418  	return c.header_
 11419  }
 11420  
 11421  func (c *CommentsSetModerationStatusCall) doRequest(alt string) (*http.Response, error) {
 11422  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11423  	var body io.Reader = nil
 11424  	c.urlParams_.Set("alt", alt)
 11425  	c.urlParams_.Set("prettyPrint", "false")
 11426  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments/setModerationStatus")
 11427  	urls += "?" + c.urlParams_.Encode()
 11428  	req, err := http.NewRequest("POST", urls, body)
 11429  	if err != nil {
 11430  		return nil, err
 11431  	}
 11432  	req.Header = reqHeaders
 11433  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11434  }
 11435  
 11436  // Do executes the "youtube.comments.setModerationStatus" call.
 11437  func (c *CommentsSetModerationStatusCall) Do(opts ...googleapi.CallOption) error {
 11438  	gensupport.SetOptions(c.urlParams_, opts...)
 11439  	res, err := c.doRequest("json")
 11440  	if err != nil {
 11441  		return err
 11442  	}
 11443  	defer googleapi.CloseBody(res)
 11444  	if err := googleapi.CheckResponse(res); err != nil {
 11445  		return gensupport.WrapError(err)
 11446  	}
 11447  	return nil
 11448  }
 11449  
 11450  type CommentsUpdateCall struct {
 11451  	s          *Service
 11452  	comment    *Comment
 11453  	urlParams_ gensupport.URLParams
 11454  	ctx_       context.Context
 11455  	header_    http.Header
 11456  }
 11457  
 11458  // Update: Updates an existing resource.
 11459  //
 11460  //   - part: The *part* parameter identifies the properties that the API response
 11461  //     will include. You must at least include the snippet part in the parameter
 11462  //     value since that part contains all of the properties that the API request
 11463  //     can update.
 11464  func (r *CommentsService) Update(part []string, comment *Comment) *CommentsUpdateCall {
 11465  	c := &CommentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11466  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 11467  	c.comment = comment
 11468  	return c
 11469  }
 11470  
 11471  // Fields allows partial responses to be retrieved. See
 11472  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11473  // details.
 11474  func (c *CommentsUpdateCall) Fields(s ...googleapi.Field) *CommentsUpdateCall {
 11475  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11476  	return c
 11477  }
 11478  
 11479  // Context sets the context to be used in this call's Do method.
 11480  func (c *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
 11481  	c.ctx_ = ctx
 11482  	return c
 11483  }
 11484  
 11485  // Header returns a http.Header that can be modified by the caller to add
 11486  // headers to the request.
 11487  func (c *CommentsUpdateCall) Header() http.Header {
 11488  	if c.header_ == nil {
 11489  		c.header_ = make(http.Header)
 11490  	}
 11491  	return c.header_
 11492  }
 11493  
 11494  func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
 11495  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11496  	var body io.Reader = nil
 11497  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
 11498  	if err != nil {
 11499  		return nil, err
 11500  	}
 11501  	c.urlParams_.Set("alt", alt)
 11502  	c.urlParams_.Set("prettyPrint", "false")
 11503  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/comments")
 11504  	urls += "?" + c.urlParams_.Encode()
 11505  	req, err := http.NewRequest("PUT", urls, body)
 11506  	if err != nil {
 11507  		return nil, err
 11508  	}
 11509  	req.Header = reqHeaders
 11510  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11511  }
 11512  
 11513  // Do executes the "youtube.comments.update" call.
 11514  // Any non-2xx status code is an error. Response headers are in either
 11515  // *Comment.ServerResponse.Header or (if a response was returned at all) in
 11516  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11517  // whether the returned error was because http.StatusNotModified was returned.
 11518  func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
 11519  	gensupport.SetOptions(c.urlParams_, opts...)
 11520  	res, err := c.doRequest("json")
 11521  	if res != nil && res.StatusCode == http.StatusNotModified {
 11522  		if res.Body != nil {
 11523  			res.Body.Close()
 11524  		}
 11525  		return nil, gensupport.WrapError(&googleapi.Error{
 11526  			Code:   res.StatusCode,
 11527  			Header: res.Header,
 11528  		})
 11529  	}
 11530  	if err != nil {
 11531  		return nil, err
 11532  	}
 11533  	defer googleapi.CloseBody(res)
 11534  	if err := googleapi.CheckResponse(res); err != nil {
 11535  		return nil, gensupport.WrapError(err)
 11536  	}
 11537  	ret := &Comment{
 11538  		ServerResponse: googleapi.ServerResponse{
 11539  			Header:         res.Header,
 11540  			HTTPStatusCode: res.StatusCode,
 11541  		},
 11542  	}
 11543  	target := &ret
 11544  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11545  		return nil, err
 11546  	}
 11547  	return ret, nil
 11548  }
 11549  
 11550  type I18nLanguagesListCall struct {
 11551  	s            *Service
 11552  	urlParams_   gensupport.URLParams
 11553  	ifNoneMatch_ string
 11554  	ctx_         context.Context
 11555  	header_      http.Header
 11556  }
 11557  
 11558  // List: Retrieves a list of resources, possibly filtered.
 11559  //
 11560  //   - part: The *part* parameter specifies the i18nLanguage resource properties
 11561  //     that the API response will include. Set the parameter value to snippet.
 11562  func (r *I18nLanguagesService) List(part []string) *I18nLanguagesListCall {
 11563  	c := &I18nLanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11564  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 11565  	return c
 11566  }
 11567  
 11568  // Hl sets the optional parameter "hl":
 11569  func (c *I18nLanguagesListCall) Hl(hl string) *I18nLanguagesListCall {
 11570  	c.urlParams_.Set("hl", hl)
 11571  	return c
 11572  }
 11573  
 11574  // Fields allows partial responses to be retrieved. See
 11575  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11576  // details.
 11577  func (c *I18nLanguagesListCall) Fields(s ...googleapi.Field) *I18nLanguagesListCall {
 11578  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11579  	return c
 11580  }
 11581  
 11582  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11583  // object's ETag matches the given value. This is useful for getting updates
 11584  // only after the object has changed since the last request.
 11585  func (c *I18nLanguagesListCall) IfNoneMatch(entityTag string) *I18nLanguagesListCall {
 11586  	c.ifNoneMatch_ = entityTag
 11587  	return c
 11588  }
 11589  
 11590  // Context sets the context to be used in this call's Do method.
 11591  func (c *I18nLanguagesListCall) Context(ctx context.Context) *I18nLanguagesListCall {
 11592  	c.ctx_ = ctx
 11593  	return c
 11594  }
 11595  
 11596  // Header returns a http.Header that can be modified by the caller to add
 11597  // headers to the request.
 11598  func (c *I18nLanguagesListCall) Header() http.Header {
 11599  	if c.header_ == nil {
 11600  		c.header_ = make(http.Header)
 11601  	}
 11602  	return c.header_
 11603  }
 11604  
 11605  func (c *I18nLanguagesListCall) doRequest(alt string) (*http.Response, error) {
 11606  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11607  	if c.ifNoneMatch_ != "" {
 11608  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11609  	}
 11610  	var body io.Reader = nil
 11611  	c.urlParams_.Set("alt", alt)
 11612  	c.urlParams_.Set("prettyPrint", "false")
 11613  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/i18nLanguages")
 11614  	urls += "?" + c.urlParams_.Encode()
 11615  	req, err := http.NewRequest("GET", urls, body)
 11616  	if err != nil {
 11617  		return nil, err
 11618  	}
 11619  	req.Header = reqHeaders
 11620  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11621  }
 11622  
 11623  // Do executes the "youtube.i18nLanguages.list" call.
 11624  // Any non-2xx status code is an error. Response headers are in either
 11625  // *I18nLanguageListResponse.ServerResponse.Header or (if a response was
 11626  // returned at all) in error.(*googleapi.Error).Header. Use
 11627  // googleapi.IsNotModified to check whether the returned error was because
 11628  // http.StatusNotModified was returned.
 11629  func (c *I18nLanguagesListCall) Do(opts ...googleapi.CallOption) (*I18nLanguageListResponse, error) {
 11630  	gensupport.SetOptions(c.urlParams_, opts...)
 11631  	res, err := c.doRequest("json")
 11632  	if res != nil && res.StatusCode == http.StatusNotModified {
 11633  		if res.Body != nil {
 11634  			res.Body.Close()
 11635  		}
 11636  		return nil, gensupport.WrapError(&googleapi.Error{
 11637  			Code:   res.StatusCode,
 11638  			Header: res.Header,
 11639  		})
 11640  	}
 11641  	if err != nil {
 11642  		return nil, err
 11643  	}
 11644  	defer googleapi.CloseBody(res)
 11645  	if err := googleapi.CheckResponse(res); err != nil {
 11646  		return nil, gensupport.WrapError(err)
 11647  	}
 11648  	ret := &I18nLanguageListResponse{
 11649  		ServerResponse: googleapi.ServerResponse{
 11650  			Header:         res.Header,
 11651  			HTTPStatusCode: res.StatusCode,
 11652  		},
 11653  	}
 11654  	target := &ret
 11655  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11656  		return nil, err
 11657  	}
 11658  	return ret, nil
 11659  }
 11660  
 11661  type I18nRegionsListCall struct {
 11662  	s            *Service
 11663  	urlParams_   gensupport.URLParams
 11664  	ifNoneMatch_ string
 11665  	ctx_         context.Context
 11666  	header_      http.Header
 11667  }
 11668  
 11669  // List: Retrieves a list of resources, possibly filtered.
 11670  //
 11671  //   - part: The *part* parameter specifies the i18nRegion resource properties
 11672  //     that the API response will include. Set the parameter value to snippet.
 11673  func (r *I18nRegionsService) List(part []string) *I18nRegionsListCall {
 11674  	c := &I18nRegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11675  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 11676  	return c
 11677  }
 11678  
 11679  // Hl sets the optional parameter "hl":
 11680  func (c *I18nRegionsListCall) Hl(hl string) *I18nRegionsListCall {
 11681  	c.urlParams_.Set("hl", hl)
 11682  	return c
 11683  }
 11684  
 11685  // Fields allows partial responses to be retrieved. See
 11686  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11687  // details.
 11688  func (c *I18nRegionsListCall) Fields(s ...googleapi.Field) *I18nRegionsListCall {
 11689  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11690  	return c
 11691  }
 11692  
 11693  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11694  // object's ETag matches the given value. This is useful for getting updates
 11695  // only after the object has changed since the last request.
 11696  func (c *I18nRegionsListCall) IfNoneMatch(entityTag string) *I18nRegionsListCall {
 11697  	c.ifNoneMatch_ = entityTag
 11698  	return c
 11699  }
 11700  
 11701  // Context sets the context to be used in this call's Do method.
 11702  func (c *I18nRegionsListCall) Context(ctx context.Context) *I18nRegionsListCall {
 11703  	c.ctx_ = ctx
 11704  	return c
 11705  }
 11706  
 11707  // Header returns a http.Header that can be modified by the caller to add
 11708  // headers to the request.
 11709  func (c *I18nRegionsListCall) Header() http.Header {
 11710  	if c.header_ == nil {
 11711  		c.header_ = make(http.Header)
 11712  	}
 11713  	return c.header_
 11714  }
 11715  
 11716  func (c *I18nRegionsListCall) doRequest(alt string) (*http.Response, error) {
 11717  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11718  	if c.ifNoneMatch_ != "" {
 11719  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11720  	}
 11721  	var body io.Reader = nil
 11722  	c.urlParams_.Set("alt", alt)
 11723  	c.urlParams_.Set("prettyPrint", "false")
 11724  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/i18nRegions")
 11725  	urls += "?" + c.urlParams_.Encode()
 11726  	req, err := http.NewRequest("GET", urls, body)
 11727  	if err != nil {
 11728  		return nil, err
 11729  	}
 11730  	req.Header = reqHeaders
 11731  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11732  }
 11733  
 11734  // Do executes the "youtube.i18nRegions.list" call.
 11735  // Any non-2xx status code is an error. Response headers are in either
 11736  // *I18nRegionListResponse.ServerResponse.Header or (if a response was returned
 11737  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11738  // check whether the returned error was because http.StatusNotModified was
 11739  // returned.
 11740  func (c *I18nRegionsListCall) Do(opts ...googleapi.CallOption) (*I18nRegionListResponse, error) {
 11741  	gensupport.SetOptions(c.urlParams_, opts...)
 11742  	res, err := c.doRequest("json")
 11743  	if res != nil && res.StatusCode == http.StatusNotModified {
 11744  		if res.Body != nil {
 11745  			res.Body.Close()
 11746  		}
 11747  		return nil, gensupport.WrapError(&googleapi.Error{
 11748  			Code:   res.StatusCode,
 11749  			Header: res.Header,
 11750  		})
 11751  	}
 11752  	if err != nil {
 11753  		return nil, err
 11754  	}
 11755  	defer googleapi.CloseBody(res)
 11756  	if err := googleapi.CheckResponse(res); err != nil {
 11757  		return nil, gensupport.WrapError(err)
 11758  	}
 11759  	ret := &I18nRegionListResponse{
 11760  		ServerResponse: googleapi.ServerResponse{
 11761  			Header:         res.Header,
 11762  			HTTPStatusCode: res.StatusCode,
 11763  		},
 11764  	}
 11765  	target := &ret
 11766  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11767  		return nil, err
 11768  	}
 11769  	return ret, nil
 11770  }
 11771  
 11772  type LiveBroadcastsBindCall struct {
 11773  	s          *Service
 11774  	urlParams_ gensupport.URLParams
 11775  	ctx_       context.Context
 11776  	header_    http.Header
 11777  }
 11778  
 11779  // Bind: Bind a broadcast to a stream.
 11780  //
 11781  //   - id: Broadcast to bind to the stream.
 11782  //   - part: The *part* parameter specifies a comma-separated list of one or more
 11783  //     liveBroadcast resource properties that the API response will include. The
 11784  //     part names that you can include in the parameter value are id, snippet,
 11785  //     contentDetails, and status.
 11786  func (r *LiveBroadcastsService) Bind(id string, part []string) *LiveBroadcastsBindCall {
 11787  	c := &LiveBroadcastsBindCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11788  	c.urlParams_.Set("id", id)
 11789  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 11790  	return c
 11791  }
 11792  
 11793  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 11794  // *Note:* This parameter is intended exclusively for YouTube content partners.
 11795  // The *onBehalfOfContentOwner* parameter indicates that the request's
 11796  // authorization credentials identify a YouTube CMS user who is acting on
 11797  // behalf of the content owner specified in the parameter value. This parameter
 11798  // is intended for YouTube content partners that own and manage many different
 11799  // YouTube channels. It allows content owners to authenticate once and get
 11800  // access to all their video and channel data, without having to provide
 11801  // authentication credentials for each individual channel. The CMS account that
 11802  // the user authenticates with must be linked to the specified YouTube content
 11803  // owner.
 11804  func (c *LiveBroadcastsBindCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsBindCall {
 11805  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 11806  	return c
 11807  }
 11808  
 11809  // OnBehalfOfContentOwnerChannel sets the optional parameter
 11810  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 11811  // properly authorized request. *Note:* This parameter is intended exclusively
 11812  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 11813  // specifies the YouTube channel ID of the channel to which a video is being
 11814  // added. This parameter is required when a request specifies a value for the
 11815  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 11816  // with that parameter. In addition, the request must be authorized using a CMS
 11817  // account that is linked to the content owner that the onBehalfOfContentOwner
 11818  // parameter specifies. Finally, the channel that the
 11819  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 11820  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 11821  // parameter is intended for YouTube content partners that own and manage many
 11822  // different YouTube channels. It allows content owners to authenticate once
 11823  // and perform actions on behalf of the channel specified in the parameter
 11824  // value, without having to provide authentication credentials for each
 11825  // separate channel.
 11826  func (c *LiveBroadcastsBindCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsBindCall {
 11827  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 11828  	return c
 11829  }
 11830  
 11831  // StreamId sets the optional parameter "streamId": Stream to bind, if not set
 11832  // unbind the current one.
 11833  func (c *LiveBroadcastsBindCall) StreamId(streamId string) *LiveBroadcastsBindCall {
 11834  	c.urlParams_.Set("streamId", streamId)
 11835  	return c
 11836  }
 11837  
 11838  // Fields allows partial responses to be retrieved. See
 11839  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11840  // details.
 11841  func (c *LiveBroadcastsBindCall) Fields(s ...googleapi.Field) *LiveBroadcastsBindCall {
 11842  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11843  	return c
 11844  }
 11845  
 11846  // Context sets the context to be used in this call's Do method.
 11847  func (c *LiveBroadcastsBindCall) Context(ctx context.Context) *LiveBroadcastsBindCall {
 11848  	c.ctx_ = ctx
 11849  	return c
 11850  }
 11851  
 11852  // Header returns a http.Header that can be modified by the caller to add
 11853  // headers to the request.
 11854  func (c *LiveBroadcastsBindCall) Header() http.Header {
 11855  	if c.header_ == nil {
 11856  		c.header_ = make(http.Header)
 11857  	}
 11858  	return c.header_
 11859  }
 11860  
 11861  func (c *LiveBroadcastsBindCall) doRequest(alt string) (*http.Response, error) {
 11862  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11863  	var body io.Reader = nil
 11864  	c.urlParams_.Set("alt", alt)
 11865  	c.urlParams_.Set("prettyPrint", "false")
 11866  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/bind")
 11867  	urls += "?" + c.urlParams_.Encode()
 11868  	req, err := http.NewRequest("POST", urls, body)
 11869  	if err != nil {
 11870  		return nil, err
 11871  	}
 11872  	req.Header = reqHeaders
 11873  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11874  }
 11875  
 11876  // Do executes the "youtube.liveBroadcasts.bind" call.
 11877  // Any non-2xx status code is an error. Response headers are in either
 11878  // *LiveBroadcast.ServerResponse.Header or (if a response was returned at all)
 11879  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11880  // whether the returned error was because http.StatusNotModified was returned.
 11881  func (c *LiveBroadcastsBindCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
 11882  	gensupport.SetOptions(c.urlParams_, opts...)
 11883  	res, err := c.doRequest("json")
 11884  	if res != nil && res.StatusCode == http.StatusNotModified {
 11885  		if res.Body != nil {
 11886  			res.Body.Close()
 11887  		}
 11888  		return nil, gensupport.WrapError(&googleapi.Error{
 11889  			Code:   res.StatusCode,
 11890  			Header: res.Header,
 11891  		})
 11892  	}
 11893  	if err != nil {
 11894  		return nil, err
 11895  	}
 11896  	defer googleapi.CloseBody(res)
 11897  	if err := googleapi.CheckResponse(res); err != nil {
 11898  		return nil, gensupport.WrapError(err)
 11899  	}
 11900  	ret := &LiveBroadcast{
 11901  		ServerResponse: googleapi.ServerResponse{
 11902  			Header:         res.Header,
 11903  			HTTPStatusCode: res.StatusCode,
 11904  		},
 11905  	}
 11906  	target := &ret
 11907  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11908  		return nil, err
 11909  	}
 11910  	return ret, nil
 11911  }
 11912  
 11913  type LiveBroadcastsDeleteCall struct {
 11914  	s          *Service
 11915  	urlParams_ gensupport.URLParams
 11916  	ctx_       context.Context
 11917  	header_    http.Header
 11918  }
 11919  
 11920  // Delete: Delete a given broadcast.
 11921  //
 11922  // - id: Broadcast to delete.
 11923  func (r *LiveBroadcastsService) Delete(id string) *LiveBroadcastsDeleteCall {
 11924  	c := &LiveBroadcastsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11925  	c.urlParams_.Set("id", id)
 11926  	return c
 11927  }
 11928  
 11929  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 11930  // *Note:* This parameter is intended exclusively for YouTube content partners.
 11931  // The *onBehalfOfContentOwner* parameter indicates that the request's
 11932  // authorization credentials identify a YouTube CMS user who is acting on
 11933  // behalf of the content owner specified in the parameter value. This parameter
 11934  // is intended for YouTube content partners that own and manage many different
 11935  // YouTube channels. It allows content owners to authenticate once and get
 11936  // access to all their video and channel data, without having to provide
 11937  // authentication credentials for each individual channel. The CMS account that
 11938  // the user authenticates with must be linked to the specified YouTube content
 11939  // owner.
 11940  func (c *LiveBroadcastsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsDeleteCall {
 11941  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 11942  	return c
 11943  }
 11944  
 11945  // OnBehalfOfContentOwnerChannel sets the optional parameter
 11946  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 11947  // properly authorized request. *Note:* This parameter is intended exclusively
 11948  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 11949  // specifies the YouTube channel ID of the channel to which a video is being
 11950  // added. This parameter is required when a request specifies a value for the
 11951  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 11952  // with that parameter. In addition, the request must be authorized using a CMS
 11953  // account that is linked to the content owner that the onBehalfOfContentOwner
 11954  // parameter specifies. Finally, the channel that the
 11955  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 11956  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 11957  // parameter is intended for YouTube content partners that own and manage many
 11958  // different YouTube channels. It allows content owners to authenticate once
 11959  // and perform actions on behalf of the channel specified in the parameter
 11960  // value, without having to provide authentication credentials for each
 11961  // separate channel.
 11962  func (c *LiveBroadcastsDeleteCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsDeleteCall {
 11963  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 11964  	return c
 11965  }
 11966  
 11967  // Fields allows partial responses to be retrieved. See
 11968  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11969  // details.
 11970  func (c *LiveBroadcastsDeleteCall) Fields(s ...googleapi.Field) *LiveBroadcastsDeleteCall {
 11971  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11972  	return c
 11973  }
 11974  
 11975  // Context sets the context to be used in this call's Do method.
 11976  func (c *LiveBroadcastsDeleteCall) Context(ctx context.Context) *LiveBroadcastsDeleteCall {
 11977  	c.ctx_ = ctx
 11978  	return c
 11979  }
 11980  
 11981  // Header returns a http.Header that can be modified by the caller to add
 11982  // headers to the request.
 11983  func (c *LiveBroadcastsDeleteCall) Header() http.Header {
 11984  	if c.header_ == nil {
 11985  		c.header_ = make(http.Header)
 11986  	}
 11987  	return c.header_
 11988  }
 11989  
 11990  func (c *LiveBroadcastsDeleteCall) doRequest(alt string) (*http.Response, error) {
 11991  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11992  	var body io.Reader = nil
 11993  	c.urlParams_.Set("alt", alt)
 11994  	c.urlParams_.Set("prettyPrint", "false")
 11995  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
 11996  	urls += "?" + c.urlParams_.Encode()
 11997  	req, err := http.NewRequest("DELETE", urls, body)
 11998  	if err != nil {
 11999  		return nil, err
 12000  	}
 12001  	req.Header = reqHeaders
 12002  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12003  }
 12004  
 12005  // Do executes the "youtube.liveBroadcasts.delete" call.
 12006  func (c *LiveBroadcastsDeleteCall) Do(opts ...googleapi.CallOption) error {
 12007  	gensupport.SetOptions(c.urlParams_, opts...)
 12008  	res, err := c.doRequest("json")
 12009  	if err != nil {
 12010  		return err
 12011  	}
 12012  	defer googleapi.CloseBody(res)
 12013  	if err := googleapi.CheckResponse(res); err != nil {
 12014  		return gensupport.WrapError(err)
 12015  	}
 12016  	return nil
 12017  }
 12018  
 12019  type LiveBroadcastsInsertCall struct {
 12020  	s             *Service
 12021  	livebroadcast *LiveBroadcast
 12022  	urlParams_    gensupport.URLParams
 12023  	ctx_          context.Context
 12024  	header_       http.Header
 12025  }
 12026  
 12027  // Insert: Inserts a new stream for the authenticated user.
 12028  //
 12029  //   - part: The *part* parameter serves two purposes in this operation. It
 12030  //     identifies the properties that the write operation will set as well as the
 12031  //     properties that the API response will include. The part properties that
 12032  //     you can include in the parameter value are id, snippet, contentDetails,
 12033  //     and status.
 12034  func (r *LiveBroadcastsService) Insert(part []string, livebroadcast *LiveBroadcast) *LiveBroadcastsInsertCall {
 12035  	c := &LiveBroadcastsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12036  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 12037  	c.livebroadcast = livebroadcast
 12038  	return c
 12039  }
 12040  
 12041  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 12042  // *Note:* This parameter is intended exclusively for YouTube content partners.
 12043  // The *onBehalfOfContentOwner* parameter indicates that the request's
 12044  // authorization credentials identify a YouTube CMS user who is acting on
 12045  // behalf of the content owner specified in the parameter value. This parameter
 12046  // is intended for YouTube content partners that own and manage many different
 12047  // YouTube channels. It allows content owners to authenticate once and get
 12048  // access to all their video and channel data, without having to provide
 12049  // authentication credentials for each individual channel. The CMS account that
 12050  // the user authenticates with must be linked to the specified YouTube content
 12051  // owner.
 12052  func (c *LiveBroadcastsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsInsertCall {
 12053  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 12054  	return c
 12055  }
 12056  
 12057  // OnBehalfOfContentOwnerChannel sets the optional parameter
 12058  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 12059  // properly authorized request. *Note:* This parameter is intended exclusively
 12060  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 12061  // specifies the YouTube channel ID of the channel to which a video is being
 12062  // added. This parameter is required when a request specifies a value for the
 12063  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 12064  // with that parameter. In addition, the request must be authorized using a CMS
 12065  // account that is linked to the content owner that the onBehalfOfContentOwner
 12066  // parameter specifies. Finally, the channel that the
 12067  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 12068  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 12069  // parameter is intended for YouTube content partners that own and manage many
 12070  // different YouTube channels. It allows content owners to authenticate once
 12071  // and perform actions on behalf of the channel specified in the parameter
 12072  // value, without having to provide authentication credentials for each
 12073  // separate channel.
 12074  func (c *LiveBroadcastsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsInsertCall {
 12075  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 12076  	return c
 12077  }
 12078  
 12079  // Fields allows partial responses to be retrieved. See
 12080  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12081  // details.
 12082  func (c *LiveBroadcastsInsertCall) Fields(s ...googleapi.Field) *LiveBroadcastsInsertCall {
 12083  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12084  	return c
 12085  }
 12086  
 12087  // Context sets the context to be used in this call's Do method.
 12088  func (c *LiveBroadcastsInsertCall) Context(ctx context.Context) *LiveBroadcastsInsertCall {
 12089  	c.ctx_ = ctx
 12090  	return c
 12091  }
 12092  
 12093  // Header returns a http.Header that can be modified by the caller to add
 12094  // headers to the request.
 12095  func (c *LiveBroadcastsInsertCall) Header() http.Header {
 12096  	if c.header_ == nil {
 12097  		c.header_ = make(http.Header)
 12098  	}
 12099  	return c.header_
 12100  }
 12101  
 12102  func (c *LiveBroadcastsInsertCall) doRequest(alt string) (*http.Response, error) {
 12103  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12104  	var body io.Reader = nil
 12105  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
 12106  	if err != nil {
 12107  		return nil, err
 12108  	}
 12109  	c.urlParams_.Set("alt", alt)
 12110  	c.urlParams_.Set("prettyPrint", "false")
 12111  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
 12112  	urls += "?" + c.urlParams_.Encode()
 12113  	req, err := http.NewRequest("POST", urls, body)
 12114  	if err != nil {
 12115  		return nil, err
 12116  	}
 12117  	req.Header = reqHeaders
 12118  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12119  }
 12120  
 12121  // Do executes the "youtube.liveBroadcasts.insert" call.
 12122  // Any non-2xx status code is an error. Response headers are in either
 12123  // *LiveBroadcast.ServerResponse.Header or (if a response was returned at all)
 12124  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12125  // whether the returned error was because http.StatusNotModified was returned.
 12126  func (c *LiveBroadcastsInsertCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
 12127  	gensupport.SetOptions(c.urlParams_, opts...)
 12128  	res, err := c.doRequest("json")
 12129  	if res != nil && res.StatusCode == http.StatusNotModified {
 12130  		if res.Body != nil {
 12131  			res.Body.Close()
 12132  		}
 12133  		return nil, gensupport.WrapError(&googleapi.Error{
 12134  			Code:   res.StatusCode,
 12135  			Header: res.Header,
 12136  		})
 12137  	}
 12138  	if err != nil {
 12139  		return nil, err
 12140  	}
 12141  	defer googleapi.CloseBody(res)
 12142  	if err := googleapi.CheckResponse(res); err != nil {
 12143  		return nil, gensupport.WrapError(err)
 12144  	}
 12145  	ret := &LiveBroadcast{
 12146  		ServerResponse: googleapi.ServerResponse{
 12147  			Header:         res.Header,
 12148  			HTTPStatusCode: res.StatusCode,
 12149  		},
 12150  	}
 12151  	target := &ret
 12152  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12153  		return nil, err
 12154  	}
 12155  	return ret, nil
 12156  }
 12157  
 12158  type LiveBroadcastsInsertCuepointCall struct {
 12159  	s          *Service
 12160  	cuepoint   *Cuepoint
 12161  	urlParams_ gensupport.URLParams
 12162  	ctx_       context.Context
 12163  	header_    http.Header
 12164  }
 12165  
 12166  // InsertCuepoint: Insert cuepoints in a broadcast
 12167  func (r *LiveBroadcastsService) InsertCuepoint(cuepoint *Cuepoint) *LiveBroadcastsInsertCuepointCall {
 12168  	c := &LiveBroadcastsInsertCuepointCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12169  	c.cuepoint = cuepoint
 12170  	return c
 12171  }
 12172  
 12173  // Id sets the optional parameter "id": Broadcast to insert ads to, or
 12174  // equivalently `external_video_id` for internal use.
 12175  func (c *LiveBroadcastsInsertCuepointCall) Id(id string) *LiveBroadcastsInsertCuepointCall {
 12176  	c.urlParams_.Set("id", id)
 12177  	return c
 12178  }
 12179  
 12180  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 12181  // *Note:* This parameter is intended exclusively for YouTube content partners.
 12182  // The *onBehalfOfContentOwner* parameter indicates that the request's
 12183  // authorization credentials identify a YouTube CMS user who is acting on
 12184  // behalf of the content owner specified in the parameter value. This parameter
 12185  // is intended for YouTube content partners that own and manage many different
 12186  // YouTube channels. It allows content owners to authenticate once and get
 12187  // access to all their video and channel data, without having to provide
 12188  // authentication credentials for each individual channel. The CMS account that
 12189  // the user authenticates with must be linked to the specified YouTube content
 12190  // owner.
 12191  func (c *LiveBroadcastsInsertCuepointCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsInsertCuepointCall {
 12192  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 12193  	return c
 12194  }
 12195  
 12196  // OnBehalfOfContentOwnerChannel sets the optional parameter
 12197  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 12198  // properly authorized request. *Note:* This parameter is intended exclusively
 12199  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 12200  // specifies the YouTube channel ID of the channel to which a video is being
 12201  // added. This parameter is required when a request specifies a value for the
 12202  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 12203  // with that parameter. In addition, the request must be authorized using a CMS
 12204  // account that is linked to the content owner that the onBehalfOfContentOwner
 12205  // parameter specifies. Finally, the channel that the
 12206  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 12207  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 12208  // parameter is intended for YouTube content partners that own and manage many
 12209  // different YouTube channels. It allows content owners to authenticate once
 12210  // and perform actions on behalf of the channel specified in the parameter
 12211  // value, without having to provide authentication credentials for each
 12212  // separate channel.
 12213  func (c *LiveBroadcastsInsertCuepointCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsInsertCuepointCall {
 12214  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 12215  	return c
 12216  }
 12217  
 12218  // Part sets the optional parameter "part": The *part* parameter specifies a
 12219  // comma-separated list of one or more liveBroadcast resource properties that
 12220  // the API response will include. The part names that you can include in the
 12221  // parameter value are id, snippet, contentDetails, and status.
 12222  func (c *LiveBroadcastsInsertCuepointCall) Part(part ...string) *LiveBroadcastsInsertCuepointCall {
 12223  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 12224  	return c
 12225  }
 12226  
 12227  // Fields allows partial responses to be retrieved. See
 12228  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12229  // details.
 12230  func (c *LiveBroadcastsInsertCuepointCall) Fields(s ...googleapi.Field) *LiveBroadcastsInsertCuepointCall {
 12231  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12232  	return c
 12233  }
 12234  
 12235  // Context sets the context to be used in this call's Do method.
 12236  func (c *LiveBroadcastsInsertCuepointCall) Context(ctx context.Context) *LiveBroadcastsInsertCuepointCall {
 12237  	c.ctx_ = ctx
 12238  	return c
 12239  }
 12240  
 12241  // Header returns a http.Header that can be modified by the caller to add
 12242  // headers to the request.
 12243  func (c *LiveBroadcastsInsertCuepointCall) Header() http.Header {
 12244  	if c.header_ == nil {
 12245  		c.header_ = make(http.Header)
 12246  	}
 12247  	return c.header_
 12248  }
 12249  
 12250  func (c *LiveBroadcastsInsertCuepointCall) doRequest(alt string) (*http.Response, error) {
 12251  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12252  	var body io.Reader = nil
 12253  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cuepoint)
 12254  	if err != nil {
 12255  		return nil, err
 12256  	}
 12257  	c.urlParams_.Set("alt", alt)
 12258  	c.urlParams_.Set("prettyPrint", "false")
 12259  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/cuepoint")
 12260  	urls += "?" + c.urlParams_.Encode()
 12261  	req, err := http.NewRequest("POST", urls, body)
 12262  	if err != nil {
 12263  		return nil, err
 12264  	}
 12265  	req.Header = reqHeaders
 12266  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12267  }
 12268  
 12269  // Do executes the "youtube.liveBroadcasts.insertCuepoint" call.
 12270  // Any non-2xx status code is an error. Response headers are in either
 12271  // *Cuepoint.ServerResponse.Header or (if a response was returned at all) in
 12272  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12273  // whether the returned error was because http.StatusNotModified was returned.
 12274  func (c *LiveBroadcastsInsertCuepointCall) Do(opts ...googleapi.CallOption) (*Cuepoint, error) {
 12275  	gensupport.SetOptions(c.urlParams_, opts...)
 12276  	res, err := c.doRequest("json")
 12277  	if res != nil && res.StatusCode == http.StatusNotModified {
 12278  		if res.Body != nil {
 12279  			res.Body.Close()
 12280  		}
 12281  		return nil, gensupport.WrapError(&googleapi.Error{
 12282  			Code:   res.StatusCode,
 12283  			Header: res.Header,
 12284  		})
 12285  	}
 12286  	if err != nil {
 12287  		return nil, err
 12288  	}
 12289  	defer googleapi.CloseBody(res)
 12290  	if err := googleapi.CheckResponse(res); err != nil {
 12291  		return nil, gensupport.WrapError(err)
 12292  	}
 12293  	ret := &Cuepoint{
 12294  		ServerResponse: googleapi.ServerResponse{
 12295  			Header:         res.Header,
 12296  			HTTPStatusCode: res.StatusCode,
 12297  		},
 12298  	}
 12299  	target := &ret
 12300  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12301  		return nil, err
 12302  	}
 12303  	return ret, nil
 12304  }
 12305  
 12306  type LiveBroadcastsListCall struct {
 12307  	s            *Service
 12308  	urlParams_   gensupport.URLParams
 12309  	ifNoneMatch_ string
 12310  	ctx_         context.Context
 12311  	header_      http.Header
 12312  }
 12313  
 12314  // List: Retrieve the list of broadcasts associated with the given channel.
 12315  //
 12316  //   - part: The *part* parameter specifies a comma-separated list of one or more
 12317  //     liveBroadcast resource properties that the API response will include. The
 12318  //     part names that you can include in the parameter value are id, snippet,
 12319  //     contentDetails, status and statistics.
 12320  func (r *LiveBroadcastsService) List(part []string) *LiveBroadcastsListCall {
 12321  	c := &LiveBroadcastsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12322  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 12323  	return c
 12324  }
 12325  
 12326  // BroadcastStatus sets the optional parameter "broadcastStatus": Return
 12327  // broadcasts with a certain status, e.g. active broadcasts.
 12328  //
 12329  // Possible values:
 12330  //
 12331  //	"broadcastStatusFilterUnspecified"
 12332  //	"all" - Return all broadcasts.
 12333  //	"active" - Return current live broadcasts.
 12334  //	"upcoming" - Return broadcasts that have not yet started.
 12335  //	"completed" - Return broadcasts that have already ended.
 12336  func (c *LiveBroadcastsListCall) BroadcastStatus(broadcastStatus string) *LiveBroadcastsListCall {
 12337  	c.urlParams_.Set("broadcastStatus", broadcastStatus)
 12338  	return c
 12339  }
 12340  
 12341  // BroadcastType sets the optional parameter "broadcastType": Return only
 12342  // broadcasts with the selected type.
 12343  //
 12344  // Possible values:
 12345  //
 12346  //	"broadcastTypeFilterUnspecified"
 12347  //	"all" - Return all broadcasts.
 12348  //	"event" (default) - Return only scheduled event broadcasts.
 12349  //	"persistent" - Return only persistent broadcasts.
 12350  func (c *LiveBroadcastsListCall) BroadcastType(broadcastType string) *LiveBroadcastsListCall {
 12351  	c.urlParams_.Set("broadcastType", broadcastType)
 12352  	return c
 12353  }
 12354  
 12355  // Id sets the optional parameter "id": Return broadcasts with the given ids
 12356  // from Stubby or Apiary.
 12357  func (c *LiveBroadcastsListCall) Id(id ...string) *LiveBroadcastsListCall {
 12358  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 12359  	return c
 12360  }
 12361  
 12362  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 12363  // parameter specifies the maximum number of items that should be returned in
 12364  // the result set.
 12365  func (c *LiveBroadcastsListCall) MaxResults(maxResults int64) *LiveBroadcastsListCall {
 12366  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 12367  	return c
 12368  }
 12369  
 12370  // Mine sets the optional parameter "mine":
 12371  func (c *LiveBroadcastsListCall) Mine(mine bool) *LiveBroadcastsListCall {
 12372  	c.urlParams_.Set("mine", fmt.Sprint(mine))
 12373  	return c
 12374  }
 12375  
 12376  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 12377  // *Note:* This parameter is intended exclusively for YouTube content partners.
 12378  // The *onBehalfOfContentOwner* parameter indicates that the request's
 12379  // authorization credentials identify a YouTube CMS user who is acting on
 12380  // behalf of the content owner specified in the parameter value. This parameter
 12381  // is intended for YouTube content partners that own and manage many different
 12382  // YouTube channels. It allows content owners to authenticate once and get
 12383  // access to all their video and channel data, without having to provide
 12384  // authentication credentials for each individual channel. The CMS account that
 12385  // the user authenticates with must be linked to the specified YouTube content
 12386  // owner.
 12387  func (c *LiveBroadcastsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsListCall {
 12388  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 12389  	return c
 12390  }
 12391  
 12392  // OnBehalfOfContentOwnerChannel sets the optional parameter
 12393  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 12394  // properly authorized request. *Note:* This parameter is intended exclusively
 12395  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 12396  // specifies the YouTube channel ID of the channel to which a video is being
 12397  // added. This parameter is required when a request specifies a value for the
 12398  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 12399  // with that parameter. In addition, the request must be authorized using a CMS
 12400  // account that is linked to the content owner that the onBehalfOfContentOwner
 12401  // parameter specifies. Finally, the channel that the
 12402  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 12403  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 12404  // parameter is intended for YouTube content partners that own and manage many
 12405  // different YouTube channels. It allows content owners to authenticate once
 12406  // and perform actions on behalf of the channel specified in the parameter
 12407  // value, without having to provide authentication credentials for each
 12408  // separate channel.
 12409  func (c *LiveBroadcastsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsListCall {
 12410  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 12411  	return c
 12412  }
 12413  
 12414  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 12415  // identifies a specific page in the result set that should be returned. In an
 12416  // API response, the nextPageToken and prevPageToken properties identify other
 12417  // pages that could be retrieved.
 12418  func (c *LiveBroadcastsListCall) PageToken(pageToken string) *LiveBroadcastsListCall {
 12419  	c.urlParams_.Set("pageToken", pageToken)
 12420  	return c
 12421  }
 12422  
 12423  // Fields allows partial responses to be retrieved. See
 12424  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12425  // details.
 12426  func (c *LiveBroadcastsListCall) Fields(s ...googleapi.Field) *LiveBroadcastsListCall {
 12427  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12428  	return c
 12429  }
 12430  
 12431  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12432  // object's ETag matches the given value. This is useful for getting updates
 12433  // only after the object has changed since the last request.
 12434  func (c *LiveBroadcastsListCall) IfNoneMatch(entityTag string) *LiveBroadcastsListCall {
 12435  	c.ifNoneMatch_ = entityTag
 12436  	return c
 12437  }
 12438  
 12439  // Context sets the context to be used in this call's Do method.
 12440  func (c *LiveBroadcastsListCall) Context(ctx context.Context) *LiveBroadcastsListCall {
 12441  	c.ctx_ = ctx
 12442  	return c
 12443  }
 12444  
 12445  // Header returns a http.Header that can be modified by the caller to add
 12446  // headers to the request.
 12447  func (c *LiveBroadcastsListCall) Header() http.Header {
 12448  	if c.header_ == nil {
 12449  		c.header_ = make(http.Header)
 12450  	}
 12451  	return c.header_
 12452  }
 12453  
 12454  func (c *LiveBroadcastsListCall) doRequest(alt string) (*http.Response, error) {
 12455  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12456  	if c.ifNoneMatch_ != "" {
 12457  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12458  	}
 12459  	var body io.Reader = nil
 12460  	c.urlParams_.Set("alt", alt)
 12461  	c.urlParams_.Set("prettyPrint", "false")
 12462  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
 12463  	urls += "?" + c.urlParams_.Encode()
 12464  	req, err := http.NewRequest("GET", urls, body)
 12465  	if err != nil {
 12466  		return nil, err
 12467  	}
 12468  	req.Header = reqHeaders
 12469  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12470  }
 12471  
 12472  // Do executes the "youtube.liveBroadcasts.list" call.
 12473  // Any non-2xx status code is an error. Response headers are in either
 12474  // *LiveBroadcastListResponse.ServerResponse.Header or (if a response was
 12475  // returned at all) in error.(*googleapi.Error).Header. Use
 12476  // googleapi.IsNotModified to check whether the returned error was because
 12477  // http.StatusNotModified was returned.
 12478  func (c *LiveBroadcastsListCall) Do(opts ...googleapi.CallOption) (*LiveBroadcastListResponse, error) {
 12479  	gensupport.SetOptions(c.urlParams_, opts...)
 12480  	res, err := c.doRequest("json")
 12481  	if res != nil && res.StatusCode == http.StatusNotModified {
 12482  		if res.Body != nil {
 12483  			res.Body.Close()
 12484  		}
 12485  		return nil, gensupport.WrapError(&googleapi.Error{
 12486  			Code:   res.StatusCode,
 12487  			Header: res.Header,
 12488  		})
 12489  	}
 12490  	if err != nil {
 12491  		return nil, err
 12492  	}
 12493  	defer googleapi.CloseBody(res)
 12494  	if err := googleapi.CheckResponse(res); err != nil {
 12495  		return nil, gensupport.WrapError(err)
 12496  	}
 12497  	ret := &LiveBroadcastListResponse{
 12498  		ServerResponse: googleapi.ServerResponse{
 12499  			Header:         res.Header,
 12500  			HTTPStatusCode: res.StatusCode,
 12501  		},
 12502  	}
 12503  	target := &ret
 12504  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12505  		return nil, err
 12506  	}
 12507  	return ret, nil
 12508  }
 12509  
 12510  // Pages invokes f for each page of results.
 12511  // A non-nil error returned from f will halt the iteration.
 12512  // The provided context supersedes any context provided to the Context method.
 12513  func (c *LiveBroadcastsListCall) Pages(ctx context.Context, f func(*LiveBroadcastListResponse) error) error {
 12514  	c.ctx_ = ctx
 12515  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12516  	for {
 12517  		x, err := c.Do()
 12518  		if err != nil {
 12519  			return err
 12520  		}
 12521  		if err := f(x); err != nil {
 12522  			return err
 12523  		}
 12524  		if x.NextPageToken == "" {
 12525  			return nil
 12526  		}
 12527  		c.PageToken(x.NextPageToken)
 12528  	}
 12529  }
 12530  
 12531  type LiveBroadcastsTransitionCall struct {
 12532  	s          *Service
 12533  	urlParams_ gensupport.URLParams
 12534  	ctx_       context.Context
 12535  	header_    http.Header
 12536  }
 12537  
 12538  // Transition: Transition a broadcast to a given status.
 12539  //
 12540  //   - broadcastStatus: The status to which the broadcast is going to transition.
 12541  //   - id: Broadcast to transition.
 12542  //   - part: The *part* parameter specifies a comma-separated list of one or more
 12543  //     liveBroadcast resource properties that the API response will include. The
 12544  //     part names that you can include in the parameter value are id, snippet,
 12545  //     contentDetails, and status.
 12546  func (r *LiveBroadcastsService) Transition(broadcastStatus string, id string, part []string) *LiveBroadcastsTransitionCall {
 12547  	c := &LiveBroadcastsTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12548  	c.urlParams_.Set("broadcastStatus", broadcastStatus)
 12549  	c.urlParams_.Set("id", id)
 12550  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 12551  	return c
 12552  }
 12553  
 12554  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 12555  // *Note:* This parameter is intended exclusively for YouTube content partners.
 12556  // The *onBehalfOfContentOwner* parameter indicates that the request's
 12557  // authorization credentials identify a YouTube CMS user who is acting on
 12558  // behalf of the content owner specified in the parameter value. This parameter
 12559  // is intended for YouTube content partners that own and manage many different
 12560  // YouTube channels. It allows content owners to authenticate once and get
 12561  // access to all their video and channel data, without having to provide
 12562  // authentication credentials for each individual channel. The CMS account that
 12563  // the user authenticates with must be linked to the specified YouTube content
 12564  // owner.
 12565  func (c *LiveBroadcastsTransitionCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsTransitionCall {
 12566  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 12567  	return c
 12568  }
 12569  
 12570  // OnBehalfOfContentOwnerChannel sets the optional parameter
 12571  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 12572  // properly authorized request. *Note:* This parameter is intended exclusively
 12573  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 12574  // specifies the YouTube channel ID of the channel to which a video is being
 12575  // added. This parameter is required when a request specifies a value for the
 12576  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 12577  // with that parameter. In addition, the request must be authorized using a CMS
 12578  // account that is linked to the content owner that the onBehalfOfContentOwner
 12579  // parameter specifies. Finally, the channel that the
 12580  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 12581  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 12582  // parameter is intended for YouTube content partners that own and manage many
 12583  // different YouTube channels. It allows content owners to authenticate once
 12584  // and perform actions on behalf of the channel specified in the parameter
 12585  // value, without having to provide authentication credentials for each
 12586  // separate channel.
 12587  func (c *LiveBroadcastsTransitionCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsTransitionCall {
 12588  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 12589  	return c
 12590  }
 12591  
 12592  // Fields allows partial responses to be retrieved. See
 12593  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12594  // details.
 12595  func (c *LiveBroadcastsTransitionCall) Fields(s ...googleapi.Field) *LiveBroadcastsTransitionCall {
 12596  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12597  	return c
 12598  }
 12599  
 12600  // Context sets the context to be used in this call's Do method.
 12601  func (c *LiveBroadcastsTransitionCall) Context(ctx context.Context) *LiveBroadcastsTransitionCall {
 12602  	c.ctx_ = ctx
 12603  	return c
 12604  }
 12605  
 12606  // Header returns a http.Header that can be modified by the caller to add
 12607  // headers to the request.
 12608  func (c *LiveBroadcastsTransitionCall) Header() http.Header {
 12609  	if c.header_ == nil {
 12610  		c.header_ = make(http.Header)
 12611  	}
 12612  	return c.header_
 12613  }
 12614  
 12615  func (c *LiveBroadcastsTransitionCall) doRequest(alt string) (*http.Response, error) {
 12616  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12617  	var body io.Reader = nil
 12618  	c.urlParams_.Set("alt", alt)
 12619  	c.urlParams_.Set("prettyPrint", "false")
 12620  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/transition")
 12621  	urls += "?" + c.urlParams_.Encode()
 12622  	req, err := http.NewRequest("POST", urls, body)
 12623  	if err != nil {
 12624  		return nil, err
 12625  	}
 12626  	req.Header = reqHeaders
 12627  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12628  }
 12629  
 12630  // Do executes the "youtube.liveBroadcasts.transition" call.
 12631  // Any non-2xx status code is an error. Response headers are in either
 12632  // *LiveBroadcast.ServerResponse.Header or (if a response was returned at all)
 12633  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12634  // whether the returned error was because http.StatusNotModified was returned.
 12635  func (c *LiveBroadcastsTransitionCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
 12636  	gensupport.SetOptions(c.urlParams_, opts...)
 12637  	res, err := c.doRequest("json")
 12638  	if res != nil && res.StatusCode == http.StatusNotModified {
 12639  		if res.Body != nil {
 12640  			res.Body.Close()
 12641  		}
 12642  		return nil, gensupport.WrapError(&googleapi.Error{
 12643  			Code:   res.StatusCode,
 12644  			Header: res.Header,
 12645  		})
 12646  	}
 12647  	if err != nil {
 12648  		return nil, err
 12649  	}
 12650  	defer googleapi.CloseBody(res)
 12651  	if err := googleapi.CheckResponse(res); err != nil {
 12652  		return nil, gensupport.WrapError(err)
 12653  	}
 12654  	ret := &LiveBroadcast{
 12655  		ServerResponse: googleapi.ServerResponse{
 12656  			Header:         res.Header,
 12657  			HTTPStatusCode: res.StatusCode,
 12658  		},
 12659  	}
 12660  	target := &ret
 12661  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12662  		return nil, err
 12663  	}
 12664  	return ret, nil
 12665  }
 12666  
 12667  type LiveBroadcastsUpdateCall struct {
 12668  	s             *Service
 12669  	livebroadcast *LiveBroadcast
 12670  	urlParams_    gensupport.URLParams
 12671  	ctx_          context.Context
 12672  	header_       http.Header
 12673  }
 12674  
 12675  // Update: Updates an existing broadcast for the authenticated user.
 12676  //
 12677  //   - part: The *part* parameter serves two purposes in this operation. It
 12678  //     identifies the properties that the write operation will set as well as the
 12679  //     properties that the API response will include. The part properties that
 12680  //     you can include in the parameter value are id, snippet, contentDetails,
 12681  //     and status. Note that this method will override the existing values for
 12682  //     all of the mutable properties that are contained in any parts that the
 12683  //     parameter value specifies. For example, a broadcast's privacy status is
 12684  //     defined in the status part. As such, if your request is updating a private
 12685  //     or unlisted broadcast, and the request's part parameter value includes the
 12686  //     status part, the broadcast's privacy setting will be updated to whatever
 12687  //     value the request body specifies. If the request body does not specify a
 12688  //     value, the existing privacy setting will be removed and the broadcast will
 12689  //     revert to the default privacy setting.
 12690  func (r *LiveBroadcastsService) Update(part []string, livebroadcast *LiveBroadcast) *LiveBroadcastsUpdateCall {
 12691  	c := &LiveBroadcastsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12692  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 12693  	c.livebroadcast = livebroadcast
 12694  	return c
 12695  }
 12696  
 12697  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 12698  // *Note:* This parameter is intended exclusively for YouTube content partners.
 12699  // The *onBehalfOfContentOwner* parameter indicates that the request's
 12700  // authorization credentials identify a YouTube CMS user who is acting on
 12701  // behalf of the content owner specified in the parameter value. This parameter
 12702  // is intended for YouTube content partners that own and manage many different
 12703  // YouTube channels. It allows content owners to authenticate once and get
 12704  // access to all their video and channel data, without having to provide
 12705  // authentication credentials for each individual channel. The CMS account that
 12706  // the user authenticates with must be linked to the specified YouTube content
 12707  // owner.
 12708  func (c *LiveBroadcastsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveBroadcastsUpdateCall {
 12709  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 12710  	return c
 12711  }
 12712  
 12713  // OnBehalfOfContentOwnerChannel sets the optional parameter
 12714  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 12715  // properly authorized request. *Note:* This parameter is intended exclusively
 12716  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 12717  // specifies the YouTube channel ID of the channel to which a video is being
 12718  // added. This parameter is required when a request specifies a value for the
 12719  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 12720  // with that parameter. In addition, the request must be authorized using a CMS
 12721  // account that is linked to the content owner that the onBehalfOfContentOwner
 12722  // parameter specifies. Finally, the channel that the
 12723  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 12724  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 12725  // parameter is intended for YouTube content partners that own and manage many
 12726  // different YouTube channels. It allows content owners to authenticate once
 12727  // and perform actions on behalf of the channel specified in the parameter
 12728  // value, without having to provide authentication credentials for each
 12729  // separate channel.
 12730  func (c *LiveBroadcastsUpdateCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveBroadcastsUpdateCall {
 12731  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 12732  	return c
 12733  }
 12734  
 12735  // Fields allows partial responses to be retrieved. See
 12736  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12737  // details.
 12738  func (c *LiveBroadcastsUpdateCall) Fields(s ...googleapi.Field) *LiveBroadcastsUpdateCall {
 12739  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12740  	return c
 12741  }
 12742  
 12743  // Context sets the context to be used in this call's Do method.
 12744  func (c *LiveBroadcastsUpdateCall) Context(ctx context.Context) *LiveBroadcastsUpdateCall {
 12745  	c.ctx_ = ctx
 12746  	return c
 12747  }
 12748  
 12749  // Header returns a http.Header that can be modified by the caller to add
 12750  // headers to the request.
 12751  func (c *LiveBroadcastsUpdateCall) Header() http.Header {
 12752  	if c.header_ == nil {
 12753  		c.header_ = make(http.Header)
 12754  	}
 12755  	return c.header_
 12756  }
 12757  
 12758  func (c *LiveBroadcastsUpdateCall) doRequest(alt string) (*http.Response, error) {
 12759  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12760  	var body io.Reader = nil
 12761  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
 12762  	if err != nil {
 12763  		return nil, err
 12764  	}
 12765  	c.urlParams_.Set("alt", alt)
 12766  	c.urlParams_.Set("prettyPrint", "false")
 12767  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts")
 12768  	urls += "?" + c.urlParams_.Encode()
 12769  	req, err := http.NewRequest("PUT", urls, body)
 12770  	if err != nil {
 12771  		return nil, err
 12772  	}
 12773  	req.Header = reqHeaders
 12774  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12775  }
 12776  
 12777  // Do executes the "youtube.liveBroadcasts.update" call.
 12778  // Any non-2xx status code is an error. Response headers are in either
 12779  // *LiveBroadcast.ServerResponse.Header or (if a response was returned at all)
 12780  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12781  // whether the returned error was because http.StatusNotModified was returned.
 12782  func (c *LiveBroadcastsUpdateCall) Do(opts ...googleapi.CallOption) (*LiveBroadcast, error) {
 12783  	gensupport.SetOptions(c.urlParams_, opts...)
 12784  	res, err := c.doRequest("json")
 12785  	if res != nil && res.StatusCode == http.StatusNotModified {
 12786  		if res.Body != nil {
 12787  			res.Body.Close()
 12788  		}
 12789  		return nil, gensupport.WrapError(&googleapi.Error{
 12790  			Code:   res.StatusCode,
 12791  			Header: res.Header,
 12792  		})
 12793  	}
 12794  	if err != nil {
 12795  		return nil, err
 12796  	}
 12797  	defer googleapi.CloseBody(res)
 12798  	if err := googleapi.CheckResponse(res); err != nil {
 12799  		return nil, gensupport.WrapError(err)
 12800  	}
 12801  	ret := &LiveBroadcast{
 12802  		ServerResponse: googleapi.ServerResponse{
 12803  			Header:         res.Header,
 12804  			HTTPStatusCode: res.StatusCode,
 12805  		},
 12806  	}
 12807  	target := &ret
 12808  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12809  		return nil, err
 12810  	}
 12811  	return ret, nil
 12812  }
 12813  
 12814  type LiveChatBansDeleteCall struct {
 12815  	s          *Service
 12816  	urlParams_ gensupport.URLParams
 12817  	ctx_       context.Context
 12818  	header_    http.Header
 12819  }
 12820  
 12821  // Delete: Deletes a chat ban.
 12822  //
 12823  // - id: .
 12824  func (r *LiveChatBansService) Delete(id string) *LiveChatBansDeleteCall {
 12825  	c := &LiveChatBansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12826  	c.urlParams_.Set("id", id)
 12827  	return c
 12828  }
 12829  
 12830  // Fields allows partial responses to be retrieved. See
 12831  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12832  // details.
 12833  func (c *LiveChatBansDeleteCall) Fields(s ...googleapi.Field) *LiveChatBansDeleteCall {
 12834  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12835  	return c
 12836  }
 12837  
 12838  // Context sets the context to be used in this call's Do method.
 12839  func (c *LiveChatBansDeleteCall) Context(ctx context.Context) *LiveChatBansDeleteCall {
 12840  	c.ctx_ = ctx
 12841  	return c
 12842  }
 12843  
 12844  // Header returns a http.Header that can be modified by the caller to add
 12845  // headers to the request.
 12846  func (c *LiveChatBansDeleteCall) Header() http.Header {
 12847  	if c.header_ == nil {
 12848  		c.header_ = make(http.Header)
 12849  	}
 12850  	return c.header_
 12851  }
 12852  
 12853  func (c *LiveChatBansDeleteCall) doRequest(alt string) (*http.Response, error) {
 12854  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12855  	var body io.Reader = nil
 12856  	c.urlParams_.Set("alt", alt)
 12857  	c.urlParams_.Set("prettyPrint", "false")
 12858  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/bans")
 12859  	urls += "?" + c.urlParams_.Encode()
 12860  	req, err := http.NewRequest("DELETE", urls, body)
 12861  	if err != nil {
 12862  		return nil, err
 12863  	}
 12864  	req.Header = reqHeaders
 12865  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12866  }
 12867  
 12868  // Do executes the "youtube.liveChatBans.delete" call.
 12869  func (c *LiveChatBansDeleteCall) Do(opts ...googleapi.CallOption) error {
 12870  	gensupport.SetOptions(c.urlParams_, opts...)
 12871  	res, err := c.doRequest("json")
 12872  	if err != nil {
 12873  		return err
 12874  	}
 12875  	defer googleapi.CloseBody(res)
 12876  	if err := googleapi.CheckResponse(res); err != nil {
 12877  		return gensupport.WrapError(err)
 12878  	}
 12879  	return nil
 12880  }
 12881  
 12882  type LiveChatBansInsertCall struct {
 12883  	s           *Service
 12884  	livechatban *LiveChatBan
 12885  	urlParams_  gensupport.URLParams
 12886  	ctx_        context.Context
 12887  	header_     http.Header
 12888  }
 12889  
 12890  // Insert: Inserts a new resource into this collection.
 12891  //
 12892  //   - part: The *part* parameter serves two purposes in this operation. It
 12893  //     identifies the properties that the write operation will set as well as the
 12894  //     properties that the API response returns. Set the parameter value to
 12895  //     snippet.
 12896  func (r *LiveChatBansService) Insert(part []string, livechatban *LiveChatBan) *LiveChatBansInsertCall {
 12897  	c := &LiveChatBansInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12898  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 12899  	c.livechatban = livechatban
 12900  	return c
 12901  }
 12902  
 12903  // Fields allows partial responses to be retrieved. See
 12904  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12905  // details.
 12906  func (c *LiveChatBansInsertCall) Fields(s ...googleapi.Field) *LiveChatBansInsertCall {
 12907  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12908  	return c
 12909  }
 12910  
 12911  // Context sets the context to be used in this call's Do method.
 12912  func (c *LiveChatBansInsertCall) Context(ctx context.Context) *LiveChatBansInsertCall {
 12913  	c.ctx_ = ctx
 12914  	return c
 12915  }
 12916  
 12917  // Header returns a http.Header that can be modified by the caller to add
 12918  // headers to the request.
 12919  func (c *LiveChatBansInsertCall) Header() http.Header {
 12920  	if c.header_ == nil {
 12921  		c.header_ = make(http.Header)
 12922  	}
 12923  	return c.header_
 12924  }
 12925  
 12926  func (c *LiveChatBansInsertCall) doRequest(alt string) (*http.Response, error) {
 12927  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12928  	var body io.Reader = nil
 12929  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatban)
 12930  	if err != nil {
 12931  		return nil, err
 12932  	}
 12933  	c.urlParams_.Set("alt", alt)
 12934  	c.urlParams_.Set("prettyPrint", "false")
 12935  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/bans")
 12936  	urls += "?" + c.urlParams_.Encode()
 12937  	req, err := http.NewRequest("POST", urls, body)
 12938  	if err != nil {
 12939  		return nil, err
 12940  	}
 12941  	req.Header = reqHeaders
 12942  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12943  }
 12944  
 12945  // Do executes the "youtube.liveChatBans.insert" call.
 12946  // Any non-2xx status code is an error. Response headers are in either
 12947  // *LiveChatBan.ServerResponse.Header or (if a response was returned at all) in
 12948  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12949  // whether the returned error was because http.StatusNotModified was returned.
 12950  func (c *LiveChatBansInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatBan, error) {
 12951  	gensupport.SetOptions(c.urlParams_, opts...)
 12952  	res, err := c.doRequest("json")
 12953  	if res != nil && res.StatusCode == http.StatusNotModified {
 12954  		if res.Body != nil {
 12955  			res.Body.Close()
 12956  		}
 12957  		return nil, gensupport.WrapError(&googleapi.Error{
 12958  			Code:   res.StatusCode,
 12959  			Header: res.Header,
 12960  		})
 12961  	}
 12962  	if err != nil {
 12963  		return nil, err
 12964  	}
 12965  	defer googleapi.CloseBody(res)
 12966  	if err := googleapi.CheckResponse(res); err != nil {
 12967  		return nil, gensupport.WrapError(err)
 12968  	}
 12969  	ret := &LiveChatBan{
 12970  		ServerResponse: googleapi.ServerResponse{
 12971  			Header:         res.Header,
 12972  			HTTPStatusCode: res.StatusCode,
 12973  		},
 12974  	}
 12975  	target := &ret
 12976  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12977  		return nil, err
 12978  	}
 12979  	return ret, nil
 12980  }
 12981  
 12982  type LiveChatMessagesDeleteCall struct {
 12983  	s          *Service
 12984  	urlParams_ gensupport.URLParams
 12985  	ctx_       context.Context
 12986  	header_    http.Header
 12987  }
 12988  
 12989  // Delete: Deletes a chat message.
 12990  //
 12991  // - id: .
 12992  func (r *LiveChatMessagesService) Delete(id string) *LiveChatMessagesDeleteCall {
 12993  	c := &LiveChatMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12994  	c.urlParams_.Set("id", id)
 12995  	return c
 12996  }
 12997  
 12998  // Fields allows partial responses to be retrieved. See
 12999  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13000  // details.
 13001  func (c *LiveChatMessagesDeleteCall) Fields(s ...googleapi.Field) *LiveChatMessagesDeleteCall {
 13002  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13003  	return c
 13004  }
 13005  
 13006  // Context sets the context to be used in this call's Do method.
 13007  func (c *LiveChatMessagesDeleteCall) Context(ctx context.Context) *LiveChatMessagesDeleteCall {
 13008  	c.ctx_ = ctx
 13009  	return c
 13010  }
 13011  
 13012  // Header returns a http.Header that can be modified by the caller to add
 13013  // headers to the request.
 13014  func (c *LiveChatMessagesDeleteCall) Header() http.Header {
 13015  	if c.header_ == nil {
 13016  		c.header_ = make(http.Header)
 13017  	}
 13018  	return c.header_
 13019  }
 13020  
 13021  func (c *LiveChatMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
 13022  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13023  	var body io.Reader = nil
 13024  	c.urlParams_.Set("alt", alt)
 13025  	c.urlParams_.Set("prettyPrint", "false")
 13026  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages")
 13027  	urls += "?" + c.urlParams_.Encode()
 13028  	req, err := http.NewRequest("DELETE", urls, body)
 13029  	if err != nil {
 13030  		return nil, err
 13031  	}
 13032  	req.Header = reqHeaders
 13033  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13034  }
 13035  
 13036  // Do executes the "youtube.liveChatMessages.delete" call.
 13037  func (c *LiveChatMessagesDeleteCall) Do(opts ...googleapi.CallOption) error {
 13038  	gensupport.SetOptions(c.urlParams_, opts...)
 13039  	res, err := c.doRequest("json")
 13040  	if err != nil {
 13041  		return err
 13042  	}
 13043  	defer googleapi.CloseBody(res)
 13044  	if err := googleapi.CheckResponse(res); err != nil {
 13045  		return gensupport.WrapError(err)
 13046  	}
 13047  	return nil
 13048  }
 13049  
 13050  type LiveChatMessagesInsertCall struct {
 13051  	s               *Service
 13052  	livechatmessage *LiveChatMessage
 13053  	urlParams_      gensupport.URLParams
 13054  	ctx_            context.Context
 13055  	header_         http.Header
 13056  }
 13057  
 13058  // Insert: Inserts a new resource into this collection.
 13059  //
 13060  //   - part: The *part* parameter serves two purposes. It identifies the
 13061  //     properties that the write operation will set as well as the properties
 13062  //     that the API response will include. Set the parameter value to snippet.
 13063  func (r *LiveChatMessagesService) Insert(part []string, livechatmessage *LiveChatMessage) *LiveChatMessagesInsertCall {
 13064  	c := &LiveChatMessagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13065  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 13066  	c.livechatmessage = livechatmessage
 13067  	return c
 13068  }
 13069  
 13070  // Fields allows partial responses to be retrieved. See
 13071  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13072  // details.
 13073  func (c *LiveChatMessagesInsertCall) Fields(s ...googleapi.Field) *LiveChatMessagesInsertCall {
 13074  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13075  	return c
 13076  }
 13077  
 13078  // Context sets the context to be used in this call's Do method.
 13079  func (c *LiveChatMessagesInsertCall) Context(ctx context.Context) *LiveChatMessagesInsertCall {
 13080  	c.ctx_ = ctx
 13081  	return c
 13082  }
 13083  
 13084  // Header returns a http.Header that can be modified by the caller to add
 13085  // headers to the request.
 13086  func (c *LiveChatMessagesInsertCall) Header() http.Header {
 13087  	if c.header_ == nil {
 13088  		c.header_ = make(http.Header)
 13089  	}
 13090  	return c.header_
 13091  }
 13092  
 13093  func (c *LiveChatMessagesInsertCall) doRequest(alt string) (*http.Response, error) {
 13094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13095  	var body io.Reader = nil
 13096  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatmessage)
 13097  	if err != nil {
 13098  		return nil, err
 13099  	}
 13100  	c.urlParams_.Set("alt", alt)
 13101  	c.urlParams_.Set("prettyPrint", "false")
 13102  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages")
 13103  	urls += "?" + c.urlParams_.Encode()
 13104  	req, err := http.NewRequest("POST", urls, body)
 13105  	if err != nil {
 13106  		return nil, err
 13107  	}
 13108  	req.Header = reqHeaders
 13109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13110  }
 13111  
 13112  // Do executes the "youtube.liveChatMessages.insert" call.
 13113  // Any non-2xx status code is an error. Response headers are in either
 13114  // *LiveChatMessage.ServerResponse.Header or (if a response was returned at
 13115  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13116  // check whether the returned error was because http.StatusNotModified was
 13117  // returned.
 13118  func (c *LiveChatMessagesInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) {
 13119  	gensupport.SetOptions(c.urlParams_, opts...)
 13120  	res, err := c.doRequest("json")
 13121  	if res != nil && res.StatusCode == http.StatusNotModified {
 13122  		if res.Body != nil {
 13123  			res.Body.Close()
 13124  		}
 13125  		return nil, gensupport.WrapError(&googleapi.Error{
 13126  			Code:   res.StatusCode,
 13127  			Header: res.Header,
 13128  		})
 13129  	}
 13130  	if err != nil {
 13131  		return nil, err
 13132  	}
 13133  	defer googleapi.CloseBody(res)
 13134  	if err := googleapi.CheckResponse(res); err != nil {
 13135  		return nil, gensupport.WrapError(err)
 13136  	}
 13137  	ret := &LiveChatMessage{
 13138  		ServerResponse: googleapi.ServerResponse{
 13139  			Header:         res.Header,
 13140  			HTTPStatusCode: res.StatusCode,
 13141  		},
 13142  	}
 13143  	target := &ret
 13144  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13145  		return nil, err
 13146  	}
 13147  	return ret, nil
 13148  }
 13149  
 13150  type LiveChatMessagesListCall struct {
 13151  	s            *Service
 13152  	urlParams_   gensupport.URLParams
 13153  	ifNoneMatch_ string
 13154  	ctx_         context.Context
 13155  	header_      http.Header
 13156  }
 13157  
 13158  // List: Retrieves a list of resources, possibly filtered.
 13159  //
 13160  //   - liveChatId: The id of the live chat for which comments should be returned.
 13161  //   - part: The *part* parameter specifies the liveChatComment resource parts
 13162  //     that the API response will include. Supported values are id and snippet.
 13163  func (r *LiveChatMessagesService) List(liveChatId string, part []string) *LiveChatMessagesListCall {
 13164  	c := &LiveChatMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13165  	c.urlParams_.Set("liveChatId", liveChatId)
 13166  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 13167  	return c
 13168  }
 13169  
 13170  // Hl sets the optional parameter "hl": Specifies the localization language in
 13171  // which the system messages should be returned.
 13172  func (c *LiveChatMessagesListCall) Hl(hl string) *LiveChatMessagesListCall {
 13173  	c.urlParams_.Set("hl", hl)
 13174  	return c
 13175  }
 13176  
 13177  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 13178  // parameter specifies the maximum number of items that should be returned in
 13179  // the result set.
 13180  func (c *LiveChatMessagesListCall) MaxResults(maxResults int64) *LiveChatMessagesListCall {
 13181  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 13182  	return c
 13183  }
 13184  
 13185  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 13186  // identifies a specific page in the result set that should be returned. In an
 13187  // API response, the nextPageToken property identify other pages that could be
 13188  // retrieved.
 13189  func (c *LiveChatMessagesListCall) PageToken(pageToken string) *LiveChatMessagesListCall {
 13190  	c.urlParams_.Set("pageToken", pageToken)
 13191  	return c
 13192  }
 13193  
 13194  // ProfileImageSize sets the optional parameter "profileImageSize": Specifies
 13195  // the size of the profile image that should be returned for each user.
 13196  func (c *LiveChatMessagesListCall) ProfileImageSize(profileImageSize int64) *LiveChatMessagesListCall {
 13197  	c.urlParams_.Set("profileImageSize", fmt.Sprint(profileImageSize))
 13198  	return c
 13199  }
 13200  
 13201  // Fields allows partial responses to be retrieved. See
 13202  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13203  // details.
 13204  func (c *LiveChatMessagesListCall) Fields(s ...googleapi.Field) *LiveChatMessagesListCall {
 13205  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13206  	return c
 13207  }
 13208  
 13209  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13210  // object's ETag matches the given value. This is useful for getting updates
 13211  // only after the object has changed since the last request.
 13212  func (c *LiveChatMessagesListCall) IfNoneMatch(entityTag string) *LiveChatMessagesListCall {
 13213  	c.ifNoneMatch_ = entityTag
 13214  	return c
 13215  }
 13216  
 13217  // Context sets the context to be used in this call's Do method.
 13218  func (c *LiveChatMessagesListCall) Context(ctx context.Context) *LiveChatMessagesListCall {
 13219  	c.ctx_ = ctx
 13220  	return c
 13221  }
 13222  
 13223  // Header returns a http.Header that can be modified by the caller to add
 13224  // headers to the request.
 13225  func (c *LiveChatMessagesListCall) Header() http.Header {
 13226  	if c.header_ == nil {
 13227  		c.header_ = make(http.Header)
 13228  	}
 13229  	return c.header_
 13230  }
 13231  
 13232  func (c *LiveChatMessagesListCall) doRequest(alt string) (*http.Response, error) {
 13233  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13234  	if c.ifNoneMatch_ != "" {
 13235  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13236  	}
 13237  	var body io.Reader = nil
 13238  	c.urlParams_.Set("alt", alt)
 13239  	c.urlParams_.Set("prettyPrint", "false")
 13240  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages")
 13241  	urls += "?" + c.urlParams_.Encode()
 13242  	req, err := http.NewRequest("GET", urls, body)
 13243  	if err != nil {
 13244  		return nil, err
 13245  	}
 13246  	req.Header = reqHeaders
 13247  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13248  }
 13249  
 13250  // Do executes the "youtube.liveChatMessages.list" call.
 13251  // Any non-2xx status code is an error. Response headers are in either
 13252  // *LiveChatMessageListResponse.ServerResponse.Header or (if a response was
 13253  // returned at all) in error.(*googleapi.Error).Header. Use
 13254  // googleapi.IsNotModified to check whether the returned error was because
 13255  // http.StatusNotModified was returned.
 13256  func (c *LiveChatMessagesListCall) Do(opts ...googleapi.CallOption) (*LiveChatMessageListResponse, error) {
 13257  	gensupport.SetOptions(c.urlParams_, opts...)
 13258  	res, err := c.doRequest("json")
 13259  	if res != nil && res.StatusCode == http.StatusNotModified {
 13260  		if res.Body != nil {
 13261  			res.Body.Close()
 13262  		}
 13263  		return nil, gensupport.WrapError(&googleapi.Error{
 13264  			Code:   res.StatusCode,
 13265  			Header: res.Header,
 13266  		})
 13267  	}
 13268  	if err != nil {
 13269  		return nil, err
 13270  	}
 13271  	defer googleapi.CloseBody(res)
 13272  	if err := googleapi.CheckResponse(res); err != nil {
 13273  		return nil, gensupport.WrapError(err)
 13274  	}
 13275  	ret := &LiveChatMessageListResponse{
 13276  		ServerResponse: googleapi.ServerResponse{
 13277  			Header:         res.Header,
 13278  			HTTPStatusCode: res.StatusCode,
 13279  		},
 13280  	}
 13281  	target := &ret
 13282  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13283  		return nil, err
 13284  	}
 13285  	return ret, nil
 13286  }
 13287  
 13288  // Pages invokes f for each page of results.
 13289  // A non-nil error returned from f will halt the iteration.
 13290  // The provided context supersedes any context provided to the Context method.
 13291  func (c *LiveChatMessagesListCall) Pages(ctx context.Context, f func(*LiveChatMessageListResponse) error) error {
 13292  	c.ctx_ = ctx
 13293  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 13294  	for {
 13295  		x, err := c.Do()
 13296  		if err != nil {
 13297  			return err
 13298  		}
 13299  		if err := f(x); err != nil {
 13300  			return err
 13301  		}
 13302  		if x.NextPageToken == "" {
 13303  			return nil
 13304  		}
 13305  		c.PageToken(x.NextPageToken)
 13306  	}
 13307  }
 13308  
 13309  type LiveChatMessagesTransitionCall struct {
 13310  	s          *Service
 13311  	urlParams_ gensupport.URLParams
 13312  	ctx_       context.Context
 13313  	header_    http.Header
 13314  }
 13315  
 13316  // Transition: Transition a durable chat event.
 13317  func (r *LiveChatMessagesService) Transition() *LiveChatMessagesTransitionCall {
 13318  	c := &LiveChatMessagesTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13319  	return c
 13320  }
 13321  
 13322  // Id sets the optional parameter "id": The ID that uniquely identify the chat
 13323  // message event to transition.
 13324  func (c *LiveChatMessagesTransitionCall) Id(id string) *LiveChatMessagesTransitionCall {
 13325  	c.urlParams_.Set("id", id)
 13326  	return c
 13327  }
 13328  
 13329  // Status sets the optional parameter "status": The status to which the chat
 13330  // event is going to transition.
 13331  //
 13332  // Possible values:
 13333  //
 13334  //	"statusUnspecified" - Default unknown enum value.
 13335  //	"closed" - The durable chat event is over.
 13336  func (c *LiveChatMessagesTransitionCall) Status(status string) *LiveChatMessagesTransitionCall {
 13337  	c.urlParams_.Set("status", status)
 13338  	return c
 13339  }
 13340  
 13341  // Fields allows partial responses to be retrieved. See
 13342  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13343  // details.
 13344  func (c *LiveChatMessagesTransitionCall) Fields(s ...googleapi.Field) *LiveChatMessagesTransitionCall {
 13345  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13346  	return c
 13347  }
 13348  
 13349  // Context sets the context to be used in this call's Do method.
 13350  func (c *LiveChatMessagesTransitionCall) Context(ctx context.Context) *LiveChatMessagesTransitionCall {
 13351  	c.ctx_ = ctx
 13352  	return c
 13353  }
 13354  
 13355  // Header returns a http.Header that can be modified by the caller to add
 13356  // headers to the request.
 13357  func (c *LiveChatMessagesTransitionCall) Header() http.Header {
 13358  	if c.header_ == nil {
 13359  		c.header_ = make(http.Header)
 13360  	}
 13361  	return c.header_
 13362  }
 13363  
 13364  func (c *LiveChatMessagesTransitionCall) doRequest(alt string) (*http.Response, error) {
 13365  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13366  	var body io.Reader = nil
 13367  	c.urlParams_.Set("alt", alt)
 13368  	c.urlParams_.Set("prettyPrint", "false")
 13369  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages/transition")
 13370  	urls += "?" + c.urlParams_.Encode()
 13371  	req, err := http.NewRequest("POST", urls, body)
 13372  	if err != nil {
 13373  		return nil, err
 13374  	}
 13375  	req.Header = reqHeaders
 13376  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13377  }
 13378  
 13379  // Do executes the "youtube.liveChatMessages.transition" call.
 13380  // Any non-2xx status code is an error. Response headers are in either
 13381  // *LiveChatMessage.ServerResponse.Header or (if a response was returned at
 13382  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13383  // check whether the returned error was because http.StatusNotModified was
 13384  // returned.
 13385  func (c *LiveChatMessagesTransitionCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) {
 13386  	gensupport.SetOptions(c.urlParams_, opts...)
 13387  	res, err := c.doRequest("json")
 13388  	if res != nil && res.StatusCode == http.StatusNotModified {
 13389  		if res.Body != nil {
 13390  			res.Body.Close()
 13391  		}
 13392  		return nil, gensupport.WrapError(&googleapi.Error{
 13393  			Code:   res.StatusCode,
 13394  			Header: res.Header,
 13395  		})
 13396  	}
 13397  	if err != nil {
 13398  		return nil, err
 13399  	}
 13400  	defer googleapi.CloseBody(res)
 13401  	if err := googleapi.CheckResponse(res); err != nil {
 13402  		return nil, gensupport.WrapError(err)
 13403  	}
 13404  	ret := &LiveChatMessage{
 13405  		ServerResponse: googleapi.ServerResponse{
 13406  			Header:         res.Header,
 13407  			HTTPStatusCode: res.StatusCode,
 13408  		},
 13409  	}
 13410  	target := &ret
 13411  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13412  		return nil, err
 13413  	}
 13414  	return ret, nil
 13415  }
 13416  
 13417  type LiveChatModeratorsDeleteCall struct {
 13418  	s          *Service
 13419  	urlParams_ gensupport.URLParams
 13420  	ctx_       context.Context
 13421  	header_    http.Header
 13422  }
 13423  
 13424  // Delete: Deletes a chat moderator.
 13425  //
 13426  // - id: .
 13427  func (r *LiveChatModeratorsService) Delete(id string) *LiveChatModeratorsDeleteCall {
 13428  	c := &LiveChatModeratorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13429  	c.urlParams_.Set("id", id)
 13430  	return c
 13431  }
 13432  
 13433  // Fields allows partial responses to be retrieved. See
 13434  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13435  // details.
 13436  func (c *LiveChatModeratorsDeleteCall) Fields(s ...googleapi.Field) *LiveChatModeratorsDeleteCall {
 13437  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13438  	return c
 13439  }
 13440  
 13441  // Context sets the context to be used in this call's Do method.
 13442  func (c *LiveChatModeratorsDeleteCall) Context(ctx context.Context) *LiveChatModeratorsDeleteCall {
 13443  	c.ctx_ = ctx
 13444  	return c
 13445  }
 13446  
 13447  // Header returns a http.Header that can be modified by the caller to add
 13448  // headers to the request.
 13449  func (c *LiveChatModeratorsDeleteCall) Header() http.Header {
 13450  	if c.header_ == nil {
 13451  		c.header_ = make(http.Header)
 13452  	}
 13453  	return c.header_
 13454  }
 13455  
 13456  func (c *LiveChatModeratorsDeleteCall) doRequest(alt string) (*http.Response, error) {
 13457  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13458  	var body io.Reader = nil
 13459  	c.urlParams_.Set("alt", alt)
 13460  	c.urlParams_.Set("prettyPrint", "false")
 13461  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/moderators")
 13462  	urls += "?" + c.urlParams_.Encode()
 13463  	req, err := http.NewRequest("DELETE", urls, body)
 13464  	if err != nil {
 13465  		return nil, err
 13466  	}
 13467  	req.Header = reqHeaders
 13468  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13469  }
 13470  
 13471  // Do executes the "youtube.liveChatModerators.delete" call.
 13472  func (c *LiveChatModeratorsDeleteCall) Do(opts ...googleapi.CallOption) error {
 13473  	gensupport.SetOptions(c.urlParams_, opts...)
 13474  	res, err := c.doRequest("json")
 13475  	if err != nil {
 13476  		return err
 13477  	}
 13478  	defer googleapi.CloseBody(res)
 13479  	if err := googleapi.CheckResponse(res); err != nil {
 13480  		return gensupport.WrapError(err)
 13481  	}
 13482  	return nil
 13483  }
 13484  
 13485  type LiveChatModeratorsInsertCall struct {
 13486  	s                 *Service
 13487  	livechatmoderator *LiveChatModerator
 13488  	urlParams_        gensupport.URLParams
 13489  	ctx_              context.Context
 13490  	header_           http.Header
 13491  }
 13492  
 13493  // Insert: Inserts a new resource into this collection.
 13494  //
 13495  //   - part: The *part* parameter serves two purposes in this operation. It
 13496  //     identifies the properties that the write operation will set as well as the
 13497  //     properties that the API response returns. Set the parameter value to
 13498  //     snippet.
 13499  func (r *LiveChatModeratorsService) Insert(part []string, livechatmoderator *LiveChatModerator) *LiveChatModeratorsInsertCall {
 13500  	c := &LiveChatModeratorsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13501  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 13502  	c.livechatmoderator = livechatmoderator
 13503  	return c
 13504  }
 13505  
 13506  // Fields allows partial responses to be retrieved. See
 13507  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13508  // details.
 13509  func (c *LiveChatModeratorsInsertCall) Fields(s ...googleapi.Field) *LiveChatModeratorsInsertCall {
 13510  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13511  	return c
 13512  }
 13513  
 13514  // Context sets the context to be used in this call's Do method.
 13515  func (c *LiveChatModeratorsInsertCall) Context(ctx context.Context) *LiveChatModeratorsInsertCall {
 13516  	c.ctx_ = ctx
 13517  	return c
 13518  }
 13519  
 13520  // Header returns a http.Header that can be modified by the caller to add
 13521  // headers to the request.
 13522  func (c *LiveChatModeratorsInsertCall) Header() http.Header {
 13523  	if c.header_ == nil {
 13524  		c.header_ = make(http.Header)
 13525  	}
 13526  	return c.header_
 13527  }
 13528  
 13529  func (c *LiveChatModeratorsInsertCall) doRequest(alt string) (*http.Response, error) {
 13530  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13531  	var body io.Reader = nil
 13532  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livechatmoderator)
 13533  	if err != nil {
 13534  		return nil, err
 13535  	}
 13536  	c.urlParams_.Set("alt", alt)
 13537  	c.urlParams_.Set("prettyPrint", "false")
 13538  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/moderators")
 13539  	urls += "?" + c.urlParams_.Encode()
 13540  	req, err := http.NewRequest("POST", urls, body)
 13541  	if err != nil {
 13542  		return nil, err
 13543  	}
 13544  	req.Header = reqHeaders
 13545  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13546  }
 13547  
 13548  // Do executes the "youtube.liveChatModerators.insert" call.
 13549  // Any non-2xx status code is an error. Response headers are in either
 13550  // *LiveChatModerator.ServerResponse.Header or (if a response was returned at
 13551  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13552  // check whether the returned error was because http.StatusNotModified was
 13553  // returned.
 13554  func (c *LiveChatModeratorsInsertCall) Do(opts ...googleapi.CallOption) (*LiveChatModerator, error) {
 13555  	gensupport.SetOptions(c.urlParams_, opts...)
 13556  	res, err := c.doRequest("json")
 13557  	if res != nil && res.StatusCode == http.StatusNotModified {
 13558  		if res.Body != nil {
 13559  			res.Body.Close()
 13560  		}
 13561  		return nil, gensupport.WrapError(&googleapi.Error{
 13562  			Code:   res.StatusCode,
 13563  			Header: res.Header,
 13564  		})
 13565  	}
 13566  	if err != nil {
 13567  		return nil, err
 13568  	}
 13569  	defer googleapi.CloseBody(res)
 13570  	if err := googleapi.CheckResponse(res); err != nil {
 13571  		return nil, gensupport.WrapError(err)
 13572  	}
 13573  	ret := &LiveChatModerator{
 13574  		ServerResponse: googleapi.ServerResponse{
 13575  			Header:         res.Header,
 13576  			HTTPStatusCode: res.StatusCode,
 13577  		},
 13578  	}
 13579  	target := &ret
 13580  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13581  		return nil, err
 13582  	}
 13583  	return ret, nil
 13584  }
 13585  
 13586  type LiveChatModeratorsListCall struct {
 13587  	s            *Service
 13588  	urlParams_   gensupport.URLParams
 13589  	ifNoneMatch_ string
 13590  	ctx_         context.Context
 13591  	header_      http.Header
 13592  }
 13593  
 13594  // List: Retrieves a list of resources, possibly filtered.
 13595  //
 13596  //   - liveChatId: The id of the live chat for which moderators should be
 13597  //     returned.
 13598  //   - part: The *part* parameter specifies the liveChatModerator resource parts
 13599  //     that the API response will include. Supported values are id and snippet.
 13600  func (r *LiveChatModeratorsService) List(liveChatId string, part []string) *LiveChatModeratorsListCall {
 13601  	c := &LiveChatModeratorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13602  	c.urlParams_.Set("liveChatId", liveChatId)
 13603  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 13604  	return c
 13605  }
 13606  
 13607  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 13608  // parameter specifies the maximum number of items that should be returned in
 13609  // the result set.
 13610  func (c *LiveChatModeratorsListCall) MaxResults(maxResults int64) *LiveChatModeratorsListCall {
 13611  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 13612  	return c
 13613  }
 13614  
 13615  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 13616  // identifies a specific page in the result set that should be returned. In an
 13617  // API response, the nextPageToken and prevPageToken properties identify other
 13618  // pages that could be retrieved.
 13619  func (c *LiveChatModeratorsListCall) PageToken(pageToken string) *LiveChatModeratorsListCall {
 13620  	c.urlParams_.Set("pageToken", pageToken)
 13621  	return c
 13622  }
 13623  
 13624  // Fields allows partial responses to be retrieved. See
 13625  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13626  // details.
 13627  func (c *LiveChatModeratorsListCall) Fields(s ...googleapi.Field) *LiveChatModeratorsListCall {
 13628  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13629  	return c
 13630  }
 13631  
 13632  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13633  // object's ETag matches the given value. This is useful for getting updates
 13634  // only after the object has changed since the last request.
 13635  func (c *LiveChatModeratorsListCall) IfNoneMatch(entityTag string) *LiveChatModeratorsListCall {
 13636  	c.ifNoneMatch_ = entityTag
 13637  	return c
 13638  }
 13639  
 13640  // Context sets the context to be used in this call's Do method.
 13641  func (c *LiveChatModeratorsListCall) Context(ctx context.Context) *LiveChatModeratorsListCall {
 13642  	c.ctx_ = ctx
 13643  	return c
 13644  }
 13645  
 13646  // Header returns a http.Header that can be modified by the caller to add
 13647  // headers to the request.
 13648  func (c *LiveChatModeratorsListCall) Header() http.Header {
 13649  	if c.header_ == nil {
 13650  		c.header_ = make(http.Header)
 13651  	}
 13652  	return c.header_
 13653  }
 13654  
 13655  func (c *LiveChatModeratorsListCall) doRequest(alt string) (*http.Response, error) {
 13656  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13657  	if c.ifNoneMatch_ != "" {
 13658  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13659  	}
 13660  	var body io.Reader = nil
 13661  	c.urlParams_.Set("alt", alt)
 13662  	c.urlParams_.Set("prettyPrint", "false")
 13663  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/moderators")
 13664  	urls += "?" + c.urlParams_.Encode()
 13665  	req, err := http.NewRequest("GET", urls, body)
 13666  	if err != nil {
 13667  		return nil, err
 13668  	}
 13669  	req.Header = reqHeaders
 13670  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13671  }
 13672  
 13673  // Do executes the "youtube.liveChatModerators.list" call.
 13674  // Any non-2xx status code is an error. Response headers are in either
 13675  // *LiveChatModeratorListResponse.ServerResponse.Header or (if a response was
 13676  // returned at all) in error.(*googleapi.Error).Header. Use
 13677  // googleapi.IsNotModified to check whether the returned error was because
 13678  // http.StatusNotModified was returned.
 13679  func (c *LiveChatModeratorsListCall) Do(opts ...googleapi.CallOption) (*LiveChatModeratorListResponse, error) {
 13680  	gensupport.SetOptions(c.urlParams_, opts...)
 13681  	res, err := c.doRequest("json")
 13682  	if res != nil && res.StatusCode == http.StatusNotModified {
 13683  		if res.Body != nil {
 13684  			res.Body.Close()
 13685  		}
 13686  		return nil, gensupport.WrapError(&googleapi.Error{
 13687  			Code:   res.StatusCode,
 13688  			Header: res.Header,
 13689  		})
 13690  	}
 13691  	if err != nil {
 13692  		return nil, err
 13693  	}
 13694  	defer googleapi.CloseBody(res)
 13695  	if err := googleapi.CheckResponse(res); err != nil {
 13696  		return nil, gensupport.WrapError(err)
 13697  	}
 13698  	ret := &LiveChatModeratorListResponse{
 13699  		ServerResponse: googleapi.ServerResponse{
 13700  			Header:         res.Header,
 13701  			HTTPStatusCode: res.StatusCode,
 13702  		},
 13703  	}
 13704  	target := &ret
 13705  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13706  		return nil, err
 13707  	}
 13708  	return ret, nil
 13709  }
 13710  
 13711  // Pages invokes f for each page of results.
 13712  // A non-nil error returned from f will halt the iteration.
 13713  // The provided context supersedes any context provided to the Context method.
 13714  func (c *LiveChatModeratorsListCall) Pages(ctx context.Context, f func(*LiveChatModeratorListResponse) error) error {
 13715  	c.ctx_ = ctx
 13716  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 13717  	for {
 13718  		x, err := c.Do()
 13719  		if err != nil {
 13720  			return err
 13721  		}
 13722  		if err := f(x); err != nil {
 13723  			return err
 13724  		}
 13725  		if x.NextPageToken == "" {
 13726  			return nil
 13727  		}
 13728  		c.PageToken(x.NextPageToken)
 13729  	}
 13730  }
 13731  
 13732  type LiveStreamsDeleteCall struct {
 13733  	s          *Service
 13734  	urlParams_ gensupport.URLParams
 13735  	ctx_       context.Context
 13736  	header_    http.Header
 13737  }
 13738  
 13739  // Delete: Deletes an existing stream for the authenticated user.
 13740  //
 13741  // - id: .
 13742  func (r *LiveStreamsService) Delete(id string) *LiveStreamsDeleteCall {
 13743  	c := &LiveStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13744  	c.urlParams_.Set("id", id)
 13745  	return c
 13746  }
 13747  
 13748  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 13749  // *Note:* This parameter is intended exclusively for YouTube content partners.
 13750  // The *onBehalfOfContentOwner* parameter indicates that the request's
 13751  // authorization credentials identify a YouTube CMS user who is acting on
 13752  // behalf of the content owner specified in the parameter value. This parameter
 13753  // is intended for YouTube content partners that own and manage many different
 13754  // YouTube channels. It allows content owners to authenticate once and get
 13755  // access to all their video and channel data, without having to provide
 13756  // authentication credentials for each individual channel. The CMS account that
 13757  // the user authenticates with must be linked to the specified YouTube content
 13758  // owner.
 13759  func (c *LiveStreamsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsDeleteCall {
 13760  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 13761  	return c
 13762  }
 13763  
 13764  // OnBehalfOfContentOwnerChannel sets the optional parameter
 13765  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 13766  // properly authorized request. *Note:* This parameter is intended exclusively
 13767  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 13768  // specifies the YouTube channel ID of the channel to which a video is being
 13769  // added. This parameter is required when a request specifies a value for the
 13770  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 13771  // with that parameter. In addition, the request must be authorized using a CMS
 13772  // account that is linked to the content owner that the onBehalfOfContentOwner
 13773  // parameter specifies. Finally, the channel that the
 13774  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 13775  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 13776  // parameter is intended for YouTube content partners that own and manage many
 13777  // different YouTube channels. It allows content owners to authenticate once
 13778  // and perform actions on behalf of the channel specified in the parameter
 13779  // value, without having to provide authentication credentials for each
 13780  // separate channel.
 13781  func (c *LiveStreamsDeleteCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsDeleteCall {
 13782  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 13783  	return c
 13784  }
 13785  
 13786  // Fields allows partial responses to be retrieved. See
 13787  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13788  // details.
 13789  func (c *LiveStreamsDeleteCall) Fields(s ...googleapi.Field) *LiveStreamsDeleteCall {
 13790  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13791  	return c
 13792  }
 13793  
 13794  // Context sets the context to be used in this call's Do method.
 13795  func (c *LiveStreamsDeleteCall) Context(ctx context.Context) *LiveStreamsDeleteCall {
 13796  	c.ctx_ = ctx
 13797  	return c
 13798  }
 13799  
 13800  // Header returns a http.Header that can be modified by the caller to add
 13801  // headers to the request.
 13802  func (c *LiveStreamsDeleteCall) Header() http.Header {
 13803  	if c.header_ == nil {
 13804  		c.header_ = make(http.Header)
 13805  	}
 13806  	return c.header_
 13807  }
 13808  
 13809  func (c *LiveStreamsDeleteCall) doRequest(alt string) (*http.Response, error) {
 13810  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13811  	var body io.Reader = nil
 13812  	c.urlParams_.Set("alt", alt)
 13813  	c.urlParams_.Set("prettyPrint", "false")
 13814  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
 13815  	urls += "?" + c.urlParams_.Encode()
 13816  	req, err := http.NewRequest("DELETE", urls, body)
 13817  	if err != nil {
 13818  		return nil, err
 13819  	}
 13820  	req.Header = reqHeaders
 13821  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13822  }
 13823  
 13824  // Do executes the "youtube.liveStreams.delete" call.
 13825  func (c *LiveStreamsDeleteCall) Do(opts ...googleapi.CallOption) error {
 13826  	gensupport.SetOptions(c.urlParams_, opts...)
 13827  	res, err := c.doRequest("json")
 13828  	if err != nil {
 13829  		return err
 13830  	}
 13831  	defer googleapi.CloseBody(res)
 13832  	if err := googleapi.CheckResponse(res); err != nil {
 13833  		return gensupport.WrapError(err)
 13834  	}
 13835  	return nil
 13836  }
 13837  
 13838  type LiveStreamsInsertCall struct {
 13839  	s          *Service
 13840  	livestream *LiveStream
 13841  	urlParams_ gensupport.URLParams
 13842  	ctx_       context.Context
 13843  	header_    http.Header
 13844  }
 13845  
 13846  // Insert: Inserts a new stream for the authenticated user.
 13847  //
 13848  //   - part: The *part* parameter serves two purposes in this operation. It
 13849  //     identifies the properties that the write operation will set as well as the
 13850  //     properties that the API response will include. The part properties that
 13851  //     you can include in the parameter value are id, snippet, cdn,
 13852  //     content_details, and status.
 13853  func (r *LiveStreamsService) Insert(part []string, livestream *LiveStream) *LiveStreamsInsertCall {
 13854  	c := &LiveStreamsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13855  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 13856  	c.livestream = livestream
 13857  	return c
 13858  }
 13859  
 13860  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 13861  // *Note:* This parameter is intended exclusively for YouTube content partners.
 13862  // The *onBehalfOfContentOwner* parameter indicates that the request's
 13863  // authorization credentials identify a YouTube CMS user who is acting on
 13864  // behalf of the content owner specified in the parameter value. This parameter
 13865  // is intended for YouTube content partners that own and manage many different
 13866  // YouTube channels. It allows content owners to authenticate once and get
 13867  // access to all their video and channel data, without having to provide
 13868  // authentication credentials for each individual channel. The CMS account that
 13869  // the user authenticates with must be linked to the specified YouTube content
 13870  // owner.
 13871  func (c *LiveStreamsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsInsertCall {
 13872  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 13873  	return c
 13874  }
 13875  
 13876  // OnBehalfOfContentOwnerChannel sets the optional parameter
 13877  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 13878  // properly authorized request. *Note:* This parameter is intended exclusively
 13879  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 13880  // specifies the YouTube channel ID of the channel to which a video is being
 13881  // added. This parameter is required when a request specifies a value for the
 13882  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 13883  // with that parameter. In addition, the request must be authorized using a CMS
 13884  // account that is linked to the content owner that the onBehalfOfContentOwner
 13885  // parameter specifies. Finally, the channel that the
 13886  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 13887  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 13888  // parameter is intended for YouTube content partners that own and manage many
 13889  // different YouTube channels. It allows content owners to authenticate once
 13890  // and perform actions on behalf of the channel specified in the parameter
 13891  // value, without having to provide authentication credentials for each
 13892  // separate channel.
 13893  func (c *LiveStreamsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsInsertCall {
 13894  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 13895  	return c
 13896  }
 13897  
 13898  // Fields allows partial responses to be retrieved. See
 13899  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13900  // details.
 13901  func (c *LiveStreamsInsertCall) Fields(s ...googleapi.Field) *LiveStreamsInsertCall {
 13902  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13903  	return c
 13904  }
 13905  
 13906  // Context sets the context to be used in this call's Do method.
 13907  func (c *LiveStreamsInsertCall) Context(ctx context.Context) *LiveStreamsInsertCall {
 13908  	c.ctx_ = ctx
 13909  	return c
 13910  }
 13911  
 13912  // Header returns a http.Header that can be modified by the caller to add
 13913  // headers to the request.
 13914  func (c *LiveStreamsInsertCall) Header() http.Header {
 13915  	if c.header_ == nil {
 13916  		c.header_ = make(http.Header)
 13917  	}
 13918  	return c.header_
 13919  }
 13920  
 13921  func (c *LiveStreamsInsertCall) doRequest(alt string) (*http.Response, error) {
 13922  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13923  	var body io.Reader = nil
 13924  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
 13925  	if err != nil {
 13926  		return nil, err
 13927  	}
 13928  	c.urlParams_.Set("alt", alt)
 13929  	c.urlParams_.Set("prettyPrint", "false")
 13930  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
 13931  	urls += "?" + c.urlParams_.Encode()
 13932  	req, err := http.NewRequest("POST", urls, body)
 13933  	if err != nil {
 13934  		return nil, err
 13935  	}
 13936  	req.Header = reqHeaders
 13937  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13938  }
 13939  
 13940  // Do executes the "youtube.liveStreams.insert" call.
 13941  // Any non-2xx status code is an error. Response headers are in either
 13942  // *LiveStream.ServerResponse.Header or (if a response was returned at all) in
 13943  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13944  // whether the returned error was because http.StatusNotModified was returned.
 13945  func (c *LiveStreamsInsertCall) Do(opts ...googleapi.CallOption) (*LiveStream, error) {
 13946  	gensupport.SetOptions(c.urlParams_, opts...)
 13947  	res, err := c.doRequest("json")
 13948  	if res != nil && res.StatusCode == http.StatusNotModified {
 13949  		if res.Body != nil {
 13950  			res.Body.Close()
 13951  		}
 13952  		return nil, gensupport.WrapError(&googleapi.Error{
 13953  			Code:   res.StatusCode,
 13954  			Header: res.Header,
 13955  		})
 13956  	}
 13957  	if err != nil {
 13958  		return nil, err
 13959  	}
 13960  	defer googleapi.CloseBody(res)
 13961  	if err := googleapi.CheckResponse(res); err != nil {
 13962  		return nil, gensupport.WrapError(err)
 13963  	}
 13964  	ret := &LiveStream{
 13965  		ServerResponse: googleapi.ServerResponse{
 13966  			Header:         res.Header,
 13967  			HTTPStatusCode: res.StatusCode,
 13968  		},
 13969  	}
 13970  	target := &ret
 13971  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13972  		return nil, err
 13973  	}
 13974  	return ret, nil
 13975  }
 13976  
 13977  type LiveStreamsListCall struct {
 13978  	s            *Service
 13979  	urlParams_   gensupport.URLParams
 13980  	ifNoneMatch_ string
 13981  	ctx_         context.Context
 13982  	header_      http.Header
 13983  }
 13984  
 13985  // List: Retrieve the list of streams associated with the given channel. --
 13986  //
 13987  //   - part: The *part* parameter specifies a comma-separated list of one or more
 13988  //     liveStream resource properties that the API response will include. The
 13989  //     part names that you can include in the parameter value are id, snippet,
 13990  //     cdn, and status.
 13991  func (r *LiveStreamsService) List(part []string) *LiveStreamsListCall {
 13992  	c := &LiveStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13993  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 13994  	return c
 13995  }
 13996  
 13997  // Id sets the optional parameter "id": Return LiveStreams with the given ids
 13998  // from Stubby or Apiary.
 13999  func (c *LiveStreamsListCall) Id(id ...string) *LiveStreamsListCall {
 14000  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 14001  	return c
 14002  }
 14003  
 14004  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 14005  // parameter specifies the maximum number of items that should be returned in
 14006  // the result set.
 14007  func (c *LiveStreamsListCall) MaxResults(maxResults int64) *LiveStreamsListCall {
 14008  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 14009  	return c
 14010  }
 14011  
 14012  // Mine sets the optional parameter "mine":
 14013  func (c *LiveStreamsListCall) Mine(mine bool) *LiveStreamsListCall {
 14014  	c.urlParams_.Set("mine", fmt.Sprint(mine))
 14015  	return c
 14016  }
 14017  
 14018  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 14019  // *Note:* This parameter is intended exclusively for YouTube content partners.
 14020  // The *onBehalfOfContentOwner* parameter indicates that the request's
 14021  // authorization credentials identify a YouTube CMS user who is acting on
 14022  // behalf of the content owner specified in the parameter value. This parameter
 14023  // is intended for YouTube content partners that own and manage many different
 14024  // YouTube channels. It allows content owners to authenticate once and get
 14025  // access to all their video and channel data, without having to provide
 14026  // authentication credentials for each individual channel. The CMS account that
 14027  // the user authenticates with must be linked to the specified YouTube content
 14028  // owner.
 14029  func (c *LiveStreamsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsListCall {
 14030  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 14031  	return c
 14032  }
 14033  
 14034  // OnBehalfOfContentOwnerChannel sets the optional parameter
 14035  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 14036  // properly authorized request. *Note:* This parameter is intended exclusively
 14037  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 14038  // specifies the YouTube channel ID of the channel to which a video is being
 14039  // added. This parameter is required when a request specifies a value for the
 14040  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 14041  // with that parameter. In addition, the request must be authorized using a CMS
 14042  // account that is linked to the content owner that the onBehalfOfContentOwner
 14043  // parameter specifies. Finally, the channel that the
 14044  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 14045  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 14046  // parameter is intended for YouTube content partners that own and manage many
 14047  // different YouTube channels. It allows content owners to authenticate once
 14048  // and perform actions on behalf of the channel specified in the parameter
 14049  // value, without having to provide authentication credentials for each
 14050  // separate channel.
 14051  func (c *LiveStreamsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsListCall {
 14052  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 14053  	return c
 14054  }
 14055  
 14056  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 14057  // identifies a specific page in the result set that should be returned. In an
 14058  // API response, the nextPageToken and prevPageToken properties identify other
 14059  // pages that could be retrieved.
 14060  func (c *LiveStreamsListCall) PageToken(pageToken string) *LiveStreamsListCall {
 14061  	c.urlParams_.Set("pageToken", pageToken)
 14062  	return c
 14063  }
 14064  
 14065  // Fields allows partial responses to be retrieved. See
 14066  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14067  // details.
 14068  func (c *LiveStreamsListCall) Fields(s ...googleapi.Field) *LiveStreamsListCall {
 14069  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14070  	return c
 14071  }
 14072  
 14073  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14074  // object's ETag matches the given value. This is useful for getting updates
 14075  // only after the object has changed since the last request.
 14076  func (c *LiveStreamsListCall) IfNoneMatch(entityTag string) *LiveStreamsListCall {
 14077  	c.ifNoneMatch_ = entityTag
 14078  	return c
 14079  }
 14080  
 14081  // Context sets the context to be used in this call's Do method.
 14082  func (c *LiveStreamsListCall) Context(ctx context.Context) *LiveStreamsListCall {
 14083  	c.ctx_ = ctx
 14084  	return c
 14085  }
 14086  
 14087  // Header returns a http.Header that can be modified by the caller to add
 14088  // headers to the request.
 14089  func (c *LiveStreamsListCall) Header() http.Header {
 14090  	if c.header_ == nil {
 14091  		c.header_ = make(http.Header)
 14092  	}
 14093  	return c.header_
 14094  }
 14095  
 14096  func (c *LiveStreamsListCall) doRequest(alt string) (*http.Response, error) {
 14097  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14098  	if c.ifNoneMatch_ != "" {
 14099  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14100  	}
 14101  	var body io.Reader = nil
 14102  	c.urlParams_.Set("alt", alt)
 14103  	c.urlParams_.Set("prettyPrint", "false")
 14104  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
 14105  	urls += "?" + c.urlParams_.Encode()
 14106  	req, err := http.NewRequest("GET", urls, body)
 14107  	if err != nil {
 14108  		return nil, err
 14109  	}
 14110  	req.Header = reqHeaders
 14111  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14112  }
 14113  
 14114  // Do executes the "youtube.liveStreams.list" call.
 14115  // Any non-2xx status code is an error. Response headers are in either
 14116  // *LiveStreamListResponse.ServerResponse.Header or (if a response was returned
 14117  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14118  // check whether the returned error was because http.StatusNotModified was
 14119  // returned.
 14120  func (c *LiveStreamsListCall) Do(opts ...googleapi.CallOption) (*LiveStreamListResponse, error) {
 14121  	gensupport.SetOptions(c.urlParams_, opts...)
 14122  	res, err := c.doRequest("json")
 14123  	if res != nil && res.StatusCode == http.StatusNotModified {
 14124  		if res.Body != nil {
 14125  			res.Body.Close()
 14126  		}
 14127  		return nil, gensupport.WrapError(&googleapi.Error{
 14128  			Code:   res.StatusCode,
 14129  			Header: res.Header,
 14130  		})
 14131  	}
 14132  	if err != nil {
 14133  		return nil, err
 14134  	}
 14135  	defer googleapi.CloseBody(res)
 14136  	if err := googleapi.CheckResponse(res); err != nil {
 14137  		return nil, gensupport.WrapError(err)
 14138  	}
 14139  	ret := &LiveStreamListResponse{
 14140  		ServerResponse: googleapi.ServerResponse{
 14141  			Header:         res.Header,
 14142  			HTTPStatusCode: res.StatusCode,
 14143  		},
 14144  	}
 14145  	target := &ret
 14146  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14147  		return nil, err
 14148  	}
 14149  	return ret, nil
 14150  }
 14151  
 14152  // Pages invokes f for each page of results.
 14153  // A non-nil error returned from f will halt the iteration.
 14154  // The provided context supersedes any context provided to the Context method.
 14155  func (c *LiveStreamsListCall) Pages(ctx context.Context, f func(*LiveStreamListResponse) error) error {
 14156  	c.ctx_ = ctx
 14157  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14158  	for {
 14159  		x, err := c.Do()
 14160  		if err != nil {
 14161  			return err
 14162  		}
 14163  		if err := f(x); err != nil {
 14164  			return err
 14165  		}
 14166  		if x.NextPageToken == "" {
 14167  			return nil
 14168  		}
 14169  		c.PageToken(x.NextPageToken)
 14170  	}
 14171  }
 14172  
 14173  type LiveStreamsUpdateCall struct {
 14174  	s          *Service
 14175  	livestream *LiveStream
 14176  	urlParams_ gensupport.URLParams
 14177  	ctx_       context.Context
 14178  	header_    http.Header
 14179  }
 14180  
 14181  // Update: Updates an existing stream for the authenticated user.
 14182  //
 14183  //   - part: The *part* parameter serves two purposes in this operation. It
 14184  //     identifies the properties that the write operation will set as well as the
 14185  //     properties that the API response will include. The part properties that
 14186  //     you can include in the parameter value are id, snippet, cdn, and status.
 14187  //     Note that this method will override the existing values for all of the
 14188  //     mutable properties that are contained in any parts that the parameter
 14189  //     value specifies. If the request body does not specify a value for a
 14190  //     mutable property, the existing value for that property will be removed.
 14191  func (r *LiveStreamsService) Update(part []string, livestream *LiveStream) *LiveStreamsUpdateCall {
 14192  	c := &LiveStreamsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14193  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 14194  	c.livestream = livestream
 14195  	return c
 14196  }
 14197  
 14198  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 14199  // *Note:* This parameter is intended exclusively for YouTube content partners.
 14200  // The *onBehalfOfContentOwner* parameter indicates that the request's
 14201  // authorization credentials identify a YouTube CMS user who is acting on
 14202  // behalf of the content owner specified in the parameter value. This parameter
 14203  // is intended for YouTube content partners that own and manage many different
 14204  // YouTube channels. It allows content owners to authenticate once and get
 14205  // access to all their video and channel data, without having to provide
 14206  // authentication credentials for each individual channel. The CMS account that
 14207  // the user authenticates with must be linked to the specified YouTube content
 14208  // owner.
 14209  func (c *LiveStreamsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *LiveStreamsUpdateCall {
 14210  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 14211  	return c
 14212  }
 14213  
 14214  // OnBehalfOfContentOwnerChannel sets the optional parameter
 14215  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 14216  // properly authorized request. *Note:* This parameter is intended exclusively
 14217  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 14218  // specifies the YouTube channel ID of the channel to which a video is being
 14219  // added. This parameter is required when a request specifies a value for the
 14220  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 14221  // with that parameter. In addition, the request must be authorized using a CMS
 14222  // account that is linked to the content owner that the onBehalfOfContentOwner
 14223  // parameter specifies. Finally, the channel that the
 14224  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 14225  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 14226  // parameter is intended for YouTube content partners that own and manage many
 14227  // different YouTube channels. It allows content owners to authenticate once
 14228  // and perform actions on behalf of the channel specified in the parameter
 14229  // value, without having to provide authentication credentials for each
 14230  // separate channel.
 14231  func (c *LiveStreamsUpdateCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *LiveStreamsUpdateCall {
 14232  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 14233  	return c
 14234  }
 14235  
 14236  // Fields allows partial responses to be retrieved. See
 14237  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14238  // details.
 14239  func (c *LiveStreamsUpdateCall) Fields(s ...googleapi.Field) *LiveStreamsUpdateCall {
 14240  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14241  	return c
 14242  }
 14243  
 14244  // Context sets the context to be used in this call's Do method.
 14245  func (c *LiveStreamsUpdateCall) Context(ctx context.Context) *LiveStreamsUpdateCall {
 14246  	c.ctx_ = ctx
 14247  	return c
 14248  }
 14249  
 14250  // Header returns a http.Header that can be modified by the caller to add
 14251  // headers to the request.
 14252  func (c *LiveStreamsUpdateCall) Header() http.Header {
 14253  	if c.header_ == nil {
 14254  		c.header_ = make(http.Header)
 14255  	}
 14256  	return c.header_
 14257  }
 14258  
 14259  func (c *LiveStreamsUpdateCall) doRequest(alt string) (*http.Response, error) {
 14260  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14261  	var body io.Reader = nil
 14262  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
 14263  	if err != nil {
 14264  		return nil, err
 14265  	}
 14266  	c.urlParams_.Set("alt", alt)
 14267  	c.urlParams_.Set("prettyPrint", "false")
 14268  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveStreams")
 14269  	urls += "?" + c.urlParams_.Encode()
 14270  	req, err := http.NewRequest("PUT", urls, body)
 14271  	if err != nil {
 14272  		return nil, err
 14273  	}
 14274  	req.Header = reqHeaders
 14275  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14276  }
 14277  
 14278  // Do executes the "youtube.liveStreams.update" call.
 14279  // Any non-2xx status code is an error. Response headers are in either
 14280  // *LiveStream.ServerResponse.Header or (if a response was returned at all) in
 14281  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14282  // whether the returned error was because http.StatusNotModified was returned.
 14283  func (c *LiveStreamsUpdateCall) Do(opts ...googleapi.CallOption) (*LiveStream, error) {
 14284  	gensupport.SetOptions(c.urlParams_, opts...)
 14285  	res, err := c.doRequest("json")
 14286  	if res != nil && res.StatusCode == http.StatusNotModified {
 14287  		if res.Body != nil {
 14288  			res.Body.Close()
 14289  		}
 14290  		return nil, gensupport.WrapError(&googleapi.Error{
 14291  			Code:   res.StatusCode,
 14292  			Header: res.Header,
 14293  		})
 14294  	}
 14295  	if err != nil {
 14296  		return nil, err
 14297  	}
 14298  	defer googleapi.CloseBody(res)
 14299  	if err := googleapi.CheckResponse(res); err != nil {
 14300  		return nil, gensupport.WrapError(err)
 14301  	}
 14302  	ret := &LiveStream{
 14303  		ServerResponse: googleapi.ServerResponse{
 14304  			Header:         res.Header,
 14305  			HTTPStatusCode: res.StatusCode,
 14306  		},
 14307  	}
 14308  	target := &ret
 14309  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14310  		return nil, err
 14311  	}
 14312  	return ret, nil
 14313  }
 14314  
 14315  type MembersListCall struct {
 14316  	s            *Service
 14317  	urlParams_   gensupport.URLParams
 14318  	ifNoneMatch_ string
 14319  	ctx_         context.Context
 14320  	header_      http.Header
 14321  }
 14322  
 14323  // List: Retrieves a list of members that match the request criteria for a
 14324  // channel.
 14325  //
 14326  //   - part: The *part* parameter specifies the member resource parts that the
 14327  //     API response will include. Set the parameter value to snippet.
 14328  func (r *MembersService) List(part []string) *MembersListCall {
 14329  	c := &MembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14330  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 14331  	return c
 14332  }
 14333  
 14334  // FilterByMemberChannelId sets the optional parameter
 14335  // "filterByMemberChannelId": Comma separated list of channel IDs. Only data
 14336  // about members that are part of this list will be included in the response.
 14337  func (c *MembersListCall) FilterByMemberChannelId(filterByMemberChannelId string) *MembersListCall {
 14338  	c.urlParams_.Set("filterByMemberChannelId", filterByMemberChannelId)
 14339  	return c
 14340  }
 14341  
 14342  // HasAccessToLevel sets the optional parameter "hasAccessToLevel": Filter
 14343  // members in the results set to the ones that have access to a level.
 14344  func (c *MembersListCall) HasAccessToLevel(hasAccessToLevel string) *MembersListCall {
 14345  	c.urlParams_.Set("hasAccessToLevel", hasAccessToLevel)
 14346  	return c
 14347  }
 14348  
 14349  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 14350  // parameter specifies the maximum number of items that should be returned in
 14351  // the result set.
 14352  func (c *MembersListCall) MaxResults(maxResults int64) *MembersListCall {
 14353  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 14354  	return c
 14355  }
 14356  
 14357  // Mode sets the optional parameter "mode": Parameter that specifies which
 14358  // channel members to return.
 14359  //
 14360  // Possible values:
 14361  //
 14362  //	"listMembersModeUnknown"
 14363  //	"updates" - Return only members that joined after the first call with this
 14364  //
 14365  // mode was made.
 14366  //
 14367  //	"all_current" (default) - Return all current members, from newest to
 14368  //
 14369  // oldest.
 14370  func (c *MembersListCall) Mode(mode string) *MembersListCall {
 14371  	c.urlParams_.Set("mode", mode)
 14372  	return c
 14373  }
 14374  
 14375  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 14376  // identifies a specific page in the result set that should be returned. In an
 14377  // API response, the nextPageToken and prevPageToken properties identify other
 14378  // pages that could be retrieved.
 14379  func (c *MembersListCall) PageToken(pageToken string) *MembersListCall {
 14380  	c.urlParams_.Set("pageToken", pageToken)
 14381  	return c
 14382  }
 14383  
 14384  // Fields allows partial responses to be retrieved. See
 14385  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14386  // details.
 14387  func (c *MembersListCall) Fields(s ...googleapi.Field) *MembersListCall {
 14388  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14389  	return c
 14390  }
 14391  
 14392  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14393  // object's ETag matches the given value. This is useful for getting updates
 14394  // only after the object has changed since the last request.
 14395  func (c *MembersListCall) IfNoneMatch(entityTag string) *MembersListCall {
 14396  	c.ifNoneMatch_ = entityTag
 14397  	return c
 14398  }
 14399  
 14400  // Context sets the context to be used in this call's Do method.
 14401  func (c *MembersListCall) Context(ctx context.Context) *MembersListCall {
 14402  	c.ctx_ = ctx
 14403  	return c
 14404  }
 14405  
 14406  // Header returns a http.Header that can be modified by the caller to add
 14407  // headers to the request.
 14408  func (c *MembersListCall) Header() http.Header {
 14409  	if c.header_ == nil {
 14410  		c.header_ = make(http.Header)
 14411  	}
 14412  	return c.header_
 14413  }
 14414  
 14415  func (c *MembersListCall) doRequest(alt string) (*http.Response, error) {
 14416  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14417  	if c.ifNoneMatch_ != "" {
 14418  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14419  	}
 14420  	var body io.Reader = nil
 14421  	c.urlParams_.Set("alt", alt)
 14422  	c.urlParams_.Set("prettyPrint", "false")
 14423  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/members")
 14424  	urls += "?" + c.urlParams_.Encode()
 14425  	req, err := http.NewRequest("GET", urls, body)
 14426  	if err != nil {
 14427  		return nil, err
 14428  	}
 14429  	req.Header = reqHeaders
 14430  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14431  }
 14432  
 14433  // Do executes the "youtube.members.list" call.
 14434  // Any non-2xx status code is an error. Response headers are in either
 14435  // *MemberListResponse.ServerResponse.Header or (if a response was returned at
 14436  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14437  // check whether the returned error was because http.StatusNotModified was
 14438  // returned.
 14439  func (c *MembersListCall) Do(opts ...googleapi.CallOption) (*MemberListResponse, error) {
 14440  	gensupport.SetOptions(c.urlParams_, opts...)
 14441  	res, err := c.doRequest("json")
 14442  	if res != nil && res.StatusCode == http.StatusNotModified {
 14443  		if res.Body != nil {
 14444  			res.Body.Close()
 14445  		}
 14446  		return nil, gensupport.WrapError(&googleapi.Error{
 14447  			Code:   res.StatusCode,
 14448  			Header: res.Header,
 14449  		})
 14450  	}
 14451  	if err != nil {
 14452  		return nil, err
 14453  	}
 14454  	defer googleapi.CloseBody(res)
 14455  	if err := googleapi.CheckResponse(res); err != nil {
 14456  		return nil, gensupport.WrapError(err)
 14457  	}
 14458  	ret := &MemberListResponse{
 14459  		ServerResponse: googleapi.ServerResponse{
 14460  			Header:         res.Header,
 14461  			HTTPStatusCode: res.StatusCode,
 14462  		},
 14463  	}
 14464  	target := &ret
 14465  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14466  		return nil, err
 14467  	}
 14468  	return ret, nil
 14469  }
 14470  
 14471  // Pages invokes f for each page of results.
 14472  // A non-nil error returned from f will halt the iteration.
 14473  // The provided context supersedes any context provided to the Context method.
 14474  func (c *MembersListCall) Pages(ctx context.Context, f func(*MemberListResponse) error) error {
 14475  	c.ctx_ = ctx
 14476  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14477  	for {
 14478  		x, err := c.Do()
 14479  		if err != nil {
 14480  			return err
 14481  		}
 14482  		if err := f(x); err != nil {
 14483  			return err
 14484  		}
 14485  		if x.NextPageToken == "" {
 14486  			return nil
 14487  		}
 14488  		c.PageToken(x.NextPageToken)
 14489  	}
 14490  }
 14491  
 14492  type MembershipsLevelsListCall struct {
 14493  	s            *Service
 14494  	urlParams_   gensupport.URLParams
 14495  	ifNoneMatch_ string
 14496  	ctx_         context.Context
 14497  	header_      http.Header
 14498  }
 14499  
 14500  // List: Retrieves a list of all pricing levels offered by a creator to the
 14501  // fans.
 14502  //
 14503  //   - part: The *part* parameter specifies the membershipsLevel resource parts
 14504  //     that the API response will include. Supported values are id and snippet.
 14505  func (r *MembershipsLevelsService) List(part []string) *MembershipsLevelsListCall {
 14506  	c := &MembershipsLevelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14507  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 14508  	return c
 14509  }
 14510  
 14511  // Fields allows partial responses to be retrieved. See
 14512  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14513  // details.
 14514  func (c *MembershipsLevelsListCall) Fields(s ...googleapi.Field) *MembershipsLevelsListCall {
 14515  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14516  	return c
 14517  }
 14518  
 14519  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14520  // object's ETag matches the given value. This is useful for getting updates
 14521  // only after the object has changed since the last request.
 14522  func (c *MembershipsLevelsListCall) IfNoneMatch(entityTag string) *MembershipsLevelsListCall {
 14523  	c.ifNoneMatch_ = entityTag
 14524  	return c
 14525  }
 14526  
 14527  // Context sets the context to be used in this call's Do method.
 14528  func (c *MembershipsLevelsListCall) Context(ctx context.Context) *MembershipsLevelsListCall {
 14529  	c.ctx_ = ctx
 14530  	return c
 14531  }
 14532  
 14533  // Header returns a http.Header that can be modified by the caller to add
 14534  // headers to the request.
 14535  func (c *MembershipsLevelsListCall) Header() http.Header {
 14536  	if c.header_ == nil {
 14537  		c.header_ = make(http.Header)
 14538  	}
 14539  	return c.header_
 14540  }
 14541  
 14542  func (c *MembershipsLevelsListCall) doRequest(alt string) (*http.Response, error) {
 14543  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14544  	if c.ifNoneMatch_ != "" {
 14545  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14546  	}
 14547  	var body io.Reader = nil
 14548  	c.urlParams_.Set("alt", alt)
 14549  	c.urlParams_.Set("prettyPrint", "false")
 14550  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/membershipsLevels")
 14551  	urls += "?" + c.urlParams_.Encode()
 14552  	req, err := http.NewRequest("GET", urls, body)
 14553  	if err != nil {
 14554  		return nil, err
 14555  	}
 14556  	req.Header = reqHeaders
 14557  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14558  }
 14559  
 14560  // Do executes the "youtube.membershipsLevels.list" call.
 14561  // Any non-2xx status code is an error. Response headers are in either
 14562  // *MembershipsLevelListResponse.ServerResponse.Header or (if a response was
 14563  // returned at all) in error.(*googleapi.Error).Header. Use
 14564  // googleapi.IsNotModified to check whether the returned error was because
 14565  // http.StatusNotModified was returned.
 14566  func (c *MembershipsLevelsListCall) Do(opts ...googleapi.CallOption) (*MembershipsLevelListResponse, error) {
 14567  	gensupport.SetOptions(c.urlParams_, opts...)
 14568  	res, err := c.doRequest("json")
 14569  	if res != nil && res.StatusCode == http.StatusNotModified {
 14570  		if res.Body != nil {
 14571  			res.Body.Close()
 14572  		}
 14573  		return nil, gensupport.WrapError(&googleapi.Error{
 14574  			Code:   res.StatusCode,
 14575  			Header: res.Header,
 14576  		})
 14577  	}
 14578  	if err != nil {
 14579  		return nil, err
 14580  	}
 14581  	defer googleapi.CloseBody(res)
 14582  	if err := googleapi.CheckResponse(res); err != nil {
 14583  		return nil, gensupport.WrapError(err)
 14584  	}
 14585  	ret := &MembershipsLevelListResponse{
 14586  		ServerResponse: googleapi.ServerResponse{
 14587  			Header:         res.Header,
 14588  			HTTPStatusCode: res.StatusCode,
 14589  		},
 14590  	}
 14591  	target := &ret
 14592  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14593  		return nil, err
 14594  	}
 14595  	return ret, nil
 14596  }
 14597  
 14598  type PlaylistImagesDeleteCall struct {
 14599  	s          *Service
 14600  	urlParams_ gensupport.URLParams
 14601  	ctx_       context.Context
 14602  	header_    http.Header
 14603  }
 14604  
 14605  // Delete: Deletes a resource.
 14606  func (r *PlaylistImagesService) Delete() *PlaylistImagesDeleteCall {
 14607  	c := &PlaylistImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14608  	return c
 14609  }
 14610  
 14611  // Id sets the optional parameter "id": Id to identify this image. This is
 14612  // returned from by the List method.
 14613  func (c *PlaylistImagesDeleteCall) Id(id string) *PlaylistImagesDeleteCall {
 14614  	c.urlParams_.Set("id", id)
 14615  	return c
 14616  }
 14617  
 14618  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 14619  // *Note:* This parameter is intended exclusively for YouTube content partners.
 14620  // The *onBehalfOfContentOwner* parameter indicates that the request's
 14621  // authorization credentials identify a YouTube CMS user who is acting on
 14622  // behalf of the content owner specified in the parameter value. This parameter
 14623  // is intended for YouTube content partners that own and manage many different
 14624  // YouTube channels. It allows content owners to authenticate once and get
 14625  // access to all their video and channel data, without having to provide
 14626  // authentication credentials for each individual channel. The CMS account that
 14627  // the user authenticates with must be linked to the specified YouTube content
 14628  // owner.
 14629  func (c *PlaylistImagesDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesDeleteCall {
 14630  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 14631  	return c
 14632  }
 14633  
 14634  // Fields allows partial responses to be retrieved. See
 14635  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14636  // details.
 14637  func (c *PlaylistImagesDeleteCall) Fields(s ...googleapi.Field) *PlaylistImagesDeleteCall {
 14638  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14639  	return c
 14640  }
 14641  
 14642  // Context sets the context to be used in this call's Do method.
 14643  func (c *PlaylistImagesDeleteCall) Context(ctx context.Context) *PlaylistImagesDeleteCall {
 14644  	c.ctx_ = ctx
 14645  	return c
 14646  }
 14647  
 14648  // Header returns a http.Header that can be modified by the caller to add
 14649  // headers to the request.
 14650  func (c *PlaylistImagesDeleteCall) Header() http.Header {
 14651  	if c.header_ == nil {
 14652  		c.header_ = make(http.Header)
 14653  	}
 14654  	return c.header_
 14655  }
 14656  
 14657  func (c *PlaylistImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
 14658  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14659  	var body io.Reader = nil
 14660  	c.urlParams_.Set("alt", alt)
 14661  	c.urlParams_.Set("prettyPrint", "false")
 14662  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
 14663  	urls += "?" + c.urlParams_.Encode()
 14664  	req, err := http.NewRequest("DELETE", urls, body)
 14665  	if err != nil {
 14666  		return nil, err
 14667  	}
 14668  	req.Header = reqHeaders
 14669  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14670  }
 14671  
 14672  // Do executes the "youtube.playlistImages.delete" call.
 14673  func (c *PlaylistImagesDeleteCall) Do(opts ...googleapi.CallOption) error {
 14674  	gensupport.SetOptions(c.urlParams_, opts...)
 14675  	res, err := c.doRequest("json")
 14676  	if err != nil {
 14677  		return err
 14678  	}
 14679  	defer googleapi.CloseBody(res)
 14680  	if err := googleapi.CheckResponse(res); err != nil {
 14681  		return gensupport.WrapError(err)
 14682  	}
 14683  	return nil
 14684  }
 14685  
 14686  type PlaylistImagesInsertCall struct {
 14687  	s             *Service
 14688  	playlistimage *PlaylistImage
 14689  	urlParams_    gensupport.URLParams
 14690  	mediaInfo_    *gensupport.MediaInfo
 14691  	ctx_          context.Context
 14692  	header_       http.Header
 14693  }
 14694  
 14695  // Insert: Inserts a new resource into this collection.
 14696  func (r *PlaylistImagesService) Insert(playlistimage *PlaylistImage) *PlaylistImagesInsertCall {
 14697  	c := &PlaylistImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14698  	c.playlistimage = playlistimage
 14699  	return c
 14700  }
 14701  
 14702  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 14703  // *Note:* This parameter is intended exclusively for YouTube content partners.
 14704  // The *onBehalfOfContentOwner* parameter indicates that the request's
 14705  // authorization credentials identify a YouTube CMS user who is acting on
 14706  // behalf of the content owner specified in the parameter value. This parameter
 14707  // is intended for YouTube content partners that own and manage many different
 14708  // YouTube channels. It allows content owners to authenticate once and get
 14709  // access to all their video and channel data, without having to provide
 14710  // authentication credentials for each individual channel. The CMS account that
 14711  // the user authenticates with must be linked to the specified YouTube content
 14712  // owner.
 14713  func (c *PlaylistImagesInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesInsertCall {
 14714  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 14715  	return c
 14716  }
 14717  
 14718  // OnBehalfOfContentOwnerChannel sets the optional parameter
 14719  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 14720  // properly authorized request. *Note:* This parameter is intended exclusively
 14721  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 14722  // specifies the YouTube channel ID of the channel to which a video is being
 14723  // added. This parameter is required when a request specifies a value for the
 14724  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 14725  // with that parameter. In addition, the request must be authorized using a CMS
 14726  // account that is linked to the content owner that the onBehalfOfContentOwner
 14727  // parameter specifies. Finally, the channel that the
 14728  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 14729  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 14730  // parameter is intended for YouTube content partners that own and manage many
 14731  // different YouTube channels. It allows content owners to authenticate once
 14732  // and perform actions on behalf of the channel specified in the parameter
 14733  // value, without having to provide authentication credentials for each
 14734  // separate channel.
 14735  func (c *PlaylistImagesInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistImagesInsertCall {
 14736  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 14737  	return c
 14738  }
 14739  
 14740  // Part sets the optional parameter "part": The *part* parameter specifies the
 14741  // properties that the API response will include.
 14742  func (c *PlaylistImagesInsertCall) Part(part ...string) *PlaylistImagesInsertCall {
 14743  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 14744  	return c
 14745  }
 14746  
 14747  // Media specifies the media to upload in one or more chunks. The chunk size
 14748  // may be controlled by supplying a MediaOption generated by
 14749  // googleapi.ChunkSize. The chunk size defaults to
 14750  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
 14751  // request will be determined by sniffing the contents of r, unless a
 14752  // MediaOption generated by googleapi.ContentType is supplied.
 14753  // At most one of Media and ResumableMedia may be set.
 14754  func (c *PlaylistImagesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *PlaylistImagesInsertCall {
 14755  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
 14756  	return c
 14757  }
 14758  
 14759  // ResumableMedia specifies the media to upload in chunks and can be canceled
 14760  // with ctx.
 14761  //
 14762  // Deprecated: use Media instead.
 14763  //
 14764  // At most one of Media and ResumableMedia may be set. mediaType identifies the
 14765  // MIME media type of the upload, such as "image/png". If mediaType is "", it
 14766  // will be auto-detected. The provided ctx will supersede any context
 14767  // previously provided to the Context method.
 14768  func (c *PlaylistImagesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *PlaylistImagesInsertCall {
 14769  	c.ctx_ = ctx
 14770  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
 14771  	return c
 14772  }
 14773  
 14774  // ProgressUpdater provides a callback function that will be called after every
 14775  // chunk. It should be a low-latency function in order to not slow down the
 14776  // upload operation. This should only be called when using ResumableMedia (as
 14777  // opposed to Media).
 14778  func (c *PlaylistImagesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *PlaylistImagesInsertCall {
 14779  	c.mediaInfo_.SetProgressUpdater(pu)
 14780  	return c
 14781  }
 14782  
 14783  // Fields allows partial responses to be retrieved. See
 14784  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14785  // details.
 14786  func (c *PlaylistImagesInsertCall) Fields(s ...googleapi.Field) *PlaylistImagesInsertCall {
 14787  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14788  	return c
 14789  }
 14790  
 14791  // Context sets the context to be used in this call's Do method.
 14792  // This context will supersede any context previously provided to the
 14793  // ResumableMedia method.
 14794  func (c *PlaylistImagesInsertCall) Context(ctx context.Context) *PlaylistImagesInsertCall {
 14795  	c.ctx_ = ctx
 14796  	return c
 14797  }
 14798  
 14799  // Header returns a http.Header that can be modified by the caller to add
 14800  // headers to the request.
 14801  func (c *PlaylistImagesInsertCall) Header() http.Header {
 14802  	if c.header_ == nil {
 14803  		c.header_ = make(http.Header)
 14804  	}
 14805  	return c.header_
 14806  }
 14807  
 14808  func (c *PlaylistImagesInsertCall) doRequest(alt string) (*http.Response, error) {
 14809  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14810  	var body io.Reader = nil
 14811  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistimage)
 14812  	if err != nil {
 14813  		return nil, err
 14814  	}
 14815  	c.urlParams_.Set("alt", alt)
 14816  	c.urlParams_.Set("prettyPrint", "false")
 14817  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
 14818  	if c.mediaInfo_ != nil {
 14819  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/playlistImages")
 14820  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
 14821  	}
 14822  	if body == nil {
 14823  		body = new(bytes.Buffer)
 14824  		reqHeaders.Set("Content-Type", "application/json")
 14825  	}
 14826  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
 14827  	defer cleanup()
 14828  	urls += "?" + c.urlParams_.Encode()
 14829  	req, err := http.NewRequest("POST", urls, body)
 14830  	if err != nil {
 14831  		return nil, err
 14832  	}
 14833  	req.Header = reqHeaders
 14834  	req.GetBody = getBody
 14835  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14836  }
 14837  
 14838  // Do executes the "youtube.playlistImages.insert" call.
 14839  // Any non-2xx status code is an error. Response headers are in either
 14840  // *PlaylistImage.ServerResponse.Header or (if a response was returned at all)
 14841  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14842  // whether the returned error was because http.StatusNotModified was returned.
 14843  func (c *PlaylistImagesInsertCall) Do(opts ...googleapi.CallOption) (*PlaylistImage, error) {
 14844  	gensupport.SetOptions(c.urlParams_, opts...)
 14845  	res, err := c.doRequest("json")
 14846  	if res != nil && res.StatusCode == http.StatusNotModified {
 14847  		if res.Body != nil {
 14848  			res.Body.Close()
 14849  		}
 14850  		return nil, gensupport.WrapError(&googleapi.Error{
 14851  			Code:   res.StatusCode,
 14852  			Header: res.Header,
 14853  		})
 14854  	}
 14855  	if err != nil {
 14856  		return nil, err
 14857  	}
 14858  	defer googleapi.CloseBody(res)
 14859  	if err := googleapi.CheckResponse(res); err != nil {
 14860  		return nil, gensupport.WrapError(err)
 14861  	}
 14862  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
 14863  	if rx != nil {
 14864  		rx.Client = c.s.client
 14865  		rx.UserAgent = c.s.userAgent()
 14866  		ctx := c.ctx_
 14867  		if ctx == nil {
 14868  			ctx = context.TODO()
 14869  		}
 14870  		res, err = rx.Upload(ctx)
 14871  		if err != nil {
 14872  			return nil, err
 14873  		}
 14874  		defer res.Body.Close()
 14875  		if err := googleapi.CheckResponse(res); err != nil {
 14876  			return nil, gensupport.WrapError(err)
 14877  		}
 14878  	}
 14879  	ret := &PlaylistImage{
 14880  		ServerResponse: googleapi.ServerResponse{
 14881  			Header:         res.Header,
 14882  			HTTPStatusCode: res.StatusCode,
 14883  		},
 14884  	}
 14885  	target := &ret
 14886  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14887  		return nil, err
 14888  	}
 14889  	return ret, nil
 14890  }
 14891  
 14892  type PlaylistImagesListCall struct {
 14893  	s            *Service
 14894  	urlParams_   gensupport.URLParams
 14895  	ifNoneMatch_ string
 14896  	ctx_         context.Context
 14897  	header_      http.Header
 14898  }
 14899  
 14900  // List: Retrieves a list of resources, possibly filtered.
 14901  func (r *PlaylistImagesService) List() *PlaylistImagesListCall {
 14902  	c := &PlaylistImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14903  	return c
 14904  }
 14905  
 14906  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 14907  // parameter specifies the maximum number of items that should be returned in
 14908  // the result set.
 14909  func (c *PlaylistImagesListCall) MaxResults(maxResults int64) *PlaylistImagesListCall {
 14910  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 14911  	return c
 14912  }
 14913  
 14914  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 14915  // *Note:* This parameter is intended exclusively for YouTube content partners.
 14916  // The *onBehalfOfContentOwner* parameter indicates that the request's
 14917  // authorization credentials identify a YouTube CMS user who is acting on
 14918  // behalf of the content owner specified in the parameter value. This parameter
 14919  // is intended for YouTube content partners that own and manage many different
 14920  // YouTube channels. It allows content owners to authenticate once and get
 14921  // access to all their video and channel data, without having to provide
 14922  // authentication credentials for each individual channel. The CMS account that
 14923  // the user authenticates with must be linked to the specified YouTube content
 14924  // owner.
 14925  func (c *PlaylistImagesListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesListCall {
 14926  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 14927  	return c
 14928  }
 14929  
 14930  // OnBehalfOfContentOwnerChannel sets the optional parameter
 14931  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 14932  // properly authorized request. *Note:* This parameter is intended exclusively
 14933  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 14934  // specifies the YouTube channel ID of the channel to which a video is being
 14935  // added. This parameter is required when a request specifies a value for the
 14936  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 14937  // with that parameter. In addition, the request must be authorized using a CMS
 14938  // account that is linked to the content owner that the onBehalfOfContentOwner
 14939  // parameter specifies. Finally, the channel that the
 14940  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 14941  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 14942  // parameter is intended for YouTube content partners that own and manage many
 14943  // different YouTube channels. It allows content owners to authenticate once
 14944  // and perform actions on behalf of the channel specified in the parameter
 14945  // value, without having to provide authentication credentials for each
 14946  // separate channel.
 14947  func (c *PlaylistImagesListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistImagesListCall {
 14948  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 14949  	return c
 14950  }
 14951  
 14952  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 14953  // identifies a specific page in the result set that should be returned. In an
 14954  // API response, the nextPageToken and prevPageToken properties identify other
 14955  // pages that could be retrieved.
 14956  func (c *PlaylistImagesListCall) PageToken(pageToken string) *PlaylistImagesListCall {
 14957  	c.urlParams_.Set("pageToken", pageToken)
 14958  	return c
 14959  }
 14960  
 14961  // Parent sets the optional parameter "parent": Return PlaylistImages for this
 14962  // playlist id.
 14963  func (c *PlaylistImagesListCall) Parent(parent string) *PlaylistImagesListCall {
 14964  	c.urlParams_.Set("parent", parent)
 14965  	return c
 14966  }
 14967  
 14968  // Part sets the optional parameter "part": The *part* parameter specifies a
 14969  // comma-separated list of one or more playlistImage resource properties that
 14970  // the API response will include. If the parameter identifies a property that
 14971  // contains child properties, the child properties will be included in the
 14972  // response.
 14973  func (c *PlaylistImagesListCall) Part(part ...string) *PlaylistImagesListCall {
 14974  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 14975  	return c
 14976  }
 14977  
 14978  // Fields allows partial responses to be retrieved. See
 14979  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14980  // details.
 14981  func (c *PlaylistImagesListCall) Fields(s ...googleapi.Field) *PlaylistImagesListCall {
 14982  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14983  	return c
 14984  }
 14985  
 14986  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14987  // object's ETag matches the given value. This is useful for getting updates
 14988  // only after the object has changed since the last request.
 14989  func (c *PlaylistImagesListCall) IfNoneMatch(entityTag string) *PlaylistImagesListCall {
 14990  	c.ifNoneMatch_ = entityTag
 14991  	return c
 14992  }
 14993  
 14994  // Context sets the context to be used in this call's Do method.
 14995  func (c *PlaylistImagesListCall) Context(ctx context.Context) *PlaylistImagesListCall {
 14996  	c.ctx_ = ctx
 14997  	return c
 14998  }
 14999  
 15000  // Header returns a http.Header that can be modified by the caller to add
 15001  // headers to the request.
 15002  func (c *PlaylistImagesListCall) Header() http.Header {
 15003  	if c.header_ == nil {
 15004  		c.header_ = make(http.Header)
 15005  	}
 15006  	return c.header_
 15007  }
 15008  
 15009  func (c *PlaylistImagesListCall) doRequest(alt string) (*http.Response, error) {
 15010  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15011  	if c.ifNoneMatch_ != "" {
 15012  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15013  	}
 15014  	var body io.Reader = nil
 15015  	c.urlParams_.Set("alt", alt)
 15016  	c.urlParams_.Set("prettyPrint", "false")
 15017  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
 15018  	urls += "?" + c.urlParams_.Encode()
 15019  	req, err := http.NewRequest("GET", urls, body)
 15020  	if err != nil {
 15021  		return nil, err
 15022  	}
 15023  	req.Header = reqHeaders
 15024  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15025  }
 15026  
 15027  // Do executes the "youtube.playlistImages.list" call.
 15028  // Any non-2xx status code is an error. Response headers are in either
 15029  // *PlaylistImageListResponse.ServerResponse.Header or (if a response was
 15030  // returned at all) in error.(*googleapi.Error).Header. Use
 15031  // googleapi.IsNotModified to check whether the returned error was because
 15032  // http.StatusNotModified was returned.
 15033  func (c *PlaylistImagesListCall) Do(opts ...googleapi.CallOption) (*PlaylistImageListResponse, error) {
 15034  	gensupport.SetOptions(c.urlParams_, opts...)
 15035  	res, err := c.doRequest("json")
 15036  	if res != nil && res.StatusCode == http.StatusNotModified {
 15037  		if res.Body != nil {
 15038  			res.Body.Close()
 15039  		}
 15040  		return nil, gensupport.WrapError(&googleapi.Error{
 15041  			Code:   res.StatusCode,
 15042  			Header: res.Header,
 15043  		})
 15044  	}
 15045  	if err != nil {
 15046  		return nil, err
 15047  	}
 15048  	defer googleapi.CloseBody(res)
 15049  	if err := googleapi.CheckResponse(res); err != nil {
 15050  		return nil, gensupport.WrapError(err)
 15051  	}
 15052  	ret := &PlaylistImageListResponse{
 15053  		ServerResponse: googleapi.ServerResponse{
 15054  			Header:         res.Header,
 15055  			HTTPStatusCode: res.StatusCode,
 15056  		},
 15057  	}
 15058  	target := &ret
 15059  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15060  		return nil, err
 15061  	}
 15062  	return ret, nil
 15063  }
 15064  
 15065  // Pages invokes f for each page of results.
 15066  // A non-nil error returned from f will halt the iteration.
 15067  // The provided context supersedes any context provided to the Context method.
 15068  func (c *PlaylistImagesListCall) Pages(ctx context.Context, f func(*PlaylistImageListResponse) error) error {
 15069  	c.ctx_ = ctx
 15070  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15071  	for {
 15072  		x, err := c.Do()
 15073  		if err != nil {
 15074  			return err
 15075  		}
 15076  		if err := f(x); err != nil {
 15077  			return err
 15078  		}
 15079  		if x.NextPageToken == "" {
 15080  			return nil
 15081  		}
 15082  		c.PageToken(x.NextPageToken)
 15083  	}
 15084  }
 15085  
 15086  type PlaylistImagesUpdateCall struct {
 15087  	s             *Service
 15088  	playlistimage *PlaylistImage
 15089  	urlParams_    gensupport.URLParams
 15090  	mediaInfo_    *gensupport.MediaInfo
 15091  	ctx_          context.Context
 15092  	header_       http.Header
 15093  }
 15094  
 15095  // Update: Updates an existing resource.
 15096  func (r *PlaylistImagesService) Update(playlistimage *PlaylistImage) *PlaylistImagesUpdateCall {
 15097  	c := &PlaylistImagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15098  	c.playlistimage = playlistimage
 15099  	return c
 15100  }
 15101  
 15102  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15103  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15104  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15105  // authorization credentials identify a YouTube CMS user who is acting on
 15106  // behalf of the content owner specified in the parameter value. This parameter
 15107  // is intended for YouTube content partners that own and manage many different
 15108  // YouTube channels. It allows content owners to authenticate once and get
 15109  // access to all their video and channel data, without having to provide
 15110  // authentication credentials for each individual channel. The CMS account that
 15111  // the user authenticates with must be linked to the specified YouTube content
 15112  // owner.
 15113  func (c *PlaylistImagesUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistImagesUpdateCall {
 15114  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15115  	return c
 15116  }
 15117  
 15118  // Part sets the optional parameter "part": The *part* parameter specifies the
 15119  // properties that the API response will include.
 15120  func (c *PlaylistImagesUpdateCall) Part(part ...string) *PlaylistImagesUpdateCall {
 15121  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 15122  	return c
 15123  }
 15124  
 15125  // Media specifies the media to upload in one or more chunks. The chunk size
 15126  // may be controlled by supplying a MediaOption generated by
 15127  // googleapi.ChunkSize. The chunk size defaults to
 15128  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
 15129  // request will be determined by sniffing the contents of r, unless a
 15130  // MediaOption generated by googleapi.ContentType is supplied.
 15131  // At most one of Media and ResumableMedia may be set.
 15132  func (c *PlaylistImagesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *PlaylistImagesUpdateCall {
 15133  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
 15134  	return c
 15135  }
 15136  
 15137  // ResumableMedia specifies the media to upload in chunks and can be canceled
 15138  // with ctx.
 15139  //
 15140  // Deprecated: use Media instead.
 15141  //
 15142  // At most one of Media and ResumableMedia may be set. mediaType identifies the
 15143  // MIME media type of the upload, such as "image/png". If mediaType is "", it
 15144  // will be auto-detected. The provided ctx will supersede any context
 15145  // previously provided to the Context method.
 15146  func (c *PlaylistImagesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *PlaylistImagesUpdateCall {
 15147  	c.ctx_ = ctx
 15148  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
 15149  	return c
 15150  }
 15151  
 15152  // ProgressUpdater provides a callback function that will be called after every
 15153  // chunk. It should be a low-latency function in order to not slow down the
 15154  // upload operation. This should only be called when using ResumableMedia (as
 15155  // opposed to Media).
 15156  func (c *PlaylistImagesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *PlaylistImagesUpdateCall {
 15157  	c.mediaInfo_.SetProgressUpdater(pu)
 15158  	return c
 15159  }
 15160  
 15161  // Fields allows partial responses to be retrieved. See
 15162  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15163  // details.
 15164  func (c *PlaylistImagesUpdateCall) Fields(s ...googleapi.Field) *PlaylistImagesUpdateCall {
 15165  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15166  	return c
 15167  }
 15168  
 15169  // Context sets the context to be used in this call's Do method.
 15170  // This context will supersede any context previously provided to the
 15171  // ResumableMedia method.
 15172  func (c *PlaylistImagesUpdateCall) Context(ctx context.Context) *PlaylistImagesUpdateCall {
 15173  	c.ctx_ = ctx
 15174  	return c
 15175  }
 15176  
 15177  // Header returns a http.Header that can be modified by the caller to add
 15178  // headers to the request.
 15179  func (c *PlaylistImagesUpdateCall) Header() http.Header {
 15180  	if c.header_ == nil {
 15181  		c.header_ = make(http.Header)
 15182  	}
 15183  	return c.header_
 15184  }
 15185  
 15186  func (c *PlaylistImagesUpdateCall) doRequest(alt string) (*http.Response, error) {
 15187  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15188  	var body io.Reader = nil
 15189  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistimage)
 15190  	if err != nil {
 15191  		return nil, err
 15192  	}
 15193  	c.urlParams_.Set("alt", alt)
 15194  	c.urlParams_.Set("prettyPrint", "false")
 15195  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistImages")
 15196  	if c.mediaInfo_ != nil {
 15197  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/playlistImages")
 15198  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
 15199  	}
 15200  	if body == nil {
 15201  		body = new(bytes.Buffer)
 15202  		reqHeaders.Set("Content-Type", "application/json")
 15203  	}
 15204  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
 15205  	defer cleanup()
 15206  	urls += "?" + c.urlParams_.Encode()
 15207  	req, err := http.NewRequest("PUT", urls, body)
 15208  	if err != nil {
 15209  		return nil, err
 15210  	}
 15211  	req.Header = reqHeaders
 15212  	req.GetBody = getBody
 15213  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15214  }
 15215  
 15216  // Do executes the "youtube.playlistImages.update" call.
 15217  // Any non-2xx status code is an error. Response headers are in either
 15218  // *PlaylistImage.ServerResponse.Header or (if a response was returned at all)
 15219  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15220  // whether the returned error was because http.StatusNotModified was returned.
 15221  func (c *PlaylistImagesUpdateCall) Do(opts ...googleapi.CallOption) (*PlaylistImage, error) {
 15222  	gensupport.SetOptions(c.urlParams_, opts...)
 15223  	res, err := c.doRequest("json")
 15224  	if res != nil && res.StatusCode == http.StatusNotModified {
 15225  		if res.Body != nil {
 15226  			res.Body.Close()
 15227  		}
 15228  		return nil, gensupport.WrapError(&googleapi.Error{
 15229  			Code:   res.StatusCode,
 15230  			Header: res.Header,
 15231  		})
 15232  	}
 15233  	if err != nil {
 15234  		return nil, err
 15235  	}
 15236  	defer googleapi.CloseBody(res)
 15237  	if err := googleapi.CheckResponse(res); err != nil {
 15238  		return nil, gensupport.WrapError(err)
 15239  	}
 15240  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
 15241  	if rx != nil {
 15242  		rx.Client = c.s.client
 15243  		rx.UserAgent = c.s.userAgent()
 15244  		ctx := c.ctx_
 15245  		if ctx == nil {
 15246  			ctx = context.TODO()
 15247  		}
 15248  		res, err = rx.Upload(ctx)
 15249  		if err != nil {
 15250  			return nil, err
 15251  		}
 15252  		defer res.Body.Close()
 15253  		if err := googleapi.CheckResponse(res); err != nil {
 15254  			return nil, gensupport.WrapError(err)
 15255  		}
 15256  	}
 15257  	ret := &PlaylistImage{
 15258  		ServerResponse: googleapi.ServerResponse{
 15259  			Header:         res.Header,
 15260  			HTTPStatusCode: res.StatusCode,
 15261  		},
 15262  	}
 15263  	target := &ret
 15264  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15265  		return nil, err
 15266  	}
 15267  	return ret, nil
 15268  }
 15269  
 15270  type PlaylistItemsDeleteCall struct {
 15271  	s          *Service
 15272  	urlParams_ gensupport.URLParams
 15273  	ctx_       context.Context
 15274  	header_    http.Header
 15275  }
 15276  
 15277  // Delete: Deletes a resource.
 15278  //
 15279  // - id: .
 15280  func (r *PlaylistItemsService) Delete(id string) *PlaylistItemsDeleteCall {
 15281  	c := &PlaylistItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15282  	c.urlParams_.Set("id", id)
 15283  	return c
 15284  }
 15285  
 15286  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15287  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15288  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15289  // authorization credentials identify a YouTube CMS user who is acting on
 15290  // behalf of the content owner specified in the parameter value. This parameter
 15291  // is intended for YouTube content partners that own and manage many different
 15292  // YouTube channels. It allows content owners to authenticate once and get
 15293  // access to all their video and channel data, without having to provide
 15294  // authentication credentials for each individual channel. The CMS account that
 15295  // the user authenticates with must be linked to the specified YouTube content
 15296  // owner.
 15297  func (c *PlaylistItemsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsDeleteCall {
 15298  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15299  	return c
 15300  }
 15301  
 15302  // Fields allows partial responses to be retrieved. See
 15303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15304  // details.
 15305  func (c *PlaylistItemsDeleteCall) Fields(s ...googleapi.Field) *PlaylistItemsDeleteCall {
 15306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15307  	return c
 15308  }
 15309  
 15310  // Context sets the context to be used in this call's Do method.
 15311  func (c *PlaylistItemsDeleteCall) Context(ctx context.Context) *PlaylistItemsDeleteCall {
 15312  	c.ctx_ = ctx
 15313  	return c
 15314  }
 15315  
 15316  // Header returns a http.Header that can be modified by the caller to add
 15317  // headers to the request.
 15318  func (c *PlaylistItemsDeleteCall) Header() http.Header {
 15319  	if c.header_ == nil {
 15320  		c.header_ = make(http.Header)
 15321  	}
 15322  	return c.header_
 15323  }
 15324  
 15325  func (c *PlaylistItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
 15326  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15327  	var body io.Reader = nil
 15328  	c.urlParams_.Set("alt", alt)
 15329  	c.urlParams_.Set("prettyPrint", "false")
 15330  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
 15331  	urls += "?" + c.urlParams_.Encode()
 15332  	req, err := http.NewRequest("DELETE", urls, body)
 15333  	if err != nil {
 15334  		return nil, err
 15335  	}
 15336  	req.Header = reqHeaders
 15337  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15338  }
 15339  
 15340  // Do executes the "youtube.playlistItems.delete" call.
 15341  func (c *PlaylistItemsDeleteCall) Do(opts ...googleapi.CallOption) error {
 15342  	gensupport.SetOptions(c.urlParams_, opts...)
 15343  	res, err := c.doRequest("json")
 15344  	if err != nil {
 15345  		return err
 15346  	}
 15347  	defer googleapi.CloseBody(res)
 15348  	if err := googleapi.CheckResponse(res); err != nil {
 15349  		return gensupport.WrapError(err)
 15350  	}
 15351  	return nil
 15352  }
 15353  
 15354  type PlaylistItemsInsertCall struct {
 15355  	s            *Service
 15356  	playlistitem *PlaylistItem
 15357  	urlParams_   gensupport.URLParams
 15358  	ctx_         context.Context
 15359  	header_      http.Header
 15360  }
 15361  
 15362  // Insert: Inserts a new resource into this collection.
 15363  //
 15364  //   - part: The *part* parameter serves two purposes in this operation. It
 15365  //     identifies the properties that the write operation will set as well as the
 15366  //     properties that the API response will include.
 15367  func (r *PlaylistItemsService) Insert(part []string, playlistitem *PlaylistItem) *PlaylistItemsInsertCall {
 15368  	c := &PlaylistItemsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15369  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 15370  	c.playlistitem = playlistitem
 15371  	return c
 15372  }
 15373  
 15374  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15375  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15376  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15377  // authorization credentials identify a YouTube CMS user who is acting on
 15378  // behalf of the content owner specified in the parameter value. This parameter
 15379  // is intended for YouTube content partners that own and manage many different
 15380  // YouTube channels. It allows content owners to authenticate once and get
 15381  // access to all their video and channel data, without having to provide
 15382  // authentication credentials for each individual channel. The CMS account that
 15383  // the user authenticates with must be linked to the specified YouTube content
 15384  // owner.
 15385  func (c *PlaylistItemsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsInsertCall {
 15386  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15387  	return c
 15388  }
 15389  
 15390  // Fields allows partial responses to be retrieved. See
 15391  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15392  // details.
 15393  func (c *PlaylistItemsInsertCall) Fields(s ...googleapi.Field) *PlaylistItemsInsertCall {
 15394  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15395  	return c
 15396  }
 15397  
 15398  // Context sets the context to be used in this call's Do method.
 15399  func (c *PlaylistItemsInsertCall) Context(ctx context.Context) *PlaylistItemsInsertCall {
 15400  	c.ctx_ = ctx
 15401  	return c
 15402  }
 15403  
 15404  // Header returns a http.Header that can be modified by the caller to add
 15405  // headers to the request.
 15406  func (c *PlaylistItemsInsertCall) Header() http.Header {
 15407  	if c.header_ == nil {
 15408  		c.header_ = make(http.Header)
 15409  	}
 15410  	return c.header_
 15411  }
 15412  
 15413  func (c *PlaylistItemsInsertCall) doRequest(alt string) (*http.Response, error) {
 15414  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15415  	var body io.Reader = nil
 15416  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
 15417  	if err != nil {
 15418  		return nil, err
 15419  	}
 15420  	c.urlParams_.Set("alt", alt)
 15421  	c.urlParams_.Set("prettyPrint", "false")
 15422  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
 15423  	urls += "?" + c.urlParams_.Encode()
 15424  	req, err := http.NewRequest("POST", urls, body)
 15425  	if err != nil {
 15426  		return nil, err
 15427  	}
 15428  	req.Header = reqHeaders
 15429  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15430  }
 15431  
 15432  // Do executes the "youtube.playlistItems.insert" call.
 15433  // Any non-2xx status code is an error. Response headers are in either
 15434  // *PlaylistItem.ServerResponse.Header or (if a response was returned at all)
 15435  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15436  // whether the returned error was because http.StatusNotModified was returned.
 15437  func (c *PlaylistItemsInsertCall) Do(opts ...googleapi.CallOption) (*PlaylistItem, error) {
 15438  	gensupport.SetOptions(c.urlParams_, opts...)
 15439  	res, err := c.doRequest("json")
 15440  	if res != nil && res.StatusCode == http.StatusNotModified {
 15441  		if res.Body != nil {
 15442  			res.Body.Close()
 15443  		}
 15444  		return nil, gensupport.WrapError(&googleapi.Error{
 15445  			Code:   res.StatusCode,
 15446  			Header: res.Header,
 15447  		})
 15448  	}
 15449  	if err != nil {
 15450  		return nil, err
 15451  	}
 15452  	defer googleapi.CloseBody(res)
 15453  	if err := googleapi.CheckResponse(res); err != nil {
 15454  		return nil, gensupport.WrapError(err)
 15455  	}
 15456  	ret := &PlaylistItem{
 15457  		ServerResponse: googleapi.ServerResponse{
 15458  			Header:         res.Header,
 15459  			HTTPStatusCode: res.StatusCode,
 15460  		},
 15461  	}
 15462  	target := &ret
 15463  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15464  		return nil, err
 15465  	}
 15466  	return ret, nil
 15467  }
 15468  
 15469  type PlaylistItemsListCall struct {
 15470  	s            *Service
 15471  	urlParams_   gensupport.URLParams
 15472  	ifNoneMatch_ string
 15473  	ctx_         context.Context
 15474  	header_      http.Header
 15475  }
 15476  
 15477  // List: Retrieves a list of resources, possibly filtered.
 15478  //
 15479  //   - part: The *part* parameter specifies a comma-separated list of one or more
 15480  //     playlistItem resource properties that the API response will include. If
 15481  //     the parameter identifies a property that contains child properties, the
 15482  //     child properties will be included in the response. For example, in a
 15483  //     playlistItem resource, the snippet property contains numerous fields,
 15484  //     including the title, description, position, and resourceId properties. As
 15485  //     such, if you set *part=snippet*, the API response will contain all of
 15486  //     those properties.
 15487  func (r *PlaylistItemsService) List(part []string) *PlaylistItemsListCall {
 15488  	c := &PlaylistItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15489  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 15490  	return c
 15491  }
 15492  
 15493  // Id sets the optional parameter "id":
 15494  func (c *PlaylistItemsListCall) Id(id ...string) *PlaylistItemsListCall {
 15495  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 15496  	return c
 15497  }
 15498  
 15499  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 15500  // parameter specifies the maximum number of items that should be returned in
 15501  // the result set.
 15502  func (c *PlaylistItemsListCall) MaxResults(maxResults int64) *PlaylistItemsListCall {
 15503  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 15504  	return c
 15505  }
 15506  
 15507  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15508  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15509  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15510  // authorization credentials identify a YouTube CMS user who is acting on
 15511  // behalf of the content owner specified in the parameter value. This parameter
 15512  // is intended for YouTube content partners that own and manage many different
 15513  // YouTube channels. It allows content owners to authenticate once and get
 15514  // access to all their video and channel data, without having to provide
 15515  // authentication credentials for each individual channel. The CMS account that
 15516  // the user authenticates with must be linked to the specified YouTube content
 15517  // owner.
 15518  func (c *PlaylistItemsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsListCall {
 15519  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15520  	return c
 15521  }
 15522  
 15523  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 15524  // identifies a specific page in the result set that should be returned. In an
 15525  // API response, the nextPageToken and prevPageToken properties identify other
 15526  // pages that could be retrieved.
 15527  func (c *PlaylistItemsListCall) PageToken(pageToken string) *PlaylistItemsListCall {
 15528  	c.urlParams_.Set("pageToken", pageToken)
 15529  	return c
 15530  }
 15531  
 15532  // PlaylistId sets the optional parameter "playlistId": Return the playlist
 15533  // items within the given playlist.
 15534  func (c *PlaylistItemsListCall) PlaylistId(playlistId string) *PlaylistItemsListCall {
 15535  	c.urlParams_.Set("playlistId", playlistId)
 15536  	return c
 15537  }
 15538  
 15539  // VideoId sets the optional parameter "videoId": Return the playlist items
 15540  // associated with the given video ID.
 15541  func (c *PlaylistItemsListCall) VideoId(videoId string) *PlaylistItemsListCall {
 15542  	c.urlParams_.Set("videoId", videoId)
 15543  	return c
 15544  }
 15545  
 15546  // Fields allows partial responses to be retrieved. See
 15547  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15548  // details.
 15549  func (c *PlaylistItemsListCall) Fields(s ...googleapi.Field) *PlaylistItemsListCall {
 15550  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15551  	return c
 15552  }
 15553  
 15554  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15555  // object's ETag matches the given value. This is useful for getting updates
 15556  // only after the object has changed since the last request.
 15557  func (c *PlaylistItemsListCall) IfNoneMatch(entityTag string) *PlaylistItemsListCall {
 15558  	c.ifNoneMatch_ = entityTag
 15559  	return c
 15560  }
 15561  
 15562  // Context sets the context to be used in this call's Do method.
 15563  func (c *PlaylistItemsListCall) Context(ctx context.Context) *PlaylistItemsListCall {
 15564  	c.ctx_ = ctx
 15565  	return c
 15566  }
 15567  
 15568  // Header returns a http.Header that can be modified by the caller to add
 15569  // headers to the request.
 15570  func (c *PlaylistItemsListCall) Header() http.Header {
 15571  	if c.header_ == nil {
 15572  		c.header_ = make(http.Header)
 15573  	}
 15574  	return c.header_
 15575  }
 15576  
 15577  func (c *PlaylistItemsListCall) doRequest(alt string) (*http.Response, error) {
 15578  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15579  	if c.ifNoneMatch_ != "" {
 15580  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15581  	}
 15582  	var body io.Reader = nil
 15583  	c.urlParams_.Set("alt", alt)
 15584  	c.urlParams_.Set("prettyPrint", "false")
 15585  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
 15586  	urls += "?" + c.urlParams_.Encode()
 15587  	req, err := http.NewRequest("GET", urls, body)
 15588  	if err != nil {
 15589  		return nil, err
 15590  	}
 15591  	req.Header = reqHeaders
 15592  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15593  }
 15594  
 15595  // Do executes the "youtube.playlistItems.list" call.
 15596  // Any non-2xx status code is an error. Response headers are in either
 15597  // *PlaylistItemListResponse.ServerResponse.Header or (if a response was
 15598  // returned at all) in error.(*googleapi.Error).Header. Use
 15599  // googleapi.IsNotModified to check whether the returned error was because
 15600  // http.StatusNotModified was returned.
 15601  func (c *PlaylistItemsListCall) Do(opts ...googleapi.CallOption) (*PlaylistItemListResponse, error) {
 15602  	gensupport.SetOptions(c.urlParams_, opts...)
 15603  	res, err := c.doRequest("json")
 15604  	if res != nil && res.StatusCode == http.StatusNotModified {
 15605  		if res.Body != nil {
 15606  			res.Body.Close()
 15607  		}
 15608  		return nil, gensupport.WrapError(&googleapi.Error{
 15609  			Code:   res.StatusCode,
 15610  			Header: res.Header,
 15611  		})
 15612  	}
 15613  	if err != nil {
 15614  		return nil, err
 15615  	}
 15616  	defer googleapi.CloseBody(res)
 15617  	if err := googleapi.CheckResponse(res); err != nil {
 15618  		return nil, gensupport.WrapError(err)
 15619  	}
 15620  	ret := &PlaylistItemListResponse{
 15621  		ServerResponse: googleapi.ServerResponse{
 15622  			Header:         res.Header,
 15623  			HTTPStatusCode: res.StatusCode,
 15624  		},
 15625  	}
 15626  	target := &ret
 15627  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15628  		return nil, err
 15629  	}
 15630  	return ret, nil
 15631  }
 15632  
 15633  // Pages invokes f for each page of results.
 15634  // A non-nil error returned from f will halt the iteration.
 15635  // The provided context supersedes any context provided to the Context method.
 15636  func (c *PlaylistItemsListCall) Pages(ctx context.Context, f func(*PlaylistItemListResponse) error) error {
 15637  	c.ctx_ = ctx
 15638  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15639  	for {
 15640  		x, err := c.Do()
 15641  		if err != nil {
 15642  			return err
 15643  		}
 15644  		if err := f(x); err != nil {
 15645  			return err
 15646  		}
 15647  		if x.NextPageToken == "" {
 15648  			return nil
 15649  		}
 15650  		c.PageToken(x.NextPageToken)
 15651  	}
 15652  }
 15653  
 15654  type PlaylistItemsUpdateCall struct {
 15655  	s            *Service
 15656  	playlistitem *PlaylistItem
 15657  	urlParams_   gensupport.URLParams
 15658  	ctx_         context.Context
 15659  	header_      http.Header
 15660  }
 15661  
 15662  // Update: Updates an existing resource.
 15663  //
 15664  //   - part: The *part* parameter serves two purposes in this operation. It
 15665  //     identifies the properties that the write operation will set as well as the
 15666  //     properties that the API response will include. Note that this method will
 15667  //     override the existing values for all of the mutable properties that are
 15668  //     contained in any parts that the parameter value specifies. For example, a
 15669  //     playlist item can specify a start time and end time, which identify the
 15670  //     times portion of the video that should play when users watch the video in
 15671  //     the playlist. If your request is updating a playlist item that sets these
 15672  //     values, and the request's part parameter value includes the contentDetails
 15673  //     part, the playlist item's start and end times will be updated to whatever
 15674  //     value the request body specifies. If the request body does not specify
 15675  //     values, the existing start and end times will be removed and replaced with
 15676  //     the default settings.
 15677  func (r *PlaylistItemsService) Update(part []string, playlistitem *PlaylistItem) *PlaylistItemsUpdateCall {
 15678  	c := &PlaylistItemsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15679  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 15680  	c.playlistitem = playlistitem
 15681  	return c
 15682  }
 15683  
 15684  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15685  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15686  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15687  // authorization credentials identify a YouTube CMS user who is acting on
 15688  // behalf of the content owner specified in the parameter value. This parameter
 15689  // is intended for YouTube content partners that own and manage many different
 15690  // YouTube channels. It allows content owners to authenticate once and get
 15691  // access to all their video and channel data, without having to provide
 15692  // authentication credentials for each individual channel. The CMS account that
 15693  // the user authenticates with must be linked to the specified YouTube content
 15694  // owner.
 15695  func (c *PlaylistItemsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistItemsUpdateCall {
 15696  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15697  	return c
 15698  }
 15699  
 15700  // Fields allows partial responses to be retrieved. See
 15701  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15702  // details.
 15703  func (c *PlaylistItemsUpdateCall) Fields(s ...googleapi.Field) *PlaylistItemsUpdateCall {
 15704  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15705  	return c
 15706  }
 15707  
 15708  // Context sets the context to be used in this call's Do method.
 15709  func (c *PlaylistItemsUpdateCall) Context(ctx context.Context) *PlaylistItemsUpdateCall {
 15710  	c.ctx_ = ctx
 15711  	return c
 15712  }
 15713  
 15714  // Header returns a http.Header that can be modified by the caller to add
 15715  // headers to the request.
 15716  func (c *PlaylistItemsUpdateCall) Header() http.Header {
 15717  	if c.header_ == nil {
 15718  		c.header_ = make(http.Header)
 15719  	}
 15720  	return c.header_
 15721  }
 15722  
 15723  func (c *PlaylistItemsUpdateCall) doRequest(alt string) (*http.Response, error) {
 15724  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15725  	var body io.Reader = nil
 15726  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
 15727  	if err != nil {
 15728  		return nil, err
 15729  	}
 15730  	c.urlParams_.Set("alt", alt)
 15731  	c.urlParams_.Set("prettyPrint", "false")
 15732  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlistItems")
 15733  	urls += "?" + c.urlParams_.Encode()
 15734  	req, err := http.NewRequest("PUT", urls, body)
 15735  	if err != nil {
 15736  		return nil, err
 15737  	}
 15738  	req.Header = reqHeaders
 15739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15740  }
 15741  
 15742  // Do executes the "youtube.playlistItems.update" call.
 15743  // Any non-2xx status code is an error. Response headers are in either
 15744  // *PlaylistItem.ServerResponse.Header or (if a response was returned at all)
 15745  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15746  // whether the returned error was because http.StatusNotModified was returned.
 15747  func (c *PlaylistItemsUpdateCall) Do(opts ...googleapi.CallOption) (*PlaylistItem, error) {
 15748  	gensupport.SetOptions(c.urlParams_, opts...)
 15749  	res, err := c.doRequest("json")
 15750  	if res != nil && res.StatusCode == http.StatusNotModified {
 15751  		if res.Body != nil {
 15752  			res.Body.Close()
 15753  		}
 15754  		return nil, gensupport.WrapError(&googleapi.Error{
 15755  			Code:   res.StatusCode,
 15756  			Header: res.Header,
 15757  		})
 15758  	}
 15759  	if err != nil {
 15760  		return nil, err
 15761  	}
 15762  	defer googleapi.CloseBody(res)
 15763  	if err := googleapi.CheckResponse(res); err != nil {
 15764  		return nil, gensupport.WrapError(err)
 15765  	}
 15766  	ret := &PlaylistItem{
 15767  		ServerResponse: googleapi.ServerResponse{
 15768  			Header:         res.Header,
 15769  			HTTPStatusCode: res.StatusCode,
 15770  		},
 15771  	}
 15772  	target := &ret
 15773  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15774  		return nil, err
 15775  	}
 15776  	return ret, nil
 15777  }
 15778  
 15779  type PlaylistsDeleteCall struct {
 15780  	s          *Service
 15781  	urlParams_ gensupport.URLParams
 15782  	ctx_       context.Context
 15783  	header_    http.Header
 15784  }
 15785  
 15786  // Delete: Deletes a resource.
 15787  //
 15788  // - id: .
 15789  func (r *PlaylistsService) Delete(id string) *PlaylistsDeleteCall {
 15790  	c := &PlaylistsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15791  	c.urlParams_.Set("id", id)
 15792  	return c
 15793  }
 15794  
 15795  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15796  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15797  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15798  // authorization credentials identify a YouTube CMS user who is acting on
 15799  // behalf of the content owner specified in the parameter value. This parameter
 15800  // is intended for YouTube content partners that own and manage many different
 15801  // YouTube channels. It allows content owners to authenticate once and get
 15802  // access to all their video and channel data, without having to provide
 15803  // authentication credentials for each individual channel. The CMS account that
 15804  // the user authenticates with must be linked to the specified YouTube content
 15805  // owner.
 15806  func (c *PlaylistsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsDeleteCall {
 15807  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15808  	return c
 15809  }
 15810  
 15811  // Fields allows partial responses to be retrieved. See
 15812  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15813  // details.
 15814  func (c *PlaylistsDeleteCall) Fields(s ...googleapi.Field) *PlaylistsDeleteCall {
 15815  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15816  	return c
 15817  }
 15818  
 15819  // Context sets the context to be used in this call's Do method.
 15820  func (c *PlaylistsDeleteCall) Context(ctx context.Context) *PlaylistsDeleteCall {
 15821  	c.ctx_ = ctx
 15822  	return c
 15823  }
 15824  
 15825  // Header returns a http.Header that can be modified by the caller to add
 15826  // headers to the request.
 15827  func (c *PlaylistsDeleteCall) Header() http.Header {
 15828  	if c.header_ == nil {
 15829  		c.header_ = make(http.Header)
 15830  	}
 15831  	return c.header_
 15832  }
 15833  
 15834  func (c *PlaylistsDeleteCall) doRequest(alt string) (*http.Response, error) {
 15835  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15836  	var body io.Reader = nil
 15837  	c.urlParams_.Set("alt", alt)
 15838  	c.urlParams_.Set("prettyPrint", "false")
 15839  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
 15840  	urls += "?" + c.urlParams_.Encode()
 15841  	req, err := http.NewRequest("DELETE", urls, body)
 15842  	if err != nil {
 15843  		return nil, err
 15844  	}
 15845  	req.Header = reqHeaders
 15846  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15847  }
 15848  
 15849  // Do executes the "youtube.playlists.delete" call.
 15850  func (c *PlaylistsDeleteCall) Do(opts ...googleapi.CallOption) error {
 15851  	gensupport.SetOptions(c.urlParams_, opts...)
 15852  	res, err := c.doRequest("json")
 15853  	if err != nil {
 15854  		return err
 15855  	}
 15856  	defer googleapi.CloseBody(res)
 15857  	if err := googleapi.CheckResponse(res); err != nil {
 15858  		return gensupport.WrapError(err)
 15859  	}
 15860  	return nil
 15861  }
 15862  
 15863  type PlaylistsInsertCall struct {
 15864  	s          *Service
 15865  	playlist   *Playlist
 15866  	urlParams_ gensupport.URLParams
 15867  	ctx_       context.Context
 15868  	header_    http.Header
 15869  }
 15870  
 15871  // Insert: Inserts a new resource into this collection.
 15872  //
 15873  //   - part: The *part* parameter serves two purposes in this operation. It
 15874  //     identifies the properties that the write operation will set as well as the
 15875  //     properties that the API response will include.
 15876  func (r *PlaylistsService) Insert(part []string, playlist *Playlist) *PlaylistsInsertCall {
 15877  	c := &PlaylistsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15878  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 15879  	c.playlist = playlist
 15880  	return c
 15881  }
 15882  
 15883  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 15884  // *Note:* This parameter is intended exclusively for YouTube content partners.
 15885  // The *onBehalfOfContentOwner* parameter indicates that the request's
 15886  // authorization credentials identify a YouTube CMS user who is acting on
 15887  // behalf of the content owner specified in the parameter value. This parameter
 15888  // is intended for YouTube content partners that own and manage many different
 15889  // YouTube channels. It allows content owners to authenticate once and get
 15890  // access to all their video and channel data, without having to provide
 15891  // authentication credentials for each individual channel. The CMS account that
 15892  // the user authenticates with must be linked to the specified YouTube content
 15893  // owner.
 15894  func (c *PlaylistsInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsInsertCall {
 15895  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 15896  	return c
 15897  }
 15898  
 15899  // OnBehalfOfContentOwnerChannel sets the optional parameter
 15900  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 15901  // properly authorized request. *Note:* This parameter is intended exclusively
 15902  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 15903  // specifies the YouTube channel ID of the channel to which a video is being
 15904  // added. This parameter is required when a request specifies a value for the
 15905  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 15906  // with that parameter. In addition, the request must be authorized using a CMS
 15907  // account that is linked to the content owner that the onBehalfOfContentOwner
 15908  // parameter specifies. Finally, the channel that the
 15909  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 15910  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 15911  // parameter is intended for YouTube content partners that own and manage many
 15912  // different YouTube channels. It allows content owners to authenticate once
 15913  // and perform actions on behalf of the channel specified in the parameter
 15914  // value, without having to provide authentication credentials for each
 15915  // separate channel.
 15916  func (c *PlaylistsInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistsInsertCall {
 15917  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 15918  	return c
 15919  }
 15920  
 15921  // Fields allows partial responses to be retrieved. See
 15922  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15923  // details.
 15924  func (c *PlaylistsInsertCall) Fields(s ...googleapi.Field) *PlaylistsInsertCall {
 15925  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15926  	return c
 15927  }
 15928  
 15929  // Context sets the context to be used in this call's Do method.
 15930  func (c *PlaylistsInsertCall) Context(ctx context.Context) *PlaylistsInsertCall {
 15931  	c.ctx_ = ctx
 15932  	return c
 15933  }
 15934  
 15935  // Header returns a http.Header that can be modified by the caller to add
 15936  // headers to the request.
 15937  func (c *PlaylistsInsertCall) Header() http.Header {
 15938  	if c.header_ == nil {
 15939  		c.header_ = make(http.Header)
 15940  	}
 15941  	return c.header_
 15942  }
 15943  
 15944  func (c *PlaylistsInsertCall) doRequest(alt string) (*http.Response, error) {
 15945  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15946  	var body io.Reader = nil
 15947  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
 15948  	if err != nil {
 15949  		return nil, err
 15950  	}
 15951  	c.urlParams_.Set("alt", alt)
 15952  	c.urlParams_.Set("prettyPrint", "false")
 15953  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
 15954  	urls += "?" + c.urlParams_.Encode()
 15955  	req, err := http.NewRequest("POST", urls, body)
 15956  	if err != nil {
 15957  		return nil, err
 15958  	}
 15959  	req.Header = reqHeaders
 15960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15961  }
 15962  
 15963  // Do executes the "youtube.playlists.insert" call.
 15964  // Any non-2xx status code is an error. Response headers are in either
 15965  // *Playlist.ServerResponse.Header or (if a response was returned at all) in
 15966  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15967  // whether the returned error was because http.StatusNotModified was returned.
 15968  func (c *PlaylistsInsertCall) Do(opts ...googleapi.CallOption) (*Playlist, error) {
 15969  	gensupport.SetOptions(c.urlParams_, opts...)
 15970  	res, err := c.doRequest("json")
 15971  	if res != nil && res.StatusCode == http.StatusNotModified {
 15972  		if res.Body != nil {
 15973  			res.Body.Close()
 15974  		}
 15975  		return nil, gensupport.WrapError(&googleapi.Error{
 15976  			Code:   res.StatusCode,
 15977  			Header: res.Header,
 15978  		})
 15979  	}
 15980  	if err != nil {
 15981  		return nil, err
 15982  	}
 15983  	defer googleapi.CloseBody(res)
 15984  	if err := googleapi.CheckResponse(res); err != nil {
 15985  		return nil, gensupport.WrapError(err)
 15986  	}
 15987  	ret := &Playlist{
 15988  		ServerResponse: googleapi.ServerResponse{
 15989  			Header:         res.Header,
 15990  			HTTPStatusCode: res.StatusCode,
 15991  		},
 15992  	}
 15993  	target := &ret
 15994  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15995  		return nil, err
 15996  	}
 15997  	return ret, nil
 15998  }
 15999  
 16000  type PlaylistsListCall struct {
 16001  	s            *Service
 16002  	urlParams_   gensupport.URLParams
 16003  	ifNoneMatch_ string
 16004  	ctx_         context.Context
 16005  	header_      http.Header
 16006  }
 16007  
 16008  // List: Retrieves a list of resources, possibly filtered.
 16009  //
 16010  //   - part: The *part* parameter specifies a comma-separated list of one or more
 16011  //     playlist resource properties that the API response will include. If the
 16012  //     parameter identifies a property that contains child properties, the child
 16013  //     properties will be included in the response. For example, in a playlist
 16014  //     resource, the snippet property contains properties like author, title,
 16015  //     description, tags, and timeCreated. As such, if you set *part=snippet*,
 16016  //     the API response will contain all of those properties.
 16017  func (r *PlaylistsService) List(part []string) *PlaylistsListCall {
 16018  	c := &PlaylistsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16019  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 16020  	return c
 16021  }
 16022  
 16023  // ChannelId sets the optional parameter "channelId": Return the playlists
 16024  // owned by the specified channel ID.
 16025  func (c *PlaylistsListCall) ChannelId(channelId string) *PlaylistsListCall {
 16026  	c.urlParams_.Set("channelId", channelId)
 16027  	return c
 16028  }
 16029  
 16030  // Hl sets the optional parameter "hl": Return content in specified language
 16031  func (c *PlaylistsListCall) Hl(hl string) *PlaylistsListCall {
 16032  	c.urlParams_.Set("hl", hl)
 16033  	return c
 16034  }
 16035  
 16036  // Id sets the optional parameter "id": Return the playlists with the given IDs
 16037  // for Stubby or Apiary.
 16038  func (c *PlaylistsListCall) Id(id ...string) *PlaylistsListCall {
 16039  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 16040  	return c
 16041  }
 16042  
 16043  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 16044  // parameter specifies the maximum number of items that should be returned in
 16045  // the result set.
 16046  func (c *PlaylistsListCall) MaxResults(maxResults int64) *PlaylistsListCall {
 16047  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 16048  	return c
 16049  }
 16050  
 16051  // Mine sets the optional parameter "mine": Return the playlists owned by the
 16052  // authenticated user.
 16053  func (c *PlaylistsListCall) Mine(mine bool) *PlaylistsListCall {
 16054  	c.urlParams_.Set("mine", fmt.Sprint(mine))
 16055  	return c
 16056  }
 16057  
 16058  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 16059  // *Note:* This parameter is intended exclusively for YouTube content partners.
 16060  // The *onBehalfOfContentOwner* parameter indicates that the request's
 16061  // authorization credentials identify a YouTube CMS user who is acting on
 16062  // behalf of the content owner specified in the parameter value. This parameter
 16063  // is intended for YouTube content partners that own and manage many different
 16064  // YouTube channels. It allows content owners to authenticate once and get
 16065  // access to all their video and channel data, without having to provide
 16066  // authentication credentials for each individual channel. The CMS account that
 16067  // the user authenticates with must be linked to the specified YouTube content
 16068  // owner.
 16069  func (c *PlaylistsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsListCall {
 16070  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 16071  	return c
 16072  }
 16073  
 16074  // OnBehalfOfContentOwnerChannel sets the optional parameter
 16075  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 16076  // properly authorized request. *Note:* This parameter is intended exclusively
 16077  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 16078  // specifies the YouTube channel ID of the channel to which a video is being
 16079  // added. This parameter is required when a request specifies a value for the
 16080  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 16081  // with that parameter. In addition, the request must be authorized using a CMS
 16082  // account that is linked to the content owner that the onBehalfOfContentOwner
 16083  // parameter specifies. Finally, the channel that the
 16084  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 16085  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 16086  // parameter is intended for YouTube content partners that own and manage many
 16087  // different YouTube channels. It allows content owners to authenticate once
 16088  // and perform actions on behalf of the channel specified in the parameter
 16089  // value, without having to provide authentication credentials for each
 16090  // separate channel.
 16091  func (c *PlaylistsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *PlaylistsListCall {
 16092  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 16093  	return c
 16094  }
 16095  
 16096  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 16097  // identifies a specific page in the result set that should be returned. In an
 16098  // API response, the nextPageToken and prevPageToken properties identify other
 16099  // pages that could be retrieved.
 16100  func (c *PlaylistsListCall) PageToken(pageToken string) *PlaylistsListCall {
 16101  	c.urlParams_.Set("pageToken", pageToken)
 16102  	return c
 16103  }
 16104  
 16105  // Fields allows partial responses to be retrieved. See
 16106  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16107  // details.
 16108  func (c *PlaylistsListCall) Fields(s ...googleapi.Field) *PlaylistsListCall {
 16109  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16110  	return c
 16111  }
 16112  
 16113  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16114  // object's ETag matches the given value. This is useful for getting updates
 16115  // only after the object has changed since the last request.
 16116  func (c *PlaylistsListCall) IfNoneMatch(entityTag string) *PlaylistsListCall {
 16117  	c.ifNoneMatch_ = entityTag
 16118  	return c
 16119  }
 16120  
 16121  // Context sets the context to be used in this call's Do method.
 16122  func (c *PlaylistsListCall) Context(ctx context.Context) *PlaylistsListCall {
 16123  	c.ctx_ = ctx
 16124  	return c
 16125  }
 16126  
 16127  // Header returns a http.Header that can be modified by the caller to add
 16128  // headers to the request.
 16129  func (c *PlaylistsListCall) Header() http.Header {
 16130  	if c.header_ == nil {
 16131  		c.header_ = make(http.Header)
 16132  	}
 16133  	return c.header_
 16134  }
 16135  
 16136  func (c *PlaylistsListCall) doRequest(alt string) (*http.Response, error) {
 16137  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16138  	if c.ifNoneMatch_ != "" {
 16139  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16140  	}
 16141  	var body io.Reader = nil
 16142  	c.urlParams_.Set("alt", alt)
 16143  	c.urlParams_.Set("prettyPrint", "false")
 16144  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
 16145  	urls += "?" + c.urlParams_.Encode()
 16146  	req, err := http.NewRequest("GET", urls, body)
 16147  	if err != nil {
 16148  		return nil, err
 16149  	}
 16150  	req.Header = reqHeaders
 16151  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16152  }
 16153  
 16154  // Do executes the "youtube.playlists.list" call.
 16155  // Any non-2xx status code is an error. Response headers are in either
 16156  // *PlaylistListResponse.ServerResponse.Header or (if a response was returned
 16157  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 16158  // check whether the returned error was because http.StatusNotModified was
 16159  // returned.
 16160  func (c *PlaylistsListCall) Do(opts ...googleapi.CallOption) (*PlaylistListResponse, error) {
 16161  	gensupport.SetOptions(c.urlParams_, opts...)
 16162  	res, err := c.doRequest("json")
 16163  	if res != nil && res.StatusCode == http.StatusNotModified {
 16164  		if res.Body != nil {
 16165  			res.Body.Close()
 16166  		}
 16167  		return nil, gensupport.WrapError(&googleapi.Error{
 16168  			Code:   res.StatusCode,
 16169  			Header: res.Header,
 16170  		})
 16171  	}
 16172  	if err != nil {
 16173  		return nil, err
 16174  	}
 16175  	defer googleapi.CloseBody(res)
 16176  	if err := googleapi.CheckResponse(res); err != nil {
 16177  		return nil, gensupport.WrapError(err)
 16178  	}
 16179  	ret := &PlaylistListResponse{
 16180  		ServerResponse: googleapi.ServerResponse{
 16181  			Header:         res.Header,
 16182  			HTTPStatusCode: res.StatusCode,
 16183  		},
 16184  	}
 16185  	target := &ret
 16186  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16187  		return nil, err
 16188  	}
 16189  	return ret, nil
 16190  }
 16191  
 16192  // Pages invokes f for each page of results.
 16193  // A non-nil error returned from f will halt the iteration.
 16194  // The provided context supersedes any context provided to the Context method.
 16195  func (c *PlaylistsListCall) Pages(ctx context.Context, f func(*PlaylistListResponse) error) error {
 16196  	c.ctx_ = ctx
 16197  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 16198  	for {
 16199  		x, err := c.Do()
 16200  		if err != nil {
 16201  			return err
 16202  		}
 16203  		if err := f(x); err != nil {
 16204  			return err
 16205  		}
 16206  		if x.NextPageToken == "" {
 16207  			return nil
 16208  		}
 16209  		c.PageToken(x.NextPageToken)
 16210  	}
 16211  }
 16212  
 16213  type PlaylistsUpdateCall struct {
 16214  	s          *Service
 16215  	playlist   *Playlist
 16216  	urlParams_ gensupport.URLParams
 16217  	ctx_       context.Context
 16218  	header_    http.Header
 16219  }
 16220  
 16221  // Update: Updates an existing resource.
 16222  //
 16223  //   - part: The *part* parameter serves two purposes in this operation. It
 16224  //     identifies the properties that the write operation will set as well as the
 16225  //     properties that the API response will include. Note that this method will
 16226  //     override the existing values for mutable properties that are contained in
 16227  //     any parts that the request body specifies. For example, a playlist's
 16228  //     description is contained in the snippet part, which must be included in
 16229  //     the request body. If the request does not specify a value for the
 16230  //     snippet.description property, the playlist's existing description will be
 16231  //     deleted.
 16232  func (r *PlaylistsService) Update(part []string, playlist *Playlist) *PlaylistsUpdateCall {
 16233  	c := &PlaylistsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16234  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 16235  	c.playlist = playlist
 16236  	return c
 16237  }
 16238  
 16239  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 16240  // *Note:* This parameter is intended exclusively for YouTube content partners.
 16241  // The *onBehalfOfContentOwner* parameter indicates that the request's
 16242  // authorization credentials identify a YouTube CMS user who is acting on
 16243  // behalf of the content owner specified in the parameter value. This parameter
 16244  // is intended for YouTube content partners that own and manage many different
 16245  // YouTube channels. It allows content owners to authenticate once and get
 16246  // access to all their video and channel data, without having to provide
 16247  // authentication credentials for each individual channel. The CMS account that
 16248  // the user authenticates with must be linked to the specified YouTube content
 16249  // owner.
 16250  func (c *PlaylistsUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *PlaylistsUpdateCall {
 16251  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 16252  	return c
 16253  }
 16254  
 16255  // Fields allows partial responses to be retrieved. See
 16256  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16257  // details.
 16258  func (c *PlaylistsUpdateCall) Fields(s ...googleapi.Field) *PlaylistsUpdateCall {
 16259  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16260  	return c
 16261  }
 16262  
 16263  // Context sets the context to be used in this call's Do method.
 16264  func (c *PlaylistsUpdateCall) Context(ctx context.Context) *PlaylistsUpdateCall {
 16265  	c.ctx_ = ctx
 16266  	return c
 16267  }
 16268  
 16269  // Header returns a http.Header that can be modified by the caller to add
 16270  // headers to the request.
 16271  func (c *PlaylistsUpdateCall) Header() http.Header {
 16272  	if c.header_ == nil {
 16273  		c.header_ = make(http.Header)
 16274  	}
 16275  	return c.header_
 16276  }
 16277  
 16278  func (c *PlaylistsUpdateCall) doRequest(alt string) (*http.Response, error) {
 16279  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 16280  	var body io.Reader = nil
 16281  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
 16282  	if err != nil {
 16283  		return nil, err
 16284  	}
 16285  	c.urlParams_.Set("alt", alt)
 16286  	c.urlParams_.Set("prettyPrint", "false")
 16287  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/playlists")
 16288  	urls += "?" + c.urlParams_.Encode()
 16289  	req, err := http.NewRequest("PUT", urls, body)
 16290  	if err != nil {
 16291  		return nil, err
 16292  	}
 16293  	req.Header = reqHeaders
 16294  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16295  }
 16296  
 16297  // Do executes the "youtube.playlists.update" call.
 16298  // Any non-2xx status code is an error. Response headers are in either
 16299  // *Playlist.ServerResponse.Header or (if a response was returned at all) in
 16300  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16301  // whether the returned error was because http.StatusNotModified was returned.
 16302  func (c *PlaylistsUpdateCall) Do(opts ...googleapi.CallOption) (*Playlist, error) {
 16303  	gensupport.SetOptions(c.urlParams_, opts...)
 16304  	res, err := c.doRequest("json")
 16305  	if res != nil && res.StatusCode == http.StatusNotModified {
 16306  		if res.Body != nil {
 16307  			res.Body.Close()
 16308  		}
 16309  		return nil, gensupport.WrapError(&googleapi.Error{
 16310  			Code:   res.StatusCode,
 16311  			Header: res.Header,
 16312  		})
 16313  	}
 16314  	if err != nil {
 16315  		return nil, err
 16316  	}
 16317  	defer googleapi.CloseBody(res)
 16318  	if err := googleapi.CheckResponse(res); err != nil {
 16319  		return nil, gensupport.WrapError(err)
 16320  	}
 16321  	ret := &Playlist{
 16322  		ServerResponse: googleapi.ServerResponse{
 16323  			Header:         res.Header,
 16324  			HTTPStatusCode: res.StatusCode,
 16325  		},
 16326  	}
 16327  	target := &ret
 16328  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16329  		return nil, err
 16330  	}
 16331  	return ret, nil
 16332  }
 16333  
 16334  type SearchListCall struct {
 16335  	s            *Service
 16336  	urlParams_   gensupport.URLParams
 16337  	ifNoneMatch_ string
 16338  	ctx_         context.Context
 16339  	header_      http.Header
 16340  }
 16341  
 16342  // List: Retrieves a list of search resources
 16343  //
 16344  //   - part: The *part* parameter specifies a comma-separated list of one or more
 16345  //     search resource properties that the API response will include. Set the
 16346  //     parameter value to snippet.
 16347  func (r *SearchService) List(part []string) *SearchListCall {
 16348  	c := &SearchListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16349  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 16350  	return c
 16351  }
 16352  
 16353  // ChannelId sets the optional parameter "channelId": Filter on resources
 16354  // belonging to this channelId.
 16355  func (c *SearchListCall) ChannelId(channelId string) *SearchListCall {
 16356  	c.urlParams_.Set("channelId", channelId)
 16357  	return c
 16358  }
 16359  
 16360  // ChannelType sets the optional parameter "channelType": Add a filter on the
 16361  // channel search.
 16362  //
 16363  // Possible values:
 16364  //
 16365  //	"channelTypeUnspecified"
 16366  //	"any" - Return all channels.
 16367  //	"show" - Only retrieve shows.
 16368  func (c *SearchListCall) ChannelType(channelType string) *SearchListCall {
 16369  	c.urlParams_.Set("channelType", channelType)
 16370  	return c
 16371  }
 16372  
 16373  // EventType sets the optional parameter "eventType": Filter on the livestream
 16374  // status of the videos.
 16375  //
 16376  // Possible values:
 16377  //
 16378  //	"none"
 16379  //	"upcoming" - The live broadcast is upcoming.
 16380  //	"live" - The live broadcast is active.
 16381  //	"completed" - The live broadcast has been completed.
 16382  func (c *SearchListCall) EventType(eventType string) *SearchListCall {
 16383  	c.urlParams_.Set("eventType", eventType)
 16384  	return c
 16385  }
 16386  
 16387  // ForContentOwner sets the optional parameter "forContentOwner": Search owned
 16388  // by a content owner.
 16389  func (c *SearchListCall) ForContentOwner(forContentOwner bool) *SearchListCall {
 16390  	c.urlParams_.Set("forContentOwner", fmt.Sprint(forContentOwner))
 16391  	return c
 16392  }
 16393  
 16394  // ForDeveloper sets the optional parameter "forDeveloper": Restrict the search
 16395  // to only retrieve videos uploaded using the project id of the authenticated
 16396  // user.
 16397  func (c *SearchListCall) ForDeveloper(forDeveloper bool) *SearchListCall {
 16398  	c.urlParams_.Set("forDeveloper", fmt.Sprint(forDeveloper))
 16399  	return c
 16400  }
 16401  
 16402  // ForMine sets the optional parameter "forMine": Search for the private videos
 16403  // of the authenticated user.
 16404  func (c *SearchListCall) ForMine(forMine bool) *SearchListCall {
 16405  	c.urlParams_.Set("forMine", fmt.Sprint(forMine))
 16406  	return c
 16407  }
 16408  
 16409  // Location sets the optional parameter "location": Filter on location of the
 16410  // video
 16411  func (c *SearchListCall) Location(location string) *SearchListCall {
 16412  	c.urlParams_.Set("location", location)
 16413  	return c
 16414  }
 16415  
 16416  // LocationRadius sets the optional parameter "locationRadius": Filter on
 16417  // distance from the location (specified above).
 16418  func (c *SearchListCall) LocationRadius(locationRadius string) *SearchListCall {
 16419  	c.urlParams_.Set("locationRadius", locationRadius)
 16420  	return c
 16421  }
 16422  
 16423  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 16424  // parameter specifies the maximum number of items that should be returned in
 16425  // the result set.
 16426  func (c *SearchListCall) MaxResults(maxResults int64) *SearchListCall {
 16427  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 16428  	return c
 16429  }
 16430  
 16431  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 16432  // *Note:* This parameter is intended exclusively for YouTube content partners.
 16433  // The *onBehalfOfContentOwner* parameter indicates that the request's
 16434  // authorization credentials identify a YouTube CMS user who is acting on
 16435  // behalf of the content owner specified in the parameter value. This parameter
 16436  // is intended for YouTube content partners that own and manage many different
 16437  // YouTube channels. It allows content owners to authenticate once and get
 16438  // access to all their video and channel data, without having to provide
 16439  // authentication credentials for each individual channel. The CMS account that
 16440  // the user authenticates with must be linked to the specified YouTube content
 16441  // owner.
 16442  func (c *SearchListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *SearchListCall {
 16443  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 16444  	return c
 16445  }
 16446  
 16447  // Order sets the optional parameter "order": Sort order of the results.
 16448  //
 16449  // Possible values:
 16450  //
 16451  //	"searchSortUnspecified"
 16452  //	"date" - Resources are sorted in reverse chronological order based on the
 16453  //
 16454  // date they were created.
 16455  //
 16456  //	"rating" - Resources are sorted from highest to lowest rating.
 16457  //	"viewCount" - Resources are sorted from highest to lowest number of views.
 16458  //	"relevance" (default) - Resources are sorted based on their relevance to
 16459  //
 16460  // the search query. This is the default value for this parameter.
 16461  //
 16462  //	"title" - Resources are sorted alphabetically by title.
 16463  //	"videoCount" - Channels are sorted in descending order of their number of
 16464  //
 16465  // uploaded videos.
 16466  func (c *SearchListCall) Order(order string) *SearchListCall {
 16467  	c.urlParams_.Set("order", order)
 16468  	return c
 16469  }
 16470  
 16471  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 16472  // identifies a specific page in the result set that should be returned. In an
 16473  // API response, the nextPageToken and prevPageToken properties identify other
 16474  // pages that could be retrieved.
 16475  func (c *SearchListCall) PageToken(pageToken string) *SearchListCall {
 16476  	c.urlParams_.Set("pageToken", pageToken)
 16477  	return c
 16478  }
 16479  
 16480  // PublishedAfter sets the optional parameter "publishedAfter": Filter on
 16481  // resources published after this date.
 16482  func (c *SearchListCall) PublishedAfter(publishedAfter string) *SearchListCall {
 16483  	c.urlParams_.Set("publishedAfter", publishedAfter)
 16484  	return c
 16485  }
 16486  
 16487  // PublishedBefore sets the optional parameter "publishedBefore": Filter on
 16488  // resources published before this date.
 16489  func (c *SearchListCall) PublishedBefore(publishedBefore string) *SearchListCall {
 16490  	c.urlParams_.Set("publishedBefore", publishedBefore)
 16491  	return c
 16492  }
 16493  
 16494  // Q sets the optional parameter "q": Textual search terms to match.
 16495  func (c *SearchListCall) Q(q string) *SearchListCall {
 16496  	c.urlParams_.Set("q", q)
 16497  	return c
 16498  }
 16499  
 16500  // RegionCode sets the optional parameter "regionCode": Display the content as
 16501  // seen by viewers in this country.
 16502  func (c *SearchListCall) RegionCode(regionCode string) *SearchListCall {
 16503  	c.urlParams_.Set("regionCode", regionCode)
 16504  	return c
 16505  }
 16506  
 16507  // RelevanceLanguage sets the optional parameter "relevanceLanguage": Return
 16508  // results relevant to this language.
 16509  func (c *SearchListCall) RelevanceLanguage(relevanceLanguage string) *SearchListCall {
 16510  	c.urlParams_.Set("relevanceLanguage", relevanceLanguage)
 16511  	return c
 16512  }
 16513  
 16514  // SafeSearch sets the optional parameter "safeSearch": Indicates whether the
 16515  // search results should include restricted content as well as standard
 16516  // content.
 16517  //
 16518  // Possible values:
 16519  //
 16520  //	"safeSearchSettingUnspecified"
 16521  //	"none" - YouTube will not filter the search result set.
 16522  //	"moderate" (default) - YouTube will filter some content from search
 16523  //
 16524  // results and, at the least, will filter content that is restricted in your
 16525  // locale. Based on their content, search results could be removed from search
 16526  // results or demoted in search results. This is the default parameter value.
 16527  //
 16528  //	"strict" - YouTube will try to exclude all restricted content from the
 16529  //
 16530  // search result set. Based on their content, search results could be removed
 16531  // from search results or demoted in search results.
 16532  func (c *SearchListCall) SafeSearch(safeSearch string) *SearchListCall {
 16533  	c.urlParams_.Set("safeSearch", safeSearch)
 16534  	return c
 16535  }
 16536  
 16537  // TopicId sets the optional parameter "topicId": Restrict results to a
 16538  // particular topic.
 16539  func (c *SearchListCall) TopicId(topicId string) *SearchListCall {
 16540  	c.urlParams_.Set("topicId", topicId)
 16541  	return c
 16542  }
 16543  
 16544  // Type sets the optional parameter "type": Restrict results to a particular
 16545  // set of resource types from One Platform.
 16546  func (c *SearchListCall) Type(type_ ...string) *SearchListCall {
 16547  	c.urlParams_.SetMulti("type", append([]string{}, type_...))
 16548  	return c
 16549  }
 16550  
 16551  // VideoCaption sets the optional parameter "videoCaption": Filter on the
 16552  // presence of captions on the videos.
 16553  //
 16554  // Possible values:
 16555  //
 16556  //	"videoCaptionUnspecified"
 16557  //	"any" - Do not filter results based on caption availability.
 16558  //	"closedCaption" - Only include videos that have captions.
 16559  //	"none" - Only include videos that do not have captions.
 16560  func (c *SearchListCall) VideoCaption(videoCaption string) *SearchListCall {
 16561  	c.urlParams_.Set("videoCaption", videoCaption)
 16562  	return c
 16563  }
 16564  
 16565  // VideoCategoryId sets the optional parameter "videoCategoryId": Filter on
 16566  // videos in a specific category.
 16567  func (c *SearchListCall) VideoCategoryId(videoCategoryId string) *SearchListCall {
 16568  	c.urlParams_.Set("videoCategoryId", videoCategoryId)
 16569  	return c
 16570  }
 16571  
 16572  // VideoDefinition sets the optional parameter "videoDefinition": Filter on the
 16573  // definition of the videos.
 16574  //
 16575  // Possible values:
 16576  //
 16577  //	"any" - Return all videos, regardless of their resolution.
 16578  //	"standard" - Only retrieve videos in standard definition.
 16579  //	"high" - Only retrieve HD videos.
 16580  func (c *SearchListCall) VideoDefinition(videoDefinition string) *SearchListCall {
 16581  	c.urlParams_.Set("videoDefinition", videoDefinition)
 16582  	return c
 16583  }
 16584  
 16585  // VideoDimension sets the optional parameter "videoDimension": Filter on 3d
 16586  // videos.
 16587  //
 16588  // Possible values:
 16589  //
 16590  //	"any" - Include both 3D and non-3D videos in returned results. This is the
 16591  //
 16592  // default value.
 16593  //
 16594  //	"2d" - Restrict search results to exclude 3D videos.
 16595  //	"3d" - Restrict search results to only include 3D videos.
 16596  func (c *SearchListCall) VideoDimension(videoDimension string) *SearchListCall {
 16597  	c.urlParams_.Set("videoDimension", videoDimension)
 16598  	return c
 16599  }
 16600  
 16601  // VideoDuration sets the optional parameter "videoDuration": Filter on the
 16602  // duration of the videos.
 16603  //
 16604  // Possible values:
 16605  //
 16606  //	"videoDurationUnspecified"
 16607  //	"any" - Do not filter video search results based on their duration. This
 16608  //
 16609  // is the default value.
 16610  //
 16611  //	"short" - Only include videos that are less than four minutes long.
 16612  //	"medium" - Only include videos that are between four and 20 minutes long
 16613  //
 16614  // (inclusive).
 16615  //
 16616  //	"long" - Only include videos longer than 20 minutes.
 16617  func (c *SearchListCall) VideoDuration(videoDuration string) *SearchListCall {
 16618  	c.urlParams_.Set("videoDuration", videoDuration)
 16619  	return c
 16620  }
 16621  
 16622  // VideoEmbeddable sets the optional parameter "videoEmbeddable": Filter on
 16623  // embeddable videos.
 16624  //
 16625  // Possible values:
 16626  //
 16627  //	"videoEmbeddableUnspecified"
 16628  //	"any" - Return all videos, embeddable or not.
 16629  //	"true" - Only retrieve embeddable videos.
 16630  func (c *SearchListCall) VideoEmbeddable(videoEmbeddable string) *SearchListCall {
 16631  	c.urlParams_.Set("videoEmbeddable", videoEmbeddable)
 16632  	return c
 16633  }
 16634  
 16635  // VideoLicense sets the optional parameter "videoLicense": Filter on the
 16636  // license of the videos.
 16637  //
 16638  // Possible values:
 16639  //
 16640  //	"any" - Return all videos, regardless of which license they have, that
 16641  //
 16642  // match the query parameters.
 16643  //
 16644  //	"youtube" - Only return videos that have the standard YouTube license.
 16645  //	"creativeCommon" - Only return videos that have a Creative Commons
 16646  //
 16647  // license. Users can reuse videos with this license in other videos that they
 16648  // create. Learn more.
 16649  func (c *SearchListCall) VideoLicense(videoLicense string) *SearchListCall {
 16650  	c.urlParams_.Set("videoLicense", videoLicense)
 16651  	return c
 16652  }
 16653  
 16654  // VideoPaidProductPlacement sets the optional parameter
 16655  // "videoPaidProductPlacement":
 16656  //
 16657  // Possible values:
 16658  //
 16659  //	"videoPaidProductPlacementUnspecified"
 16660  //	"any" - Return all videos, paid product placement or not.
 16661  //	"true" - Restrict results to only videos with paid product placement.
 16662  func (c *SearchListCall) VideoPaidProductPlacement(videoPaidProductPlacement string) *SearchListCall {
 16663  	c.urlParams_.Set("videoPaidProductPlacement", videoPaidProductPlacement)
 16664  	return c
 16665  }
 16666  
 16667  // VideoSyndicated sets the optional parameter "videoSyndicated": Filter on
 16668  // syndicated videos.
 16669  //
 16670  // Possible values:
 16671  //
 16672  //	"videoSyndicatedUnspecified"
 16673  //	"any" - Return all videos, syndicated or not.
 16674  //	"true" - Only retrieve syndicated videos.
 16675  func (c *SearchListCall) VideoSyndicated(videoSyndicated string) *SearchListCall {
 16676  	c.urlParams_.Set("videoSyndicated", videoSyndicated)
 16677  	return c
 16678  }
 16679  
 16680  // VideoType sets the optional parameter "videoType": Filter on videos of a
 16681  // specific type.
 16682  //
 16683  // Possible values:
 16684  //
 16685  //	"videoTypeUnspecified"
 16686  //	"any" - Return all videos.
 16687  //	"movie" - Only retrieve movies.
 16688  //	"episode" - Only retrieve episodes of shows.
 16689  func (c *SearchListCall) VideoType(videoType string) *SearchListCall {
 16690  	c.urlParams_.Set("videoType", videoType)
 16691  	return c
 16692  }
 16693  
 16694  // Fields allows partial responses to be retrieved. See
 16695  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16696  // details.
 16697  func (c *SearchListCall) Fields(s ...googleapi.Field) *SearchListCall {
 16698  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16699  	return c
 16700  }
 16701  
 16702  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16703  // object's ETag matches the given value. This is useful for getting updates
 16704  // only after the object has changed since the last request.
 16705  func (c *SearchListCall) IfNoneMatch(entityTag string) *SearchListCall {
 16706  	c.ifNoneMatch_ = entityTag
 16707  	return c
 16708  }
 16709  
 16710  // Context sets the context to be used in this call's Do method.
 16711  func (c *SearchListCall) Context(ctx context.Context) *SearchListCall {
 16712  	c.ctx_ = ctx
 16713  	return c
 16714  }
 16715  
 16716  // Header returns a http.Header that can be modified by the caller to add
 16717  // headers to the request.
 16718  func (c *SearchListCall) Header() http.Header {
 16719  	if c.header_ == nil {
 16720  		c.header_ = make(http.Header)
 16721  	}
 16722  	return c.header_
 16723  }
 16724  
 16725  func (c *SearchListCall) doRequest(alt string) (*http.Response, error) {
 16726  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16727  	if c.ifNoneMatch_ != "" {
 16728  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16729  	}
 16730  	var body io.Reader = nil
 16731  	c.urlParams_.Set("alt", alt)
 16732  	c.urlParams_.Set("prettyPrint", "false")
 16733  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/search")
 16734  	urls += "?" + c.urlParams_.Encode()
 16735  	req, err := http.NewRequest("GET", urls, body)
 16736  	if err != nil {
 16737  		return nil, err
 16738  	}
 16739  	req.Header = reqHeaders
 16740  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16741  }
 16742  
 16743  // Do executes the "youtube.search.list" call.
 16744  // Any non-2xx status code is an error. Response headers are in either
 16745  // *SearchListResponse.ServerResponse.Header or (if a response was returned at
 16746  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 16747  // check whether the returned error was because http.StatusNotModified was
 16748  // returned.
 16749  func (c *SearchListCall) Do(opts ...googleapi.CallOption) (*SearchListResponse, error) {
 16750  	gensupport.SetOptions(c.urlParams_, opts...)
 16751  	res, err := c.doRequest("json")
 16752  	if res != nil && res.StatusCode == http.StatusNotModified {
 16753  		if res.Body != nil {
 16754  			res.Body.Close()
 16755  		}
 16756  		return nil, gensupport.WrapError(&googleapi.Error{
 16757  			Code:   res.StatusCode,
 16758  			Header: res.Header,
 16759  		})
 16760  	}
 16761  	if err != nil {
 16762  		return nil, err
 16763  	}
 16764  	defer googleapi.CloseBody(res)
 16765  	if err := googleapi.CheckResponse(res); err != nil {
 16766  		return nil, gensupport.WrapError(err)
 16767  	}
 16768  	ret := &SearchListResponse{
 16769  		ServerResponse: googleapi.ServerResponse{
 16770  			Header:         res.Header,
 16771  			HTTPStatusCode: res.StatusCode,
 16772  		},
 16773  	}
 16774  	target := &ret
 16775  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16776  		return nil, err
 16777  	}
 16778  	return ret, nil
 16779  }
 16780  
 16781  // Pages invokes f for each page of results.
 16782  // A non-nil error returned from f will halt the iteration.
 16783  // The provided context supersedes any context provided to the Context method.
 16784  func (c *SearchListCall) Pages(ctx context.Context, f func(*SearchListResponse) error) error {
 16785  	c.ctx_ = ctx
 16786  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 16787  	for {
 16788  		x, err := c.Do()
 16789  		if err != nil {
 16790  			return err
 16791  		}
 16792  		if err := f(x); err != nil {
 16793  			return err
 16794  		}
 16795  		if x.NextPageToken == "" {
 16796  			return nil
 16797  		}
 16798  		c.PageToken(x.NextPageToken)
 16799  	}
 16800  }
 16801  
 16802  type SubscriptionsDeleteCall struct {
 16803  	s          *Service
 16804  	urlParams_ gensupport.URLParams
 16805  	ctx_       context.Context
 16806  	header_    http.Header
 16807  }
 16808  
 16809  // Delete: Deletes a resource.
 16810  //
 16811  // - id: .
 16812  func (r *SubscriptionsService) Delete(id string) *SubscriptionsDeleteCall {
 16813  	c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16814  	c.urlParams_.Set("id", id)
 16815  	return c
 16816  }
 16817  
 16818  // Fields allows partial responses to be retrieved. See
 16819  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16820  // details.
 16821  func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall {
 16822  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16823  	return c
 16824  }
 16825  
 16826  // Context sets the context to be used in this call's Do method.
 16827  func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
 16828  	c.ctx_ = ctx
 16829  	return c
 16830  }
 16831  
 16832  // Header returns a http.Header that can be modified by the caller to add
 16833  // headers to the request.
 16834  func (c *SubscriptionsDeleteCall) Header() http.Header {
 16835  	if c.header_ == nil {
 16836  		c.header_ = make(http.Header)
 16837  	}
 16838  	return c.header_
 16839  }
 16840  
 16841  func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 16842  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16843  	var body io.Reader = nil
 16844  	c.urlParams_.Set("alt", alt)
 16845  	c.urlParams_.Set("prettyPrint", "false")
 16846  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/subscriptions")
 16847  	urls += "?" + c.urlParams_.Encode()
 16848  	req, err := http.NewRequest("DELETE", urls, body)
 16849  	if err != nil {
 16850  		return nil, err
 16851  	}
 16852  	req.Header = reqHeaders
 16853  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16854  }
 16855  
 16856  // Do executes the "youtube.subscriptions.delete" call.
 16857  func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) error {
 16858  	gensupport.SetOptions(c.urlParams_, opts...)
 16859  	res, err := c.doRequest("json")
 16860  	if err != nil {
 16861  		return err
 16862  	}
 16863  	defer googleapi.CloseBody(res)
 16864  	if err := googleapi.CheckResponse(res); err != nil {
 16865  		return gensupport.WrapError(err)
 16866  	}
 16867  	return nil
 16868  }
 16869  
 16870  type SubscriptionsInsertCall struct {
 16871  	s            *Service
 16872  	subscription *Subscription
 16873  	urlParams_   gensupport.URLParams
 16874  	ctx_         context.Context
 16875  	header_      http.Header
 16876  }
 16877  
 16878  // Insert: Inserts a new resource into this collection.
 16879  //
 16880  //   - part: The *part* parameter serves two purposes in this operation. It
 16881  //     identifies the properties that the write operation will set as well as the
 16882  //     properties that the API response will include.
 16883  func (r *SubscriptionsService) Insert(part []string, subscription *Subscription) *SubscriptionsInsertCall {
 16884  	c := &SubscriptionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16885  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 16886  	c.subscription = subscription
 16887  	return c
 16888  }
 16889  
 16890  // Fields allows partial responses to be retrieved. See
 16891  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16892  // details.
 16893  func (c *SubscriptionsInsertCall) Fields(s ...googleapi.Field) *SubscriptionsInsertCall {
 16894  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16895  	return c
 16896  }
 16897  
 16898  // Context sets the context to be used in this call's Do method.
 16899  func (c *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
 16900  	c.ctx_ = ctx
 16901  	return c
 16902  }
 16903  
 16904  // Header returns a http.Header that can be modified by the caller to add
 16905  // headers to the request.
 16906  func (c *SubscriptionsInsertCall) Header() http.Header {
 16907  	if c.header_ == nil {
 16908  		c.header_ = make(http.Header)
 16909  	}
 16910  	return c.header_
 16911  }
 16912  
 16913  func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
 16914  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 16915  	var body io.Reader = nil
 16916  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
 16917  	if err != nil {
 16918  		return nil, err
 16919  	}
 16920  	c.urlParams_.Set("alt", alt)
 16921  	c.urlParams_.Set("prettyPrint", "false")
 16922  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/subscriptions")
 16923  	urls += "?" + c.urlParams_.Encode()
 16924  	req, err := http.NewRequest("POST", urls, body)
 16925  	if err != nil {
 16926  		return nil, err
 16927  	}
 16928  	req.Header = reqHeaders
 16929  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16930  }
 16931  
 16932  // Do executes the "youtube.subscriptions.insert" call.
 16933  // Any non-2xx status code is an error. Response headers are in either
 16934  // *Subscription.ServerResponse.Header or (if a response was returned at all)
 16935  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16936  // whether the returned error was because http.StatusNotModified was returned.
 16937  func (c *SubscriptionsInsertCall) Do(opts ...googleapi.CallOption) (*Subscription, error) {
 16938  	gensupport.SetOptions(c.urlParams_, opts...)
 16939  	res, err := c.doRequest("json")
 16940  	if res != nil && res.StatusCode == http.StatusNotModified {
 16941  		if res.Body != nil {
 16942  			res.Body.Close()
 16943  		}
 16944  		return nil, gensupport.WrapError(&googleapi.Error{
 16945  			Code:   res.StatusCode,
 16946  			Header: res.Header,
 16947  		})
 16948  	}
 16949  	if err != nil {
 16950  		return nil, err
 16951  	}
 16952  	defer googleapi.CloseBody(res)
 16953  	if err := googleapi.CheckResponse(res); err != nil {
 16954  		return nil, gensupport.WrapError(err)
 16955  	}
 16956  	ret := &Subscription{
 16957  		ServerResponse: googleapi.ServerResponse{
 16958  			Header:         res.Header,
 16959  			HTTPStatusCode: res.StatusCode,
 16960  		},
 16961  	}
 16962  	target := &ret
 16963  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16964  		return nil, err
 16965  	}
 16966  	return ret, nil
 16967  }
 16968  
 16969  type SubscriptionsListCall struct {
 16970  	s            *Service
 16971  	urlParams_   gensupport.URLParams
 16972  	ifNoneMatch_ string
 16973  	ctx_         context.Context
 16974  	header_      http.Header
 16975  }
 16976  
 16977  // List: Retrieves a list of resources, possibly filtered.
 16978  //
 16979  //   - part: The *part* parameter specifies a comma-separated list of one or more
 16980  //     subscription resource properties that the API response will include. If
 16981  //     the parameter identifies a property that contains child properties, the
 16982  //     child properties will be included in the response. For example, in a
 16983  //     subscription resource, the snippet property contains other properties,
 16984  //     such as a display title for the subscription. If you set *part=snippet*,
 16985  //     the API response will also contain all of those nested properties.
 16986  func (r *SubscriptionsService) List(part []string) *SubscriptionsListCall {
 16987  	c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16988  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 16989  	return c
 16990  }
 16991  
 16992  // ChannelId sets the optional parameter "channelId": Return the subscriptions
 16993  // of the given channel owner.
 16994  func (c *SubscriptionsListCall) ChannelId(channelId string) *SubscriptionsListCall {
 16995  	c.urlParams_.Set("channelId", channelId)
 16996  	return c
 16997  }
 16998  
 16999  // ForChannelId sets the optional parameter "forChannelId": Return the
 17000  // subscriptions to the subset of these channels that the authenticated user is
 17001  // subscribed to.
 17002  func (c *SubscriptionsListCall) ForChannelId(forChannelId string) *SubscriptionsListCall {
 17003  	c.urlParams_.Set("forChannelId", forChannelId)
 17004  	return c
 17005  }
 17006  
 17007  // Id sets the optional parameter "id": Return the subscriptions with the given
 17008  // IDs for Stubby or Apiary.
 17009  func (c *SubscriptionsListCall) Id(id ...string) *SubscriptionsListCall {
 17010  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 17011  	return c
 17012  }
 17013  
 17014  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 17015  // parameter specifies the maximum number of items that should be returned in
 17016  // the result set.
 17017  func (c *SubscriptionsListCall) MaxResults(maxResults int64) *SubscriptionsListCall {
 17018  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 17019  	return c
 17020  }
 17021  
 17022  // Mine sets the optional parameter "mine": Flag for returning the
 17023  // subscriptions of the authenticated user.
 17024  func (c *SubscriptionsListCall) Mine(mine bool) *SubscriptionsListCall {
 17025  	c.urlParams_.Set("mine", fmt.Sprint(mine))
 17026  	return c
 17027  }
 17028  
 17029  // MyRecentSubscribers sets the optional parameter "myRecentSubscribers":
 17030  func (c *SubscriptionsListCall) MyRecentSubscribers(myRecentSubscribers bool) *SubscriptionsListCall {
 17031  	c.urlParams_.Set("myRecentSubscribers", fmt.Sprint(myRecentSubscribers))
 17032  	return c
 17033  }
 17034  
 17035  // MySubscribers sets the optional parameter "mySubscribers": Return the
 17036  // subscribers of the given channel owner.
 17037  func (c *SubscriptionsListCall) MySubscribers(mySubscribers bool) *SubscriptionsListCall {
 17038  	c.urlParams_.Set("mySubscribers", fmt.Sprint(mySubscribers))
 17039  	return c
 17040  }
 17041  
 17042  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 17043  // *Note:* This parameter is intended exclusively for YouTube content partners.
 17044  // The *onBehalfOfContentOwner* parameter indicates that the request's
 17045  // authorization credentials identify a YouTube CMS user who is acting on
 17046  // behalf of the content owner specified in the parameter value. This parameter
 17047  // is intended for YouTube content partners that own and manage many different
 17048  // YouTube channels. It allows content owners to authenticate once and get
 17049  // access to all their video and channel data, without having to provide
 17050  // authentication credentials for each individual channel. The CMS account that
 17051  // the user authenticates with must be linked to the specified YouTube content
 17052  // owner.
 17053  func (c *SubscriptionsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *SubscriptionsListCall {
 17054  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 17055  	return c
 17056  }
 17057  
 17058  // OnBehalfOfContentOwnerChannel sets the optional parameter
 17059  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 17060  // properly authorized request. *Note:* This parameter is intended exclusively
 17061  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 17062  // specifies the YouTube channel ID of the channel to which a video is being
 17063  // added. This parameter is required when a request specifies a value for the
 17064  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 17065  // with that parameter. In addition, the request must be authorized using a CMS
 17066  // account that is linked to the content owner that the onBehalfOfContentOwner
 17067  // parameter specifies. Finally, the channel that the
 17068  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 17069  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 17070  // parameter is intended for YouTube content partners that own and manage many
 17071  // different YouTube channels. It allows content owners to authenticate once
 17072  // and perform actions on behalf of the channel specified in the parameter
 17073  // value, without having to provide authentication credentials for each
 17074  // separate channel.
 17075  func (c *SubscriptionsListCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *SubscriptionsListCall {
 17076  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 17077  	return c
 17078  }
 17079  
 17080  // Order sets the optional parameter "order": The order of the returned
 17081  // subscriptions
 17082  //
 17083  // Possible values:
 17084  //
 17085  //	"subscriptionOrderUnspecified"
 17086  //	"relevance" (default) - Sort by relevance.
 17087  //	"unread" - Sort by order of activity.
 17088  //	"alphabetical" - Sort alphabetically.
 17089  func (c *SubscriptionsListCall) Order(order string) *SubscriptionsListCall {
 17090  	c.urlParams_.Set("order", order)
 17091  	return c
 17092  }
 17093  
 17094  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 17095  // identifies a specific page in the result set that should be returned. In an
 17096  // API response, the nextPageToken and prevPageToken properties identify other
 17097  // pages that could be retrieved.
 17098  func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall {
 17099  	c.urlParams_.Set("pageToken", pageToken)
 17100  	return c
 17101  }
 17102  
 17103  // Fields allows partial responses to be retrieved. See
 17104  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17105  // details.
 17106  func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall {
 17107  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17108  	return c
 17109  }
 17110  
 17111  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 17112  // object's ETag matches the given value. This is useful for getting updates
 17113  // only after the object has changed since the last request.
 17114  func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall {
 17115  	c.ifNoneMatch_ = entityTag
 17116  	return c
 17117  }
 17118  
 17119  // Context sets the context to be used in this call's Do method.
 17120  func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
 17121  	c.ctx_ = ctx
 17122  	return c
 17123  }
 17124  
 17125  // Header returns a http.Header that can be modified by the caller to add
 17126  // headers to the request.
 17127  func (c *SubscriptionsListCall) Header() http.Header {
 17128  	if c.header_ == nil {
 17129  		c.header_ = make(http.Header)
 17130  	}
 17131  	return c.header_
 17132  }
 17133  
 17134  func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
 17135  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17136  	if c.ifNoneMatch_ != "" {
 17137  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 17138  	}
 17139  	var body io.Reader = nil
 17140  	c.urlParams_.Set("alt", alt)
 17141  	c.urlParams_.Set("prettyPrint", "false")
 17142  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/subscriptions")
 17143  	urls += "?" + c.urlParams_.Encode()
 17144  	req, err := http.NewRequest("GET", urls, body)
 17145  	if err != nil {
 17146  		return nil, err
 17147  	}
 17148  	req.Header = reqHeaders
 17149  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17150  }
 17151  
 17152  // Do executes the "youtube.subscriptions.list" call.
 17153  // Any non-2xx status code is an error. Response headers are in either
 17154  // *SubscriptionListResponse.ServerResponse.Header or (if a response was
 17155  // returned at all) in error.(*googleapi.Error).Header. Use
 17156  // googleapi.IsNotModified to check whether the returned error was because
 17157  // http.StatusNotModified was returned.
 17158  func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*SubscriptionListResponse, error) {
 17159  	gensupport.SetOptions(c.urlParams_, opts...)
 17160  	res, err := c.doRequest("json")
 17161  	if res != nil && res.StatusCode == http.StatusNotModified {
 17162  		if res.Body != nil {
 17163  			res.Body.Close()
 17164  		}
 17165  		return nil, gensupport.WrapError(&googleapi.Error{
 17166  			Code:   res.StatusCode,
 17167  			Header: res.Header,
 17168  		})
 17169  	}
 17170  	if err != nil {
 17171  		return nil, err
 17172  	}
 17173  	defer googleapi.CloseBody(res)
 17174  	if err := googleapi.CheckResponse(res); err != nil {
 17175  		return nil, gensupport.WrapError(err)
 17176  	}
 17177  	ret := &SubscriptionListResponse{
 17178  		ServerResponse: googleapi.ServerResponse{
 17179  			Header:         res.Header,
 17180  			HTTPStatusCode: res.StatusCode,
 17181  		},
 17182  	}
 17183  	target := &ret
 17184  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17185  		return nil, err
 17186  	}
 17187  	return ret, nil
 17188  }
 17189  
 17190  // Pages invokes f for each page of results.
 17191  // A non-nil error returned from f will halt the iteration.
 17192  // The provided context supersedes any context provided to the Context method.
 17193  func (c *SubscriptionsListCall) Pages(ctx context.Context, f func(*SubscriptionListResponse) error) error {
 17194  	c.ctx_ = ctx
 17195  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 17196  	for {
 17197  		x, err := c.Do()
 17198  		if err != nil {
 17199  			return err
 17200  		}
 17201  		if err := f(x); err != nil {
 17202  			return err
 17203  		}
 17204  		if x.NextPageToken == "" {
 17205  			return nil
 17206  		}
 17207  		c.PageToken(x.NextPageToken)
 17208  	}
 17209  }
 17210  
 17211  type SuperChatEventsListCall struct {
 17212  	s            *Service
 17213  	urlParams_   gensupport.URLParams
 17214  	ifNoneMatch_ string
 17215  	ctx_         context.Context
 17216  	header_      http.Header
 17217  }
 17218  
 17219  // List: Retrieves a list of resources, possibly filtered.
 17220  //
 17221  //   - part: The *part* parameter specifies the superChatEvent resource parts
 17222  //     that the API response will include. This parameter is currently not
 17223  //     supported.
 17224  func (r *SuperChatEventsService) List(part []string) *SuperChatEventsListCall {
 17225  	c := &SuperChatEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17226  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 17227  	return c
 17228  }
 17229  
 17230  // Hl sets the optional parameter "hl": Return rendered funding amounts in
 17231  // specified language.
 17232  func (c *SuperChatEventsListCall) Hl(hl string) *SuperChatEventsListCall {
 17233  	c.urlParams_.Set("hl", hl)
 17234  	return c
 17235  }
 17236  
 17237  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 17238  // parameter specifies the maximum number of items that should be returned in
 17239  // the result set.
 17240  func (c *SuperChatEventsListCall) MaxResults(maxResults int64) *SuperChatEventsListCall {
 17241  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 17242  	return c
 17243  }
 17244  
 17245  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 17246  // identifies a specific page in the result set that should be returned. In an
 17247  // API response, the nextPageToken and prevPageToken properties identify other
 17248  // pages that could be retrieved.
 17249  func (c *SuperChatEventsListCall) PageToken(pageToken string) *SuperChatEventsListCall {
 17250  	c.urlParams_.Set("pageToken", pageToken)
 17251  	return c
 17252  }
 17253  
 17254  // Fields allows partial responses to be retrieved. See
 17255  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17256  // details.
 17257  func (c *SuperChatEventsListCall) Fields(s ...googleapi.Field) *SuperChatEventsListCall {
 17258  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17259  	return c
 17260  }
 17261  
 17262  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 17263  // object's ETag matches the given value. This is useful for getting updates
 17264  // only after the object has changed since the last request.
 17265  func (c *SuperChatEventsListCall) IfNoneMatch(entityTag string) *SuperChatEventsListCall {
 17266  	c.ifNoneMatch_ = entityTag
 17267  	return c
 17268  }
 17269  
 17270  // Context sets the context to be used in this call's Do method.
 17271  func (c *SuperChatEventsListCall) Context(ctx context.Context) *SuperChatEventsListCall {
 17272  	c.ctx_ = ctx
 17273  	return c
 17274  }
 17275  
 17276  // Header returns a http.Header that can be modified by the caller to add
 17277  // headers to the request.
 17278  func (c *SuperChatEventsListCall) Header() http.Header {
 17279  	if c.header_ == nil {
 17280  		c.header_ = make(http.Header)
 17281  	}
 17282  	return c.header_
 17283  }
 17284  
 17285  func (c *SuperChatEventsListCall) doRequest(alt string) (*http.Response, error) {
 17286  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17287  	if c.ifNoneMatch_ != "" {
 17288  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 17289  	}
 17290  	var body io.Reader = nil
 17291  	c.urlParams_.Set("alt", alt)
 17292  	c.urlParams_.Set("prettyPrint", "false")
 17293  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/superChatEvents")
 17294  	urls += "?" + c.urlParams_.Encode()
 17295  	req, err := http.NewRequest("GET", urls, body)
 17296  	if err != nil {
 17297  		return nil, err
 17298  	}
 17299  	req.Header = reqHeaders
 17300  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17301  }
 17302  
 17303  // Do executes the "youtube.superChatEvents.list" call.
 17304  // Any non-2xx status code is an error. Response headers are in either
 17305  // *SuperChatEventListResponse.ServerResponse.Header or (if a response was
 17306  // returned at all) in error.(*googleapi.Error).Header. Use
 17307  // googleapi.IsNotModified to check whether the returned error was because
 17308  // http.StatusNotModified was returned.
 17309  func (c *SuperChatEventsListCall) Do(opts ...googleapi.CallOption) (*SuperChatEventListResponse, error) {
 17310  	gensupport.SetOptions(c.urlParams_, opts...)
 17311  	res, err := c.doRequest("json")
 17312  	if res != nil && res.StatusCode == http.StatusNotModified {
 17313  		if res.Body != nil {
 17314  			res.Body.Close()
 17315  		}
 17316  		return nil, gensupport.WrapError(&googleapi.Error{
 17317  			Code:   res.StatusCode,
 17318  			Header: res.Header,
 17319  		})
 17320  	}
 17321  	if err != nil {
 17322  		return nil, err
 17323  	}
 17324  	defer googleapi.CloseBody(res)
 17325  	if err := googleapi.CheckResponse(res); err != nil {
 17326  		return nil, gensupport.WrapError(err)
 17327  	}
 17328  	ret := &SuperChatEventListResponse{
 17329  		ServerResponse: googleapi.ServerResponse{
 17330  			Header:         res.Header,
 17331  			HTTPStatusCode: res.StatusCode,
 17332  		},
 17333  	}
 17334  	target := &ret
 17335  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17336  		return nil, err
 17337  	}
 17338  	return ret, nil
 17339  }
 17340  
 17341  // Pages invokes f for each page of results.
 17342  // A non-nil error returned from f will halt the iteration.
 17343  // The provided context supersedes any context provided to the Context method.
 17344  func (c *SuperChatEventsListCall) Pages(ctx context.Context, f func(*SuperChatEventListResponse) error) error {
 17345  	c.ctx_ = ctx
 17346  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 17347  	for {
 17348  		x, err := c.Do()
 17349  		if err != nil {
 17350  			return err
 17351  		}
 17352  		if err := f(x); err != nil {
 17353  			return err
 17354  		}
 17355  		if x.NextPageToken == "" {
 17356  			return nil
 17357  		}
 17358  		c.PageToken(x.NextPageToken)
 17359  	}
 17360  }
 17361  
 17362  type TestsInsertCall struct {
 17363  	s          *Service
 17364  	testitem   *TestItem
 17365  	urlParams_ gensupport.URLParams
 17366  	ctx_       context.Context
 17367  	header_    http.Header
 17368  }
 17369  
 17370  // Insert: POST method.
 17371  //
 17372  // - part: .
 17373  func (r *TestsService) Insert(part []string, testitem *TestItem) *TestsInsertCall {
 17374  	c := &TestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17375  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 17376  	c.testitem = testitem
 17377  	return c
 17378  }
 17379  
 17380  // ExternalChannelId sets the optional parameter "externalChannelId":
 17381  func (c *TestsInsertCall) ExternalChannelId(externalChannelId string) *TestsInsertCall {
 17382  	c.urlParams_.Set("externalChannelId", externalChannelId)
 17383  	return c
 17384  }
 17385  
 17386  // Fields allows partial responses to be retrieved. See
 17387  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17388  // details.
 17389  func (c *TestsInsertCall) Fields(s ...googleapi.Field) *TestsInsertCall {
 17390  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17391  	return c
 17392  }
 17393  
 17394  // Context sets the context to be used in this call's Do method.
 17395  func (c *TestsInsertCall) Context(ctx context.Context) *TestsInsertCall {
 17396  	c.ctx_ = ctx
 17397  	return c
 17398  }
 17399  
 17400  // Header returns a http.Header that can be modified by the caller to add
 17401  // headers to the request.
 17402  func (c *TestsInsertCall) Header() http.Header {
 17403  	if c.header_ == nil {
 17404  		c.header_ = make(http.Header)
 17405  	}
 17406  	return c.header_
 17407  }
 17408  
 17409  func (c *TestsInsertCall) doRequest(alt string) (*http.Response, error) {
 17410  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17411  	var body io.Reader = nil
 17412  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testitem)
 17413  	if err != nil {
 17414  		return nil, err
 17415  	}
 17416  	c.urlParams_.Set("alt", alt)
 17417  	c.urlParams_.Set("prettyPrint", "false")
 17418  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/tests")
 17419  	urls += "?" + c.urlParams_.Encode()
 17420  	req, err := http.NewRequest("POST", urls, body)
 17421  	if err != nil {
 17422  		return nil, err
 17423  	}
 17424  	req.Header = reqHeaders
 17425  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17426  }
 17427  
 17428  // Do executes the "youtube.tests.insert" call.
 17429  // Any non-2xx status code is an error. Response headers are in either
 17430  // *TestItem.ServerResponse.Header or (if a response was returned at all) in
 17431  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17432  // whether the returned error was because http.StatusNotModified was returned.
 17433  func (c *TestsInsertCall) Do(opts ...googleapi.CallOption) (*TestItem, error) {
 17434  	gensupport.SetOptions(c.urlParams_, opts...)
 17435  	res, err := c.doRequest("json")
 17436  	if res != nil && res.StatusCode == http.StatusNotModified {
 17437  		if res.Body != nil {
 17438  			res.Body.Close()
 17439  		}
 17440  		return nil, gensupport.WrapError(&googleapi.Error{
 17441  			Code:   res.StatusCode,
 17442  			Header: res.Header,
 17443  		})
 17444  	}
 17445  	if err != nil {
 17446  		return nil, err
 17447  	}
 17448  	defer googleapi.CloseBody(res)
 17449  	if err := googleapi.CheckResponse(res); err != nil {
 17450  		return nil, gensupport.WrapError(err)
 17451  	}
 17452  	ret := &TestItem{
 17453  		ServerResponse: googleapi.ServerResponse{
 17454  			Header:         res.Header,
 17455  			HTTPStatusCode: res.StatusCode,
 17456  		},
 17457  	}
 17458  	target := &ret
 17459  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17460  		return nil, err
 17461  	}
 17462  	return ret, nil
 17463  }
 17464  
 17465  type ThirdPartyLinksDeleteCall struct {
 17466  	s          *Service
 17467  	urlParams_ gensupport.URLParams
 17468  	ctx_       context.Context
 17469  	header_    http.Header
 17470  }
 17471  
 17472  // Delete: Deletes a resource.
 17473  //
 17474  // - linkingToken: Delete the partner links with the given linking token.
 17475  // - type: Type of the link to be deleted.
 17476  func (r *ThirdPartyLinksService) Delete(linkingToken string, type_ string) *ThirdPartyLinksDeleteCall {
 17477  	c := &ThirdPartyLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17478  	c.urlParams_.Set("linkingToken", linkingToken)
 17479  	c.urlParams_.Set("type", type_)
 17480  	return c
 17481  }
 17482  
 17483  // ExternalChannelId sets the optional parameter "externalChannelId": Channel
 17484  // ID to which changes should be applied, for delegation.
 17485  func (c *ThirdPartyLinksDeleteCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksDeleteCall {
 17486  	c.urlParams_.Set("externalChannelId", externalChannelId)
 17487  	return c
 17488  }
 17489  
 17490  // Part sets the optional parameter "part": Do not use. Required for
 17491  // compatibility.
 17492  func (c *ThirdPartyLinksDeleteCall) Part(part ...string) *ThirdPartyLinksDeleteCall {
 17493  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 17494  	return c
 17495  }
 17496  
 17497  // Fields allows partial responses to be retrieved. See
 17498  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17499  // details.
 17500  func (c *ThirdPartyLinksDeleteCall) Fields(s ...googleapi.Field) *ThirdPartyLinksDeleteCall {
 17501  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17502  	return c
 17503  }
 17504  
 17505  // Context sets the context to be used in this call's Do method.
 17506  func (c *ThirdPartyLinksDeleteCall) Context(ctx context.Context) *ThirdPartyLinksDeleteCall {
 17507  	c.ctx_ = ctx
 17508  	return c
 17509  }
 17510  
 17511  // Header returns a http.Header that can be modified by the caller to add
 17512  // headers to the request.
 17513  func (c *ThirdPartyLinksDeleteCall) Header() http.Header {
 17514  	if c.header_ == nil {
 17515  		c.header_ = make(http.Header)
 17516  	}
 17517  	return c.header_
 17518  }
 17519  
 17520  func (c *ThirdPartyLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 17521  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17522  	var body io.Reader = nil
 17523  	c.urlParams_.Set("alt", alt)
 17524  	c.urlParams_.Set("prettyPrint", "false")
 17525  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
 17526  	urls += "?" + c.urlParams_.Encode()
 17527  	req, err := http.NewRequest("DELETE", urls, body)
 17528  	if err != nil {
 17529  		return nil, err
 17530  	}
 17531  	req.Header = reqHeaders
 17532  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17533  }
 17534  
 17535  // Do executes the "youtube.thirdPartyLinks.delete" call.
 17536  func (c *ThirdPartyLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
 17537  	gensupport.SetOptions(c.urlParams_, opts...)
 17538  	res, err := c.doRequest("json")
 17539  	if err != nil {
 17540  		return err
 17541  	}
 17542  	defer googleapi.CloseBody(res)
 17543  	if err := googleapi.CheckResponse(res); err != nil {
 17544  		return gensupport.WrapError(err)
 17545  	}
 17546  	return nil
 17547  }
 17548  
 17549  type ThirdPartyLinksInsertCall struct {
 17550  	s              *Service
 17551  	thirdpartylink *ThirdPartyLink
 17552  	urlParams_     gensupport.URLParams
 17553  	ctx_           context.Context
 17554  	header_        http.Header
 17555  }
 17556  
 17557  // Insert: Inserts a new resource into this collection.
 17558  //
 17559  //   - part: The *part* parameter specifies the thirdPartyLink resource parts
 17560  //     that the API request and response will include. Supported values are
 17561  //     linkingToken, status, and snippet.
 17562  func (r *ThirdPartyLinksService) Insert(part []string, thirdpartylink *ThirdPartyLink) *ThirdPartyLinksInsertCall {
 17563  	c := &ThirdPartyLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17564  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 17565  	c.thirdpartylink = thirdpartylink
 17566  	return c
 17567  }
 17568  
 17569  // ExternalChannelId sets the optional parameter "externalChannelId": Channel
 17570  // ID to which changes should be applied, for delegation.
 17571  func (c *ThirdPartyLinksInsertCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksInsertCall {
 17572  	c.urlParams_.Set("externalChannelId", externalChannelId)
 17573  	return c
 17574  }
 17575  
 17576  // Fields allows partial responses to be retrieved. See
 17577  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17578  // details.
 17579  func (c *ThirdPartyLinksInsertCall) Fields(s ...googleapi.Field) *ThirdPartyLinksInsertCall {
 17580  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17581  	return c
 17582  }
 17583  
 17584  // Context sets the context to be used in this call's Do method.
 17585  func (c *ThirdPartyLinksInsertCall) Context(ctx context.Context) *ThirdPartyLinksInsertCall {
 17586  	c.ctx_ = ctx
 17587  	return c
 17588  }
 17589  
 17590  // Header returns a http.Header that can be modified by the caller to add
 17591  // headers to the request.
 17592  func (c *ThirdPartyLinksInsertCall) Header() http.Header {
 17593  	if c.header_ == nil {
 17594  		c.header_ = make(http.Header)
 17595  	}
 17596  	return c.header_
 17597  }
 17598  
 17599  func (c *ThirdPartyLinksInsertCall) doRequest(alt string) (*http.Response, error) {
 17600  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17601  	var body io.Reader = nil
 17602  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.thirdpartylink)
 17603  	if err != nil {
 17604  		return nil, err
 17605  	}
 17606  	c.urlParams_.Set("alt", alt)
 17607  	c.urlParams_.Set("prettyPrint", "false")
 17608  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
 17609  	urls += "?" + c.urlParams_.Encode()
 17610  	req, err := http.NewRequest("POST", urls, body)
 17611  	if err != nil {
 17612  		return nil, err
 17613  	}
 17614  	req.Header = reqHeaders
 17615  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17616  }
 17617  
 17618  // Do executes the "youtube.thirdPartyLinks.insert" call.
 17619  // Any non-2xx status code is an error. Response headers are in either
 17620  // *ThirdPartyLink.ServerResponse.Header or (if a response was returned at all)
 17621  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17622  // whether the returned error was because http.StatusNotModified was returned.
 17623  func (c *ThirdPartyLinksInsertCall) Do(opts ...googleapi.CallOption) (*ThirdPartyLink, error) {
 17624  	gensupport.SetOptions(c.urlParams_, opts...)
 17625  	res, err := c.doRequest("json")
 17626  	if res != nil && res.StatusCode == http.StatusNotModified {
 17627  		if res.Body != nil {
 17628  			res.Body.Close()
 17629  		}
 17630  		return nil, gensupport.WrapError(&googleapi.Error{
 17631  			Code:   res.StatusCode,
 17632  			Header: res.Header,
 17633  		})
 17634  	}
 17635  	if err != nil {
 17636  		return nil, err
 17637  	}
 17638  	defer googleapi.CloseBody(res)
 17639  	if err := googleapi.CheckResponse(res); err != nil {
 17640  		return nil, gensupport.WrapError(err)
 17641  	}
 17642  	ret := &ThirdPartyLink{
 17643  		ServerResponse: googleapi.ServerResponse{
 17644  			Header:         res.Header,
 17645  			HTTPStatusCode: res.StatusCode,
 17646  		},
 17647  	}
 17648  	target := &ret
 17649  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17650  		return nil, err
 17651  	}
 17652  	return ret, nil
 17653  }
 17654  
 17655  type ThirdPartyLinksListCall struct {
 17656  	s            *Service
 17657  	urlParams_   gensupport.URLParams
 17658  	ifNoneMatch_ string
 17659  	ctx_         context.Context
 17660  	header_      http.Header
 17661  }
 17662  
 17663  // List: Retrieves a list of resources, possibly filtered.
 17664  //
 17665  //   - part: The *part* parameter specifies the thirdPartyLink resource parts
 17666  //     that the API response will include. Supported values are linkingToken,
 17667  //     status, and snippet.
 17668  func (r *ThirdPartyLinksService) List(part []string) *ThirdPartyLinksListCall {
 17669  	c := &ThirdPartyLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17670  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 17671  	return c
 17672  }
 17673  
 17674  // ExternalChannelId sets the optional parameter "externalChannelId": Channel
 17675  // ID to which changes should be applied, for delegation.
 17676  func (c *ThirdPartyLinksListCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksListCall {
 17677  	c.urlParams_.Set("externalChannelId", externalChannelId)
 17678  	return c
 17679  }
 17680  
 17681  // LinkingToken sets the optional parameter "linkingToken": Get a third party
 17682  // link with the given linking token.
 17683  func (c *ThirdPartyLinksListCall) LinkingToken(linkingToken string) *ThirdPartyLinksListCall {
 17684  	c.urlParams_.Set("linkingToken", linkingToken)
 17685  	return c
 17686  }
 17687  
 17688  // Type sets the optional parameter "type": Get a third party link of the given
 17689  // type.
 17690  //
 17691  // Possible values:
 17692  //
 17693  //	"linkUnspecified"
 17694  //	"channelToStoreLink" - A link that is connecting (or about to connect) a
 17695  //
 17696  // channel with a store on a merchandising platform in order to enable retail
 17697  // commerce capabilities for that channel on YouTube.
 17698  func (c *ThirdPartyLinksListCall) Type(type_ string) *ThirdPartyLinksListCall {
 17699  	c.urlParams_.Set("type", type_)
 17700  	return c
 17701  }
 17702  
 17703  // Fields allows partial responses to be retrieved. See
 17704  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17705  // details.
 17706  func (c *ThirdPartyLinksListCall) Fields(s ...googleapi.Field) *ThirdPartyLinksListCall {
 17707  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17708  	return c
 17709  }
 17710  
 17711  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 17712  // object's ETag matches the given value. This is useful for getting updates
 17713  // only after the object has changed since the last request.
 17714  func (c *ThirdPartyLinksListCall) IfNoneMatch(entityTag string) *ThirdPartyLinksListCall {
 17715  	c.ifNoneMatch_ = entityTag
 17716  	return c
 17717  }
 17718  
 17719  // Context sets the context to be used in this call's Do method.
 17720  func (c *ThirdPartyLinksListCall) Context(ctx context.Context) *ThirdPartyLinksListCall {
 17721  	c.ctx_ = ctx
 17722  	return c
 17723  }
 17724  
 17725  // Header returns a http.Header that can be modified by the caller to add
 17726  // headers to the request.
 17727  func (c *ThirdPartyLinksListCall) Header() http.Header {
 17728  	if c.header_ == nil {
 17729  		c.header_ = make(http.Header)
 17730  	}
 17731  	return c.header_
 17732  }
 17733  
 17734  func (c *ThirdPartyLinksListCall) doRequest(alt string) (*http.Response, error) {
 17735  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17736  	if c.ifNoneMatch_ != "" {
 17737  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 17738  	}
 17739  	var body io.Reader = nil
 17740  	c.urlParams_.Set("alt", alt)
 17741  	c.urlParams_.Set("prettyPrint", "false")
 17742  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
 17743  	urls += "?" + c.urlParams_.Encode()
 17744  	req, err := http.NewRequest("GET", urls, body)
 17745  	if err != nil {
 17746  		return nil, err
 17747  	}
 17748  	req.Header = reqHeaders
 17749  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17750  }
 17751  
 17752  // Do executes the "youtube.thirdPartyLinks.list" call.
 17753  // Any non-2xx status code is an error. Response headers are in either
 17754  // *ThirdPartyLinkListResponse.ServerResponse.Header or (if a response was
 17755  // returned at all) in error.(*googleapi.Error).Header. Use
 17756  // googleapi.IsNotModified to check whether the returned error was because
 17757  // http.StatusNotModified was returned.
 17758  func (c *ThirdPartyLinksListCall) Do(opts ...googleapi.CallOption) (*ThirdPartyLinkListResponse, error) {
 17759  	gensupport.SetOptions(c.urlParams_, opts...)
 17760  	res, err := c.doRequest("json")
 17761  	if res != nil && res.StatusCode == http.StatusNotModified {
 17762  		if res.Body != nil {
 17763  			res.Body.Close()
 17764  		}
 17765  		return nil, gensupport.WrapError(&googleapi.Error{
 17766  			Code:   res.StatusCode,
 17767  			Header: res.Header,
 17768  		})
 17769  	}
 17770  	if err != nil {
 17771  		return nil, err
 17772  	}
 17773  	defer googleapi.CloseBody(res)
 17774  	if err := googleapi.CheckResponse(res); err != nil {
 17775  		return nil, gensupport.WrapError(err)
 17776  	}
 17777  	ret := &ThirdPartyLinkListResponse{
 17778  		ServerResponse: googleapi.ServerResponse{
 17779  			Header:         res.Header,
 17780  			HTTPStatusCode: res.StatusCode,
 17781  		},
 17782  	}
 17783  	target := &ret
 17784  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17785  		return nil, err
 17786  	}
 17787  	return ret, nil
 17788  }
 17789  
 17790  type ThirdPartyLinksUpdateCall struct {
 17791  	s              *Service
 17792  	thirdpartylink *ThirdPartyLink
 17793  	urlParams_     gensupport.URLParams
 17794  	ctx_           context.Context
 17795  	header_        http.Header
 17796  }
 17797  
 17798  // Update: Updates an existing resource.
 17799  //
 17800  //   - part: The *part* parameter specifies the thirdPartyLink resource parts
 17801  //     that the API request and response will include. Supported values are
 17802  //     linkingToken, status, and snippet.
 17803  func (r *ThirdPartyLinksService) Update(part []string, thirdpartylink *ThirdPartyLink) *ThirdPartyLinksUpdateCall {
 17804  	c := &ThirdPartyLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17805  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 17806  	c.thirdpartylink = thirdpartylink
 17807  	return c
 17808  }
 17809  
 17810  // ExternalChannelId sets the optional parameter "externalChannelId": Channel
 17811  // ID to which changes should be applied, for delegation.
 17812  func (c *ThirdPartyLinksUpdateCall) ExternalChannelId(externalChannelId string) *ThirdPartyLinksUpdateCall {
 17813  	c.urlParams_.Set("externalChannelId", externalChannelId)
 17814  	return c
 17815  }
 17816  
 17817  // Fields allows partial responses to be retrieved. See
 17818  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17819  // details.
 17820  func (c *ThirdPartyLinksUpdateCall) Fields(s ...googleapi.Field) *ThirdPartyLinksUpdateCall {
 17821  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17822  	return c
 17823  }
 17824  
 17825  // Context sets the context to be used in this call's Do method.
 17826  func (c *ThirdPartyLinksUpdateCall) Context(ctx context.Context) *ThirdPartyLinksUpdateCall {
 17827  	c.ctx_ = ctx
 17828  	return c
 17829  }
 17830  
 17831  // Header returns a http.Header that can be modified by the caller to add
 17832  // headers to the request.
 17833  func (c *ThirdPartyLinksUpdateCall) Header() http.Header {
 17834  	if c.header_ == nil {
 17835  		c.header_ = make(http.Header)
 17836  	}
 17837  	return c.header_
 17838  }
 17839  
 17840  func (c *ThirdPartyLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 17841  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17842  	var body io.Reader = nil
 17843  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.thirdpartylink)
 17844  	if err != nil {
 17845  		return nil, err
 17846  	}
 17847  	c.urlParams_.Set("alt", alt)
 17848  	c.urlParams_.Set("prettyPrint", "false")
 17849  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thirdPartyLinks")
 17850  	urls += "?" + c.urlParams_.Encode()
 17851  	req, err := http.NewRequest("PUT", urls, body)
 17852  	if err != nil {
 17853  		return nil, err
 17854  	}
 17855  	req.Header = reqHeaders
 17856  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17857  }
 17858  
 17859  // Do executes the "youtube.thirdPartyLinks.update" call.
 17860  // Any non-2xx status code is an error. Response headers are in either
 17861  // *ThirdPartyLink.ServerResponse.Header or (if a response was returned at all)
 17862  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17863  // whether the returned error was because http.StatusNotModified was returned.
 17864  func (c *ThirdPartyLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ThirdPartyLink, error) {
 17865  	gensupport.SetOptions(c.urlParams_, opts...)
 17866  	res, err := c.doRequest("json")
 17867  	if res != nil && res.StatusCode == http.StatusNotModified {
 17868  		if res.Body != nil {
 17869  			res.Body.Close()
 17870  		}
 17871  		return nil, gensupport.WrapError(&googleapi.Error{
 17872  			Code:   res.StatusCode,
 17873  			Header: res.Header,
 17874  		})
 17875  	}
 17876  	if err != nil {
 17877  		return nil, err
 17878  	}
 17879  	defer googleapi.CloseBody(res)
 17880  	if err := googleapi.CheckResponse(res); err != nil {
 17881  		return nil, gensupport.WrapError(err)
 17882  	}
 17883  	ret := &ThirdPartyLink{
 17884  		ServerResponse: googleapi.ServerResponse{
 17885  			Header:         res.Header,
 17886  			HTTPStatusCode: res.StatusCode,
 17887  		},
 17888  	}
 17889  	target := &ret
 17890  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17891  		return nil, err
 17892  	}
 17893  	return ret, nil
 17894  }
 17895  
 17896  type ThumbnailsSetCall struct {
 17897  	s          *Service
 17898  	urlParams_ gensupport.URLParams
 17899  	mediaInfo_ *gensupport.MediaInfo
 17900  	ctx_       context.Context
 17901  	header_    http.Header
 17902  }
 17903  
 17904  // Set: As this is not an insert in a strict sense (it supports
 17905  // uploading/setting of a thumbnail for multiple videos, which doesn't result
 17906  // in creation of a single resource), I use a custom verb here.
 17907  //
 17908  //   - videoId: Returns the Thumbnail with the given video IDs for Stubby or
 17909  //     Apiary.
 17910  func (r *ThumbnailsService) Set(videoId string) *ThumbnailsSetCall {
 17911  	c := &ThumbnailsSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17912  	c.urlParams_.Set("videoId", videoId)
 17913  	return c
 17914  }
 17915  
 17916  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 17917  // *Note:* This parameter is intended exclusively for YouTube content partners.
 17918  // The *onBehalfOfContentOwner* parameter indicates that the request's
 17919  // authorization credentials identify a YouTube CMS user who is acting on
 17920  // behalf of the content owner specified in the parameter value. This parameter
 17921  // is intended for YouTube content partners that own and manage many different
 17922  // YouTube channels. It allows content owners to authenticate once and get
 17923  // access to all their video and channel data, without having to provide
 17924  // authentication credentials for each individual channel. The actual CMS
 17925  // account that the user authenticates with must be linked to the specified
 17926  // YouTube content owner.
 17927  func (c *ThumbnailsSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ThumbnailsSetCall {
 17928  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 17929  	return c
 17930  }
 17931  
 17932  // Media specifies the media to upload in one or more chunks. The chunk size
 17933  // may be controlled by supplying a MediaOption generated by
 17934  // googleapi.ChunkSize. The chunk size defaults to
 17935  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
 17936  // request will be determined by sniffing the contents of r, unless a
 17937  // MediaOption generated by googleapi.ContentType is supplied.
 17938  // At most one of Media and ResumableMedia may be set.
 17939  func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *ThumbnailsSetCall {
 17940  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
 17941  	return c
 17942  }
 17943  
 17944  // ResumableMedia specifies the media to upload in chunks and can be canceled
 17945  // with ctx.
 17946  //
 17947  // Deprecated: use Media instead.
 17948  //
 17949  // At most one of Media and ResumableMedia may be set. mediaType identifies the
 17950  // MIME media type of the upload, such as "image/png". If mediaType is "", it
 17951  // will be auto-detected. The provided ctx will supersede any context
 17952  // previously provided to the Context method.
 17953  func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ThumbnailsSetCall {
 17954  	c.ctx_ = ctx
 17955  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
 17956  	return c
 17957  }
 17958  
 17959  // ProgressUpdater provides a callback function that will be called after every
 17960  // chunk. It should be a low-latency function in order to not slow down the
 17961  // upload operation. This should only be called when using ResumableMedia (as
 17962  // opposed to Media).
 17963  func (c *ThumbnailsSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ThumbnailsSetCall {
 17964  	c.mediaInfo_.SetProgressUpdater(pu)
 17965  	return c
 17966  }
 17967  
 17968  // Fields allows partial responses to be retrieved. See
 17969  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17970  // details.
 17971  func (c *ThumbnailsSetCall) Fields(s ...googleapi.Field) *ThumbnailsSetCall {
 17972  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17973  	return c
 17974  }
 17975  
 17976  // Context sets the context to be used in this call's Do method.
 17977  // This context will supersede any context previously provided to the
 17978  // ResumableMedia method.
 17979  func (c *ThumbnailsSetCall) Context(ctx context.Context) *ThumbnailsSetCall {
 17980  	c.ctx_ = ctx
 17981  	return c
 17982  }
 17983  
 17984  // Header returns a http.Header that can be modified by the caller to add
 17985  // headers to the request.
 17986  func (c *ThumbnailsSetCall) Header() http.Header {
 17987  	if c.header_ == nil {
 17988  		c.header_ = make(http.Header)
 17989  	}
 17990  	return c.header_
 17991  }
 17992  
 17993  func (c *ThumbnailsSetCall) doRequest(alt string) (*http.Response, error) {
 17994  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17995  	var body io.Reader = nil
 17996  	c.urlParams_.Set("alt", alt)
 17997  	c.urlParams_.Set("prettyPrint", "false")
 17998  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/thumbnails/set")
 17999  	if c.mediaInfo_ != nil {
 18000  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/thumbnails/set")
 18001  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
 18002  	}
 18003  	if body == nil {
 18004  		body = new(bytes.Buffer)
 18005  		reqHeaders.Set("Content-Type", "application/json")
 18006  	}
 18007  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
 18008  	defer cleanup()
 18009  	urls += "?" + c.urlParams_.Encode()
 18010  	req, err := http.NewRequest("POST", urls, body)
 18011  	if err != nil {
 18012  		return nil, err
 18013  	}
 18014  	req.Header = reqHeaders
 18015  	req.GetBody = getBody
 18016  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18017  }
 18018  
 18019  // Do executes the "youtube.thumbnails.set" call.
 18020  // Any non-2xx status code is an error. Response headers are in either
 18021  // *ThumbnailSetResponse.ServerResponse.Header or (if a response was returned
 18022  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 18023  // check whether the returned error was because http.StatusNotModified was
 18024  // returned.
 18025  func (c *ThumbnailsSetCall) Do(opts ...googleapi.CallOption) (*ThumbnailSetResponse, error) {
 18026  	gensupport.SetOptions(c.urlParams_, opts...)
 18027  	res, err := c.doRequest("json")
 18028  	if res != nil && res.StatusCode == http.StatusNotModified {
 18029  		if res.Body != nil {
 18030  			res.Body.Close()
 18031  		}
 18032  		return nil, gensupport.WrapError(&googleapi.Error{
 18033  			Code:   res.StatusCode,
 18034  			Header: res.Header,
 18035  		})
 18036  	}
 18037  	if err != nil {
 18038  		return nil, err
 18039  	}
 18040  	defer googleapi.CloseBody(res)
 18041  	if err := googleapi.CheckResponse(res); err != nil {
 18042  		return nil, gensupport.WrapError(err)
 18043  	}
 18044  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
 18045  	if rx != nil {
 18046  		rx.Client = c.s.client
 18047  		rx.UserAgent = c.s.userAgent()
 18048  		ctx := c.ctx_
 18049  		if ctx == nil {
 18050  			ctx = context.TODO()
 18051  		}
 18052  		res, err = rx.Upload(ctx)
 18053  		if err != nil {
 18054  			return nil, err
 18055  		}
 18056  		defer res.Body.Close()
 18057  		if err := googleapi.CheckResponse(res); err != nil {
 18058  			return nil, gensupport.WrapError(err)
 18059  		}
 18060  	}
 18061  	ret := &ThumbnailSetResponse{
 18062  		ServerResponse: googleapi.ServerResponse{
 18063  			Header:         res.Header,
 18064  			HTTPStatusCode: res.StatusCode,
 18065  		},
 18066  	}
 18067  	target := &ret
 18068  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18069  		return nil, err
 18070  	}
 18071  	return ret, nil
 18072  }
 18073  
 18074  type VideoAbuseReportReasonsListCall struct {
 18075  	s            *Service
 18076  	urlParams_   gensupport.URLParams
 18077  	ifNoneMatch_ string
 18078  	ctx_         context.Context
 18079  	header_      http.Header
 18080  }
 18081  
 18082  // List: Retrieves a list of resources, possibly filtered.
 18083  //
 18084  //   - part: The *part* parameter specifies the videoCategory resource parts that
 18085  //     the API response will include. Supported values are id and snippet.
 18086  func (r *VideoAbuseReportReasonsService) List(part []string) *VideoAbuseReportReasonsListCall {
 18087  	c := &VideoAbuseReportReasonsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18088  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 18089  	return c
 18090  }
 18091  
 18092  // Hl sets the optional parameter "hl":
 18093  func (c *VideoAbuseReportReasonsListCall) Hl(hl string) *VideoAbuseReportReasonsListCall {
 18094  	c.urlParams_.Set("hl", hl)
 18095  	return c
 18096  }
 18097  
 18098  // Fields allows partial responses to be retrieved. See
 18099  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18100  // details.
 18101  func (c *VideoAbuseReportReasonsListCall) Fields(s ...googleapi.Field) *VideoAbuseReportReasonsListCall {
 18102  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18103  	return c
 18104  }
 18105  
 18106  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18107  // object's ETag matches the given value. This is useful for getting updates
 18108  // only after the object has changed since the last request.
 18109  func (c *VideoAbuseReportReasonsListCall) IfNoneMatch(entityTag string) *VideoAbuseReportReasonsListCall {
 18110  	c.ifNoneMatch_ = entityTag
 18111  	return c
 18112  }
 18113  
 18114  // Context sets the context to be used in this call's Do method.
 18115  func (c *VideoAbuseReportReasonsListCall) Context(ctx context.Context) *VideoAbuseReportReasonsListCall {
 18116  	c.ctx_ = ctx
 18117  	return c
 18118  }
 18119  
 18120  // Header returns a http.Header that can be modified by the caller to add
 18121  // headers to the request.
 18122  func (c *VideoAbuseReportReasonsListCall) Header() http.Header {
 18123  	if c.header_ == nil {
 18124  		c.header_ = make(http.Header)
 18125  	}
 18126  	return c.header_
 18127  }
 18128  
 18129  func (c *VideoAbuseReportReasonsListCall) doRequest(alt string) (*http.Response, error) {
 18130  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18131  	if c.ifNoneMatch_ != "" {
 18132  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18133  	}
 18134  	var body io.Reader = nil
 18135  	c.urlParams_.Set("alt", alt)
 18136  	c.urlParams_.Set("prettyPrint", "false")
 18137  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videoAbuseReportReasons")
 18138  	urls += "?" + c.urlParams_.Encode()
 18139  	req, err := http.NewRequest("GET", urls, body)
 18140  	if err != nil {
 18141  		return nil, err
 18142  	}
 18143  	req.Header = reqHeaders
 18144  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18145  }
 18146  
 18147  // Do executes the "youtube.videoAbuseReportReasons.list" call.
 18148  // Any non-2xx status code is an error. Response headers are in either
 18149  // *VideoAbuseReportReasonListResponse.ServerResponse.Header or (if a response
 18150  // was returned at all) in error.(*googleapi.Error).Header. Use
 18151  // googleapi.IsNotModified to check whether the returned error was because
 18152  // http.StatusNotModified was returned.
 18153  func (c *VideoAbuseReportReasonsListCall) Do(opts ...googleapi.CallOption) (*VideoAbuseReportReasonListResponse, error) {
 18154  	gensupport.SetOptions(c.urlParams_, opts...)
 18155  	res, err := c.doRequest("json")
 18156  	if res != nil && res.StatusCode == http.StatusNotModified {
 18157  		if res.Body != nil {
 18158  			res.Body.Close()
 18159  		}
 18160  		return nil, gensupport.WrapError(&googleapi.Error{
 18161  			Code:   res.StatusCode,
 18162  			Header: res.Header,
 18163  		})
 18164  	}
 18165  	if err != nil {
 18166  		return nil, err
 18167  	}
 18168  	defer googleapi.CloseBody(res)
 18169  	if err := googleapi.CheckResponse(res); err != nil {
 18170  		return nil, gensupport.WrapError(err)
 18171  	}
 18172  	ret := &VideoAbuseReportReasonListResponse{
 18173  		ServerResponse: googleapi.ServerResponse{
 18174  			Header:         res.Header,
 18175  			HTTPStatusCode: res.StatusCode,
 18176  		},
 18177  	}
 18178  	target := &ret
 18179  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18180  		return nil, err
 18181  	}
 18182  	return ret, nil
 18183  }
 18184  
 18185  type VideoCategoriesListCall struct {
 18186  	s            *Service
 18187  	urlParams_   gensupport.URLParams
 18188  	ifNoneMatch_ string
 18189  	ctx_         context.Context
 18190  	header_      http.Header
 18191  }
 18192  
 18193  // List: Retrieves a list of resources, possibly filtered.
 18194  //
 18195  //   - part: The *part* parameter specifies the videoCategory resource properties
 18196  //     that the API response will include. Set the parameter value to snippet.
 18197  func (r *VideoCategoriesService) List(part []string) *VideoCategoriesListCall {
 18198  	c := &VideoCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18199  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 18200  	return c
 18201  }
 18202  
 18203  // Hl sets the optional parameter "hl":
 18204  func (c *VideoCategoriesListCall) Hl(hl string) *VideoCategoriesListCall {
 18205  	c.urlParams_.Set("hl", hl)
 18206  	return c
 18207  }
 18208  
 18209  // Id sets the optional parameter "id": Returns the video categories with the
 18210  // given IDs for Stubby or Apiary.
 18211  func (c *VideoCategoriesListCall) Id(id ...string) *VideoCategoriesListCall {
 18212  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 18213  	return c
 18214  }
 18215  
 18216  // RegionCode sets the optional parameter "regionCode":
 18217  func (c *VideoCategoriesListCall) RegionCode(regionCode string) *VideoCategoriesListCall {
 18218  	c.urlParams_.Set("regionCode", regionCode)
 18219  	return c
 18220  }
 18221  
 18222  // Fields allows partial responses to be retrieved. See
 18223  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18224  // details.
 18225  func (c *VideoCategoriesListCall) Fields(s ...googleapi.Field) *VideoCategoriesListCall {
 18226  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18227  	return c
 18228  }
 18229  
 18230  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18231  // object's ETag matches the given value. This is useful for getting updates
 18232  // only after the object has changed since the last request.
 18233  func (c *VideoCategoriesListCall) IfNoneMatch(entityTag string) *VideoCategoriesListCall {
 18234  	c.ifNoneMatch_ = entityTag
 18235  	return c
 18236  }
 18237  
 18238  // Context sets the context to be used in this call's Do method.
 18239  func (c *VideoCategoriesListCall) Context(ctx context.Context) *VideoCategoriesListCall {
 18240  	c.ctx_ = ctx
 18241  	return c
 18242  }
 18243  
 18244  // Header returns a http.Header that can be modified by the caller to add
 18245  // headers to the request.
 18246  func (c *VideoCategoriesListCall) Header() http.Header {
 18247  	if c.header_ == nil {
 18248  		c.header_ = make(http.Header)
 18249  	}
 18250  	return c.header_
 18251  }
 18252  
 18253  func (c *VideoCategoriesListCall) doRequest(alt string) (*http.Response, error) {
 18254  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18255  	if c.ifNoneMatch_ != "" {
 18256  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18257  	}
 18258  	var body io.Reader = nil
 18259  	c.urlParams_.Set("alt", alt)
 18260  	c.urlParams_.Set("prettyPrint", "false")
 18261  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videoCategories")
 18262  	urls += "?" + c.urlParams_.Encode()
 18263  	req, err := http.NewRequest("GET", urls, body)
 18264  	if err != nil {
 18265  		return nil, err
 18266  	}
 18267  	req.Header = reqHeaders
 18268  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18269  }
 18270  
 18271  // Do executes the "youtube.videoCategories.list" call.
 18272  // Any non-2xx status code is an error. Response headers are in either
 18273  // *VideoCategoryListResponse.ServerResponse.Header or (if a response was
 18274  // returned at all) in error.(*googleapi.Error).Header. Use
 18275  // googleapi.IsNotModified to check whether the returned error was because
 18276  // http.StatusNotModified was returned.
 18277  func (c *VideoCategoriesListCall) Do(opts ...googleapi.CallOption) (*VideoCategoryListResponse, error) {
 18278  	gensupport.SetOptions(c.urlParams_, opts...)
 18279  	res, err := c.doRequest("json")
 18280  	if res != nil && res.StatusCode == http.StatusNotModified {
 18281  		if res.Body != nil {
 18282  			res.Body.Close()
 18283  		}
 18284  		return nil, gensupport.WrapError(&googleapi.Error{
 18285  			Code:   res.StatusCode,
 18286  			Header: res.Header,
 18287  		})
 18288  	}
 18289  	if err != nil {
 18290  		return nil, err
 18291  	}
 18292  	defer googleapi.CloseBody(res)
 18293  	if err := googleapi.CheckResponse(res); err != nil {
 18294  		return nil, gensupport.WrapError(err)
 18295  	}
 18296  	ret := &VideoCategoryListResponse{
 18297  		ServerResponse: googleapi.ServerResponse{
 18298  			Header:         res.Header,
 18299  			HTTPStatusCode: res.StatusCode,
 18300  		},
 18301  	}
 18302  	target := &ret
 18303  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18304  		return nil, err
 18305  	}
 18306  	return ret, nil
 18307  }
 18308  
 18309  type VideosDeleteCall struct {
 18310  	s          *Service
 18311  	urlParams_ gensupport.URLParams
 18312  	ctx_       context.Context
 18313  	header_    http.Header
 18314  }
 18315  
 18316  // Delete: Deletes a resource.
 18317  //
 18318  // - id: .
 18319  func (r *VideosService) Delete(id string) *VideosDeleteCall {
 18320  	c := &VideosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18321  	c.urlParams_.Set("id", id)
 18322  	return c
 18323  }
 18324  
 18325  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 18326  // *Note:* This parameter is intended exclusively for YouTube content partners.
 18327  // The *onBehalfOfContentOwner* parameter indicates that the request's
 18328  // authorization credentials identify a YouTube CMS user who is acting on
 18329  // behalf of the content owner specified in the parameter value. This parameter
 18330  // is intended for YouTube content partners that own and manage many different
 18331  // YouTube channels. It allows content owners to authenticate once and get
 18332  // access to all their video and channel data, without having to provide
 18333  // authentication credentials for each individual channel. The actual CMS
 18334  // account that the user authenticates with must be linked to the specified
 18335  // YouTube content owner.
 18336  func (c *VideosDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosDeleteCall {
 18337  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 18338  	return c
 18339  }
 18340  
 18341  // Fields allows partial responses to be retrieved. See
 18342  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18343  // details.
 18344  func (c *VideosDeleteCall) Fields(s ...googleapi.Field) *VideosDeleteCall {
 18345  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18346  	return c
 18347  }
 18348  
 18349  // Context sets the context to be used in this call's Do method.
 18350  func (c *VideosDeleteCall) Context(ctx context.Context) *VideosDeleteCall {
 18351  	c.ctx_ = ctx
 18352  	return c
 18353  }
 18354  
 18355  // Header returns a http.Header that can be modified by the caller to add
 18356  // headers to the request.
 18357  func (c *VideosDeleteCall) Header() http.Header {
 18358  	if c.header_ == nil {
 18359  		c.header_ = make(http.Header)
 18360  	}
 18361  	return c.header_
 18362  }
 18363  
 18364  func (c *VideosDeleteCall) doRequest(alt string) (*http.Response, error) {
 18365  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18366  	var body io.Reader = nil
 18367  	c.urlParams_.Set("alt", alt)
 18368  	c.urlParams_.Set("prettyPrint", "false")
 18369  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
 18370  	urls += "?" + c.urlParams_.Encode()
 18371  	req, err := http.NewRequest("DELETE", urls, body)
 18372  	if err != nil {
 18373  		return nil, err
 18374  	}
 18375  	req.Header = reqHeaders
 18376  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18377  }
 18378  
 18379  // Do executes the "youtube.videos.delete" call.
 18380  func (c *VideosDeleteCall) Do(opts ...googleapi.CallOption) error {
 18381  	gensupport.SetOptions(c.urlParams_, opts...)
 18382  	res, err := c.doRequest("json")
 18383  	if err != nil {
 18384  		return err
 18385  	}
 18386  	defer googleapi.CloseBody(res)
 18387  	if err := googleapi.CheckResponse(res); err != nil {
 18388  		return gensupport.WrapError(err)
 18389  	}
 18390  	return nil
 18391  }
 18392  
 18393  type VideosGetRatingCall struct {
 18394  	s            *Service
 18395  	urlParams_   gensupport.URLParams
 18396  	ifNoneMatch_ string
 18397  	ctx_         context.Context
 18398  	header_      http.Header
 18399  }
 18400  
 18401  // GetRating: Retrieves the ratings that the authorized user gave to a list of
 18402  // specified videos.
 18403  //
 18404  // - id: .
 18405  func (r *VideosService) GetRating(id []string) *VideosGetRatingCall {
 18406  	c := &VideosGetRatingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18407  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 18408  	return c
 18409  }
 18410  
 18411  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 18412  // *Note:* This parameter is intended exclusively for YouTube content partners.
 18413  // The *onBehalfOfContentOwner* parameter indicates that the request's
 18414  // authorization credentials identify a YouTube CMS user who is acting on
 18415  // behalf of the content owner specified in the parameter value. This parameter
 18416  // is intended for YouTube content partners that own and manage many different
 18417  // YouTube channels. It allows content owners to authenticate once and get
 18418  // access to all their video and channel data, without having to provide
 18419  // authentication credentials for each individual channel. The CMS account that
 18420  // the user authenticates with must be linked to the specified YouTube content
 18421  // owner.
 18422  func (c *VideosGetRatingCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosGetRatingCall {
 18423  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 18424  	return c
 18425  }
 18426  
 18427  // Fields allows partial responses to be retrieved. See
 18428  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18429  // details.
 18430  func (c *VideosGetRatingCall) Fields(s ...googleapi.Field) *VideosGetRatingCall {
 18431  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18432  	return c
 18433  }
 18434  
 18435  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18436  // object's ETag matches the given value. This is useful for getting updates
 18437  // only after the object has changed since the last request.
 18438  func (c *VideosGetRatingCall) IfNoneMatch(entityTag string) *VideosGetRatingCall {
 18439  	c.ifNoneMatch_ = entityTag
 18440  	return c
 18441  }
 18442  
 18443  // Context sets the context to be used in this call's Do method.
 18444  func (c *VideosGetRatingCall) Context(ctx context.Context) *VideosGetRatingCall {
 18445  	c.ctx_ = ctx
 18446  	return c
 18447  }
 18448  
 18449  // Header returns a http.Header that can be modified by the caller to add
 18450  // headers to the request.
 18451  func (c *VideosGetRatingCall) Header() http.Header {
 18452  	if c.header_ == nil {
 18453  		c.header_ = make(http.Header)
 18454  	}
 18455  	return c.header_
 18456  }
 18457  
 18458  func (c *VideosGetRatingCall) doRequest(alt string) (*http.Response, error) {
 18459  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18460  	if c.ifNoneMatch_ != "" {
 18461  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18462  	}
 18463  	var body io.Reader = nil
 18464  	c.urlParams_.Set("alt", alt)
 18465  	c.urlParams_.Set("prettyPrint", "false")
 18466  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos/getRating")
 18467  	urls += "?" + c.urlParams_.Encode()
 18468  	req, err := http.NewRequest("GET", urls, body)
 18469  	if err != nil {
 18470  		return nil, err
 18471  	}
 18472  	req.Header = reqHeaders
 18473  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18474  }
 18475  
 18476  // Do executes the "youtube.videos.getRating" call.
 18477  // Any non-2xx status code is an error. Response headers are in either
 18478  // *VideoGetRatingResponse.ServerResponse.Header or (if a response was returned
 18479  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 18480  // check whether the returned error was because http.StatusNotModified was
 18481  // returned.
 18482  func (c *VideosGetRatingCall) Do(opts ...googleapi.CallOption) (*VideoGetRatingResponse, error) {
 18483  	gensupport.SetOptions(c.urlParams_, opts...)
 18484  	res, err := c.doRequest("json")
 18485  	if res != nil && res.StatusCode == http.StatusNotModified {
 18486  		if res.Body != nil {
 18487  			res.Body.Close()
 18488  		}
 18489  		return nil, gensupport.WrapError(&googleapi.Error{
 18490  			Code:   res.StatusCode,
 18491  			Header: res.Header,
 18492  		})
 18493  	}
 18494  	if err != nil {
 18495  		return nil, err
 18496  	}
 18497  	defer googleapi.CloseBody(res)
 18498  	if err := googleapi.CheckResponse(res); err != nil {
 18499  		return nil, gensupport.WrapError(err)
 18500  	}
 18501  	ret := &VideoGetRatingResponse{
 18502  		ServerResponse: googleapi.ServerResponse{
 18503  			Header:         res.Header,
 18504  			HTTPStatusCode: res.StatusCode,
 18505  		},
 18506  	}
 18507  	target := &ret
 18508  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18509  		return nil, err
 18510  	}
 18511  	return ret, nil
 18512  }
 18513  
 18514  type VideosInsertCall struct {
 18515  	s          *Service
 18516  	video      *Video
 18517  	urlParams_ gensupport.URLParams
 18518  	mediaInfo_ *gensupport.MediaInfo
 18519  	ctx_       context.Context
 18520  	header_    http.Header
 18521  }
 18522  
 18523  // Insert: Inserts a new resource into this collection.
 18524  //
 18525  //   - part: The *part* parameter serves two purposes in this operation. It
 18526  //     identifies the properties that the write operation will set as well as the
 18527  //     properties that the API response will include. Note that not all parts
 18528  //     contain properties that can be set when inserting or updating a video. For
 18529  //     example, the statistics object encapsulates statistics that YouTube
 18530  //     calculates for a video and does not contain values that you can set or
 18531  //     modify. If the parameter value specifies a part that does not contain
 18532  //     mutable values, that part will still be included in the API response.
 18533  func (r *VideosService) Insert(part []string, video *Video) *VideosInsertCall {
 18534  	c := &VideosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18535  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 18536  	c.video = video
 18537  	return c
 18538  }
 18539  
 18540  // AutoLevels sets the optional parameter "autoLevels": Should auto-levels be
 18541  // applied to the upload.
 18542  func (c *VideosInsertCall) AutoLevels(autoLevels bool) *VideosInsertCall {
 18543  	c.urlParams_.Set("autoLevels", fmt.Sprint(autoLevels))
 18544  	return c
 18545  }
 18546  
 18547  // NotifySubscribers sets the optional parameter "notifySubscribers": Notify
 18548  // the channel subscribers about the new video. As default, the notification is
 18549  // enabled.
 18550  func (c *VideosInsertCall) NotifySubscribers(notifySubscribers bool) *VideosInsertCall {
 18551  	c.urlParams_.Set("notifySubscribers", fmt.Sprint(notifySubscribers))
 18552  	return c
 18553  }
 18554  
 18555  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 18556  // *Note:* This parameter is intended exclusively for YouTube content partners.
 18557  // The *onBehalfOfContentOwner* parameter indicates that the request's
 18558  // authorization credentials identify a YouTube CMS user who is acting on
 18559  // behalf of the content owner specified in the parameter value. This parameter
 18560  // is intended for YouTube content partners that own and manage many different
 18561  // YouTube channels. It allows content owners to authenticate once and get
 18562  // access to all their video and channel data, without having to provide
 18563  // authentication credentials for each individual channel. The CMS account that
 18564  // the user authenticates with must be linked to the specified YouTube content
 18565  // owner.
 18566  func (c *VideosInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosInsertCall {
 18567  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 18568  	return c
 18569  }
 18570  
 18571  // OnBehalfOfContentOwnerChannel sets the optional parameter
 18572  // "onBehalfOfContentOwnerChannel": This parameter can only be used in a
 18573  // properly authorized request. *Note:* This parameter is intended exclusively
 18574  // for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter
 18575  // specifies the YouTube channel ID of the channel to which a video is being
 18576  // added. This parameter is required when a request specifies a value for the
 18577  // onBehalfOfContentOwner parameter, and it can only be used in conjunction
 18578  // with that parameter. In addition, the request must be authorized using a CMS
 18579  // account that is linked to the content owner that the onBehalfOfContentOwner
 18580  // parameter specifies. Finally, the channel that the
 18581  // onBehalfOfContentOwnerChannel parameter value specifies must be linked to
 18582  // the content owner that the onBehalfOfContentOwner parameter specifies. This
 18583  // parameter is intended for YouTube content partners that own and manage many
 18584  // different YouTube channels. It allows content owners to authenticate once
 18585  // and perform actions on behalf of the channel specified in the parameter
 18586  // value, without having to provide authentication credentials for each
 18587  // separate channel.
 18588  func (c *VideosInsertCall) OnBehalfOfContentOwnerChannel(onBehalfOfContentOwnerChannel string) *VideosInsertCall {
 18589  	c.urlParams_.Set("onBehalfOfContentOwnerChannel", onBehalfOfContentOwnerChannel)
 18590  	return c
 18591  }
 18592  
 18593  // Stabilize sets the optional parameter "stabilize": Should stabilize be
 18594  // applied to the upload.
 18595  func (c *VideosInsertCall) Stabilize(stabilize bool) *VideosInsertCall {
 18596  	c.urlParams_.Set("stabilize", fmt.Sprint(stabilize))
 18597  	return c
 18598  }
 18599  
 18600  // Media specifies the media to upload in one or more chunks. The chunk size
 18601  // may be controlled by supplying a MediaOption generated by
 18602  // googleapi.ChunkSize. The chunk size defaults to
 18603  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
 18604  // request will be determined by sniffing the contents of r, unless a
 18605  // MediaOption generated by googleapi.ContentType is supplied.
 18606  // At most one of Media and ResumableMedia may be set.
 18607  func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *VideosInsertCall {
 18608  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
 18609  	return c
 18610  }
 18611  
 18612  // ResumableMedia specifies the media to upload in chunks and can be canceled
 18613  // with ctx.
 18614  //
 18615  // Deprecated: use Media instead.
 18616  //
 18617  // At most one of Media and ResumableMedia may be set. mediaType identifies the
 18618  // MIME media type of the upload, such as "image/png". If mediaType is "", it
 18619  // will be auto-detected. The provided ctx will supersede any context
 18620  // previously provided to the Context method.
 18621  func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *VideosInsertCall {
 18622  	c.ctx_ = ctx
 18623  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
 18624  	return c
 18625  }
 18626  
 18627  // ProgressUpdater provides a callback function that will be called after every
 18628  // chunk. It should be a low-latency function in order to not slow down the
 18629  // upload operation. This should only be called when using ResumableMedia (as
 18630  // opposed to Media).
 18631  func (c *VideosInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *VideosInsertCall {
 18632  	c.mediaInfo_.SetProgressUpdater(pu)
 18633  	return c
 18634  }
 18635  
 18636  // Fields allows partial responses to be retrieved. See
 18637  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18638  // details.
 18639  func (c *VideosInsertCall) Fields(s ...googleapi.Field) *VideosInsertCall {
 18640  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18641  	return c
 18642  }
 18643  
 18644  // Context sets the context to be used in this call's Do method.
 18645  // This context will supersede any context previously provided to the
 18646  // ResumableMedia method.
 18647  func (c *VideosInsertCall) Context(ctx context.Context) *VideosInsertCall {
 18648  	c.ctx_ = ctx
 18649  	return c
 18650  }
 18651  
 18652  // Header returns a http.Header that can be modified by the caller to add
 18653  // headers to the request.
 18654  func (c *VideosInsertCall) Header() http.Header {
 18655  	if c.header_ == nil {
 18656  		c.header_ = make(http.Header)
 18657  	}
 18658  	return c.header_
 18659  }
 18660  
 18661  func (c *VideosInsertCall) doRequest(alt string) (*http.Response, error) {
 18662  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 18663  	var body io.Reader = nil
 18664  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
 18665  	if err != nil {
 18666  		return nil, err
 18667  	}
 18668  	c.urlParams_.Set("alt", alt)
 18669  	c.urlParams_.Set("prettyPrint", "false")
 18670  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
 18671  	if c.mediaInfo_ != nil {
 18672  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/videos")
 18673  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
 18674  	}
 18675  	if body == nil {
 18676  		body = new(bytes.Buffer)
 18677  		reqHeaders.Set("Content-Type", "application/json")
 18678  	}
 18679  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
 18680  	defer cleanup()
 18681  	urls += "?" + c.urlParams_.Encode()
 18682  	req, err := http.NewRequest("POST", urls, body)
 18683  	if err != nil {
 18684  		return nil, err
 18685  	}
 18686  	req.Header = reqHeaders
 18687  	req.GetBody = getBody
 18688  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18689  }
 18690  
 18691  // Do executes the "youtube.videos.insert" call.
 18692  // Any non-2xx status code is an error. Response headers are in either
 18693  // *Video.ServerResponse.Header or (if a response was returned at all) in
 18694  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18695  // whether the returned error was because http.StatusNotModified was returned.
 18696  func (c *VideosInsertCall) Do(opts ...googleapi.CallOption) (*Video, error) {
 18697  	gensupport.SetOptions(c.urlParams_, opts...)
 18698  	res, err := c.doRequest("json")
 18699  	if res != nil && res.StatusCode == http.StatusNotModified {
 18700  		if res.Body != nil {
 18701  			res.Body.Close()
 18702  		}
 18703  		return nil, gensupport.WrapError(&googleapi.Error{
 18704  			Code:   res.StatusCode,
 18705  			Header: res.Header,
 18706  		})
 18707  	}
 18708  	if err != nil {
 18709  		return nil, err
 18710  	}
 18711  	defer googleapi.CloseBody(res)
 18712  	if err := googleapi.CheckResponse(res); err != nil {
 18713  		return nil, gensupport.WrapError(err)
 18714  	}
 18715  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
 18716  	if rx != nil {
 18717  		rx.Client = c.s.client
 18718  		rx.UserAgent = c.s.userAgent()
 18719  		ctx := c.ctx_
 18720  		if ctx == nil {
 18721  			ctx = context.TODO()
 18722  		}
 18723  		res, err = rx.Upload(ctx)
 18724  		if err != nil {
 18725  			return nil, err
 18726  		}
 18727  		defer res.Body.Close()
 18728  		if err := googleapi.CheckResponse(res); err != nil {
 18729  			return nil, gensupport.WrapError(err)
 18730  		}
 18731  	}
 18732  	ret := &Video{
 18733  		ServerResponse: googleapi.ServerResponse{
 18734  			Header:         res.Header,
 18735  			HTTPStatusCode: res.StatusCode,
 18736  		},
 18737  	}
 18738  	target := &ret
 18739  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18740  		return nil, err
 18741  	}
 18742  	return ret, nil
 18743  }
 18744  
 18745  type VideosListCall struct {
 18746  	s            *Service
 18747  	urlParams_   gensupport.URLParams
 18748  	ifNoneMatch_ string
 18749  	ctx_         context.Context
 18750  	header_      http.Header
 18751  }
 18752  
 18753  // List: Retrieves a list of resources, possibly filtered.
 18754  //
 18755  //   - part: The *part* parameter specifies a comma-separated list of one or more
 18756  //     video resource properties that the API response will include. If the
 18757  //     parameter identifies a property that contains child properties, the child
 18758  //     properties will be included in the response. For example, in a video
 18759  //     resource, the snippet property contains the channelId, title, description,
 18760  //     tags, and categoryId properties. As such, if you set *part=snippet*, the
 18761  //     API response will contain all of those properties.
 18762  func (r *VideosService) List(part []string) *VideosListCall {
 18763  	c := &VideosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18764  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 18765  	return c
 18766  }
 18767  
 18768  // Chart sets the optional parameter "chart": Return the videos that are in the
 18769  // specified chart.
 18770  //
 18771  // Possible values:
 18772  //
 18773  //	"chartUnspecified"
 18774  //	"mostPopular" - Return the most popular videos for the specified content
 18775  //
 18776  // region and video category.
 18777  func (c *VideosListCall) Chart(chart string) *VideosListCall {
 18778  	c.urlParams_.Set("chart", chart)
 18779  	return c
 18780  }
 18781  
 18782  // Hl sets the optional parameter "hl": Stands for "host language". Specifies
 18783  // the localization language of the metadata to be filled into
 18784  // snippet.localized. The field is filled with the default metadata if there is
 18785  // no localization in the specified language. The parameter value must be a
 18786  // language code included in the list returned by the i18nLanguages.list method
 18787  // (e.g. en_US, es_MX).
 18788  func (c *VideosListCall) Hl(hl string) *VideosListCall {
 18789  	c.urlParams_.Set("hl", hl)
 18790  	return c
 18791  }
 18792  
 18793  // Id sets the optional parameter "id": Return videos with the given ids.
 18794  func (c *VideosListCall) Id(id ...string) *VideosListCall {
 18795  	c.urlParams_.SetMulti("id", append([]string{}, id...))
 18796  	return c
 18797  }
 18798  
 18799  // Locale sets the optional parameter "locale":
 18800  func (c *VideosListCall) Locale(locale string) *VideosListCall {
 18801  	c.urlParams_.Set("locale", locale)
 18802  	return c
 18803  }
 18804  
 18805  // MaxHeight sets the optional parameter "maxHeight":
 18806  func (c *VideosListCall) MaxHeight(maxHeight int64) *VideosListCall {
 18807  	c.urlParams_.Set("maxHeight", fmt.Sprint(maxHeight))
 18808  	return c
 18809  }
 18810  
 18811  // MaxResults sets the optional parameter "maxResults": The *maxResults*
 18812  // parameter specifies the maximum number of items that should be returned in
 18813  // the result set. *Note:* This parameter is supported for use in conjunction
 18814  // with the myRating and chart parameters, but it is not supported for use in
 18815  // conjunction with the id parameter.
 18816  func (c *VideosListCall) MaxResults(maxResults int64) *VideosListCall {
 18817  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 18818  	return c
 18819  }
 18820  
 18821  // MaxWidth sets the optional parameter "maxWidth": Return the player with
 18822  // maximum height specified in
 18823  func (c *VideosListCall) MaxWidth(maxWidth int64) *VideosListCall {
 18824  	c.urlParams_.Set("maxWidth", fmt.Sprint(maxWidth))
 18825  	return c
 18826  }
 18827  
 18828  // MyRating sets the optional parameter "myRating": Return videos
 18829  // liked/disliked by the authenticated user. Does not support
 18830  // RateType.RATED_TYPE_NONE.
 18831  //
 18832  // Possible values:
 18833  //
 18834  //	"none"
 18835  //	"like" - The entity is liked.
 18836  //	"dislike" - The entity is disliked.
 18837  func (c *VideosListCall) MyRating(myRating string) *VideosListCall {
 18838  	c.urlParams_.Set("myRating", myRating)
 18839  	return c
 18840  }
 18841  
 18842  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 18843  // *Note:* This parameter is intended exclusively for YouTube content partners.
 18844  // The *onBehalfOfContentOwner* parameter indicates that the request's
 18845  // authorization credentials identify a YouTube CMS user who is acting on
 18846  // behalf of the content owner specified in the parameter value. This parameter
 18847  // is intended for YouTube content partners that own and manage many different
 18848  // YouTube channels. It allows content owners to authenticate once and get
 18849  // access to all their video and channel data, without having to provide
 18850  // authentication credentials for each individual channel. The CMS account that
 18851  // the user authenticates with must be linked to the specified YouTube content
 18852  // owner.
 18853  func (c *VideosListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosListCall {
 18854  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 18855  	return c
 18856  }
 18857  
 18858  // PageToken sets the optional parameter "pageToken": The *pageToken* parameter
 18859  // identifies a specific page in the result set that should be returned. In an
 18860  // API response, the nextPageToken and prevPageToken properties identify other
 18861  // pages that could be retrieved. *Note:* This parameter is supported for use
 18862  // in conjunction with the myRating and chart parameters, but it is not
 18863  // supported for use in conjunction with the id parameter.
 18864  func (c *VideosListCall) PageToken(pageToken string) *VideosListCall {
 18865  	c.urlParams_.Set("pageToken", pageToken)
 18866  	return c
 18867  }
 18868  
 18869  // RegionCode sets the optional parameter "regionCode": Use a chart that is
 18870  // specific to the specified region
 18871  func (c *VideosListCall) RegionCode(regionCode string) *VideosListCall {
 18872  	c.urlParams_.Set("regionCode", regionCode)
 18873  	return c
 18874  }
 18875  
 18876  // VideoCategoryId sets the optional parameter "videoCategoryId": Use chart
 18877  // that is specific to the specified video category
 18878  func (c *VideosListCall) VideoCategoryId(videoCategoryId string) *VideosListCall {
 18879  	c.urlParams_.Set("videoCategoryId", videoCategoryId)
 18880  	return c
 18881  }
 18882  
 18883  // Fields allows partial responses to be retrieved. See
 18884  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18885  // details.
 18886  func (c *VideosListCall) Fields(s ...googleapi.Field) *VideosListCall {
 18887  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18888  	return c
 18889  }
 18890  
 18891  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18892  // object's ETag matches the given value. This is useful for getting updates
 18893  // only after the object has changed since the last request.
 18894  func (c *VideosListCall) IfNoneMatch(entityTag string) *VideosListCall {
 18895  	c.ifNoneMatch_ = entityTag
 18896  	return c
 18897  }
 18898  
 18899  // Context sets the context to be used in this call's Do method.
 18900  func (c *VideosListCall) Context(ctx context.Context) *VideosListCall {
 18901  	c.ctx_ = ctx
 18902  	return c
 18903  }
 18904  
 18905  // Header returns a http.Header that can be modified by the caller to add
 18906  // headers to the request.
 18907  func (c *VideosListCall) Header() http.Header {
 18908  	if c.header_ == nil {
 18909  		c.header_ = make(http.Header)
 18910  	}
 18911  	return c.header_
 18912  }
 18913  
 18914  func (c *VideosListCall) doRequest(alt string) (*http.Response, error) {
 18915  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18916  	if c.ifNoneMatch_ != "" {
 18917  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18918  	}
 18919  	var body io.Reader = nil
 18920  	c.urlParams_.Set("alt", alt)
 18921  	c.urlParams_.Set("prettyPrint", "false")
 18922  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
 18923  	urls += "?" + c.urlParams_.Encode()
 18924  	req, err := http.NewRequest("GET", urls, body)
 18925  	if err != nil {
 18926  		return nil, err
 18927  	}
 18928  	req.Header = reqHeaders
 18929  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18930  }
 18931  
 18932  // Do executes the "youtube.videos.list" call.
 18933  // Any non-2xx status code is an error. Response headers are in either
 18934  // *VideoListResponse.ServerResponse.Header or (if a response was returned at
 18935  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 18936  // check whether the returned error was because http.StatusNotModified was
 18937  // returned.
 18938  func (c *VideosListCall) Do(opts ...googleapi.CallOption) (*VideoListResponse, error) {
 18939  	gensupport.SetOptions(c.urlParams_, opts...)
 18940  	res, err := c.doRequest("json")
 18941  	if res != nil && res.StatusCode == http.StatusNotModified {
 18942  		if res.Body != nil {
 18943  			res.Body.Close()
 18944  		}
 18945  		return nil, gensupport.WrapError(&googleapi.Error{
 18946  			Code:   res.StatusCode,
 18947  			Header: res.Header,
 18948  		})
 18949  	}
 18950  	if err != nil {
 18951  		return nil, err
 18952  	}
 18953  	defer googleapi.CloseBody(res)
 18954  	if err := googleapi.CheckResponse(res); err != nil {
 18955  		return nil, gensupport.WrapError(err)
 18956  	}
 18957  	ret := &VideoListResponse{
 18958  		ServerResponse: googleapi.ServerResponse{
 18959  			Header:         res.Header,
 18960  			HTTPStatusCode: res.StatusCode,
 18961  		},
 18962  	}
 18963  	target := &ret
 18964  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18965  		return nil, err
 18966  	}
 18967  	return ret, nil
 18968  }
 18969  
 18970  // Pages invokes f for each page of results.
 18971  // A non-nil error returned from f will halt the iteration.
 18972  // The provided context supersedes any context provided to the Context method.
 18973  func (c *VideosListCall) Pages(ctx context.Context, f func(*VideoListResponse) error) error {
 18974  	c.ctx_ = ctx
 18975  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 18976  	for {
 18977  		x, err := c.Do()
 18978  		if err != nil {
 18979  			return err
 18980  		}
 18981  		if err := f(x); err != nil {
 18982  			return err
 18983  		}
 18984  		if x.NextPageToken == "" {
 18985  			return nil
 18986  		}
 18987  		c.PageToken(x.NextPageToken)
 18988  	}
 18989  }
 18990  
 18991  type VideosRateCall struct {
 18992  	s          *Service
 18993  	urlParams_ gensupport.URLParams
 18994  	ctx_       context.Context
 18995  	header_    http.Header
 18996  }
 18997  
 18998  // Rate: Adds a like or dislike rating to a video or removes a rating from a
 18999  // video.
 19000  //
 19001  // - id: .
 19002  // - rating: .
 19003  func (r *VideosService) Rate(id string, rating string) *VideosRateCall {
 19004  	c := &VideosRateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19005  	c.urlParams_.Set("id", id)
 19006  	c.urlParams_.Set("rating", rating)
 19007  	return c
 19008  }
 19009  
 19010  // Fields allows partial responses to be retrieved. See
 19011  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19012  // details.
 19013  func (c *VideosRateCall) Fields(s ...googleapi.Field) *VideosRateCall {
 19014  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19015  	return c
 19016  }
 19017  
 19018  // Context sets the context to be used in this call's Do method.
 19019  func (c *VideosRateCall) Context(ctx context.Context) *VideosRateCall {
 19020  	c.ctx_ = ctx
 19021  	return c
 19022  }
 19023  
 19024  // Header returns a http.Header that can be modified by the caller to add
 19025  // headers to the request.
 19026  func (c *VideosRateCall) Header() http.Header {
 19027  	if c.header_ == nil {
 19028  		c.header_ = make(http.Header)
 19029  	}
 19030  	return c.header_
 19031  }
 19032  
 19033  func (c *VideosRateCall) doRequest(alt string) (*http.Response, error) {
 19034  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19035  	var body io.Reader = nil
 19036  	c.urlParams_.Set("alt", alt)
 19037  	c.urlParams_.Set("prettyPrint", "false")
 19038  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos/rate")
 19039  	urls += "?" + c.urlParams_.Encode()
 19040  	req, err := http.NewRequest("POST", urls, body)
 19041  	if err != nil {
 19042  		return nil, err
 19043  	}
 19044  	req.Header = reqHeaders
 19045  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19046  }
 19047  
 19048  // Do executes the "youtube.videos.rate" call.
 19049  func (c *VideosRateCall) Do(opts ...googleapi.CallOption) error {
 19050  	gensupport.SetOptions(c.urlParams_, opts...)
 19051  	res, err := c.doRequest("json")
 19052  	if err != nil {
 19053  		return err
 19054  	}
 19055  	defer googleapi.CloseBody(res)
 19056  	if err := googleapi.CheckResponse(res); err != nil {
 19057  		return gensupport.WrapError(err)
 19058  	}
 19059  	return nil
 19060  }
 19061  
 19062  type VideosReportAbuseCall struct {
 19063  	s                *Service
 19064  	videoabusereport *VideoAbuseReport
 19065  	urlParams_       gensupport.URLParams
 19066  	ctx_             context.Context
 19067  	header_          http.Header
 19068  }
 19069  
 19070  // ReportAbuse: Report abuse for a video.
 19071  func (r *VideosService) ReportAbuse(videoabusereport *VideoAbuseReport) *VideosReportAbuseCall {
 19072  	c := &VideosReportAbuseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19073  	c.videoabusereport = videoabusereport
 19074  	return c
 19075  }
 19076  
 19077  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 19078  // *Note:* This parameter is intended exclusively for YouTube content partners.
 19079  // The *onBehalfOfContentOwner* parameter indicates that the request's
 19080  // authorization credentials identify a YouTube CMS user who is acting on
 19081  // behalf of the content owner specified in the parameter value. This parameter
 19082  // is intended for YouTube content partners that own and manage many different
 19083  // YouTube channels. It allows content owners to authenticate once and get
 19084  // access to all their video and channel data, without having to provide
 19085  // authentication credentials for each individual channel. The CMS account that
 19086  // the user authenticates with must be linked to the specified YouTube content
 19087  // owner.
 19088  func (c *VideosReportAbuseCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosReportAbuseCall {
 19089  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 19090  	return c
 19091  }
 19092  
 19093  // Fields allows partial responses to be retrieved. See
 19094  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19095  // details.
 19096  func (c *VideosReportAbuseCall) Fields(s ...googleapi.Field) *VideosReportAbuseCall {
 19097  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19098  	return c
 19099  }
 19100  
 19101  // Context sets the context to be used in this call's Do method.
 19102  func (c *VideosReportAbuseCall) Context(ctx context.Context) *VideosReportAbuseCall {
 19103  	c.ctx_ = ctx
 19104  	return c
 19105  }
 19106  
 19107  // Header returns a http.Header that can be modified by the caller to add
 19108  // headers to the request.
 19109  func (c *VideosReportAbuseCall) Header() http.Header {
 19110  	if c.header_ == nil {
 19111  		c.header_ = make(http.Header)
 19112  	}
 19113  	return c.header_
 19114  }
 19115  
 19116  func (c *VideosReportAbuseCall) doRequest(alt string) (*http.Response, error) {
 19117  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 19118  	var body io.Reader = nil
 19119  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.videoabusereport)
 19120  	if err != nil {
 19121  		return nil, err
 19122  	}
 19123  	c.urlParams_.Set("alt", alt)
 19124  	c.urlParams_.Set("prettyPrint", "false")
 19125  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos/reportAbuse")
 19126  	urls += "?" + c.urlParams_.Encode()
 19127  	req, err := http.NewRequest("POST", urls, body)
 19128  	if err != nil {
 19129  		return nil, err
 19130  	}
 19131  	req.Header = reqHeaders
 19132  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19133  }
 19134  
 19135  // Do executes the "youtube.videos.reportAbuse" call.
 19136  func (c *VideosReportAbuseCall) Do(opts ...googleapi.CallOption) error {
 19137  	gensupport.SetOptions(c.urlParams_, opts...)
 19138  	res, err := c.doRequest("json")
 19139  	if err != nil {
 19140  		return err
 19141  	}
 19142  	defer googleapi.CloseBody(res)
 19143  	if err := googleapi.CheckResponse(res); err != nil {
 19144  		return gensupport.WrapError(err)
 19145  	}
 19146  	return nil
 19147  }
 19148  
 19149  type VideosUpdateCall struct {
 19150  	s          *Service
 19151  	video      *Video
 19152  	urlParams_ gensupport.URLParams
 19153  	ctx_       context.Context
 19154  	header_    http.Header
 19155  }
 19156  
 19157  // Update: Updates an existing resource.
 19158  //
 19159  //   - part: The *part* parameter serves two purposes in this operation. It
 19160  //     identifies the properties that the write operation will set as well as the
 19161  //     properties that the API response will include. Note that this method will
 19162  //     override the existing values for all of the mutable properties that are
 19163  //     contained in any parts that the parameter value specifies. For example, a
 19164  //     video's privacy setting is contained in the status part. As such, if your
 19165  //     request is updating a private video, and the request's part parameter
 19166  //     value includes the status part, the video's privacy setting will be
 19167  //     updated to whatever value the request body specifies. If the request body
 19168  //     does not specify a value, the existing privacy setting will be removed and
 19169  //     the video will revert to the default privacy setting. In addition, not all
 19170  //     parts contain properties that can be set when inserting or updating a
 19171  //     video. For example, the statistics object encapsulates statistics that
 19172  //     YouTube calculates for a video and does not contain values that you can
 19173  //     set or modify. If the parameter value specifies a part that does not
 19174  //     contain mutable values, that part will still be included in the API
 19175  //     response.
 19176  func (r *VideosService) Update(part []string, video *Video) *VideosUpdateCall {
 19177  	c := &VideosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19178  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 19179  	c.video = video
 19180  	return c
 19181  }
 19182  
 19183  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 19184  // *Note:* This parameter is intended exclusively for YouTube content partners.
 19185  // The *onBehalfOfContentOwner* parameter indicates that the request's
 19186  // authorization credentials identify a YouTube CMS user who is acting on
 19187  // behalf of the content owner specified in the parameter value. This parameter
 19188  // is intended for YouTube content partners that own and manage many different
 19189  // YouTube channels. It allows content owners to authenticate once and get
 19190  // access to all their video and channel data, without having to provide
 19191  // authentication credentials for each individual channel. The actual CMS
 19192  // account that the user authenticates with must be linked to the specified
 19193  // YouTube content owner.
 19194  func (c *VideosUpdateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *VideosUpdateCall {
 19195  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 19196  	return c
 19197  }
 19198  
 19199  // Fields allows partial responses to be retrieved. See
 19200  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19201  // details.
 19202  func (c *VideosUpdateCall) Fields(s ...googleapi.Field) *VideosUpdateCall {
 19203  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19204  	return c
 19205  }
 19206  
 19207  // Context sets the context to be used in this call's Do method.
 19208  func (c *VideosUpdateCall) Context(ctx context.Context) *VideosUpdateCall {
 19209  	c.ctx_ = ctx
 19210  	return c
 19211  }
 19212  
 19213  // Header returns a http.Header that can be modified by the caller to add
 19214  // headers to the request.
 19215  func (c *VideosUpdateCall) Header() http.Header {
 19216  	if c.header_ == nil {
 19217  		c.header_ = make(http.Header)
 19218  	}
 19219  	return c.header_
 19220  }
 19221  
 19222  func (c *VideosUpdateCall) doRequest(alt string) (*http.Response, error) {
 19223  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 19224  	var body io.Reader = nil
 19225  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
 19226  	if err != nil {
 19227  		return nil, err
 19228  	}
 19229  	c.urlParams_.Set("alt", alt)
 19230  	c.urlParams_.Set("prettyPrint", "false")
 19231  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/videos")
 19232  	urls += "?" + c.urlParams_.Encode()
 19233  	req, err := http.NewRequest("PUT", urls, body)
 19234  	if err != nil {
 19235  		return nil, err
 19236  	}
 19237  	req.Header = reqHeaders
 19238  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19239  }
 19240  
 19241  // Do executes the "youtube.videos.update" call.
 19242  // Any non-2xx status code is an error. Response headers are in either
 19243  // *Video.ServerResponse.Header or (if a response was returned at all) in
 19244  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 19245  // whether the returned error was because http.StatusNotModified was returned.
 19246  func (c *VideosUpdateCall) Do(opts ...googleapi.CallOption) (*Video, error) {
 19247  	gensupport.SetOptions(c.urlParams_, opts...)
 19248  	res, err := c.doRequest("json")
 19249  	if res != nil && res.StatusCode == http.StatusNotModified {
 19250  		if res.Body != nil {
 19251  			res.Body.Close()
 19252  		}
 19253  		return nil, gensupport.WrapError(&googleapi.Error{
 19254  			Code:   res.StatusCode,
 19255  			Header: res.Header,
 19256  		})
 19257  	}
 19258  	if err != nil {
 19259  		return nil, err
 19260  	}
 19261  	defer googleapi.CloseBody(res)
 19262  	if err := googleapi.CheckResponse(res); err != nil {
 19263  		return nil, gensupport.WrapError(err)
 19264  	}
 19265  	ret := &Video{
 19266  		ServerResponse: googleapi.ServerResponse{
 19267  			Header:         res.Header,
 19268  			HTTPStatusCode: res.StatusCode,
 19269  		},
 19270  	}
 19271  	target := &ret
 19272  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19273  		return nil, err
 19274  	}
 19275  	return ret, nil
 19276  }
 19277  
 19278  type WatermarksSetCall struct {
 19279  	s               *Service
 19280  	invideobranding *InvideoBranding
 19281  	urlParams_      gensupport.URLParams
 19282  	mediaInfo_      *gensupport.MediaInfo
 19283  	ctx_            context.Context
 19284  	header_         http.Header
 19285  }
 19286  
 19287  // Set: Allows upload of watermark image and setting it for a channel.
 19288  //
 19289  // - channelId: .
 19290  func (r *WatermarksService) Set(channelId string, invideobranding *InvideoBranding) *WatermarksSetCall {
 19291  	c := &WatermarksSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19292  	c.urlParams_.Set("channelId", channelId)
 19293  	c.invideobranding = invideobranding
 19294  	return c
 19295  }
 19296  
 19297  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 19298  // *Note:* This parameter is intended exclusively for YouTube content partners.
 19299  // The *onBehalfOfContentOwner* parameter indicates that the request's
 19300  // authorization credentials identify a YouTube CMS user who is acting on
 19301  // behalf of the content owner specified in the parameter value. This parameter
 19302  // is intended for YouTube content partners that own and manage many different
 19303  // YouTube channels. It allows content owners to authenticate once and get
 19304  // access to all their video and channel data, without having to provide
 19305  // authentication credentials for each individual channel. The CMS account that
 19306  // the user authenticates with must be linked to the specified YouTube content
 19307  // owner.
 19308  func (c *WatermarksSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *WatermarksSetCall {
 19309  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 19310  	return c
 19311  }
 19312  
 19313  // Media specifies the media to upload in one or more chunks. The chunk size
 19314  // may be controlled by supplying a MediaOption generated by
 19315  // googleapi.ChunkSize. The chunk size defaults to
 19316  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
 19317  // request will be determined by sniffing the contents of r, unless a
 19318  // MediaOption generated by googleapi.ContentType is supplied.
 19319  // At most one of Media and ResumableMedia may be set.
 19320  func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *WatermarksSetCall {
 19321  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
 19322  	return c
 19323  }
 19324  
 19325  // ResumableMedia specifies the media to upload in chunks and can be canceled
 19326  // with ctx.
 19327  //
 19328  // Deprecated: use Media instead.
 19329  //
 19330  // At most one of Media and ResumableMedia may be set. mediaType identifies the
 19331  // MIME media type of the upload, such as "image/png". If mediaType is "", it
 19332  // will be auto-detected. The provided ctx will supersede any context
 19333  // previously provided to the Context method.
 19334  func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *WatermarksSetCall {
 19335  	c.ctx_ = ctx
 19336  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
 19337  	return c
 19338  }
 19339  
 19340  // ProgressUpdater provides a callback function that will be called after every
 19341  // chunk. It should be a low-latency function in order to not slow down the
 19342  // upload operation. This should only be called when using ResumableMedia (as
 19343  // opposed to Media).
 19344  func (c *WatermarksSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *WatermarksSetCall {
 19345  	c.mediaInfo_.SetProgressUpdater(pu)
 19346  	return c
 19347  }
 19348  
 19349  // Fields allows partial responses to be retrieved. See
 19350  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19351  // details.
 19352  func (c *WatermarksSetCall) Fields(s ...googleapi.Field) *WatermarksSetCall {
 19353  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19354  	return c
 19355  }
 19356  
 19357  // Context sets the context to be used in this call's Do method.
 19358  // This context will supersede any context previously provided to the
 19359  // ResumableMedia method.
 19360  func (c *WatermarksSetCall) Context(ctx context.Context) *WatermarksSetCall {
 19361  	c.ctx_ = ctx
 19362  	return c
 19363  }
 19364  
 19365  // Header returns a http.Header that can be modified by the caller to add
 19366  // headers to the request.
 19367  func (c *WatermarksSetCall) Header() http.Header {
 19368  	if c.header_ == nil {
 19369  		c.header_ = make(http.Header)
 19370  	}
 19371  	return c.header_
 19372  }
 19373  
 19374  func (c *WatermarksSetCall) doRequest(alt string) (*http.Response, error) {
 19375  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 19376  	var body io.Reader = nil
 19377  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.invideobranding)
 19378  	if err != nil {
 19379  		return nil, err
 19380  	}
 19381  	c.urlParams_.Set("alt", alt)
 19382  	c.urlParams_.Set("prettyPrint", "false")
 19383  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/watermarks/set")
 19384  	if c.mediaInfo_ != nil {
 19385  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/youtube/v3/watermarks/set")
 19386  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
 19387  	}
 19388  	if body == nil {
 19389  		body = new(bytes.Buffer)
 19390  		reqHeaders.Set("Content-Type", "application/json")
 19391  	}
 19392  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
 19393  	defer cleanup()
 19394  	urls += "?" + c.urlParams_.Encode()
 19395  	req, err := http.NewRequest("POST", urls, body)
 19396  	if err != nil {
 19397  		return nil, err
 19398  	}
 19399  	req.Header = reqHeaders
 19400  	req.GetBody = getBody
 19401  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19402  }
 19403  
 19404  // Do executes the "youtube.watermarks.set" call.
 19405  func (c *WatermarksSetCall) Do(opts ...googleapi.CallOption) error {
 19406  	gensupport.SetOptions(c.urlParams_, opts...)
 19407  	res, err := c.doRequest("json")
 19408  	if err != nil {
 19409  		return err
 19410  	}
 19411  	defer googleapi.CloseBody(res)
 19412  	if err := googleapi.CheckResponse(res); err != nil {
 19413  		return gensupport.WrapError(err)
 19414  	}
 19415  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
 19416  	if rx != nil {
 19417  		rx.Client = c.s.client
 19418  		rx.UserAgent = c.s.userAgent()
 19419  		ctx := c.ctx_
 19420  		if ctx == nil {
 19421  			ctx = context.TODO()
 19422  		}
 19423  		res, err = rx.Upload(ctx)
 19424  		if err != nil {
 19425  			return err
 19426  		}
 19427  		defer res.Body.Close()
 19428  		if err := googleapi.CheckResponse(res); err != nil {
 19429  			return gensupport.WrapError(err)
 19430  		}
 19431  	}
 19432  	return nil
 19433  }
 19434  
 19435  type WatermarksUnsetCall struct {
 19436  	s          *Service
 19437  	urlParams_ gensupport.URLParams
 19438  	ctx_       context.Context
 19439  	header_    http.Header
 19440  }
 19441  
 19442  // Unset: Allows removal of channel watermark.
 19443  //
 19444  // - channelId: .
 19445  func (r *WatermarksService) Unset(channelId string) *WatermarksUnsetCall {
 19446  	c := &WatermarksUnsetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19447  	c.urlParams_.Set("channelId", channelId)
 19448  	return c
 19449  }
 19450  
 19451  // OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":
 19452  // *Note:* This parameter is intended exclusively for YouTube content partners.
 19453  // The *onBehalfOfContentOwner* parameter indicates that the request's
 19454  // authorization credentials identify a YouTube CMS user who is acting on
 19455  // behalf of the content owner specified in the parameter value. This parameter
 19456  // is intended for YouTube content partners that own and manage many different
 19457  // YouTube channels. It allows content owners to authenticate once and get
 19458  // access to all their video and channel data, without having to provide
 19459  // authentication credentials for each individual channel. The CMS account that
 19460  // the user authenticates with must be linked to the specified YouTube content
 19461  // owner.
 19462  func (c *WatermarksUnsetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *WatermarksUnsetCall {
 19463  	c.urlParams_.Set("onBehalfOfContentOwner", onBehalfOfContentOwner)
 19464  	return c
 19465  }
 19466  
 19467  // Fields allows partial responses to be retrieved. See
 19468  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19469  // details.
 19470  func (c *WatermarksUnsetCall) Fields(s ...googleapi.Field) *WatermarksUnsetCall {
 19471  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19472  	return c
 19473  }
 19474  
 19475  // Context sets the context to be used in this call's Do method.
 19476  func (c *WatermarksUnsetCall) Context(ctx context.Context) *WatermarksUnsetCall {
 19477  	c.ctx_ = ctx
 19478  	return c
 19479  }
 19480  
 19481  // Header returns a http.Header that can be modified by the caller to add
 19482  // headers to the request.
 19483  func (c *WatermarksUnsetCall) Header() http.Header {
 19484  	if c.header_ == nil {
 19485  		c.header_ = make(http.Header)
 19486  	}
 19487  	return c.header_
 19488  }
 19489  
 19490  func (c *WatermarksUnsetCall) doRequest(alt string) (*http.Response, error) {
 19491  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19492  	var body io.Reader = nil
 19493  	c.urlParams_.Set("alt", alt)
 19494  	c.urlParams_.Set("prettyPrint", "false")
 19495  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/watermarks/unset")
 19496  	urls += "?" + c.urlParams_.Encode()
 19497  	req, err := http.NewRequest("POST", urls, body)
 19498  	if err != nil {
 19499  		return nil, err
 19500  	}
 19501  	req.Header = reqHeaders
 19502  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19503  }
 19504  
 19505  // Do executes the "youtube.watermarks.unset" call.
 19506  func (c *WatermarksUnsetCall) Do(opts ...googleapi.CallOption) error {
 19507  	gensupport.SetOptions(c.urlParams_, opts...)
 19508  	res, err := c.doRequest("json")
 19509  	if err != nil {
 19510  		return err
 19511  	}
 19512  	defer googleapi.CloseBody(res)
 19513  	if err := googleapi.CheckResponse(res); err != nil {
 19514  		return gensupport.WrapError(err)
 19515  	}
 19516  	return nil
 19517  }
 19518  
 19519  type YoutubeV3UpdateCommentThreadsCall struct {
 19520  	s             *Service
 19521  	commentthread *CommentThread
 19522  	urlParams_    gensupport.URLParams
 19523  	ctx_          context.Context
 19524  	header_       http.Header
 19525  }
 19526  
 19527  // UpdateCommentThreads: Updates an existing resource.
 19528  func (r *YoutubeV3Service) UpdateCommentThreads(commentthread *CommentThread) *YoutubeV3UpdateCommentThreadsCall {
 19529  	c := &YoutubeV3UpdateCommentThreadsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19530  	c.commentthread = commentthread
 19531  	return c
 19532  }
 19533  
 19534  // Part sets the optional parameter "part": The *part* parameter specifies a
 19535  // comma-separated list of commentThread resource properties that the API
 19536  // response will include. You must at least include the snippet part in the
 19537  // parameter value since that part contains all of the properties that the API
 19538  // request can update.
 19539  func (c *YoutubeV3UpdateCommentThreadsCall) Part(part ...string) *YoutubeV3UpdateCommentThreadsCall {
 19540  	c.urlParams_.SetMulti("part", append([]string{}, part...))
 19541  	return c
 19542  }
 19543  
 19544  // Fields allows partial responses to be retrieved. See
 19545  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19546  // details.
 19547  func (c *YoutubeV3UpdateCommentThreadsCall) Fields(s ...googleapi.Field) *YoutubeV3UpdateCommentThreadsCall {
 19548  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19549  	return c
 19550  }
 19551  
 19552  // Context sets the context to be used in this call's Do method.
 19553  func (c *YoutubeV3UpdateCommentThreadsCall) Context(ctx context.Context) *YoutubeV3UpdateCommentThreadsCall {
 19554  	c.ctx_ = ctx
 19555  	return c
 19556  }
 19557  
 19558  // Header returns a http.Header that can be modified by the caller to add
 19559  // headers to the request.
 19560  func (c *YoutubeV3UpdateCommentThreadsCall) Header() http.Header {
 19561  	if c.header_ == nil {
 19562  		c.header_ = make(http.Header)
 19563  	}
 19564  	return c.header_
 19565  }
 19566  
 19567  func (c *YoutubeV3UpdateCommentThreadsCall) doRequest(alt string) (*http.Response, error) {
 19568  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 19569  	var body io.Reader = nil
 19570  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
 19571  	if err != nil {
 19572  		return nil, err
 19573  	}
 19574  	c.urlParams_.Set("alt", alt)
 19575  	c.urlParams_.Set("prettyPrint", "false")
 19576  	urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/commentThreads")
 19577  	urls += "?" + c.urlParams_.Encode()
 19578  	req, err := http.NewRequest("PUT", urls, body)
 19579  	if err != nil {
 19580  		return nil, err
 19581  	}
 19582  	req.Header = reqHeaders
 19583  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19584  }
 19585  
 19586  // Do executes the "youtube.youtube.v3.updateCommentThreads" call.
 19587  // Any non-2xx status code is an error. Response headers are in either
 19588  // *CommentThread.ServerResponse.Header or (if a response was returned at all)
 19589  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 19590  // whether the returned error was because http.StatusNotModified was returned.
 19591  func (c *YoutubeV3UpdateCommentThreadsCall) Do(opts ...googleapi.CallOption) (*CommentThread, error) {
 19592  	gensupport.SetOptions(c.urlParams_, opts...)
 19593  	res, err := c.doRequest("json")
 19594  	if res != nil && res.StatusCode == http.StatusNotModified {
 19595  		if res.Body != nil {
 19596  			res.Body.Close()
 19597  		}
 19598  		return nil, gensupport.WrapError(&googleapi.Error{
 19599  			Code:   res.StatusCode,
 19600  			Header: res.Header,
 19601  		})
 19602  	}
 19603  	if err != nil {
 19604  		return nil, err
 19605  	}
 19606  	defer googleapi.CloseBody(res)
 19607  	if err := googleapi.CheckResponse(res); err != nil {
 19608  		return nil, gensupport.WrapError(err)
 19609  	}
 19610  	ret := &CommentThread{
 19611  		ServerResponse: googleapi.ServerResponse{
 19612  			Header:         res.Header,
 19613  			HTTPStatusCode: res.StatusCode,
 19614  		},
 19615  	}
 19616  	target := &ret
 19617  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19618  		return nil, err
 19619  	}
 19620  	return ret, nil
 19621  }
 19622  

View as plain text