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