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 games provides access to the Google Play Game Services.
8//
9// For product documentation, see: https://developers.google.com/games/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/games/v1"
16//   ...
17//   ctx := context.Background()
18//   gamesService, err := games.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   gamesService, err := games.NewService(ctx, option.WithScopes(games.GamesScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   gamesService, err := games.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   gamesService, err := games.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package games // import "google.golang.org/api/games/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "games:v1"
79const apiName = "games"
80const apiVersion = "v1"
81const basePath = "https://games.googleapis.com/"
82const mtlsBasePath = "https://games.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// View and manage its own configuration data in your Google Drive
87	DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"
88
89	// Create, edit, and delete your Google Play Games activity
90	GamesScope = "https://www.googleapis.com/auth/games"
91)
92
93// NewService creates a new Service.
94func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
95	scopesOption := option.WithScopes(
96		"https://www.googleapis.com/auth/drive.appdata",
97		"https://www.googleapis.com/auth/games",
98	)
99	// NOTE: prepend, so we don't override user-specified scopes.
100	opts = append([]option.ClientOption{scopesOption}, opts...)
101	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
102	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
103	client, endpoint, err := htransport.NewClient(ctx, opts...)
104	if err != nil {
105		return nil, err
106	}
107	s, err := New(client)
108	if err != nil {
109		return nil, err
110	}
111	if endpoint != "" {
112		s.BasePath = endpoint
113	}
114	return s, nil
115}
116
117// New creates a new Service. It uses the provided http.Client for requests.
118//
119// Deprecated: please use NewService instead.
120// To provide a custom HTTP client, use option.WithHTTPClient.
121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
122func New(client *http.Client) (*Service, error) {
123	if client == nil {
124		return nil, errors.New("client is nil")
125	}
126	s := &Service{client: client, BasePath: basePath}
127	s.AchievementDefinitions = NewAchievementDefinitionsService(s)
128	s.Achievements = NewAchievementsService(s)
129	s.Applications = NewApplicationsService(s)
130	s.Events = NewEventsService(s)
131	s.Leaderboards = NewLeaderboardsService(s)
132	s.Metagame = NewMetagameService(s)
133	s.Players = NewPlayersService(s)
134	s.Revisions = NewRevisionsService(s)
135	s.Scores = NewScoresService(s)
136	s.Snapshots = NewSnapshotsService(s)
137	s.SnapshotsExtended = NewSnapshotsExtendedService(s)
138	s.Stats = NewStatsService(s)
139	return s, nil
140}
141
142type Service struct {
143	client    *http.Client
144	BasePath  string // API endpoint base URL
145	UserAgent string // optional additional User-Agent fragment
146
147	AchievementDefinitions *AchievementDefinitionsService
148
149	Achievements *AchievementsService
150
151	Applications *ApplicationsService
152
153	Events *EventsService
154
155	Leaderboards *LeaderboardsService
156
157	Metagame *MetagameService
158
159	Players *PlayersService
160
161	Revisions *RevisionsService
162
163	Scores *ScoresService
164
165	Snapshots *SnapshotsService
166
167	SnapshotsExtended *SnapshotsExtendedService
168
169	Stats *StatsService
170}
171
172func (s *Service) userAgent() string {
173	if s.UserAgent == "" {
174		return googleapi.UserAgent
175	}
176	return googleapi.UserAgent + " " + s.UserAgent
177}
178
179func NewAchievementDefinitionsService(s *Service) *AchievementDefinitionsService {
180	rs := &AchievementDefinitionsService{s: s}
181	return rs
182}
183
184type AchievementDefinitionsService struct {
185	s *Service
186}
187
188func NewAchievementsService(s *Service) *AchievementsService {
189	rs := &AchievementsService{s: s}
190	return rs
191}
192
193type AchievementsService struct {
194	s *Service
195}
196
197func NewApplicationsService(s *Service) *ApplicationsService {
198	rs := &ApplicationsService{s: s}
199	return rs
200}
201
202type ApplicationsService struct {
203	s *Service
204}
205
206func NewEventsService(s *Service) *EventsService {
207	rs := &EventsService{s: s}
208	return rs
209}
210
211type EventsService struct {
212	s *Service
213}
214
215func NewLeaderboardsService(s *Service) *LeaderboardsService {
216	rs := &LeaderboardsService{s: s}
217	return rs
218}
219
220type LeaderboardsService struct {
221	s *Service
222}
223
224func NewMetagameService(s *Service) *MetagameService {
225	rs := &MetagameService{s: s}
226	return rs
227}
228
229type MetagameService struct {
230	s *Service
231}
232
233func NewPlayersService(s *Service) *PlayersService {
234	rs := &PlayersService{s: s}
235	return rs
236}
237
238type PlayersService struct {
239	s *Service
240}
241
242func NewRevisionsService(s *Service) *RevisionsService {
243	rs := &RevisionsService{s: s}
244	return rs
245}
246
247type RevisionsService struct {
248	s *Service
249}
250
251func NewScoresService(s *Service) *ScoresService {
252	rs := &ScoresService{s: s}
253	return rs
254}
255
256type ScoresService struct {
257	s *Service
258}
259
260func NewSnapshotsService(s *Service) *SnapshotsService {
261	rs := &SnapshotsService{s: s}
262	return rs
263}
264
265type SnapshotsService struct {
266	s *Service
267}
268
269func NewSnapshotsExtendedService(s *Service) *SnapshotsExtendedService {
270	rs := &SnapshotsExtendedService{s: s}
271	return rs
272}
273
274type SnapshotsExtendedService struct {
275	s *Service
276}
277
278func NewStatsService(s *Service) *StatsService {
279	rs := &StatsService{s: s}
280	return rs
281}
282
283type StatsService struct {
284	s *Service
285}
286
287// AchievementDefinition: An achievement definition object.
288type AchievementDefinition struct {
289	// AchievementType: The type of the achievement.
290	//
291	// Possible values:
292	//   "ACHIEVEMENT_TYPE_UNSPECIFIED" - Safe default, don't use.
293	//   "STANDARD" - Achievement is either locked or unlocked.
294	//   "INCREMENTAL" - Achievement is incremental.
295	AchievementType string `json:"achievementType,omitempty"`
296
297	// Description: The description of the achievement.
298	Description string `json:"description,omitempty"`
299
300	// ExperiencePoints: Experience points which will be earned when
301	// unlocking this achievement.
302	ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
303
304	// FormattedTotalSteps: The total steps for an incremental achievement
305	// as a string.
306	FormattedTotalSteps string `json:"formattedTotalSteps,omitempty"`
307
308	// Id: The ID of the achievement.
309	Id string `json:"id,omitempty"`
310
311	// InitialState: The initial state of the achievement.
312	//
313	// Possible values:
314	//   "INITIAL_ACHIEVEMENT_STATE_UNSPECIFIED" - Safe default, don't use.
315	//   "HIDDEN" - Achievement is hidden.
316	//   "REVEALED" - Achievement is revealed.
317	//   "UNLOCKED" - Achievement is unlocked.
318	InitialState string `json:"initialState,omitempty"`
319
320	// IsRevealedIconUrlDefault: Indicates whether the revealed icon image
321	// being returned is a default image, or is provided by the game.
322	IsRevealedIconUrlDefault bool `json:"isRevealedIconUrlDefault,omitempty"`
323
324	// IsUnlockedIconUrlDefault: Indicates whether the unlocked icon image
325	// being returned is a default image, or is game-provided.
326	IsUnlockedIconUrlDefault bool `json:"isUnlockedIconUrlDefault,omitempty"`
327
328	// Kind: Uniquely identifies the type of this resource. Value is always
329	// the fixed string `games#achievementDefinition`.
330	Kind string `json:"kind,omitempty"`
331
332	// Name: The name of the achievement.
333	Name string `json:"name,omitempty"`
334
335	// RevealedIconUrl: The image URL for the revealed achievement icon.
336	RevealedIconUrl string `json:"revealedIconUrl,omitempty"`
337
338	// TotalSteps: The total steps for an incremental achievement.
339	TotalSteps int64 `json:"totalSteps,omitempty"`
340
341	// UnlockedIconUrl: The image URL for the unlocked achievement icon.
342	UnlockedIconUrl string `json:"unlockedIconUrl,omitempty"`
343
344	// ForceSendFields is a list of field names (e.g. "AchievementType") to
345	// unconditionally include in API requests. By default, fields with
346	// empty values are omitted from API requests. However, any non-pointer,
347	// non-interface field appearing in ForceSendFields will be sent to the
348	// server regardless of whether the field is empty or not. This may be
349	// used to include empty fields in Patch requests.
350	ForceSendFields []string `json:"-"`
351
352	// NullFields is a list of field names (e.g. "AchievementType") to
353	// include in API requests with the JSON null value. By default, fields
354	// with empty values are omitted from API requests. However, any field
355	// with an empty value appearing in NullFields will be sent to the
356	// server as null. It is an error if a field in this list has a
357	// non-empty value. This may be used to include null fields in Patch
358	// requests.
359	NullFields []string `json:"-"`
360}
361
362func (s *AchievementDefinition) MarshalJSON() ([]byte, error) {
363	type NoMethod AchievementDefinition
364	raw := NoMethod(*s)
365	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
366}
367
368// AchievementDefinitionsListResponse: A list of achievement definition
369// objects.
370type AchievementDefinitionsListResponse struct {
371	// Items: The achievement definitions.
372	Items []*AchievementDefinition `json:"items,omitempty"`
373
374	// Kind: Uniquely identifies the type of this resource. Value is always
375	// the fixed string `games#achievementDefinitionsListResponse`.
376	Kind string `json:"kind,omitempty"`
377
378	// NextPageToken: Token corresponding to the next page of results.
379	NextPageToken string `json:"nextPageToken,omitempty"`
380
381	// ServerResponse contains the HTTP response code and headers from the
382	// server.
383	googleapi.ServerResponse `json:"-"`
384
385	// ForceSendFields is a list of field names (e.g. "Items") to
386	// unconditionally include in API requests. By default, fields with
387	// empty values are omitted from API requests. However, any non-pointer,
388	// non-interface field appearing in ForceSendFields will be sent to the
389	// server regardless of whether the field is empty or not. This may be
390	// used to include empty fields in Patch requests.
391	ForceSendFields []string `json:"-"`
392
393	// NullFields is a list of field names (e.g. "Items") to include in API
394	// requests with the JSON null value. By default, fields with empty
395	// values are omitted from API requests. However, any field with an
396	// empty value appearing in NullFields will be sent to the server as
397	// null. It is an error if a field in this list has a non-empty value.
398	// This may be used to include null fields in Patch requests.
399	NullFields []string `json:"-"`
400}
401
402func (s *AchievementDefinitionsListResponse) MarshalJSON() ([]byte, error) {
403	type NoMethod AchievementDefinitionsListResponse
404	raw := NoMethod(*s)
405	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
406}
407
408// AchievementIncrementResponse: An achievement increment response
409type AchievementIncrementResponse struct {
410	// CurrentSteps: The current steps recorded for this incremental
411	// achievement.
412	CurrentSteps int64 `json:"currentSteps,omitempty"`
413
414	// Kind: Uniquely identifies the type of this resource. Value is always
415	// the fixed string `games#achievementIncrementResponse`.
416	Kind string `json:"kind,omitempty"`
417
418	// NewlyUnlocked: Whether the current steps for the achievement has
419	// reached the number of steps required to unlock.
420	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
421
422	// ServerResponse contains the HTTP response code and headers from the
423	// server.
424	googleapi.ServerResponse `json:"-"`
425
426	// ForceSendFields is a list of field names (e.g. "CurrentSteps") to
427	// unconditionally include in API requests. By default, fields with
428	// empty values are omitted from API requests. However, any non-pointer,
429	// non-interface field appearing in ForceSendFields will be sent to the
430	// server regardless of whether the field is empty or not. This may be
431	// used to include empty fields in Patch requests.
432	ForceSendFields []string `json:"-"`
433
434	// NullFields is a list of field names (e.g. "CurrentSteps") to include
435	// in API requests with the JSON null value. By default, fields with
436	// empty values are omitted from API requests. However, any field with
437	// an empty value appearing in NullFields will be sent to the server as
438	// null. It is an error if a field in this list has a non-empty value.
439	// This may be used to include null fields in Patch requests.
440	NullFields []string `json:"-"`
441}
442
443func (s *AchievementIncrementResponse) MarshalJSON() ([]byte, error) {
444	type NoMethod AchievementIncrementResponse
445	raw := NoMethod(*s)
446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
447}
448
449// AchievementRevealResponse: An achievement reveal response
450type AchievementRevealResponse struct {
451	// CurrentState: The current state of the achievement for which a reveal
452	// was attempted. This might be `UNLOCKED` if the achievement was
453	// already unlocked.
454	//
455	// Possible values:
456	//   "REVEAL_ACHIEVEMENT_STATE_UNSPECIFIED" - Safe default, don't use.
457	//   "REVEALED" - Achievement is revealed.
458	//   "UNLOCKED" - Achievement is unlocked.
459	CurrentState string `json:"currentState,omitempty"`
460
461	// Kind: Uniquely identifies the type of this resource. Value is always
462	// the fixed string `games#achievementRevealResponse`.
463	Kind string `json:"kind,omitempty"`
464
465	// ServerResponse contains the HTTP response code and headers from the
466	// server.
467	googleapi.ServerResponse `json:"-"`
468
469	// ForceSendFields is a list of field names (e.g. "CurrentState") to
470	// unconditionally include in API requests. By default, fields with
471	// empty values are omitted from API requests. However, any non-pointer,
472	// non-interface field appearing in ForceSendFields will be sent to the
473	// server regardless of whether the field is empty or not. This may be
474	// used to include empty fields in Patch requests.
475	ForceSendFields []string `json:"-"`
476
477	// NullFields is a list of field names (e.g. "CurrentState") to include
478	// in API requests with the JSON null value. By default, fields with
479	// empty values are omitted from API requests. However, any field with
480	// an empty value appearing in NullFields will be sent to the server as
481	// null. It is an error if a field in this list has a non-empty value.
482	// This may be used to include null fields in Patch requests.
483	NullFields []string `json:"-"`
484}
485
486func (s *AchievementRevealResponse) MarshalJSON() ([]byte, error) {
487	type NoMethod AchievementRevealResponse
488	raw := NoMethod(*s)
489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
490}
491
492// AchievementSetStepsAtLeastResponse: An achievement set steps at least
493// response.
494type AchievementSetStepsAtLeastResponse struct {
495	// CurrentSteps: The current steps recorded for this incremental
496	// achievement.
497	CurrentSteps int64 `json:"currentSteps,omitempty"`
498
499	// Kind: Uniquely identifies the type of this resource. Value is always
500	// the fixed string `games#achievementSetStepsAtLeastResponse`.
501	Kind string `json:"kind,omitempty"`
502
503	// NewlyUnlocked: Whether the current steps for the achievement has
504	// reached the number of steps required to unlock.
505	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
506
507	// ServerResponse contains the HTTP response code and headers from the
508	// server.
509	googleapi.ServerResponse `json:"-"`
510
511	// ForceSendFields is a list of field names (e.g. "CurrentSteps") to
512	// unconditionally include in API requests. By default, fields with
513	// empty values are omitted from API requests. However, any non-pointer,
514	// non-interface field appearing in ForceSendFields will be sent to the
515	// server regardless of whether the field is empty or not. This may be
516	// used to include empty fields in Patch requests.
517	ForceSendFields []string `json:"-"`
518
519	// NullFields is a list of field names (e.g. "CurrentSteps") to include
520	// in API requests with the JSON null value. By default, fields with
521	// empty values are omitted from API requests. However, any field with
522	// an empty value appearing in NullFields will be sent to the server as
523	// null. It is an error if a field in this list has a non-empty value.
524	// This may be used to include null fields in Patch requests.
525	NullFields []string `json:"-"`
526}
527
528func (s *AchievementSetStepsAtLeastResponse) MarshalJSON() ([]byte, error) {
529	type NoMethod AchievementSetStepsAtLeastResponse
530	raw := NoMethod(*s)
531	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
532}
533
534// AchievementUnlockResponse: An achievement unlock response
535type AchievementUnlockResponse struct {
536	// Kind: Uniquely identifies the type of this resource. Value is always
537	// the fixed string `games#achievementUnlockResponse`.
538	Kind string `json:"kind,omitempty"`
539
540	// NewlyUnlocked: Whether this achievement was newly unlocked (that is,
541	// whether the unlock request for the achievement was the first for the
542	// player).
543	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
544
545	// ServerResponse contains the HTTP response code and headers from the
546	// server.
547	googleapi.ServerResponse `json:"-"`
548
549	// ForceSendFields is a list of field names (e.g. "Kind") to
550	// unconditionally include in API requests. By default, fields with
551	// empty values are omitted from API requests. However, any non-pointer,
552	// non-interface field appearing in ForceSendFields will be sent to the
553	// server regardless of whether the field is empty or not. This may be
554	// used to include empty fields in Patch requests.
555	ForceSendFields []string `json:"-"`
556
557	// NullFields is a list of field names (e.g. "Kind") to include in API
558	// requests with the JSON null value. By default, fields with empty
559	// values are omitted from API requests. However, any field with an
560	// empty value appearing in NullFields will be sent to the server as
561	// null. It is an error if a field in this list has a non-empty value.
562	// This may be used to include null fields in Patch requests.
563	NullFields []string `json:"-"`
564}
565
566func (s *AchievementUnlockResponse) MarshalJSON() ([]byte, error) {
567	type NoMethod AchievementUnlockResponse
568	raw := NoMethod(*s)
569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
570}
571
572// AchievementUpdateMultipleRequest: A list of achievement update
573// requests.
574type AchievementUpdateMultipleRequest struct {
575	// Kind: Uniquely identifies the type of this resource. Value is always
576	// the fixed string `games#achievementUpdateMultipleRequest`.
577	Kind string `json:"kind,omitempty"`
578
579	// Updates: The individual achievement update requests.
580	Updates []*AchievementUpdateRequest `json:"updates,omitempty"`
581
582	// ForceSendFields is a list of field names (e.g. "Kind") to
583	// unconditionally include in API requests. By default, fields with
584	// empty values are omitted from API requests. However, any non-pointer,
585	// non-interface field appearing in ForceSendFields will be sent to the
586	// server regardless of whether the field is empty or not. This may be
587	// used to include empty fields in Patch requests.
588	ForceSendFields []string `json:"-"`
589
590	// NullFields is a list of field names (e.g. "Kind") to include in API
591	// requests with the JSON null value. By default, fields with empty
592	// values are omitted from API requests. However, any field with an
593	// empty value appearing in NullFields will be sent to the server as
594	// null. It is an error if a field in this list has a non-empty value.
595	// This may be used to include null fields in Patch requests.
596	NullFields []string `json:"-"`
597}
598
599func (s *AchievementUpdateMultipleRequest) MarshalJSON() ([]byte, error) {
600	type NoMethod AchievementUpdateMultipleRequest
601	raw := NoMethod(*s)
602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
603}
604
605// AchievementUpdateMultipleResponse: Response message for
606// UpdateMultipleAchievements rpc.
607type AchievementUpdateMultipleResponse struct {
608	// Kind: Uniquely identifies the type of this resource. Value is always
609	// the fixed string `games#achievementUpdateMultipleResponse`.
610	Kind string `json:"kind,omitempty"`
611
612	// UpdatedAchievements: The updated state of the achievements.
613	UpdatedAchievements []*AchievementUpdateResponse `json:"updatedAchievements,omitempty"`
614
615	// ServerResponse contains the HTTP response code and headers from the
616	// server.
617	googleapi.ServerResponse `json:"-"`
618
619	// ForceSendFields is a list of field names (e.g. "Kind") to
620	// unconditionally include in API requests. By default, fields with
621	// empty values are omitted from API requests. However, any non-pointer,
622	// non-interface field appearing in ForceSendFields will be sent to the
623	// server regardless of whether the field is empty or not. This may be
624	// used to include empty fields in Patch requests.
625	ForceSendFields []string `json:"-"`
626
627	// NullFields is a list of field names (e.g. "Kind") to include in API
628	// requests with the JSON null value. By default, fields with empty
629	// values are omitted from API requests. However, any field with an
630	// empty value appearing in NullFields will be sent to the server as
631	// null. It is an error if a field in this list has a non-empty value.
632	// This may be used to include null fields in Patch requests.
633	NullFields []string `json:"-"`
634}
635
636func (s *AchievementUpdateMultipleResponse) MarshalJSON() ([]byte, error) {
637	type NoMethod AchievementUpdateMultipleResponse
638	raw := NoMethod(*s)
639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
640}
641
642// AchievementUpdateRequest: A request to update an achievement.
643type AchievementUpdateRequest struct {
644	// AchievementId: The achievement this update is being applied to.
645	AchievementId string `json:"achievementId,omitempty"`
646
647	// IncrementPayload: The payload if an update of type `INCREMENT` was
648	// requested for the achievement.
649	IncrementPayload *GamesAchievementIncrement `json:"incrementPayload,omitempty"`
650
651	// Kind: Uniquely identifies the type of this resource. Value is always
652	// the fixed string `games#achievementUpdateRequest`.
653	Kind string `json:"kind,omitempty"`
654
655	// SetStepsAtLeastPayload: The payload if an update of type
656	// `SET_STEPS_AT_LEAST` was requested for the achievement.
657	SetStepsAtLeastPayload *GamesAchievementSetStepsAtLeast `json:"setStepsAtLeastPayload,omitempty"`
658
659	// UpdateType: The type of update being applied.
660	//
661	// Possible values:
662	//   "ACHIEVEMENT_UPDATE_TYPE_UNSPECIFIED" - Safe default, don't use.
663	//   "REVEAL" - Achievement is revealed.
664	//   "UNLOCK" - Achievement is unlocked.
665	//   "INCREMENT" - Achievement is incremented.
666	//   "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the
667	// passed value.
668	UpdateType string `json:"updateType,omitempty"`
669
670	// ForceSendFields is a list of field names (e.g. "AchievementId") to
671	// unconditionally include in API requests. By default, fields with
672	// empty values are omitted from API requests. However, any non-pointer,
673	// non-interface field appearing in ForceSendFields will be sent to the
674	// server regardless of whether the field is empty or not. This may be
675	// used to include empty fields in Patch requests.
676	ForceSendFields []string `json:"-"`
677
678	// NullFields is a list of field names (e.g. "AchievementId") to include
679	// in API requests with the JSON null value. By default, fields with
680	// empty values are omitted from API requests. However, any field with
681	// an empty value appearing in NullFields will be sent to the server as
682	// null. It is an error if a field in this list has a non-empty value.
683	// This may be used to include null fields in Patch requests.
684	NullFields []string `json:"-"`
685}
686
687func (s *AchievementUpdateRequest) MarshalJSON() ([]byte, error) {
688	type NoMethod AchievementUpdateRequest
689	raw := NoMethod(*s)
690	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
691}
692
693// AchievementUpdateResponse: An updated achievement.
694type AchievementUpdateResponse struct {
695	// AchievementId: The achievement this update is was applied to.
696	AchievementId string `json:"achievementId,omitempty"`
697
698	// CurrentState: The current state of the achievement.
699	//
700	// Possible values:
701	//   "UPDATED_ACHIEVEMENT_STATE_UNSPECIFIED" - Safe default, don't use.
702	//   "HIDDEN" - Achievement is hidden.
703	//   "REVEALED" - Achievement is revealed.
704	//   "UNLOCKED" - Achievement is unlocked.
705	CurrentState string `json:"currentState,omitempty"`
706
707	// CurrentSteps: The current steps recorded for this achievement if it
708	// is incremental.
709	CurrentSteps int64 `json:"currentSteps,omitempty"`
710
711	// Kind: Uniquely identifies the type of this resource. Value is always
712	// the fixed string `games#achievementUpdateResponse`.
713	Kind string `json:"kind,omitempty"`
714
715	// NewlyUnlocked: Whether this achievement was newly unlocked (that is,
716	// whether the unlock request for the achievement was the first for the
717	// player).
718	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
719
720	// UpdateOccurred: Whether the requested updates actually affected the
721	// achievement.
722	UpdateOccurred bool `json:"updateOccurred,omitempty"`
723
724	// ForceSendFields is a list of field names (e.g. "AchievementId") to
725	// unconditionally include in API requests. By default, fields with
726	// empty values are omitted from API requests. However, any non-pointer,
727	// non-interface field appearing in ForceSendFields will be sent to the
728	// server regardless of whether the field is empty or not. This may be
729	// used to include empty fields in Patch requests.
730	ForceSendFields []string `json:"-"`
731
732	// NullFields is a list of field names (e.g. "AchievementId") to include
733	// in API requests with the JSON null value. By default, fields with
734	// empty values are omitted from API requests. However, any field with
735	// an empty value appearing in NullFields will be sent to the server as
736	// null. It is an error if a field in this list has a non-empty value.
737	// This may be used to include null fields in Patch requests.
738	NullFields []string `json:"-"`
739}
740
741func (s *AchievementUpdateResponse) MarshalJSON() ([]byte, error) {
742	type NoMethod AchievementUpdateResponse
743	raw := NoMethod(*s)
744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
745}
746
747// Application: The Application resource.
748type Application struct {
749	// AchievementCount: The number of achievements visible to the currently
750	// authenticated player.
751	AchievementCount int64 `json:"achievement_count,omitempty"`
752
753	// Assets: The assets of the application.
754	Assets []*ImageAsset `json:"assets,omitempty"`
755
756	// Author: The author of the application.
757	Author string `json:"author,omitempty"`
758
759	// Category: The category of the application.
760	Category *ApplicationCategory `json:"category,omitempty"`
761
762	// Description: The description of the application.
763	Description string `json:"description,omitempty"`
764
765	// EnabledFeatures: A list of features that have been enabled for the
766	// application.
767	//
768	// Possible values:
769	//   "APPLICATION_FEATURE_UNSPECIFIED" - Safe default, don't use.
770	//   "SNAPSHOTS" - Saved Games (snapshots).
771	EnabledFeatures []string `json:"enabledFeatures,omitempty"`
772
773	// Id: The ID of the application.
774	Id string `json:"id,omitempty"`
775
776	// Instances: The instances of the application.
777	Instances []*Instance `json:"instances,omitempty"`
778
779	// Kind: Uniquely identifies the type of this resource. Value is always
780	// the fixed string `games#application`.
781	Kind string `json:"kind,omitempty"`
782
783	// LastUpdatedTimestamp: The last updated timestamp of the application.
784	LastUpdatedTimestamp int64 `json:"lastUpdatedTimestamp,omitempty,string"`
785
786	// LeaderboardCount: The number of leaderboards visible to the currently
787	// authenticated player.
788	LeaderboardCount int64 `json:"leaderboard_count,omitempty"`
789
790	// Name: The name of the application.
791	Name string `json:"name,omitempty"`
792
793	// ThemeColor: A hint to the client UI for what color to use as an
794	// app-themed color. The color is given as an RGB triplet (e.g.
795	// "E0E0E0").
796	ThemeColor string `json:"themeColor,omitempty"`
797
798	// ServerResponse contains the HTTP response code and headers from the
799	// server.
800	googleapi.ServerResponse `json:"-"`
801
802	// ForceSendFields is a list of field names (e.g. "AchievementCount") to
803	// unconditionally include in API requests. By default, fields with
804	// empty values are omitted from API requests. However, any non-pointer,
805	// non-interface field appearing in ForceSendFields will be sent to the
806	// server regardless of whether the field is empty or not. This may be
807	// used to include empty fields in Patch requests.
808	ForceSendFields []string `json:"-"`
809
810	// NullFields is a list of field names (e.g. "AchievementCount") to
811	// include in API requests with the JSON null value. By default, fields
812	// with empty values are omitted from API requests. However, any field
813	// with an empty value appearing in NullFields will be sent to the
814	// server as null. It is an error if a field in this list has a
815	// non-empty value. This may be used to include null fields in Patch
816	// requests.
817	NullFields []string `json:"-"`
818}
819
820func (s *Application) MarshalJSON() ([]byte, error) {
821	type NoMethod Application
822	raw := NoMethod(*s)
823	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
824}
825
826// ApplicationCategory: An application category object.
827type ApplicationCategory struct {
828	// Kind: Uniquely identifies the type of this resource. Value is always
829	// the fixed string `games#applicationCategory`.
830	Kind string `json:"kind,omitempty"`
831
832	// Primary: The primary category.
833	Primary string `json:"primary,omitempty"`
834
835	// Secondary: The secondary category.
836	Secondary string `json:"secondary,omitempty"`
837
838	// ForceSendFields is a list of field names (e.g. "Kind") to
839	// unconditionally include in API requests. By default, fields with
840	// empty values are omitted from API requests. However, any non-pointer,
841	// non-interface field appearing in ForceSendFields will be sent to the
842	// server regardless of whether the field is empty or not. This may be
843	// used to include empty fields in Patch requests.
844	ForceSendFields []string `json:"-"`
845
846	// NullFields is a list of field names (e.g. "Kind") to include in API
847	// requests with the JSON null value. By default, fields with empty
848	// values are omitted from API requests. However, any field with an
849	// empty value appearing in NullFields will be sent to the server as
850	// null. It is an error if a field in this list has a non-empty value.
851	// This may be used to include null fields in Patch requests.
852	NullFields []string `json:"-"`
853}
854
855func (s *ApplicationCategory) MarshalJSON() ([]byte, error) {
856	type NoMethod ApplicationCategory
857	raw := NoMethod(*s)
858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
859}
860
861// ApplicationVerifyResponse: A third party application verification
862// response resource.
863type ApplicationVerifyResponse struct {
864	// AlternatePlayerId: An alternate ID that was once used for the player
865	// that was issued the auth token used in this request. (This field is
866	// not normally populated.)
867	AlternatePlayerId string `json:"alternate_player_id,omitempty"`
868
869	// Kind: Uniquely identifies the type of this resource. Value is always
870	// the fixed string `games#applicationVerifyResponse`.
871	Kind string `json:"kind,omitempty"`
872
873	// PlayerId: The ID of the player that was issued the auth token used in
874	// this request.
875	PlayerId string `json:"player_id,omitempty"`
876
877	// ServerResponse contains the HTTP response code and headers from the
878	// server.
879	googleapi.ServerResponse `json:"-"`
880
881	// ForceSendFields is a list of field names (e.g. "AlternatePlayerId")
882	// to unconditionally include in API requests. By default, fields with
883	// empty values are omitted from API requests. However, any non-pointer,
884	// non-interface field appearing in ForceSendFields will be sent to the
885	// server regardless of whether the field is empty or not. This may be
886	// used to include empty fields in Patch requests.
887	ForceSendFields []string `json:"-"`
888
889	// NullFields is a list of field names (e.g. "AlternatePlayerId") to
890	// include in API requests with the JSON null value. By default, fields
891	// with empty values are omitted from API requests. However, any field
892	// with an empty value appearing in NullFields will be sent to the
893	// server as null. It is an error if a field in this list has a
894	// non-empty value. This may be used to include null fields in Patch
895	// requests.
896	NullFields []string `json:"-"`
897}
898
899func (s *ApplicationVerifyResponse) MarshalJSON() ([]byte, error) {
900	type NoMethod ApplicationVerifyResponse
901	raw := NoMethod(*s)
902	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
903}
904
905// Category: Data related to individual game categories.
906type Category struct {
907	// Category: The category name.
908	Category string `json:"category,omitempty"`
909
910	// ExperiencePoints: Experience points earned in this category.
911	ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
912
913	// Kind: Uniquely identifies the type of this resource. Value is always
914	// the fixed string `games#category`.
915	Kind string `json:"kind,omitempty"`
916
917	// ForceSendFields is a list of field names (e.g. "Category") to
918	// unconditionally include in API requests. By default, fields with
919	// empty values are omitted from API requests. However, any non-pointer,
920	// non-interface field appearing in ForceSendFields will be sent to the
921	// server regardless of whether the field is empty or not. This may be
922	// used to include empty fields in Patch requests.
923	ForceSendFields []string `json:"-"`
924
925	// NullFields is a list of field names (e.g. "Category") to include in
926	// API requests with the JSON null value. By default, fields with empty
927	// values are omitted from API requests. However, any field with an
928	// empty value appearing in NullFields will be sent to the server as
929	// null. It is an error if a field in this list has a non-empty value.
930	// This may be used to include null fields in Patch requests.
931	NullFields []string `json:"-"`
932}
933
934func (s *Category) MarshalJSON() ([]byte, error) {
935	type NoMethod Category
936	raw := NoMethod(*s)
937	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
938}
939
940// CategoryListResponse: A third party list metagame categories
941// response.
942type CategoryListResponse struct {
943	// Items: The list of categories with usage data.
944	Items []*Category `json:"items,omitempty"`
945
946	// Kind: Uniquely identifies the type of this resource. Value is always
947	// the fixed string `games#categoryListResponse`.
948	Kind string `json:"kind,omitempty"`
949
950	// NextPageToken: Token corresponding to the next page of results.
951	NextPageToken string `json:"nextPageToken,omitempty"`
952
953	// ServerResponse contains the HTTP response code and headers from the
954	// server.
955	googleapi.ServerResponse `json:"-"`
956
957	// ForceSendFields is a list of field names (e.g. "Items") to
958	// unconditionally include in API requests. By default, fields with
959	// empty values are omitted from API requests. However, any non-pointer,
960	// non-interface field appearing in ForceSendFields will be sent to the
961	// server regardless of whether the field is empty or not. This may be
962	// used to include empty fields in Patch requests.
963	ForceSendFields []string `json:"-"`
964
965	// NullFields is a list of field names (e.g. "Items") to include in API
966	// requests with the JSON null value. By default, fields with empty
967	// values are omitted from API requests. However, any field with an
968	// empty value appearing in NullFields will be sent to the server as
969	// null. It is an error if a field in this list has a non-empty value.
970	// This may be used to include null fields in Patch requests.
971	NullFields []string `json:"-"`
972}
973
974func (s *CategoryListResponse) MarshalJSON() ([]byte, error) {
975	type NoMethod CategoryListResponse
976	raw := NoMethod(*s)
977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
978}
979
980// EventBatchRecordFailure: A batch update failure resource.
981type EventBatchRecordFailure struct {
982	// FailureCause: The cause for the update failure.
983	//
984	// Possible values:
985	//   "EVENT_FAILURE_CAUSE_UNSPECIFIED" - Default value. Should not be
986	// used.
987	//   "TOO_LARGE" - A batch request was issued with more events than are
988	// allowed in a single batch.
989	//   "TIME_PERIOD_EXPIRED" - A batch was sent with data too far in the
990	// past to record.
991	//   "TIME_PERIOD_SHORT" - A batch was sent with a time range that was
992	// too short.
993	//   "TIME_PERIOD_LONG" - A batch was sent with a time range that was
994	// too long.
995	//   "ALREADY_UPDATED" - An attempt was made to record a batch of data
996	// which was already seen.
997	//   "RECORD_RATE_HIGH" - An attempt was made to record data faster than
998	// the server will apply updates.
999	FailureCause string `json:"failureCause,omitempty"`
1000
1001	// Kind: Uniquely identifies the type of this resource. Value is always
1002	// the fixed string `games#eventBatchRecordFailure`.
1003	Kind string `json:"kind,omitempty"`
1004
1005	// Range: The time range which was rejected; empty for a request-wide
1006	// failure.
1007	Range *EventPeriodRange `json:"range,omitempty"`
1008
1009	// ForceSendFields is a list of field names (e.g. "FailureCause") to
1010	// unconditionally include in API requests. By default, fields with
1011	// empty values are omitted from API requests. However, any non-pointer,
1012	// non-interface field appearing in ForceSendFields will be sent to the
1013	// server regardless of whether the field is empty or not. This may be
1014	// used to include empty fields in Patch requests.
1015	ForceSendFields []string `json:"-"`
1016
1017	// NullFields is a list of field names (e.g. "FailureCause") to include
1018	// in API requests with the JSON null value. By default, fields with
1019	// empty values are omitted from API requests. However, any field with
1020	// an empty value appearing in NullFields will be sent to the server as
1021	// null. It is an error if a field in this list has a non-empty value.
1022	// This may be used to include null fields in Patch requests.
1023	NullFields []string `json:"-"`
1024}
1025
1026func (s *EventBatchRecordFailure) MarshalJSON() ([]byte, error) {
1027	type NoMethod EventBatchRecordFailure
1028	raw := NoMethod(*s)
1029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1030}
1031
1032// EventChild: An event child relationship resource.
1033type EventChild struct {
1034	// ChildId: The ID of the child event.
1035	ChildId string `json:"childId,omitempty"`
1036
1037	// Kind: Uniquely identifies the type of this resource. Value is always
1038	// the fixed string `games#eventChild`.
1039	Kind string `json:"kind,omitempty"`
1040
1041	// ForceSendFields is a list of field names (e.g. "ChildId") to
1042	// unconditionally include in API requests. By default, fields with
1043	// empty values are omitted from API requests. However, any non-pointer,
1044	// non-interface field appearing in ForceSendFields will be sent to the
1045	// server regardless of whether the field is empty or not. This may be
1046	// used to include empty fields in Patch requests.
1047	ForceSendFields []string `json:"-"`
1048
1049	// NullFields is a list of field names (e.g. "ChildId") to include in
1050	// API requests with the JSON null value. By default, fields with empty
1051	// values are omitted from API requests. However, any field with an
1052	// empty value appearing in NullFields will be sent to the server as
1053	// null. It is an error if a field in this list has a non-empty value.
1054	// This may be used to include null fields in Patch requests.
1055	NullFields []string `json:"-"`
1056}
1057
1058func (s *EventChild) MarshalJSON() ([]byte, error) {
1059	type NoMethod EventChild
1060	raw := NoMethod(*s)
1061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1062}
1063
1064// EventDefinition: An event definition resource.
1065type EventDefinition struct {
1066	// ChildEvents: A list of events that are a child of this event.
1067	ChildEvents []*EventChild `json:"childEvents,omitempty"`
1068
1069	// Description: Description of what this event represents.
1070	Description string `json:"description,omitempty"`
1071
1072	// DisplayName: The name to display for the event.
1073	DisplayName string `json:"displayName,omitempty"`
1074
1075	// Id: The ID of the event.
1076	Id string `json:"id,omitempty"`
1077
1078	// ImageUrl: The base URL for the image that represents the event.
1079	ImageUrl string `json:"imageUrl,omitempty"`
1080
1081	// IsDefaultImageUrl: Indicates whether the icon image being returned is
1082	// a default image, or is game-provided.
1083	IsDefaultImageUrl bool `json:"isDefaultImageUrl,omitempty"`
1084
1085	// Kind: Uniquely identifies the type of this resource. Value is always
1086	// the fixed string `games#eventDefinition`.
1087	Kind string `json:"kind,omitempty"`
1088
1089	// Visibility: The visibility of event being tracked in this definition.
1090	//
1091	// Possible values:
1092	//   "EVENT_VISIBILITY_UNSPECIFIED" - Default value. Should not be used.
1093	//   "REVEALED" - This event should be visible to all users.
1094	//   "HIDDEN" - This event should only be shown to users that have
1095	// recorded this event at least once.
1096	Visibility string `json:"visibility,omitempty"`
1097
1098	// ForceSendFields is a list of field names (e.g. "ChildEvents") to
1099	// unconditionally include in API requests. By default, fields with
1100	// empty values are omitted from API requests. However, any non-pointer,
1101	// non-interface field appearing in ForceSendFields will be sent to the
1102	// server regardless of whether the field is empty or not. This may be
1103	// used to include empty fields in Patch requests.
1104	ForceSendFields []string `json:"-"`
1105
1106	// NullFields is a list of field names (e.g. "ChildEvents") to include
1107	// in API requests with the JSON null value. By default, fields with
1108	// empty values are omitted from API requests. However, any field with
1109	// an empty value appearing in NullFields will be sent to the server as
1110	// null. It is an error if a field in this list has a non-empty value.
1111	// This may be used to include null fields in Patch requests.
1112	NullFields []string `json:"-"`
1113}
1114
1115func (s *EventDefinition) MarshalJSON() ([]byte, error) {
1116	type NoMethod EventDefinition
1117	raw := NoMethod(*s)
1118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1119}
1120
1121// EventDefinitionListResponse: A ListDefinitions response.
1122type EventDefinitionListResponse struct {
1123	// Items: The event definitions.
1124	Items []*EventDefinition `json:"items,omitempty"`
1125
1126	// Kind: Uniquely identifies the type of this resource. Value is always
1127	// the fixed string `games#eventDefinitionListResponse`.
1128	Kind string `json:"kind,omitempty"`
1129
1130	// NextPageToken: The pagination token for the next page of results.
1131	NextPageToken string `json:"nextPageToken,omitempty"`
1132
1133	// ServerResponse contains the HTTP response code and headers from the
1134	// server.
1135	googleapi.ServerResponse `json:"-"`
1136
1137	// ForceSendFields is a list of field names (e.g. "Items") to
1138	// unconditionally include in API requests. By default, fields with
1139	// empty values are omitted from API requests. However, any non-pointer,
1140	// non-interface field appearing in ForceSendFields will be sent to the
1141	// server regardless of whether the field is empty or not. This may be
1142	// used to include empty fields in Patch requests.
1143	ForceSendFields []string `json:"-"`
1144
1145	// NullFields is a list of field names (e.g. "Items") to include in API
1146	// requests with the JSON null value. By default, fields with empty
1147	// values are omitted from API requests. However, any field with an
1148	// empty value appearing in NullFields will be sent to the server as
1149	// null. It is an error if a field in this list has a non-empty value.
1150	// This may be used to include null fields in Patch requests.
1151	NullFields []string `json:"-"`
1152}
1153
1154func (s *EventDefinitionListResponse) MarshalJSON() ([]byte, error) {
1155	type NoMethod EventDefinitionListResponse
1156	raw := NoMethod(*s)
1157	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1158}
1159
1160// EventPeriodRange: An event period time range.
1161type EventPeriodRange struct {
1162	// Kind: Uniquely identifies the type of this resource. Value is always
1163	// the fixed string `games#eventPeriodRange`.
1164	Kind string `json:"kind,omitempty"`
1165
1166	// PeriodEndMillis: The time when this update period ends, in millis,
1167	// since 1970 UTC (Unix Epoch).
1168	PeriodEndMillis int64 `json:"periodEndMillis,omitempty,string"`
1169
1170	// PeriodStartMillis: The time when this update period begins, in
1171	// millis, since 1970 UTC (Unix Epoch).
1172	PeriodStartMillis int64 `json:"periodStartMillis,omitempty,string"`
1173
1174	// ForceSendFields is a list of field names (e.g. "Kind") to
1175	// unconditionally include in API requests. By default, fields with
1176	// empty values are omitted from API requests. However, any non-pointer,
1177	// non-interface field appearing in ForceSendFields will be sent to the
1178	// server regardless of whether the field is empty or not. This may be
1179	// used to include empty fields in Patch requests.
1180	ForceSendFields []string `json:"-"`
1181
1182	// NullFields is a list of field names (e.g. "Kind") to include in API
1183	// requests with the JSON null value. By default, fields with empty
1184	// values are omitted from API requests. However, any field with an
1185	// empty value appearing in NullFields will be sent to the server as
1186	// null. It is an error if a field in this list has a non-empty value.
1187	// This may be used to include null fields in Patch requests.
1188	NullFields []string `json:"-"`
1189}
1190
1191func (s *EventPeriodRange) MarshalJSON() ([]byte, error) {
1192	type NoMethod EventPeriodRange
1193	raw := NoMethod(*s)
1194	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1195}
1196
1197// EventPeriodUpdate: An event period update resource.
1198type EventPeriodUpdate struct {
1199	// Kind: Uniquely identifies the type of this resource. Value is always
1200	// the fixed string `games#eventPeriodUpdate`.
1201	Kind string `json:"kind,omitempty"`
1202
1203	// TimePeriod: The time period being covered by this update.
1204	TimePeriod *EventPeriodRange `json:"timePeriod,omitempty"`
1205
1206	// Updates: The updates being made for this time period.
1207	Updates []*EventUpdateRequest `json:"updates,omitempty"`
1208
1209	// ForceSendFields is a list of field names (e.g. "Kind") to
1210	// unconditionally include in API requests. By default, fields with
1211	// empty values are omitted from API requests. However, any non-pointer,
1212	// non-interface field appearing in ForceSendFields will be sent to the
1213	// server regardless of whether the field is empty or not. This may be
1214	// used to include empty fields in Patch requests.
1215	ForceSendFields []string `json:"-"`
1216
1217	// NullFields is a list of field names (e.g. "Kind") to include in API
1218	// requests with the JSON null value. By default, fields with empty
1219	// values are omitted from API requests. However, any field with an
1220	// empty value appearing in NullFields will be sent to the server as
1221	// null. It is an error if a field in this list has a non-empty value.
1222	// This may be used to include null fields in Patch requests.
1223	NullFields []string `json:"-"`
1224}
1225
1226func (s *EventPeriodUpdate) MarshalJSON() ([]byte, error) {
1227	type NoMethod EventPeriodUpdate
1228	raw := NoMethod(*s)
1229	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1230}
1231
1232// EventRecordFailure: An event update failure resource.
1233type EventRecordFailure struct {
1234	// EventId: The ID of the event that was not updated.
1235	EventId string `json:"eventId,omitempty"`
1236
1237	// FailureCause: The cause for the update failure.
1238	//
1239	// Possible values:
1240	//   "EVENT_UPDATE_FAILURE_CAUSE_UNSPECIFIED" - Default value. Should
1241	// not use.
1242	//   "NOT_FOUND" - An attempt was made to set an event that was not
1243	// defined.
1244	//   "INVALID_UPDATE_VALUE" - An attempt was made to increment an event
1245	// by a non-positive value.
1246	FailureCause string `json:"failureCause,omitempty"`
1247
1248	// Kind: Uniquely identifies the type of this resource. Value is always
1249	// the fixed string `games#eventRecordFailure`.
1250	Kind string `json:"kind,omitempty"`
1251
1252	// ForceSendFields is a list of field names (e.g. "EventId") to
1253	// unconditionally include in API requests. By default, fields with
1254	// empty values are omitted from API requests. However, any non-pointer,
1255	// non-interface field appearing in ForceSendFields will be sent to the
1256	// server regardless of whether the field is empty or not. This may be
1257	// used to include empty fields in Patch requests.
1258	ForceSendFields []string `json:"-"`
1259
1260	// NullFields is a list of field names (e.g. "EventId") to include in
1261	// API requests with the JSON null value. By default, fields with empty
1262	// values are omitted from API requests. However, any field with an
1263	// empty value appearing in NullFields will be sent to the server as
1264	// null. It is an error if a field in this list has a non-empty value.
1265	// This may be used to include null fields in Patch requests.
1266	NullFields []string `json:"-"`
1267}
1268
1269func (s *EventRecordFailure) MarshalJSON() ([]byte, error) {
1270	type NoMethod EventRecordFailure
1271	raw := NoMethod(*s)
1272	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1273}
1274
1275// EventRecordRequest: An event period update resource.
1276type EventRecordRequest struct {
1277	// CurrentTimeMillis: The current time when this update was sent, in
1278	// milliseconds, since 1970 UTC (Unix Epoch).
1279	CurrentTimeMillis int64 `json:"currentTimeMillis,omitempty,string"`
1280
1281	// Kind: Uniquely identifies the type of this resource. Value is always
1282	// the fixed string `games#eventRecordRequest`.
1283	Kind string `json:"kind,omitempty"`
1284
1285	// RequestId: The request ID used to identify this attempt to record
1286	// events.
1287	RequestId int64 `json:"requestId,omitempty,string"`
1288
1289	// TimePeriods: A list of the time period updates being made in this
1290	// request.
1291	TimePeriods []*EventPeriodUpdate `json:"timePeriods,omitempty"`
1292
1293	// ForceSendFields is a list of field names (e.g. "CurrentTimeMillis")
1294	// to unconditionally include in API requests. By default, fields with
1295	// empty values are omitted from API requests. However, any non-pointer,
1296	// non-interface field appearing in ForceSendFields will be sent to the
1297	// server regardless of whether the field is empty or not. This may be
1298	// used to include empty fields in Patch requests.
1299	ForceSendFields []string `json:"-"`
1300
1301	// NullFields is a list of field names (e.g. "CurrentTimeMillis") to
1302	// include in API requests with the JSON null value. By default, fields
1303	// with empty values are omitted from API requests. However, any field
1304	// with an empty value appearing in NullFields will be sent to the
1305	// server as null. It is an error if a field in this list has a
1306	// non-empty value. This may be used to include null fields in Patch
1307	// requests.
1308	NullFields []string `json:"-"`
1309}
1310
1311func (s *EventRecordRequest) MarshalJSON() ([]byte, error) {
1312	type NoMethod EventRecordRequest
1313	raw := NoMethod(*s)
1314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1315}
1316
1317// EventUpdateRequest: An event period update resource.
1318type EventUpdateRequest struct {
1319	// DefinitionId: The ID of the event being modified in this update.
1320	DefinitionId string `json:"definitionId,omitempty"`
1321
1322	// Kind: Uniquely identifies the type of this resource. Value is always
1323	// the fixed string `games#eventUpdateRequest`.
1324	Kind string `json:"kind,omitempty"`
1325
1326	// UpdateCount: The number of times this event occurred in this time
1327	// period.
1328	UpdateCount int64 `json:"updateCount,omitempty,string"`
1329
1330	// ForceSendFields is a list of field names (e.g. "DefinitionId") to
1331	// unconditionally include in API requests. By default, fields with
1332	// empty values are omitted from API requests. However, any non-pointer,
1333	// non-interface field appearing in ForceSendFields will be sent to the
1334	// server regardless of whether the field is empty or not. This may be
1335	// used to include empty fields in Patch requests.
1336	ForceSendFields []string `json:"-"`
1337
1338	// NullFields is a list of field names (e.g. "DefinitionId") to include
1339	// in API requests with the JSON null value. By default, fields with
1340	// empty values are omitted from API requests. However, any field with
1341	// an empty value appearing in NullFields will be sent to the server as
1342	// null. It is an error if a field in this list has a non-empty value.
1343	// This may be used to include null fields in Patch requests.
1344	NullFields []string `json:"-"`
1345}
1346
1347func (s *EventUpdateRequest) MarshalJSON() ([]byte, error) {
1348	type NoMethod EventUpdateRequest
1349	raw := NoMethod(*s)
1350	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1351}
1352
1353// EventUpdateResponse: An event period update resource.
1354type EventUpdateResponse struct {
1355	// BatchFailures: Any batch-wide failures which occurred applying
1356	// updates.
1357	BatchFailures []*EventBatchRecordFailure `json:"batchFailures,omitempty"`
1358
1359	// EventFailures: Any failures updating a particular event.
1360	EventFailures []*EventRecordFailure `json:"eventFailures,omitempty"`
1361
1362	// Kind: Uniquely identifies the type of this resource. Value is always
1363	// the fixed string `games#eventUpdateResponse`.
1364	Kind string `json:"kind,omitempty"`
1365
1366	// PlayerEvents: The current status of any updated events
1367	PlayerEvents []*PlayerEvent `json:"playerEvents,omitempty"`
1368
1369	// ServerResponse contains the HTTP response code and headers from the
1370	// server.
1371	googleapi.ServerResponse `json:"-"`
1372
1373	// ForceSendFields is a list of field names (e.g. "BatchFailures") to
1374	// unconditionally include in API requests. By default, fields with
1375	// empty values are omitted from API requests. However, any non-pointer,
1376	// non-interface field appearing in ForceSendFields will be sent to the
1377	// server regardless of whether the field is empty or not. This may be
1378	// used to include empty fields in Patch requests.
1379	ForceSendFields []string `json:"-"`
1380
1381	// NullFields is a list of field names (e.g. "BatchFailures") to include
1382	// in API requests with the JSON null value. By default, fields with
1383	// empty values are omitted from API requests. However, any field with
1384	// an empty value appearing in NullFields will be sent to the server as
1385	// null. It is an error if a field in this list has a non-empty value.
1386	// This may be used to include null fields in Patch requests.
1387	NullFields []string `json:"-"`
1388}
1389
1390func (s *EventUpdateResponse) MarshalJSON() ([]byte, error) {
1391	type NoMethod EventUpdateResponse
1392	raw := NoMethod(*s)
1393	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1394}
1395
1396// GamesAchievementIncrement: The payload to request to increment an
1397// achievement.
1398type GamesAchievementIncrement struct {
1399	// Kind: Uniquely identifies the type of this resource. Value is always
1400	// the fixed string `games#GamesAchievementIncrement`.
1401	Kind string `json:"kind,omitempty"`
1402
1403	// RequestId: The requestId associated with an increment to an
1404	// achievement.
1405	RequestId int64 `json:"requestId,omitempty,string"`
1406
1407	// Steps: The number of steps to be incremented.
1408	Steps int64 `json:"steps,omitempty"`
1409
1410	// ForceSendFields is a list of field names (e.g. "Kind") to
1411	// unconditionally include in API requests. By default, fields with
1412	// empty values are omitted from API requests. However, any non-pointer,
1413	// non-interface field appearing in ForceSendFields will be sent to the
1414	// server regardless of whether the field is empty or not. This may be
1415	// used to include empty fields in Patch requests.
1416	ForceSendFields []string `json:"-"`
1417
1418	// NullFields is a list of field names (e.g. "Kind") to include in API
1419	// requests with the JSON null value. By default, fields with empty
1420	// values are omitted from API requests. However, any field with an
1421	// empty value appearing in NullFields will be sent to the server as
1422	// null. It is an error if a field in this list has a non-empty value.
1423	// This may be used to include null fields in Patch requests.
1424	NullFields []string `json:"-"`
1425}
1426
1427func (s *GamesAchievementIncrement) MarshalJSON() ([]byte, error) {
1428	type NoMethod GamesAchievementIncrement
1429	raw := NoMethod(*s)
1430	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1431}
1432
1433// GamesAchievementSetStepsAtLeast: The payload to request to increment
1434// an achievement.
1435type GamesAchievementSetStepsAtLeast struct {
1436	// Kind: Uniquely identifies the type of this resource. Value is always
1437	// the fixed string `games#GamesAchievementSetStepsAtLeast`.
1438	Kind string `json:"kind,omitempty"`
1439
1440	// Steps: The minimum number of steps for the achievement to be set to.
1441	Steps int64 `json:"steps,omitempty"`
1442
1443	// ForceSendFields is a list of field names (e.g. "Kind") to
1444	// unconditionally include in API requests. By default, fields with
1445	// empty values are omitted from API requests. However, any non-pointer,
1446	// non-interface field appearing in ForceSendFields will be sent to the
1447	// server regardless of whether the field is empty or not. This may be
1448	// used to include empty fields in Patch requests.
1449	ForceSendFields []string `json:"-"`
1450
1451	// NullFields is a list of field names (e.g. "Kind") to include in API
1452	// requests with the JSON null value. By default, fields with empty
1453	// values are omitted from API requests. However, any field with an
1454	// empty value appearing in NullFields will be sent to the server as
1455	// null. It is an error if a field in this list has a non-empty value.
1456	// This may be used to include null fields in Patch requests.
1457	NullFields []string `json:"-"`
1458}
1459
1460func (s *GamesAchievementSetStepsAtLeast) MarshalJSON() ([]byte, error) {
1461	type NoMethod GamesAchievementSetStepsAtLeast
1462	raw := NoMethod(*s)
1463	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1464}
1465
1466// ImageAsset: An image asset object.
1467type ImageAsset struct {
1468	// Height: The height of the asset.
1469	Height int64 `json:"height,omitempty"`
1470
1471	// Kind: Uniquely identifies the type of this resource. Value is always
1472	// the fixed string `games#imageAsset`.
1473	Kind string `json:"kind,omitempty"`
1474
1475	// Name: The name of the asset.
1476	Name string `json:"name,omitempty"`
1477
1478	// Url: The URL of the asset.
1479	Url string `json:"url,omitempty"`
1480
1481	// Width: The width of the asset.
1482	Width int64 `json:"width,omitempty"`
1483
1484	// ForceSendFields is a list of field names (e.g. "Height") to
1485	// unconditionally include in API requests. By default, fields with
1486	// empty values are omitted from API requests. However, any non-pointer,
1487	// non-interface field appearing in ForceSendFields will be sent to the
1488	// server regardless of whether the field is empty or not. This may be
1489	// used to include empty fields in Patch requests.
1490	ForceSendFields []string `json:"-"`
1491
1492	// NullFields is a list of field names (e.g. "Height") to include in API
1493	// requests with the JSON null value. By default, fields with empty
1494	// values are omitted from API requests. However, any field with an
1495	// empty value appearing in NullFields will be sent to the server as
1496	// null. It is an error if a field in this list has a non-empty value.
1497	// This may be used to include null fields in Patch requests.
1498	NullFields []string `json:"-"`
1499}
1500
1501func (s *ImageAsset) MarshalJSON() ([]byte, error) {
1502	type NoMethod ImageAsset
1503	raw := NoMethod(*s)
1504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1505}
1506
1507// Instance: The Instance resource.
1508type Instance struct {
1509	// AcquisitionUri: URI which shows where a user can acquire this
1510	// instance.
1511	AcquisitionUri string `json:"acquisitionUri,omitempty"`
1512
1513	// AndroidInstance: Platform dependent details for Android.
1514	AndroidInstance *InstanceAndroidDetails `json:"androidInstance,omitempty"`
1515
1516	// IosInstance: Platform dependent details for iOS.
1517	IosInstance *InstanceIosDetails `json:"iosInstance,omitempty"`
1518
1519	// Kind: Uniquely identifies the type of this resource. Value is always
1520	// the fixed string `games#instance`.
1521	Kind string `json:"kind,omitempty"`
1522
1523	// Name: Localized display name.
1524	Name string `json:"name,omitempty"`
1525
1526	// PlatformType: The platform type.
1527	//
1528	// Possible values:
1529	//   "PLATFORM_TYPE_UNSPECIFIED" - Default value. Should be unused.
1530	//   "ANDROID" - Instance is for Android.
1531	//   "IOS" - Instance is for iOS.
1532	//   "WEB_APP" - Instance is for Web App.
1533	PlatformType string `json:"platformType,omitempty"`
1534
1535	// RealtimePlay: Flag to show if this game instance supports realtime
1536	// play.
1537	RealtimePlay bool `json:"realtimePlay,omitempty"`
1538
1539	// TurnBasedPlay: Flag to show if this game instance supports turn based
1540	// play.
1541	TurnBasedPlay bool `json:"turnBasedPlay,omitempty"`
1542
1543	// WebInstance: Platform dependent details for Web.
1544	WebInstance *InstanceWebDetails `json:"webInstance,omitempty"`
1545
1546	// ForceSendFields is a list of field names (e.g. "AcquisitionUri") to
1547	// unconditionally include in API requests. By default, fields with
1548	// empty values are omitted from API requests. However, any non-pointer,
1549	// non-interface field appearing in ForceSendFields will be sent to the
1550	// server regardless of whether the field is empty or not. This may be
1551	// used to include empty fields in Patch requests.
1552	ForceSendFields []string `json:"-"`
1553
1554	// NullFields is a list of field names (e.g. "AcquisitionUri") to
1555	// include in API requests with the JSON null value. By default, fields
1556	// with empty values are omitted from API requests. However, any field
1557	// with an empty value appearing in NullFields will be sent to the
1558	// server as null. It is an error if a field in this list has a
1559	// non-empty value. This may be used to include null fields in Patch
1560	// requests.
1561	NullFields []string `json:"-"`
1562}
1563
1564func (s *Instance) MarshalJSON() ([]byte, error) {
1565	type NoMethod Instance
1566	raw := NoMethod(*s)
1567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1568}
1569
1570// InstanceAndroidDetails: The Android instance details resource.
1571type InstanceAndroidDetails struct {
1572	// EnablePiracyCheck: Flag indicating whether the anti-piracy check is
1573	// enabled.
1574	EnablePiracyCheck bool `json:"enablePiracyCheck,omitempty"`
1575
1576	// Kind: Uniquely identifies the type of this resource. Value is always
1577	// the fixed string `games#instanceAndroidDetails`.
1578	Kind string `json:"kind,omitempty"`
1579
1580	// PackageName: Android package name which maps to Google Play URL.
1581	PackageName string `json:"packageName,omitempty"`
1582
1583	// Preferred: Indicates that this instance is the default for new
1584	// installations.
1585	Preferred bool `json:"preferred,omitempty"`
1586
1587	// ForceSendFields is a list of field names (e.g. "EnablePiracyCheck")
1588	// to unconditionally include in API requests. By default, fields with
1589	// empty values are omitted from API requests. However, any non-pointer,
1590	// non-interface field appearing in ForceSendFields will be sent to the
1591	// server regardless of whether the field is empty or not. This may be
1592	// used to include empty fields in Patch requests.
1593	ForceSendFields []string `json:"-"`
1594
1595	// NullFields is a list of field names (e.g. "EnablePiracyCheck") to
1596	// include in API requests with the JSON null value. By default, fields
1597	// with empty values are omitted from API requests. However, any field
1598	// with an empty value appearing in NullFields will be sent to the
1599	// server as null. It is an error if a field in this list has a
1600	// non-empty value. This may be used to include null fields in Patch
1601	// requests.
1602	NullFields []string `json:"-"`
1603}
1604
1605func (s *InstanceAndroidDetails) MarshalJSON() ([]byte, error) {
1606	type NoMethod InstanceAndroidDetails
1607	raw := NoMethod(*s)
1608	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1609}
1610
1611// InstanceIosDetails: The iOS details resource.
1612type InstanceIosDetails struct {
1613	// BundleIdentifier: Bundle identifier.
1614	BundleIdentifier string `json:"bundleIdentifier,omitempty"`
1615
1616	// ItunesAppId: iTunes App ID.
1617	ItunesAppId string `json:"itunesAppId,omitempty"`
1618
1619	// Kind: Uniquely identifies the type of this resource. Value is always
1620	// the fixed string `games#instanceIosDetails`.
1621	Kind string `json:"kind,omitempty"`
1622
1623	// PreferredForIpad: Indicates that this instance is the default for new
1624	// installations on iPad devices.
1625	PreferredForIpad bool `json:"preferredForIpad,omitempty"`
1626
1627	// PreferredForIphone: Indicates that this instance is the default for
1628	// new installations on iPhone devices.
1629	PreferredForIphone bool `json:"preferredForIphone,omitempty"`
1630
1631	// SupportIpad: Flag to indicate if this instance supports iPad.
1632	SupportIpad bool `json:"supportIpad,omitempty"`
1633
1634	// SupportIphone: Flag to indicate if this instance supports iPhone.
1635	SupportIphone bool `json:"supportIphone,omitempty"`
1636
1637	// ForceSendFields is a list of field names (e.g. "BundleIdentifier") to
1638	// unconditionally include in API requests. By default, fields with
1639	// empty values are omitted from API requests. However, any non-pointer,
1640	// non-interface field appearing in ForceSendFields will be sent to the
1641	// server regardless of whether the field is empty or not. This may be
1642	// used to include empty fields in Patch requests.
1643	ForceSendFields []string `json:"-"`
1644
1645	// NullFields is a list of field names (e.g. "BundleIdentifier") to
1646	// include in API requests with the JSON null value. By default, fields
1647	// with empty values are omitted from API requests. However, any field
1648	// with an empty value appearing in NullFields will be sent to the
1649	// server as null. It is an error if a field in this list has a
1650	// non-empty value. This may be used to include null fields in Patch
1651	// requests.
1652	NullFields []string `json:"-"`
1653}
1654
1655func (s *InstanceIosDetails) MarshalJSON() ([]byte, error) {
1656	type NoMethod InstanceIosDetails
1657	raw := NoMethod(*s)
1658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1659}
1660
1661// InstanceWebDetails: The Web details resource.
1662type InstanceWebDetails struct {
1663	// Kind: Uniquely identifies the type of this resource. Value is always
1664	// the fixed string `games#instanceWebDetails`.
1665	Kind string `json:"kind,omitempty"`
1666
1667	// LaunchUrl: Launch URL for the game.
1668	LaunchUrl string `json:"launchUrl,omitempty"`
1669
1670	// Preferred: Indicates that this instance is the default for new
1671	// installations.
1672	Preferred bool `json:"preferred,omitempty"`
1673
1674	// ForceSendFields is a list of field names (e.g. "Kind") to
1675	// unconditionally include in API requests. By default, fields with
1676	// empty values are omitted from API requests. However, any non-pointer,
1677	// non-interface field appearing in ForceSendFields will be sent to the
1678	// server regardless of whether the field is empty or not. This may be
1679	// used to include empty fields in Patch requests.
1680	ForceSendFields []string `json:"-"`
1681
1682	// NullFields is a list of field names (e.g. "Kind") to include in API
1683	// requests with the JSON null value. By default, fields with empty
1684	// values are omitted from API requests. However, any field with an
1685	// empty value appearing in NullFields will be sent to the server as
1686	// null. It is an error if a field in this list has a non-empty value.
1687	// This may be used to include null fields in Patch requests.
1688	NullFields []string `json:"-"`
1689}
1690
1691func (s *InstanceWebDetails) MarshalJSON() ([]byte, error) {
1692	type NoMethod InstanceWebDetails
1693	raw := NoMethod(*s)
1694	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1695}
1696
1697// Leaderboard: The Leaderboard resource.
1698type Leaderboard struct {
1699	// IconUrl: The icon for the leaderboard.
1700	IconUrl string `json:"iconUrl,omitempty"`
1701
1702	// Id: The leaderboard ID.
1703	Id string `json:"id,omitempty"`
1704
1705	// IsIconUrlDefault: Indicates whether the icon image being returned is
1706	// a default image, or is game-provided.
1707	IsIconUrlDefault bool `json:"isIconUrlDefault,omitempty"`
1708
1709	// Kind: Uniquely identifies the type of this resource. Value is always
1710	// the fixed string `games#leaderboard`.
1711	Kind string `json:"kind,omitempty"`
1712
1713	// Name: The name of the leaderboard.
1714	Name string `json:"name,omitempty"`
1715
1716	// Order: How scores are ordered.
1717	//
1718	// Possible values:
1719	//   "SCORE_ORDER_UNSPECIFIED" - Default value. This value is unused.
1720	//   "LARGER_IS_BETTER" - Larger values are better; scores are sorted in
1721	// descending order
1722	//   "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted
1723	// in ascending order
1724	Order string `json:"order,omitempty"`
1725
1726	// ServerResponse contains the HTTP response code and headers from the
1727	// server.
1728	googleapi.ServerResponse `json:"-"`
1729
1730	// ForceSendFields is a list of field names (e.g. "IconUrl") to
1731	// unconditionally include in API requests. By default, fields with
1732	// empty values are omitted from API requests. However, any non-pointer,
1733	// non-interface field appearing in ForceSendFields will be sent to the
1734	// server regardless of whether the field is empty or not. This may be
1735	// used to include empty fields in Patch requests.
1736	ForceSendFields []string `json:"-"`
1737
1738	// NullFields is a list of field names (e.g. "IconUrl") to include in
1739	// API requests with the JSON null value. By default, fields with empty
1740	// values are omitted from API requests. However, any field with an
1741	// empty value appearing in NullFields will be sent to the server as
1742	// null. It is an error if a field in this list has a non-empty value.
1743	// This may be used to include null fields in Patch requests.
1744	NullFields []string `json:"-"`
1745}
1746
1747func (s *Leaderboard) MarshalJSON() ([]byte, error) {
1748	type NoMethod Leaderboard
1749	raw := NoMethod(*s)
1750	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1751}
1752
1753// LeaderboardEntry: The Leaderboard Entry resource.
1754type LeaderboardEntry struct {
1755	// FormattedScore: The localized string for the numerical value of this
1756	// score.
1757	FormattedScore string `json:"formattedScore,omitempty"`
1758
1759	// FormattedScoreRank: The localized string for the rank of this score
1760	// for this leaderboard.
1761	FormattedScoreRank string `json:"formattedScoreRank,omitempty"`
1762
1763	// Kind: Uniquely identifies the type of this resource. Value is always
1764	// the fixed string `games#leaderboardEntry`.
1765	Kind string `json:"kind,omitempty"`
1766
1767	// Player: The player who holds this score.
1768	Player *Player `json:"player,omitempty"`
1769
1770	// ScoreRank: The rank of this score for this leaderboard.
1771	ScoreRank int64 `json:"scoreRank,omitempty,string"`
1772
1773	// ScoreTag: Additional information about the score. Values must contain
1774	// no more than 64 URI-safe characters as defined by section 2.3 of RFC
1775	// 3986.
1776	ScoreTag string `json:"scoreTag,omitempty"`
1777
1778	// ScoreValue: The numerical value of this score.
1779	ScoreValue int64 `json:"scoreValue,omitempty,string"`
1780
1781	// TimeSpan: The time span of this high score.
1782	//
1783	// Possible values:
1784	//   "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is
1785	// unused.
1786	//   "ALL_TIME" - The score is an all-time score.
1787	//   "WEEKLY" - The score is a weekly score.
1788	//   "DAILY" - The score is a daily score.
1789	TimeSpan string `json:"timeSpan,omitempty"`
1790
1791	// WriteTimestampMillis: The timestamp at which this score was recorded,
1792	// in milliseconds since the epoch in UTC.
1793	WriteTimestampMillis int64 `json:"writeTimestampMillis,omitempty,string"`
1794
1795	// ForceSendFields is a list of field names (e.g. "FormattedScore") to
1796	// unconditionally include in API requests. By default, fields with
1797	// empty values are omitted from API requests. However, any non-pointer,
1798	// non-interface field appearing in ForceSendFields will be sent to the
1799	// server regardless of whether the field is empty or not. This may be
1800	// used to include empty fields in Patch requests.
1801	ForceSendFields []string `json:"-"`
1802
1803	// NullFields is a list of field names (e.g. "FormattedScore") to
1804	// include in API requests with the JSON null value. By default, fields
1805	// with empty values are omitted from API requests. However, any field
1806	// with an empty value appearing in NullFields will be sent to the
1807	// server as null. It is an error if a field in this list has a
1808	// non-empty value. This may be used to include null fields in Patch
1809	// requests.
1810	NullFields []string `json:"-"`
1811}
1812
1813func (s *LeaderboardEntry) MarshalJSON() ([]byte, error) {
1814	type NoMethod LeaderboardEntry
1815	raw := NoMethod(*s)
1816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1817}
1818
1819// LeaderboardListResponse: A list of leaderboard objects.
1820type LeaderboardListResponse struct {
1821	// Items: The leaderboards.
1822	Items []*Leaderboard `json:"items,omitempty"`
1823
1824	// Kind: Uniquely identifies the type of this resource. Value is always
1825	// the fixed string `games#leaderboardListResponse`.
1826	Kind string `json:"kind,omitempty"`
1827
1828	// NextPageToken: Token corresponding to the next page of results.
1829	NextPageToken string `json:"nextPageToken,omitempty"`
1830
1831	// ServerResponse contains the HTTP response code and headers from the
1832	// server.
1833	googleapi.ServerResponse `json:"-"`
1834
1835	// ForceSendFields is a list of field names (e.g. "Items") to
1836	// unconditionally include in API requests. By default, fields with
1837	// empty values are omitted from API requests. However, any non-pointer,
1838	// non-interface field appearing in ForceSendFields will be sent to the
1839	// server regardless of whether the field is empty or not. This may be
1840	// used to include empty fields in Patch requests.
1841	ForceSendFields []string `json:"-"`
1842
1843	// NullFields is a list of field names (e.g. "Items") to include in API
1844	// requests with the JSON null value. By default, fields with empty
1845	// values are omitted from API requests. However, any field with an
1846	// empty value appearing in NullFields will be sent to the server as
1847	// null. It is an error if a field in this list has a non-empty value.
1848	// This may be used to include null fields in Patch requests.
1849	NullFields []string `json:"-"`
1850}
1851
1852func (s *LeaderboardListResponse) MarshalJSON() ([]byte, error) {
1853	type NoMethod LeaderboardListResponse
1854	raw := NoMethod(*s)
1855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1856}
1857
1858// LeaderboardScoreRank: A score rank in a leaderboard.
1859type LeaderboardScoreRank struct {
1860	// FormattedNumScores: The number of scores in the leaderboard as a
1861	// string.
1862	FormattedNumScores string `json:"formattedNumScores,omitempty"`
1863
1864	// FormattedRank: The rank in the leaderboard as a string.
1865	FormattedRank string `json:"formattedRank,omitempty"`
1866
1867	// Kind: Uniquely identifies the type of this resource. Value is always
1868	// the fixed string `games#leaderboardScoreRank`.
1869	Kind string `json:"kind,omitempty"`
1870
1871	// NumScores: The number of scores in the leaderboard.
1872	NumScores int64 `json:"numScores,omitempty,string"`
1873
1874	// Rank: The rank in the leaderboard.
1875	Rank int64 `json:"rank,omitempty,string"`
1876
1877	// ForceSendFields is a list of field names (e.g. "FormattedNumScores")
1878	// to unconditionally include in API requests. By default, fields with
1879	// empty values are omitted from API requests. However, any non-pointer,
1880	// non-interface field appearing in ForceSendFields will be sent to the
1881	// server regardless of whether the field is empty or not. This may be
1882	// used to include empty fields in Patch requests.
1883	ForceSendFields []string `json:"-"`
1884
1885	// NullFields is a list of field names (e.g. "FormattedNumScores") to
1886	// include in API requests with the JSON null value. By default, fields
1887	// with empty values are omitted from API requests. However, any field
1888	// with an empty value appearing in NullFields will be sent to the
1889	// server as null. It is an error if a field in this list has a
1890	// non-empty value. This may be used to include null fields in Patch
1891	// requests.
1892	NullFields []string `json:"-"`
1893}
1894
1895func (s *LeaderboardScoreRank) MarshalJSON() ([]byte, error) {
1896	type NoMethod LeaderboardScoreRank
1897	raw := NoMethod(*s)
1898	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1899}
1900
1901// LeaderboardScores: A ListScores response.
1902type LeaderboardScores struct {
1903	// Items: The scores in the leaderboard.
1904	Items []*LeaderboardEntry `json:"items,omitempty"`
1905
1906	// Kind: Uniquely identifies the type of this resource. Value is always
1907	// the fixed string `games#leaderboardScores`.
1908	Kind string `json:"kind,omitempty"`
1909
1910	// NextPageToken: The pagination token for the next page of results.
1911	NextPageToken string `json:"nextPageToken,omitempty"`
1912
1913	// NumScores: The total number of scores in the leaderboard.
1914	NumScores int64 `json:"numScores,omitempty,string"`
1915
1916	// PlayerScore: The score of the requesting player on the leaderboard.
1917	// The player's score may appear both here and in the list of scores
1918	// above. If you are viewing a public leaderboard and the player is not
1919	// sharing their gameplay information publicly, the `scoreRank`and
1920	// `formattedScoreRank` values will not be present.
1921	PlayerScore *LeaderboardEntry `json:"playerScore,omitempty"`
1922
1923	// PrevPageToken: The pagination token for the previous page of results.
1924	PrevPageToken string `json:"prevPageToken,omitempty"`
1925
1926	// ServerResponse contains the HTTP response code and headers from the
1927	// server.
1928	googleapi.ServerResponse `json:"-"`
1929
1930	// ForceSendFields is a list of field names (e.g. "Items") to
1931	// unconditionally include in API requests. By default, fields with
1932	// empty values are omitted from API requests. However, any non-pointer,
1933	// non-interface field appearing in ForceSendFields will be sent to the
1934	// server regardless of whether the field is empty or not. This may be
1935	// used to include empty fields in Patch requests.
1936	ForceSendFields []string `json:"-"`
1937
1938	// NullFields is a list of field names (e.g. "Items") to include in API
1939	// requests with the JSON null value. By default, fields with empty
1940	// values are omitted from API requests. However, any field with an
1941	// empty value appearing in NullFields will be sent to the server as
1942	// null. It is an error if a field in this list has a non-empty value.
1943	// This may be used to include null fields in Patch requests.
1944	NullFields []string `json:"-"`
1945}
1946
1947func (s *LeaderboardScores) MarshalJSON() ([]byte, error) {
1948	type NoMethod LeaderboardScores
1949	raw := NoMethod(*s)
1950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1951}
1952
1953// MetagameConfig: The metagame config resource
1954type MetagameConfig struct {
1955	// CurrentVersion: Current version of the metagame configuration data.
1956	// When this data is updated, the version number will be increased by
1957	// one.
1958	CurrentVersion int64 `json:"currentVersion,omitempty"`
1959
1960	// Kind: Uniquely identifies the type of this resource. Value is always
1961	// the fixed string `games#metagameConfig`.
1962	Kind string `json:"kind,omitempty"`
1963
1964	// PlayerLevels: The list of player levels.
1965	PlayerLevels []*PlayerLevel `json:"playerLevels,omitempty"`
1966
1967	// ServerResponse contains the HTTP response code and headers from the
1968	// server.
1969	googleapi.ServerResponse `json:"-"`
1970
1971	// ForceSendFields is a list of field names (e.g. "CurrentVersion") to
1972	// unconditionally include in API requests. By default, fields with
1973	// empty values are omitted from API requests. However, any non-pointer,
1974	// non-interface field appearing in ForceSendFields will be sent to the
1975	// server regardless of whether the field is empty or not. This may be
1976	// used to include empty fields in Patch requests.
1977	ForceSendFields []string `json:"-"`
1978
1979	// NullFields is a list of field names (e.g. "CurrentVersion") to
1980	// include in API requests with the JSON null value. By default, fields
1981	// with empty values are omitted from API requests. However, any field
1982	// with an empty value appearing in NullFields will be sent to the
1983	// server as null. It is an error if a field in this list has a
1984	// non-empty value. This may be used to include null fields in Patch
1985	// requests.
1986	NullFields []string `json:"-"`
1987}
1988
1989func (s *MetagameConfig) MarshalJSON() ([]byte, error) {
1990	type NoMethod MetagameConfig
1991	raw := NoMethod(*s)
1992	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1993}
1994
1995// Player: A Player resource.
1996type Player struct {
1997	// AvatarImageUrl: The base URL for the image that represents the
1998	// player.
1999	AvatarImageUrl string `json:"avatarImageUrl,omitempty"`
2000
2001	// BannerUrlLandscape: The url to the landscape mode player banner
2002	// image.
2003	BannerUrlLandscape string `json:"bannerUrlLandscape,omitempty"`
2004
2005	// BannerUrlPortrait: The url to the portrait mode player banner image.
2006	BannerUrlPortrait string `json:"bannerUrlPortrait,omitempty"`
2007
2008	// DisplayName: The name to display for the player.
2009	DisplayName string `json:"displayName,omitempty"`
2010
2011	// ExperienceInfo: An object to represent Play Game experience
2012	// information for the player.
2013	ExperienceInfo *PlayerExperienceInfo `json:"experienceInfo,omitempty"`
2014
2015	// FriendStatus: The friend status of the given player, relative to the
2016	// requester. This is unset if the player is not sharing their friends
2017	// list with the game.
2018	//
2019	// Possible values:
2020	//   "FRIEND_STATUS_UNSPECIFIED" - Default value. This value is unused.
2021	//   "NO_RELATIONSHIP" - There is no relationship between the players.
2022	//   "FRIEND" - The player and requester are friends.
2023	FriendStatus string `json:"friendStatus,omitempty"`
2024
2025	// Kind: Uniquely identifies the type of this resource. Value is always
2026	// the fixed string `games#player`
2027	Kind string `json:"kind,omitempty"`
2028
2029	// Name: A representation of the individual components of the name.
2030	Name *PlayerName `json:"name,omitempty"`
2031
2032	// OriginalPlayerId: The player ID that was used for this player the
2033	// first time they signed into the game in question. This is only
2034	// populated for calls to player.get for the requesting player, only if
2035	// the player ID has subsequently changed, and only to clients that
2036	// support remapping player IDs.
2037	OriginalPlayerId string `json:"originalPlayerId,omitempty"`
2038
2039	// PlayerId: The ID of the player.
2040	PlayerId string `json:"playerId,omitempty"`
2041
2042	// ProfileSettings: The player's profile settings. Controls whether or
2043	// not the player's profile is visible to other players.
2044	ProfileSettings *ProfileSettings `json:"profileSettings,omitempty"`
2045
2046	// Title: The player's title rewarded for their game activities.
2047	Title string `json:"title,omitempty"`
2048
2049	// ServerResponse contains the HTTP response code and headers from the
2050	// server.
2051	googleapi.ServerResponse `json:"-"`
2052
2053	// ForceSendFields is a list of field names (e.g. "AvatarImageUrl") to
2054	// unconditionally include in API requests. By default, fields with
2055	// empty values are omitted from API requests. However, any non-pointer,
2056	// non-interface field appearing in ForceSendFields will be sent to the
2057	// server regardless of whether the field is empty or not. This may be
2058	// used to include empty fields in Patch requests.
2059	ForceSendFields []string `json:"-"`
2060
2061	// NullFields is a list of field names (e.g. "AvatarImageUrl") to
2062	// include in API requests with the JSON null value. By default, fields
2063	// with empty values are omitted from API requests. However, any field
2064	// with an empty value appearing in NullFields will be sent to the
2065	// server as null. It is an error if a field in this list has a
2066	// non-empty value. This may be used to include null fields in Patch
2067	// requests.
2068	NullFields []string `json:"-"`
2069}
2070
2071func (s *Player) MarshalJSON() ([]byte, error) {
2072	type NoMethod Player
2073	raw := NoMethod(*s)
2074	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2075}
2076
2077// PlayerName: A representation of the individual components of the
2078// name.
2079type PlayerName struct {
2080	// FamilyName: The family name of this player. In some places, this is
2081	// known as the last name.
2082	FamilyName string `json:"familyName,omitempty"`
2083
2084	// GivenName: The given name of this player. In some places, this is
2085	// known as the first name.
2086	GivenName string `json:"givenName,omitempty"`
2087
2088	// ForceSendFields is a list of field names (e.g. "FamilyName") to
2089	// unconditionally include in API requests. By default, fields with
2090	// empty values are omitted from API requests. However, any non-pointer,
2091	// non-interface field appearing in ForceSendFields will be sent to the
2092	// server regardless of whether the field is empty or not. This may be
2093	// used to include empty fields in Patch requests.
2094	ForceSendFields []string `json:"-"`
2095
2096	// NullFields is a list of field names (e.g. "FamilyName") to include in
2097	// API requests with the JSON null value. By default, fields with empty
2098	// values are omitted from API requests. However, any field with an
2099	// empty value appearing in NullFields will be sent to the server as
2100	// null. It is an error if a field in this list has a non-empty value.
2101	// This may be used to include null fields in Patch requests.
2102	NullFields []string `json:"-"`
2103}
2104
2105func (s *PlayerName) MarshalJSON() ([]byte, error) {
2106	type NoMethod PlayerName
2107	raw := NoMethod(*s)
2108	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2109}
2110
2111// PlayerAchievement: An achievement object.
2112type PlayerAchievement struct {
2113	// AchievementState: The state of the achievement.
2114	//
2115	// Possible values:
2116	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
2117	//   "HIDDEN" - Achievement is hidden.
2118	//   "REVEALED" - Achievement is revealed.
2119	//   "UNLOCKED" - Achievement is unlocked.
2120	AchievementState string `json:"achievementState,omitempty"`
2121
2122	// CurrentSteps: The current steps for an incremental achievement.
2123	CurrentSteps int64 `json:"currentSteps,omitempty"`
2124
2125	// ExperiencePoints: Experience points earned for the achievement. This
2126	// field is absent for achievements that have not yet been unlocked and
2127	// 0 for achievements that have been unlocked by testers but that are
2128	// unpublished.
2129	ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
2130
2131	// FormattedCurrentStepsString: The current steps for an incremental
2132	// achievement as a string.
2133	FormattedCurrentStepsString string `json:"formattedCurrentStepsString,omitempty"`
2134
2135	// Id: The ID of the achievement.
2136	Id string `json:"id,omitempty"`
2137
2138	// Kind: Uniquely identifies the type of this resource. Value is always
2139	// the fixed string `games#playerAchievement`.
2140	Kind string `json:"kind,omitempty"`
2141
2142	// LastUpdatedTimestamp: The timestamp of the last modification to this
2143	// achievement's state.
2144	LastUpdatedTimestamp int64 `json:"lastUpdatedTimestamp,omitempty,string"`
2145
2146	// ForceSendFields is a list of field names (e.g. "AchievementState") to
2147	// unconditionally include in API requests. By default, fields with
2148	// empty values are omitted from API requests. However, any non-pointer,
2149	// non-interface field appearing in ForceSendFields will be sent to the
2150	// server regardless of whether the field is empty or not. This may be
2151	// used to include empty fields in Patch requests.
2152	ForceSendFields []string `json:"-"`
2153
2154	// NullFields is a list of field names (e.g. "AchievementState") to
2155	// include in API requests with the JSON null value. By default, fields
2156	// with empty values are omitted from API requests. However, any field
2157	// with an empty value appearing in NullFields will be sent to the
2158	// server as null. It is an error if a field in this list has a
2159	// non-empty value. This may be used to include null fields in Patch
2160	// requests.
2161	NullFields []string `json:"-"`
2162}
2163
2164func (s *PlayerAchievement) MarshalJSON() ([]byte, error) {
2165	type NoMethod PlayerAchievement
2166	raw := NoMethod(*s)
2167	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2168}
2169
2170// PlayerAchievementListResponse: A list of achievement objects.
2171type PlayerAchievementListResponse struct {
2172	// Items: The achievements.
2173	Items []*PlayerAchievement `json:"items,omitempty"`
2174
2175	// Kind: Uniquely identifies the type of this resource. Value is always
2176	// the fixed string `games#playerAchievementListResponse`.
2177	Kind string `json:"kind,omitempty"`
2178
2179	// NextPageToken: Token corresponding to the next page of results.
2180	NextPageToken string `json:"nextPageToken,omitempty"`
2181
2182	// ServerResponse contains the HTTP response code and headers from the
2183	// server.
2184	googleapi.ServerResponse `json:"-"`
2185
2186	// ForceSendFields is a list of field names (e.g. "Items") to
2187	// unconditionally include in API requests. By default, fields with
2188	// empty values are omitted from API requests. However, any non-pointer,
2189	// non-interface field appearing in ForceSendFields will be sent to the
2190	// server regardless of whether the field is empty or not. This may be
2191	// used to include empty fields in Patch requests.
2192	ForceSendFields []string `json:"-"`
2193
2194	// NullFields is a list of field names (e.g. "Items") to include in API
2195	// requests with the JSON null value. By default, fields with empty
2196	// values are omitted from API requests. However, any field with an
2197	// empty value appearing in NullFields will be sent to the server as
2198	// null. It is an error if a field in this list has a non-empty value.
2199	// This may be used to include null fields in Patch requests.
2200	NullFields []string `json:"-"`
2201}
2202
2203func (s *PlayerAchievementListResponse) MarshalJSON() ([]byte, error) {
2204	type NoMethod PlayerAchievementListResponse
2205	raw := NoMethod(*s)
2206	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2207}
2208
2209// PlayerEvent: An event status resource.
2210type PlayerEvent struct {
2211	// DefinitionId: The ID of the event definition.
2212	DefinitionId string `json:"definitionId,omitempty"`
2213
2214	// FormattedNumEvents: The current number of times this event has
2215	// occurred, as a string. The formatting of this string depends on the
2216	// configuration of your event in the Play Games Developer Console.
2217	FormattedNumEvents string `json:"formattedNumEvents,omitempty"`
2218
2219	// Kind: Uniquely identifies the type of this resource. Value is always
2220	// the fixed string `games#playerEvent`.
2221	Kind string `json:"kind,omitempty"`
2222
2223	// NumEvents: The current number of times this event has occurred.
2224	NumEvents int64 `json:"numEvents,omitempty,string"`
2225
2226	// PlayerId: The ID of the player.
2227	PlayerId string `json:"playerId,omitempty"`
2228
2229	// ForceSendFields is a list of field names (e.g. "DefinitionId") to
2230	// unconditionally include in API requests. By default, fields with
2231	// empty values are omitted from API requests. However, any non-pointer,
2232	// non-interface field appearing in ForceSendFields will be sent to the
2233	// server regardless of whether the field is empty or not. This may be
2234	// used to include empty fields in Patch requests.
2235	ForceSendFields []string `json:"-"`
2236
2237	// NullFields is a list of field names (e.g. "DefinitionId") to include
2238	// in API requests with the JSON null value. By default, fields with
2239	// empty values are omitted from API requests. However, any field with
2240	// an empty value appearing in NullFields will be sent to the server as
2241	// null. It is an error if a field in this list has a non-empty value.
2242	// This may be used to include null fields in Patch requests.
2243	NullFields []string `json:"-"`
2244}
2245
2246func (s *PlayerEvent) MarshalJSON() ([]byte, error) {
2247	type NoMethod PlayerEvent
2248	raw := NoMethod(*s)
2249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2250}
2251
2252// PlayerEventListResponse: A ListByPlayer response.
2253type PlayerEventListResponse struct {
2254	// Items: The player events.
2255	Items []*PlayerEvent `json:"items,omitempty"`
2256
2257	// Kind: Uniquely identifies the type of this resource. Value is always
2258	// the fixed string `games#playerEventListResponse`.
2259	Kind string `json:"kind,omitempty"`
2260
2261	// NextPageToken: The pagination token for the next page of results.
2262	NextPageToken string `json:"nextPageToken,omitempty"`
2263
2264	// ServerResponse contains the HTTP response code and headers from the
2265	// server.
2266	googleapi.ServerResponse `json:"-"`
2267
2268	// ForceSendFields is a list of field names (e.g. "Items") to
2269	// unconditionally include in API requests. By default, fields with
2270	// empty values are omitted from API requests. However, any non-pointer,
2271	// non-interface field appearing in ForceSendFields will be sent to the
2272	// server regardless of whether the field is empty or not. This may be
2273	// used to include empty fields in Patch requests.
2274	ForceSendFields []string `json:"-"`
2275
2276	// NullFields is a list of field names (e.g. "Items") to include in API
2277	// requests with the JSON null value. By default, fields with empty
2278	// values are omitted from API requests. However, any field with an
2279	// empty value appearing in NullFields will be sent to the server as
2280	// null. It is an error if a field in this list has a non-empty value.
2281	// This may be used to include null fields in Patch requests.
2282	NullFields []string `json:"-"`
2283}
2284
2285func (s *PlayerEventListResponse) MarshalJSON() ([]byte, error) {
2286	type NoMethod PlayerEventListResponse
2287	raw := NoMethod(*s)
2288	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2289}
2290
2291// PlayerExperienceInfo: 1P/3P metadata about the player's experience.
2292type PlayerExperienceInfo struct {
2293	// CurrentExperiencePoints: The current number of experience points for
2294	// the player.
2295	CurrentExperiencePoints int64 `json:"currentExperiencePoints,omitempty,string"`
2296
2297	// CurrentLevel: The current level of the player.
2298	CurrentLevel *PlayerLevel `json:"currentLevel,omitempty"`
2299
2300	// Kind: Uniquely identifies the type of this resource. Value is always
2301	// the fixed string `games#playerExperienceInfo`.
2302	Kind string `json:"kind,omitempty"`
2303
2304	// LastLevelUpTimestampMillis: The timestamp when the player was leveled
2305	// up, in millis since Unix epoch UTC.
2306	LastLevelUpTimestampMillis int64 `json:"lastLevelUpTimestampMillis,omitempty,string"`
2307
2308	// NextLevel: The next level of the player. If the current level is the
2309	// maximum level, this should be same as the current level.
2310	NextLevel *PlayerLevel `json:"nextLevel,omitempty"`
2311
2312	// ForceSendFields is a list of field names (e.g.
2313	// "CurrentExperiencePoints") to unconditionally include in API
2314	// requests. By default, fields with empty values are omitted from API
2315	// requests. However, any non-pointer, non-interface field appearing in
2316	// ForceSendFields will be sent to the server regardless of whether the
2317	// field is empty or not. This may be used to include empty fields in
2318	// Patch requests.
2319	ForceSendFields []string `json:"-"`
2320
2321	// NullFields is a list of field names (e.g. "CurrentExperiencePoints")
2322	// to include in API requests with the JSON null value. By default,
2323	// fields with empty values are omitted from API requests. However, any
2324	// field with an empty value appearing in NullFields will be sent to the
2325	// server as null. It is an error if a field in this list has a
2326	// non-empty value. This may be used to include null fields in Patch
2327	// requests.
2328	NullFields []string `json:"-"`
2329}
2330
2331func (s *PlayerExperienceInfo) MarshalJSON() ([]byte, error) {
2332	type NoMethod PlayerExperienceInfo
2333	raw := NoMethod(*s)
2334	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2335}
2336
2337// PlayerLeaderboardScore: A player leaderboard score object.
2338type PlayerLeaderboardScore struct {
2339	// FriendsRank: The rank of the score in the friends collection for this
2340	// leaderboard.
2341	FriendsRank *LeaderboardScoreRank `json:"friendsRank,omitempty"`
2342
2343	// Kind: Uniquely identifies the type of this resource. Value is always
2344	// the fixed string `games#playerLeaderboardScore`.
2345	Kind string `json:"kind,omitempty"`
2346
2347	// LeaderboardId: The ID of the leaderboard this score is in.
2348	LeaderboardId string `json:"leaderboard_id,omitempty"`
2349
2350	// PublicRank: The public rank of the score in this leaderboard. This
2351	// object will not be present if the user is not sharing their scores
2352	// publicly.
2353	PublicRank *LeaderboardScoreRank `json:"publicRank,omitempty"`
2354
2355	// ScoreString: The formatted value of this score.
2356	ScoreString string `json:"scoreString,omitempty"`
2357
2358	// ScoreTag: Additional information about the score. Values must contain
2359	// no more than 64 URI-safe characters as defined by section 2.3 of RFC
2360	// 3986.
2361	ScoreTag string `json:"scoreTag,omitempty"`
2362
2363	// ScoreValue: The numerical value of this score.
2364	ScoreValue int64 `json:"scoreValue,omitempty,string"`
2365
2366	// SocialRank: The social rank of the score in this leaderboard.
2367	SocialRank *LeaderboardScoreRank `json:"socialRank,omitempty"`
2368
2369	// TimeSpan: The time span of this score.
2370	//
2371	// Possible values:
2372	//   "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is
2373	// unused.
2374	//   "ALL_TIME" - The score is an all-time score.
2375	//   "WEEKLY" - The score is a weekly score.
2376	//   "DAILY" - The score is a daily score.
2377	TimeSpan string `json:"timeSpan,omitempty"`
2378
2379	// WriteTimestamp: The timestamp at which this score was recorded, in
2380	// milliseconds since the epoch in UTC.
2381	WriteTimestamp int64 `json:"writeTimestamp,omitempty,string"`
2382
2383	// ForceSendFields is a list of field names (e.g. "FriendsRank") to
2384	// unconditionally include in API requests. By default, fields with
2385	// empty values are omitted from API requests. However, any non-pointer,
2386	// non-interface field appearing in ForceSendFields will be sent to the
2387	// server regardless of whether the field is empty or not. This may be
2388	// used to include empty fields in Patch requests.
2389	ForceSendFields []string `json:"-"`
2390
2391	// NullFields is a list of field names (e.g. "FriendsRank") to include
2392	// in API requests with the JSON null value. By default, fields with
2393	// empty values are omitted from API requests. However, any field with
2394	// an empty value appearing in NullFields will be sent to the server as
2395	// null. It is an error if a field in this list has a non-empty value.
2396	// This may be used to include null fields in Patch requests.
2397	NullFields []string `json:"-"`
2398}
2399
2400func (s *PlayerLeaderboardScore) MarshalJSON() ([]byte, error) {
2401	type NoMethod PlayerLeaderboardScore
2402	raw := NoMethod(*s)
2403	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2404}
2405
2406// PlayerLeaderboardScoreListResponse: A list of player leaderboard
2407// scores.
2408type PlayerLeaderboardScoreListResponse struct {
2409	// Items: The leaderboard scores.
2410	Items []*PlayerLeaderboardScore `json:"items,omitempty"`
2411
2412	// Kind: Uniquely identifies the type of this resource. Value is always
2413	// the fixed string `games#playerLeaderboardScoreListResponse`.
2414	Kind string `json:"kind,omitempty"`
2415
2416	// NextPageToken: The pagination token for the next page of results.
2417	NextPageToken string `json:"nextPageToken,omitempty"`
2418
2419	// Player: The Player resources for the owner of this score.
2420	Player *Player `json:"player,omitempty"`
2421
2422	// ServerResponse contains the HTTP response code and headers from the
2423	// server.
2424	googleapi.ServerResponse `json:"-"`
2425
2426	// ForceSendFields is a list of field names (e.g. "Items") to
2427	// unconditionally include in API requests. By default, fields with
2428	// empty values are omitted from API requests. However, any non-pointer,
2429	// non-interface field appearing in ForceSendFields will be sent to the
2430	// server regardless of whether the field is empty or not. This may be
2431	// used to include empty fields in Patch requests.
2432	ForceSendFields []string `json:"-"`
2433
2434	// NullFields is a list of field names (e.g. "Items") to include in API
2435	// requests with the JSON null value. By default, fields with empty
2436	// values are omitted from API requests. However, any field with an
2437	// empty value appearing in NullFields will be sent to the server as
2438	// null. It is an error if a field in this list has a non-empty value.
2439	// This may be used to include null fields in Patch requests.
2440	NullFields []string `json:"-"`
2441}
2442
2443func (s *PlayerLeaderboardScoreListResponse) MarshalJSON() ([]byte, error) {
2444	type NoMethod PlayerLeaderboardScoreListResponse
2445	raw := NoMethod(*s)
2446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2447}
2448
2449// PlayerLevel: 1P/3P metadata about a user's level.
2450type PlayerLevel struct {
2451	// Kind: Uniquely identifies the type of this resource. Value is always
2452	// the fixed string `games#playerLevel`.
2453	Kind string `json:"kind,omitempty"`
2454
2455	// Level: The level for the user.
2456	Level int64 `json:"level,omitempty"`
2457
2458	// MaxExperiencePoints: The maximum experience points for this level.
2459	MaxExperiencePoints int64 `json:"maxExperiencePoints,omitempty,string"`
2460
2461	// MinExperiencePoints: The minimum experience points for this level.
2462	MinExperiencePoints int64 `json:"minExperiencePoints,omitempty,string"`
2463
2464	// ForceSendFields is a list of field names (e.g. "Kind") to
2465	// unconditionally include in API requests. By default, fields with
2466	// empty values are omitted from API requests. However, any non-pointer,
2467	// non-interface field appearing in ForceSendFields will be sent to the
2468	// server regardless of whether the field is empty or not. This may be
2469	// used to include empty fields in Patch requests.
2470	ForceSendFields []string `json:"-"`
2471
2472	// NullFields is a list of field names (e.g. "Kind") to include in API
2473	// requests with the JSON null value. By default, fields with empty
2474	// values are omitted from API requests. However, any field with an
2475	// empty value appearing in NullFields will be sent to the server as
2476	// null. It is an error if a field in this list has a non-empty value.
2477	// This may be used to include null fields in Patch requests.
2478	NullFields []string `json:"-"`
2479}
2480
2481func (s *PlayerLevel) MarshalJSON() ([]byte, error) {
2482	type NoMethod PlayerLevel
2483	raw := NoMethod(*s)
2484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2485}
2486
2487// PlayerListResponse: A third party player list response.
2488type PlayerListResponse struct {
2489	// Items: The players.
2490	Items []*Player `json:"items,omitempty"`
2491
2492	// Kind: Uniquely identifies the type of this resource. Value is always
2493	// the fixed string `games#playerListResponse`.
2494	Kind string `json:"kind,omitempty"`
2495
2496	// NextPageToken: Token corresponding to the next page of results.
2497	NextPageToken string `json:"nextPageToken,omitempty"`
2498
2499	// ServerResponse contains the HTTP response code and headers from the
2500	// server.
2501	googleapi.ServerResponse `json:"-"`
2502
2503	// ForceSendFields is a list of field names (e.g. "Items") to
2504	// unconditionally include in API requests. By default, fields with
2505	// empty values are omitted from API requests. However, any non-pointer,
2506	// non-interface field appearing in ForceSendFields will be sent to the
2507	// server regardless of whether the field is empty or not. This may be
2508	// used to include empty fields in Patch requests.
2509	ForceSendFields []string `json:"-"`
2510
2511	// NullFields is a list of field names (e.g. "Items") to include in API
2512	// requests with the JSON null value. By default, fields with empty
2513	// values are omitted from API requests. However, any field with an
2514	// empty value appearing in NullFields will be sent to the server as
2515	// null. It is an error if a field in this list has a non-empty value.
2516	// This may be used to include null fields in Patch requests.
2517	NullFields []string `json:"-"`
2518}
2519
2520func (s *PlayerListResponse) MarshalJSON() ([]byte, error) {
2521	type NoMethod PlayerListResponse
2522	raw := NoMethod(*s)
2523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2524}
2525
2526// PlayerScore: A player score.
2527type PlayerScore struct {
2528	// FormattedScore: The formatted score for this player score.
2529	FormattedScore string `json:"formattedScore,omitempty"`
2530
2531	// Kind: Uniquely identifies the type of this resource. Value is always
2532	// the fixed string `games#playerScore`.
2533	Kind string `json:"kind,omitempty"`
2534
2535	// Score: The numerical value for this player score.
2536	Score int64 `json:"score,omitempty,string"`
2537
2538	// ScoreTag: Additional information about this score. Values will
2539	// contain no more than 64 URI-safe characters as defined by section 2.3
2540	// of RFC 3986.
2541	ScoreTag string `json:"scoreTag,omitempty"`
2542
2543	// TimeSpan: The time span for this player score.
2544	//
2545	// Possible values:
2546	//   "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is
2547	// unused.
2548	//   "ALL_TIME" - The score is an all-time score.
2549	//   "WEEKLY" - The score is a weekly score.
2550	//   "DAILY" - The score is a daily score.
2551	TimeSpan string `json:"timeSpan,omitempty"`
2552
2553	// ForceSendFields is a list of field names (e.g. "FormattedScore") to
2554	// unconditionally include in API requests. By default, fields with
2555	// empty values are omitted from API requests. However, any non-pointer,
2556	// non-interface field appearing in ForceSendFields will be sent to the
2557	// server regardless of whether the field is empty or not. This may be
2558	// used to include empty fields in Patch requests.
2559	ForceSendFields []string `json:"-"`
2560
2561	// NullFields is a list of field names (e.g. "FormattedScore") to
2562	// include in API requests with the JSON null value. By default, fields
2563	// with empty values are omitted from API requests. However, any field
2564	// with an empty value appearing in NullFields will be sent to the
2565	// server as null. It is an error if a field in this list has a
2566	// non-empty value. This may be used to include null fields in Patch
2567	// requests.
2568	NullFields []string `json:"-"`
2569}
2570
2571func (s *PlayerScore) MarshalJSON() ([]byte, error) {
2572	type NoMethod PlayerScore
2573	raw := NoMethod(*s)
2574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2575}
2576
2577// PlayerScoreListResponse: A list of score submission statuses.
2578type PlayerScoreListResponse struct {
2579	// Kind: Uniquely identifies the type of this resource. Value is always
2580	// the fixed string `games#playerScoreListResponse`.
2581	Kind string `json:"kind,omitempty"`
2582
2583	// SubmittedScores: The score submissions statuses.
2584	SubmittedScores []*PlayerScoreResponse `json:"submittedScores,omitempty"`
2585
2586	// ServerResponse contains the HTTP response code and headers from the
2587	// server.
2588	googleapi.ServerResponse `json:"-"`
2589
2590	// ForceSendFields is a list of field names (e.g. "Kind") to
2591	// unconditionally include in API requests. By default, fields with
2592	// empty values are omitted from API requests. However, any non-pointer,
2593	// non-interface field appearing in ForceSendFields will be sent to the
2594	// server regardless of whether the field is empty or not. This may be
2595	// used to include empty fields in Patch requests.
2596	ForceSendFields []string `json:"-"`
2597
2598	// NullFields is a list of field names (e.g. "Kind") to include in API
2599	// requests with the JSON null value. By default, fields with empty
2600	// values are omitted from API requests. However, any field with an
2601	// empty value appearing in NullFields will be sent to the server as
2602	// null. It is an error if a field in this list has a non-empty value.
2603	// This may be used to include null fields in Patch requests.
2604	NullFields []string `json:"-"`
2605}
2606
2607func (s *PlayerScoreListResponse) MarshalJSON() ([]byte, error) {
2608	type NoMethod PlayerScoreListResponse
2609	raw := NoMethod(*s)
2610	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2611}
2612
2613// PlayerScoreResponse: A list of leaderboard entry resources.
2614type PlayerScoreResponse struct {
2615	// BeatenScoreTimeSpans: The time spans where the submitted score is
2616	// better than the existing score for that time span.
2617	//
2618	// Possible values:
2619	//   "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is
2620	// unused.
2621	//   "ALL_TIME" - The score is an all-time score.
2622	//   "WEEKLY" - The score is a weekly score.
2623	//   "DAILY" - The score is a daily score.
2624	BeatenScoreTimeSpans []string `json:"beatenScoreTimeSpans,omitempty"`
2625
2626	// FormattedScore: The formatted value of the submitted score.
2627	FormattedScore string `json:"formattedScore,omitempty"`
2628
2629	// Kind: Uniquely identifies the type of this resource. Value is always
2630	// the fixed string `games#playerScoreResponse`.
2631	Kind string `json:"kind,omitempty"`
2632
2633	// LeaderboardId: The leaderboard ID that this score was submitted to.
2634	LeaderboardId string `json:"leaderboardId,omitempty"`
2635
2636	// ScoreTag: Additional information about this score. Values will
2637	// contain no more than 64 URI-safe characters as defined by section 2.3
2638	// of RFC 3986.
2639	ScoreTag string `json:"scoreTag,omitempty"`
2640
2641	// UnbeatenScores: The scores in time spans that have not been beaten.
2642	// As an example, the submitted score may be better than the player's
2643	// `DAILY` score, but not better than the player's scores for the
2644	// `WEEKLY` or `ALL_TIME` time spans.
2645	UnbeatenScores []*PlayerScore `json:"unbeatenScores,omitempty"`
2646
2647	// ServerResponse contains the HTTP response code and headers from the
2648	// server.
2649	googleapi.ServerResponse `json:"-"`
2650
2651	// ForceSendFields is a list of field names (e.g.
2652	// "BeatenScoreTimeSpans") to unconditionally include in API requests.
2653	// By default, fields with empty values are omitted from API requests.
2654	// However, any non-pointer, non-interface field appearing in
2655	// ForceSendFields will be sent to the server regardless of whether the
2656	// field is empty or not. This may be used to include empty fields in
2657	// Patch requests.
2658	ForceSendFields []string `json:"-"`
2659
2660	// NullFields is a list of field names (e.g. "BeatenScoreTimeSpans") to
2661	// include in API requests with the JSON null value. By default, fields
2662	// with empty values are omitted from API requests. However, any field
2663	// with an empty value appearing in NullFields will be sent to the
2664	// server as null. It is an error if a field in this list has a
2665	// non-empty value. This may be used to include null fields in Patch
2666	// requests.
2667	NullFields []string `json:"-"`
2668}
2669
2670func (s *PlayerScoreResponse) MarshalJSON() ([]byte, error) {
2671	type NoMethod PlayerScoreResponse
2672	raw := NoMethod(*s)
2673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2674}
2675
2676// PlayerScoreSubmissionList: A list of score submission requests.
2677type PlayerScoreSubmissionList struct {
2678	// Kind: Uniquely identifies the type of this resource. Value is always
2679	// the fixed string `games#playerScoreSubmissionList`.
2680	Kind string `json:"kind,omitempty"`
2681
2682	// Scores: The score submissions.
2683	Scores []*ScoreSubmission `json:"scores,omitempty"`
2684
2685	// ForceSendFields is a list of field names (e.g. "Kind") to
2686	// unconditionally include in API requests. By default, fields with
2687	// empty values are omitted from API requests. However, any non-pointer,
2688	// non-interface field appearing in ForceSendFields will be sent to the
2689	// server regardless of whether the field is empty or not. This may be
2690	// used to include empty fields in Patch requests.
2691	ForceSendFields []string `json:"-"`
2692
2693	// NullFields is a list of field names (e.g. "Kind") to include in API
2694	// requests with the JSON null value. By default, fields with empty
2695	// values are omitted from API requests. However, any field with an
2696	// empty value appearing in NullFields will be sent to the server as
2697	// null. It is an error if a field in this list has a non-empty value.
2698	// This may be used to include null fields in Patch requests.
2699	NullFields []string `json:"-"`
2700}
2701
2702func (s *PlayerScoreSubmissionList) MarshalJSON() ([]byte, error) {
2703	type NoMethod PlayerScoreSubmissionList
2704	raw := NoMethod(*s)
2705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2706}
2707
2708// ProfileSettings: Profile settings
2709type ProfileSettings struct {
2710	// Possible values:
2711	//   "FRIENDS_LIST_VISIBILITY_UNSPECIFIED" - Unused.
2712	//   "VISIBLE" - The friends list is currently visible to the game.
2713	//   "REQUEST_REQUIRED" - The developer does not have access to the
2714	// friends list, but can call the Android API to show a consent dialog.
2715	//   "UNAVAILABLE" - The friends list is currently unavailable for this
2716	// user, and it is not possible to request access at this time, either
2717	// because the user has permanently declined or the friends feature is
2718	// not available to them. In this state, any attempts to request access
2719	// to the friends list will be unsuccessful.
2720	FriendsListVisibility string `json:"friendsListVisibility,omitempty"`
2721
2722	// Kind: Uniquely identifies the type of this resource. Value is always
2723	// the fixed string `games#profileSettings`.
2724	Kind string `json:"kind,omitempty"`
2725
2726	// ProfileVisible: Whether the player's profile is visible to the
2727	// currently signed in player.
2728	ProfileVisible bool `json:"profileVisible,omitempty"`
2729
2730	// ForceSendFields is a list of field names (e.g.
2731	// "FriendsListVisibility") to unconditionally include in API requests.
2732	// By default, fields with empty values are omitted from API requests.
2733	// However, any non-pointer, non-interface field appearing in
2734	// ForceSendFields will be sent to the server regardless of whether the
2735	// field is empty or not. This may be used to include empty fields in
2736	// Patch requests.
2737	ForceSendFields []string `json:"-"`
2738
2739	// NullFields is a list of field names (e.g. "FriendsListVisibility") to
2740	// include in API requests with the JSON null value. By default, fields
2741	// with empty values are omitted from API requests. However, any field
2742	// with an empty value appearing in NullFields will be sent to the
2743	// server as null. It is an error if a field in this list has a
2744	// non-empty value. This may be used to include null fields in Patch
2745	// requests.
2746	NullFields []string `json:"-"`
2747}
2748
2749func (s *ProfileSettings) MarshalJSON() ([]byte, error) {
2750	type NoMethod ProfileSettings
2751	raw := NoMethod(*s)
2752	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2753}
2754
2755// ResolveSnapshotHeadRequest: Request for ResolveSnapshotHead RPC.
2756type ResolveSnapshotHeadRequest struct {
2757	// ResolutionPolicy: Required. The automatic resolution policy. All
2758	// conflicts are resolved in chronological order, starting from the/
2759	// least recent. If the comparison metric is equal for the tentative
2760	// head and the conflict, the head wins.
2761	//
2762	// Possible values:
2763	//   "RESOLUTION_POLICY_UNSPECIFIED" - Safe default, don't use
2764	// explicitly.
2765	//   "USE_HEAD" - Drops all conflicts and keeps the current head only.
2766	//   "LONGEST_PLAYTIME" - Use the snapshot with the longest played time.
2767	//   "MOST_RECENTLY_MODIFIED" - Use the snapshot that was most recently
2768	// modified.
2769	//   "HIGHEST_PROGRESS" - Use the snapshot with the highest progress
2770	// value.
2771	//   "NO_AUTOMATIC_RESOLUTION" - Don't resolve conflicts at all.
2772	// Effectively only returns the current head revision of the snapshot.
2773	// Corresponds to a game opening the snapshot with manual resolution
2774	// policy.
2775	ResolutionPolicy string `json:"resolutionPolicy,omitempty"`
2776
2777	// ForceSendFields is a list of field names (e.g. "ResolutionPolicy") to
2778	// unconditionally include in API requests. By default, fields with
2779	// empty values are omitted from API requests. However, any non-pointer,
2780	// non-interface field appearing in ForceSendFields will be sent to the
2781	// server regardless of whether the field is empty or not. This may be
2782	// used to include empty fields in Patch requests.
2783	ForceSendFields []string `json:"-"`
2784
2785	// NullFields is a list of field names (e.g. "ResolutionPolicy") to
2786	// include in API requests with the JSON null value. By default, fields
2787	// with empty values are omitted from API requests. However, any field
2788	// with an empty value appearing in NullFields will be sent to the
2789	// server as null. It is an error if a field in this list has a
2790	// non-empty value. This may be used to include null fields in Patch
2791	// requests.
2792	NullFields []string `json:"-"`
2793}
2794
2795func (s *ResolveSnapshotHeadRequest) MarshalJSON() ([]byte, error) {
2796	type NoMethod ResolveSnapshotHeadRequest
2797	raw := NoMethod(*s)
2798	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2799}
2800
2801// ResolveSnapshotHeadResponse: Response for ResolveSnapshotHead RPC.
2802type ResolveSnapshotHeadResponse struct {
2803	// Snapshot: The state of the snapshot.
2804	Snapshot *SnapshotExtended `json:"snapshot,omitempty"`
2805
2806	// ServerResponse contains the HTTP response code and headers from the
2807	// server.
2808	googleapi.ServerResponse `json:"-"`
2809
2810	// ForceSendFields is a list of field names (e.g. "Snapshot") to
2811	// unconditionally include in API requests. By default, fields with
2812	// empty values are omitted from API requests. However, any non-pointer,
2813	// non-interface field appearing in ForceSendFields will be sent to the
2814	// server regardless of whether the field is empty or not. This may be
2815	// used to include empty fields in Patch requests.
2816	ForceSendFields []string `json:"-"`
2817
2818	// NullFields is a list of field names (e.g. "Snapshot") to include in
2819	// API requests with the JSON null value. By default, fields with empty
2820	// values are omitted from API requests. However, any field with an
2821	// empty value appearing in NullFields will be sent to the server as
2822	// null. It is an error if a field in this list has a non-empty value.
2823	// This may be used to include null fields in Patch requests.
2824	NullFields []string `json:"-"`
2825}
2826
2827func (s *ResolveSnapshotHeadResponse) MarshalJSON() ([]byte, error) {
2828	type NoMethod ResolveSnapshotHeadResponse
2829	raw := NoMethod(*s)
2830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2831}
2832
2833// RevisionCheckResponse: A third party checking a revision response.
2834type RevisionCheckResponse struct {
2835	// ApiVersion: The version of the API this client revision should use
2836	// when calling API methods.
2837	ApiVersion string `json:"apiVersion,omitempty"`
2838
2839	// Kind: Uniquely identifies the type of this resource. Value is always
2840	// the fixed string `games#revisionCheckResponse`.
2841	Kind string `json:"kind,omitempty"`
2842
2843	// RevisionStatus: The result of the revision check.
2844	//
2845	// Possible values:
2846	//   "REVISION_STATUS_UNSPECIFIED" - Default value. This value is
2847	// unused.
2848	//   "OK" - The revision being used is current.
2849	//   "DEPRECATED" - There is currently a newer version available, but
2850	// the revision being used still works.
2851	//   "INVALID" - The revision being used is not supported in any
2852	// released version.
2853	RevisionStatus string `json:"revisionStatus,omitempty"`
2854
2855	// ServerResponse contains the HTTP response code and headers from the
2856	// server.
2857	googleapi.ServerResponse `json:"-"`
2858
2859	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
2860	// unconditionally include in API requests. By default, fields with
2861	// empty values are omitted from API requests. However, any non-pointer,
2862	// non-interface field appearing in ForceSendFields will be sent to the
2863	// server regardless of whether the field is empty or not. This may be
2864	// used to include empty fields in Patch requests.
2865	ForceSendFields []string `json:"-"`
2866
2867	// NullFields is a list of field names (e.g. "ApiVersion") to include in
2868	// API requests with the JSON null value. By default, fields with empty
2869	// values are omitted from API requests. However, any field with an
2870	// empty value appearing in NullFields will be sent to the server as
2871	// null. It is an error if a field in this list has a non-empty value.
2872	// This may be used to include null fields in Patch requests.
2873	NullFields []string `json:"-"`
2874}
2875
2876func (s *RevisionCheckResponse) MarshalJSON() ([]byte, error) {
2877	type NoMethod RevisionCheckResponse
2878	raw := NoMethod(*s)
2879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2880}
2881
2882// ScoreSubmission: A request to submit a score to leaderboards.
2883type ScoreSubmission struct {
2884	// Kind: Uniquely identifies the type of this resource. Value is always
2885	// the fixed string `games#scoreSubmission`.
2886	Kind string `json:"kind,omitempty"`
2887
2888	// LeaderboardId: The leaderboard this score is being submitted to.
2889	LeaderboardId string `json:"leaderboardId,omitempty"`
2890
2891	// Score: The new score being submitted.
2892	Score int64 `json:"score,omitempty,string"`
2893
2894	// ScoreTag: Additional information about this score. Values will
2895	// contain no more than 64 URI-safe characters as defined by section 2.3
2896	// of RFC 3986.
2897	ScoreTag string `json:"scoreTag,omitempty"`
2898
2899	// Signature: Signature Values will contain URI-safe characters as
2900	// defined by section 2.3 of RFC 3986.
2901	Signature string `json:"signature,omitempty"`
2902
2903	// ForceSendFields is a list of field names (e.g. "Kind") to
2904	// unconditionally include in API requests. By default, fields with
2905	// empty values are omitted from API requests. However, any non-pointer,
2906	// non-interface field appearing in ForceSendFields will be sent to the
2907	// server regardless of whether the field is empty or not. This may be
2908	// used to include empty fields in Patch requests.
2909	ForceSendFields []string `json:"-"`
2910
2911	// NullFields is a list of field names (e.g. "Kind") to include in API
2912	// requests with the JSON null value. By default, fields with empty
2913	// values are omitted from API requests. However, any field with an
2914	// empty value appearing in NullFields will be sent to the server as
2915	// null. It is an error if a field in this list has a non-empty value.
2916	// This may be used to include null fields in Patch requests.
2917	NullFields []string `json:"-"`
2918}
2919
2920func (s *ScoreSubmission) MarshalJSON() ([]byte, error) {
2921	type NoMethod ScoreSubmission
2922	raw := NoMethod(*s)
2923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2924}
2925
2926// Snapshot: An snapshot object.
2927type Snapshot struct {
2928	// CoverImage: The cover image of this snapshot. May be absent if there
2929	// is no image.
2930	CoverImage *SnapshotImage `json:"coverImage,omitempty"`
2931
2932	// Description: The description of this snapshot.
2933	Description string `json:"description,omitempty"`
2934
2935	// DriveId: The ID of the file underlying this snapshot in the Drive
2936	// API. Only present if the snapshot is a view on a Drive file and the
2937	// file is owned by the caller.
2938	DriveId string `json:"driveId,omitempty"`
2939
2940	// DurationMillis: The duration associated with this snapshot, in
2941	// millis.
2942	DurationMillis int64 `json:"durationMillis,omitempty,string"`
2943
2944	// Id: The ID of the snapshot.
2945	Id string `json:"id,omitempty"`
2946
2947	// Kind: Uniquely identifies the type of this resource. Value is always
2948	// the fixed string `games#snapshot`.
2949	Kind string `json:"kind,omitempty"`
2950
2951	// LastModifiedMillis: The timestamp (in millis since Unix epoch) of the
2952	// last modification to this snapshot.
2953	LastModifiedMillis int64 `json:"lastModifiedMillis,omitempty,string"`
2954
2955	// ProgressValue: The progress value (64-bit integer set by developer)
2956	// associated with this snapshot.
2957	ProgressValue int64 `json:"progressValue,omitempty,string"`
2958
2959	// Title: The title of this snapshot.
2960	Title string `json:"title,omitempty"`
2961
2962	// Type: The type of this snapshot.
2963	//
2964	// Possible values:
2965	//   "SNAPSHOT_TYPE_UNSPECIFIED" - Default value. This value is unused.
2966	//   "SAVE_GAME" - A snapshot representing a save game.
2967	Type string `json:"type,omitempty"`
2968
2969	// UniqueName: The unique name provided when the snapshot was created.
2970	UniqueName string `json:"uniqueName,omitempty"`
2971
2972	// ServerResponse contains the HTTP response code and headers from the
2973	// server.
2974	googleapi.ServerResponse `json:"-"`
2975
2976	// ForceSendFields is a list of field names (e.g. "CoverImage") to
2977	// unconditionally include in API requests. By default, fields with
2978	// empty values are omitted from API requests. However, any non-pointer,
2979	// non-interface field appearing in ForceSendFields will be sent to the
2980	// server regardless of whether the field is empty or not. This may be
2981	// used to include empty fields in Patch requests.
2982	ForceSendFields []string `json:"-"`
2983
2984	// NullFields is a list of field names (e.g. "CoverImage") to include in
2985	// API requests with the JSON null value. By default, fields with empty
2986	// values are omitted from API requests. However, any field with an
2987	// empty value appearing in NullFields will be sent to the server as
2988	// null. It is an error if a field in this list has a non-empty value.
2989	// This may be used to include null fields in Patch requests.
2990	NullFields []string `json:"-"`
2991}
2992
2993func (s *Snapshot) MarshalJSON() ([]byte, error) {
2994	type NoMethod Snapshot
2995	raw := NoMethod(*s)
2996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2997}
2998
2999// SnapshotCoverImageResource: Identifies a snapshot cover image
3000// resource. The image is provided by the game.
3001type SnapshotCoverImageResource struct {
3002	// ContentHash: Output only. Hash-like weak identifier of the uploaded
3003	// image bytes, consistent per player per application. Within the
3004	// context of a single player/application, it's guaranteed that two
3005	// identical blobs coming from two different uploads will have the same
3006	// content hash. It's extremely likely, though not guaranteed, that if
3007	// two content hashes are equal, the images are identical.
3008	ContentHash string `json:"contentHash,omitempty"`
3009
3010	// DownloadUrl: Output only. A URL the client can use to download the
3011	// image. May vary across requests, and only guaranteed to be valid for
3012	// a short time after it is returned.
3013	DownloadUrl string `json:"downloadUrl,omitempty"`
3014
3015	// Height: Output only. The height of the image in pixels.
3016	Height int64 `json:"height,omitempty"`
3017
3018	// MimeType: Output only. The MIME type of the image.
3019	MimeType string `json:"mimeType,omitempty"`
3020
3021	// ResourceId: The ID of the image resource. It's guaranteed that if two
3022	// IDs are equal then the contents are equal as well. It's not
3023	// guaranteed that two identical blobs coming from separate uploads have
3024	// the same ID. The resource ID can only be used within the application,
3025	// user and resource type it was originally returned for. For example,
3026	// it's not possible to use SnapshotDataResource's resource ID as the
3027	// resource_id of a SnapshotCoverImageResource, even if the blob is a
3028	// valid image file.
3029	ResourceId string `json:"resourceId,omitempty"`
3030
3031	// Width: Output only. The width of the image in pixels.
3032	Width int64 `json:"width,omitempty"`
3033
3034	// ForceSendFields is a list of field names (e.g. "ContentHash") to
3035	// unconditionally include in API requests. By default, fields with
3036	// empty values are omitted from API requests. However, any non-pointer,
3037	// non-interface field appearing in ForceSendFields will be sent to the
3038	// server regardless of whether the field is empty or not. This may be
3039	// used to include empty fields in Patch requests.
3040	ForceSendFields []string `json:"-"`
3041
3042	// NullFields is a list of field names (e.g. "ContentHash") to include
3043	// in API requests with the JSON null value. By default, fields with
3044	// empty values are omitted from API requests. However, any field with
3045	// an empty value appearing in NullFields will be sent to the server as
3046	// null. It is an error if a field in this list has a non-empty value.
3047	// This may be used to include null fields in Patch requests.
3048	NullFields []string `json:"-"`
3049}
3050
3051func (s *SnapshotCoverImageResource) MarshalJSON() ([]byte, error) {
3052	type NoMethod SnapshotCoverImageResource
3053	raw := NoMethod(*s)
3054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3055}
3056
3057// SnapshotDataResource: Identifies a snapshot data resource. The data
3058// is provided by the game.
3059type SnapshotDataResource struct {
3060	// ContentHash: Output only. Hash-like weak identifier of the uploaded
3061	// blob, consistent per player per application. Within the context of a
3062	// single player/application, it's guaranteed that two identical blobs
3063	// coming from two different uploads will have the same content hash.
3064	// It's extremely likely, though not guaranteed, that if two content
3065	// hashes are equal, the blobs are identical.
3066	ContentHash string `json:"contentHash,omitempty"`
3067
3068	// DownloadUrl: Output only. A URL that the client can use to download
3069	// the blob. May vary across requests, and only guaranteed to be valid
3070	// for a short time after it is returned.
3071	DownloadUrl string `json:"downloadUrl,omitempty"`
3072
3073	// ResourceId: The ID of the blob resource. It's guaranteed that if two
3074	// IDs are equal then the contents are equal as well. It's not
3075	// guaranteed that two identical blobs coming from separate uploads have
3076	// the same resource ID. The resource ID can only be used within the
3077	// application, user and resource type it was originally returned for.
3078	// For example, it's not possible to use SnapshotDataResource's resource
3079	// ID as the resource_id of a SnapshotCoverImageResource, even if the
3080	// blob is a valid image file.
3081	ResourceId string `json:"resourceId,omitempty"`
3082
3083	// Size: Size of the saved game blob in bytes.
3084	Size int64 `json:"size,omitempty,string"`
3085
3086	// ForceSendFields is a list of field names (e.g. "ContentHash") to
3087	// unconditionally include in API requests. By default, fields with
3088	// empty values are omitted from API requests. However, any non-pointer,
3089	// non-interface field appearing in ForceSendFields will be sent to the
3090	// server regardless of whether the field is empty or not. This may be
3091	// used to include empty fields in Patch requests.
3092	ForceSendFields []string `json:"-"`
3093
3094	// NullFields is a list of field names (e.g. "ContentHash") to include
3095	// in API requests with the JSON null value. By default, fields with
3096	// empty values are omitted from API requests. However, any field with
3097	// an empty value appearing in NullFields will be sent to the server as
3098	// null. It is an error if a field in this list has a non-empty value.
3099	// This may be used to include null fields in Patch requests.
3100	NullFields []string `json:"-"`
3101}
3102
3103func (s *SnapshotDataResource) MarshalJSON() ([]byte, error) {
3104	type NoMethod SnapshotDataResource
3105	raw := NoMethod(*s)
3106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3107}
3108
3109// SnapshotExtended: A snapshot represents a saved game state referred
3110// to using the developer-provided snapshot_id (think of it as a file's
3111// path). The set of attributes and binary data for a specific state is
3112// called a revision. Each revision is itself immutable, and referred to
3113// by a snapshot_revision_id. At any time, a snapshot has a "head"
3114// revision, and updates are made against that revision. If a snapshot
3115// update is received that isn't against the current head revision, then
3116// instead of changing the head revision it will result in a conflicting
3117// revision that must be specifically resolved.
3118type SnapshotExtended struct {
3119	// ConflictingRevisions: A list of conflicting revisions. Only set if
3120	// explicitly requested (e.g. using a field mask or a request flag), or
3121	// if the RPC guarantees that this field is set. The conflicting
3122	// revisions are sorted chronologically by their server creation time
3123	// (oldest first). If there are too many conflicting revisions to return
3124	// all of them in a single request this will only contain the first
3125	// batch. In such case, the presented conflicting revisions must be
3126	// resolved first in order to fetch the next batch.
3127	ConflictingRevisions []*SnapshotRevision `json:"conflictingRevisions,omitempty"`
3128
3129	// HasConflictingRevisions: An indicator whether the snapshot has any
3130	// conflicting revisions or not. Always set.
3131	HasConflictingRevisions bool `json:"hasConflictingRevisions,omitempty"`
3132
3133	// HeadRevision: The current head revision (the canonical revision as
3134	// understood by the server).
3135	HeadRevision *SnapshotRevision `json:"headRevision,omitempty"`
3136
3137	// Name: An identifier of the snapshot,developer-specified.
3138	Name string `json:"name,omitempty"`
3139
3140	// ForceSendFields is a list of field names (e.g.
3141	// "ConflictingRevisions") to unconditionally include in API requests.
3142	// By default, fields with empty values are omitted from API requests.
3143	// However, any non-pointer, non-interface field appearing in
3144	// ForceSendFields will be sent to the server regardless of whether the
3145	// field is empty or not. This may be used to include empty fields in
3146	// Patch requests.
3147	ForceSendFields []string `json:"-"`
3148
3149	// NullFields is a list of field names (e.g. "ConflictingRevisions") to
3150	// include in API requests with the JSON null value. By default, fields
3151	// with empty values are omitted from API requests. However, any field
3152	// with an empty value appearing in NullFields will be sent to the
3153	// server as null. It is an error if a field in this list has a
3154	// non-empty value. This may be used to include null fields in Patch
3155	// requests.
3156	NullFields []string `json:"-"`
3157}
3158
3159func (s *SnapshotExtended) MarshalJSON() ([]byte, error) {
3160	type NoMethod SnapshotExtended
3161	raw := NoMethod(*s)
3162	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3163}
3164
3165// SnapshotImage: An image of a snapshot.
3166type SnapshotImage struct {
3167	// Height: The height of the image.
3168	Height int64 `json:"height,omitempty"`
3169
3170	// Kind: Uniquely identifies the type of this resource. Value is always
3171	// the fixed string `games#snapshotImage`.
3172	Kind string `json:"kind,omitempty"`
3173
3174	// MimeType: The MIME type of the image.
3175	MimeType string `json:"mime_type,omitempty"`
3176
3177	// Url: The URL of the image. This URL may be invalidated at any time
3178	// and should not be cached.
3179	Url string `json:"url,omitempty"`
3180
3181	// Width: The width of the image.
3182	Width int64 `json:"width,omitempty"`
3183
3184	// ForceSendFields is a list of field names (e.g. "Height") to
3185	// unconditionally include in API requests. By default, fields with
3186	// empty values are omitted from API requests. However, any non-pointer,
3187	// non-interface field appearing in ForceSendFields will be sent to the
3188	// server regardless of whether the field is empty or not. This may be
3189	// used to include empty fields in Patch requests.
3190	ForceSendFields []string `json:"-"`
3191
3192	// NullFields is a list of field names (e.g. "Height") to include in API
3193	// requests with the JSON null value. By default, fields with empty
3194	// values are omitted from API requests. However, any field with an
3195	// empty value appearing in NullFields will be sent to the server as
3196	// null. It is an error if a field in this list has a non-empty value.
3197	// This may be used to include null fields in Patch requests.
3198	NullFields []string `json:"-"`
3199}
3200
3201func (s *SnapshotImage) MarshalJSON() ([]byte, error) {
3202	type NoMethod SnapshotImage
3203	raw := NoMethod(*s)
3204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3205}
3206
3207// SnapshotListResponse: A third party list snapshots response.
3208type SnapshotListResponse struct {
3209	// Items: The snapshots.
3210	Items []*Snapshot `json:"items,omitempty"`
3211
3212	// Kind: Uniquely identifies the type of this resource. Value is always
3213	// the fixed string `games#snapshotListResponse`.
3214	Kind string `json:"kind,omitempty"`
3215
3216	// NextPageToken: Token corresponding to the next page of results. If
3217	// there are no more results, the token is omitted.
3218	NextPageToken string `json:"nextPageToken,omitempty"`
3219
3220	// ServerResponse contains the HTTP response code and headers from the
3221	// server.
3222	googleapi.ServerResponse `json:"-"`
3223
3224	// ForceSendFields is a list of field names (e.g. "Items") to
3225	// unconditionally include in API requests. By default, fields with
3226	// empty values are omitted from API requests. However, any non-pointer,
3227	// non-interface field appearing in ForceSendFields will be sent to the
3228	// server regardless of whether the field is empty or not. This may be
3229	// used to include empty fields in Patch requests.
3230	ForceSendFields []string `json:"-"`
3231
3232	// NullFields is a list of field names (e.g. "Items") to include in API
3233	// requests with the JSON null value. By default, fields with empty
3234	// values are omitted from API requests. However, any field with an
3235	// empty value appearing in NullFields will be sent to the server as
3236	// null. It is an error if a field in this list has a non-empty value.
3237	// This may be used to include null fields in Patch requests.
3238	NullFields []string `json:"-"`
3239}
3240
3241func (s *SnapshotListResponse) MarshalJSON() ([]byte, error) {
3242	type NoMethod SnapshotListResponse
3243	raw := NoMethod(*s)
3244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3245}
3246
3247// SnapshotMetadata: Metadata about a snapshot revision. Snapshot
3248// metadata is immutable - a metadata change corresponds to a new
3249// snapshot revision.
3250type SnapshotMetadata struct {
3251	// Description: The description of this snapshot.
3252	Description string `json:"description,omitempty"`
3253
3254	// DeviceName: The device that created the current revision.
3255	DeviceName string `json:"deviceName,omitempty"`
3256
3257	// Duration: The duration associated with this snapshot. Values with
3258	// sub-millisecond precision can be rounded or trimmed to the closest
3259	// millisecond.
3260	Duration string `json:"duration,omitempty"`
3261
3262	// LastModifyTime: The timestamp of the last modification to this
3263	// snapshot. Values with sub-millisecond precision can be rounded or
3264	// trimmed to the closest millisecond.
3265	LastModifyTime string `json:"lastModifyTime,omitempty"`
3266
3267	// ProgressValue: The progress value (64-bit integer set by developer)
3268	// associated with this snapshot.
3269	ProgressValue int64 `json:"progressValue,omitempty,string"`
3270
3271	// Title: The title of this snapshot.
3272	Title string `json:"title,omitempty"`
3273
3274	// ForceSendFields is a list of field names (e.g. "Description") to
3275	// unconditionally include in API requests. By default, fields with
3276	// empty values are omitted from API requests. However, any non-pointer,
3277	// non-interface field appearing in ForceSendFields will be sent to the
3278	// server regardless of whether the field is empty or not. This may be
3279	// used to include empty fields in Patch requests.
3280	ForceSendFields []string `json:"-"`
3281
3282	// NullFields is a list of field names (e.g. "Description") to include
3283	// in API requests with the JSON null value. By default, fields with
3284	// empty values are omitted from API requests. However, any field with
3285	// an empty value appearing in NullFields will be sent to the server as
3286	// null. It is an error if a field in this list has a non-empty value.
3287	// This may be used to include null fields in Patch requests.
3288	NullFields []string `json:"-"`
3289}
3290
3291func (s *SnapshotMetadata) MarshalJSON() ([]byte, error) {
3292	type NoMethod SnapshotMetadata
3293	raw := NoMethod(*s)
3294	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3295}
3296
3297// SnapshotRevision: A Snapshot revision resource. Snapshot revisions
3298// are immutable.
3299type SnapshotRevision struct {
3300	// Blob: Reference to the game provided blob for this revision.
3301	Blob *SnapshotDataResource `json:"blob,omitempty"`
3302
3303	// CoverImage: Reference to the cover image for this revision.
3304	CoverImage *SnapshotCoverImageResource `json:"coverImage,omitempty"`
3305
3306	// Id: Output only. A server generated identifier of the snapshot
3307	// revision.
3308	Id string `json:"id,omitempty"`
3309
3310	// Metadata: Metadata for this snapshot revision.
3311	Metadata *SnapshotMetadata `json:"metadata,omitempty"`
3312
3313	// ForceSendFields is a list of field names (e.g. "Blob") to
3314	// unconditionally include in API requests. By default, fields with
3315	// empty values are omitted from API requests. However, any non-pointer,
3316	// non-interface field appearing in ForceSendFields will be sent to the
3317	// server regardless of whether the field is empty or not. This may be
3318	// used to include empty fields in Patch requests.
3319	ForceSendFields []string `json:"-"`
3320
3321	// NullFields is a list of field names (e.g. "Blob") to include in API
3322	// requests with the JSON null value. By default, fields with empty
3323	// values are omitted from API requests. However, any field with an
3324	// empty value appearing in NullFields will be sent to the server as
3325	// null. It is an error if a field in this list has a non-empty value.
3326	// This may be used to include null fields in Patch requests.
3327	NullFields []string `json:"-"`
3328}
3329
3330func (s *SnapshotRevision) MarshalJSON() ([]byte, error) {
3331	type NoMethod SnapshotRevision
3332	raw := NoMethod(*s)
3333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3334}
3335
3336// StatsResponse: A third party stats resource.
3337type StatsResponse struct {
3338	// AvgSessionLengthMinutes: Average session length in minutes of the
3339	// player. E.g., 1, 30, 60, ... . Not populated if there is not enough
3340	// information.
3341	AvgSessionLengthMinutes float64 `json:"avg_session_length_minutes,omitempty"`
3342
3343	// ChurnProbability: The probability of the player not returning to play
3344	// the game in the next day. E.g., 0, 0.1, 0.5, ..., 1.0. Not populated
3345	// if there is not enough information.
3346	ChurnProbability float64 `json:"churn_probability,omitempty"`
3347
3348	// DaysSinceLastPlayed: Number of days since the player last played this
3349	// game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough
3350	// information.
3351	DaysSinceLastPlayed int64 `json:"days_since_last_played,omitempty"`
3352
3353	// HighSpenderProbability: The probability of the player going to spend
3354	// beyond a threshold amount of money. E.g., 0, 0.25, 0.50, 0.75. Not
3355	// populated if there is not enough information.
3356	HighSpenderProbability float64 `json:"high_spender_probability,omitempty"`
3357
3358	// Kind: Uniquely identifies the type of this resource. Value is always
3359	// the fixed string `games#statsResponse`.
3360	Kind string `json:"kind,omitempty"`
3361
3362	// NumPurchases: Number of in-app purchases made by the player in this
3363	// game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough
3364	// information.
3365	NumPurchases int64 `json:"num_purchases,omitempty"`
3366
3367	// NumSessions: The approximate number of sessions of the player within
3368	// the last 28 days, where a session begins when the player is connected
3369	// to Play Games Services and ends when they are disconnected. E.g., 0,
3370	// 1, 5, 10, ... . Not populated if there is not enough information.
3371	NumSessions int64 `json:"num_sessions,omitempty"`
3372
3373	// NumSessionsPercentile: The approximation of the sessions percentile
3374	// of the player within the last 30 days, where a session begins when
3375	// the player is connected to Play Games Services and ends when they are
3376	// disconnected. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not
3377	// enough information.
3378	NumSessionsPercentile float64 `json:"num_sessions_percentile,omitempty"`
3379
3380	// SpendPercentile: The approximate spend percentile of the player in
3381	// this game. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not
3382	// enough information.
3383	SpendPercentile float64 `json:"spend_percentile,omitempty"`
3384
3385	// SpendProbability: The probability of the player going to spend the
3386	// game in the next seven days. E.g., 0, 0.25, 0.50, 0.75. Not populated
3387	// if there is not enough information.
3388	SpendProbability float64 `json:"spend_probability,omitempty"`
3389
3390	// TotalSpendNext28Days: The predicted amount of money that the player
3391	// going to spend in the next 28 days. E.g., 1, 30, 60, ... . Not
3392	// populated if there is not enough information.
3393	TotalSpendNext28Days float64 `json:"total_spend_next_28_days,omitempty"`
3394
3395	// ServerResponse contains the HTTP response code and headers from the
3396	// server.
3397	googleapi.ServerResponse `json:"-"`
3398
3399	// ForceSendFields is a list of field names (e.g.
3400	// "AvgSessionLengthMinutes") to unconditionally include in API
3401	// requests. By default, fields with empty values are omitted from API
3402	// requests. However, any non-pointer, non-interface field appearing in
3403	// ForceSendFields will be sent to the server regardless of whether the
3404	// field is empty or not. This may be used to include empty fields in
3405	// Patch requests.
3406	ForceSendFields []string `json:"-"`
3407
3408	// NullFields is a list of field names (e.g. "AvgSessionLengthMinutes")
3409	// to include in API requests with the JSON null value. By default,
3410	// fields with empty values are omitted from API requests. However, any
3411	// field with an empty value appearing in NullFields will be sent to the
3412	// server as null. It is an error if a field in this list has a
3413	// non-empty value. This may be used to include null fields in Patch
3414	// requests.
3415	NullFields []string `json:"-"`
3416}
3417
3418func (s *StatsResponse) MarshalJSON() ([]byte, error) {
3419	type NoMethod StatsResponse
3420	raw := NoMethod(*s)
3421	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3422}
3423
3424func (s *StatsResponse) UnmarshalJSON(data []byte) error {
3425	type NoMethod StatsResponse
3426	var s1 struct {
3427		AvgSessionLengthMinutes gensupport.JSONFloat64 `json:"avg_session_length_minutes"`
3428		ChurnProbability        gensupport.JSONFloat64 `json:"churn_probability"`
3429		HighSpenderProbability  gensupport.JSONFloat64 `json:"high_spender_probability"`
3430		NumSessionsPercentile   gensupport.JSONFloat64 `json:"num_sessions_percentile"`
3431		SpendPercentile         gensupport.JSONFloat64 `json:"spend_percentile"`
3432		SpendProbability        gensupport.JSONFloat64 `json:"spend_probability"`
3433		TotalSpendNext28Days    gensupport.JSONFloat64 `json:"total_spend_next_28_days"`
3434		*NoMethod
3435	}
3436	s1.NoMethod = (*NoMethod)(s)
3437	if err := json.Unmarshal(data, &s1); err != nil {
3438		return err
3439	}
3440	s.AvgSessionLengthMinutes = float64(s1.AvgSessionLengthMinutes)
3441	s.ChurnProbability = float64(s1.ChurnProbability)
3442	s.HighSpenderProbability = float64(s1.HighSpenderProbability)
3443	s.NumSessionsPercentile = float64(s1.NumSessionsPercentile)
3444	s.SpendPercentile = float64(s1.SpendPercentile)
3445	s.SpendProbability = float64(s1.SpendProbability)
3446	s.TotalSpendNext28Days = float64(s1.TotalSpendNext28Days)
3447	return nil
3448}
3449
3450// method id "games.achievementDefinitions.list":
3451
3452type AchievementDefinitionsListCall struct {
3453	s            *Service
3454	urlParams_   gensupport.URLParams
3455	ifNoneMatch_ string
3456	ctx_         context.Context
3457	header_      http.Header
3458}
3459
3460// List: Lists all the achievement definitions for your application.
3461func (r *AchievementDefinitionsService) List() *AchievementDefinitionsListCall {
3462	c := &AchievementDefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3463	return c
3464}
3465
3466// Language sets the optional parameter "language": The preferred
3467// language to use for strings returned by this method.
3468func (c *AchievementDefinitionsListCall) Language(language string) *AchievementDefinitionsListCall {
3469	c.urlParams_.Set("language", language)
3470	return c
3471}
3472
3473// MaxResults sets the optional parameter "maxResults": The maximum
3474// number of achievement resources to return in the response, used for
3475// paging. For any response, the actual number of achievement resources
3476// returned may be less than the specified `maxResults`.
3477func (c *AchievementDefinitionsListCall) MaxResults(maxResults int64) *AchievementDefinitionsListCall {
3478	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3479	return c
3480}
3481
3482// PageToken sets the optional parameter "pageToken": The token returned
3483// by the previous request.
3484func (c *AchievementDefinitionsListCall) PageToken(pageToken string) *AchievementDefinitionsListCall {
3485	c.urlParams_.Set("pageToken", pageToken)
3486	return c
3487}
3488
3489// Fields allows partial responses to be retrieved. See
3490// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3491// for more information.
3492func (c *AchievementDefinitionsListCall) Fields(s ...googleapi.Field) *AchievementDefinitionsListCall {
3493	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3494	return c
3495}
3496
3497// IfNoneMatch sets the optional parameter which makes the operation
3498// fail if the object's ETag matches the given value. This is useful for
3499// getting updates only after the object has changed since the last
3500// request. Use googleapi.IsNotModified to check whether the response
3501// error from Do is the result of In-None-Match.
3502func (c *AchievementDefinitionsListCall) IfNoneMatch(entityTag string) *AchievementDefinitionsListCall {
3503	c.ifNoneMatch_ = entityTag
3504	return c
3505}
3506
3507// Context sets the context to be used in this call's Do method. Any
3508// pending HTTP request will be aborted if the provided context is
3509// canceled.
3510func (c *AchievementDefinitionsListCall) Context(ctx context.Context) *AchievementDefinitionsListCall {
3511	c.ctx_ = ctx
3512	return c
3513}
3514
3515// Header returns an http.Header that can be modified by the caller to
3516// add HTTP headers to the request.
3517func (c *AchievementDefinitionsListCall) Header() http.Header {
3518	if c.header_ == nil {
3519		c.header_ = make(http.Header)
3520	}
3521	return c.header_
3522}
3523
3524func (c *AchievementDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
3525	reqHeaders := make(http.Header)
3526	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
3527	for k, v := range c.header_ {
3528		reqHeaders[k] = v
3529	}
3530	reqHeaders.Set("User-Agent", c.s.userAgent())
3531	if c.ifNoneMatch_ != "" {
3532		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3533	}
3534	var body io.Reader = nil
3535	c.urlParams_.Set("alt", alt)
3536	c.urlParams_.Set("prettyPrint", "false")
3537	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements")
3538	urls += "?" + c.urlParams_.Encode()
3539	req, err := http.NewRequest("GET", urls, body)
3540	if err != nil {
3541		return nil, err
3542	}
3543	req.Header = reqHeaders
3544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3545}
3546
3547// Do executes the "games.achievementDefinitions.list" call.
3548// Exactly one of *AchievementDefinitionsListResponse or error will be
3549// non-nil. Any non-2xx status code is an error. Response headers are in
3550// either *AchievementDefinitionsListResponse.ServerResponse.Header or
3551// (if a response was returned at all) in
3552// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3553// whether the returned error was because http.StatusNotModified was
3554// returned.
3555func (c *AchievementDefinitionsListCall) Do(opts ...googleapi.CallOption) (*AchievementDefinitionsListResponse, error) {
3556	gensupport.SetOptions(c.urlParams_, opts...)
3557	res, err := c.doRequest("json")
3558	if res != nil && res.StatusCode == http.StatusNotModified {
3559		if res.Body != nil {
3560			res.Body.Close()
3561		}
3562		return nil, &googleapi.Error{
3563			Code:   res.StatusCode,
3564			Header: res.Header,
3565		}
3566	}
3567	if err != nil {
3568		return nil, err
3569	}
3570	defer googleapi.CloseBody(res)
3571	if err := googleapi.CheckResponse(res); err != nil {
3572		return nil, err
3573	}
3574	ret := &AchievementDefinitionsListResponse{
3575		ServerResponse: googleapi.ServerResponse{
3576			Header:         res.Header,
3577			HTTPStatusCode: res.StatusCode,
3578		},
3579	}
3580	target := &ret
3581	if err := gensupport.DecodeResponse(target, res); err != nil {
3582		return nil, err
3583	}
3584	return ret, nil
3585	// {
3586	//   "description": "Lists all the achievement definitions for your application.",
3587	//   "flatPath": "games/v1/achievements",
3588	//   "httpMethod": "GET",
3589	//   "id": "games.achievementDefinitions.list",
3590	//   "parameterOrder": [],
3591	//   "parameters": {
3592	//     "language": {
3593	//       "description": "The preferred language to use for strings returned by this method.",
3594	//       "location": "query",
3595	//       "type": "string"
3596	//     },
3597	//     "maxResults": {
3598	//       "description": "The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified `maxResults`.",
3599	//       "format": "int32",
3600	//       "location": "query",
3601	//       "type": "integer"
3602	//     },
3603	//     "pageToken": {
3604	//       "description": "The token returned by the previous request.",
3605	//       "location": "query",
3606	//       "type": "string"
3607	//     }
3608	//   },
3609	//   "path": "games/v1/achievements",
3610	//   "response": {
3611	//     "$ref": "AchievementDefinitionsListResponse"
3612	//   },
3613	//   "scopes": [
3614	//     "https://www.googleapis.com/auth/games"
3615	//   ]
3616	// }
3617
3618}
3619
3620// Pages invokes f for each page of results.
3621// A non-nil error returned from f will halt the iteration.
3622// The provided context supersedes any context provided to the Context method.
3623func (c *AchievementDefinitionsListCall) Pages(ctx context.Context, f func(*AchievementDefinitionsListResponse) error) error {
3624	c.ctx_ = ctx
3625	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3626	for {
3627		x, err := c.Do()
3628		if err != nil {
3629			return err
3630		}
3631		if err := f(x); err != nil {
3632			return err
3633		}
3634		if x.NextPageToken == "" {
3635			return nil
3636		}
3637		c.PageToken(x.NextPageToken)
3638	}
3639}
3640
3641// method id "games.achievements.increment":
3642
3643type AchievementsIncrementCall struct {
3644	s             *Service
3645	achievementId string
3646	urlParams_    gensupport.URLParams
3647	ctx_          context.Context
3648	header_       http.Header
3649}
3650
3651// Increment: Increments the steps of the achievement with the given ID
3652// for the currently authenticated player.
3653func (r *AchievementsService) Increment(achievementId string, stepsToIncrement int64) *AchievementsIncrementCall {
3654	c := &AchievementsIncrementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3655	c.achievementId = achievementId
3656	c.urlParams_.Set("stepsToIncrement", fmt.Sprint(stepsToIncrement))
3657	return c
3658}
3659
3660// RequestId sets the optional parameter "requestId": A randomly
3661// generated numeric ID for each request specified by the caller. This
3662// number is used at the server to ensure that the request is handled
3663// correctly across retries.
3664func (c *AchievementsIncrementCall) RequestId(requestId int64) *AchievementsIncrementCall {
3665	c.urlParams_.Set("requestId", fmt.Sprint(requestId))
3666	return c
3667}
3668
3669// Fields allows partial responses to be retrieved. See
3670// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3671// for more information.
3672func (c *AchievementsIncrementCall) Fields(s ...googleapi.Field) *AchievementsIncrementCall {
3673	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3674	return c
3675}
3676
3677// Context sets the context to be used in this call's Do method. Any
3678// pending HTTP request will be aborted if the provided context is
3679// canceled.
3680func (c *AchievementsIncrementCall) Context(ctx context.Context) *AchievementsIncrementCall {
3681	c.ctx_ = ctx
3682	return c
3683}
3684
3685// Header returns an http.Header that can be modified by the caller to
3686// add HTTP headers to the request.
3687func (c *AchievementsIncrementCall) Header() http.Header {
3688	if c.header_ == nil {
3689		c.header_ = make(http.Header)
3690	}
3691	return c.header_
3692}
3693
3694func (c *AchievementsIncrementCall) doRequest(alt string) (*http.Response, error) {
3695	reqHeaders := make(http.Header)
3696	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
3697	for k, v := range c.header_ {
3698		reqHeaders[k] = v
3699	}
3700	reqHeaders.Set("User-Agent", c.s.userAgent())
3701	var body io.Reader = nil
3702	c.urlParams_.Set("alt", alt)
3703	c.urlParams_.Set("prettyPrint", "false")
3704	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/increment")
3705	urls += "?" + c.urlParams_.Encode()
3706	req, err := http.NewRequest("POST", urls, body)
3707	if err != nil {
3708		return nil, err
3709	}
3710	req.Header = reqHeaders
3711	googleapi.Expand(req.URL, map[string]string{
3712		"achievementId": c.achievementId,
3713	})
3714	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3715}
3716
3717// Do executes the "games.achievements.increment" call.
3718// Exactly one of *AchievementIncrementResponse or error will be
3719// non-nil. Any non-2xx status code is an error. Response headers are in
3720// either *AchievementIncrementResponse.ServerResponse.Header or (if a
3721// response was returned at all) in error.(*googleapi.Error).Header. Use
3722// googleapi.IsNotModified to check whether the returned error was
3723// because http.StatusNotModified was returned.
3724func (c *AchievementsIncrementCall) Do(opts ...googleapi.CallOption) (*AchievementIncrementResponse, error) {
3725	gensupport.SetOptions(c.urlParams_, opts...)
3726	res, err := c.doRequest("json")
3727	if res != nil && res.StatusCode == http.StatusNotModified {
3728		if res.Body != nil {
3729			res.Body.Close()
3730		}
3731		return nil, &googleapi.Error{
3732			Code:   res.StatusCode,
3733			Header: res.Header,
3734		}
3735	}
3736	if err != nil {
3737		return nil, err
3738	}
3739	defer googleapi.CloseBody(res)
3740	if err := googleapi.CheckResponse(res); err != nil {
3741		return nil, err
3742	}
3743	ret := &AchievementIncrementResponse{
3744		ServerResponse: googleapi.ServerResponse{
3745			Header:         res.Header,
3746			HTTPStatusCode: res.StatusCode,
3747		},
3748	}
3749	target := &ret
3750	if err := gensupport.DecodeResponse(target, res); err != nil {
3751		return nil, err
3752	}
3753	return ret, nil
3754	// {
3755	//   "description": "Increments the steps of the achievement with the given ID for the currently authenticated player.",
3756	//   "flatPath": "games/v1/achievements/{achievementId}/increment",
3757	//   "httpMethod": "POST",
3758	//   "id": "games.achievements.increment",
3759	//   "parameterOrder": [
3760	//     "achievementId",
3761	//     "stepsToIncrement"
3762	//   ],
3763	//   "parameters": {
3764	//     "achievementId": {
3765	//       "description": "The ID of the achievement used by this method.",
3766	//       "location": "path",
3767	//       "required": true,
3768	//       "type": "string"
3769	//     },
3770	//     "requestId": {
3771	//       "description": "A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries.",
3772	//       "format": "int64",
3773	//       "location": "query",
3774	//       "type": "string"
3775	//     },
3776	//     "stepsToIncrement": {
3777	//       "description": "The number of steps to increment.",
3778	//       "format": "int32",
3779	//       "location": "query",
3780	//       "required": true,
3781	//       "type": "integer"
3782	//     }
3783	//   },
3784	//   "path": "games/v1/achievements/{achievementId}/increment",
3785	//   "response": {
3786	//     "$ref": "AchievementIncrementResponse"
3787	//   },
3788	//   "scopes": [
3789	//     "https://www.googleapis.com/auth/games"
3790	//   ]
3791	// }
3792
3793}
3794
3795// method id "games.achievements.list":
3796
3797type AchievementsListCall struct {
3798	s            *Service
3799	playerId     string
3800	urlParams_   gensupport.URLParams
3801	ifNoneMatch_ string
3802	ctx_         context.Context
3803	header_      http.Header
3804}
3805
3806// List: Lists the progress for all your application's achievements for
3807// the currently authenticated player.
3808func (r *AchievementsService) List(playerId string) *AchievementsListCall {
3809	c := &AchievementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3810	c.playerId = playerId
3811	return c
3812}
3813
3814// Language sets the optional parameter "language": The preferred
3815// language to use for strings returned by this method.
3816func (c *AchievementsListCall) Language(language string) *AchievementsListCall {
3817	c.urlParams_.Set("language", language)
3818	return c
3819}
3820
3821// MaxResults sets the optional parameter "maxResults": The maximum
3822// number of achievement resources to return in the response, used for
3823// paging. For any response, the actual number of achievement resources
3824// returned may be less than the specified `maxResults`.
3825func (c *AchievementsListCall) MaxResults(maxResults int64) *AchievementsListCall {
3826	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3827	return c
3828}
3829
3830// PageToken sets the optional parameter "pageToken": The token returned
3831// by the previous request.
3832func (c *AchievementsListCall) PageToken(pageToken string) *AchievementsListCall {
3833	c.urlParams_.Set("pageToken", pageToken)
3834	return c
3835}
3836
3837// State sets the optional parameter "state": Tells the server to return
3838// only achievements with the specified state. If this parameter isn't
3839// specified, all achievements are returned.
3840//
3841// Possible values:
3842//   "ALL" - List all achievements. This is the default.
3843//   "HIDDEN" - List only hidden achievements.
3844//   "REVEALED" - List only revealed achievements.
3845//   "UNLOCKED" - List only unlocked achievements.
3846func (c *AchievementsListCall) State(state string) *AchievementsListCall {
3847	c.urlParams_.Set("state", state)
3848	return c
3849}
3850
3851// Fields allows partial responses to be retrieved. See
3852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3853// for more information.
3854func (c *AchievementsListCall) Fields(s ...googleapi.Field) *AchievementsListCall {
3855	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3856	return c
3857}
3858
3859// IfNoneMatch sets the optional parameter which makes the operation
3860// fail if the object's ETag matches the given value. This is useful for
3861// getting updates only after the object has changed since the last
3862// request. Use googleapi.IsNotModified to check whether the response
3863// error from Do is the result of In-None-Match.
3864func (c *AchievementsListCall) IfNoneMatch(entityTag string) *AchievementsListCall {
3865	c.ifNoneMatch_ = entityTag
3866	return c
3867}
3868
3869// Context sets the context to be used in this call's Do method. Any
3870// pending HTTP request will be aborted if the provided context is
3871// canceled.
3872func (c *AchievementsListCall) Context(ctx context.Context) *AchievementsListCall {
3873	c.ctx_ = ctx
3874	return c
3875}
3876
3877// Header returns an http.Header that can be modified by the caller to
3878// add HTTP headers to the request.
3879func (c *AchievementsListCall) Header() http.Header {
3880	if c.header_ == nil {
3881		c.header_ = make(http.Header)
3882	}
3883	return c.header_
3884}
3885
3886func (c *AchievementsListCall) doRequest(alt string) (*http.Response, error) {
3887	reqHeaders := make(http.Header)
3888	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
3889	for k, v := range c.header_ {
3890		reqHeaders[k] = v
3891	}
3892	reqHeaders.Set("User-Agent", c.s.userAgent())
3893	if c.ifNoneMatch_ != "" {
3894		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3895	}
3896	var body io.Reader = nil
3897	c.urlParams_.Set("alt", alt)
3898	c.urlParams_.Set("prettyPrint", "false")
3899	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/achievements")
3900	urls += "?" + c.urlParams_.Encode()
3901	req, err := http.NewRequest("GET", urls, body)
3902	if err != nil {
3903		return nil, err
3904	}
3905	req.Header = reqHeaders
3906	googleapi.Expand(req.URL, map[string]string{
3907		"playerId": c.playerId,
3908	})
3909	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3910}
3911
3912// Do executes the "games.achievements.list" call.
3913// Exactly one of *PlayerAchievementListResponse or error will be
3914// non-nil. Any non-2xx status code is an error. Response headers are in
3915// either *PlayerAchievementListResponse.ServerResponse.Header or (if a
3916// response was returned at all) in error.(*googleapi.Error).Header. Use
3917// googleapi.IsNotModified to check whether the returned error was
3918// because http.StatusNotModified was returned.
3919func (c *AchievementsListCall) Do(opts ...googleapi.CallOption) (*PlayerAchievementListResponse, error) {
3920	gensupport.SetOptions(c.urlParams_, opts...)
3921	res, err := c.doRequest("json")
3922	if res != nil && res.StatusCode == http.StatusNotModified {
3923		if res.Body != nil {
3924			res.Body.Close()
3925		}
3926		return nil, &googleapi.Error{
3927			Code:   res.StatusCode,
3928			Header: res.Header,
3929		}
3930	}
3931	if err != nil {
3932		return nil, err
3933	}
3934	defer googleapi.CloseBody(res)
3935	if err := googleapi.CheckResponse(res); err != nil {
3936		return nil, err
3937	}
3938	ret := &PlayerAchievementListResponse{
3939		ServerResponse: googleapi.ServerResponse{
3940			Header:         res.Header,
3941			HTTPStatusCode: res.StatusCode,
3942		},
3943	}
3944	target := &ret
3945	if err := gensupport.DecodeResponse(target, res); err != nil {
3946		return nil, err
3947	}
3948	return ret, nil
3949	// {
3950	//   "description": "Lists the progress for all your application's achievements for the currently authenticated player.",
3951	//   "flatPath": "games/v1/players/{playerId}/achievements",
3952	//   "httpMethod": "GET",
3953	//   "id": "games.achievements.list",
3954	//   "parameterOrder": [
3955	//     "playerId"
3956	//   ],
3957	//   "parameters": {
3958	//     "language": {
3959	//       "description": "The preferred language to use for strings returned by this method.",
3960	//       "location": "query",
3961	//       "type": "string"
3962	//     },
3963	//     "maxResults": {
3964	//       "description": "The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified `maxResults`.",
3965	//       "format": "int32",
3966	//       "location": "query",
3967	//       "type": "integer"
3968	//     },
3969	//     "pageToken": {
3970	//       "description": "The token returned by the previous request.",
3971	//       "location": "query",
3972	//       "type": "string"
3973	//     },
3974	//     "playerId": {
3975	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
3976	//       "location": "path",
3977	//       "required": true,
3978	//       "type": "string"
3979	//     },
3980	//     "state": {
3981	//       "description": "Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned.",
3982	//       "enum": [
3983	//         "ALL",
3984	//         "HIDDEN",
3985	//         "REVEALED",
3986	//         "UNLOCKED"
3987	//       ],
3988	//       "enumDescriptions": [
3989	//         "List all achievements. This is the default.",
3990	//         "List only hidden achievements.",
3991	//         "List only revealed achievements.",
3992	//         "List only unlocked achievements."
3993	//       ],
3994	//       "location": "query",
3995	//       "type": "string"
3996	//     }
3997	//   },
3998	//   "path": "games/v1/players/{playerId}/achievements",
3999	//   "response": {
4000	//     "$ref": "PlayerAchievementListResponse"
4001	//   },
4002	//   "scopes": [
4003	//     "https://www.googleapis.com/auth/games"
4004	//   ]
4005	// }
4006
4007}
4008
4009// Pages invokes f for each page of results.
4010// A non-nil error returned from f will halt the iteration.
4011// The provided context supersedes any context provided to the Context method.
4012func (c *AchievementsListCall) Pages(ctx context.Context, f func(*PlayerAchievementListResponse) error) error {
4013	c.ctx_ = ctx
4014	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4015	for {
4016		x, err := c.Do()
4017		if err != nil {
4018			return err
4019		}
4020		if err := f(x); err != nil {
4021			return err
4022		}
4023		if x.NextPageToken == "" {
4024			return nil
4025		}
4026		c.PageToken(x.NextPageToken)
4027	}
4028}
4029
4030// method id "games.achievements.reveal":
4031
4032type AchievementsRevealCall struct {
4033	s             *Service
4034	achievementId string
4035	urlParams_    gensupport.URLParams
4036	ctx_          context.Context
4037	header_       http.Header
4038}
4039
4040// Reveal: Sets the state of the achievement with the given ID to
4041// `REVEALED` for the currently authenticated player.
4042func (r *AchievementsService) Reveal(achievementId string) *AchievementsRevealCall {
4043	c := &AchievementsRevealCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4044	c.achievementId = achievementId
4045	return c
4046}
4047
4048// Fields allows partial responses to be retrieved. See
4049// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4050// for more information.
4051func (c *AchievementsRevealCall) Fields(s ...googleapi.Field) *AchievementsRevealCall {
4052	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4053	return c
4054}
4055
4056// Context sets the context to be used in this call's Do method. Any
4057// pending HTTP request will be aborted if the provided context is
4058// canceled.
4059func (c *AchievementsRevealCall) Context(ctx context.Context) *AchievementsRevealCall {
4060	c.ctx_ = ctx
4061	return c
4062}
4063
4064// Header returns an http.Header that can be modified by the caller to
4065// add HTTP headers to the request.
4066func (c *AchievementsRevealCall) Header() http.Header {
4067	if c.header_ == nil {
4068		c.header_ = make(http.Header)
4069	}
4070	return c.header_
4071}
4072
4073func (c *AchievementsRevealCall) doRequest(alt string) (*http.Response, error) {
4074	reqHeaders := make(http.Header)
4075	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4076	for k, v := range c.header_ {
4077		reqHeaders[k] = v
4078	}
4079	reqHeaders.Set("User-Agent", c.s.userAgent())
4080	var body io.Reader = nil
4081	c.urlParams_.Set("alt", alt)
4082	c.urlParams_.Set("prettyPrint", "false")
4083	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/reveal")
4084	urls += "?" + c.urlParams_.Encode()
4085	req, err := http.NewRequest("POST", urls, body)
4086	if err != nil {
4087		return nil, err
4088	}
4089	req.Header = reqHeaders
4090	googleapi.Expand(req.URL, map[string]string{
4091		"achievementId": c.achievementId,
4092	})
4093	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4094}
4095
4096// Do executes the "games.achievements.reveal" call.
4097// Exactly one of *AchievementRevealResponse or error will be non-nil.
4098// Any non-2xx status code is an error. Response headers are in either
4099// *AchievementRevealResponse.ServerResponse.Header or (if a response
4100// was returned at all) in error.(*googleapi.Error).Header. Use
4101// googleapi.IsNotModified to check whether the returned error was
4102// because http.StatusNotModified was returned.
4103func (c *AchievementsRevealCall) Do(opts ...googleapi.CallOption) (*AchievementRevealResponse, error) {
4104	gensupport.SetOptions(c.urlParams_, opts...)
4105	res, err := c.doRequest("json")
4106	if res != nil && res.StatusCode == http.StatusNotModified {
4107		if res.Body != nil {
4108			res.Body.Close()
4109		}
4110		return nil, &googleapi.Error{
4111			Code:   res.StatusCode,
4112			Header: res.Header,
4113		}
4114	}
4115	if err != nil {
4116		return nil, err
4117	}
4118	defer googleapi.CloseBody(res)
4119	if err := googleapi.CheckResponse(res); err != nil {
4120		return nil, err
4121	}
4122	ret := &AchievementRevealResponse{
4123		ServerResponse: googleapi.ServerResponse{
4124			Header:         res.Header,
4125			HTTPStatusCode: res.StatusCode,
4126		},
4127	}
4128	target := &ret
4129	if err := gensupport.DecodeResponse(target, res); err != nil {
4130		return nil, err
4131	}
4132	return ret, nil
4133	// {
4134	//   "description": "Sets the state of the achievement with the given ID to `REVEALED` for the currently authenticated player.",
4135	//   "flatPath": "games/v1/achievements/{achievementId}/reveal",
4136	//   "httpMethod": "POST",
4137	//   "id": "games.achievements.reveal",
4138	//   "parameterOrder": [
4139	//     "achievementId"
4140	//   ],
4141	//   "parameters": {
4142	//     "achievementId": {
4143	//       "description": "The ID of the achievement used by this method.",
4144	//       "location": "path",
4145	//       "required": true,
4146	//       "type": "string"
4147	//     }
4148	//   },
4149	//   "path": "games/v1/achievements/{achievementId}/reveal",
4150	//   "response": {
4151	//     "$ref": "AchievementRevealResponse"
4152	//   },
4153	//   "scopes": [
4154	//     "https://www.googleapis.com/auth/games"
4155	//   ]
4156	// }
4157
4158}
4159
4160// method id "games.achievements.setStepsAtLeast":
4161
4162type AchievementsSetStepsAtLeastCall struct {
4163	s             *Service
4164	achievementId string
4165	urlParams_    gensupport.URLParams
4166	ctx_          context.Context
4167	header_       http.Header
4168}
4169
4170// SetStepsAtLeast: Sets the steps for the currently authenticated
4171// player towards unlocking an achievement. If the steps parameter is
4172// less than the current number of steps that the player already gained
4173// for the achievement, the achievement is not modified.
4174func (r *AchievementsService) SetStepsAtLeast(achievementId string, steps int64) *AchievementsSetStepsAtLeastCall {
4175	c := &AchievementsSetStepsAtLeastCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4176	c.achievementId = achievementId
4177	c.urlParams_.Set("steps", fmt.Sprint(steps))
4178	return c
4179}
4180
4181// Fields allows partial responses to be retrieved. See
4182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4183// for more information.
4184func (c *AchievementsSetStepsAtLeastCall) Fields(s ...googleapi.Field) *AchievementsSetStepsAtLeastCall {
4185	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4186	return c
4187}
4188
4189// Context sets the context to be used in this call's Do method. Any
4190// pending HTTP request will be aborted if the provided context is
4191// canceled.
4192func (c *AchievementsSetStepsAtLeastCall) Context(ctx context.Context) *AchievementsSetStepsAtLeastCall {
4193	c.ctx_ = ctx
4194	return c
4195}
4196
4197// Header returns an http.Header that can be modified by the caller to
4198// add HTTP headers to the request.
4199func (c *AchievementsSetStepsAtLeastCall) Header() http.Header {
4200	if c.header_ == nil {
4201		c.header_ = make(http.Header)
4202	}
4203	return c.header_
4204}
4205
4206func (c *AchievementsSetStepsAtLeastCall) doRequest(alt string) (*http.Response, error) {
4207	reqHeaders := make(http.Header)
4208	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4209	for k, v := range c.header_ {
4210		reqHeaders[k] = v
4211	}
4212	reqHeaders.Set("User-Agent", c.s.userAgent())
4213	var body io.Reader = nil
4214	c.urlParams_.Set("alt", alt)
4215	c.urlParams_.Set("prettyPrint", "false")
4216	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/setStepsAtLeast")
4217	urls += "?" + c.urlParams_.Encode()
4218	req, err := http.NewRequest("POST", urls, body)
4219	if err != nil {
4220		return nil, err
4221	}
4222	req.Header = reqHeaders
4223	googleapi.Expand(req.URL, map[string]string{
4224		"achievementId": c.achievementId,
4225	})
4226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4227}
4228
4229// Do executes the "games.achievements.setStepsAtLeast" call.
4230// Exactly one of *AchievementSetStepsAtLeastResponse or error will be
4231// non-nil. Any non-2xx status code is an error. Response headers are in
4232// either *AchievementSetStepsAtLeastResponse.ServerResponse.Header or
4233// (if a response was returned at all) in
4234// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4235// whether the returned error was because http.StatusNotModified was
4236// returned.
4237func (c *AchievementsSetStepsAtLeastCall) Do(opts ...googleapi.CallOption) (*AchievementSetStepsAtLeastResponse, error) {
4238	gensupport.SetOptions(c.urlParams_, opts...)
4239	res, err := c.doRequest("json")
4240	if res != nil && res.StatusCode == http.StatusNotModified {
4241		if res.Body != nil {
4242			res.Body.Close()
4243		}
4244		return nil, &googleapi.Error{
4245			Code:   res.StatusCode,
4246			Header: res.Header,
4247		}
4248	}
4249	if err != nil {
4250		return nil, err
4251	}
4252	defer googleapi.CloseBody(res)
4253	if err := googleapi.CheckResponse(res); err != nil {
4254		return nil, err
4255	}
4256	ret := &AchievementSetStepsAtLeastResponse{
4257		ServerResponse: googleapi.ServerResponse{
4258			Header:         res.Header,
4259			HTTPStatusCode: res.StatusCode,
4260		},
4261	}
4262	target := &ret
4263	if err := gensupport.DecodeResponse(target, res); err != nil {
4264		return nil, err
4265	}
4266	return ret, nil
4267	// {
4268	//   "description": "Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.",
4269	//   "flatPath": "games/v1/achievements/{achievementId}/setStepsAtLeast",
4270	//   "httpMethod": "POST",
4271	//   "id": "games.achievements.setStepsAtLeast",
4272	//   "parameterOrder": [
4273	//     "achievementId",
4274	//     "steps"
4275	//   ],
4276	//   "parameters": {
4277	//     "achievementId": {
4278	//       "description": "The ID of the achievement used by this method.",
4279	//       "location": "path",
4280	//       "required": true,
4281	//       "type": "string"
4282	//     },
4283	//     "steps": {
4284	//       "description": "The minimum value to set the steps to.",
4285	//       "format": "int32",
4286	//       "location": "query",
4287	//       "required": true,
4288	//       "type": "integer"
4289	//     }
4290	//   },
4291	//   "path": "games/v1/achievements/{achievementId}/setStepsAtLeast",
4292	//   "response": {
4293	//     "$ref": "AchievementSetStepsAtLeastResponse"
4294	//   },
4295	//   "scopes": [
4296	//     "https://www.googleapis.com/auth/games"
4297	//   ]
4298	// }
4299
4300}
4301
4302// method id "games.achievements.unlock":
4303
4304type AchievementsUnlockCall struct {
4305	s             *Service
4306	achievementId string
4307	urlParams_    gensupport.URLParams
4308	ctx_          context.Context
4309	header_       http.Header
4310}
4311
4312// Unlock: Unlocks this achievement for the currently authenticated
4313// player.
4314func (r *AchievementsService) Unlock(achievementId string) *AchievementsUnlockCall {
4315	c := &AchievementsUnlockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4316	c.achievementId = achievementId
4317	return c
4318}
4319
4320// Fields allows partial responses to be retrieved. See
4321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4322// for more information.
4323func (c *AchievementsUnlockCall) Fields(s ...googleapi.Field) *AchievementsUnlockCall {
4324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4325	return c
4326}
4327
4328// Context sets the context to be used in this call's Do method. Any
4329// pending HTTP request will be aborted if the provided context is
4330// canceled.
4331func (c *AchievementsUnlockCall) Context(ctx context.Context) *AchievementsUnlockCall {
4332	c.ctx_ = ctx
4333	return c
4334}
4335
4336// Header returns an http.Header that can be modified by the caller to
4337// add HTTP headers to the request.
4338func (c *AchievementsUnlockCall) Header() http.Header {
4339	if c.header_ == nil {
4340		c.header_ = make(http.Header)
4341	}
4342	return c.header_
4343}
4344
4345func (c *AchievementsUnlockCall) doRequest(alt string) (*http.Response, error) {
4346	reqHeaders := make(http.Header)
4347	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4348	for k, v := range c.header_ {
4349		reqHeaders[k] = v
4350	}
4351	reqHeaders.Set("User-Agent", c.s.userAgent())
4352	var body io.Reader = nil
4353	c.urlParams_.Set("alt", alt)
4354	c.urlParams_.Set("prettyPrint", "false")
4355	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/unlock")
4356	urls += "?" + c.urlParams_.Encode()
4357	req, err := http.NewRequest("POST", urls, body)
4358	if err != nil {
4359		return nil, err
4360	}
4361	req.Header = reqHeaders
4362	googleapi.Expand(req.URL, map[string]string{
4363		"achievementId": c.achievementId,
4364	})
4365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4366}
4367
4368// Do executes the "games.achievements.unlock" call.
4369// Exactly one of *AchievementUnlockResponse or error will be non-nil.
4370// Any non-2xx status code is an error. Response headers are in either
4371// *AchievementUnlockResponse.ServerResponse.Header or (if a response
4372// was returned at all) in error.(*googleapi.Error).Header. Use
4373// googleapi.IsNotModified to check whether the returned error was
4374// because http.StatusNotModified was returned.
4375func (c *AchievementsUnlockCall) Do(opts ...googleapi.CallOption) (*AchievementUnlockResponse, error) {
4376	gensupport.SetOptions(c.urlParams_, opts...)
4377	res, err := c.doRequest("json")
4378	if res != nil && res.StatusCode == http.StatusNotModified {
4379		if res.Body != nil {
4380			res.Body.Close()
4381		}
4382		return nil, &googleapi.Error{
4383			Code:   res.StatusCode,
4384			Header: res.Header,
4385		}
4386	}
4387	if err != nil {
4388		return nil, err
4389	}
4390	defer googleapi.CloseBody(res)
4391	if err := googleapi.CheckResponse(res); err != nil {
4392		return nil, err
4393	}
4394	ret := &AchievementUnlockResponse{
4395		ServerResponse: googleapi.ServerResponse{
4396			Header:         res.Header,
4397			HTTPStatusCode: res.StatusCode,
4398		},
4399	}
4400	target := &ret
4401	if err := gensupport.DecodeResponse(target, res); err != nil {
4402		return nil, err
4403	}
4404	return ret, nil
4405	// {
4406	//   "description": "Unlocks this achievement for the currently authenticated player.",
4407	//   "flatPath": "games/v1/achievements/{achievementId}/unlock",
4408	//   "httpMethod": "POST",
4409	//   "id": "games.achievements.unlock",
4410	//   "parameterOrder": [
4411	//     "achievementId"
4412	//   ],
4413	//   "parameters": {
4414	//     "achievementId": {
4415	//       "description": "The ID of the achievement used by this method.",
4416	//       "location": "path",
4417	//       "required": true,
4418	//       "type": "string"
4419	//     }
4420	//   },
4421	//   "path": "games/v1/achievements/{achievementId}/unlock",
4422	//   "response": {
4423	//     "$ref": "AchievementUnlockResponse"
4424	//   },
4425	//   "scopes": [
4426	//     "https://www.googleapis.com/auth/games"
4427	//   ]
4428	// }
4429
4430}
4431
4432// method id "games.achievements.updateMultiple":
4433
4434type AchievementsUpdateMultipleCall struct {
4435	s                                *Service
4436	achievementupdatemultiplerequest *AchievementUpdateMultipleRequest
4437	urlParams_                       gensupport.URLParams
4438	ctx_                             context.Context
4439	header_                          http.Header
4440}
4441
4442// UpdateMultiple: Updates multiple achievements for the currently
4443// authenticated player.
4444func (r *AchievementsService) UpdateMultiple(achievementupdatemultiplerequest *AchievementUpdateMultipleRequest) *AchievementsUpdateMultipleCall {
4445	c := &AchievementsUpdateMultipleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4446	c.achievementupdatemultiplerequest = achievementupdatemultiplerequest
4447	return c
4448}
4449
4450// Fields allows partial responses to be retrieved. See
4451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4452// for more information.
4453func (c *AchievementsUpdateMultipleCall) Fields(s ...googleapi.Field) *AchievementsUpdateMultipleCall {
4454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4455	return c
4456}
4457
4458// Context sets the context to be used in this call's Do method. Any
4459// pending HTTP request will be aborted if the provided context is
4460// canceled.
4461func (c *AchievementsUpdateMultipleCall) Context(ctx context.Context) *AchievementsUpdateMultipleCall {
4462	c.ctx_ = ctx
4463	return c
4464}
4465
4466// Header returns an http.Header that can be modified by the caller to
4467// add HTTP headers to the request.
4468func (c *AchievementsUpdateMultipleCall) Header() http.Header {
4469	if c.header_ == nil {
4470		c.header_ = make(http.Header)
4471	}
4472	return c.header_
4473}
4474
4475func (c *AchievementsUpdateMultipleCall) doRequest(alt string) (*http.Response, error) {
4476	reqHeaders := make(http.Header)
4477	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4478	for k, v := range c.header_ {
4479		reqHeaders[k] = v
4480	}
4481	reqHeaders.Set("User-Agent", c.s.userAgent())
4482	var body io.Reader = nil
4483	body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementupdatemultiplerequest)
4484	if err != nil {
4485		return nil, err
4486	}
4487	reqHeaders.Set("Content-Type", "application/json")
4488	c.urlParams_.Set("alt", alt)
4489	c.urlParams_.Set("prettyPrint", "false")
4490	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/updateMultiple")
4491	urls += "?" + c.urlParams_.Encode()
4492	req, err := http.NewRequest("POST", urls, body)
4493	if err != nil {
4494		return nil, err
4495	}
4496	req.Header = reqHeaders
4497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4498}
4499
4500// Do executes the "games.achievements.updateMultiple" call.
4501// Exactly one of *AchievementUpdateMultipleResponse or error will be
4502// non-nil. Any non-2xx status code is an error. Response headers are in
4503// either *AchievementUpdateMultipleResponse.ServerResponse.Header or
4504// (if a response was returned at all) in
4505// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4506// whether the returned error was because http.StatusNotModified was
4507// returned.
4508func (c *AchievementsUpdateMultipleCall) Do(opts ...googleapi.CallOption) (*AchievementUpdateMultipleResponse, error) {
4509	gensupport.SetOptions(c.urlParams_, opts...)
4510	res, err := c.doRequest("json")
4511	if res != nil && res.StatusCode == http.StatusNotModified {
4512		if res.Body != nil {
4513			res.Body.Close()
4514		}
4515		return nil, &googleapi.Error{
4516			Code:   res.StatusCode,
4517			Header: res.Header,
4518		}
4519	}
4520	if err != nil {
4521		return nil, err
4522	}
4523	defer googleapi.CloseBody(res)
4524	if err := googleapi.CheckResponse(res); err != nil {
4525		return nil, err
4526	}
4527	ret := &AchievementUpdateMultipleResponse{
4528		ServerResponse: googleapi.ServerResponse{
4529			Header:         res.Header,
4530			HTTPStatusCode: res.StatusCode,
4531		},
4532	}
4533	target := &ret
4534	if err := gensupport.DecodeResponse(target, res); err != nil {
4535		return nil, err
4536	}
4537	return ret, nil
4538	// {
4539	//   "description": "Updates multiple achievements for the currently authenticated player.",
4540	//   "flatPath": "games/v1/achievements/updateMultiple",
4541	//   "httpMethod": "POST",
4542	//   "id": "games.achievements.updateMultiple",
4543	//   "parameterOrder": [],
4544	//   "parameters": {},
4545	//   "path": "games/v1/achievements/updateMultiple",
4546	//   "request": {
4547	//     "$ref": "AchievementUpdateMultipleRequest"
4548	//   },
4549	//   "response": {
4550	//     "$ref": "AchievementUpdateMultipleResponse"
4551	//   },
4552	//   "scopes": [
4553	//     "https://www.googleapis.com/auth/games"
4554	//   ]
4555	// }
4556
4557}
4558
4559// method id "games.applications.get":
4560
4561type ApplicationsGetCall struct {
4562	s             *Service
4563	applicationId string
4564	urlParams_    gensupport.URLParams
4565	ifNoneMatch_  string
4566	ctx_          context.Context
4567	header_       http.Header
4568}
4569
4570// Get: Retrieves the metadata of the application with the given ID. If
4571// the requested application is not available for the specified
4572// `platformType`, the returned response will not include any instance
4573// data.
4574func (r *ApplicationsService) Get(applicationId string) *ApplicationsGetCall {
4575	c := &ApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4576	c.applicationId = applicationId
4577	return c
4578}
4579
4580// Language sets the optional parameter "language": The preferred
4581// language to use for strings returned by this method.
4582func (c *ApplicationsGetCall) Language(language string) *ApplicationsGetCall {
4583	c.urlParams_.Set("language", language)
4584	return c
4585}
4586
4587// PlatformType sets the optional parameter "platformType": Restrict
4588// application details returned to the specific platform.
4589//
4590// Possible values:
4591//   "PLATFORM_TYPE_UNSPECIFIED" - Default value, don't use.
4592//   "ANDROID" - Retrieve applications that can be played on Android.
4593//   "IOS" - Retrieve applications that can be played on iOS.
4594//   "WEB_APP" - Retrieve applications that can be played on desktop
4595// web.
4596func (c *ApplicationsGetCall) PlatformType(platformType string) *ApplicationsGetCall {
4597	c.urlParams_.Set("platformType", platformType)
4598	return c
4599}
4600
4601// Fields allows partial responses to be retrieved. See
4602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4603// for more information.
4604func (c *ApplicationsGetCall) Fields(s ...googleapi.Field) *ApplicationsGetCall {
4605	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4606	return c
4607}
4608
4609// IfNoneMatch sets the optional parameter which makes the operation
4610// fail if the object's ETag matches the given value. This is useful for
4611// getting updates only after the object has changed since the last
4612// request. Use googleapi.IsNotModified to check whether the response
4613// error from Do is the result of In-None-Match.
4614func (c *ApplicationsGetCall) IfNoneMatch(entityTag string) *ApplicationsGetCall {
4615	c.ifNoneMatch_ = entityTag
4616	return c
4617}
4618
4619// Context sets the context to be used in this call's Do method. Any
4620// pending HTTP request will be aborted if the provided context is
4621// canceled.
4622func (c *ApplicationsGetCall) Context(ctx context.Context) *ApplicationsGetCall {
4623	c.ctx_ = ctx
4624	return c
4625}
4626
4627// Header returns an http.Header that can be modified by the caller to
4628// add HTTP headers to the request.
4629func (c *ApplicationsGetCall) Header() http.Header {
4630	if c.header_ == nil {
4631		c.header_ = make(http.Header)
4632	}
4633	return c.header_
4634}
4635
4636func (c *ApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
4637	reqHeaders := make(http.Header)
4638	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4639	for k, v := range c.header_ {
4640		reqHeaders[k] = v
4641	}
4642	reqHeaders.Set("User-Agent", c.s.userAgent())
4643	if c.ifNoneMatch_ != "" {
4644		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4645	}
4646	var body io.Reader = nil
4647	c.urlParams_.Set("alt", alt)
4648	c.urlParams_.Set("prettyPrint", "false")
4649	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/{applicationId}")
4650	urls += "?" + c.urlParams_.Encode()
4651	req, err := http.NewRequest("GET", urls, body)
4652	if err != nil {
4653		return nil, err
4654	}
4655	req.Header = reqHeaders
4656	googleapi.Expand(req.URL, map[string]string{
4657		"applicationId": c.applicationId,
4658	})
4659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4660}
4661
4662// Do executes the "games.applications.get" call.
4663// Exactly one of *Application or error will be non-nil. Any non-2xx
4664// status code is an error. Response headers are in either
4665// *Application.ServerResponse.Header or (if a response was returned at
4666// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4667// to check whether the returned error was because
4668// http.StatusNotModified was returned.
4669func (c *ApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
4670	gensupport.SetOptions(c.urlParams_, opts...)
4671	res, err := c.doRequest("json")
4672	if res != nil && res.StatusCode == http.StatusNotModified {
4673		if res.Body != nil {
4674			res.Body.Close()
4675		}
4676		return nil, &googleapi.Error{
4677			Code:   res.StatusCode,
4678			Header: res.Header,
4679		}
4680	}
4681	if err != nil {
4682		return nil, err
4683	}
4684	defer googleapi.CloseBody(res)
4685	if err := googleapi.CheckResponse(res); err != nil {
4686		return nil, err
4687	}
4688	ret := &Application{
4689		ServerResponse: googleapi.ServerResponse{
4690			Header:         res.Header,
4691			HTTPStatusCode: res.StatusCode,
4692		},
4693	}
4694	target := &ret
4695	if err := gensupport.DecodeResponse(target, res); err != nil {
4696		return nil, err
4697	}
4698	return ret, nil
4699	// {
4700	//   "description": "Retrieves the metadata of the application with the given ID. If the requested application is not available for the specified `platformType`, the returned response will not include any instance data.",
4701	//   "flatPath": "games/v1/applications/{applicationId}",
4702	//   "httpMethod": "GET",
4703	//   "id": "games.applications.get",
4704	//   "parameterOrder": [
4705	//     "applicationId"
4706	//   ],
4707	//   "parameters": {
4708	//     "applicationId": {
4709	//       "description": "The application ID from the Google Play developer console.",
4710	//       "location": "path",
4711	//       "required": true,
4712	//       "type": "string"
4713	//     },
4714	//     "language": {
4715	//       "description": "The preferred language to use for strings returned by this method.",
4716	//       "location": "query",
4717	//       "type": "string"
4718	//     },
4719	//     "platformType": {
4720	//       "description": "Restrict application details returned to the specific platform.",
4721	//       "enum": [
4722	//         "PLATFORM_TYPE_UNSPECIFIED",
4723	//         "ANDROID",
4724	//         "IOS",
4725	//         "WEB_APP"
4726	//       ],
4727	//       "enumDescriptions": [
4728	//         "Default value, don't use.",
4729	//         "Retrieve applications that can be played on Android.",
4730	//         "Retrieve applications that can be played on iOS.",
4731	//         "Retrieve applications that can be played on desktop web."
4732	//       ],
4733	//       "location": "query",
4734	//       "type": "string"
4735	//     }
4736	//   },
4737	//   "path": "games/v1/applications/{applicationId}",
4738	//   "response": {
4739	//     "$ref": "Application"
4740	//   },
4741	//   "scopes": [
4742	//     "https://www.googleapis.com/auth/games"
4743	//   ]
4744	// }
4745
4746}
4747
4748// method id "games.applications.played":
4749
4750type ApplicationsPlayedCall struct {
4751	s          *Service
4752	urlParams_ gensupport.URLParams
4753	ctx_       context.Context
4754	header_    http.Header
4755}
4756
4757// Played: Indicate that the currently authenticated user is playing
4758// your application.
4759func (r *ApplicationsService) Played() *ApplicationsPlayedCall {
4760	c := &ApplicationsPlayedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4761	return c
4762}
4763
4764// Fields allows partial responses to be retrieved. See
4765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4766// for more information.
4767func (c *ApplicationsPlayedCall) Fields(s ...googleapi.Field) *ApplicationsPlayedCall {
4768	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4769	return c
4770}
4771
4772// Context sets the context to be used in this call's Do method. Any
4773// pending HTTP request will be aborted if the provided context is
4774// canceled.
4775func (c *ApplicationsPlayedCall) Context(ctx context.Context) *ApplicationsPlayedCall {
4776	c.ctx_ = ctx
4777	return c
4778}
4779
4780// Header returns an http.Header that can be modified by the caller to
4781// add HTTP headers to the request.
4782func (c *ApplicationsPlayedCall) Header() http.Header {
4783	if c.header_ == nil {
4784		c.header_ = make(http.Header)
4785	}
4786	return c.header_
4787}
4788
4789func (c *ApplicationsPlayedCall) doRequest(alt string) (*http.Response, error) {
4790	reqHeaders := make(http.Header)
4791	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4792	for k, v := range c.header_ {
4793		reqHeaders[k] = v
4794	}
4795	reqHeaders.Set("User-Agent", c.s.userAgent())
4796	var body io.Reader = nil
4797	c.urlParams_.Set("alt", alt)
4798	c.urlParams_.Set("prettyPrint", "false")
4799	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/played")
4800	urls += "?" + c.urlParams_.Encode()
4801	req, err := http.NewRequest("POST", urls, body)
4802	if err != nil {
4803		return nil, err
4804	}
4805	req.Header = reqHeaders
4806	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4807}
4808
4809// Do executes the "games.applications.played" call.
4810func (c *ApplicationsPlayedCall) Do(opts ...googleapi.CallOption) error {
4811	gensupport.SetOptions(c.urlParams_, opts...)
4812	res, err := c.doRequest("json")
4813	if err != nil {
4814		return err
4815	}
4816	defer googleapi.CloseBody(res)
4817	if err := googleapi.CheckResponse(res); err != nil {
4818		return err
4819	}
4820	return nil
4821	// {
4822	//   "description": "Indicate that the currently authenticated user is playing your application.",
4823	//   "flatPath": "games/v1/applications/played",
4824	//   "httpMethod": "POST",
4825	//   "id": "games.applications.played",
4826	//   "parameterOrder": [],
4827	//   "parameters": {},
4828	//   "path": "games/v1/applications/played",
4829	//   "scopes": [
4830	//     "https://www.googleapis.com/auth/games"
4831	//   ]
4832	// }
4833
4834}
4835
4836// method id "games.applications.verify":
4837
4838type ApplicationsVerifyCall struct {
4839	s             *Service
4840	applicationId string
4841	urlParams_    gensupport.URLParams
4842	ifNoneMatch_  string
4843	ctx_          context.Context
4844	header_       http.Header
4845}
4846
4847// Verify: Verifies the auth token provided with this request is for the
4848// application with the specified ID, and returns the ID of the player
4849// it was granted for.
4850func (r *ApplicationsService) Verify(applicationId string) *ApplicationsVerifyCall {
4851	c := &ApplicationsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4852	c.applicationId = applicationId
4853	return c
4854}
4855
4856// Fields allows partial responses to be retrieved. See
4857// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4858// for more information.
4859func (c *ApplicationsVerifyCall) Fields(s ...googleapi.Field) *ApplicationsVerifyCall {
4860	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4861	return c
4862}
4863
4864// IfNoneMatch sets the optional parameter which makes the operation
4865// fail if the object's ETag matches the given value. This is useful for
4866// getting updates only after the object has changed since the last
4867// request. Use googleapi.IsNotModified to check whether the response
4868// error from Do is the result of In-None-Match.
4869func (c *ApplicationsVerifyCall) IfNoneMatch(entityTag string) *ApplicationsVerifyCall {
4870	c.ifNoneMatch_ = entityTag
4871	return c
4872}
4873
4874// Context sets the context to be used in this call's Do method. Any
4875// pending HTTP request will be aborted if the provided context is
4876// canceled.
4877func (c *ApplicationsVerifyCall) Context(ctx context.Context) *ApplicationsVerifyCall {
4878	c.ctx_ = ctx
4879	return c
4880}
4881
4882// Header returns an http.Header that can be modified by the caller to
4883// add HTTP headers to the request.
4884func (c *ApplicationsVerifyCall) Header() http.Header {
4885	if c.header_ == nil {
4886		c.header_ = make(http.Header)
4887	}
4888	return c.header_
4889}
4890
4891func (c *ApplicationsVerifyCall) doRequest(alt string) (*http.Response, error) {
4892	reqHeaders := make(http.Header)
4893	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4894	for k, v := range c.header_ {
4895		reqHeaders[k] = v
4896	}
4897	reqHeaders.Set("User-Agent", c.s.userAgent())
4898	if c.ifNoneMatch_ != "" {
4899		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4900	}
4901	var body io.Reader = nil
4902	c.urlParams_.Set("alt", alt)
4903	c.urlParams_.Set("prettyPrint", "false")
4904	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/{applicationId}/verify")
4905	urls += "?" + c.urlParams_.Encode()
4906	req, err := http.NewRequest("GET", urls, body)
4907	if err != nil {
4908		return nil, err
4909	}
4910	req.Header = reqHeaders
4911	googleapi.Expand(req.URL, map[string]string{
4912		"applicationId": c.applicationId,
4913	})
4914	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4915}
4916
4917// Do executes the "games.applications.verify" call.
4918// Exactly one of *ApplicationVerifyResponse or error will be non-nil.
4919// Any non-2xx status code is an error. Response headers are in either
4920// *ApplicationVerifyResponse.ServerResponse.Header or (if a response
4921// was returned at all) in error.(*googleapi.Error).Header. Use
4922// googleapi.IsNotModified to check whether the returned error was
4923// because http.StatusNotModified was returned.
4924func (c *ApplicationsVerifyCall) Do(opts ...googleapi.CallOption) (*ApplicationVerifyResponse, error) {
4925	gensupport.SetOptions(c.urlParams_, opts...)
4926	res, err := c.doRequest("json")
4927	if res != nil && res.StatusCode == http.StatusNotModified {
4928		if res.Body != nil {
4929			res.Body.Close()
4930		}
4931		return nil, &googleapi.Error{
4932			Code:   res.StatusCode,
4933			Header: res.Header,
4934		}
4935	}
4936	if err != nil {
4937		return nil, err
4938	}
4939	defer googleapi.CloseBody(res)
4940	if err := googleapi.CheckResponse(res); err != nil {
4941		return nil, err
4942	}
4943	ret := &ApplicationVerifyResponse{
4944		ServerResponse: googleapi.ServerResponse{
4945			Header:         res.Header,
4946			HTTPStatusCode: res.StatusCode,
4947		},
4948	}
4949	target := &ret
4950	if err := gensupport.DecodeResponse(target, res); err != nil {
4951		return nil, err
4952	}
4953	return ret, nil
4954	// {
4955	//   "description": "Verifies the auth token provided with this request is for the application with the specified ID, and returns the ID of the player it was granted for.",
4956	//   "flatPath": "games/v1/applications/{applicationId}/verify",
4957	//   "httpMethod": "GET",
4958	//   "id": "games.applications.verify",
4959	//   "parameterOrder": [
4960	//     "applicationId"
4961	//   ],
4962	//   "parameters": {
4963	//     "applicationId": {
4964	//       "description": "The application ID from the Google Play developer console.",
4965	//       "location": "path",
4966	//       "required": true,
4967	//       "type": "string"
4968	//     }
4969	//   },
4970	//   "path": "games/v1/applications/{applicationId}/verify",
4971	//   "response": {
4972	//     "$ref": "ApplicationVerifyResponse"
4973	//   },
4974	//   "scopes": [
4975	//     "https://www.googleapis.com/auth/games"
4976	//   ]
4977	// }
4978
4979}
4980
4981// method id "games.events.listByPlayer":
4982
4983type EventsListByPlayerCall struct {
4984	s            *Service
4985	urlParams_   gensupport.URLParams
4986	ifNoneMatch_ string
4987	ctx_         context.Context
4988	header_      http.Header
4989}
4990
4991// ListByPlayer: Returns a list showing the current progress on events
4992// in this application for the currently authenticated user.
4993func (r *EventsService) ListByPlayer() *EventsListByPlayerCall {
4994	c := &EventsListByPlayerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4995	return c
4996}
4997
4998// Language sets the optional parameter "language": The preferred
4999// language to use for strings returned by this method.
5000func (c *EventsListByPlayerCall) Language(language string) *EventsListByPlayerCall {
5001	c.urlParams_.Set("language", language)
5002	return c
5003}
5004
5005// MaxResults sets the optional parameter "maxResults": The maximum
5006// number of events to return in the response, used for paging. For any
5007// response, the actual number of events to return may be less than the
5008// specified maxResults.
5009func (c *EventsListByPlayerCall) MaxResults(maxResults int64) *EventsListByPlayerCall {
5010	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5011	return c
5012}
5013
5014// PageToken sets the optional parameter "pageToken": The token returned
5015// by the previous request.
5016func (c *EventsListByPlayerCall) PageToken(pageToken string) *EventsListByPlayerCall {
5017	c.urlParams_.Set("pageToken", pageToken)
5018	return c
5019}
5020
5021// Fields allows partial responses to be retrieved. See
5022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5023// for more information.
5024func (c *EventsListByPlayerCall) Fields(s ...googleapi.Field) *EventsListByPlayerCall {
5025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5026	return c
5027}
5028
5029// IfNoneMatch sets the optional parameter which makes the operation
5030// fail if the object's ETag matches the given value. This is useful for
5031// getting updates only after the object has changed since the last
5032// request. Use googleapi.IsNotModified to check whether the response
5033// error from Do is the result of In-None-Match.
5034func (c *EventsListByPlayerCall) IfNoneMatch(entityTag string) *EventsListByPlayerCall {
5035	c.ifNoneMatch_ = entityTag
5036	return c
5037}
5038
5039// Context sets the context to be used in this call's Do method. Any
5040// pending HTTP request will be aborted if the provided context is
5041// canceled.
5042func (c *EventsListByPlayerCall) Context(ctx context.Context) *EventsListByPlayerCall {
5043	c.ctx_ = ctx
5044	return c
5045}
5046
5047// Header returns an http.Header that can be modified by the caller to
5048// add HTTP headers to the request.
5049func (c *EventsListByPlayerCall) Header() http.Header {
5050	if c.header_ == nil {
5051		c.header_ = make(http.Header)
5052	}
5053	return c.header_
5054}
5055
5056func (c *EventsListByPlayerCall) doRequest(alt string) (*http.Response, error) {
5057	reqHeaders := make(http.Header)
5058	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5059	for k, v := range c.header_ {
5060		reqHeaders[k] = v
5061	}
5062	reqHeaders.Set("User-Agent", c.s.userAgent())
5063	if c.ifNoneMatch_ != "" {
5064		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5065	}
5066	var body io.Reader = nil
5067	c.urlParams_.Set("alt", alt)
5068	c.urlParams_.Set("prettyPrint", "false")
5069	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/events")
5070	urls += "?" + c.urlParams_.Encode()
5071	req, err := http.NewRequest("GET", urls, body)
5072	if err != nil {
5073		return nil, err
5074	}
5075	req.Header = reqHeaders
5076	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5077}
5078
5079// Do executes the "games.events.listByPlayer" call.
5080// Exactly one of *PlayerEventListResponse or error will be non-nil. Any
5081// non-2xx status code is an error. Response headers are in either
5082// *PlayerEventListResponse.ServerResponse.Header or (if a response was
5083// returned at all) in error.(*googleapi.Error).Header. Use
5084// googleapi.IsNotModified to check whether the returned error was
5085// because http.StatusNotModified was returned.
5086func (c *EventsListByPlayerCall) Do(opts ...googleapi.CallOption) (*PlayerEventListResponse, error) {
5087	gensupport.SetOptions(c.urlParams_, opts...)
5088	res, err := c.doRequest("json")
5089	if res != nil && res.StatusCode == http.StatusNotModified {
5090		if res.Body != nil {
5091			res.Body.Close()
5092		}
5093		return nil, &googleapi.Error{
5094			Code:   res.StatusCode,
5095			Header: res.Header,
5096		}
5097	}
5098	if err != nil {
5099		return nil, err
5100	}
5101	defer googleapi.CloseBody(res)
5102	if err := googleapi.CheckResponse(res); err != nil {
5103		return nil, err
5104	}
5105	ret := &PlayerEventListResponse{
5106		ServerResponse: googleapi.ServerResponse{
5107			Header:         res.Header,
5108			HTTPStatusCode: res.StatusCode,
5109		},
5110	}
5111	target := &ret
5112	if err := gensupport.DecodeResponse(target, res); err != nil {
5113		return nil, err
5114	}
5115	return ret, nil
5116	// {
5117	//   "description": "Returns a list showing the current progress on events in this application for the currently authenticated user.",
5118	//   "flatPath": "games/v1/events",
5119	//   "httpMethod": "GET",
5120	//   "id": "games.events.listByPlayer",
5121	//   "parameterOrder": [],
5122	//   "parameters": {
5123	//     "language": {
5124	//       "description": "The preferred language to use for strings returned by this method.",
5125	//       "location": "query",
5126	//       "type": "string"
5127	//     },
5128	//     "maxResults": {
5129	//       "description": "The maximum number of events to return in the response, used for paging. For any response, the actual number of events to return may be less than the specified maxResults.",
5130	//       "format": "int32",
5131	//       "location": "query",
5132	//       "type": "integer"
5133	//     },
5134	//     "pageToken": {
5135	//       "description": "The token returned by the previous request.",
5136	//       "location": "query",
5137	//       "type": "string"
5138	//     }
5139	//   },
5140	//   "path": "games/v1/events",
5141	//   "response": {
5142	//     "$ref": "PlayerEventListResponse"
5143	//   },
5144	//   "scopes": [
5145	//     "https://www.googleapis.com/auth/games"
5146	//   ]
5147	// }
5148
5149}
5150
5151// Pages invokes f for each page of results.
5152// A non-nil error returned from f will halt the iteration.
5153// The provided context supersedes any context provided to the Context method.
5154func (c *EventsListByPlayerCall) Pages(ctx context.Context, f func(*PlayerEventListResponse) error) error {
5155	c.ctx_ = ctx
5156	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5157	for {
5158		x, err := c.Do()
5159		if err != nil {
5160			return err
5161		}
5162		if err := f(x); err != nil {
5163			return err
5164		}
5165		if x.NextPageToken == "" {
5166			return nil
5167		}
5168		c.PageToken(x.NextPageToken)
5169	}
5170}
5171
5172// method id "games.events.listDefinitions":
5173
5174type EventsListDefinitionsCall struct {
5175	s            *Service
5176	urlParams_   gensupport.URLParams
5177	ifNoneMatch_ string
5178	ctx_         context.Context
5179	header_      http.Header
5180}
5181
5182// ListDefinitions: Returns a list of the event definitions in this
5183// application.
5184func (r *EventsService) ListDefinitions() *EventsListDefinitionsCall {
5185	c := &EventsListDefinitionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5186	return c
5187}
5188
5189// Language sets the optional parameter "language": The preferred
5190// language to use for strings returned by this method.
5191func (c *EventsListDefinitionsCall) Language(language string) *EventsListDefinitionsCall {
5192	c.urlParams_.Set("language", language)
5193	return c
5194}
5195
5196// MaxResults sets the optional parameter "maxResults": The maximum
5197// number of event definitions to return in the response, used for
5198// paging. For any response, the actual number of event definitions to
5199// return may be less than the specified `maxResults`.
5200func (c *EventsListDefinitionsCall) MaxResults(maxResults int64) *EventsListDefinitionsCall {
5201	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5202	return c
5203}
5204
5205// PageToken sets the optional parameter "pageToken": The token returned
5206// by the previous request.
5207func (c *EventsListDefinitionsCall) PageToken(pageToken string) *EventsListDefinitionsCall {
5208	c.urlParams_.Set("pageToken", pageToken)
5209	return c
5210}
5211
5212// Fields allows partial responses to be retrieved. See
5213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5214// for more information.
5215func (c *EventsListDefinitionsCall) Fields(s ...googleapi.Field) *EventsListDefinitionsCall {
5216	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5217	return c
5218}
5219
5220// IfNoneMatch sets the optional parameter which makes the operation
5221// fail if the object's ETag matches the given value. This is useful for
5222// getting updates only after the object has changed since the last
5223// request. Use googleapi.IsNotModified to check whether the response
5224// error from Do is the result of In-None-Match.
5225func (c *EventsListDefinitionsCall) IfNoneMatch(entityTag string) *EventsListDefinitionsCall {
5226	c.ifNoneMatch_ = entityTag
5227	return c
5228}
5229
5230// Context sets the context to be used in this call's Do method. Any
5231// pending HTTP request will be aborted if the provided context is
5232// canceled.
5233func (c *EventsListDefinitionsCall) Context(ctx context.Context) *EventsListDefinitionsCall {
5234	c.ctx_ = ctx
5235	return c
5236}
5237
5238// Header returns an http.Header that can be modified by the caller to
5239// add HTTP headers to the request.
5240func (c *EventsListDefinitionsCall) Header() http.Header {
5241	if c.header_ == nil {
5242		c.header_ = make(http.Header)
5243	}
5244	return c.header_
5245}
5246
5247func (c *EventsListDefinitionsCall) doRequest(alt string) (*http.Response, error) {
5248	reqHeaders := make(http.Header)
5249	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5250	for k, v := range c.header_ {
5251		reqHeaders[k] = v
5252	}
5253	reqHeaders.Set("User-Agent", c.s.userAgent())
5254	if c.ifNoneMatch_ != "" {
5255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5256	}
5257	var body io.Reader = nil
5258	c.urlParams_.Set("alt", alt)
5259	c.urlParams_.Set("prettyPrint", "false")
5260	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/eventDefinitions")
5261	urls += "?" + c.urlParams_.Encode()
5262	req, err := http.NewRequest("GET", urls, body)
5263	if err != nil {
5264		return nil, err
5265	}
5266	req.Header = reqHeaders
5267	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5268}
5269
5270// Do executes the "games.events.listDefinitions" call.
5271// Exactly one of *EventDefinitionListResponse or error will be non-nil.
5272// Any non-2xx status code is an error. Response headers are in either
5273// *EventDefinitionListResponse.ServerResponse.Header or (if a response
5274// was returned at all) in error.(*googleapi.Error).Header. Use
5275// googleapi.IsNotModified to check whether the returned error was
5276// because http.StatusNotModified was returned.
5277func (c *EventsListDefinitionsCall) Do(opts ...googleapi.CallOption) (*EventDefinitionListResponse, error) {
5278	gensupport.SetOptions(c.urlParams_, opts...)
5279	res, err := c.doRequest("json")
5280	if res != nil && res.StatusCode == http.StatusNotModified {
5281		if res.Body != nil {
5282			res.Body.Close()
5283		}
5284		return nil, &googleapi.Error{
5285			Code:   res.StatusCode,
5286			Header: res.Header,
5287		}
5288	}
5289	if err != nil {
5290		return nil, err
5291	}
5292	defer googleapi.CloseBody(res)
5293	if err := googleapi.CheckResponse(res); err != nil {
5294		return nil, err
5295	}
5296	ret := &EventDefinitionListResponse{
5297		ServerResponse: googleapi.ServerResponse{
5298			Header:         res.Header,
5299			HTTPStatusCode: res.StatusCode,
5300		},
5301	}
5302	target := &ret
5303	if err := gensupport.DecodeResponse(target, res); err != nil {
5304		return nil, err
5305	}
5306	return ret, nil
5307	// {
5308	//   "description": "Returns a list of the event definitions in this application.",
5309	//   "flatPath": "games/v1/eventDefinitions",
5310	//   "httpMethod": "GET",
5311	//   "id": "games.events.listDefinitions",
5312	//   "parameterOrder": [],
5313	//   "parameters": {
5314	//     "language": {
5315	//       "description": "The preferred language to use for strings returned by this method.",
5316	//       "location": "query",
5317	//       "type": "string"
5318	//     },
5319	//     "maxResults": {
5320	//       "description": "The maximum number of event definitions to return in the response, used for paging. For any response, the actual number of event definitions to return may be less than the specified `maxResults`.",
5321	//       "format": "int32",
5322	//       "location": "query",
5323	//       "type": "integer"
5324	//     },
5325	//     "pageToken": {
5326	//       "description": "The token returned by the previous request.",
5327	//       "location": "query",
5328	//       "type": "string"
5329	//     }
5330	//   },
5331	//   "path": "games/v1/eventDefinitions",
5332	//   "response": {
5333	//     "$ref": "EventDefinitionListResponse"
5334	//   },
5335	//   "scopes": [
5336	//     "https://www.googleapis.com/auth/games"
5337	//   ]
5338	// }
5339
5340}
5341
5342// Pages invokes f for each page of results.
5343// A non-nil error returned from f will halt the iteration.
5344// The provided context supersedes any context provided to the Context method.
5345func (c *EventsListDefinitionsCall) Pages(ctx context.Context, f func(*EventDefinitionListResponse) error) error {
5346	c.ctx_ = ctx
5347	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5348	for {
5349		x, err := c.Do()
5350		if err != nil {
5351			return err
5352		}
5353		if err := f(x); err != nil {
5354			return err
5355		}
5356		if x.NextPageToken == "" {
5357			return nil
5358		}
5359		c.PageToken(x.NextPageToken)
5360	}
5361}
5362
5363// method id "games.events.record":
5364
5365type EventsRecordCall struct {
5366	s                  *Service
5367	eventrecordrequest *EventRecordRequest
5368	urlParams_         gensupport.URLParams
5369	ctx_               context.Context
5370	header_            http.Header
5371}
5372
5373// Record: Records a batch of changes to the number of times events have
5374// occurred for the currently authenticated user of this application.
5375func (r *EventsService) Record(eventrecordrequest *EventRecordRequest) *EventsRecordCall {
5376	c := &EventsRecordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5377	c.eventrecordrequest = eventrecordrequest
5378	return c
5379}
5380
5381// Language sets the optional parameter "language": The preferred
5382// language to use for strings returned by this method.
5383func (c *EventsRecordCall) Language(language string) *EventsRecordCall {
5384	c.urlParams_.Set("language", language)
5385	return c
5386}
5387
5388// Fields allows partial responses to be retrieved. See
5389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5390// for more information.
5391func (c *EventsRecordCall) Fields(s ...googleapi.Field) *EventsRecordCall {
5392	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5393	return c
5394}
5395
5396// Context sets the context to be used in this call's Do method. Any
5397// pending HTTP request will be aborted if the provided context is
5398// canceled.
5399func (c *EventsRecordCall) Context(ctx context.Context) *EventsRecordCall {
5400	c.ctx_ = ctx
5401	return c
5402}
5403
5404// Header returns an http.Header that can be modified by the caller to
5405// add HTTP headers to the request.
5406func (c *EventsRecordCall) Header() http.Header {
5407	if c.header_ == nil {
5408		c.header_ = make(http.Header)
5409	}
5410	return c.header_
5411}
5412
5413func (c *EventsRecordCall) doRequest(alt string) (*http.Response, error) {
5414	reqHeaders := make(http.Header)
5415	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5416	for k, v := range c.header_ {
5417		reqHeaders[k] = v
5418	}
5419	reqHeaders.Set("User-Agent", c.s.userAgent())
5420	var body io.Reader = nil
5421	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventrecordrequest)
5422	if err != nil {
5423		return nil, err
5424	}
5425	reqHeaders.Set("Content-Type", "application/json")
5426	c.urlParams_.Set("alt", alt)
5427	c.urlParams_.Set("prettyPrint", "false")
5428	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/events")
5429	urls += "?" + c.urlParams_.Encode()
5430	req, err := http.NewRequest("POST", urls, body)
5431	if err != nil {
5432		return nil, err
5433	}
5434	req.Header = reqHeaders
5435	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5436}
5437
5438// Do executes the "games.events.record" call.
5439// Exactly one of *EventUpdateResponse or error will be non-nil. Any
5440// non-2xx status code is an error. Response headers are in either
5441// *EventUpdateResponse.ServerResponse.Header or (if a response was
5442// returned at all) in error.(*googleapi.Error).Header. Use
5443// googleapi.IsNotModified to check whether the returned error was
5444// because http.StatusNotModified was returned.
5445func (c *EventsRecordCall) Do(opts ...googleapi.CallOption) (*EventUpdateResponse, error) {
5446	gensupport.SetOptions(c.urlParams_, opts...)
5447	res, err := c.doRequest("json")
5448	if res != nil && res.StatusCode == http.StatusNotModified {
5449		if res.Body != nil {
5450			res.Body.Close()
5451		}
5452		return nil, &googleapi.Error{
5453			Code:   res.StatusCode,
5454			Header: res.Header,
5455		}
5456	}
5457	if err != nil {
5458		return nil, err
5459	}
5460	defer googleapi.CloseBody(res)
5461	if err := googleapi.CheckResponse(res); err != nil {
5462		return nil, err
5463	}
5464	ret := &EventUpdateResponse{
5465		ServerResponse: googleapi.ServerResponse{
5466			Header:         res.Header,
5467			HTTPStatusCode: res.StatusCode,
5468		},
5469	}
5470	target := &ret
5471	if err := gensupport.DecodeResponse(target, res); err != nil {
5472		return nil, err
5473	}
5474	return ret, nil
5475	// {
5476	//   "description": "Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.",
5477	//   "flatPath": "games/v1/events",
5478	//   "httpMethod": "POST",
5479	//   "id": "games.events.record",
5480	//   "parameterOrder": [],
5481	//   "parameters": {
5482	//     "language": {
5483	//       "description": "The preferred language to use for strings returned by this method.",
5484	//       "location": "query",
5485	//       "type": "string"
5486	//     }
5487	//   },
5488	//   "path": "games/v1/events",
5489	//   "request": {
5490	//     "$ref": "EventRecordRequest"
5491	//   },
5492	//   "response": {
5493	//     "$ref": "EventUpdateResponse"
5494	//   },
5495	//   "scopes": [
5496	//     "https://www.googleapis.com/auth/games"
5497	//   ]
5498	// }
5499
5500}
5501
5502// method id "games.leaderboards.get":
5503
5504type LeaderboardsGetCall struct {
5505	s             *Service
5506	leaderboardId string
5507	urlParams_    gensupport.URLParams
5508	ifNoneMatch_  string
5509	ctx_          context.Context
5510	header_       http.Header
5511}
5512
5513// Get: Retrieves the metadata of the leaderboard with the given ID.
5514func (r *LeaderboardsService) Get(leaderboardId string) *LeaderboardsGetCall {
5515	c := &LeaderboardsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5516	c.leaderboardId = leaderboardId
5517	return c
5518}
5519
5520// Language sets the optional parameter "language": The preferred
5521// language to use for strings returned by this method.
5522func (c *LeaderboardsGetCall) Language(language string) *LeaderboardsGetCall {
5523	c.urlParams_.Set("language", language)
5524	return c
5525}
5526
5527// Fields allows partial responses to be retrieved. See
5528// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5529// for more information.
5530func (c *LeaderboardsGetCall) Fields(s ...googleapi.Field) *LeaderboardsGetCall {
5531	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5532	return c
5533}
5534
5535// IfNoneMatch sets the optional parameter which makes the operation
5536// fail if the object's ETag matches the given value. This is useful for
5537// getting updates only after the object has changed since the last
5538// request. Use googleapi.IsNotModified to check whether the response
5539// error from Do is the result of In-None-Match.
5540func (c *LeaderboardsGetCall) IfNoneMatch(entityTag string) *LeaderboardsGetCall {
5541	c.ifNoneMatch_ = entityTag
5542	return c
5543}
5544
5545// Context sets the context to be used in this call's Do method. Any
5546// pending HTTP request will be aborted if the provided context is
5547// canceled.
5548func (c *LeaderboardsGetCall) Context(ctx context.Context) *LeaderboardsGetCall {
5549	c.ctx_ = ctx
5550	return c
5551}
5552
5553// Header returns an http.Header that can be modified by the caller to
5554// add HTTP headers to the request.
5555func (c *LeaderboardsGetCall) Header() http.Header {
5556	if c.header_ == nil {
5557		c.header_ = make(http.Header)
5558	}
5559	return c.header_
5560}
5561
5562func (c *LeaderboardsGetCall) doRequest(alt string) (*http.Response, error) {
5563	reqHeaders := make(http.Header)
5564	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5565	for k, v := range c.header_ {
5566		reqHeaders[k] = v
5567	}
5568	reqHeaders.Set("User-Agent", c.s.userAgent())
5569	if c.ifNoneMatch_ != "" {
5570		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5571	}
5572	var body io.Reader = nil
5573	c.urlParams_.Set("alt", alt)
5574	c.urlParams_.Set("prettyPrint", "false")
5575	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}")
5576	urls += "?" + c.urlParams_.Encode()
5577	req, err := http.NewRequest("GET", urls, body)
5578	if err != nil {
5579		return nil, err
5580	}
5581	req.Header = reqHeaders
5582	googleapi.Expand(req.URL, map[string]string{
5583		"leaderboardId": c.leaderboardId,
5584	})
5585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5586}
5587
5588// Do executes the "games.leaderboards.get" call.
5589// Exactly one of *Leaderboard or error will be non-nil. Any non-2xx
5590// status code is an error. Response headers are in either
5591// *Leaderboard.ServerResponse.Header or (if a response was returned at
5592// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5593// to check whether the returned error was because
5594// http.StatusNotModified was returned.
5595func (c *LeaderboardsGetCall) Do(opts ...googleapi.CallOption) (*Leaderboard, error) {
5596	gensupport.SetOptions(c.urlParams_, opts...)
5597	res, err := c.doRequest("json")
5598	if res != nil && res.StatusCode == http.StatusNotModified {
5599		if res.Body != nil {
5600			res.Body.Close()
5601		}
5602		return nil, &googleapi.Error{
5603			Code:   res.StatusCode,
5604			Header: res.Header,
5605		}
5606	}
5607	if err != nil {
5608		return nil, err
5609	}
5610	defer googleapi.CloseBody(res)
5611	if err := googleapi.CheckResponse(res); err != nil {
5612		return nil, err
5613	}
5614	ret := &Leaderboard{
5615		ServerResponse: googleapi.ServerResponse{
5616			Header:         res.Header,
5617			HTTPStatusCode: res.StatusCode,
5618		},
5619	}
5620	target := &ret
5621	if err := gensupport.DecodeResponse(target, res); err != nil {
5622		return nil, err
5623	}
5624	return ret, nil
5625	// {
5626	//   "description": "Retrieves the metadata of the leaderboard with the given ID.",
5627	//   "flatPath": "games/v1/leaderboards/{leaderboardId}",
5628	//   "httpMethod": "GET",
5629	//   "id": "games.leaderboards.get",
5630	//   "parameterOrder": [
5631	//     "leaderboardId"
5632	//   ],
5633	//   "parameters": {
5634	//     "language": {
5635	//       "description": "The preferred language to use for strings returned by this method.",
5636	//       "location": "query",
5637	//       "type": "string"
5638	//     },
5639	//     "leaderboardId": {
5640	//       "description": "The ID of the leaderboard.",
5641	//       "location": "path",
5642	//       "required": true,
5643	//       "type": "string"
5644	//     }
5645	//   },
5646	//   "path": "games/v1/leaderboards/{leaderboardId}",
5647	//   "response": {
5648	//     "$ref": "Leaderboard"
5649	//   },
5650	//   "scopes": [
5651	//     "https://www.googleapis.com/auth/games"
5652	//   ]
5653	// }
5654
5655}
5656
5657// method id "games.leaderboards.list":
5658
5659type LeaderboardsListCall struct {
5660	s            *Service
5661	urlParams_   gensupport.URLParams
5662	ifNoneMatch_ string
5663	ctx_         context.Context
5664	header_      http.Header
5665}
5666
5667// List: Lists all the leaderboard metadata for your application.
5668func (r *LeaderboardsService) List() *LeaderboardsListCall {
5669	c := &LeaderboardsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5670	return c
5671}
5672
5673// Language sets the optional parameter "language": The preferred
5674// language to use for strings returned by this method.
5675func (c *LeaderboardsListCall) Language(language string) *LeaderboardsListCall {
5676	c.urlParams_.Set("language", language)
5677	return c
5678}
5679
5680// MaxResults sets the optional parameter "maxResults": The maximum
5681// number of leaderboards to return in the response. For any response,
5682// the actual number of leaderboards returned may be less than the
5683// specified `maxResults`.
5684func (c *LeaderboardsListCall) MaxResults(maxResults int64) *LeaderboardsListCall {
5685	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5686	return c
5687}
5688
5689// PageToken sets the optional parameter "pageToken": The token returned
5690// by the previous request.
5691func (c *LeaderboardsListCall) PageToken(pageToken string) *LeaderboardsListCall {
5692	c.urlParams_.Set("pageToken", pageToken)
5693	return c
5694}
5695
5696// Fields allows partial responses to be retrieved. See
5697// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5698// for more information.
5699func (c *LeaderboardsListCall) Fields(s ...googleapi.Field) *LeaderboardsListCall {
5700	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5701	return c
5702}
5703
5704// IfNoneMatch sets the optional parameter which makes the operation
5705// fail if the object's ETag matches the given value. This is useful for
5706// getting updates only after the object has changed since the last
5707// request. Use googleapi.IsNotModified to check whether the response
5708// error from Do is the result of In-None-Match.
5709func (c *LeaderboardsListCall) IfNoneMatch(entityTag string) *LeaderboardsListCall {
5710	c.ifNoneMatch_ = entityTag
5711	return c
5712}
5713
5714// Context sets the context to be used in this call's Do method. Any
5715// pending HTTP request will be aborted if the provided context is
5716// canceled.
5717func (c *LeaderboardsListCall) Context(ctx context.Context) *LeaderboardsListCall {
5718	c.ctx_ = ctx
5719	return c
5720}
5721
5722// Header returns an http.Header that can be modified by the caller to
5723// add HTTP headers to the request.
5724func (c *LeaderboardsListCall) Header() http.Header {
5725	if c.header_ == nil {
5726		c.header_ = make(http.Header)
5727	}
5728	return c.header_
5729}
5730
5731func (c *LeaderboardsListCall) doRequest(alt string) (*http.Response, error) {
5732	reqHeaders := make(http.Header)
5733	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5734	for k, v := range c.header_ {
5735		reqHeaders[k] = v
5736	}
5737	reqHeaders.Set("User-Agent", c.s.userAgent())
5738	if c.ifNoneMatch_ != "" {
5739		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5740	}
5741	var body io.Reader = nil
5742	c.urlParams_.Set("alt", alt)
5743	c.urlParams_.Set("prettyPrint", "false")
5744	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards")
5745	urls += "?" + c.urlParams_.Encode()
5746	req, err := http.NewRequest("GET", urls, body)
5747	if err != nil {
5748		return nil, err
5749	}
5750	req.Header = reqHeaders
5751	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5752}
5753
5754// Do executes the "games.leaderboards.list" call.
5755// Exactly one of *LeaderboardListResponse or error will be non-nil. Any
5756// non-2xx status code is an error. Response headers are in either
5757// *LeaderboardListResponse.ServerResponse.Header or (if a response was
5758// returned at all) in error.(*googleapi.Error).Header. Use
5759// googleapi.IsNotModified to check whether the returned error was
5760// because http.StatusNotModified was returned.
5761func (c *LeaderboardsListCall) Do(opts ...googleapi.CallOption) (*LeaderboardListResponse, error) {
5762	gensupport.SetOptions(c.urlParams_, opts...)
5763	res, err := c.doRequest("json")
5764	if res != nil && res.StatusCode == http.StatusNotModified {
5765		if res.Body != nil {
5766			res.Body.Close()
5767		}
5768		return nil, &googleapi.Error{
5769			Code:   res.StatusCode,
5770			Header: res.Header,
5771		}
5772	}
5773	if err != nil {
5774		return nil, err
5775	}
5776	defer googleapi.CloseBody(res)
5777	if err := googleapi.CheckResponse(res); err != nil {
5778		return nil, err
5779	}
5780	ret := &LeaderboardListResponse{
5781		ServerResponse: googleapi.ServerResponse{
5782			Header:         res.Header,
5783			HTTPStatusCode: res.StatusCode,
5784		},
5785	}
5786	target := &ret
5787	if err := gensupport.DecodeResponse(target, res); err != nil {
5788		return nil, err
5789	}
5790	return ret, nil
5791	// {
5792	//   "description": "Lists all the leaderboard metadata for your application.",
5793	//   "flatPath": "games/v1/leaderboards",
5794	//   "httpMethod": "GET",
5795	//   "id": "games.leaderboards.list",
5796	//   "parameterOrder": [],
5797	//   "parameters": {
5798	//     "language": {
5799	//       "description": "The preferred language to use for strings returned by this method.",
5800	//       "location": "query",
5801	//       "type": "string"
5802	//     },
5803	//     "maxResults": {
5804	//       "description": "The maximum number of leaderboards to return in the response. For any response, the actual number of leaderboards returned may be less than the specified `maxResults`.",
5805	//       "format": "int32",
5806	//       "location": "query",
5807	//       "type": "integer"
5808	//     },
5809	//     "pageToken": {
5810	//       "description": "The token returned by the previous request.",
5811	//       "location": "query",
5812	//       "type": "string"
5813	//     }
5814	//   },
5815	//   "path": "games/v1/leaderboards",
5816	//   "response": {
5817	//     "$ref": "LeaderboardListResponse"
5818	//   },
5819	//   "scopes": [
5820	//     "https://www.googleapis.com/auth/games"
5821	//   ]
5822	// }
5823
5824}
5825
5826// Pages invokes f for each page of results.
5827// A non-nil error returned from f will halt the iteration.
5828// The provided context supersedes any context provided to the Context method.
5829func (c *LeaderboardsListCall) Pages(ctx context.Context, f func(*LeaderboardListResponse) error) error {
5830	c.ctx_ = ctx
5831	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5832	for {
5833		x, err := c.Do()
5834		if err != nil {
5835			return err
5836		}
5837		if err := f(x); err != nil {
5838			return err
5839		}
5840		if x.NextPageToken == "" {
5841			return nil
5842		}
5843		c.PageToken(x.NextPageToken)
5844	}
5845}
5846
5847// method id "games.metagame.getMetagameConfig":
5848
5849type MetagameGetMetagameConfigCall struct {
5850	s            *Service
5851	urlParams_   gensupport.URLParams
5852	ifNoneMatch_ string
5853	ctx_         context.Context
5854	header_      http.Header
5855}
5856
5857// GetMetagameConfig: Return the metagame configuration data for the
5858// calling application.
5859func (r *MetagameService) GetMetagameConfig() *MetagameGetMetagameConfigCall {
5860	c := &MetagameGetMetagameConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5861	return c
5862}
5863
5864// Fields allows partial responses to be retrieved. See
5865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5866// for more information.
5867func (c *MetagameGetMetagameConfigCall) Fields(s ...googleapi.Field) *MetagameGetMetagameConfigCall {
5868	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5869	return c
5870}
5871
5872// IfNoneMatch sets the optional parameter which makes the operation
5873// fail if the object's ETag matches the given value. This is useful for
5874// getting updates only after the object has changed since the last
5875// request. Use googleapi.IsNotModified to check whether the response
5876// error from Do is the result of In-None-Match.
5877func (c *MetagameGetMetagameConfigCall) IfNoneMatch(entityTag string) *MetagameGetMetagameConfigCall {
5878	c.ifNoneMatch_ = entityTag
5879	return c
5880}
5881
5882// Context sets the context to be used in this call's Do method. Any
5883// pending HTTP request will be aborted if the provided context is
5884// canceled.
5885func (c *MetagameGetMetagameConfigCall) Context(ctx context.Context) *MetagameGetMetagameConfigCall {
5886	c.ctx_ = ctx
5887	return c
5888}
5889
5890// Header returns an http.Header that can be modified by the caller to
5891// add HTTP headers to the request.
5892func (c *MetagameGetMetagameConfigCall) Header() http.Header {
5893	if c.header_ == nil {
5894		c.header_ = make(http.Header)
5895	}
5896	return c.header_
5897}
5898
5899func (c *MetagameGetMetagameConfigCall) doRequest(alt string) (*http.Response, error) {
5900	reqHeaders := make(http.Header)
5901	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5902	for k, v := range c.header_ {
5903		reqHeaders[k] = v
5904	}
5905	reqHeaders.Set("User-Agent", c.s.userAgent())
5906	if c.ifNoneMatch_ != "" {
5907		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5908	}
5909	var body io.Reader = nil
5910	c.urlParams_.Set("alt", alt)
5911	c.urlParams_.Set("prettyPrint", "false")
5912	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/metagameConfig")
5913	urls += "?" + c.urlParams_.Encode()
5914	req, err := http.NewRequest("GET", urls, body)
5915	if err != nil {
5916		return nil, err
5917	}
5918	req.Header = reqHeaders
5919	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5920}
5921
5922// Do executes the "games.metagame.getMetagameConfig" call.
5923// Exactly one of *MetagameConfig or error will be non-nil. Any non-2xx
5924// status code is an error. Response headers are in either
5925// *MetagameConfig.ServerResponse.Header or (if a response was returned
5926// at all) in error.(*googleapi.Error).Header. Use
5927// googleapi.IsNotModified to check whether the returned error was
5928// because http.StatusNotModified was returned.
5929func (c *MetagameGetMetagameConfigCall) Do(opts ...googleapi.CallOption) (*MetagameConfig, error) {
5930	gensupport.SetOptions(c.urlParams_, opts...)
5931	res, err := c.doRequest("json")
5932	if res != nil && res.StatusCode == http.StatusNotModified {
5933		if res.Body != nil {
5934			res.Body.Close()
5935		}
5936		return nil, &googleapi.Error{
5937			Code:   res.StatusCode,
5938			Header: res.Header,
5939		}
5940	}
5941	if err != nil {
5942		return nil, err
5943	}
5944	defer googleapi.CloseBody(res)
5945	if err := googleapi.CheckResponse(res); err != nil {
5946		return nil, err
5947	}
5948	ret := &MetagameConfig{
5949		ServerResponse: googleapi.ServerResponse{
5950			Header:         res.Header,
5951			HTTPStatusCode: res.StatusCode,
5952		},
5953	}
5954	target := &ret
5955	if err := gensupport.DecodeResponse(target, res); err != nil {
5956		return nil, err
5957	}
5958	return ret, nil
5959	// {
5960	//   "description": "Return the metagame configuration data for the calling application.",
5961	//   "flatPath": "games/v1/metagameConfig",
5962	//   "httpMethod": "GET",
5963	//   "id": "games.metagame.getMetagameConfig",
5964	//   "parameterOrder": [],
5965	//   "parameters": {},
5966	//   "path": "games/v1/metagameConfig",
5967	//   "response": {
5968	//     "$ref": "MetagameConfig"
5969	//   },
5970	//   "scopes": [
5971	//     "https://www.googleapis.com/auth/games"
5972	//   ]
5973	// }
5974
5975}
5976
5977// method id "games.metagame.listCategoriesByPlayer":
5978
5979type MetagameListCategoriesByPlayerCall struct {
5980	s            *Service
5981	playerId     string
5982	collection   string
5983	urlParams_   gensupport.URLParams
5984	ifNoneMatch_ string
5985	ctx_         context.Context
5986	header_      http.Header
5987}
5988
5989// ListCategoriesByPlayer: List play data aggregated per category for
5990// the player corresponding to `playerId`.
5991func (r *MetagameService) ListCategoriesByPlayer(playerId string, collection string) *MetagameListCategoriesByPlayerCall {
5992	c := &MetagameListCategoriesByPlayerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5993	c.playerId = playerId
5994	c.collection = collection
5995	return c
5996}
5997
5998// Language sets the optional parameter "language": The preferred
5999// language to use for strings returned by this method.
6000func (c *MetagameListCategoriesByPlayerCall) Language(language string) *MetagameListCategoriesByPlayerCall {
6001	c.urlParams_.Set("language", language)
6002	return c
6003}
6004
6005// MaxResults sets the optional parameter "maxResults": The maximum
6006// number of category resources to return in the response, used for
6007// paging. For any response, the actual number of category resources
6008// returned may be less than the specified `maxResults`.
6009func (c *MetagameListCategoriesByPlayerCall) MaxResults(maxResults int64) *MetagameListCategoriesByPlayerCall {
6010	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6011	return c
6012}
6013
6014// PageToken sets the optional parameter "pageToken": The token returned
6015// by the previous request.
6016func (c *MetagameListCategoriesByPlayerCall) PageToken(pageToken string) *MetagameListCategoriesByPlayerCall {
6017	c.urlParams_.Set("pageToken", pageToken)
6018	return c
6019}
6020
6021// Fields allows partial responses to be retrieved. See
6022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6023// for more information.
6024func (c *MetagameListCategoriesByPlayerCall) Fields(s ...googleapi.Field) *MetagameListCategoriesByPlayerCall {
6025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6026	return c
6027}
6028
6029// IfNoneMatch sets the optional parameter which makes the operation
6030// fail if the object's ETag matches the given value. This is useful for
6031// getting updates only after the object has changed since the last
6032// request. Use googleapi.IsNotModified to check whether the response
6033// error from Do is the result of In-None-Match.
6034func (c *MetagameListCategoriesByPlayerCall) IfNoneMatch(entityTag string) *MetagameListCategoriesByPlayerCall {
6035	c.ifNoneMatch_ = entityTag
6036	return c
6037}
6038
6039// Context sets the context to be used in this call's Do method. Any
6040// pending HTTP request will be aborted if the provided context is
6041// canceled.
6042func (c *MetagameListCategoriesByPlayerCall) Context(ctx context.Context) *MetagameListCategoriesByPlayerCall {
6043	c.ctx_ = ctx
6044	return c
6045}
6046
6047// Header returns an http.Header that can be modified by the caller to
6048// add HTTP headers to the request.
6049func (c *MetagameListCategoriesByPlayerCall) Header() http.Header {
6050	if c.header_ == nil {
6051		c.header_ = make(http.Header)
6052	}
6053	return c.header_
6054}
6055
6056func (c *MetagameListCategoriesByPlayerCall) doRequest(alt string) (*http.Response, error) {
6057	reqHeaders := make(http.Header)
6058	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6059	for k, v := range c.header_ {
6060		reqHeaders[k] = v
6061	}
6062	reqHeaders.Set("User-Agent", c.s.userAgent())
6063	if c.ifNoneMatch_ != "" {
6064		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6065	}
6066	var body io.Reader = nil
6067	c.urlParams_.Set("alt", alt)
6068	c.urlParams_.Set("prettyPrint", "false")
6069	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/categories/{collection}")
6070	urls += "?" + c.urlParams_.Encode()
6071	req, err := http.NewRequest("GET", urls, body)
6072	if err != nil {
6073		return nil, err
6074	}
6075	req.Header = reqHeaders
6076	googleapi.Expand(req.URL, map[string]string{
6077		"playerId":   c.playerId,
6078		"collection": c.collection,
6079	})
6080	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6081}
6082
6083// Do executes the "games.metagame.listCategoriesByPlayer" call.
6084// Exactly one of *CategoryListResponse or error will be non-nil. Any
6085// non-2xx status code is an error. Response headers are in either
6086// *CategoryListResponse.ServerResponse.Header or (if a response was
6087// returned at all) in error.(*googleapi.Error).Header. Use
6088// googleapi.IsNotModified to check whether the returned error was
6089// because http.StatusNotModified was returned.
6090func (c *MetagameListCategoriesByPlayerCall) Do(opts ...googleapi.CallOption) (*CategoryListResponse, error) {
6091	gensupport.SetOptions(c.urlParams_, opts...)
6092	res, err := c.doRequest("json")
6093	if res != nil && res.StatusCode == http.StatusNotModified {
6094		if res.Body != nil {
6095			res.Body.Close()
6096		}
6097		return nil, &googleapi.Error{
6098			Code:   res.StatusCode,
6099			Header: res.Header,
6100		}
6101	}
6102	if err != nil {
6103		return nil, err
6104	}
6105	defer googleapi.CloseBody(res)
6106	if err := googleapi.CheckResponse(res); err != nil {
6107		return nil, err
6108	}
6109	ret := &CategoryListResponse{
6110		ServerResponse: googleapi.ServerResponse{
6111			Header:         res.Header,
6112			HTTPStatusCode: res.StatusCode,
6113		},
6114	}
6115	target := &ret
6116	if err := gensupport.DecodeResponse(target, res); err != nil {
6117		return nil, err
6118	}
6119	return ret, nil
6120	// {
6121	//   "description": "List play data aggregated per category for the player corresponding to `playerId`.",
6122	//   "flatPath": "games/v1/players/{playerId}/categories/{collection}",
6123	//   "httpMethod": "GET",
6124	//   "id": "games.metagame.listCategoriesByPlayer",
6125	//   "parameterOrder": [
6126	//     "playerId",
6127	//     "collection"
6128	//   ],
6129	//   "parameters": {
6130	//     "collection": {
6131	//       "description": "The collection of categories for which data will be returned.",
6132	//       "enum": [
6133	//         "COLLECTION_UNSPECIFIED",
6134	//         "ALL"
6135	//       ],
6136	//       "enumDescriptions": [
6137	//         "Default value. This value is unused.",
6138	//         "Retrieve data for all categories. This is the default."
6139	//       ],
6140	//       "location": "path",
6141	//       "required": true,
6142	//       "type": "string"
6143	//     },
6144	//     "language": {
6145	//       "description": "The preferred language to use for strings returned by this method.",
6146	//       "location": "query",
6147	//       "type": "string"
6148	//     },
6149	//     "maxResults": {
6150	//       "description": "The maximum number of category resources to return in the response, used for paging. For any response, the actual number of category resources returned may be less than the specified `maxResults`.",
6151	//       "format": "int32",
6152	//       "location": "query",
6153	//       "type": "integer"
6154	//     },
6155	//     "pageToken": {
6156	//       "description": "The token returned by the previous request.",
6157	//       "location": "query",
6158	//       "type": "string"
6159	//     },
6160	//     "playerId": {
6161	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
6162	//       "location": "path",
6163	//       "required": true,
6164	//       "type": "string"
6165	//     }
6166	//   },
6167	//   "path": "games/v1/players/{playerId}/categories/{collection}",
6168	//   "response": {
6169	//     "$ref": "CategoryListResponse"
6170	//   },
6171	//   "scopes": [
6172	//     "https://www.googleapis.com/auth/games"
6173	//   ]
6174	// }
6175
6176}
6177
6178// Pages invokes f for each page of results.
6179// A non-nil error returned from f will halt the iteration.
6180// The provided context supersedes any context provided to the Context method.
6181func (c *MetagameListCategoriesByPlayerCall) Pages(ctx context.Context, f func(*CategoryListResponse) error) error {
6182	c.ctx_ = ctx
6183	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6184	for {
6185		x, err := c.Do()
6186		if err != nil {
6187			return err
6188		}
6189		if err := f(x); err != nil {
6190			return err
6191		}
6192		if x.NextPageToken == "" {
6193			return nil
6194		}
6195		c.PageToken(x.NextPageToken)
6196	}
6197}
6198
6199// method id "games.players.get":
6200
6201type PlayersGetCall struct {
6202	s            *Service
6203	playerId     string
6204	urlParams_   gensupport.URLParams
6205	ifNoneMatch_ string
6206	ctx_         context.Context
6207	header_      http.Header
6208}
6209
6210// Get: Retrieves the Player resource with the given ID. To retrieve the
6211// player for the currently authenticated user, set `playerId` to `me`.
6212func (r *PlayersService) Get(playerId string) *PlayersGetCall {
6213	c := &PlayersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6214	c.playerId = playerId
6215	return c
6216}
6217
6218// Language sets the optional parameter "language": The preferred
6219// language to use for strings returned by this method.
6220func (c *PlayersGetCall) Language(language string) *PlayersGetCall {
6221	c.urlParams_.Set("language", language)
6222	return c
6223}
6224
6225// Fields allows partial responses to be retrieved. See
6226// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6227// for more information.
6228func (c *PlayersGetCall) Fields(s ...googleapi.Field) *PlayersGetCall {
6229	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6230	return c
6231}
6232
6233// IfNoneMatch sets the optional parameter which makes the operation
6234// fail if the object's ETag matches the given value. This is useful for
6235// getting updates only after the object has changed since the last
6236// request. Use googleapi.IsNotModified to check whether the response
6237// error from Do is the result of In-None-Match.
6238func (c *PlayersGetCall) IfNoneMatch(entityTag string) *PlayersGetCall {
6239	c.ifNoneMatch_ = entityTag
6240	return c
6241}
6242
6243// Context sets the context to be used in this call's Do method. Any
6244// pending HTTP request will be aborted if the provided context is
6245// canceled.
6246func (c *PlayersGetCall) Context(ctx context.Context) *PlayersGetCall {
6247	c.ctx_ = ctx
6248	return c
6249}
6250
6251// Header returns an http.Header that can be modified by the caller to
6252// add HTTP headers to the request.
6253func (c *PlayersGetCall) Header() http.Header {
6254	if c.header_ == nil {
6255		c.header_ = make(http.Header)
6256	}
6257	return c.header_
6258}
6259
6260func (c *PlayersGetCall) doRequest(alt string) (*http.Response, error) {
6261	reqHeaders := make(http.Header)
6262	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6263	for k, v := range c.header_ {
6264		reqHeaders[k] = v
6265	}
6266	reqHeaders.Set("User-Agent", c.s.userAgent())
6267	if c.ifNoneMatch_ != "" {
6268		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6269	}
6270	var body io.Reader = nil
6271	c.urlParams_.Set("alt", alt)
6272	c.urlParams_.Set("prettyPrint", "false")
6273	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}")
6274	urls += "?" + c.urlParams_.Encode()
6275	req, err := http.NewRequest("GET", urls, body)
6276	if err != nil {
6277		return nil, err
6278	}
6279	req.Header = reqHeaders
6280	googleapi.Expand(req.URL, map[string]string{
6281		"playerId": c.playerId,
6282	})
6283	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6284}
6285
6286// Do executes the "games.players.get" call.
6287// Exactly one of *Player or error will be non-nil. Any non-2xx status
6288// code is an error. Response headers are in either
6289// *Player.ServerResponse.Header or (if a response was returned at all)
6290// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6291// check whether the returned error was because http.StatusNotModified
6292// was returned.
6293func (c *PlayersGetCall) Do(opts ...googleapi.CallOption) (*Player, error) {
6294	gensupport.SetOptions(c.urlParams_, opts...)
6295	res, err := c.doRequest("json")
6296	if res != nil && res.StatusCode == http.StatusNotModified {
6297		if res.Body != nil {
6298			res.Body.Close()
6299		}
6300		return nil, &googleapi.Error{
6301			Code:   res.StatusCode,
6302			Header: res.Header,
6303		}
6304	}
6305	if err != nil {
6306		return nil, err
6307	}
6308	defer googleapi.CloseBody(res)
6309	if err := googleapi.CheckResponse(res); err != nil {
6310		return nil, err
6311	}
6312	ret := &Player{
6313		ServerResponse: googleapi.ServerResponse{
6314			Header:         res.Header,
6315			HTTPStatusCode: res.StatusCode,
6316		},
6317	}
6318	target := &ret
6319	if err := gensupport.DecodeResponse(target, res); err != nil {
6320		return nil, err
6321	}
6322	return ret, nil
6323	// {
6324	//   "description": "Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set `playerId` to `me`.",
6325	//   "flatPath": "games/v1/players/{playerId}",
6326	//   "httpMethod": "GET",
6327	//   "id": "games.players.get",
6328	//   "parameterOrder": [
6329	//     "playerId"
6330	//   ],
6331	//   "parameters": {
6332	//     "language": {
6333	//       "description": "The preferred language to use for strings returned by this method.",
6334	//       "location": "query",
6335	//       "type": "string"
6336	//     },
6337	//     "playerId": {
6338	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
6339	//       "location": "path",
6340	//       "required": true,
6341	//       "type": "string"
6342	//     }
6343	//   },
6344	//   "path": "games/v1/players/{playerId}",
6345	//   "response": {
6346	//     "$ref": "Player"
6347	//   },
6348	//   "scopes": [
6349	//     "https://www.googleapis.com/auth/games"
6350	//   ]
6351	// }
6352
6353}
6354
6355// method id "games.players.list":
6356
6357type PlayersListCall struct {
6358	s            *Service
6359	collection   string
6360	urlParams_   gensupport.URLParams
6361	ifNoneMatch_ string
6362	ctx_         context.Context
6363	header_      http.Header
6364}
6365
6366// List: Get the collection of players for the currently authenticated
6367// user.
6368func (r *PlayersService) List(collection string) *PlayersListCall {
6369	c := &PlayersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6370	c.collection = collection
6371	return c
6372}
6373
6374// Language sets the optional parameter "language": The preferred
6375// language to use for strings returned by this method.
6376func (c *PlayersListCall) Language(language string) *PlayersListCall {
6377	c.urlParams_.Set("language", language)
6378	return c
6379}
6380
6381// MaxResults sets the optional parameter "maxResults": The maximum
6382// number of player resources to return in the response, used for
6383// paging. For any response, the actual number of player resources
6384// returned may be less than the specified `maxResults`.
6385func (c *PlayersListCall) MaxResults(maxResults int64) *PlayersListCall {
6386	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6387	return c
6388}
6389
6390// PageToken sets the optional parameter "pageToken": The token returned
6391// by the previous request.
6392func (c *PlayersListCall) PageToken(pageToken string) *PlayersListCall {
6393	c.urlParams_.Set("pageToken", pageToken)
6394	return c
6395}
6396
6397// Fields allows partial responses to be retrieved. See
6398// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6399// for more information.
6400func (c *PlayersListCall) Fields(s ...googleapi.Field) *PlayersListCall {
6401	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6402	return c
6403}
6404
6405// IfNoneMatch sets the optional parameter which makes the operation
6406// fail if the object's ETag matches the given value. This is useful for
6407// getting updates only after the object has changed since the last
6408// request. Use googleapi.IsNotModified to check whether the response
6409// error from Do is the result of In-None-Match.
6410func (c *PlayersListCall) IfNoneMatch(entityTag string) *PlayersListCall {
6411	c.ifNoneMatch_ = entityTag
6412	return c
6413}
6414
6415// Context sets the context to be used in this call's Do method. Any
6416// pending HTTP request will be aborted if the provided context is
6417// canceled.
6418func (c *PlayersListCall) Context(ctx context.Context) *PlayersListCall {
6419	c.ctx_ = ctx
6420	return c
6421}
6422
6423// Header returns an http.Header that can be modified by the caller to
6424// add HTTP headers to the request.
6425func (c *PlayersListCall) Header() http.Header {
6426	if c.header_ == nil {
6427		c.header_ = make(http.Header)
6428	}
6429	return c.header_
6430}
6431
6432func (c *PlayersListCall) doRequest(alt string) (*http.Response, error) {
6433	reqHeaders := make(http.Header)
6434	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6435	for k, v := range c.header_ {
6436		reqHeaders[k] = v
6437	}
6438	reqHeaders.Set("User-Agent", c.s.userAgent())
6439	if c.ifNoneMatch_ != "" {
6440		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6441	}
6442	var body io.Reader = nil
6443	c.urlParams_.Set("alt", alt)
6444	c.urlParams_.Set("prettyPrint", "false")
6445	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/me/players/{collection}")
6446	urls += "?" + c.urlParams_.Encode()
6447	req, err := http.NewRequest("GET", urls, body)
6448	if err != nil {
6449		return nil, err
6450	}
6451	req.Header = reqHeaders
6452	googleapi.Expand(req.URL, map[string]string{
6453		"collection": c.collection,
6454	})
6455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6456}
6457
6458// Do executes the "games.players.list" call.
6459// Exactly one of *PlayerListResponse or error will be non-nil. Any
6460// non-2xx status code is an error. Response headers are in either
6461// *PlayerListResponse.ServerResponse.Header or (if a response was
6462// returned at all) in error.(*googleapi.Error).Header. Use
6463// googleapi.IsNotModified to check whether the returned error was
6464// because http.StatusNotModified was returned.
6465func (c *PlayersListCall) Do(opts ...googleapi.CallOption) (*PlayerListResponse, error) {
6466	gensupport.SetOptions(c.urlParams_, opts...)
6467	res, err := c.doRequest("json")
6468	if res != nil && res.StatusCode == http.StatusNotModified {
6469		if res.Body != nil {
6470			res.Body.Close()
6471		}
6472		return nil, &googleapi.Error{
6473			Code:   res.StatusCode,
6474			Header: res.Header,
6475		}
6476	}
6477	if err != nil {
6478		return nil, err
6479	}
6480	defer googleapi.CloseBody(res)
6481	if err := googleapi.CheckResponse(res); err != nil {
6482		return nil, err
6483	}
6484	ret := &PlayerListResponse{
6485		ServerResponse: googleapi.ServerResponse{
6486			Header:         res.Header,
6487			HTTPStatusCode: res.StatusCode,
6488		},
6489	}
6490	target := &ret
6491	if err := gensupport.DecodeResponse(target, res); err != nil {
6492		return nil, err
6493	}
6494	return ret, nil
6495	// {
6496	//   "description": "Get the collection of players for the currently authenticated user.",
6497	//   "flatPath": "games/v1/players/me/players/{collection}",
6498	//   "httpMethod": "GET",
6499	//   "id": "games.players.list",
6500	//   "parameterOrder": [
6501	//     "collection"
6502	//   ],
6503	//   "parameters": {
6504	//     "collection": {
6505	//       "description": "Collection of players being retrieved",
6506	//       "enum": [
6507	//         "CONNECTED",
6508	//         "VISIBLE",
6509	//         "FRIENDS_ALL"
6510	//       ],
6511	//       "enumDescriptions": [
6512	//         "Retrieve a list of players that are also playing this game in reverse chronological order.",
6513	//         "Retrieve a list of players in the user's social graph that are visible to this game.",
6514	//         "Retrieve a list of players who are friends of the user in alphabetical order."
6515	//       ],
6516	//       "location": "path",
6517	//       "required": true,
6518	//       "type": "string"
6519	//     },
6520	//     "language": {
6521	//       "description": "The preferred language to use for strings returned by this method.",
6522	//       "location": "query",
6523	//       "type": "string"
6524	//     },
6525	//     "maxResults": {
6526	//       "description": "The maximum number of player resources to return in the response, used for paging. For any response, the actual number of player resources returned may be less than the specified `maxResults`.",
6527	//       "format": "int32",
6528	//       "location": "query",
6529	//       "type": "integer"
6530	//     },
6531	//     "pageToken": {
6532	//       "description": "The token returned by the previous request.",
6533	//       "location": "query",
6534	//       "type": "string"
6535	//     }
6536	//   },
6537	//   "path": "games/v1/players/me/players/{collection}",
6538	//   "response": {
6539	//     "$ref": "PlayerListResponse"
6540	//   },
6541	//   "scopes": [
6542	//     "https://www.googleapis.com/auth/games"
6543	//   ]
6544	// }
6545
6546}
6547
6548// Pages invokes f for each page of results.
6549// A non-nil error returned from f will halt the iteration.
6550// The provided context supersedes any context provided to the Context method.
6551func (c *PlayersListCall) Pages(ctx context.Context, f func(*PlayerListResponse) error) error {
6552	c.ctx_ = ctx
6553	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6554	for {
6555		x, err := c.Do()
6556		if err != nil {
6557			return err
6558		}
6559		if err := f(x); err != nil {
6560			return err
6561		}
6562		if x.NextPageToken == "" {
6563			return nil
6564		}
6565		c.PageToken(x.NextPageToken)
6566	}
6567}
6568
6569// method id "games.revisions.check":
6570
6571type RevisionsCheckCall struct {
6572	s            *Service
6573	urlParams_   gensupport.URLParams
6574	ifNoneMatch_ string
6575	ctx_         context.Context
6576	header_      http.Header
6577}
6578
6579// Check: Checks whether the games client is out of date.
6580func (r *RevisionsService) Check(clientRevision string) *RevisionsCheckCall {
6581	c := &RevisionsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6582	c.urlParams_.Set("clientRevision", clientRevision)
6583	return c
6584}
6585
6586// Fields allows partial responses to be retrieved. See
6587// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6588// for more information.
6589func (c *RevisionsCheckCall) Fields(s ...googleapi.Field) *RevisionsCheckCall {
6590	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6591	return c
6592}
6593
6594// IfNoneMatch sets the optional parameter which makes the operation
6595// fail if the object's ETag matches the given value. This is useful for
6596// getting updates only after the object has changed since the last
6597// request. Use googleapi.IsNotModified to check whether the response
6598// error from Do is the result of In-None-Match.
6599func (c *RevisionsCheckCall) IfNoneMatch(entityTag string) *RevisionsCheckCall {
6600	c.ifNoneMatch_ = entityTag
6601	return c
6602}
6603
6604// Context sets the context to be used in this call's Do method. Any
6605// pending HTTP request will be aborted if the provided context is
6606// canceled.
6607func (c *RevisionsCheckCall) Context(ctx context.Context) *RevisionsCheckCall {
6608	c.ctx_ = ctx
6609	return c
6610}
6611
6612// Header returns an http.Header that can be modified by the caller to
6613// add HTTP headers to the request.
6614func (c *RevisionsCheckCall) Header() http.Header {
6615	if c.header_ == nil {
6616		c.header_ = make(http.Header)
6617	}
6618	return c.header_
6619}
6620
6621func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) {
6622	reqHeaders := make(http.Header)
6623	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6624	for k, v := range c.header_ {
6625		reqHeaders[k] = v
6626	}
6627	reqHeaders.Set("User-Agent", c.s.userAgent())
6628	if c.ifNoneMatch_ != "" {
6629		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6630	}
6631	var body io.Reader = nil
6632	c.urlParams_.Set("alt", alt)
6633	c.urlParams_.Set("prettyPrint", "false")
6634	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/revisions/check")
6635	urls += "?" + c.urlParams_.Encode()
6636	req, err := http.NewRequest("GET", urls, body)
6637	if err != nil {
6638		return nil, err
6639	}
6640	req.Header = reqHeaders
6641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6642}
6643
6644// Do executes the "games.revisions.check" call.
6645// Exactly one of *RevisionCheckResponse or error will be non-nil. Any
6646// non-2xx status code is an error. Response headers are in either
6647// *RevisionCheckResponse.ServerResponse.Header or (if a response was
6648// returned at all) in error.(*googleapi.Error).Header. Use
6649// googleapi.IsNotModified to check whether the returned error was
6650// because http.StatusNotModified was returned.
6651func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckResponse, error) {
6652	gensupport.SetOptions(c.urlParams_, opts...)
6653	res, err := c.doRequest("json")
6654	if res != nil && res.StatusCode == http.StatusNotModified {
6655		if res.Body != nil {
6656			res.Body.Close()
6657		}
6658		return nil, &googleapi.Error{
6659			Code:   res.StatusCode,
6660			Header: res.Header,
6661		}
6662	}
6663	if err != nil {
6664		return nil, err
6665	}
6666	defer googleapi.CloseBody(res)
6667	if err := googleapi.CheckResponse(res); err != nil {
6668		return nil, err
6669	}
6670	ret := &RevisionCheckResponse{
6671		ServerResponse: googleapi.ServerResponse{
6672			Header:         res.Header,
6673			HTTPStatusCode: res.StatusCode,
6674		},
6675	}
6676	target := &ret
6677	if err := gensupport.DecodeResponse(target, res); err != nil {
6678		return nil, err
6679	}
6680	return ret, nil
6681	// {
6682	//   "description": "Checks whether the games client is out of date.",
6683	//   "flatPath": "games/v1/revisions/check",
6684	//   "httpMethod": "GET",
6685	//   "id": "games.revisions.check",
6686	//   "parameterOrder": [
6687	//     "clientRevision"
6688	//   ],
6689	//   "parameters": {
6690	//     "clientRevision": {
6691	//       "description": "The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App.",
6692	//       "location": "query",
6693	//       "required": true,
6694	//       "type": "string"
6695	//     }
6696	//   },
6697	//   "path": "games/v1/revisions/check",
6698	//   "response": {
6699	//     "$ref": "RevisionCheckResponse"
6700	//   },
6701	//   "scopes": [
6702	//     "https://www.googleapis.com/auth/games"
6703	//   ]
6704	// }
6705
6706}
6707
6708// method id "games.scores.get":
6709
6710type ScoresGetCall struct {
6711	s             *Service
6712	playerId      string
6713	leaderboardId string
6714	timeSpan      string
6715	urlParams_    gensupport.URLParams
6716	ifNoneMatch_  string
6717	ctx_          context.Context
6718	header_       http.Header
6719}
6720
6721// Get: Get high scores, and optionally ranks, in leaderboards for the
6722// currently authenticated player. For a specific time span,
6723// `leaderboardId` can be set to `ALL` to retrieve data for all
6724// leaderboards in a given time span. `NOTE: You cannot ask for 'ALL'
6725// leaderboards and 'ALL' timeSpans in the same request; only one
6726// parameter may be set to 'ALL'.
6727func (r *ScoresService) Get(playerId string, leaderboardId string, timeSpan string) *ScoresGetCall {
6728	c := &ScoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6729	c.playerId = playerId
6730	c.leaderboardId = leaderboardId
6731	c.timeSpan = timeSpan
6732	return c
6733}
6734
6735// IncludeRankType sets the optional parameter "includeRankType": The
6736// types of ranks to return. If the parameter is omitted, no ranks will
6737// be returned.
6738//
6739// Possible values:
6740//   "INCLUDE_RANK_TYPE_UNSPECIFIED" - Default value. Should be unused.
6741//   "ALL" - Retrieve all supported ranks. In HTTP, this parameter value
6742// can also be specified as `ALL`.
6743//   "PUBLIC" - Retrieve public ranks, if the player is sharing their
6744// gameplay activity publicly.
6745//   "SOCIAL" - (Obsolete) Retrieve the social rank.
6746//   "FRIENDS" - Retrieve the rank on the friends collection.
6747func (c *ScoresGetCall) IncludeRankType(includeRankType string) *ScoresGetCall {
6748	c.urlParams_.Set("includeRankType", includeRankType)
6749	return c
6750}
6751
6752// Language sets the optional parameter "language": The preferred
6753// language to use for strings returned by this method.
6754func (c *ScoresGetCall) Language(language string) *ScoresGetCall {
6755	c.urlParams_.Set("language", language)
6756	return c
6757}
6758
6759// MaxResults sets the optional parameter "maxResults": The maximum
6760// number of leaderboard scores to return in the response. For any
6761// response, the actual number of leaderboard scores returned may be
6762// less than the specified `maxResults`.
6763func (c *ScoresGetCall) MaxResults(maxResults int64) *ScoresGetCall {
6764	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6765	return c
6766}
6767
6768// PageToken sets the optional parameter "pageToken": The token returned
6769// by the previous request.
6770func (c *ScoresGetCall) PageToken(pageToken string) *ScoresGetCall {
6771	c.urlParams_.Set("pageToken", pageToken)
6772	return c
6773}
6774
6775// Fields allows partial responses to be retrieved. See
6776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6777// for more information.
6778func (c *ScoresGetCall) Fields(s ...googleapi.Field) *ScoresGetCall {
6779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6780	return c
6781}
6782
6783// IfNoneMatch sets the optional parameter which makes the operation
6784// fail if the object's ETag matches the given value. This is useful for
6785// getting updates only after the object has changed since the last
6786// request. Use googleapi.IsNotModified to check whether the response
6787// error from Do is the result of In-None-Match.
6788func (c *ScoresGetCall) IfNoneMatch(entityTag string) *ScoresGetCall {
6789	c.ifNoneMatch_ = entityTag
6790	return c
6791}
6792
6793// Context sets the context to be used in this call's Do method. Any
6794// pending HTTP request will be aborted if the provided context is
6795// canceled.
6796func (c *ScoresGetCall) Context(ctx context.Context) *ScoresGetCall {
6797	c.ctx_ = ctx
6798	return c
6799}
6800
6801// Header returns an http.Header that can be modified by the caller to
6802// add HTTP headers to the request.
6803func (c *ScoresGetCall) Header() http.Header {
6804	if c.header_ == nil {
6805		c.header_ = make(http.Header)
6806	}
6807	return c.header_
6808}
6809
6810func (c *ScoresGetCall) doRequest(alt string) (*http.Response, error) {
6811	reqHeaders := make(http.Header)
6812	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6813	for k, v := range c.header_ {
6814		reqHeaders[k] = v
6815	}
6816	reqHeaders.Set("User-Agent", c.s.userAgent())
6817	if c.ifNoneMatch_ != "" {
6818		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6819	}
6820	var body io.Reader = nil
6821	c.urlParams_.Set("alt", alt)
6822	c.urlParams_.Set("prettyPrint", "false")
6823	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}")
6824	urls += "?" + c.urlParams_.Encode()
6825	req, err := http.NewRequest("GET", urls, body)
6826	if err != nil {
6827		return nil, err
6828	}
6829	req.Header = reqHeaders
6830	googleapi.Expand(req.URL, map[string]string{
6831		"playerId":      c.playerId,
6832		"leaderboardId": c.leaderboardId,
6833		"timeSpan":      c.timeSpan,
6834	})
6835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6836}
6837
6838// Do executes the "games.scores.get" call.
6839// Exactly one of *PlayerLeaderboardScoreListResponse or error will be
6840// non-nil. Any non-2xx status code is an error. Response headers are in
6841// either *PlayerLeaderboardScoreListResponse.ServerResponse.Header or
6842// (if a response was returned at all) in
6843// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6844// whether the returned error was because http.StatusNotModified was
6845// returned.
6846func (c *ScoresGetCall) Do(opts ...googleapi.CallOption) (*PlayerLeaderboardScoreListResponse, error) {
6847	gensupport.SetOptions(c.urlParams_, opts...)
6848	res, err := c.doRequest("json")
6849	if res != nil && res.StatusCode == http.StatusNotModified {
6850		if res.Body != nil {
6851			res.Body.Close()
6852		}
6853		return nil, &googleapi.Error{
6854			Code:   res.StatusCode,
6855			Header: res.Header,
6856		}
6857	}
6858	if err != nil {
6859		return nil, err
6860	}
6861	defer googleapi.CloseBody(res)
6862	if err := googleapi.CheckResponse(res); err != nil {
6863		return nil, err
6864	}
6865	ret := &PlayerLeaderboardScoreListResponse{
6866		ServerResponse: googleapi.ServerResponse{
6867			Header:         res.Header,
6868			HTTPStatusCode: res.StatusCode,
6869		},
6870	}
6871	target := &ret
6872	if err := gensupport.DecodeResponse(target, res); err != nil {
6873		return nil, err
6874	}
6875	return ret, nil
6876	// {
6877	//   "description": "Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a specific time span, `leaderboardId` can be set to `ALL` to retrieve data for all leaderboards in a given time span. `NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one parameter may be set to 'ALL'.",
6878	//   "flatPath": "games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}",
6879	//   "httpMethod": "GET",
6880	//   "id": "games.scores.get",
6881	//   "parameterOrder": [
6882	//     "playerId",
6883	//     "leaderboardId",
6884	//     "timeSpan"
6885	//   ],
6886	//   "parameters": {
6887	//     "includeRankType": {
6888	//       "description": "The types of ranks to return. If the parameter is omitted, no ranks will be returned.",
6889	//       "enum": [
6890	//         "INCLUDE_RANK_TYPE_UNSPECIFIED",
6891	//         "ALL",
6892	//         "PUBLIC",
6893	//         "SOCIAL",
6894	//         "FRIENDS"
6895	//       ],
6896	//       "enumDescriptions": [
6897	//         "Default value. Should be unused.",
6898	//         "Retrieve all supported ranks. In HTTP, this parameter value can also be specified as `ALL`.",
6899	//         "Retrieve public ranks, if the player is sharing their gameplay activity publicly.",
6900	//         "(Obsolete) Retrieve the social rank.",
6901	//         "Retrieve the rank on the friends collection."
6902	//       ],
6903	//       "location": "query",
6904	//       "type": "string"
6905	//     },
6906	//     "language": {
6907	//       "description": "The preferred language to use for strings returned by this method.",
6908	//       "location": "query",
6909	//       "type": "string"
6910	//     },
6911	//     "leaderboardId": {
6912	//       "description": "The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application.",
6913	//       "location": "path",
6914	//       "required": true,
6915	//       "type": "string"
6916	//     },
6917	//     "maxResults": {
6918	//       "description": "The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified `maxResults`.",
6919	//       "format": "int32",
6920	//       "location": "query",
6921	//       "type": "integer"
6922	//     },
6923	//     "pageToken": {
6924	//       "description": "The token returned by the previous request.",
6925	//       "location": "query",
6926	//       "type": "string"
6927	//     },
6928	//     "playerId": {
6929	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
6930	//       "location": "path",
6931	//       "required": true,
6932	//       "type": "string"
6933	//     },
6934	//     "timeSpan": {
6935	//       "description": "The time span for the scores and ranks you're requesting.",
6936	//       "enum": [
6937	//         "SCORE_TIME_SPAN_UNSPECIFIED",
6938	//         "ALL",
6939	//         "ALL_TIME",
6940	//         "WEEKLY",
6941	//         "DAILY"
6942	//       ],
6943	//       "enumDescriptions": [
6944	//         "Default value. This value is unused.",
6945	//         "Get the high scores for all time spans. If this is used, maxResults values will be ignored.",
6946	//         "Get the all time high score.",
6947	//         "List the top scores for the current day.",
6948	//         "List the top scores for the current week."
6949	//       ],
6950	//       "location": "path",
6951	//       "required": true,
6952	//       "type": "string"
6953	//     }
6954	//   },
6955	//   "path": "games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}",
6956	//   "response": {
6957	//     "$ref": "PlayerLeaderboardScoreListResponse"
6958	//   },
6959	//   "scopes": [
6960	//     "https://www.googleapis.com/auth/games"
6961	//   ]
6962	// }
6963
6964}
6965
6966// Pages invokes f for each page of results.
6967// A non-nil error returned from f will halt the iteration.
6968// The provided context supersedes any context provided to the Context method.
6969func (c *ScoresGetCall) Pages(ctx context.Context, f func(*PlayerLeaderboardScoreListResponse) error) error {
6970	c.ctx_ = ctx
6971	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6972	for {
6973		x, err := c.Do()
6974		if err != nil {
6975			return err
6976		}
6977		if err := f(x); err != nil {
6978			return err
6979		}
6980		if x.NextPageToken == "" {
6981			return nil
6982		}
6983		c.PageToken(x.NextPageToken)
6984	}
6985}
6986
6987// method id "games.scores.list":
6988
6989type ScoresListCall struct {
6990	s             *Service
6991	leaderboardId string
6992	collection    string
6993	urlParams_    gensupport.URLParams
6994	ifNoneMatch_  string
6995	ctx_          context.Context
6996	header_       http.Header
6997}
6998
6999// List: Lists the scores in a leaderboard, starting from the top.
7000func (r *ScoresService) List(leaderboardId string, collection string, timeSpan string) *ScoresListCall {
7001	c := &ScoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7002	c.leaderboardId = leaderboardId
7003	c.collection = collection
7004	c.urlParams_.Set("timeSpan", timeSpan)
7005	return c
7006}
7007
7008// Language sets the optional parameter "language": The preferred
7009// language to use for strings returned by this method.
7010func (c *ScoresListCall) Language(language string) *ScoresListCall {
7011	c.urlParams_.Set("language", language)
7012	return c
7013}
7014
7015// MaxResults sets the optional parameter "maxResults": The maximum
7016// number of leaderboard scores to return in the response. For any
7017// response, the actual number of leaderboard scores returned may be
7018// less than the specified `maxResults`.
7019func (c *ScoresListCall) MaxResults(maxResults int64) *ScoresListCall {
7020	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7021	return c
7022}
7023
7024// PageToken sets the optional parameter "pageToken": The token returned
7025// by the previous request.
7026func (c *ScoresListCall) PageToken(pageToken string) *ScoresListCall {
7027	c.urlParams_.Set("pageToken", pageToken)
7028	return c
7029}
7030
7031// Fields allows partial responses to be retrieved. See
7032// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7033// for more information.
7034func (c *ScoresListCall) Fields(s ...googleapi.Field) *ScoresListCall {
7035	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7036	return c
7037}
7038
7039// IfNoneMatch sets the optional parameter which makes the operation
7040// fail if the object's ETag matches the given value. This is useful for
7041// getting updates only after the object has changed since the last
7042// request. Use googleapi.IsNotModified to check whether the response
7043// error from Do is the result of In-None-Match.
7044func (c *ScoresListCall) IfNoneMatch(entityTag string) *ScoresListCall {
7045	c.ifNoneMatch_ = entityTag
7046	return c
7047}
7048
7049// Context sets the context to be used in this call's Do method. Any
7050// pending HTTP request will be aborted if the provided context is
7051// canceled.
7052func (c *ScoresListCall) Context(ctx context.Context) *ScoresListCall {
7053	c.ctx_ = ctx
7054	return c
7055}
7056
7057// Header returns an http.Header that can be modified by the caller to
7058// add HTTP headers to the request.
7059func (c *ScoresListCall) Header() http.Header {
7060	if c.header_ == nil {
7061		c.header_ = make(http.Header)
7062	}
7063	return c.header_
7064}
7065
7066func (c *ScoresListCall) doRequest(alt string) (*http.Response, error) {
7067	reqHeaders := make(http.Header)
7068	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7069	for k, v := range c.header_ {
7070		reqHeaders[k] = v
7071	}
7072	reqHeaders.Set("User-Agent", c.s.userAgent())
7073	if c.ifNoneMatch_ != "" {
7074		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7075	}
7076	var body io.Reader = nil
7077	c.urlParams_.Set("alt", alt)
7078	c.urlParams_.Set("prettyPrint", "false")
7079	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}/scores/{collection}")
7080	urls += "?" + c.urlParams_.Encode()
7081	req, err := http.NewRequest("GET", urls, body)
7082	if err != nil {
7083		return nil, err
7084	}
7085	req.Header = reqHeaders
7086	googleapi.Expand(req.URL, map[string]string{
7087		"leaderboardId": c.leaderboardId,
7088		"collection":    c.collection,
7089	})
7090	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7091}
7092
7093// Do executes the "games.scores.list" call.
7094// Exactly one of *LeaderboardScores or error will be non-nil. Any
7095// non-2xx status code is an error. Response headers are in either
7096// *LeaderboardScores.ServerResponse.Header or (if a response was
7097// returned at all) in error.(*googleapi.Error).Header. Use
7098// googleapi.IsNotModified to check whether the returned error was
7099// because http.StatusNotModified was returned.
7100func (c *ScoresListCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, error) {
7101	gensupport.SetOptions(c.urlParams_, opts...)
7102	res, err := c.doRequest("json")
7103	if res != nil && res.StatusCode == http.StatusNotModified {
7104		if res.Body != nil {
7105			res.Body.Close()
7106		}
7107		return nil, &googleapi.Error{
7108			Code:   res.StatusCode,
7109			Header: res.Header,
7110		}
7111	}
7112	if err != nil {
7113		return nil, err
7114	}
7115	defer googleapi.CloseBody(res)
7116	if err := googleapi.CheckResponse(res); err != nil {
7117		return nil, err
7118	}
7119	ret := &LeaderboardScores{
7120		ServerResponse: googleapi.ServerResponse{
7121			Header:         res.Header,
7122			HTTPStatusCode: res.StatusCode,
7123		},
7124	}
7125	target := &ret
7126	if err := gensupport.DecodeResponse(target, res); err != nil {
7127		return nil, err
7128	}
7129	return ret, nil
7130	// {
7131	//   "description": "Lists the scores in a leaderboard, starting from the top.",
7132	//   "flatPath": "games/v1/leaderboards/{leaderboardId}/scores/{collection}",
7133	//   "httpMethod": "GET",
7134	//   "id": "games.scores.list",
7135	//   "parameterOrder": [
7136	//     "leaderboardId",
7137	//     "collection",
7138	//     "timeSpan"
7139	//   ],
7140	//   "parameters": {
7141	//     "collection": {
7142	//       "description": "The collection of scores you're requesting.",
7143	//       "enum": [
7144	//         "SCORE_COLLECTION_UNSPECIFIED",
7145	//         "PUBLIC",
7146	//         "SOCIAL",
7147	//         "FRIENDS"
7148	//       ],
7149	//       "enumDescriptions": [
7150	//         "Default value. This value is unused.",
7151	//         "List all scores in the public leaderboard.",
7152	//         "(Obsolete) Legacy G+ social scores.",
7153	//         "List only scores of friends."
7154	//       ],
7155	//       "location": "path",
7156	//       "required": true,
7157	//       "type": "string"
7158	//     },
7159	//     "language": {
7160	//       "description": "The preferred language to use for strings returned by this method.",
7161	//       "location": "query",
7162	//       "type": "string"
7163	//     },
7164	//     "leaderboardId": {
7165	//       "description": "The ID of the leaderboard.",
7166	//       "location": "path",
7167	//       "required": true,
7168	//       "type": "string"
7169	//     },
7170	//     "maxResults": {
7171	//       "description": "The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified `maxResults`.",
7172	//       "format": "int32",
7173	//       "location": "query",
7174	//       "type": "integer"
7175	//     },
7176	//     "pageToken": {
7177	//       "description": "The token returned by the previous request.",
7178	//       "location": "query",
7179	//       "type": "string"
7180	//     },
7181	//     "timeSpan": {
7182	//       "description": "The time span for the scores and ranks you're requesting.",
7183	//       "enum": [
7184	//         "SCORE_TIME_SPAN_UNSPECIFIED",
7185	//         "ALL_TIME",
7186	//         "WEEKLY",
7187	//         "DAILY"
7188	//       ],
7189	//       "enumDescriptions": [
7190	//         "Default value. This value is unused.",
7191	//         "The score is an all-time score.",
7192	//         "The score is a weekly score.",
7193	//         "The score is a daily score."
7194	//       ],
7195	//       "location": "query",
7196	//       "required": true,
7197	//       "type": "string"
7198	//     }
7199	//   },
7200	//   "path": "games/v1/leaderboards/{leaderboardId}/scores/{collection}",
7201	//   "response": {
7202	//     "$ref": "LeaderboardScores"
7203	//   },
7204	//   "scopes": [
7205	//     "https://www.googleapis.com/auth/games"
7206	//   ]
7207	// }
7208
7209}
7210
7211// Pages invokes f for each page of results.
7212// A non-nil error returned from f will halt the iteration.
7213// The provided context supersedes any context provided to the Context method.
7214func (c *ScoresListCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
7215	c.ctx_ = ctx
7216	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7217	for {
7218		x, err := c.Do()
7219		if err != nil {
7220			return err
7221		}
7222		if err := f(x); err != nil {
7223			return err
7224		}
7225		if x.NextPageToken == "" {
7226			return nil
7227		}
7228		c.PageToken(x.NextPageToken)
7229	}
7230}
7231
7232// method id "games.scores.listWindow":
7233
7234type ScoresListWindowCall struct {
7235	s             *Service
7236	leaderboardId string
7237	collection    string
7238	urlParams_    gensupport.URLParams
7239	ifNoneMatch_  string
7240	ctx_          context.Context
7241	header_       http.Header
7242}
7243
7244// ListWindow: Lists the scores in a leaderboard around (and including)
7245// a player's score.
7246func (r *ScoresService) ListWindow(leaderboardId string, collection string, timeSpan string) *ScoresListWindowCall {
7247	c := &ScoresListWindowCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7248	c.leaderboardId = leaderboardId
7249	c.collection = collection
7250	c.urlParams_.Set("timeSpan", timeSpan)
7251	return c
7252}
7253
7254// Language sets the optional parameter "language": The preferred
7255// language to use for strings returned by this method.
7256func (c *ScoresListWindowCall) Language(language string) *ScoresListWindowCall {
7257	c.urlParams_.Set("language", language)
7258	return c
7259}
7260
7261// MaxResults sets the optional parameter "maxResults": The maximum
7262// number of leaderboard scores to return in the response. For any
7263// response, the actual number of leaderboard scores returned may be
7264// less than the specified `maxResults`.
7265func (c *ScoresListWindowCall) MaxResults(maxResults int64) *ScoresListWindowCall {
7266	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7267	return c
7268}
7269
7270// PageToken sets the optional parameter "pageToken": The token returned
7271// by the previous request.
7272func (c *ScoresListWindowCall) PageToken(pageToken string) *ScoresListWindowCall {
7273	c.urlParams_.Set("pageToken", pageToken)
7274	return c
7275}
7276
7277// ResultsAbove sets the optional parameter "resultsAbove": The
7278// preferred number of scores to return above the player's score. More
7279// scores may be returned if the player is at the bottom of the
7280// leaderboard; fewer may be returned if the player is at the top. Must
7281// be less than or equal to maxResults.
7282func (c *ScoresListWindowCall) ResultsAbove(resultsAbove int64) *ScoresListWindowCall {
7283	c.urlParams_.Set("resultsAbove", fmt.Sprint(resultsAbove))
7284	return c
7285}
7286
7287// ReturnTopIfAbsent sets the optional parameter "returnTopIfAbsent":
7288// True if the top scores should be returned when the player is not in
7289// the leaderboard. Defaults to true.
7290func (c *ScoresListWindowCall) ReturnTopIfAbsent(returnTopIfAbsent bool) *ScoresListWindowCall {
7291	c.urlParams_.Set("returnTopIfAbsent", fmt.Sprint(returnTopIfAbsent))
7292	return c
7293}
7294
7295// Fields allows partial responses to be retrieved. See
7296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7297// for more information.
7298func (c *ScoresListWindowCall) Fields(s ...googleapi.Field) *ScoresListWindowCall {
7299	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7300	return c
7301}
7302
7303// IfNoneMatch sets the optional parameter which makes the operation
7304// fail if the object's ETag matches the given value. This is useful for
7305// getting updates only after the object has changed since the last
7306// request. Use googleapi.IsNotModified to check whether the response
7307// error from Do is the result of In-None-Match.
7308func (c *ScoresListWindowCall) IfNoneMatch(entityTag string) *ScoresListWindowCall {
7309	c.ifNoneMatch_ = entityTag
7310	return c
7311}
7312
7313// Context sets the context to be used in this call's Do method. Any
7314// pending HTTP request will be aborted if the provided context is
7315// canceled.
7316func (c *ScoresListWindowCall) Context(ctx context.Context) *ScoresListWindowCall {
7317	c.ctx_ = ctx
7318	return c
7319}
7320
7321// Header returns an http.Header that can be modified by the caller to
7322// add HTTP headers to the request.
7323func (c *ScoresListWindowCall) Header() http.Header {
7324	if c.header_ == nil {
7325		c.header_ = make(http.Header)
7326	}
7327	return c.header_
7328}
7329
7330func (c *ScoresListWindowCall) doRequest(alt string) (*http.Response, error) {
7331	reqHeaders := make(http.Header)
7332	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7333	for k, v := range c.header_ {
7334		reqHeaders[k] = v
7335	}
7336	reqHeaders.Set("User-Agent", c.s.userAgent())
7337	if c.ifNoneMatch_ != "" {
7338		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7339	}
7340	var body io.Reader = nil
7341	c.urlParams_.Set("alt", alt)
7342	c.urlParams_.Set("prettyPrint", "false")
7343	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}/window/{collection}")
7344	urls += "?" + c.urlParams_.Encode()
7345	req, err := http.NewRequest("GET", urls, body)
7346	if err != nil {
7347		return nil, err
7348	}
7349	req.Header = reqHeaders
7350	googleapi.Expand(req.URL, map[string]string{
7351		"leaderboardId": c.leaderboardId,
7352		"collection":    c.collection,
7353	})
7354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7355}
7356
7357// Do executes the "games.scores.listWindow" call.
7358// Exactly one of *LeaderboardScores or error will be non-nil. Any
7359// non-2xx status code is an error. Response headers are in either
7360// *LeaderboardScores.ServerResponse.Header or (if a response was
7361// returned at all) in error.(*googleapi.Error).Header. Use
7362// googleapi.IsNotModified to check whether the returned error was
7363// because http.StatusNotModified was returned.
7364func (c *ScoresListWindowCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, error) {
7365	gensupport.SetOptions(c.urlParams_, opts...)
7366	res, err := c.doRequest("json")
7367	if res != nil && res.StatusCode == http.StatusNotModified {
7368		if res.Body != nil {
7369			res.Body.Close()
7370		}
7371		return nil, &googleapi.Error{
7372			Code:   res.StatusCode,
7373			Header: res.Header,
7374		}
7375	}
7376	if err != nil {
7377		return nil, err
7378	}
7379	defer googleapi.CloseBody(res)
7380	if err := googleapi.CheckResponse(res); err != nil {
7381		return nil, err
7382	}
7383	ret := &LeaderboardScores{
7384		ServerResponse: googleapi.ServerResponse{
7385			Header:         res.Header,
7386			HTTPStatusCode: res.StatusCode,
7387		},
7388	}
7389	target := &ret
7390	if err := gensupport.DecodeResponse(target, res); err != nil {
7391		return nil, err
7392	}
7393	return ret, nil
7394	// {
7395	//   "description": "Lists the scores in a leaderboard around (and including) a player's score.",
7396	//   "flatPath": "games/v1/leaderboards/{leaderboardId}/window/{collection}",
7397	//   "httpMethod": "GET",
7398	//   "id": "games.scores.listWindow",
7399	//   "parameterOrder": [
7400	//     "leaderboardId",
7401	//     "collection",
7402	//     "timeSpan"
7403	//   ],
7404	//   "parameters": {
7405	//     "collection": {
7406	//       "description": "The collection of scores you're requesting.",
7407	//       "enum": [
7408	//         "SCORE_COLLECTION_UNSPECIFIED",
7409	//         "PUBLIC",
7410	//         "SOCIAL",
7411	//         "FRIENDS"
7412	//       ],
7413	//       "enumDescriptions": [
7414	//         "Default value. This value is unused.",
7415	//         "List all scores in the public leaderboard.",
7416	//         "(Obsolete) Legacy G+ social scores.",
7417	//         "List only scores of friends."
7418	//       ],
7419	//       "location": "path",
7420	//       "required": true,
7421	//       "type": "string"
7422	//     },
7423	//     "language": {
7424	//       "description": "The preferred language to use for strings returned by this method.",
7425	//       "location": "query",
7426	//       "type": "string"
7427	//     },
7428	//     "leaderboardId": {
7429	//       "description": "The ID of the leaderboard.",
7430	//       "location": "path",
7431	//       "required": true,
7432	//       "type": "string"
7433	//     },
7434	//     "maxResults": {
7435	//       "description": "The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified `maxResults`.",
7436	//       "format": "int32",
7437	//       "location": "query",
7438	//       "type": "integer"
7439	//     },
7440	//     "pageToken": {
7441	//       "description": "The token returned by the previous request.",
7442	//       "location": "query",
7443	//       "type": "string"
7444	//     },
7445	//     "resultsAbove": {
7446	//       "description": "The preferred number of scores to return above the player's score. More scores may be returned if the player is at the bottom of the leaderboard; fewer may be returned if the player is at the top. Must be less than or equal to maxResults.",
7447	//       "format": "int32",
7448	//       "location": "query",
7449	//       "type": "integer"
7450	//     },
7451	//     "returnTopIfAbsent": {
7452	//       "description": "True if the top scores should be returned when the player is not in the leaderboard. Defaults to true.",
7453	//       "location": "query",
7454	//       "type": "boolean"
7455	//     },
7456	//     "timeSpan": {
7457	//       "description": "The time span for the scores and ranks you're requesting.",
7458	//       "enum": [
7459	//         "SCORE_TIME_SPAN_UNSPECIFIED",
7460	//         "ALL_TIME",
7461	//         "WEEKLY",
7462	//         "DAILY"
7463	//       ],
7464	//       "enumDescriptions": [
7465	//         "Default value. This value is unused.",
7466	//         "The score is an all-time score.",
7467	//         "The score is a weekly score.",
7468	//         "The score is a daily score."
7469	//       ],
7470	//       "location": "query",
7471	//       "required": true,
7472	//       "type": "string"
7473	//     }
7474	//   },
7475	//   "path": "games/v1/leaderboards/{leaderboardId}/window/{collection}",
7476	//   "response": {
7477	//     "$ref": "LeaderboardScores"
7478	//   },
7479	//   "scopes": [
7480	//     "https://www.googleapis.com/auth/games"
7481	//   ]
7482	// }
7483
7484}
7485
7486// Pages invokes f for each page of results.
7487// A non-nil error returned from f will halt the iteration.
7488// The provided context supersedes any context provided to the Context method.
7489func (c *ScoresListWindowCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
7490	c.ctx_ = ctx
7491	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7492	for {
7493		x, err := c.Do()
7494		if err != nil {
7495			return err
7496		}
7497		if err := f(x); err != nil {
7498			return err
7499		}
7500		if x.NextPageToken == "" {
7501			return nil
7502		}
7503		c.PageToken(x.NextPageToken)
7504	}
7505}
7506
7507// method id "games.scores.submit":
7508
7509type ScoresSubmitCall struct {
7510	s             *Service
7511	leaderboardId string
7512	urlParams_    gensupport.URLParams
7513	ctx_          context.Context
7514	header_       http.Header
7515}
7516
7517// Submit: Submits a score to the specified leaderboard.
7518func (r *ScoresService) Submit(leaderboardId string, score int64) *ScoresSubmitCall {
7519	c := &ScoresSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7520	c.leaderboardId = leaderboardId
7521	c.urlParams_.Set("score", fmt.Sprint(score))
7522	return c
7523}
7524
7525// Language sets the optional parameter "language": The preferred
7526// language to use for strings returned by this method.
7527func (c *ScoresSubmitCall) Language(language string) *ScoresSubmitCall {
7528	c.urlParams_.Set("language", language)
7529	return c
7530}
7531
7532// ScoreTag sets the optional parameter "scoreTag": Additional
7533// information about the score you're submitting. Values must contain no
7534// more than 64 URI-safe characters as defined by section 2.3 of RFC
7535// 3986.
7536func (c *ScoresSubmitCall) ScoreTag(scoreTag string) *ScoresSubmitCall {
7537	c.urlParams_.Set("scoreTag", scoreTag)
7538	return c
7539}
7540
7541// Fields allows partial responses to be retrieved. See
7542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7543// for more information.
7544func (c *ScoresSubmitCall) Fields(s ...googleapi.Field) *ScoresSubmitCall {
7545	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7546	return c
7547}
7548
7549// Context sets the context to be used in this call's Do method. Any
7550// pending HTTP request will be aborted if the provided context is
7551// canceled.
7552func (c *ScoresSubmitCall) Context(ctx context.Context) *ScoresSubmitCall {
7553	c.ctx_ = ctx
7554	return c
7555}
7556
7557// Header returns an http.Header that can be modified by the caller to
7558// add HTTP headers to the request.
7559func (c *ScoresSubmitCall) Header() http.Header {
7560	if c.header_ == nil {
7561		c.header_ = make(http.Header)
7562	}
7563	return c.header_
7564}
7565
7566func (c *ScoresSubmitCall) doRequest(alt string) (*http.Response, error) {
7567	reqHeaders := make(http.Header)
7568	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7569	for k, v := range c.header_ {
7570		reqHeaders[k] = v
7571	}
7572	reqHeaders.Set("User-Agent", c.s.userAgent())
7573	var body io.Reader = nil
7574	c.urlParams_.Set("alt", alt)
7575	c.urlParams_.Set("prettyPrint", "false")
7576	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}/scores")
7577	urls += "?" + c.urlParams_.Encode()
7578	req, err := http.NewRequest("POST", urls, body)
7579	if err != nil {
7580		return nil, err
7581	}
7582	req.Header = reqHeaders
7583	googleapi.Expand(req.URL, map[string]string{
7584		"leaderboardId": c.leaderboardId,
7585	})
7586	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7587}
7588
7589// Do executes the "games.scores.submit" call.
7590// Exactly one of *PlayerScoreResponse or error will be non-nil. Any
7591// non-2xx status code is an error. Response headers are in either
7592// *PlayerScoreResponse.ServerResponse.Header or (if a response was
7593// returned at all) in error.(*googleapi.Error).Header. Use
7594// googleapi.IsNotModified to check whether the returned error was
7595// because http.StatusNotModified was returned.
7596func (c *ScoresSubmitCall) Do(opts ...googleapi.CallOption) (*PlayerScoreResponse, error) {
7597	gensupport.SetOptions(c.urlParams_, opts...)
7598	res, err := c.doRequest("json")
7599	if res != nil && res.StatusCode == http.StatusNotModified {
7600		if res.Body != nil {
7601			res.Body.Close()
7602		}
7603		return nil, &googleapi.Error{
7604			Code:   res.StatusCode,
7605			Header: res.Header,
7606		}
7607	}
7608	if err != nil {
7609		return nil, err
7610	}
7611	defer googleapi.CloseBody(res)
7612	if err := googleapi.CheckResponse(res); err != nil {
7613		return nil, err
7614	}
7615	ret := &PlayerScoreResponse{
7616		ServerResponse: googleapi.ServerResponse{
7617			Header:         res.Header,
7618			HTTPStatusCode: res.StatusCode,
7619		},
7620	}
7621	target := &ret
7622	if err := gensupport.DecodeResponse(target, res); err != nil {
7623		return nil, err
7624	}
7625	return ret, nil
7626	// {
7627	//   "description": "Submits a score to the specified leaderboard.",
7628	//   "flatPath": "games/v1/leaderboards/{leaderboardId}/scores",
7629	//   "httpMethod": "POST",
7630	//   "id": "games.scores.submit",
7631	//   "parameterOrder": [
7632	//     "leaderboardId",
7633	//     "score"
7634	//   ],
7635	//   "parameters": {
7636	//     "language": {
7637	//       "description": "The preferred language to use for strings returned by this method.",
7638	//       "location": "query",
7639	//       "type": "string"
7640	//     },
7641	//     "leaderboardId": {
7642	//       "description": "The ID of the leaderboard.",
7643	//       "location": "path",
7644	//       "required": true,
7645	//       "type": "string"
7646	//     },
7647	//     "score": {
7648	//       "description": "The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.",
7649	//       "format": "int64",
7650	//       "location": "query",
7651	//       "required": true,
7652	//       "type": "string"
7653	//     },
7654	//     "scoreTag": {
7655	//       "description": "Additional information about the score you're submitting. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.",
7656	//       "location": "query",
7657	//       "pattern": "[a-zA-Z0-9-._~]{0,64}",
7658	//       "type": "string"
7659	//     }
7660	//   },
7661	//   "path": "games/v1/leaderboards/{leaderboardId}/scores",
7662	//   "response": {
7663	//     "$ref": "PlayerScoreResponse"
7664	//   },
7665	//   "scopes": [
7666	//     "https://www.googleapis.com/auth/games"
7667	//   ]
7668	// }
7669
7670}
7671
7672// method id "games.scores.submitMultiple":
7673
7674type ScoresSubmitMultipleCall struct {
7675	s                         *Service
7676	playerscoresubmissionlist *PlayerScoreSubmissionList
7677	urlParams_                gensupport.URLParams
7678	ctx_                      context.Context
7679	header_                   http.Header
7680}
7681
7682// SubmitMultiple: Submits multiple scores to leaderboards.
7683func (r *ScoresService) SubmitMultiple(playerscoresubmissionlist *PlayerScoreSubmissionList) *ScoresSubmitMultipleCall {
7684	c := &ScoresSubmitMultipleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7685	c.playerscoresubmissionlist = playerscoresubmissionlist
7686	return c
7687}
7688
7689// Language sets the optional parameter "language": The preferred
7690// language to use for strings returned by this method.
7691func (c *ScoresSubmitMultipleCall) Language(language string) *ScoresSubmitMultipleCall {
7692	c.urlParams_.Set("language", language)
7693	return c
7694}
7695
7696// Fields allows partial responses to be retrieved. See
7697// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7698// for more information.
7699func (c *ScoresSubmitMultipleCall) Fields(s ...googleapi.Field) *ScoresSubmitMultipleCall {
7700	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7701	return c
7702}
7703
7704// Context sets the context to be used in this call's Do method. Any
7705// pending HTTP request will be aborted if the provided context is
7706// canceled.
7707func (c *ScoresSubmitMultipleCall) Context(ctx context.Context) *ScoresSubmitMultipleCall {
7708	c.ctx_ = ctx
7709	return c
7710}
7711
7712// Header returns an http.Header that can be modified by the caller to
7713// add HTTP headers to the request.
7714func (c *ScoresSubmitMultipleCall) Header() http.Header {
7715	if c.header_ == nil {
7716		c.header_ = make(http.Header)
7717	}
7718	return c.header_
7719}
7720
7721func (c *ScoresSubmitMultipleCall) doRequest(alt string) (*http.Response, error) {
7722	reqHeaders := make(http.Header)
7723	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7724	for k, v := range c.header_ {
7725		reqHeaders[k] = v
7726	}
7727	reqHeaders.Set("User-Agent", c.s.userAgent())
7728	var body io.Reader = nil
7729	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playerscoresubmissionlist)
7730	if err != nil {
7731		return nil, err
7732	}
7733	reqHeaders.Set("Content-Type", "application/json")
7734	c.urlParams_.Set("alt", alt)
7735	c.urlParams_.Set("prettyPrint", "false")
7736	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/scores")
7737	urls += "?" + c.urlParams_.Encode()
7738	req, err := http.NewRequest("POST", urls, body)
7739	if err != nil {
7740		return nil, err
7741	}
7742	req.Header = reqHeaders
7743	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7744}
7745
7746// Do executes the "games.scores.submitMultiple" call.
7747// Exactly one of *PlayerScoreListResponse or error will be non-nil. Any
7748// non-2xx status code is an error. Response headers are in either
7749// *PlayerScoreListResponse.ServerResponse.Header or (if a response was
7750// returned at all) in error.(*googleapi.Error).Header. Use
7751// googleapi.IsNotModified to check whether the returned error was
7752// because http.StatusNotModified was returned.
7753func (c *ScoresSubmitMultipleCall) Do(opts ...googleapi.CallOption) (*PlayerScoreListResponse, error) {
7754	gensupport.SetOptions(c.urlParams_, opts...)
7755	res, err := c.doRequest("json")
7756	if res != nil && res.StatusCode == http.StatusNotModified {
7757		if res.Body != nil {
7758			res.Body.Close()
7759		}
7760		return nil, &googleapi.Error{
7761			Code:   res.StatusCode,
7762			Header: res.Header,
7763		}
7764	}
7765	if err != nil {
7766		return nil, err
7767	}
7768	defer googleapi.CloseBody(res)
7769	if err := googleapi.CheckResponse(res); err != nil {
7770		return nil, err
7771	}
7772	ret := &PlayerScoreListResponse{
7773		ServerResponse: googleapi.ServerResponse{
7774			Header:         res.Header,
7775			HTTPStatusCode: res.StatusCode,
7776		},
7777	}
7778	target := &ret
7779	if err := gensupport.DecodeResponse(target, res); err != nil {
7780		return nil, err
7781	}
7782	return ret, nil
7783	// {
7784	//   "description": "Submits multiple scores to leaderboards.",
7785	//   "flatPath": "games/v1/leaderboards/scores",
7786	//   "httpMethod": "POST",
7787	//   "id": "games.scores.submitMultiple",
7788	//   "parameterOrder": [],
7789	//   "parameters": {
7790	//     "language": {
7791	//       "description": "The preferred language to use for strings returned by this method.",
7792	//       "location": "query",
7793	//       "type": "string"
7794	//     }
7795	//   },
7796	//   "path": "games/v1/leaderboards/scores",
7797	//   "request": {
7798	//     "$ref": "PlayerScoreSubmissionList"
7799	//   },
7800	//   "response": {
7801	//     "$ref": "PlayerScoreListResponse"
7802	//   },
7803	//   "scopes": [
7804	//     "https://www.googleapis.com/auth/games"
7805	//   ]
7806	// }
7807
7808}
7809
7810// method id "games.snapshots.get":
7811
7812type SnapshotsGetCall struct {
7813	s            *Service
7814	snapshotId   string
7815	urlParams_   gensupport.URLParams
7816	ifNoneMatch_ string
7817	ctx_         context.Context
7818	header_      http.Header
7819}
7820
7821// Get: Retrieves the metadata for a given snapshot ID.
7822func (r *SnapshotsService) Get(snapshotId string) *SnapshotsGetCall {
7823	c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7824	c.snapshotId = snapshotId
7825	return c
7826}
7827
7828// Language sets the optional parameter "language": The preferred
7829// language to use for strings returned by this method.
7830func (c *SnapshotsGetCall) Language(language string) *SnapshotsGetCall {
7831	c.urlParams_.Set("language", language)
7832	return c
7833}
7834
7835// Fields allows partial responses to be retrieved. See
7836// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7837// for more information.
7838func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall {
7839	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7840	return c
7841}
7842
7843// IfNoneMatch sets the optional parameter which makes the operation
7844// fail if the object's ETag matches the given value. This is useful for
7845// getting updates only after the object has changed since the last
7846// request. Use googleapi.IsNotModified to check whether the response
7847// error from Do is the result of In-None-Match.
7848func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall {
7849	c.ifNoneMatch_ = entityTag
7850	return c
7851}
7852
7853// Context sets the context to be used in this call's Do method. Any
7854// pending HTTP request will be aborted if the provided context is
7855// canceled.
7856func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
7857	c.ctx_ = ctx
7858	return c
7859}
7860
7861// Header returns an http.Header that can be modified by the caller to
7862// add HTTP headers to the request.
7863func (c *SnapshotsGetCall) Header() http.Header {
7864	if c.header_ == nil {
7865		c.header_ = make(http.Header)
7866	}
7867	return c.header_
7868}
7869
7870func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
7871	reqHeaders := make(http.Header)
7872	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7873	for k, v := range c.header_ {
7874		reqHeaders[k] = v
7875	}
7876	reqHeaders.Set("User-Agent", c.s.userAgent())
7877	if c.ifNoneMatch_ != "" {
7878		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7879	}
7880	var body io.Reader = nil
7881	c.urlParams_.Set("alt", alt)
7882	c.urlParams_.Set("prettyPrint", "false")
7883	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/snapshots/{snapshotId}")
7884	urls += "?" + c.urlParams_.Encode()
7885	req, err := http.NewRequest("GET", urls, body)
7886	if err != nil {
7887		return nil, err
7888	}
7889	req.Header = reqHeaders
7890	googleapi.Expand(req.URL, map[string]string{
7891		"snapshotId": c.snapshotId,
7892	})
7893	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7894}
7895
7896// Do executes the "games.snapshots.get" call.
7897// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
7898// code is an error. Response headers are in either
7899// *Snapshot.ServerResponse.Header or (if a response was returned at
7900// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7901// to check whether the returned error was because
7902// http.StatusNotModified was returned.
7903func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
7904	gensupport.SetOptions(c.urlParams_, opts...)
7905	res, err := c.doRequest("json")
7906	if res != nil && res.StatusCode == http.StatusNotModified {
7907		if res.Body != nil {
7908			res.Body.Close()
7909		}
7910		return nil, &googleapi.Error{
7911			Code:   res.StatusCode,
7912			Header: res.Header,
7913		}
7914	}
7915	if err != nil {
7916		return nil, err
7917	}
7918	defer googleapi.CloseBody(res)
7919	if err := googleapi.CheckResponse(res); err != nil {
7920		return nil, err
7921	}
7922	ret := &Snapshot{
7923		ServerResponse: googleapi.ServerResponse{
7924			Header:         res.Header,
7925			HTTPStatusCode: res.StatusCode,
7926		},
7927	}
7928	target := &ret
7929	if err := gensupport.DecodeResponse(target, res); err != nil {
7930		return nil, err
7931	}
7932	return ret, nil
7933	// {
7934	//   "description": "Retrieves the metadata for a given snapshot ID.",
7935	//   "flatPath": "games/v1/snapshots/{snapshotId}",
7936	//   "httpMethod": "GET",
7937	//   "id": "games.snapshots.get",
7938	//   "parameterOrder": [
7939	//     "snapshotId"
7940	//   ],
7941	//   "parameters": {
7942	//     "language": {
7943	//       "description": "The preferred language to use for strings returned by this method.",
7944	//       "location": "query",
7945	//       "type": "string"
7946	//     },
7947	//     "snapshotId": {
7948	//       "description": "The ID of the snapshot.",
7949	//       "location": "path",
7950	//       "required": true,
7951	//       "type": "string"
7952	//     }
7953	//   },
7954	//   "path": "games/v1/snapshots/{snapshotId}",
7955	//   "response": {
7956	//     "$ref": "Snapshot"
7957	//   },
7958	//   "scopes": [
7959	//     "https://www.googleapis.com/auth/drive.appdata",
7960	//     "https://www.googleapis.com/auth/games"
7961	//   ]
7962	// }
7963
7964}
7965
7966// method id "games.snapshots.list":
7967
7968type SnapshotsListCall struct {
7969	s            *Service
7970	playerId     string
7971	urlParams_   gensupport.URLParams
7972	ifNoneMatch_ string
7973	ctx_         context.Context
7974	header_      http.Header
7975}
7976
7977// List: Retrieves a list of snapshots created by your application for
7978// the player corresponding to the player ID.
7979func (r *SnapshotsService) List(playerId string) *SnapshotsListCall {
7980	c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7981	c.playerId = playerId
7982	return c
7983}
7984
7985// Language sets the optional parameter "language": The preferred
7986// language to use for strings returned by this method.
7987func (c *SnapshotsListCall) Language(language string) *SnapshotsListCall {
7988	c.urlParams_.Set("language", language)
7989	return c
7990}
7991
7992// MaxResults sets the optional parameter "maxResults": The maximum
7993// number of snapshot resources to return in the response, used for
7994// paging. For any response, the actual number of snapshot resources
7995// returned may be less than the specified `maxResults`.
7996func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall {
7997	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7998	return c
7999}
8000
8001// PageToken sets the optional parameter "pageToken": The token returned
8002// by the previous request.
8003func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall {
8004	c.urlParams_.Set("pageToken", pageToken)
8005	return c
8006}
8007
8008// Fields allows partial responses to be retrieved. See
8009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8010// for more information.
8011func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall {
8012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8013	return c
8014}
8015
8016// IfNoneMatch sets the optional parameter which makes the operation
8017// fail if the object's ETag matches the given value. This is useful for
8018// getting updates only after the object has changed since the last
8019// request. Use googleapi.IsNotModified to check whether the response
8020// error from Do is the result of In-None-Match.
8021func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall {
8022	c.ifNoneMatch_ = entityTag
8023	return c
8024}
8025
8026// Context sets the context to be used in this call's Do method. Any
8027// pending HTTP request will be aborted if the provided context is
8028// canceled.
8029func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
8030	c.ctx_ = ctx
8031	return c
8032}
8033
8034// Header returns an http.Header that can be modified by the caller to
8035// add HTTP headers to the request.
8036func (c *SnapshotsListCall) Header() http.Header {
8037	if c.header_ == nil {
8038		c.header_ = make(http.Header)
8039	}
8040	return c.header_
8041}
8042
8043func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
8044	reqHeaders := make(http.Header)
8045	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8046	for k, v := range c.header_ {
8047		reqHeaders[k] = v
8048	}
8049	reqHeaders.Set("User-Agent", c.s.userAgent())
8050	if c.ifNoneMatch_ != "" {
8051		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8052	}
8053	var body io.Reader = nil
8054	c.urlParams_.Set("alt", alt)
8055	c.urlParams_.Set("prettyPrint", "false")
8056	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/snapshots")
8057	urls += "?" + c.urlParams_.Encode()
8058	req, err := http.NewRequest("GET", urls, body)
8059	if err != nil {
8060		return nil, err
8061	}
8062	req.Header = reqHeaders
8063	googleapi.Expand(req.URL, map[string]string{
8064		"playerId": c.playerId,
8065	})
8066	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8067}
8068
8069// Do executes the "games.snapshots.list" call.
8070// Exactly one of *SnapshotListResponse or error will be non-nil. Any
8071// non-2xx status code is an error. Response headers are in either
8072// *SnapshotListResponse.ServerResponse.Header or (if a response was
8073// returned at all) in error.(*googleapi.Error).Header. Use
8074// googleapi.IsNotModified to check whether the returned error was
8075// because http.StatusNotModified was returned.
8076func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotListResponse, error) {
8077	gensupport.SetOptions(c.urlParams_, opts...)
8078	res, err := c.doRequest("json")
8079	if res != nil && res.StatusCode == http.StatusNotModified {
8080		if res.Body != nil {
8081			res.Body.Close()
8082		}
8083		return nil, &googleapi.Error{
8084			Code:   res.StatusCode,
8085			Header: res.Header,
8086		}
8087	}
8088	if err != nil {
8089		return nil, err
8090	}
8091	defer googleapi.CloseBody(res)
8092	if err := googleapi.CheckResponse(res); err != nil {
8093		return nil, err
8094	}
8095	ret := &SnapshotListResponse{
8096		ServerResponse: googleapi.ServerResponse{
8097			Header:         res.Header,
8098			HTTPStatusCode: res.StatusCode,
8099		},
8100	}
8101	target := &ret
8102	if err := gensupport.DecodeResponse(target, res); err != nil {
8103		return nil, err
8104	}
8105	return ret, nil
8106	// {
8107	//   "description": "Retrieves a list of snapshots created by your application for the player corresponding to the player ID.",
8108	//   "flatPath": "games/v1/players/{playerId}/snapshots",
8109	//   "httpMethod": "GET",
8110	//   "id": "games.snapshots.list",
8111	//   "parameterOrder": [
8112	//     "playerId"
8113	//   ],
8114	//   "parameters": {
8115	//     "language": {
8116	//       "description": "The preferred language to use for strings returned by this method.",
8117	//       "location": "query",
8118	//       "type": "string"
8119	//     },
8120	//     "maxResults": {
8121	//       "description": "The maximum number of snapshot resources to return in the response, used for paging. For any response, the actual number of snapshot resources returned may be less than the specified `maxResults`.",
8122	//       "format": "int32",
8123	//       "location": "query",
8124	//       "type": "integer"
8125	//     },
8126	//     "pageToken": {
8127	//       "description": "The token returned by the previous request.",
8128	//       "location": "query",
8129	//       "type": "string"
8130	//     },
8131	//     "playerId": {
8132	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
8133	//       "location": "path",
8134	//       "required": true,
8135	//       "type": "string"
8136	//     }
8137	//   },
8138	//   "path": "games/v1/players/{playerId}/snapshots",
8139	//   "response": {
8140	//     "$ref": "SnapshotListResponse"
8141	//   },
8142	//   "scopes": [
8143	//     "https://www.googleapis.com/auth/drive.appdata",
8144	//     "https://www.googleapis.com/auth/games"
8145	//   ]
8146	// }
8147
8148}
8149
8150// Pages invokes f for each page of results.
8151// A non-nil error returned from f will halt the iteration.
8152// The provided context supersedes any context provided to the Context method.
8153func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotListResponse) error) error {
8154	c.ctx_ = ctx
8155	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8156	for {
8157		x, err := c.Do()
8158		if err != nil {
8159			return err
8160		}
8161		if err := f(x); err != nil {
8162			return err
8163		}
8164		if x.NextPageToken == "" {
8165			return nil
8166		}
8167		c.PageToken(x.NextPageToken)
8168	}
8169}
8170
8171// method id "games.snapshotsExtended.resolveSnapshotHead":
8172
8173type SnapshotsExtendedResolveSnapshotHeadCall struct {
8174	s                          *Service
8175	snapshotName               string
8176	resolvesnapshotheadrequest *ResolveSnapshotHeadRequest
8177	urlParams_                 gensupport.URLParams
8178	ctx_                       context.Context
8179	header_                    http.Header
8180}
8181
8182// ResolveSnapshotHead: Resolves any potential conflicts according to
8183// the resolution policy specified in the request and returns the
8184// snapshot head after the resolution.
8185func (r *SnapshotsExtendedService) ResolveSnapshotHead(snapshotName string, resolvesnapshotheadrequest *ResolveSnapshotHeadRequest) *SnapshotsExtendedResolveSnapshotHeadCall {
8186	c := &SnapshotsExtendedResolveSnapshotHeadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8187	c.snapshotName = snapshotName
8188	c.resolvesnapshotheadrequest = resolvesnapshotheadrequest
8189	return c
8190}
8191
8192// Fields allows partial responses to be retrieved. See
8193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8194// for more information.
8195func (c *SnapshotsExtendedResolveSnapshotHeadCall) Fields(s ...googleapi.Field) *SnapshotsExtendedResolveSnapshotHeadCall {
8196	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8197	return c
8198}
8199
8200// Context sets the context to be used in this call's Do method. Any
8201// pending HTTP request will be aborted if the provided context is
8202// canceled.
8203func (c *SnapshotsExtendedResolveSnapshotHeadCall) Context(ctx context.Context) *SnapshotsExtendedResolveSnapshotHeadCall {
8204	c.ctx_ = ctx
8205	return c
8206}
8207
8208// Header returns an http.Header that can be modified by the caller to
8209// add HTTP headers to the request.
8210func (c *SnapshotsExtendedResolveSnapshotHeadCall) Header() http.Header {
8211	if c.header_ == nil {
8212		c.header_ = make(http.Header)
8213	}
8214	return c.header_
8215}
8216
8217func (c *SnapshotsExtendedResolveSnapshotHeadCall) doRequest(alt string) (*http.Response, error) {
8218	reqHeaders := make(http.Header)
8219	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8220	for k, v := range c.header_ {
8221		reqHeaders[k] = v
8222	}
8223	reqHeaders.Set("User-Agent", c.s.userAgent())
8224	var body io.Reader = nil
8225	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resolvesnapshotheadrequest)
8226	if err != nil {
8227		return nil, err
8228	}
8229	reqHeaders.Set("Content-Type", "application/json")
8230	c.urlParams_.Set("alt", alt)
8231	c.urlParams_.Set("prettyPrint", "false")
8232	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/snapshotsExtended/{snapshotName}:resolveHead")
8233	urls += "?" + c.urlParams_.Encode()
8234	req, err := http.NewRequest("POST", urls, body)
8235	if err != nil {
8236		return nil, err
8237	}
8238	req.Header = reqHeaders
8239	googleapi.Expand(req.URL, map[string]string{
8240		"snapshotName": c.snapshotName,
8241	})
8242	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8243}
8244
8245// Do executes the "games.snapshotsExtended.resolveSnapshotHead" call.
8246// Exactly one of *ResolveSnapshotHeadResponse or error will be non-nil.
8247// Any non-2xx status code is an error. Response headers are in either
8248// *ResolveSnapshotHeadResponse.ServerResponse.Header or (if a response
8249// was returned at all) in error.(*googleapi.Error).Header. Use
8250// googleapi.IsNotModified to check whether the returned error was
8251// because http.StatusNotModified was returned.
8252func (c *SnapshotsExtendedResolveSnapshotHeadCall) Do(opts ...googleapi.CallOption) (*ResolveSnapshotHeadResponse, error) {
8253	gensupport.SetOptions(c.urlParams_, opts...)
8254	res, err := c.doRequest("json")
8255	if res != nil && res.StatusCode == http.StatusNotModified {
8256		if res.Body != nil {
8257			res.Body.Close()
8258		}
8259		return nil, &googleapi.Error{
8260			Code:   res.StatusCode,
8261			Header: res.Header,
8262		}
8263	}
8264	if err != nil {
8265		return nil, err
8266	}
8267	defer googleapi.CloseBody(res)
8268	if err := googleapi.CheckResponse(res); err != nil {
8269		return nil, err
8270	}
8271	ret := &ResolveSnapshotHeadResponse{
8272		ServerResponse: googleapi.ServerResponse{
8273			Header:         res.Header,
8274			HTTPStatusCode: res.StatusCode,
8275		},
8276	}
8277	target := &ret
8278	if err := gensupport.DecodeResponse(target, res); err != nil {
8279		return nil, err
8280	}
8281	return ret, nil
8282	// {
8283	//   "description": "Resolves any potential conflicts according to the resolution policy specified in the request and returns the snapshot head after the resolution.",
8284	//   "flatPath": "games/v1/snapshotsExtended/{snapshotName}:resolveHead",
8285	//   "httpMethod": "POST",
8286	//   "id": "games.snapshotsExtended.resolveSnapshotHead",
8287	//   "parameterOrder": [
8288	//     "snapshotName"
8289	//   ],
8290	//   "parameters": {
8291	//     "snapshotName": {
8292	//       "description": "Required. Name of the snapshot.",
8293	//       "location": "path",
8294	//       "required": true,
8295	//       "type": "string"
8296	//     }
8297	//   },
8298	//   "path": "games/v1/snapshotsExtended/{snapshotName}:resolveHead",
8299	//   "request": {
8300	//     "$ref": "ResolveSnapshotHeadRequest"
8301	//   },
8302	//   "response": {
8303	//     "$ref": "ResolveSnapshotHeadResponse"
8304	//   },
8305	//   "scopes": [
8306	//     "https://www.googleapis.com/auth/drive.appdata",
8307	//     "https://www.googleapis.com/auth/games"
8308	//   ]
8309	// }
8310
8311}
8312
8313// method id "games.stats.get":
8314
8315type StatsGetCall struct {
8316	s            *Service
8317	urlParams_   gensupport.URLParams
8318	ifNoneMatch_ string
8319	ctx_         context.Context
8320	header_      http.Header
8321}
8322
8323// Get: Returns engagement and spend statistics in this application for
8324// the currently authenticated user.
8325func (r *StatsService) Get() *StatsGetCall {
8326	c := &StatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8327	return c
8328}
8329
8330// Fields allows partial responses to be retrieved. See
8331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8332// for more information.
8333func (c *StatsGetCall) Fields(s ...googleapi.Field) *StatsGetCall {
8334	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8335	return c
8336}
8337
8338// IfNoneMatch sets the optional parameter which makes the operation
8339// fail if the object's ETag matches the given value. This is useful for
8340// getting updates only after the object has changed since the last
8341// request. Use googleapi.IsNotModified to check whether the response
8342// error from Do is the result of In-None-Match.
8343func (c *StatsGetCall) IfNoneMatch(entityTag string) *StatsGetCall {
8344	c.ifNoneMatch_ = entityTag
8345	return c
8346}
8347
8348// Context sets the context to be used in this call's Do method. Any
8349// pending HTTP request will be aborted if the provided context is
8350// canceled.
8351func (c *StatsGetCall) Context(ctx context.Context) *StatsGetCall {
8352	c.ctx_ = ctx
8353	return c
8354}
8355
8356// Header returns an http.Header that can be modified by the caller to
8357// add HTTP headers to the request.
8358func (c *StatsGetCall) Header() http.Header {
8359	if c.header_ == nil {
8360		c.header_ = make(http.Header)
8361	}
8362	return c.header_
8363}
8364
8365func (c *StatsGetCall) doRequest(alt string) (*http.Response, error) {
8366	reqHeaders := make(http.Header)
8367	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8368	for k, v := range c.header_ {
8369		reqHeaders[k] = v
8370	}
8371	reqHeaders.Set("User-Agent", c.s.userAgent())
8372	if c.ifNoneMatch_ != "" {
8373		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8374	}
8375	var body io.Reader = nil
8376	c.urlParams_.Set("alt", alt)
8377	c.urlParams_.Set("prettyPrint", "false")
8378	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/stats")
8379	urls += "?" + c.urlParams_.Encode()
8380	req, err := http.NewRequest("GET", urls, body)
8381	if err != nil {
8382		return nil, err
8383	}
8384	req.Header = reqHeaders
8385	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8386}
8387
8388// Do executes the "games.stats.get" call.
8389// Exactly one of *StatsResponse or error will be non-nil. Any non-2xx
8390// status code is an error. Response headers are in either
8391// *StatsResponse.ServerResponse.Header or (if a response was returned
8392// at all) in error.(*googleapi.Error).Header. Use
8393// googleapi.IsNotModified to check whether the returned error was
8394// because http.StatusNotModified was returned.
8395func (c *StatsGetCall) Do(opts ...googleapi.CallOption) (*StatsResponse, error) {
8396	gensupport.SetOptions(c.urlParams_, opts...)
8397	res, err := c.doRequest("json")
8398	if res != nil && res.StatusCode == http.StatusNotModified {
8399		if res.Body != nil {
8400			res.Body.Close()
8401		}
8402		return nil, &googleapi.Error{
8403			Code:   res.StatusCode,
8404			Header: res.Header,
8405		}
8406	}
8407	if err != nil {
8408		return nil, err
8409	}
8410	defer googleapi.CloseBody(res)
8411	if err := googleapi.CheckResponse(res); err != nil {
8412		return nil, err
8413	}
8414	ret := &StatsResponse{
8415		ServerResponse: googleapi.ServerResponse{
8416			Header:         res.Header,
8417			HTTPStatusCode: res.StatusCode,
8418		},
8419	}
8420	target := &ret
8421	if err := gensupport.DecodeResponse(target, res); err != nil {
8422		return nil, err
8423	}
8424	return ret, nil
8425	// {
8426	//   "description": "Returns engagement and spend statistics in this application for the currently authenticated user.",
8427	//   "flatPath": "games/v1/stats",
8428	//   "httpMethod": "GET",
8429	//   "id": "games.stats.get",
8430	//   "parameterOrder": [],
8431	//   "parameters": {},
8432	//   "path": "games/v1/stats",
8433	//   "response": {
8434	//     "$ref": "StatsResponse"
8435	//   },
8436	//   "scopes": [
8437	//     "https://www.googleapis.com/auth/games"
8438	//   ]
8439	// }
8440
8441}
8442