1// Package games provides access to the Google Play Game Services API.
2//
3// See https://developers.google.com/games/services/
4//
5// Usage example:
6//
7//   import "google.golang.org/api/games/v1"
8//   ...
9//   gamesService, err := games.New(oauthHttpClient)
10package games // import "google.golang.org/api/games/v1"
11
12import (
13	"bytes"
14	"encoding/json"
15	"errors"
16	"fmt"
17	context "golang.org/x/net/context"
18	ctxhttp "golang.org/x/net/context/ctxhttp"
19	gensupport "google.golang.org/api/gensupport"
20	googleapi "google.golang.org/api/googleapi"
21	"io"
22	"net/http"
23	"net/url"
24	"strconv"
25	"strings"
26)
27
28// Always reference these packages, just in case the auto-generated code
29// below doesn't.
30var _ = bytes.NewBuffer
31var _ = strconv.Itoa
32var _ = fmt.Sprintf
33var _ = json.NewDecoder
34var _ = io.Copy
35var _ = url.Parse
36var _ = gensupport.MarshalJSON
37var _ = googleapi.Version
38var _ = errors.New
39var _ = strings.Replace
40var _ = context.Canceled
41var _ = ctxhttp.Do
42
43const apiId = "games:v1"
44const apiName = "games"
45const apiVersion = "v1"
46const basePath = "https://www.googleapis.com/games/v1/"
47
48// OAuth2 scopes used by this API.
49const (
50	// View and manage its own configuration data in your Google Drive
51	DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"
52
53	// Share your Google+ profile information and view and manage your game
54	// activity
55	GamesScope = "https://www.googleapis.com/auth/games"
56
57	// Know the list of people in your circles, your age range, and language
58	PlusLoginScope = "https://www.googleapis.com/auth/plus.login"
59)
60
61func New(client *http.Client) (*Service, error) {
62	if client == nil {
63		return nil, errors.New("client is nil")
64	}
65	s := &Service{client: client, BasePath: basePath}
66	s.AchievementDefinitions = NewAchievementDefinitionsService(s)
67	s.Achievements = NewAchievementsService(s)
68	s.Applications = NewApplicationsService(s)
69	s.Events = NewEventsService(s)
70	s.Leaderboards = NewLeaderboardsService(s)
71	s.Metagame = NewMetagameService(s)
72	s.Players = NewPlayersService(s)
73	s.Pushtokens = NewPushtokensService(s)
74	s.QuestMilestones = NewQuestMilestonesService(s)
75	s.Quests = NewQuestsService(s)
76	s.Revisions = NewRevisionsService(s)
77	s.Rooms = NewRoomsService(s)
78	s.Scores = NewScoresService(s)
79	s.Snapshots = NewSnapshotsService(s)
80	s.TurnBasedMatches = NewTurnBasedMatchesService(s)
81	return s, nil
82}
83
84type Service struct {
85	client    *http.Client
86	BasePath  string // API endpoint base URL
87	UserAgent string // optional additional User-Agent fragment
88
89	AchievementDefinitions *AchievementDefinitionsService
90
91	Achievements *AchievementsService
92
93	Applications *ApplicationsService
94
95	Events *EventsService
96
97	Leaderboards *LeaderboardsService
98
99	Metagame *MetagameService
100
101	Players *PlayersService
102
103	Pushtokens *PushtokensService
104
105	QuestMilestones *QuestMilestonesService
106
107	Quests *QuestsService
108
109	Revisions *RevisionsService
110
111	Rooms *RoomsService
112
113	Scores *ScoresService
114
115	Snapshots *SnapshotsService
116
117	TurnBasedMatches *TurnBasedMatchesService
118}
119
120func (s *Service) userAgent() string {
121	if s.UserAgent == "" {
122		return googleapi.UserAgent
123	}
124	return googleapi.UserAgent + " " + s.UserAgent
125}
126
127func NewAchievementDefinitionsService(s *Service) *AchievementDefinitionsService {
128	rs := &AchievementDefinitionsService{s: s}
129	return rs
130}
131
132type AchievementDefinitionsService struct {
133	s *Service
134}
135
136func NewAchievementsService(s *Service) *AchievementsService {
137	rs := &AchievementsService{s: s}
138	return rs
139}
140
141type AchievementsService struct {
142	s *Service
143}
144
145func NewApplicationsService(s *Service) *ApplicationsService {
146	rs := &ApplicationsService{s: s}
147	return rs
148}
149
150type ApplicationsService struct {
151	s *Service
152}
153
154func NewEventsService(s *Service) *EventsService {
155	rs := &EventsService{s: s}
156	return rs
157}
158
159type EventsService struct {
160	s *Service
161}
162
163func NewLeaderboardsService(s *Service) *LeaderboardsService {
164	rs := &LeaderboardsService{s: s}
165	return rs
166}
167
168type LeaderboardsService struct {
169	s *Service
170}
171
172func NewMetagameService(s *Service) *MetagameService {
173	rs := &MetagameService{s: s}
174	return rs
175}
176
177type MetagameService struct {
178	s *Service
179}
180
181func NewPlayersService(s *Service) *PlayersService {
182	rs := &PlayersService{s: s}
183	return rs
184}
185
186type PlayersService struct {
187	s *Service
188}
189
190func NewPushtokensService(s *Service) *PushtokensService {
191	rs := &PushtokensService{s: s}
192	return rs
193}
194
195type PushtokensService struct {
196	s *Service
197}
198
199func NewQuestMilestonesService(s *Service) *QuestMilestonesService {
200	rs := &QuestMilestonesService{s: s}
201	return rs
202}
203
204type QuestMilestonesService struct {
205	s *Service
206}
207
208func NewQuestsService(s *Service) *QuestsService {
209	rs := &QuestsService{s: s}
210	return rs
211}
212
213type QuestsService struct {
214	s *Service
215}
216
217func NewRevisionsService(s *Service) *RevisionsService {
218	rs := &RevisionsService{s: s}
219	return rs
220}
221
222type RevisionsService struct {
223	s *Service
224}
225
226func NewRoomsService(s *Service) *RoomsService {
227	rs := &RoomsService{s: s}
228	return rs
229}
230
231type RoomsService struct {
232	s *Service
233}
234
235func NewScoresService(s *Service) *ScoresService {
236	rs := &ScoresService{s: s}
237	return rs
238}
239
240type ScoresService struct {
241	s *Service
242}
243
244func NewSnapshotsService(s *Service) *SnapshotsService {
245	rs := &SnapshotsService{s: s}
246	return rs
247}
248
249type SnapshotsService struct {
250	s *Service
251}
252
253func NewTurnBasedMatchesService(s *Service) *TurnBasedMatchesService {
254	rs := &TurnBasedMatchesService{s: s}
255	return rs
256}
257
258type TurnBasedMatchesService struct {
259	s *Service
260}
261
262// AchievementDefinition: This is a JSON template for an achievement
263// definition object.
264type AchievementDefinition struct {
265	// AchievementType: The type of the achievement.
266	// Possible values are:
267	// - "STANDARD" - Achievement is either locked or unlocked.
268	// - "INCREMENTAL" - Achievement is incremental.
269	AchievementType string `json:"achievementType,omitempty"`
270
271	// Description: The description of the achievement.
272	Description string `json:"description,omitempty"`
273
274	// ExperiencePoints: Experience points which will be earned when
275	// unlocking this achievement.
276	ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
277
278	// FormattedTotalSteps: The total steps for an incremental achievement
279	// as a string.
280	FormattedTotalSteps string `json:"formattedTotalSteps,omitempty"`
281
282	// Id: The ID of the achievement.
283	Id string `json:"id,omitempty"`
284
285	// InitialState: The initial state of the achievement.
286	// Possible values are:
287	// - "HIDDEN" - Achievement is hidden.
288	// - "REVEALED" - Achievement is revealed.
289	// - "UNLOCKED" - Achievement is unlocked.
290	InitialState string `json:"initialState,omitempty"`
291
292	// IsRevealedIconUrlDefault: Indicates whether the revealed icon image
293	// being returned is a default image, or is provided by the game.
294	IsRevealedIconUrlDefault bool `json:"isRevealedIconUrlDefault,omitempty"`
295
296	// IsUnlockedIconUrlDefault: Indicates whether the unlocked icon image
297	// being returned is a default image, or is game-provided.
298	IsUnlockedIconUrlDefault bool `json:"isUnlockedIconUrlDefault,omitempty"`
299
300	// Kind: Uniquely identifies the type of this resource. Value is always
301	// the fixed string games#achievementDefinition.
302	Kind string `json:"kind,omitempty"`
303
304	// Name: The name of the achievement.
305	Name string `json:"name,omitempty"`
306
307	// RevealedIconUrl: The image URL for the revealed achievement icon.
308	RevealedIconUrl string `json:"revealedIconUrl,omitempty"`
309
310	// TotalSteps: The total steps for an incremental achievement.
311	TotalSteps int64 `json:"totalSteps,omitempty"`
312
313	// UnlockedIconUrl: The image URL for the unlocked achievement icon.
314	UnlockedIconUrl string `json:"unlockedIconUrl,omitempty"`
315
316	// ForceSendFields is a list of field names (e.g. "AchievementType") to
317	// unconditionally include in API requests. By default, fields with
318	// empty values are omitted from API requests. However, any non-pointer,
319	// non-interface field appearing in ForceSendFields will be sent to the
320	// server regardless of whether the field is empty or not. This may be
321	// used to include empty fields in Patch requests.
322	ForceSendFields []string `json:"-"`
323
324	// NullFields is a list of field names (e.g. "AchievementType") to
325	// include in API requests with the JSON null value. By default, fields
326	// with empty values are omitted from API requests. However, any field
327	// with an empty value appearing in NullFields will be sent to the
328	// server as null. It is an error if a field in this list has a
329	// non-empty value. This may be used to include null fields in Patch
330	// requests.
331	NullFields []string `json:"-"`
332}
333
334func (s *AchievementDefinition) MarshalJSON() ([]byte, error) {
335	type NoMethod AchievementDefinition
336	raw := NoMethod(*s)
337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
338}
339
340// AchievementDefinitionsListResponse: This is a JSON template for a
341// list of achievement definition objects.
342type AchievementDefinitionsListResponse struct {
343	// Items: The achievement definitions.
344	Items []*AchievementDefinition `json:"items,omitempty"`
345
346	// Kind: Uniquely identifies the type of this resource. Value is always
347	// the fixed string games#achievementDefinitionsListResponse.
348	Kind string `json:"kind,omitempty"`
349
350	// NextPageToken: Token corresponding to the next page of results.
351	NextPageToken string `json:"nextPageToken,omitempty"`
352
353	// ServerResponse contains the HTTP response code and headers from the
354	// server.
355	googleapi.ServerResponse `json:"-"`
356
357	// ForceSendFields is a list of field names (e.g. "Items") to
358	// unconditionally include in API requests. By default, fields with
359	// empty values are omitted from API requests. However, any non-pointer,
360	// non-interface field appearing in ForceSendFields will be sent to the
361	// server regardless of whether the field is empty or not. This may be
362	// used to include empty fields in Patch requests.
363	ForceSendFields []string `json:"-"`
364
365	// NullFields is a list of field names (e.g. "Items") to include in API
366	// requests with the JSON null value. By default, fields with empty
367	// values are omitted from API requests. However, any field with an
368	// empty value appearing in NullFields will be sent to the server as
369	// null. It is an error if a field in this list has a non-empty value.
370	// This may be used to include null fields in Patch requests.
371	NullFields []string `json:"-"`
372}
373
374func (s *AchievementDefinitionsListResponse) MarshalJSON() ([]byte, error) {
375	type NoMethod AchievementDefinitionsListResponse
376	raw := NoMethod(*s)
377	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
378}
379
380// AchievementIncrementResponse: This is a JSON template for an
381// achievement increment response
382type AchievementIncrementResponse struct {
383	// CurrentSteps: The current steps recorded for this incremental
384	// achievement.
385	CurrentSteps int64 `json:"currentSteps,omitempty"`
386
387	// Kind: Uniquely identifies the type of this resource. Value is always
388	// the fixed string games#achievementIncrementResponse.
389	Kind string `json:"kind,omitempty"`
390
391	// NewlyUnlocked: Whether the current steps for the achievement has
392	// reached the number of steps required to unlock.
393	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
394
395	// ServerResponse contains the HTTP response code and headers from the
396	// server.
397	googleapi.ServerResponse `json:"-"`
398
399	// ForceSendFields is a list of field names (e.g. "CurrentSteps") to
400	// unconditionally include in API requests. By default, fields with
401	// empty values are omitted from API requests. However, any non-pointer,
402	// non-interface field appearing in ForceSendFields will be sent to the
403	// server regardless of whether the field is empty or not. This may be
404	// used to include empty fields in Patch requests.
405	ForceSendFields []string `json:"-"`
406
407	// NullFields is a list of field names (e.g. "CurrentSteps") to include
408	// in API requests with the JSON null value. By default, fields with
409	// empty values are omitted from API requests. However, any field with
410	// an empty value appearing in NullFields will be sent to the server as
411	// null. It is an error if a field in this list has a non-empty value.
412	// This may be used to include null fields in Patch requests.
413	NullFields []string `json:"-"`
414}
415
416func (s *AchievementIncrementResponse) MarshalJSON() ([]byte, error) {
417	type NoMethod AchievementIncrementResponse
418	raw := NoMethod(*s)
419	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
420}
421
422// AchievementRevealResponse: This is a JSON template for an achievement
423// reveal response
424type AchievementRevealResponse struct {
425	// CurrentState: The current state of the achievement for which a reveal
426	// was attempted. This might be UNLOCKED if the achievement was already
427	// unlocked.
428	// Possible values are:
429	// - "REVEALED" - Achievement is revealed.
430	// - "UNLOCKED" - Achievement is unlocked.
431	CurrentState string `json:"currentState,omitempty"`
432
433	// Kind: Uniquely identifies the type of this resource. Value is always
434	// the fixed string games#achievementRevealResponse.
435	Kind string `json:"kind,omitempty"`
436
437	// ServerResponse contains the HTTP response code and headers from the
438	// server.
439	googleapi.ServerResponse `json:"-"`
440
441	// ForceSendFields is a list of field names (e.g. "CurrentState") to
442	// unconditionally include in API requests. By default, fields with
443	// empty values are omitted from API requests. However, any non-pointer,
444	// non-interface field appearing in ForceSendFields will be sent to the
445	// server regardless of whether the field is empty or not. This may be
446	// used to include empty fields in Patch requests.
447	ForceSendFields []string `json:"-"`
448
449	// NullFields is a list of field names (e.g. "CurrentState") to include
450	// in API requests with the JSON null value. By default, fields with
451	// empty values are omitted from API requests. However, any field with
452	// an empty value appearing in NullFields will be sent to the server as
453	// null. It is an error if a field in this list has a non-empty value.
454	// This may be used to include null fields in Patch requests.
455	NullFields []string `json:"-"`
456}
457
458func (s *AchievementRevealResponse) MarshalJSON() ([]byte, error) {
459	type NoMethod AchievementRevealResponse
460	raw := NoMethod(*s)
461	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
462}
463
464// AchievementSetStepsAtLeastResponse: This is a JSON template for an
465// achievement set steps at least response.
466type AchievementSetStepsAtLeastResponse struct {
467	// CurrentSteps: The current steps recorded for this incremental
468	// achievement.
469	CurrentSteps int64 `json:"currentSteps,omitempty"`
470
471	// Kind: Uniquely identifies the type of this resource. Value is always
472	// the fixed string games#achievementSetStepsAtLeastResponse.
473	Kind string `json:"kind,omitempty"`
474
475	// NewlyUnlocked: Whether the the current steps for the achievement has
476	// reached the number of steps required to unlock.
477	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
478
479	// ServerResponse contains the HTTP response code and headers from the
480	// server.
481	googleapi.ServerResponse `json:"-"`
482
483	// ForceSendFields is a list of field names (e.g. "CurrentSteps") to
484	// unconditionally include in API requests. By default, fields with
485	// empty values are omitted from API requests. However, any non-pointer,
486	// non-interface field appearing in ForceSendFields will be sent to the
487	// server regardless of whether the field is empty or not. This may be
488	// used to include empty fields in Patch requests.
489	ForceSendFields []string `json:"-"`
490
491	// NullFields is a list of field names (e.g. "CurrentSteps") to include
492	// in API requests with the JSON null value. By default, fields with
493	// empty values are omitted from API requests. However, any field with
494	// an empty value appearing in NullFields will be sent to the server as
495	// null. It is an error if a field in this list has a non-empty value.
496	// This may be used to include null fields in Patch requests.
497	NullFields []string `json:"-"`
498}
499
500func (s *AchievementSetStepsAtLeastResponse) MarshalJSON() ([]byte, error) {
501	type NoMethod AchievementSetStepsAtLeastResponse
502	raw := NoMethod(*s)
503	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
504}
505
506// AchievementUnlockResponse: This is a JSON template for an achievement
507// unlock response
508type AchievementUnlockResponse struct {
509	// Kind: Uniquely identifies the type of this resource. Value is always
510	// the fixed string games#achievementUnlockResponse.
511	Kind string `json:"kind,omitempty"`
512
513	// NewlyUnlocked: Whether this achievement was newly unlocked (that is,
514	// whether the unlock request for the achievement was the first for the
515	// player).
516	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
517
518	// ServerResponse contains the HTTP response code and headers from the
519	// server.
520	googleapi.ServerResponse `json:"-"`
521
522	// ForceSendFields is a list of field names (e.g. "Kind") to
523	// unconditionally include in API requests. By default, fields with
524	// empty values are omitted from API requests. However, any non-pointer,
525	// non-interface field appearing in ForceSendFields will be sent to the
526	// server regardless of whether the field is empty or not. This may be
527	// used to include empty fields in Patch requests.
528	ForceSendFields []string `json:"-"`
529
530	// NullFields is a list of field names (e.g. "Kind") to include in API
531	// requests with the JSON null value. By default, fields with empty
532	// values are omitted from API requests. However, any field with an
533	// empty value appearing in NullFields will be sent to the server as
534	// null. It is an error if a field in this list has a non-empty value.
535	// This may be used to include null fields in Patch requests.
536	NullFields []string `json:"-"`
537}
538
539func (s *AchievementUnlockResponse) MarshalJSON() ([]byte, error) {
540	type NoMethod AchievementUnlockResponse
541	raw := NoMethod(*s)
542	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
543}
544
545// AchievementUpdateMultipleRequest: This is a JSON template for a list
546// of achievement update requests.
547type AchievementUpdateMultipleRequest struct {
548	// Kind: Uniquely identifies the type of this resource. Value is always
549	// the fixed string games#achievementUpdateMultipleRequest.
550	Kind string `json:"kind,omitempty"`
551
552	// Updates: The individual achievement update requests.
553	Updates []*AchievementUpdateRequest `json:"updates,omitempty"`
554
555	// ForceSendFields is a list of field names (e.g. "Kind") to
556	// unconditionally include in API requests. By default, fields with
557	// empty values are omitted from API requests. However, any non-pointer,
558	// non-interface field appearing in ForceSendFields will be sent to the
559	// server regardless of whether the field is empty or not. This may be
560	// used to include empty fields in Patch requests.
561	ForceSendFields []string `json:"-"`
562
563	// NullFields is a list of field names (e.g. "Kind") to include in API
564	// requests with the JSON null value. By default, fields with empty
565	// values are omitted from API requests. However, any field with an
566	// empty value appearing in NullFields will be sent to the server as
567	// null. It is an error if a field in this list has a non-empty value.
568	// This may be used to include null fields in Patch requests.
569	NullFields []string `json:"-"`
570}
571
572func (s *AchievementUpdateMultipleRequest) MarshalJSON() ([]byte, error) {
573	type NoMethod AchievementUpdateMultipleRequest
574	raw := NoMethod(*s)
575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
576}
577
578// AchievementUpdateMultipleResponse: This is a JSON template for an
579// achievement unlock response.
580type AchievementUpdateMultipleResponse struct {
581	// Kind: Uniquely identifies the type of this resource. Value is always
582	// the fixed string games#achievementUpdateListResponse.
583	Kind string `json:"kind,omitempty"`
584
585	// UpdatedAchievements: The updated state of the achievements.
586	UpdatedAchievements []*AchievementUpdateResponse `json:"updatedAchievements,omitempty"`
587
588	// ServerResponse contains the HTTP response code and headers from the
589	// server.
590	googleapi.ServerResponse `json:"-"`
591
592	// ForceSendFields is a list of field names (e.g. "Kind") to
593	// unconditionally include in API requests. By default, fields with
594	// empty values are omitted from API requests. However, any non-pointer,
595	// non-interface field appearing in ForceSendFields will be sent to the
596	// server regardless of whether the field is empty or not. This may be
597	// used to include empty fields in Patch requests.
598	ForceSendFields []string `json:"-"`
599
600	// NullFields is a list of field names (e.g. "Kind") to include in API
601	// requests with the JSON null value. By default, fields with empty
602	// values are omitted from API requests. However, any field with an
603	// empty value appearing in NullFields will be sent to the server as
604	// null. It is an error if a field in this list has a non-empty value.
605	// This may be used to include null fields in Patch requests.
606	NullFields []string `json:"-"`
607}
608
609func (s *AchievementUpdateMultipleResponse) MarshalJSON() ([]byte, error) {
610	type NoMethod AchievementUpdateMultipleResponse
611	raw := NoMethod(*s)
612	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
613}
614
615// AchievementUpdateRequest: This is a JSON template for a request to
616// update an achievement.
617type AchievementUpdateRequest struct {
618	// AchievementId: The achievement this update is being applied to.
619	AchievementId string `json:"achievementId,omitempty"`
620
621	// IncrementPayload: The payload if an update of type INCREMENT was
622	// requested for the achievement.
623	IncrementPayload *GamesAchievementIncrement `json:"incrementPayload,omitempty"`
624
625	// Kind: Uniquely identifies the type of this resource. Value is always
626	// the fixed string games#achievementUpdateRequest.
627	Kind string `json:"kind,omitempty"`
628
629	// SetStepsAtLeastPayload: The payload if an update of type
630	// SET_STEPS_AT_LEAST was requested for the achievement.
631	SetStepsAtLeastPayload *GamesAchievementSetStepsAtLeast `json:"setStepsAtLeastPayload,omitempty"`
632
633	// UpdateType: The type of update being applied.
634	// Possible values are:
635	// - "REVEAL" - Achievement is revealed.
636	// - "UNLOCK" - Achievement is unlocked.
637	// - "INCREMENT" - Achievement is incremented.
638	// - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the
639	// passed value.
640	UpdateType string `json:"updateType,omitempty"`
641
642	// ForceSendFields is a list of field names (e.g. "AchievementId") to
643	// unconditionally include in API requests. By default, fields with
644	// empty values are omitted from API requests. However, any non-pointer,
645	// non-interface field appearing in ForceSendFields will be sent to the
646	// server regardless of whether the field is empty or not. This may be
647	// used to include empty fields in Patch requests.
648	ForceSendFields []string `json:"-"`
649
650	// NullFields is a list of field names (e.g. "AchievementId") to include
651	// in API requests with the JSON null value. By default, fields with
652	// empty values are omitted from API requests. However, any field with
653	// an empty value appearing in NullFields will be sent to the server as
654	// null. It is an error if a field in this list has a non-empty value.
655	// This may be used to include null fields in Patch requests.
656	NullFields []string `json:"-"`
657}
658
659func (s *AchievementUpdateRequest) MarshalJSON() ([]byte, error) {
660	type NoMethod AchievementUpdateRequest
661	raw := NoMethod(*s)
662	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
663}
664
665// AchievementUpdateResponse: This is a JSON template for an achievement
666// update response.
667type AchievementUpdateResponse struct {
668	// AchievementId: The achievement this update is was applied to.
669	AchievementId string `json:"achievementId,omitempty"`
670
671	// CurrentState: The current state of the achievement.
672	// Possible values are:
673	// - "HIDDEN" - Achievement is hidden.
674	// - "REVEALED" - Achievement is revealed.
675	// - "UNLOCKED" - Achievement is unlocked.
676	CurrentState string `json:"currentState,omitempty"`
677
678	// CurrentSteps: The current steps recorded for this achievement if it
679	// is incremental.
680	CurrentSteps int64 `json:"currentSteps,omitempty"`
681
682	// Kind: Uniquely identifies the type of this resource. Value is always
683	// the fixed string games#achievementUpdateResponse.
684	Kind string `json:"kind,omitempty"`
685
686	// NewlyUnlocked: Whether this achievement was newly unlocked (that is,
687	// whether the unlock request for the achievement was the first for the
688	// player).
689	NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
690
691	// UpdateOccurred: Whether the requested updates actually affected the
692	// achievement.
693	UpdateOccurred bool `json:"updateOccurred,omitempty"`
694
695	// ForceSendFields is a list of field names (e.g. "AchievementId") to
696	// unconditionally include in API requests. By default, fields with
697	// empty values are omitted from API requests. However, any non-pointer,
698	// non-interface field appearing in ForceSendFields will be sent to the
699	// server regardless of whether the field is empty or not. This may be
700	// used to include empty fields in Patch requests.
701	ForceSendFields []string `json:"-"`
702
703	// NullFields is a list of field names (e.g. "AchievementId") to include
704	// in API requests with the JSON null value. By default, fields with
705	// empty values are omitted from API requests. However, any field with
706	// an empty value appearing in NullFields will be sent to the server as
707	// null. It is an error if a field in this list has a non-empty value.
708	// This may be used to include null fields in Patch requests.
709	NullFields []string `json:"-"`
710}
711
712func (s *AchievementUpdateResponse) MarshalJSON() ([]byte, error) {
713	type NoMethod AchievementUpdateResponse
714	raw := NoMethod(*s)
715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
716}
717
718// AggregateStats: This is a JSON template for aggregate stats.
719type AggregateStats struct {
720	// Count: The number of messages sent between a pair of peers.
721	Count int64 `json:"count,omitempty,string"`
722
723	// Kind: Uniquely identifies the type of this resource. Value is always
724	// the fixed string games#aggregateStats.
725	Kind string `json:"kind,omitempty"`
726
727	// Max: The maximum amount.
728	Max int64 `json:"max,omitempty,string"`
729
730	// Min: The minimum amount.
731	Min int64 `json:"min,omitempty,string"`
732
733	// Sum: The total number of bytes sent for messages between a pair of
734	// peers.
735	Sum int64 `json:"sum,omitempty,string"`
736
737	// ForceSendFields is a list of field names (e.g. "Count") to
738	// unconditionally include in API requests. By default, fields with
739	// empty values are omitted from API requests. However, any non-pointer,
740	// non-interface field appearing in ForceSendFields will be sent to the
741	// server regardless of whether the field is empty or not. This may be
742	// used to include empty fields in Patch requests.
743	ForceSendFields []string `json:"-"`
744
745	// NullFields is a list of field names (e.g. "Count") to include in API
746	// requests with the JSON null value. By default, fields with empty
747	// values are omitted from API requests. However, any field with an
748	// empty value appearing in NullFields will be sent to the server as
749	// null. It is an error if a field in this list has a non-empty value.
750	// This may be used to include null fields in Patch requests.
751	NullFields []string `json:"-"`
752}
753
754func (s *AggregateStats) MarshalJSON() ([]byte, error) {
755	type NoMethod AggregateStats
756	raw := NoMethod(*s)
757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
758}
759
760// AnonymousPlayer: This is a JSON template for an anonymous player
761type AnonymousPlayer struct {
762	// AvatarImageUrl: The base URL for the image to display for the
763	// anonymous player.
764	AvatarImageUrl string `json:"avatarImageUrl,omitempty"`
765
766	// DisplayName: The name to display for the anonymous player.
767	DisplayName string `json:"displayName,omitempty"`
768
769	// Kind: Uniquely identifies the type of this resource. Value is always
770	// the fixed string games#anonymousPlayer.
771	Kind string `json:"kind,omitempty"`
772
773	// ForceSendFields is a list of field names (e.g. "AvatarImageUrl") to
774	// unconditionally include in API requests. By default, fields with
775	// empty values are omitted from API requests. However, any non-pointer,
776	// non-interface field appearing in ForceSendFields will be sent to the
777	// server regardless of whether the field is empty or not. This may be
778	// used to include empty fields in Patch requests.
779	ForceSendFields []string `json:"-"`
780
781	// NullFields is a list of field names (e.g. "AvatarImageUrl") to
782	// include in API requests with the JSON null value. By default, fields
783	// with empty values are omitted from API requests. However, any field
784	// with an empty value appearing in NullFields will be sent to the
785	// server as null. It is an error if a field in this list has a
786	// non-empty value. This may be used to include null fields in Patch
787	// requests.
788	NullFields []string `json:"-"`
789}
790
791func (s *AnonymousPlayer) MarshalJSON() ([]byte, error) {
792	type NoMethod AnonymousPlayer
793	raw := NoMethod(*s)
794	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
795}
796
797// Application: This is a JSON template for the Application resource.
798type Application struct {
799	// AchievementCount: The number of achievements visible to the currently
800	// authenticated player.
801	AchievementCount int64 `json:"achievement_count,omitempty"`
802
803	// Assets: The assets of the application.
804	Assets []*ImageAsset `json:"assets,omitempty"`
805
806	// Author: The author of the application.
807	Author string `json:"author,omitempty"`
808
809	// Category: The category of the application.
810	Category *ApplicationCategory `json:"category,omitempty"`
811
812	// Description: The description of the application.
813	Description string `json:"description,omitempty"`
814
815	// EnabledFeatures: A list of features that have been enabled for the
816	// application.
817	// Possible values are:
818	// - "SNAPSHOTS" - Snapshots has been enabled
819	EnabledFeatures []string `json:"enabledFeatures,omitempty"`
820
821	// Id: The ID of the application.
822	Id string `json:"id,omitempty"`
823
824	// Instances: The instances of the application.
825	Instances []*Instance `json:"instances,omitempty"`
826
827	// Kind: Uniquely identifies the type of this resource. Value is always
828	// the fixed string games#application.
829	Kind string `json:"kind,omitempty"`
830
831	// LastUpdatedTimestamp: The last updated timestamp of the application.
832	LastUpdatedTimestamp int64 `json:"lastUpdatedTimestamp,omitempty,string"`
833
834	// LeaderboardCount: The number of leaderboards visible to the currently
835	// authenticated player.
836	LeaderboardCount int64 `json:"leaderboard_count,omitempty"`
837
838	// Name: The name of the application.
839	Name string `json:"name,omitempty"`
840
841	// ThemeColor: A hint to the client UI for what color to use as an
842	// app-themed color. The color is given as an RGB triplet (e.g.
843	// "E0E0E0").
844	ThemeColor string `json:"themeColor,omitempty"`
845
846	// ServerResponse contains the HTTP response code and headers from the
847	// server.
848	googleapi.ServerResponse `json:"-"`
849
850	// ForceSendFields is a list of field names (e.g. "AchievementCount") to
851	// unconditionally include in API requests. By default, fields with
852	// empty values are omitted from API requests. However, any non-pointer,
853	// non-interface field appearing in ForceSendFields will be sent to the
854	// server regardless of whether the field is empty or not. This may be
855	// used to include empty fields in Patch requests.
856	ForceSendFields []string `json:"-"`
857
858	// NullFields is a list of field names (e.g. "AchievementCount") to
859	// include in API requests with the JSON null value. By default, fields
860	// with empty values are omitted from API requests. However, any field
861	// with an empty value appearing in NullFields will be sent to the
862	// server as null. It is an error if a field in this list has a
863	// non-empty value. This may be used to include null fields in Patch
864	// requests.
865	NullFields []string `json:"-"`
866}
867
868func (s *Application) MarshalJSON() ([]byte, error) {
869	type NoMethod Application
870	raw := NoMethod(*s)
871	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
872}
873
874// ApplicationCategory: This is a JSON template for an application
875// category object.
876type ApplicationCategory struct {
877	// Kind: Uniquely identifies the type of this resource. Value is always
878	// the fixed string games#applicationCategory.
879	Kind string `json:"kind,omitempty"`
880
881	// Primary: The primary category.
882	Primary string `json:"primary,omitempty"`
883
884	// Secondary: The secondary category.
885	Secondary string `json:"secondary,omitempty"`
886
887	// ForceSendFields is a list of field names (e.g. "Kind") to
888	// unconditionally include in API requests. By default, fields with
889	// empty values are omitted from API requests. However, any non-pointer,
890	// non-interface field appearing in ForceSendFields will be sent to the
891	// server regardless of whether the field is empty or not. This may be
892	// used to include empty fields in Patch requests.
893	ForceSendFields []string `json:"-"`
894
895	// NullFields is a list of field names (e.g. "Kind") to include in API
896	// requests with the JSON null value. By default, fields with empty
897	// values are omitted from API requests. However, any field with an
898	// empty value appearing in NullFields will be sent to the server as
899	// null. It is an error if a field in this list has a non-empty value.
900	// This may be used to include null fields in Patch requests.
901	NullFields []string `json:"-"`
902}
903
904func (s *ApplicationCategory) MarshalJSON() ([]byte, error) {
905	type NoMethod ApplicationCategory
906	raw := NoMethod(*s)
907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
908}
909
910// ApplicationVerifyResponse: This is a JSON template for a third party
911// application verification response resource.
912type ApplicationVerifyResponse struct {
913	// AlternatePlayerId: An alternate ID that was once used for the player
914	// that was issued the auth token used in this request. (This field is
915	// not normally populated.)
916	AlternatePlayerId string `json:"alternate_player_id,omitempty"`
917
918	// Kind: Uniquely identifies the type of this resource. Value is always
919	// the fixed string games#applicationVerifyResponse.
920	Kind string `json:"kind,omitempty"`
921
922	// PlayerId: The ID of the player that was issued the auth token used in
923	// this request.
924	PlayerId string `json:"player_id,omitempty"`
925
926	// ServerResponse contains the HTTP response code and headers from the
927	// server.
928	googleapi.ServerResponse `json:"-"`
929
930	// ForceSendFields is a list of field names (e.g. "AlternatePlayerId")
931	// to unconditionally include in API requests. By default, fields with
932	// empty values are omitted from API requests. However, any non-pointer,
933	// non-interface field appearing in ForceSendFields will be sent to the
934	// server regardless of whether the field is empty or not. This may be
935	// used to include empty fields in Patch requests.
936	ForceSendFields []string `json:"-"`
937
938	// NullFields is a list of field names (e.g. "AlternatePlayerId") to
939	// include in API requests with the JSON null value. By default, fields
940	// with empty values are omitted from API requests. However, any field
941	// with an empty value appearing in NullFields will be sent to the
942	// server as null. It is an error if a field in this list has a
943	// non-empty value. This may be used to include null fields in Patch
944	// requests.
945	NullFields []string `json:"-"`
946}
947
948func (s *ApplicationVerifyResponse) MarshalJSON() ([]byte, error) {
949	type NoMethod ApplicationVerifyResponse
950	raw := NoMethod(*s)
951	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
952}
953
954// Category: This is a JSON template for data related to individual game
955// categories.
956type Category struct {
957	// Category: The category name.
958	Category string `json:"category,omitempty"`
959
960	// ExperiencePoints: Experience points earned in this category.
961	ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
962
963	// Kind: Uniquely identifies the type of this resource. Value is always
964	// the fixed string games#category.
965	Kind string `json:"kind,omitempty"`
966
967	// ForceSendFields is a list of field names (e.g. "Category") to
968	// unconditionally include in API requests. By default, fields with
969	// empty values are omitted from API requests. However, any non-pointer,
970	// non-interface field appearing in ForceSendFields will be sent to the
971	// server regardless of whether the field is empty or not. This may be
972	// used to include empty fields in Patch requests.
973	ForceSendFields []string `json:"-"`
974
975	// NullFields is a list of field names (e.g. "Category") to include in
976	// API requests with the JSON null value. By default, fields with empty
977	// values are omitted from API requests. However, any field with an
978	// empty value appearing in NullFields will be sent to the server as
979	// null. It is an error if a field in this list has a non-empty value.
980	// This may be used to include null fields in Patch requests.
981	NullFields []string `json:"-"`
982}
983
984func (s *Category) MarshalJSON() ([]byte, error) {
985	type NoMethod Category
986	raw := NoMethod(*s)
987	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
988}
989
990// CategoryListResponse: This is a JSON template for a list of category
991// data objects.
992type CategoryListResponse struct {
993	// Items: The list of categories with usage data.
994	Items []*Category `json:"items,omitempty"`
995
996	// Kind: Uniquely identifies the type of this resource. Value is always
997	// the fixed string games#categoryListResponse.
998	Kind string `json:"kind,omitempty"`
999
1000	// NextPageToken: Token corresponding to the next page of results.
1001	NextPageToken string `json:"nextPageToken,omitempty"`
1002
1003	// ServerResponse contains the HTTP response code and headers from the
1004	// server.
1005	googleapi.ServerResponse `json:"-"`
1006
1007	// ForceSendFields is a list of field names (e.g. "Items") to
1008	// unconditionally include in API requests. By default, fields with
1009	// empty values are omitted from API requests. However, any non-pointer,
1010	// non-interface field appearing in ForceSendFields will be sent to the
1011	// server regardless of whether the field is empty or not. This may be
1012	// used to include empty fields in Patch requests.
1013	ForceSendFields []string `json:"-"`
1014
1015	// NullFields is a list of field names (e.g. "Items") to include in API
1016	// requests with the JSON null value. By default, fields with empty
1017	// values are omitted from API requests. However, any field with an
1018	// empty value appearing in NullFields will be sent to the server as
1019	// null. It is an error if a field in this list has a non-empty value.
1020	// This may be used to include null fields in Patch requests.
1021	NullFields []string `json:"-"`
1022}
1023
1024func (s *CategoryListResponse) MarshalJSON() ([]byte, error) {
1025	type NoMethod CategoryListResponse
1026	raw := NoMethod(*s)
1027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1028}
1029
1030// EventBatchRecordFailure: This is a JSON template for a batch update
1031// failure resource.
1032type EventBatchRecordFailure struct {
1033	// FailureCause: The cause for the update failure.
1034	// Possible values are:
1035	// - "TOO_LARGE": A batch request was issued with more events than are
1036	// allowed in a single batch.
1037	// - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the
1038	// past to record.
1039	// - "TIME_PERIOD_SHORT": A batch was sent with a time range that was
1040	// too short.
1041	// - "TIME_PERIOD_LONG": A batch was sent with a time range that was too
1042	// long.
1043	// - "ALREADY_UPDATED": An attempt was made to record a batch of data
1044	// which was already seen.
1045	// - "RECORD_RATE_HIGH": An attempt was made to record data faster than
1046	// the server will apply updates.
1047	FailureCause string `json:"failureCause,omitempty"`
1048
1049	// Kind: Uniquely identifies the type of this resource. Value is always
1050	// the fixed string games#eventBatchRecordFailure.
1051	Kind string `json:"kind,omitempty"`
1052
1053	// Range: The time range which was rejected; empty for a request-wide
1054	// failure.
1055	Range *EventPeriodRange `json:"range,omitempty"`
1056
1057	// ForceSendFields is a list of field names (e.g. "FailureCause") to
1058	// unconditionally include in API requests. By default, fields with
1059	// empty values are omitted from API requests. However, any non-pointer,
1060	// non-interface field appearing in ForceSendFields will be sent to the
1061	// server regardless of whether the field is empty or not. This may be
1062	// used to include empty fields in Patch requests.
1063	ForceSendFields []string `json:"-"`
1064
1065	// NullFields is a list of field names (e.g. "FailureCause") to include
1066	// in API requests with the JSON null value. By default, fields with
1067	// empty values are omitted from API requests. However, any field with
1068	// an empty value appearing in NullFields will be sent to the server as
1069	// null. It is an error if a field in this list has a non-empty value.
1070	// This may be used to include null fields in Patch requests.
1071	NullFields []string `json:"-"`
1072}
1073
1074func (s *EventBatchRecordFailure) MarshalJSON() ([]byte, error) {
1075	type NoMethod EventBatchRecordFailure
1076	raw := NoMethod(*s)
1077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1078}
1079
1080// EventChild: This is a JSON template for an event child relationship
1081// resource.
1082type EventChild struct {
1083	// ChildId: The ID of the child event.
1084	ChildId string `json:"childId,omitempty"`
1085
1086	// Kind: Uniquely identifies the type of this resource. Value is always
1087	// the fixed string games#eventChild.
1088	Kind string `json:"kind,omitempty"`
1089
1090	// ForceSendFields is a list of field names (e.g. "ChildId") to
1091	// unconditionally include in API requests. By default, fields with
1092	// empty values are omitted from API requests. However, any non-pointer,
1093	// non-interface field appearing in ForceSendFields will be sent to the
1094	// server regardless of whether the field is empty or not. This may be
1095	// used to include empty fields in Patch requests.
1096	ForceSendFields []string `json:"-"`
1097
1098	// NullFields is a list of field names (e.g. "ChildId") to include in
1099	// API requests with the JSON null value. By default, fields with empty
1100	// values are omitted from API requests. However, any field with an
1101	// empty value appearing in NullFields will be sent to the server as
1102	// null. It is an error if a field in this list has a non-empty value.
1103	// This may be used to include null fields in Patch requests.
1104	NullFields []string `json:"-"`
1105}
1106
1107func (s *EventChild) MarshalJSON() ([]byte, error) {
1108	type NoMethod EventChild
1109	raw := NoMethod(*s)
1110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1111}
1112
1113// EventDefinition: This is a JSON template for an event definition
1114// resource.
1115type EventDefinition struct {
1116	// ChildEvents: A list of events that are a child of this event.
1117	ChildEvents []*EventChild `json:"childEvents,omitempty"`
1118
1119	// Description: Description of what this event represents.
1120	Description string `json:"description,omitempty"`
1121
1122	// DisplayName: The name to display for the event.
1123	DisplayName string `json:"displayName,omitempty"`
1124
1125	// Id: The ID of the event.
1126	Id string `json:"id,omitempty"`
1127
1128	// ImageUrl: The base URL for the image that represents the event.
1129	ImageUrl string `json:"imageUrl,omitempty"`
1130
1131	// IsDefaultImageUrl: Indicates whether the icon image being returned is
1132	// a default image, or is game-provided.
1133	IsDefaultImageUrl bool `json:"isDefaultImageUrl,omitempty"`
1134
1135	// Kind: Uniquely identifies the type of this resource. Value is always
1136	// the fixed string games#eventDefinition.
1137	Kind string `json:"kind,omitempty"`
1138
1139	// Visibility: The visibility of event being tracked in this
1140	// definition.
1141	// Possible values are:
1142	// - "REVEALED": This event should be visible to all users.
1143	// - "HIDDEN": This event should only be shown to users that have
1144	// recorded this event at least once.
1145	Visibility string `json:"visibility,omitempty"`
1146
1147	// ForceSendFields is a list of field names (e.g. "ChildEvents") to
1148	// unconditionally include in API requests. By default, fields with
1149	// empty values are omitted from API requests. However, any non-pointer,
1150	// non-interface field appearing in ForceSendFields will be sent to the
1151	// server regardless of whether the field is empty or not. This may be
1152	// used to include empty fields in Patch requests.
1153	ForceSendFields []string `json:"-"`
1154
1155	// NullFields is a list of field names (e.g. "ChildEvents") to include
1156	// in API requests with the JSON null value. By default, fields with
1157	// empty values are omitted from API requests. However, any field with
1158	// an empty value appearing in NullFields will be sent to the server as
1159	// null. It is an error if a field in this list has a non-empty value.
1160	// This may be used to include null fields in Patch requests.
1161	NullFields []string `json:"-"`
1162}
1163
1164func (s *EventDefinition) MarshalJSON() ([]byte, error) {
1165	type NoMethod EventDefinition
1166	raw := NoMethod(*s)
1167	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1168}
1169
1170// EventDefinitionListResponse: This is a JSON template for a
1171// ListDefinitions response.
1172type EventDefinitionListResponse struct {
1173	// Items: The event definitions.
1174	Items []*EventDefinition `json:"items,omitempty"`
1175
1176	// Kind: Uniquely identifies the type of this resource. Value is always
1177	// the fixed string games#eventDefinitionListResponse.
1178	Kind string `json:"kind,omitempty"`
1179
1180	// NextPageToken: The pagination token for the next page of results.
1181	NextPageToken string `json:"nextPageToken,omitempty"`
1182
1183	// ServerResponse contains the HTTP response code and headers from the
1184	// server.
1185	googleapi.ServerResponse `json:"-"`
1186
1187	// ForceSendFields is a list of field names (e.g. "Items") to
1188	// unconditionally include in API requests. By default, fields with
1189	// empty values are omitted from API requests. However, any non-pointer,
1190	// non-interface field appearing in ForceSendFields will be sent to the
1191	// server regardless of whether the field is empty or not. This may be
1192	// used to include empty fields in Patch requests.
1193	ForceSendFields []string `json:"-"`
1194
1195	// NullFields is a list of field names (e.g. "Items") to include in API
1196	// requests with the JSON null value. By default, fields with empty
1197	// values are omitted from API requests. However, any field with an
1198	// empty value appearing in NullFields will be sent to the server as
1199	// null. It is an error if a field in this list has a non-empty value.
1200	// This may be used to include null fields in Patch requests.
1201	NullFields []string `json:"-"`
1202}
1203
1204func (s *EventDefinitionListResponse) MarshalJSON() ([]byte, error) {
1205	type NoMethod EventDefinitionListResponse
1206	raw := NoMethod(*s)
1207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1208}
1209
1210// EventPeriodRange: This is a JSON template for an event period time
1211// range.
1212type EventPeriodRange struct {
1213	// Kind: Uniquely identifies the type of this resource. Value is always
1214	// the fixed string games#eventPeriodRange.
1215	Kind string `json:"kind,omitempty"`
1216
1217	// PeriodEndMillis: The time when this update period ends, in millis,
1218	// since 1970 UTC (Unix Epoch).
1219	PeriodEndMillis int64 `json:"periodEndMillis,omitempty,string"`
1220
1221	// PeriodStartMillis: The time when this update period begins, in
1222	// millis, since 1970 UTC (Unix Epoch).
1223	PeriodStartMillis int64 `json:"periodStartMillis,omitempty,string"`
1224
1225	// ForceSendFields is a list of field names (e.g. "Kind") to
1226	// unconditionally include in API requests. By default, fields with
1227	// empty values are omitted from API requests. However, any non-pointer,
1228	// non-interface field appearing in ForceSendFields will be sent to the
1229	// server regardless of whether the field is empty or not. This may be
1230	// used to include empty fields in Patch requests.
1231	ForceSendFields []string `json:"-"`
1232
1233	// NullFields is a list of field names (e.g. "Kind") to include in API
1234	// requests with the JSON null value. By default, fields with empty
1235	// values are omitted from API requests. However, any field with an
1236	// empty value appearing in NullFields will be sent to the server as
1237	// null. It is an error if a field in this list has a non-empty value.
1238	// This may be used to include null fields in Patch requests.
1239	NullFields []string `json:"-"`
1240}
1241
1242func (s *EventPeriodRange) MarshalJSON() ([]byte, error) {
1243	type NoMethod EventPeriodRange
1244	raw := NoMethod(*s)
1245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1246}
1247
1248// EventPeriodUpdate: This is a JSON template for an event period update
1249// resource.
1250type EventPeriodUpdate struct {
1251	// Kind: Uniquely identifies the type of this resource. Value is always
1252	// the fixed string games#eventPeriodUpdate.
1253	Kind string `json:"kind,omitempty"`
1254
1255	// TimePeriod: The time period being covered by this update.
1256	TimePeriod *EventPeriodRange `json:"timePeriod,omitempty"`
1257
1258	// Updates: The updates being made for this time period.
1259	Updates []*EventUpdateRequest `json:"updates,omitempty"`
1260
1261	// ForceSendFields is a list of field names (e.g. "Kind") to
1262	// unconditionally include in API requests. By default, fields with
1263	// empty values are omitted from API requests. However, any non-pointer,
1264	// non-interface field appearing in ForceSendFields will be sent to the
1265	// server regardless of whether the field is empty or not. This may be
1266	// used to include empty fields in Patch requests.
1267	ForceSendFields []string `json:"-"`
1268
1269	// NullFields is a list of field names (e.g. "Kind") to include in API
1270	// requests with the JSON null value. By default, fields with empty
1271	// values are omitted from API requests. However, any field with an
1272	// empty value appearing in NullFields will be sent to the server as
1273	// null. It is an error if a field in this list has a non-empty value.
1274	// This may be used to include null fields in Patch requests.
1275	NullFields []string `json:"-"`
1276}
1277
1278func (s *EventPeriodUpdate) MarshalJSON() ([]byte, error) {
1279	type NoMethod EventPeriodUpdate
1280	raw := NoMethod(*s)
1281	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1282}
1283
1284// EventRecordFailure: This is a JSON template for an event update
1285// failure resource.
1286type EventRecordFailure struct {
1287	// EventId: The ID of the event that was not updated.
1288	EventId string `json:"eventId,omitempty"`
1289
1290	// FailureCause: The cause for the update failure.
1291	// Possible values are:
1292	// - "NOT_FOUND" - An attempt was made to set an event that was not
1293	// defined.
1294	// - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event
1295	// by a non-positive value.
1296	FailureCause string `json:"failureCause,omitempty"`
1297
1298	// Kind: Uniquely identifies the type of this resource. Value is always
1299	// the fixed string games#eventRecordFailure.
1300	Kind string `json:"kind,omitempty"`
1301
1302	// ForceSendFields is a list of field names (e.g. "EventId") to
1303	// unconditionally include in API requests. By default, fields with
1304	// empty values are omitted from API requests. However, any non-pointer,
1305	// non-interface field appearing in ForceSendFields will be sent to the
1306	// server regardless of whether the field is empty or not. This may be
1307	// used to include empty fields in Patch requests.
1308	ForceSendFields []string `json:"-"`
1309
1310	// NullFields is a list of field names (e.g. "EventId") to include in
1311	// API requests with the JSON null value. By default, fields with empty
1312	// values are omitted from API requests. However, any field with an
1313	// empty value appearing in NullFields will be sent to the server as
1314	// null. It is an error if a field in this list has a non-empty value.
1315	// This may be used to include null fields in Patch requests.
1316	NullFields []string `json:"-"`
1317}
1318
1319func (s *EventRecordFailure) MarshalJSON() ([]byte, error) {
1320	type NoMethod EventRecordFailure
1321	raw := NoMethod(*s)
1322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1323}
1324
1325// EventRecordRequest: This is a JSON template for an event period
1326// update resource.
1327type EventRecordRequest struct {
1328	// CurrentTimeMillis: The current time when this update was sent, in
1329	// milliseconds, since 1970 UTC (Unix Epoch).
1330	CurrentTimeMillis int64 `json:"currentTimeMillis,omitempty,string"`
1331
1332	// Kind: Uniquely identifies the type of this resource. Value is always
1333	// the fixed string games#eventRecordRequest.
1334	Kind string `json:"kind,omitempty"`
1335
1336	// RequestId: The request ID used to identify this attempt to record
1337	// events.
1338	RequestId int64 `json:"requestId,omitempty,string"`
1339
1340	// TimePeriods: A list of the time period updates being made in this
1341	// request.
1342	TimePeriods []*EventPeriodUpdate `json:"timePeriods,omitempty"`
1343
1344	// ForceSendFields is a list of field names (e.g. "CurrentTimeMillis")
1345	// to unconditionally include in API requests. By default, fields with
1346	// empty values are omitted from API requests. However, any non-pointer,
1347	// non-interface field appearing in ForceSendFields will be sent to the
1348	// server regardless of whether the field is empty or not. This may be
1349	// used to include empty fields in Patch requests.
1350	ForceSendFields []string `json:"-"`
1351
1352	// NullFields is a list of field names (e.g. "CurrentTimeMillis") to
1353	// include in API requests with the JSON null value. By default, fields
1354	// with empty values are omitted from API requests. However, any field
1355	// with an empty value appearing in NullFields will be sent to the
1356	// server as null. It is an error if a field in this list has a
1357	// non-empty value. This may be used to include null fields in Patch
1358	// requests.
1359	NullFields []string `json:"-"`
1360}
1361
1362func (s *EventRecordRequest) MarshalJSON() ([]byte, error) {
1363	type NoMethod EventRecordRequest
1364	raw := NoMethod(*s)
1365	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1366}
1367
1368// EventUpdateRequest: This is a JSON template for an event period
1369// update resource.
1370type EventUpdateRequest struct {
1371	// DefinitionId: The ID of the event being modified in this update.
1372	DefinitionId string `json:"definitionId,omitempty"`
1373
1374	// Kind: Uniquely identifies the type of this resource. Value is always
1375	// the fixed string games#eventUpdateRequest.
1376	Kind string `json:"kind,omitempty"`
1377
1378	// UpdateCount: The number of times this event occurred in this time
1379	// period.
1380	UpdateCount int64 `json:"updateCount,omitempty,string"`
1381
1382	// ForceSendFields is a list of field names (e.g. "DefinitionId") to
1383	// unconditionally include in API requests. By default, fields with
1384	// empty values are omitted from API requests. However, any non-pointer,
1385	// non-interface field appearing in ForceSendFields will be sent to the
1386	// server regardless of whether the field is empty or not. This may be
1387	// used to include empty fields in Patch requests.
1388	ForceSendFields []string `json:"-"`
1389
1390	// NullFields is a list of field names (e.g. "DefinitionId") to include
1391	// in API requests with the JSON null value. By default, fields with
1392	// empty values are omitted from API requests. However, any field with
1393	// an empty value appearing in NullFields will be sent to the server as
1394	// null. It is an error if a field in this list has a non-empty value.
1395	// This may be used to include null fields in Patch requests.
1396	NullFields []string `json:"-"`
1397}
1398
1399func (s *EventUpdateRequest) MarshalJSON() ([]byte, error) {
1400	type NoMethod EventUpdateRequest
1401	raw := NoMethod(*s)
1402	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1403}
1404
1405// EventUpdateResponse: This is a JSON template for an event period
1406// update resource.
1407type EventUpdateResponse struct {
1408	// BatchFailures: Any batch-wide failures which occurred applying
1409	// updates.
1410	BatchFailures []*EventBatchRecordFailure `json:"batchFailures,omitempty"`
1411
1412	// EventFailures: Any failures updating a particular event.
1413	EventFailures []*EventRecordFailure `json:"eventFailures,omitempty"`
1414
1415	// Kind: Uniquely identifies the type of this resource. Value is always
1416	// the fixed string games#eventUpdateResponse.
1417	Kind string `json:"kind,omitempty"`
1418
1419	// PlayerEvents: The current status of any updated events
1420	PlayerEvents []*PlayerEvent `json:"playerEvents,omitempty"`
1421
1422	// ServerResponse contains the HTTP response code and headers from the
1423	// server.
1424	googleapi.ServerResponse `json:"-"`
1425
1426	// ForceSendFields is a list of field names (e.g. "BatchFailures") to
1427	// unconditionally include in API requests. By default, fields with
1428	// empty values are omitted from API requests. However, any non-pointer,
1429	// non-interface field appearing in ForceSendFields will be sent to the
1430	// server regardless of whether the field is empty or not. This may be
1431	// used to include empty fields in Patch requests.
1432	ForceSendFields []string `json:"-"`
1433
1434	// NullFields is a list of field names (e.g. "BatchFailures") to include
1435	// in API requests with the JSON null value. By default, fields with
1436	// empty values are omitted from API requests. However, any field with
1437	// an empty value appearing in NullFields will be sent to the server as
1438	// null. It is an error if a field in this list has a non-empty value.
1439	// This may be used to include null fields in Patch requests.
1440	NullFields []string `json:"-"`
1441}
1442
1443func (s *EventUpdateResponse) MarshalJSON() ([]byte, error) {
1444	type NoMethod EventUpdateResponse
1445	raw := NoMethod(*s)
1446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1447}
1448
1449// GamesAchievementIncrement: This is a JSON template for the payload to
1450// request to increment an achievement.
1451type GamesAchievementIncrement struct {
1452	// Kind: Uniquely identifies the type of this resource. Value is always
1453	// the fixed string games#GamesAchievementIncrement.
1454	Kind string `json:"kind,omitempty"`
1455
1456	// RequestId: The requestId associated with an increment to an
1457	// achievement.
1458	RequestId int64 `json:"requestId,omitempty,string"`
1459
1460	// Steps: The number of steps to be incremented.
1461	Steps int64 `json:"steps,omitempty"`
1462
1463	// ForceSendFields is a list of field names (e.g. "Kind") to
1464	// unconditionally include in API requests. By default, fields with
1465	// empty values are omitted from API requests. However, any non-pointer,
1466	// non-interface field appearing in ForceSendFields will be sent to the
1467	// server regardless of whether the field is empty or not. This may be
1468	// used to include empty fields in Patch requests.
1469	ForceSendFields []string `json:"-"`
1470
1471	// NullFields is a list of field names (e.g. "Kind") to include in API
1472	// requests with the JSON null value. By default, fields with empty
1473	// values are omitted from API requests. However, any field with an
1474	// empty value appearing in NullFields will be sent to the server as
1475	// null. It is an error if a field in this list has a non-empty value.
1476	// This may be used to include null fields in Patch requests.
1477	NullFields []string `json:"-"`
1478}
1479
1480func (s *GamesAchievementIncrement) MarshalJSON() ([]byte, error) {
1481	type NoMethod GamesAchievementIncrement
1482	raw := NoMethod(*s)
1483	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1484}
1485
1486// GamesAchievementSetStepsAtLeast: This is a JSON template for the
1487// payload to request to increment an achievement.
1488type GamesAchievementSetStepsAtLeast struct {
1489	// Kind: Uniquely identifies the type of this resource. Value is always
1490	// the fixed string games#GamesAchievementSetStepsAtLeast.
1491	Kind string `json:"kind,omitempty"`
1492
1493	// Steps: The minimum number of steps for the achievement to be set to.
1494	Steps int64 `json:"steps,omitempty"`
1495
1496	// ForceSendFields is a list of field names (e.g. "Kind") to
1497	// unconditionally include in API requests. By default, fields with
1498	// empty values are omitted from API requests. However, any non-pointer,
1499	// non-interface field appearing in ForceSendFields will be sent to the
1500	// server regardless of whether the field is empty or not. This may be
1501	// used to include empty fields in Patch requests.
1502	ForceSendFields []string `json:"-"`
1503
1504	// NullFields is a list of field names (e.g. "Kind") to include in API
1505	// requests with the JSON null value. By default, fields with empty
1506	// values are omitted from API requests. However, any field with an
1507	// empty value appearing in NullFields will be sent to the server as
1508	// null. It is an error if a field in this list has a non-empty value.
1509	// This may be used to include null fields in Patch requests.
1510	NullFields []string `json:"-"`
1511}
1512
1513func (s *GamesAchievementSetStepsAtLeast) MarshalJSON() ([]byte, error) {
1514	type NoMethod GamesAchievementSetStepsAtLeast
1515	raw := NoMethod(*s)
1516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1517}
1518
1519// ImageAsset: This is a JSON template for an image asset object.
1520type ImageAsset struct {
1521	// Height: The height of the asset.
1522	Height int64 `json:"height,omitempty"`
1523
1524	// Kind: Uniquely identifies the type of this resource. Value is always
1525	// the fixed string games#imageAsset.
1526	Kind string `json:"kind,omitempty"`
1527
1528	// Name: The name of the asset.
1529	Name string `json:"name,omitempty"`
1530
1531	// Url: The URL of the asset.
1532	Url string `json:"url,omitempty"`
1533
1534	// Width: The width of the asset.
1535	Width int64 `json:"width,omitempty"`
1536
1537	// ForceSendFields is a list of field names (e.g. "Height") to
1538	// unconditionally include in API requests. By default, fields with
1539	// empty values are omitted from API requests. However, any non-pointer,
1540	// non-interface field appearing in ForceSendFields will be sent to the
1541	// server regardless of whether the field is empty or not. This may be
1542	// used to include empty fields in Patch requests.
1543	ForceSendFields []string `json:"-"`
1544
1545	// NullFields is a list of field names (e.g. "Height") to include in API
1546	// requests with the JSON null value. By default, fields with empty
1547	// values are omitted from API requests. However, any field with an
1548	// empty value appearing in NullFields will be sent to the server as
1549	// null. It is an error if a field in this list has a non-empty value.
1550	// This may be used to include null fields in Patch requests.
1551	NullFields []string `json:"-"`
1552}
1553
1554func (s *ImageAsset) MarshalJSON() ([]byte, error) {
1555	type NoMethod ImageAsset
1556	raw := NoMethod(*s)
1557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1558}
1559
1560// Instance: This is a JSON template for the Instance resource.
1561type Instance struct {
1562	// AcquisitionUri: URI which shows where a user can acquire this
1563	// instance.
1564	AcquisitionUri string `json:"acquisitionUri,omitempty"`
1565
1566	// AndroidInstance: Platform dependent details for Android.
1567	AndroidInstance *InstanceAndroidDetails `json:"androidInstance,omitempty"`
1568
1569	// IosInstance: Platform dependent details for iOS.
1570	IosInstance *InstanceIosDetails `json:"iosInstance,omitempty"`
1571
1572	// Kind: Uniquely identifies the type of this resource. Value is always
1573	// the fixed string games#instance.
1574	Kind string `json:"kind,omitempty"`
1575
1576	// Name: Localized display name.
1577	Name string `json:"name,omitempty"`
1578
1579	// PlatformType: The platform type.
1580	// Possible values are:
1581	// - "ANDROID" - Instance is for Android.
1582	// - "IOS" - Instance is for iOS
1583	// - "WEB_APP" - Instance is for Web App.
1584	PlatformType string `json:"platformType,omitempty"`
1585
1586	// RealtimePlay: Flag to show if this game instance supports realtime
1587	// play.
1588	RealtimePlay bool `json:"realtimePlay,omitempty"`
1589
1590	// TurnBasedPlay: Flag to show if this game instance supports turn based
1591	// play.
1592	TurnBasedPlay bool `json:"turnBasedPlay,omitempty"`
1593
1594	// WebInstance: Platform dependent details for Web.
1595	WebInstance *InstanceWebDetails `json:"webInstance,omitempty"`
1596
1597	// ForceSendFields is a list of field names (e.g. "AcquisitionUri") to
1598	// unconditionally include in API requests. By default, fields with
1599	// empty values are omitted from API requests. However, any non-pointer,
1600	// non-interface field appearing in ForceSendFields will be sent to the
1601	// server regardless of whether the field is empty or not. This may be
1602	// used to include empty fields in Patch requests.
1603	ForceSendFields []string `json:"-"`
1604
1605	// NullFields is a list of field names (e.g. "AcquisitionUri") to
1606	// include in API requests with the JSON null value. By default, fields
1607	// with empty values are omitted from API requests. However, any field
1608	// with an empty value appearing in NullFields will be sent to the
1609	// server as null. It is an error if a field in this list has a
1610	// non-empty value. This may be used to include null fields in Patch
1611	// requests.
1612	NullFields []string `json:"-"`
1613}
1614
1615func (s *Instance) MarshalJSON() ([]byte, error) {
1616	type NoMethod Instance
1617	raw := NoMethod(*s)
1618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1619}
1620
1621// InstanceAndroidDetails: This is a JSON template for the Android
1622// instance details resource.
1623type InstanceAndroidDetails struct {
1624	// EnablePiracyCheck: Flag indicating whether the anti-piracy check is
1625	// enabled.
1626	EnablePiracyCheck bool `json:"enablePiracyCheck,omitempty"`
1627
1628	// Kind: Uniquely identifies the type of this resource. Value is always
1629	// the fixed string games#instanceAndroidDetails.
1630	Kind string `json:"kind,omitempty"`
1631
1632	// PackageName: Android package name which maps to Google Play URL.
1633	PackageName string `json:"packageName,omitempty"`
1634
1635	// Preferred: Indicates that this instance is the default for new
1636	// installations.
1637	Preferred bool `json:"preferred,omitempty"`
1638
1639	// ForceSendFields is a list of field names (e.g. "EnablePiracyCheck")
1640	// to unconditionally include in API requests. By default, fields with
1641	// empty values are omitted from API requests. However, any non-pointer,
1642	// non-interface field appearing in ForceSendFields will be sent to the
1643	// server regardless of whether the field is empty or not. This may be
1644	// used to include empty fields in Patch requests.
1645	ForceSendFields []string `json:"-"`
1646
1647	// NullFields is a list of field names (e.g. "EnablePiracyCheck") to
1648	// include in API requests with the JSON null value. By default, fields
1649	// with empty values are omitted from API requests. However, any field
1650	// with an empty value appearing in NullFields will be sent to the
1651	// server as null. It is an error if a field in this list has a
1652	// non-empty value. This may be used to include null fields in Patch
1653	// requests.
1654	NullFields []string `json:"-"`
1655}
1656
1657func (s *InstanceAndroidDetails) MarshalJSON() ([]byte, error) {
1658	type NoMethod InstanceAndroidDetails
1659	raw := NoMethod(*s)
1660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1661}
1662
1663// InstanceIosDetails: This is a JSON template for the iOS details
1664// resource.
1665type InstanceIosDetails struct {
1666	// BundleIdentifier: Bundle identifier.
1667	BundleIdentifier string `json:"bundleIdentifier,omitempty"`
1668
1669	// ItunesAppId: iTunes App ID.
1670	ItunesAppId string `json:"itunesAppId,omitempty"`
1671
1672	// Kind: Uniquely identifies the type of this resource. Value is always
1673	// the fixed string games#instanceIosDetails.
1674	Kind string `json:"kind,omitempty"`
1675
1676	// PreferredForIpad: Indicates that this instance is the default for new
1677	// installations on iPad devices.
1678	PreferredForIpad bool `json:"preferredForIpad,omitempty"`
1679
1680	// PreferredForIphone: Indicates that this instance is the default for
1681	// new installations on iPhone devices.
1682	PreferredForIphone bool `json:"preferredForIphone,omitempty"`
1683
1684	// SupportIpad: Flag to indicate if this instance supports iPad.
1685	SupportIpad bool `json:"supportIpad,omitempty"`
1686
1687	// SupportIphone: Flag to indicate if this instance supports iPhone.
1688	SupportIphone bool `json:"supportIphone,omitempty"`
1689
1690	// ForceSendFields is a list of field names (e.g. "BundleIdentifier") to
1691	// unconditionally include in API requests. By default, fields with
1692	// empty values are omitted from API requests. However, any non-pointer,
1693	// non-interface field appearing in ForceSendFields will be sent to the
1694	// server regardless of whether the field is empty or not. This may be
1695	// used to include empty fields in Patch requests.
1696	ForceSendFields []string `json:"-"`
1697
1698	// NullFields is a list of field names (e.g. "BundleIdentifier") to
1699	// include in API requests with the JSON null value. By default, fields
1700	// with empty values are omitted from API requests. However, any field
1701	// with an empty value appearing in NullFields will be sent to the
1702	// server as null. It is an error if a field in this list has a
1703	// non-empty value. This may be used to include null fields in Patch
1704	// requests.
1705	NullFields []string `json:"-"`
1706}
1707
1708func (s *InstanceIosDetails) MarshalJSON() ([]byte, error) {
1709	type NoMethod InstanceIosDetails
1710	raw := NoMethod(*s)
1711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1712}
1713
1714// InstanceWebDetails: This is a JSON template for the Web details
1715// resource.
1716type InstanceWebDetails struct {
1717	// Kind: Uniquely identifies the type of this resource. Value is always
1718	// the fixed string games#instanceWebDetails.
1719	Kind string `json:"kind,omitempty"`
1720
1721	// LaunchUrl: Launch URL for the game.
1722	LaunchUrl string `json:"launchUrl,omitempty"`
1723
1724	// Preferred: Indicates that this instance is the default for new
1725	// installations.
1726	Preferred bool `json:"preferred,omitempty"`
1727
1728	// ForceSendFields is a list of field names (e.g. "Kind") to
1729	// unconditionally include in API requests. By default, fields with
1730	// empty values are omitted from API requests. However, any non-pointer,
1731	// non-interface field appearing in ForceSendFields will be sent to the
1732	// server regardless of whether the field is empty or not. This may be
1733	// used to include empty fields in Patch requests.
1734	ForceSendFields []string `json:"-"`
1735
1736	// NullFields is a list of field names (e.g. "Kind") to include in API
1737	// requests with the JSON null value. By default, fields with empty
1738	// values are omitted from API requests. However, any field with an
1739	// empty value appearing in NullFields will be sent to the server as
1740	// null. It is an error if a field in this list has a non-empty value.
1741	// This may be used to include null fields in Patch requests.
1742	NullFields []string `json:"-"`
1743}
1744
1745func (s *InstanceWebDetails) MarshalJSON() ([]byte, error) {
1746	type NoMethod InstanceWebDetails
1747	raw := NoMethod(*s)
1748	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1749}
1750
1751// Leaderboard: This is a JSON template for the Leaderboard resource.
1752type Leaderboard struct {
1753	// IconUrl: The icon for the leaderboard.
1754	IconUrl string `json:"iconUrl,omitempty"`
1755
1756	// Id: The leaderboard ID.
1757	Id string `json:"id,omitempty"`
1758
1759	// IsIconUrlDefault: Indicates whether the icon image being returned is
1760	// a default image, or is game-provided.
1761	IsIconUrlDefault bool `json:"isIconUrlDefault,omitempty"`
1762
1763	// Kind: Uniquely identifies the type of this resource. Value is always
1764	// the fixed string games#leaderboard.
1765	Kind string `json:"kind,omitempty"`
1766
1767	// Name: The name of the leaderboard.
1768	Name string `json:"name,omitempty"`
1769
1770	// Order: How scores are ordered.
1771	// Possible values are:
1772	// - "LARGER_IS_BETTER" - Larger values are better; scores are sorted in
1773	// descending order.
1774	// - "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted
1775	// in ascending order.
1776	Order string `json:"order,omitempty"`
1777
1778	// ServerResponse contains the HTTP response code and headers from the
1779	// server.
1780	googleapi.ServerResponse `json:"-"`
1781
1782	// ForceSendFields is a list of field names (e.g. "IconUrl") to
1783	// unconditionally include in API requests. By default, fields with
1784	// empty values are omitted from API requests. However, any non-pointer,
1785	// non-interface field appearing in ForceSendFields will be sent to the
1786	// server regardless of whether the field is empty or not. This may be
1787	// used to include empty fields in Patch requests.
1788	ForceSendFields []string `json:"-"`
1789
1790	// NullFields is a list of field names (e.g. "IconUrl") to include in
1791	// API requests with the JSON null value. By default, fields with empty
1792	// values are omitted from API requests. However, any field with an
1793	// empty value appearing in NullFields will be sent to the server as
1794	// null. It is an error if a field in this list has a non-empty value.
1795	// This may be used to include null fields in Patch requests.
1796	NullFields []string `json:"-"`
1797}
1798
1799func (s *Leaderboard) MarshalJSON() ([]byte, error) {
1800	type NoMethod Leaderboard
1801	raw := NoMethod(*s)
1802	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1803}
1804
1805// LeaderboardEntry: This is a JSON template for the Leaderboard Entry
1806// resource.
1807type LeaderboardEntry struct {
1808	// FormattedScore: The localized string for the numerical value of this
1809	// score.
1810	FormattedScore string `json:"formattedScore,omitempty"`
1811
1812	// FormattedScoreRank: The localized string for the rank of this score
1813	// for this leaderboard.
1814	FormattedScoreRank string `json:"formattedScoreRank,omitempty"`
1815
1816	// Kind: Uniquely identifies the type of this resource. Value is always
1817	// the fixed string games#leaderboardEntry.
1818	Kind string `json:"kind,omitempty"`
1819
1820	// Player: The player who holds this score.
1821	Player *Player `json:"player,omitempty"`
1822
1823	// ScoreRank: The rank of this score for this leaderboard.
1824	ScoreRank int64 `json:"scoreRank,omitempty,string"`
1825
1826	// ScoreTag: Additional information about the score. Values must contain
1827	// no more than 64 URI-safe characters as defined by section 2.3 of RFC
1828	// 3986.
1829	ScoreTag string `json:"scoreTag,omitempty"`
1830
1831	// ScoreValue: The numerical value of this score.
1832	ScoreValue int64 `json:"scoreValue,omitempty,string"`
1833
1834	// TimeSpan: The time span of this high score.
1835	// Possible values are:
1836	// - "ALL_TIME" - The score is an all-time high score.
1837	// - "WEEKLY" - The score is a weekly high score.
1838	// - "DAILY" - The score is a daily high score.
1839	TimeSpan string `json:"timeSpan,omitempty"`
1840
1841	// WriteTimestampMillis: The timestamp at which this score was recorded,
1842	// in milliseconds since the epoch in UTC.
1843	WriteTimestampMillis int64 `json:"writeTimestampMillis,omitempty,string"`
1844
1845	// ForceSendFields is a list of field names (e.g. "FormattedScore") to
1846	// unconditionally include in API requests. By default, fields with
1847	// empty values are omitted from API requests. However, any non-pointer,
1848	// non-interface field appearing in ForceSendFields will be sent to the
1849	// server regardless of whether the field is empty or not. This may be
1850	// used to include empty fields in Patch requests.
1851	ForceSendFields []string `json:"-"`
1852
1853	// NullFields is a list of field names (e.g. "FormattedScore") to
1854	// include in API requests with the JSON null value. By default, fields
1855	// with empty values are omitted from API requests. However, any field
1856	// with an empty value appearing in NullFields will be sent to the
1857	// server as null. It is an error if a field in this list has a
1858	// non-empty value. This may be used to include null fields in Patch
1859	// requests.
1860	NullFields []string `json:"-"`
1861}
1862
1863func (s *LeaderboardEntry) MarshalJSON() ([]byte, error) {
1864	type NoMethod LeaderboardEntry
1865	raw := NoMethod(*s)
1866	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1867}
1868
1869// LeaderboardListResponse: This is a JSON template for a list of
1870// leaderboard objects.
1871type LeaderboardListResponse struct {
1872	// Items: The leaderboards.
1873	Items []*Leaderboard `json:"items,omitempty"`
1874
1875	// Kind: Uniquely identifies the type of this resource. Value is always
1876	// the fixed string games#leaderboardListResponse.
1877	Kind string `json:"kind,omitempty"`
1878
1879	// NextPageToken: Token corresponding to the next page of results.
1880	NextPageToken string `json:"nextPageToken,omitempty"`
1881
1882	// ServerResponse contains the HTTP response code and headers from the
1883	// server.
1884	googleapi.ServerResponse `json:"-"`
1885
1886	// ForceSendFields is a list of field names (e.g. "Items") to
1887	// unconditionally include in API requests. By default, fields with
1888	// empty values are omitted from API requests. However, any non-pointer,
1889	// non-interface field appearing in ForceSendFields will be sent to the
1890	// server regardless of whether the field is empty or not. This may be
1891	// used to include empty fields in Patch requests.
1892	ForceSendFields []string `json:"-"`
1893
1894	// NullFields is a list of field names (e.g. "Items") to include in API
1895	// requests with the JSON null value. By default, fields with empty
1896	// values are omitted from API requests. However, any field with an
1897	// empty value appearing in NullFields will be sent to the server as
1898	// null. It is an error if a field in this list has a non-empty value.
1899	// This may be used to include null fields in Patch requests.
1900	NullFields []string `json:"-"`
1901}
1902
1903func (s *LeaderboardListResponse) MarshalJSON() ([]byte, error) {
1904	type NoMethod LeaderboardListResponse
1905	raw := NoMethod(*s)
1906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1907}
1908
1909// LeaderboardScoreRank: This is a JSON template for a score rank in a
1910// leaderboard.
1911type LeaderboardScoreRank struct {
1912	// FormattedNumScores: The number of scores in the leaderboard as a
1913	// string.
1914	FormattedNumScores string `json:"formattedNumScores,omitempty"`
1915
1916	// FormattedRank: The rank in the leaderboard as a string.
1917	FormattedRank string `json:"formattedRank,omitempty"`
1918
1919	// Kind: Uniquely identifies the type of this resource. Value is always
1920	// the fixed string games#leaderboardScoreRank.
1921	Kind string `json:"kind,omitempty"`
1922
1923	// NumScores: The number of scores in the leaderboard.
1924	NumScores int64 `json:"numScores,omitempty,string"`
1925
1926	// Rank: The rank in the leaderboard.
1927	Rank int64 `json:"rank,omitempty,string"`
1928
1929	// ForceSendFields is a list of field names (e.g. "FormattedNumScores")
1930	// to unconditionally include in API requests. By default, fields with
1931	// empty values are omitted from API requests. However, any non-pointer,
1932	// non-interface field appearing in ForceSendFields will be sent to the
1933	// server regardless of whether the field is empty or not. This may be
1934	// used to include empty fields in Patch requests.
1935	ForceSendFields []string `json:"-"`
1936
1937	// NullFields is a list of field names (e.g. "FormattedNumScores") to
1938	// include in API requests with the JSON null value. By default, fields
1939	// with empty values are omitted from API requests. However, any field
1940	// with an empty value appearing in NullFields will be sent to the
1941	// server as null. It is an error if a field in this list has a
1942	// non-empty value. This may be used to include null fields in Patch
1943	// requests.
1944	NullFields []string `json:"-"`
1945}
1946
1947func (s *LeaderboardScoreRank) MarshalJSON() ([]byte, error) {
1948	type NoMethod LeaderboardScoreRank
1949	raw := NoMethod(*s)
1950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1951}
1952
1953// LeaderboardScores: This is a JSON template for a ListScores response.
1954type LeaderboardScores struct {
1955	// Items: The scores in the leaderboard.
1956	Items []*LeaderboardEntry `json:"items,omitempty"`
1957
1958	// Kind: Uniquely identifies the type of this resource. Value is always
1959	// the fixed string games#leaderboardScores.
1960	Kind string `json:"kind,omitempty"`
1961
1962	// NextPageToken: The pagination token for the next page of results.
1963	NextPageToken string `json:"nextPageToken,omitempty"`
1964
1965	// NumScores: The total number of scores in the leaderboard.
1966	NumScores int64 `json:"numScores,omitempty,string"`
1967
1968	// PlayerScore: The score of the requesting player on the leaderboard.
1969	// The player's score may appear both here and in the list of scores
1970	// above. If you are viewing a public leaderboard and the player is not
1971	// sharing their gameplay information publicly, the scoreRank and
1972	// formattedScoreRank values will not be present.
1973	PlayerScore *LeaderboardEntry `json:"playerScore,omitempty"`
1974
1975	// PrevPageToken: The pagination token for the previous page of results.
1976	PrevPageToken string `json:"prevPageToken,omitempty"`
1977
1978	// ServerResponse contains the HTTP response code and headers from the
1979	// server.
1980	googleapi.ServerResponse `json:"-"`
1981
1982	// ForceSendFields is a list of field names (e.g. "Items") to
1983	// unconditionally include in API requests. By default, fields with
1984	// empty values are omitted from API requests. However, any non-pointer,
1985	// non-interface field appearing in ForceSendFields will be sent to the
1986	// server regardless of whether the field is empty or not. This may be
1987	// used to include empty fields in Patch requests.
1988	ForceSendFields []string `json:"-"`
1989
1990	// NullFields is a list of field names (e.g. "Items") to include in API
1991	// requests with the JSON null value. By default, fields with empty
1992	// values are omitted from API requests. However, any field with an
1993	// empty value appearing in NullFields will be sent to the server as
1994	// null. It is an error if a field in this list has a non-empty value.
1995	// This may be used to include null fields in Patch requests.
1996	NullFields []string `json:"-"`
1997}
1998
1999func (s *LeaderboardScores) MarshalJSON() ([]byte, error) {
2000	type NoMethod LeaderboardScores
2001	raw := NoMethod(*s)
2002	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2003}
2004
2005// MetagameConfig: This is a JSON template for the metagame config
2006// resource
2007type MetagameConfig struct {
2008	// CurrentVersion: Current version of the metagame configuration data.
2009	// When this data is updated, the version number will be increased by
2010	// one.
2011	CurrentVersion int64 `json:"currentVersion,omitempty"`
2012
2013	// Kind: Uniquely identifies the type of this resource. Value is always
2014	// the fixed string games#metagameConfig.
2015	Kind string `json:"kind,omitempty"`
2016
2017	// PlayerLevels: The list of player levels.
2018	PlayerLevels []*PlayerLevel `json:"playerLevels,omitempty"`
2019
2020	// ServerResponse contains the HTTP response code and headers from the
2021	// server.
2022	googleapi.ServerResponse `json:"-"`
2023
2024	// ForceSendFields is a list of field names (e.g. "CurrentVersion") to
2025	// unconditionally include in API requests. By default, fields with
2026	// empty values are omitted from API requests. However, any non-pointer,
2027	// non-interface field appearing in ForceSendFields will be sent to the
2028	// server regardless of whether the field is empty or not. This may be
2029	// used to include empty fields in Patch requests.
2030	ForceSendFields []string `json:"-"`
2031
2032	// NullFields is a list of field names (e.g. "CurrentVersion") to
2033	// include in API requests with the JSON null value. By default, fields
2034	// with empty values are omitted from API requests. However, any field
2035	// with an empty value appearing in NullFields will be sent to the
2036	// server as null. It is an error if a field in this list has a
2037	// non-empty value. This may be used to include null fields in Patch
2038	// requests.
2039	NullFields []string `json:"-"`
2040}
2041
2042func (s *MetagameConfig) MarshalJSON() ([]byte, error) {
2043	type NoMethod MetagameConfig
2044	raw := NoMethod(*s)
2045	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2046}
2047
2048// NetworkDiagnostics: This is a JSON template for network diagnostics
2049// reported for a client.
2050type NetworkDiagnostics struct {
2051	// AndroidNetworkSubtype: The Android network subtype.
2052	AndroidNetworkSubtype int64 `json:"androidNetworkSubtype,omitempty"`
2053
2054	// AndroidNetworkType: The Android network type.
2055	AndroidNetworkType int64 `json:"androidNetworkType,omitempty"`
2056
2057	// IosNetworkType: iOS network type as defined in Reachability.h.
2058	IosNetworkType int64 `json:"iosNetworkType,omitempty"`
2059
2060	// Kind: Uniquely identifies the type of this resource. Value is always
2061	// the fixed string games#networkDiagnostics.
2062	Kind string `json:"kind,omitempty"`
2063
2064	// NetworkOperatorCode: The MCC+MNC code for the client's network
2065	// connection. On Android:
2066	// http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperator() On iOS, see:
2067	// https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html
2068	NetworkOperatorCode string `json:"networkOperatorCode,omitempty"`
2069
2070	// NetworkOperatorName: The name of the carrier of the client's network
2071	// connection. On Android:
2072	// http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperatorName() On iOS:
2073	// https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carrierName
2074	NetworkOperatorName string `json:"networkOperatorName,omitempty"`
2075
2076	// RegistrationLatencyMillis: The amount of time in milliseconds it took
2077	// for the client to establish a connection with the XMPP server.
2078	RegistrationLatencyMillis int64 `json:"registrationLatencyMillis,omitempty"`
2079
2080	// ForceSendFields is a list of field names (e.g.
2081	// "AndroidNetworkSubtype") to unconditionally include in API requests.
2082	// By default, fields with empty values are omitted from API requests.
2083	// However, any non-pointer, non-interface field appearing in
2084	// ForceSendFields will be sent to the server regardless of whether the
2085	// field is empty or not. This may be used to include empty fields in
2086	// Patch requests.
2087	ForceSendFields []string `json:"-"`
2088
2089	// NullFields is a list of field names (e.g. "AndroidNetworkSubtype") to
2090	// include in API requests with the JSON null value. By default, fields
2091	// with empty values are omitted from API requests. However, any field
2092	// with an empty value appearing in NullFields will be sent to the
2093	// server as null. It is an error if a field in this list has a
2094	// non-empty value. This may be used to include null fields in Patch
2095	// requests.
2096	NullFields []string `json:"-"`
2097}
2098
2099func (s *NetworkDiagnostics) MarshalJSON() ([]byte, error) {
2100	type NoMethod NetworkDiagnostics
2101	raw := NoMethod(*s)
2102	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2103}
2104
2105// ParticipantResult: This is a JSON template for a result for a match
2106// participant.
2107type ParticipantResult struct {
2108	// Kind: Uniquely identifies the type of this resource. Value is always
2109	// the fixed string games#participantResult.
2110	Kind string `json:"kind,omitempty"`
2111
2112	// ParticipantId: The ID of the participant.
2113	ParticipantId string `json:"participantId,omitempty"`
2114
2115	// Placing: The placement or ranking of the participant in the match
2116	// results; a number from one to the number of participants in the
2117	// match. Multiple participants may have the same placing value in case
2118	// of a type.
2119	Placing int64 `json:"placing,omitempty"`
2120
2121	// Result: The result of the participant for this match.
2122	// Possible values are:
2123	// - "MATCH_RESULT_WIN" - The participant won the match.
2124	// - "MATCH_RESULT_LOSS" - The participant lost the match.
2125	// - "MATCH_RESULT_TIE" - The participant tied the match.
2126	// - "MATCH_RESULT_NONE" - There was no winner for the match (nobody
2127	// wins or loses this kind of game.)
2128	// - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left
2129	// during the match.
2130	// - "MATCH_RESULT_DISAGREED" - Different clients reported different
2131	// results for this participant.
2132	Result string `json:"result,omitempty"`
2133
2134	// ForceSendFields is a list of field names (e.g. "Kind") to
2135	// unconditionally include in API requests. By default, fields with
2136	// empty values are omitted from API requests. However, any non-pointer,
2137	// non-interface field appearing in ForceSendFields will be sent to the
2138	// server regardless of whether the field is empty or not. This may be
2139	// used to include empty fields in Patch requests.
2140	ForceSendFields []string `json:"-"`
2141
2142	// NullFields is a list of field names (e.g. "Kind") to include in API
2143	// requests with the JSON null value. By default, fields with empty
2144	// values are omitted from API requests. However, any field with an
2145	// empty value appearing in NullFields will be sent to the server as
2146	// null. It is an error if a field in this list has a non-empty value.
2147	// This may be used to include null fields in Patch requests.
2148	NullFields []string `json:"-"`
2149}
2150
2151func (s *ParticipantResult) MarshalJSON() ([]byte, error) {
2152	type NoMethod ParticipantResult
2153	raw := NoMethod(*s)
2154	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2155}
2156
2157// PeerChannelDiagnostics: This is a JSON template for peer channel
2158// diagnostics.
2159type PeerChannelDiagnostics struct {
2160	// BytesReceived: Number of bytes received.
2161	BytesReceived *AggregateStats `json:"bytesReceived,omitempty"`
2162
2163	// BytesSent: Number of bytes sent.
2164	BytesSent *AggregateStats `json:"bytesSent,omitempty"`
2165
2166	// Kind: Uniquely identifies the type of this resource. Value is always
2167	// the fixed string games#peerChannelDiagnostics.
2168	Kind string `json:"kind,omitempty"`
2169
2170	// NumMessagesLost: Number of messages lost.
2171	NumMessagesLost int64 `json:"numMessagesLost,omitempty"`
2172
2173	// NumMessagesReceived: Number of messages received.
2174	NumMessagesReceived int64 `json:"numMessagesReceived,omitempty"`
2175
2176	// NumMessagesSent: Number of messages sent.
2177	NumMessagesSent int64 `json:"numMessagesSent,omitempty"`
2178
2179	// NumSendFailures: Number of send failures.
2180	NumSendFailures int64 `json:"numSendFailures,omitempty"`
2181
2182	// RoundtripLatencyMillis: Roundtrip latency stats in milliseconds.
2183	RoundtripLatencyMillis *AggregateStats `json:"roundtripLatencyMillis,omitempty"`
2184
2185	// ForceSendFields is a list of field names (e.g. "BytesReceived") to
2186	// unconditionally include in API requests. By default, fields with
2187	// empty values are omitted from API requests. However, any non-pointer,
2188	// non-interface field appearing in ForceSendFields will be sent to the
2189	// server regardless of whether the field is empty or not. This may be
2190	// used to include empty fields in Patch requests.
2191	ForceSendFields []string `json:"-"`
2192
2193	// NullFields is a list of field names (e.g. "BytesReceived") to include
2194	// in API requests with the JSON null value. By default, fields with
2195	// empty values are omitted from API requests. However, any field with
2196	// an empty value appearing in NullFields will be sent to the server as
2197	// null. It is an error if a field in this list has a non-empty value.
2198	// This may be used to include null fields in Patch requests.
2199	NullFields []string `json:"-"`
2200}
2201
2202func (s *PeerChannelDiagnostics) MarshalJSON() ([]byte, error) {
2203	type NoMethod PeerChannelDiagnostics
2204	raw := NoMethod(*s)
2205	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2206}
2207
2208// PeerSessionDiagnostics: This is a JSON template for peer session
2209// diagnostics.
2210type PeerSessionDiagnostics struct {
2211	// ConnectedTimestampMillis: Connected time in milliseconds.
2212	ConnectedTimestampMillis int64 `json:"connectedTimestampMillis,omitempty,string"`
2213
2214	// Kind: Uniquely identifies the type of this resource. Value is always
2215	// the fixed string games#peerSessionDiagnostics.
2216	Kind string `json:"kind,omitempty"`
2217
2218	// ParticipantId: The participant ID of the peer.
2219	ParticipantId string `json:"participantId,omitempty"`
2220
2221	// ReliableChannel: Reliable channel diagnostics.
2222	ReliableChannel *PeerChannelDiagnostics `json:"reliableChannel,omitempty"`
2223
2224	// UnreliableChannel: Unreliable channel diagnostics.
2225	UnreliableChannel *PeerChannelDiagnostics `json:"unreliableChannel,omitempty"`
2226
2227	// ForceSendFields is a list of field names (e.g.
2228	// "ConnectedTimestampMillis") to unconditionally include in API
2229	// requests. By default, fields with empty values are omitted from API
2230	// requests. However, any non-pointer, non-interface field appearing in
2231	// ForceSendFields will be sent to the server regardless of whether the
2232	// field is empty or not. This may be used to include empty fields in
2233	// Patch requests.
2234	ForceSendFields []string `json:"-"`
2235
2236	// NullFields is a list of field names (e.g. "ConnectedTimestampMillis")
2237	// to include in API requests with the JSON null value. By default,
2238	// fields with empty values are omitted from API requests. However, any
2239	// field with an empty value appearing in NullFields will be sent to the
2240	// server as null. It is an error if a field in this list has a
2241	// non-empty value. This may be used to include null fields in Patch
2242	// requests.
2243	NullFields []string `json:"-"`
2244}
2245
2246func (s *PeerSessionDiagnostics) MarshalJSON() ([]byte, error) {
2247	type NoMethod PeerSessionDiagnostics
2248	raw := NoMethod(*s)
2249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2250}
2251
2252// Played: This is a JSON template for metadata about a player playing a
2253// game with the currently authenticated user.
2254type Played struct {
2255	// AutoMatched: True if the player was auto-matched with the currently
2256	// authenticated user.
2257	AutoMatched bool `json:"autoMatched,omitempty"`
2258
2259	// Kind: Uniquely identifies the type of this resource. Value is always
2260	// the fixed string games#played.
2261	Kind string `json:"kind,omitempty"`
2262
2263	// TimeMillis: The last time the player played the game in milliseconds
2264	// since the epoch in UTC.
2265	TimeMillis int64 `json:"timeMillis,omitempty,string"`
2266
2267	// ForceSendFields is a list of field names (e.g. "AutoMatched") to
2268	// unconditionally include in API requests. By default, fields with
2269	// empty values are omitted from API requests. However, any non-pointer,
2270	// non-interface field appearing in ForceSendFields will be sent to the
2271	// server regardless of whether the field is empty or not. This may be
2272	// used to include empty fields in Patch requests.
2273	ForceSendFields []string `json:"-"`
2274
2275	// NullFields is a list of field names (e.g. "AutoMatched") to include
2276	// in API requests with the JSON null value. By default, fields with
2277	// empty values are omitted from API requests. However, any field with
2278	// an empty value appearing in NullFields will be sent to the server as
2279	// null. It is an error if a field in this list has a non-empty value.
2280	// This may be used to include null fields in Patch requests.
2281	NullFields []string `json:"-"`
2282}
2283
2284func (s *Played) MarshalJSON() ([]byte, error) {
2285	type NoMethod Played
2286	raw := NoMethod(*s)
2287	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2288}
2289
2290// Player: This is a JSON template for a Player resource.
2291type Player struct {
2292	// AvatarImageUrl: The base URL for the image that represents the
2293	// player.
2294	AvatarImageUrl string `json:"avatarImageUrl,omitempty"`
2295
2296	// BannerUrlLandscape: The url to the landscape mode player banner
2297	// image.
2298	BannerUrlLandscape string `json:"bannerUrlLandscape,omitempty"`
2299
2300	// BannerUrlPortrait: The url to the portrait mode player banner image.
2301	BannerUrlPortrait string `json:"bannerUrlPortrait,omitempty"`
2302
2303	// DisplayName: The name to display for the player.
2304	DisplayName string `json:"displayName,omitempty"`
2305
2306	// ExperienceInfo: An object to represent Play Game experience
2307	// information for the player.
2308	ExperienceInfo *PlayerExperienceInfo `json:"experienceInfo,omitempty"`
2309
2310	// Kind: Uniquely identifies the type of this resource. Value is always
2311	// the fixed string games#player.
2312	Kind string `json:"kind,omitempty"`
2313
2314	// LastPlayedWith: Details about the last time this player played a
2315	// multiplayer game with the currently authenticated player. Populated
2316	// for PLAYED_WITH player collection members.
2317	LastPlayedWith *Played `json:"lastPlayedWith,omitempty"`
2318
2319	// Name: An object representation of the individual components of the
2320	// player's name. For some players, these fields may not be present.
2321	Name *PlayerName `json:"name,omitempty"`
2322
2323	// OriginalPlayerId: The player ID that was used for this player the
2324	// first time they signed into the game in question. This is only
2325	// populated for calls to player.get for the requesting player, only if
2326	// the player ID has subsequently changed, and only to clients that
2327	// support remapping player IDs.
2328	OriginalPlayerId string `json:"originalPlayerId,omitempty"`
2329
2330	// PlayerId: The ID of the player.
2331	PlayerId string `json:"playerId,omitempty"`
2332
2333	// ProfileSettings: The player's profile settings. Controls whether or
2334	// not the player's profile is visible to other players.
2335	ProfileSettings *ProfileSettings `json:"profileSettings,omitempty"`
2336
2337	// Title: The player's title rewarded for their game activities.
2338	Title string `json:"title,omitempty"`
2339
2340	// ServerResponse contains the HTTP response code and headers from the
2341	// server.
2342	googleapi.ServerResponse `json:"-"`
2343
2344	// ForceSendFields is a list of field names (e.g. "AvatarImageUrl") to
2345	// unconditionally include in API requests. By default, fields with
2346	// empty values are omitted from API requests. However, any non-pointer,
2347	// non-interface field appearing in ForceSendFields will be sent to the
2348	// server regardless of whether the field is empty or not. This may be
2349	// used to include empty fields in Patch requests.
2350	ForceSendFields []string `json:"-"`
2351
2352	// NullFields is a list of field names (e.g. "AvatarImageUrl") to
2353	// include in API requests with the JSON null value. By default, fields
2354	// with empty values are omitted from API requests. However, any field
2355	// with an empty value appearing in NullFields will be sent to the
2356	// server as null. It is an error if a field in this list has a
2357	// non-empty value. This may be used to include null fields in Patch
2358	// requests.
2359	NullFields []string `json:"-"`
2360}
2361
2362func (s *Player) MarshalJSON() ([]byte, error) {
2363	type NoMethod Player
2364	raw := NoMethod(*s)
2365	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2366}
2367
2368// PlayerName: An object representation of the individual components of
2369// the player's name. For some players, these fields may not be present.
2370type PlayerName struct {
2371	// FamilyName: The family name of this player. In some places, this is
2372	// known as the last name.
2373	FamilyName string `json:"familyName,omitempty"`
2374
2375	// GivenName: The given name of this player. In some places, this is
2376	// known as the first name.
2377	GivenName string `json:"givenName,omitempty"`
2378
2379	// ForceSendFields is a list of field names (e.g. "FamilyName") to
2380	// unconditionally include in API requests. By default, fields with
2381	// empty values are omitted from API requests. However, any non-pointer,
2382	// non-interface field appearing in ForceSendFields will be sent to the
2383	// server regardless of whether the field is empty or not. This may be
2384	// used to include empty fields in Patch requests.
2385	ForceSendFields []string `json:"-"`
2386
2387	// NullFields is a list of field names (e.g. "FamilyName") to include in
2388	// API requests with the JSON null value. By default, fields with empty
2389	// values are omitted from API requests. However, any field with an
2390	// empty value appearing in NullFields will be sent to the server as
2391	// null. It is an error if a field in this list has a non-empty value.
2392	// This may be used to include null fields in Patch requests.
2393	NullFields []string `json:"-"`
2394}
2395
2396func (s *PlayerName) MarshalJSON() ([]byte, error) {
2397	type NoMethod PlayerName
2398	raw := NoMethod(*s)
2399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2400}
2401
2402// PlayerAchievement: This is a JSON template for an achievement object.
2403type PlayerAchievement struct {
2404	// AchievementState: The state of the achievement.
2405	// Possible values are:
2406	// - "HIDDEN" - Achievement is hidden.
2407	// - "REVEALED" - Achievement is revealed.
2408	// - "UNLOCKED" - Achievement is unlocked.
2409	AchievementState string `json:"achievementState,omitempty"`
2410
2411	// CurrentSteps: The current steps for an incremental achievement.
2412	CurrentSteps int64 `json:"currentSteps,omitempty"`
2413
2414	// ExperiencePoints: Experience points earned for the achievement. This
2415	// field is absent for achievements that have not yet been unlocked and
2416	// 0 for achievements that have been unlocked by testers but that are
2417	// unpublished.
2418	ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
2419
2420	// FormattedCurrentStepsString: The current steps for an incremental
2421	// achievement as a string.
2422	FormattedCurrentStepsString string `json:"formattedCurrentStepsString,omitempty"`
2423
2424	// Id: The ID of the achievement.
2425	Id string `json:"id,omitempty"`
2426
2427	// Kind: Uniquely identifies the type of this resource. Value is always
2428	// the fixed string games#playerAchievement.
2429	Kind string `json:"kind,omitempty"`
2430
2431	// LastUpdatedTimestamp: The timestamp of the last modification to this
2432	// achievement's state.
2433	LastUpdatedTimestamp int64 `json:"lastUpdatedTimestamp,omitempty,string"`
2434
2435	// ForceSendFields is a list of field names (e.g. "AchievementState") to
2436	// unconditionally include in API requests. By default, fields with
2437	// empty values are omitted from API requests. However, any non-pointer,
2438	// non-interface field appearing in ForceSendFields will be sent to the
2439	// server regardless of whether the field is empty or not. This may be
2440	// used to include empty fields in Patch requests.
2441	ForceSendFields []string `json:"-"`
2442
2443	// NullFields is a list of field names (e.g. "AchievementState") to
2444	// include in API requests with the JSON null value. By default, fields
2445	// with empty values are omitted from API requests. However, any field
2446	// with an empty value appearing in NullFields will be sent to the
2447	// server as null. It is an error if a field in this list has a
2448	// non-empty value. This may be used to include null fields in Patch
2449	// requests.
2450	NullFields []string `json:"-"`
2451}
2452
2453func (s *PlayerAchievement) MarshalJSON() ([]byte, error) {
2454	type NoMethod PlayerAchievement
2455	raw := NoMethod(*s)
2456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2457}
2458
2459// PlayerAchievementListResponse: This is a JSON template for a list of
2460// achievement objects.
2461type PlayerAchievementListResponse struct {
2462	// Items: The achievements.
2463	Items []*PlayerAchievement `json:"items,omitempty"`
2464
2465	// Kind: Uniquely identifies the type of this resource. Value is always
2466	// the fixed string games#playerAchievementListResponse.
2467	Kind string `json:"kind,omitempty"`
2468
2469	// NextPageToken: Token corresponding to the next page of results.
2470	NextPageToken string `json:"nextPageToken,omitempty"`
2471
2472	// ServerResponse contains the HTTP response code and headers from the
2473	// server.
2474	googleapi.ServerResponse `json:"-"`
2475
2476	// ForceSendFields is a list of field names (e.g. "Items") to
2477	// unconditionally include in API requests. By default, fields with
2478	// empty values are omitted from API requests. However, any non-pointer,
2479	// non-interface field appearing in ForceSendFields will be sent to the
2480	// server regardless of whether the field is empty or not. This may be
2481	// used to include empty fields in Patch requests.
2482	ForceSendFields []string `json:"-"`
2483
2484	// NullFields is a list of field names (e.g. "Items") to include in API
2485	// requests with the JSON null value. By default, fields with empty
2486	// values are omitted from API requests. However, any field with an
2487	// empty value appearing in NullFields will be sent to the server as
2488	// null. It is an error if a field in this list has a non-empty value.
2489	// This may be used to include null fields in Patch requests.
2490	NullFields []string `json:"-"`
2491}
2492
2493func (s *PlayerAchievementListResponse) MarshalJSON() ([]byte, error) {
2494	type NoMethod PlayerAchievementListResponse
2495	raw := NoMethod(*s)
2496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2497}
2498
2499// PlayerEvent: This is a JSON template for an event status resource.
2500type PlayerEvent struct {
2501	// DefinitionId: The ID of the event definition.
2502	DefinitionId string `json:"definitionId,omitempty"`
2503
2504	// FormattedNumEvents: The current number of times this event has
2505	// occurred, as a string. The formatting of this string depends on the
2506	// configuration of your event in the Play Games Developer Console.
2507	FormattedNumEvents string `json:"formattedNumEvents,omitempty"`
2508
2509	// Kind: Uniquely identifies the type of this resource. Value is always
2510	// the fixed string games#playerEvent.
2511	Kind string `json:"kind,omitempty"`
2512
2513	// NumEvents: The current number of times this event has occurred.
2514	NumEvents int64 `json:"numEvents,omitempty,string"`
2515
2516	// PlayerId: The ID of the player.
2517	PlayerId string `json:"playerId,omitempty"`
2518
2519	// ForceSendFields is a list of field names (e.g. "DefinitionId") to
2520	// unconditionally include in API requests. By default, fields with
2521	// empty values are omitted from API requests. However, any non-pointer,
2522	// non-interface field appearing in ForceSendFields will be sent to the
2523	// server regardless of whether the field is empty or not. This may be
2524	// used to include empty fields in Patch requests.
2525	ForceSendFields []string `json:"-"`
2526
2527	// NullFields is a list of field names (e.g. "DefinitionId") to include
2528	// in API requests with the JSON null value. By default, fields with
2529	// empty values are omitted from API requests. However, any field with
2530	// an empty value appearing in NullFields will be sent to the server as
2531	// null. It is an error if a field in this list has a non-empty value.
2532	// This may be used to include null fields in Patch requests.
2533	NullFields []string `json:"-"`
2534}
2535
2536func (s *PlayerEvent) MarshalJSON() ([]byte, error) {
2537	type NoMethod PlayerEvent
2538	raw := NoMethod(*s)
2539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2540}
2541
2542// PlayerEventListResponse: This is a JSON template for a ListByPlayer
2543// response.
2544type PlayerEventListResponse struct {
2545	// Items: The player events.
2546	Items []*PlayerEvent `json:"items,omitempty"`
2547
2548	// Kind: Uniquely identifies the type of this resource. Value is always
2549	// the fixed string games#playerEventListResponse.
2550	Kind string `json:"kind,omitempty"`
2551
2552	// NextPageToken: The pagination token for the next page of results.
2553	NextPageToken string `json:"nextPageToken,omitempty"`
2554
2555	// ServerResponse contains the HTTP response code and headers from the
2556	// server.
2557	googleapi.ServerResponse `json:"-"`
2558
2559	// ForceSendFields is a list of field names (e.g. "Items") to
2560	// unconditionally include in API requests. By default, fields with
2561	// empty values are omitted from API requests. However, any non-pointer,
2562	// non-interface field appearing in ForceSendFields will be sent to the
2563	// server regardless of whether the field is empty or not. This may be
2564	// used to include empty fields in Patch requests.
2565	ForceSendFields []string `json:"-"`
2566
2567	// NullFields is a list of field names (e.g. "Items") to include in API
2568	// requests with the JSON null value. By default, fields with empty
2569	// values are omitted from API requests. However, any field with an
2570	// empty value appearing in NullFields will be sent to the server as
2571	// null. It is an error if a field in this list has a non-empty value.
2572	// This may be used to include null fields in Patch requests.
2573	NullFields []string `json:"-"`
2574}
2575
2576func (s *PlayerEventListResponse) MarshalJSON() ([]byte, error) {
2577	type NoMethod PlayerEventListResponse
2578	raw := NoMethod(*s)
2579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2580}
2581
2582// PlayerExperienceInfo: This is a JSON template for 1P/3P metadata
2583// about the player's experience.
2584type PlayerExperienceInfo struct {
2585	// CurrentExperiencePoints: The current number of experience points for
2586	// the player.
2587	CurrentExperiencePoints int64 `json:"currentExperiencePoints,omitempty,string"`
2588
2589	// CurrentLevel: The current level of the player.
2590	CurrentLevel *PlayerLevel `json:"currentLevel,omitempty"`
2591
2592	// Kind: Uniquely identifies the type of this resource. Value is always
2593	// the fixed string games#playerExperienceInfo.
2594	Kind string `json:"kind,omitempty"`
2595
2596	// LastLevelUpTimestampMillis: The timestamp when the player was leveled
2597	// up, in millis since Unix epoch UTC.
2598	LastLevelUpTimestampMillis int64 `json:"lastLevelUpTimestampMillis,omitempty,string"`
2599
2600	// NextLevel: The next level of the player. If the current level is the
2601	// maximum level, this should be same as the current level.
2602	NextLevel *PlayerLevel `json:"nextLevel,omitempty"`
2603
2604	// ForceSendFields is a list of field names (e.g.
2605	// "CurrentExperiencePoints") to unconditionally include in API
2606	// requests. By default, fields with empty values are omitted from API
2607	// requests. However, any non-pointer, non-interface field appearing in
2608	// ForceSendFields will be sent to the server regardless of whether the
2609	// field is empty or not. This may be used to include empty fields in
2610	// Patch requests.
2611	ForceSendFields []string `json:"-"`
2612
2613	// NullFields is a list of field names (e.g. "CurrentExperiencePoints")
2614	// to include in API requests with the JSON null value. By default,
2615	// fields with empty values are omitted from API requests. However, any
2616	// field with an empty value appearing in NullFields will be sent to the
2617	// server as null. It is an error if a field in this list has a
2618	// non-empty value. This may be used to include null fields in Patch
2619	// requests.
2620	NullFields []string `json:"-"`
2621}
2622
2623func (s *PlayerExperienceInfo) MarshalJSON() ([]byte, error) {
2624	type NoMethod PlayerExperienceInfo
2625	raw := NoMethod(*s)
2626	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2627}
2628
2629// PlayerLeaderboardScore: This is a JSON template for a player
2630// leaderboard score object.
2631type PlayerLeaderboardScore struct {
2632	// Kind: Uniquely identifies the type of this resource. Value is always
2633	// the fixed string games#playerLeaderboardScore.
2634	Kind string `json:"kind,omitempty"`
2635
2636	// LeaderboardId: The ID of the leaderboard this score is in.
2637	LeaderboardId string `json:"leaderboard_id,omitempty"`
2638
2639	// PublicRank: The public rank of the score in this leaderboard. This
2640	// object will not be present if the user is not sharing their scores
2641	// publicly.
2642	PublicRank *LeaderboardScoreRank `json:"publicRank,omitempty"`
2643
2644	// ScoreString: The formatted value of this score.
2645	ScoreString string `json:"scoreString,omitempty"`
2646
2647	// ScoreTag: Additional information about the score. Values must contain
2648	// no more than 64 URI-safe characters as defined by section 2.3 of RFC
2649	// 3986.
2650	ScoreTag string `json:"scoreTag,omitempty"`
2651
2652	// ScoreValue: The numerical value of this score.
2653	ScoreValue int64 `json:"scoreValue,omitempty,string"`
2654
2655	// SocialRank: The social rank of the score in this leaderboard.
2656	SocialRank *LeaderboardScoreRank `json:"socialRank,omitempty"`
2657
2658	// TimeSpan: The time span of this score.
2659	// Possible values are:
2660	// - "ALL_TIME" - The score is an all-time score.
2661	// - "WEEKLY" - The score is a weekly score.
2662	// - "DAILY" - The score is a daily score.
2663	TimeSpan string `json:"timeSpan,omitempty"`
2664
2665	// WriteTimestamp: The timestamp at which this score was recorded, in
2666	// milliseconds since the epoch in UTC.
2667	WriteTimestamp int64 `json:"writeTimestamp,omitempty,string"`
2668
2669	// ForceSendFields is a list of field names (e.g. "Kind") to
2670	// unconditionally include in API requests. By default, fields with
2671	// empty values are omitted from API requests. However, any non-pointer,
2672	// non-interface field appearing in ForceSendFields will be sent to the
2673	// server regardless of whether the field is empty or not. This may be
2674	// used to include empty fields in Patch requests.
2675	ForceSendFields []string `json:"-"`
2676
2677	// NullFields is a list of field names (e.g. "Kind") to include in API
2678	// requests with the JSON null value. By default, fields with empty
2679	// values are omitted from API requests. However, any field with an
2680	// empty value appearing in NullFields will be sent to the server as
2681	// null. It is an error if a field in this list has a non-empty value.
2682	// This may be used to include null fields in Patch requests.
2683	NullFields []string `json:"-"`
2684}
2685
2686func (s *PlayerLeaderboardScore) MarshalJSON() ([]byte, error) {
2687	type NoMethod PlayerLeaderboardScore
2688	raw := NoMethod(*s)
2689	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2690}
2691
2692// PlayerLeaderboardScoreListResponse: This is a JSON template for a
2693// list of player leaderboard scores.
2694type PlayerLeaderboardScoreListResponse struct {
2695	// Items: The leaderboard scores.
2696	Items []*PlayerLeaderboardScore `json:"items,omitempty"`
2697
2698	// Kind: Uniquely identifies the type of this resource. Value is always
2699	// the fixed string games#playerLeaderboardScoreListResponse.
2700	Kind string `json:"kind,omitempty"`
2701
2702	// NextPageToken: The pagination token for the next page of results.
2703	NextPageToken string `json:"nextPageToken,omitempty"`
2704
2705	// Player: The Player resources for the owner of this score.
2706	Player *Player `json:"player,omitempty"`
2707
2708	// ServerResponse contains the HTTP response code and headers from the
2709	// server.
2710	googleapi.ServerResponse `json:"-"`
2711
2712	// ForceSendFields is a list of field names (e.g. "Items") to
2713	// unconditionally include in API requests. By default, fields with
2714	// empty values are omitted from API requests. However, any non-pointer,
2715	// non-interface field appearing in ForceSendFields will be sent to the
2716	// server regardless of whether the field is empty or not. This may be
2717	// used to include empty fields in Patch requests.
2718	ForceSendFields []string `json:"-"`
2719
2720	// NullFields is a list of field names (e.g. "Items") to include in API
2721	// requests with the JSON null value. By default, fields with empty
2722	// values are omitted from API requests. However, any field with an
2723	// empty value appearing in NullFields will be sent to the server as
2724	// null. It is an error if a field in this list has a non-empty value.
2725	// This may be used to include null fields in Patch requests.
2726	NullFields []string `json:"-"`
2727}
2728
2729func (s *PlayerLeaderboardScoreListResponse) MarshalJSON() ([]byte, error) {
2730	type NoMethod PlayerLeaderboardScoreListResponse
2731	raw := NoMethod(*s)
2732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2733}
2734
2735// PlayerLevel: This is a JSON template for 1P/3P metadata about a
2736// user's level.
2737type PlayerLevel struct {
2738	// Kind: Uniquely identifies the type of this resource. Value is always
2739	// the fixed string games#playerLevel.
2740	Kind string `json:"kind,omitempty"`
2741
2742	// Level: The level for the user.
2743	Level int64 `json:"level,omitempty"`
2744
2745	// MaxExperiencePoints: The maximum experience points for this level.
2746	MaxExperiencePoints int64 `json:"maxExperiencePoints,omitempty,string"`
2747
2748	// MinExperiencePoints: The minimum experience points for this level.
2749	MinExperiencePoints int64 `json:"minExperiencePoints,omitempty,string"`
2750
2751	// ForceSendFields is a list of field names (e.g. "Kind") to
2752	// unconditionally include in API requests. By default, fields with
2753	// empty values are omitted from API requests. However, any non-pointer,
2754	// non-interface field appearing in ForceSendFields will be sent to the
2755	// server regardless of whether the field is empty or not. This may be
2756	// used to include empty fields in Patch requests.
2757	ForceSendFields []string `json:"-"`
2758
2759	// NullFields is a list of field names (e.g. "Kind") to include in API
2760	// requests with the JSON null value. By default, fields with empty
2761	// values are omitted from API requests. However, any field with an
2762	// empty value appearing in NullFields will be sent to the server as
2763	// null. It is an error if a field in this list has a non-empty value.
2764	// This may be used to include null fields in Patch requests.
2765	NullFields []string `json:"-"`
2766}
2767
2768func (s *PlayerLevel) MarshalJSON() ([]byte, error) {
2769	type NoMethod PlayerLevel
2770	raw := NoMethod(*s)
2771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2772}
2773
2774// PlayerListResponse: This is a JSON template for a third party player
2775// list response.
2776type PlayerListResponse struct {
2777	// Items: The players.
2778	Items []*Player `json:"items,omitempty"`
2779
2780	// Kind: Uniquely identifies the type of this resource. Value is always
2781	// the fixed string games#playerListResponse.
2782	Kind string `json:"kind,omitempty"`
2783
2784	// NextPageToken: Token corresponding to the next page of results.
2785	NextPageToken string `json:"nextPageToken,omitempty"`
2786
2787	// ServerResponse contains the HTTP response code and headers from the
2788	// server.
2789	googleapi.ServerResponse `json:"-"`
2790
2791	// ForceSendFields is a list of field names (e.g. "Items") to
2792	// unconditionally include in API requests. By default, fields with
2793	// empty values are omitted from API requests. However, any non-pointer,
2794	// non-interface field appearing in ForceSendFields will be sent to the
2795	// server regardless of whether the field is empty or not. This may be
2796	// used to include empty fields in Patch requests.
2797	ForceSendFields []string `json:"-"`
2798
2799	// NullFields is a list of field names (e.g. "Items") to include in API
2800	// requests with the JSON null value. By default, fields with empty
2801	// values are omitted from API requests. However, any field with an
2802	// empty value appearing in NullFields will be sent to the server as
2803	// null. It is an error if a field in this list has a non-empty value.
2804	// This may be used to include null fields in Patch requests.
2805	NullFields []string `json:"-"`
2806}
2807
2808func (s *PlayerListResponse) MarshalJSON() ([]byte, error) {
2809	type NoMethod PlayerListResponse
2810	raw := NoMethod(*s)
2811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2812}
2813
2814// PlayerScore: This is a JSON template for a player score.
2815type PlayerScore struct {
2816	// FormattedScore: The formatted score for this player score.
2817	FormattedScore string `json:"formattedScore,omitempty"`
2818
2819	// Kind: Uniquely identifies the type of this resource. Value is always
2820	// the fixed string games#playerScore.
2821	Kind string `json:"kind,omitempty"`
2822
2823	// Score: The numerical value for this player score.
2824	Score int64 `json:"score,omitempty,string"`
2825
2826	// ScoreTag: Additional information about this score. Values will
2827	// contain no more than 64 URI-safe characters as defined by section 2.3
2828	// of RFC 3986.
2829	ScoreTag string `json:"scoreTag,omitempty"`
2830
2831	// TimeSpan: The time span for this player score.
2832	// Possible values are:
2833	// - "ALL_TIME" - The score is an all-time score.
2834	// - "WEEKLY" - The score is a weekly score.
2835	// - "DAILY" - The score is a daily score.
2836	TimeSpan string `json:"timeSpan,omitempty"`
2837
2838	// ForceSendFields is a list of field names (e.g. "FormattedScore") to
2839	// unconditionally include in API requests. By default, fields with
2840	// empty values are omitted from API requests. However, any non-pointer,
2841	// non-interface field appearing in ForceSendFields will be sent to the
2842	// server regardless of whether the field is empty or not. This may be
2843	// used to include empty fields in Patch requests.
2844	ForceSendFields []string `json:"-"`
2845
2846	// NullFields is a list of field names (e.g. "FormattedScore") to
2847	// include in API requests with the JSON null value. By default, fields
2848	// with empty values are omitted from API requests. However, any field
2849	// with an empty value appearing in NullFields will be sent to the
2850	// server as null. It is an error if a field in this list has a
2851	// non-empty value. This may be used to include null fields in Patch
2852	// requests.
2853	NullFields []string `json:"-"`
2854}
2855
2856func (s *PlayerScore) MarshalJSON() ([]byte, error) {
2857	type NoMethod PlayerScore
2858	raw := NoMethod(*s)
2859	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2860}
2861
2862// PlayerScoreListResponse: This is a JSON template for a list of score
2863// submission statuses.
2864type PlayerScoreListResponse struct {
2865	// Kind: Uniquely identifies the type of this resource. Value is always
2866	// the fixed string games#playerScoreListResponse.
2867	Kind string `json:"kind,omitempty"`
2868
2869	// SubmittedScores: The score submissions statuses.
2870	SubmittedScores []*PlayerScoreResponse `json:"submittedScores,omitempty"`
2871
2872	// ServerResponse contains the HTTP response code and headers from the
2873	// server.
2874	googleapi.ServerResponse `json:"-"`
2875
2876	// ForceSendFields is a list of field names (e.g. "Kind") to
2877	// unconditionally include in API requests. By default, fields with
2878	// empty values are omitted from API requests. However, any non-pointer,
2879	// non-interface field appearing in ForceSendFields will be sent to the
2880	// server regardless of whether the field is empty or not. This may be
2881	// used to include empty fields in Patch requests.
2882	ForceSendFields []string `json:"-"`
2883
2884	// NullFields is a list of field names (e.g. "Kind") to include in API
2885	// requests with the JSON null value. By default, fields with empty
2886	// values are omitted from API requests. However, any field with an
2887	// empty value appearing in NullFields will be sent to the server as
2888	// null. It is an error if a field in this list has a non-empty value.
2889	// This may be used to include null fields in Patch requests.
2890	NullFields []string `json:"-"`
2891}
2892
2893func (s *PlayerScoreListResponse) MarshalJSON() ([]byte, error) {
2894	type NoMethod PlayerScoreListResponse
2895	raw := NoMethod(*s)
2896	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2897}
2898
2899// PlayerScoreResponse: This is a JSON template for a list of
2900// leaderboard entry resources.
2901type PlayerScoreResponse struct {
2902	// BeatenScoreTimeSpans: The time spans where the submitted score is
2903	// better than the existing score for that time span.
2904	// Possible values are:
2905	// - "ALL_TIME" - The score is an all-time score.
2906	// - "WEEKLY" - The score is a weekly score.
2907	// - "DAILY" - The score is a daily score.
2908	BeatenScoreTimeSpans []string `json:"beatenScoreTimeSpans,omitempty"`
2909
2910	// FormattedScore: The formatted value of the submitted score.
2911	FormattedScore string `json:"formattedScore,omitempty"`
2912
2913	// Kind: Uniquely identifies the type of this resource. Value is always
2914	// the fixed string games#playerScoreResponse.
2915	Kind string `json:"kind,omitempty"`
2916
2917	// LeaderboardId: The leaderboard ID that this score was submitted to.
2918	LeaderboardId string `json:"leaderboardId,omitempty"`
2919
2920	// ScoreTag: Additional information about this score. Values will
2921	// contain no more than 64 URI-safe characters as defined by section 2.3
2922	// of RFC 3986.
2923	ScoreTag string `json:"scoreTag,omitempty"`
2924
2925	// UnbeatenScores: The scores in time spans that have not been beaten.
2926	// As an example, the submitted score may be better than the player's
2927	// DAILY score, but not better than the player's scores for the WEEKLY
2928	// or ALL_TIME time spans.
2929	UnbeatenScores []*PlayerScore `json:"unbeatenScores,omitempty"`
2930
2931	// ServerResponse contains the HTTP response code and headers from the
2932	// server.
2933	googleapi.ServerResponse `json:"-"`
2934
2935	// ForceSendFields is a list of field names (e.g.
2936	// "BeatenScoreTimeSpans") to unconditionally include in API requests.
2937	// By default, fields with empty values are omitted from API requests.
2938	// However, any non-pointer, non-interface field appearing in
2939	// ForceSendFields will be sent to the server regardless of whether the
2940	// field is empty or not. This may be used to include empty fields in
2941	// Patch requests.
2942	ForceSendFields []string `json:"-"`
2943
2944	// NullFields is a list of field names (e.g. "BeatenScoreTimeSpans") to
2945	// include in API requests with the JSON null value. By default, fields
2946	// with empty values are omitted from API requests. However, any field
2947	// with an empty value appearing in NullFields will be sent to the
2948	// server as null. It is an error if a field in this list has a
2949	// non-empty value. This may be used to include null fields in Patch
2950	// requests.
2951	NullFields []string `json:"-"`
2952}
2953
2954func (s *PlayerScoreResponse) MarshalJSON() ([]byte, error) {
2955	type NoMethod PlayerScoreResponse
2956	raw := NoMethod(*s)
2957	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2958}
2959
2960// PlayerScoreSubmissionList: This is a JSON template for a list of
2961// score submission requests
2962type PlayerScoreSubmissionList struct {
2963	// Kind: Uniquely identifies the type of this resource. Value is always
2964	// the fixed string games#playerScoreSubmissionList.
2965	Kind string `json:"kind,omitempty"`
2966
2967	// Scores: The score submissions.
2968	Scores []*ScoreSubmission `json:"scores,omitempty"`
2969
2970	// ForceSendFields is a list of field names (e.g. "Kind") to
2971	// unconditionally include in API requests. By default, fields with
2972	// empty values are omitted from API requests. However, any non-pointer,
2973	// non-interface field appearing in ForceSendFields will be sent to the
2974	// server regardless of whether the field is empty or not. This may be
2975	// used to include empty fields in Patch requests.
2976	ForceSendFields []string `json:"-"`
2977
2978	// NullFields is a list of field names (e.g. "Kind") to include in API
2979	// requests with the JSON null value. By default, fields with empty
2980	// values are omitted from API requests. However, any field with an
2981	// empty value appearing in NullFields will be sent to the server as
2982	// null. It is an error if a field in this list has a non-empty value.
2983	// This may be used to include null fields in Patch requests.
2984	NullFields []string `json:"-"`
2985}
2986
2987func (s *PlayerScoreSubmissionList) MarshalJSON() ([]byte, error) {
2988	type NoMethod PlayerScoreSubmissionList
2989	raw := NoMethod(*s)
2990	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2991}
2992
2993// ProfileSettings: This is a JSON template for profile settings
2994type ProfileSettings struct {
2995	// Kind: Uniquely identifies the type of this resource. Value is always
2996	// the fixed string games#profileSettings.
2997	Kind string `json:"kind,omitempty"`
2998
2999	// ProfileVisible: The player's current profile visibility. This field
3000	// is visible to both 1P and 3P APIs.
3001	ProfileVisible bool `json:"profileVisible,omitempty"`
3002
3003	// ForceSendFields is a list of field names (e.g. "Kind") to
3004	// unconditionally include in API requests. By default, fields with
3005	// empty values are omitted from API requests. However, any non-pointer,
3006	// non-interface field appearing in ForceSendFields will be sent to the
3007	// server regardless of whether the field is empty or not. This may be
3008	// used to include empty fields in Patch requests.
3009	ForceSendFields []string `json:"-"`
3010
3011	// NullFields is a list of field names (e.g. "Kind") to include in API
3012	// requests with the JSON null value. By default, fields with empty
3013	// values are omitted from API requests. However, any field with an
3014	// empty value appearing in NullFields will be sent to the server as
3015	// null. It is an error if a field in this list has a non-empty value.
3016	// This may be used to include null fields in Patch requests.
3017	NullFields []string `json:"-"`
3018}
3019
3020func (s *ProfileSettings) MarshalJSON() ([]byte, error) {
3021	type NoMethod ProfileSettings
3022	raw := NoMethod(*s)
3023	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3024}
3025
3026// PushToken: This is a JSON template for a push token resource.
3027type PushToken struct {
3028	// ClientRevision: The revision of the client SDK used by your
3029	// application, in the same format that's used by revisions.check. Used
3030	// to send backward compatible messages. Format:
3031	// [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE
3032	// are:
3033	// - IOS - Push token is for iOS
3034	ClientRevision string `json:"clientRevision,omitempty"`
3035
3036	// Id: Unique identifier for this push token.
3037	Id *PushTokenId `json:"id,omitempty"`
3038
3039	// Kind: Uniquely identifies the type of this resource. Value is always
3040	// the fixed string games#pushToken.
3041	Kind string `json:"kind,omitempty"`
3042
3043	// Language: The preferred language for notifications that are sent
3044	// using this token.
3045	Language string `json:"language,omitempty"`
3046
3047	// ForceSendFields is a list of field names (e.g. "ClientRevision") to
3048	// unconditionally include in API requests. By default, fields with
3049	// empty values are omitted from API requests. However, any non-pointer,
3050	// non-interface field appearing in ForceSendFields will be sent to the
3051	// server regardless of whether the field is empty or not. This may be
3052	// used to include empty fields in Patch requests.
3053	ForceSendFields []string `json:"-"`
3054
3055	// NullFields is a list of field names (e.g. "ClientRevision") to
3056	// include in API requests with the JSON null value. By default, fields
3057	// with empty values are omitted from API requests. However, any field
3058	// with an empty value appearing in NullFields will be sent to the
3059	// server as null. It is an error if a field in this list has a
3060	// non-empty value. This may be used to include null fields in Patch
3061	// requests.
3062	NullFields []string `json:"-"`
3063}
3064
3065func (s *PushToken) MarshalJSON() ([]byte, error) {
3066	type NoMethod PushToken
3067	raw := NoMethod(*s)
3068	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3069}
3070
3071// PushTokenId: This is a JSON template for a push token ID resource.
3072type PushTokenId struct {
3073	// Ios: A push token ID for iOS devices.
3074	Ios *PushTokenIdIos `json:"ios,omitempty"`
3075
3076	// Kind: Uniquely identifies the type of this resource. Value is always
3077	// the fixed string games#pushTokenId.
3078	Kind string `json:"kind,omitempty"`
3079
3080	// ForceSendFields is a list of field names (e.g. "Ios") to
3081	// unconditionally include in API requests. By default, fields with
3082	// empty values are omitted from API requests. However, any non-pointer,
3083	// non-interface field appearing in ForceSendFields will be sent to the
3084	// server regardless of whether the field is empty or not. This may be
3085	// used to include empty fields in Patch requests.
3086	ForceSendFields []string `json:"-"`
3087
3088	// NullFields is a list of field names (e.g. "Ios") to include in API
3089	// requests with the JSON null value. By default, fields with empty
3090	// values are omitted from API requests. However, any field with an
3091	// empty value appearing in NullFields will be sent to the server as
3092	// null. It is an error if a field in this list has a non-empty value.
3093	// This may be used to include null fields in Patch requests.
3094	NullFields []string `json:"-"`
3095}
3096
3097func (s *PushTokenId) MarshalJSON() ([]byte, error) {
3098	type NoMethod PushTokenId
3099	raw := NoMethod(*s)
3100	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3101}
3102
3103// PushTokenIdIos: A push token ID for iOS devices.
3104type PushTokenIdIos struct {
3105	// ApnsDeviceToken: Device token supplied by an iOS system call to
3106	// register for remote notifications. Encode this field as web-safe
3107	// base64.
3108	ApnsDeviceToken string `json:"apns_device_token,omitempty"`
3109
3110	// ApnsEnvironment: Indicates whether this token should be used for the
3111	// production or sandbox APNS server.
3112	ApnsEnvironment string `json:"apns_environment,omitempty"`
3113
3114	// ForceSendFields is a list of field names (e.g. "ApnsDeviceToken") to
3115	// unconditionally include in API requests. By default, fields with
3116	// empty values are omitted from API requests. However, any non-pointer,
3117	// non-interface field appearing in ForceSendFields will be sent to the
3118	// server regardless of whether the field is empty or not. This may be
3119	// used to include empty fields in Patch requests.
3120	ForceSendFields []string `json:"-"`
3121
3122	// NullFields is a list of field names (e.g. "ApnsDeviceToken") to
3123	// include in API requests with the JSON null value. By default, fields
3124	// with empty values are omitted from API requests. However, any field
3125	// with an empty value appearing in NullFields will be sent to the
3126	// server as null. It is an error if a field in this list has a
3127	// non-empty value. This may be used to include null fields in Patch
3128	// requests.
3129	NullFields []string `json:"-"`
3130}
3131
3132func (s *PushTokenIdIos) MarshalJSON() ([]byte, error) {
3133	type NoMethod PushTokenIdIos
3134	raw := NoMethod(*s)
3135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3136}
3137
3138// Quest: This is a JSON template for a Quest resource.
3139type Quest struct {
3140	// AcceptedTimestampMillis: The timestamp at which the user accepted the
3141	// quest in milliseconds since the epoch in UTC. Only present if the
3142	// player has accepted the quest.
3143	AcceptedTimestampMillis int64 `json:"acceptedTimestampMillis,omitempty,string"`
3144
3145	// ApplicationId: The ID of the application this quest is part of.
3146	ApplicationId string `json:"applicationId,omitempty"`
3147
3148	// BannerUrl: The banner image URL for the quest.
3149	BannerUrl string `json:"bannerUrl,omitempty"`
3150
3151	// Description: The description of the quest.
3152	Description string `json:"description,omitempty"`
3153
3154	// EndTimestampMillis: The timestamp at which the quest ceases to be
3155	// active in milliseconds since the epoch in UTC.
3156	EndTimestampMillis int64 `json:"endTimestampMillis,omitempty,string"`
3157
3158	// IconUrl: The icon image URL for the quest.
3159	IconUrl string `json:"iconUrl,omitempty"`
3160
3161	// Id: The ID of the quest.
3162	Id string `json:"id,omitempty"`
3163
3164	// IsDefaultBannerUrl: Indicates whether the banner image being returned
3165	// is a default image, or is game-provided.
3166	IsDefaultBannerUrl bool `json:"isDefaultBannerUrl,omitempty"`
3167
3168	// IsDefaultIconUrl: Indicates whether the icon image being returned is
3169	// a default image, or is game-provided.
3170	IsDefaultIconUrl bool `json:"isDefaultIconUrl,omitempty"`
3171
3172	// Kind: Uniquely identifies the type of this resource. Value is always
3173	// the fixed string games#quest.
3174	Kind string `json:"kind,omitempty"`
3175
3176	// LastUpdatedTimestampMillis: The timestamp at which the quest was last
3177	// updated by the user in milliseconds since the epoch in UTC. Only
3178	// present if the player has accepted the quest.
3179	LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
3180
3181	// Milestones: The quest milestones.
3182	Milestones []*QuestMilestone `json:"milestones,omitempty"`
3183
3184	// Name: The name of the quest.
3185	Name string `json:"name,omitempty"`
3186
3187	// NotifyTimestampMillis: The timestamp at which the user should be
3188	// notified that the quest will end soon in milliseconds since the epoch
3189	// in UTC.
3190	NotifyTimestampMillis int64 `json:"notifyTimestampMillis,omitempty,string"`
3191
3192	// StartTimestampMillis: The timestamp at which the quest becomes active
3193	// in milliseconds since the epoch in UTC.
3194	StartTimestampMillis int64 `json:"startTimestampMillis,omitempty,string"`
3195
3196	// State: The state of the quest.
3197	// Possible values are:
3198	// - "UPCOMING": The quest is upcoming. The user can see the quest, but
3199	// cannot accept it until it is open.
3200	// - "OPEN": The quest is currently open and may be accepted at this
3201	// time.
3202	// - "ACCEPTED": The user is currently participating in this quest.
3203	// - "COMPLETED": The user has completed the quest.
3204	// - "FAILED": The quest was attempted but was not completed before the
3205	// deadline expired.
3206	// - "EXPIRED": The quest has expired and was not accepted.
3207	// - "DELETED": The quest should be deleted from the local database.
3208	State string `json:"state,omitempty"`
3209
3210	// ServerResponse contains the HTTP response code and headers from the
3211	// server.
3212	googleapi.ServerResponse `json:"-"`
3213
3214	// ForceSendFields is a list of field names (e.g.
3215	// "AcceptedTimestampMillis") to unconditionally include in API
3216	// requests. By default, fields with empty values are omitted from API
3217	// requests. However, any non-pointer, non-interface field appearing in
3218	// ForceSendFields will be sent to the server regardless of whether the
3219	// field is empty or not. This may be used to include empty fields in
3220	// Patch requests.
3221	ForceSendFields []string `json:"-"`
3222
3223	// NullFields is a list of field names (e.g. "AcceptedTimestampMillis")
3224	// to include in API requests with the JSON null value. By default,
3225	// fields with empty values are omitted from API requests. However, any
3226	// field with an empty value appearing in NullFields will be sent to the
3227	// server as null. It is an error if a field in this list has a
3228	// non-empty value. This may be used to include null fields in Patch
3229	// requests.
3230	NullFields []string `json:"-"`
3231}
3232
3233func (s *Quest) MarshalJSON() ([]byte, error) {
3234	type NoMethod Quest
3235	raw := NoMethod(*s)
3236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3237}
3238
3239// QuestContribution: This is a JSON template for a Quest Criterion
3240// Contribution resource.
3241type QuestContribution struct {
3242	// FormattedValue: The formatted value of the contribution as a string.
3243	// Format depends on the configuration for the associated event
3244	// definition in the Play Games Developer Console.
3245	FormattedValue string `json:"formattedValue,omitempty"`
3246
3247	// Kind: Uniquely identifies the type of this resource. Value is always
3248	// the fixed string games#questContribution.
3249	Kind string `json:"kind,omitempty"`
3250
3251	// Value: The value of the contribution.
3252	Value int64 `json:"value,omitempty,string"`
3253
3254	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
3255	// unconditionally include in API requests. By default, fields with
3256	// empty values are omitted from API requests. However, any non-pointer,
3257	// non-interface field appearing in ForceSendFields will be sent to the
3258	// server regardless of whether the field is empty or not. This may be
3259	// used to include empty fields in Patch requests.
3260	ForceSendFields []string `json:"-"`
3261
3262	// NullFields is a list of field names (e.g. "FormattedValue") to
3263	// include in API requests with the JSON null value. By default, fields
3264	// with empty values are omitted from API requests. However, any field
3265	// with an empty value appearing in NullFields will be sent to the
3266	// server as null. It is an error if a field in this list has a
3267	// non-empty value. This may be used to include null fields in Patch
3268	// requests.
3269	NullFields []string `json:"-"`
3270}
3271
3272func (s *QuestContribution) MarshalJSON() ([]byte, error) {
3273	type NoMethod QuestContribution
3274	raw := NoMethod(*s)
3275	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3276}
3277
3278// QuestCriterion: This is a JSON template for a Quest Criterion
3279// resource.
3280type QuestCriterion struct {
3281	// CompletionContribution: The total number of times the associated
3282	// event must be incremented for the player to complete this quest.
3283	CompletionContribution *QuestContribution `json:"completionContribution,omitempty"`
3284
3285	// CurrentContribution: The number of increments the player has made
3286	// toward the completion count event increments required to complete the
3287	// quest. This value will not exceed the completion contribution.
3288	// There will be no currentContribution until the player has accepted
3289	// the quest.
3290	CurrentContribution *QuestContribution `json:"currentContribution,omitempty"`
3291
3292	// EventId: The ID of the event the criterion corresponds to.
3293	EventId string `json:"eventId,omitempty"`
3294
3295	// InitialPlayerProgress: The value of the event associated with this
3296	// quest at the time that the quest was accepted. This value may change
3297	// if event increments that took place before the start of quest are
3298	// uploaded after the quest starts.
3299	// There will be no initialPlayerProgress until the player has accepted
3300	// the quest.
3301	InitialPlayerProgress *QuestContribution `json:"initialPlayerProgress,omitempty"`
3302
3303	// Kind: Uniquely identifies the type of this resource. Value is always
3304	// the fixed string games#questCriterion.
3305	Kind string `json:"kind,omitempty"`
3306
3307	// ForceSendFields is a list of field names (e.g.
3308	// "CompletionContribution") to unconditionally include in API requests.
3309	// By default, fields with empty values are omitted from API requests.
3310	// However, any non-pointer, non-interface field appearing in
3311	// ForceSendFields will be sent to the server regardless of whether the
3312	// field is empty or not. This may be used to include empty fields in
3313	// Patch requests.
3314	ForceSendFields []string `json:"-"`
3315
3316	// NullFields is a list of field names (e.g. "CompletionContribution")
3317	// to include in API requests with the JSON null value. By default,
3318	// fields with empty values are omitted from API requests. However, any
3319	// field with an empty value appearing in NullFields will be sent to the
3320	// server as null. It is an error if a field in this list has a
3321	// non-empty value. This may be used to include null fields in Patch
3322	// requests.
3323	NullFields []string `json:"-"`
3324}
3325
3326func (s *QuestCriterion) MarshalJSON() ([]byte, error) {
3327	type NoMethod QuestCriterion
3328	raw := NoMethod(*s)
3329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3330}
3331
3332// QuestListResponse: This is a JSON template for a list of quest
3333// objects.
3334type QuestListResponse struct {
3335	// Items: The quests.
3336	Items []*Quest `json:"items,omitempty"`
3337
3338	// Kind: Uniquely identifies the type of this resource. Value is always
3339	// the fixed string games#questListResponse.
3340	Kind string `json:"kind,omitempty"`
3341
3342	// NextPageToken: Token corresponding to the next page of results.
3343	NextPageToken string `json:"nextPageToken,omitempty"`
3344
3345	// ServerResponse contains the HTTP response code and headers from the
3346	// server.
3347	googleapi.ServerResponse `json:"-"`
3348
3349	// ForceSendFields is a list of field names (e.g. "Items") to
3350	// unconditionally include in API requests. By default, fields with
3351	// empty values are omitted from API requests. However, any non-pointer,
3352	// non-interface field appearing in ForceSendFields will be sent to the
3353	// server regardless of whether the field is empty or not. This may be
3354	// used to include empty fields in Patch requests.
3355	ForceSendFields []string `json:"-"`
3356
3357	// NullFields is a list of field names (e.g. "Items") to include in API
3358	// requests with the JSON null value. By default, fields with empty
3359	// values are omitted from API requests. However, any field with an
3360	// empty value appearing in NullFields will be sent to the server as
3361	// null. It is an error if a field in this list has a non-empty value.
3362	// This may be used to include null fields in Patch requests.
3363	NullFields []string `json:"-"`
3364}
3365
3366func (s *QuestListResponse) MarshalJSON() ([]byte, error) {
3367	type NoMethod QuestListResponse
3368	raw := NoMethod(*s)
3369	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3370}
3371
3372// QuestMilestone: This is a JSON template for a Quest Milestone
3373// resource.
3374type QuestMilestone struct {
3375	// CompletionRewardData: The completion reward data of the milestone,
3376	// represented as a Base64-encoded string. This is a developer-specified
3377	// binary blob with size between 0 and 2 KB before encoding.
3378	CompletionRewardData string `json:"completionRewardData,omitempty"`
3379
3380	// Criteria: The criteria of the milestone.
3381	Criteria []*QuestCriterion `json:"criteria,omitempty"`
3382
3383	// Id: The milestone ID.
3384	Id string `json:"id,omitempty"`
3385
3386	// Kind: Uniquely identifies the type of this resource. Value is always
3387	// the fixed string games#questMilestone.
3388	Kind string `json:"kind,omitempty"`
3389
3390	// State: The current state of the milestone.
3391	// Possible values are:
3392	// - "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not
3393	// yet been claimed.
3394	// - "CLAIMED" - The milestone is complete and has been claimed.
3395	// - "NOT_COMPLETED" - The milestone has not yet been completed.
3396	// - "NOT_STARTED" - The milestone is for a quest that has not yet been
3397	// accepted.
3398	State string `json:"state,omitempty"`
3399
3400	// ForceSendFields is a list of field names (e.g.
3401	// "CompletionRewardData") to unconditionally include in API requests.
3402	// By default, fields with empty values are omitted from API requests.
3403	// However, any non-pointer, non-interface field appearing in
3404	// ForceSendFields will be sent to the server regardless of whether the
3405	// field is empty or not. This may be used to include empty fields in
3406	// Patch requests.
3407	ForceSendFields []string `json:"-"`
3408
3409	// NullFields is a list of field names (e.g. "CompletionRewardData") to
3410	// include in API requests with the JSON null value. By default, fields
3411	// with empty values are omitted from API requests. However, any field
3412	// with an empty value appearing in NullFields will be sent to the
3413	// server as null. It is an error if a field in this list has a
3414	// non-empty value. This may be used to include null fields in Patch
3415	// requests.
3416	NullFields []string `json:"-"`
3417}
3418
3419func (s *QuestMilestone) MarshalJSON() ([]byte, error) {
3420	type NoMethod QuestMilestone
3421	raw := NoMethod(*s)
3422	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3423}
3424
3425// RevisionCheckResponse: This is a JSON template for the result of
3426// checking a revision.
3427type RevisionCheckResponse struct {
3428	// ApiVersion: The version of the API this client revision should use
3429	// when calling API methods.
3430	ApiVersion string `json:"apiVersion,omitempty"`
3431
3432	// Kind: Uniquely identifies the type of this resource. Value is always
3433	// the fixed string games#revisionCheckResponse.
3434	Kind string `json:"kind,omitempty"`
3435
3436	// RevisionStatus: The result of the revision check.
3437	// Possible values are:
3438	// - "OK" - The revision being used is current.
3439	// - "DEPRECATED" - There is currently a newer version available, but
3440	// the revision being used still works.
3441	// - "INVALID" - The revision being used is not supported in any
3442	// released version.
3443	RevisionStatus string `json:"revisionStatus,omitempty"`
3444
3445	// ServerResponse contains the HTTP response code and headers from the
3446	// server.
3447	googleapi.ServerResponse `json:"-"`
3448
3449	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
3450	// unconditionally include in API requests. By default, fields with
3451	// empty values are omitted from API requests. However, any non-pointer,
3452	// non-interface field appearing in ForceSendFields will be sent to the
3453	// server regardless of whether the field is empty or not. This may be
3454	// used to include empty fields in Patch requests.
3455	ForceSendFields []string `json:"-"`
3456
3457	// NullFields is a list of field names (e.g. "ApiVersion") to include in
3458	// API requests with the JSON null value. By default, fields with empty
3459	// values are omitted from API requests. However, any field with an
3460	// empty value appearing in NullFields will be sent to the server as
3461	// null. It is an error if a field in this list has a non-empty value.
3462	// This may be used to include null fields in Patch requests.
3463	NullFields []string `json:"-"`
3464}
3465
3466func (s *RevisionCheckResponse) MarshalJSON() ([]byte, error) {
3467	type NoMethod RevisionCheckResponse
3468	raw := NoMethod(*s)
3469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3470}
3471
3472// Room: This is a JSON template for a room resource object.
3473type Room struct {
3474	// ApplicationId: The ID of the application being played.
3475	ApplicationId string `json:"applicationId,omitempty"`
3476
3477	// AutoMatchingCriteria: Criteria for auto-matching players into this
3478	// room.
3479	AutoMatchingCriteria *RoomAutoMatchingCriteria `json:"autoMatchingCriteria,omitempty"`
3480
3481	// AutoMatchingStatus: Auto-matching status for this room. Not set if
3482	// the room is not currently in the auto-matching queue.
3483	AutoMatchingStatus *RoomAutoMatchStatus `json:"autoMatchingStatus,omitempty"`
3484
3485	// CreationDetails: Details about the room creation.
3486	CreationDetails *RoomModification `json:"creationDetails,omitempty"`
3487
3488	// Description: This short description is generated by our servers and
3489	// worded relative to the player requesting the room. It is intended to
3490	// be displayed when the room is shown in a list (that is, an invitation
3491	// to a room.)
3492	Description string `json:"description,omitempty"`
3493
3494	// InviterId: The ID of the participant that invited the user to the
3495	// room. Not set if the user was not invited to the room.
3496	InviterId string `json:"inviterId,omitempty"`
3497
3498	// Kind: Uniquely identifies the type of this resource. Value is always
3499	// the fixed string games#room.
3500	Kind string `json:"kind,omitempty"`
3501
3502	// LastUpdateDetails: Details about the last update to the room.
3503	LastUpdateDetails *RoomModification `json:"lastUpdateDetails,omitempty"`
3504
3505	// Participants: The participants involved in the room, along with their
3506	// statuses. Includes participants who have left or declined
3507	// invitations.
3508	Participants []*RoomParticipant `json:"participants,omitempty"`
3509
3510	// RoomId: Globally unique ID for a room.
3511	RoomId string `json:"roomId,omitempty"`
3512
3513	// RoomStatusVersion: The version of the room status: an increasing
3514	// counter, used by the client to ignore out-of-order updates to room
3515	// status.
3516	RoomStatusVersion int64 `json:"roomStatusVersion,omitempty"`
3517
3518	// Status: The status of the room.
3519	// Possible values are:
3520	// - "ROOM_INVITING" - One or more players have been invited and not
3521	// responded.
3522	// - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by
3523	// auto-matching.
3524	// - "ROOM_CONNECTING" - Players have joined and are connecting to each
3525	// other (either before or after auto-matching).
3526	// - "ROOM_ACTIVE" - All players have joined and connected to each
3527	// other.
3528	// - "ROOM_DELETED" - The room should no longer be shown on the client.
3529	// Returned in sync calls when a player joins a room (as a tombstone),
3530	// or for rooms where all joined participants have left.
3531	Status string `json:"status,omitempty"`
3532
3533	// Variant: The variant / mode of the application being played; can be
3534	// any integer value, or left blank.
3535	Variant int64 `json:"variant,omitempty"`
3536
3537	// ServerResponse contains the HTTP response code and headers from the
3538	// server.
3539	googleapi.ServerResponse `json:"-"`
3540
3541	// ForceSendFields is a list of field names (e.g. "ApplicationId") to
3542	// unconditionally include in API requests. By default, fields with
3543	// empty values are omitted from API requests. However, any non-pointer,
3544	// non-interface field appearing in ForceSendFields will be sent to the
3545	// server regardless of whether the field is empty or not. This may be
3546	// used to include empty fields in Patch requests.
3547	ForceSendFields []string `json:"-"`
3548
3549	// NullFields is a list of field names (e.g. "ApplicationId") to include
3550	// in API requests with the JSON null value. By default, fields with
3551	// empty values are omitted from API requests. However, any field with
3552	// an empty value appearing in NullFields will be sent to the server as
3553	// null. It is an error if a field in this list has a non-empty value.
3554	// This may be used to include null fields in Patch requests.
3555	NullFields []string `json:"-"`
3556}
3557
3558func (s *Room) MarshalJSON() ([]byte, error) {
3559	type NoMethod Room
3560	raw := NoMethod(*s)
3561	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3562}
3563
3564// RoomAutoMatchStatus: This is a JSON template for status of room
3565// automatching that is in progress.
3566type RoomAutoMatchStatus struct {
3567	// Kind: Uniquely identifies the type of this resource. Value is always
3568	// the fixed string games#roomAutoMatchStatus.
3569	Kind string `json:"kind,omitempty"`
3570
3571	// WaitEstimateSeconds: An estimate for the amount of time (in seconds)
3572	// that auto-matching is expected to take to complete.
3573	WaitEstimateSeconds int64 `json:"waitEstimateSeconds,omitempty"`
3574
3575	// ForceSendFields is a list of field names (e.g. "Kind") to
3576	// unconditionally include in API requests. By default, fields with
3577	// empty values are omitted from API requests. However, any non-pointer,
3578	// non-interface field appearing in ForceSendFields will be sent to the
3579	// server regardless of whether the field is empty or not. This may be
3580	// used to include empty fields in Patch requests.
3581	ForceSendFields []string `json:"-"`
3582
3583	// NullFields is a list of field names (e.g. "Kind") to include in API
3584	// requests with the JSON null value. By default, fields with empty
3585	// values are omitted from API requests. However, any field with an
3586	// empty value appearing in NullFields will be sent to the server as
3587	// null. It is an error if a field in this list has a non-empty value.
3588	// This may be used to include null fields in Patch requests.
3589	NullFields []string `json:"-"`
3590}
3591
3592func (s *RoomAutoMatchStatus) MarshalJSON() ([]byte, error) {
3593	type NoMethod RoomAutoMatchStatus
3594	raw := NoMethod(*s)
3595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3596}
3597
3598// RoomAutoMatchingCriteria: This is a JSON template for a room
3599// auto-match criteria object.
3600type RoomAutoMatchingCriteria struct {
3601	// ExclusiveBitmask: A bitmask indicating when auto-matches are valid.
3602	// When ANDed with other exclusive bitmasks, the result must be zero.
3603	// Can be used to support exclusive roles within a game.
3604	ExclusiveBitmask int64 `json:"exclusiveBitmask,omitempty,string"`
3605
3606	// Kind: Uniquely identifies the type of this resource. Value is always
3607	// the fixed string games#roomAutoMatchingCriteria.
3608	Kind string `json:"kind,omitempty"`
3609
3610	// MaxAutoMatchingPlayers: The maximum number of players that should be
3611	// added to the room by auto-matching.
3612	MaxAutoMatchingPlayers int64 `json:"maxAutoMatchingPlayers,omitempty"`
3613
3614	// MinAutoMatchingPlayers: The minimum number of players that should be
3615	// added to the room by auto-matching.
3616	MinAutoMatchingPlayers int64 `json:"minAutoMatchingPlayers,omitempty"`
3617
3618	// ForceSendFields is a list of field names (e.g. "ExclusiveBitmask") to
3619	// unconditionally include in API requests. By default, fields with
3620	// empty values are omitted from API requests. However, any non-pointer,
3621	// non-interface field appearing in ForceSendFields will be sent to the
3622	// server regardless of whether the field is empty or not. This may be
3623	// used to include empty fields in Patch requests.
3624	ForceSendFields []string `json:"-"`
3625
3626	// NullFields is a list of field names (e.g. "ExclusiveBitmask") to
3627	// include in API requests with the JSON null value. By default, fields
3628	// with empty values are omitted from API requests. However, any field
3629	// with an empty value appearing in NullFields will be sent to the
3630	// server as null. It is an error if a field in this list has a
3631	// non-empty value. This may be used to include null fields in Patch
3632	// requests.
3633	NullFields []string `json:"-"`
3634}
3635
3636func (s *RoomAutoMatchingCriteria) MarshalJSON() ([]byte, error) {
3637	type NoMethod RoomAutoMatchingCriteria
3638	raw := NoMethod(*s)
3639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3640}
3641
3642// RoomClientAddress: This is a JSON template for the client address
3643// when setting up a room.
3644type RoomClientAddress struct {
3645	// Kind: Uniquely identifies the type of this resource. Value is always
3646	// the fixed string games#roomClientAddress.
3647	Kind string `json:"kind,omitempty"`
3648
3649	// XmppAddress: The XMPP address of the client on the Google Games XMPP
3650	// network.
3651	XmppAddress string `json:"xmppAddress,omitempty"`
3652
3653	// ForceSendFields is a list of field names (e.g. "Kind") to
3654	// unconditionally include in API requests. By default, fields with
3655	// empty values are omitted from API requests. However, any non-pointer,
3656	// non-interface field appearing in ForceSendFields will be sent to the
3657	// server regardless of whether the field is empty or not. This may be
3658	// used to include empty fields in Patch requests.
3659	ForceSendFields []string `json:"-"`
3660
3661	// NullFields is a list of field names (e.g. "Kind") to include in API
3662	// requests with the JSON null value. By default, fields with empty
3663	// values are omitted from API requests. However, any field with an
3664	// empty value appearing in NullFields will be sent to the server as
3665	// null. It is an error if a field in this list has a non-empty value.
3666	// This may be used to include null fields in Patch requests.
3667	NullFields []string `json:"-"`
3668}
3669
3670func (s *RoomClientAddress) MarshalJSON() ([]byte, error) {
3671	type NoMethod RoomClientAddress
3672	raw := NoMethod(*s)
3673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3674}
3675
3676// RoomCreateRequest: This is a JSON template for a room creation
3677// request.
3678type RoomCreateRequest struct {
3679	// AutoMatchingCriteria: Criteria for auto-matching players into this
3680	// room.
3681	AutoMatchingCriteria *RoomAutoMatchingCriteria `json:"autoMatchingCriteria,omitempty"`
3682
3683	// Capabilities: The capabilities that this client supports for realtime
3684	// communication.
3685	Capabilities []string `json:"capabilities,omitempty"`
3686
3687	// ClientAddress: Client address for the player creating the room.
3688	ClientAddress *RoomClientAddress `json:"clientAddress,omitempty"`
3689
3690	// InvitedPlayerIds: The player IDs to invite to the room.
3691	InvitedPlayerIds []string `json:"invitedPlayerIds,omitempty"`
3692
3693	// Kind: Uniquely identifies the type of this resource. Value is always
3694	// the fixed string games#roomCreateRequest.
3695	Kind string `json:"kind,omitempty"`
3696
3697	// NetworkDiagnostics: Network diagnostics for the client creating the
3698	// room.
3699	NetworkDiagnostics *NetworkDiagnostics `json:"networkDiagnostics,omitempty"`
3700
3701	// RequestId: A randomly generated numeric ID. This number is used at
3702	// the server to ensure that the request is handled correctly across
3703	// retries.
3704	RequestId int64 `json:"requestId,omitempty,string"`
3705
3706	// Variant: The variant / mode of the application to be played. This can
3707	// be any integer value, or left blank. You should use a small number of
3708	// variants to keep the auto-matching pool as large as possible.
3709	Variant int64 `json:"variant,omitempty"`
3710
3711	// ForceSendFields is a list of field names (e.g.
3712	// "AutoMatchingCriteria") to unconditionally include in API requests.
3713	// By default, fields with empty values are omitted from API requests.
3714	// However, any non-pointer, non-interface field appearing in
3715	// ForceSendFields will be sent to the server regardless of whether the
3716	// field is empty or not. This may be used to include empty fields in
3717	// Patch requests.
3718	ForceSendFields []string `json:"-"`
3719
3720	// NullFields is a list of field names (e.g. "AutoMatchingCriteria") to
3721	// include in API requests with the JSON null value. By default, fields
3722	// with empty values are omitted from API requests. However, any field
3723	// with an empty value appearing in NullFields will be sent to the
3724	// server as null. It is an error if a field in this list has a
3725	// non-empty value. This may be used to include null fields in Patch
3726	// requests.
3727	NullFields []string `json:"-"`
3728}
3729
3730func (s *RoomCreateRequest) MarshalJSON() ([]byte, error) {
3731	type NoMethod RoomCreateRequest
3732	raw := NoMethod(*s)
3733	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3734}
3735
3736// RoomJoinRequest: This is a JSON template for a join room request.
3737type RoomJoinRequest struct {
3738	// Capabilities: The capabilities that this client supports for realtime
3739	// communication.
3740	Capabilities []string `json:"capabilities,omitempty"`
3741
3742	// ClientAddress: Client address for the player joining the room.
3743	ClientAddress *RoomClientAddress `json:"clientAddress,omitempty"`
3744
3745	// Kind: Uniquely identifies the type of this resource. Value is always
3746	// the fixed string games#roomJoinRequest.
3747	Kind string `json:"kind,omitempty"`
3748
3749	// NetworkDiagnostics: Network diagnostics for the client joining the
3750	// room.
3751	NetworkDiagnostics *NetworkDiagnostics `json:"networkDiagnostics,omitempty"`
3752
3753	// ForceSendFields is a list of field names (e.g. "Capabilities") to
3754	// unconditionally include in API requests. By default, fields with
3755	// empty values are omitted from API requests. However, any non-pointer,
3756	// non-interface field appearing in ForceSendFields will be sent to the
3757	// server regardless of whether the field is empty or not. This may be
3758	// used to include empty fields in Patch requests.
3759	ForceSendFields []string `json:"-"`
3760
3761	// NullFields is a list of field names (e.g. "Capabilities") to include
3762	// in API requests with the JSON null value. By default, fields with
3763	// empty values are omitted from API requests. However, any field with
3764	// an empty value appearing in NullFields will be sent to the server as
3765	// null. It is an error if a field in this list has a non-empty value.
3766	// This may be used to include null fields in Patch requests.
3767	NullFields []string `json:"-"`
3768}
3769
3770func (s *RoomJoinRequest) MarshalJSON() ([]byte, error) {
3771	type NoMethod RoomJoinRequest
3772	raw := NoMethod(*s)
3773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3774}
3775
3776// RoomLeaveDiagnostics: This is a JSON template for room leave
3777// diagnostics.
3778type RoomLeaveDiagnostics struct {
3779	// AndroidNetworkSubtype: Android network subtype.
3780	// http://developer.android.com/reference/android/net/NetworkInfo.html#getSubtype()
3781	AndroidNetworkSubtype int64 `json:"androidNetworkSubtype,omitempty"`
3782
3783	// AndroidNetworkType: Android network type.
3784	// http://developer.android.com/reference/android/net/NetworkInfo.html#getType()
3785	AndroidNetworkType int64 `json:"androidNetworkType,omitempty"`
3786
3787	// IosNetworkType: iOS network type as defined in Reachability.h.
3788	IosNetworkType int64 `json:"iosNetworkType,omitempty"`
3789
3790	// Kind: Uniquely identifies the type of this resource. Value is always
3791	// the fixed string games#roomLeaveDiagnostics.
3792	Kind string `json:"kind,omitempty"`
3793
3794	// NetworkOperatorCode: The MCC+MNC code for the client's network
3795	// connection. On Android:
3796	// http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperator() On iOS, see:
3797	// https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html
3798	NetworkOperatorCode string `json:"networkOperatorCode,omitempty"`
3799
3800	// NetworkOperatorName: The name of the carrier of the client's network
3801	// connection. On Android:
3802	// http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperatorName() On iOS:
3803	// https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carrierName
3804	NetworkOperatorName string `json:"networkOperatorName,omitempty"`
3805
3806	// PeerSession: Diagnostics about all peer sessions.
3807	PeerSession []*PeerSessionDiagnostics `json:"peerSession,omitempty"`
3808
3809	// SocketsUsed: Whether or not sockets were used.
3810	SocketsUsed bool `json:"socketsUsed,omitempty"`
3811
3812	// ForceSendFields is a list of field names (e.g.
3813	// "AndroidNetworkSubtype") to unconditionally include in API requests.
3814	// By default, fields with empty values are omitted from API requests.
3815	// However, any non-pointer, non-interface field appearing in
3816	// ForceSendFields will be sent to the server regardless of whether the
3817	// field is empty or not. This may be used to include empty fields in
3818	// Patch requests.
3819	ForceSendFields []string `json:"-"`
3820
3821	// NullFields is a list of field names (e.g. "AndroidNetworkSubtype") to
3822	// include in API requests with the JSON null value. By default, fields
3823	// with empty values are omitted from API requests. However, any field
3824	// with an empty value appearing in NullFields will be sent to the
3825	// server as null. It is an error if a field in this list has a
3826	// non-empty value. This may be used to include null fields in Patch
3827	// requests.
3828	NullFields []string `json:"-"`
3829}
3830
3831func (s *RoomLeaveDiagnostics) MarshalJSON() ([]byte, error) {
3832	type NoMethod RoomLeaveDiagnostics
3833	raw := NoMethod(*s)
3834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3835}
3836
3837// RoomLeaveRequest: This is a JSON template for a leave room request.
3838type RoomLeaveRequest struct {
3839	// Kind: Uniquely identifies the type of this resource. Value is always
3840	// the fixed string games#roomLeaveRequest.
3841	Kind string `json:"kind,omitempty"`
3842
3843	// LeaveDiagnostics: Diagnostics for a player leaving the room.
3844	LeaveDiagnostics *RoomLeaveDiagnostics `json:"leaveDiagnostics,omitempty"`
3845
3846	// Reason: Reason for leaving the match.
3847	// Possible values are:
3848	// - "PLAYER_LEFT" - The player chose to leave the room..
3849	// - "GAME_LEFT" - The game chose to remove the player from the room.
3850	// - "REALTIME_ABANDONED" - The player switched to another application
3851	// and abandoned the room.
3852	// - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to
3853	// establish a connection to other peer(s).
3854	// - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to
3855	// communicate with the server.
3856	// - "REALTIME_SERVER_ERROR" - The client received an error response
3857	// when it tried to communicate with the server.
3858	// - "REALTIME_TIMEOUT" - The client timed out while waiting for a room.
3859	//
3860	// - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without
3861	// first calling Leave.
3862	// - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room.
3863	//
3864	// - "REALTIME_GAME_CRASHED" - The game crashed.
3865	// - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed.
3866	// - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is
3867	// trying to enter a room.
3868	// - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying
3869	// to enter a new room.
3870	Reason string `json:"reason,omitempty"`
3871
3872	// ForceSendFields is a list of field names (e.g. "Kind") to
3873	// unconditionally include in API requests. By default, fields with
3874	// empty values are omitted from API requests. However, any non-pointer,
3875	// non-interface field appearing in ForceSendFields will be sent to the
3876	// server regardless of whether the field is empty or not. This may be
3877	// used to include empty fields in Patch requests.
3878	ForceSendFields []string `json:"-"`
3879
3880	// NullFields is a list of field names (e.g. "Kind") to include in API
3881	// requests with the JSON null value. By default, fields with empty
3882	// values are omitted from API requests. However, any field with an
3883	// empty value appearing in NullFields will be sent to the server as
3884	// null. It is an error if a field in this list has a non-empty value.
3885	// This may be used to include null fields in Patch requests.
3886	NullFields []string `json:"-"`
3887}
3888
3889func (s *RoomLeaveRequest) MarshalJSON() ([]byte, error) {
3890	type NoMethod RoomLeaveRequest
3891	raw := NoMethod(*s)
3892	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3893}
3894
3895// RoomList: This is a JSON template for a list of rooms.
3896type RoomList struct {
3897	// Items: The rooms.
3898	Items []*Room `json:"items,omitempty"`
3899
3900	// Kind: Uniquely identifies the type of this resource. Value is always
3901	// the fixed string games#roomList.
3902	Kind string `json:"kind,omitempty"`
3903
3904	// NextPageToken: The pagination token for the next page of results.
3905	NextPageToken string `json:"nextPageToken,omitempty"`
3906
3907	// ServerResponse contains the HTTP response code and headers from the
3908	// server.
3909	googleapi.ServerResponse `json:"-"`
3910
3911	// ForceSendFields is a list of field names (e.g. "Items") to
3912	// unconditionally include in API requests. By default, fields with
3913	// empty values are omitted from API requests. However, any non-pointer,
3914	// non-interface field appearing in ForceSendFields will be sent to the
3915	// server regardless of whether the field is empty or not. This may be
3916	// used to include empty fields in Patch requests.
3917	ForceSendFields []string `json:"-"`
3918
3919	// NullFields is a list of field names (e.g. "Items") to include in API
3920	// requests with the JSON null value. By default, fields with empty
3921	// values are omitted from API requests. However, any field with an
3922	// empty value appearing in NullFields will be sent to the server as
3923	// null. It is an error if a field in this list has a non-empty value.
3924	// This may be used to include null fields in Patch requests.
3925	NullFields []string `json:"-"`
3926}
3927
3928func (s *RoomList) MarshalJSON() ([]byte, error) {
3929	type NoMethod RoomList
3930	raw := NoMethod(*s)
3931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3932}
3933
3934// RoomModification: This is a JSON template for room modification
3935// metadata.
3936type RoomModification struct {
3937	// Kind: Uniquely identifies the type of this resource. Value is always
3938	// the fixed string games#roomModification.
3939	Kind string `json:"kind,omitempty"`
3940
3941	// ModifiedTimestampMillis: The timestamp at which they modified the
3942	// room, in milliseconds since the epoch in UTC.
3943	ModifiedTimestampMillis int64 `json:"modifiedTimestampMillis,omitempty,string"`
3944
3945	// ParticipantId: The ID of the participant that modified the room.
3946	ParticipantId string `json:"participantId,omitempty"`
3947
3948	// ForceSendFields is a list of field names (e.g. "Kind") to
3949	// unconditionally include in API requests. By default, fields with
3950	// empty values are omitted from API requests. However, any non-pointer,
3951	// non-interface field appearing in ForceSendFields will be sent to the
3952	// server regardless of whether the field is empty or not. This may be
3953	// used to include empty fields in Patch requests.
3954	ForceSendFields []string `json:"-"`
3955
3956	// NullFields is a list of field names (e.g. "Kind") to include in API
3957	// requests with the JSON null value. By default, fields with empty
3958	// values are omitted from API requests. However, any field with an
3959	// empty value appearing in NullFields will be sent to the server as
3960	// null. It is an error if a field in this list has a non-empty value.
3961	// This may be used to include null fields in Patch requests.
3962	NullFields []string `json:"-"`
3963}
3964
3965func (s *RoomModification) MarshalJSON() ([]byte, error) {
3966	type NoMethod RoomModification
3967	raw := NoMethod(*s)
3968	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3969}
3970
3971// RoomP2PStatus: This is a JSON template for an update on the status of
3972// a peer in a room.
3973type RoomP2PStatus struct {
3974	// ConnectionSetupLatencyMillis: The amount of time in milliseconds it
3975	// took to establish connections with this peer.
3976	ConnectionSetupLatencyMillis int64 `json:"connectionSetupLatencyMillis,omitempty"`
3977
3978	// Error: The error code in event of a failure.
3979	// Possible values are:
3980	// - "P2P_FAILED" - The client failed to establish a P2P connection with
3981	// the peer.
3982	// - "PRESENCE_FAILED" - The client failed to register to receive P2P
3983	// connections.
3984	// - "RELAY_SERVER_FAILED" - The client received an error when trying to
3985	// use the relay server to establish a P2P connection with the peer.
3986	Error string `json:"error,omitempty"`
3987
3988	// ErrorReason: More detailed diagnostic message returned in event of a
3989	// failure.
3990	ErrorReason string `json:"error_reason,omitempty"`
3991
3992	// Kind: Uniquely identifies the type of this resource. Value is always
3993	// the fixed string games#roomP2PStatus.
3994	Kind string `json:"kind,omitempty"`
3995
3996	// ParticipantId: The ID of the participant.
3997	ParticipantId string `json:"participantId,omitempty"`
3998
3999	// Status: The status of the peer in the room.
4000	// Possible values are:
4001	// - "CONNECTION_ESTABLISHED" - The client established a P2P connection
4002	// with the peer.
4003	// - "CONNECTION_FAILED" - The client failed to establish directed
4004	// presence with the peer.
4005	Status string `json:"status,omitempty"`
4006
4007	// UnreliableRoundtripLatencyMillis: The amount of time in milliseconds
4008	// it took to send packets back and forth on the unreliable channel with
4009	// this peer.
4010	UnreliableRoundtripLatencyMillis int64 `json:"unreliableRoundtripLatencyMillis,omitempty"`
4011
4012	// ForceSendFields is a list of field names (e.g.
4013	// "ConnectionSetupLatencyMillis") to unconditionally include in API
4014	// requests. By default, fields with empty values are omitted from API
4015	// requests. However, any non-pointer, non-interface field appearing in
4016	// ForceSendFields will be sent to the server regardless of whether the
4017	// field is empty or not. This may be used to include empty fields in
4018	// Patch requests.
4019	ForceSendFields []string `json:"-"`
4020
4021	// NullFields is a list of field names (e.g.
4022	// "ConnectionSetupLatencyMillis") to include in API requests with the
4023	// JSON null value. By default, fields with empty values are omitted
4024	// from API requests. However, any field with an empty value appearing
4025	// in NullFields will be sent to the server as null. It is an error if a
4026	// field in this list has a non-empty value. This may be used to include
4027	// null fields in Patch requests.
4028	NullFields []string `json:"-"`
4029}
4030
4031func (s *RoomP2PStatus) MarshalJSON() ([]byte, error) {
4032	type NoMethod RoomP2PStatus
4033	raw := NoMethod(*s)
4034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4035}
4036
4037// RoomP2PStatuses: This is a JSON template for an update on the status
4038// of peers in a room.
4039type RoomP2PStatuses struct {
4040	// Kind: Uniquely identifies the type of this resource. Value is always
4041	// the fixed string games#roomP2PStatuses.
4042	Kind string `json:"kind,omitempty"`
4043
4044	// Updates: The updates for the peers.
4045	Updates []*RoomP2PStatus `json:"updates,omitempty"`
4046
4047	// ForceSendFields is a list of field names (e.g. "Kind") to
4048	// unconditionally include in API requests. By default, fields with
4049	// empty values are omitted from API requests. However, any non-pointer,
4050	// non-interface field appearing in ForceSendFields will be sent to the
4051	// server regardless of whether the field is empty or not. This may be
4052	// used to include empty fields in Patch requests.
4053	ForceSendFields []string `json:"-"`
4054
4055	// NullFields is a list of field names (e.g. "Kind") to include in API
4056	// requests with the JSON null value. By default, fields with empty
4057	// values are omitted from API requests. However, any field with an
4058	// empty value appearing in NullFields will be sent to the server as
4059	// null. It is an error if a field in this list has a non-empty value.
4060	// This may be used to include null fields in Patch requests.
4061	NullFields []string `json:"-"`
4062}
4063
4064func (s *RoomP2PStatuses) MarshalJSON() ([]byte, error) {
4065	type NoMethod RoomP2PStatuses
4066	raw := NoMethod(*s)
4067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4068}
4069
4070// RoomParticipant: This is a JSON template for a participant in a room.
4071type RoomParticipant struct {
4072	// AutoMatched: True if this participant was auto-matched with the
4073	// requesting player.
4074	AutoMatched bool `json:"autoMatched,omitempty"`
4075
4076	// AutoMatchedPlayer: Information about a player that has been
4077	// anonymously auto-matched against the requesting player. (Either
4078	// player or autoMatchedPlayer will be set.)
4079	AutoMatchedPlayer *AnonymousPlayer `json:"autoMatchedPlayer,omitempty"`
4080
4081	// Capabilities: The capabilities which can be used when communicating
4082	// with this participant.
4083	Capabilities []string `json:"capabilities,omitempty"`
4084
4085	// ClientAddress: Client address for the participant.
4086	ClientAddress *RoomClientAddress `json:"clientAddress,omitempty"`
4087
4088	// Connected: True if this participant is in the fully connected set of
4089	// peers in the room.
4090	Connected bool `json:"connected,omitempty"`
4091
4092	// Id: An identifier for the participant in the scope of the room.
4093	// Cannot be used to identify a player across rooms or in other
4094	// contexts.
4095	Id string `json:"id,omitempty"`
4096
4097	// Kind: Uniquely identifies the type of this resource. Value is always
4098	// the fixed string games#roomParticipant.
4099	Kind string `json:"kind,omitempty"`
4100
4101	// LeaveReason: The reason the participant left the room; populated if
4102	// the participant status is PARTICIPANT_LEFT.
4103	// Possible values are:
4104	// - "PLAYER_LEFT" - The player explicitly chose to leave the room.
4105	// - "GAME_LEFT" - The game chose to remove the player from the room.
4106	// - "ABANDONED" - The player switched to another application and
4107	// abandoned the room.
4108	// - "PEER_CONNECTION_FAILURE" - The client was unable to establish or
4109	// maintain a connection to other peer(s) in the room.
4110	// - "SERVER_ERROR" - The client received an error response when it
4111	// tried to communicate with the server.
4112	// - "TIMEOUT" - The client timed out while waiting for players to join
4113	// and connect.
4114	// - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
4115	LeaveReason string `json:"leaveReason,omitempty"`
4116
4117	// Player: Information about the player. Not populated if this player
4118	// was anonymously auto-matched against the requesting player. (Either
4119	// player or autoMatchedPlayer will be set.)
4120	Player *Player `json:"player,omitempty"`
4121
4122	// Status: The status of the participant with respect to the
4123	// room.
4124	// Possible values are:
4125	// - "PARTICIPANT_INVITED" - The participant has been invited to join
4126	// the room, but has not yet responded.
4127	// - "PARTICIPANT_JOINED" - The participant has joined the room (either
4128	// after creating it or accepting an invitation.)
4129	// - "PARTICIPANT_DECLINED" - The participant declined an invitation to
4130	// join the room.
4131	// - "PARTICIPANT_LEFT" - The participant joined the room and then left
4132	// it.
4133	Status string `json:"status,omitempty"`
4134
4135	// ForceSendFields is a list of field names (e.g. "AutoMatched") to
4136	// unconditionally include in API requests. By default, fields with
4137	// empty values are omitted from API requests. However, any non-pointer,
4138	// non-interface field appearing in ForceSendFields will be sent to the
4139	// server regardless of whether the field is empty or not. This may be
4140	// used to include empty fields in Patch requests.
4141	ForceSendFields []string `json:"-"`
4142
4143	// NullFields is a list of field names (e.g. "AutoMatched") to include
4144	// in API requests with the JSON null value. By default, fields with
4145	// empty values are omitted from API requests. However, any field with
4146	// an empty value appearing in NullFields will be sent to the server as
4147	// null. It is an error if a field in this list has a non-empty value.
4148	// This may be used to include null fields in Patch requests.
4149	NullFields []string `json:"-"`
4150}
4151
4152func (s *RoomParticipant) MarshalJSON() ([]byte, error) {
4153	type NoMethod RoomParticipant
4154	raw := NoMethod(*s)
4155	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4156}
4157
4158// RoomStatus: This is a JSON template for the status of a room that the
4159// player has joined.
4160type RoomStatus struct {
4161	// AutoMatchingStatus: Auto-matching status for this room. Not set if
4162	// the room is not currently in the automatching queue.
4163	AutoMatchingStatus *RoomAutoMatchStatus `json:"autoMatchingStatus,omitempty"`
4164
4165	// Kind: Uniquely identifies the type of this resource. Value is always
4166	// the fixed string games#roomStatus.
4167	Kind string `json:"kind,omitempty"`
4168
4169	// Participants: The participants involved in the room, along with their
4170	// statuses. Includes participants who have left or declined
4171	// invitations.
4172	Participants []*RoomParticipant `json:"participants,omitempty"`
4173
4174	// RoomId: Globally unique ID for a room.
4175	RoomId string `json:"roomId,omitempty"`
4176
4177	// Status: The status of the room.
4178	// Possible values are:
4179	// - "ROOM_INVITING" - One or more players have been invited and not
4180	// responded.
4181	// - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by
4182	// auto-matching.
4183	// - "ROOM_CONNECTING" - Players have joined are connecting to each
4184	// other (either before or after auto-matching).
4185	// - "ROOM_ACTIVE" - All players have joined and connected to each
4186	// other.
4187	// - "ROOM_DELETED" - All joined players have left.
4188	Status string `json:"status,omitempty"`
4189
4190	// StatusVersion: The version of the status for the room: an increasing
4191	// counter, used by the client to ignore out-of-order updates to room
4192	// status.
4193	StatusVersion int64 `json:"statusVersion,omitempty"`
4194
4195	// ServerResponse contains the HTTP response code and headers from the
4196	// server.
4197	googleapi.ServerResponse `json:"-"`
4198
4199	// ForceSendFields is a list of field names (e.g. "AutoMatchingStatus")
4200	// to unconditionally include in API requests. By default, fields with
4201	// empty values are omitted from API requests. However, any non-pointer,
4202	// non-interface field appearing in ForceSendFields will be sent to the
4203	// server regardless of whether the field is empty or not. This may be
4204	// used to include empty fields in Patch requests.
4205	ForceSendFields []string `json:"-"`
4206
4207	// NullFields is a list of field names (e.g. "AutoMatchingStatus") to
4208	// include in API requests with the JSON null value. By default, fields
4209	// with empty values are omitted from API requests. However, any field
4210	// with an empty value appearing in NullFields will be sent to the
4211	// server as null. It is an error if a field in this list has a
4212	// non-empty value. This may be used to include null fields in Patch
4213	// requests.
4214	NullFields []string `json:"-"`
4215}
4216
4217func (s *RoomStatus) MarshalJSON() ([]byte, error) {
4218	type NoMethod RoomStatus
4219	raw := NoMethod(*s)
4220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4221}
4222
4223// ScoreSubmission: This is a JSON template for a request to submit a
4224// score to leaderboards.
4225type ScoreSubmission struct {
4226	// Kind: Uniquely identifies the type of this resource. Value is always
4227	// the fixed string games#scoreSubmission.
4228	Kind string `json:"kind,omitempty"`
4229
4230	// LeaderboardId: The leaderboard this score is being submitted to.
4231	LeaderboardId string `json:"leaderboardId,omitempty"`
4232
4233	// Score: The new score being submitted.
4234	Score int64 `json:"score,omitempty,string"`
4235
4236	// ScoreTag: Additional information about this score. Values will
4237	// contain no more than 64 URI-safe characters as defined by section 2.3
4238	// of RFC 3986.
4239	ScoreTag string `json:"scoreTag,omitempty"`
4240
4241	// Signature: Signature Values will contain URI-safe characters as
4242	// defined by section 2.3 of RFC 3986.
4243	Signature string `json:"signature,omitempty"`
4244
4245	// ForceSendFields is a list of field names (e.g. "Kind") to
4246	// unconditionally include in API requests. By default, fields with
4247	// empty values are omitted from API requests. However, any non-pointer,
4248	// non-interface field appearing in ForceSendFields will be sent to the
4249	// server regardless of whether the field is empty or not. This may be
4250	// used to include empty fields in Patch requests.
4251	ForceSendFields []string `json:"-"`
4252
4253	// NullFields is a list of field names (e.g. "Kind") to include in API
4254	// requests with the JSON null value. By default, fields with empty
4255	// values are omitted from API requests. However, any field with an
4256	// empty value appearing in NullFields will be sent to the server as
4257	// null. It is an error if a field in this list has a non-empty value.
4258	// This may be used to include null fields in Patch requests.
4259	NullFields []string `json:"-"`
4260}
4261
4262func (s *ScoreSubmission) MarshalJSON() ([]byte, error) {
4263	type NoMethod ScoreSubmission
4264	raw := NoMethod(*s)
4265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4266}
4267
4268// Snapshot: This is a JSON template for an snapshot object.
4269type Snapshot struct {
4270	// CoverImage: The cover image of this snapshot. May be absent if there
4271	// is no image.
4272	CoverImage *SnapshotImage `json:"coverImage,omitempty"`
4273
4274	// Description: The description of this snapshot.
4275	Description string `json:"description,omitempty"`
4276
4277	// DriveId: The ID of the file underlying this snapshot in the Drive
4278	// API. Only present if the snapshot is a view on a Drive file and the
4279	// file is owned by the caller.
4280	DriveId string `json:"driveId,omitempty"`
4281
4282	// DurationMillis: The duration associated with this snapshot, in
4283	// millis.
4284	DurationMillis int64 `json:"durationMillis,omitempty,string"`
4285
4286	// Id: The ID of the snapshot.
4287	Id string `json:"id,omitempty"`
4288
4289	// Kind: Uniquely identifies the type of this resource. Value is always
4290	// the fixed string games#snapshot.
4291	Kind string `json:"kind,omitempty"`
4292
4293	// LastModifiedMillis: The timestamp (in millis since Unix epoch) of the
4294	// last modification to this snapshot.
4295	LastModifiedMillis int64 `json:"lastModifiedMillis,omitempty,string"`
4296
4297	// ProgressValue: The progress value (64-bit integer set by developer)
4298	// associated with this snapshot.
4299	ProgressValue int64 `json:"progressValue,omitempty,string"`
4300
4301	// Title: The title of this snapshot.
4302	Title string `json:"title,omitempty"`
4303
4304	// Type: The type of this snapshot.
4305	// Possible values are:
4306	// - "SAVE_GAME" - A snapshot representing a save game.
4307	Type string `json:"type,omitempty"`
4308
4309	// UniqueName: The unique name provided when the snapshot was created.
4310	UniqueName string `json:"uniqueName,omitempty"`
4311
4312	// ServerResponse contains the HTTP response code and headers from the
4313	// server.
4314	googleapi.ServerResponse `json:"-"`
4315
4316	// ForceSendFields is a list of field names (e.g. "CoverImage") to
4317	// unconditionally include in API requests. By default, fields with
4318	// empty values are omitted from API requests. However, any non-pointer,
4319	// non-interface field appearing in ForceSendFields will be sent to the
4320	// server regardless of whether the field is empty or not. This may be
4321	// used to include empty fields in Patch requests.
4322	ForceSendFields []string `json:"-"`
4323
4324	// NullFields is a list of field names (e.g. "CoverImage") to include in
4325	// API requests with the JSON null value. By default, fields with empty
4326	// values are omitted from API requests. However, any field with an
4327	// empty value appearing in NullFields will be sent to the server as
4328	// null. It is an error if a field in this list has a non-empty value.
4329	// This may be used to include null fields in Patch requests.
4330	NullFields []string `json:"-"`
4331}
4332
4333func (s *Snapshot) MarshalJSON() ([]byte, error) {
4334	type NoMethod Snapshot
4335	raw := NoMethod(*s)
4336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4337}
4338
4339// SnapshotImage: This is a JSON template for an image of a snapshot.
4340type SnapshotImage struct {
4341	// Height: The height of the image.
4342	Height int64 `json:"height,omitempty"`
4343
4344	// Kind: Uniquely identifies the type of this resource. Value is always
4345	// the fixed string games#snapshotImage.
4346	Kind string `json:"kind,omitempty"`
4347
4348	// MimeType: The MIME type of the image.
4349	MimeType string `json:"mime_type,omitempty"`
4350
4351	// Url: The URL of the image. This URL may be invalidated at any time
4352	// and should not be cached.
4353	Url string `json:"url,omitempty"`
4354
4355	// Width: The width of the image.
4356	Width int64 `json:"width,omitempty"`
4357
4358	// ForceSendFields is a list of field names (e.g. "Height") to
4359	// unconditionally include in API requests. By default, fields with
4360	// empty values are omitted from API requests. However, any non-pointer,
4361	// non-interface field appearing in ForceSendFields will be sent to the
4362	// server regardless of whether the field is empty or not. This may be
4363	// used to include empty fields in Patch requests.
4364	ForceSendFields []string `json:"-"`
4365
4366	// NullFields is a list of field names (e.g. "Height") to include in API
4367	// requests with the JSON null value. By default, fields with empty
4368	// values are omitted from API requests. However, any field with an
4369	// empty value appearing in NullFields will be sent to the server as
4370	// null. It is an error if a field in this list has a non-empty value.
4371	// This may be used to include null fields in Patch requests.
4372	NullFields []string `json:"-"`
4373}
4374
4375func (s *SnapshotImage) MarshalJSON() ([]byte, error) {
4376	type NoMethod SnapshotImage
4377	raw := NoMethod(*s)
4378	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4379}
4380
4381// SnapshotListResponse: This is a JSON template for a list of snapshot
4382// objects.
4383type SnapshotListResponse struct {
4384	// Items: The snapshots.
4385	Items []*Snapshot `json:"items,omitempty"`
4386
4387	// Kind: Uniquely identifies the type of this resource. Value is always
4388	// the fixed string games#snapshotListResponse.
4389	Kind string `json:"kind,omitempty"`
4390
4391	// NextPageToken: Token corresponding to the next page of results. If
4392	// there are no more results, the token is omitted.
4393	NextPageToken string `json:"nextPageToken,omitempty"`
4394
4395	// ServerResponse contains the HTTP response code and headers from the
4396	// server.
4397	googleapi.ServerResponse `json:"-"`
4398
4399	// ForceSendFields is a list of field names (e.g. "Items") to
4400	// unconditionally include in API requests. By default, fields with
4401	// empty values are omitted from API requests. However, any non-pointer,
4402	// non-interface field appearing in ForceSendFields will be sent to the
4403	// server regardless of whether the field is empty or not. This may be
4404	// used to include empty fields in Patch requests.
4405	ForceSendFields []string `json:"-"`
4406
4407	// NullFields is a list of field names (e.g. "Items") to include in API
4408	// requests with the JSON null value. By default, fields with empty
4409	// values are omitted from API requests. However, any field with an
4410	// empty value appearing in NullFields will be sent to the server as
4411	// null. It is an error if a field in this list has a non-empty value.
4412	// This may be used to include null fields in Patch requests.
4413	NullFields []string `json:"-"`
4414}
4415
4416func (s *SnapshotListResponse) MarshalJSON() ([]byte, error) {
4417	type NoMethod SnapshotListResponse
4418	raw := NoMethod(*s)
4419	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4420}
4421
4422// TurnBasedAutoMatchingCriteria: This is a JSON template for an
4423// turn-based auto-match criteria object.
4424type TurnBasedAutoMatchingCriteria struct {
4425	// ExclusiveBitmask: A bitmask indicating when auto-matches are valid.
4426	// When ANDed with other exclusive bitmasks, the result must be zero.
4427	// Can be used to support exclusive roles within a game.
4428	ExclusiveBitmask int64 `json:"exclusiveBitmask,omitempty,string"`
4429
4430	// Kind: Uniquely identifies the type of this resource. Value is always
4431	// the fixed string games#turnBasedAutoMatchingCriteria.
4432	Kind string `json:"kind,omitempty"`
4433
4434	// MaxAutoMatchingPlayers: The maximum number of players that should be
4435	// added to the match by auto-matching.
4436	MaxAutoMatchingPlayers int64 `json:"maxAutoMatchingPlayers,omitempty"`
4437
4438	// MinAutoMatchingPlayers: The minimum number of players that should be
4439	// added to the match by auto-matching.
4440	MinAutoMatchingPlayers int64 `json:"minAutoMatchingPlayers,omitempty"`
4441
4442	// ForceSendFields is a list of field names (e.g. "ExclusiveBitmask") to
4443	// unconditionally include in API requests. By default, fields with
4444	// empty values are omitted from API requests. However, any non-pointer,
4445	// non-interface field appearing in ForceSendFields will be sent to the
4446	// server regardless of whether the field is empty or not. This may be
4447	// used to include empty fields in Patch requests.
4448	ForceSendFields []string `json:"-"`
4449
4450	// NullFields is a list of field names (e.g. "ExclusiveBitmask") to
4451	// include in API requests with the JSON null value. By default, fields
4452	// with empty values are omitted from API requests. However, any field
4453	// with an empty value appearing in NullFields will be sent to the
4454	// server as null. It is an error if a field in this list has a
4455	// non-empty value. This may be used to include null fields in Patch
4456	// requests.
4457	NullFields []string `json:"-"`
4458}
4459
4460func (s *TurnBasedAutoMatchingCriteria) MarshalJSON() ([]byte, error) {
4461	type NoMethod TurnBasedAutoMatchingCriteria
4462	raw := NoMethod(*s)
4463	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4464}
4465
4466// TurnBasedMatch: This is a JSON template for a turn-based match
4467// resource object.
4468type TurnBasedMatch struct {
4469	// ApplicationId: The ID of the application being played.
4470	ApplicationId string `json:"applicationId,omitempty"`
4471
4472	// AutoMatchingCriteria: Criteria for auto-matching players into this
4473	// match.
4474	AutoMatchingCriteria *TurnBasedAutoMatchingCriteria `json:"autoMatchingCriteria,omitempty"`
4475
4476	// CreationDetails: Details about the match creation.
4477	CreationDetails *TurnBasedMatchModification `json:"creationDetails,omitempty"`
4478
4479	// Data: The data / game state for this match.
4480	Data *TurnBasedMatchData `json:"data,omitempty"`
4481
4482	// Description: This short description is generated by our servers based
4483	// on turn state and is localized and worded relative to the player
4484	// requesting the match. It is intended to be displayed when the match
4485	// is shown in a list.
4486	Description string `json:"description,omitempty"`
4487
4488	// InviterId: The ID of the participant that invited the user to the
4489	// match. Not set if the user was not invited to the match.
4490	InviterId string `json:"inviterId,omitempty"`
4491
4492	// Kind: Uniquely identifies the type of this resource. Value is always
4493	// the fixed string games#turnBasedMatch.
4494	Kind string `json:"kind,omitempty"`
4495
4496	// LastUpdateDetails: Details about the last update to the match.
4497	LastUpdateDetails *TurnBasedMatchModification `json:"lastUpdateDetails,omitempty"`
4498
4499	// MatchId: Globally unique ID for a turn-based match.
4500	MatchId string `json:"matchId,omitempty"`
4501
4502	// MatchNumber: The number of the match in a chain of rematches. Will be
4503	// set to 1 for the first match and incremented by 1 for each rematch.
4504	MatchNumber int64 `json:"matchNumber,omitempty"`
4505
4506	// MatchVersion: The version of this match: an increasing counter, used
4507	// to avoid out-of-date updates to the match.
4508	MatchVersion int64 `json:"matchVersion,omitempty"`
4509
4510	// Participants: The participants involved in the match, along with
4511	// their statuses. Includes participants who have left or declined
4512	// invitations.
4513	Participants []*TurnBasedMatchParticipant `json:"participants,omitempty"`
4514
4515	// PendingParticipantId: The ID of the participant that is taking a
4516	// turn.
4517	PendingParticipantId string `json:"pendingParticipantId,omitempty"`
4518
4519	// PreviousMatchData: The data / game state for the previous match; set
4520	// for the first turn of rematches only.
4521	PreviousMatchData *TurnBasedMatchData `json:"previousMatchData,omitempty"`
4522
4523	// RematchId: The ID of a rematch of this match. Only set for completed
4524	// matches that have been rematched.
4525	RematchId string `json:"rematchId,omitempty"`
4526
4527	// Results: The results reported for this match.
4528	Results []*ParticipantResult `json:"results,omitempty"`
4529
4530	// Status: The status of the match.
4531	// Possible values are:
4532	// - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by
4533	// auto-matching; the match cannot be established until they are filled.
4534	//
4535	// - "MATCH_ACTIVE" - The match has started.
4536	// - "MATCH_COMPLETE" - The match has finished.
4537	// - "MATCH_CANCELED" - The match was canceled.
4538	// - "MATCH_EXPIRED" - The match expired due to inactivity.
4539	// - "MATCH_DELETED" - The match should no longer be shown on the
4540	// client. Returned only for tombstones for matches when sync is called.
4541	Status string `json:"status,omitempty"`
4542
4543	// UserMatchStatus: The status of the current user in the match. Derived
4544	// from the match type, match status, the user's participant status, and
4545	// the pending participant for the match.
4546	// Possible values are:
4547	// - "USER_INVITED" - The user has been invited to join the match and
4548	// has not responded yet.
4549	// - "USER_AWAITING_TURN" - The user is waiting for their turn.
4550	// - "USER_TURN" - The user has an action to take in the match.
4551	// - "USER_MATCH_COMPLETED" - The match has ended (it is completed,
4552	// canceled, or expired.)
4553	UserMatchStatus string `json:"userMatchStatus,omitempty"`
4554
4555	// Variant: The variant / mode of the application being played; can be
4556	// any integer value, or left blank.
4557	Variant int64 `json:"variant,omitempty"`
4558
4559	// WithParticipantId: The ID of another participant in the match that
4560	// can be used when describing the participants the user is playing
4561	// with.
4562	WithParticipantId string `json:"withParticipantId,omitempty"`
4563
4564	// ServerResponse contains the HTTP response code and headers from the
4565	// server.
4566	googleapi.ServerResponse `json:"-"`
4567
4568	// ForceSendFields is a list of field names (e.g. "ApplicationId") to
4569	// unconditionally include in API requests. By default, fields with
4570	// empty values are omitted from API requests. However, any non-pointer,
4571	// non-interface field appearing in ForceSendFields will be sent to the
4572	// server regardless of whether the field is empty or not. This may be
4573	// used to include empty fields in Patch requests.
4574	ForceSendFields []string `json:"-"`
4575
4576	// NullFields is a list of field names (e.g. "ApplicationId") to include
4577	// in API requests with the JSON null value. By default, fields with
4578	// empty values are omitted from API requests. However, any field with
4579	// an empty value appearing in NullFields will be sent to the server as
4580	// null. It is an error if a field in this list has a non-empty value.
4581	// This may be used to include null fields in Patch requests.
4582	NullFields []string `json:"-"`
4583}
4584
4585func (s *TurnBasedMatch) MarshalJSON() ([]byte, error) {
4586	type NoMethod TurnBasedMatch
4587	raw := NoMethod(*s)
4588	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4589}
4590
4591// TurnBasedMatchCreateRequest: This is a JSON template for a turn-based
4592// match creation request.
4593type TurnBasedMatchCreateRequest struct {
4594	// AutoMatchingCriteria: Criteria for auto-matching players into this
4595	// match.
4596	AutoMatchingCriteria *TurnBasedAutoMatchingCriteria `json:"autoMatchingCriteria,omitempty"`
4597
4598	// InvitedPlayerIds: The player ids to invite to the match.
4599	InvitedPlayerIds []string `json:"invitedPlayerIds,omitempty"`
4600
4601	// Kind: Uniquely identifies the type of this resource. Value is always
4602	// the fixed string games#turnBasedMatchCreateRequest.
4603	Kind string `json:"kind,omitempty"`
4604
4605	// RequestId: A randomly generated numeric ID. This number is used at
4606	// the server to ensure that the request is handled correctly across
4607	// retries.
4608	RequestId int64 `json:"requestId,omitempty,string"`
4609
4610	// Variant: The variant / mode of the application to be played. This can
4611	// be any integer value, or left blank. You should use a small number of
4612	// variants to keep the auto-matching pool as large as possible.
4613	Variant int64 `json:"variant,omitempty"`
4614
4615	// ForceSendFields is a list of field names (e.g.
4616	// "AutoMatchingCriteria") to unconditionally include in API requests.
4617	// By default, fields with empty values are omitted from API requests.
4618	// However, any non-pointer, non-interface field appearing in
4619	// ForceSendFields will be sent to the server regardless of whether the
4620	// field is empty or not. This may be used to include empty fields in
4621	// Patch requests.
4622	ForceSendFields []string `json:"-"`
4623
4624	// NullFields is a list of field names (e.g. "AutoMatchingCriteria") to
4625	// include in API requests with the JSON null value. By default, fields
4626	// with empty values are omitted from API requests. However, any field
4627	// with an empty value appearing in NullFields will be sent to the
4628	// server as null. It is an error if a field in this list has a
4629	// non-empty value. This may be used to include null fields in Patch
4630	// requests.
4631	NullFields []string `json:"-"`
4632}
4633
4634func (s *TurnBasedMatchCreateRequest) MarshalJSON() ([]byte, error) {
4635	type NoMethod TurnBasedMatchCreateRequest
4636	raw := NoMethod(*s)
4637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4638}
4639
4640// TurnBasedMatchData: This is a JSON template for a turn-based match
4641// data object.
4642type TurnBasedMatchData struct {
4643	// Data: The byte representation of the data (limited to 128 kB), as a
4644	// Base64-encoded string with the URL_SAFE encoding option.
4645	Data string `json:"data,omitempty"`
4646
4647	// DataAvailable: True if this match has data available but it wasn't
4648	// returned in a list response; fetching the match individually will
4649	// retrieve this data.
4650	DataAvailable bool `json:"dataAvailable,omitempty"`
4651
4652	// Kind: Uniquely identifies the type of this resource. Value is always
4653	// the fixed string games#turnBasedMatchData.
4654	Kind string `json:"kind,omitempty"`
4655
4656	// ForceSendFields is a list of field names (e.g. "Data") to
4657	// unconditionally include in API requests. By default, fields with
4658	// empty values are omitted from API requests. However, any non-pointer,
4659	// non-interface field appearing in ForceSendFields will be sent to the
4660	// server regardless of whether the field is empty or not. This may be
4661	// used to include empty fields in Patch requests.
4662	ForceSendFields []string `json:"-"`
4663
4664	// NullFields is a list of field names (e.g. "Data") to include in API
4665	// requests with the JSON null value. By default, fields with empty
4666	// values are omitted from API requests. However, any field with an
4667	// empty value appearing in NullFields will be sent to the server as
4668	// null. It is an error if a field in this list has a non-empty value.
4669	// This may be used to include null fields in Patch requests.
4670	NullFields []string `json:"-"`
4671}
4672
4673func (s *TurnBasedMatchData) MarshalJSON() ([]byte, error) {
4674	type NoMethod TurnBasedMatchData
4675	raw := NoMethod(*s)
4676	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4677}
4678
4679// TurnBasedMatchDataRequest: This is a JSON template for sending a
4680// turn-based match data object.
4681type TurnBasedMatchDataRequest struct {
4682	// Data: The byte representation of the data (limited to 128 kB), as a
4683	// Base64-encoded string with the URL_SAFE encoding option.
4684	Data string `json:"data,omitempty"`
4685
4686	// Kind: Uniquely identifies the type of this resource. Value is always
4687	// the fixed string games#turnBasedMatchDataRequest.
4688	Kind string `json:"kind,omitempty"`
4689
4690	// ForceSendFields is a list of field names (e.g. "Data") to
4691	// unconditionally include in API requests. By default, fields with
4692	// empty values are omitted from API requests. However, any non-pointer,
4693	// non-interface field appearing in ForceSendFields will be sent to the
4694	// server regardless of whether the field is empty or not. This may be
4695	// used to include empty fields in Patch requests.
4696	ForceSendFields []string `json:"-"`
4697
4698	// NullFields is a list of field names (e.g. "Data") to include in API
4699	// requests with the JSON null value. By default, fields with empty
4700	// values are omitted from API requests. However, any field with an
4701	// empty value appearing in NullFields will be sent to the server as
4702	// null. It is an error if a field in this list has a non-empty value.
4703	// This may be used to include null fields in Patch requests.
4704	NullFields []string `json:"-"`
4705}
4706
4707func (s *TurnBasedMatchDataRequest) MarshalJSON() ([]byte, error) {
4708	type NoMethod TurnBasedMatchDataRequest
4709	raw := NoMethod(*s)
4710	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4711}
4712
4713// TurnBasedMatchList: This is a JSON template for a list of turn-based
4714// matches.
4715type TurnBasedMatchList struct {
4716	// Items: The matches.
4717	Items []*TurnBasedMatch `json:"items,omitempty"`
4718
4719	// Kind: Uniquely identifies the type of this resource. Value is always
4720	// the fixed string games#turnBasedMatchList.
4721	Kind string `json:"kind,omitempty"`
4722
4723	// NextPageToken: The pagination token for the next page of results.
4724	NextPageToken string `json:"nextPageToken,omitempty"`
4725
4726	// ServerResponse contains the HTTP response code and headers from the
4727	// server.
4728	googleapi.ServerResponse `json:"-"`
4729
4730	// ForceSendFields is a list of field names (e.g. "Items") to
4731	// unconditionally include in API requests. By default, fields with
4732	// empty values are omitted from API requests. However, any non-pointer,
4733	// non-interface field appearing in ForceSendFields will be sent to the
4734	// server regardless of whether the field is empty or not. This may be
4735	// used to include empty fields in Patch requests.
4736	ForceSendFields []string `json:"-"`
4737
4738	// NullFields is a list of field names (e.g. "Items") to include in API
4739	// requests with the JSON null value. By default, fields with empty
4740	// values are omitted from API requests. However, any field with an
4741	// empty value appearing in NullFields will be sent to the server as
4742	// null. It is an error if a field in this list has a non-empty value.
4743	// This may be used to include null fields in Patch requests.
4744	NullFields []string `json:"-"`
4745}
4746
4747func (s *TurnBasedMatchList) MarshalJSON() ([]byte, error) {
4748	type NoMethod TurnBasedMatchList
4749	raw := NoMethod(*s)
4750	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4751}
4752
4753// TurnBasedMatchModification: This is a JSON template for turn-based
4754// match modification metadata.
4755type TurnBasedMatchModification struct {
4756	// Kind: Uniquely identifies the type of this resource. Value is always
4757	// the fixed string games#turnBasedMatchModification.
4758	Kind string `json:"kind,omitempty"`
4759
4760	// ModifiedTimestampMillis: The timestamp at which they modified the
4761	// match, in milliseconds since the epoch in UTC.
4762	ModifiedTimestampMillis int64 `json:"modifiedTimestampMillis,omitempty,string"`
4763
4764	// ParticipantId: The ID of the participant that modified the match.
4765	ParticipantId string `json:"participantId,omitempty"`
4766
4767	// ForceSendFields is a list of field names (e.g. "Kind") to
4768	// unconditionally include in API requests. By default, fields with
4769	// empty values are omitted from API requests. However, any non-pointer,
4770	// non-interface field appearing in ForceSendFields will be sent to the
4771	// server regardless of whether the field is empty or not. This may be
4772	// used to include empty fields in Patch requests.
4773	ForceSendFields []string `json:"-"`
4774
4775	// NullFields is a list of field names (e.g. "Kind") to include in API
4776	// requests with the JSON null value. By default, fields with empty
4777	// values are omitted from API requests. However, any field with an
4778	// empty value appearing in NullFields will be sent to the server as
4779	// null. It is an error if a field in this list has a non-empty value.
4780	// This may be used to include null fields in Patch requests.
4781	NullFields []string `json:"-"`
4782}
4783
4784func (s *TurnBasedMatchModification) MarshalJSON() ([]byte, error) {
4785	type NoMethod TurnBasedMatchModification
4786	raw := NoMethod(*s)
4787	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4788}
4789
4790// TurnBasedMatchParticipant: This is a JSON template for a participant
4791// in a turn-based match.
4792type TurnBasedMatchParticipant struct {
4793	// AutoMatched: True if this participant was auto-matched with the
4794	// requesting player.
4795	AutoMatched bool `json:"autoMatched,omitempty"`
4796
4797	// AutoMatchedPlayer: Information about a player that has been
4798	// anonymously auto-matched against the requesting player. (Either
4799	// player or autoMatchedPlayer will be set.)
4800	AutoMatchedPlayer *AnonymousPlayer `json:"autoMatchedPlayer,omitempty"`
4801
4802	// Id: An identifier for the participant in the scope of the match.
4803	// Cannot be used to identify a player across matches or in other
4804	// contexts.
4805	Id string `json:"id,omitempty"`
4806
4807	// Kind: Uniquely identifies the type of this resource. Value is always
4808	// the fixed string games#turnBasedMatchParticipant.
4809	Kind string `json:"kind,omitempty"`
4810
4811	// Player: Information about the player. Not populated if this player
4812	// was anonymously auto-matched against the requesting player. (Either
4813	// player or autoMatchedPlayer will be set.)
4814	Player *Player `json:"player,omitempty"`
4815
4816	// Status: The status of the participant with respect to the
4817	// match.
4818	// Possible values are:
4819	// - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be
4820	// invited to the match, but the invitation has not been sent; the
4821	// invite will be sent when it becomes their turn.
4822	// - "PARTICIPANT_INVITED" - The participant has been invited to join
4823	// the match, but has not yet responded.
4824	// - "PARTICIPANT_JOINED" - The participant has joined the match (either
4825	// after creating it or accepting an invitation.)
4826	// - "PARTICIPANT_DECLINED" - The participant declined an invitation to
4827	// join the match.
4828	// - "PARTICIPANT_LEFT" - The participant joined the match and then left
4829	// it.
4830	// - "PARTICIPANT_FINISHED" - The participant finished playing in the
4831	// match.
4832	// - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their
4833	// turn in the allotted time.
4834	Status string `json:"status,omitempty"`
4835
4836	// ForceSendFields is a list of field names (e.g. "AutoMatched") to
4837	// unconditionally include in API requests. By default, fields with
4838	// empty values are omitted from API requests. However, any non-pointer,
4839	// non-interface field appearing in ForceSendFields will be sent to the
4840	// server regardless of whether the field is empty or not. This may be
4841	// used to include empty fields in Patch requests.
4842	ForceSendFields []string `json:"-"`
4843
4844	// NullFields is a list of field names (e.g. "AutoMatched") to include
4845	// in API requests with the JSON null value. By default, fields with
4846	// empty values are omitted from API requests. However, any field with
4847	// an empty value appearing in NullFields will be sent to the server as
4848	// null. It is an error if a field in this list has a non-empty value.
4849	// This may be used to include null fields in Patch requests.
4850	NullFields []string `json:"-"`
4851}
4852
4853func (s *TurnBasedMatchParticipant) MarshalJSON() ([]byte, error) {
4854	type NoMethod TurnBasedMatchParticipant
4855	raw := NoMethod(*s)
4856	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4857}
4858
4859// TurnBasedMatchRematch: This is a JSON template for a rematch
4860// response.
4861type TurnBasedMatchRematch struct {
4862	// Kind: Uniquely identifies the type of this resource. Value is always
4863	// the fixed string games#turnBasedMatchRematch.
4864	Kind string `json:"kind,omitempty"`
4865
4866	// PreviousMatch: The old match that the rematch was created from; will
4867	// be updated such that the rematchId field will point at the new match.
4868	PreviousMatch *TurnBasedMatch `json:"previousMatch,omitempty"`
4869
4870	// Rematch: The newly created match; a rematch of the old match with the
4871	// same participants.
4872	Rematch *TurnBasedMatch `json:"rematch,omitempty"`
4873
4874	// ServerResponse contains the HTTP response code and headers from the
4875	// server.
4876	googleapi.ServerResponse `json:"-"`
4877
4878	// ForceSendFields is a list of field names (e.g. "Kind") to
4879	// unconditionally include in API requests. By default, fields with
4880	// empty values are omitted from API requests. However, any non-pointer,
4881	// non-interface field appearing in ForceSendFields will be sent to the
4882	// server regardless of whether the field is empty or not. This may be
4883	// used to include empty fields in Patch requests.
4884	ForceSendFields []string `json:"-"`
4885
4886	// NullFields is a list of field names (e.g. "Kind") to include in API
4887	// requests with the JSON null value. By default, fields with empty
4888	// values are omitted from API requests. However, any field with an
4889	// empty value appearing in NullFields will be sent to the server as
4890	// null. It is an error if a field in this list has a non-empty value.
4891	// This may be used to include null fields in Patch requests.
4892	NullFields []string `json:"-"`
4893}
4894
4895func (s *TurnBasedMatchRematch) MarshalJSON() ([]byte, error) {
4896	type NoMethod TurnBasedMatchRematch
4897	raw := NoMethod(*s)
4898	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4899}
4900
4901// TurnBasedMatchResults: This is a JSON template for a turn-based match
4902// results object.
4903type TurnBasedMatchResults struct {
4904	// Data: The final match data.
4905	Data *TurnBasedMatchDataRequest `json:"data,omitempty"`
4906
4907	// Kind: Uniquely identifies the type of this resource. Value is always
4908	// the fixed string games#turnBasedMatchResults.
4909	Kind string `json:"kind,omitempty"`
4910
4911	// MatchVersion: The version of the match being updated.
4912	MatchVersion int64 `json:"matchVersion,omitempty"`
4913
4914	// Results: The match results for the participants in the match.
4915	Results []*ParticipantResult `json:"results,omitempty"`
4916
4917	// ForceSendFields is a list of field names (e.g. "Data") to
4918	// unconditionally include in API requests. By default, fields with
4919	// empty values are omitted from API requests. However, any non-pointer,
4920	// non-interface field appearing in ForceSendFields will be sent to the
4921	// server regardless of whether the field is empty or not. This may be
4922	// used to include empty fields in Patch requests.
4923	ForceSendFields []string `json:"-"`
4924
4925	// NullFields is a list of field names (e.g. "Data") to include in API
4926	// requests with the JSON null value. By default, fields with empty
4927	// values are omitted from API requests. However, any field with an
4928	// empty value appearing in NullFields will be sent to the server as
4929	// null. It is an error if a field in this list has a non-empty value.
4930	// This may be used to include null fields in Patch requests.
4931	NullFields []string `json:"-"`
4932}
4933
4934func (s *TurnBasedMatchResults) MarshalJSON() ([]byte, error) {
4935	type NoMethod TurnBasedMatchResults
4936	raw := NoMethod(*s)
4937	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4938}
4939
4940// TurnBasedMatchSync: This is a JSON template for a list of turn-based
4941// matches returned from a sync.
4942type TurnBasedMatchSync struct {
4943	// Items: The matches.
4944	Items []*TurnBasedMatch `json:"items,omitempty"`
4945
4946	// Kind: Uniquely identifies the type of this resource. Value is always
4947	// the fixed string games#turnBasedMatchSync.
4948	Kind string `json:"kind,omitempty"`
4949
4950	// MoreAvailable: True if there were more matches available to fetch at
4951	// the time the response was generated (which were not returned due to
4952	// page size limits.)
4953	MoreAvailable bool `json:"moreAvailable,omitempty"`
4954
4955	// NextPageToken: The pagination token for the next page of results.
4956	NextPageToken string `json:"nextPageToken,omitempty"`
4957
4958	// ServerResponse contains the HTTP response code and headers from the
4959	// server.
4960	googleapi.ServerResponse `json:"-"`
4961
4962	// ForceSendFields is a list of field names (e.g. "Items") to
4963	// unconditionally include in API requests. By default, fields with
4964	// empty values are omitted from API requests. However, any non-pointer,
4965	// non-interface field appearing in ForceSendFields will be sent to the
4966	// server regardless of whether the field is empty or not. This may be
4967	// used to include empty fields in Patch requests.
4968	ForceSendFields []string `json:"-"`
4969
4970	// NullFields is a list of field names (e.g. "Items") to include in API
4971	// requests with the JSON null value. By default, fields with empty
4972	// values are omitted from API requests. However, any field with an
4973	// empty value appearing in NullFields will be sent to the server as
4974	// null. It is an error if a field in this list has a non-empty value.
4975	// This may be used to include null fields in Patch requests.
4976	NullFields []string `json:"-"`
4977}
4978
4979func (s *TurnBasedMatchSync) MarshalJSON() ([]byte, error) {
4980	type NoMethod TurnBasedMatchSync
4981	raw := NoMethod(*s)
4982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4983}
4984
4985// TurnBasedMatchTurn: This is a JSON template for the object
4986// representing a turn.
4987type TurnBasedMatchTurn struct {
4988	// Data: The shared game state data after the turn is over.
4989	Data *TurnBasedMatchDataRequest `json:"data,omitempty"`
4990
4991	// Kind: Uniquely identifies the type of this resource. Value is always
4992	// the fixed string games#turnBasedMatchTurn.
4993	Kind string `json:"kind,omitempty"`
4994
4995	// MatchVersion: The version of this match: an increasing counter, used
4996	// to avoid out-of-date updates to the match.
4997	MatchVersion int64 `json:"matchVersion,omitempty"`
4998
4999	// PendingParticipantId: The ID of the participant who should take their
5000	// turn next. May be set to the current player's participant ID to
5001	// update match state without changing the turn. If not set, the match
5002	// will wait for other player(s) to join via automatching; this is only
5003	// valid if automatch criteria is set on the match with remaining slots
5004	// for automatched players.
5005	PendingParticipantId string `json:"pendingParticipantId,omitempty"`
5006
5007	// Results: The match results for the participants in the match.
5008	Results []*ParticipantResult `json:"results,omitempty"`
5009
5010	// ForceSendFields is a list of field names (e.g. "Data") to
5011	// unconditionally include in API requests. By default, fields with
5012	// empty values are omitted from API requests. However, any non-pointer,
5013	// non-interface field appearing in ForceSendFields will be sent to the
5014	// server regardless of whether the field is empty or not. This may be
5015	// used to include empty fields in Patch requests.
5016	ForceSendFields []string `json:"-"`
5017
5018	// NullFields is a list of field names (e.g. "Data") to include in API
5019	// requests with the JSON null value. By default, fields with empty
5020	// values are omitted from API requests. However, any field with an
5021	// empty value appearing in NullFields will be sent to the server as
5022	// null. It is an error if a field in this list has a non-empty value.
5023	// This may be used to include null fields in Patch requests.
5024	NullFields []string `json:"-"`
5025}
5026
5027func (s *TurnBasedMatchTurn) MarshalJSON() ([]byte, error) {
5028	type NoMethod TurnBasedMatchTurn
5029	raw := NoMethod(*s)
5030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5031}
5032
5033// method id "games.achievementDefinitions.list":
5034
5035type AchievementDefinitionsListCall struct {
5036	s            *Service
5037	urlParams_   gensupport.URLParams
5038	ifNoneMatch_ string
5039	ctx_         context.Context
5040	header_      http.Header
5041}
5042
5043// List: Lists all the achievement definitions for your application.
5044func (r *AchievementDefinitionsService) List() *AchievementDefinitionsListCall {
5045	c := &AchievementDefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5046	return c
5047}
5048
5049// Language sets the optional parameter "language": The preferred
5050// language to use for strings returned by this method.
5051func (c *AchievementDefinitionsListCall) Language(language string) *AchievementDefinitionsListCall {
5052	c.urlParams_.Set("language", language)
5053	return c
5054}
5055
5056// MaxResults sets the optional parameter "maxResults": The maximum
5057// number of achievement resources to return in the response, used for
5058// paging. For any response, the actual number of achievement resources
5059// returned may be less than the specified maxResults.
5060func (c *AchievementDefinitionsListCall) MaxResults(maxResults int64) *AchievementDefinitionsListCall {
5061	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5062	return c
5063}
5064
5065// PageToken sets the optional parameter "pageToken": The token returned
5066// by the previous request.
5067func (c *AchievementDefinitionsListCall) PageToken(pageToken string) *AchievementDefinitionsListCall {
5068	c.urlParams_.Set("pageToken", pageToken)
5069	return c
5070}
5071
5072// Fields allows partial responses to be retrieved. See
5073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5074// for more information.
5075func (c *AchievementDefinitionsListCall) Fields(s ...googleapi.Field) *AchievementDefinitionsListCall {
5076	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5077	return c
5078}
5079
5080// IfNoneMatch sets the optional parameter which makes the operation
5081// fail if the object's ETag matches the given value. This is useful for
5082// getting updates only after the object has changed since the last
5083// request. Use googleapi.IsNotModified to check whether the response
5084// error from Do is the result of In-None-Match.
5085func (c *AchievementDefinitionsListCall) IfNoneMatch(entityTag string) *AchievementDefinitionsListCall {
5086	c.ifNoneMatch_ = entityTag
5087	return c
5088}
5089
5090// Context sets the context to be used in this call's Do method. Any
5091// pending HTTP request will be aborted if the provided context is
5092// canceled.
5093func (c *AchievementDefinitionsListCall) Context(ctx context.Context) *AchievementDefinitionsListCall {
5094	c.ctx_ = ctx
5095	return c
5096}
5097
5098// Header returns an http.Header that can be modified by the caller to
5099// add HTTP headers to the request.
5100func (c *AchievementDefinitionsListCall) Header() http.Header {
5101	if c.header_ == nil {
5102		c.header_ = make(http.Header)
5103	}
5104	return c.header_
5105}
5106
5107func (c *AchievementDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
5108	reqHeaders := make(http.Header)
5109	for k, v := range c.header_ {
5110		reqHeaders[k] = v
5111	}
5112	reqHeaders.Set("User-Agent", c.s.userAgent())
5113	if c.ifNoneMatch_ != "" {
5114		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5115	}
5116	var body io.Reader = nil
5117	c.urlParams_.Set("alt", alt)
5118	urls := googleapi.ResolveRelative(c.s.BasePath, "achievements")
5119	urls += "?" + c.urlParams_.Encode()
5120	req, _ := http.NewRequest("GET", urls, body)
5121	req.Header = reqHeaders
5122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5123}
5124
5125// Do executes the "games.achievementDefinitions.list" call.
5126// Exactly one of *AchievementDefinitionsListResponse or error will be
5127// non-nil. Any non-2xx status code is an error. Response headers are in
5128// either *AchievementDefinitionsListResponse.ServerResponse.Header or
5129// (if a response was returned at all) in
5130// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5131// whether the returned error was because http.StatusNotModified was
5132// returned.
5133func (c *AchievementDefinitionsListCall) Do(opts ...googleapi.CallOption) (*AchievementDefinitionsListResponse, error) {
5134	gensupport.SetOptions(c.urlParams_, opts...)
5135	res, err := c.doRequest("json")
5136	if res != nil && res.StatusCode == http.StatusNotModified {
5137		if res.Body != nil {
5138			res.Body.Close()
5139		}
5140		return nil, &googleapi.Error{
5141			Code:   res.StatusCode,
5142			Header: res.Header,
5143		}
5144	}
5145	if err != nil {
5146		return nil, err
5147	}
5148	defer googleapi.CloseBody(res)
5149	if err := googleapi.CheckResponse(res); err != nil {
5150		return nil, err
5151	}
5152	ret := &AchievementDefinitionsListResponse{
5153		ServerResponse: googleapi.ServerResponse{
5154			Header:         res.Header,
5155			HTTPStatusCode: res.StatusCode,
5156		},
5157	}
5158	target := &ret
5159	if err := gensupport.DecodeResponse(target, res); err != nil {
5160		return nil, err
5161	}
5162	return ret, nil
5163	// {
5164	//   "description": "Lists all the achievement definitions for your application.",
5165	//   "httpMethod": "GET",
5166	//   "id": "games.achievementDefinitions.list",
5167	//   "parameters": {
5168	//     "language": {
5169	//       "description": "The preferred language to use for strings returned by this method.",
5170	//       "location": "query",
5171	//       "type": "string"
5172	//     },
5173	//     "maxResults": {
5174	//       "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.",
5175	//       "format": "int32",
5176	//       "location": "query",
5177	//       "maximum": "200",
5178	//       "minimum": "1",
5179	//       "type": "integer"
5180	//     },
5181	//     "pageToken": {
5182	//       "description": "The token returned by the previous request.",
5183	//       "location": "query",
5184	//       "type": "string"
5185	//     }
5186	//   },
5187	//   "path": "achievements",
5188	//   "response": {
5189	//     "$ref": "AchievementDefinitionsListResponse"
5190	//   },
5191	//   "scopes": [
5192	//     "https://www.googleapis.com/auth/games",
5193	//     "https://www.googleapis.com/auth/plus.login"
5194	//   ]
5195	// }
5196
5197}
5198
5199// Pages invokes f for each page of results.
5200// A non-nil error returned from f will halt the iteration.
5201// The provided context supersedes any context provided to the Context method.
5202func (c *AchievementDefinitionsListCall) Pages(ctx context.Context, f func(*AchievementDefinitionsListResponse) error) error {
5203	c.ctx_ = ctx
5204	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5205	for {
5206		x, err := c.Do()
5207		if err != nil {
5208			return err
5209		}
5210		if err := f(x); err != nil {
5211			return err
5212		}
5213		if x.NextPageToken == "" {
5214			return nil
5215		}
5216		c.PageToken(x.NextPageToken)
5217	}
5218}
5219
5220// method id "games.achievements.increment":
5221
5222type AchievementsIncrementCall struct {
5223	s             *Service
5224	achievementId string
5225	urlParams_    gensupport.URLParams
5226	ctx_          context.Context
5227	header_       http.Header
5228}
5229
5230// Increment: Increments the steps of the achievement with the given ID
5231// for the currently authenticated player.
5232func (r *AchievementsService) Increment(achievementId string, stepsToIncrement int64) *AchievementsIncrementCall {
5233	c := &AchievementsIncrementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5234	c.achievementId = achievementId
5235	c.urlParams_.Set("stepsToIncrement", fmt.Sprint(stepsToIncrement))
5236	return c
5237}
5238
5239// RequestId sets the optional parameter "requestId": A randomly
5240// generated numeric ID for each request specified by the caller. This
5241// number is used at the server to ensure that the request is handled
5242// correctly across retries.
5243func (c *AchievementsIncrementCall) RequestId(requestId int64) *AchievementsIncrementCall {
5244	c.urlParams_.Set("requestId", fmt.Sprint(requestId))
5245	return c
5246}
5247
5248// Fields allows partial responses to be retrieved. See
5249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5250// for more information.
5251func (c *AchievementsIncrementCall) Fields(s ...googleapi.Field) *AchievementsIncrementCall {
5252	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5253	return c
5254}
5255
5256// Context sets the context to be used in this call's Do method. Any
5257// pending HTTP request will be aborted if the provided context is
5258// canceled.
5259func (c *AchievementsIncrementCall) Context(ctx context.Context) *AchievementsIncrementCall {
5260	c.ctx_ = ctx
5261	return c
5262}
5263
5264// Header returns an http.Header that can be modified by the caller to
5265// add HTTP headers to the request.
5266func (c *AchievementsIncrementCall) Header() http.Header {
5267	if c.header_ == nil {
5268		c.header_ = make(http.Header)
5269	}
5270	return c.header_
5271}
5272
5273func (c *AchievementsIncrementCall) doRequest(alt string) (*http.Response, error) {
5274	reqHeaders := make(http.Header)
5275	for k, v := range c.header_ {
5276		reqHeaders[k] = v
5277	}
5278	reqHeaders.Set("User-Agent", c.s.userAgent())
5279	var body io.Reader = nil
5280	c.urlParams_.Set("alt", alt)
5281	urls := googleapi.ResolveRelative(c.s.BasePath, "achievements/{achievementId}/increment")
5282	urls += "?" + c.urlParams_.Encode()
5283	req, _ := http.NewRequest("POST", urls, body)
5284	req.Header = reqHeaders
5285	googleapi.Expand(req.URL, map[string]string{
5286		"achievementId": c.achievementId,
5287	})
5288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5289}
5290
5291// Do executes the "games.achievements.increment" call.
5292// Exactly one of *AchievementIncrementResponse or error will be
5293// non-nil. Any non-2xx status code is an error. Response headers are in
5294// either *AchievementIncrementResponse.ServerResponse.Header or (if a
5295// response was returned at all) in error.(*googleapi.Error).Header. Use
5296// googleapi.IsNotModified to check whether the returned error was
5297// because http.StatusNotModified was returned.
5298func (c *AchievementsIncrementCall) Do(opts ...googleapi.CallOption) (*AchievementIncrementResponse, error) {
5299	gensupport.SetOptions(c.urlParams_, opts...)
5300	res, err := c.doRequest("json")
5301	if res != nil && res.StatusCode == http.StatusNotModified {
5302		if res.Body != nil {
5303			res.Body.Close()
5304		}
5305		return nil, &googleapi.Error{
5306			Code:   res.StatusCode,
5307			Header: res.Header,
5308		}
5309	}
5310	if err != nil {
5311		return nil, err
5312	}
5313	defer googleapi.CloseBody(res)
5314	if err := googleapi.CheckResponse(res); err != nil {
5315		return nil, err
5316	}
5317	ret := &AchievementIncrementResponse{
5318		ServerResponse: googleapi.ServerResponse{
5319			Header:         res.Header,
5320			HTTPStatusCode: res.StatusCode,
5321		},
5322	}
5323	target := &ret
5324	if err := gensupport.DecodeResponse(target, res); err != nil {
5325		return nil, err
5326	}
5327	return ret, nil
5328	// {
5329	//   "description": "Increments the steps of the achievement with the given ID for the currently authenticated player.",
5330	//   "httpMethod": "POST",
5331	//   "id": "games.achievements.increment",
5332	//   "parameterOrder": [
5333	//     "achievementId",
5334	//     "stepsToIncrement"
5335	//   ],
5336	//   "parameters": {
5337	//     "achievementId": {
5338	//       "description": "The ID of the achievement used by this method.",
5339	//       "location": "path",
5340	//       "required": true,
5341	//       "type": "string"
5342	//     },
5343	//     "requestId": {
5344	//       "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.",
5345	//       "format": "int64",
5346	//       "location": "query",
5347	//       "type": "string"
5348	//     },
5349	//     "stepsToIncrement": {
5350	//       "description": "The number of steps to increment.",
5351	//       "format": "int32",
5352	//       "location": "query",
5353	//       "minimum": "1",
5354	//       "required": true,
5355	//       "type": "integer"
5356	//     }
5357	//   },
5358	//   "path": "achievements/{achievementId}/increment",
5359	//   "response": {
5360	//     "$ref": "AchievementIncrementResponse"
5361	//   },
5362	//   "scopes": [
5363	//     "https://www.googleapis.com/auth/games",
5364	//     "https://www.googleapis.com/auth/plus.login"
5365	//   ]
5366	// }
5367
5368}
5369
5370// method id "games.achievements.list":
5371
5372type AchievementsListCall struct {
5373	s            *Service
5374	playerId     string
5375	urlParams_   gensupport.URLParams
5376	ifNoneMatch_ string
5377	ctx_         context.Context
5378	header_      http.Header
5379}
5380
5381// List: Lists the progress for all your application's achievements for
5382// the currently authenticated player.
5383func (r *AchievementsService) List(playerId string) *AchievementsListCall {
5384	c := &AchievementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5385	c.playerId = playerId
5386	return c
5387}
5388
5389// Language sets the optional parameter "language": The preferred
5390// language to use for strings returned by this method.
5391func (c *AchievementsListCall) Language(language string) *AchievementsListCall {
5392	c.urlParams_.Set("language", language)
5393	return c
5394}
5395
5396// MaxResults sets the optional parameter "maxResults": The maximum
5397// number of achievement resources to return in the response, used for
5398// paging. For any response, the actual number of achievement resources
5399// returned may be less than the specified maxResults.
5400func (c *AchievementsListCall) MaxResults(maxResults int64) *AchievementsListCall {
5401	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5402	return c
5403}
5404
5405// PageToken sets the optional parameter "pageToken": The token returned
5406// by the previous request.
5407func (c *AchievementsListCall) PageToken(pageToken string) *AchievementsListCall {
5408	c.urlParams_.Set("pageToken", pageToken)
5409	return c
5410}
5411
5412// State sets the optional parameter "state": Tells the server to return
5413// only achievements with the specified state. If this parameter isn't
5414// specified, all achievements are returned.
5415//
5416// Possible values:
5417//   "ALL" - List all achievements. This is the default.
5418//   "HIDDEN" - List only hidden achievements.
5419//   "REVEALED" - List only revealed achievements.
5420//   "UNLOCKED" - List only unlocked achievements.
5421func (c *AchievementsListCall) State(state string) *AchievementsListCall {
5422	c.urlParams_.Set("state", state)
5423	return c
5424}
5425
5426// Fields allows partial responses to be retrieved. See
5427// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5428// for more information.
5429func (c *AchievementsListCall) Fields(s ...googleapi.Field) *AchievementsListCall {
5430	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5431	return c
5432}
5433
5434// IfNoneMatch sets the optional parameter which makes the operation
5435// fail if the object's ETag matches the given value. This is useful for
5436// getting updates only after the object has changed since the last
5437// request. Use googleapi.IsNotModified to check whether the response
5438// error from Do is the result of In-None-Match.
5439func (c *AchievementsListCall) IfNoneMatch(entityTag string) *AchievementsListCall {
5440	c.ifNoneMatch_ = entityTag
5441	return c
5442}
5443
5444// Context sets the context to be used in this call's Do method. Any
5445// pending HTTP request will be aborted if the provided context is
5446// canceled.
5447func (c *AchievementsListCall) Context(ctx context.Context) *AchievementsListCall {
5448	c.ctx_ = ctx
5449	return c
5450}
5451
5452// Header returns an http.Header that can be modified by the caller to
5453// add HTTP headers to the request.
5454func (c *AchievementsListCall) Header() http.Header {
5455	if c.header_ == nil {
5456		c.header_ = make(http.Header)
5457	}
5458	return c.header_
5459}
5460
5461func (c *AchievementsListCall) doRequest(alt string) (*http.Response, error) {
5462	reqHeaders := make(http.Header)
5463	for k, v := range c.header_ {
5464		reqHeaders[k] = v
5465	}
5466	reqHeaders.Set("User-Agent", c.s.userAgent())
5467	if c.ifNoneMatch_ != "" {
5468		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5469	}
5470	var body io.Reader = nil
5471	c.urlParams_.Set("alt", alt)
5472	urls := googleapi.ResolveRelative(c.s.BasePath, "players/{playerId}/achievements")
5473	urls += "?" + c.urlParams_.Encode()
5474	req, _ := http.NewRequest("GET", urls, body)
5475	req.Header = reqHeaders
5476	googleapi.Expand(req.URL, map[string]string{
5477		"playerId": c.playerId,
5478	})
5479	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5480}
5481
5482// Do executes the "games.achievements.list" call.
5483// Exactly one of *PlayerAchievementListResponse or error will be
5484// non-nil. Any non-2xx status code is an error. Response headers are in
5485// either *PlayerAchievementListResponse.ServerResponse.Header or (if a
5486// response was returned at all) in error.(*googleapi.Error).Header. Use
5487// googleapi.IsNotModified to check whether the returned error was
5488// because http.StatusNotModified was returned.
5489func (c *AchievementsListCall) Do(opts ...googleapi.CallOption) (*PlayerAchievementListResponse, error) {
5490	gensupport.SetOptions(c.urlParams_, opts...)
5491	res, err := c.doRequest("json")
5492	if res != nil && res.StatusCode == http.StatusNotModified {
5493		if res.Body != nil {
5494			res.Body.Close()
5495		}
5496		return nil, &googleapi.Error{
5497			Code:   res.StatusCode,
5498			Header: res.Header,
5499		}
5500	}
5501	if err != nil {
5502		return nil, err
5503	}
5504	defer googleapi.CloseBody(res)
5505	if err := googleapi.CheckResponse(res); err != nil {
5506		return nil, err
5507	}
5508	ret := &PlayerAchievementListResponse{
5509		ServerResponse: googleapi.ServerResponse{
5510			Header:         res.Header,
5511			HTTPStatusCode: res.StatusCode,
5512		},
5513	}
5514	target := &ret
5515	if err := gensupport.DecodeResponse(target, res); err != nil {
5516		return nil, err
5517	}
5518	return ret, nil
5519	// {
5520	//   "description": "Lists the progress for all your application's achievements for the currently authenticated player.",
5521	//   "httpMethod": "GET",
5522	//   "id": "games.achievements.list",
5523	//   "parameterOrder": [
5524	//     "playerId"
5525	//   ],
5526	//   "parameters": {
5527	//     "language": {
5528	//       "description": "The preferred language to use for strings returned by this method.",
5529	//       "location": "query",
5530	//       "type": "string"
5531	//     },
5532	//     "maxResults": {
5533	//       "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.",
5534	//       "format": "int32",
5535	//       "location": "query",
5536	//       "maximum": "200",
5537	//       "minimum": "1",
5538	//       "type": "integer"
5539	//     },
5540	//     "pageToken": {
5541	//       "description": "The token returned by the previous request.",
5542	//       "location": "query",
5543	//       "type": "string"
5544	//     },
5545	//     "playerId": {
5546	//       "description": "A player ID. A value of me may be used in place of the authenticated player's ID.",
5547	//       "location": "path",
5548	//       "required": true,
5549	//       "type": "string"
5550	//     },
5551	//     "state": {
5552	//       "description": "Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned.",
5553	//       "enum": [
5554	//         "ALL",
5555	//         "HIDDEN",
5556	//         "REVEALED",
5557	//         "UNLOCKED"
5558	//       ],
5559	//       "enumDescriptions": [
5560	//         "List all achievements. This is the default.",
5561	//         "List only hidden achievements.",
5562	//         "List only revealed achievements.",
5563	//         "List only unlocked achievements."
5564	//       ],
5565	//       "location": "query",
5566	//       "type": "string"
5567	//     }
5568	//   },
5569	//   "path": "players/{playerId}/achievements",
5570	//   "response": {
5571	//     "$ref": "PlayerAchievementListResponse"
5572	//   },
5573	//   "scopes": [
5574	//     "https://www.googleapis.com/auth/games",
5575	//     "https://www.googleapis.com/auth/plus.login"
5576	//   ]
5577	// }
5578
5579}
5580
5581// Pages invokes f for each page of results.
5582// A non-nil error returned from f will halt the iteration.
5583// The provided context supersedes any context provided to the Context method.
5584func (c *AchievementsListCall) Pages(ctx context.Context, f func(*PlayerAchievementListResponse) error) error {
5585	c.ctx_ = ctx
5586	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5587	for {
5588		x, err := c.Do()
5589		if err != nil {
5590			return err
5591		}
5592		if err := f(x); err != nil {
5593			return err
5594		}
5595		if x.NextPageToken == "" {
5596			return nil
5597		}
5598		c.PageToken(x.NextPageToken)
5599	}
5600}
5601
5602// method id "games.achievements.reveal":
5603
5604type AchievementsRevealCall struct {
5605	s             *Service
5606	achievementId string
5607	urlParams_    gensupport.URLParams
5608	ctx_          context.Context
5609	header_       http.Header
5610}
5611
5612// Reveal: Sets the state of the achievement with the given ID to
5613// REVEALED for the currently authenticated player.
5614func (r *AchievementsService) Reveal(achievementId string) *AchievementsRevealCall {
5615	c := &AchievementsRevealCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5616	c.achievementId = achievementId
5617	return c
5618}
5619
5620// Fields allows partial responses to be retrieved. See
5621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5622// for more information.
5623func (c *AchievementsRevealCall) Fields(s ...googleapi.Field) *AchievementsRevealCall {
5624	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5625	return c
5626}
5627
5628// Context sets the context to be used in this call's Do method. Any
5629// pending HTTP request will be aborted if the provided context is
5630// canceled.
5631func (c *AchievementsRevealCall) Context(ctx context.Context) *AchievementsRevealCall {
5632	c.ctx_ = ctx
5633	return c
5634}
5635
5636// Header returns an http.Header that can be modified by the caller to
5637// add HTTP headers to the request.
5638func (c *AchievementsRevealCall) Header() http.Header {
5639	if c.header_ == nil {
5640		c.header_ = make(http.Header)
5641	}
5642	return c.header_
5643}
5644
5645func (c *AchievementsRevealCall) doRequest(alt string) (*http.Response, error) {
5646	reqHeaders := make(http.Header)
5647	for k, v := range c.header_ {
5648		reqHeaders[k] = v
5649	}
5650	reqHeaders.Set("User-Agent", c.s.userAgent())
5651	var body io.Reader = nil
5652	c.urlParams_.Set("alt", alt)
5653	urls := googleapi.ResolveRelative(c.s.BasePath, "achievements/{achievementId}/reveal")
5654	urls += "?" + c.urlParams_.Encode()
5655	req, _ := http.NewRequest("POST", urls, body)
5656	req.Header = reqHeaders
5657	googleapi.Expand(req.URL, map[string]string{
5658		"achievementId": c.achievementId,
5659	})
5660	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5661}
5662
5663// Do executes the "games.achievements.reveal" call.
5664// Exactly one of *AchievementRevealResponse or error will be non-nil.
5665// Any non-2xx status code is an error. Response headers are in either
5666// *AchievementRevealResponse.ServerResponse.Header or (if a response
5667// was returned at all) in error.(*googleapi.Error).Header. Use
5668// googleapi.IsNotModified to check whether the returned error was
5669// because http.StatusNotModified was returned.
5670func (c *AchievementsRevealCall) Do(opts ...googleapi.CallOption) (*AchievementRevealResponse, error) {
5671	gensupport.SetOptions(c.urlParams_, opts...)
5672	res, err := c.doRequest("json")
5673	if res != nil && res.StatusCode == http.StatusNotModified {
5674		if res.Body != nil {
5675			res.Body.Close()
5676		}
5677		return nil, &googleapi.Error{
5678			Code:   res.StatusCode,
5679			Header: res.Header,
5680		}
5681	}
5682	if err != nil {
5683		return nil, err
5684	}
5685	defer googleapi.CloseBody(res)
5686	if err := googleapi.CheckResponse(res); err != nil {
5687		return nil, err
5688	}
5689	ret := &AchievementRevealResponse{
5690		ServerResponse: googleapi.ServerResponse{
5691			Header:         res.Header,
5692			HTTPStatusCode: res.StatusCode,
5693		},
5694	}
5695	target := &ret
5696	if err := gensupport.DecodeResponse(target, res); err != nil {
5697		return nil, err
5698	}
5699	return ret, nil
5700	// {
5701	//   "description": "Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.",
5702	//   "httpMethod": "POST",
5703	//   "id": "games.achievements.reveal",
5704	//   "parameterOrder": [
5705	//     "achievementId"
5706	//   ],
5707	//   "parameters": {
5708	//     "achievementId": {
5709	//       "description": "The ID of the achievement used by this method.",
5710	//       "location": "path",
5711	//       "required": true,
5712	//       "type": "string"
5713	//     }
5714	//   },
5715	//   "path": "achievements/{achievementId}/reveal",
5716	//   "response": {
5717	//     "$ref": "AchievementRevealResponse"
5718	//   },
5719	//   "scopes": [
5720	//     "https://www.googleapis.com/auth/games",
5721	//     "https://www.googleapis.com/auth/plus.login"
5722	//   ]
5723	// }
5724
5725}
5726
5727// method id "games.achievements.setStepsAtLeast":
5728
5729type AchievementsSetStepsAtLeastCall struct {
5730	s             *Service
5731	achievementId string
5732	urlParams_    gensupport.URLParams
5733	ctx_          context.Context
5734	header_       http.Header
5735}
5736
5737// SetStepsAtLeast: Sets the steps for the currently authenticated
5738// player towards unlocking an achievement. If the steps parameter is
5739// less than the current number of steps that the player already gained
5740// for the achievement, the achievement is not modified.
5741func (r *AchievementsService) SetStepsAtLeast(achievementId string, steps int64) *AchievementsSetStepsAtLeastCall {
5742	c := &AchievementsSetStepsAtLeastCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5743	c.achievementId = achievementId
5744	c.urlParams_.Set("steps", fmt.Sprint(steps))
5745	return c
5746}
5747
5748// Fields allows partial responses to be retrieved. See
5749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5750// for more information.
5751func (c *AchievementsSetStepsAtLeastCall) Fields(s ...googleapi.Field) *AchievementsSetStepsAtLeastCall {
5752	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5753	return c
5754}
5755
5756// Context sets the context to be used in this call's Do method. Any
5757// pending HTTP request will be aborted if the provided context is
5758// canceled.
5759func (c *AchievementsSetStepsAtLeastCall) Context(ctx context.Context) *AchievementsSetStepsAtLeastCall {
5760	c.ctx_ = ctx
5761	return c
5762}
5763
5764// Header returns an http.Header that can be modified by the caller to
5765// add HTTP headers to the request.
5766func (c *AchievementsSetStepsAtLeastCall) Header() http.Header {
5767	if c.header_ == nil {
5768		c.header_ = make(http.Header)
5769	}
5770	return c.header_
5771}
5772
5773func (c *AchievementsSetStepsAtLeastCall) doRequest(alt string) (*http.Response, error) {
5774	reqHeaders := make(http.Header)
5775	for k, v := range c.header_ {
5776		reqHeaders[k] = v
5777	}
5778	reqHeaders.Set("User-Agent", c.s.userAgent())
5779	var body io.Reader = nil
5780	c.urlParams_.Set("alt", alt)
5781	urls := googleapi.ResolveRelative(c.s.BasePath, "achievements/{achievementId}/setStepsAtLeast")
5782	urls += "?" + c.urlParams_.Encode()
5783	req, _ := http.NewRequest("POST", urls, body)
5784	req.Header = reqHeaders
5785	googleapi.Expand(req.URL, map[string]string{
5786		"achievementId": c.achievementId,
5787	})
5788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5789}
5790
5791// Do executes the "games.achievements.setStepsAtLeast" call.
5792// Exactly one of *AchievementSetStepsAtLeastResponse or error will be
5793// non-nil. Any non-2xx status code is an error. Response headers are in
5794// either *AchievementSetStepsAtLeastResponse.ServerResponse.Header or
5795// (if a response was returned at all) in
5796// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5797// whether the returned error was because http.StatusNotModified was
5798// returned.
5799func (c *AchievementsSetStepsAtLeastCall) Do(opts ...googleapi.CallOption) (*AchievementSetStepsAtLeastResponse, error) {
5800	gensupport.SetOptions(c.urlParams_, opts...)
5801	res, err := c.doRequest("json")
5802	if res != nil && res.StatusCode == http.StatusNotModified {
5803		if res.Body != nil {
5804			res.Body.Close()
5805		}
5806		return nil, &googleapi.Error{
5807			Code:   res.StatusCode,
5808			Header: res.Header,
5809		}
5810	}
5811	if err != nil {
5812		return nil, err
5813	}
5814	defer googleapi.CloseBody(res)
5815	if err := googleapi.CheckResponse(res); err != nil {
5816		return nil, err
5817	}
5818	ret := &AchievementSetStepsAtLeastResponse{
5819		ServerResponse: googleapi.ServerResponse{
5820			Header:         res.Header,
5821			HTTPStatusCode: res.StatusCode,
5822		},
5823	}
5824	target := &ret
5825	if err := gensupport.DecodeResponse(target, res); err != nil {
5826		return nil, err
5827	}
5828	return ret, nil
5829	// {
5830	//   "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.",
5831	//   "httpMethod": "POST",
5832	//   "id": "games.achievements.setStepsAtLeast",
5833	//   "parameterOrder": [
5834	//     "achievementId",
5835	//     "steps"
5836	//   ],
5837	//   "parameters": {
5838	//     "achievementId": {
5839	//       "description": "The ID of the achievement used by this method.",
5840	//       "location": "path",
5841	//       "required": true,
5842	//       "type": "string"
5843	//     },
5844	//     "steps": {
5845	//       "description": "The minimum value to set the steps to.",
5846	//       "format": "int32",
5847	//       "location": "query",
5848	//       "minimum": "1",
5849	//       "required": true,
5850	//       "type": "integer"
5851	//     }
5852	//   },
5853	//   "path": "achievements/{achievementId}/setStepsAtLeast",
5854	//   "response": {
5855	//     "$ref": "AchievementSetStepsAtLeastResponse"
5856	//   },
5857	//   "scopes": [
5858	//     "https://www.googleapis.com/auth/games",
5859	//     "https://www.googleapis.com/auth/plus.login"
5860	//   ]
5861	// }
5862
5863}
5864
5865// method id "games.achievements.unlock":
5866
5867type AchievementsUnlockCall struct {
5868	s             *Service
5869	achievementId string
5870	urlParams_    gensupport.URLParams
5871	ctx_          context.Context
5872	header_       http.Header
5873}
5874
5875// Unlock: Unlocks this achievement for the currently authenticated
5876// player.
5877func (r *AchievementsService) Unlock(achievementId string) *AchievementsUnlockCall {
5878	c := &AchievementsUnlockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5879	c.achievementId = achievementId
5880	return c
5881}
5882
5883// Fields allows partial responses to be retrieved. See
5884// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5885// for more information.
5886func (c *AchievementsUnlockCall) Fields(s ...googleapi.Field) *AchievementsUnlockCall {
5887	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5888	return c
5889}
5890
5891// Context sets the context to be used in this call's Do method. Any
5892// pending HTTP request will be aborted if the provided context is
5893// canceled.
5894func (c *AchievementsUnlockCall) Context(ctx context.Context) *AchievementsUnlockCall {
5895	c.ctx_ = ctx
5896	return c
5897}
5898
5899// Header returns an http.Header that can be modified by the caller to
5900// add HTTP headers to the request.
5901func (c *AchievementsUnlockCall) Header() http.Header {
5902	if c.header_ == nil {
5903		c.header_ = make(http.Header)
5904	}
5905	return c.header_
5906}
5907
5908func (c *AchievementsUnlockCall) doRequest(alt string) (*http.Response, error) {
5909	reqHeaders := make(http.Header)
5910	for k, v := range c.header_ {
5911		reqHeaders[k] = v
5912	}
5913	reqHeaders.Set("User-Agent", c.s.userAgent())
5914	var body io.Reader = nil
5915	c.urlParams_.Set("alt", alt)
5916	urls := googleapi.ResolveRelative(c.s.BasePath, "achievements/{achievementId}/unlock")
5917	urls += "?" + c.urlParams_.Encode()
5918	req, _ := http.NewRequest("POST", urls, body)
5919	req.Header = reqHeaders
5920	googleapi.Expand(req.URL, map[string]string{
5921		"achievementId": c.achievementId,
5922	})
5923	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5924}
5925
5926// Do executes the "games.achievements.unlock" call.
5927// Exactly one of *AchievementUnlockResponse or error will be non-nil.
5928// Any non-2xx status code is an error. Response headers are in either
5929// *AchievementUnlockResponse.ServerResponse.Header or (if a response
5930// was returned at all) in error.(*googleapi.Error).Header. Use
5931// googleapi.IsNotModified to check whether the returned error was
5932// because http.StatusNotModified was returned.
5933func (c *AchievementsUnlockCall) Do(opts ...googleapi.CallOption) (*AchievementUnlockResponse, error) {
5934	gensupport.SetOptions(c.urlParams_, opts...)
5935	res, err := c.doRequest("json")
5936	if res != nil && res.StatusCode == http.StatusNotModified {
5937		if res.Body != nil {
5938			res.Body.Close()
5939		}
5940		return nil, &googleapi.Error{
5941			Code:   res.StatusCode,
5942			Header: res.Header,
5943		}
5944	}
5945	if err != nil {
5946		return nil, err
5947	}
5948	defer googleapi.CloseBody(res)
5949	if err := googleapi.CheckResponse(res); err != nil {
5950		return nil, err
5951	}
5952	ret := &AchievementUnlockResponse{
5953		ServerResponse: googleapi.ServerResponse{
5954			Header:         res.Header,
5955			HTTPStatusCode: res.StatusCode,
5956		},
5957	}
5958	target := &ret
5959	if err := gensupport.DecodeResponse(target, res); err != nil {
5960		return nil, err
5961	}
5962	return ret, nil
5963	// {
5964	//   "description": "Unlocks this achievement for the currently authenticated player.",
5965	//   "httpMethod": "POST",
5966	//   "id": "games.achievements.unlock",
5967	//   "parameterOrder": [
5968	//     "achievementId"
5969	//   ],
5970	//   "parameters": {
5971	//     "achievementId": {
5972	//       "description": "The ID of the achievement used by this method.",
5973	//       "location": "path",
5974	//       "required": true,
5975	//       "type": "string"
5976	//     }
5977	//   },
5978	//   "path": "achievements/{achievementId}/unlock",
5979	//   "response": {
5980	//     "$ref": "AchievementUnlockResponse"
5981	//   },
5982	//   "scopes": [
5983	//     "https://www.googleapis.com/auth/games",
5984	//     "https://www.googleapis.com/auth/plus.login"
5985	//   ]
5986	// }
5987
5988}
5989
5990// method id "games.achievements.updateMultiple":
5991
5992type AchievementsUpdateMultipleCall struct {
5993	s                                *Service
5994	achievementupdatemultiplerequest *AchievementUpdateMultipleRequest
5995	urlParams_                       gensupport.URLParams
5996	ctx_                             context.Context
5997	header_                          http.Header
5998}
5999
6000// UpdateMultiple: Updates multiple achievements for the currently
6001// authenticated player.
6002func (r *AchievementsService) UpdateMultiple(achievementupdatemultiplerequest *AchievementUpdateMultipleRequest) *AchievementsUpdateMultipleCall {
6003	c := &AchievementsUpdateMultipleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6004	c.achievementupdatemultiplerequest = achievementupdatemultiplerequest
6005	return c
6006}
6007
6008// Fields allows partial responses to be retrieved. See
6009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6010// for more information.
6011func (c *AchievementsUpdateMultipleCall) Fields(s ...googleapi.Field) *AchievementsUpdateMultipleCall {
6012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6013	return c
6014}
6015
6016// Context sets the context to be used in this call's Do method. Any
6017// pending HTTP request will be aborted if the provided context is
6018// canceled.
6019func (c *AchievementsUpdateMultipleCall) Context(ctx context.Context) *AchievementsUpdateMultipleCall {
6020	c.ctx_ = ctx
6021	return c
6022}
6023
6024// Header returns an http.Header that can be modified by the caller to
6025// add HTTP headers to the request.
6026func (c *AchievementsUpdateMultipleCall) Header() http.Header {
6027	if c.header_ == nil {
6028		c.header_ = make(http.Header)
6029	}
6030	return c.header_
6031}
6032
6033func (c *AchievementsUpdateMultipleCall) doRequest(alt string) (*http.Response, error) {
6034	reqHeaders := make(http.Header)
6035	for k, v := range c.header_ {
6036		reqHeaders[k] = v
6037	}
6038	reqHeaders.Set("User-Agent", c.s.userAgent())
6039	var body io.Reader = nil
6040	body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementupdatemultiplerequest)
6041	if err != nil {
6042		return nil, err
6043	}
6044	reqHeaders.Set("Content-Type", "application/json")
6045	c.urlParams_.Set("alt", alt)
6046	urls := googleapi.ResolveRelative(c.s.BasePath, "achievements/updateMultiple")
6047	urls += "?" + c.urlParams_.Encode()
6048	req, _ := http.NewRequest("POST", urls, body)
6049	req.Header = reqHeaders
6050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6051}
6052
6053// Do executes the "games.achievements.updateMultiple" call.
6054// Exactly one of *AchievementUpdateMultipleResponse or error will be
6055// non-nil. Any non-2xx status code is an error. Response headers are in
6056// either *AchievementUpdateMultipleResponse.ServerResponse.Header or
6057// (if a response was returned at all) in
6058// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6059// whether the returned error was because http.StatusNotModified was
6060// returned.
6061func (c *AchievementsUpdateMultipleCall) Do(opts ...googleapi.CallOption) (*AchievementUpdateMultipleResponse, error) {
6062	gensupport.SetOptions(c.urlParams_, opts...)
6063	res, err := c.doRequest("json")
6064	if res != nil && res.StatusCode == http.StatusNotModified {
6065		if res.Body != nil {
6066			res.Body.Close()
6067		}
6068		return nil, &googleapi.Error{
6069			Code:   res.StatusCode,
6070			Header: res.Header,
6071		}
6072	}
6073	if err != nil {
6074		return nil, err
6075	}
6076	defer googleapi.CloseBody(res)
6077	if err := googleapi.CheckResponse(res); err != nil {
6078		return nil, err
6079	}
6080	ret := &AchievementUpdateMultipleResponse{
6081		ServerResponse: googleapi.ServerResponse{
6082			Header:         res.Header,
6083			HTTPStatusCode: res.StatusCode,
6084		},
6085	}
6086	target := &ret
6087	if err := gensupport.DecodeResponse(target, res); err != nil {
6088		return nil, err
6089	}
6090	return ret, nil
6091	// {
6092	//   "description": "Updates multiple achievements for the currently authenticated player.",
6093	//   "httpMethod": "POST",
6094	//   "id": "games.achievements.updateMultiple",
6095	//   "path": "achievements/updateMultiple",
6096	//   "request": {
6097	//     "$ref": "AchievementUpdateMultipleRequest"
6098	//   },
6099	//   "response": {
6100	//     "$ref": "AchievementUpdateMultipleResponse"
6101	//   },
6102	//   "scopes": [
6103	//     "https://www.googleapis.com/auth/games",
6104	//     "https://www.googleapis.com/auth/plus.login"
6105	//   ]
6106	// }
6107
6108}
6109
6110// method id "games.applications.get":
6111
6112type ApplicationsGetCall struct {
6113	s             *Service
6114	applicationId string
6115	urlParams_    gensupport.URLParams
6116	ifNoneMatch_  string
6117	ctx_          context.Context
6118	header_       http.Header
6119}
6120
6121// Get: Retrieves the metadata of the application with the given ID. If
6122// the requested application is not available for the specified
6123// platformType, the returned response will not include any instance
6124// data.
6125func (r *ApplicationsService) Get(applicationId string) *ApplicationsGetCall {
6126	c := &ApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6127	c.applicationId = applicationId
6128	return c
6129}
6130
6131// Language sets the optional parameter "language": The preferred
6132// language to use for strings returned by this method.
6133func (c *ApplicationsGetCall) Language(language string) *ApplicationsGetCall {
6134	c.urlParams_.Set("language", language)
6135	return c
6136}
6137
6138// PlatformType sets the optional parameter "platformType": Restrict
6139// application details returned to the specific platform.
6140//
6141// Possible values:
6142//   "ANDROID" - Retrieve applications that can be played on Android.
6143//   "IOS" - Retrieve applications that can be played on iOS.
6144//   "WEB_APP" - Retrieve applications that can be played on desktop
6145// web.
6146func (c *ApplicationsGetCall) PlatformType(platformType string) *ApplicationsGetCall {
6147	c.urlParams_.Set("platformType", platformType)
6148	return c
6149}
6150
6151// Fields allows partial responses to be retrieved. See
6152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6153// for more information.
6154func (c *ApplicationsGetCall) Fields(s ...googleapi.Field) *ApplicationsGetCall {
6155	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6156	return c
6157}
6158
6159// IfNoneMatch sets the optional parameter which makes the operation
6160// fail if the object's ETag matches the given value. This is useful for
6161// getting updates only after the object has changed since the last
6162// request. Use googleapi.IsNotModified to check whether the response
6163// error from Do is the result of In-None-Match.
6164func (c *ApplicationsGetCall) IfNoneMatch(entityTag string) *ApplicationsGetCall {
6165	c.ifNoneMatch_ = entityTag
6166	return c
6167}
6168
6169// Context sets the context to be used in this call's Do method. Any
6170// pending HTTP request will be aborted if the provided context is
6171// canceled.
6172func (c *ApplicationsGetCall) Context(ctx context.Context) *ApplicationsGetCall {
6173	c.ctx_ = ctx
6174	return c
6175}
6176
6177// Header returns an http.Header that can be modified by the caller to
6178// add HTTP headers to the request.
6179func (c *ApplicationsGetCall) Header() http.Header {
6180	if c.header_ == nil {
6181		c.header_ = make(http.Header)
6182	}
6183	return c.header_
6184}
6185
6186func (c *ApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
6187	reqHeaders := make(http.Header)
6188	for k, v := range c.header_ {
6189		reqHeaders[k] = v
6190	}
6191	reqHeaders.Set("User-Agent", c.s.userAgent())
6192	if c.ifNoneMatch_ != "" {
6193		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6194	}
6195	var body io.Reader = nil
6196	c.urlParams_.Set("alt", alt)
6197	urls := googleapi.ResolveRelative(c.s.BasePath, "applications/{applicationId}")
6198	urls += "?" + c.urlParams_.Encode()
6199	req, _ := http.NewRequest("GET", urls, body)
6200	req.Header = reqHeaders
6201	googleapi.Expand(req.URL, map[string]string{
6202		"applicationId": c.applicationId,
6203	})
6204	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6205}
6206
6207// Do executes the "games.applications.get" call.
6208// Exactly one of *Application or error will be non-nil. Any non-2xx
6209// status code is an error. Response headers are in either
6210// *Application.ServerResponse.Header or (if a response was returned at
6211// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6212// to check whether the returned error was because
6213// http.StatusNotModified was returned.
6214func (c *ApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
6215	gensupport.SetOptions(c.urlParams_, opts...)
6216	res, err := c.doRequest("json")
6217	if res != nil && res.StatusCode == http.StatusNotModified {
6218		if res.Body != nil {
6219			res.Body.Close()
6220		}
6221		return nil, &googleapi.Error{
6222			Code:   res.StatusCode,
6223			Header: res.Header,
6224		}
6225	}
6226	if err != nil {
6227		return nil, err
6228	}
6229	defer googleapi.CloseBody(res)
6230	if err := googleapi.CheckResponse(res); err != nil {
6231		return nil, err
6232	}
6233	ret := &Application{
6234		ServerResponse: googleapi.ServerResponse{
6235			Header:         res.Header,
6236			HTTPStatusCode: res.StatusCode,
6237		},
6238	}
6239	target := &ret
6240	if err := gensupport.DecodeResponse(target, res); err != nil {
6241		return nil, err
6242	}
6243	return ret, nil
6244	// {
6245	//   "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.",
6246	//   "httpMethod": "GET",
6247	//   "id": "games.applications.get",
6248	//   "parameterOrder": [
6249	//     "applicationId"
6250	//   ],
6251	//   "parameters": {
6252	//     "applicationId": {
6253	//       "description": "The application ID from the Google Play developer console.",
6254	//       "location": "path",
6255	//       "required": true,
6256	//       "type": "string"
6257	//     },
6258	//     "language": {
6259	//       "description": "The preferred language to use for strings returned by this method.",
6260	//       "location": "query",
6261	//       "type": "string"
6262	//     },
6263	//     "platformType": {
6264	//       "description": "Restrict application details returned to the specific platform.",
6265	//       "enum": [
6266	//         "ANDROID",
6267	//         "IOS",
6268	//         "WEB_APP"
6269	//       ],
6270	//       "enumDescriptions": [
6271	//         "Retrieve applications that can be played on Android.",
6272	//         "Retrieve applications that can be played on iOS.",
6273	//         "Retrieve applications that can be played on desktop web."
6274	//       ],
6275	//       "location": "query",
6276	//       "type": "string"
6277	//     }
6278	//   },
6279	//   "path": "applications/{applicationId}",
6280	//   "response": {
6281	//     "$ref": "Application"
6282	//   },
6283	//   "scopes": [
6284	//     "https://www.googleapis.com/auth/games",
6285	//     "https://www.googleapis.com/auth/plus.login"
6286	//   ]
6287	// }
6288
6289}
6290
6291// method id "games.applications.played":
6292
6293type ApplicationsPlayedCall struct {
6294	s          *Service
6295	urlParams_ gensupport.URLParams
6296	ctx_       context.Context
6297	header_    http.Header
6298}
6299
6300// Played: Indicate that the the currently authenticated user is playing
6301// your application.
6302func (r *ApplicationsService) Played() *ApplicationsPlayedCall {
6303	c := &ApplicationsPlayedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6304	return c
6305}
6306
6307// Fields allows partial responses to be retrieved. See
6308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6309// for more information.
6310func (c *ApplicationsPlayedCall) Fields(s ...googleapi.Field) *ApplicationsPlayedCall {
6311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6312	return c
6313}
6314
6315// Context sets the context to be used in this call's Do method. Any
6316// pending HTTP request will be aborted if the provided context is
6317// canceled.
6318func (c *ApplicationsPlayedCall) Context(ctx context.Context) *ApplicationsPlayedCall {
6319	c.ctx_ = ctx
6320	return c
6321}
6322
6323// Header returns an http.Header that can be modified by the caller to
6324// add HTTP headers to the request.
6325func (c *ApplicationsPlayedCall) Header() http.Header {
6326	if c.header_ == nil {
6327		c.header_ = make(http.Header)
6328	}
6329	return c.header_
6330}
6331
6332func (c *ApplicationsPlayedCall) doRequest(alt string) (*http.Response, error) {
6333	reqHeaders := make(http.Header)
6334	for k, v := range c.header_ {
6335		reqHeaders[k] = v
6336	}
6337	reqHeaders.Set("User-Agent", c.s.userAgent())
6338	var body io.Reader = nil
6339	c.urlParams_.Set("alt", alt)
6340	urls := googleapi.ResolveRelative(c.s.BasePath, "applications/played")
6341	urls += "?" + c.urlParams_.Encode()
6342	req, _ := http.NewRequest("POST", urls, body)
6343	req.Header = reqHeaders
6344	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6345}
6346
6347// Do executes the "games.applications.played" call.
6348func (c *ApplicationsPlayedCall) Do(opts ...googleapi.CallOption) error {
6349	gensupport.SetOptions(c.urlParams_, opts...)
6350	res, err := c.doRequest("json")
6351	if err != nil {
6352		return err
6353	}
6354	defer googleapi.CloseBody(res)
6355	if err := googleapi.CheckResponse(res); err != nil {
6356		return err
6357	}
6358	return nil
6359	// {
6360	//   "description": "Indicate that the the currently authenticated user is playing your application.",
6361	//   "httpMethod": "POST",
6362	//   "id": "games.applications.played",
6363	//   "path": "applications/played",
6364	//   "scopes": [
6365	//     "https://www.googleapis.com/auth/games",
6366	//     "https://www.googleapis.com/auth/plus.login"
6367	//   ]
6368	// }
6369
6370}
6371
6372// method id "games.applications.verify":
6373
6374type ApplicationsVerifyCall struct {
6375	s             *Service
6376	applicationId string
6377	urlParams_    gensupport.URLParams
6378	ifNoneMatch_  string
6379	ctx_          context.Context
6380	header_       http.Header
6381}
6382
6383// Verify: Verifies the auth token provided with this request is for the
6384// application with the specified ID, and returns the ID of the player
6385// it was granted for.
6386func (r *ApplicationsService) Verify(applicationId string) *ApplicationsVerifyCall {
6387	c := &ApplicationsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6388	c.applicationId = applicationId
6389	return c
6390}
6391
6392// Fields allows partial responses to be retrieved. See
6393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6394// for more information.
6395func (c *ApplicationsVerifyCall) Fields(s ...googleapi.Field) *ApplicationsVerifyCall {
6396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6397	return c
6398}
6399
6400// IfNoneMatch sets the optional parameter which makes the operation
6401// fail if the object's ETag matches the given value. This is useful for
6402// getting updates only after the object has changed since the last
6403// request. Use googleapi.IsNotModified to check whether the response
6404// error from Do is the result of In-None-Match.
6405func (c *ApplicationsVerifyCall) IfNoneMatch(entityTag string) *ApplicationsVerifyCall {
6406	c.ifNoneMatch_ = entityTag
6407	return c
6408}
6409
6410// Context sets the context to be used in this call's Do method. Any
6411// pending HTTP request will be aborted if the provided context is
6412// canceled.
6413func (c *ApplicationsVerifyCall) Context(ctx context.Context) *ApplicationsVerifyCall {
6414	c.ctx_ = ctx
6415	return c
6416}
6417
6418// Header returns an http.Header that can be modified by the caller to
6419// add HTTP headers to the request.
6420func (c *ApplicationsVerifyCall) Header() http.Header {
6421	if c.header_ == nil {
6422		c.header_ = make(http.Header)
6423	}
6424	return c.header_
6425}
6426
6427func (c *ApplicationsVerifyCall) doRequest(alt string) (*http.Response, error) {
6428	reqHeaders := make(http.Header)
6429	for k, v := range c.header_ {
6430		reqHeaders[k] = v
6431	}
6432	reqHeaders.Set("User-Agent", c.s.userAgent())
6433	if c.ifNoneMatch_ != "" {
6434		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6435	}
6436	var body io.Reader = nil
6437	c.urlParams_.Set("alt", alt)
6438	urls := googleapi.ResolveRelative(c.s.BasePath, "applications/{applicationId}/verify")
6439	urls += "?" + c.urlParams_.Encode()
6440	req, _ := http.NewRequest("GET", urls, body)
6441	req.Header = reqHeaders
6442	googleapi.Expand(req.URL, map[string]string{
6443		"applicationId": c.applicationId,
6444	})
6445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6446}
6447
6448// Do executes the "games.applications.verify" call.
6449// Exactly one of *ApplicationVerifyResponse or error will be non-nil.
6450// Any non-2xx status code is an error. Response headers are in either
6451// *ApplicationVerifyResponse.ServerResponse.Header or (if a response
6452// was returned at all) in error.(*googleapi.Error).Header. Use
6453// googleapi.IsNotModified to check whether the returned error was
6454// because http.StatusNotModified was returned.
6455func (c *ApplicationsVerifyCall) Do(opts ...googleapi.CallOption) (*ApplicationVerifyResponse, error) {
6456	gensupport.SetOptions(c.urlParams_, opts...)
6457	res, err := c.doRequest("json")
6458	if res != nil && res.StatusCode == http.StatusNotModified {
6459		if res.Body != nil {
6460			res.Body.Close()
6461		}
6462		return nil, &googleapi.Error{
6463			Code:   res.StatusCode,
6464			Header: res.Header,
6465		}
6466	}
6467	if err != nil {
6468		return nil, err
6469	}
6470	defer googleapi.CloseBody(res)
6471	if err := googleapi.CheckResponse(res); err != nil {
6472		return nil, err
6473	}
6474	ret := &ApplicationVerifyResponse{
6475		ServerResponse: googleapi.ServerResponse{
6476			Header:         res.Header,
6477			HTTPStatusCode: res.StatusCode,
6478		},
6479	}
6480	target := &ret
6481	if err := gensupport.DecodeResponse(target, res); err != nil {
6482		return nil, err
6483	}
6484	return ret, nil
6485	// {
6486	//   "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.",
6487	//   "httpMethod": "GET",
6488	//   "id": "games.applications.verify",
6489	//   "parameterOrder": [
6490	//     "applicationId"
6491	//   ],
6492	//   "parameters": {
6493	//     "applicationId": {
6494	//       "description": "The application ID from the Google Play developer console.",
6495	//       "location": "path",
6496	//       "required": true,
6497	//       "type": "string"
6498	//     }
6499	//   },
6500	//   "path": "applications/{applicationId}/verify",
6501	//   "response": {
6502	//     "$ref": "ApplicationVerifyResponse"
6503	//   },
6504	//   "scopes": [
6505	//     "https://www.googleapis.com/auth/games",
6506	//     "https://www.googleapis.com/auth/plus.login"
6507	//   ]
6508	// }
6509
6510}
6511
6512// method id "games.events.listByPlayer":
6513
6514type EventsListByPlayerCall struct {
6515	s            *Service
6516	urlParams_   gensupport.URLParams
6517	ifNoneMatch_ string
6518	ctx_         context.Context
6519	header_      http.Header
6520}
6521
6522// ListByPlayer: Returns a list showing the current progress on events
6523// in this application for the currently authenticated user.
6524func (r *EventsService) ListByPlayer() *EventsListByPlayerCall {
6525	c := &EventsListByPlayerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6526	return c
6527}
6528
6529// Language sets the optional parameter "language": The preferred
6530// language to use for strings returned by this method.
6531func (c *EventsListByPlayerCall) Language(language string) *EventsListByPlayerCall {
6532	c.urlParams_.Set("language", language)
6533	return c
6534}
6535
6536// MaxResults sets the optional parameter "maxResults": The maximum
6537// number of events to return in the response, used for paging. For any
6538// response, the actual number of events to return may be less than the
6539// specified maxResults.
6540func (c *EventsListByPlayerCall) MaxResults(maxResults int64) *EventsListByPlayerCall {
6541	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6542	return c
6543}
6544
6545// PageToken sets the optional parameter "pageToken": The token returned
6546// by the previous request.
6547func (c *EventsListByPlayerCall) PageToken(pageToken string) *EventsListByPlayerCall {
6548	c.urlParams_.Set("pageToken", pageToken)
6549	return c
6550}
6551
6552// Fields allows partial responses to be retrieved. See
6553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6554// for more information.
6555func (c *EventsListByPlayerCall) Fields(s ...googleapi.Field) *EventsListByPlayerCall {
6556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6557	return c
6558}
6559
6560// IfNoneMatch sets the optional parameter which makes the operation
6561// fail if the object's ETag matches the given value. This is useful for
6562// getting updates only after the object has changed since the last
6563// request. Use googleapi.IsNotModified to check whether the response
6564// error from Do is the result of In-None-Match.
6565func (c *EventsListByPlayerCall) IfNoneMatch(entityTag string) *EventsListByPlayerCall {
6566	c.ifNoneMatch_ = entityTag
6567	return c
6568}
6569
6570// Context sets the context to be used in this call's Do method. Any
6571// pending HTTP request will be aborted if the provided context is
6572// canceled.
6573func (c *EventsListByPlayerCall) Context(ctx context.Context) *EventsListByPlayerCall {
6574	c.ctx_ = ctx
6575	return c
6576}
6577
6578// Header returns an http.Header that can be modified by the caller to
6579// add HTTP headers to the request.
6580func (c *EventsListByPlayerCall) Header() http.Header {
6581	if c.header_ == nil {
6582		c.header_ = make(http.Header)
6583	}
6584	return c.header_
6585}
6586
6587func (c *EventsListByPlayerCall) doRequest(alt string) (*http.Response, error) {
6588	reqHeaders := make(http.Header)
6589	for k, v := range c.header_ {
6590		reqHeaders[k] = v
6591	}
6592	reqHeaders.Set("User-Agent", c.s.userAgent())
6593	if c.ifNoneMatch_ != "" {
6594		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6595	}
6596	var body io.Reader = nil
6597	c.urlParams_.Set("alt", alt)
6598	urls := googleapi.ResolveRelative(c.s.BasePath, "events")
6599	urls += "?" + c.urlParams_.Encode()
6600	req, _ := http.NewRequest("GET", urls, body)
6601	req.Header = reqHeaders
6602	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6603}
6604
6605// Do executes the "games.events.listByPlayer" call.
6606// Exactly one of *PlayerEventListResponse or error will be non-nil. Any
6607// non-2xx status code is an error. Response headers are in either
6608// *PlayerEventListResponse.ServerResponse.Header or (if a response was
6609// returned at all) in error.(*googleapi.Error).Header. Use
6610// googleapi.IsNotModified to check whether the returned error was
6611// because http.StatusNotModified was returned.
6612func (c *EventsListByPlayerCall) Do(opts ...googleapi.CallOption) (*PlayerEventListResponse, error) {
6613	gensupport.SetOptions(c.urlParams_, opts...)
6614	res, err := c.doRequest("json")
6615	if res != nil && res.StatusCode == http.StatusNotModified {
6616		if res.Body != nil {
6617			res.Body.Close()
6618		}
6619		return nil, &googleapi.Error{
6620			Code:   res.StatusCode,
6621			Header: res.Header,
6622		}
6623	}
6624	if err != nil {
6625		return nil, err
6626	}
6627	defer googleapi.CloseBody(res)
6628	if err := googleapi.CheckResponse(res); err != nil {
6629		return nil, err
6630	}
6631	ret := &PlayerEventListResponse{
6632		ServerResponse: googleapi.ServerResponse{
6633			Header:         res.Header,
6634			HTTPStatusCode: res.StatusCode,
6635		},
6636	}
6637	target := &ret
6638	if err := gensupport.DecodeResponse(target, res); err != nil {
6639		return nil, err
6640	}
6641	return ret, nil
6642	// {
6643	//   "description": "Returns a list showing the current progress on events in this application for the currently authenticated user.",
6644	//   "httpMethod": "GET",
6645	//   "id": "games.events.listByPlayer",
6646	//   "parameters": {
6647	//     "language": {
6648	//       "description": "The preferred language to use for strings returned by this method.",
6649	//       "location": "query",
6650	//       "type": "string"
6651	//     },
6652	//     "maxResults": {
6653	//       "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.",
6654	//       "format": "int32",
6655	//       "location": "query",
6656	//       "maximum": "100",
6657	//       "minimum": "1",
6658	//       "type": "integer"
6659	//     },
6660	//     "pageToken": {
6661	//       "description": "The token returned by the previous request.",
6662	//       "location": "query",
6663	//       "type": "string"
6664	//     }
6665	//   },
6666	//   "path": "events",
6667	//   "response": {
6668	//     "$ref": "PlayerEventListResponse"
6669	//   },
6670	//   "scopes": [
6671	//     "https://www.googleapis.com/auth/games",
6672	//     "https://www.googleapis.com/auth/plus.login"
6673	//   ]
6674	// }
6675
6676}
6677
6678// Pages invokes f for each page of results.
6679// A non-nil error returned from f will halt the iteration.
6680// The provided context supersedes any context provided to the Context method.
6681func (c *EventsListByPlayerCall) Pages(ctx context.Context, f func(*PlayerEventListResponse) error) error {
6682	c.ctx_ = ctx
6683	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6684	for {
6685		x, err := c.Do()
6686		if err != nil {
6687			return err
6688		}
6689		if err := f(x); err != nil {
6690			return err
6691		}
6692		if x.NextPageToken == "" {
6693			return nil
6694		}
6695		c.PageToken(x.NextPageToken)
6696	}
6697}
6698
6699// method id "games.events.listDefinitions":
6700
6701type EventsListDefinitionsCall struct {
6702	s            *Service
6703	urlParams_   gensupport.URLParams
6704	ifNoneMatch_ string
6705	ctx_         context.Context
6706	header_      http.Header
6707}
6708
6709// ListDefinitions: Returns a list of the event definitions in this
6710// application.
6711func (r *EventsService) ListDefinitions() *EventsListDefinitionsCall {
6712	c := &EventsListDefinitionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6713	return c
6714}
6715
6716// Language sets the optional parameter "language": The preferred
6717// language to use for strings returned by this method.
6718func (c *EventsListDefinitionsCall) Language(language string) *EventsListDefinitionsCall {
6719	c.urlParams_.Set("language", language)
6720	return c
6721}
6722
6723// MaxResults sets the optional parameter "maxResults": The maximum
6724// number of event definitions to return in the response, used for
6725// paging. For any response, the actual number of event definitions to
6726// return may be less than the specified maxResults.
6727func (c *EventsListDefinitionsCall) MaxResults(maxResults int64) *EventsListDefinitionsCall {
6728	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6729	return c
6730}
6731
6732// PageToken sets the optional parameter "pageToken": The token returned
6733// by the previous request.
6734func (c *EventsListDefinitionsCall) PageToken(pageToken string) *EventsListDefinitionsCall {
6735	c.urlParams_.Set("pageToken", pageToken)
6736	return c
6737}
6738
6739// Fields allows partial responses to be retrieved. See
6740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6741// for more information.
6742func (c *EventsListDefinitionsCall) Fields(s ...googleapi.Field) *EventsListDefinitionsCall {
6743	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6744	return c
6745}
6746
6747// IfNoneMatch sets the optional parameter which makes the operation
6748// fail if the object's ETag matches the given value. This is useful for
6749// getting updates only after the object has changed since the last
6750// request. Use googleapi.IsNotModified to check whether the response
6751// error from Do is the result of In-None-Match.
6752func (c *EventsListDefinitionsCall) IfNoneMatch(entityTag string) *EventsListDefinitionsCall {
6753	c.ifNoneMatch_ = entityTag
6754	return c
6755}
6756
6757// Context sets the context to be used in this call's Do method. Any
6758// pending HTTP request will be aborted if the provided context is
6759// canceled.
6760func (c *EventsListDefinitionsCall) Context(ctx context.Context) *EventsListDefinitionsCall {
6761	c.ctx_ = ctx
6762	return c
6763}
6764
6765// Header returns an http.Header that can be modified by the caller to
6766// add HTTP headers to the request.
6767func (c *EventsListDefinitionsCall) Header() http.Header {
6768	if c.header_ == nil {
6769		c.header_ = make(http.Header)
6770	}
6771	return c.header_
6772}
6773
6774func (c *EventsListDefinitionsCall) doRequest(alt string) (*http.Response, error) {
6775	reqHeaders := make(http.Header)
6776	for k, v := range c.header_ {
6777		reqHeaders[k] = v
6778	}
6779	reqHeaders.Set("User-Agent", c.s.userAgent())
6780	if c.ifNoneMatch_ != "" {
6781		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6782	}
6783	var body io.Reader = nil
6784	c.urlParams_.Set("alt", alt)
6785	urls := googleapi.ResolveRelative(c.s.BasePath, "eventDefinitions")
6786	urls += "?" + c.urlParams_.Encode()
6787	req, _ := http.NewRequest("GET", urls, body)
6788	req.Header = reqHeaders
6789	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6790}
6791
6792// Do executes the "games.events.listDefinitions" call.
6793// Exactly one of *EventDefinitionListResponse or error will be non-nil.
6794// Any non-2xx status code is an error. Response headers are in either
6795// *EventDefinitionListResponse.ServerResponse.Header or (if a response
6796// was returned at all) in error.(*googleapi.Error).Header. Use
6797// googleapi.IsNotModified to check whether the returned error was
6798// because http.StatusNotModified was returned.
6799func (c *EventsListDefinitionsCall) Do(opts ...googleapi.CallOption) (*EventDefinitionListResponse, error) {
6800	gensupport.SetOptions(c.urlParams_, opts...)
6801	res, err := c.doRequest("json")
6802	if res != nil && res.StatusCode == http.StatusNotModified {
6803		if res.Body != nil {
6804			res.Body.Close()
6805		}
6806		return nil, &googleapi.Error{
6807			Code:   res.StatusCode,
6808			Header: res.Header,
6809		}
6810	}
6811	if err != nil {
6812		return nil, err
6813	}
6814	defer googleapi.CloseBody(res)
6815	if err := googleapi.CheckResponse(res); err != nil {
6816		return nil, err
6817	}
6818	ret := &EventDefinitionListResponse{
6819		ServerResponse: googleapi.ServerResponse{
6820			Header:         res.Header,
6821			HTTPStatusCode: res.StatusCode,
6822		},
6823	}
6824	target := &ret
6825	if err := gensupport.DecodeResponse(target, res); err != nil {
6826		return nil, err
6827	}
6828	return ret, nil
6829	// {
6830	//   "description": "Returns a list of the event definitions in this application.",
6831	//   "httpMethod": "GET",
6832	//   "id": "games.events.listDefinitions",
6833	//   "parameters": {
6834	//     "language": {
6835	//       "description": "The preferred language to use for strings returned by this method.",
6836	//       "location": "query",
6837	//       "type": "string"
6838	//     },
6839	//     "maxResults": {
6840	//       "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.",
6841	//       "format": "int32",
6842	//       "location": "query",
6843	//       "maximum": "100",
6844	//       "minimum": "1",
6845	//       "type": "integer"
6846	//     },
6847	//     "pageToken": {
6848	//       "description": "The token returned by the previous request.",
6849	//       "location": "query",
6850	//       "type": "string"
6851	//     }
6852	//   },
6853	//   "path": "eventDefinitions",
6854	//   "response": {
6855	//     "$ref": "EventDefinitionListResponse"
6856	//   },
6857	//   "scopes": [
6858	//     "https://www.googleapis.com/auth/games",
6859	//     "https://www.googleapis.com/auth/plus.login"
6860	//   ]
6861	// }
6862
6863}
6864
6865// Pages invokes f for each page of results.
6866// A non-nil error returned from f will halt the iteration.
6867// The provided context supersedes any context provided to the Context method.
6868func (c *EventsListDefinitionsCall) Pages(ctx context.Context, f func(*EventDefinitionListResponse) error) error {
6869	c.ctx_ = ctx
6870	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6871	for {
6872		x, err := c.Do()
6873		if err != nil {
6874			return err
6875		}
6876		if err := f(x); err != nil {
6877			return err
6878		}
6879		if x.NextPageToken == "" {
6880			return nil
6881		}
6882		c.PageToken(x.NextPageToken)
6883	}
6884}
6885
6886// method id "games.events.record":
6887
6888type EventsRecordCall struct {
6889	s                  *Service
6890	eventrecordrequest *EventRecordRequest
6891	urlParams_         gensupport.URLParams
6892	ctx_               context.Context
6893	header_            http.Header
6894}
6895
6896// Record: Records a batch of changes to the number of times events have
6897// occurred for the currently authenticated user of this application.
6898func (r *EventsService) Record(eventrecordrequest *EventRecordRequest) *EventsRecordCall {
6899	c := &EventsRecordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6900	c.eventrecordrequest = eventrecordrequest
6901	return c
6902}
6903
6904// Language sets the optional parameter "language": The preferred
6905// language to use for strings returned by this method.
6906func (c *EventsRecordCall) Language(language string) *EventsRecordCall {
6907	c.urlParams_.Set("language", language)
6908	return c
6909}
6910
6911// Fields allows partial responses to be retrieved. See
6912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6913// for more information.
6914func (c *EventsRecordCall) Fields(s ...googleapi.Field) *EventsRecordCall {
6915	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6916	return c
6917}
6918
6919// Context sets the context to be used in this call's Do method. Any
6920// pending HTTP request will be aborted if the provided context is
6921// canceled.
6922func (c *EventsRecordCall) Context(ctx context.Context) *EventsRecordCall {
6923	c.ctx_ = ctx
6924	return c
6925}
6926
6927// Header returns an http.Header that can be modified by the caller to
6928// add HTTP headers to the request.
6929func (c *EventsRecordCall) Header() http.Header {
6930	if c.header_ == nil {
6931		c.header_ = make(http.Header)
6932	}
6933	return c.header_
6934}
6935
6936func (c *EventsRecordCall) doRequest(alt string) (*http.Response, error) {
6937	reqHeaders := make(http.Header)
6938	for k, v := range c.header_ {
6939		reqHeaders[k] = v
6940	}
6941	reqHeaders.Set("User-Agent", c.s.userAgent())
6942	var body io.Reader = nil
6943	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventrecordrequest)
6944	if err != nil {
6945		return nil, err
6946	}
6947	reqHeaders.Set("Content-Type", "application/json")
6948	c.urlParams_.Set("alt", alt)
6949	urls := googleapi.ResolveRelative(c.s.BasePath, "events")
6950	urls += "?" + c.urlParams_.Encode()
6951	req, _ := http.NewRequest("POST", urls, body)
6952	req.Header = reqHeaders
6953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6954}
6955
6956// Do executes the "games.events.record" call.
6957// Exactly one of *EventUpdateResponse or error will be non-nil. Any
6958// non-2xx status code is an error. Response headers are in either
6959// *EventUpdateResponse.ServerResponse.Header or (if a response was
6960// returned at all) in error.(*googleapi.Error).Header. Use
6961// googleapi.IsNotModified to check whether the returned error was
6962// because http.StatusNotModified was returned.
6963func (c *EventsRecordCall) Do(opts ...googleapi.CallOption) (*EventUpdateResponse, error) {
6964	gensupport.SetOptions(c.urlParams_, opts...)
6965	res, err := c.doRequest("json")
6966	if res != nil && res.StatusCode == http.StatusNotModified {
6967		if res.Body != nil {
6968			res.Body.Close()
6969		}
6970		return nil, &googleapi.Error{
6971			Code:   res.StatusCode,
6972			Header: res.Header,
6973		}
6974	}
6975	if err != nil {
6976		return nil, err
6977	}
6978	defer googleapi.CloseBody(res)
6979	if err := googleapi.CheckResponse(res); err != nil {
6980		return nil, err
6981	}
6982	ret := &EventUpdateResponse{
6983		ServerResponse: googleapi.ServerResponse{
6984			Header:         res.Header,
6985			HTTPStatusCode: res.StatusCode,
6986		},
6987	}
6988	target := &ret
6989	if err := gensupport.DecodeResponse(target, res); err != nil {
6990		return nil, err
6991	}
6992	return ret, nil
6993	// {
6994	//   "description": "Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.",
6995	//   "httpMethod": "POST",
6996	//   "id": "games.events.record",
6997	//   "parameters": {
6998	//     "language": {
6999	//       "description": "The preferred language to use for strings returned by this method.",
7000	//       "location": "query",
7001	//       "type": "string"
7002	//     }
7003	//   },
7004	//   "path": "events",
7005	//   "request": {
7006	//     "$ref": "EventRecordRequest"
7007	//   },
7008	//   "response": {
7009	//     "$ref": "EventUpdateResponse"
7010	//   },
7011	//   "scopes": [
7012	//     "https://www.googleapis.com/auth/games",
7013	//     "https://www.googleapis.com/auth/plus.login"
7014	//   ]
7015	// }
7016
7017}
7018
7019// method id "games.leaderboards.get":
7020
7021type LeaderboardsGetCall struct {
7022	s             *Service
7023	leaderboardId string
7024	urlParams_    gensupport.URLParams
7025	ifNoneMatch_  string
7026	ctx_          context.Context
7027	header_       http.Header
7028}
7029
7030// Get: Retrieves the metadata of the leaderboard with the given ID.
7031func (r *LeaderboardsService) Get(leaderboardId string) *LeaderboardsGetCall {
7032	c := &LeaderboardsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7033	c.leaderboardId = leaderboardId
7034	return c
7035}
7036
7037// Language sets the optional parameter "language": The preferred
7038// language to use for strings returned by this method.
7039func (c *LeaderboardsGetCall) Language(language string) *LeaderboardsGetCall {
7040	c.urlParams_.Set("language", language)
7041	return c
7042}
7043
7044// Fields allows partial responses to be retrieved. See
7045// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7046// for more information.
7047func (c *LeaderboardsGetCall) Fields(s ...googleapi.Field) *LeaderboardsGetCall {
7048	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7049	return c
7050}
7051
7052// IfNoneMatch sets the optional parameter which makes the operation
7053// fail if the object's ETag matches the given value. This is useful for
7054// getting updates only after the object has changed since the last
7055// request. Use googleapi.IsNotModified to check whether the response
7056// error from Do is the result of In-None-Match.
7057func (c *LeaderboardsGetCall) IfNoneMatch(entityTag string) *LeaderboardsGetCall {
7058	c.ifNoneMatch_ = entityTag
7059	return c
7060}
7061
7062// Context sets the context to be used in this call's Do method. Any
7063// pending HTTP request will be aborted if the provided context is
7064// canceled.
7065func (c *LeaderboardsGetCall) Context(ctx context.Context) *LeaderboardsGetCall {
7066	c.ctx_ = ctx
7067	return c
7068}
7069
7070// Header returns an http.Header that can be modified by the caller to
7071// add HTTP headers to the request.
7072func (c *LeaderboardsGetCall) Header() http.Header {
7073	if c.header_ == nil {
7074		c.header_ = make(http.Header)
7075	}
7076	return c.header_
7077}
7078
7079func (c *LeaderboardsGetCall) doRequest(alt string) (*http.Response, error) {
7080	reqHeaders := make(http.Header)
7081	for k, v := range c.header_ {
7082		reqHeaders[k] = v
7083	}
7084	reqHeaders.Set("User-Agent", c.s.userAgent())
7085	if c.ifNoneMatch_ != "" {
7086		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7087	}
7088	var body io.Reader = nil
7089	c.urlParams_.Set("alt", alt)
7090	urls := googleapi.ResolveRelative(c.s.BasePath, "leaderboards/{leaderboardId}")
7091	urls += "?" + c.urlParams_.Encode()
7092	req, _ := http.NewRequest("GET", urls, body)
7093	req.Header = reqHeaders
7094	googleapi.Expand(req.URL, map[string]string{
7095		"leaderboardId": c.leaderboardId,
7096	})
7097	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7098}
7099
7100// Do executes the "games.leaderboards.get" call.
7101// Exactly one of *Leaderboard or error will be non-nil. Any non-2xx
7102// status code is an error. Response headers are in either
7103// *Leaderboard.ServerResponse.Header or (if a response was returned at
7104// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7105// to check whether the returned error was because
7106// http.StatusNotModified was returned.
7107func (c *LeaderboardsGetCall) Do(opts ...googleapi.CallOption) (*Leaderboard, error) {
7108	gensupport.SetOptions(c.urlParams_, opts...)
7109	res, err := c.doRequest("json")
7110	if res != nil && res.StatusCode == http.StatusNotModified {
7111		if res.Body != nil {
7112			res.Body.Close()
7113		}
7114		return nil, &googleapi.Error{
7115			Code:   res.StatusCode,
7116			Header: res.Header,
7117		}
7118	}
7119	if err != nil {
7120		return nil, err
7121	}
7122	defer googleapi.CloseBody(res)
7123	if err := googleapi.CheckResponse(res); err != nil {
7124		return nil, err
7125	}
7126	ret := &Leaderboard{
7127		ServerResponse: googleapi.ServerResponse{
7128			Header:         res.Header,
7129			HTTPStatusCode: res.StatusCode,
7130		},
7131	}
7132	target := &ret
7133	if err := gensupport.DecodeResponse(target, res); err != nil {
7134		return nil, err
7135	}
7136	return ret, nil
7137	// {
7138	//   "description": "Retrieves the metadata of the leaderboard with the given ID.",
7139	//   "httpMethod": "GET",
7140	//   "id": "games.leaderboards.get",
7141	//   "parameterOrder": [
7142	//     "leaderboardId"
7143	//   ],
7144	//   "parameters": {
7145	//     "language": {
7146	//       "description": "The preferred language to use for strings returned by this method.",
7147	//       "location": "query",
7148	//       "type": "string"
7149	//     },
7150	//     "leaderboardId": {
7151	//       "description": "The ID of the leaderboard.",
7152	//       "location": "path",
7153	//       "required": true,
7154	//       "type": "string"
7155	//     }
7156	//   },
7157	//   "path": "leaderboards/{leaderboardId}",
7158	//   "response": {
7159	//     "$ref": "Leaderboard"
7160	//   },
7161	//   "scopes": [
7162	//     "https://www.googleapis.com/auth/games",
7163	//     "https://www.googleapis.com/auth/plus.login"
7164	//   ]
7165	// }
7166
7167}
7168
7169// method id "games.leaderboards.list":
7170
7171type LeaderboardsListCall struct {
7172	s            *Service
7173	urlParams_   gensupport.URLParams
7174	ifNoneMatch_ string
7175	ctx_         context.Context
7176	header_      http.Header
7177}
7178
7179// List: Lists all the leaderboard metadata for your application.
7180func (r *LeaderboardsService) List() *LeaderboardsListCall {
7181	c := &LeaderboardsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7182	return c
7183}
7184
7185// Language sets the optional parameter "language": The preferred
7186// language to use for strings returned by this method.
7187func (c *LeaderboardsListCall) Language(language string) *LeaderboardsListCall {
7188	c.urlParams_.Set("language", language)
7189	return c
7190}
7191
7192// MaxResults sets the optional parameter "maxResults": The maximum
7193// number of leaderboards to return in the response. For any response,
7194// the actual number of leaderboards returned may be less than the
7195// specified maxResults.
7196func (c *LeaderboardsListCall) MaxResults(maxResults int64) *LeaderboardsListCall {
7197	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7198	return c
7199}
7200
7201// PageToken sets the optional parameter "pageToken": The token returned
7202// by the previous request.
7203func (c *LeaderboardsListCall) PageToken(pageToken string) *LeaderboardsListCall {
7204	c.urlParams_.Set("pageToken", pageToken)
7205	return c
7206}
7207
7208// Fields allows partial responses to be retrieved. See
7209// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7210// for more information.
7211func (c *LeaderboardsListCall) Fields(s ...googleapi.Field) *LeaderboardsListCall {
7212	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7213	return c
7214}
7215
7216// IfNoneMatch sets the optional parameter which makes the operation
7217// fail if the object's ETag matches the given value. This is useful for
7218// getting updates only after the object has changed since the last
7219// request. Use googleapi.IsNotModified to check whether the response
7220// error from Do is the result of In-None-Match.
7221func (c *LeaderboardsListCall) IfNoneMatch(entityTag string) *LeaderboardsListCall {
7222	c.ifNoneMatch_ = entityTag
7223	return c
7224}
7225
7226// Context sets the context to be used in this call's Do method. Any
7227// pending HTTP request will be aborted if the provided context is
7228// canceled.
7229func (c *LeaderboardsListCall) Context(ctx context.Context) *LeaderboardsListCall {
7230	c.ctx_ = ctx
7231	return c
7232}
7233
7234// Header returns an http.Header that can be modified by the caller to
7235// add HTTP headers to the request.
7236func (c *LeaderboardsListCall) Header() http.Header {
7237	if c.header_ == nil {
7238		c.header_ = make(http.Header)
7239	}
7240	return c.header_
7241}
7242
7243func (c *LeaderboardsListCall) doRequest(alt string) (*http.Response, error) {
7244	reqHeaders := make(http.Header)
7245	for k, v := range c.header_ {
7246		reqHeaders[k] = v
7247	}
7248	reqHeaders.Set("User-Agent", c.s.userAgent())
7249	if c.ifNoneMatch_ != "" {
7250		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7251	}
7252	var body io.Reader = nil
7253	c.urlParams_.Set("alt", alt)
7254	urls := googleapi.ResolveRelative(c.s.BasePath, "leaderboards")
7255	urls += "?" + c.urlParams_.Encode()
7256	req, _ := http.NewRequest("GET", urls, body)
7257	req.Header = reqHeaders
7258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7259}
7260
7261// Do executes the "games.leaderboards.list" call.
7262// Exactly one of *LeaderboardListResponse or error will be non-nil. Any
7263// non-2xx status code is an error. Response headers are in either
7264// *LeaderboardListResponse.ServerResponse.Header or (if a response was
7265// returned at all) in error.(*googleapi.Error).Header. Use
7266// googleapi.IsNotModified to check whether the returned error was
7267// because http.StatusNotModified was returned.
7268func (c *LeaderboardsListCall) Do(opts ...googleapi.CallOption) (*LeaderboardListResponse, error) {
7269	gensupport.SetOptions(c.urlParams_, opts...)
7270	res, err := c.doRequest("json")
7271	if res != nil && res.StatusCode == http.StatusNotModified {
7272		if res.Body != nil {
7273			res.Body.Close()
7274		}
7275		return nil, &googleapi.Error{
7276			Code:   res.StatusCode,
7277			Header: res.Header,
7278		}
7279	}
7280	if err != nil {
7281		return nil, err
7282	}
7283	defer googleapi.CloseBody(res)
7284	if err := googleapi.CheckResponse(res); err != nil {
7285		return nil, err
7286	}
7287	ret := &LeaderboardListResponse{
7288		ServerResponse: googleapi.ServerResponse{
7289			Header:         res.Header,
7290			HTTPStatusCode: res.StatusCode,
7291		},
7292	}
7293	target := &ret
7294	if err := gensupport.DecodeResponse(target, res); err != nil {
7295		return nil, err
7296	}
7297	return ret, nil
7298	// {
7299	//   "description": "Lists all the leaderboard metadata for your application.",
7300	//   "httpMethod": "GET",
7301	//   "id": "games.leaderboards.list",
7302	//   "parameters": {
7303	//     "language": {
7304	//       "description": "The preferred language to use for strings returned by this method.",
7305	//       "location": "query",
7306	//       "type": "string"
7307	//     },
7308	//     "maxResults": {
7309	//       "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.",
7310	//       "format": "int32",
7311	//       "location": "query",
7312	//       "maximum": "200",
7313	//       "minimum": "1",
7314	//       "type": "integer"
7315	//     },
7316	//     "pageToken": {
7317	//       "description": "The token returned by the previous request.",
7318	//       "location": "query",
7319	//       "type": "string"
7320	//     }
7321	//   },
7322	//   "path": "leaderboards",
7323	//   "response": {
7324	//     "$ref": "LeaderboardListResponse"
7325	//   },
7326	//   "scopes": [
7327	//     "https://www.googleapis.com/auth/games",
7328	//     "https://www.googleapis.com/auth/plus.login"
7329	//   ]
7330	// }
7331
7332}
7333
7334// Pages invokes f for each page of results.
7335// A non-nil error returned from f will halt the iteration.
7336// The provided context supersedes any context provided to the Context method.
7337func (c *LeaderboardsListCall) Pages(ctx context.Context, f func(*LeaderboardListResponse) error) error {
7338	c.ctx_ = ctx
7339	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7340	for {
7341		x, err := c.Do()
7342		if err != nil {
7343			return err
7344		}
7345		if err := f(x); err != nil {
7346			return err
7347		}
7348		if x.NextPageToken == "" {
7349			return nil
7350		}
7351		c.PageToken(x.NextPageToken)
7352	}
7353}
7354
7355// method id "games.metagame.getMetagameConfig":
7356
7357type MetagameGetMetagameConfigCall struct {
7358	s            *Service
7359	urlParams_   gensupport.URLParams
7360	ifNoneMatch_ string
7361	ctx_         context.Context
7362	header_      http.Header
7363}
7364
7365// GetMetagameConfig: Return the metagame configuration data for the
7366// calling application.
7367func (r *MetagameService) GetMetagameConfig() *MetagameGetMetagameConfigCall {
7368	c := &MetagameGetMetagameConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7369	return c
7370}
7371
7372// Fields allows partial responses to be retrieved. See
7373// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7374// for more information.
7375func (c *MetagameGetMetagameConfigCall) Fields(s ...googleapi.Field) *MetagameGetMetagameConfigCall {
7376	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7377	return c
7378}
7379
7380// IfNoneMatch sets the optional parameter which makes the operation
7381// fail if the object's ETag matches the given value. This is useful for
7382// getting updates only after the object has changed since the last
7383// request. Use googleapi.IsNotModified to check whether the response
7384// error from Do is the result of In-None-Match.
7385func (c *MetagameGetMetagameConfigCall) IfNoneMatch(entityTag string) *MetagameGetMetagameConfigCall {
7386	c.ifNoneMatch_ = entityTag
7387	return c
7388}
7389
7390// Context sets the context to be used in this call's Do method. Any
7391// pending HTTP request will be aborted if the provided context is
7392// canceled.
7393func (c *MetagameGetMetagameConfigCall) Context(ctx context.Context) *MetagameGetMetagameConfigCall {
7394	c.ctx_ = ctx
7395	return c
7396}
7397
7398// Header returns an http.Header that can be modified by the caller to
7399// add HTTP headers to the request.
7400func (c *MetagameGetMetagameConfigCall) Header() http.Header {
7401	if c.header_ == nil {
7402		c.header_ = make(http.Header)
7403	}
7404	return c.header_
7405}
7406
7407func (c *MetagameGetMetagameConfigCall) doRequest(alt string) (*http.Response, error) {
7408	reqHeaders := make(http.Header)
7409	for k, v := range c.header_ {
7410		reqHeaders[k] = v
7411	}
7412	reqHeaders.Set("User-Agent", c.s.userAgent())
7413	if c.ifNoneMatch_ != "" {
7414		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7415	}
7416	var body io.Reader = nil
7417	c.urlParams_.Set("alt", alt)
7418	urls := googleapi.ResolveRelative(c.s.BasePath, "metagameConfig")
7419	urls += "?" + c.urlParams_.Encode()
7420	req, _ := http.NewRequest("GET", urls, body)
7421	req.Header = reqHeaders
7422	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7423}
7424
7425// Do executes the "games.metagame.getMetagameConfig" call.
7426// Exactly one of *MetagameConfig or error will be non-nil. Any non-2xx
7427// status code is an error. Response headers are in either
7428// *MetagameConfig.ServerResponse.Header or (if a response was returned
7429// at all) in error.(*googleapi.Error).Header. Use
7430// googleapi.IsNotModified to check whether the returned error was
7431// because http.StatusNotModified was returned.
7432func (c *MetagameGetMetagameConfigCall) Do(opts ...googleapi.CallOption) (*MetagameConfig, error) {
7433	gensupport.SetOptions(c.urlParams_, opts...)
7434	res, err := c.doRequest("json")
7435	if res != nil && res.StatusCode == http.StatusNotModified {
7436		if res.Body != nil {
7437			res.Body.Close()
7438		}
7439		return nil, &googleapi.Error{
7440			Code:   res.StatusCode,
7441			Header: res.Header,
7442		}
7443	}
7444	if err != nil {
7445		return nil, err
7446	}
7447	defer googleapi.CloseBody(res)
7448	if err := googleapi.CheckResponse(res); err != nil {
7449		return nil, err
7450	}
7451	ret := &MetagameConfig{
7452		ServerResponse: googleapi.ServerResponse{
7453			Header:         res.Header,
7454			HTTPStatusCode: res.StatusCode,
7455		},
7456	}
7457	target := &ret
7458	if err := gensupport.DecodeResponse(target, res); err != nil {
7459		return nil, err
7460	}
7461	return ret, nil
7462	// {
7463	//   "description": "Return the metagame configuration data for the calling application.",
7464	//   "httpMethod": "GET",
7465	//   "id": "games.metagame.getMetagameConfig",
7466	//   "path": "metagameConfig",
7467	//   "response": {
7468	//     "$ref": "MetagameConfig"
7469	//   },
7470	//   "scopes": [
7471	//     "https://www.googleapis.com/auth/games",
7472	//     "https://www.googleapis.com/auth/plus.login"
7473	//   ]
7474	// }
7475
7476}
7477
7478// method id "games.metagame.listCategoriesByPlayer":
7479
7480type MetagameListCategoriesByPlayerCall struct {
7481	s            *Service
7482	playerId     string
7483	collection   string
7484	urlParams_   gensupport.URLParams
7485	ifNoneMatch_ string
7486	ctx_         context.Context
7487	header_      http.Header
7488}
7489
7490// ListCategoriesByPlayer: List play data aggregated per category for
7491// the player corresponding to playerId.
7492func (r *MetagameService) ListCategoriesByPlayer(playerId string, collection string) *MetagameListCategoriesByPlayerCall {
7493	c := &MetagameListCategoriesByPlayerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7494	c.playerId = playerId
7495	c.collection = collection
7496	return c
7497}
7498
7499// Language sets the optional parameter "language": The preferred
7500// language to use for strings returned by this method.
7501func (c *MetagameListCategoriesByPlayerCall) Language(language string) *MetagameListCategoriesByPlayerCall {
7502	c.urlParams_.Set("language", language)
7503	return c
7504}
7505
7506// MaxResults sets the optional parameter "maxResults": The maximum
7507// number of category resources to return in the response, used for
7508// paging. For any response, the actual number of category resources
7509// returned may be less than the specified maxResults.
7510func (c *MetagameListCategoriesByPlayerCall) MaxResults(maxResults int64) *MetagameListCategoriesByPlayerCall {
7511	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7512	return c
7513}
7514
7515// PageToken sets the optional parameter "pageToken": The token returned
7516// by the previous request.
7517func (c *MetagameListCategoriesByPlayerCall) PageToken(pageToken string) *MetagameListCategoriesByPlayerCall {
7518	c.urlParams_.Set("pageToken", pageToken)
7519	return c
7520}
7521
7522// Fields allows partial responses to be retrieved. See
7523// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7524// for more information.
7525func (c *MetagameListCategoriesByPlayerCall) Fields(s ...googleapi.Field) *MetagameListCategoriesByPlayerCall {
7526	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7527	return c
7528}
7529
7530// IfNoneMatch sets the optional parameter which makes the operation
7531// fail if the object's ETag matches the given value. This is useful for
7532// getting updates only after the object has changed since the last
7533// request. Use googleapi.IsNotModified to check whether the response
7534// error from Do is the result of In-None-Match.
7535func (c *MetagameListCategoriesByPlayerCall) IfNoneMatch(entityTag string) *MetagameListCategoriesByPlayerCall {
7536	c.ifNoneMatch_ = entityTag
7537	return c
7538}
7539
7540// Context sets the context to be used in this call's Do method. Any
7541// pending HTTP request will be aborted if the provided context is
7542// canceled.
7543func (c *MetagameListCategoriesByPlayerCall) Context(ctx context.Context) *MetagameListCategoriesByPlayerCall {
7544	c.ctx_ = ctx
7545	return c
7546}
7547
7548// Header returns an http.Header that can be modified by the caller to
7549// add HTTP headers to the request.
7550func (c *MetagameListCategoriesByPlayerCall) Header() http.Header {
7551	if c.header_ == nil {
7552		c.header_ = make(http.Header)
7553	}
7554	return c.header_
7555}
7556
7557func (c *MetagameListCategoriesByPlayerCall) doRequest(alt string) (*http.Response, error) {
7558	reqHeaders := make(http.Header)
7559	for k, v := range c.header_ {
7560		reqHeaders[k] = v
7561	}
7562	reqHeaders.Set("User-Agent", c.s.userAgent())
7563	if c.ifNoneMatch_ != "" {
7564		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7565	}
7566	var body io.Reader = nil
7567	c.urlParams_.Set("alt", alt)
7568	urls := googleapi.ResolveRelative(c.s.BasePath, "players/{playerId}/categories/{collection}")
7569	urls += "?" + c.urlParams_.Encode()
7570	req, _ := http.NewRequest("GET", urls, body)
7571	req.Header = reqHeaders
7572	googleapi.Expand(req.URL, map[string]string{
7573		"playerId":   c.playerId,
7574		"collection": c.collection,
7575	})
7576	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7577}
7578
7579// Do executes the "games.metagame.listCategoriesByPlayer" call.
7580// Exactly one of *CategoryListResponse or error will be non-nil. Any
7581// non-2xx status code is an error. Response headers are in either
7582// *CategoryListResponse.ServerResponse.Header or (if a response was
7583// returned at all) in error.(*googleapi.Error).Header. Use
7584// googleapi.IsNotModified to check whether the returned error was
7585// because http.StatusNotModified was returned.
7586func (c *MetagameListCategoriesByPlayerCall) Do(opts ...googleapi.CallOption) (*CategoryListResponse, error) {
7587	gensupport.SetOptions(c.urlParams_, opts...)
7588	res, err := c.doRequest("json")
7589	if res != nil && res.StatusCode == http.StatusNotModified {
7590		if res.Body != nil {
7591			res.Body.Close()
7592		}
7593		return nil, &googleapi.Error{
7594			Code:   res.StatusCode,
7595			Header: res.Header,
7596		}
7597	}
7598	if err != nil {
7599		return nil, err
7600	}
7601	defer googleapi.CloseBody(res)
7602	if err := googleapi.CheckResponse(res); err != nil {
7603		return nil, err
7604	}
7605	ret := &CategoryListResponse{
7606		ServerResponse: googleapi.ServerResponse{
7607			Header:         res.Header,
7608			HTTPStatusCode: res.StatusCode,
7609		},
7610	}
7611	target := &ret
7612	if err := gensupport.DecodeResponse(target, res); err != nil {
7613		return nil, err
7614	}
7615	return ret, nil
7616	// {
7617	//   "description": "List play data aggregated per category for the player corresponding to playerId.",
7618	//   "httpMethod": "GET",
7619	//   "id": "games.metagame.listCategoriesByPlayer",
7620	//   "parameterOrder": [
7621	//     "playerId",
7622	//     "collection"
7623	//   ],
7624	//   "parameters": {
7625	//     "collection": {
7626	//       "description": "The collection of categories for which data will be returned.",
7627	//       "enum": [
7628	//         "all"
7629	//       ],
7630	//       "enumDescriptions": [
7631	//         "Retrieve data for all categories. This is the default."
7632	//       ],
7633	//       "location": "path",
7634	//       "required": true,
7635	//       "type": "string"
7636	//     },
7637	//     "language": {
7638	//       "description": "The preferred language to use for strings returned by this method.",
7639	//       "location": "query",
7640	//       "type": "string"
7641	//     },
7642	//     "maxResults": {
7643	//       "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.",
7644	//       "format": "int32",
7645	//       "location": "query",
7646	//       "maximum": "100",
7647	//       "minimum": "1",
7648	//       "type": "integer"
7649	//     },
7650	//     "pageToken": {
7651	//       "description": "The token returned by the previous request.",
7652	//       "location": "query",
7653	//       "type": "string"
7654	//     },
7655	//     "playerId": {
7656	//       "description": "A player ID. A value of me may be used in place of the authenticated player's ID.",
7657	//       "location": "path",
7658	//       "required": true,
7659	//       "type": "string"
7660	//     }
7661	//   },
7662	//   "path": "players/{playerId}/categories/{collection}",
7663	//   "response": {
7664	//     "$ref": "CategoryListResponse"
7665	//   },
7666	//   "scopes": [
7667	//     "https://www.googleapis.com/auth/games",
7668	//     "https://www.googleapis.com/auth/plus.login"
7669	//   ]
7670	// }
7671
7672}
7673
7674// Pages invokes f for each page of results.
7675// A non-nil error returned from f will halt the iteration.
7676// The provided context supersedes any context provided to the Context method.
7677func (c *MetagameListCategoriesByPlayerCall) Pages(ctx context.Context, f func(*CategoryListResponse) error) error {
7678	c.ctx_ = ctx
7679	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7680	for {
7681		x, err := c.Do()
7682		if err != nil {
7683			return err
7684		}
7685		if err := f(x); err != nil {
7686			return err
7687		}
7688		if x.NextPageToken == "" {
7689			return nil
7690		}
7691		c.PageToken(x.NextPageToken)
7692	}
7693}
7694
7695// method id "games.players.get":
7696
7697type PlayersGetCall struct {
7698	s            *Service
7699	playerId     string
7700	urlParams_   gensupport.URLParams
7701	ifNoneMatch_ string
7702	ctx_         context.Context
7703	header_      http.Header
7704}
7705
7706// Get: Retrieves the Player resource with the given ID. To retrieve the
7707// player for the currently authenticated user, set playerId to me.
7708func (r *PlayersService) Get(playerId string) *PlayersGetCall {
7709	c := &PlayersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7710	c.playerId = playerId
7711	return c
7712}
7713
7714// Language sets the optional parameter "language": The preferred
7715// language to use for strings returned by this method.
7716func (c *PlayersGetCall) Language(language string) *PlayersGetCall {
7717	c.urlParams_.Set("language", language)
7718	return c
7719}
7720
7721// Fields allows partial responses to be retrieved. See
7722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7723// for more information.
7724func (c *PlayersGetCall) Fields(s ...googleapi.Field) *PlayersGetCall {
7725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7726	return c
7727}
7728
7729// IfNoneMatch sets the optional parameter which makes the operation
7730// fail if the object's ETag matches the given value. This is useful for
7731// getting updates only after the object has changed since the last
7732// request. Use googleapi.IsNotModified to check whether the response
7733// error from Do is the result of In-None-Match.
7734func (c *PlayersGetCall) IfNoneMatch(entityTag string) *PlayersGetCall {
7735	c.ifNoneMatch_ = entityTag
7736	return c
7737}
7738
7739// Context sets the context to be used in this call's Do method. Any
7740// pending HTTP request will be aborted if the provided context is
7741// canceled.
7742func (c *PlayersGetCall) Context(ctx context.Context) *PlayersGetCall {
7743	c.ctx_ = ctx
7744	return c
7745}
7746
7747// Header returns an http.Header that can be modified by the caller to
7748// add HTTP headers to the request.
7749func (c *PlayersGetCall) Header() http.Header {
7750	if c.header_ == nil {
7751		c.header_ = make(http.Header)
7752	}
7753	return c.header_
7754}
7755
7756func (c *PlayersGetCall) doRequest(alt string) (*http.Response, error) {
7757	reqHeaders := make(http.Header)
7758	for k, v := range c.header_ {
7759		reqHeaders[k] = v
7760	}
7761	reqHeaders.Set("User-Agent", c.s.userAgent())
7762	if c.ifNoneMatch_ != "" {
7763		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7764	}
7765	var body io.Reader = nil
7766	c.urlParams_.Set("alt", alt)
7767	urls := googleapi.ResolveRelative(c.s.BasePath, "players/{playerId}")
7768	urls += "?" + c.urlParams_.Encode()
7769	req, _ := http.NewRequest("GET", urls, body)
7770	req.Header = reqHeaders
7771	googleapi.Expand(req.URL, map[string]string{
7772		"playerId": c.playerId,
7773	})
7774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7775}
7776
7777// Do executes the "games.players.get" call.
7778// Exactly one of *Player or error will be non-nil. Any non-2xx status
7779// code is an error. Response headers are in either
7780// *Player.ServerResponse.Header or (if a response was returned at all)
7781// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7782// check whether the returned error was because http.StatusNotModified
7783// was returned.
7784func (c *PlayersGetCall) Do(opts ...googleapi.CallOption) (*Player, error) {
7785	gensupport.SetOptions(c.urlParams_, opts...)
7786	res, err := c.doRequest("json")
7787	if res != nil && res.StatusCode == http.StatusNotModified {
7788		if res.Body != nil {
7789			res.Body.Close()
7790		}
7791		return nil, &googleapi.Error{
7792			Code:   res.StatusCode,
7793			Header: res.Header,
7794		}
7795	}
7796	if err != nil {
7797		return nil, err
7798	}
7799	defer googleapi.CloseBody(res)
7800	if err := googleapi.CheckResponse(res); err != nil {
7801		return nil, err
7802	}
7803	ret := &Player{
7804		ServerResponse: googleapi.ServerResponse{
7805			Header:         res.Header,
7806			HTTPStatusCode: res.StatusCode,
7807		},
7808	}
7809	target := &ret
7810	if err := gensupport.DecodeResponse(target, res); err != nil {
7811		return nil, err
7812	}
7813	return ret, nil
7814	// {
7815	//   "description": "Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me.",
7816	//   "httpMethod": "GET",
7817	//   "id": "games.players.get",
7818	//   "parameterOrder": [
7819	//     "playerId"
7820	//   ],
7821	//   "parameters": {
7822	//     "language": {
7823	//       "description": "The preferred language to use for strings returned by this method.",
7824	//       "location": "query",
7825	//       "type": "string"
7826	//     },
7827	//     "playerId": {
7828	//       "description": "A player ID. A value of me may be used in place of the authenticated player's ID.",
7829	//       "location": "path",
7830	//       "required": true,
7831	//       "type": "string"
7832	//     }
7833	//   },
7834	//   "path": "players/{playerId}",
7835	//   "response": {
7836	//     "$ref": "Player"
7837	//   },
7838	//   "scopes": [
7839	//     "https://www.googleapis.com/auth/games",
7840	//     "https://www.googleapis.com/auth/plus.login"
7841	//   ]
7842	// }
7843
7844}
7845
7846// method id "games.players.list":
7847
7848type PlayersListCall struct {
7849	s            *Service
7850	collection   string
7851	urlParams_   gensupport.URLParams
7852	ifNoneMatch_ string
7853	ctx_         context.Context
7854	header_      http.Header
7855}
7856
7857// List: Get the collection of players for the currently authenticated
7858// user.
7859func (r *PlayersService) List(collection string) *PlayersListCall {
7860	c := &PlayersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7861	c.collection = collection
7862	return c
7863}
7864
7865// Language sets the optional parameter "language": The preferred
7866// language to use for strings returned by this method.
7867func (c *PlayersListCall) Language(language string) *PlayersListCall {
7868	c.urlParams_.Set("language", language)
7869	return c
7870}
7871
7872// MaxResults sets the optional parameter "maxResults": The maximum
7873// number of player resources to return in the response, used for
7874// paging. For any response, the actual number of player resources
7875// returned may be less than the specified maxResults.
7876func (c *PlayersListCall) MaxResults(maxResults int64) *PlayersListCall {
7877	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7878	return c
7879}
7880
7881// PageToken sets the optional parameter "pageToken": The token returned
7882// by the previous request.
7883func (c *PlayersListCall) PageToken(pageToken string) *PlayersListCall {
7884	c.urlParams_.Set("pageToken", pageToken)
7885	return c
7886}
7887
7888// Fields allows partial responses to be retrieved. See
7889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7890// for more information.
7891func (c *PlayersListCall) Fields(s ...googleapi.Field) *PlayersListCall {
7892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7893	return c
7894}
7895
7896// IfNoneMatch sets the optional parameter which makes the operation
7897// fail if the object's ETag matches the given value. This is useful for
7898// getting updates only after the object has changed since the last
7899// request. Use googleapi.IsNotModified to check whether the response
7900// error from Do is the result of In-None-Match.
7901func (c *PlayersListCall) IfNoneMatch(entityTag string) *PlayersListCall {
7902	c.ifNoneMatch_ = entityTag
7903	return c
7904}
7905
7906// Context sets the context to be used in this call's Do method. Any
7907// pending HTTP request will be aborted if the provided context is
7908// canceled.
7909func (c *PlayersListCall) Context(ctx context.Context) *PlayersListCall {
7910	c.ctx_ = ctx
7911	return c
7912}
7913
7914// Header returns an http.Header that can be modified by the caller to
7915// add HTTP headers to the request.
7916func (c *PlayersListCall) Header() http.Header {
7917	if c.header_ == nil {
7918		c.header_ = make(http.Header)
7919	}
7920	return c.header_
7921}
7922
7923func (c *PlayersListCall) doRequest(alt string) (*http.Response, error) {
7924	reqHeaders := make(http.Header)
7925	for k, v := range c.header_ {
7926		reqHeaders[k] = v
7927	}
7928	reqHeaders.Set("User-Agent", c.s.userAgent())
7929	if c.ifNoneMatch_ != "" {
7930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7931	}
7932	var body io.Reader = nil
7933	c.urlParams_.Set("alt", alt)
7934	urls := googleapi.ResolveRelative(c.s.BasePath, "players/me/players/{collection}")
7935	urls += "?" + c.urlParams_.Encode()
7936	req, _ := http.NewRequest("GET", urls, body)
7937	req.Header = reqHeaders
7938	googleapi.Expand(req.URL, map[string]string{
7939		"collection": c.collection,
7940	})
7941	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7942}
7943
7944// Do executes the "games.players.list" call.
7945// Exactly one of *PlayerListResponse or error will be non-nil. Any
7946// non-2xx status code is an error. Response headers are in either
7947// *PlayerListResponse.ServerResponse.Header or (if a response was
7948// returned at all) in error.(*googleapi.Error).Header. Use
7949// googleapi.IsNotModified to check whether the returned error was
7950// because http.StatusNotModified was returned.
7951func (c *PlayersListCall) Do(opts ...googleapi.CallOption) (*PlayerListResponse, error) {
7952	gensupport.SetOptions(c.urlParams_, opts...)
7953	res, err := c.doRequest("json")
7954	if res != nil && res.StatusCode == http.StatusNotModified {
7955		if res.Body != nil {
7956			res.Body.Close()
7957		}
7958		return nil, &googleapi.Error{
7959			Code:   res.StatusCode,
7960			Header: res.Header,
7961		}
7962	}
7963	if err != nil {
7964		return nil, err
7965	}
7966	defer googleapi.CloseBody(res)
7967	if err := googleapi.CheckResponse(res); err != nil {
7968		return nil, err
7969	}
7970	ret := &PlayerListResponse{
7971		ServerResponse: googleapi.ServerResponse{
7972			Header:         res.Header,
7973			HTTPStatusCode: res.StatusCode,
7974		},
7975	}
7976	target := &ret
7977	if err := gensupport.DecodeResponse(target, res); err != nil {
7978		return nil, err
7979	}
7980	return ret, nil
7981	// {
7982	//   "description": "Get the collection of players for the currently authenticated user.",
7983	//   "httpMethod": "GET",
7984	//   "id": "games.players.list",
7985	//   "parameterOrder": [
7986	//     "collection"
7987	//   ],
7988	//   "parameters": {
7989	//     "collection": {
7990	//       "description": "Collection of players being retrieved",
7991	//       "enum": [
7992	//         "connected",
7993	//         "playedWith",
7994	//         "played_with",
7995	//         "visible"
7996	//       ],
7997	//       "enumDescriptions": [
7998	//         "Retrieve a list of players that are also playing this game in reverse chronological order.",
7999	//         "(DEPRECATED: please use played_with!) Retrieve a list of players you have played a multiplayer game (realtime or turn-based) with recently.",
8000	//         "Retrieve a list of players you have played a multiplayer game (realtime or turn-based) with recently.",
8001	//         "Retrieve a list of players in the user's social graph that are visible to this game."
8002	//       ],
8003	//       "location": "path",
8004	//       "required": true,
8005	//       "type": "string"
8006	//     },
8007	//     "language": {
8008	//       "description": "The preferred language to use for strings returned by this method.",
8009	//       "location": "query",
8010	//       "type": "string"
8011	//     },
8012	//     "maxResults": {
8013	//       "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.",
8014	//       "format": "int32",
8015	//       "location": "query",
8016	//       "maximum": "50",
8017	//       "minimum": "1",
8018	//       "type": "integer"
8019	//     },
8020	//     "pageToken": {
8021	//       "description": "The token returned by the previous request.",
8022	//       "location": "query",
8023	//       "type": "string"
8024	//     }
8025	//   },
8026	//   "path": "players/me/players/{collection}",
8027	//   "response": {
8028	//     "$ref": "PlayerListResponse"
8029	//   },
8030	//   "scopes": [
8031	//     "https://www.googleapis.com/auth/games",
8032	//     "https://www.googleapis.com/auth/plus.login"
8033	//   ]
8034	// }
8035
8036}
8037
8038// Pages invokes f for each page of results.
8039// A non-nil error returned from f will halt the iteration.
8040// The provided context supersedes any context provided to the Context method.
8041func (c *PlayersListCall) Pages(ctx context.Context, f func(*PlayerListResponse) error) error {
8042	c.ctx_ = ctx
8043	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8044	for {
8045		x, err := c.Do()
8046		if err != nil {
8047			return err
8048		}
8049		if err := f(x); err != nil {
8050			return err
8051		}
8052		if x.NextPageToken == "" {
8053			return nil
8054		}
8055		c.PageToken(x.NextPageToken)
8056	}
8057}
8058
8059// method id "games.pushtokens.remove":
8060
8061type PushtokensRemoveCall struct {
8062	s           *Service
8063	pushtokenid *PushTokenId
8064	urlParams_  gensupport.URLParams
8065	ctx_        context.Context
8066	header_     http.Header
8067}
8068
8069// Remove: Removes a push token for the current user and application.
8070// Removing a non-existent push token will report success.
8071func (r *PushtokensService) Remove(pushtokenid *PushTokenId) *PushtokensRemoveCall {
8072	c := &PushtokensRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8073	c.pushtokenid = pushtokenid
8074	return c
8075}
8076
8077// Fields allows partial responses to be retrieved. See
8078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8079// for more information.
8080func (c *PushtokensRemoveCall) Fields(s ...googleapi.Field) *PushtokensRemoveCall {
8081	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8082	return c
8083}
8084
8085// Context sets the context to be used in this call's Do method. Any
8086// pending HTTP request will be aborted if the provided context is
8087// canceled.
8088func (c *PushtokensRemoveCall) Context(ctx context.Context) *PushtokensRemoveCall {
8089	c.ctx_ = ctx
8090	return c
8091}
8092
8093// Header returns an http.Header that can be modified by the caller to
8094// add HTTP headers to the request.
8095func (c *PushtokensRemoveCall) Header() http.Header {
8096	if c.header_ == nil {
8097		c.header_ = make(http.Header)
8098	}
8099	return c.header_
8100}
8101
8102func (c *PushtokensRemoveCall) doRequest(alt string) (*http.Response, error) {
8103	reqHeaders := make(http.Header)
8104	for k, v := range c.header_ {
8105		reqHeaders[k] = v
8106	}
8107	reqHeaders.Set("User-Agent", c.s.userAgent())
8108	var body io.Reader = nil
8109	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pushtokenid)
8110	if err != nil {
8111		return nil, err
8112	}
8113	reqHeaders.Set("Content-Type", "application/json")
8114	c.urlParams_.Set("alt", alt)
8115	urls := googleapi.ResolveRelative(c.s.BasePath, "pushtokens/remove")
8116	urls += "?" + c.urlParams_.Encode()
8117	req, _ := http.NewRequest("POST", urls, body)
8118	req.Header = reqHeaders
8119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8120}
8121
8122// Do executes the "games.pushtokens.remove" call.
8123func (c *PushtokensRemoveCall) Do(opts ...googleapi.CallOption) error {
8124	gensupport.SetOptions(c.urlParams_, opts...)
8125	res, err := c.doRequest("json")
8126	if err != nil {
8127		return err
8128	}
8129	defer googleapi.CloseBody(res)
8130	if err := googleapi.CheckResponse(res); err != nil {
8131		return err
8132	}
8133	return nil
8134	// {
8135	//   "description": "Removes a push token for the current user and application. Removing a non-existent push token will report success.",
8136	//   "httpMethod": "POST",
8137	//   "id": "games.pushtokens.remove",
8138	//   "path": "pushtokens/remove",
8139	//   "request": {
8140	//     "$ref": "PushTokenId"
8141	//   },
8142	//   "scopes": [
8143	//     "https://www.googleapis.com/auth/games",
8144	//     "https://www.googleapis.com/auth/plus.login"
8145	//   ]
8146	// }
8147
8148}
8149
8150// method id "games.pushtokens.update":
8151
8152type PushtokensUpdateCall struct {
8153	s          *Service
8154	pushtoken  *PushToken
8155	urlParams_ gensupport.URLParams
8156	ctx_       context.Context
8157	header_    http.Header
8158}
8159
8160// Update: Registers a push token for the current user and application.
8161func (r *PushtokensService) Update(pushtoken *PushToken) *PushtokensUpdateCall {
8162	c := &PushtokensUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8163	c.pushtoken = pushtoken
8164	return c
8165}
8166
8167// Fields allows partial responses to be retrieved. See
8168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8169// for more information.
8170func (c *PushtokensUpdateCall) Fields(s ...googleapi.Field) *PushtokensUpdateCall {
8171	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8172	return c
8173}
8174
8175// Context sets the context to be used in this call's Do method. Any
8176// pending HTTP request will be aborted if the provided context is
8177// canceled.
8178func (c *PushtokensUpdateCall) Context(ctx context.Context) *PushtokensUpdateCall {
8179	c.ctx_ = ctx
8180	return c
8181}
8182
8183// Header returns an http.Header that can be modified by the caller to
8184// add HTTP headers to the request.
8185func (c *PushtokensUpdateCall) Header() http.Header {
8186	if c.header_ == nil {
8187		c.header_ = make(http.Header)
8188	}
8189	return c.header_
8190}
8191
8192func (c *PushtokensUpdateCall) doRequest(alt string) (*http.Response, error) {
8193	reqHeaders := make(http.Header)
8194	for k, v := range c.header_ {
8195		reqHeaders[k] = v
8196	}
8197	reqHeaders.Set("User-Agent", c.s.userAgent())
8198	var body io.Reader = nil
8199	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pushtoken)
8200	if err != nil {
8201		return nil, err
8202	}
8203	reqHeaders.Set("Content-Type", "application/json")
8204	c.urlParams_.Set("alt", alt)
8205	urls := googleapi.ResolveRelative(c.s.BasePath, "pushtokens")
8206	urls += "?" + c.urlParams_.Encode()
8207	req, _ := http.NewRequest("PUT", urls, body)
8208	req.Header = reqHeaders
8209	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8210}
8211
8212// Do executes the "games.pushtokens.update" call.
8213func (c *PushtokensUpdateCall) Do(opts ...googleapi.CallOption) error {
8214	gensupport.SetOptions(c.urlParams_, opts...)
8215	res, err := c.doRequest("json")
8216	if err != nil {
8217		return err
8218	}
8219	defer googleapi.CloseBody(res)
8220	if err := googleapi.CheckResponse(res); err != nil {
8221		return err
8222	}
8223	return nil
8224	// {
8225	//   "description": "Registers a push token for the current user and application.",
8226	//   "httpMethod": "PUT",
8227	//   "id": "games.pushtokens.update",
8228	//   "path": "pushtokens",
8229	//   "request": {
8230	//     "$ref": "PushToken"
8231	//   },
8232	//   "scopes": [
8233	//     "https://www.googleapis.com/auth/games",
8234	//     "https://www.googleapis.com/auth/plus.login"
8235	//   ]
8236	// }
8237
8238}
8239
8240// method id "games.questMilestones.claim":
8241
8242type QuestMilestonesClaimCall struct {
8243	s           *Service
8244	questId     string
8245	milestoneId string
8246	urlParams_  gensupport.URLParams
8247	ctx_        context.Context
8248	header_     http.Header
8249}
8250
8251// Claim: Report that a reward for the milestone corresponding to
8252// milestoneId for the quest corresponding to questId has been claimed
8253// by the currently authorized user.
8254func (r *QuestMilestonesService) Claim(questId string, milestoneId string, requestId int64) *QuestMilestonesClaimCall {
8255	c := &QuestMilestonesClaimCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8256	c.questId = questId
8257	c.milestoneId = milestoneId
8258	c.urlParams_.Set("requestId", fmt.Sprint(requestId))
8259	return c
8260}
8261
8262// Fields allows partial responses to be retrieved. See
8263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8264// for more information.
8265func (c *QuestMilestonesClaimCall) Fields(s ...googleapi.Field) *QuestMilestonesClaimCall {
8266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8267	return c
8268}
8269
8270// Context sets the context to be used in this call's Do method. Any
8271// pending HTTP request will be aborted if the provided context is
8272// canceled.
8273func (c *QuestMilestonesClaimCall) Context(ctx context.Context) *QuestMilestonesClaimCall {
8274	c.ctx_ = ctx
8275	return c
8276}
8277
8278// Header returns an http.Header that can be modified by the caller to
8279// add HTTP headers to the request.
8280func (c *QuestMilestonesClaimCall) Header() http.Header {
8281	if c.header_ == nil {
8282		c.header_ = make(http.Header)
8283	}
8284	return c.header_
8285}
8286
8287func (c *QuestMilestonesClaimCall) doRequest(alt string) (*http.Response, error) {
8288	reqHeaders := make(http.Header)
8289	for k, v := range c.header_ {
8290		reqHeaders[k] = v
8291	}
8292	reqHeaders.Set("User-Agent", c.s.userAgent())
8293	var body io.Reader = nil
8294	c.urlParams_.Set("alt", alt)
8295	urls := googleapi.ResolveRelative(c.s.BasePath, "quests/{questId}/milestones/{milestoneId}/claim")
8296	urls += "?" + c.urlParams_.Encode()
8297	req, _ := http.NewRequest("PUT", urls, body)
8298	req.Header = reqHeaders
8299	googleapi.Expand(req.URL, map[string]string{
8300		"questId":     c.questId,
8301		"milestoneId": c.milestoneId,
8302	})
8303	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8304}
8305
8306// Do executes the "games.questMilestones.claim" call.
8307func (c *QuestMilestonesClaimCall) Do(opts ...googleapi.CallOption) error {
8308	gensupport.SetOptions(c.urlParams_, opts...)
8309	res, err := c.doRequest("json")
8310	if err != nil {
8311		return err
8312	}
8313	defer googleapi.CloseBody(res)
8314	if err := googleapi.CheckResponse(res); err != nil {
8315		return err
8316	}
8317	return nil
8318	// {
8319	//   "description": "Report that a reward for the milestone corresponding to milestoneId for the quest corresponding to questId has been claimed by the currently authorized user.",
8320	//   "httpMethod": "PUT",
8321	//   "id": "games.questMilestones.claim",
8322	//   "parameterOrder": [
8323	//     "questId",
8324	//     "milestoneId",
8325	//     "requestId"
8326	//   ],
8327	//   "parameters": {
8328	//     "milestoneId": {
8329	//       "description": "The ID of the milestone.",
8330	//       "location": "path",
8331	//       "required": true,
8332	//       "type": "string"
8333	//     },
8334	//     "questId": {
8335	//       "description": "The ID of the quest.",
8336	//       "location": "path",
8337	//       "required": true,
8338	//       "type": "string"
8339	//     },
8340	//     "requestId": {
8341	//       "description": "A numeric ID to ensure that the request is handled correctly across retries. Your client application must generate this ID randomly.",
8342	//       "format": "int64",
8343	//       "location": "query",
8344	//       "required": true,
8345	//       "type": "string"
8346	//     }
8347	//   },
8348	//   "path": "quests/{questId}/milestones/{milestoneId}/claim",
8349	//   "scopes": [
8350	//     "https://www.googleapis.com/auth/games",
8351	//     "https://www.googleapis.com/auth/plus.login"
8352	//   ]
8353	// }
8354
8355}
8356
8357// method id "games.quests.accept":
8358
8359type QuestsAcceptCall struct {
8360	s          *Service
8361	questId    string
8362	urlParams_ gensupport.URLParams
8363	ctx_       context.Context
8364	header_    http.Header
8365}
8366
8367// Accept: Indicates that the currently authorized user will participate
8368// in the quest.
8369func (r *QuestsService) Accept(questId string) *QuestsAcceptCall {
8370	c := &QuestsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8371	c.questId = questId
8372	return c
8373}
8374
8375// Language sets the optional parameter "language": The preferred
8376// language to use for strings returned by this method.
8377func (c *QuestsAcceptCall) Language(language string) *QuestsAcceptCall {
8378	c.urlParams_.Set("language", language)
8379	return c
8380}
8381
8382// Fields allows partial responses to be retrieved. See
8383// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8384// for more information.
8385func (c *QuestsAcceptCall) Fields(s ...googleapi.Field) *QuestsAcceptCall {
8386	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8387	return c
8388}
8389
8390// Context sets the context to be used in this call's Do method. Any
8391// pending HTTP request will be aborted if the provided context is
8392// canceled.
8393func (c *QuestsAcceptCall) Context(ctx context.Context) *QuestsAcceptCall {
8394	c.ctx_ = ctx
8395	return c
8396}
8397
8398// Header returns an http.Header that can be modified by the caller to
8399// add HTTP headers to the request.
8400func (c *QuestsAcceptCall) Header() http.Header {
8401	if c.header_ == nil {
8402		c.header_ = make(http.Header)
8403	}
8404	return c.header_
8405}
8406
8407func (c *QuestsAcceptCall) doRequest(alt string) (*http.Response, error) {
8408	reqHeaders := make(http.Header)
8409	for k, v := range c.header_ {
8410		reqHeaders[k] = v
8411	}
8412	reqHeaders.Set("User-Agent", c.s.userAgent())
8413	var body io.Reader = nil
8414	c.urlParams_.Set("alt", alt)
8415	urls := googleapi.ResolveRelative(c.s.BasePath, "quests/{questId}/accept")
8416	urls += "?" + c.urlParams_.Encode()
8417	req, _ := http.NewRequest("POST", urls, body)
8418	req.Header = reqHeaders
8419	googleapi.Expand(req.URL, map[string]string{
8420		"questId": c.questId,
8421	})
8422	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8423}
8424
8425// Do executes the "games.quests.accept" call.
8426// Exactly one of *Quest or error will be non-nil. Any non-2xx status
8427// code is an error. Response headers are in either
8428// *Quest.ServerResponse.Header or (if a response was returned at all)
8429// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8430// check whether the returned error was because http.StatusNotModified
8431// was returned.
8432func (c *QuestsAcceptCall) Do(opts ...googleapi.CallOption) (*Quest, error) {
8433	gensupport.SetOptions(c.urlParams_, opts...)
8434	res, err := c.doRequest("json")
8435	if res != nil && res.StatusCode == http.StatusNotModified {
8436		if res.Body != nil {
8437			res.Body.Close()
8438		}
8439		return nil, &googleapi.Error{
8440			Code:   res.StatusCode,
8441			Header: res.Header,
8442		}
8443	}
8444	if err != nil {
8445		return nil, err
8446	}
8447	defer googleapi.CloseBody(res)
8448	if err := googleapi.CheckResponse(res); err != nil {
8449		return nil, err
8450	}
8451	ret := &Quest{
8452		ServerResponse: googleapi.ServerResponse{
8453			Header:         res.Header,
8454			HTTPStatusCode: res.StatusCode,
8455		},
8456	}
8457	target := &ret
8458	if err := gensupport.DecodeResponse(target, res); err != nil {
8459		return nil, err
8460	}
8461	return ret, nil
8462	// {
8463	//   "description": "Indicates that the currently authorized user will participate in the quest.",
8464	//   "httpMethod": "POST",
8465	//   "id": "games.quests.accept",
8466	//   "parameterOrder": [
8467	//     "questId"
8468	//   ],
8469	//   "parameters": {
8470	//     "language": {
8471	//       "description": "The preferred language to use for strings returned by this method.",
8472	//       "location": "query",
8473	//       "type": "string"
8474	//     },
8475	//     "questId": {
8476	//       "description": "The ID of the quest.",
8477	//       "location": "path",
8478	//       "required": true,
8479	//       "type": "string"
8480	//     }
8481	//   },
8482	//   "path": "quests/{questId}/accept",
8483	//   "response": {
8484	//     "$ref": "Quest"
8485	//   },
8486	//   "scopes": [
8487	//     "https://www.googleapis.com/auth/games",
8488	//     "https://www.googleapis.com/auth/plus.login"
8489	//   ]
8490	// }
8491
8492}
8493
8494// method id "games.quests.list":
8495
8496type QuestsListCall struct {
8497	s            *Service
8498	playerId     string
8499	urlParams_   gensupport.URLParams
8500	ifNoneMatch_ string
8501	ctx_         context.Context
8502	header_      http.Header
8503}
8504
8505// List: Get a list of quests for your application and the currently
8506// authenticated player.
8507func (r *QuestsService) List(playerId string) *QuestsListCall {
8508	c := &QuestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8509	c.playerId = playerId
8510	return c
8511}
8512
8513// Language sets the optional parameter "language": The preferred
8514// language to use for strings returned by this method.
8515func (c *QuestsListCall) Language(language string) *QuestsListCall {
8516	c.urlParams_.Set("language", language)
8517	return c
8518}
8519
8520// MaxResults sets the optional parameter "maxResults": The maximum
8521// number of quest resources to return in the response, used for paging.
8522// For any response, the actual number of quest resources returned may
8523// be less than the specified maxResults. Acceptable values are 1 to 50,
8524// inclusive. (Default: 50).
8525func (c *QuestsListCall) MaxResults(maxResults int64) *QuestsListCall {
8526	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8527	return c
8528}
8529
8530// PageToken sets the optional parameter "pageToken": The token returned
8531// by the previous request.
8532func (c *QuestsListCall) PageToken(pageToken string) *QuestsListCall {
8533	c.urlParams_.Set("pageToken", pageToken)
8534	return c
8535}
8536
8537// Fields allows partial responses to be retrieved. See
8538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8539// for more information.
8540func (c *QuestsListCall) Fields(s ...googleapi.Field) *QuestsListCall {
8541	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8542	return c
8543}
8544
8545// IfNoneMatch sets the optional parameter which makes the operation
8546// fail if the object's ETag matches the given value. This is useful for
8547// getting updates only after the object has changed since the last
8548// request. Use googleapi.IsNotModified to check whether the response
8549// error from Do is the result of In-None-Match.
8550func (c *QuestsListCall) IfNoneMatch(entityTag string) *QuestsListCall {
8551	c.ifNoneMatch_ = entityTag
8552	return c
8553}
8554
8555// Context sets the context to be used in this call's Do method. Any
8556// pending HTTP request will be aborted if the provided context is
8557// canceled.
8558func (c *QuestsListCall) Context(ctx context.Context) *QuestsListCall {
8559	c.ctx_ = ctx
8560	return c
8561}
8562
8563// Header returns an http.Header that can be modified by the caller to
8564// add HTTP headers to the request.
8565func (c *QuestsListCall) Header() http.Header {
8566	if c.header_ == nil {
8567		c.header_ = make(http.Header)
8568	}
8569	return c.header_
8570}
8571
8572func (c *QuestsListCall) doRequest(alt string) (*http.Response, error) {
8573	reqHeaders := make(http.Header)
8574	for k, v := range c.header_ {
8575		reqHeaders[k] = v
8576	}
8577	reqHeaders.Set("User-Agent", c.s.userAgent())
8578	if c.ifNoneMatch_ != "" {
8579		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8580	}
8581	var body io.Reader = nil
8582	c.urlParams_.Set("alt", alt)
8583	urls := googleapi.ResolveRelative(c.s.BasePath, "players/{playerId}/quests")
8584	urls += "?" + c.urlParams_.Encode()
8585	req, _ := http.NewRequest("GET", urls, body)
8586	req.Header = reqHeaders
8587	googleapi.Expand(req.URL, map[string]string{
8588		"playerId": c.playerId,
8589	})
8590	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8591}
8592
8593// Do executes the "games.quests.list" call.
8594// Exactly one of *QuestListResponse or error will be non-nil. Any
8595// non-2xx status code is an error. Response headers are in either
8596// *QuestListResponse.ServerResponse.Header or (if a response was
8597// returned at all) in error.(*googleapi.Error).Header. Use
8598// googleapi.IsNotModified to check whether the returned error was
8599// because http.StatusNotModified was returned.
8600func (c *QuestsListCall) Do(opts ...googleapi.CallOption) (*QuestListResponse, error) {
8601	gensupport.SetOptions(c.urlParams_, opts...)
8602	res, err := c.doRequest("json")
8603	if res != nil && res.StatusCode == http.StatusNotModified {
8604		if res.Body != nil {
8605			res.Body.Close()
8606		}
8607		return nil, &googleapi.Error{
8608			Code:   res.StatusCode,
8609			Header: res.Header,
8610		}
8611	}
8612	if err != nil {
8613		return nil, err
8614	}
8615	defer googleapi.CloseBody(res)
8616	if err := googleapi.CheckResponse(res); err != nil {
8617		return nil, err
8618	}
8619	ret := &QuestListResponse{
8620		ServerResponse: googleapi.ServerResponse{
8621			Header:         res.Header,
8622			HTTPStatusCode: res.StatusCode,
8623		},
8624	}
8625	target := &ret
8626	if err := gensupport.DecodeResponse(target, res); err != nil {
8627		return nil, err
8628	}
8629	return ret, nil
8630	// {
8631	//   "description": "Get a list of quests for your application and the currently authenticated player.",
8632	//   "httpMethod": "GET",
8633	//   "id": "games.quests.list",
8634	//   "parameterOrder": [
8635	//     "playerId"
8636	//   ],
8637	//   "parameters": {
8638	//     "language": {
8639	//       "description": "The preferred language to use for strings returned by this method.",
8640	//       "location": "query",
8641	//       "type": "string"
8642	//     },
8643	//     "maxResults": {
8644	//       "description": "The maximum number of quest resources to return in the response, used for paging. For any response, the actual number of quest resources returned may be less than the specified maxResults. Acceptable values are 1 to 50, inclusive. (Default: 50).",
8645	//       "format": "int32",
8646	//       "location": "query",
8647	//       "maximum": "50",
8648	//       "minimum": "1",
8649	//       "type": "integer"
8650	//     },
8651	//     "pageToken": {
8652	//       "description": "The token returned by the previous request.",
8653	//       "location": "query",
8654	//       "type": "string"
8655	//     },
8656	//     "playerId": {
8657	//       "description": "A player ID. A value of me may be used in place of the authenticated player's ID.",
8658	//       "location": "path",
8659	//       "required": true,
8660	//       "type": "string"
8661	//     }
8662	//   },
8663	//   "path": "players/{playerId}/quests",
8664	//   "response": {
8665	//     "$ref": "QuestListResponse"
8666	//   },
8667	//   "scopes": [
8668	//     "https://www.googleapis.com/auth/games",
8669	//     "https://www.googleapis.com/auth/plus.login"
8670	//   ]
8671	// }
8672
8673}
8674
8675// Pages invokes f for each page of results.
8676// A non-nil error returned from f will halt the iteration.
8677// The provided context supersedes any context provided to the Context method.
8678func (c *QuestsListCall) Pages(ctx context.Context, f func(*QuestListResponse) error) error {
8679	c.ctx_ = ctx
8680	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8681	for {
8682		x, err := c.Do()
8683		if err != nil {
8684			return err
8685		}
8686		if err := f(x); err != nil {
8687			return err
8688		}
8689		if x.NextPageToken == "" {
8690			return nil
8691		}
8692		c.PageToken(x.NextPageToken)
8693	}
8694}
8695
8696// method id "games.revisions.check":
8697
8698type RevisionsCheckCall struct {
8699	s            *Service
8700	urlParams_   gensupport.URLParams
8701	ifNoneMatch_ string
8702	ctx_         context.Context
8703	header_      http.Header
8704}
8705
8706// Check: Checks whether the games client is out of date.
8707func (r *RevisionsService) Check(clientRevision string) *RevisionsCheckCall {
8708	c := &RevisionsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8709	c.urlParams_.Set("clientRevision", clientRevision)
8710	return c
8711}
8712
8713// Fields allows partial responses to be retrieved. See
8714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8715// for more information.
8716func (c *RevisionsCheckCall) Fields(s ...googleapi.Field) *RevisionsCheckCall {
8717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8718	return c
8719}
8720
8721// IfNoneMatch sets the optional parameter which makes the operation
8722// fail if the object's ETag matches the given value. This is useful for
8723// getting updates only after the object has changed since the last
8724// request. Use googleapi.IsNotModified to check whether the response
8725// error from Do is the result of In-None-Match.
8726func (c *RevisionsCheckCall) IfNoneMatch(entityTag string) *RevisionsCheckCall {
8727	c.ifNoneMatch_ = entityTag
8728	return c
8729}
8730
8731// Context sets the context to be used in this call's Do method. Any
8732// pending HTTP request will be aborted if the provided context is
8733// canceled.
8734func (c *RevisionsCheckCall) Context(ctx context.Context) *RevisionsCheckCall {
8735	c.ctx_ = ctx
8736	return c
8737}
8738
8739// Header returns an http.Header that can be modified by the caller to
8740// add HTTP headers to the request.
8741func (c *RevisionsCheckCall) Header() http.Header {
8742	if c.header_ == nil {
8743		c.header_ = make(http.Header)
8744	}
8745	return c.header_
8746}
8747
8748func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) {
8749	reqHeaders := make(http.Header)
8750	for k, v := range c.header_ {
8751		reqHeaders[k] = v
8752	}
8753	reqHeaders.Set("User-Agent", c.s.userAgent())
8754	if c.ifNoneMatch_ != "" {
8755		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8756	}
8757	var body io.Reader = nil
8758	c.urlParams_.Set("alt", alt)
8759	urls := googleapi.ResolveRelative(c.s.BasePath, "revisions/check")
8760	urls += "?" + c.urlParams_.Encode()
8761	req, _ := http.NewRequest("GET", urls, body)
8762	req.Header = reqHeaders
8763	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8764}
8765
8766// Do executes the "games.revisions.check" call.
8767// Exactly one of *RevisionCheckResponse or error will be non-nil. Any
8768// non-2xx status code is an error. Response headers are in either
8769// *RevisionCheckResponse.ServerResponse.Header or (if a response was
8770// returned at all) in error.(*googleapi.Error).Header. Use
8771// googleapi.IsNotModified to check whether the returned error was
8772// because http.StatusNotModified was returned.
8773func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckResponse, error) {
8774	gensupport.SetOptions(c.urlParams_, opts...)
8775	res, err := c.doRequest("json")
8776	if res != nil && res.StatusCode == http.StatusNotModified {
8777		if res.Body != nil {
8778			res.Body.Close()
8779		}
8780		return nil, &googleapi.Error{
8781			Code:   res.StatusCode,
8782			Header: res.Header,
8783		}
8784	}
8785	if err != nil {
8786		return nil, err
8787	}
8788	defer googleapi.CloseBody(res)
8789	if err := googleapi.CheckResponse(res); err != nil {
8790		return nil, err
8791	}
8792	ret := &RevisionCheckResponse{
8793		ServerResponse: googleapi.ServerResponse{
8794			Header:         res.Header,
8795			HTTPStatusCode: res.StatusCode,
8796		},
8797	}
8798	target := &ret
8799	if err := gensupport.DecodeResponse(target, res); err != nil {
8800		return nil, err
8801	}
8802	return ret, nil
8803	// {
8804	//   "description": "Checks whether the games client is out of date.",
8805	//   "httpMethod": "GET",
8806	//   "id": "games.revisions.check",
8807	//   "parameterOrder": [
8808	//     "clientRevision"
8809	//   ],
8810	//   "parameters": {
8811	//     "clientRevision": {
8812	//       "description": "The revision of the client SDK used by your application. Format:\n[PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are:\n \n- \"ANDROID\" - Client is running the Android SDK. \n- \"IOS\" - Client is running the iOS SDK. \n- \"WEB_APP\" - Client is running as a Web App.",
8813	//       "location": "query",
8814	//       "required": true,
8815	//       "type": "string"
8816	//     }
8817	//   },
8818	//   "path": "revisions/check",
8819	//   "response": {
8820	//     "$ref": "RevisionCheckResponse"
8821	//   },
8822	//   "scopes": [
8823	//     "https://www.googleapis.com/auth/games",
8824	//     "https://www.googleapis.com/auth/plus.login"
8825	//   ]
8826	// }
8827
8828}
8829
8830// method id "games.rooms.create":
8831
8832type RoomsCreateCall struct {
8833	s                 *Service
8834	roomcreaterequest *RoomCreateRequest
8835	urlParams_        gensupport.URLParams
8836	ctx_              context.Context
8837	header_           http.Header
8838}
8839
8840// Create: Create a room. For internal use by the Games SDK only.
8841// Calling this method directly is unsupported.
8842func (r *RoomsService) Create(roomcreaterequest *RoomCreateRequest) *RoomsCreateCall {
8843	c := &RoomsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8844	c.roomcreaterequest = roomcreaterequest
8845	return c
8846}
8847
8848// Language sets the optional parameter "language": The preferred
8849// language to use for strings returned by this method.
8850func (c *RoomsCreateCall) Language(language string) *RoomsCreateCall {
8851	c.urlParams_.Set("language", language)
8852	return c
8853}
8854
8855// Fields allows partial responses to be retrieved. See
8856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8857// for more information.
8858func (c *RoomsCreateCall) Fields(s ...googleapi.Field) *RoomsCreateCall {
8859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8860	return c
8861}
8862
8863// Context sets the context to be used in this call's Do method. Any
8864// pending HTTP request will be aborted if the provided context is
8865// canceled.
8866func (c *RoomsCreateCall) Context(ctx context.Context) *RoomsCreateCall {
8867	c.ctx_ = ctx
8868	return c
8869}
8870
8871// Header returns an http.Header that can be modified by the caller to
8872// add HTTP headers to the request.
8873func (c *RoomsCreateCall) Header() http.Header {
8874	if c.header_ == nil {
8875		c.header_ = make(http.Header)
8876	}
8877	return c.header_
8878}
8879
8880func (c *RoomsCreateCall) doRequest(alt string) (*http.Response, error) {
8881	reqHeaders := make(http.Header)
8882	for k, v := range c.header_ {
8883		reqHeaders[k] = v
8884	}
8885	reqHeaders.Set("User-Agent", c.s.userAgent())
8886	var body io.Reader = nil
8887	body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomcreaterequest)
8888	if err != nil {
8889		return nil, err
8890	}
8891	reqHeaders.Set("Content-Type", "application/json")
8892	c.urlParams_.Set("alt", alt)
8893	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/create")
8894	urls += "?" + c.urlParams_.Encode()
8895	req, _ := http.NewRequest("POST", urls, body)
8896	req.Header = reqHeaders
8897	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8898}
8899
8900// Do executes the "games.rooms.create" call.
8901// Exactly one of *Room or error will be non-nil. Any non-2xx status
8902// code is an error. Response headers are in either
8903// *Room.ServerResponse.Header or (if a response was returned at all) in
8904// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8905// whether the returned error was because http.StatusNotModified was
8906// returned.
8907func (c *RoomsCreateCall) Do(opts ...googleapi.CallOption) (*Room, error) {
8908	gensupport.SetOptions(c.urlParams_, opts...)
8909	res, err := c.doRequest("json")
8910	if res != nil && res.StatusCode == http.StatusNotModified {
8911		if res.Body != nil {
8912			res.Body.Close()
8913		}
8914		return nil, &googleapi.Error{
8915			Code:   res.StatusCode,
8916			Header: res.Header,
8917		}
8918	}
8919	if err != nil {
8920		return nil, err
8921	}
8922	defer googleapi.CloseBody(res)
8923	if err := googleapi.CheckResponse(res); err != nil {
8924		return nil, err
8925	}
8926	ret := &Room{
8927		ServerResponse: googleapi.ServerResponse{
8928			Header:         res.Header,
8929			HTTPStatusCode: res.StatusCode,
8930		},
8931	}
8932	target := &ret
8933	if err := gensupport.DecodeResponse(target, res); err != nil {
8934		return nil, err
8935	}
8936	return ret, nil
8937	// {
8938	//   "description": "Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported.",
8939	//   "httpMethod": "POST",
8940	//   "id": "games.rooms.create",
8941	//   "parameters": {
8942	//     "language": {
8943	//       "description": "The preferred language to use for strings returned by this method.",
8944	//       "location": "query",
8945	//       "type": "string"
8946	//     }
8947	//   },
8948	//   "path": "rooms/create",
8949	//   "request": {
8950	//     "$ref": "RoomCreateRequest"
8951	//   },
8952	//   "response": {
8953	//     "$ref": "Room"
8954	//   },
8955	//   "scopes": [
8956	//     "https://www.googleapis.com/auth/games",
8957	//     "https://www.googleapis.com/auth/plus.login"
8958	//   ]
8959	// }
8960
8961}
8962
8963// method id "games.rooms.decline":
8964
8965type RoomsDeclineCall struct {
8966	s          *Service
8967	roomId     string
8968	urlParams_ gensupport.URLParams
8969	ctx_       context.Context
8970	header_    http.Header
8971}
8972
8973// Decline: Decline an invitation to join a room. For internal use by
8974// the Games SDK only. Calling this method directly is unsupported.
8975func (r *RoomsService) Decline(roomId string) *RoomsDeclineCall {
8976	c := &RoomsDeclineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8977	c.roomId = roomId
8978	return c
8979}
8980
8981// Language sets the optional parameter "language": The preferred
8982// language to use for strings returned by this method.
8983func (c *RoomsDeclineCall) Language(language string) *RoomsDeclineCall {
8984	c.urlParams_.Set("language", language)
8985	return c
8986}
8987
8988// Fields allows partial responses to be retrieved. See
8989// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8990// for more information.
8991func (c *RoomsDeclineCall) Fields(s ...googleapi.Field) *RoomsDeclineCall {
8992	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8993	return c
8994}
8995
8996// Context sets the context to be used in this call's Do method. Any
8997// pending HTTP request will be aborted if the provided context is
8998// canceled.
8999func (c *RoomsDeclineCall) Context(ctx context.Context) *RoomsDeclineCall {
9000	c.ctx_ = ctx
9001	return c
9002}
9003
9004// Header returns an http.Header that can be modified by the caller to
9005// add HTTP headers to the request.
9006func (c *RoomsDeclineCall) Header() http.Header {
9007	if c.header_ == nil {
9008		c.header_ = make(http.Header)
9009	}
9010	return c.header_
9011}
9012
9013func (c *RoomsDeclineCall) doRequest(alt string) (*http.Response, error) {
9014	reqHeaders := make(http.Header)
9015	for k, v := range c.header_ {
9016		reqHeaders[k] = v
9017	}
9018	reqHeaders.Set("User-Agent", c.s.userAgent())
9019	var body io.Reader = nil
9020	c.urlParams_.Set("alt", alt)
9021	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/{roomId}/decline")
9022	urls += "?" + c.urlParams_.Encode()
9023	req, _ := http.NewRequest("POST", urls, body)
9024	req.Header = reqHeaders
9025	googleapi.Expand(req.URL, map[string]string{
9026		"roomId": c.roomId,
9027	})
9028	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9029}
9030
9031// Do executes the "games.rooms.decline" call.
9032// Exactly one of *Room or error will be non-nil. Any non-2xx status
9033// code is an error. Response headers are in either
9034// *Room.ServerResponse.Header or (if a response was returned at all) in
9035// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9036// whether the returned error was because http.StatusNotModified was
9037// returned.
9038func (c *RoomsDeclineCall) Do(opts ...googleapi.CallOption) (*Room, error) {
9039	gensupport.SetOptions(c.urlParams_, opts...)
9040	res, err := c.doRequest("json")
9041	if res != nil && res.StatusCode == http.StatusNotModified {
9042		if res.Body != nil {
9043			res.Body.Close()
9044		}
9045		return nil, &googleapi.Error{
9046			Code:   res.StatusCode,
9047			Header: res.Header,
9048		}
9049	}
9050	if err != nil {
9051		return nil, err
9052	}
9053	defer googleapi.CloseBody(res)
9054	if err := googleapi.CheckResponse(res); err != nil {
9055		return nil, err
9056	}
9057	ret := &Room{
9058		ServerResponse: googleapi.ServerResponse{
9059			Header:         res.Header,
9060			HTTPStatusCode: res.StatusCode,
9061		},
9062	}
9063	target := &ret
9064	if err := gensupport.DecodeResponse(target, res); err != nil {
9065		return nil, err
9066	}
9067	return ret, nil
9068	// {
9069	//   "description": "Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.",
9070	//   "httpMethod": "POST",
9071	//   "id": "games.rooms.decline",
9072	//   "parameterOrder": [
9073	//     "roomId"
9074	//   ],
9075	//   "parameters": {
9076	//     "language": {
9077	//       "description": "The preferred language to use for strings returned by this method.",
9078	//       "location": "query",
9079	//       "type": "string"
9080	//     },
9081	//     "roomId": {
9082	//       "description": "The ID of the room.",
9083	//       "location": "path",
9084	//       "required": true,
9085	//       "type": "string"
9086	//     }
9087	//   },
9088	//   "path": "rooms/{roomId}/decline",
9089	//   "response": {
9090	//     "$ref": "Room"
9091	//   },
9092	//   "scopes": [
9093	//     "https://www.googleapis.com/auth/games",
9094	//     "https://www.googleapis.com/auth/plus.login"
9095	//   ]
9096	// }
9097
9098}
9099
9100// method id "games.rooms.dismiss":
9101
9102type RoomsDismissCall struct {
9103	s          *Service
9104	roomId     string
9105	urlParams_ gensupport.URLParams
9106	ctx_       context.Context
9107	header_    http.Header
9108}
9109
9110// Dismiss: Dismiss an invitation to join a room. For internal use by
9111// the Games SDK only. Calling this method directly is unsupported.
9112func (r *RoomsService) Dismiss(roomId string) *RoomsDismissCall {
9113	c := &RoomsDismissCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9114	c.roomId = roomId
9115	return c
9116}
9117
9118// Fields allows partial responses to be retrieved. See
9119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9120// for more information.
9121func (c *RoomsDismissCall) Fields(s ...googleapi.Field) *RoomsDismissCall {
9122	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9123	return c
9124}
9125
9126// Context sets the context to be used in this call's Do method. Any
9127// pending HTTP request will be aborted if the provided context is
9128// canceled.
9129func (c *RoomsDismissCall) Context(ctx context.Context) *RoomsDismissCall {
9130	c.ctx_ = ctx
9131	return c
9132}
9133
9134// Header returns an http.Header that can be modified by the caller to
9135// add HTTP headers to the request.
9136func (c *RoomsDismissCall) Header() http.Header {
9137	if c.header_ == nil {
9138		c.header_ = make(http.Header)
9139	}
9140	return c.header_
9141}
9142
9143func (c *RoomsDismissCall) doRequest(alt string) (*http.Response, error) {
9144	reqHeaders := make(http.Header)
9145	for k, v := range c.header_ {
9146		reqHeaders[k] = v
9147	}
9148	reqHeaders.Set("User-Agent", c.s.userAgent())
9149	var body io.Reader = nil
9150	c.urlParams_.Set("alt", alt)
9151	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/{roomId}/dismiss")
9152	urls += "?" + c.urlParams_.Encode()
9153	req, _ := http.NewRequest("POST", urls, body)
9154	req.Header = reqHeaders
9155	googleapi.Expand(req.URL, map[string]string{
9156		"roomId": c.roomId,
9157	})
9158	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9159}
9160
9161// Do executes the "games.rooms.dismiss" call.
9162func (c *RoomsDismissCall) Do(opts ...googleapi.CallOption) error {
9163	gensupport.SetOptions(c.urlParams_, opts...)
9164	res, err := c.doRequest("json")
9165	if err != nil {
9166		return err
9167	}
9168	defer googleapi.CloseBody(res)
9169	if err := googleapi.CheckResponse(res); err != nil {
9170		return err
9171	}
9172	return nil
9173	// {
9174	//   "description": "Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.",
9175	//   "httpMethod": "POST",
9176	//   "id": "games.rooms.dismiss",
9177	//   "parameterOrder": [
9178	//     "roomId"
9179	//   ],
9180	//   "parameters": {
9181	//     "roomId": {
9182	//       "description": "The ID of the room.",
9183	//       "location": "path",
9184	//       "required": true,
9185	//       "type": "string"
9186	//     }
9187	//   },
9188	//   "path": "rooms/{roomId}/dismiss",
9189	//   "scopes": [
9190	//     "https://www.googleapis.com/auth/games",
9191	//     "https://www.googleapis.com/auth/plus.login"
9192	//   ]
9193	// }
9194
9195}
9196
9197// method id "games.rooms.get":
9198
9199type RoomsGetCall struct {
9200	s            *Service
9201	roomId       string
9202	urlParams_   gensupport.URLParams
9203	ifNoneMatch_ string
9204	ctx_         context.Context
9205	header_      http.Header
9206}
9207
9208// Get: Get the data for a room.
9209func (r *RoomsService) Get(roomId string) *RoomsGetCall {
9210	c := &RoomsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9211	c.roomId = roomId
9212	return c
9213}
9214
9215// Language sets the optional parameter "language": The preferred
9216// language to use for strings returned by this method.
9217func (c *RoomsGetCall) Language(language string) *RoomsGetCall {
9218	c.urlParams_.Set("language", language)
9219	return c
9220}
9221
9222// Fields allows partial responses to be retrieved. See
9223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9224// for more information.
9225func (c *RoomsGetCall) Fields(s ...googleapi.Field) *RoomsGetCall {
9226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9227	return c
9228}
9229
9230// IfNoneMatch sets the optional parameter which makes the operation
9231// fail if the object's ETag matches the given value. This is useful for
9232// getting updates only after the object has changed since the last
9233// request. Use googleapi.IsNotModified to check whether the response
9234// error from Do is the result of In-None-Match.
9235func (c *RoomsGetCall) IfNoneMatch(entityTag string) *RoomsGetCall {
9236	c.ifNoneMatch_ = entityTag
9237	return c
9238}
9239
9240// Context sets the context to be used in this call's Do method. Any
9241// pending HTTP request will be aborted if the provided context is
9242// canceled.
9243func (c *RoomsGetCall) Context(ctx context.Context) *RoomsGetCall {
9244	c.ctx_ = ctx
9245	return c
9246}
9247
9248// Header returns an http.Header that can be modified by the caller to
9249// add HTTP headers to the request.
9250func (c *RoomsGetCall) Header() http.Header {
9251	if c.header_ == nil {
9252		c.header_ = make(http.Header)
9253	}
9254	return c.header_
9255}
9256
9257func (c *RoomsGetCall) doRequest(alt string) (*http.Response, error) {
9258	reqHeaders := make(http.Header)
9259	for k, v := range c.header_ {
9260		reqHeaders[k] = v
9261	}
9262	reqHeaders.Set("User-Agent", c.s.userAgent())
9263	if c.ifNoneMatch_ != "" {
9264		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9265	}
9266	var body io.Reader = nil
9267	c.urlParams_.Set("alt", alt)
9268	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/{roomId}")
9269	urls += "?" + c.urlParams_.Encode()
9270	req, _ := http.NewRequest("GET", urls, body)
9271	req.Header = reqHeaders
9272	googleapi.Expand(req.URL, map[string]string{
9273		"roomId": c.roomId,
9274	})
9275	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9276}
9277
9278// Do executes the "games.rooms.get" call.
9279// Exactly one of *Room or error will be non-nil. Any non-2xx status
9280// code is an error. Response headers are in either
9281// *Room.ServerResponse.Header or (if a response was returned at all) in
9282// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9283// whether the returned error was because http.StatusNotModified was
9284// returned.
9285func (c *RoomsGetCall) Do(opts ...googleapi.CallOption) (*Room, error) {
9286	gensupport.SetOptions(c.urlParams_, opts...)
9287	res, err := c.doRequest("json")
9288	if res != nil && res.StatusCode == http.StatusNotModified {
9289		if res.Body != nil {
9290			res.Body.Close()
9291		}
9292		return nil, &googleapi.Error{
9293			Code:   res.StatusCode,
9294			Header: res.Header,
9295		}
9296	}
9297	if err != nil {
9298		return nil, err
9299	}
9300	defer googleapi.CloseBody(res)
9301	if err := googleapi.CheckResponse(res); err != nil {
9302		return nil, err
9303	}
9304	ret := &Room{
9305		ServerResponse: googleapi.ServerResponse{
9306			Header:         res.Header,
9307			HTTPStatusCode: res.StatusCode,
9308		},
9309	}
9310	target := &ret
9311	if err := gensupport.DecodeResponse(target, res); err != nil {
9312		return nil, err
9313	}
9314	return ret, nil
9315	// {
9316	//   "description": "Get the data for a room.",
9317	//   "httpMethod": "GET",
9318	//   "id": "games.rooms.get",
9319	//   "parameterOrder": [
9320	//     "roomId"
9321	//   ],
9322	//   "parameters": {
9323	//     "language": {
9324	//       "description": "The preferred language to use for strings returned by this method.",
9325	//       "location": "query",
9326	//       "type": "string"
9327	//     },
9328	//     "roomId": {
9329	//       "description": "The ID of the room.",
9330	//       "location": "path",
9331	//       "required": true,
9332	//       "type": "string"
9333	//     }
9334	//   },
9335	//   "path": "rooms/{roomId}",
9336	//   "response": {
9337	//     "$ref": "Room"
9338	//   },
9339	//   "scopes": [
9340	//     "https://www.googleapis.com/auth/games",
9341	//     "https://www.googleapis.com/auth/plus.login"
9342	//   ]
9343	// }
9344
9345}
9346
9347// method id "games.rooms.join":
9348
9349type RoomsJoinCall struct {
9350	s               *Service
9351	roomId          string
9352	roomjoinrequest *RoomJoinRequest
9353	urlParams_      gensupport.URLParams
9354	ctx_            context.Context
9355	header_         http.Header
9356}
9357
9358// Join: Join a room. For internal use by the Games SDK only. Calling
9359// this method directly is unsupported.
9360func (r *RoomsService) Join(roomId string, roomjoinrequest *RoomJoinRequest) *RoomsJoinCall {
9361	c := &RoomsJoinCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9362	c.roomId = roomId
9363	c.roomjoinrequest = roomjoinrequest
9364	return c
9365}
9366
9367// Language sets the optional parameter "language": The preferred
9368// language to use for strings returned by this method.
9369func (c *RoomsJoinCall) Language(language string) *RoomsJoinCall {
9370	c.urlParams_.Set("language", language)
9371	return c
9372}
9373
9374// Fields allows partial responses to be retrieved. See
9375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9376// for more information.
9377func (c *RoomsJoinCall) Fields(s ...googleapi.Field) *RoomsJoinCall {
9378	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9379	return c
9380}
9381
9382// Context sets the context to be used in this call's Do method. Any
9383// pending HTTP request will be aborted if the provided context is
9384// canceled.
9385func (c *RoomsJoinCall) Context(ctx context.Context) *RoomsJoinCall {
9386	c.ctx_ = ctx
9387	return c
9388}
9389
9390// Header returns an http.Header that can be modified by the caller to
9391// add HTTP headers to the request.
9392func (c *RoomsJoinCall) Header() http.Header {
9393	if c.header_ == nil {
9394		c.header_ = make(http.Header)
9395	}
9396	return c.header_
9397}
9398
9399func (c *RoomsJoinCall) doRequest(alt string) (*http.Response, error) {
9400	reqHeaders := make(http.Header)
9401	for k, v := range c.header_ {
9402		reqHeaders[k] = v
9403	}
9404	reqHeaders.Set("User-Agent", c.s.userAgent())
9405	var body io.Reader = nil
9406	body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomjoinrequest)
9407	if err != nil {
9408		return nil, err
9409	}
9410	reqHeaders.Set("Content-Type", "application/json")
9411	c.urlParams_.Set("alt", alt)
9412	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/{roomId}/join")
9413	urls += "?" + c.urlParams_.Encode()
9414	req, _ := http.NewRequest("POST", urls, body)
9415	req.Header = reqHeaders
9416	googleapi.Expand(req.URL, map[string]string{
9417		"roomId": c.roomId,
9418	})
9419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9420}
9421
9422// Do executes the "games.rooms.join" call.
9423// Exactly one of *Room or error will be non-nil. Any non-2xx status
9424// code is an error. Response headers are in either
9425// *Room.ServerResponse.Header or (if a response was returned at all) in
9426// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9427// whether the returned error was because http.StatusNotModified was
9428// returned.
9429func (c *RoomsJoinCall) Do(opts ...googleapi.CallOption) (*Room, error) {
9430	gensupport.SetOptions(c.urlParams_, opts...)
9431	res, err := c.doRequest("json")
9432	if res != nil && res.StatusCode == http.StatusNotModified {
9433		if res.Body != nil {
9434			res.Body.Close()
9435		}
9436		return nil, &googleapi.Error{
9437			Code:   res.StatusCode,
9438			Header: res.Header,
9439		}
9440	}
9441	if err != nil {
9442		return nil, err
9443	}
9444	defer googleapi.CloseBody(res)
9445	if err := googleapi.CheckResponse(res); err != nil {
9446		return nil, err
9447	}
9448	ret := &Room{
9449		ServerResponse: googleapi.ServerResponse{
9450			Header:         res.Header,
9451			HTTPStatusCode: res.StatusCode,
9452		},
9453	}
9454	target := &ret
9455	if err := gensupport.DecodeResponse(target, res); err != nil {
9456		return nil, err
9457	}
9458	return ret, nil
9459	// {
9460	//   "description": "Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.",
9461	//   "httpMethod": "POST",
9462	//   "id": "games.rooms.join",
9463	//   "parameterOrder": [
9464	//     "roomId"
9465	//   ],
9466	//   "parameters": {
9467	//     "language": {
9468	//       "description": "The preferred language to use for strings returned by this method.",
9469	//       "location": "query",
9470	//       "type": "string"
9471	//     },
9472	//     "roomId": {
9473	//       "description": "The ID of the room.",
9474	//       "location": "path",
9475	//       "required": true,
9476	//       "type": "string"
9477	//     }
9478	//   },
9479	//   "path": "rooms/{roomId}/join",
9480	//   "request": {
9481	//     "$ref": "RoomJoinRequest"
9482	//   },
9483	//   "response": {
9484	//     "$ref": "Room"
9485	//   },
9486	//   "scopes": [
9487	//     "https://www.googleapis.com/auth/games",
9488	//     "https://www.googleapis.com/auth/plus.login"
9489	//   ]
9490	// }
9491
9492}
9493
9494// method id "games.rooms.leave":
9495
9496type RoomsLeaveCall struct {
9497	s                *Service
9498	roomId           string
9499	roomleaverequest *RoomLeaveRequest
9500	urlParams_       gensupport.URLParams
9501	ctx_             context.Context
9502	header_          http.Header
9503}
9504
9505// Leave: Leave a room. For internal use by the Games SDK only. Calling
9506// this method directly is unsupported.
9507func (r *RoomsService) Leave(roomId string, roomleaverequest *RoomLeaveRequest) *RoomsLeaveCall {
9508	c := &RoomsLeaveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9509	c.roomId = roomId
9510	c.roomleaverequest = roomleaverequest
9511	return c
9512}
9513
9514// Language sets the optional parameter "language": The preferred
9515// language to use for strings returned by this method.
9516func (c *RoomsLeaveCall) Language(language string) *RoomsLeaveCall {
9517	c.urlParams_.Set("language", language)
9518	return c
9519}
9520
9521// Fields allows partial responses to be retrieved. See
9522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9523// for more information.
9524func (c *RoomsLeaveCall) Fields(s ...googleapi.Field) *RoomsLeaveCall {
9525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9526	return c
9527}
9528
9529// Context sets the context to be used in this call's Do method. Any
9530// pending HTTP request will be aborted if the provided context is
9531// canceled.
9532func (c *RoomsLeaveCall) Context(ctx context.Context) *RoomsLeaveCall {
9533	c.ctx_ = ctx
9534	return c
9535}
9536
9537// Header returns an http.Header that can be modified by the caller to
9538// add HTTP headers to the request.
9539func (c *RoomsLeaveCall) Header() http.Header {
9540	if c.header_ == nil {
9541		c.header_ = make(http.Header)
9542	}
9543	return c.header_
9544}
9545
9546func (c *RoomsLeaveCall) doRequest(alt string) (*http.Response, error) {
9547	reqHeaders := make(http.Header)
9548	for k, v := range c.header_ {
9549		reqHeaders[k] = v
9550	}
9551	reqHeaders.Set("User-Agent", c.s.userAgent())
9552	var body io.Reader = nil
9553	body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomleaverequest)
9554	if err != nil {
9555		return nil, err
9556	}
9557	reqHeaders.Set("Content-Type", "application/json")
9558	c.urlParams_.Set("alt", alt)
9559	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/{roomId}/leave")
9560	urls += "?" + c.urlParams_.Encode()
9561	req, _ := http.NewRequest("POST", urls, body)
9562	req.Header = reqHeaders
9563	googleapi.Expand(req.URL, map[string]string{
9564		"roomId": c.roomId,
9565	})
9566	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9567}
9568
9569// Do executes the "games.rooms.leave" call.
9570// Exactly one of *Room or error will be non-nil. Any non-2xx status
9571// code is an error. Response headers are in either
9572// *Room.ServerResponse.Header or (if a response was returned at all) in
9573// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9574// whether the returned error was because http.StatusNotModified was
9575// returned.
9576func (c *RoomsLeaveCall) Do(opts ...googleapi.CallOption) (*Room, error) {
9577	gensupport.SetOptions(c.urlParams_, opts...)
9578	res, err := c.doRequest("json")
9579	if res != nil && res.StatusCode == http.StatusNotModified {
9580		if res.Body != nil {
9581			res.Body.Close()
9582		}
9583		return nil, &googleapi.Error{
9584			Code:   res.StatusCode,
9585			Header: res.Header,
9586		}
9587	}
9588	if err != nil {
9589		return nil, err
9590	}
9591	defer googleapi.CloseBody(res)
9592	if err := googleapi.CheckResponse(res); err != nil {
9593		return nil, err
9594	}
9595	ret := &Room{
9596		ServerResponse: googleapi.ServerResponse{
9597			Header:         res.Header,
9598			HTTPStatusCode: res.StatusCode,
9599		},
9600	}
9601	target := &ret
9602	if err := gensupport.DecodeResponse(target, res); err != nil {
9603		return nil, err
9604	}
9605	return ret, nil
9606	// {
9607	//   "description": "Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported.",
9608	//   "httpMethod": "POST",
9609	//   "id": "games.rooms.leave",
9610	//   "parameterOrder": [
9611	//     "roomId"
9612	//   ],
9613	//   "parameters": {
9614	//     "language": {
9615	//       "description": "The preferred language to use for strings returned by this method.",
9616	//       "location": "query",
9617	//       "type": "string"
9618	//     },
9619	//     "roomId": {
9620	//       "description": "The ID of the room.",
9621	//       "location": "path",
9622	//       "required": true,
9623	//       "type": "string"
9624	//     }
9625	//   },
9626	//   "path": "rooms/{roomId}/leave",
9627	//   "request": {
9628	//     "$ref": "RoomLeaveRequest"
9629	//   },
9630	//   "response": {
9631	//     "$ref": "Room"
9632	//   },
9633	//   "scopes": [
9634	//     "https://www.googleapis.com/auth/games",
9635	//     "https://www.googleapis.com/auth/plus.login"
9636	//   ]
9637	// }
9638
9639}
9640
9641// method id "games.rooms.list":
9642
9643type RoomsListCall struct {
9644	s            *Service
9645	urlParams_   gensupport.URLParams
9646	ifNoneMatch_ string
9647	ctx_         context.Context
9648	header_      http.Header
9649}
9650
9651// List: Returns invitations to join rooms.
9652func (r *RoomsService) List() *RoomsListCall {
9653	c := &RoomsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9654	return c
9655}
9656
9657// Language sets the optional parameter "language": The preferred
9658// language to use for strings returned by this method.
9659func (c *RoomsListCall) Language(language string) *RoomsListCall {
9660	c.urlParams_.Set("language", language)
9661	return c
9662}
9663
9664// MaxResults sets the optional parameter "maxResults": The maximum
9665// number of rooms to return in the response, used for paging. For any
9666// response, the actual number of rooms to return may be less than the
9667// specified maxResults.
9668func (c *RoomsListCall) MaxResults(maxResults int64) *RoomsListCall {
9669	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9670	return c
9671}
9672
9673// PageToken sets the optional parameter "pageToken": The token returned
9674// by the previous request.
9675func (c *RoomsListCall) PageToken(pageToken string) *RoomsListCall {
9676	c.urlParams_.Set("pageToken", pageToken)
9677	return c
9678}
9679
9680// Fields allows partial responses to be retrieved. See
9681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9682// for more information.
9683func (c *RoomsListCall) Fields(s ...googleapi.Field) *RoomsListCall {
9684	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9685	return c
9686}
9687
9688// IfNoneMatch sets the optional parameter which makes the operation
9689// fail if the object's ETag matches the given value. This is useful for
9690// getting updates only after the object has changed since the last
9691// request. Use googleapi.IsNotModified to check whether the response
9692// error from Do is the result of In-None-Match.
9693func (c *RoomsListCall) IfNoneMatch(entityTag string) *RoomsListCall {
9694	c.ifNoneMatch_ = entityTag
9695	return c
9696}
9697
9698// Context sets the context to be used in this call's Do method. Any
9699// pending HTTP request will be aborted if the provided context is
9700// canceled.
9701func (c *RoomsListCall) Context(ctx context.Context) *RoomsListCall {
9702	c.ctx_ = ctx
9703	return c
9704}
9705
9706// Header returns an http.Header that can be modified by the caller to
9707// add HTTP headers to the request.
9708func (c *RoomsListCall) Header() http.Header {
9709	if c.header_ == nil {
9710		c.header_ = make(http.Header)
9711	}
9712	return c.header_
9713}
9714
9715func (c *RoomsListCall) doRequest(alt string) (*http.Response, error) {
9716	reqHeaders := make(http.Header)
9717	for k, v := range c.header_ {
9718		reqHeaders[k] = v
9719	}
9720	reqHeaders.Set("User-Agent", c.s.userAgent())
9721	if c.ifNoneMatch_ != "" {
9722		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9723	}
9724	var body io.Reader = nil
9725	c.urlParams_.Set("alt", alt)
9726	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms")
9727	urls += "?" + c.urlParams_.Encode()
9728	req, _ := http.NewRequest("GET", urls, body)
9729	req.Header = reqHeaders
9730	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9731}
9732
9733// Do executes the "games.rooms.list" call.
9734// Exactly one of *RoomList or error will be non-nil. Any non-2xx status
9735// code is an error. Response headers are in either
9736// *RoomList.ServerResponse.Header or (if a response was returned at
9737// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9738// to check whether the returned error was because
9739// http.StatusNotModified was returned.
9740func (c *RoomsListCall) Do(opts ...googleapi.CallOption) (*RoomList, error) {
9741	gensupport.SetOptions(c.urlParams_, opts...)
9742	res, err := c.doRequest("json")
9743	if res != nil && res.StatusCode == http.StatusNotModified {
9744		if res.Body != nil {
9745			res.Body.Close()
9746		}
9747		return nil, &googleapi.Error{
9748			Code:   res.StatusCode,
9749			Header: res.Header,
9750		}
9751	}
9752	if err != nil {
9753		return nil, err
9754	}
9755	defer googleapi.CloseBody(res)
9756	if err := googleapi.CheckResponse(res); err != nil {
9757		return nil, err
9758	}
9759	ret := &RoomList{
9760		ServerResponse: googleapi.ServerResponse{
9761			Header:         res.Header,
9762			HTTPStatusCode: res.StatusCode,
9763		},
9764	}
9765	target := &ret
9766	if err := gensupport.DecodeResponse(target, res); err != nil {
9767		return nil, err
9768	}
9769	return ret, nil
9770	// {
9771	//   "description": "Returns invitations to join rooms.",
9772	//   "httpMethod": "GET",
9773	//   "id": "games.rooms.list",
9774	//   "parameters": {
9775	//     "language": {
9776	//       "description": "The preferred language to use for strings returned by this method.",
9777	//       "location": "query",
9778	//       "type": "string"
9779	//     },
9780	//     "maxResults": {
9781	//       "description": "The maximum number of rooms to return in the response, used for paging. For any response, the actual number of rooms to return may be less than the specified maxResults.",
9782	//       "format": "int32",
9783	//       "location": "query",
9784	//       "maximum": "500",
9785	//       "minimum": "1",
9786	//       "type": "integer"
9787	//     },
9788	//     "pageToken": {
9789	//       "description": "The token returned by the previous request.",
9790	//       "location": "query",
9791	//       "type": "string"
9792	//     }
9793	//   },
9794	//   "path": "rooms",
9795	//   "response": {
9796	//     "$ref": "RoomList"
9797	//   },
9798	//   "scopes": [
9799	//     "https://www.googleapis.com/auth/games",
9800	//     "https://www.googleapis.com/auth/plus.login"
9801	//   ]
9802	// }
9803
9804}
9805
9806// Pages invokes f for each page of results.
9807// A non-nil error returned from f will halt the iteration.
9808// The provided context supersedes any context provided to the Context method.
9809func (c *RoomsListCall) Pages(ctx context.Context, f func(*RoomList) error) error {
9810	c.ctx_ = ctx
9811	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9812	for {
9813		x, err := c.Do()
9814		if err != nil {
9815			return err
9816		}
9817		if err := f(x); err != nil {
9818			return err
9819		}
9820		if x.NextPageToken == "" {
9821			return nil
9822		}
9823		c.PageToken(x.NextPageToken)
9824	}
9825}
9826
9827// method id "games.rooms.reportStatus":
9828
9829type RoomsReportStatusCall struct {
9830	s               *Service
9831	roomId          string
9832	roomp2pstatuses *RoomP2PStatuses
9833	urlParams_      gensupport.URLParams
9834	ctx_            context.Context
9835	header_         http.Header
9836}
9837
9838// ReportStatus: Updates sent by a client reporting the status of peers
9839// in a room. For internal use by the Games SDK only. Calling this
9840// method directly is unsupported.
9841func (r *RoomsService) ReportStatus(roomId string, roomp2pstatuses *RoomP2PStatuses) *RoomsReportStatusCall {
9842	c := &RoomsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9843	c.roomId = roomId
9844	c.roomp2pstatuses = roomp2pstatuses
9845	return c
9846}
9847
9848// Language sets the optional parameter "language": The preferred
9849// language to use for strings returned by this method.
9850func (c *RoomsReportStatusCall) Language(language string) *RoomsReportStatusCall {
9851	c.urlParams_.Set("language", language)
9852	return c
9853}
9854
9855// Fields allows partial responses to be retrieved. See
9856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9857// for more information.
9858func (c *RoomsReportStatusCall) Fields(s ...googleapi.Field) *RoomsReportStatusCall {
9859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9860	return c
9861}
9862
9863// Context sets the context to be used in this call's Do method. Any
9864// pending HTTP request will be aborted if the provided context is
9865// canceled.
9866func (c *RoomsReportStatusCall) Context(ctx context.Context) *RoomsReportStatusCall {
9867	c.ctx_ = ctx
9868	return c
9869}
9870
9871// Header returns an http.Header that can be modified by the caller to
9872// add HTTP headers to the request.
9873func (c *RoomsReportStatusCall) Header() http.Header {
9874	if c.header_ == nil {
9875		c.header_ = make(http.Header)
9876	}
9877	return c.header_
9878}
9879
9880func (c *RoomsReportStatusCall) doRequest(alt string) (*http.Response, error) {
9881	reqHeaders := make(http.Header)
9882	for k, v := range c.header_ {
9883		reqHeaders[k] = v
9884	}
9885	reqHeaders.Set("User-Agent", c.s.userAgent())
9886	var body io.Reader = nil
9887	body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomp2pstatuses)
9888	if err != nil {
9889		return nil, err
9890	}
9891	reqHeaders.Set("Content-Type", "application/json")
9892	c.urlParams_.Set("alt", alt)
9893	urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/{roomId}/reportstatus")
9894	urls += "?" + c.urlParams_.Encode()
9895	req, _ := http.NewRequest("POST", urls, body)
9896	req.Header = reqHeaders
9897	googleapi.Expand(req.URL, map[string]string{
9898		"roomId": c.roomId,
9899	})
9900	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9901}
9902
9903// Do executes the "games.rooms.reportStatus" call.
9904// Exactly one of *RoomStatus or error will be non-nil. Any non-2xx
9905// status code is an error. Response headers are in either
9906// *RoomStatus.ServerResponse.Header or (if a response was returned at
9907// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9908// to check whether the returned error was because
9909// http.StatusNotModified was returned.
9910func (c *RoomsReportStatusCall) Do(opts ...googleapi.CallOption) (*RoomStatus, error) {
9911	gensupport.SetOptions(c.urlParams_, opts...)
9912	res, err := c.doRequest("json")
9913	if res != nil && res.StatusCode == http.StatusNotModified {
9914		if res.Body != nil {
9915			res.Body.Close()
9916		}
9917		return nil, &googleapi.Error{
9918			Code:   res.StatusCode,
9919			Header: res.Header,
9920		}
9921	}
9922	if err != nil {
9923		return nil, err
9924	}
9925	defer googleapi.CloseBody(res)
9926	if err := googleapi.CheckResponse(res); err != nil {
9927		return nil, err
9928	}
9929	ret := &RoomStatus{
9930		ServerResponse: googleapi.ServerResponse{
9931			Header:         res.Header,
9932			HTTPStatusCode: res.StatusCode,
9933		},
9934	}
9935	target := &ret
9936	if err := gensupport.DecodeResponse(target, res); err != nil {
9937		return nil, err
9938	}
9939	return ret, nil
9940	// {
9941	//   "description": "Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported.",
9942	//   "httpMethod": "POST",
9943	//   "id": "games.rooms.reportStatus",
9944	//   "parameterOrder": [
9945	//     "roomId"
9946	//   ],
9947	//   "parameters": {
9948	//     "language": {
9949	//       "description": "The preferred language to use for strings returned by this method.",
9950	//       "location": "query",
9951	//       "type": "string"
9952	//     },
9953	//     "roomId": {
9954	//       "description": "The ID of the room.",
9955	//       "location": "path",
9956	//       "required": true,
9957	//       "type": "string"
9958	//     }
9959	//   },
9960	//   "path": "rooms/{roomId}/reportstatus",
9961	//   "request": {
9962	//     "$ref": "RoomP2PStatuses"
9963	//   },
9964	//   "response": {
9965	//     "$ref": "RoomStatus"
9966	//   },
9967	//   "scopes": [
9968	//     "https://www.googleapis.com/auth/games",
9969	//     "https://www.googleapis.com/auth/plus.login"
9970	//   ]
9971	// }
9972
9973}
9974
9975// method id "games.scores.get":
9976
9977type ScoresGetCall struct {
9978	s             *Service
9979	playerId      string
9980	leaderboardId string
9981	timeSpan      string
9982	urlParams_    gensupport.URLParams
9983	ifNoneMatch_  string
9984	ctx_          context.Context
9985	header_       http.Header
9986}
9987
9988// Get: Get high scores, and optionally ranks, in leaderboards for the
9989// currently authenticated player. For a specific time span,
9990// leaderboardId can be set to ALL to retrieve data for all leaderboards
9991// in a given time span.
9992// NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in
9993// the same request; only one parameter may be set to 'ALL'.
9994func (r *ScoresService) Get(playerId string, leaderboardId string, timeSpan string) *ScoresGetCall {
9995	c := &ScoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9996	c.playerId = playerId
9997	c.leaderboardId = leaderboardId
9998	c.timeSpan = timeSpan
9999	return c
10000}
10001
10002// IncludeRankType sets the optional parameter "includeRankType": The
10003// types of ranks to return. If the parameter is omitted, no ranks will
10004// be returned.
10005//
10006// Possible values:
10007//   "ALL" - Retrieve public and social ranks.
10008//   "PUBLIC" - Retrieve public ranks, if the player is sharing their
10009// gameplay activity publicly.
10010//   "SOCIAL" - Retrieve the social rank.
10011func (c *ScoresGetCall) IncludeRankType(includeRankType string) *ScoresGetCall {
10012	c.urlParams_.Set("includeRankType", includeRankType)
10013	return c
10014}
10015
10016// Language sets the optional parameter "language": The preferred
10017// language to use for strings returned by this method.
10018func (c *ScoresGetCall) Language(language string) *ScoresGetCall {
10019	c.urlParams_.Set("language", language)
10020	return c
10021}
10022
10023// MaxResults sets the optional parameter "maxResults": The maximum
10024// number of leaderboard scores to return in the response. For any
10025// response, the actual number of leaderboard scores returned may be
10026// less than the specified maxResults.
10027func (c *ScoresGetCall) MaxResults(maxResults int64) *ScoresGetCall {
10028	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10029	return c
10030}
10031
10032// PageToken sets the optional parameter "pageToken": The token returned
10033// by the previous request.
10034func (c *ScoresGetCall) PageToken(pageToken string) *ScoresGetCall {
10035	c.urlParams_.Set("pageToken", pageToken)
10036	return c
10037}
10038
10039// Fields allows partial responses to be retrieved. See
10040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10041// for more information.
10042func (c *ScoresGetCall) Fields(s ...googleapi.Field) *ScoresGetCall {
10043	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10044	return c
10045}
10046
10047// IfNoneMatch sets the optional parameter which makes the operation
10048// fail if the object's ETag matches the given value. This is useful for
10049// getting updates only after the object has changed since the last
10050// request. Use googleapi.IsNotModified to check whether the response
10051// error from Do is the result of In-None-Match.
10052func (c *ScoresGetCall) IfNoneMatch(entityTag string) *ScoresGetCall {
10053	c.ifNoneMatch_ = entityTag
10054	return c
10055}
10056
10057// Context sets the context to be used in this call's Do method. Any
10058// pending HTTP request will be aborted if the provided context is
10059// canceled.
10060func (c *ScoresGetCall) Context(ctx context.Context) *ScoresGetCall {
10061	c.ctx_ = ctx
10062	return c
10063}
10064
10065// Header returns an http.Header that can be modified by the caller to
10066// add HTTP headers to the request.
10067func (c *ScoresGetCall) Header() http.Header {
10068	if c.header_ == nil {
10069		c.header_ = make(http.Header)
10070	}
10071	return c.header_
10072}
10073
10074func (c *ScoresGetCall) doRequest(alt string) (*http.Response, error) {
10075	reqHeaders := make(http.Header)
10076	for k, v := range c.header_ {
10077		reqHeaders[k] = v
10078	}
10079	reqHeaders.Set("User-Agent", c.s.userAgent())
10080	if c.ifNoneMatch_ != "" {
10081		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10082	}
10083	var body io.Reader = nil
10084	c.urlParams_.Set("alt", alt)
10085	urls := googleapi.ResolveRelative(c.s.BasePath, "players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}")
10086	urls += "?" + c.urlParams_.Encode()
10087	req, _ := http.NewRequest("GET", urls, body)
10088	req.Header = reqHeaders
10089	googleapi.Expand(req.URL, map[string]string{
10090		"playerId":      c.playerId,
10091		"leaderboardId": c.leaderboardId,
10092		"timeSpan":      c.timeSpan,
10093	})
10094	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10095}
10096
10097// Do executes the "games.scores.get" call.
10098// Exactly one of *PlayerLeaderboardScoreListResponse or error will be
10099// non-nil. Any non-2xx status code is an error. Response headers are in
10100// either *PlayerLeaderboardScoreListResponse.ServerResponse.Header or
10101// (if a response was returned at all) in
10102// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10103// whether the returned error was because http.StatusNotModified was
10104// returned.
10105func (c *ScoresGetCall) Do(opts ...googleapi.CallOption) (*PlayerLeaderboardScoreListResponse, error) {
10106	gensupport.SetOptions(c.urlParams_, opts...)
10107	res, err := c.doRequest("json")
10108	if res != nil && res.StatusCode == http.StatusNotModified {
10109		if res.Body != nil {
10110			res.Body.Close()
10111		}
10112		return nil, &googleapi.Error{
10113			Code:   res.StatusCode,
10114			Header: res.Header,
10115		}
10116	}
10117	if err != nil {
10118		return nil, err
10119	}
10120	defer googleapi.CloseBody(res)
10121	if err := googleapi.CheckResponse(res); err != nil {
10122		return nil, err
10123	}
10124	ret := &PlayerLeaderboardScoreListResponse{
10125		ServerResponse: googleapi.ServerResponse{
10126			Header:         res.Header,
10127			HTTPStatusCode: res.StatusCode,
10128		},
10129	}
10130	target := &ret
10131	if err := gensupport.DecodeResponse(target, res); err != nil {
10132		return nil, err
10133	}
10134	return ret, nil
10135	// {
10136	//   "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.\nNOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one parameter may be set to 'ALL'.",
10137	//   "httpMethod": "GET",
10138	//   "id": "games.scores.get",
10139	//   "parameterOrder": [
10140	//     "playerId",
10141	//     "leaderboardId",
10142	//     "timeSpan"
10143	//   ],
10144	//   "parameters": {
10145	//     "includeRankType": {
10146	//       "description": "The types of ranks to return. If the parameter is omitted, no ranks will be returned.",
10147	//       "enum": [
10148	//         "ALL",
10149	//         "PUBLIC",
10150	//         "SOCIAL"
10151	//       ],
10152	//       "enumDescriptions": [
10153	//         "Retrieve public and social ranks.",
10154	//         "Retrieve public ranks, if the player is sharing their gameplay activity publicly.",
10155	//         "Retrieve the social rank."
10156	//       ],
10157	//       "location": "query",
10158	//       "type": "string"
10159	//     },
10160	//     "language": {
10161	//       "description": "The preferred language to use for strings returned by this method.",
10162	//       "location": "query",
10163	//       "type": "string"
10164	//     },
10165	//     "leaderboardId": {
10166	//       "description": "The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application.",
10167	//       "location": "path",
10168	//       "required": true,
10169	//       "type": "string"
10170	//     },
10171	//     "maxResults": {
10172	//       "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.",
10173	//       "format": "int32",
10174	//       "location": "query",
10175	//       "maximum": "30",
10176	//       "minimum": "1",
10177	//       "type": "integer"
10178	//     },
10179	//     "pageToken": {
10180	//       "description": "The token returned by the previous request.",
10181	//       "location": "query",
10182	//       "type": "string"
10183	//     },
10184	//     "playerId": {
10185	//       "description": "A player ID. A value of me may be used in place of the authenticated player's ID.",
10186	//       "location": "path",
10187	//       "required": true,
10188	//       "type": "string"
10189	//     },
10190	//     "timeSpan": {
10191	//       "description": "The time span for the scores and ranks you're requesting.",
10192	//       "enum": [
10193	//         "ALL",
10194	//         "ALL_TIME",
10195	//         "DAILY",
10196	//         "WEEKLY"
10197	//       ],
10198	//       "enumDescriptions": [
10199	//         "Get the high scores for all time spans. If this is used, maxResults values will be ignored.",
10200	//         "Get the all time high score.",
10201	//         "List the top scores for the current day.",
10202	//         "List the top scores for the current week."
10203	//       ],
10204	//       "location": "path",
10205	//       "required": true,
10206	//       "type": "string"
10207	//     }
10208	//   },
10209	//   "path": "players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}",
10210	//   "response": {
10211	//     "$ref": "PlayerLeaderboardScoreListResponse"
10212	//   },
10213	//   "scopes": [
10214	//     "https://www.googleapis.com/auth/games",
10215	//     "https://www.googleapis.com/auth/plus.login"
10216	//   ]
10217	// }
10218
10219}
10220
10221// Pages invokes f for each page of results.
10222// A non-nil error returned from f will halt the iteration.
10223// The provided context supersedes any context provided to the Context method.
10224func (c *ScoresGetCall) Pages(ctx context.Context, f func(*PlayerLeaderboardScoreListResponse) error) error {
10225	c.ctx_ = ctx
10226	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10227	for {
10228		x, err := c.Do()
10229		if err != nil {
10230			return err
10231		}
10232		if err := f(x); err != nil {
10233			return err
10234		}
10235		if x.NextPageToken == "" {
10236			return nil
10237		}
10238		c.PageToken(x.NextPageToken)
10239	}
10240}
10241
10242// method id "games.scores.list":
10243
10244type ScoresListCall struct {
10245	s             *Service
10246	leaderboardId string
10247	collection    string
10248	urlParams_    gensupport.URLParams
10249	ifNoneMatch_  string
10250	ctx_          context.Context
10251	header_       http.Header
10252}
10253
10254// List: Lists the scores in a leaderboard, starting from the top.
10255func (r *ScoresService) List(leaderboardId string, collection string, timeSpan string) *ScoresListCall {
10256	c := &ScoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10257	c.leaderboardId = leaderboardId
10258	c.collection = collection
10259	c.urlParams_.Set("timeSpan", timeSpan)
10260	return c
10261}
10262
10263// Language sets the optional parameter "language": The preferred
10264// language to use for strings returned by this method.
10265func (c *ScoresListCall) Language(language string) *ScoresListCall {
10266	c.urlParams_.Set("language", language)
10267	return c
10268}
10269
10270// MaxResults sets the optional parameter "maxResults": The maximum
10271// number of leaderboard scores to return in the response. For any
10272// response, the actual number of leaderboard scores returned may be
10273// less than the specified maxResults.
10274func (c *ScoresListCall) MaxResults(maxResults int64) *ScoresListCall {
10275	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10276	return c
10277}
10278
10279// PageToken sets the optional parameter "pageToken": The token returned
10280// by the previous request.
10281func (c *ScoresListCall) PageToken(pageToken string) *ScoresListCall {
10282	c.urlParams_.Set("pageToken", pageToken)
10283	return c
10284}
10285
10286// Fields allows partial responses to be retrieved. See
10287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10288// for more information.
10289func (c *ScoresListCall) Fields(s ...googleapi.Field) *ScoresListCall {
10290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10291	return c
10292}
10293
10294// IfNoneMatch sets the optional parameter which makes the operation
10295// fail if the object's ETag matches the given value. This is useful for
10296// getting updates only after the object has changed since the last
10297// request. Use googleapi.IsNotModified to check whether the response
10298// error from Do is the result of In-None-Match.
10299func (c *ScoresListCall) IfNoneMatch(entityTag string) *ScoresListCall {
10300	c.ifNoneMatch_ = entityTag
10301	return c
10302}
10303
10304// Context sets the context to be used in this call's Do method. Any
10305// pending HTTP request will be aborted if the provided context is
10306// canceled.
10307func (c *ScoresListCall) Context(ctx context.Context) *ScoresListCall {
10308	c.ctx_ = ctx
10309	return c
10310}
10311
10312// Header returns an http.Header that can be modified by the caller to
10313// add HTTP headers to the request.
10314func (c *ScoresListCall) Header() http.Header {
10315	if c.header_ == nil {
10316		c.header_ = make(http.Header)
10317	}
10318	return c.header_
10319}
10320
10321func (c *ScoresListCall) doRequest(alt string) (*http.Response, error) {
10322	reqHeaders := make(http.Header)
10323	for k, v := range c.header_ {
10324		reqHeaders[k] = v
10325	}
10326	reqHeaders.Set("User-Agent", c.s.userAgent())
10327	if c.ifNoneMatch_ != "" {
10328		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10329	}
10330	var body io.Reader = nil
10331	c.urlParams_.Set("alt", alt)
10332	urls := googleapi.ResolveRelative(c.s.BasePath, "leaderboards/{leaderboardId}/scores/{collection}")
10333	urls += "?" + c.urlParams_.Encode()
10334	req, _ := http.NewRequest("GET", urls, body)
10335	req.Header = reqHeaders
10336	googleapi.Expand(req.URL, map[string]string{
10337		"leaderboardId": c.leaderboardId,
10338		"collection":    c.collection,
10339	})
10340	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10341}
10342
10343// Do executes the "games.scores.list" call.
10344// Exactly one of *LeaderboardScores or error will be non-nil. Any
10345// non-2xx status code is an error. Response headers are in either
10346// *LeaderboardScores.ServerResponse.Header or (if a response was
10347// returned at all) in error.(*googleapi.Error).Header. Use
10348// googleapi.IsNotModified to check whether the returned error was
10349// because http.StatusNotModified was returned.
10350func (c *ScoresListCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, error) {
10351	gensupport.SetOptions(c.urlParams_, opts...)
10352	res, err := c.doRequest("json")
10353	if res != nil && res.StatusCode == http.StatusNotModified {
10354		if res.Body != nil {
10355			res.Body.Close()
10356		}
10357		return nil, &googleapi.Error{
10358			Code:   res.StatusCode,
10359			Header: res.Header,
10360		}
10361	}
10362	if err != nil {
10363		return nil, err
10364	}
10365	defer googleapi.CloseBody(res)
10366	if err := googleapi.CheckResponse(res); err != nil {
10367		return nil, err
10368	}
10369	ret := &LeaderboardScores{
10370		ServerResponse: googleapi.ServerResponse{
10371			Header:         res.Header,
10372			HTTPStatusCode: res.StatusCode,
10373		},
10374	}
10375	target := &ret
10376	if err := gensupport.DecodeResponse(target, res); err != nil {
10377		return nil, err
10378	}
10379	return ret, nil
10380	// {
10381	//   "description": "Lists the scores in a leaderboard, starting from the top.",
10382	//   "httpMethod": "GET",
10383	//   "id": "games.scores.list",
10384	//   "parameterOrder": [
10385	//     "leaderboardId",
10386	//     "collection",
10387	//     "timeSpan"
10388	//   ],
10389	//   "parameters": {
10390	//     "collection": {
10391	//       "description": "The collection of scores you're requesting.",
10392	//       "enum": [
10393	//         "PUBLIC",
10394	//         "SOCIAL",
10395	//         "SOCIAL_1P"
10396	//       ],
10397	//       "enumDescriptions": [
10398	//         "List all scores in the public leaderboard.",
10399	//         "List only social scores.",
10400	//         "List only social scores, not respecting the fACL."
10401	//       ],
10402	//       "location": "path",
10403	//       "required": true,
10404	//       "type": "string"
10405	//     },
10406	//     "language": {
10407	//       "description": "The preferred language to use for strings returned by this method.",
10408	//       "location": "query",
10409	//       "type": "string"
10410	//     },
10411	//     "leaderboardId": {
10412	//       "description": "The ID of the leaderboard.",
10413	//       "location": "path",
10414	//       "required": true,
10415	//       "type": "string"
10416	//     },
10417	//     "maxResults": {
10418	//       "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.",
10419	//       "format": "int32",
10420	//       "location": "query",
10421	//       "maximum": "30",
10422	//       "minimum": "1",
10423	//       "type": "integer"
10424	//     },
10425	//     "pageToken": {
10426	//       "description": "The token returned by the previous request.",
10427	//       "location": "query",
10428	//       "type": "string"
10429	//     },
10430	//     "timeSpan": {
10431	//       "description": "The time span for the scores and ranks you're requesting.",
10432	//       "enum": [
10433	//         "ALL_TIME",
10434	//         "DAILY",
10435	//         "WEEKLY"
10436	//       ],
10437	//       "enumDescriptions": [
10438	//         "List the all-time top scores.",
10439	//         "List the top scores for the current day.",
10440	//         "List the top scores for the current week."
10441	//       ],
10442	//       "location": "query",
10443	//       "required": true,
10444	//       "type": "string"
10445	//     }
10446	//   },
10447	//   "path": "leaderboards/{leaderboardId}/scores/{collection}",
10448	//   "response": {
10449	//     "$ref": "LeaderboardScores"
10450	//   },
10451	//   "scopes": [
10452	//     "https://www.googleapis.com/auth/games",
10453	//     "https://www.googleapis.com/auth/plus.login"
10454	//   ]
10455	// }
10456
10457}
10458
10459// Pages invokes f for each page of results.
10460// A non-nil error returned from f will halt the iteration.
10461// The provided context supersedes any context provided to the Context method.
10462func (c *ScoresListCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
10463	c.ctx_ = ctx
10464	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10465	for {
10466		x, err := c.Do()
10467		if err != nil {
10468			return err
10469		}
10470		if err := f(x); err != nil {
10471			return err
10472		}
10473		if x.NextPageToken == "" {
10474			return nil
10475		}
10476		c.PageToken(x.NextPageToken)
10477	}
10478}
10479
10480// method id "games.scores.listWindow":
10481
10482type ScoresListWindowCall struct {
10483	s             *Service
10484	leaderboardId string
10485	collection    string
10486	urlParams_    gensupport.URLParams
10487	ifNoneMatch_  string
10488	ctx_          context.Context
10489	header_       http.Header
10490}
10491
10492// ListWindow: Lists the scores in a leaderboard around (and including)
10493// a player's score.
10494func (r *ScoresService) ListWindow(leaderboardId string, collection string, timeSpan string) *ScoresListWindowCall {
10495	c := &ScoresListWindowCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10496	c.leaderboardId = leaderboardId
10497	c.collection = collection
10498	c.urlParams_.Set("timeSpan", timeSpan)
10499	return c
10500}
10501
10502// Language sets the optional parameter "language": The preferred
10503// language to use for strings returned by this method.
10504func (c *ScoresListWindowCall) Language(language string) *ScoresListWindowCall {
10505	c.urlParams_.Set("language", language)
10506	return c
10507}
10508
10509// MaxResults sets the optional parameter "maxResults": The maximum
10510// number of leaderboard scores to return in the response. For any
10511// response, the actual number of leaderboard scores returned may be
10512// less than the specified maxResults.
10513func (c *ScoresListWindowCall) MaxResults(maxResults int64) *ScoresListWindowCall {
10514	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10515	return c
10516}
10517
10518// PageToken sets the optional parameter "pageToken": The token returned
10519// by the previous request.
10520func (c *ScoresListWindowCall) PageToken(pageToken string) *ScoresListWindowCall {
10521	c.urlParams_.Set("pageToken", pageToken)
10522	return c
10523}
10524
10525// ResultsAbove sets the optional parameter "resultsAbove": The
10526// preferred number of scores to return above the player's score. More
10527// scores may be returned if the player is at the bottom of the
10528// leaderboard; fewer may be returned if the player is at the top. Must
10529// be less than or equal to maxResults.
10530func (c *ScoresListWindowCall) ResultsAbove(resultsAbove int64) *ScoresListWindowCall {
10531	c.urlParams_.Set("resultsAbove", fmt.Sprint(resultsAbove))
10532	return c
10533}
10534
10535// ReturnTopIfAbsent sets the optional parameter "returnTopIfAbsent":
10536// True if the top scores should be returned when the player is not in
10537// the leaderboard. Defaults to true.
10538func (c *ScoresListWindowCall) ReturnTopIfAbsent(returnTopIfAbsent bool) *ScoresListWindowCall {
10539	c.urlParams_.Set("returnTopIfAbsent", fmt.Sprint(returnTopIfAbsent))
10540	return c
10541}
10542
10543// Fields allows partial responses to be retrieved. See
10544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10545// for more information.
10546func (c *ScoresListWindowCall) Fields(s ...googleapi.Field) *ScoresListWindowCall {
10547	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10548	return c
10549}
10550
10551// IfNoneMatch sets the optional parameter which makes the operation
10552// fail if the object's ETag matches the given value. This is useful for
10553// getting updates only after the object has changed since the last
10554// request. Use googleapi.IsNotModified to check whether the response
10555// error from Do is the result of In-None-Match.
10556func (c *ScoresListWindowCall) IfNoneMatch(entityTag string) *ScoresListWindowCall {
10557	c.ifNoneMatch_ = entityTag
10558	return c
10559}
10560
10561// Context sets the context to be used in this call's Do method. Any
10562// pending HTTP request will be aborted if the provided context is
10563// canceled.
10564func (c *ScoresListWindowCall) Context(ctx context.Context) *ScoresListWindowCall {
10565	c.ctx_ = ctx
10566	return c
10567}
10568
10569// Header returns an http.Header that can be modified by the caller to
10570// add HTTP headers to the request.
10571func (c *ScoresListWindowCall) Header() http.Header {
10572	if c.header_ == nil {
10573		c.header_ = make(http.Header)
10574	}
10575	return c.header_
10576}
10577
10578func (c *ScoresListWindowCall) doRequest(alt string) (*http.Response, error) {
10579	reqHeaders := make(http.Header)
10580	for k, v := range c.header_ {
10581		reqHeaders[k] = v
10582	}
10583	reqHeaders.Set("User-Agent", c.s.userAgent())
10584	if c.ifNoneMatch_ != "" {
10585		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10586	}
10587	var body io.Reader = nil
10588	c.urlParams_.Set("alt", alt)
10589	urls := googleapi.ResolveRelative(c.s.BasePath, "leaderboards/{leaderboardId}/window/{collection}")
10590	urls += "?" + c.urlParams_.Encode()
10591	req, _ := http.NewRequest("GET", urls, body)
10592	req.Header = reqHeaders
10593	googleapi.Expand(req.URL, map[string]string{
10594		"leaderboardId": c.leaderboardId,
10595		"collection":    c.collection,
10596	})
10597	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10598}
10599
10600// Do executes the "games.scores.listWindow" call.
10601// Exactly one of *LeaderboardScores or error will be non-nil. Any
10602// non-2xx status code is an error. Response headers are in either
10603// *LeaderboardScores.ServerResponse.Header or (if a response was
10604// returned at all) in error.(*googleapi.Error).Header. Use
10605// googleapi.IsNotModified to check whether the returned error was
10606// because http.StatusNotModified was returned.
10607func (c *ScoresListWindowCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, error) {
10608	gensupport.SetOptions(c.urlParams_, opts...)
10609	res, err := c.doRequest("json")
10610	if res != nil && res.StatusCode == http.StatusNotModified {
10611		if res.Body != nil {
10612			res.Body.Close()
10613		}
10614		return nil, &googleapi.Error{
10615			Code:   res.StatusCode,
10616			Header: res.Header,
10617		}
10618	}
10619	if err != nil {
10620		return nil, err
10621	}
10622	defer googleapi.CloseBody(res)
10623	if err := googleapi.CheckResponse(res); err != nil {
10624		return nil, err
10625	}
10626	ret := &LeaderboardScores{
10627		ServerResponse: googleapi.ServerResponse{
10628			Header:         res.Header,
10629			HTTPStatusCode: res.StatusCode,
10630		},
10631	}
10632	target := &ret
10633	if err := gensupport.DecodeResponse(target, res); err != nil {
10634		return nil, err
10635	}
10636	return ret, nil
10637	// {
10638	//   "description": "Lists the scores in a leaderboard around (and including) a player's score.",
10639	//   "httpMethod": "GET",
10640	//   "id": "games.scores.listWindow",
10641	//   "parameterOrder": [
10642	//     "leaderboardId",
10643	//     "collection",
10644	//     "timeSpan"
10645	//   ],
10646	//   "parameters": {
10647	//     "collection": {
10648	//       "description": "The collection of scores you're requesting.",
10649	//       "enum": [
10650	//         "PUBLIC",
10651	//         "SOCIAL",
10652	//         "SOCIAL_1P"
10653	//       ],
10654	//       "enumDescriptions": [
10655	//         "List all scores in the public leaderboard.",
10656	//         "List only social scores.",
10657	//         "List only social scores, not respecting the fACL."
10658	//       ],
10659	//       "location": "path",
10660	//       "required": true,
10661	//       "type": "string"
10662	//     },
10663	//     "language": {
10664	//       "description": "The preferred language to use for strings returned by this method.",
10665	//       "location": "query",
10666	//       "type": "string"
10667	//     },
10668	//     "leaderboardId": {
10669	//       "description": "The ID of the leaderboard.",
10670	//       "location": "path",
10671	//       "required": true,
10672	//       "type": "string"
10673	//     },
10674	//     "maxResults": {
10675	//       "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.",
10676	//       "format": "int32",
10677	//       "location": "query",
10678	//       "maximum": "30",
10679	//       "minimum": "1",
10680	//       "type": "integer"
10681	//     },
10682	//     "pageToken": {
10683	//       "description": "The token returned by the previous request.",
10684	//       "location": "query",
10685	//       "type": "string"
10686	//     },
10687	//     "resultsAbove": {
10688	//       "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.",
10689	//       "format": "int32",
10690	//       "location": "query",
10691	//       "type": "integer"
10692	//     },
10693	//     "returnTopIfAbsent": {
10694	//       "description": "True if the top scores should be returned when the player is not in the leaderboard. Defaults to true.",
10695	//       "location": "query",
10696	//       "type": "boolean"
10697	//     },
10698	//     "timeSpan": {
10699	//       "description": "The time span for the scores and ranks you're requesting.",
10700	//       "enum": [
10701	//         "ALL_TIME",
10702	//         "DAILY",
10703	//         "WEEKLY"
10704	//       ],
10705	//       "enumDescriptions": [
10706	//         "List the all-time top scores.",
10707	//         "List the top scores for the current day.",
10708	//         "List the top scores for the current week."
10709	//       ],
10710	//       "location": "query",
10711	//       "required": true,
10712	//       "type": "string"
10713	//     }
10714	//   },
10715	//   "path": "leaderboards/{leaderboardId}/window/{collection}",
10716	//   "response": {
10717	//     "$ref": "LeaderboardScores"
10718	//   },
10719	//   "scopes": [
10720	//     "https://www.googleapis.com/auth/games",
10721	//     "https://www.googleapis.com/auth/plus.login"
10722	//   ]
10723	// }
10724
10725}
10726
10727// Pages invokes f for each page of results.
10728// A non-nil error returned from f will halt the iteration.
10729// The provided context supersedes any context provided to the Context method.
10730func (c *ScoresListWindowCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
10731	c.ctx_ = ctx
10732	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10733	for {
10734		x, err := c.Do()
10735		if err != nil {
10736			return err
10737		}
10738		if err := f(x); err != nil {
10739			return err
10740		}
10741		if x.NextPageToken == "" {
10742			return nil
10743		}
10744		c.PageToken(x.NextPageToken)
10745	}
10746}
10747
10748// method id "games.scores.submit":
10749
10750type ScoresSubmitCall struct {
10751	s             *Service
10752	leaderboardId string
10753	urlParams_    gensupport.URLParams
10754	ctx_          context.Context
10755	header_       http.Header
10756}
10757
10758// Submit: Submits a score to the specified leaderboard.
10759func (r *ScoresService) Submit(leaderboardId string, score int64) *ScoresSubmitCall {
10760	c := &ScoresSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10761	c.leaderboardId = leaderboardId
10762	c.urlParams_.Set("score", fmt.Sprint(score))
10763	return c
10764}
10765
10766// Language sets the optional parameter "language": The preferred
10767// language to use for strings returned by this method.
10768func (c *ScoresSubmitCall) Language(language string) *ScoresSubmitCall {
10769	c.urlParams_.Set("language", language)
10770	return c
10771}
10772
10773// ScoreTag sets the optional parameter "scoreTag": Additional
10774// information about the score you're submitting. Values must contain no
10775// more than 64 URI-safe characters as defined by section 2.3 of RFC
10776// 3986.
10777func (c *ScoresSubmitCall) ScoreTag(scoreTag string) *ScoresSubmitCall {
10778	c.urlParams_.Set("scoreTag", scoreTag)
10779	return c
10780}
10781
10782// Fields allows partial responses to be retrieved. See
10783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10784// for more information.
10785func (c *ScoresSubmitCall) Fields(s ...googleapi.Field) *ScoresSubmitCall {
10786	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10787	return c
10788}
10789
10790// Context sets the context to be used in this call's Do method. Any
10791// pending HTTP request will be aborted if the provided context is
10792// canceled.
10793func (c *ScoresSubmitCall) Context(ctx context.Context) *ScoresSubmitCall {
10794	c.ctx_ = ctx
10795	return c
10796}
10797
10798// Header returns an http.Header that can be modified by the caller to
10799// add HTTP headers to the request.
10800func (c *ScoresSubmitCall) Header() http.Header {
10801	if c.header_ == nil {
10802		c.header_ = make(http.Header)
10803	}
10804	return c.header_
10805}
10806
10807func (c *ScoresSubmitCall) doRequest(alt string) (*http.Response, error) {
10808	reqHeaders := make(http.Header)
10809	for k, v := range c.header_ {
10810		reqHeaders[k] = v
10811	}
10812	reqHeaders.Set("User-Agent", c.s.userAgent())
10813	var body io.Reader = nil
10814	c.urlParams_.Set("alt", alt)
10815	urls := googleapi.ResolveRelative(c.s.BasePath, "leaderboards/{leaderboardId}/scores")
10816	urls += "?" + c.urlParams_.Encode()
10817	req, _ := http.NewRequest("POST", urls, body)
10818	req.Header = reqHeaders
10819	googleapi.Expand(req.URL, map[string]string{
10820		"leaderboardId": c.leaderboardId,
10821	})
10822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10823}
10824
10825// Do executes the "games.scores.submit" call.
10826// Exactly one of *PlayerScoreResponse or error will be non-nil. Any
10827// non-2xx status code is an error. Response headers are in either
10828// *PlayerScoreResponse.ServerResponse.Header or (if a response was
10829// returned at all) in error.(*googleapi.Error).Header. Use
10830// googleapi.IsNotModified to check whether the returned error was
10831// because http.StatusNotModified was returned.
10832func (c *ScoresSubmitCall) Do(opts ...googleapi.CallOption) (*PlayerScoreResponse, error) {
10833	gensupport.SetOptions(c.urlParams_, opts...)
10834	res, err := c.doRequest("json")
10835	if res != nil && res.StatusCode == http.StatusNotModified {
10836		if res.Body != nil {
10837			res.Body.Close()
10838		}
10839		return nil, &googleapi.Error{
10840			Code:   res.StatusCode,
10841			Header: res.Header,
10842		}
10843	}
10844	if err != nil {
10845		return nil, err
10846	}
10847	defer googleapi.CloseBody(res)
10848	if err := googleapi.CheckResponse(res); err != nil {
10849		return nil, err
10850	}
10851	ret := &PlayerScoreResponse{
10852		ServerResponse: googleapi.ServerResponse{
10853			Header:         res.Header,
10854			HTTPStatusCode: res.StatusCode,
10855		},
10856	}
10857	target := &ret
10858	if err := gensupport.DecodeResponse(target, res); err != nil {
10859		return nil, err
10860	}
10861	return ret, nil
10862	// {
10863	//   "description": "Submits a score to the specified leaderboard.",
10864	//   "httpMethod": "POST",
10865	//   "id": "games.scores.submit",
10866	//   "parameterOrder": [
10867	//     "leaderboardId",
10868	//     "score"
10869	//   ],
10870	//   "parameters": {
10871	//     "language": {
10872	//       "description": "The preferred language to use for strings returned by this method.",
10873	//       "location": "query",
10874	//       "type": "string"
10875	//     },
10876	//     "leaderboardId": {
10877	//       "description": "The ID of the leaderboard.",
10878	//       "location": "path",
10879	//       "required": true,
10880	//       "type": "string"
10881	//     },
10882	//     "score": {
10883	//       "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.",
10884	//       "format": "int64",
10885	//       "location": "query",
10886	//       "required": true,
10887	//       "type": "string"
10888	//     },
10889	//     "scoreTag": {
10890	//       "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.",
10891	//       "location": "query",
10892	//       "pattern": "[a-zA-Z0-9-._~]{0,64}",
10893	//       "type": "string"
10894	//     }
10895	//   },
10896	//   "path": "leaderboards/{leaderboardId}/scores",
10897	//   "response": {
10898	//     "$ref": "PlayerScoreResponse"
10899	//   },
10900	//   "scopes": [
10901	//     "https://www.googleapis.com/auth/games",
10902	//     "https://www.googleapis.com/auth/plus.login"
10903	//   ]
10904	// }
10905
10906}
10907
10908// method id "games.scores.submitMultiple":
10909
10910type ScoresSubmitMultipleCall struct {
10911	s                         *Service
10912	playerscoresubmissionlist *PlayerScoreSubmissionList
10913	urlParams_                gensupport.URLParams
10914	ctx_                      context.Context
10915	header_                   http.Header
10916}
10917
10918// SubmitMultiple: Submits multiple scores to leaderboards.
10919func (r *ScoresService) SubmitMultiple(playerscoresubmissionlist *PlayerScoreSubmissionList) *ScoresSubmitMultipleCall {
10920	c := &ScoresSubmitMultipleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10921	c.playerscoresubmissionlist = playerscoresubmissionlist
10922	return c
10923}
10924
10925// Language sets the optional parameter "language": The preferred
10926// language to use for strings returned by this method.
10927func (c *ScoresSubmitMultipleCall) Language(language string) *ScoresSubmitMultipleCall {
10928	c.urlParams_.Set("language", language)
10929	return c
10930}
10931
10932// Fields allows partial responses to be retrieved. See
10933// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10934// for more information.
10935func (c *ScoresSubmitMultipleCall) Fields(s ...googleapi.Field) *ScoresSubmitMultipleCall {
10936	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10937	return c
10938}
10939
10940// Context sets the context to be used in this call's Do method. Any
10941// pending HTTP request will be aborted if the provided context is
10942// canceled.
10943func (c *ScoresSubmitMultipleCall) Context(ctx context.Context) *ScoresSubmitMultipleCall {
10944	c.ctx_ = ctx
10945	return c
10946}
10947
10948// Header returns an http.Header that can be modified by the caller to
10949// add HTTP headers to the request.
10950func (c *ScoresSubmitMultipleCall) Header() http.Header {
10951	if c.header_ == nil {
10952		c.header_ = make(http.Header)
10953	}
10954	return c.header_
10955}
10956
10957func (c *ScoresSubmitMultipleCall) doRequest(alt string) (*http.Response, error) {
10958	reqHeaders := make(http.Header)
10959	for k, v := range c.header_ {
10960		reqHeaders[k] = v
10961	}
10962	reqHeaders.Set("User-Agent", c.s.userAgent())
10963	var body io.Reader = nil
10964	body, err := googleapi.WithoutDataWrapper.JSONReader(c.playerscoresubmissionlist)
10965	if err != nil {
10966		return nil, err
10967	}
10968	reqHeaders.Set("Content-Type", "application/json")
10969	c.urlParams_.Set("alt", alt)
10970	urls := googleapi.ResolveRelative(c.s.BasePath, "leaderboards/scores")
10971	urls += "?" + c.urlParams_.Encode()
10972	req, _ := http.NewRequest("POST", urls, body)
10973	req.Header = reqHeaders
10974	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10975}
10976
10977// Do executes the "games.scores.submitMultiple" call.
10978// Exactly one of *PlayerScoreListResponse or error will be non-nil. Any
10979// non-2xx status code is an error. Response headers are in either
10980// *PlayerScoreListResponse.ServerResponse.Header or (if a response was
10981// returned at all) in error.(*googleapi.Error).Header. Use
10982// googleapi.IsNotModified to check whether the returned error was
10983// because http.StatusNotModified was returned.
10984func (c *ScoresSubmitMultipleCall) Do(opts ...googleapi.CallOption) (*PlayerScoreListResponse, error) {
10985	gensupport.SetOptions(c.urlParams_, opts...)
10986	res, err := c.doRequest("json")
10987	if res != nil && res.StatusCode == http.StatusNotModified {
10988		if res.Body != nil {
10989			res.Body.Close()
10990		}
10991		return nil, &googleapi.Error{
10992			Code:   res.StatusCode,
10993			Header: res.Header,
10994		}
10995	}
10996	if err != nil {
10997		return nil, err
10998	}
10999	defer googleapi.CloseBody(res)
11000	if err := googleapi.CheckResponse(res); err != nil {
11001		return nil, err
11002	}
11003	ret := &PlayerScoreListResponse{
11004		ServerResponse: googleapi.ServerResponse{
11005			Header:         res.Header,
11006			HTTPStatusCode: res.StatusCode,
11007		},
11008	}
11009	target := &ret
11010	if err := gensupport.DecodeResponse(target, res); err != nil {
11011		return nil, err
11012	}
11013	return ret, nil
11014	// {
11015	//   "description": "Submits multiple scores to leaderboards.",
11016	//   "httpMethod": "POST",
11017	//   "id": "games.scores.submitMultiple",
11018	//   "parameters": {
11019	//     "language": {
11020	//       "description": "The preferred language to use for strings returned by this method.",
11021	//       "location": "query",
11022	//       "type": "string"
11023	//     }
11024	//   },
11025	//   "path": "leaderboards/scores",
11026	//   "request": {
11027	//     "$ref": "PlayerScoreSubmissionList"
11028	//   },
11029	//   "response": {
11030	//     "$ref": "PlayerScoreListResponse"
11031	//   },
11032	//   "scopes": [
11033	//     "https://www.googleapis.com/auth/games",
11034	//     "https://www.googleapis.com/auth/plus.login"
11035	//   ]
11036	// }
11037
11038}
11039
11040// method id "games.snapshots.get":
11041
11042type SnapshotsGetCall struct {
11043	s            *Service
11044	snapshotId   string
11045	urlParams_   gensupport.URLParams
11046	ifNoneMatch_ string
11047	ctx_         context.Context
11048	header_      http.Header
11049}
11050
11051// Get: Retrieves the metadata for a given snapshot ID.
11052func (r *SnapshotsService) Get(snapshotId string) *SnapshotsGetCall {
11053	c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11054	c.snapshotId = snapshotId
11055	return c
11056}
11057
11058// Language sets the optional parameter "language": The preferred
11059// language to use for strings returned by this method.
11060func (c *SnapshotsGetCall) Language(language string) *SnapshotsGetCall {
11061	c.urlParams_.Set("language", language)
11062	return c
11063}
11064
11065// Fields allows partial responses to be retrieved. See
11066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11067// for more information.
11068func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall {
11069	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11070	return c
11071}
11072
11073// IfNoneMatch sets the optional parameter which makes the operation
11074// fail if the object's ETag matches the given value. This is useful for
11075// getting updates only after the object has changed since the last
11076// request. Use googleapi.IsNotModified to check whether the response
11077// error from Do is the result of In-None-Match.
11078func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall {
11079	c.ifNoneMatch_ = entityTag
11080	return c
11081}
11082
11083// Context sets the context to be used in this call's Do method. Any
11084// pending HTTP request will be aborted if the provided context is
11085// canceled.
11086func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
11087	c.ctx_ = ctx
11088	return c
11089}
11090
11091// Header returns an http.Header that can be modified by the caller to
11092// add HTTP headers to the request.
11093func (c *SnapshotsGetCall) Header() http.Header {
11094	if c.header_ == nil {
11095		c.header_ = make(http.Header)
11096	}
11097	return c.header_
11098}
11099
11100func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
11101	reqHeaders := make(http.Header)
11102	for k, v := range c.header_ {
11103		reqHeaders[k] = v
11104	}
11105	reqHeaders.Set("User-Agent", c.s.userAgent())
11106	if c.ifNoneMatch_ != "" {
11107		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11108	}
11109	var body io.Reader = nil
11110	c.urlParams_.Set("alt", alt)
11111	urls := googleapi.ResolveRelative(c.s.BasePath, "snapshots/{snapshotId}")
11112	urls += "?" + c.urlParams_.Encode()
11113	req, _ := http.NewRequest("GET", urls, body)
11114	req.Header = reqHeaders
11115	googleapi.Expand(req.URL, map[string]string{
11116		"snapshotId": c.snapshotId,
11117	})
11118	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11119}
11120
11121// Do executes the "games.snapshots.get" call.
11122// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
11123// code is an error. Response headers are in either
11124// *Snapshot.ServerResponse.Header or (if a response was returned at
11125// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11126// to check whether the returned error was because
11127// http.StatusNotModified was returned.
11128func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
11129	gensupport.SetOptions(c.urlParams_, opts...)
11130	res, err := c.doRequest("json")
11131	if res != nil && res.StatusCode == http.StatusNotModified {
11132		if res.Body != nil {
11133			res.Body.Close()
11134		}
11135		return nil, &googleapi.Error{
11136			Code:   res.StatusCode,
11137			Header: res.Header,
11138		}
11139	}
11140	if err != nil {
11141		return nil, err
11142	}
11143	defer googleapi.CloseBody(res)
11144	if err := googleapi.CheckResponse(res); err != nil {
11145		return nil, err
11146	}
11147	ret := &Snapshot{
11148		ServerResponse: googleapi.ServerResponse{
11149			Header:         res.Header,
11150			HTTPStatusCode: res.StatusCode,
11151		},
11152	}
11153	target := &ret
11154	if err := gensupport.DecodeResponse(target, res); err != nil {
11155		return nil, err
11156	}
11157	return ret, nil
11158	// {
11159	//   "description": "Retrieves the metadata for a given snapshot ID.",
11160	//   "httpMethod": "GET",
11161	//   "id": "games.snapshots.get",
11162	//   "parameterOrder": [
11163	//     "snapshotId"
11164	//   ],
11165	//   "parameters": {
11166	//     "language": {
11167	//       "description": "The preferred language to use for strings returned by this method.",
11168	//       "location": "query",
11169	//       "type": "string"
11170	//     },
11171	//     "snapshotId": {
11172	//       "description": "The ID of the snapshot.",
11173	//       "location": "path",
11174	//       "required": true,
11175	//       "type": "string"
11176	//     }
11177	//   },
11178	//   "path": "snapshots/{snapshotId}",
11179	//   "response": {
11180	//     "$ref": "Snapshot"
11181	//   },
11182	//   "scopes": [
11183	//     "https://www.googleapis.com/auth/drive.appdata",
11184	//     "https://www.googleapis.com/auth/games",
11185	//     "https://www.googleapis.com/auth/plus.login"
11186	//   ]
11187	// }
11188
11189}
11190
11191// method id "games.snapshots.list":
11192
11193type SnapshotsListCall struct {
11194	s            *Service
11195	playerId     string
11196	urlParams_   gensupport.URLParams
11197	ifNoneMatch_ string
11198	ctx_         context.Context
11199	header_      http.Header
11200}
11201
11202// List: Retrieves a list of snapshots created by your application for
11203// the player corresponding to the player ID.
11204func (r *SnapshotsService) List(playerId string) *SnapshotsListCall {
11205	c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11206	c.playerId = playerId
11207	return c
11208}
11209
11210// Language sets the optional parameter "language": The preferred
11211// language to use for strings returned by this method.
11212func (c *SnapshotsListCall) Language(language string) *SnapshotsListCall {
11213	c.urlParams_.Set("language", language)
11214	return c
11215}
11216
11217// MaxResults sets the optional parameter "maxResults": The maximum
11218// number of snapshot resources to return in the response, used for
11219// paging. For any response, the actual number of snapshot resources
11220// returned may be less than the specified maxResults.
11221func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall {
11222	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11223	return c
11224}
11225
11226// PageToken sets the optional parameter "pageToken": The token returned
11227// by the previous request.
11228func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall {
11229	c.urlParams_.Set("pageToken", pageToken)
11230	return c
11231}
11232
11233// Fields allows partial responses to be retrieved. See
11234// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11235// for more information.
11236func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall {
11237	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11238	return c
11239}
11240
11241// IfNoneMatch sets the optional parameter which makes the operation
11242// fail if the object's ETag matches the given value. This is useful for
11243// getting updates only after the object has changed since the last
11244// request. Use googleapi.IsNotModified to check whether the response
11245// error from Do is the result of In-None-Match.
11246func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall {
11247	c.ifNoneMatch_ = entityTag
11248	return c
11249}
11250
11251// Context sets the context to be used in this call's Do method. Any
11252// pending HTTP request will be aborted if the provided context is
11253// canceled.
11254func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
11255	c.ctx_ = ctx
11256	return c
11257}
11258
11259// Header returns an http.Header that can be modified by the caller to
11260// add HTTP headers to the request.
11261func (c *SnapshotsListCall) Header() http.Header {
11262	if c.header_ == nil {
11263		c.header_ = make(http.Header)
11264	}
11265	return c.header_
11266}
11267
11268func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
11269	reqHeaders := make(http.Header)
11270	for k, v := range c.header_ {
11271		reqHeaders[k] = v
11272	}
11273	reqHeaders.Set("User-Agent", c.s.userAgent())
11274	if c.ifNoneMatch_ != "" {
11275		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11276	}
11277	var body io.Reader = nil
11278	c.urlParams_.Set("alt", alt)
11279	urls := googleapi.ResolveRelative(c.s.BasePath, "players/{playerId}/snapshots")
11280	urls += "?" + c.urlParams_.Encode()
11281	req, _ := http.NewRequest("GET", urls, body)
11282	req.Header = reqHeaders
11283	googleapi.Expand(req.URL, map[string]string{
11284		"playerId": c.playerId,
11285	})
11286	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11287}
11288
11289// Do executes the "games.snapshots.list" call.
11290// Exactly one of *SnapshotListResponse or error will be non-nil. Any
11291// non-2xx status code is an error. Response headers are in either
11292// *SnapshotListResponse.ServerResponse.Header or (if a response was
11293// returned at all) in error.(*googleapi.Error).Header. Use
11294// googleapi.IsNotModified to check whether the returned error was
11295// because http.StatusNotModified was returned.
11296func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotListResponse, error) {
11297	gensupport.SetOptions(c.urlParams_, opts...)
11298	res, err := c.doRequest("json")
11299	if res != nil && res.StatusCode == http.StatusNotModified {
11300		if res.Body != nil {
11301			res.Body.Close()
11302		}
11303		return nil, &googleapi.Error{
11304			Code:   res.StatusCode,
11305			Header: res.Header,
11306		}
11307	}
11308	if err != nil {
11309		return nil, err
11310	}
11311	defer googleapi.CloseBody(res)
11312	if err := googleapi.CheckResponse(res); err != nil {
11313		return nil, err
11314	}
11315	ret := &SnapshotListResponse{
11316		ServerResponse: googleapi.ServerResponse{
11317			Header:         res.Header,
11318			HTTPStatusCode: res.StatusCode,
11319		},
11320	}
11321	target := &ret
11322	if err := gensupport.DecodeResponse(target, res); err != nil {
11323		return nil, err
11324	}
11325	return ret, nil
11326	// {
11327	//   "description": "Retrieves a list of snapshots created by your application for the player corresponding to the player ID.",
11328	//   "httpMethod": "GET",
11329	//   "id": "games.snapshots.list",
11330	//   "parameterOrder": [
11331	//     "playerId"
11332	//   ],
11333	//   "parameters": {
11334	//     "language": {
11335	//       "description": "The preferred language to use for strings returned by this method.",
11336	//       "location": "query",
11337	//       "type": "string"
11338	//     },
11339	//     "maxResults": {
11340	//       "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.",
11341	//       "format": "int32",
11342	//       "location": "query",
11343	//       "maximum": "25",
11344	//       "minimum": "1",
11345	//       "type": "integer"
11346	//     },
11347	//     "pageToken": {
11348	//       "description": "The token returned by the previous request.",
11349	//       "location": "query",
11350	//       "type": "string"
11351	//     },
11352	//     "playerId": {
11353	//       "description": "A player ID. A value of me may be used in place of the authenticated player's ID.",
11354	//       "location": "path",
11355	//       "required": true,
11356	//       "type": "string"
11357	//     }
11358	//   },
11359	//   "path": "players/{playerId}/snapshots",
11360	//   "response": {
11361	//     "$ref": "SnapshotListResponse"
11362	//   },
11363	//   "scopes": [
11364	//     "https://www.googleapis.com/auth/drive.appdata",
11365	//     "https://www.googleapis.com/auth/games",
11366	//     "https://www.googleapis.com/auth/plus.login"
11367	//   ]
11368	// }
11369
11370}
11371
11372// Pages invokes f for each page of results.
11373// A non-nil error returned from f will halt the iteration.
11374// The provided context supersedes any context provided to the Context method.
11375func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotListResponse) error) error {
11376	c.ctx_ = ctx
11377	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11378	for {
11379		x, err := c.Do()
11380		if err != nil {
11381			return err
11382		}
11383		if err := f(x); err != nil {
11384			return err
11385		}
11386		if x.NextPageToken == "" {
11387			return nil
11388		}
11389		c.PageToken(x.NextPageToken)
11390	}
11391}
11392
11393// method id "games.turnBasedMatches.cancel":
11394
11395type TurnBasedMatchesCancelCall struct {
11396	s          *Service
11397	matchId    string
11398	urlParams_ gensupport.URLParams
11399	ctx_       context.Context
11400	header_    http.Header
11401}
11402
11403// Cancel: Cancel a turn-based match.
11404func (r *TurnBasedMatchesService) Cancel(matchId string) *TurnBasedMatchesCancelCall {
11405	c := &TurnBasedMatchesCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11406	c.matchId = matchId
11407	return c
11408}
11409
11410// Fields allows partial responses to be retrieved. See
11411// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11412// for more information.
11413func (c *TurnBasedMatchesCancelCall) Fields(s ...googleapi.Field) *TurnBasedMatchesCancelCall {
11414	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11415	return c
11416}
11417
11418// Context sets the context to be used in this call's Do method. Any
11419// pending HTTP request will be aborted if the provided context is
11420// canceled.
11421func (c *TurnBasedMatchesCancelCall) Context(ctx context.Context) *TurnBasedMatchesCancelCall {
11422	c.ctx_ = ctx
11423	return c
11424}
11425
11426// Header returns an http.Header that can be modified by the caller to
11427// add HTTP headers to the request.
11428func (c *TurnBasedMatchesCancelCall) Header() http.Header {
11429	if c.header_ == nil {
11430		c.header_ = make(http.Header)
11431	}
11432	return c.header_
11433}
11434
11435func (c *TurnBasedMatchesCancelCall) doRequest(alt string) (*http.Response, error) {
11436	reqHeaders := make(http.Header)
11437	for k, v := range c.header_ {
11438		reqHeaders[k] = v
11439	}
11440	reqHeaders.Set("User-Agent", c.s.userAgent())
11441	var body io.Reader = nil
11442	c.urlParams_.Set("alt", alt)
11443	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/cancel")
11444	urls += "?" + c.urlParams_.Encode()
11445	req, _ := http.NewRequest("PUT", urls, body)
11446	req.Header = reqHeaders
11447	googleapi.Expand(req.URL, map[string]string{
11448		"matchId": c.matchId,
11449	})
11450	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11451}
11452
11453// Do executes the "games.turnBasedMatches.cancel" call.
11454func (c *TurnBasedMatchesCancelCall) Do(opts ...googleapi.CallOption) error {
11455	gensupport.SetOptions(c.urlParams_, opts...)
11456	res, err := c.doRequest("json")
11457	if err != nil {
11458		return err
11459	}
11460	defer googleapi.CloseBody(res)
11461	if err := googleapi.CheckResponse(res); err != nil {
11462		return err
11463	}
11464	return nil
11465	// {
11466	//   "description": "Cancel a turn-based match.",
11467	//   "httpMethod": "PUT",
11468	//   "id": "games.turnBasedMatches.cancel",
11469	//   "parameterOrder": [
11470	//     "matchId"
11471	//   ],
11472	//   "parameters": {
11473	//     "matchId": {
11474	//       "description": "The ID of the match.",
11475	//       "location": "path",
11476	//       "required": true,
11477	//       "type": "string"
11478	//     }
11479	//   },
11480	//   "path": "turnbasedmatches/{matchId}/cancel",
11481	//   "scopes": [
11482	//     "https://www.googleapis.com/auth/games",
11483	//     "https://www.googleapis.com/auth/plus.login"
11484	//   ]
11485	// }
11486
11487}
11488
11489// method id "games.turnBasedMatches.create":
11490
11491type TurnBasedMatchesCreateCall struct {
11492	s                           *Service
11493	turnbasedmatchcreaterequest *TurnBasedMatchCreateRequest
11494	urlParams_                  gensupport.URLParams
11495	ctx_                        context.Context
11496	header_                     http.Header
11497}
11498
11499// Create: Create a turn-based match.
11500func (r *TurnBasedMatchesService) Create(turnbasedmatchcreaterequest *TurnBasedMatchCreateRequest) *TurnBasedMatchesCreateCall {
11501	c := &TurnBasedMatchesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11502	c.turnbasedmatchcreaterequest = turnbasedmatchcreaterequest
11503	return c
11504}
11505
11506// Language sets the optional parameter "language": The preferred
11507// language to use for strings returned by this method.
11508func (c *TurnBasedMatchesCreateCall) Language(language string) *TurnBasedMatchesCreateCall {
11509	c.urlParams_.Set("language", language)
11510	return c
11511}
11512
11513// Fields allows partial responses to be retrieved. See
11514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11515// for more information.
11516func (c *TurnBasedMatchesCreateCall) Fields(s ...googleapi.Field) *TurnBasedMatchesCreateCall {
11517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11518	return c
11519}
11520
11521// Context sets the context to be used in this call's Do method. Any
11522// pending HTTP request will be aborted if the provided context is
11523// canceled.
11524func (c *TurnBasedMatchesCreateCall) Context(ctx context.Context) *TurnBasedMatchesCreateCall {
11525	c.ctx_ = ctx
11526	return c
11527}
11528
11529// Header returns an http.Header that can be modified by the caller to
11530// add HTTP headers to the request.
11531func (c *TurnBasedMatchesCreateCall) Header() http.Header {
11532	if c.header_ == nil {
11533		c.header_ = make(http.Header)
11534	}
11535	return c.header_
11536}
11537
11538func (c *TurnBasedMatchesCreateCall) doRequest(alt string) (*http.Response, error) {
11539	reqHeaders := make(http.Header)
11540	for k, v := range c.header_ {
11541		reqHeaders[k] = v
11542	}
11543	reqHeaders.Set("User-Agent", c.s.userAgent())
11544	var body io.Reader = nil
11545	body, err := googleapi.WithoutDataWrapper.JSONReader(c.turnbasedmatchcreaterequest)
11546	if err != nil {
11547		return nil, err
11548	}
11549	reqHeaders.Set("Content-Type", "application/json")
11550	c.urlParams_.Set("alt", alt)
11551	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/create")
11552	urls += "?" + c.urlParams_.Encode()
11553	req, _ := http.NewRequest("POST", urls, body)
11554	req.Header = reqHeaders
11555	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11556}
11557
11558// Do executes the "games.turnBasedMatches.create" call.
11559// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
11560// status code is an error. Response headers are in either
11561// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
11562// at all) in error.(*googleapi.Error).Header. Use
11563// googleapi.IsNotModified to check whether the returned error was
11564// because http.StatusNotModified was returned.
11565func (c *TurnBasedMatchesCreateCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
11566	gensupport.SetOptions(c.urlParams_, opts...)
11567	res, err := c.doRequest("json")
11568	if res != nil && res.StatusCode == http.StatusNotModified {
11569		if res.Body != nil {
11570			res.Body.Close()
11571		}
11572		return nil, &googleapi.Error{
11573			Code:   res.StatusCode,
11574			Header: res.Header,
11575		}
11576	}
11577	if err != nil {
11578		return nil, err
11579	}
11580	defer googleapi.CloseBody(res)
11581	if err := googleapi.CheckResponse(res); err != nil {
11582		return nil, err
11583	}
11584	ret := &TurnBasedMatch{
11585		ServerResponse: googleapi.ServerResponse{
11586			Header:         res.Header,
11587			HTTPStatusCode: res.StatusCode,
11588		},
11589	}
11590	target := &ret
11591	if err := gensupport.DecodeResponse(target, res); err != nil {
11592		return nil, err
11593	}
11594	return ret, nil
11595	// {
11596	//   "description": "Create a turn-based match.",
11597	//   "httpMethod": "POST",
11598	//   "id": "games.turnBasedMatches.create",
11599	//   "parameters": {
11600	//     "language": {
11601	//       "description": "The preferred language to use for strings returned by this method.",
11602	//       "location": "query",
11603	//       "type": "string"
11604	//     }
11605	//   },
11606	//   "path": "turnbasedmatches/create",
11607	//   "request": {
11608	//     "$ref": "TurnBasedMatchCreateRequest"
11609	//   },
11610	//   "response": {
11611	//     "$ref": "TurnBasedMatch"
11612	//   },
11613	//   "scopes": [
11614	//     "https://www.googleapis.com/auth/games",
11615	//     "https://www.googleapis.com/auth/plus.login"
11616	//   ]
11617	// }
11618
11619}
11620
11621// method id "games.turnBasedMatches.decline":
11622
11623type TurnBasedMatchesDeclineCall struct {
11624	s          *Service
11625	matchId    string
11626	urlParams_ gensupport.URLParams
11627	ctx_       context.Context
11628	header_    http.Header
11629}
11630
11631// Decline: Decline an invitation to play a turn-based match.
11632func (r *TurnBasedMatchesService) Decline(matchId string) *TurnBasedMatchesDeclineCall {
11633	c := &TurnBasedMatchesDeclineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11634	c.matchId = matchId
11635	return c
11636}
11637
11638// Language sets the optional parameter "language": The preferred
11639// language to use for strings returned by this method.
11640func (c *TurnBasedMatchesDeclineCall) Language(language string) *TurnBasedMatchesDeclineCall {
11641	c.urlParams_.Set("language", language)
11642	return c
11643}
11644
11645// Fields allows partial responses to be retrieved. See
11646// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11647// for more information.
11648func (c *TurnBasedMatchesDeclineCall) Fields(s ...googleapi.Field) *TurnBasedMatchesDeclineCall {
11649	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11650	return c
11651}
11652
11653// Context sets the context to be used in this call's Do method. Any
11654// pending HTTP request will be aborted if the provided context is
11655// canceled.
11656func (c *TurnBasedMatchesDeclineCall) Context(ctx context.Context) *TurnBasedMatchesDeclineCall {
11657	c.ctx_ = ctx
11658	return c
11659}
11660
11661// Header returns an http.Header that can be modified by the caller to
11662// add HTTP headers to the request.
11663func (c *TurnBasedMatchesDeclineCall) Header() http.Header {
11664	if c.header_ == nil {
11665		c.header_ = make(http.Header)
11666	}
11667	return c.header_
11668}
11669
11670func (c *TurnBasedMatchesDeclineCall) doRequest(alt string) (*http.Response, error) {
11671	reqHeaders := make(http.Header)
11672	for k, v := range c.header_ {
11673		reqHeaders[k] = v
11674	}
11675	reqHeaders.Set("User-Agent", c.s.userAgent())
11676	var body io.Reader = nil
11677	c.urlParams_.Set("alt", alt)
11678	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/decline")
11679	urls += "?" + c.urlParams_.Encode()
11680	req, _ := http.NewRequest("PUT", urls, body)
11681	req.Header = reqHeaders
11682	googleapi.Expand(req.URL, map[string]string{
11683		"matchId": c.matchId,
11684	})
11685	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11686}
11687
11688// Do executes the "games.turnBasedMatches.decline" call.
11689// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
11690// status code is an error. Response headers are in either
11691// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
11692// at all) in error.(*googleapi.Error).Header. Use
11693// googleapi.IsNotModified to check whether the returned error was
11694// because http.StatusNotModified was returned.
11695func (c *TurnBasedMatchesDeclineCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
11696	gensupport.SetOptions(c.urlParams_, opts...)
11697	res, err := c.doRequest("json")
11698	if res != nil && res.StatusCode == http.StatusNotModified {
11699		if res.Body != nil {
11700			res.Body.Close()
11701		}
11702		return nil, &googleapi.Error{
11703			Code:   res.StatusCode,
11704			Header: res.Header,
11705		}
11706	}
11707	if err != nil {
11708		return nil, err
11709	}
11710	defer googleapi.CloseBody(res)
11711	if err := googleapi.CheckResponse(res); err != nil {
11712		return nil, err
11713	}
11714	ret := &TurnBasedMatch{
11715		ServerResponse: googleapi.ServerResponse{
11716			Header:         res.Header,
11717			HTTPStatusCode: res.StatusCode,
11718		},
11719	}
11720	target := &ret
11721	if err := gensupport.DecodeResponse(target, res); err != nil {
11722		return nil, err
11723	}
11724	return ret, nil
11725	// {
11726	//   "description": "Decline an invitation to play a turn-based match.",
11727	//   "httpMethod": "PUT",
11728	//   "id": "games.turnBasedMatches.decline",
11729	//   "parameterOrder": [
11730	//     "matchId"
11731	//   ],
11732	//   "parameters": {
11733	//     "language": {
11734	//       "description": "The preferred language to use for strings returned by this method.",
11735	//       "location": "query",
11736	//       "type": "string"
11737	//     },
11738	//     "matchId": {
11739	//       "description": "The ID of the match.",
11740	//       "location": "path",
11741	//       "required": true,
11742	//       "type": "string"
11743	//     }
11744	//   },
11745	//   "path": "turnbasedmatches/{matchId}/decline",
11746	//   "response": {
11747	//     "$ref": "TurnBasedMatch"
11748	//   },
11749	//   "scopes": [
11750	//     "https://www.googleapis.com/auth/games",
11751	//     "https://www.googleapis.com/auth/plus.login"
11752	//   ]
11753	// }
11754
11755}
11756
11757// method id "games.turnBasedMatches.dismiss":
11758
11759type TurnBasedMatchesDismissCall struct {
11760	s          *Service
11761	matchId    string
11762	urlParams_ gensupport.URLParams
11763	ctx_       context.Context
11764	header_    http.Header
11765}
11766
11767// Dismiss: Dismiss a turn-based match from the match list. The match
11768// will no longer show up in the list and will not generate
11769// notifications.
11770func (r *TurnBasedMatchesService) Dismiss(matchId string) *TurnBasedMatchesDismissCall {
11771	c := &TurnBasedMatchesDismissCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11772	c.matchId = matchId
11773	return c
11774}
11775
11776// Fields allows partial responses to be retrieved. See
11777// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11778// for more information.
11779func (c *TurnBasedMatchesDismissCall) Fields(s ...googleapi.Field) *TurnBasedMatchesDismissCall {
11780	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11781	return c
11782}
11783
11784// Context sets the context to be used in this call's Do method. Any
11785// pending HTTP request will be aborted if the provided context is
11786// canceled.
11787func (c *TurnBasedMatchesDismissCall) Context(ctx context.Context) *TurnBasedMatchesDismissCall {
11788	c.ctx_ = ctx
11789	return c
11790}
11791
11792// Header returns an http.Header that can be modified by the caller to
11793// add HTTP headers to the request.
11794func (c *TurnBasedMatchesDismissCall) Header() http.Header {
11795	if c.header_ == nil {
11796		c.header_ = make(http.Header)
11797	}
11798	return c.header_
11799}
11800
11801func (c *TurnBasedMatchesDismissCall) doRequest(alt string) (*http.Response, error) {
11802	reqHeaders := make(http.Header)
11803	for k, v := range c.header_ {
11804		reqHeaders[k] = v
11805	}
11806	reqHeaders.Set("User-Agent", c.s.userAgent())
11807	var body io.Reader = nil
11808	c.urlParams_.Set("alt", alt)
11809	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/dismiss")
11810	urls += "?" + c.urlParams_.Encode()
11811	req, _ := http.NewRequest("PUT", urls, body)
11812	req.Header = reqHeaders
11813	googleapi.Expand(req.URL, map[string]string{
11814		"matchId": c.matchId,
11815	})
11816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11817}
11818
11819// Do executes the "games.turnBasedMatches.dismiss" call.
11820func (c *TurnBasedMatchesDismissCall) Do(opts ...googleapi.CallOption) error {
11821	gensupport.SetOptions(c.urlParams_, opts...)
11822	res, err := c.doRequest("json")
11823	if err != nil {
11824		return err
11825	}
11826	defer googleapi.CloseBody(res)
11827	if err := googleapi.CheckResponse(res); err != nil {
11828		return err
11829	}
11830	return nil
11831	// {
11832	//   "description": "Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.",
11833	//   "httpMethod": "PUT",
11834	//   "id": "games.turnBasedMatches.dismiss",
11835	//   "parameterOrder": [
11836	//     "matchId"
11837	//   ],
11838	//   "parameters": {
11839	//     "matchId": {
11840	//       "description": "The ID of the match.",
11841	//       "location": "path",
11842	//       "required": true,
11843	//       "type": "string"
11844	//     }
11845	//   },
11846	//   "path": "turnbasedmatches/{matchId}/dismiss",
11847	//   "scopes": [
11848	//     "https://www.googleapis.com/auth/games",
11849	//     "https://www.googleapis.com/auth/plus.login"
11850	//   ]
11851	// }
11852
11853}
11854
11855// method id "games.turnBasedMatches.finish":
11856
11857type TurnBasedMatchesFinishCall struct {
11858	s                     *Service
11859	matchId               string
11860	turnbasedmatchresults *TurnBasedMatchResults
11861	urlParams_            gensupport.URLParams
11862	ctx_                  context.Context
11863	header_               http.Header
11864}
11865
11866// Finish: Finish a turn-based match. Each player should make this call
11867// once, after all results are in. Only the player whose turn it is may
11868// make the first call to Finish, and can pass in the final match state.
11869func (r *TurnBasedMatchesService) Finish(matchId string, turnbasedmatchresults *TurnBasedMatchResults) *TurnBasedMatchesFinishCall {
11870	c := &TurnBasedMatchesFinishCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11871	c.matchId = matchId
11872	c.turnbasedmatchresults = turnbasedmatchresults
11873	return c
11874}
11875
11876// Language sets the optional parameter "language": The preferred
11877// language to use for strings returned by this method.
11878func (c *TurnBasedMatchesFinishCall) Language(language string) *TurnBasedMatchesFinishCall {
11879	c.urlParams_.Set("language", language)
11880	return c
11881}
11882
11883// Fields allows partial responses to be retrieved. See
11884// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11885// for more information.
11886func (c *TurnBasedMatchesFinishCall) Fields(s ...googleapi.Field) *TurnBasedMatchesFinishCall {
11887	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11888	return c
11889}
11890
11891// Context sets the context to be used in this call's Do method. Any
11892// pending HTTP request will be aborted if the provided context is
11893// canceled.
11894func (c *TurnBasedMatchesFinishCall) Context(ctx context.Context) *TurnBasedMatchesFinishCall {
11895	c.ctx_ = ctx
11896	return c
11897}
11898
11899// Header returns an http.Header that can be modified by the caller to
11900// add HTTP headers to the request.
11901func (c *TurnBasedMatchesFinishCall) Header() http.Header {
11902	if c.header_ == nil {
11903		c.header_ = make(http.Header)
11904	}
11905	return c.header_
11906}
11907
11908func (c *TurnBasedMatchesFinishCall) doRequest(alt string) (*http.Response, error) {
11909	reqHeaders := make(http.Header)
11910	for k, v := range c.header_ {
11911		reqHeaders[k] = v
11912	}
11913	reqHeaders.Set("User-Agent", c.s.userAgent())
11914	var body io.Reader = nil
11915	body, err := googleapi.WithoutDataWrapper.JSONReader(c.turnbasedmatchresults)
11916	if err != nil {
11917		return nil, err
11918	}
11919	reqHeaders.Set("Content-Type", "application/json")
11920	c.urlParams_.Set("alt", alt)
11921	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/finish")
11922	urls += "?" + c.urlParams_.Encode()
11923	req, _ := http.NewRequest("PUT", urls, body)
11924	req.Header = reqHeaders
11925	googleapi.Expand(req.URL, map[string]string{
11926		"matchId": c.matchId,
11927	})
11928	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11929}
11930
11931// Do executes the "games.turnBasedMatches.finish" call.
11932// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
11933// status code is an error. Response headers are in either
11934// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
11935// at all) in error.(*googleapi.Error).Header. Use
11936// googleapi.IsNotModified to check whether the returned error was
11937// because http.StatusNotModified was returned.
11938func (c *TurnBasedMatchesFinishCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
11939	gensupport.SetOptions(c.urlParams_, opts...)
11940	res, err := c.doRequest("json")
11941	if res != nil && res.StatusCode == http.StatusNotModified {
11942		if res.Body != nil {
11943			res.Body.Close()
11944		}
11945		return nil, &googleapi.Error{
11946			Code:   res.StatusCode,
11947			Header: res.Header,
11948		}
11949	}
11950	if err != nil {
11951		return nil, err
11952	}
11953	defer googleapi.CloseBody(res)
11954	if err := googleapi.CheckResponse(res); err != nil {
11955		return nil, err
11956	}
11957	ret := &TurnBasedMatch{
11958		ServerResponse: googleapi.ServerResponse{
11959			Header:         res.Header,
11960			HTTPStatusCode: res.StatusCode,
11961		},
11962	}
11963	target := &ret
11964	if err := gensupport.DecodeResponse(target, res); err != nil {
11965		return nil, err
11966	}
11967	return ret, nil
11968	// {
11969	//   "description": "Finish a turn-based match. Each player should make this call once, after all results are in. Only the player whose turn it is may make the first call to Finish, and can pass in the final match state.",
11970	//   "httpMethod": "PUT",
11971	//   "id": "games.turnBasedMatches.finish",
11972	//   "parameterOrder": [
11973	//     "matchId"
11974	//   ],
11975	//   "parameters": {
11976	//     "language": {
11977	//       "description": "The preferred language to use for strings returned by this method.",
11978	//       "location": "query",
11979	//       "type": "string"
11980	//     },
11981	//     "matchId": {
11982	//       "description": "The ID of the match.",
11983	//       "location": "path",
11984	//       "required": true,
11985	//       "type": "string"
11986	//     }
11987	//   },
11988	//   "path": "turnbasedmatches/{matchId}/finish",
11989	//   "request": {
11990	//     "$ref": "TurnBasedMatchResults"
11991	//   },
11992	//   "response": {
11993	//     "$ref": "TurnBasedMatch"
11994	//   },
11995	//   "scopes": [
11996	//     "https://www.googleapis.com/auth/games",
11997	//     "https://www.googleapis.com/auth/plus.login"
11998	//   ]
11999	// }
12000
12001}
12002
12003// method id "games.turnBasedMatches.get":
12004
12005type TurnBasedMatchesGetCall struct {
12006	s            *Service
12007	matchId      string
12008	urlParams_   gensupport.URLParams
12009	ifNoneMatch_ string
12010	ctx_         context.Context
12011	header_      http.Header
12012}
12013
12014// Get: Get the data for a turn-based match.
12015func (r *TurnBasedMatchesService) Get(matchId string) *TurnBasedMatchesGetCall {
12016	c := &TurnBasedMatchesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12017	c.matchId = matchId
12018	return c
12019}
12020
12021// IncludeMatchData sets the optional parameter "includeMatchData": Get
12022// match data along with metadata.
12023func (c *TurnBasedMatchesGetCall) IncludeMatchData(includeMatchData bool) *TurnBasedMatchesGetCall {
12024	c.urlParams_.Set("includeMatchData", fmt.Sprint(includeMatchData))
12025	return c
12026}
12027
12028// Language sets the optional parameter "language": The preferred
12029// language to use for strings returned by this method.
12030func (c *TurnBasedMatchesGetCall) Language(language string) *TurnBasedMatchesGetCall {
12031	c.urlParams_.Set("language", language)
12032	return c
12033}
12034
12035// Fields allows partial responses to be retrieved. See
12036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12037// for more information.
12038func (c *TurnBasedMatchesGetCall) Fields(s ...googleapi.Field) *TurnBasedMatchesGetCall {
12039	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12040	return c
12041}
12042
12043// IfNoneMatch sets the optional parameter which makes the operation
12044// fail if the object's ETag matches the given value. This is useful for
12045// getting updates only after the object has changed since the last
12046// request. Use googleapi.IsNotModified to check whether the response
12047// error from Do is the result of In-None-Match.
12048func (c *TurnBasedMatchesGetCall) IfNoneMatch(entityTag string) *TurnBasedMatchesGetCall {
12049	c.ifNoneMatch_ = entityTag
12050	return c
12051}
12052
12053// Context sets the context to be used in this call's Do method. Any
12054// pending HTTP request will be aborted if the provided context is
12055// canceled.
12056func (c *TurnBasedMatchesGetCall) Context(ctx context.Context) *TurnBasedMatchesGetCall {
12057	c.ctx_ = ctx
12058	return c
12059}
12060
12061// Header returns an http.Header that can be modified by the caller to
12062// add HTTP headers to the request.
12063func (c *TurnBasedMatchesGetCall) Header() http.Header {
12064	if c.header_ == nil {
12065		c.header_ = make(http.Header)
12066	}
12067	return c.header_
12068}
12069
12070func (c *TurnBasedMatchesGetCall) doRequest(alt string) (*http.Response, error) {
12071	reqHeaders := make(http.Header)
12072	for k, v := range c.header_ {
12073		reqHeaders[k] = v
12074	}
12075	reqHeaders.Set("User-Agent", c.s.userAgent())
12076	if c.ifNoneMatch_ != "" {
12077		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12078	}
12079	var body io.Reader = nil
12080	c.urlParams_.Set("alt", alt)
12081	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}")
12082	urls += "?" + c.urlParams_.Encode()
12083	req, _ := http.NewRequest("GET", urls, body)
12084	req.Header = reqHeaders
12085	googleapi.Expand(req.URL, map[string]string{
12086		"matchId": c.matchId,
12087	})
12088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12089}
12090
12091// Do executes the "games.turnBasedMatches.get" call.
12092// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
12093// status code is an error. Response headers are in either
12094// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
12095// at all) in error.(*googleapi.Error).Header. Use
12096// googleapi.IsNotModified to check whether the returned error was
12097// because http.StatusNotModified was returned.
12098func (c *TurnBasedMatchesGetCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
12099	gensupport.SetOptions(c.urlParams_, opts...)
12100	res, err := c.doRequest("json")
12101	if res != nil && res.StatusCode == http.StatusNotModified {
12102		if res.Body != nil {
12103			res.Body.Close()
12104		}
12105		return nil, &googleapi.Error{
12106			Code:   res.StatusCode,
12107			Header: res.Header,
12108		}
12109	}
12110	if err != nil {
12111		return nil, err
12112	}
12113	defer googleapi.CloseBody(res)
12114	if err := googleapi.CheckResponse(res); err != nil {
12115		return nil, err
12116	}
12117	ret := &TurnBasedMatch{
12118		ServerResponse: googleapi.ServerResponse{
12119			Header:         res.Header,
12120			HTTPStatusCode: res.StatusCode,
12121		},
12122	}
12123	target := &ret
12124	if err := gensupport.DecodeResponse(target, res); err != nil {
12125		return nil, err
12126	}
12127	return ret, nil
12128	// {
12129	//   "description": "Get the data for a turn-based match.",
12130	//   "httpMethod": "GET",
12131	//   "id": "games.turnBasedMatches.get",
12132	//   "parameterOrder": [
12133	//     "matchId"
12134	//   ],
12135	//   "parameters": {
12136	//     "includeMatchData": {
12137	//       "description": "Get match data along with metadata.",
12138	//       "location": "query",
12139	//       "type": "boolean"
12140	//     },
12141	//     "language": {
12142	//       "description": "The preferred language to use for strings returned by this method.",
12143	//       "location": "query",
12144	//       "type": "string"
12145	//     },
12146	//     "matchId": {
12147	//       "description": "The ID of the match.",
12148	//       "location": "path",
12149	//       "required": true,
12150	//       "type": "string"
12151	//     }
12152	//   },
12153	//   "path": "turnbasedmatches/{matchId}",
12154	//   "response": {
12155	//     "$ref": "TurnBasedMatch"
12156	//   },
12157	//   "scopes": [
12158	//     "https://www.googleapis.com/auth/games",
12159	//     "https://www.googleapis.com/auth/plus.login"
12160	//   ]
12161	// }
12162
12163}
12164
12165// method id "games.turnBasedMatches.join":
12166
12167type TurnBasedMatchesJoinCall struct {
12168	s          *Service
12169	matchId    string
12170	urlParams_ gensupport.URLParams
12171	ctx_       context.Context
12172	header_    http.Header
12173}
12174
12175// Join: Join a turn-based match.
12176func (r *TurnBasedMatchesService) Join(matchId string) *TurnBasedMatchesJoinCall {
12177	c := &TurnBasedMatchesJoinCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12178	c.matchId = matchId
12179	return c
12180}
12181
12182// Language sets the optional parameter "language": The preferred
12183// language to use for strings returned by this method.
12184func (c *TurnBasedMatchesJoinCall) Language(language string) *TurnBasedMatchesJoinCall {
12185	c.urlParams_.Set("language", language)
12186	return c
12187}
12188
12189// Fields allows partial responses to be retrieved. See
12190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12191// for more information.
12192func (c *TurnBasedMatchesJoinCall) Fields(s ...googleapi.Field) *TurnBasedMatchesJoinCall {
12193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12194	return c
12195}
12196
12197// Context sets the context to be used in this call's Do method. Any
12198// pending HTTP request will be aborted if the provided context is
12199// canceled.
12200func (c *TurnBasedMatchesJoinCall) Context(ctx context.Context) *TurnBasedMatchesJoinCall {
12201	c.ctx_ = ctx
12202	return c
12203}
12204
12205// Header returns an http.Header that can be modified by the caller to
12206// add HTTP headers to the request.
12207func (c *TurnBasedMatchesJoinCall) Header() http.Header {
12208	if c.header_ == nil {
12209		c.header_ = make(http.Header)
12210	}
12211	return c.header_
12212}
12213
12214func (c *TurnBasedMatchesJoinCall) doRequest(alt string) (*http.Response, error) {
12215	reqHeaders := make(http.Header)
12216	for k, v := range c.header_ {
12217		reqHeaders[k] = v
12218	}
12219	reqHeaders.Set("User-Agent", c.s.userAgent())
12220	var body io.Reader = nil
12221	c.urlParams_.Set("alt", alt)
12222	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/join")
12223	urls += "?" + c.urlParams_.Encode()
12224	req, _ := http.NewRequest("PUT", urls, body)
12225	req.Header = reqHeaders
12226	googleapi.Expand(req.URL, map[string]string{
12227		"matchId": c.matchId,
12228	})
12229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12230}
12231
12232// Do executes the "games.turnBasedMatches.join" call.
12233// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
12234// status code is an error. Response headers are in either
12235// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
12236// at all) in error.(*googleapi.Error).Header. Use
12237// googleapi.IsNotModified to check whether the returned error was
12238// because http.StatusNotModified was returned.
12239func (c *TurnBasedMatchesJoinCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
12240	gensupport.SetOptions(c.urlParams_, opts...)
12241	res, err := c.doRequest("json")
12242	if res != nil && res.StatusCode == http.StatusNotModified {
12243		if res.Body != nil {
12244			res.Body.Close()
12245		}
12246		return nil, &googleapi.Error{
12247			Code:   res.StatusCode,
12248			Header: res.Header,
12249		}
12250	}
12251	if err != nil {
12252		return nil, err
12253	}
12254	defer googleapi.CloseBody(res)
12255	if err := googleapi.CheckResponse(res); err != nil {
12256		return nil, err
12257	}
12258	ret := &TurnBasedMatch{
12259		ServerResponse: googleapi.ServerResponse{
12260			Header:         res.Header,
12261			HTTPStatusCode: res.StatusCode,
12262		},
12263	}
12264	target := &ret
12265	if err := gensupport.DecodeResponse(target, res); err != nil {
12266		return nil, err
12267	}
12268	return ret, nil
12269	// {
12270	//   "description": "Join a turn-based match.",
12271	//   "httpMethod": "PUT",
12272	//   "id": "games.turnBasedMatches.join",
12273	//   "parameterOrder": [
12274	//     "matchId"
12275	//   ],
12276	//   "parameters": {
12277	//     "language": {
12278	//       "description": "The preferred language to use for strings returned by this method.",
12279	//       "location": "query",
12280	//       "type": "string"
12281	//     },
12282	//     "matchId": {
12283	//       "description": "The ID of the match.",
12284	//       "location": "path",
12285	//       "required": true,
12286	//       "type": "string"
12287	//     }
12288	//   },
12289	//   "path": "turnbasedmatches/{matchId}/join",
12290	//   "response": {
12291	//     "$ref": "TurnBasedMatch"
12292	//   },
12293	//   "scopes": [
12294	//     "https://www.googleapis.com/auth/games",
12295	//     "https://www.googleapis.com/auth/plus.login"
12296	//   ]
12297	// }
12298
12299}
12300
12301// method id "games.turnBasedMatches.leave":
12302
12303type TurnBasedMatchesLeaveCall struct {
12304	s          *Service
12305	matchId    string
12306	urlParams_ gensupport.URLParams
12307	ctx_       context.Context
12308	header_    http.Header
12309}
12310
12311// Leave: Leave a turn-based match when it is not the current player's
12312// turn, without canceling the match.
12313func (r *TurnBasedMatchesService) Leave(matchId string) *TurnBasedMatchesLeaveCall {
12314	c := &TurnBasedMatchesLeaveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12315	c.matchId = matchId
12316	return c
12317}
12318
12319// Language sets the optional parameter "language": The preferred
12320// language to use for strings returned by this method.
12321func (c *TurnBasedMatchesLeaveCall) Language(language string) *TurnBasedMatchesLeaveCall {
12322	c.urlParams_.Set("language", language)
12323	return c
12324}
12325
12326// Fields allows partial responses to be retrieved. See
12327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12328// for more information.
12329func (c *TurnBasedMatchesLeaveCall) Fields(s ...googleapi.Field) *TurnBasedMatchesLeaveCall {
12330	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12331	return c
12332}
12333
12334// Context sets the context to be used in this call's Do method. Any
12335// pending HTTP request will be aborted if the provided context is
12336// canceled.
12337func (c *TurnBasedMatchesLeaveCall) Context(ctx context.Context) *TurnBasedMatchesLeaveCall {
12338	c.ctx_ = ctx
12339	return c
12340}
12341
12342// Header returns an http.Header that can be modified by the caller to
12343// add HTTP headers to the request.
12344func (c *TurnBasedMatchesLeaveCall) Header() http.Header {
12345	if c.header_ == nil {
12346		c.header_ = make(http.Header)
12347	}
12348	return c.header_
12349}
12350
12351func (c *TurnBasedMatchesLeaveCall) doRequest(alt string) (*http.Response, error) {
12352	reqHeaders := make(http.Header)
12353	for k, v := range c.header_ {
12354		reqHeaders[k] = v
12355	}
12356	reqHeaders.Set("User-Agent", c.s.userAgent())
12357	var body io.Reader = nil
12358	c.urlParams_.Set("alt", alt)
12359	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/leave")
12360	urls += "?" + c.urlParams_.Encode()
12361	req, _ := http.NewRequest("PUT", urls, body)
12362	req.Header = reqHeaders
12363	googleapi.Expand(req.URL, map[string]string{
12364		"matchId": c.matchId,
12365	})
12366	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12367}
12368
12369// Do executes the "games.turnBasedMatches.leave" call.
12370// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
12371// status code is an error. Response headers are in either
12372// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
12373// at all) in error.(*googleapi.Error).Header. Use
12374// googleapi.IsNotModified to check whether the returned error was
12375// because http.StatusNotModified was returned.
12376func (c *TurnBasedMatchesLeaveCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
12377	gensupport.SetOptions(c.urlParams_, opts...)
12378	res, err := c.doRequest("json")
12379	if res != nil && res.StatusCode == http.StatusNotModified {
12380		if res.Body != nil {
12381			res.Body.Close()
12382		}
12383		return nil, &googleapi.Error{
12384			Code:   res.StatusCode,
12385			Header: res.Header,
12386		}
12387	}
12388	if err != nil {
12389		return nil, err
12390	}
12391	defer googleapi.CloseBody(res)
12392	if err := googleapi.CheckResponse(res); err != nil {
12393		return nil, err
12394	}
12395	ret := &TurnBasedMatch{
12396		ServerResponse: googleapi.ServerResponse{
12397			Header:         res.Header,
12398			HTTPStatusCode: res.StatusCode,
12399		},
12400	}
12401	target := &ret
12402	if err := gensupport.DecodeResponse(target, res); err != nil {
12403		return nil, err
12404	}
12405	return ret, nil
12406	// {
12407	//   "description": "Leave a turn-based match when it is not the current player's turn, without canceling the match.",
12408	//   "httpMethod": "PUT",
12409	//   "id": "games.turnBasedMatches.leave",
12410	//   "parameterOrder": [
12411	//     "matchId"
12412	//   ],
12413	//   "parameters": {
12414	//     "language": {
12415	//       "description": "The preferred language to use for strings returned by this method.",
12416	//       "location": "query",
12417	//       "type": "string"
12418	//     },
12419	//     "matchId": {
12420	//       "description": "The ID of the match.",
12421	//       "location": "path",
12422	//       "required": true,
12423	//       "type": "string"
12424	//     }
12425	//   },
12426	//   "path": "turnbasedmatches/{matchId}/leave",
12427	//   "response": {
12428	//     "$ref": "TurnBasedMatch"
12429	//   },
12430	//   "scopes": [
12431	//     "https://www.googleapis.com/auth/games",
12432	//     "https://www.googleapis.com/auth/plus.login"
12433	//   ]
12434	// }
12435
12436}
12437
12438// method id "games.turnBasedMatches.leaveTurn":
12439
12440type TurnBasedMatchesLeaveTurnCall struct {
12441	s          *Service
12442	matchId    string
12443	urlParams_ gensupport.URLParams
12444	ctx_       context.Context
12445	header_    http.Header
12446}
12447
12448// LeaveTurn: Leave a turn-based match during the current player's turn,
12449// without canceling the match.
12450func (r *TurnBasedMatchesService) LeaveTurn(matchId string, matchVersion int64) *TurnBasedMatchesLeaveTurnCall {
12451	c := &TurnBasedMatchesLeaveTurnCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12452	c.matchId = matchId
12453	c.urlParams_.Set("matchVersion", fmt.Sprint(matchVersion))
12454	return c
12455}
12456
12457// Language sets the optional parameter "language": The preferred
12458// language to use for strings returned by this method.
12459func (c *TurnBasedMatchesLeaveTurnCall) Language(language string) *TurnBasedMatchesLeaveTurnCall {
12460	c.urlParams_.Set("language", language)
12461	return c
12462}
12463
12464// PendingParticipantId sets the optional parameter
12465// "pendingParticipantId": The ID of another participant who should take
12466// their turn next. If not set, the match will wait for other player(s)
12467// to join via automatching; this is only valid if automatch criteria is
12468// set on the match with remaining slots for automatched players.
12469func (c *TurnBasedMatchesLeaveTurnCall) PendingParticipantId(pendingParticipantId string) *TurnBasedMatchesLeaveTurnCall {
12470	c.urlParams_.Set("pendingParticipantId", pendingParticipantId)
12471	return c
12472}
12473
12474// Fields allows partial responses to be retrieved. See
12475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12476// for more information.
12477func (c *TurnBasedMatchesLeaveTurnCall) Fields(s ...googleapi.Field) *TurnBasedMatchesLeaveTurnCall {
12478	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12479	return c
12480}
12481
12482// Context sets the context to be used in this call's Do method. Any
12483// pending HTTP request will be aborted if the provided context is
12484// canceled.
12485func (c *TurnBasedMatchesLeaveTurnCall) Context(ctx context.Context) *TurnBasedMatchesLeaveTurnCall {
12486	c.ctx_ = ctx
12487	return c
12488}
12489
12490// Header returns an http.Header that can be modified by the caller to
12491// add HTTP headers to the request.
12492func (c *TurnBasedMatchesLeaveTurnCall) Header() http.Header {
12493	if c.header_ == nil {
12494		c.header_ = make(http.Header)
12495	}
12496	return c.header_
12497}
12498
12499func (c *TurnBasedMatchesLeaveTurnCall) doRequest(alt string) (*http.Response, error) {
12500	reqHeaders := make(http.Header)
12501	for k, v := range c.header_ {
12502		reqHeaders[k] = v
12503	}
12504	reqHeaders.Set("User-Agent", c.s.userAgent())
12505	var body io.Reader = nil
12506	c.urlParams_.Set("alt", alt)
12507	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/leaveTurn")
12508	urls += "?" + c.urlParams_.Encode()
12509	req, _ := http.NewRequest("PUT", urls, body)
12510	req.Header = reqHeaders
12511	googleapi.Expand(req.URL, map[string]string{
12512		"matchId": c.matchId,
12513	})
12514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12515}
12516
12517// Do executes the "games.turnBasedMatches.leaveTurn" call.
12518// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
12519// status code is an error. Response headers are in either
12520// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
12521// at all) in error.(*googleapi.Error).Header. Use
12522// googleapi.IsNotModified to check whether the returned error was
12523// because http.StatusNotModified was returned.
12524func (c *TurnBasedMatchesLeaveTurnCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
12525	gensupport.SetOptions(c.urlParams_, opts...)
12526	res, err := c.doRequest("json")
12527	if res != nil && res.StatusCode == http.StatusNotModified {
12528		if res.Body != nil {
12529			res.Body.Close()
12530		}
12531		return nil, &googleapi.Error{
12532			Code:   res.StatusCode,
12533			Header: res.Header,
12534		}
12535	}
12536	if err != nil {
12537		return nil, err
12538	}
12539	defer googleapi.CloseBody(res)
12540	if err := googleapi.CheckResponse(res); err != nil {
12541		return nil, err
12542	}
12543	ret := &TurnBasedMatch{
12544		ServerResponse: googleapi.ServerResponse{
12545			Header:         res.Header,
12546			HTTPStatusCode: res.StatusCode,
12547		},
12548	}
12549	target := &ret
12550	if err := gensupport.DecodeResponse(target, res); err != nil {
12551		return nil, err
12552	}
12553	return ret, nil
12554	// {
12555	//   "description": "Leave a turn-based match during the current player's turn, without canceling the match.",
12556	//   "httpMethod": "PUT",
12557	//   "id": "games.turnBasedMatches.leaveTurn",
12558	//   "parameterOrder": [
12559	//     "matchId",
12560	//     "matchVersion"
12561	//   ],
12562	//   "parameters": {
12563	//     "language": {
12564	//       "description": "The preferred language to use for strings returned by this method.",
12565	//       "location": "query",
12566	//       "type": "string"
12567	//     },
12568	//     "matchId": {
12569	//       "description": "The ID of the match.",
12570	//       "location": "path",
12571	//       "required": true,
12572	//       "type": "string"
12573	//     },
12574	//     "matchVersion": {
12575	//       "description": "The version of the match being updated.",
12576	//       "format": "int32",
12577	//       "location": "query",
12578	//       "required": true,
12579	//       "type": "integer"
12580	//     },
12581	//     "pendingParticipantId": {
12582	//       "description": "The ID of another participant who should take their turn next. If not set, the match will wait for other player(s) to join via automatching; this is only valid if automatch criteria is set on the match with remaining slots for automatched players.",
12583	//       "location": "query",
12584	//       "type": "string"
12585	//     }
12586	//   },
12587	//   "path": "turnbasedmatches/{matchId}/leaveTurn",
12588	//   "response": {
12589	//     "$ref": "TurnBasedMatch"
12590	//   },
12591	//   "scopes": [
12592	//     "https://www.googleapis.com/auth/games",
12593	//     "https://www.googleapis.com/auth/plus.login"
12594	//   ]
12595	// }
12596
12597}
12598
12599// method id "games.turnBasedMatches.list":
12600
12601type TurnBasedMatchesListCall struct {
12602	s            *Service
12603	urlParams_   gensupport.URLParams
12604	ifNoneMatch_ string
12605	ctx_         context.Context
12606	header_      http.Header
12607}
12608
12609// List: Returns turn-based matches the player is or was involved in.
12610func (r *TurnBasedMatchesService) List() *TurnBasedMatchesListCall {
12611	c := &TurnBasedMatchesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12612	return c
12613}
12614
12615// IncludeMatchData sets the optional parameter "includeMatchData": True
12616// if match data should be returned in the response. Note that not all
12617// data will necessarily be returned if include_match_data is true; the
12618// server may decide to only return data for some of the matches to
12619// limit download size for the client. The remainder of the data for
12620// these matches will be retrievable on request.
12621func (c *TurnBasedMatchesListCall) IncludeMatchData(includeMatchData bool) *TurnBasedMatchesListCall {
12622	c.urlParams_.Set("includeMatchData", fmt.Sprint(includeMatchData))
12623	return c
12624}
12625
12626// Language sets the optional parameter "language": The preferred
12627// language to use for strings returned by this method.
12628func (c *TurnBasedMatchesListCall) Language(language string) *TurnBasedMatchesListCall {
12629	c.urlParams_.Set("language", language)
12630	return c
12631}
12632
12633// MaxCompletedMatches sets the optional parameter
12634// "maxCompletedMatches": The maximum number of completed or canceled
12635// matches to return in the response. If not set, all matches returned
12636// could be completed or canceled.
12637func (c *TurnBasedMatchesListCall) MaxCompletedMatches(maxCompletedMatches int64) *TurnBasedMatchesListCall {
12638	c.urlParams_.Set("maxCompletedMatches", fmt.Sprint(maxCompletedMatches))
12639	return c
12640}
12641
12642// MaxResults sets the optional parameter "maxResults": The maximum
12643// number of matches to return in the response, used for paging. For any
12644// response, the actual number of matches to return may be less than the
12645// specified maxResults.
12646func (c *TurnBasedMatchesListCall) MaxResults(maxResults int64) *TurnBasedMatchesListCall {
12647	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12648	return c
12649}
12650
12651// PageToken sets the optional parameter "pageToken": The token returned
12652// by the previous request.
12653func (c *TurnBasedMatchesListCall) PageToken(pageToken string) *TurnBasedMatchesListCall {
12654	c.urlParams_.Set("pageToken", pageToken)
12655	return c
12656}
12657
12658// Fields allows partial responses to be retrieved. See
12659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12660// for more information.
12661func (c *TurnBasedMatchesListCall) Fields(s ...googleapi.Field) *TurnBasedMatchesListCall {
12662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12663	return c
12664}
12665
12666// IfNoneMatch sets the optional parameter which makes the operation
12667// fail if the object's ETag matches the given value. This is useful for
12668// getting updates only after the object has changed since the last
12669// request. Use googleapi.IsNotModified to check whether the response
12670// error from Do is the result of In-None-Match.
12671func (c *TurnBasedMatchesListCall) IfNoneMatch(entityTag string) *TurnBasedMatchesListCall {
12672	c.ifNoneMatch_ = entityTag
12673	return c
12674}
12675
12676// Context sets the context to be used in this call's Do method. Any
12677// pending HTTP request will be aborted if the provided context is
12678// canceled.
12679func (c *TurnBasedMatchesListCall) Context(ctx context.Context) *TurnBasedMatchesListCall {
12680	c.ctx_ = ctx
12681	return c
12682}
12683
12684// Header returns an http.Header that can be modified by the caller to
12685// add HTTP headers to the request.
12686func (c *TurnBasedMatchesListCall) Header() http.Header {
12687	if c.header_ == nil {
12688		c.header_ = make(http.Header)
12689	}
12690	return c.header_
12691}
12692
12693func (c *TurnBasedMatchesListCall) doRequest(alt string) (*http.Response, error) {
12694	reqHeaders := make(http.Header)
12695	for k, v := range c.header_ {
12696		reqHeaders[k] = v
12697	}
12698	reqHeaders.Set("User-Agent", c.s.userAgent())
12699	if c.ifNoneMatch_ != "" {
12700		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12701	}
12702	var body io.Reader = nil
12703	c.urlParams_.Set("alt", alt)
12704	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches")
12705	urls += "?" + c.urlParams_.Encode()
12706	req, _ := http.NewRequest("GET", urls, body)
12707	req.Header = reqHeaders
12708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12709}
12710
12711// Do executes the "games.turnBasedMatches.list" call.
12712// Exactly one of *TurnBasedMatchList or error will be non-nil. Any
12713// non-2xx status code is an error. Response headers are in either
12714// *TurnBasedMatchList.ServerResponse.Header or (if a response was
12715// returned at all) in error.(*googleapi.Error).Header. Use
12716// googleapi.IsNotModified to check whether the returned error was
12717// because http.StatusNotModified was returned.
12718func (c *TurnBasedMatchesListCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatchList, error) {
12719	gensupport.SetOptions(c.urlParams_, opts...)
12720	res, err := c.doRequest("json")
12721	if res != nil && res.StatusCode == http.StatusNotModified {
12722		if res.Body != nil {
12723			res.Body.Close()
12724		}
12725		return nil, &googleapi.Error{
12726			Code:   res.StatusCode,
12727			Header: res.Header,
12728		}
12729	}
12730	if err != nil {
12731		return nil, err
12732	}
12733	defer googleapi.CloseBody(res)
12734	if err := googleapi.CheckResponse(res); err != nil {
12735		return nil, err
12736	}
12737	ret := &TurnBasedMatchList{
12738		ServerResponse: googleapi.ServerResponse{
12739			Header:         res.Header,
12740			HTTPStatusCode: res.StatusCode,
12741		},
12742	}
12743	target := &ret
12744	if err := gensupport.DecodeResponse(target, res); err != nil {
12745		return nil, err
12746	}
12747	return ret, nil
12748	// {
12749	//   "description": "Returns turn-based matches the player is or was involved in.",
12750	//   "httpMethod": "GET",
12751	//   "id": "games.turnBasedMatches.list",
12752	//   "parameters": {
12753	//     "includeMatchData": {
12754	//       "description": "True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.",
12755	//       "location": "query",
12756	//       "type": "boolean"
12757	//     },
12758	//     "language": {
12759	//       "description": "The preferred language to use for strings returned by this method.",
12760	//       "location": "query",
12761	//       "type": "string"
12762	//     },
12763	//     "maxCompletedMatches": {
12764	//       "description": "The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled.",
12765	//       "format": "int32",
12766	//       "location": "query",
12767	//       "maximum": "500",
12768	//       "minimum": "0",
12769	//       "type": "integer"
12770	//     },
12771	//     "maxResults": {
12772	//       "description": "The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults.",
12773	//       "format": "int32",
12774	//       "location": "query",
12775	//       "maximum": "500",
12776	//       "minimum": "1",
12777	//       "type": "integer"
12778	//     },
12779	//     "pageToken": {
12780	//       "description": "The token returned by the previous request.",
12781	//       "location": "query",
12782	//       "type": "string"
12783	//     }
12784	//   },
12785	//   "path": "turnbasedmatches",
12786	//   "response": {
12787	//     "$ref": "TurnBasedMatchList"
12788	//   },
12789	//   "scopes": [
12790	//     "https://www.googleapis.com/auth/games",
12791	//     "https://www.googleapis.com/auth/plus.login"
12792	//   ]
12793	// }
12794
12795}
12796
12797// Pages invokes f for each page of results.
12798// A non-nil error returned from f will halt the iteration.
12799// The provided context supersedes any context provided to the Context method.
12800func (c *TurnBasedMatchesListCall) Pages(ctx context.Context, f func(*TurnBasedMatchList) error) error {
12801	c.ctx_ = ctx
12802	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12803	for {
12804		x, err := c.Do()
12805		if err != nil {
12806			return err
12807		}
12808		if err := f(x); err != nil {
12809			return err
12810		}
12811		if x.NextPageToken == "" {
12812			return nil
12813		}
12814		c.PageToken(x.NextPageToken)
12815	}
12816}
12817
12818// method id "games.turnBasedMatches.rematch":
12819
12820type TurnBasedMatchesRematchCall struct {
12821	s          *Service
12822	matchId    string
12823	urlParams_ gensupport.URLParams
12824	ctx_       context.Context
12825	header_    http.Header
12826}
12827
12828// Rematch: Create a rematch of a match that was previously completed,
12829// with the same participants. This can be called by only one player on
12830// a match still in their list; the player must have called Finish
12831// first. Returns the newly created match; it will be the caller's turn.
12832func (r *TurnBasedMatchesService) Rematch(matchId string) *TurnBasedMatchesRematchCall {
12833	c := &TurnBasedMatchesRematchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12834	c.matchId = matchId
12835	return c
12836}
12837
12838// Language sets the optional parameter "language": The preferred
12839// language to use for strings returned by this method.
12840func (c *TurnBasedMatchesRematchCall) Language(language string) *TurnBasedMatchesRematchCall {
12841	c.urlParams_.Set("language", language)
12842	return c
12843}
12844
12845// RequestId sets the optional parameter "requestId": A randomly
12846// generated numeric ID for each request specified by the caller. This
12847// number is used at the server to ensure that the request is handled
12848// correctly across retries.
12849func (c *TurnBasedMatchesRematchCall) RequestId(requestId int64) *TurnBasedMatchesRematchCall {
12850	c.urlParams_.Set("requestId", fmt.Sprint(requestId))
12851	return c
12852}
12853
12854// Fields allows partial responses to be retrieved. See
12855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12856// for more information.
12857func (c *TurnBasedMatchesRematchCall) Fields(s ...googleapi.Field) *TurnBasedMatchesRematchCall {
12858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12859	return c
12860}
12861
12862// Context sets the context to be used in this call's Do method. Any
12863// pending HTTP request will be aborted if the provided context is
12864// canceled.
12865func (c *TurnBasedMatchesRematchCall) Context(ctx context.Context) *TurnBasedMatchesRematchCall {
12866	c.ctx_ = ctx
12867	return c
12868}
12869
12870// Header returns an http.Header that can be modified by the caller to
12871// add HTTP headers to the request.
12872func (c *TurnBasedMatchesRematchCall) Header() http.Header {
12873	if c.header_ == nil {
12874		c.header_ = make(http.Header)
12875	}
12876	return c.header_
12877}
12878
12879func (c *TurnBasedMatchesRematchCall) doRequest(alt string) (*http.Response, error) {
12880	reqHeaders := make(http.Header)
12881	for k, v := range c.header_ {
12882		reqHeaders[k] = v
12883	}
12884	reqHeaders.Set("User-Agent", c.s.userAgent())
12885	var body io.Reader = nil
12886	c.urlParams_.Set("alt", alt)
12887	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/rematch")
12888	urls += "?" + c.urlParams_.Encode()
12889	req, _ := http.NewRequest("POST", urls, body)
12890	req.Header = reqHeaders
12891	googleapi.Expand(req.URL, map[string]string{
12892		"matchId": c.matchId,
12893	})
12894	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12895}
12896
12897// Do executes the "games.turnBasedMatches.rematch" call.
12898// Exactly one of *TurnBasedMatchRematch or error will be non-nil. Any
12899// non-2xx status code is an error. Response headers are in either
12900// *TurnBasedMatchRematch.ServerResponse.Header or (if a response was
12901// returned at all) in error.(*googleapi.Error).Header. Use
12902// googleapi.IsNotModified to check whether the returned error was
12903// because http.StatusNotModified was returned.
12904func (c *TurnBasedMatchesRematchCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatchRematch, error) {
12905	gensupport.SetOptions(c.urlParams_, opts...)
12906	res, err := c.doRequest("json")
12907	if res != nil && res.StatusCode == http.StatusNotModified {
12908		if res.Body != nil {
12909			res.Body.Close()
12910		}
12911		return nil, &googleapi.Error{
12912			Code:   res.StatusCode,
12913			Header: res.Header,
12914		}
12915	}
12916	if err != nil {
12917		return nil, err
12918	}
12919	defer googleapi.CloseBody(res)
12920	if err := googleapi.CheckResponse(res); err != nil {
12921		return nil, err
12922	}
12923	ret := &TurnBasedMatchRematch{
12924		ServerResponse: googleapi.ServerResponse{
12925			Header:         res.Header,
12926			HTTPStatusCode: res.StatusCode,
12927		},
12928	}
12929	target := &ret
12930	if err := gensupport.DecodeResponse(target, res); err != nil {
12931		return nil, err
12932	}
12933	return ret, nil
12934	// {
12935	//   "description": "Create a rematch of a match that was previously completed, with the same participants. This can be called by only one player on a match still in their list; the player must have called Finish first. Returns the newly created match; it will be the caller's turn.",
12936	//   "httpMethod": "POST",
12937	//   "id": "games.turnBasedMatches.rematch",
12938	//   "parameterOrder": [
12939	//     "matchId"
12940	//   ],
12941	//   "parameters": {
12942	//     "language": {
12943	//       "description": "The preferred language to use for strings returned by this method.",
12944	//       "location": "query",
12945	//       "type": "string"
12946	//     },
12947	//     "matchId": {
12948	//       "description": "The ID of the match.",
12949	//       "location": "path",
12950	//       "required": true,
12951	//       "type": "string"
12952	//     },
12953	//     "requestId": {
12954	//       "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.",
12955	//       "format": "int64",
12956	//       "location": "query",
12957	//       "type": "string"
12958	//     }
12959	//   },
12960	//   "path": "turnbasedmatches/{matchId}/rematch",
12961	//   "response": {
12962	//     "$ref": "TurnBasedMatchRematch"
12963	//   },
12964	//   "scopes": [
12965	//     "https://www.googleapis.com/auth/games",
12966	//     "https://www.googleapis.com/auth/plus.login"
12967	//   ]
12968	// }
12969
12970}
12971
12972// method id "games.turnBasedMatches.sync":
12973
12974type TurnBasedMatchesSyncCall struct {
12975	s            *Service
12976	urlParams_   gensupport.URLParams
12977	ifNoneMatch_ string
12978	ctx_         context.Context
12979	header_      http.Header
12980}
12981
12982// Sync: Returns turn-based matches the player is or was involved in
12983// that changed since the last sync call, with the least recent changes
12984// coming first. Matches that should be removed from the local cache
12985// will have a status of MATCH_DELETED.
12986func (r *TurnBasedMatchesService) Sync() *TurnBasedMatchesSyncCall {
12987	c := &TurnBasedMatchesSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12988	return c
12989}
12990
12991// IncludeMatchData sets the optional parameter "includeMatchData": True
12992// if match data should be returned in the response. Note that not all
12993// data will necessarily be returned if include_match_data is true; the
12994// server may decide to only return data for some of the matches to
12995// limit download size for the client. The remainder of the data for
12996// these matches will be retrievable on request.
12997func (c *TurnBasedMatchesSyncCall) IncludeMatchData(includeMatchData bool) *TurnBasedMatchesSyncCall {
12998	c.urlParams_.Set("includeMatchData", fmt.Sprint(includeMatchData))
12999	return c
13000}
13001
13002// Language sets the optional parameter "language": The preferred
13003// language to use for strings returned by this method.
13004func (c *TurnBasedMatchesSyncCall) Language(language string) *TurnBasedMatchesSyncCall {
13005	c.urlParams_.Set("language", language)
13006	return c
13007}
13008
13009// MaxCompletedMatches sets the optional parameter
13010// "maxCompletedMatches": The maximum number of completed or canceled
13011// matches to return in the response. If not set, all matches returned
13012// could be completed or canceled.
13013func (c *TurnBasedMatchesSyncCall) MaxCompletedMatches(maxCompletedMatches int64) *TurnBasedMatchesSyncCall {
13014	c.urlParams_.Set("maxCompletedMatches", fmt.Sprint(maxCompletedMatches))
13015	return c
13016}
13017
13018// MaxResults sets the optional parameter "maxResults": The maximum
13019// number of matches to return in the response, used for paging. For any
13020// response, the actual number of matches to return may be less than the
13021// specified maxResults.
13022func (c *TurnBasedMatchesSyncCall) MaxResults(maxResults int64) *TurnBasedMatchesSyncCall {
13023	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13024	return c
13025}
13026
13027// PageToken sets the optional parameter "pageToken": The token returned
13028// by the previous request.
13029func (c *TurnBasedMatchesSyncCall) PageToken(pageToken string) *TurnBasedMatchesSyncCall {
13030	c.urlParams_.Set("pageToken", pageToken)
13031	return c
13032}
13033
13034// Fields allows partial responses to be retrieved. See
13035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13036// for more information.
13037func (c *TurnBasedMatchesSyncCall) Fields(s ...googleapi.Field) *TurnBasedMatchesSyncCall {
13038	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13039	return c
13040}
13041
13042// IfNoneMatch sets the optional parameter which makes the operation
13043// fail if the object's ETag matches the given value. This is useful for
13044// getting updates only after the object has changed since the last
13045// request. Use googleapi.IsNotModified to check whether the response
13046// error from Do is the result of In-None-Match.
13047func (c *TurnBasedMatchesSyncCall) IfNoneMatch(entityTag string) *TurnBasedMatchesSyncCall {
13048	c.ifNoneMatch_ = entityTag
13049	return c
13050}
13051
13052// Context sets the context to be used in this call's Do method. Any
13053// pending HTTP request will be aborted if the provided context is
13054// canceled.
13055func (c *TurnBasedMatchesSyncCall) Context(ctx context.Context) *TurnBasedMatchesSyncCall {
13056	c.ctx_ = ctx
13057	return c
13058}
13059
13060// Header returns an http.Header that can be modified by the caller to
13061// add HTTP headers to the request.
13062func (c *TurnBasedMatchesSyncCall) Header() http.Header {
13063	if c.header_ == nil {
13064		c.header_ = make(http.Header)
13065	}
13066	return c.header_
13067}
13068
13069func (c *TurnBasedMatchesSyncCall) doRequest(alt string) (*http.Response, error) {
13070	reqHeaders := make(http.Header)
13071	for k, v := range c.header_ {
13072		reqHeaders[k] = v
13073	}
13074	reqHeaders.Set("User-Agent", c.s.userAgent())
13075	if c.ifNoneMatch_ != "" {
13076		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13077	}
13078	var body io.Reader = nil
13079	c.urlParams_.Set("alt", alt)
13080	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/sync")
13081	urls += "?" + c.urlParams_.Encode()
13082	req, _ := http.NewRequest("GET", urls, body)
13083	req.Header = reqHeaders
13084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13085}
13086
13087// Do executes the "games.turnBasedMatches.sync" call.
13088// Exactly one of *TurnBasedMatchSync or error will be non-nil. Any
13089// non-2xx status code is an error. Response headers are in either
13090// *TurnBasedMatchSync.ServerResponse.Header or (if a response was
13091// returned at all) in error.(*googleapi.Error).Header. Use
13092// googleapi.IsNotModified to check whether the returned error was
13093// because http.StatusNotModified was returned.
13094func (c *TurnBasedMatchesSyncCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatchSync, error) {
13095	gensupport.SetOptions(c.urlParams_, opts...)
13096	res, err := c.doRequest("json")
13097	if res != nil && res.StatusCode == http.StatusNotModified {
13098		if res.Body != nil {
13099			res.Body.Close()
13100		}
13101		return nil, &googleapi.Error{
13102			Code:   res.StatusCode,
13103			Header: res.Header,
13104		}
13105	}
13106	if err != nil {
13107		return nil, err
13108	}
13109	defer googleapi.CloseBody(res)
13110	if err := googleapi.CheckResponse(res); err != nil {
13111		return nil, err
13112	}
13113	ret := &TurnBasedMatchSync{
13114		ServerResponse: googleapi.ServerResponse{
13115			Header:         res.Header,
13116			HTTPStatusCode: res.StatusCode,
13117		},
13118	}
13119	target := &ret
13120	if err := gensupport.DecodeResponse(target, res); err != nil {
13121		return nil, err
13122	}
13123	return ret, nil
13124	// {
13125	//   "description": "Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first. Matches that should be removed from the local cache will have a status of MATCH_DELETED.",
13126	//   "httpMethod": "GET",
13127	//   "id": "games.turnBasedMatches.sync",
13128	//   "parameters": {
13129	//     "includeMatchData": {
13130	//       "description": "True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.",
13131	//       "location": "query",
13132	//       "type": "boolean"
13133	//     },
13134	//     "language": {
13135	//       "description": "The preferred language to use for strings returned by this method.",
13136	//       "location": "query",
13137	//       "type": "string"
13138	//     },
13139	//     "maxCompletedMatches": {
13140	//       "description": "The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled.",
13141	//       "format": "int32",
13142	//       "location": "query",
13143	//       "maximum": "500",
13144	//       "minimum": "0",
13145	//       "type": "integer"
13146	//     },
13147	//     "maxResults": {
13148	//       "description": "The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults.",
13149	//       "format": "int32",
13150	//       "location": "query",
13151	//       "maximum": "500",
13152	//       "minimum": "1",
13153	//       "type": "integer"
13154	//     },
13155	//     "pageToken": {
13156	//       "description": "The token returned by the previous request.",
13157	//       "location": "query",
13158	//       "type": "string"
13159	//     }
13160	//   },
13161	//   "path": "turnbasedmatches/sync",
13162	//   "response": {
13163	//     "$ref": "TurnBasedMatchSync"
13164	//   },
13165	//   "scopes": [
13166	//     "https://www.googleapis.com/auth/games",
13167	//     "https://www.googleapis.com/auth/plus.login"
13168	//   ]
13169	// }
13170
13171}
13172
13173// Pages invokes f for each page of results.
13174// A non-nil error returned from f will halt the iteration.
13175// The provided context supersedes any context provided to the Context method.
13176func (c *TurnBasedMatchesSyncCall) Pages(ctx context.Context, f func(*TurnBasedMatchSync) error) error {
13177	c.ctx_ = ctx
13178	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13179	for {
13180		x, err := c.Do()
13181		if err != nil {
13182			return err
13183		}
13184		if err := f(x); err != nil {
13185			return err
13186		}
13187		if x.NextPageToken == "" {
13188			return nil
13189		}
13190		c.PageToken(x.NextPageToken)
13191	}
13192}
13193
13194// method id "games.turnBasedMatches.takeTurn":
13195
13196type TurnBasedMatchesTakeTurnCall struct {
13197	s                  *Service
13198	matchId            string
13199	turnbasedmatchturn *TurnBasedMatchTurn
13200	urlParams_         gensupport.URLParams
13201	ctx_               context.Context
13202	header_            http.Header
13203}
13204
13205// TakeTurn: Commit the results of a player turn.
13206func (r *TurnBasedMatchesService) TakeTurn(matchId string, turnbasedmatchturn *TurnBasedMatchTurn) *TurnBasedMatchesTakeTurnCall {
13207	c := &TurnBasedMatchesTakeTurnCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13208	c.matchId = matchId
13209	c.turnbasedmatchturn = turnbasedmatchturn
13210	return c
13211}
13212
13213// Language sets the optional parameter "language": The preferred
13214// language to use for strings returned by this method.
13215func (c *TurnBasedMatchesTakeTurnCall) Language(language string) *TurnBasedMatchesTakeTurnCall {
13216	c.urlParams_.Set("language", language)
13217	return c
13218}
13219
13220// Fields allows partial responses to be retrieved. See
13221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13222// for more information.
13223func (c *TurnBasedMatchesTakeTurnCall) Fields(s ...googleapi.Field) *TurnBasedMatchesTakeTurnCall {
13224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13225	return c
13226}
13227
13228// Context sets the context to be used in this call's Do method. Any
13229// pending HTTP request will be aborted if the provided context is
13230// canceled.
13231func (c *TurnBasedMatchesTakeTurnCall) Context(ctx context.Context) *TurnBasedMatchesTakeTurnCall {
13232	c.ctx_ = ctx
13233	return c
13234}
13235
13236// Header returns an http.Header that can be modified by the caller to
13237// add HTTP headers to the request.
13238func (c *TurnBasedMatchesTakeTurnCall) Header() http.Header {
13239	if c.header_ == nil {
13240		c.header_ = make(http.Header)
13241	}
13242	return c.header_
13243}
13244
13245func (c *TurnBasedMatchesTakeTurnCall) doRequest(alt string) (*http.Response, error) {
13246	reqHeaders := make(http.Header)
13247	for k, v := range c.header_ {
13248		reqHeaders[k] = v
13249	}
13250	reqHeaders.Set("User-Agent", c.s.userAgent())
13251	var body io.Reader = nil
13252	body, err := googleapi.WithoutDataWrapper.JSONReader(c.turnbasedmatchturn)
13253	if err != nil {
13254		return nil, err
13255	}
13256	reqHeaders.Set("Content-Type", "application/json")
13257	c.urlParams_.Set("alt", alt)
13258	urls := googleapi.ResolveRelative(c.s.BasePath, "turnbasedmatches/{matchId}/turn")
13259	urls += "?" + c.urlParams_.Encode()
13260	req, _ := http.NewRequest("PUT", urls, body)
13261	req.Header = reqHeaders
13262	googleapi.Expand(req.URL, map[string]string{
13263		"matchId": c.matchId,
13264	})
13265	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13266}
13267
13268// Do executes the "games.turnBasedMatches.takeTurn" call.
13269// Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx
13270// status code is an error. Response headers are in either
13271// *TurnBasedMatch.ServerResponse.Header or (if a response was returned
13272// at all) in error.(*googleapi.Error).Header. Use
13273// googleapi.IsNotModified to check whether the returned error was
13274// because http.StatusNotModified was returned.
13275func (c *TurnBasedMatchesTakeTurnCall) Do(opts ...googleapi.CallOption) (*TurnBasedMatch, error) {
13276	gensupport.SetOptions(c.urlParams_, opts...)
13277	res, err := c.doRequest("json")
13278	if res != nil && res.StatusCode == http.StatusNotModified {
13279		if res.Body != nil {
13280			res.Body.Close()
13281		}
13282		return nil, &googleapi.Error{
13283			Code:   res.StatusCode,
13284			Header: res.Header,
13285		}
13286	}
13287	if err != nil {
13288		return nil, err
13289	}
13290	defer googleapi.CloseBody(res)
13291	if err := googleapi.CheckResponse(res); err != nil {
13292		return nil, err
13293	}
13294	ret := &TurnBasedMatch{
13295		ServerResponse: googleapi.ServerResponse{
13296			Header:         res.Header,
13297			HTTPStatusCode: res.StatusCode,
13298		},
13299	}
13300	target := &ret
13301	if err := gensupport.DecodeResponse(target, res); err != nil {
13302		return nil, err
13303	}
13304	return ret, nil
13305	// {
13306	//   "description": "Commit the results of a player turn.",
13307	//   "httpMethod": "PUT",
13308	//   "id": "games.turnBasedMatches.takeTurn",
13309	//   "parameterOrder": [
13310	//     "matchId"
13311	//   ],
13312	//   "parameters": {
13313	//     "language": {
13314	//       "description": "The preferred language to use for strings returned by this method.",
13315	//       "location": "query",
13316	//       "type": "string"
13317	//     },
13318	//     "matchId": {
13319	//       "description": "The ID of the match.",
13320	//       "location": "path",
13321	//       "required": true,
13322	//       "type": "string"
13323	//     }
13324	//   },
13325	//   "path": "turnbasedmatches/{matchId}/turn",
13326	//   "request": {
13327	//     "$ref": "TurnBasedMatchTurn"
13328	//   },
13329	//   "response": {
13330	//     "$ref": "TurnBasedMatch"
13331	//   },
13332	//   "scopes": [
13333	//     "https://www.googleapis.com/auth/games",
13334	//     "https://www.googleapis.com/auth/plus.login"
13335	//   ]
13336	// }
13337
13338}
13339