1// Copyright 2020 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 playmoviespartner provides access to the Google Play Movies Partner API.
8//
9// For product documentation, see: https://developers.google.com/playmoviespartner/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/playmoviespartner/v1"
16//   ...
17//   ctx := context.Background()
18//   playmoviespartnerService, err := playmoviespartner.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   playmoviespartnerService, err := playmoviespartner.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   playmoviespartnerService, err := playmoviespartner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package playmoviespartner // import "google.golang.org/api/playmoviespartner/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	htransport "google.golang.org/api/transport/http"
56)
57
58// Always reference these packages, just in case the auto-generated code
59// below doesn't.
60var _ = bytes.NewBuffer
61var _ = strconv.Itoa
62var _ = fmt.Sprintf
63var _ = json.NewDecoder
64var _ = io.Copy
65var _ = url.Parse
66var _ = gensupport.MarshalJSON
67var _ = googleapi.Version
68var _ = errors.New
69var _ = strings.Replace
70var _ = context.Canceled
71
72const apiId = "playmoviespartner:v1"
73const apiName = "playmoviespartner"
74const apiVersion = "v1"
75const basePath = "https://playmoviespartner.googleapis.com/"
76
77// OAuth2 scopes used by this API.
78const (
79	// View the digital assets you publish on Google Play Movies and TV
80	PlaymoviesPartnerReadonlyScope = "https://www.googleapis.com/auth/playmovies_partner.readonly"
81)
82
83// NewService creates a new Service.
84func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
85	scopesOption := option.WithScopes(
86		"https://www.googleapis.com/auth/playmovies_partner.readonly",
87	)
88	// NOTE: prepend, so we don't override user-specified scopes.
89	opts = append([]option.ClientOption{scopesOption}, opts...)
90	client, endpoint, err := htransport.NewClient(ctx, opts...)
91	if err != nil {
92		return nil, err
93	}
94	s, err := New(client)
95	if err != nil {
96		return nil, err
97	}
98	if endpoint != "" {
99		s.BasePath = endpoint
100	}
101	return s, nil
102}
103
104// New creates a new Service. It uses the provided http.Client for requests.
105//
106// Deprecated: please use NewService instead.
107// To provide a custom HTTP client, use option.WithHTTPClient.
108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
109func New(client *http.Client) (*Service, error) {
110	if client == nil {
111		return nil, errors.New("client is nil")
112	}
113	s := &Service{client: client, BasePath: basePath}
114	s.Accounts = NewAccountsService(s)
115	return s, nil
116}
117
118type Service struct {
119	client    *http.Client
120	BasePath  string // API endpoint base URL
121	UserAgent string // optional additional User-Agent fragment
122
123	Accounts *AccountsService
124}
125
126func (s *Service) userAgent() string {
127	if s.UserAgent == "" {
128		return googleapi.UserAgent
129	}
130	return googleapi.UserAgent + " " + s.UserAgent
131}
132
133func NewAccountsService(s *Service) *AccountsService {
134	rs := &AccountsService{s: s}
135	rs.Avails = NewAccountsAvailsService(s)
136	rs.Orders = NewAccountsOrdersService(s)
137	rs.StoreInfos = NewAccountsStoreInfosService(s)
138	return rs
139}
140
141type AccountsService struct {
142	s *Service
143
144	Avails *AccountsAvailsService
145
146	Orders *AccountsOrdersService
147
148	StoreInfos *AccountsStoreInfosService
149}
150
151func NewAccountsAvailsService(s *Service) *AccountsAvailsService {
152	rs := &AccountsAvailsService{s: s}
153	return rs
154}
155
156type AccountsAvailsService struct {
157	s *Service
158}
159
160func NewAccountsOrdersService(s *Service) *AccountsOrdersService {
161	rs := &AccountsOrdersService{s: s}
162	return rs
163}
164
165type AccountsOrdersService struct {
166	s *Service
167}
168
169func NewAccountsStoreInfosService(s *Service) *AccountsStoreInfosService {
170	rs := &AccountsStoreInfosService{s: s}
171	rs.Country = NewAccountsStoreInfosCountryService(s)
172	return rs
173}
174
175type AccountsStoreInfosService struct {
176	s *Service
177
178	Country *AccountsStoreInfosCountryService
179}
180
181func NewAccountsStoreInfosCountryService(s *Service) *AccountsStoreInfosCountryService {
182	rs := &AccountsStoreInfosCountryService{s: s}
183	return rs
184}
185
186type AccountsStoreInfosCountryService struct {
187	s *Service
188}
189
190// Avail: An Avail describes the Availability Window of a specific Edit
191// in a given
192// country, which means the period Google is allowed to sell or rent the
193// Edit.
194//
195// Avails are exposed in EMA format Version 1.6b (available
196// at
197// http://www.movielabs.com/md/avails/)
198//
199// Studios can see the Avails for the Titles they own.
200// Post-production houses cannot see any Avails.
201type Avail struct {
202	// AltId: Other identifier referring to the Edit, as defined by
203	// partner.
204	// Example: "GOOGLER_2006"
205	AltId string `json:"altId,omitempty"`
206
207	// AvailId: ID internally generated by Google to uniquely identify an
208	// Avail.
209	// Not part of EMA Specs.
210	AvailId string `json:"availId,omitempty"`
211
212	// CaptionExemption: Communicating an exempt category as defined by FCC
213	// regulations.
214	// It is not required for non-US Avails.
215	// Example: "1"
216	CaptionExemption string `json:"captionExemption,omitempty"`
217
218	// CaptionIncluded: Communicating if caption file will be delivered.
219	CaptionIncluded bool `json:"captionIncluded,omitempty"`
220
221	// ContentId: Title Identifier. This should be the Title Level
222	// EIDR.
223	// Example: "10.5240/1489-49A2-3956-4B2D-FE16-5".
224	ContentId string `json:"contentId,omitempty"`
225
226	// DisplayName: The name of the studio that owns the Edit referred in
227	// the Avail.
228	// This is the equivalent of `studio_name` in other resources, but it
229	// follows
230	// the EMA nomenclature.
231	// Example: "Google Films".
232	DisplayName string `json:"displayName,omitempty"`
233
234	// EncodeId: Manifestation Identifier. This should be the
235	// Manifestation
236	// Level EIDR.
237	// Example: "10.2340/1489-49A2-3956-4B2D-FE16-7"
238	EncodeId string `json:"encodeId,omitempty"`
239
240	// End: End of term in YYYY-MM-DD format in the timezone of the
241	// country
242	// of the Avail.
243	// "Open" if no end date is available.
244	// Example: "2019-02-17"
245	End string `json:"end,omitempty"`
246
247	// EpisodeAltId: Other identifier referring to the episode, as defined
248	// by partner.
249	// Only available on TV avails.
250	// Example: "rs_googlers_s1_3".
251	EpisodeAltId string `json:"episodeAltId,omitempty"`
252
253	// EpisodeNumber: The number assigned to the episode within a
254	// season.
255	// Only available on TV Avails.
256	// Example: "3".
257	EpisodeNumber string `json:"episodeNumber,omitempty"`
258
259	// EpisodeTitleInternalAlias: OPTIONAL.TV Only. Title used by involved
260	// parties to refer to this episode.
261	// Only available on TV Avails.
262	// Example: "Coding at Google".
263	EpisodeTitleInternalAlias string `json:"episodeTitleInternalAlias,omitempty"`
264
265	// FormatProfile: Indicates the format profile covered by the
266	// transaction.
267	//
268	// Possible values:
269	//   "FORMAT_PROFILE_UNSPECIFIED" - Value could not be determined,
270	// please contact technical support if
271	// it should.
272	//   "SD" - Standard-definition format.
273	//   "HD" - High-definition format.
274	//   "UHD" - 4K UHD.
275	FormatProfile string `json:"formatProfile,omitempty"`
276
277	// LicenseType: Type of transaction.
278	//
279	// Possible values:
280	//   "LICENSE_TYPE_UNSPECIFIED" - Value could not be determined, please
281	// contact technical support if
282	// it should.
283	//   "EST" - Electronic Sell Through - purchase policy for unlimited
284	// viewing.
285	//   "VOD" - Video On Demand - rental policy for temporary viewing.
286	//   "SVOD" - Subscription Video On Demand - used for subscription
287	// platforms.
288	// Not supported on Google Play.
289	//   "POEST" - Pre-order Electronic Sell Through - pre-order purchase
290	// only window.
291	LicenseType string `json:"licenseType,omitempty"`
292
293	// PphNames: Name of the post-production houses that manage the
294	// Avail.
295	// Not part of EMA Specs.
296	PphNames []string `json:"pphNames,omitempty"`
297
298	// PriceType: Type of pricing that should be applied to this Avail
299	// based on how the partner classify them.
300	// Example: "Tier", "WSP", "SRP", or "Category".
301	PriceType string `json:"priceType,omitempty"`
302
303	// PriceValue: Value to be applied to the pricing type.
304	// Example: "4" or "2.99"
305	PriceValue string `json:"priceValue,omitempty"`
306
307	// ProductId: Edit Identifier. This should be the Edit Level
308	// EIDR.
309	// Example: "10.2340/1489-49A2-3956-4B2D-FE16-6"
310	ProductId string `json:"productId,omitempty"`
311
312	// RatingReason: Value representing the rating reason.
313	// Rating reasons should be formatted as per
314	// [EMA ratings spec](http://www.movielabs.com/md/ratings/)
315	// and comma-separated for inclusion of multiple reasons.
316	// Example: "L, S, V"
317	RatingReason string `json:"ratingReason,omitempty"`
318
319	// RatingSystem: Rating system applied to the version of title within
320	// territory
321	// of Avail.
322	// Rating systems should be formatted as per
323	// [EMA ratings spec](http://www.movielabs.com/md/ratings/)
324	// Example: "MPAA"
325	RatingSystem string `json:"ratingSystem,omitempty"`
326
327	// RatingValue: Value representing the rating.
328	// Ratings should be formatted as per
329	// http://www.movielabs.com/md/ratings/
330	// Example: "PG"
331	RatingValue string `json:"ratingValue,omitempty"`
332
333	// ReleaseDate: Release date of the Title in earliest released
334	// territory.
335	// Typically it is just the year, but it is free-form as per EMA
336	// spec.
337	// Examples: "1979", "Oct 2014"
338	ReleaseDate string `json:"releaseDate,omitempty"`
339
340	// SeasonAltId: Other identifier referring to the season, as defined by
341	// partner.
342	// Only available on TV avails.
343	// Example: "rs_googlers_s1".
344	SeasonAltId string `json:"seasonAltId,omitempty"`
345
346	// SeasonNumber: The number assigned to the season within a series.
347	// Only available on TV Avails.
348	// Example: "1".
349	SeasonNumber string `json:"seasonNumber,omitempty"`
350
351	// SeasonTitleInternalAlias: Title used by involved parties to refer to
352	// this season.
353	// Only available on TV Avails.
354	// Example: "Googlers, The".
355	SeasonTitleInternalAlias string `json:"seasonTitleInternalAlias,omitempty"`
356
357	// SeriesAltId: Other identifier referring to the series, as defined by
358	// partner.
359	// Only available on TV avails.
360	// Example: "rs_googlers".
361	SeriesAltId string `json:"seriesAltId,omitempty"`
362
363	// SeriesTitleInternalAlias: Title used by involved parties to refer to
364	// this series.
365	// Only available on TV Avails.
366	// Example: "Googlers, The".
367	SeriesTitleInternalAlias string `json:"seriesTitleInternalAlias,omitempty"`
368
369	// Start: Start of term in YYYY-MM-DD format in the timezone of
370	// the
371	// country of the Avail.
372	// Example: "2013-05-14".
373	Start string `json:"start,omitempty"`
374
375	// StoreLanguage: Spoken language of the intended audience.
376	// Language shall be encoded in accordance with RFC 5646.
377	// Example: "fr".
378	StoreLanguage string `json:"storeLanguage,omitempty"`
379
380	// SuppressionLiftDate: First date an Edit could be publically announced
381	// as becoming
382	// available at a specific future date in territory of Avail.
383	// *Not* the Avail start date or pre-order start date.
384	// Format is YYYY-MM-DD.
385	// Only available for pre-orders.
386	// Example: "2012-12-10"
387	SuppressionLiftDate string `json:"suppressionLiftDate,omitempty"`
388
389	// Territory: ISO 3166-1 alpha-2 country code for the country or
390	// territory
391	// of this Avail.
392	// For Avails, we use Territory in lieu of Country to comply with
393	// EMA specifications.
394	// But please note that Territory and Country identify the same
395	// thing.
396	// Example: "US".
397	Territory string `json:"territory,omitempty"`
398
399	// TitleInternalAlias: Title used by involved parties to refer to this
400	// content.
401	// Example: "Googlers, The".
402	// Only available on Movie Avails.
403	TitleInternalAlias string `json:"titleInternalAlias,omitempty"`
404
405	// VideoId: Google-generated ID identifying the video linked to this
406	// Avail, once
407	// delivered.
408	// Not part of EMA Specs.
409	// Example: 'gtry456_xc'
410	VideoId string `json:"videoId,omitempty"`
411
412	// WorkType: Work type as enumerated in EMA.
413	//
414	// Possible values:
415	//   "TITLE_TYPE_UNSPECIFIED" - Value could not be determined, please
416	// contact technical support if
417	// it should.
418	//   "MOVIE" - A movie picture.
419	//   "SEASON" - A season of a TV show.
420	//   "EPISODE" - An episode of a TV show.
421	//   "BUNDLE" - A collection of movies, i.e. "Googlers 1 and Googlers,
422	// the return"
423	WorkType string `json:"workType,omitempty"`
424
425	// ServerResponse contains the HTTP response code and headers from the
426	// server.
427	googleapi.ServerResponse `json:"-"`
428
429	// ForceSendFields is a list of field names (e.g. "AltId") to
430	// unconditionally include in API requests. By default, fields with
431	// empty values are omitted from API requests. However, any non-pointer,
432	// non-interface field appearing in ForceSendFields will be sent to the
433	// server regardless of whether the field is empty or not. This may be
434	// used to include empty fields in Patch requests.
435	ForceSendFields []string `json:"-"`
436
437	// NullFields is a list of field names (e.g. "AltId") to include in API
438	// requests with the JSON null value. By default, fields with empty
439	// values are omitted from API requests. However, any field with an
440	// empty value appearing in NullFields will be sent to the server as
441	// null. It is an error if a field in this list has a non-empty value.
442	// This may be used to include null fields in Patch requests.
443	NullFields []string `json:"-"`
444}
445
446func (s *Avail) MarshalJSON() ([]byte, error) {
447	type NoMethod Avail
448	raw := NoMethod(*s)
449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
450}
451
452// ListAvailsResponse: Response to the 'ListAvails' method.
453type ListAvailsResponse struct {
454	// Avails: List of Avails that match the request criteria.
455	Avails []*Avail `json:"avails,omitempty"`
456
457	// NextPageToken: See _List methods rules_ for info about this field.
458	NextPageToken string `json:"nextPageToken,omitempty"`
459
460	// TotalSize: See _List methods rules_ for more information about this
461	// field.
462	TotalSize int64 `json:"totalSize,omitempty"`
463
464	// ServerResponse contains the HTTP response code and headers from the
465	// server.
466	googleapi.ServerResponse `json:"-"`
467
468	// ForceSendFields is a list of field names (e.g. "Avails") to
469	// unconditionally include in API requests. By default, fields with
470	// empty values are omitted from API requests. However, any non-pointer,
471	// non-interface field appearing in ForceSendFields will be sent to the
472	// server regardless of whether the field is empty or not. This may be
473	// used to include empty fields in Patch requests.
474	ForceSendFields []string `json:"-"`
475
476	// NullFields is a list of field names (e.g. "Avails") to include in API
477	// requests with the JSON null value. By default, fields with empty
478	// values are omitted from API requests. However, any field with an
479	// empty value appearing in NullFields will be sent to the server as
480	// null. It is an error if a field in this list has a non-empty value.
481	// This may be used to include null fields in Patch requests.
482	NullFields []string `json:"-"`
483}
484
485func (s *ListAvailsResponse) MarshalJSON() ([]byte, error) {
486	type NoMethod ListAvailsResponse
487	raw := NoMethod(*s)
488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
489}
490
491// ListOrdersResponse: Response to the 'ListOrders' method.
492type ListOrdersResponse struct {
493	// NextPageToken: See _List methods rules_ for info about this field.
494	NextPageToken string `json:"nextPageToken,omitempty"`
495
496	// Orders: List of Orders that match the request criteria.
497	Orders []*Order `json:"orders,omitempty"`
498
499	// TotalSize: See _List methods rules_ for more information about this
500	// field.
501	TotalSize int64 `json:"totalSize,omitempty"`
502
503	// ServerResponse contains the HTTP response code and headers from the
504	// server.
505	googleapi.ServerResponse `json:"-"`
506
507	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
508	// unconditionally include in API requests. By default, fields with
509	// empty values are omitted from API requests. However, any non-pointer,
510	// non-interface field appearing in ForceSendFields will be sent to the
511	// server regardless of whether the field is empty or not. This may be
512	// used to include empty fields in Patch requests.
513	ForceSendFields []string `json:"-"`
514
515	// NullFields is a list of field names (e.g. "NextPageToken") to include
516	// in API requests with the JSON null value. By default, fields with
517	// empty values are omitted from API requests. However, any field with
518	// an empty value appearing in NullFields will be sent to the server as
519	// null. It is an error if a field in this list has a non-empty value.
520	// This may be used to include null fields in Patch requests.
521	NullFields []string `json:"-"`
522}
523
524func (s *ListOrdersResponse) MarshalJSON() ([]byte, error) {
525	type NoMethod ListOrdersResponse
526	raw := NoMethod(*s)
527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
528}
529
530// ListStoreInfosResponse: Response to the 'ListStoreInfos' method.
531type ListStoreInfosResponse struct {
532	// NextPageToken: See 'List methods rules' for info about this field.
533	NextPageToken string `json:"nextPageToken,omitempty"`
534
535	// StoreInfos: List of StoreInfos that match the request criteria.
536	StoreInfos []*StoreInfo `json:"storeInfos,omitempty"`
537
538	// TotalSize: See _List methods rules_ for more information about this
539	// field.
540	TotalSize int64 `json:"totalSize,omitempty"`
541
542	// ServerResponse contains the HTTP response code and headers from the
543	// server.
544	googleapi.ServerResponse `json:"-"`
545
546	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
547	// unconditionally include in API requests. By default, fields with
548	// empty values are omitted from API requests. However, any non-pointer,
549	// non-interface field appearing in ForceSendFields will be sent to the
550	// server regardless of whether the field is empty or not. This may be
551	// used to include empty fields in Patch requests.
552	ForceSendFields []string `json:"-"`
553
554	// NullFields is a list of field names (e.g. "NextPageToken") to include
555	// in API requests with the JSON null value. By default, fields with
556	// empty values are omitted from API requests. However, any field with
557	// an empty value appearing in NullFields will be sent to the server as
558	// null. It is an error if a field in this list has a non-empty value.
559	// This may be used to include null fields in Patch requests.
560	NullFields []string `json:"-"`
561}
562
563func (s *ListStoreInfosResponse) MarshalJSON() ([]byte, error) {
564	type NoMethod ListStoreInfosResponse
565	raw := NoMethod(*s)
566	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
567}
568
569// Order: An Order tracks the fulfillment of an Edit when delivered
570// using the
571// legacy, non-component-based delivery.
572//
573// Each Order is uniquely identified by an `order_id`, which is
574// generated
575// by Google.
576//
577// Externally, Orders can also be identified by partners using its
578// `custom_id`
579// (when provided).
580type Order struct {
581	// ApprovedTime: Timestamp when the Order was approved.
582	ApprovedTime string `json:"approvedTime,omitempty"`
583
584	// ChannelId: YouTube Channel ID that should be used to fulfill the
585	// Order.
586	// Example: "UCRG64darCZhb".
587	ChannelId string `json:"channelId,omitempty"`
588
589	// ChannelName: YouTube Channel Name that should be used to fulfill the
590	// Order.
591	// Example: "Google_channel".
592	ChannelName string `json:"channelName,omitempty"`
593
594	// Countries: Countries where the Order is available,
595	// using the "ISO 3166-1 alpha-2" format (example: "US").
596	Countries []string `json:"countries,omitempty"`
597
598	// CustomId: ID that can be used to externally identify an Order.
599	// This ID is provided by partners when submitting the Avails.
600	// Example: 'GOOGLER_2006'
601	CustomId string `json:"customId,omitempty"`
602
603	// EarliestAvailStartTime: Timestamp of the earliest start date of the
604	// Avails
605	// linked to this Order.
606	EarliestAvailStartTime string `json:"earliestAvailStartTime,omitempty"`
607
608	// EpisodeName: Default Episode name,
609	// usually in the language of the country of origin.
610	// Only available for TV Edits
611	// Example: "Googlers, The - Pilot".
612	EpisodeName string `json:"episodeName,omitempty"`
613
614	// LegacyPriority: Legacy Order priority, as defined by Google.
615	// Example: 'P0'
616	LegacyPriority string `json:"legacyPriority,omitempty"`
617
618	// Name: Default Edit name,
619	// usually in the language of the country of origin.
620	// Example: "Googlers, The".
621	Name string `json:"name,omitempty"`
622
623	// NormalizedPriority: A simpler representation of the priority.
624	//
625	// Possible values:
626	//   "NORMALIZED_PRIORITY_UNSPECIFIED" - Value could not be determined,
627	// please contact technical support if
628	// it should.
629	//   "LOW_PRIORITY" - A low-priority asset, typically from a library
630	// movie.
631	//   "HIGH_PRIORITY" - A high-priority asset, typically from a new
632	// release or box office hit.
633	NormalizedPriority string `json:"normalizedPriority,omitempty"`
634
635	// OrderId: ID internally generated by Google to uniquely identify an
636	// Order.
637	// Example: 'abcde12_x'
638	OrderId string `json:"orderId,omitempty"`
639
640	// OrderedTime: Timestamp when the Order was created.
641	OrderedTime string `json:"orderedTime,omitempty"`
642
643	// PphName: Name of the post-production house that manages the Edit
644	// ordered.
645	PphName string `json:"pphName,omitempty"`
646
647	// Priority: Order priority, as defined by Google.
648	// The higher the value, the higher the priority.
649	// Example: 90
650	Priority float64 `json:"priority,omitempty"`
651
652	// ReceivedTime: Timestamp when the Order was fulfilled.
653	ReceivedTime string `json:"receivedTime,omitempty"`
654
655	// RejectionNote: Field explaining why an Order has been
656	// rejected.
657	// Example: "Trailer audio is 2ch mono, please re-deliver in stereo".
658	RejectionNote string `json:"rejectionNote,omitempty"`
659
660	// SeasonName: Default Season name,
661	// usually in the language of the country of origin.
662	// Only available for TV Edits
663	// Example: "Googlers, The - A Brave New World".
664	SeasonName string `json:"seasonName,omitempty"`
665
666	// ShowName: Default Show name,
667	// usually in the language of the country of origin.
668	// Only available for TV Edits
669	// Example: "Googlers, The".
670	ShowName string `json:"showName,omitempty"`
671
672	// Status: High-level status of the order.
673	//
674	// Possible values:
675	//   "STATUS_UNSPECIFIED" - Value could not be determined, please
676	// contact technical support if
677	// it should.
678	//   "STATUS_APPROVED" - Approved by Google.
679	//   "STATUS_FAILED" - Waiting for partner to re-deliver the asset after
680	// a rejection by Google.
681	//   "STATUS_PROCESSING" - Waiting for Google to process the asset.
682	//   "STATUS_UNFULFILLED" - Waiting for partner to deliver the asset.
683	//   "STATUS_NOT_AVAILABLE" - Used when Status is not available (i.e:
684	// Orders for TV Seasons).
685	Status string `json:"status,omitempty"`
686
687	// StatusDetail: Detailed status of the order
688	//
689	// Possible values:
690	//   "ORDER_STATUS_UNSPECIFIED" - Value could not be determined, please
691	// contact technical support if
692	// it should.
693	//   "ORDER_STATUS_QC_APPROVED" - Approved by Google's Quality Control
694	// team.
695	//   "ORDER_STATUS_QC_REJECTION" - Rejected by Google's Quality Control
696	// team, pending partner redelivery.
697	//   "ORDER_STATUS_INTERNAL_FIX" - Internal error while processing the
698	// Order.
699	//   "ORDER_STATUS_OPEN_ORDER" - Waiting for initial delivery from
700	// partner.
701	//   "ORDER_STATUS_NOT_AVAILABLE" - Used on Orders that do not have
702	// Status, like TV Seasons.
703	//   "ORDER_STATUS_AWAITING_REDELIVERY" - Waiting for re-delivery from
704	// partner.
705	//   "ORDER_STATUS_READY_FOR_QC" - Asset was delivered by partner, but
706	// is being reviewed by Google's
707	// Quality Control team.
708	//   "ORDER_STATUS_FILE_PROCESSING" - Waiting for Google to process the
709	// asset.
710	StatusDetail string `json:"statusDetail,omitempty"`
711
712	// StudioName: Name of the studio that owns the Edit ordered.
713	StudioName string `json:"studioName,omitempty"`
714
715	// Type: Type of the Edit linked to the Order.
716	//
717	// Possible values:
718	//   "TITLE_TYPE_UNSPECIFIED" - Value could not be determined, please
719	// contact technical support if
720	// it should.
721	//   "MOVIE" - A movie picture.
722	//   "SEASON" - A season of a TV show.
723	//   "EPISODE" - An episode of a TV show.
724	//   "BUNDLE" - A collection of movies, i.e. "Googlers 1 and Googlers,
725	// the return"
726	Type string `json:"type,omitempty"`
727
728	// VideoId: Google-generated ID identifying the video linked to this
729	// Order, once
730	// delivered.
731	// Example: 'gtry456_xc'.
732	VideoId string `json:"videoId,omitempty"`
733
734	// ServerResponse contains the HTTP response code and headers from the
735	// server.
736	googleapi.ServerResponse `json:"-"`
737
738	// ForceSendFields is a list of field names (e.g. "ApprovedTime") to
739	// unconditionally include in API requests. By default, fields with
740	// empty values are omitted from API requests. However, any non-pointer,
741	// non-interface field appearing in ForceSendFields will be sent to the
742	// server regardless of whether the field is empty or not. This may be
743	// used to include empty fields in Patch requests.
744	ForceSendFields []string `json:"-"`
745
746	// NullFields is a list of field names (e.g. "ApprovedTime") to include
747	// in API requests with the JSON null value. By default, fields with
748	// empty values are omitted from API requests. However, any field with
749	// an empty value appearing in NullFields will be sent to the server as
750	// null. It is an error if a field in this list has a non-empty value.
751	// This may be used to include null fields in Patch requests.
752	NullFields []string `json:"-"`
753}
754
755func (s *Order) MarshalJSON() ([]byte, error) {
756	type NoMethod Order
757	raw := NoMethod(*s)
758	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
759}
760
761func (s *Order) UnmarshalJSON(data []byte) error {
762	type NoMethod Order
763	var s1 struct {
764		Priority gensupport.JSONFloat64 `json:"priority"`
765		*NoMethod
766	}
767	s1.NoMethod = (*NoMethod)(s)
768	if err := json.Unmarshal(data, &s1); err != nil {
769		return err
770	}
771	s.Priority = float64(s1.Priority)
772	return nil
773}
774
775// StoreInfo: Information about a playable sequence (video) associated
776// with an Edit
777// and available at the Google Play Store.
778//
779// Internally, each StoreInfo is uniquely identified by a `video_id`
780// and `country`.
781//
782// Externally, Title-level EIDR or Edit-level EIDR, if provided,
783// can also be used to identify a specific title or edit in a country.
784type StoreInfo struct {
785	// AudioTracks: Audio tracks available for this Edit.
786	AudioTracks []string `json:"audioTracks,omitempty"`
787
788	// Country: Country where Edit is available in ISO 3166-1 alpha-2
789	// country
790	// code.
791	// Example: "US".
792	Country string `json:"country,omitempty"`
793
794	// EditLevelEidr: Edit-level EIDR ID.
795	// Example: "10.5240/1489-49A2-3956-4B2D-FE16-6".
796	EditLevelEidr string `json:"editLevelEidr,omitempty"`
797
798	// EpisodeNumber: The number assigned to the episode within a
799	// season.
800	// Only available on TV Edits.
801	// Example: "1".
802	EpisodeNumber string `json:"episodeNumber,omitempty"`
803
804	// HasAudio51: Whether the Edit has a 5.1 channel audio track.
805	HasAudio51 bool `json:"hasAudio51,omitempty"`
806
807	// HasEstOffer: Whether the Edit has a EST offer.
808	HasEstOffer bool `json:"hasEstOffer,omitempty"`
809
810	// HasHdOffer: Whether the Edit has a HD offer.
811	HasHdOffer bool `json:"hasHdOffer,omitempty"`
812
813	// HasInfoCards: Whether the Edit has info cards.
814	HasInfoCards bool `json:"hasInfoCards,omitempty"`
815
816	// HasSdOffer: Whether the Edit has a SD offer.
817	HasSdOffer bool `json:"hasSdOffer,omitempty"`
818
819	// HasVodOffer: Whether the Edit has a VOD offer.
820	HasVodOffer bool `json:"hasVodOffer,omitempty"`
821
822	// LiveTime: Timestamp when the Edit went live on the Store.
823	LiveTime string `json:"liveTime,omitempty"`
824
825	// Mid: Knowledge Graph ID associated to this Edit, if available.
826	// This ID links the Edit to its knowledge entity, externally
827	// accessible
828	// at http://freebase.com.
829	// In the absense of Title EIDR or Edit EIDR, this ID helps link
830	// together
831	// multiple Edits across countries.
832	// Example: '/m/0ffx29'
833	Mid string `json:"mid,omitempty"`
834
835	// Name: Default Edit name, usually in the language of the country
836	// of
837	// origin.
838	// Example: "Googlers, The".
839	Name string `json:"name,omitempty"`
840
841	// PphNames: Name of the post-production houses that manage the Edit.
842	PphNames []string `json:"pphNames,omitempty"`
843
844	// SeasonId: Google-generated ID identifying the season linked to the
845	// Edit.
846	// Only available for TV Edits.
847	// Example: 'ster23ex'
848	SeasonId string `json:"seasonId,omitempty"`
849
850	// SeasonName: Default Season name, usually in the language of the
851	// country of
852	// origin.
853	// Only available for TV Edits
854	// Example: "Googlers, The - A Brave New World".
855	SeasonName string `json:"seasonName,omitempty"`
856
857	// SeasonNumber: The number assigned to the season within a show.
858	// Only available on TV Edits.
859	// Example: "1".
860	SeasonNumber string `json:"seasonNumber,omitempty"`
861
862	// ShowId: Google-generated ID identifying the show linked to the
863	// Edit.
864	// Only available for TV Edits.
865	// Example: 'et2hsue_x'
866	ShowId string `json:"showId,omitempty"`
867
868	// ShowName: Default Show name, usually in the language of the country
869	// of
870	// origin.
871	// Only available for TV Edits
872	// Example: "Googlers, The".
873	ShowName string `json:"showName,omitempty"`
874
875	// StudioName: Name of the studio that owns the Edit ordered.
876	StudioName string `json:"studioName,omitempty"`
877
878	// Subtitles: Subtitles available for this Edit.
879	Subtitles []string `json:"subtitles,omitempty"`
880
881	// TitleLevelEidr: Title-level EIDR ID.
882	// Example: "10.5240/1489-49A2-3956-4B2D-FE16-5".
883	TitleLevelEidr string `json:"titleLevelEidr,omitempty"`
884
885	// TrailerId: Google-generated ID identifying the trailer linked to the
886	// Edit.
887	// Example: 'bhd_4e_cx'
888	TrailerId string `json:"trailerId,omitempty"`
889
890	// Type: Edit type, like Movie, Episode or Season.
891	//
892	// Possible values:
893	//   "TITLE_TYPE_UNSPECIFIED" - Value could not be determined, please
894	// contact technical support if
895	// it should.
896	//   "MOVIE" - A movie picture.
897	//   "SEASON" - A season of a TV show.
898	//   "EPISODE" - An episode of a TV show.
899	//   "BUNDLE" - A collection of movies, i.e. "Googlers 1 and Googlers,
900	// the return"
901	Type string `json:"type,omitempty"`
902
903	// VideoId: Google-generated ID identifying the video linked to the
904	// Edit.
905	// Example: 'gtry456_xc'
906	VideoId string `json:"videoId,omitempty"`
907
908	// ServerResponse contains the HTTP response code and headers from the
909	// server.
910	googleapi.ServerResponse `json:"-"`
911
912	// ForceSendFields is a list of field names (e.g. "AudioTracks") to
913	// unconditionally include in API requests. By default, fields with
914	// empty values are omitted from API requests. However, any non-pointer,
915	// non-interface field appearing in ForceSendFields will be sent to the
916	// server regardless of whether the field is empty or not. This may be
917	// used to include empty fields in Patch requests.
918	ForceSendFields []string `json:"-"`
919
920	// NullFields is a list of field names (e.g. "AudioTracks") to include
921	// in API requests with the JSON null value. By default, fields with
922	// empty values are omitted from API requests. However, any field with
923	// an empty value appearing in NullFields will be sent to the server as
924	// null. It is an error if a field in this list has a non-empty value.
925	// This may be used to include null fields in Patch requests.
926	NullFields []string `json:"-"`
927}
928
929func (s *StoreInfo) MarshalJSON() ([]byte, error) {
930	type NoMethod StoreInfo
931	raw := NoMethod(*s)
932	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
933}
934
935// method id "playmoviespartner.accounts.avails.get":
936
937type AccountsAvailsGetCall struct {
938	s            *Service
939	accountId    string
940	availId      string
941	urlParams_   gensupport.URLParams
942	ifNoneMatch_ string
943	ctx_         context.Context
944	header_      http.Header
945}
946
947// Get: Get an Avail given its avail group id and avail id.
948func (r *AccountsAvailsService) Get(accountId string, availId string) *AccountsAvailsGetCall {
949	c := &AccountsAvailsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
950	c.accountId = accountId
951	c.availId = availId
952	return c
953}
954
955// Fields allows partial responses to be retrieved. See
956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
957// for more information.
958func (c *AccountsAvailsGetCall) Fields(s ...googleapi.Field) *AccountsAvailsGetCall {
959	c.urlParams_.Set("fields", googleapi.CombineFields(s))
960	return c
961}
962
963// IfNoneMatch sets the optional parameter which makes the operation
964// fail if the object's ETag matches the given value. This is useful for
965// getting updates only after the object has changed since the last
966// request. Use googleapi.IsNotModified to check whether the response
967// error from Do is the result of In-None-Match.
968func (c *AccountsAvailsGetCall) IfNoneMatch(entityTag string) *AccountsAvailsGetCall {
969	c.ifNoneMatch_ = entityTag
970	return c
971}
972
973// Context sets the context to be used in this call's Do method. Any
974// pending HTTP request will be aborted if the provided context is
975// canceled.
976func (c *AccountsAvailsGetCall) Context(ctx context.Context) *AccountsAvailsGetCall {
977	c.ctx_ = ctx
978	return c
979}
980
981// Header returns an http.Header that can be modified by the caller to
982// add HTTP headers to the request.
983func (c *AccountsAvailsGetCall) Header() http.Header {
984	if c.header_ == nil {
985		c.header_ = make(http.Header)
986	}
987	return c.header_
988}
989
990func (c *AccountsAvailsGetCall) doRequest(alt string) (*http.Response, error) {
991	reqHeaders := make(http.Header)
992	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
993	for k, v := range c.header_ {
994		reqHeaders[k] = v
995	}
996	reqHeaders.Set("User-Agent", c.s.userAgent())
997	if c.ifNoneMatch_ != "" {
998		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
999	}
1000	var body io.Reader = nil
1001	c.urlParams_.Set("alt", alt)
1002	c.urlParams_.Set("prettyPrint", "false")
1003	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/accounts/{accountId}/avails/{availId}")
1004	urls += "?" + c.urlParams_.Encode()
1005	req, err := http.NewRequest("GET", urls, body)
1006	if err != nil {
1007		return nil, err
1008	}
1009	req.Header = reqHeaders
1010	googleapi.Expand(req.URL, map[string]string{
1011		"accountId": c.accountId,
1012		"availId":   c.availId,
1013	})
1014	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1015}
1016
1017// Do executes the "playmoviespartner.accounts.avails.get" call.
1018// Exactly one of *Avail or error will be non-nil. Any non-2xx status
1019// code is an error. Response headers are in either
1020// *Avail.ServerResponse.Header or (if a response was returned at all)
1021// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1022// check whether the returned error was because http.StatusNotModified
1023// was returned.
1024func (c *AccountsAvailsGetCall) Do(opts ...googleapi.CallOption) (*Avail, error) {
1025	gensupport.SetOptions(c.urlParams_, opts...)
1026	res, err := c.doRequest("json")
1027	if res != nil && res.StatusCode == http.StatusNotModified {
1028		if res.Body != nil {
1029			res.Body.Close()
1030		}
1031		return nil, &googleapi.Error{
1032			Code:   res.StatusCode,
1033			Header: res.Header,
1034		}
1035	}
1036	if err != nil {
1037		return nil, err
1038	}
1039	defer googleapi.CloseBody(res)
1040	if err := googleapi.CheckResponse(res); err != nil {
1041		return nil, err
1042	}
1043	ret := &Avail{
1044		ServerResponse: googleapi.ServerResponse{
1045			Header:         res.Header,
1046			HTTPStatusCode: res.StatusCode,
1047		},
1048	}
1049	target := &ret
1050	if err := gensupport.DecodeResponse(target, res); err != nil {
1051		return nil, err
1052	}
1053	return ret, nil
1054	// {
1055	//   "description": "Get an Avail given its avail group id and avail id.",
1056	//   "flatPath": "v1/accounts/{accountId}/avails/{availId}",
1057	//   "httpMethod": "GET",
1058	//   "id": "playmoviespartner.accounts.avails.get",
1059	//   "parameterOrder": [
1060	//     "accountId",
1061	//     "availId"
1062	//   ],
1063	//   "parameters": {
1064	//     "accountId": {
1065	//       "description": "REQUIRED. See _General rules_ for more information about this field.",
1066	//       "location": "path",
1067	//       "required": true,
1068	//       "type": "string"
1069	//     },
1070	//     "availId": {
1071	//       "description": "REQUIRED. Avail ID.",
1072	//       "location": "path",
1073	//       "required": true,
1074	//       "type": "string"
1075	//     }
1076	//   },
1077	//   "path": "v1/accounts/{accountId}/avails/{availId}",
1078	//   "response": {
1079	//     "$ref": "Avail"
1080	//   },
1081	//   "scopes": [
1082	//     "https://www.googleapis.com/auth/playmovies_partner.readonly"
1083	//   ]
1084	// }
1085
1086}
1087
1088// method id "playmoviespartner.accounts.avails.list":
1089
1090type AccountsAvailsListCall struct {
1091	s            *Service
1092	accountId    string
1093	urlParams_   gensupport.URLParams
1094	ifNoneMatch_ string
1095	ctx_         context.Context
1096	header_      http.Header
1097}
1098
1099// List: List Avails owned or managed by the partner.
1100//
1101// See _Authentication and Authorization rules_ and
1102// _List methods rules_ for more information about this method.
1103func (r *AccountsAvailsService) List(accountId string) *AccountsAvailsListCall {
1104	c := &AccountsAvailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1105	c.accountId = accountId
1106	return c
1107}
1108
1109// AltId sets the optional parameter "altId": Filter Avails that match a
1110// case-insensitive, partner-specific custom id.
1111// NOTE: this field is deprecated and will be removed on V2;
1112// `alt_ids`
1113// should be used instead.
1114func (c *AccountsAvailsListCall) AltId(altId string) *AccountsAvailsListCall {
1115	c.urlParams_.Set("altId", altId)
1116	return c
1117}
1118
1119// AltIds sets the optional parameter "altIds": Filter Avails that match
1120// (case-insensitive) any of the given partner-specific custom ids.
1121func (c *AccountsAvailsListCall) AltIds(altIds ...string) *AccountsAvailsListCall {
1122	c.urlParams_.SetMulti("altIds", append([]string{}, altIds...))
1123	return c
1124}
1125
1126// PageSize sets the optional parameter "pageSize": See _List methods
1127// rules_ for info about this field.
1128func (c *AccountsAvailsListCall) PageSize(pageSize int64) *AccountsAvailsListCall {
1129	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1130	return c
1131}
1132
1133// PageToken sets the optional parameter "pageToken": See _List methods
1134// rules_ for info about this field.
1135func (c *AccountsAvailsListCall) PageToken(pageToken string) *AccountsAvailsListCall {
1136	c.urlParams_.Set("pageToken", pageToken)
1137	return c
1138}
1139
1140// PphNames sets the optional parameter "pphNames": See _List methods
1141// rules_ for info about this field.
1142func (c *AccountsAvailsListCall) PphNames(pphNames ...string) *AccountsAvailsListCall {
1143	c.urlParams_.SetMulti("pphNames", append([]string{}, pphNames...))
1144	return c
1145}
1146
1147// StudioNames sets the optional parameter "studioNames": See _List
1148// methods rules_ for info about this field.
1149func (c *AccountsAvailsListCall) StudioNames(studioNames ...string) *AccountsAvailsListCall {
1150	c.urlParams_.SetMulti("studioNames", append([]string{}, studioNames...))
1151	return c
1152}
1153
1154// Territories sets the optional parameter "territories": Filter Avails
1155// that match (case-insensitive) any of the given country codes,
1156// using the "ISO 3166-1 alpha-2" format (examples: "US", "us", "Us").
1157func (c *AccountsAvailsListCall) Territories(territories ...string) *AccountsAvailsListCall {
1158	c.urlParams_.SetMulti("territories", append([]string{}, territories...))
1159	return c
1160}
1161
1162// Title sets the optional parameter "title": Filter that matches Avails
1163// with a `title_internal_alias`,
1164// `series_title_internal_alias`, `season_title_internal_alias`,
1165// or `episode_title_internal_alias` that contains the
1166// given
1167// case-insensitive title.
1168func (c *AccountsAvailsListCall) Title(title string) *AccountsAvailsListCall {
1169	c.urlParams_.Set("title", title)
1170	return c
1171}
1172
1173// VideoIds sets the optional parameter "videoIds": Filter Avails that
1174// match any of the given `video_id`s.
1175func (c *AccountsAvailsListCall) VideoIds(videoIds ...string) *AccountsAvailsListCall {
1176	c.urlParams_.SetMulti("videoIds", append([]string{}, videoIds...))
1177	return c
1178}
1179
1180// Fields allows partial responses to be retrieved. See
1181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1182// for more information.
1183func (c *AccountsAvailsListCall) Fields(s ...googleapi.Field) *AccountsAvailsListCall {
1184	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1185	return c
1186}
1187
1188// IfNoneMatch sets the optional parameter which makes the operation
1189// fail if the object's ETag matches the given value. This is useful for
1190// getting updates only after the object has changed since the last
1191// request. Use googleapi.IsNotModified to check whether the response
1192// error from Do is the result of In-None-Match.
1193func (c *AccountsAvailsListCall) IfNoneMatch(entityTag string) *AccountsAvailsListCall {
1194	c.ifNoneMatch_ = entityTag
1195	return c
1196}
1197
1198// Context sets the context to be used in this call's Do method. Any
1199// pending HTTP request will be aborted if the provided context is
1200// canceled.
1201func (c *AccountsAvailsListCall) Context(ctx context.Context) *AccountsAvailsListCall {
1202	c.ctx_ = ctx
1203	return c
1204}
1205
1206// Header returns an http.Header that can be modified by the caller to
1207// add HTTP headers to the request.
1208func (c *AccountsAvailsListCall) Header() http.Header {
1209	if c.header_ == nil {
1210		c.header_ = make(http.Header)
1211	}
1212	return c.header_
1213}
1214
1215func (c *AccountsAvailsListCall) doRequest(alt string) (*http.Response, error) {
1216	reqHeaders := make(http.Header)
1217	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1218	for k, v := range c.header_ {
1219		reqHeaders[k] = v
1220	}
1221	reqHeaders.Set("User-Agent", c.s.userAgent())
1222	if c.ifNoneMatch_ != "" {
1223		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1224	}
1225	var body io.Reader = nil
1226	c.urlParams_.Set("alt", alt)
1227	c.urlParams_.Set("prettyPrint", "false")
1228	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/accounts/{accountId}/avails")
1229	urls += "?" + c.urlParams_.Encode()
1230	req, err := http.NewRequest("GET", urls, body)
1231	if err != nil {
1232		return nil, err
1233	}
1234	req.Header = reqHeaders
1235	googleapi.Expand(req.URL, map[string]string{
1236		"accountId": c.accountId,
1237	})
1238	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1239}
1240
1241// Do executes the "playmoviespartner.accounts.avails.list" call.
1242// Exactly one of *ListAvailsResponse or error will be non-nil. Any
1243// non-2xx status code is an error. Response headers are in either
1244// *ListAvailsResponse.ServerResponse.Header or (if a response was
1245// returned at all) in error.(*googleapi.Error).Header. Use
1246// googleapi.IsNotModified to check whether the returned error was
1247// because http.StatusNotModified was returned.
1248func (c *AccountsAvailsListCall) Do(opts ...googleapi.CallOption) (*ListAvailsResponse, error) {
1249	gensupport.SetOptions(c.urlParams_, opts...)
1250	res, err := c.doRequest("json")
1251	if res != nil && res.StatusCode == http.StatusNotModified {
1252		if res.Body != nil {
1253			res.Body.Close()
1254		}
1255		return nil, &googleapi.Error{
1256			Code:   res.StatusCode,
1257			Header: res.Header,
1258		}
1259	}
1260	if err != nil {
1261		return nil, err
1262	}
1263	defer googleapi.CloseBody(res)
1264	if err := googleapi.CheckResponse(res); err != nil {
1265		return nil, err
1266	}
1267	ret := &ListAvailsResponse{
1268		ServerResponse: googleapi.ServerResponse{
1269			Header:         res.Header,
1270			HTTPStatusCode: res.StatusCode,
1271		},
1272	}
1273	target := &ret
1274	if err := gensupport.DecodeResponse(target, res); err != nil {
1275		return nil, err
1276	}
1277	return ret, nil
1278	// {
1279	//   "description": "List Avails owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.",
1280	//   "flatPath": "v1/accounts/{accountId}/avails",
1281	//   "httpMethod": "GET",
1282	//   "id": "playmoviespartner.accounts.avails.list",
1283	//   "parameterOrder": [
1284	//     "accountId"
1285	//   ],
1286	//   "parameters": {
1287	//     "accountId": {
1288	//       "description": "REQUIRED. See _General rules_ for more information about this field.",
1289	//       "location": "path",
1290	//       "required": true,
1291	//       "type": "string"
1292	//     },
1293	//     "altId": {
1294	//       "description": "Filter Avails that match a case-insensitive, partner-specific custom id.\nNOTE: this field is deprecated and will be removed on V2; `alt_ids`\nshould be used instead.",
1295	//       "location": "query",
1296	//       "type": "string"
1297	//     },
1298	//     "altIds": {
1299	//       "description": "Filter Avails that match (case-insensitive) any of the given partner-specific custom ids.",
1300	//       "location": "query",
1301	//       "repeated": true,
1302	//       "type": "string"
1303	//     },
1304	//     "pageSize": {
1305	//       "description": "See _List methods rules_ for info about this field.",
1306	//       "format": "int32",
1307	//       "location": "query",
1308	//       "type": "integer"
1309	//     },
1310	//     "pageToken": {
1311	//       "description": "See _List methods rules_ for info about this field.",
1312	//       "location": "query",
1313	//       "type": "string"
1314	//     },
1315	//     "pphNames": {
1316	//       "description": "See _List methods rules_ for info about this field.",
1317	//       "location": "query",
1318	//       "repeated": true,
1319	//       "type": "string"
1320	//     },
1321	//     "studioNames": {
1322	//       "description": "See _List methods rules_ for info about this field.",
1323	//       "location": "query",
1324	//       "repeated": true,
1325	//       "type": "string"
1326	//     },
1327	//     "territories": {
1328	//       "description": "Filter Avails that match (case-insensitive) any of the given country codes,\nusing the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").",
1329	//       "location": "query",
1330	//       "repeated": true,
1331	//       "type": "string"
1332	//     },
1333	//     "title": {
1334	//       "description": "Filter that matches Avails with a `title_internal_alias`,\n`series_title_internal_alias`, `season_title_internal_alias`,\nor `episode_title_internal_alias` that contains the given\ncase-insensitive title.",
1335	//       "location": "query",
1336	//       "type": "string"
1337	//     },
1338	//     "videoIds": {
1339	//       "description": "Filter Avails that match any of the given `video_id`s.",
1340	//       "location": "query",
1341	//       "repeated": true,
1342	//       "type": "string"
1343	//     }
1344	//   },
1345	//   "path": "v1/accounts/{accountId}/avails",
1346	//   "response": {
1347	//     "$ref": "ListAvailsResponse"
1348	//   },
1349	//   "scopes": [
1350	//     "https://www.googleapis.com/auth/playmovies_partner.readonly"
1351	//   ]
1352	// }
1353
1354}
1355
1356// Pages invokes f for each page of results.
1357// A non-nil error returned from f will halt the iteration.
1358// The provided context supersedes any context provided to the Context method.
1359func (c *AccountsAvailsListCall) Pages(ctx context.Context, f func(*ListAvailsResponse) error) error {
1360	c.ctx_ = ctx
1361	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1362	for {
1363		x, err := c.Do()
1364		if err != nil {
1365			return err
1366		}
1367		if err := f(x); err != nil {
1368			return err
1369		}
1370		if x.NextPageToken == "" {
1371			return nil
1372		}
1373		c.PageToken(x.NextPageToken)
1374	}
1375}
1376
1377// method id "playmoviespartner.accounts.orders.get":
1378
1379type AccountsOrdersGetCall struct {
1380	s            *Service
1381	accountId    string
1382	orderId      string
1383	urlParams_   gensupport.URLParams
1384	ifNoneMatch_ string
1385	ctx_         context.Context
1386	header_      http.Header
1387}
1388
1389// Get: Get an Order given its id.
1390//
1391// See _Authentication and Authorization rules_ and
1392// _Get methods rules_ for more information about this method.
1393func (r *AccountsOrdersService) Get(accountId string, orderId string) *AccountsOrdersGetCall {
1394	c := &AccountsOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1395	c.accountId = accountId
1396	c.orderId = orderId
1397	return c
1398}
1399
1400// Fields allows partial responses to be retrieved. See
1401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1402// for more information.
1403func (c *AccountsOrdersGetCall) Fields(s ...googleapi.Field) *AccountsOrdersGetCall {
1404	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1405	return c
1406}
1407
1408// IfNoneMatch sets the optional parameter which makes the operation
1409// fail if the object's ETag matches the given value. This is useful for
1410// getting updates only after the object has changed since the last
1411// request. Use googleapi.IsNotModified to check whether the response
1412// error from Do is the result of In-None-Match.
1413func (c *AccountsOrdersGetCall) IfNoneMatch(entityTag string) *AccountsOrdersGetCall {
1414	c.ifNoneMatch_ = entityTag
1415	return c
1416}
1417
1418// Context sets the context to be used in this call's Do method. Any
1419// pending HTTP request will be aborted if the provided context is
1420// canceled.
1421func (c *AccountsOrdersGetCall) Context(ctx context.Context) *AccountsOrdersGetCall {
1422	c.ctx_ = ctx
1423	return c
1424}
1425
1426// Header returns an http.Header that can be modified by the caller to
1427// add HTTP headers to the request.
1428func (c *AccountsOrdersGetCall) Header() http.Header {
1429	if c.header_ == nil {
1430		c.header_ = make(http.Header)
1431	}
1432	return c.header_
1433}
1434
1435func (c *AccountsOrdersGetCall) doRequest(alt string) (*http.Response, error) {
1436	reqHeaders := make(http.Header)
1437	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1438	for k, v := range c.header_ {
1439		reqHeaders[k] = v
1440	}
1441	reqHeaders.Set("User-Agent", c.s.userAgent())
1442	if c.ifNoneMatch_ != "" {
1443		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1444	}
1445	var body io.Reader = nil
1446	c.urlParams_.Set("alt", alt)
1447	c.urlParams_.Set("prettyPrint", "false")
1448	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/accounts/{accountId}/orders/{orderId}")
1449	urls += "?" + c.urlParams_.Encode()
1450	req, err := http.NewRequest("GET", urls, body)
1451	if err != nil {
1452		return nil, err
1453	}
1454	req.Header = reqHeaders
1455	googleapi.Expand(req.URL, map[string]string{
1456		"accountId": c.accountId,
1457		"orderId":   c.orderId,
1458	})
1459	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1460}
1461
1462// Do executes the "playmoviespartner.accounts.orders.get" call.
1463// Exactly one of *Order or error will be non-nil. Any non-2xx status
1464// code is an error. Response headers are in either
1465// *Order.ServerResponse.Header or (if a response was returned at all)
1466// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1467// check whether the returned error was because http.StatusNotModified
1468// was returned.
1469func (c *AccountsOrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
1470	gensupport.SetOptions(c.urlParams_, opts...)
1471	res, err := c.doRequest("json")
1472	if res != nil && res.StatusCode == http.StatusNotModified {
1473		if res.Body != nil {
1474			res.Body.Close()
1475		}
1476		return nil, &googleapi.Error{
1477			Code:   res.StatusCode,
1478			Header: res.Header,
1479		}
1480	}
1481	if err != nil {
1482		return nil, err
1483	}
1484	defer googleapi.CloseBody(res)
1485	if err := googleapi.CheckResponse(res); err != nil {
1486		return nil, err
1487	}
1488	ret := &Order{
1489		ServerResponse: googleapi.ServerResponse{
1490			Header:         res.Header,
1491			HTTPStatusCode: res.StatusCode,
1492		},
1493	}
1494	target := &ret
1495	if err := gensupport.DecodeResponse(target, res); err != nil {
1496		return nil, err
1497	}
1498	return ret, nil
1499	// {
1500	//   "description": "Get an Order given its id.\n\nSee _Authentication and Authorization rules_ and\n_Get methods rules_ for more information about this method.",
1501	//   "flatPath": "v1/accounts/{accountId}/orders/{orderId}",
1502	//   "httpMethod": "GET",
1503	//   "id": "playmoviespartner.accounts.orders.get",
1504	//   "parameterOrder": [
1505	//     "accountId",
1506	//     "orderId"
1507	//   ],
1508	//   "parameters": {
1509	//     "accountId": {
1510	//       "description": "REQUIRED. See _General rules_ for more information about this field.",
1511	//       "location": "path",
1512	//       "required": true,
1513	//       "type": "string"
1514	//     },
1515	//     "orderId": {
1516	//       "description": "REQUIRED. Order ID.",
1517	//       "location": "path",
1518	//       "required": true,
1519	//       "type": "string"
1520	//     }
1521	//   },
1522	//   "path": "v1/accounts/{accountId}/orders/{orderId}",
1523	//   "response": {
1524	//     "$ref": "Order"
1525	//   },
1526	//   "scopes": [
1527	//     "https://www.googleapis.com/auth/playmovies_partner.readonly"
1528	//   ]
1529	// }
1530
1531}
1532
1533// method id "playmoviespartner.accounts.orders.list":
1534
1535type AccountsOrdersListCall struct {
1536	s            *Service
1537	accountId    string
1538	urlParams_   gensupport.URLParams
1539	ifNoneMatch_ string
1540	ctx_         context.Context
1541	header_      http.Header
1542}
1543
1544// List: List Orders owned or managed by the partner.
1545//
1546// See _Authentication and Authorization rules_ and
1547// _List methods rules_ for more information about this method.
1548func (r *AccountsOrdersService) List(accountId string) *AccountsOrdersListCall {
1549	c := &AccountsOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1550	c.accountId = accountId
1551	return c
1552}
1553
1554// CustomId sets the optional parameter "customId": Filter Orders that
1555// match a case-insensitive, partner-specific custom id.
1556func (c *AccountsOrdersListCall) CustomId(customId string) *AccountsOrdersListCall {
1557	c.urlParams_.Set("customId", customId)
1558	return c
1559}
1560
1561// Name sets the optional parameter "name": Filter that matches Orders
1562// with a `name`, `show`, `season` or `episode`
1563// that contains the given case-insensitive name.
1564func (c *AccountsOrdersListCall) Name(name string) *AccountsOrdersListCall {
1565	c.urlParams_.Set("name", name)
1566	return c
1567}
1568
1569// PageSize sets the optional parameter "pageSize": See _List methods
1570// rules_ for info about this field.
1571func (c *AccountsOrdersListCall) PageSize(pageSize int64) *AccountsOrdersListCall {
1572	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1573	return c
1574}
1575
1576// PageToken sets the optional parameter "pageToken": See _List methods
1577// rules_ for info about this field.
1578func (c *AccountsOrdersListCall) PageToken(pageToken string) *AccountsOrdersListCall {
1579	c.urlParams_.Set("pageToken", pageToken)
1580	return c
1581}
1582
1583// PphNames sets the optional parameter "pphNames": See _List methods
1584// rules_ for info about this field.
1585func (c *AccountsOrdersListCall) PphNames(pphNames ...string) *AccountsOrdersListCall {
1586	c.urlParams_.SetMulti("pphNames", append([]string{}, pphNames...))
1587	return c
1588}
1589
1590// Status sets the optional parameter "status": Filter Orders that match
1591// one of the given status.
1592//
1593// Possible values:
1594//   "STATUS_UNSPECIFIED"
1595//   "STATUS_APPROVED"
1596//   "STATUS_FAILED"
1597//   "STATUS_PROCESSING"
1598//   "STATUS_UNFULFILLED"
1599//   "STATUS_NOT_AVAILABLE"
1600func (c *AccountsOrdersListCall) Status(status ...string) *AccountsOrdersListCall {
1601	c.urlParams_.SetMulti("status", append([]string{}, status...))
1602	return c
1603}
1604
1605// StudioNames sets the optional parameter "studioNames": See _List
1606// methods rules_ for info about this field.
1607func (c *AccountsOrdersListCall) StudioNames(studioNames ...string) *AccountsOrdersListCall {
1608	c.urlParams_.SetMulti("studioNames", append([]string{}, studioNames...))
1609	return c
1610}
1611
1612// VideoIds sets the optional parameter "videoIds": Filter Orders that
1613// match any of the given `video_id`s.
1614func (c *AccountsOrdersListCall) VideoIds(videoIds ...string) *AccountsOrdersListCall {
1615	c.urlParams_.SetMulti("videoIds", append([]string{}, videoIds...))
1616	return c
1617}
1618
1619// Fields allows partial responses to be retrieved. See
1620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1621// for more information.
1622func (c *AccountsOrdersListCall) Fields(s ...googleapi.Field) *AccountsOrdersListCall {
1623	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1624	return c
1625}
1626
1627// IfNoneMatch sets the optional parameter which makes the operation
1628// fail if the object's ETag matches the given value. This is useful for
1629// getting updates only after the object has changed since the last
1630// request. Use googleapi.IsNotModified to check whether the response
1631// error from Do is the result of In-None-Match.
1632func (c *AccountsOrdersListCall) IfNoneMatch(entityTag string) *AccountsOrdersListCall {
1633	c.ifNoneMatch_ = entityTag
1634	return c
1635}
1636
1637// Context sets the context to be used in this call's Do method. Any
1638// pending HTTP request will be aborted if the provided context is
1639// canceled.
1640func (c *AccountsOrdersListCall) Context(ctx context.Context) *AccountsOrdersListCall {
1641	c.ctx_ = ctx
1642	return c
1643}
1644
1645// Header returns an http.Header that can be modified by the caller to
1646// add HTTP headers to the request.
1647func (c *AccountsOrdersListCall) Header() http.Header {
1648	if c.header_ == nil {
1649		c.header_ = make(http.Header)
1650	}
1651	return c.header_
1652}
1653
1654func (c *AccountsOrdersListCall) doRequest(alt string) (*http.Response, error) {
1655	reqHeaders := make(http.Header)
1656	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1657	for k, v := range c.header_ {
1658		reqHeaders[k] = v
1659	}
1660	reqHeaders.Set("User-Agent", c.s.userAgent())
1661	if c.ifNoneMatch_ != "" {
1662		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1663	}
1664	var body io.Reader = nil
1665	c.urlParams_.Set("alt", alt)
1666	c.urlParams_.Set("prettyPrint", "false")
1667	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/accounts/{accountId}/orders")
1668	urls += "?" + c.urlParams_.Encode()
1669	req, err := http.NewRequest("GET", urls, body)
1670	if err != nil {
1671		return nil, err
1672	}
1673	req.Header = reqHeaders
1674	googleapi.Expand(req.URL, map[string]string{
1675		"accountId": c.accountId,
1676	})
1677	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1678}
1679
1680// Do executes the "playmoviespartner.accounts.orders.list" call.
1681// Exactly one of *ListOrdersResponse or error will be non-nil. Any
1682// non-2xx status code is an error. Response headers are in either
1683// *ListOrdersResponse.ServerResponse.Header or (if a response was
1684// returned at all) in error.(*googleapi.Error).Header. Use
1685// googleapi.IsNotModified to check whether the returned error was
1686// because http.StatusNotModified was returned.
1687func (c *AccountsOrdersListCall) Do(opts ...googleapi.CallOption) (*ListOrdersResponse, error) {
1688	gensupport.SetOptions(c.urlParams_, opts...)
1689	res, err := c.doRequest("json")
1690	if res != nil && res.StatusCode == http.StatusNotModified {
1691		if res.Body != nil {
1692			res.Body.Close()
1693		}
1694		return nil, &googleapi.Error{
1695			Code:   res.StatusCode,
1696			Header: res.Header,
1697		}
1698	}
1699	if err != nil {
1700		return nil, err
1701	}
1702	defer googleapi.CloseBody(res)
1703	if err := googleapi.CheckResponse(res); err != nil {
1704		return nil, err
1705	}
1706	ret := &ListOrdersResponse{
1707		ServerResponse: googleapi.ServerResponse{
1708			Header:         res.Header,
1709			HTTPStatusCode: res.StatusCode,
1710		},
1711	}
1712	target := &ret
1713	if err := gensupport.DecodeResponse(target, res); err != nil {
1714		return nil, err
1715	}
1716	return ret, nil
1717	// {
1718	//   "description": "List Orders owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.",
1719	//   "flatPath": "v1/accounts/{accountId}/orders",
1720	//   "httpMethod": "GET",
1721	//   "id": "playmoviespartner.accounts.orders.list",
1722	//   "parameterOrder": [
1723	//     "accountId"
1724	//   ],
1725	//   "parameters": {
1726	//     "accountId": {
1727	//       "description": "REQUIRED. See _General rules_ for more information about this field.",
1728	//       "location": "path",
1729	//       "required": true,
1730	//       "type": "string"
1731	//     },
1732	//     "customId": {
1733	//       "description": "Filter Orders that match a case-insensitive, partner-specific custom id.",
1734	//       "location": "query",
1735	//       "type": "string"
1736	//     },
1737	//     "name": {
1738	//       "description": "Filter that matches Orders with a `name`, `show`, `season` or `episode`\nthat contains the given case-insensitive name.",
1739	//       "location": "query",
1740	//       "type": "string"
1741	//     },
1742	//     "pageSize": {
1743	//       "description": "See _List methods rules_ for info about this field.",
1744	//       "format": "int32",
1745	//       "location": "query",
1746	//       "type": "integer"
1747	//     },
1748	//     "pageToken": {
1749	//       "description": "See _List methods rules_ for info about this field.",
1750	//       "location": "query",
1751	//       "type": "string"
1752	//     },
1753	//     "pphNames": {
1754	//       "description": "See _List methods rules_ for info about this field.",
1755	//       "location": "query",
1756	//       "repeated": true,
1757	//       "type": "string"
1758	//     },
1759	//     "status": {
1760	//       "description": "Filter Orders that match one of the given status.",
1761	//       "enum": [
1762	//         "STATUS_UNSPECIFIED",
1763	//         "STATUS_APPROVED",
1764	//         "STATUS_FAILED",
1765	//         "STATUS_PROCESSING",
1766	//         "STATUS_UNFULFILLED",
1767	//         "STATUS_NOT_AVAILABLE"
1768	//       ],
1769	//       "location": "query",
1770	//       "repeated": true,
1771	//       "type": "string"
1772	//     },
1773	//     "studioNames": {
1774	//       "description": "See _List methods rules_ for info about this field.",
1775	//       "location": "query",
1776	//       "repeated": true,
1777	//       "type": "string"
1778	//     },
1779	//     "videoIds": {
1780	//       "description": "Filter Orders that match any of the given `video_id`s.",
1781	//       "location": "query",
1782	//       "repeated": true,
1783	//       "type": "string"
1784	//     }
1785	//   },
1786	//   "path": "v1/accounts/{accountId}/orders",
1787	//   "response": {
1788	//     "$ref": "ListOrdersResponse"
1789	//   },
1790	//   "scopes": [
1791	//     "https://www.googleapis.com/auth/playmovies_partner.readonly"
1792	//   ]
1793	// }
1794
1795}
1796
1797// Pages invokes f for each page of results.
1798// A non-nil error returned from f will halt the iteration.
1799// The provided context supersedes any context provided to the Context method.
1800func (c *AccountsOrdersListCall) Pages(ctx context.Context, f func(*ListOrdersResponse) error) error {
1801	c.ctx_ = ctx
1802	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1803	for {
1804		x, err := c.Do()
1805		if err != nil {
1806			return err
1807		}
1808		if err := f(x); err != nil {
1809			return err
1810		}
1811		if x.NextPageToken == "" {
1812			return nil
1813		}
1814		c.PageToken(x.NextPageToken)
1815	}
1816}
1817
1818// method id "playmoviespartner.accounts.storeInfos.list":
1819
1820type AccountsStoreInfosListCall struct {
1821	s            *Service
1822	accountId    string
1823	urlParams_   gensupport.URLParams
1824	ifNoneMatch_ string
1825	ctx_         context.Context
1826	header_      http.Header
1827}
1828
1829// List: List StoreInfos owned or managed by the partner.
1830//
1831// See _Authentication and Authorization rules_ and
1832// _List methods rules_ for more information about this method.
1833func (r *AccountsStoreInfosService) List(accountId string) *AccountsStoreInfosListCall {
1834	c := &AccountsStoreInfosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1835	c.accountId = accountId
1836	return c
1837}
1838
1839// Countries sets the optional parameter "countries": Filter StoreInfos
1840// that match (case-insensitive) any of the given country
1841// codes, using the "ISO 3166-1 alpha-2" format (examples: "US", "us",
1842// "Us").
1843func (c *AccountsStoreInfosListCall) Countries(countries ...string) *AccountsStoreInfosListCall {
1844	c.urlParams_.SetMulti("countries", append([]string{}, countries...))
1845	return c
1846}
1847
1848// Mids sets the optional parameter "mids": Filter StoreInfos that match
1849// any of the given `mid`s.
1850func (c *AccountsStoreInfosListCall) Mids(mids ...string) *AccountsStoreInfosListCall {
1851	c.urlParams_.SetMulti("mids", append([]string{}, mids...))
1852	return c
1853}
1854
1855// Name sets the optional parameter "name": Filter that matches
1856// StoreInfos with a `name` or `show_name`
1857// that contains the given case-insensitive name.
1858func (c *AccountsStoreInfosListCall) Name(name string) *AccountsStoreInfosListCall {
1859	c.urlParams_.Set("name", name)
1860	return c
1861}
1862
1863// PageSize sets the optional parameter "pageSize": See _List methods
1864// rules_ for info about this field.
1865func (c *AccountsStoreInfosListCall) PageSize(pageSize int64) *AccountsStoreInfosListCall {
1866	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1867	return c
1868}
1869
1870// PageToken sets the optional parameter "pageToken": See _List methods
1871// rules_ for info about this field.
1872func (c *AccountsStoreInfosListCall) PageToken(pageToken string) *AccountsStoreInfosListCall {
1873	c.urlParams_.Set("pageToken", pageToken)
1874	return c
1875}
1876
1877// PphNames sets the optional parameter "pphNames": See _List methods
1878// rules_ for info about this field.
1879func (c *AccountsStoreInfosListCall) PphNames(pphNames ...string) *AccountsStoreInfosListCall {
1880	c.urlParams_.SetMulti("pphNames", append([]string{}, pphNames...))
1881	return c
1882}
1883
1884// SeasonIds sets the optional parameter "seasonIds": Filter StoreInfos
1885// that match any of the given `season_id`s.
1886func (c *AccountsStoreInfosListCall) SeasonIds(seasonIds ...string) *AccountsStoreInfosListCall {
1887	c.urlParams_.SetMulti("seasonIds", append([]string{}, seasonIds...))
1888	return c
1889}
1890
1891// StudioNames sets the optional parameter "studioNames": See _List
1892// methods rules_ for info about this field.
1893func (c *AccountsStoreInfosListCall) StudioNames(studioNames ...string) *AccountsStoreInfosListCall {
1894	c.urlParams_.SetMulti("studioNames", append([]string{}, studioNames...))
1895	return c
1896}
1897
1898// VideoId sets the optional parameter "videoId": Filter StoreInfos that
1899// match a given `video_id`.
1900// NOTE: this field is deprecated and will be removed on V2;
1901// `video_ids`
1902// should be used instead.
1903func (c *AccountsStoreInfosListCall) VideoId(videoId string) *AccountsStoreInfosListCall {
1904	c.urlParams_.Set("videoId", videoId)
1905	return c
1906}
1907
1908// VideoIds sets the optional parameter "videoIds": Filter StoreInfos
1909// that match any of the given `video_id`s.
1910func (c *AccountsStoreInfosListCall) VideoIds(videoIds ...string) *AccountsStoreInfosListCall {
1911	c.urlParams_.SetMulti("videoIds", append([]string{}, videoIds...))
1912	return c
1913}
1914
1915// Fields allows partial responses to be retrieved. See
1916// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1917// for more information.
1918func (c *AccountsStoreInfosListCall) Fields(s ...googleapi.Field) *AccountsStoreInfosListCall {
1919	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1920	return c
1921}
1922
1923// IfNoneMatch sets the optional parameter which makes the operation
1924// fail if the object's ETag matches the given value. This is useful for
1925// getting updates only after the object has changed since the last
1926// request. Use googleapi.IsNotModified to check whether the response
1927// error from Do is the result of In-None-Match.
1928func (c *AccountsStoreInfosListCall) IfNoneMatch(entityTag string) *AccountsStoreInfosListCall {
1929	c.ifNoneMatch_ = entityTag
1930	return c
1931}
1932
1933// Context sets the context to be used in this call's Do method. Any
1934// pending HTTP request will be aborted if the provided context is
1935// canceled.
1936func (c *AccountsStoreInfosListCall) Context(ctx context.Context) *AccountsStoreInfosListCall {
1937	c.ctx_ = ctx
1938	return c
1939}
1940
1941// Header returns an http.Header that can be modified by the caller to
1942// add HTTP headers to the request.
1943func (c *AccountsStoreInfosListCall) Header() http.Header {
1944	if c.header_ == nil {
1945		c.header_ = make(http.Header)
1946	}
1947	return c.header_
1948}
1949
1950func (c *AccountsStoreInfosListCall) doRequest(alt string) (*http.Response, error) {
1951	reqHeaders := make(http.Header)
1952	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1953	for k, v := range c.header_ {
1954		reqHeaders[k] = v
1955	}
1956	reqHeaders.Set("User-Agent", c.s.userAgent())
1957	if c.ifNoneMatch_ != "" {
1958		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1959	}
1960	var body io.Reader = nil
1961	c.urlParams_.Set("alt", alt)
1962	c.urlParams_.Set("prettyPrint", "false")
1963	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/accounts/{accountId}/storeInfos")
1964	urls += "?" + c.urlParams_.Encode()
1965	req, err := http.NewRequest("GET", urls, body)
1966	if err != nil {
1967		return nil, err
1968	}
1969	req.Header = reqHeaders
1970	googleapi.Expand(req.URL, map[string]string{
1971		"accountId": c.accountId,
1972	})
1973	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1974}
1975
1976// Do executes the "playmoviespartner.accounts.storeInfos.list" call.
1977// Exactly one of *ListStoreInfosResponse or error will be non-nil. Any
1978// non-2xx status code is an error. Response headers are in either
1979// *ListStoreInfosResponse.ServerResponse.Header or (if a response was
1980// returned at all) in error.(*googleapi.Error).Header. Use
1981// googleapi.IsNotModified to check whether the returned error was
1982// because http.StatusNotModified was returned.
1983func (c *AccountsStoreInfosListCall) Do(opts ...googleapi.CallOption) (*ListStoreInfosResponse, error) {
1984	gensupport.SetOptions(c.urlParams_, opts...)
1985	res, err := c.doRequest("json")
1986	if res != nil && res.StatusCode == http.StatusNotModified {
1987		if res.Body != nil {
1988			res.Body.Close()
1989		}
1990		return nil, &googleapi.Error{
1991			Code:   res.StatusCode,
1992			Header: res.Header,
1993		}
1994	}
1995	if err != nil {
1996		return nil, err
1997	}
1998	defer googleapi.CloseBody(res)
1999	if err := googleapi.CheckResponse(res); err != nil {
2000		return nil, err
2001	}
2002	ret := &ListStoreInfosResponse{
2003		ServerResponse: googleapi.ServerResponse{
2004			Header:         res.Header,
2005			HTTPStatusCode: res.StatusCode,
2006		},
2007	}
2008	target := &ret
2009	if err := gensupport.DecodeResponse(target, res); err != nil {
2010		return nil, err
2011	}
2012	return ret, nil
2013	// {
2014	//   "description": "List StoreInfos owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.",
2015	//   "flatPath": "v1/accounts/{accountId}/storeInfos",
2016	//   "httpMethod": "GET",
2017	//   "id": "playmoviespartner.accounts.storeInfos.list",
2018	//   "parameterOrder": [
2019	//     "accountId"
2020	//   ],
2021	//   "parameters": {
2022	//     "accountId": {
2023	//       "description": "REQUIRED. See _General rules_ for more information about this field.",
2024	//       "location": "path",
2025	//       "required": true,
2026	//       "type": "string"
2027	//     },
2028	//     "countries": {
2029	//       "description": "Filter StoreInfos that match (case-insensitive) any of the given country\ncodes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").",
2030	//       "location": "query",
2031	//       "repeated": true,
2032	//       "type": "string"
2033	//     },
2034	//     "mids": {
2035	//       "description": "Filter StoreInfos that match any of the given `mid`s.",
2036	//       "location": "query",
2037	//       "repeated": true,
2038	//       "type": "string"
2039	//     },
2040	//     "name": {
2041	//       "description": "Filter that matches StoreInfos with a `name` or `show_name`\nthat contains the given case-insensitive name.",
2042	//       "location": "query",
2043	//       "type": "string"
2044	//     },
2045	//     "pageSize": {
2046	//       "description": "See _List methods rules_ for info about this field.",
2047	//       "format": "int32",
2048	//       "location": "query",
2049	//       "type": "integer"
2050	//     },
2051	//     "pageToken": {
2052	//       "description": "See _List methods rules_ for info about this field.",
2053	//       "location": "query",
2054	//       "type": "string"
2055	//     },
2056	//     "pphNames": {
2057	//       "description": "See _List methods rules_ for info about this field.",
2058	//       "location": "query",
2059	//       "repeated": true,
2060	//       "type": "string"
2061	//     },
2062	//     "seasonIds": {
2063	//       "description": "Filter StoreInfos that match any of the given `season_id`s.",
2064	//       "location": "query",
2065	//       "repeated": true,
2066	//       "type": "string"
2067	//     },
2068	//     "studioNames": {
2069	//       "description": "See _List methods rules_ for info about this field.",
2070	//       "location": "query",
2071	//       "repeated": true,
2072	//       "type": "string"
2073	//     },
2074	//     "videoId": {
2075	//       "description": "Filter StoreInfos that match a given `video_id`.\nNOTE: this field is deprecated and will be removed on V2; `video_ids`\nshould be used instead.",
2076	//       "location": "query",
2077	//       "type": "string"
2078	//     },
2079	//     "videoIds": {
2080	//       "description": "Filter StoreInfos that match any of the given `video_id`s.",
2081	//       "location": "query",
2082	//       "repeated": true,
2083	//       "type": "string"
2084	//     }
2085	//   },
2086	//   "path": "v1/accounts/{accountId}/storeInfos",
2087	//   "response": {
2088	//     "$ref": "ListStoreInfosResponse"
2089	//   },
2090	//   "scopes": [
2091	//     "https://www.googleapis.com/auth/playmovies_partner.readonly"
2092	//   ]
2093	// }
2094
2095}
2096
2097// Pages invokes f for each page of results.
2098// A non-nil error returned from f will halt the iteration.
2099// The provided context supersedes any context provided to the Context method.
2100func (c *AccountsStoreInfosListCall) Pages(ctx context.Context, f func(*ListStoreInfosResponse) error) error {
2101	c.ctx_ = ctx
2102	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2103	for {
2104		x, err := c.Do()
2105		if err != nil {
2106			return err
2107		}
2108		if err := f(x); err != nil {
2109			return err
2110		}
2111		if x.NextPageToken == "" {
2112			return nil
2113		}
2114		c.PageToken(x.NextPageToken)
2115	}
2116}
2117
2118// method id "playmoviespartner.accounts.storeInfos.country.get":
2119
2120type AccountsStoreInfosCountryGetCall struct {
2121	s            *Service
2122	accountId    string
2123	videoId      string
2124	country      string
2125	urlParams_   gensupport.URLParams
2126	ifNoneMatch_ string
2127	ctx_         context.Context
2128	header_      http.Header
2129}
2130
2131// Get: Get a StoreInfo given its video id and country.
2132//
2133// See _Authentication and Authorization rules_ and
2134// _Get methods rules_ for more information about this method.
2135func (r *AccountsStoreInfosCountryService) Get(accountId string, videoId string, country string) *AccountsStoreInfosCountryGetCall {
2136	c := &AccountsStoreInfosCountryGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2137	c.accountId = accountId
2138	c.videoId = videoId
2139	c.country = country
2140	return c
2141}
2142
2143// Fields allows partial responses to be retrieved. See
2144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2145// for more information.
2146func (c *AccountsStoreInfosCountryGetCall) Fields(s ...googleapi.Field) *AccountsStoreInfosCountryGetCall {
2147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2148	return c
2149}
2150
2151// IfNoneMatch sets the optional parameter which makes the operation
2152// fail if the object's ETag matches the given value. This is useful for
2153// getting updates only after the object has changed since the last
2154// request. Use googleapi.IsNotModified to check whether the response
2155// error from Do is the result of In-None-Match.
2156func (c *AccountsStoreInfosCountryGetCall) IfNoneMatch(entityTag string) *AccountsStoreInfosCountryGetCall {
2157	c.ifNoneMatch_ = entityTag
2158	return c
2159}
2160
2161// Context sets the context to be used in this call's Do method. Any
2162// pending HTTP request will be aborted if the provided context is
2163// canceled.
2164func (c *AccountsStoreInfosCountryGetCall) Context(ctx context.Context) *AccountsStoreInfosCountryGetCall {
2165	c.ctx_ = ctx
2166	return c
2167}
2168
2169// Header returns an http.Header that can be modified by the caller to
2170// add HTTP headers to the request.
2171func (c *AccountsStoreInfosCountryGetCall) Header() http.Header {
2172	if c.header_ == nil {
2173		c.header_ = make(http.Header)
2174	}
2175	return c.header_
2176}
2177
2178func (c *AccountsStoreInfosCountryGetCall) doRequest(alt string) (*http.Response, error) {
2179	reqHeaders := make(http.Header)
2180	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
2181	for k, v := range c.header_ {
2182		reqHeaders[k] = v
2183	}
2184	reqHeaders.Set("User-Agent", c.s.userAgent())
2185	if c.ifNoneMatch_ != "" {
2186		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2187	}
2188	var body io.Reader = nil
2189	c.urlParams_.Set("alt", alt)
2190	c.urlParams_.Set("prettyPrint", "false")
2191	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}")
2192	urls += "?" + c.urlParams_.Encode()
2193	req, err := http.NewRequest("GET", urls, body)
2194	if err != nil {
2195		return nil, err
2196	}
2197	req.Header = reqHeaders
2198	googleapi.Expand(req.URL, map[string]string{
2199		"accountId": c.accountId,
2200		"videoId":   c.videoId,
2201		"country":   c.country,
2202	})
2203	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2204}
2205
2206// Do executes the "playmoviespartner.accounts.storeInfos.country.get" call.
2207// Exactly one of *StoreInfo or error will be non-nil. Any non-2xx
2208// status code is an error. Response headers are in either
2209// *StoreInfo.ServerResponse.Header or (if a response was returned at
2210// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2211// to check whether the returned error was because
2212// http.StatusNotModified was returned.
2213func (c *AccountsStoreInfosCountryGetCall) Do(opts ...googleapi.CallOption) (*StoreInfo, error) {
2214	gensupport.SetOptions(c.urlParams_, opts...)
2215	res, err := c.doRequest("json")
2216	if res != nil && res.StatusCode == http.StatusNotModified {
2217		if res.Body != nil {
2218			res.Body.Close()
2219		}
2220		return nil, &googleapi.Error{
2221			Code:   res.StatusCode,
2222			Header: res.Header,
2223		}
2224	}
2225	if err != nil {
2226		return nil, err
2227	}
2228	defer googleapi.CloseBody(res)
2229	if err := googleapi.CheckResponse(res); err != nil {
2230		return nil, err
2231	}
2232	ret := &StoreInfo{
2233		ServerResponse: googleapi.ServerResponse{
2234			Header:         res.Header,
2235			HTTPStatusCode: res.StatusCode,
2236		},
2237	}
2238	target := &ret
2239	if err := gensupport.DecodeResponse(target, res); err != nil {
2240		return nil, err
2241	}
2242	return ret, nil
2243	// {
2244	//   "description": "Get a StoreInfo given its video id and country.\n\nSee _Authentication and Authorization rules_ and\n_Get methods rules_ for more information about this method.",
2245	//   "flatPath": "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}",
2246	//   "httpMethod": "GET",
2247	//   "id": "playmoviespartner.accounts.storeInfos.country.get",
2248	//   "parameterOrder": [
2249	//     "accountId",
2250	//     "videoId",
2251	//     "country"
2252	//   ],
2253	//   "parameters": {
2254	//     "accountId": {
2255	//       "description": "REQUIRED. See _General rules_ for more information about this field.",
2256	//       "location": "path",
2257	//       "required": true,
2258	//       "type": "string"
2259	//     },
2260	//     "country": {
2261	//       "description": "REQUIRED. Edit country.",
2262	//       "location": "path",
2263	//       "required": true,
2264	//       "type": "string"
2265	//     },
2266	//     "videoId": {
2267	//       "description": "REQUIRED. Video ID.",
2268	//       "location": "path",
2269	//       "required": true,
2270	//       "type": "string"
2271	//     }
2272	//   },
2273	//   "path": "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}",
2274	//   "response": {
2275	//     "$ref": "StoreInfo"
2276	//   },
2277	//   "scopes": [
2278	//     "https://www.googleapis.com/auth/playmovies_partner.readonly"
2279	//   ]
2280	// }
2281
2282}
2283